Hi
I have to add many markers to a map layer (Mercator-google ) I tried with the code below but markers dont show the markers are (Lat/lon) and I tried to convert to meters but I have no results can anyone help me with some example or help to change this?
thanks
regards
GoogleMapsOverlay googleMapsOverlay = new GoogleMapsOverlay();
mapHolder.MapUnit = GeographyUnit.Meter;
mapHolder.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.FromArgb(255, 198, 255, 255));
mapHolder.ThreadingMode = MapThreadingMode.SingleThreaded;
mapHolder.CurrentExtent = new RectangleShape(-13939426.6371, 6701997.4056, -7812401.86, 2626987.386962);
Proj4Projection proj4 = new Proj4Projection();
proj4.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);
proj4.ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString();
InMemoryMarkerOverlay inMemoryMarkerOverlay = new InMemoryMarkerOverlay();
inMemoryMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultPointMarkerStyle.Image = Properties.Resources.AQUA;
inMemoryMarkerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
// add many locations lat,long
Feature newFeature = new Feature(32.642776, -115.431203);
inMemoryMarkerOverlay.FeatureSource.Projection = proj4;
inMemoryMarkerOverlay.FeatureSource.BeginTransaction();
inMemoryMarkerOverlay.FeatureSource.AddFeature(newFeature);
inMemoryMarkerOverlay.FeatureSource.CommitTransaction();
googleMapsOverlay.MapType = GoogleMapsMapType.RoadMap;
mapHolder.Overlays.Add(googleMapsOverlay);
inMemoryMarkerOverlay.MapControl = mapHolder;
mapHolder.Overlays.Add("MarkerOverlay", inMemoryMarkerOverlay);
mapHolder.Refresh();