Google map not accepting commands
I am trying to display the Terrain map as my default but I keep getting an error.
"Uncaught TypeError: Cannot set property 'mapTypeId' of undefined "
"Cannot refresh, map is not initialized! "
It seems that my map does not get initialized
Here is the code.
var mapOptions = {
zoom: 14,
mapTypeId: google.maps.MapTypeId.Terrain
};
// Tried each of these
//var map = new google.maps.Map($('div[dsid="map"]').get(0), mapOptions);
//var map = Appery('map');
var map = new google.maps.Map(Appery('map').get(0), mapOptions);
map.gmap.mapTypeId = google.maps.MapTypeId.Terrain;
map.refresh();
What I really want to do is simply turn off the POI (points of interest) on the map and switching to the Terrain map was a backup. but I figured if I can get the simpler solution working I would take that.
var myMapOptions = {
styles:[{
featureType:"poi",
stylers:[{
visibility:"off"
}]
}]
};
Any ideas greatly appreciated?
Thanks
Larry