Cristian Hidalgo
Posts: 0
Joined: Mon Nov 03, 2014 2:38 pm

Google maps wont center

the link above that Maryna so kindly provided

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Google maps wont center

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

Cristian Hidalgo
Posts: 0
Joined: Mon Nov 03, 2014 2:38 pm

Google maps wont center

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 :(

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Google maps wont center

Please check our reply there.

Shawn
Posts: 0
Joined: Sat Jun 21, 2014 11:13 pm

Google maps wont center

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Google maps wont center

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.

Return to “Issues”