Author: Tristian Howard <[email protected]>
Date: Tue Sep 2 11:08:25 2014 -0400
Committer: Lars Michelsen <[email protected]>
Commit-Date: Wed Sep 3 11:20:03 2014 +0200
Fixed geomap zoom option
- Change bounding box to center as required for zoom
- Fixed zoom request URL, zoom not geomap_zoom
---
share/server/core/sources/geomap.php | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/share/server/core/sources/geomap.php
b/share/server/core/sources/geomap.php
index 6c5a2ac..88ba590 100644
--- a/share/server/core/sources/geomap.php
+++ b/share/server/core/sources/geomap.php
@@ -308,22 +308,22 @@ function process_geomap($MAPCFG, $map_name, &$map_config)
{
// FIXME: Too small min/max? What is the minimum bbox size?
- $mid_lat = $min_lat + ($max_lat - $min_lat) / 2;
- $mid_long = $min_long + ($max_long - $min_long) / 2;
+ $mid_lat = ($min_lat + $max_lat) / 2;
+ $mid_long = ($min_long + $max_long) / 2;
//echo $min_lat . ' - ' . $max_lat. ' - '. $mid_lat.'\n';
//echo $min_long . ' - ' . $max_long. ' - ' . $mid_long;
// Using this API: http://pafciu17.dev.openstreetmap.org/
$url = cfg('global', 'geomap_server')
-
.'?module=map&bbox='.$min_long.','.$max_lat.','.$max_long.','.$min_lat
+ .'?module=map¢er='.$mid_long.','.$mid_lat
.'&width='.$params['width'].'&height='.$params['height']
.'&type='.$params['geomap_type'];
//.'&points='.$min_long.','.$max_lat.';'.$max_long.','.$min_lat;
// The geomap zoom seems to be something different than the nagvis zoom.
Use
// the dedicated geomap_zoom parameter
if(isset($params['geomap_zoom']) && $params['geomap_zoom'] != '')
- $url .= '&geomap_zoom='.$params['geomap_zoom'];
+ $url .= '&zoom='.$params['geomap_zoom'];
//file_put_contents('/tmp/123', $url);
// Fetch the background image when needed
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins