Pherrymason
Pherrymason

Reputation: 8067

Coordinate Differences between Google maps and Google Static Maps

I'm writing an application where user can point a position in a Google Maps map (using Google Maps API). I grab the position by:

google.maps.event.addListener( my_map, 'click', function(mouseEvent){

     var position = mouseEvent.latLng;
     //position = 41.57187486787156, 0.609094047546364
});

Then, in an another page, I display an image with all marked positions using Google Static Maps using the coordinates grabbed from user marked points:

<img alt="map image" src="http://maps.googleapis.com/maps/api/staticmap?sensor=false&size=550x380&markers=label:A|41.57187486787156, 0.609094047546364">

Google Static Map displays the marker a little to the south.

Upvotes: 1

Views: 1482

Answers (2)

Munyeshyaka lambert
Munyeshyaka lambert

Reputation: 1

Static means "constant--never changing". dynamic is "changing". You can make dynamic changes to a database without having to shutdown the instance and restart for the changes to take effect. However, if you do not update the control file, when you shutdown and startup, the dynamic change is gone--it wasn't permanent. Static sites are meant for those sites that cant be changed or updates regularly. and Dynamic sites are those sites that changes or update regularly.

Upvotes: 0

Dr.Molle
Dr.Molle

Reputation: 117334

Static Maps has a precision-limit of 6 decimals for locations, the marker-position will be rounded and set to 41.571875,0.609094

You'll need to round the values inside the dynamic map too to get the same marker-location on both maps.

Upvotes: 1

Related Questions