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 if (isset($sFeature['error_x']) && isset($sFeature['error_y']))
16 $sBaseUrl = '//www.openstreetmap.org/';
17 $sOSMType = formatOSMType($aFeature['osm_type'], false);
20 $sBaseUrl += $sOSMType.'/'.$aFeature['osm_id'];
23 return '<a href="'.$sBaseUrl.'?mlat='.$aFeature['error_y'].'&mlon='.$aFeature['error_x'].'">view on osm.org</a>';
28 function josm_edit_url($aFeature)
31 $sLon = $aFeature['error_x'];
32 $sLat = $aFeature['error_y'];
36 return "http://localhost:8111/load_and_zoom?left=".($sLon-$fWidth)."&right=".($sLon+$fWidth)."&top=".($sLat+$fWidth)."&bottom=".($sLat-$fWidth);
39 $sOSMType = formatOSMType($aFeature['osm_type'], false);
42 return 'http://localhost:8111/import?url=http://www.openstreetmap.org/api/0.6/'.$sOSMType.'/'.$aFeature['osm_id'].'/full';
43 // Should be better to load by object id - but this doesn't seem to zoom correctly
44 // return " <a href=\"http://localhost:8111/load_object?new_layer=true&objects=".strtolower($aFeature['osm_type']).$sOSMID."\" target=\"josm\">Remote Control (JOSM / Merkaartor)</a>";
49 function potlach_edit_url($aFeature)
52 $sLat = $aFeature['error_y'];
53 $sLon = $aFeature['error_x'];
57 return "//www.openstreetmap.org/edit?editor=potlatch2&bbox=".($sLon-$fWidth).",".($sLat-$fWidth).",".($sLon+$fWidth).",".($sLat+$fWidth);
66 <body id="details-page">
67 <div class="container">
69 <div class="col-md-6">
72 <h1><?php echo $aPointDetails['localname'] ?></h1>
73 <div class="locationdetails">
74 <h2 class="bg-danger">This object has an invalid geometry.</h2>
77 Type: <span class="type"><?php echo $aPointDetails['class'].':'.$aPointDetails['type'];?></span>
81 OSM: <span class="label"><?php echo osmLink($aPointDetails); ?><span>
87 <?php echo $aPointDetails['errormessage']?$aPointDetails['errormessage']:'unknown'; ?>
89 <?php echo osmMapUrl($aPointDetails); ?>
93 <?php if (josm_edit_url($aPointDetails)) { ?>
94 <li><a href="<?php echo josm_edit_url($aPointDetails); ?>" target="josm">Remote Control (JOSM / Merkaartor)</a></li>
96 <?php if (potlach_edit_url($aPointDetails)) { ?>
97 <li><a href="<?php echo potlach_edit_url($aPointDetails); ?>" target="potlatch2">Potlatch 2</a></li>
102 <div class="col-md-6">
109 <script type="text/javascript">
111 var nominatim_result = {
112 outlinestring: '<?php echo $aPointDetails['outlinestring'];?>',
113 lon: <?php echo isset($aPointDetails['error_x']) ? $aPointDetails['error_x'] : 0; ?>,
114 lat: <?php echo isset($aPointDetails['error_y']) ? $aPointDetails['error_y'] : 0; ?>
120 <?php include(CONST_BasePath.'/lib/template/includes/html-footer.php'); ?>