c# - ESRI Map control PanTo -
i'm trying create map center on latitude/longitude esri map command uses it's own x/y coordinate system.
control.mapcontrol.panto(new mappoint(control.mapcenter.latitude, control.mapcenter.longitude));
this code not work. there "conversion" routine mappoint out of lat/lon or should do?
the method utilize conversion lat/long(spatial reference 4326) esri coordinates (spatial reference 102100) follows:
// create mappoint lat/long coordinates var mappoint = new mappoint(long, lat); // need convert lat/long esri var webmercator = new webmercator(); var converted = (mappoint) webmercator.fromgeographic(mappoint);
before doing conversion step, can check spatial reference of mappoint
see if needs converted.
c# silverlight geolocation esri
No comments:
Post a Comment