Page 1 of 1

Uncaught TypeError: Cannot read property 'mapTypeControl' of undefined

Posted: Mon Jan 25, 2016 8:10 am
by B5107656409

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);
}


Uncaught TypeError: Cannot read property 'mapTypeControl' of undefined

Posted: Mon Jan 25, 2016 4:53 pm
by Serhii Kulibaba

Hello,

Please change you JS code.

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