Question

Why is the Maptypecontrol still showing on my map in the homepage even though its value is false? www.driftcoffeehouse.com

if (status == 'OK' && results.length > 0) {
var latlng = new  google.maps.LatLng(results[0].geometry.location.b,results[0].geometry.location.c);
var myOptions = {
zoom: 13,
maptypecontrol: false,
center: results[0].geometry.location,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
Was it helpful?

Solution

It is still there because you used maptypecontrol instead of mapTypeControl.

JavaScript is a case sensitive language: keywords, function names, variables, identifiers... everything is case sensitive so maptypecontrol is different from mapTypeControl. And because mapTypeControl is not there, default value true is used.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top