Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

GoogleMapAPI 2.5 and language dependency settings

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
nlstart
Smarty Rookie


Joined: 19 Oct 2007
Posts: 8

PostPosted: Fri Oct 19, 2007 11:28 am    Post subject: GoogleMapAPI 2.5 and language dependency settings Reply with quote

I wondered why my English page was locating perfectly; zooming in perfectly at the location set, and my Dutch page was (with the same data) ‘zooming in’ on world scale.

I compared the output and came to the conclusion that this was the situation in English:

var bds = new GLatLngBounds(new GLatLng(50.8258173, 3.74226154), new GLatLng(53.2391067, 6.92817646));

and this was the result on the Dutch page (for your information: The Netherlands uses “,” as decimal sign and “.” as thousand separator):

var bds = new GLatLngBounds(new GLatLng(50,82580639, 4,25816752), new GLatLng(53,24020861, 6,92306848));

This easily explained why the map in Dutch got it all wrong… fixing the line for the new GLatLngBounds with the right number format solved it for me.

In the GoogleMapAPI the correct phrase of the line should be:

Code:
$_output .= "var bds = new GLatLngBounds(new GLatLng(".number_format($this->_min_lat, 6, ".", "").", ".number_format($this->_min_lon, 6, ".", "")."), new GLatLng(".number_format($this->_max_lat, 6, ".", "").", ".number_format($this->_max_lon, 6, ".", "")."));\n";


Thanks for publishing this excellent class!
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Fri Oct 19, 2007 2:23 pm    Post subject: Reply with quote

What version are you using? There was a fix for that in version 2.4.

[edit] found it, added to CVS. Thanks!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP