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