ThinkGeo.com    |     Documentation    |     Premium Support

Multiple Map Loading Issue

Hi

I studied this article
http://samples.thinkgeo.com/MvcEdition/HowDoISamples/BackgroundMaps/UseGoogleMap/1,AllSamples
but when i tried to implement it in my project its not working
My maptype in javascript function shows nothing
Is there anything that needs to be set
please mention it clearly if so
This is my map cshtml file code

@{
// Html.ThinkGeo().Map(Model).OnClientClick(“mapClick”).Render();
Html.ThinkGeo().Map(Model).OnClientClick(“mapClick”).OnClientTrackShapeFinished(“trackShapeFinished”)
.MapBackground(new BackgroundLayer(new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"))))
.CurrentExtent(61, 38, 75, 30)
.MapTools(t =>
{
t.OverlaySwitcherMapTool().Enabled(true);
t.MouseCoordinateMapTool().Enabled(true);
})
.CustomOverlays(overlays =>
{
overlays.WorldMapKitWmsWebOverlay();

            InMemoryFeatureLayer shapeLayer = new InMemoryFeatureLayer();
            shapeLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimpleCircleStyle(GeoColor.FromArgb(180, 102, 255, 102), 10, GeoColor.StandardColors.DarkGreen, 1);
            shapeLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.StandardColors.Green, 4, true);
            shapeLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(180, 102, 255, 102), GeoColor.StandardColors.DarkGreen, 1);
            shapeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
            overlays.LayerOverlay("ShapeOverlay").IsBaseOverlay(false).Layer(shapeLayer);

            overlays.GoogleOverlay("Google Map").GoogleMapType(GoogleMapType.Normal);
        })
.Render();
}

and here’s the javascript function
And code buttons for loading map

                            <input id="btnRoad" name="btnRoad" value="roadmap" onclick="changeBackgroundMapType(google.maps.MapTypeId.ROADMAP);" type="button">
                            <input id="btnAerial" name="btnAerial" value="hybird; style="width: 40%;" onclick="changeBackgroundMapType(google.maps.MapTypeId.HYBRID);" type="button">
                            <input id="btnSatellite" name="btnSatellite" value="satellite" size="40%" style="width: 40%;" onclick="changeBackgroundMapType(google.maps.MapTypeId.SATELLITE);" type="button">
                            <input id="btnPhysical" name="btnPhysical" value="terrain" size="40%" style="width: 40%;" onclick="changeBackgroundMapType(google.maps.MapTypeId.TERRAIN);" type="button">

Please tell me if i am doing something wrong
and Please Hurry I need to answer our clients and submit our project

Regards
Waha Ali

Hi Waha,

Please try my attached sample project, which works well for Google,

8540.zip (404.2 KB)

And in fact you can get all our sample here https://github.com/ThinkGeo/HowDoISample-ForMvc

Regards,

Don

U mean this multiple maps loading won’t work with thinkgeo map suite 9.0.0 ???

Hi Waha,

9.0 also support that, please download the HowDoISample project from 9.0 product center and refer related sample.

We suggest user upgrade to use our new v10, if you hadn’t told us you are using v9 in question, we just thought you are work under v10.

Regards,

Don