X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9f7844ec7a8fe4426eb8a34165158ca6712760e3..bb403e2e589434e862c1b6d1206b7a61144011c6:/lib/template/details-error-html.php diff --git a/lib/template/details-error-html.php b/lib/template/details-error-html.php index b93d6495..bc00f84d 100644 --- a/lib/template/details-error-html.php +++ b/lib/template/details-error-html.php @@ -1,165 +1,122 @@ - - - OpenStreetMap Nominatim: <?php echo $aPointDetails['localname'];?> - - - - - - -
-

-
-
Type:
- OSM: '.$sOSMType.' '. $aPointDetails['osm_id'].'
'; + + 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.

-

Details: +

+
+
-$sVal = $aPointDetails['errormessage']; -$sOSMType = ($aPointDetails['osm_type'] == 'N'?'node':($aPointDetails['osm_type'] == 'W'?'way':($aPointDetails['osm_type'] == 'R'?'relation':''))); -$sOSMID = $aPointDetails['osm_id']; -if (preg_match('/Self-intersection\\[([0-9.\\-]+) ([0-9.\\-]+)\\]/',$sVal,$aMatch)) -{ - $sLat = $aMatch[2]; - $sLon = $aMatch[1]; - echo "".($sVal?$sVal:' ').""; -} -else -{ - echo ($sVal?$sVal:' '); -} +

+
+

This object has an invalid geometry.

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

Error

+

+ +

+ + +

Edit

+ +
+
+
+
+
+ +
+ + + -?>

- + +