-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<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" />
- <link href="css/search.css" rel="stylesheet" type="text/css" />
-
- <script src="js/OpenLayers.js" type="text/javascript"></script>
- <script src="js/tiles.js" type="text/javascript"></script>
- <script src="js/prototype-1.6.0.3.js" type="text/javascript"></script>
-
- <script type="text/javascript">
-
- var map;
-
- function handleResize()
- {
- if ($('searchresults'))
- {
- var viewwidth = ((document.documentElement.clientWidth > 0?document.documentElement.clientWidth:document.documentElement.offsetWidth) - 200) + 'px';
- $('map').style.width = viewwidth;
- $('report').style.width = viewwidth;
- }
- else
- {
- $('map').style.width = ((document.documentElement.clientWidth > 0?document.documentElement.clientWidth:document.documentElement.offsetWidth) - 0) + 'px';
- $('map').style.left = '0px';
- }
-
- if ($('map')) $('map').style.height = ((document.documentElement.clientHeight > 0?document.documentElement.clientHeight:document.documentElement.offsetHeight) - 38) + 'px';
- if ($('searchresults')) $('searchresults').style.height = ((document.documentElement.clientHeight > 0?document.documentElement.clientHeight:document.documentElement.offsetHeight) - 38) + 'px';
- if ($('report')) $('report').style.height = ((document.documentElement.clientHeight > 0?document.documentElement.clientHeight:document.documentElement.offsetHeight) - 38) + 'px';
- }
- 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,wkt) {
- vectorLayer.destroyFeatures();
- 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(proj_EPSG4326, proj_map);
- map.panTo(lonLat, <?php echo $iZoom ?>);
-
- if (wkt)
- {
- var freader = new OpenLayers.Format.WKT({
- 'internalProjection': proj_map,
- 'externalProjection': proj_EPSG4326
- });
-
- var feature = freader.read(wkt);
- if (feature)
- {
- feature.style = {
- strokeColor: "#75ADFF",
- fillColor: "#F0F7FF",
- strokeWidth: 2,
- strokeOpacity: 0.75,
- fillOpacity: 0.75,
- pointRadius: 100
- };
- vectorLayer.addFeatures([feature]);
- }
- }
- }
-
- 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.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>
-</head>
-
-<body onload="setfocus('q');">
-
- <div id="seachheaderfade1"></div><div id="seachheaderfade2"></div><div id="seachheaderfade3"></div><div id="seachheaderfade4"></div>