About Geometry Layers

Apr 3, 2009 at 11:16 PM
Edited Apr 3, 2009 at 11:59 PM
Hi, thanks for answering my previous questions.
I have read the API.
Seemed like X and Y cooridinates are only exposed to "DevPin.cs"

Is there anyways at runtime, i can check all the Pins Latitude and Longitude in a specified PinLayer ?
Apr 4, 2009 at 12:07 AM
A pin has a "Point" Property
if you look at the DevPin class you will see it inherits PointBase class
public class DevPin : PointBase

so you can get the coords from the Point Property
Examples from Page.cs in Prototype project
            //Add an arrow pin whose another point is an anchor of 0.5, 1.0;
            var point = new Point(0, 0);
            var arrowPin = new PointBase { Point = point, Style = styleArrow };
            //Equator endpoints are drawn on an ElementUpdate Geometry Layer to test synching of layers
            GeometryLayer elementUpdateLayer = new GeometryLayer(map) { UpdateMode = GeometryLayer.UpdateModes.ElementUpdate };
            elementUpdateLayer.Opacity = 0.5;
            elementUpdateLayer.Add(new PointBase { Point = new Point(-180, 0) });
            elementUpdateLayer.Add(new PointBase { X = 180, Y = 0 }); // Alternative syntax for setting a PointBase
Apr 4, 2009 at 1:09 AM
Thanks .netnoobie!!
i got the point by using