Page 4 of 4

Google maps wont center

Posted: Fri Dec 05, 2014 9:12 am
by Cristian Hidalgo

the link above that Maryna so kindly provided


Google maps wont center

Posted: Fri Dec 05, 2014 9:46 am
by Illya Stepanov

This link works for me: http://goo.gl/1ZGBsm


Google maps wont center

Posted: Fri Dec 05, 2014 9:48 am
by Cristian Hidalgo

Hi, I was trying to solve this... https://getsatisfaction.com/apperyio/...
have followed the tutorials and read in the forums but nothing has worked,can u pls help its urgent :(


Google maps wont center

Posted: Fri Dec 05, 2014 10:13 am
by Illya Stepanov

Please check our reply there.


Google maps wont center

Posted: Thu Jan 15, 2015 1:13 pm
by Shawn

hi yurii

has this call changed ? I'm getting the following error

Uncaught TypeError: Cannot read property 'mapElement' of undefined

Here is my initialize() & setdelay() function

var directionsDisplay;
var map;
var markers = [];
var directionsService = new google.maps.DirectionsService();
var bounds = new google.maps.LatLngBounds();
var trafficLayer = new google.maps.TrafficLayer();

function initialize(agm)
{
console.log('Initializing Map...');

Code: Select all

 map = Appery(agm).options.mapElement.gmap('get', 'map'); 
 if (!map)  
 { 
     console.log('Map delay...') ;  
     setDelay(); 
 }  
 else 
 { 
  console.log('Map ready...') ; 
       setDelay(); 
 } 

 directionsDisplay = new google.maps.DirectionsRenderer(); 

}

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

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

Image


Google maps wont center

Posted: Tue Jan 20, 2015 8:00 am
by Alena Prykhodko

Hello,

You call initialization function too soon.
50 millisec can be only enough for Windows to run the loop twice.
Try to add your initialization code to the code snippet from this tutorial
http://blog.bismallion.com/appery-io-...
You will then get marker placement on time.