ThinkGeo.com    |     Documentation    |     Premium Support

Getting Lat(x) & Long(y) Coordinates of EditOverlay Rectangle

Does anyone know if it is possible to get the X and Y coordinates of a Rectangle drawn, after executing the following code?



wpfMap1.EditOverlay.TrackMode =


TrackMode.Rectangle;

Seems as though the Overlay object doesn't expose an X and Y coordinate. I found this out after creating an wpfMap1_OverlayDrawn event handler to capture the Overlay object each time a Rectangle is drawn on the WPF Map control.


Thanks,


Nick 


 

 


 


 


 


 





Nick, 
  
   I may not understand you question but maybe I can help.  Once you draw the track rectangle you can find it in the EditLayer on the EditOverlay.  The code would look something like this EditOverlay.EditLayer.Features…  It should be in there when you are done.  You can remove it from there one you are done using it and it will disappear from the screen.  I do think we need to add an event to cover this to pass it back to you.  Adding this would give you multiple ways to get it and increase the odds you get it right. 
  
 I hope this helps. 
  
 David

Thank you David. I think this will do the trick. 
  
 Nick

Nick, 
  
   No problem.  We did it this was so that you can draw lots of track shapes and have control over when you take them out.  I think the enhanced events will be nice as well.  
  
 David