Hi
In my application, I am giving 2 basemap options. 1.Normal map, 2. Google map
User can switch from one base map to another.
- Normal map measnCountries.shp shape file. and its working fine.
- But when i am switching to google some times i am getting map and some times i am getting javascript error.
I have created new Google API key and using it for Google overlay. The bug is follows
I am using following code to display Google map
GoogleOverlay google = new GoogleOverlay("Google Map");
google.JavaScriptLibraryUri = new Uri("https://maps.google.com/maps/api/js?key=AIzaSyCcjq_hjHHrD6zlVxZ4ZATD5LVkWkN4gGw");
switch (googleOptions)
{
case "1": google.GoogleMapType = GoogleMapType.Normal; btnRoad.Checked = true; break;
case "2": google.GoogleMapType = GoogleMapType.Hybrid; btnAerial.Checked = true; break;
case "3": google.GoogleMapType = GoogleMapType.Satellite; btnSatellite.Checked = true; break;
case "4": google.GoogleMapType = GoogleMapType.Physical; btnPhysical.Checked = true; break;
default: google.GoogleMapType = GoogleMapType.Satellite; btnSatellite.Checked = true; break;
}
google.IsBaseOverlay = true;
wfMap.CustomOverlays.Add(google);
Please suggest me how to resolve this issue.
Thank you,
Ashok