-<html>
-<head>
- <title>OpenStreetMap Nominatim: Search</title>
-
- <base href="<?php echo CONST_Website_BaseURL;?>" />
- <link href="nominatim.xml" rel="search" title="Nominatim Search" type="application/opensearchdescription+xml" />
-
- <script src="js/OpenLayers.js"></script>
- <script src="js/tiles.js"></script>
- <script src="js/prototype-1.6.0.3.js"></script>
-
- <style>
-* {-moz-box-sizing: border-box;}
-body {
- margin:0px;
- padding:0px;
- overflow: hidden;
- background:#ffffff;
- height: 100%;
- font: normal 12px/15px arial,sans-serif;
-}
-#seachheader {
- position:absolute;
- z-index:5;
- top:0px;
- left:0px;
- width:100%;
- height:38px;
- background:#F0F7FF;
- border-bottom: 2px solid #75ADFF;
-}
-#q {
- width:300px;
-}
-#seachheaderfade1, #seachheaderfade2, #seachheaderfade3, #seachheaderfade4{
- position:absolute;
- z-index:4;
- top:0px;
- left:0px;
- width:100%;
- opacity: 0.15;
- filter: alpha(opacity = 15);
- background:#000000;
- border: 1px solid #000000;
-}
-#seachheaderfade1{
- height:39px;
-}
-#seachheaderfade2{
- height:40px;
-}
-#seachheaderfade3{
- height:41px;
-}
-#seachheaderfade4{
- height:42px;
-}
-#searchresultsfade1, #searchresultsfade2, #searchresultsfade3, #searchresultsfade4 {
- position:absolute;
- z-index:2;
- top:0px;
- left:200px;
- height: 100%;
- opacity: 0.2;
- filter: alpha(opacity = 20);
- background:#ffffff;
- border: 1px solid #ffffff;
-}
-#searchresultsfade1{
- width:1px;
-}
-#searchresultsfade2{
- width:2px;
-}
-#searchresultsfade3{
- width:3px;
-}
-#searchresultsfade4{
- width:4px;
-}
-
-#searchresults{
- position:absolute;
- z-index:3;
- top:41px;
- width:200px;
- height: 100%;
- background:#ffffff;
- border: 1px solid #ffffff;
- overflow: auto;
-}
-#map{
- position:absolute;
- z-index:1;
- top:38px;
- left:200px;
- width:100%;
- height:100%;
- background:#eee;
-}
-#report{
- position:absolute;
- z-index:2;
- top:38px;
- left:200px;
- width:100%;
- height:100%;
- background:#eee;
- font: normal 12px/15px arial,sans-serif;
- padding:20px;
-}
-#report table {
- margin-left:20px;
-}
-#report th {
- vertical-align:top;
- text-align:left;
-}
-#report td.button {
- text-align:right;
-}
-.result {
- margin:5px;
- margin-bottom:0px;
- padding:2px;
- padding-left:4px;
- padding-right:4px;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- background:#F0F7FF;
- border: 2px solid #D7E7FF;
- font: normal 12px/15px arial,sans-serif;
- cursor:pointer;
-}
-.result img{
- float:right;
-}
-.result .latlon{
- display: none;
-}
-.result .place_id{
- display: none;
-}
-.result .type{
- color: #999;
- text-align:center;
- font: normal 9px/10px arial,sans-serif;
- padding-top:4px;
-}
-.result .details, .result .details a{
- color: #999;
- text-align:center;
- font: normal 9px/10px arial,sans-serif;
- padding-top:4px;
-}
-.noresults{
- color: #000;
- text-align:center;
- font: normal 12px arial,sans-serif;
- padding-top:4px;
-}
-.more{
- color: #ccc;
- text-align:center;
- padding-top:4px;
-}
-.disclaimer{
- color: #ccc;
- text-align:center;
- font: normal 9px/10px arial,sans-serif;
- padding-top:4px;
-}
-form{
- margin:0px;
- padding:0px;
-}
- </style>
-
- <script type="text/javascript">
-
- var map;
-
- function handleResize()
- {
- if ($('searchresults'))
- {
- $('map').style.width = (document.documentElement.clientWidth > 0?document.documentElement.clientWidth:document.documentElement.offsetWidth) - 200;
- $('report').style.width = (document.documentElement.clientWidth > 0?document.documentElement.clientWidth:document.documentElement.offsetWidth) - 200;
- }
- else
- {
- $('map').style.width = (document.documentElement.clientWidth > 0?document.documentElement.clientWidth:document.documentElement.offsetWidth) - 0;
- $('map').style.left = 0;
- }
-
- if ($('map')) $('map').style.height = (document.documentElement.clientHeight > 0?document.documentElement.clientHeight:document.documentElement.offsetHeight) - 38;
- if ($('searchresults')) $('searchresults').style.height = (document.documentElement.clientHeight > 0?document.documentElement.clientHeight:document.documentElement.offsetHeight) - 38;
- if ($('report')) $('report').style.height = (document.documentElement.clientHeight > 0?document.documentElement.clientHeight:document.documentElement.offsetHeight) - 38;
- }
- window.onresize = handleResize;
-
- function panToLatLon(lat,lon) {
- var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
- map.panTo(lonLat, <?php echo $iZoom ?>);
- }
-
- function panToLatLonZoom(lat, lon, zoom) {
- var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
- if (zoom != map.getZoom())
- map.setCenter(lonLat, zoom);
- else
- map.panTo(lonLat, 10);
- }
-
- function panToLatLonBoundingBox(lat,lon,minlat,maxlat,minlon,maxlon,points) {
- var proj_EPSG4326 = new OpenLayers.Projection("EPSG:4326");
- var proj_map = map.getProjectionObject();
- map.zoomToExtent(new OpenLayers.Bounds(minlon,minlat,maxlon,maxlat).transform(proj_EPSG4326, proj_map));
- var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
- map.panTo(lonLat, <?php echo $iZoom ?>);
-
- var pointList = [];
- var style = {
- strokeColor: "#75ADFF",
- fillColor: "#F0F7FF",
- strokeWidth: 2,
- strokeOpacity: 0.75,
- fillOpacity: 0.75
- };
- var proj_EPSG4326 = new OpenLayers.Projection("EPSG:4326");
- var proj_map = map.getProjectionObject();
- if (points)
- {
- points.each(function(p){
- pointList.push(new OpenLayers.Geometry.Point(p[0],p[1]));
- });
- var linearRing = new OpenLayers.Geometry.LinearRing(pointList).transform(proj_EPSG4326, proj_map);;
- var polygonFeature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing]),null,style);
- vectorLayer.destroyFeatures();
- vectorLayer.addFeatures([polygonFeature]);
- }
- else
- {
- var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
- var point = new OpenLayers.Geometry.Point(lonLat.lon, lonLat.lat);
- var pointFeature = new OpenLayers.Feature.Vector(point,null,style);
- vectorLayer.destroyFeatures();
- vectorLayer.addFeatures([pointFeature]);
- }
- }
-
- function round(v,n)
- {
- n = Math.pow(10,n);
- return Math.round(v*n)/n;
- }
- function floor(v,n)
- {
- n = Math.pow(10,n);
- return Math.floor(v*n)/n;
- }
- function ceil(v,n)
- {
- n = Math.pow(10,n);
- return Math.ceil(v*n)/n;
- }
-
- function mapEventMove() {
- var proj = new OpenLayers.Projection("EPSG:4326");
- var bounds = map.getExtent();
- bounds = bounds.transform(map.getProjectionObject(), proj);
- $('viewbox').value = floor(bounds.left,2)+','+ceil(bounds.top,2)+','+ceil(bounds.right,2)+','+floor(bounds.bottom,2);
- }
-
- function init() {
- handleResize();
- map = new OpenLayers.Map ("map", {
- controls:[
- new OpenLayers.Control.Navigation(),
- new OpenLayers.Control.PanZoomBar(),
- new OpenLayers.Control.MouseDefaults(),
- new OpenLayers.Control.MousePosition(),
- new OpenLayers.Control.Attribution()],
- maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
- maxResolution: 156543.0399,
- numZoomLevels: 19,
- units: 'm',
- projection: new OpenLayers.Projection("EPSG:900913"),
- displayProjection: new OpenLayers.Projection("EPSG:4326"),
- eventListeners: {
- "moveend": mapEventMove
- }
- } );
- map.addLayer(new OpenLayers.Layer.OSM.<?php echo CONST_Tile_Default;?>("Default"));
-
- var layer_style = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
- layer_style.fillOpacity = 0.2;
- layer_style.graphicOpacity = 1;
- vectorLayer = new OpenLayers.Layer.Vector("Points", {style: layer_style});
- map.addLayer(vectorLayer);
-
-// var lonLat = new OpenLayers.LonLat(<?php echo $fLon ?>, <?php echo $fLat ?>).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
-// map.setCenter (lonLat, <?php echo $iZoom ?>);
- }
-
- function setfocus(field_id) {
- $(field_id).focus()
- }
-
- </script>