Quote from: redstormj at Nov 24, 2011, 10:41 PMI recently installed this and noticed my coordenates were being changed from:
46.538362 , 2.42775
to:
46,538362 , 2,42775
This of course would not render the form properly.
Going through the code I found this:
$lat = (float) $latLng[0];
$cfg['lat'] = (($lat >= -90.) && ($lat <= 90.)) ? $lat : '46.538362';
$lng = (float) (isset($latLng[1]) ? $latLng[1] : '2.427753');
$cfg['lng'] = (($lng >= -180.) && ($lng <= 180.)) ? $lng : '2.427753';
I changed to:
$lat = $latLng[0];
$cfg['lat'] = (($lat >= -90.) && ($lat <= 90.)) ? $lat : '46.538362';
$lng = (isset($latLng[1]) ? $latLng[1] : '2.427753');
$cfg['lng'] = (($lng >= -180.) && ($lng <= 180.)) ? $lng : '2.427753';
So I basically removed the (float). Then it was all working correctly.
I just did the same and wanted to report the problem, but it seems to be quite old...
Quote from: redstormj at Nov 24, 2011, 10:41 PMI'm not entirely sure what the purpose of the float is.
It's there to make sure it's a float (decimal) number without elements not belonging to a float (like letters, symbols, spaces etc.). Normally this would e.g. make 1.234 out of the string '1.234xy'. When your locale belongs to a country where a different symbol is used instead of the decimal point, it makes e.g. '1,234' (German locale in my case) out of it, which leads to the problem you reported.
It would be nice if this could be corrected in Gmaps. Also, in line 396
$js = '<meta name="viewport" content="initial-scale=1.0, user-scalable=' . $this->config['scalable'] . '"/>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?' . $version . 'sensor=false&language=' . $this->config['language'] .'"></script>
<script type="text/javascript">
//<![CDATA[';
the & should be & (for validation purposes).
Has Gmaps gone from
https://github.com/Coroico? I'd like to translate the lexicon files to German, but I don't know where to send them...
BTW: Some of the links in the Cheat Sheet aren't working anymore.
Cheers,
Jan