- function osmMapUrl($aFeature)
- {
- $sLon = $aFeature['error_x'];
- $sLat = $aFeature['error_y'];
-
- if (isset($sFeature['error_x']) && isset($sFeature['error_y']))
- {
- $sBaseUrl = '//www.openstreetmap.org/';
- $sOSMType = formatOSMType($aFeature['osm_type'], false);
- if ($sOSMType)
- {
- $sBaseUrl += $sOSMType.'/'.$aFeature['osm_id'];
- }
-
- return '<a href="'.$sBaseUrl.'?mlat='.$sLat.'&mlon='.$sLon.'">view on osm.org</a>';
- }
- }
- return '';
- }
-
- function josm_edit_url($aFeature)
- {
- $fWidth = 0.0002;
- $sLon = $aFeature['error_x'];
- $sLat = $aFeature['error_y'];
-
- if (isset($sLat))
- {
- return "http://localhost:8111/load_and_zoom?left=".($sLon-$fWidth)."&right=".($sLon+$fWidth)."&top=".($sLat+$fWidth)."&bottom=".($sLat-$fWidth);
- }
-
- $sOSMType = formatOSMType($aFeature['osm_type'], false);
- if ($sOSMType)
- {
- return 'http://localhost:8111/import?url=http://www.openstreetmap.org/api/0.6/'.$sOSMType.'/'.$aFeature['osm_id'].'/full';
- // Should be better to load by object id - but this doesn't seem to zoom correctly
- // return " <a href=\"http://localhost:8111/load_object?new_layer=true&objects=".strtolower($aFeature['osm_type']).$sOSMID."\" target=\"josm\">Remote Control (JOSM / Merkaartor)</a>";
- }
- return '';
- }
-
- function potlach_edit_url($aFeature)
- {
- $fWidth = 0.0002;
- $sLat = $aFeature['error_y'];
- $sLon = $aFeature['error_x'];
-
- if (isset($sLat))
- {
- return "//www.openstreetmap.org/edit?editor=potlatch2&bbox=".($sLon-$fWidth).",".($sLat-$fWidth).",".($sLon+$fWidth).",".($sLat+$fWidth);
- }
- return '';
- }
+ function osmMapUrl($aFeature)
+ {
+ if (isset($sFeature['error_x']) && isset($sFeature['error_y']))
+ {
+ $sBaseUrl = '//www.openstreetmap.org/';
+ $sOSMType = formatOSMType($aFeature['osm_type'], false);
+ if ($sOSMType)
+ {
+ $sBaseUrl += $sOSMType.'/'.$aFeature['osm_id'];
+ }
+
+ return '<a href="'.$sBaseUrl.'?mlat='.$aFeature['error_y'].'&mlon='.$aFeature['error_x'].'">view on osm.org</a>';
+ }
+ return '';
+ }
+
+ function josm_edit_url($aFeature)
+ {
+ $fWidth = 0.0002;
+ $sLon = $aFeature['error_x'];
+ $sLat = $aFeature['error_y'];
+
+ if (isset($sLat))
+ {
+ return "http://localhost:8111/load_and_zoom?left=".($sLon-$fWidth)."&right=".($sLon+$fWidth)."&top=".($sLat+$fWidth)."&bottom=".($sLat-$fWidth);
+ }
+
+ $sOSMType = formatOSMType($aFeature['osm_type'], false);
+ if ($sOSMType)
+ {
+ return 'http://localhost:8111/import?url=http://www.openstreetmap.org/api/0.6/'.$sOSMType.'/'.$aFeature['osm_id'].'/full';
+ // Should be better to load by object id - but this doesn't seem to zoom correctly
+ // return " <a href=\"http://localhost:8111/load_object?new_layer=true&objects=".strtolower($aFeature['osm_type']).$sOSMID."\" target=\"josm\">Remote Control (JOSM / Merkaartor)</a>";
+ }
+ return '';
+ }
+
+ function potlach_edit_url($aFeature)
+ {
+ $fWidth = 0.0002;
+ $sLat = $aFeature['error_y'];
+ $sLon = $aFeature['error_x'];
+
+ if (isset($sLat))
+ {
+ return "//www.openstreetmap.org/edit?editor=potlatch2&bbox=".($sLon-$fWidth).",".($sLat-$fWidth).",".($sLon+$fWidth).",".($sLat+$fWidth);
+ }
+ return '';
+ }