ThinkGeo.com    |     Documentation    |     Premium Support

Problem display the map in a mini map

I am display the ThinkGeo online street map, and want to have a min map. I think I am following the examples, but the mini map container is displayed but no map in it.

Any help
Thanks Jim

    private void DisplayOnlineMap(string LayerName, WorldMapKitMapType MapType)
    {
        try
        {
            winformsMap1.Overlays.Clear();
            winformsMap1.MapUnit = GeographyUnit.DecimalDegree;

            winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);

            WorldMapKitWmsDesktopOverlay worldMapKitDesktopOverlay = new WorldMapKitWmsDesktopOverlay();

            worldMapKitDesktopOverlay.Name = LayerName;

            worldMapKitDesktopOverlay.WebProxy = new WebProxy(WebProxyURL, true);

            winformsMap1.Overlays.Add(LayerName, worldMapKitDesktopOverlay);
            worldMapKitDesktopOverlay.MapType = MapType;

            winformsMap1.CurrentExtent = GetCurrentMapExtent();

            MiniMapAdornmentLayer miniMapLayer = new MiniMapAdornmentLayer();

            miniMapLayer.Location = AdornmentLocation.LowerLeft;
            miniMapLayer.Layers.Add(new BackgroundLayer(winformsMap1.BackgroundOverlay.BackgroundBrush));

            winformsMap1.AdornmentOverlay.Layers.Add(miniMapLayer);

            winformsMap1.Refresh();
        }
        catch (Exception ex)
        {
            string er = ex.Message;

        }
    }

Hi James,

It looks your MiniMapAdornmentLayer only added the background layer but not your other map layers.

Please view the sample, it loop all layer in mainly map and then add them to the layers of MiniMapAdornmentLayer.

Please try to add them.

Regards,

Don

Thanks Don for your response, but I am missing something, maybe because I new to ThinkGeo. The Mini Map Adornment Layer sample shows adding a shape file to the mini map. What I am trying to do is to display the ThinkGeo online Street map in the mini map.
Thanks Jim

Hi Jim,

What’s the ThinkGeo online Street map, does that our web service or a special layer?

It looks the MiniMapAdornmentLayer will make the mainly map get same extent with mini map, so I am not sure whether that will works if you use other source.

I need your more detail scenario and source, so I can help you work on this.

Regards,

Don