X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/f2a2c29815768171406587b7bc528f5033ec9b8f..4e2fe6427ce03a0ed3c5fdfe384f7867ef52fcca:/lib/template/details-error-html.php diff --git a/lib/template/details-error-html.php b/lib/template/details-error-html.php index 1c6d2a0a..0f5ae26d 100644 --- a/lib/template/details-error-html.php +++ b/lib/template/details-error-html.php @@ -1,133 +1,122 @@ - - + + '.$sOSMType.' '.$aFeature['osm_id'].''; - } - return ''; - } - - function osm_map_url($aFeature) - { - $sLon = $aFeature['error_x']; - $sLat = $aFeature['error_y']; - - if (isset($sLat)) - { - $sOSMType = ($aFeature['osm_type'] == 'N'?'node':($aFeature['osm_type'] == 'W'?'way':($aFeature['osm_type'] == 'R'?'relation':''))); - if ($sOSMType) - { - return "http://www.openstreetmap.org/?lat=".$sLat."&lon=".$sLon."&zoom=18&layers=M&".$sOSMType."=".$aFeature['osm_id']; - } - } - 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 = ($aFeature['osm_type'] == 'N'?'node':($aFeature['osm_type'] == 'W'?'way':($aFeature['osm_type'] == 'R'?'relation':''))); - 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 " Remote Control (JOSM / Merkaartor)"; - } - return ''; - } - - function potlach_edit_url($aFeature) - { - $fWidth = 0.0002; - $sLat = $aFeature['error_y']; - $sLon = $aFeature['error_x']; - - if (isset($sLat)) - { - return "http://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 'view on osm.org'; + } + 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 " Remote Control (JOSM / Merkaartor)"; + } + 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 ''; + } ?> -
-
-
+
+
+
-

-
-

This object has an invalid geometry.

+

+
+

This object has an invalid geometry.

-
- Type: -
+
+ Type: +
-
- OSM: -
+
+ OSM: +
-

Error

-

- -

- - view on osm.org - +

Error

+

+ +

+ -

Edit

- -
-
-
-
-
+

Edit

+ +
+
+
+
+
-
+
- + - - - \ No newline at end of file + + +