3

I am using ArcGIS maps and trying to follow JS API. I am trying to understand how can I add a protractor on the map which will help in angles while drawing polygons. I understand I could add a Feature layer but how do I add an image to it? How can I make the protractor movable, without it being scale up/down with the map?

4

enter image description hereAchieved it by adding a pictureMarker of protractor PNG image.

protactorLayer = new esri.layers.GraphicsLayer();
map.addLayer(this.protractorLayer);
protractorGraphic = protactorLayer.add(new esri.Graphic(geometry, new esri.symbol.PictureMarkerSymbol('images/protractor.png', 250, 250)));
  • 2
    Nice. Thanks for sharing, please mark this as the answer by clicking on that green tick to the left of the voting buttons. If your feeling keen, edit your answer to include a screenshot as well... – Simon Oct 19 '12 at 0:23
  • Thats nice. Simple yet effective. I might pinch that concept. – Simon Oct 20 '12 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.