B5107656409
Posts: 0
Joined: Thu Jul 23, 2015 6:39 am

Uncaught TypeError: Cannot read property 'mapTypeControl' of undefined

Hello,

How to set Google Map options?
Uncaught TypeError: Cannot read property 'mapTypeControl' of undefined

var map;
function initMap()
{

Code: Select all

 map = Apperyio('googlemap').gmap; 
 map.mapTypeControl(false); 
 map.panControl(true); 
 map.streetViewControl(false); 

 if(!map) { 
     setDelay(); 
 }  

}

function setDelay() {
setTimeout(initMap, 50);
}

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Uncaught TypeError: Cannot read property 'mapTypeControl' of undefined

Hello,

Please change you JS code.

if(!map) {
setDelay();
} else {
/*
put here all functions like:
map.mapTypeControl(false);
map.panControl(true);
map.streetViewControl(false);
*/
}

Return to “Issues”