2 header("content-type: text/html; charset=UTF-8");
4 <?php include(CONST_BasePath.'/lib/template/includes/html-header.php'); ?>
5 <link href="css/common.css" rel="stylesheet" type="text/css" />
6 <link href="css/details.css" rel="stylesheet" type="text/css" />
12 function osmMapUrl($aFeature)
14 $sLon = $aFeature['error_x'];
15 $sLat = $aFeature['error_y'];
17 if (isset($sFeature['error_x']) && isset($sFeature['error_y']))
19 $sBaseUrl = '//www.openstreetmap.org/';
20 $sOSMType = formatOSMType($aFeature['osm_type'], false);
23 $sBaseUrl += $sOSMType.'/'.$aFeature['osm_id'];
26 return '<a href="'.$sBaseUrl.'?mlat='.$sLat.'&mlon='.$sLon.'">view on osm.org</a>';
32 function josm_edit_url($aFeature)
35 $sLon = $aFeature['error_x'];
36 $sLat = $aFeature['error_y'];
40 return "http://localhost:8111/load_and_zoom?left=".($sLon-$fWidth)."&right=".($sLon+$fWidth)."&top=".($sLat+$fWidth)."&bottom=".($sLat-$fWidth);
43 $sOSMType = formatOSMType($aFeature['osm_type'], false);
46 return 'http://localhost:8111/import?url=http://www.openstreetmap.org/api/0.6/'.$sOSMType.'/'.$aFeature['osm_id'].'/full';
47 // Should be better to load by object id - but this doesn't seem to zoom correctly
48 // return " <a href=\"http://localhost:8111/load_object?new_layer=true&objects=".strtolower($aFeature['osm_type']).$sOSMID."\" target=\"josm\">Remote Control (JOSM / Merkaartor)</a>";
53 function potlach_edit_url($aFeature)
56 $sLat = $aFeature['error_y'];
57 $sLon = $aFeature['error_x'];
61 return "//www.openstreetmap.org/edit?editor=potlatch2&bbox=".($sLon-$fWidth).",".($sLat-$fWidth).",".($sLon+$fWidth).",".($sLat+$fWidth);
70 <body id="details-page">
71 <div class="container">
73 <div class="col-md-6">
76 <h1><?php echo $aPointDetails['localname'] ?></h1>
77 <div class="locationdetails">
78 <h2 class="bg-danger">This object has an invalid geometry.</h2>
81 Type: <span class="type"><?php echo $aPointDetails['class'].':'.$aPointDetails['type'];?></span>
85 OSM: <span class="label"><?php echo osmLink($aPointDetails); ?><span>
91 <?php echo $aPointDetails['errormessage']?$aPointDetails['errormessage']:'unknown'; ?>
93 <?php echo osmMapUrl($aPointDetails); ?>
97 <?php if (josm_edit_url($aPointDetails)) { ?>
98 <li><a href="<?php echo josm_edit_url($aPointDetails); ?>" target="josm">Remote Control (JOSM / Merkaartor)</a></li>
100 <?php if (potlach_edit_url($aPointDetails)) { ?>
101 <li><a href="<?php echo potlach_edit_url($aPointDetails); ?>" target="potlatch2">Potlatch 2</a></li>
106 <div class="col-md-6">
113 <script type="text/javascript">
115 var nominatim_result = {
116 outlinestring: '<?php echo $aPointDetails['outlinestring'];?>',
117 lon: <?php echo isset($aPointDetails['error_x']) ? $aPointDetails['error_x'] : 0; ?>,
118 lat: <?php echo isset($aPointDetails['error_y']) ? $aPointDetails['error_y'] : 0; ?>
124 <?php include(CONST_BasePath.'/lib/template/includes/html-footer.php'); ?>