diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-02-22 21:54:43 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-02-22 21:54:43 +0000 |
| commit | debfb4a98e80d39fcde846a753abf262f52a6024 (patch) | |
| tree | cbb2535a90c3f1441ac785e176f03d8a6f30da05 | |
| parent | 7cd1d80619dfeae38fe46b8d041844fe583d30d3 (diff) | |
| download | webtrees-debfb4a98e80d39fcde846a753abf262f52a6024.tar.gz webtrees-debfb4a98e80d39fcde846a753abf262f52a6024.tar.bz2 webtrees-debfb4a98e80d39fcde846a753abf262f52a6024.zip | |
Showing more than 5 decimals in googlemap search window breaks layout
| -rw-r--r-- | modules_v3/googlemap/wt_v3_places_edit.js.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules_v3/googlemap/wt_v3_places_edit.js.php b/modules_v3/googlemap/wt_v3_places_edit.js.php index 286081aa2f..9132916801 100644 --- a/modules_v3/googlemap/wt_v3_places_edit.js.php +++ b/modules_v3/googlemap/wt_v3_places_edit.js.php @@ -392,7 +392,8 @@ if (!defined('WT_WEBTREES')) { } else { if (response.length > 0) { for (i=0; i<response.length; i++) { - var name = '<div id="gname" class="iwstyle">'+response[i].address_components[0].short_name+'<br> '+response[i].geometry.location+'' + // 5 decimal places is approx 1 metre accuracy. + var name = '<div id="gname" class="iwstyle">'+response[i].address_components[0].short_name+'<br>('+response[i].geometry.location.lng().toFixed(5)+','+response[i].geometry.location.lat().toFixed(5)+'' name += '<br><a href="#" onclick="setLoc(' + response[i].geometry.location.lat() + ', ' + response[i].geometry.location.lng() + ');"><div id="namelink"><?php echo WT_I18N::translate('Use this value'); ?></div></a>' name += '</div>' var point = response[i].geometry.location; |
