With reference to the answer of Mika in this question;
Is there a way to display a single country in Google map? It should be only one country, not parts from other countries included1
Is there a way i could enable clicking, dragging, scrolling with only US country in the map?
I had been trying to do it. But it shows a blank image with no error as follows:
Following is the code that i have modified from the above answer.
var myLatlng = new google.maps.LatLng(41.850033, -87.6500523);
var myOptions = {
//zoom: 3,
center: myLatlng,
//mapTypeId: google.maps.MapTypeId.ROADMAP,
zoom: 5,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
styles: [
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{ "visibility": "off" }
]
}, {
"featureType": "landscape",
"stylers": [
{ "visibility": "off" }
]
}, {
"featureType": "road",
"stylers": [
{ "visibility": "off" }
]
}, {
"featureType": "administrative",
"stylers": [
{ "visibility": "off" }
]
}, {
"featureType": "poi",
"stylers": [
{ "visibility": "off" }
]
}, {
"featureType": "administrative",
"stylers": [
{ "visibility": "off" }
]
}, {
"elementType": "labels",
"stylers": [
{ "visibility": "off" }
]
}
]
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
What is it that i am missing? Any help would be highly appreciated.