Hello,
I create all my server-side markers from shapefiles using the same function. I use PointStyle markers for ZommLevel01-05 and FutureSourceMarkerOverlay for ZoomLevel06-20. Starting from ZommLevel06 I also show labels (as ShapeFileFeatureLayer).
I noticed that after ZoomLevel06 some markers/icons disappeared. It look like that if the markers have the same coordinates, one of them are not shown.
How can I handle this situation?
Below are my function that create markers and some images.
private void createProperties(string layerName, string iconPath, string filePath, out ShapeFileFeatureLayer layer, out ShapeFileFeatureLayer labelLayer, out FeatureSourceMarkerOverlay markerOverlay)
{
GeoImage icon = new GeoImage(Server.MapPath(iconPath));
PointStyle pointStyle, pointStyleSmall;
pointStyle = new PointStyle(icon);
pointStyleSmall = new PointStyle(icon);
pointStyleSmall.ImageScale = 0.25;
layer = new ShapeFileFeatureLayer(Server.MapPath(filePath));
layer.Name = layerName;
layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = pointStyleSmall;
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level05;
layer.IsVisible = false;
labelLayer = new ShapeFileFeatureLayer(Server.MapPath(filePath));
labelLayer.Name = layerName + "Label";
labelLayer.ZoomLevelSet.ZoomLevel06.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("PropertyNa", "Arial", 8, DrawingFontStyles.Regular, GeoColor.StandardColors.Black, 3, 3);
labelLayer.ZoomLevelSet.ZoomLevel06.DefaultTextStyle.XOffsetInPixel = icon.GetWidth();
labelLayer.ZoomLevelSet.ZoomLevel06.DefaultTextStyle.YOffsetInPixel = - icon.GetHeight() / 2;
labelLayer.ZoomLevelSet.ZoomLevel06.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
labelLayer.DrawingMarginPercentage = 50;
labelLayer.IsVisible = false;
markerOverlay = new FeatureSourceMarkerOverlay(layerName + "Marker");
markerOverlay.Name = layerName + "Marker";
markerOverlay.FeatureSource = layer.FeatureSource;
markerOverlay.ZoomLevelSet.ZoomLevel06.DefaultMarkerStyle.WebImage = new WebImage(iconPath);
markerOverlay.ZoomLevelSet.ZoomLevel06.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
markerOverlay.IsVisible = false;
markerOverlay.IsVisibleInOverlaySwitcher = false;
markerOverlay.Click += new EventHandler<markeroverlayclickeventargs></markeroverlayclickeventargs>(markerOverlay_Click);
return;
}