Hi, so I'd like to be able to work in Google maps but use longitude and latitude coordinates. I've achieved this to a certain degree by creating inmemoryfeaturelayers and adding shapes to the layer. Then changing the projection of the layer to the googlemaps projection. This works if I have world map kit displayed and then reload google maps, but this does not work is I have google maps loaded and want to create a new point, or change the coordinates of a currently existing point. When I try all that happens is the point is placed at the centre of the map.
What I've done is:
create a googlemapsoverlay and added it to the winformsmap
create a inmemoryfeature layer and set it's projection to the google projection
create a button which will add a point onto the inmemoryfeature layer
start debugging the form
and when I press the button the point is placed at 0,0 instead of the correct coordinates
Funny thing is, if I create and upload the point before uploading google maps it works.
Thank you for the description of your problem. What I would do, I would do the projection conversion at the level of the X and Y values of the point, instead of setting the projection at the level of the InMemoryFeatureLayer. I have below some sample code where you set the point at the location Lat 46 N, Long 80 W and by clicking the button the point is placed at Lat 47 N, Long 73 W. This code is at least going to get you going in your project. So you can use that method. In the meantime, I am going to ask the Development team if there is a preferred way to accomplish that task. Thank you.
{ winformsMap1.MapUnit = GeographyUnit.Meter;
GoogleMapsOverlay googleMapsOverlay = new GoogleMapsOverlay(); googleMapsOverlay.MapType = GoogleMapsMapType.RoadMap;