[Mapbender-commits] r8561 - in trunk/mapbender/http: extensions extensions/mobilemap extensions/mobilemap/_build extensions/mobilemap/_build/compress extensions/mobilemap/css extensions/mobilemap/css/img extensions/mobilemap/css/ol_img extensions/mobilemap/help extensions/mobilemap/img extensions/mobilemap/jquery.mobile extensions/mobilemap/jquery.mobile/images extensions/mobilemap/js extensions/mobilemap/js/dev extensions/mobilemap/js/langpack extensions/mobilemap/mod_mapbender extensions/mobilemap/mod_mapbender/img extensions/mobilemap/query geoportal php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Feb 18 06:10:21 PST 2013
Author: armin11
Date: 2013-02-18 06:10:20 -0800 (Mon, 18 Feb 2013)
New Revision: 8561
Added:
trunk/mapbender/http/extensions/mobilemap/
trunk/mapbender/http/extensions/mobilemap/_build/
trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.bat
trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.sh
trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.sh~
trunk/mapbender/http/extensions/mobilemap/_build/compress/
trunk/mapbender/http/extensions/mobilemap/_build/compress/compiler.jar
trunk/mapbender/http/extensions/mobilemap/_build/mobile_ngms.cfg
trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.js
trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.min.js
trunk/mapbender/http/extensions/mobilemap/backgroundlayer.php
trunk/mapbender/http/extensions/mobilemap/backgroundlayer.php~
trunk/mapbender/http/extensions/mobilemap/css/
trunk/mapbender/http/extensions/mobilemap/css/img/
trunk/mapbender/http/extensions/mobilemap/css/img/fortschritt.gif
trunk/mapbender/http/extensions/mobilemap/css/img/locate.png
trunk/mapbender/http/extensions/mobilemap/css/img/mapbg.gif
trunk/mapbender/http/extensions/mobilemap/css/img/openlayers.png
trunk/mapbender/http/extensions/mobilemap/css/img/powered_by_google.png
trunk/mapbender/http/extensions/mobilemap/css/img/x.png
trunk/mapbender/http/extensions/mobilemap/css/ngstyle.css
trunk/mapbender/http/extensions/mobilemap/css/ol_img/
trunk/mapbender/http/extensions/mobilemap/css/ol_img/blank.gif
trunk/mapbender/http/extensions/mobilemap/css/ol_img/cloud-popup-relative.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/drag-rectangle-off.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/drag-rectangle-on.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/east-mini.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/layer-switcher-maximize.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/layer-switcher-minimize.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/mapbg.gif
trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-blue.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-gold.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-green.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/measuring-stick-off.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/measuring-stick-on.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/north-mini.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/panning-hand-off.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/panning-hand-on.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/slider.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/south-mini.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/west-mini.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-minus-mini.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-plus-mini.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-world-mini.png
trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoombar.png
trunk/mapbender/http/extensions/mobilemap/css/ol_style.css
trunk/mapbender/http/extensions/mobilemap/favicon.ico
trunk/mapbender/http/extensions/mobilemap/help/
trunk/mapbender/http/extensions/mobilemap/help/help_de.html
trunk/mapbender/http/extensions/mobilemap/help/help_en.html
trunk/mapbender/http/extensions/mobilemap/iPhoneIcon.png
trunk/mapbender/http/extensions/mobilemap/img/
trunk/mapbender/http/extensions/mobilemap/img/background_gradient.jpg
trunk/mapbender/http/extensions/mobilemap/img/but_gear.png
trunk/mapbender/http/extensions/mobilemap/img/but_help.png
trunk/mapbender/http/extensions/mobilemap/img/but_hilfe.png
trunk/mapbender/http/extensions/mobilemap/img/but_info.png
trunk/mapbender/http/extensions/mobilemap/img/but_layer.png
trunk/mapbender/http/extensions/mobilemap/img/but_locate.png
trunk/mapbender/http/extensions/mobilemap/img/but_measure_line.png
trunk/mapbender/http/extensions/mobilemap/img/but_measure_poly.png
trunk/mapbender/http/extensions/mobilemap/img/but_menu.png
trunk/mapbender/http/extensions/mobilemap/img/but_ov.png
trunk/mapbender/http/extensions/mobilemap/img/but_search.png
trunk/mapbender/http/extensions/mobilemap/img/but_sprite.png
trunk/mapbender/http/extensions/mobilemap/img/but_zoomin.png
trunk/mapbender/http/extensions/mobilemap/img/but_zoomout.png
trunk/mapbender/http/extensions/mobilemap/img/dot.gif
trunk/mapbender/http/extensions/mobilemap/img/fortschritt.gif
trunk/mapbender/http/extensions/mobilemap/img/ico_basecheck.png
trunk/mapbender/http/extensions/mobilemap/img/ico_basecheck_active.png
trunk/mapbender/http/extensions/mobilemap/img/ico_check.png
trunk/mapbender/http/extensions/mobilemap/img/ico_check_active.png
trunk/mapbender/http/extensions/mobilemap/img/ico_checkop - Kopie.png
trunk/mapbender/http/extensions/mobilemap/img/ico_checkop.png
trunk/mapbender/http/extensions/mobilemap/img/ico_checkop_active - Kopie.png
trunk/mapbender/http/extensions/mobilemap/img/ico_checkop_active.png
trunk/mapbender/http/extensions/mobilemap/img/ico_x.png
trunk/mapbender/http/extensions/mobilemap/img/ico_zoomin.png
trunk/mapbender/http/extensions/mobilemap/img/jquery.png
trunk/mapbender/http/extensions/mobilemap/img/logo.png
trunk/mapbender/http/extensions/mobilemap/img/logo_rlp.png
trunk/mapbender/http/extensions/mobilemap/img/ol.png
trunk/mapbender/http/extensions/mobilemap/img/powered_by_google.png
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/ajax-loader.gif
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/ajax-loader.png
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-18-black.png
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-18-white.png
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-36-black.png
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-36-white.png
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/rlp-theme.css
trunk/mapbender/http/extensions/mobilemap/jquery.mobile/rlp-theme.min.css
trunk/mapbender/http/extensions/mobilemap/js/
trunk/mapbender/http/extensions/mobilemap/js/OpenLayers.mobile.min.js
trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.js
trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.js~
trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.php
trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.php~
trunk/mapbender/http/extensions/mobilemap/js/dev/
trunk/mapbender/http/extensions/mobilemap/js/dev/1_ngms_olextent.js
trunk/mapbender/http/extensions/mobilemap/js/dev/2_ngms_global.js
trunk/mapbender/http/extensions/mobilemap/js/dev/2_ngms_global.js~
trunk/mapbender/http/extensions/mobilemap/js/dev/3_ngms_layer.js
trunk/mapbender/http/extensions/mobilemap/js/dev/4_ngms_base.js
trunk/mapbender/http/extensions/mobilemap/js/dev/5_ngms_jq.js
trunk/mapbender/http/extensions/mobilemap/js/jquery-lang.js
trunk/mapbender/http/extensions/mobilemap/js/langpack/
trunk/mapbender/http/extensions/mobilemap/js/langpack/en.js
trunk/mapbender/http/extensions/mobilemap/js/ngms_event.min.js
trunk/mapbender/http/extensions/mobilemap/js/proj4js.min.js
trunk/mapbender/http/extensions/mobilemap/map.php
trunk/mapbender/http/extensions/mobilemap/map.php~
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/defaulicon.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_arrow_up.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_basecheck.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_basecheck_active.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_check.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_check_active.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_checkop.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_checkop_active.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_delete.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_info.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_noinfo.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_plus.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_preview.png
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/readme.txt
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.css
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js~
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search_proxy.php
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search_proxy.php~
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/searchobjects.js
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/wmc_proxy.php
trunk/mapbender/http/extensions/mobilemap/mod_mapbender/wmc_proxy.php~
trunk/mapbender/http/extensions/mobilemap/query/
trunk/mapbender/http/extensions/mobilemap/query/proxy.php
trunk/mapbender/http/extensions/mobilemap/query/proxy.php~
trunk/mapbender/http/extensions/mobilemap/query/rasterquery.php
trunk/mapbender/http/extensions/mobilemap/query/rasterquery.php~
trunk/mapbender/http/extensions/mobilemap/query/searchproxy.php
trunk/mapbender/http/extensions/mobilemap/query/searchproxy.php~
Modified:
trunk/mapbender/http/geoportal/mod_pullInspireMonitoring.php
trunk/mapbender/http/geoportal/mod_showInspireMonitoring.php
trunk/mapbender/http/php/mod_exportWmc2Json.php
Log:
Initial commit of netgis jquery mobile gis client as mapbender extension. New table for INSPIRE Monitoring created of mapbenders database information.
Added: trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.bat
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.bat (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.bat 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,12 @@
+ at echo off
+REM JS-Buildscript für Mapbenderkonfiguration unter Windows
+REM Pfade definieren
+set dirjs=C:\inetpub\wwwroot\rlpmobile\js\dev\
+set dirmb=C:\inetpub\wwwroot\rlpmobile\mod_mapbender\
+set dirziel=C:\inetpub\wwwroot\rlpmobile\js\
+REM Zusammenkopieren (Reihenfolge ist wichtig!
+copy /b %dirjs%1_ngms_olextent.js+%dirjs%2_ngms_global.js+%dirmb%searchobjects.js+%dirmb%search.js+%dirjs%4_ngms_base.js+%dirjs%5_ngms_jq.js ngms_event.js
+REM copy /b %dirjs%*.js ngms_event.js
+REM Closure Compiler ausführen
+java -jar compress/compiler.jar --js=ngms_event.js --js_output_file=ngms_event.min.js
+pause
\ No newline at end of file
Added: trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.sh
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.sh (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.sh 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,16 @@
+#!/bin/sh
+outputfile="ngms_event.js"
+outputfilemin="ngms_event.min.js"
+dirjs="../js/dev/"
+dirmb="../mod_mapbender/"
+dirtarget="../js/"
+echo "//concatenated js files" > $outputfile
+cat $dirjs"1_ngms_olextent.js" >> $outputfile
+cat $dirjs"2_ngms_global.js" >> $outputfile
+cat $dirmb"searchobjects.js" >> $outputfile
+cat $dirmb"search.js" >> $outputfile
+cat $dirjs"4_ngms_base.js" >> $outputfile
+cat $dirjs"5_ngms_jq.js" >> $outputfile
+java -jar compress/compiler.jar --js=$outputfile --js_output_file=$outputfilemin
+
+
Added: trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.sh~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.sh~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/_build/_merge_compress_js.sh~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,16 @@
+#!/bin/sh
+outputfile="ngms_eventtest.js"
+outputfilemin="ngms_eventtest.min.js"
+dirjs="../js/dev/"
+dirmb="../mod_mapbender/"
+dirtarget="../js/"
+echo "//concatenated js files" > $outputfile
+cat $dirjs"1_ngms_olextent.js" >> $outputfile
+cat $dirjs"2_ngms_global.js" >> $outputfile
+cat $dirmb"searchobjects.js" >> $outputfile
+cat $dirmb"search.js" >> $outputfile
+cat $dirjs"4_ngms_base.js" >> $outputfile
+cat $dirjs"5_ngms_jq.js" >> $outputfile
+java -jar compress/compiler.jar --js=$outputfile --js_output_file=$outputfilemin
+
+
Added: trunk/mapbender/http/extensions/mobilemap/_build/compress/compiler.jar
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/_build/compress/compiler.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/_build/mobile_ngms.cfg
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/_build/mobile_ngms.cfg (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/_build/mobile_ngms.cfg 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,34 @@
+[first]
+
+[last]
+
+[include]
+OpenLayers/Map.js
+OpenLayers/Kinetic.js
+OpenLayers/Projection.js
+OpenLayers/Rule.js
+OpenLayers/Layer/WMS.js
+OpenLayers/Control/TouchNavigation.js
+OpenLayers/Control/Geolocate.js
+OpenLayers/Control/Zoom.js
+OpenLayers/Control/Attribution.js
+OpenLayers/Control/SelectFeature.js
+OpenLayers/Control/DrawFeature.js
+OpenLayers/Control/ModifyFeature.js
+OpenLayers/Control/Panel.js
+OpenLayers/Control/Measure.js
+OpenLayers/Handler/Point.js
+OpenLayers/Handler/Path.js
+OpenLayers/Handler/Polygon.js
+OpenLayers/Layer/Vector.js
+OpenLayers/Renderer/SVG.js
+OpenLayers/Renderer/Canvas.js
+OpenLayers/Format/GeoJSON.js
+OpenLayers/Protocol/HTTP.js
+OpenLayers/Strategy/Fixed.js
+
+
+
+[exclude]
+
+
Added: trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,2136 @@
+//concatenated js files
+/* ++++++++++++++++++++++++++++++++++++++++++ Openlayers Extension +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+//Erweiterung OpenLayers - angepasster Click Event
+OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ //'double': true,
+ 'pixelTolerance': 0,
+ //'stopDouble': false,
+ 'stopSingle': false
+ },
+
+ initialize: function(options) {
+ var opts = options || {};
+ this.handlerOptions = OpenLayers.Util.applyDefaults(
+ opts.handlerOptions || {},
+ this.defaultHandlerOptions
+ );
+ OpenLayers.Control.prototype.initialize.apply(
+ this,
+ arguments
+ );
+ this.handler = new OpenLayers.Handler.Click(
+ this,
+ {
+ 'click': this.onClick
+ //'dblclick': this.onDblClick
+ },
+ this.handlerOptions
+ );
+ },
+
+ onClick: function( evt ) {
+ // click funcktion
+ var lonlat = map.getLonLatFromViewPortPx(evt.xy);
+ var querylayer = $('#queryselect').val();
+ var actuallang = $('#select-lang').val();
+ //Punkt erzeugen
+ var geompoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ var geompoint1 = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(
+ geompoint,
+ {},
+ olSearchSymbol
+ ),
+ new OpenLayers.Feature.Vector(
+ geompoint1,
+ {},
+ olFeaturequerySymbol
+ )
+ ]);
+
+ //Default Koordinatenabfrage / Rasterquery
+ if(querylayer == "dhm"){
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+ var featureurl = 'query/rasterquery.php?'
+ + 'coord=' + lonlat.lon + ', ' + lonlat.lat
+ + '&lang=' + actuallang;
+ loadFeature(featureurl);
+ //alert("Um eine Ebene abzufragen selektieren Sie bitte unter Abfrage --> Abfrageebene w\u00e4hlen die gew\u00fcnschte Ebenen aus!");
+ }
+ else if(querylayer == "pois"){
+ var activepoilayer = poilayer.params.LAYERS;
+ var featureurl = 'query/poiquery.php?'
+ + 'qx=' + lonlat.lon + '&qy=' + lonlat.lat
+ + '&qlayer=' + activepoilayer
+ + '&qextent=' + map.getExtent().toBBOX()
+ + '&qsize=' + map.size.w + ' ' + map.size.h
+ + '&lang=' + actuallang;
+ loadFeature(featureurl);
+ }
+ else{
+ //Get Feature Query
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+ var featureurl = 'query/proxy.php?wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1'
+ + '&mapfile='+ querylayer
+ + '&layers=' + querylayer + '&QUERY_LAYERS=' + querylayer
+ + '&SRS=' + featurequerySrc
+ + '&BBOX=' + map.getExtent().toBBOX()
+ + '&WIDTH=' + map.size.w + '&HEIGHT=' + map.size.h
+ + '&X=' + evt.xy.x + '&Y=' + evt.xy.y
+ + '&INFO_FORMAT=text/html';
+ //alert('Klick auf Koordinate: ' + lonlat.lon + ', ' + lonlat.lat);
+ loadFeature(featureurl);
+ //alert(featureurl);
+ }
+ },
+
+ /*
+ onDblClick: function( evt ) {
+ doubleClick funcktion
+ var lonlat = map.getLonLatFromViewPortPx(evt.xy);
+ //alert('Doppelklick auf Koordinate: ' + lonlat.lon + ', ' + lonlat.lat);
+ },
+ */
+
+ //Abfrageebene darstellen
+ showQuerylayer: function(){
+ var querylayer = $('#queryselect').val();
+ if(querylayer == "dhm"){
+ setMarkerhint(window.lang.convert('Standardabfrage:'),window.lang.convert('Koordinaten + Hoehe'));
+ }
+ else{
+ setMarkerhint(window.lang.convert('aktuelle Abfrageebene:'), querylayer);
+ }
+ },
+
+ CLASS_NAME: "OpenLayers.Control.Click"
+ }
+);
+
+//Abfrageebene darstellen
+function showQuerylayer(){
+ var querylayer = $('#queryselect').val();
+ if(querylayer == "dhm"){
+ setMarkerhint(window.lang.convert('Standardabfrage:'),window.lang.convert('Koordinaten + Hoehe'));
+ }
+ else{
+ setMarkerhint(window.lang.convert('aktuelle Abfrageebene:'), querylayer);
+ }
+}
+
+//Ajax Aufruf
+function loadFeature(myurl){
+ //showLoader();
+ $.ajax({
+ type: 'GET',
+ url: myurl,
+ //data: {layers:mylayers,imgsize:myimgsize},
+ success: function(ergebnis){
+ if(ergebnis){
+ if(ergebnis.length < 5){
+ ergebnis = window.lang.convert('Kein Ergebnis!');
+ }
+ setMarkerhint(window.lang.convert('Abfrageergebnis:'),ergebnis);
+ }
+ }
+ });
+}
+
+//Erweiterung OpenLayers - Sclaeline vgl. ScaleLine.js
+OpenLayers.Control.ScaleLine = OpenLayers.Class(OpenLayers.Control, {
+ maxWidth: 100,
+ topOutUnits: "km",
+ topInUnits: "m",
+ bottomOutUnits: "mi",
+ bottomInUnits: "ft",
+ eTop: null,
+ eBottom:null,
+ geodesic: false,
+ draw: function() {
+ OpenLayers.Control.prototype.draw.apply(this, arguments);
+ if (!this.eTop) {
+ // stick in the top bar
+ this.eTop = document.createElement("div");
+ this.eTop.className = this.displayClass + "Top";
+ var theLen = this.topInUnits.length;
+ this.div.appendChild(this.eTop);
+ if((this.topOutUnits == "") || (this.topInUnits == "")) {
+ this.eTop.style.visibility = "hidden";
+ } else {
+ this.eTop.style.visibility = "visible";
+ }
+
+ // and the bottom bar
+ this.eBottom = document.createElement("div");
+ this.eBottom.className = this.displayClass + "Bottom";
+ this.div.appendChild(this.eBottom);
+ if((this.bottomOutUnits == "") || (this.bottomInUnits == "")) {
+ this.eBottom.style.visibility = "hidden";
+ } else {
+ this.eBottom.style.visibility = "visible";
+ }
+ }
+ this.map.events.register('moveend', this, this.update);
+ this.update();
+ return this.div;
+ },
+
+ getBarLen: function(maxLen) {
+ // nearest power of 10 lower than maxLen
+ var digits = parseInt(Math.log(maxLen) / Math.log(10));
+ var pow10 = Math.pow(10, digits);
+
+ // ok, find first character
+ var firstChar = parseInt(maxLen / pow10);
+
+ // right, put it into the correct bracket
+ var barLen;
+ if(firstChar > 5) {
+ barLen = 5;
+ } else if(firstChar > 2) {
+ barLen = 2;
+ } else {
+ barLen = 1;
+ }
+
+ // scale it up the correct power of 10
+ return barLen * pow10;
+ },
+
+ update: function() {
+ var res = this.map.getResolution();
+ if (!res) {
+ return;
+ }
+
+ var curMapUnits = this.map.getUnits();
+ var inches = OpenLayers.INCHES_PER_UNIT;
+
+ // convert maxWidth to map units
+ var maxSizeData = this.maxWidth * res * inches[curMapUnits];
+ var geodesicRatio = 1;
+ if(this.geodesic === true) {
+ var maxSizeGeodesic = (this.map.getGeodesicPixelSize().w ||
+ 0.000001) * this.maxWidth;
+ var maxSizeKilometers = maxSizeData / inches["km"];
+ geodesicRatio = maxSizeGeodesic / maxSizeKilometers;
+ maxSizeData *= geodesicRatio;
+ }
+
+ // decide whether to use large or small scale units
+ var topUnits;
+ var bottomUnits;
+ if(maxSizeData > 100000) {
+ topUnits = this.topOutUnits;
+ bottomUnits = this.bottomOutUnits;
+ } else {
+ topUnits = this.topInUnits;
+ bottomUnits = this.bottomInUnits;
+ }
+
+ // and to map units units
+ var topMax = maxSizeData / inches[topUnits];
+ var bottomMax = maxSizeData / inches[bottomUnits];
+
+ // now trim this down to useful block length
+ var topRounded = this.getBarLen(topMax);
+ var bottomRounded = this.getBarLen(bottomMax);
+
+ // and back to display units
+ topMax = topRounded / inches[curMapUnits] * inches[topUnits];
+ bottomMax = bottomRounded / inches[curMapUnits] * inches[bottomUnits];
+
+ // and to pixel units
+ var topPx = topMax / res / geodesicRatio;
+ var bottomPx = bottomMax / res / geodesicRatio;
+
+ // now set the pixel widths
+ // and the values inside them
+
+ if (this.eBottom.style.visibility == "visible"){
+ this.eBottom.style.width = Math.round(bottomPx) + "px";
+ //this.eBottom.innerHTML = bottomRounded + " " + bottomUnits ;
+ }
+
+ if (this.eTop.style.visibility == "visible"){
+ this.eTop.style.width = Math.round(topPx) + "px";
+ this.eTop.innerHTML = topRounded + " " + topUnits;
+ }
+
+ },
+
+ CLASS_NAME: "OpenLayers.Control.ScaleLine"
+});
+
+//Openlayers Loading Control
+OpenLayers.Control.LoadingPanel = OpenLayers.Class(OpenLayers.Control, {
+
+ counter: 0,
+
+ maximized: false,
+
+ visible: true,
+
+ initialize: function(options) {
+ OpenLayers.Control.prototype.initialize.apply(this, [options]);
+ },
+
+ setVisible: function(visible) {
+ this.visible = visible;
+ if (visible) {
+ OpenLayers.Element.show(this.div);
+ } else {
+ OpenLayers.Element.hide(this.div);
+ }
+ },
+
+ getVisible: function() {
+ return this.visible;
+ },
+
+
+ hide: function() {
+ this.setVisible(false);
+ },
+
+
+ show: function() {
+ this.setVisible(true);
+ },
+
+ toggle: function() {
+ this.setVisible(!this.getVisible());
+ },
+
+ addLayer: function(evt) {
+ if (evt.layer) {
+ evt.layer.events.register('loadstart', this, this.increaseCounter);
+ evt.layer.events.register('loadend', this, this.decreaseCounter);
+ }
+ },
+
+ setMap: function(map) {
+ OpenLayers.Control.prototype.setMap.apply(this, arguments);
+ this.map.events.register('preaddlayer', this, this.addLayer);
+ for (var i = 0; i < this.map.layers.length; i++) {
+ var layer = this.map.layers[i];
+ layer.events.register('loadstart', this, this.increaseCounter);
+ layer.events.register('loadend', this, this.decreaseCounter);
+ }
+ },
+
+ increaseCounter: function() {
+ this.counter++;
+ if (this.counter > 0) {
+ if (!this.maximized && this.visible) {
+ this.maximizeControl();
+ }
+ }
+ },
+
+ decreaseCounter: function() {
+ if (this.counter > 0) {
+ this.counter--;
+ }
+ if (this.counter == 0) {
+ if (this.maximized && this.visible) {
+ this.minimizeControl();
+ }
+ }
+ },
+
+ draw: function () {
+ OpenLayers.Control.prototype.draw.apply(this, arguments);
+ return this.div;
+ },
+
+ minimizeControl: function(evt) {
+ this.div.style.display = "none";
+ this.maximized = false;
+
+ if (evt != null) {
+ OpenLayers.Event.stop(evt);
+ }
+ },
+
+ maximizeControl: function(evt) {
+ this.div.style.display = "block";
+ this.maximized = true;
+
+ if (evt != null) {
+ OpenLayers.Event.stop(evt);
+ }
+ },
+
+ destroy: function() {
+ if (this.map) {
+ this.map.events.unregister('preaddlayer', this, this.addLayer);
+ if (this.map.layers) {
+ for (var i = 0; i < this.map.layers.length; i++) {
+ var layer = this.map.layers[i];
+ layer.events.unregister('loadstart', this,
+ this.increaseCounter);
+ layer.events.unregister('loadend', this,
+ this.decreaseCounter);
+ }
+ }
+ }
+ OpenLayers.Control.prototype.destroy.apply(this, arguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Control.LoadingPanel"
+
+});
+
+// Global
+var map, clickCtrl, measureControls;
+//following contants are defined in conf file
+/*Proj4js.defs["EPSG:25832"] = "+proj=utm +zone=32 +ellps=GRS80 +units=m +datum=WGS84";
+Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
+var mapProj = new OpenLayers.Projection("EPSG:25832");
+var wgs84Proj = new OpenLayers.Projection("EPSG:4326");
+var mymapbounds = new OpenLayers.Bounds(293300,5424000,464300,5654100); //Rlp UTM 32
+var myzoombounds = "off"; //new OpenLayers.Bounds(3460280,5482455,3462440,5484561); //Anfangsausdehnung (deaktiv auf "off" setzen)
+var mymaxscale = 2000000;
+var myminscale = 500;
+var myzoomlevels = 16;
+var myscales = [2000000, 1500000, 1000000, 500000, 250000, 150000, 100000, 50000, 25000, 15000, 10000, 8000, 5000, 3000, 1000, 500]; //MaÃstäbe die dargestellt werden sollen
+var zoomSelect = true; //Soll Select aus myscales dargestellt werden? (true/false)
+var projUnits = 'm';
+var searchMode = 'mapbendersearch'; //Suchmodus (google/streetsearch/mapbendersearch)
+var mapbendersearchurl = 'query/searchproxy.php?resultTarget=web&outputFormat=json&searchEPSG='; //Url bzw. Proxy zur Mapbender Ortsuche
+var searchEPSG = '25832'; //EPSG Anfrage für Mapbender-Suche
+var searchZoom = 12; //Zoomlevel in der Karte
+var defaultHand = "r"; //Anfangs Händigkeit (r/l)
+var googleGeocodeAdmin = "Rheinland-Pfalz"; //Administrative Einheit in der eine Meldung kommen soll falls geocodierter Punkt auÃerhalb liegt
+var directLayerChange = "on"; //Wechsel aus Layersteuerung direkt bei Klick auf Ebene (on/off)
+var pageTransition = {transition: "fade"}; //Objekt, Seitenübergänge (vgl. jQuerymobile, z.B. fade, pop, slide, none)
+var toolColor = "#871D33"; //Farbe der Toolumrandungen
+var featurequerySrc = "EPSG:25832"; //EPSG der FeatureQuery*/
+
+//Openlayers Objekte
+//OpenLayers Kombinations Symbole (Objekt) zur Markierung des Suchergebnis u. Abfragepunktes (Featurequery), mögliche Namen: "star", "cross", "x", "square", "triangle", "circle"
+var olSearchSymbol = { graphicName: 'cross',
+ strokeColor: '#00FFFF',
+ strokeWidth: 1,
+ fillOpacity: 0,
+ pointRadius: 11 };
+var olFeaturequerySymbol = {graphicName: 'circle',
+ strokeColor: '#00FFFF', //'#871D33',
+ fillColor: '#00FFFF',
+ strokeWidth: 3,
+ fillOpacity: 0.2,
+ pointRadius: 15,
+ graphicName: 'circle'};
+
+//OpenLayers Symbol (Objekt) GPS-Lokalisierung, mögliche Namen: "star", "cross", "x", "square", "triangle", "circle"
+var olGpsSymbol = { graphicName: 'cross',
+ strokeColor: '#871D33',
+ strokeWidth: 2,
+ fillOpacity: 0,
+ pointRadius: 12 };
+
+//OpenLayers Symbol (Objekt) zur Markierung der GPS-Kreisfarbe + Stil
+var olGpscircleStyle = { fillOpacity: 0.1,
+ fillColor: '#000',
+ strokeColor: '#871D33',
+ strokeOpacity: 0.6 };
+
+// default style für Zeichnungen
+var sketchSymbolizers = {
+ "Point": {
+ pointRadius: 6,
+ graphicName: "square",
+ fillColor: "white",
+ fillOpacity: 1,
+ strokeWidth: 2,
+ strokeOpacity: 0.8,
+ strokeColor: "#00FFFF"
+ },
+ "Line": {
+ strokeWidth: 3,
+ strokeOpacity: 1,
+ //strokeDashstyle: "dash",
+ strokeColor: "#FF0000"
+
+ },
+ "Polygon": {
+ strokeWidth: 3,
+ strokeOpacity: 1,
+ strokeColor: "#FF0000",
+ fillColor: "white",
+ fillOpacity: 0.5
+ }
+};
+
+//default Style für Zeich- / Messfunktion)
+var style = new OpenLayers.Style();
+style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+]);
+var styleMap = new OpenLayers.StyleMap({"default": style});
+
+// Dienst
+function Service(serviceid, title, desc, getMapUrl, status, logoUrl, symbolLink, avail){
+// Anzahl der Layer azeigen
+ var service=$('<li>',{serviceid:serviceid, 'class':'service' , title:title, desc:desc, getMapURL:getMapUrl, status:status, logoUrl:logoUrl, symbolLink:symbolLink, avail:avail});
+
+ var container = $('<div class="service_container"></div>');
+ // Logo
+ container.append(
+ $('<table style="margin: 0px; padding: 0px; float:left;">'
+ +'<tr style="margin: 0px; padding: 0px;">'
+ +'<td style="margin: 0px; padding: 0px; height:43px; width:55px; text-align: center; vertical-align: middle;">'
+ +'<img style="max-height: 43px; max-width: 55px; max-height: 43px;" src="'+logoUrl+'" class="service_logo" alt="Logo"/>'
+ +'</td>'
+ +'</tr>'
+ +'</table>'));
+ // Alle Layer entfernen
+ container.append($('<div>', {'class':'icon layer_remove', text:' '}).click(function(){removeService($(this).parent().parent());}));
+ // Alle Layer hinzufügen
+ container.append($('<div>', {'class':'icon layer_add', text:' '}).click(function(){addService($(this).parent().parent());}));
+
+ container.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+title+'</h3><h3>'+title+'</h3><p>'+desc+'</p></div>');
+
+ service.append(container)
+
+ return service;
+}
+
+
+// Layer in den Hintergrundkarten
+function BaseLayer(title, layerids){
+ return $('<div>',{text:title, title:title, layerids:layerids, 'class':'baselayer base_unchecked'}).click(function(){ switchVisibility($(this)) });
+}
+
+
+// Layer im Suchergebnis
+function ResultLayer(layerid, title, name, desc, previewUrl, queryable, getMapUrl, bbox){
+
+ var layer=$('<div>',{layerid:layerid, name:name, 'class':'layer' , title:title, desc:desc, previewUrl:previewUrl, queryable:queryable, getMapURL:getMapUrl, bbox:bbox});
+
+ layer.append($('<div>', {'class':('icon query_preview '+(queryable ? 'query_info': 'query_noinfo')), text:' '}));
+ layer.append($('<div>', {'class':'layer_icon icon layer_add', text:' '}).click(function(){switchLayer($(this).parent());}));
+
+ layer.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+title+'</h3><h3>'+title+'</h3><p>'+desc+'</p></div>');
+
+ return layer;
+}
+
+
+// Layer in der Auswahl
+function OwnLayer(layerid, title, name, desc, servicetitle, servicedesc, previewUrl, queryable, getMapUrl, bbox, avail){
+
+ var layer=$('<div>',{layerid:layerid, name:name, servicetitle:servicetitle, servicedesc:servicedesc, 'class':'layer' , title:title, desc:desc, previewUrl:previewUrl, queryable:queryable, getMapURL:getMapUrl, bbox:bbox, avail:avail});
+
+ layer.append($('<div>', {'class':'layer_icon icon layer_remove', text:' '}).click(function(){removeLayer($(this).parent());}));
+
+ // Abfragbarkeit
+ if(queryable){
+ layer.append($('<div>', {'class':'icon query_queryable query_unchecked', text:' '}).click(function(){query_check($(this))}));
+ } else {
+ layer.append($('<div>', {'class':'icon query_queryable query_noinfo', text:' '}));
+ }
+ layer.append($('<div>', {'class':'icon layer_visibility layer_checked', text:' '}).click(function(){switchVisibility($(this).parent())}));
+
+ // Layerpositionierung
+ layer.append($('<div>', {'class':'icon move arrow_up', text:' '}).click(function(){up(layerid);}));
+
+ // Collapsible
+ var collaps=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"></div>');
+ collaps.append('<h3>'+title+'</h3>');
+ // Inhalt
+ var table = $('<table></table>');
+
+ var col=$("<tr></tr>");
+
+ var row1=$('<td class="layerinfo"></td>');
+
+ if(previewUrl){
+ row1.append($('<div>', {'class':'icon layer_preview', text:' '}).click(function(){zoomToBbox(bbox); $.mobile.changePage($("#mappage"),pageTransition);}));
+ }
+ row1.append('</br><p>'+avail+'%</p>');
+
+ var row2=$("<td></td>");
+
+ row2.append('<p><b>'+servicetitle+'</b></p><p>'+servicedesc+'</p>');
+ row2.append('<p><b>'+title+'</b></p><p>'+desc+'</p>');
+
+ col.append(row1);
+ col.append(row2);
+
+ table.append(col);
+
+ collaps.append(table);
+
+
+ layer.append(collaps);
+
+ return layer;
+
+}
+
+
+
+/*
+Anmerkungen:
+############
+Die Suche gibt Dienste (data.wms.srv zurück), die Dienstinformationen (id, title, abstract ect. enthalten).
+Hier werden auch die Zusatzinformationen zur verfügbarkeit ect. abgelegt.
+Diese beinhalten auch das Objekt data.wms.srv.layer, welches über (id, title, abstract, getMapUrl) verfügt.
+Es scheint jedoch immer nur einer dieser Gruppenlayer vorzuliegen.
+Es handelt sich bei data.wms.srv.layer wiederum um eine Zusammenfassung von Layern mit dem unterobjekt Objekt data.wms.srv.layer.layer.
+Dort finden sich Informationen zum Layer selber (id, title, abstract) und Informationen zur Abfragbarbeit.
+
+Beim Testen fiel auf, dass Services (mit eindeutiger id) auch doppelt mit unterschiedlichen Layern vorkommen können.
+
+
+Implementierung:
+################
+Hier werden diese einzelen Objekte als js-Objekte neu definiert um gegen änderungen in der Mapbender-Schnittstelle unabhängig zu sein.
+
+Hier wurde folgende Objekthierarchie festgelegt
+
+"ServiceList" ist eine Zusammenstellung (Array) von Services und trägt die Informationn ob es sich um das Suchergebnis oder die Auswahlliste handelt
+diese Information wird beim Einfügen eines "Service" weitegegeben.
+
+Ein "Service" ist ein Array von Gruppenlayern
+
+Ein "Gruppenlayer" ist ein Array von Layern
+
+"Layer" enthält die Layerinformation
+
+
+*/
+
+var maxlayers = 5;
+var maxresults = 40;
+
+// Hintergrundkarten (Urls werden erst beim laden in die Karte besorgt)
+var baseinfo = [];
+// Angabe Bezeichnung, kommaseperierte Id's
+//baseinfo.push(["Hintergrund1","27694","4.8,49,9.9,50"]);
+//baseinfo.push(["Hintergrund2","25420","4.8,49,9.9,50"]);
+//baseinfo.push(["Hintergrund3","25351,100110","4.8,49,9.9,50"]);
+
+searchUrl = 'mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&maxResults='+maxresults;
+
+
+// Initialisierung
+function addmyLayer(){
+
+ //Erweiterung OpenLayers - angepasster Click Event
+ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ 'pixelTolerance': 0,
+ 'stopSingle': false
+ },
+
+ initialize: function(options) {
+ var opts = options || {};
+ this.handlerOptions = OpenLayers.Util.applyDefaults(opts.handlerOptions || {},this.defaultHandlerOptions);
+ OpenLayers.Control.prototype.initialize.apply(this,arguments);
+ this.handler = new OpenLayers.Handler.Click(this,{'click': this.onClick},this.handlerOptions);
+ },
+
+ onClick: function( evt ) {
+ // click funcktion
+ var lonlat = map.getLonLatFromViewPortPx(evt.xy);
+ var querylayer = $('#ownlist').find('.query_checked').parent();
+ var actuallang = $('#select-lang').val();
+ //Punkt erzeugen
+ var geompoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ var geompoint1 = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(geompoint,{},olSearchSymbol),
+ new OpenLayers.Feature.Vector(geompoint1,{},olFeaturequerySymbol)
+ ]);
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+
+ if(querylayer.length>0){
+ // Abfrage des ausgewählten Layers
+ var featureurl = querylayer.attr('getmapurl')
+ + '&wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1'
+ + '&mapfile='+ querylayer.attr('name')
+ + '&layers=' + querylayer.attr('name') + '&QUERY_LAYERS=' + querylayer.attr('name')
+ + '&SRS=' + featurequerySrc
+ + '&BBOX=' + map.getExtent().toBBOX()
+ + '&WIDTH=' + map.size.w + '&HEIGHT=' + map.size.h
+ + '&X=' + evt.xy.x + '&Y=' + evt.xy.y
+ + '&INFO_FORMAT=text/html';
+ var iframe=$('<iframe src="'+featureurl+'" class="query_iframe">'
+ +'<p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'
+ );
+ setMarkerhint('Abfrageergebnis:',iframe);
+ } else {
+ // Standartabfrage, falls keiner ausgewählt ist
+ var featureurl = 'query/rasterquery.php?coord='+lonlat.lon+ ', '+lonlat.lat+'&lang='+actuallang;
+ loadFeature(featureurl);
+ }
+ },
+
+ CLASS_NAME: "OpenLayers.Control.Click"
+ });
+
+ $("#mapbenderbut").click(function(){
+ $.mobile.changePage($("#mod_mapbender"),pageTransition);
+ refresh();
+ });
+
+ //Suchbutton
+ $('#mapbendersearchformbut').click(function() {
+ searchMaps(searchUrl+'&searchText='+$('#mapbendersearchfield').val());
+ });
+
+ //Suchfeld
+ $('#mapbendersearchfield').live('keypress', function(e) {
+ if(e.keyCode === 13){
+ searchMaps(searchUrl+'&searchText='+$('#mapbendersearchfield').val());
+ }
+ });
+
+ // Alle anderen Layer einklappen
+ $('div[data-role=collapsible]').live('expand', function(){
+ $("div[data-role=collapsible]").not($(this)).trigger("collapse");
+ });
+
+ //zurück zur Karte-Button
+ $(".addToMapBut").click(function(){
+ $("div[data-role=collapsible]").not('.ui-collapsible-collapsed').trigger("collapse");
+ $.mobile.changePage($("#mappage"),pageTransition);
+ });
+
+ addBaselayers();
+
+}
+
+
+
+// ---------------
+// Popupfenster:
+// ---------------
+
+// Popupfenster für Vorschau mit Ajax (deaktiviert)
+function preview(url,layerid,bbox){
+ $.ajax({
+ previewurl: url,
+ layerid: layerid,
+ bbox: bbox,
+ success: function() {
+ $("#preview").find('div[data-role=content]').empty();
+ $("#preview").find('div[data-role=content]').append('<img src="' + $(this).attr("previewurl") + '" alt="image" style="width:200px;">');
+ var bbox=$(this).attr("bbox");
+ var layerid=$(this).attr("layerid");
+ $("#preview_zoom").click(function(){
+ var index=getOpenlayersIndex(layerid);
+ /*if(index>=0){
+ map.zoomToExtent(map.layers[index].getExtent());
+ };*/
+ zoomToBbox(bbox);
+ $.mobile.changePage($("#mappage"),pageTransition);
+
+ });
+ $('#preview').popup('open');
+ }
+ });
+}
+
+// Anzeigen eines Popups, bei einer zu groÃen Auswahl
+getInfo = function(content){
+ $("#info_content").empty();
+ $("#info_content").append(content);
+ $('#info').popup('open');
+}
+
+
+
+// ----------------------------
+// Funktionen für Openlayers:
+// ----------------------------
+
+// Index des Openlayer Eintrages zurückgeben
+function getOpenlayersIndex(layerid){
+ for (var i=0; i<map.layers.length; i++){
+ if(map.layers[i].name==layerid){
+ return i;
+ }
+ }
+ return -1;
+}
+
+// Layer in die Karte einfügen
+function addOpenlayer(layerid,layername,getMapUrl){
+ var openLayer = new OpenLayers.Layer.WMS(layerid,getMapUrl,
+ { layers: layername, format: "image/png", transparent: "TRUE", transitionEffect: 'resize'},
+ { projection: mapProj, units: projUnits, opacity: 0.8, singleTile: true, 'isBaseLayer': false, visibility: true, alwaysInRange: true
+ }
+ );
+ map.addLayer(openLayer);
+ map.setLayerIndex(openLayer, 0);
+
+}
+
+// Bestimmter Layer aus Karte entfernen
+function removeOpenlayer(layerid){
+ var index=getOpenlayersIndex(layerid);
+ if(index>=0){
+ map.removeLayer(map.layers[index]);
+ }
+}
+
+// Baselayer auswählen
+function setOpenBaselayer(baseid){
+ var index=getOpenlayersIndex(baseid);
+ if(index>=0){
+ map.setBaseLayer(map.layers[index]);
+ }
+}
+
+// Overlay sichtbar schalten
+function selectOpenlayer(layerid,visibility){
+ var index=getOpenlayersIndex(layerid);
+ if(index>=0){
+ map.layers[index].setVisibility(visibility);
+ }
+}
+
+// Dynamische Hintergrundkarte in die Karte einfügen
+function addOpenBaselayer(baselayername,baselayerids){
+
+ // Layerdaten dynamisch laden
+ var searchUrl = 'mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&resourceIds='+baselayerids;
+
+ $.getJSON(
+ searchUrl,
+ function(data){
+
+ // Hintergrundkarten
+ var services=data.wms.srv;
+ $.each(services, function(index,srv){
+ $.each(srv.layer, function(index, layer){
+ if(layer.layer){
+ layer=layer.layer[0];
+ }
+ var layername=layer.name;
+ var getMapUrl=srv.getMapUrl;
+ var openLayer = new OpenLayers.Layer.WMS(baselayername,getMapUrl,
+ { layers:layername, format:"image/png", transparent:"false", transitionEffect:'resize'},
+ { projection:mapProj, units:projUnits, singleTile:true, 'isBaseLayer':true, alwaysInRange:true}
+ );
+ map.addLayers([openLayer]);
+ });
+ });
+ });
+}
+
+// Zoomen auf bestimmte Boundingbox
+function zoomToBbox(bbox){
+ var extend=bbox.split(',');
+ var p1 = new OpenLayers.LonLat(extend[0],extend[1]).transform(wgs84Proj,mapProj);
+ var p2 = new OpenLayers.LonLat(extend[2],extend[3]).transform(wgs84Proj,mapProj);
+ map.zoomToExtent(new OpenLayers.Bounds(p1.lon, p1.lat, p2.lon, p2.lat));
+}
+
+
+// -------------------
+// Listenfunktionen:
+// -------------------
+
+// Anzahl der Dienste zurückgeben
+function numServices(){
+ return $('#resultlist').find('.service').length;
+}
+
+// Anzahl der Layer in einem bestimmten Element zurückgeben
+function numResultLayers(element){
+ return element.find('.layer').length;
+}
+
+// Prüfen ob und wo ein Layer in einer Liste ist
+function layerInList(list,id){
+ var layers=list.find('.layer');
+ for(var i=0; i<layers.length; i++){
+ if($(layers[i]).attr('layerid')==id) { return i }
+ }
+ return -1;
+};
+
+// Layer in Auswahl rauf
+function up(layerid){
+ var position = layerInList($('#ownlist'),layerid);
+ if(position>0){
+ $($('#ownlist').find('.layer')[position]).after($($('#ownlist').find('.layer')[position-1]));
+console.log('todo: layerreihenfolge')
+ map.raiseLayer(map.layers[getOpenlayersIndex(layerid)],1);
+ validateArrows();
+ refresh();
+ }
+}
+
+// Anzahl der Aktuellen Auswahl ausgeben
+function numOwnlayers(){
+ return $('#ownlist').find('.layer').length;
+}
+
+
+
+// ----------------------------------------
+// Funktioen zur Validierung der Anzeige:
+// ----------------------------------------
+
+// Erneuern der Darstellung
+function refresh(){
+ $('#resultlist').listview('refresh');
+ $($('#ownlist').parent()).listview('refresh');
+ $('div[data-role=collapsible]').collapsible();
+ $('a[data-role=button]').button();
+}
+
+// Layerauswahl kennntlich machen
+function validateLayers(){
+ layers=$('#resultlist').find('.layer');
+ $.each(layers, function(index,layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position>=0){
+ $(layer).find('.layer_icon').first().attr('class','layer_icon icon layer_remove');
+ $(layer).find('.collapsible').first().removeClass('unselected').addClass('selected');
+ } else {
+ $(layer).find('.layer_icon').first().attr('class','layer_icon icon layer_add');
+ $(layer).find('.collapsible').first().removeClass('selected').addClass('unselected');
+ }
+ });
+}
+
+// Validierung der Pfeile zum verschieben der Layer
+function validateArrows(){
+ var movers=$('#ownlist').find('.move');
+ $(movers[0]).attr('class','icon move arrow_empty');
+ if(movers.length>1){
+ $(movers[1]).attr('class','icon move arrow_up');
+ }
+}
+
+// Validierung der Queryable-Auswahl
+function query_check(item){
+ if($(item).hasClass('query_unchecked')){
+ $('#ownlist').find('.query_checked').addClass('query_unchecked').removeClass('query_checked');
+ $(item).addClass('query_checked').removeClass('query_unchecked');
+ } else {
+ $(item).addClass('query_unchecked').removeClass('query_checked');
+ }
+}
+
+
+
+
+// ---------------------------------
+// Hinzufüge- + Entfernfunktionen:
+// ---------------------------------
+
+// Layer zur Auswahl hinzufügen
+function addLayer(layer){
+ if(numOwnlayers()>=maxlayers){
+ getInfo('Es können nicht mehr als '+maxlayers+' Ebenen zur Auswahl hinzugefügt werden.');
+ return false;
+ } else {
+ $.mobile.showPageLoadingMsg();
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position<0){
+ // Layer hinzufügen
+ $('#ownlist').append(OwnLayer(layer.attr('layerid'),layer.attr('title'),layer.attr('name'),layer.attr('desc'),layer.parent().attr('title'),layer.parent().attr('desc'),layer.attr('previewUrl'),layer.attr('queryable')=='true',layer.attr('getMapUrl'),layer.attr('bbox'),layer.parent().attr('avail')));
+ validateLayers();
+ validateArrows();
+ refresh();
+ addOpenlayer(layer.attr('layerid'),layer.attr('name'),layer.attr('getMapUrl'));
+ $.mobile.hidePageLoadingMsg();
+ return true;
+ }
+ $.mobile.hidePageLoadingMsg();
+ return false;
+ }
+}
+
+// Layer entfernen
+function removeLayer(layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ $($('#ownlist').find('.layer')[layerInList($('#ownlist'),$(layer).attr('layerid'))]).remove();
+ validateLayers();
+ validateArrows();
+ refresh();
+ removeOpenlayer($(layer).attr('layerid'));
+}
+
+// Layer hinzfügen oder entfernen
+function switchLayer(layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position<0){
+ addLayer(layer);
+ } else {
+ removeLayer(layer);
+ }
+}
+
+// Service mit allen Layern hinzufügen
+function addService(service){
+ var layers=service.find('.layer');
+ for(var i=0; i<layers.length; i++){
+ addLayer($(layers[i]));
+ if(numOwnlayers()>maxlayers){ break; }
+ }
+}
+
+// Service mit allen Layern entfernen
+function removeService(service){
+ $.each(service.find('.layer'), function(index, layer){
+ removeLayer($(layer));
+ });
+}
+
+// Sichtbarkeit eines Layers umschalten
+function switchVisibility(layer){
+ if($(layer).hasClass('layer')){ // Overlay
+ $(layer).find('.layer_visibility').toggleClass('layer_checked').toggleClass('layer_unchecked');
+ selectOpenlayer($(layer).attr('layerid'),$(layer).find('.layer_visibility').hasClass('layer_checked'));
+ } else { // Baselayer
+ $('#baselayers').find('.base_checked').addClass('base_unchecked').removeClass('base_checked');
+ $(layer).addClass('base_checked').removeClass('base_unchecked');
+ setOpenBaselayer($(layer).attr('layerids'));
+ }
+}
+
+// Validierung der Baselayer-Auswahl
+function base_check(item){
+ $('#baselayers').find('.base_checked').addClass('base_unchecked').removeClass('base_checked');
+ $(item).addClass('base_checked').removeClass('base_unchecked');
+}
+
+
+
+// -----------------------
+// Daten Laden + Parsen:
+// -----------------------
+
+// Standardsuche
+function searchMaps(searchurl){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ $.getJSON(searchurl, function(data){
+ var datacollection=parseMapBenderJson(data);
+ appendData(datacollection.services,datacollection.layers,datacollection.nresults);
+ $.mobile.hidePageLoadingMsg();
+ if(datacollection.nresults>maxresults){
+ getInfo('Es gab '+datacollection.nresults
+ +' Treffer, es können aber nur '
+ +maxresults+' Ergebnisse angezeigt werden.'
+ +'</br><b>Schränken Sie Ihre Suche weiter ein.</b>');
+ };
+ });
+}
+
+// Suche über WMC-Dienste
+function searchWmc(wmcurl){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ $.getJSON(wmcurl, function(data){
+ appendWmc(data);
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+// Parst das JSON-Objekt von MapBender in ein Array [services,layers]
+function parseMapBenderJson(json){
+ // Daten generalisieren
+ var srvs=json.wms.srv;
+ var services=[];
+ var layers=[];
+ $.each(srvs, function(index,srv){
+ // Dienste zusammenfassen
+ var dublicated=false;
+ for(var i=0; i<services.length; i++){
+ if(services[i].id==srv.id){
+ dublicated=true;
+ break;
+ }
+ }
+ // Dienst freigegeben?
+ if(!srv.logged && !srv.nwaccess){
+ if(!dublicated){
+ services.push(srv);
+ }
+ // Layer aufnehmen
+ $.each(srv.layer, function(index, grplayer){
+ if(grplayer.layer){
+ $.each(grplayer.layer, function(index, lyr){
+ layers.push([srv.id,lyr]);
+ });
+ } else {
+ layers.push([srv.id,grplayer]);
+ }
+ });
+ }
+ });
+
+ return {"services": services, "layers": layers, "nresults":json.wms.md.nresults};
+}
+
+// Fügt die Dienste und Layer in das DOM ein
+function appendData(services,layers,nresults){
+ $("#resultlist").empty();
+ for(var i=0; i<services.length; i++){
+ var srv=services[i];
+ service=Service(srv.id,srv.title,$(srv).attr('abstract'),srv.getMapUrl,srv.status,(srv.logoUrl==""? 'mod_mapbender/img/defaulicon.png' : srv.logoUrl ),srv.symbolLink,srv.avail);
+ // Layer zuordnen
+ for(var j=0; j<layers.length; j++){
+ var layer=layers[j];
+ var serviceid=layer[0];
+ var lyr=layer[1];
+
+ if(serviceid==srv.id){
+ service.append(ResultLayer(lyr.id,lyr.title,lyr.name,$(lyr).attr('abstract'),lyr.previewURL,lyr.queryable=='1',srv.getMapUrl,lyr.bbox));
+ }
+ }
+ $('#resultlist').append(service);
+ }
+ $('#resultlist').prepend('<li data-theme="b">Suchergebnis: '+numServices()+' Dienste, '
+ +numResultLayers($('#resultlist'))+' Layer '
+ +'('+nresults+' Treffer) </li>');
+ validateLayers();
+ refresh();
+}
+
+// Fügt die WMC-Layer in das DOM ein
+function appendWmcData(services,layers,layerlist){
+ $("#ownlist").empty();
+ var ownlayers = [];
+ for(var i=0; i<services.length; i++){
+ var srv=services[i];
+ // Layer zuordnen
+ for(var j=0; j<layers.length; j++){
+ var layer=layers[j];
+ var serviceid=layer[0];
+ var lyr=layer[1];
+
+ if(serviceid==srv.id){
+ ownlayers.push(OwnLayer(lyr.id,lyr.title,lyr.name,$(lyr).attr('abstract'),srv.title,$(srv).attr('abstract'),lyr.previewURL,lyr.queryable=='1',srv.getMapUrl,lyr.bbox,srv.avail));
+ }
+ }
+ }
+
+
+ // Layer richtig sortiert einfügen und selektieren
+ for(var i=0; i<layerlist.length; i++){
+ for(var j=0; j<ownlayers.length; j++){
+ if(layerlist[i].layerId==ownlayers[j].attr('layerid')){
+ var layer=ownlayers[j];
+ $('#ownlist').append(layer);
+ addOpenlayer(layer.attr('layerid'),layer.attr('name'),layer.attr('getMapUrl'));
+ if(!layerlist[i].active){ // Auswahl umschalten
+ switchVisibility(layer);
+ }
+ break;
+ }
+ }
+ }
+ validateLayers();
+ validateArrows();
+
+}
+
+// Alle ausgewählten Overlays entfernen
+function clearOwnlist(){
+ var layers=$('#ownlist').find('.layer');
+ for(var i=0; i<layers.length; i++){
+ removeLayer(layers[i]);
+ }
+}
+
+// WMC-Daten hinzufügen
+function appendWmc(json){
+
+ // Hintergrundkarte auswählen
+ for(var i=0; i<json.backGroundLayer.length; i++){
+ var layer=json.backGroundLayer[i];
+ if(layer.active){
+ var layers=$('#baselayers').find('.baselayer')
+ for(var j=0; j<layers.length; j++){
+ if($(layers[j]).attr('layerids')==layer.name){
+ switchVisibility(layers[j]);
+ break;
+ }
+ }
+ }
+ }
+
+ // Alle ausgewählten overlays entfernen
+ clearOwnlist();
+
+ // Layerids für die Abfrage zusammenstellen
+ var layerids="";
+ $.each(json.layerList, function(index,layer){
+ layerids=layerids+","+layer.layerId;
+ });
+ layerids=layerids.substr(1,layerids.length);
+
+ // Overlays auswählen
+ $.getJSON(searchUrl+'&resourceIds='+layerids, function(data){
+ // Informationen sammeln und Parsen
+ var datacollection=parseMapBenderJson(data);
+ appendWmcData(datacollection.services,datacollection.layers,json.layerList);
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+
+
+// Hintergrunddaten in Collapsible aufnehmen
+function addBaselayers(){
+
+ $("#baselayers").empty();
+
+ // Vektorlayer
+ vector_marker = new OpenLayers.Layer.Vector("Vector Layer", {});
+
+ // Hintergrund:Topographie ect.
+/* var atkis_praes_tms = new OpenLayers.Layer.TMS(
+ "Hybrid",
+ "http://www.gdi-rp-dienste2.rlp.de/mapcache/tms/",
+ {
+ layername: 'test at UTM32',
+ type: "jpeg",
+ serviceVersion:"1.0.0",
+ gutter:0,
+ buffer:0,
+ isBaseLayer:true,
+ transitionEffect:'resize',
+ resolutions: [529.16666666670005270134,396.87500000000000000000,264.58333333330000414207,132.29166666669999585793,66.14583333330000414207,39.68750000000000000000,26.45833333330000058936,13.22916666669999941064,6.61458333329999970118,3.96875000000000000000,2.64583333330000014527,2.11666666670000003236,1.32291666670000007677,0.79375000000000000000,0.26458333330000001204,0.13229166670000001016],
+ units: projUnits,
+ projection: mapProj,
+ sphericalMercator: false
+ }
+ );*/
+
+ $('#baselayers').append(BaseLayer("RLP Zusammenstellung",atkis_praes_tms.name));
+
+ // Hintergrund: Luftbild
+/* var luftbilder = new OpenLayers.Layer.WMS( "Luftbild",
+ "http://geo4.service24.rlp.de/wms/dop40_geo4.fcgi?",
+ {
+ layers: "dop",
+ format: "image/jpeg",
+ transparent: "false",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: false,
+ alwaysInRange: true,
+ 'isBaseLayer': true
+ }
+ ); */
+
+ $('#baselayers').append(BaseLayer("Luftbilder",luftbilder.name));
+
+/* var grenze_leer = new OpenLayers.Layer.WMS( "grenze_leer",
+ "http://map1.naturschutz.rlp.de/service_basis/mod_wms/wms_getmap.php?mapfile=tk_rlp_gesamt&",
+ {
+ layers: "grenzen_land",
+ format: "image/jpeg",
+ transparent: "false",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: true,
+ alwaysInRange: true,
+ 'isBaseLayer': true
+ } );*/
+
+
+ $('#baselayers').append(BaseLayer("Keine Hintergrundkarte",grenze_leer.name));
+
+ map.addLayers([atkis_praes_tms,luftbilder,grenze_leer,vector_marker]);
+
+ // Dynamische Hintergrundkarten hinzufügen
+ for(i in baseinfo){
+ var name=baseinfo[i][0]
+ var layerids=baseinfo[i][1];
+ $('#baselayers').append(BaseLayer(name,layerids));
+ addOpenBaselayer(name,layerids);
+ }
+
+ // Erste Hintergrundkarte auswählen
+ base_check($('#baselayers').find('.baselayer').first());
+}
+
+
+
+/* ++++++++++++++++++++++++++++++++++++++++++ Openlayers Base +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+// initialize map when page ready
+var initmap = function () {
+ var mapOptions = {
+ theme: null,
+ projection: mapProj,
+ units: projUnits,
+ //'tileSize': new OpenLayers.Size(320,320),
+ maxExtent: mymapbounds,
+ maxScale: mymaxscale,
+ minScale: myminscale,
+ numZoomLevels: myzoomlevels,
+ scales: myscales,
+ controls: [
+ new OpenLayers.Control.Attribution(),
+ new OpenLayers.Control.Navigation({zoomWheelEnabled: true}),
+ new OpenLayers.Control.KeyboardDefaults(),
+ new OpenLayers.Control.TouchNavigation({
+ dragPanOptions: {
+ interval: 10,
+ enableKinetic: true
+ }
+ }),
+ new OpenLayers.Control.ScaleLine({
+ div: document.getElementById("scaleline"),geodesic:false,maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null
+ }),
+ new OpenLayers.Control.LoadingPanel({})
+ ]
+ }
+
+ //Map erzeugen
+ map = new OpenLayers.Map('map',mapOptions);
+ //Layer hinzufügen
+ addmyLayer();
+
+ //Auf Extent zoomen
+ //
+ if (myzoombounds !== "off") {
+ map.zoomToExtent(myzoombounds);
+ }
+ else {
+ map.zoomToExtent(map.maxExtent);
+ }
+
+ //map.zoomToMaxExtent();
+ //map.setCenter(new OpenLayers.LonLat(739108, 6403856),10);
+
+ var geolocate = new OpenLayers.Control.Geolocate({
+ id: 'locate-control',
+ geolocationOptions: {
+ enableHighAccuracy: true,
+ maximumAge: 0,
+ timeout: 7000
+ }
+ });
+ map.addControl(geolocate);
+
+
+ geolocate.events.register("locationupdated", this, function(e) {
+
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(
+ e.point,
+ {},
+ olGpsSymbol
+ ),
+ new OpenLayers.Feature.Vector(
+ OpenLayers.Geometry.Polygon.createRegularPolygon(
+ new OpenLayers.Geometry.Point(e.point.x, e.point.y),
+ e.position.coords.accuracy / 2,
+ 50,
+ 0
+ ),
+ {},
+ olGpscircleStyle
+ )
+ ]);
+ /*
+ console.log(e.point.x + " - " + e.point.y);
+ console.log(map.maxExtent.top);
+ console.log(map.maxExtent.bottom);
+ console.log(map.maxExtent.left);
+ console.log(map.maxExtent.right);
+ */
+ //Wenn Standoert innerhalb Maxextent
+ if(e.point.x > map.maxExtent.left && e.point.x < map.maxExtent.right && e.point.y > map.maxExtent.bottom && e.point.y < map.maxExtent.top){
+ setMarkerhint(window.lang.convert('Positionsgenauigkeit:'),'~ ' + e.position.coords.accuracy + ' Meter');
+ map.zoomToExtent(vector_marker.getDataExtent());
+ }
+ else{
+ alert(window.lang.convert('Die ermittelte Position liegt auÃerhalb des darstellbaren Kartenausschnitts!'));
+ $('#markerhint').css('visibility','hidden');
+ }
+ });
+
+ //default Style für Zeich- / Messfunktion)
+ var style = new OpenLayers.Style();
+ style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+ ]);
+ var styleMap = new OpenLayers.StyleMap({"default": style});
+
+ //Messcontrol
+ measureControls = {
+ line: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Path, {
+ persist: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ }
+ }
+ ),
+ polygon: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Polygon, {
+ persist: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ }
+ }
+ )
+ };
+
+ var control;
+ for(var key in measureControls) {
+ control = measureControls[key];
+ control.events.on({
+ "measure": handleMeasurements,
+ "measurepartial": handleMeasurements
+ });
+ map.addControl(control);
+ }
+
+};
+/* ++++++++++++++++++++++++++++++++++++++++++ Openlayers JQuery +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+
+//Initialisierung
+$(document).ready(function() {
+
+
+ // Start with the map page
+ if (window.location.hash && window.location.hash!='#mappage') {
+ $.mobile.changePage($("#mappage"),pageTransition);
+ }
+
+ //Openlayers Initialisierung (ngms_base.js)
+ initmap();
+
+ //Soll Zoomselector dargestellt werden?
+ if(zoomSelect){
+ $("#zoomscale").css('visibility','visible');
+ //Selectmenue aus Array erzeugen
+ createZoomselect();
+ //Scalelevel anzeigen
+ map.events.register("moveend", null, displayZoom);
+ }
+
+
+ //neuer OpenLayers Control für Featureinfo
+ clickCtrl = new OpenLayers.Control.Click();
+ map.addControl( clickCtrl );
+ clickCtrl.activate();
+
+ //Aktivierte Layer Checken
+ checkLayers();
+
+ //Events den einzelnen Werkzeugen zuweisen
+
+ //Automatisches Wechseln der Ebenen
+ $("#autolayerchange").change(function(){
+ directLayerChange = this.value;
+ });
+
+ //Menü Buttons
+ $("#layerbut").click(function(){
+ $.mobile.changePage($("#layerpage"),pageTransition);
+ });
+
+ $("#searchbut").click(function(){
+ $.mobile.changePage($("#searchpage"),pageTransition);
+ });
+
+ $("#helpbut").click(function(){
+ $.mobile.changePage($("#helppage"),pageTransition);
+ });
+
+ $("#gearbut").click(function(){
+ $.mobile.changePage($("#gearpage"),pageTransition);
+ });
+
+ $("#measurelinebut").click(function(){
+ toggleMeasure('line');
+ });
+
+ $("#measurepolybut").click(function(){
+ toggleMeasure('polygon');
+ });
+
+ // Mapzoom Buttons
+ $("#ovbut").click(function(){
+ map.zoomToExtent(map.maxExtent);
+ });
+
+ $("#zoominbut").click(function(){
+ map.zoomIn();
+ });
+
+ $("#zoomoutbut").click(function(){
+ map.zoomOut();
+ });
+
+ //Popup für erweitertes Popup-Menü initialisieren und öffnen
+ $("#popupMenu").popup();
+
+ $("#menubut").click(function(){
+ $("#popupMenu").popup( "open" );
+ });
+
+ //Nachrichtenfenster schlieÃen
+ $("#xheader").click(function(){
+ $('#markerhint').css('visibility','hidden');
+ vector_marker.removeAllFeatures();
+ });
+
+ //Nachrichtenfenster schlieÃen
+ $("#mheader").click(function(){
+ $('#measurehint').css('visibility','hidden');
+ toggleMeasure('off');
+ });
+
+ //Suchbutton
+ $('#searchformbut').click(function() {
+ searchCall();
+ });
+
+ //Suchfeld
+ $('#searchfield').live('keypress', function(e) {
+ if(e.keyCode === 13){
+ searchCall();
+ }
+ });
+
+ //zuück zur Karte-Button
+ $(".mapbackbut").click(function(){
+ $.mobile.changePage($("#mappage"),pageTransition);
+ $('body').css('overflow', 'hidden');
+ });
+
+ //Geolocation Aktivieren
+ $("#locatebut").click(function(){
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+ var control = map.getControlsBy("id", "locate-control")[0];
+ if (control.active) {
+ control.getCurrentLocation();
+ } else {
+ control.activate();
+ }
+ });
+
+
+ //Baselayer einstellen
+ $(".baselayer_check").click(function() {
+ //alle zurücksetzen
+ $(".baselayer_check").css("background-image","url(img/ico_basecheck.png)");
+ $(this).css("background-image","url(img/ico_basecheck_active.png)");
+
+ for (var i = 0; i < map.layers.length; i++) {
+ if($(this).attr("id") === map.layers[i].name){
+ map.setBaseLayer(map.layers[i]);
+ }
+ }
+
+ clearanimation();
+ checktranspage();
+ });
+
+ //Overlays einstellen
+ $(".layer_check").click(function() {
+ for (var i = 0; i < map.layers.length; i++) {
+ if($(this).attr("id") === map.layers[i].name){
+ var mylayerindex = i;
+ }
+ }
+ if(map.layers[mylayerindex].getVisibility()){
+ map.layers[mylayerindex].setVisibility(false);
+ $(this).css("background-image","url(img/ico_check.png)");
+ }
+ else{
+ map.layers[mylayerindex].setVisibility(true);
+ $(this).css("background-image","url(img/ico_check_active.png)");
+ }
+
+ clearanimation();
+ checktranspage();
+ });
+
+ //POI-Overlays einstellen
+ $(".poi_check").click(function() {
+ var activepoilayer = poilayer.params.LAYERS;
+ var activepoiarray = [];
+ //console.log("Vorher: " + activepoilayer);
+ if(activepoilayer != ""){
+ var activepoiarray = activepoilayer.split(',');
+ }
+ //wenn Layer schon im POI-Layer aktiv, Layer entfernen
+ if(jQuery.inArray($(this).attr("id"), activepoiarray) != -1){
+ for (var i = 0; i < activepoiarray.length; i++) {
+ if($(this).attr("id") === activepoiarray[i]){
+ activepoiarray.splice(i,1);
+ }
+ }
+ $(this).css("background-image","url(img/ico_check.png)");
+ }
+ //sonst hinzufügen
+ else{
+ activepoiarray.push($(this).attr("id"));
+ $(this).css("background-image","url(img/ico_check_active.png)");
+ }
+
+ activepoilayer = activepoiarray.join(',');
+ //console.log("Nacher: " + activepoilayer);
+ poilayer.mergeNewParams({'layers': activepoilayer});
+ //sichtbar machen, wenn mindestens 1 Layer aktiv
+ if(activepoiarray.length > 0){
+ poilayer.setVisibility(true);
+ }
+ poilayer.redraw();
+
+ clearanimation();
+ checktranspage();
+ });
+
+
+ //Query-Layersetzen
+ $(".query_check").click(function() {
+ //alle zurücksetzen
+ $(".query_check").css("background-image","url(img/ico_checkop.png)");
+ //angeklickten aktiv setzen
+ $(this).css("background-image","url(img/ico_checkop_active.png)");
+ var qstr = $(this).attr("id");
+ var qlayer = qstr.substring(0,qstr.length-6);
+ $('#queryselect').val(qlayer);
+ clearanimation();
+ });
+
+ //CSS Animationen Layersteuerung
+ $(".query_check").touchstart(function() {
+ $(this).css("background-color","#808080");
+ });
+
+ $(".layer_check").touchstart(function() {
+ $(this).css("background-color","#808080");
+ $(this).css("color","#FFFFFF");
+ });
+
+ $(".baselayer_check").touchstart(function() {
+ $(this).css("background-color","#808080");
+ $(this).css("color","#FFFFFF");
+ });
+
+ //CSS Animationen Navigationsbuttons
+ $(".navbuttons").touchstart(function() {
+ $(this).css("border","2px solid #808080");
+ });
+
+ $(".navbuttons").touchend(function() {
+ $(this).css("border","2px solid " + toolColor);
+ });
+
+ //Suchbutton
+ $('.searchbutton').live('touchstart', function(e) {
+ $(this).css("border","2px solid #808080");
+ });
+
+ //Links bzw. Rechtshänder einstellen
+ changeHand(defaultHand);
+
+ //direkter Layerwechsel einstellen
+ $("#autolayerchange").val(directLayerChange);
+
+ //Adressbar verstecken
+ hideAddressBar();
+
+});
+
+//Animationen der Buttons und Checkboxen zurücksetzen
+var clearanimation = function(){
+ $(".query_check").css("background-color","#808080");
+ $(".layer_check, .baselayer_check, .poi_check").css("background-color","#FFFFFF");
+ $(".layer_check, .baselayer_check, .poi_check").css("color","#000000");
+}
+
+//Direkter Wechsel zu Map von Layersteuerung
+var checktranspage = function(){
+ if(directLayerChange === "on"){
+ $.mobile.changePage($("#mappage"),pageTransition);
+ }
+}
+
+//Checken welche Layer an sind
+var checkLayers = function(){
+ //Baselayer prüfen + einstellen
+ $(".baselayer_check").each(function(){
+ for(var i=0;i<map.layers.length;i++){
+ if(map.layers[i].name === $(this).attr("id") && map.layers[i].visibility){
+ //console.log('Aktivierte Baselayer:' + $(this).attr("id"));
+ $(this).css("background-image","url(img/ico_basecheck_active.png)");
+ }
+ }
+ });
+
+ //Overlays einstellen
+ $(".layer_check").each(function(){
+ for(var i=0;i<map.layers.length;i++){
+ if(map.layers[i].name === $(this).attr("id") && map.layers[i].visibility){
+ //console.log('Aktivierte Overlaylayer:' + $(this).attr("id"));
+ $(this).css("background-image","url(img/ico_check_active.png)");
+ }
+ }
+ });
+
+ //POI-Overlays einstellen
+ $(".poi_check").each(function(){
+ var activepoilayer = poilayer.params.LAYERS;
+ var activepoiarray = [];
+ if(activepoilayer != ""){
+ var activepoiarray = activepoilayer.split(',');
+ }
+ //wenn Layer schon im POI-Layer aktiv, Layer entfernen
+ if(jQuery.inArray($(this).attr("id"), activepoiarray) != -1){
+ $(this).css("background-image","url(img/ico_check.png)");
+ }
+ });
+
+ /* */
+ //Querylayer einstellen
+ $(".query_check").each(function() {
+ var qstr = $(this).attr("id");
+ var qlayer = qstr.substring(0,qstr.length-6);
+ if(qlayer === $('#queryselect').val()){
+ //console.log('Aktivierte Querylayer:' + qlayer);
+ $(this).css("background-image","url(img/ico_checkop_active.png)");
+ }
+ });
+
+}
+
+//Aufruf der Suchfunktion je nach globaler Einstellung
+function searchCall(){
+ if(searchMode ==='google'){
+ codeAddress();
+ }
+ else if (searchMode ==='streetsearch'){
+ searchStreet($('#searchfield').val());
+ }
+ else if (searchMode ==='mapbendersearch'){
+ searchMapbender($('#searchfield').val());
+ }
+ else{
+ alert('kein Suchmodus konfiguriert!');
+ }
+}
+
+//Markerhint sichtbar machen
+function setMarkerhint(xheader,xcontent){
+ $('#xheader').html(xheader);
+ $('#xcontent').html(xcontent);
+ $('#markerhint').css('visibility','visible');
+}
+
+//Adressleiste verbergen
+function hideAddressBar(){
+ if(!window.location.hash){
+ if(document.height <= window.outerHeight + 10){
+ document.body.style.height = (window.outerHeight + 50) +'px';
+ setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
+ }
+ else{
+ setTimeout( function(){ window.scrollTo(0, 1); }, 0 );
+ }
+ }
+}
+
+//Händigkeit ändern
+function changeHand(h){
+ //Linkshänder
+ if(h === "l"){
+ defaultHand = "l";
+ $("#scaleline, #copyright, #zoomscale").css("left","auto").css("right","4px");
+ $("#navbutgroup").css("right","auto").css("left","4px");
+ }
+ //Rechtshänder (default)
+ else{
+ defaultHand = "r";
+ $("#scaleline, #copyright, #zoomscale").css("right","auto").css("left","4px");
+ $("#navbutgroup").css("left","auto").css("right","4px");
+ }
+}
+
+//Sprache umstellen
+function changeLanguage(lang,refresh){
+ window.lang.change(lang);
+ $.mobile.showPageLoadingMsg();
+ $.ajax({
+ url: 'help/help_'+lang+'.html',
+ cache: true
+ }).done(function(data) {
+ $("#helpdiv").html(data);
+ $.mobile.hidePageLoadingMsg();
+ });
+ if(refresh){
+ $('#select-hand').selectmenu("refresh",true);
+ }
+ $('#select-lang').val(lang);
+}
+
+//#####Suchfunktionen###########################################################################
+//Geocoding via Google, Adresse Geocodieren
+function codeAddress() {
+ adressgeocoder = new google.maps.Geocoder();
+ var searchaddress = document.getElementById('searchfield').value;
+ adressgeocoder.geocode( { 'address': searchaddress}, function(results, status) {
+ if (status === google.maps.GeocoderStatus.OK) {
+ //console.log(results[0]);
+ //console.log("Anzahl Objekte:" + results[0].formatted_address);
+ var outofborder = "no";
+ for (i = 0; i < results[0].address_components.length; i++) {
+ //console.log("Objekte:" + results[0].address_components[i].long_name);
+ if(results[0].address_components[i].long_name === googleGeocodeAdmin){
+ outofborder = "ok";
+ }
+ }
+ if(outofborder != "ok"){
+ alert("Adresse liegt nicht in "+googleGeocodeAdmin+"!");
+ }
+ else{
+ var mysadr = results[0].formatted_address
+ var myslat = results[0].geometry.location.lat();
+ var myslng = results[0].geometry.location.lng();
+ //Anzeige in Google Maps
+ var mylatlng = new google.maps.LatLng(myslat, myslng);
+ var myOptions = {
+ zoom: 11,
+ center: mylatlng,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ }
+ var gmap = new google.maps.Map(document.getElementById("mygooglemap"), myOptions);
+ var marker = new google.maps.Marker({
+ map: gmap,
+ position: mylatlng
+ });
+
+ //Link generieren
+ var mygglink = window.lang.convert('Suchergebnis: ')+mysadr+' <br><div class="searchbutton" onClick="zoomtosearchpoint(\''+mysadr+'\','+myslng+','+myslat+')" >'+ window.lang.convert('Zoom auf Ergebnis in Karte') + '</div>';
+ //var mygglink = 'Suchergebnis in Google Maps: <a href="http://maps.google.de/maps?f=q&source=s_q&geocode=&q='+myslat+','+myslng+'&t=h&ie=UTF8&ll='+myslat+','+myslng+'&spn=0.009542,0.015407&z=16&iwloc=near" target="_blank"> '+mysadr+'</a>';
+ $('#mygooglelink').html(mygglink);
+
+ }
+ } else {
+ alert("Geocode nicht erfolgreich, Fehler: " + searchaddress + " " + status);
+ }
+ });
+}
+
+//Strassensuche aus Datenbank
+function searchStreet(item){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ var searchUrl = 'mod_streetsearch/street_full.php?lang=de';
+ searchUrl += '&searchfield=' + item;
+ $.getJSON(searchUrl, function(data){
+ if(data.totalResultsCount === "++"){
+ var output = '<li data-role="list-divider">' + window.lang.convert('Zu viele Datensätze! Bitte schränken Sie Ihre Suche ein!') + '</li>';
+ $('#search_results').append(output);
+ $('#search_results').listview('refresh');
+ }
+ else{
+ var output = '<li data-role="list-divider"> ' + data.totalResultsCount + ' ' + window.lang.convert('Suchergebnisse') + '</li>';
+ $('#search_results').append(output);
+ $.each(data.geonames, function(index, place){
+ output = '';
+ //output += '<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+place.title1+'\','+place.x+','+place.y+');" ><h2>' + place.title1 + '</h2>';
+ output += '<li><a href="javascript:void(0);" onClick="searchHsn(\'' + place.strid + '\');" ><h2>' + place.title1 + '</h2>';
+ output += '<p>' + place.title2 + '</p></a></li>';
+ $('#search_results').append(output);
+ });
+
+ $('#search_results').listview('refresh');
+ //Hiliten
+ var o ={words:$('input[name="searchfield"]').val()};
+ highlight("search_results", o);
+ }
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+//Hausnummernsuche aus Datenbank
+function searchHsn(item){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ var searchUrl = 'mod_streetsearch/street_hsn.php?lang=de';
+ searchUrl += '&strid=' + item;
+ $.getJSON(searchUrl, function(data){
+ var output = '<li data-role="list-divider" ><a href="javascript:void(0);" onClick="zoomtosearchpoint(\'' + data.street + '\',' + data.streetx + ',' + data.streety + ');" ><h2>' + data.street + '</h2>';
+ output += '<p>' + data.totalResultsCount + ' ' + window.lang.convert('Hausnummern') + '</p></a></li>';
+ $('#search_results').append(output);
+ $.each(data.geonames, function(index, place){
+ output = '';
+ output += '<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\'' + data.street + ' '+place.title1 + '\',' + place.x + ',' + place.y + ');" ><h2>Nr. ' + place.title1 + '</h2>';
+ output += '<p>' + place.title2 + '</p></a></li>';
+ $('#search_results').append(output);
+ });
+
+ $('#search_results').listview('refresh');
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+//Mapbendersuche via Service
+function searchMapbender(item){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ var searchUrl = mapbendersearchurl+searchEPSG;
+ searchUrl += '&searchText=' + item;
+ $.getJSON(searchUrl, function(data){
+ if(data.totalResultsCount > 500){
+ var output = '<li data-role="list-divider" >' + window.lang.convert('Zu viele Datensätze! Bitte schränken Sie Ihre Suche ein!') + '</li>';
+ $('#search_results').append(output);
+ $('#search_results').listview('refresh');
+ }
+ else{
+ var output = '<li data-role="list-divider" > ' + data.totalResultsCount + ' ' + window.lang.convert('Suchergebnisse') + '</li>';
+ $('#search_results').append(output);
+ $.each(data.geonames, function(index, place){
+ //Mittelpunktkoordinaten
+ var myx = (parseInt(place.minx) + parseInt(place.maxx)) / 2;
+ var myy = (parseInt(place.miny) + parseInt(place.maxy)) / 2;
+ output = '';
+ //Ergebnisse die nur auf Bounds zoomen soll
+ if(place.category === 'gemeinde_neu' || place.category === 'Gemeinde' || place.category === 'verbandsgemeinde' || place.category === 'kreis' || place.category === 'Kreis'){
+ output += '<li><a href="javascript:void(0);" onClick="zoomtoextent(\''+place.title+'\','+place.minx+','+place.miny+','+place.maxx+','+place.maxy+');" ><h2>' + place.title + '</h2>';
+ }
+ else {
+ output += '<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+place.title+'\','+myx+','+myy+');" ><h2>' + place.title + '</h2>';
+ }
+ output += '<p>' + place.category + '</p></a></li>';
+ $('#search_results').append(output);
+ });
+
+ $('#search_results').listview('refresh');
+ //Hiliten
+ var o ={words:$('input[name="searchfield"]').val()};
+ highlight("search_results", o);
+ }
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+//Hiliten von Such-Term
+function highlight(id, options) {
+ var o = {
+ words: '',
+ caseSensitive: false,
+ wordsOnly: true,
+ template: '$1<span class="highlight">$2</span>$3'
+ }, pattern;
+ $.extend(true, o, options || {});
+
+ if (o.words.length == 0) { return; }
+ pattern = new RegExp('(>[^<.]*)(' + o.words + ')([^<.]*)', o.caseSensitive ? "" : "ig");
+
+ $('#'+id).each(function() {
+ var content = $(this).html();
+ if (!content) return;
+ $(this).html(content.replace(pattern, o.template));
+ });
+}
+
+
+
+
+//Zoom auf Punkt aus Ajax Request, z.B. Rasterquery
+function zoompoint(myslng,myslat){
+ var geocodepoint = new OpenLayers.LonLat(myslng,myslat);
+ var geompoint = new OpenLayers.Geometry.Point(myslng,myslat);
+ var geompoint1 = new OpenLayers.Geometry.Point(myslng,myslat);
+ //console.log(transpoint.lon, transpoint.lat)
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(
+ geompoint,
+ {},
+ olSearchSymbol
+ ),
+ new OpenLayers.Feature.Vector(
+ geompoint1,
+ {},
+ olFeaturequerySymbol
+ )
+ ]);
+ map.setCenter(geocodepoint,getZoomlevel());
+}
+
+//auf Geocodierten Punkt in Karte zoomen
+function zoomtosearchpoint(mysadr,myslng,myslat){
+ setMarkerhint(window.lang.convert('Suchergebnis: '), mysadr);
+ var geocodepoint = new OpenLayers.LonLat(myslng,myslat);
+ //Bei Google Geocoding Koordinaten transformieren
+ if(searchMode === "google") {
+ var transpoint = geocodepoint.transform(wgs84Proj,mapProj);
+ }
+ //Bei Strassensuche direkt die Koordinaten verwenden.
+ else if (searchMode === "streetsearch" || searchMode === "mapbendersearch") {
+ var transpoint = geocodepoint;
+
+ }
+ var geompoint = new OpenLayers.Geometry.Point(transpoint.lon, transpoint.lat);
+ var geompoint1 = new OpenLayers.Geometry.Point(transpoint.lon, transpoint.lat);
+ //console.log(transpoint.lon, transpoint.lat)
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(
+ geompoint,
+ {},
+ olSearchSymbol
+ ),
+ new OpenLayers.Feature.Vector(
+ geompoint1,
+ {},
+ olFeaturequerySymbol
+ )
+ ]);
+ map.setCenter(transpoint,getZoomlevel());
+ $.mobile.changePage($("#mappage"),pageTransition);
+}
+
+//auf Extend in Karte zoomen
+function zoomtoextent(mysadr,minx,miny,maxx,maxy){
+ var myextent = new OpenLayers.Bounds(minx, miny, maxx, maxy);
+ if(mysadr !== ""){
+ setMarkerhint(window.lang.convert('Suchergebnis: '), mysadr);
+ }
+ map.zoomToExtent(myextent);
+ $.mobile.changePage($("#mappage"),pageTransition);
+}
+
+//aktuellen Zoomlevel ermitteln (Falls voreingestellter Level kleiner als aktueller wird aktueller verwendet)
+function getZoomlevel(){
+ var actualzoomlevel = Math.round(map.zoom.toFixed(4));
+ if (actualzoomlevel > searchZoom){
+ var myzoomlevel = actualzoomlevel;
+ }
+ else{
+ var myzoomlevel = searchZoom;
+ }
+ return myzoomlevel;
+}
+
+//MaÃstabs-control mit Werten füllen
+function createZoomselect() {
+ $.each(myscales, function(index, value) {
+ //console.log(index + ': ' + value);
+ $('#selectzoom').append($("<option/>", {
+ value: index,
+ text: "1:" + value
+ }));
+ });
+ //Selectmenü initialisieren, sonst Bug bei erstem Refresh
+ $("#selectzoom").selectmenu();
+ displayZoom();
+}
+
+//Aktuellen MaÃstab für Select-Control einstellen
+function displayZoom() {
+ var myindex = Math.round(map.zoom.toFixed(4));
+ //$("#zoomscale").html("1:"+myscales[Math.round(map.zoom.toFixed(4))]);
+ $("#selectzoom").val(''+ myindex +'');
+ //console.log(myindex);
+ //Refresh des Selectmenüs?
+ $("#selectzoom").selectmenu('refresh',true);
+}
+
+//MaÃstab aus Select ändern
+function changeScale(i){
+ map.zoomTo(i);
+ checktranspage();
+ //Adressbar verstecken
+ hideAddressBar();
+}
+
+//Messunktion
+function handleMeasurements(event) {
+ var geometry = event.geometry;
+ var units = event.units;
+ var order = event.order;
+ var measure = event.measure;
+ var element = document.getElementById('measureoutput');
+ var out = "";
+ if (order == 1) {
+ out += window.lang.convert('Entfernung: ') + "<strong>" + measure.toFixed(2) + "</strong> " + units;
+ } else {
+ out += window.lang.convert('Fläche: ') + "<strong>" + measure.toFixed(2) + "</strong> " + units + "<sup>2</" + "sup>";
+ }
+ element.innerHTML = out;
+}
+
+//Messfunktion aktivieren
+function toggleMeasure(c){
+ clickCtrl.deactivate();
+ $("#popupMenu").popup( "close" );
+ measureControls['line'].deactivate();
+ measureControls['polygon'].deactivate();
+ if (c === 'line'){
+ $('#measurehint').css('visibility','visible');
+ measureControls[c].activate();
+ $('#measureoutput').html(window.lang.convert('Entfernungsmessung aktiv!'));
+ }
+ else if (c === 'polygon'){
+ $('#measurehint').css('visibility','visible');
+ measureControls[c].activate();
+ $('#measureoutput').html(window.lang.convert('Flächenmessung aktiv!'));
+ }
+ else {
+ clickCtrl.activate();
+ }
+}
+
+//Mapsize auf vollen Contentbereich skalieren.
+function setmapsize(){
+ window.scrollTo(0,0);
+ var winhigh = $.mobile.getScreenHeight(); //Get available screen height, not including any browser chrome
+ var headhigh = $('[data-role="header"]').first().outerHeight(); //Get height of first page's header
+ var foothigh = $('[data-role="footer"]').first().outerHeight(); //Get height of first page's header
+ var $content=$('[data-role="content"]');
+ var contentpaddingwidth=parseInt($content.css("padding-left").replace("px", ""))+parseInt($('[data-role="content"]').css("padding-right").replace("px", ""));
+ var contentpaddingheight=parseInt($content.css("padding-top").replace("px", ""))+parseInt($('[data-role="content"]').css("padding-bottom").replace("px", ""));
+ winhigh = winhigh - headhigh - foothigh - contentpaddingheight;
+ winwide = $(document).width(); //Get width of document
+ winwide = winwide - contentpaddingwidth;
+ $content.css('width',winwide + 'px').css('height',winhigh + 'px'); //Change div to maximum visible area
+ $("#map").css('width',winwide + 'px').css('height',winhigh + 'px'); //Change div to maximum visible area
+}
+
+
+function checkZindex(){
+ var layers = map.layers;
+ for(var ii=0,len=layers.length; ii<len;ii++) {
+ //console.log("name:"+layers[ii].name+" zindex:"+layers[ii].div.style.zIndex);
+ if(layers[ii].name === "tk_grau"){
+ alert("name:"+layers[ii].name+" zindex:"+layers[ii].div.style.zIndex);
+ }
+ if(layers[ii].name === "Vector Layer"){
+ alert("name:"+layers[ii].name+" zindex:"+layers[ii].div.style.zIndex);
+ }
+ }
+}
+
+
Added: trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.min.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.min.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/_build/ngms_event.min.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,88 @@
+OpenLayers.Control.Click=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{single:!0,pixelTolerance:0,stopSingle:!1},initialize:function(a){this.handlerOptions=OpenLayers.Util.applyDefaults((a||{}).handlerOptions||{},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{click:this.onClick},this.handlerOptions)},onClick:function(a){var b=map.getLonLatFromViewPortPx(a.xy),c=$("#queryselect").val(),d=$("#select-lang").val(),
+e=new OpenLayers.Geometry.Point(b.lon,b.lat),f=new OpenLayers.Geometry.Point(b.lon,b.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(e,{},olSearchSymbol),new OpenLayers.Feature.Vector(f,{},olFeaturequerySymbol)]);"dhm"==c?(setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")),a="query/rasterquery.php?coord="+b.lon+", "+b.lat+"&lang="+d):"pois"==c?a="query/poiquery.php?qx="+b.lon+"&qy="+b.lat+"&qlayer="+poilayer.params.LAYERS+
+"&qextent="+map.getExtent().toBBOX()+"&qsize="+map.size.w+" "+map.size.h+"&lang="+d:(setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")),a="query/proxy.php?wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+c+"&layers="+c+"&QUERY_LAYERS="+c+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html");loadFeature(a)},showQuerylayer:function(){var a=$("#queryselect").val();
+"dhm"==a?setMarkerhint(window.lang.convert("Standardabfrage:"),window.lang.convert("Koordinaten + Hoehe")):setMarkerhint(window.lang.convert("aktuelle Abfrageebene:"),a)},CLASS_NAME:"OpenLayers.Control.Click"});function showQuerylayer(){var a=$("#queryselect").val();"dhm"==a?setMarkerhint(window.lang.convert("Standardabfrage:"),window.lang.convert("Koordinaten + Hoehe")):setMarkerhint(window.lang.convert("aktuelle Abfrageebene:"),a)}
+function loadFeature(a){$.ajax({type:"GET",url:a,success:function(a){a&&(5>a.length&&(a=window.lang.convert("Kein Ergebnis!")),setMarkerhint(window.lang.convert("Abfrageergebnis:"),a))}})}
+OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,geodesic:!1,draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.eTop||(this.eTop=document.createElement("div"),this.eTop.className=this.displayClass+"Top",this.div.appendChild(this.eTop),this.eTop.style.visibility=""==this.topOutUnits||""==this.topInUnits?"hidden":"visible",this.eBottom=document.createElement("div"),
+this.eBottom.className=this.displayClass+"Bottom",this.div.appendChild(this.eBottom),this.eBottom.style.visibility=""==this.bottomOutUnits||""==this.bottomInUnits?"hidden":"visible");this.map.events.register("moveend",this,this.update);this.update();return this.div},getBarLen:function(a){var b=parseInt(Math.log(a)/Math.log(10)),b=Math.pow(10,b),a=parseInt(a/b);return(5<a?5:2<a?2:1)*b},update:function(){var a=this.map.getResolution();if(a){var b=this.map.getUnits(),c=OpenLayers.INCHES_PER_UNIT,d=this.maxWidth*
+a*c[b],e=1;!0===this.geodesic&&(e=(this.map.getGeodesicPixelSize().w||1.0E-6)*this.maxWidth/(d/c.km),d*=e);var f,h;1E5<d?(f=this.topOutUnits,h=this.bottomOutUnits):(f=this.topInUnits,h=this.bottomInUnits);var g=d/c[f],j=d/c[h],d=this.getBarLen(g),j=this.getBarLen(j),g=d/c[b]*c[f],j=j/c[b]*c[h],b=g/a/e,a=j/a/e;"visible"==this.eBottom.style.visibility&&(this.eBottom.style.width=Math.round(a)+"px");"visible"==this.eTop.style.visibility&&(this.eTop.style.width=Math.round(b)+"px",this.eTop.innerHTML=d+
+" "+f)}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});
+OpenLayers.Control.LoadingPanel=OpenLayers.Class(OpenLayers.Control,{counter:0,maximized:!1,visible:!0,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a])},setVisible:function(a){(this.visible=a)?OpenLayers.Element.show(this.div):OpenLayers.Element.hide(this.div)},getVisible:function(){return this.visible},hide:function(){this.setVisible(!1)},show:function(){this.setVisible(!0)},toggle:function(){this.setVisible(!this.getVisible())},addLayer:function(a){a.layer&&(a.layer.events.register("loadstart",
+this,this.increaseCounter),a.layer.events.register("loadend",this,this.decreaseCounter))},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register("preaddlayer",this,this.addLayer);for(var b=0;b<this.map.layers.length;b++){var c=this.map.layers[b];c.events.register("loadstart",this,this.increaseCounter);c.events.register("loadend",this,this.decreaseCounter)}},increaseCounter:function(){this.counter++;0<this.counter&&!this.maximized&&this.visible&&this.maximizeControl()},
+decreaseCounter:function(){0<this.counter&&this.counter--;0==this.counter&&this.maximized&&this.visible&&this.minimizeControl()},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);return this.div},minimizeControl:function(a){this.div.style.display="none";this.maximized=!1;null!=a&&OpenLayers.Event.stop(a)},maximizeControl:function(a){this.div.style.display="block";this.maximized=!0;null!=a&&OpenLayers.Event.stop(a)},destroy:function(){if(this.map&&(this.map.events.unregister("preaddlayer",
+this,this.addLayer),this.map.layers))for(var a=0;a<this.map.layers.length;a++){var b=this.map.layers[a];b.events.unregister("loadstart",this,this.increaseCounter);b.events.unregister("loadend",this,this.decreaseCounter)}OpenLayers.Control.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.LoadingPanel"});
+var map,clickCtrl,measureControls,olSearchSymbol={graphicName:"cross",strokeColor:"#00FFFF",strokeWidth:1,fillOpacity:0,pointRadius:11},olFeaturequerySymbol={graphicName:"circle",strokeColor:"#00FFFF",fillColor:"#00FFFF",strokeWidth:3,fillOpacity:0.2,pointRadius:15,graphicName:"circle"},olGpsSymbol={graphicName:"cross",strokeColor:"#871D33",strokeWidth:2,fillOpacity:0,pointRadius:12},olGpscircleStyle={fillOpacity:0.1,fillColor:"#000",strokeColor:"#871D33",strokeOpacity:0.6},sketchSymbolizers={Point:{pointRadius:6,
+graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:2,strokeOpacity:0.8,strokeColor:"#00FFFF"},Line:{strokeWidth:3,strokeOpacity:1,strokeColor:"#FF0000"},Polygon:{strokeWidth:3,strokeOpacity:1,strokeColor:"#FF0000",fillColor:"white",fillOpacity:0.5}},style=new OpenLayers.Style;style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);var styleMap=new OpenLayers.StyleMap({"default":style});
+function Service(a,b,c,d,e,f,h,g){a=$("<li>",{serviceid:a,"class":"service",title:b,desc:c,getMapURL:d,status:e,logoUrl:f,symbolLink:h,avail:g});d=$('<div class="service_container"></div>');d.append($('<table style="margin: 0px; padding: 0px; float:left;"><tr style="margin: 0px; padding: 0px;"><td style="margin: 0px; padding: 0px; height:43px; width:55px; text-align: center; vertical-align: middle;"><img style="max-height: 43px; max-width: 55px; max-height: 43px;" src="'+f+'" class="service_logo" alt="Logo"/></td></tr></table>'));
+d.append($("<div>",{"class":"icon layer_remove",text:" "}).click(function(){removeService($(this).parent().parent())}));d.append($("<div>",{"class":"icon layer_add",text:" "}).click(function(){addService($(this).parent().parent())}));d.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+b+"</h3><h3>"+b+"</h3><p>"+c+"</p></div>");a.append(d);return a}
+function BaseLayer(a,b){return $("<div>",{text:a,title:a,layerids:b,"class":"baselayer base_unchecked"}).click(function(){switchVisibility($(this))})}
+function ResultLayer(a,b,c,d,e,f,h,g){a=$("<div>",{layerid:a,name:c,"class":"layer",title:b,desc:d,previewUrl:e,queryable:f,getMapURL:h,bbox:g});a.append($("<div>",{"class":"icon query_preview "+(f?"query_info":"query_noinfo"),text:" "}));a.append($("<div>",{"class":"layer_icon icon layer_add",text:" "}).click(function(){switchLayer($(this).parent())}));a.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+
+b+"</h3><h3>"+b+"</h3><p>"+d+"</p></div>");return a}
+function OwnLayer(a,b,c,d,e,f,h,g,j,m,n){c=$("<div>",{layerid:a,name:c,servicetitle:e,servicedesc:f,"class":"layer",title:b,desc:d,previewUrl:h,queryable:g,getMapURL:j,bbox:m,avail:n});c.append($("<div>",{"class":"layer_icon icon layer_remove",text:" "}).click(function(){removeLayer($(this).parent())}));g?c.append($("<div>",{"class":"icon query_queryable query_unchecked",text:" "}).click(function(){query_check($(this))})):c.append($("<div>",{"class":"icon query_queryable query_noinfo",text:" "}));
+c.append($("<div>",{"class":"icon layer_visibility layer_checked",text:" "}).click(function(){switchVisibility($(this).parent())}));c.append($("<div>",{"class":"icon move arrow_up",text:" "}).click(function(){up(a)}));g=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"></div>');g.append("<h3>"+b+"</h3>");var j=$("<table></table>"),k=$("<tr></tr>"),l=$('<td class="layerinfo"></td>');h&&l.append($("<div>",{"class":"icon layer_preview",
+text:" "}).click(function(){zoomToBbox(m);$.mobile.changePage($("#mappage"),pageTransition)}));l.append("</br><p>"+n+"%</p>");h=$("<td></td>");h.append("<p><b>"+e+"</b></p><p>"+f+"</p>");h.append("<p><b>"+b+"</b></p><p>"+d+"</p>");k.append(l);k.append(h);j.append(k);g.append(j);c.append(g);return c}var maxlayers=5,maxresults=40,baseinfo=[];searchUrl="mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&maxResults="+maxresults;
+function addmyLayer(){OpenLayers.Control.Click=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{single:!0,pixelTolerance:0,stopSingle:!1},initialize:function(a){this.handlerOptions=OpenLayers.Util.applyDefaults((a||{}).handlerOptions||{},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{click:this.onClick},this.handlerOptions)},onClick:function(a){var b=map.getLonLatFromViewPortPx(a.xy),c=$("#ownlist").find(".query_checked").parent(),
+d=$("#select-lang").val(),e=new OpenLayers.Geometry.Point(b.lon,b.lat),f=new OpenLayers.Geometry.Point(b.lon,b.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(e,{},olSearchSymbol),new OpenLayers.Feature.Vector(f,{},olFeaturequerySymbol)]);setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten..."));0<c.length?(a=c.attr("getmapurl")+"&wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+c.attr("name")+"&layers="+c.attr("name")+
+"&QUERY_LAYERS="+c.attr("name")+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html",a=$('<iframe src="'+a+'" class="query_iframe"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),setMarkerhint("Abfrageergebnis:",a)):(a="query/rasterquery.php?coord="+b.lon+", "+b.lat+"&lang="+d,loadFeature(a))},CLASS_NAME:"OpenLayers.Control.Click"});$("#mapbenderbut").click(function(){$.mobile.changePage($("#mod_mapbender"),
+pageTransition);refresh()});$("#mapbendersearchformbut").click(function(){searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$("#mapbendersearchfield").live("keypress",function(a){13===a.keyCode&&searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$("div[data-role=collapsible]").live("expand",function(){$("div[data-role=collapsible]").not($(this)).trigger("collapse")});$(".addToMapBut").click(function(){$("div[data-role=collapsible]").not(".ui-collapsible-collapsed").trigger("collapse");
+$.mobile.changePage($("#mappage"),pageTransition)});addBaselayers()}
+function preview(a,b,c){$.ajax({previewurl:a,layerid:b,bbox:c,success:function(){$("#preview").find("div[data-role=content]").empty();$("#preview").find("div[data-role=content]").append('<img src="'+$(this).attr("previewurl")+'" alt="image" style="width:200px;">');var a=$(this).attr("bbox"),b=$(this).attr("layerid");$("#preview_zoom").click(function(){getOpenlayersIndex(b);zoomToBbox(a);$.mobile.changePage($("#mappage"),pageTransition)});$("#preview").popup("open")}})}
+getInfo=function(a){$("#info_content").empty();$("#info_content").append(a);$("#info").popup("open")};function getOpenlayersIndex(a){for(var b=0;b<map.layers.length;b++)if(map.layers[b].name==a)return b;return-1}function addOpenlayer(a,b,c){a=new OpenLayers.Layer.WMS(a,c,{layers:b,format:"image/png",transparent:"TRUE",transitionEffect:"resize"},{projection:mapProj,units:projUnits,opacity:0.8,singleTile:!0,isBaseLayer:!1,visibility:!0,alwaysInRange:!0});map.addLayer(a);map.setLayerIndex(a,0)}
+function removeOpenlayer(a){a=getOpenlayersIndex(a);0<=a&&map.removeLayer(map.layers[a])}function setOpenBaselayer(a){a=getOpenlayersIndex(a);0<=a&&map.setBaseLayer(map.layers[a])}function selectOpenlayer(a,b){var c=getOpenlayersIndex(a);0<=c&&map.layers[c].setVisibility(b)}
+function addOpenBaselayer(a,b){$.getJSON("mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&resourceIds="+b,function(b){$.each(b.wms.srv,function(b,c){$.each(c.layer,function(b,d){d.layer&&(d=d.layer[0]);var g=new OpenLayers.Layer.WMS(a,c.getMapUrl,{layers:d.name,format:"image/png",transparent:"false",transitionEffect:"resize"},{projection:mapProj,units:projUnits,singleTile:!0,isBaseLayer:!0,alwaysInRange:!0});map.addLayers([g])})})})}
+function zoomToBbox(a){var b=a.split(","),a=(new OpenLayers.LonLat(b[0],b[1])).transform(wgs84Proj,mapProj),b=(new OpenLayers.LonLat(b[2],b[3])).transform(wgs84Proj,mapProj);map.zoomToExtent(new OpenLayers.Bounds(a.lon,a.lat,b.lon,b.lat))}function numServices(){return $("#resultlist").find(".service").length}function numResultLayers(a){return a.find(".layer").length}function layerInList(a,b){for(var c=a.find(".layer"),d=0;d<c.length;d++)if($(c[d]).attr("layerid")==b)return d;return-1}
+function up(a){var b=layerInList($("#ownlist"),a);0<b&&($($("#ownlist").find(".layer")[b]).after($($("#ownlist").find(".layer")[b-1])),console.log("todo: layerreihenfolge"),map.raiseLayer(map.layers[getOpenlayersIndex(a)],1),validateArrows(),refresh())}function numOwnlayers(){return $("#ownlist").find(".layer").length}
+function refresh(){$("#resultlist").listview("refresh");$($("#ownlist").parent()).listview("refresh");$("div[data-role=collapsible]").collapsible();$("a[data-role=button]").button()}
+function validateLayers(){layers=$("#resultlist").find(".layer");$.each(layers,function(a,b){0<=layerInList($("#ownlist"),$(b).attr("layerid"))?($(b).find(".layer_icon").first().attr("class","layer_icon icon layer_remove"),$(b).find(".collapsible").first().removeClass("unselected").addClass("selected")):($(b).find(".layer_icon").first().attr("class","layer_icon icon layer_add"),$(b).find(".collapsible").first().removeClass("selected").addClass("unselected"))})}
+function validateArrows(){var a=$("#ownlist").find(".move");$(a[0]).attr("class","icon move arrow_empty");1<a.length&&$(a[1]).attr("class","icon move arrow_up")}function query_check(a){$(a).hasClass("query_unchecked")?($("#ownlist").find(".query_checked").addClass("query_unchecked").removeClass("query_checked"),$(a).addClass("query_checked").removeClass("query_unchecked")):$(a).addClass("query_unchecked").removeClass("query_checked")}
+function addLayer(a){if(numOwnlayers()>=maxlayers)getInfo("Es können nicht mehr als "+maxlayers+" Ebenen zur Auswahl hinzugefügt werden.");else{$.mobile.showPageLoadingMsg();if(0>layerInList($("#ownlist"),$(a).attr("layerid")))return $("#ownlist").append(OwnLayer(a.attr("layerid"),a.attr("title"),a.attr("name"),a.attr("desc"),a.parent().attr("title"),a.parent().attr("desc"),a.attr("previewUrl"),"true"==a.attr("queryable"),a.attr("getMapUrl"),a.attr("bbox"),a.parent().attr("avail"))),validateLayers(),
+validateArrows(),refresh(),addOpenlayer(a.attr("layerid"),a.attr("name"),a.attr("getMapUrl")),$.mobile.hidePageLoadingMsg(),!0;$.mobile.hidePageLoadingMsg()}return!1}function removeLayer(a){layerInList($("#ownlist"),$(a).attr("layerid"));$($("#ownlist").find(".layer")[layerInList($("#ownlist"),$(a).attr("layerid"))]).remove();validateLayers();validateArrows();refresh();removeOpenlayer($(a).attr("layerid"))}
+function switchLayer(a){0>layerInList($("#ownlist"),$(a).attr("layerid"))?addLayer(a):removeLayer(a)}function addService(a){for(var a=a.find(".layer"),b=0;b<a.length&&!(addLayer($(a[b])),numOwnlayers()>maxlayers);b++);}function removeService(a){$.each(a.find(".layer"),function(a,c){removeLayer($(c))})}
+function switchVisibility(a){$(a).hasClass("layer")?($(a).find(".layer_visibility").toggleClass("layer_checked").toggleClass("layer_unchecked"),selectOpenlayer($(a).attr("layerid"),$(a).find(".layer_visibility").hasClass("layer_checked"))):($("#baselayers").find(".base_checked").addClass("base_unchecked").removeClass("base_checked"),$(a).addClass("base_checked").removeClass("base_unchecked"),setOpenBaselayer($(a).attr("layerids")))}
+function base_check(a){$("#baselayers").find(".base_checked").addClass("base_unchecked").removeClass("base_checked");$(a).addClass("base_checked").removeClass("base_unchecked")}
+function searchMaps(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON(a,function(a){a=parseMapBenderJson(a);appendData(a.services,a.layers,a.nresults);$.mobile.hidePageLoadingMsg();a.nresults>maxresults&&getInfo("Es gab "+a.nresults+" Treffer, es k\u00f6nnen aber nur "+maxresults+" Ergebnisse angezeigt werden.</br><b>Schr\u00e4nken Sie Ihre Suche weiter ein.</b>")})}
+function searchWmc(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON(a,function(a){appendWmc(a);$.mobile.hidePageLoadingMsg()})}function parseMapBenderJson(a){var b=[],c=[];$.each(a.wms.srv,function(a,e){for(var f=!1,h=0;h<b.length;h++)if(b[h].id==e.id){f=!0;break}!e.logged&&!e.nwaccess&&(f||b.push(e),$.each(e.layer,function(a,b){b.layer?$.each(b.layer,function(a,b){c.push([e.id,b])}):c.push([e.id,b])}))});return{services:b,layers:c,nresults:a.wms.md.nresults}}
+function appendData(a,b,c){$("#resultlist").empty();for(var d=0;d<a.length;d++){var e=a[d];service=Service(e.id,e.title,$(e).attr("abstract"),e.getMapUrl,e.status,""==e.logoUrl?"mod_mapbender/img/defaulicon.png":e.logoUrl,e.symbolLink,e.avail);for(var f=0;f<b.length;f++){var h=b[f],g=h[1];h[0]==e.id&&service.append(ResultLayer(g.id,g.title,g.name,$(g).attr("abstract"),g.previewURL,"1"==g.queryable,e.getMapUrl,g.bbox))}$("#resultlist").append(service)}$("#resultlist").prepend('<li data-theme="b">Suchergebnis: '+
+numServices()+" Dienste, "+numResultLayers($("#resultlist"))+" Layer ("+c+" Treffer) </li>");validateLayers();refresh()}
+function appendWmcData(a,b,c){$("#ownlist").empty();for(var d=[],e=0;e<a.length;e++)for(var f=a[e],h=0;h<b.length;h++){var g=b[h],j=g[1];g[0]==f.id&&d.push(OwnLayer(j.id,j.title,j.name,$(j).attr("abstract"),f.title,$(f).attr("abstract"),j.previewURL,"1"==j.queryable,f.getMapUrl,j.bbox,f.avail))}for(e=0;e<c.length;e++)for(h=0;h<d.length;h++)if(c[e].layerId==d[h].attr("layerid")){g=d[h];$("#ownlist").append(g);addOpenlayer(g.attr("layerid"),g.attr("name"),g.attr("getMapUrl"));c[e].active||switchVisibility(g);
+break}validateLayers();validateArrows()}function clearOwnlist(){for(var a=$("#ownlist").find(".layer"),b=0;b<a.length;b++)removeLayer(a[b])}
+function appendWmc(a){for(var b=0;b<a.backGroundLayer.length;b++){var c=a.backGroundLayer[b];if(c.active)for(var d=$("#baselayers").find(".baselayer"),e=0;e<d.length;e++)if($(d[e]).attr("layerids")==c.name){switchVisibility(d[e]);break}}clearOwnlist();var f="";$.each(a.layerList,function(a,b){f=f+","+b.layerId});f=f.substr(1,f.length);$.getJSON(searchUrl+"&resourceIds="+f,function(b){b=parseMapBenderJson(b);appendWmcData(b.services,b.layers,a.layerList);$.mobile.hidePageLoadingMsg()})}
+function addBaselayers(){$("#baselayers").empty();vector_marker=new OpenLayers.Layer.Vector("Vector Layer",{});$("#baselayers").append(BaseLayer("RLP Zusammenstellung",atkis_praes_tms.name));$("#baselayers").append(BaseLayer("Luftbilder",luftbilder.name));$("#baselayers").append(BaseLayer("Keine Hintergrundkarte",grenze_leer.name));map.addLayers([atkis_praes_tms,luftbilder,grenze_leer,vector_marker]);for(i in baseinfo){var a=baseinfo[i][0],b=baseinfo[i][1];$("#baselayers").append(BaseLayer(a,b));
+addOpenBaselayer(a,b)}base_check($("#baselayers").find(".baselayer").first())}
+var initmap=function(){var a={theme:null,projection:mapProj,units:projUnits,maxExtent:mymapbounds,maxScale:mymaxscale,minScale:myminscale,numZoomLevels:myzoomlevels,scales:myscales,controls:[new OpenLayers.Control.Attribution,new OpenLayers.Control.Navigation({zoomWheelEnabled:!0}),new OpenLayers.Control.KeyboardDefaults,new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:10,enableKinetic:!0}}),new OpenLayers.Control.ScaleLine({div:document.getElementById("scaleline"),geodesic:!1,maxWidth:100,
+topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null}),new OpenLayers.Control.LoadingPanel({})]};map=new OpenLayers.Map("map",a);addmyLayer();"off"!==myzoombounds?map.zoomToExtent(myzoombounds):map.zoomToExtent(map.maxExtent);a=new OpenLayers.Control.Geolocate({id:"locate-control",geolocationOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:7E3}});map.addControl(a);a.events.register("locationupdated",this,function(a){vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(a.point,
+{},olGpsSymbol),new OpenLayers.Feature.Vector(OpenLayers.Geometry.Polygon.createRegularPolygon(new OpenLayers.Geometry.Point(a.point.x,a.point.y),a.position.coords.accuracy/2,50,0),{},olGpscircleStyle)]);a.point.x>map.maxExtent.left&&a.point.x<map.maxExtent.right&&a.point.y>map.maxExtent.bottom&&a.point.y<map.maxExtent.top?(setMarkerhint(window.lang.convert("Positionsgenauigkeit:"),"~ "+a.position.coords.accuracy+" Meter"),map.zoomToExtent(vector_marker.getDataExtent())):(alert(window.lang.convert("Die ermittelte Position liegt au\u00dferhalb des darstellbaren Kartenausschnitts!")),
+$("#markerhint").css("visibility","hidden"))});a=new OpenLayers.Style;a.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);a=new OpenLayers.StyleMap({"default":a});measureControls={line:new OpenLayers.Control.Measure(OpenLayers.Handler.Path,{persist:!0,handlerOptions:{layerOptions:{styleMap:a}}}),polygon:new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{persist:!0,handlerOptions:{layerOptions:{styleMap:a}}})};for(var b in measureControls)a=measureControls[b],a.events.on({measure:handleMeasurements,
+measurepartial:handleMeasurements}),map.addControl(a)};
+$(document).ready(function(){window.location.hash&&"#mappage"!=window.location.hash&&$.mobile.changePage($("#mappage"),pageTransition);initmap();zoomSelect&&($("#zoomscale").css("visibility","visible"),createZoomselect(),map.events.register("moveend",null,displayZoom));clickCtrl=new OpenLayers.Control.Click;map.addControl(clickCtrl);clickCtrl.activate();checkLayers();$("#autolayerchange").change(function(){directLayerChange=this.value});$("#layerbut").click(function(){$.mobile.changePage($("#layerpage"),pageTransition)});
+$("#searchbut").click(function(){$.mobile.changePage($("#searchpage"),pageTransition)});$("#helpbut").click(function(){$.mobile.changePage($("#helppage"),pageTransition)});$("#gearbut").click(function(){$.mobile.changePage($("#gearpage"),pageTransition)});$("#measurelinebut").click(function(){toggleMeasure("line")});$("#measurepolybut").click(function(){toggleMeasure("polygon")});$("#ovbut").click(function(){map.zoomToExtent(map.maxExtent)});$("#zoominbut").click(function(){map.zoomIn()});$("#zoomoutbut").click(function(){map.zoomOut()});
+$("#popupMenu").popup();$("#menubut").click(function(){$("#popupMenu").popup("open")});$("#xheader").click(function(){$("#markerhint").css("visibility","hidden");vector_marker.removeAllFeatures()});$("#mheader").click(function(){$("#measurehint").css("visibility","hidden");toggleMeasure("off")});$("#searchformbut").click(function(){searchCall()});$("#searchfield").live("keypress",function(a){13===a.keyCode&&searchCall()});$(".mapbackbut").click(function(){$.mobile.changePage($("#mappage"),pageTransition);
+$("body").css("overflow","hidden")});$("#locatebut").click(function(){setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten..."));var a=map.getControlsBy("id","locate-control")[0];a.active?a.getCurrentLocation():a.activate()});$(".baselayer_check").click(function(){$(".baselayer_check").css("background-image","url(img/ico_basecheck.png)");$(this).css("background-image","url(img/ico_basecheck_active.png)");for(var a=0;a<map.layers.length;a++)$(this).attr("id")===map.layers[a].name&&
+map.setBaseLayer(map.layers[a]);clearanimation();checktranspage()});$(".layer_check").click(function(){for(var a=0;a<map.layers.length;a++)if($(this).attr("id")===map.layers[a].name)var b=a;map.layers[b].getVisibility()?(map.layers[b].setVisibility(!1),$(this).css("background-image","url(img/ico_check.png)")):(map.layers[b].setVisibility(!0),$(this).css("background-image","url(img/ico_check_active.png)"));clearanimation();checktranspage()});$(".poi_check").click(function(){var a=poilayer.params.LAYERS,
+b=[];""!=a&&(b=a.split(","));if(-1!=jQuery.inArray($(this).attr("id"),b)){for(a=0;a<b.length;a++)$(this).attr("id")===b[a]&&b.splice(a,1);$(this).css("background-image","url(img/ico_check.png)")}else b.push($(this).attr("id")),$(this).css("background-image","url(img/ico_check_active.png)");a=b.join(",");poilayer.mergeNewParams({layers:a});0<b.length&&poilayer.setVisibility(!0);poilayer.redraw();clearanimation();checktranspage()});$(".query_check").click(function(){$(".query_check").css("background-image",
+"url(img/ico_checkop.png)");$(this).css("background-image","url(img/ico_checkop_active.png)");var a=$(this).attr("id"),a=a.substring(0,a.length-6);$("#queryselect").val(a);clearanimation()});$(".query_check").touchstart(function(){$(this).css("background-color","#808080")});$(".layer_check").touchstart(function(){$(this).css("background-color","#808080");$(this).css("color","#FFFFFF")});$(".baselayer_check").touchstart(function(){$(this).css("background-color","#808080");$(this).css("color","#FFFFFF")});
+$(".navbuttons").touchstart(function(){$(this).css("border","2px solid #808080")});$(".navbuttons").touchend(function(){$(this).css("border","2px solid "+toolColor)});$(".searchbutton").live("touchstart",function(){$(this).css("border","2px solid #808080")});changeHand(defaultHand);$("#autolayerchange").val(directLayerChange);hideAddressBar()});
+var clearanimation=function(){$(".query_check").css("background-color","#808080");$(".layer_check, .baselayer_check, .poi_check").css("background-color","#FFFFFF");$(".layer_check, .baselayer_check, .poi_check").css("color","#000000")},checktranspage=function(){"on"===directLayerChange&&$.mobile.changePage($("#mappage"),pageTransition)},checkLayers=function(){$(".baselayer_check").each(function(){for(var a=0;a<map.layers.length;a++)map.layers[a].name===$(this).attr("id")&&map.layers[a].visibility&&
+$(this).css("background-image","url(img/ico_basecheck_active.png)")});$(".layer_check").each(function(){for(var a=0;a<map.layers.length;a++)map.layers[a].name===$(this).attr("id")&&map.layers[a].visibility&&$(this).css("background-image","url(img/ico_check_active.png)")});$(".poi_check").each(function(){var a=poilayer.params.LAYERS,b=[];""!=a&&(b=a.split(","));-1!=jQuery.inArray($(this).attr("id"),b)&&$(this).css("background-image","url(img/ico_check.png)")});$(".query_check").each(function(){var a=
+$(this).attr("id");a.substring(0,a.length-6)===$("#queryselect").val()&&$(this).css("background-image","url(img/ico_checkop_active.png)")})};function searchCall(){"google"===searchMode?codeAddress():"streetsearch"===searchMode?searchStreet($("#searchfield").val()):"mapbendersearch"===searchMode?searchMapbender($("#searchfield").val()):alert("kein Suchmodus konfiguriert!")}function setMarkerhint(a,b){$("#xheader").html(a);$("#xcontent").html(b);$("#markerhint").css("visibility","visible")}
+function hideAddressBar(){window.location.hash||(document.height<=window.outerHeight+10?(document.body.style.height=window.outerHeight+50+"px",setTimeout(function(){window.scrollTo(0,1)},50)):setTimeout(function(){window.scrollTo(0,1)},0))}
+function changeHand(a){"l"===a?(defaultHand="l",$("#scaleline, #copyright, #zoomscale").css("left","auto").css("right","4px"),$("#navbutgroup").css("right","auto").css("left","4px")):(defaultHand="r",$("#scaleline, #copyright, #zoomscale").css("right","auto").css("left","4px"),$("#navbutgroup").css("left","auto").css("right","4px"))}
+function changeLanguage(a,b){window.lang.change(a);$.mobile.showPageLoadingMsg();$.ajax({url:"help/help_"+a+".html",cache:!0}).done(function(a){$("#helpdiv").html(a);$.mobile.hidePageLoadingMsg()});b&&$("#select-hand").selectmenu("refresh",!0);$("#select-lang").val(a)}
+function codeAddress(){adressgeocoder=new google.maps.Geocoder;var a=document.getElementById("searchfield").value;adressgeocoder.geocode({address:a},function(b,c){if(c===google.maps.GeocoderStatus.OK){var d="no";for(i=0;i<b[0].address_components.length;i++)b[0].address_components[i].long_name===googleGeocodeAdmin&&(d="ok");if("ok"!=d)alert("Adresse liegt nicht in "+googleGeocodeAdmin+"!");else{var d=b[0].formatted_address,e=b[0].geometry.location.lat(),f=b[0].geometry.location.lng(),h=new google.maps.LatLng(e,
+f),g={zoom:11,center:h,mapTypeId:google.maps.MapTypeId.ROADMAP},g=new google.maps.Map(document.getElementById("mygooglemap"),g);new google.maps.Marker({map:g,position:h});d=window.lang.convert("Suchergebnis: ")+d+' <br><div class="searchbutton" onClick="zoomtosearchpoint(\''+d+"',"+f+","+e+')" >'+window.lang.convert("Zoom auf Ergebnis in Karte")+"</div>";$("#mygooglelink").html(d)}}else alert("Geocode nicht erfolgreich, Fehler: "+a+" "+c)})}
+function searchStreet(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON("mod_streetsearch/street_full.php?lang=de&searchfield="+a,function(a){if("++"===a.totalResultsCount){var c='<li data-role="list-divider">'+window.lang.convert("Zu viele Datens\u00e4tze! Bitte schr\u00e4nken Sie Ihre Suche ein!")+"</li>";$("#search_results").append(c);$("#search_results").listview("refresh")}else c='<li data-role="list-divider"> '+a.totalResultsCount+" "+window.lang.convert("Suchergebnisse")+
+"</li>",$("#search_results").append(c),$.each(a.geonames,function(a,b){c="";c+='<li><a href="javascript:void(0);" onClick="searchHsn(\''+b.strid+"');\" ><h2>"+b.title1+"</h2>";c+="<p>"+b.title2+"</p></a></li>";$("#search_results").append(c)}),$("#search_results").listview("refresh"),a={words:$('input[name="searchfield"]').val()},highlight("search_results",a);$.mobile.hidePageLoadingMsg()})}
+function searchHsn(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON("mod_streetsearch/street_hsn.php?lang=de&strid="+a,function(a){var c='<li data-role="list-divider" ><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+a.street+"',"+a.streetx+","+a.streety+');" ><h2>'+a.street+"</h2>",c=c+("<p>"+a.totalResultsCount+" "+window.lang.convert("Hausnummern")+"</p></a></li>");$("#search_results").append(c);$.each(a.geonames,function(d,e){c="";c+='<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+
+a.street+" "+e.title1+"',"+e.x+","+e.y+');" ><h2>Nr. '+e.title1+"</h2>";c+="<p>"+e.title2+"</p></a></li>";$("#search_results").append(c)});$("#search_results").listview("refresh");$.mobile.hidePageLoadingMsg()})}
+function searchMapbender(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON(mapbendersearchurl+searchEPSG+("&searchText="+a),function(a){if(500<a.totalResultsCount){var c='<li data-role="list-divider" >'+window.lang.convert("Zu viele Datens\u00e4tze! Bitte schr\u00e4nken Sie Ihre Suche ein!")+"</li>";$("#search_results").append(c);$("#search_results").listview("refresh")}else c='<li data-role="list-divider" > '+a.totalResultsCount+" "+window.lang.convert("Suchergebnisse")+"</li>",
+$("#search_results").append(c),$.each(a.geonames,function(a,b){var f=(parseInt(b.minx)+parseInt(b.maxx))/2,h=(parseInt(b.miny)+parseInt(b.maxy))/2;c="";c="gemeinde_neu"===b.category||"Gemeinde"===b.category||"verbandsgemeinde"===b.category||"kreis"===b.category||"Kreis"===b.category?c+('<li><a href="javascript:void(0);" onClick="zoomtoextent(\''+b.title+"',"+b.minx+","+b.miny+","+b.maxx+","+b.maxy+');" ><h2>'+b.title+"</h2>"):c+('<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+b.title+
+"',"+f+","+h+');" ><h2>'+b.title+"</h2>");c+="<p>"+b.category+"</p></a></li>";$("#search_results").append(c)}),$("#search_results").listview("refresh"),a={words:$('input[name="searchfield"]').val()},highlight("search_results",a);$.mobile.hidePageLoadingMsg()})}
+function highlight(a,b){var c={words:"",caseSensitive:!1,wordsOnly:!0,template:'$1<span class="highlight">$2</span>$3'},d;$.extend(!0,c,b||{});0!=c.words.length&&(d=RegExp("(>[^<.]*)("+c.words+")([^<.]*)",c.caseSensitive?"":"ig"),$("#"+a).each(function(){var a=$(this).html();a&&$(this).html(a.replace(d,c.template))}))}
+function zoompoint(a,b){var c=new OpenLayers.LonLat(a,b),d=new OpenLayers.Geometry.Point(a,b),e=new OpenLayers.Geometry.Point(a,b);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(d,{},olSearchSymbol),new OpenLayers.Feature.Vector(e,{},olFeaturequerySymbol)]);map.setCenter(c,getZoomlevel())}
+function zoomtosearchpoint(a,b,c){setMarkerhint(window.lang.convert("Suchergebnis: "),a);a=new OpenLayers.LonLat(b,c);if("google"===searchMode)var d=a.transform(wgs84Proj,mapProj);else if("streetsearch"===searchMode||"mapbendersearch"===searchMode)d=a;a=new OpenLayers.Geometry.Point(d.lon,d.lat);b=new OpenLayers.Geometry.Point(d.lon,d.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(a,{},olSearchSymbol),new OpenLayers.Feature.Vector(b,{},olFeaturequerySymbol)]);
+map.setCenter(d,getZoomlevel());$.mobile.changePage($("#mappage"),pageTransition)}function zoomtoextent(a,b,c,d,e){b=new OpenLayers.Bounds(b,c,d,e);""!==a&&setMarkerhint(window.lang.convert("Suchergebnis: "),a);map.zoomToExtent(b);$.mobile.changePage($("#mappage"),pageTransition)}function getZoomlevel(){var a=Math.round(map.zoom.toFixed(4));return a>searchZoom?a:searchZoom}
+function createZoomselect(){$.each(myscales,function(a,b){$("#selectzoom").append($("<option/>",{value:a,text:"1:"+b}))});$("#selectzoom").selectmenu();displayZoom()}function displayZoom(){var a=Math.round(map.zoom.toFixed(4));$("#selectzoom").val(""+a+"");$("#selectzoom").selectmenu("refresh",!0)}function changeScale(a){map.zoomTo(a);checktranspage();hideAddressBar()}
+function handleMeasurements(a){var b=a.units,c=a.order,a=a.measure,d=document.getElementById("measureoutput"),e="",e=1==c?e+(window.lang.convert("Entfernung: ")+"<strong>"+a.toFixed(2)+"</strong> "+b):e+(window.lang.convert("Fl\u00e4che: ")+"<strong>"+a.toFixed(2)+"</strong> "+b+"<sup>2</sup>");d.innerHTML=e}
+function toggleMeasure(a){clickCtrl.deactivate();$("#popupMenu").popup("close");measureControls.line.deactivate();measureControls.polygon.deactivate();"line"===a?($("#measurehint").css("visibility","visible"),measureControls[a].activate(),$("#measureoutput").html(window.lang.convert("Entfernungsmessung aktiv!"))):"polygon"===a?($("#measurehint").css("visibility","visible"),measureControls[a].activate(),$("#measureoutput").html(window.lang.convert("Fl\u00e4chenmessung aktiv!"))):clickCtrl.activate()}
+function setmapsize(){window.scrollTo(0,0);var a=$.mobile.getScreenHeight(),b=$('[data-role="header"]').first().outerHeight(),c=$('[data-role="footer"]').first().outerHeight(),d=$('[data-role="content"]'),e=parseInt(d.css("padding-left").replace("px",""))+parseInt($('[data-role="content"]').css("padding-right").replace("px","")),f=parseInt(d.css("padding-top").replace("px",""))+parseInt($('[data-role="content"]').css("padding-bottom").replace("px","")),a=a-b-c-f;winwide=$(document).width();winwide-=
+e;d.css("width",winwide+"px").css("height",a+"px");$("#map").css("width",winwide+"px").css("height",a+"px")}function checkZindex(){for(var a=map.layers,b=0,c=a.length;b<c;b++)"tk_grau"===a[b].name&&alert("name:"+a[b].name+" zindex:"+a[b].div.style.zIndex),"Vector Layer"===a[b].name&&alert("name:"+a[b].name+" zindex:"+a[b].div.style.zIndex)};
Added: trunk/mapbender/http/extensions/mobilemap/backgroundlayer.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/backgroundlayer.php (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/backgroundlayer.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,11 @@
+<?php
+//Basic configuration of jquery mobile client
+require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
+$js = "";
+$js .= $constants;
+for ($i = 0; $i < count($layer); $i++) {
+ $js .= $layer[$i];
+}
+//headers - javascript
+echo $js;
+?>
Added: trunk/mapbender/http/extensions/mobilemap/backgroundlayer.php~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/backgroundlayer.php~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/backgroundlayer.php~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,12 @@
+<?php
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
+$js = "";
+$js .= $constants;
+for ($i = 0; $i < count($layer); $i++) {
+ $js .= $layer[$i];
+}
+//header - javascript
+
+echo $js;
+?>
Added: trunk/mapbender/http/extensions/mobilemap/css/img/fortschritt.gif
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/img/fortschritt.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/img/locate.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/img/locate.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/img/mapbg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/img/mapbg.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/img/openlayers.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/img/openlayers.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/img/powered_by_google.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/img/powered_by_google.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/img/x.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/img/x.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ngstyle.css
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/css/ngstyle.css (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/css/ngstyle.css 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,412 @@
+html ,
+body {
+ margin: 0;
+ padding: 0;
+ height: 100%;
+ overflow-x:hidden;
+}
+
+.hilite {
+ font-weight: bold;
+ color: #870622;
+}
+
+a {
+ font-weight: bold;
+ color: #871D33;
+ text-decoration: none;
+}
+
+
+.ui-content {
+ padding: 0;
+}
+
+.portrait, .portrait #mappage {
+ min-height: 0;
+}
+
+#mappage, #mappage .ui-content, #map {
+ width: 100%;
+ height:100%;
+ background-image: url(img/mapbg.gif);
+ background-repeat: repeat;
+}
+
+#map{
+ z-index: 0;
+}
+
+#title, #tags, #shortdesc {
+ display: none;
+}
+
+.ui-icon-locate {
+ background-image: url(img/locate.png);
+}
+
+ /* Buttons */
+.navbuttons {
+ width:40px;
+ height:40px;
+ z-index:1002;
+ cursor:pointer;
+ border: 2px solid #871D33;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: 2px 2px 1px #999;
+ -webkit-box-shadow: 2px 2px 1px #999;
+ box-shadow: 2px 2px 1px #999;
+}
+
+#helpbut{ background-image:url(../img/but_sprite.png); background-position: 0 0; width: 40px; height: 40px; }
+#infobut{ background-image:url(../img/but_sprite.png); background-position: 0 -90px; width: 40px; height: 40px; }
+#layerbut{ background-image:url(../img/but_sprite.png); background-position: 0 -180px; width: 40px; height: 40px; }
+#locatebut{ background-image:url(../img/but_sprite.png); background-position: 0 -270px; width: 40px; height: 40px; }
+#ovbut{ background-image:url(../img/but_sprite.png); background-position: 0 -360px; width: 40px; height: 40px; }
+#searchbut { background-image:url(../img/but_sprite.png); background-position: 0 -450px; width: 40px; height: 40px; }
+#zoominbut{ background-image:url(../img/but_sprite.png); background-position: 0 -540px; width: 40px; height: 40px; }
+#zoomoutbut{ background-image:url(../img/but_sprite.png); background-position: 0 -630px; width: 40px; height: 40px; }
+
+#menubut {
+ background-image:url(../img/but_menu.png);
+}
+
+#gearbut {
+ background-image:url(../img/but_gear.png);
+}
+
+#measurelinebut {
+ background-image:url(../img/but_measure_line.png);
+}
+
+#measurepolybut {
+ background-image:url(../img/but_measure_poly.png);
+}
+
+#ovbut1 {
+ background-image:url(../img/but_ov.png);
+}
+
+#zoominbut1 {
+ background-image:url(../img/but_zoomin.png);
+}
+
+#zoomoutbut1 {
+ background-image:url(../img/but_zoomout.png);
+}
+
+#searchbut1 {
+ background-image:url(../img/but_search.png);
+}
+
+#layerbut1 {
+ background-image:url(../img/but_layer.png);
+}
+
+#locatebut1 {
+ background-image:url(../img/but_locate.png);
+}
+
+#infobut1 {
+ background-image:url(../img/but_info.png);
+}
+
+#helpbut1 {
+ background-image:url(../img/but_help.png);
+}
+
+#navbutgrouptop {
+ position:fixed;
+ top:2px;
+ right:2px;
+ z-index:1009;
+}
+
+#logo{
+ position:fixed;
+ left:0px;
+ top: 0px;
+ width:100%;
+ padding:4px;
+ padding-top:7px;
+ padding-left:5px;
+ padding-bottom:3px;
+ background: rgb(252,252,252); /* Old browsers */
+ background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(152,153,154,1) 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(152,153,154,1))); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(152,153,154,1) 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(152,153,154,1) 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(152,153,154,1) 100%); /* IE10+ */
+ background: linear-gradient(top, rgba(252,252,252,1) 0%,rgba(152,153,154,1) 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#98999a',GradientType=0 ); /* IE6-9 */
+ z-index:1008;
+}
+
+#navbutgroup {
+ position:fixed;
+ right:4px;
+ bottom: 5px;
+ z-index:1002;
+}
+
+#copyright {
+ position:fixed;
+ font-size:9px;
+ left:4px;
+ bottom: 5px;
+ z-index:1002;
+ padding:1px;
+ color: #871D33;
+ background-color: rgb(255,255,255);
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
+ opacity:0.8;Â
+}
+
+#queryId, #dhmqueryId {
+ font-size:12px;
+}
+
+ /* Scaleline */
+#scaleline {
+ position:fixed;
+ left:4px;
+ bottom: 20px;
+ z-index:1002;
+ font-size: 10px;
+ padding:4px;
+ background-color: rgb(255,255,255);
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
+ opacity:0.8;Â
+}
+
+#zoomscale {
+ position:fixed;
+ left: 4px;
+ bottom: 44px;
+ z-index:1002;
+ visibility:hidden;
+}
+
+.olControlScaleLine {
+ display: block;
+ position: absolute;
+ left: 10px;
+ bottom: 15px;
+ font-size: small;
+}
+
+.olControlScaleLineTop {
+ border: solid 2px black;
+ border-top: none;
+ text-align: center;
+}
+
+.olControlLoadingPanel {
+ background-image:url(../img/fortschritt.gif);
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ margin-top: -20px;
+ margin-left: -45px;
+ width: 91px;
+ height: 40px;
+ background-position:center;
+ background-repeat:no-repeat;
+ display: none;
+ z-index:1002;
+ border: 2px solid #871D33;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+}
+
+
+#xheader, #mheader{
+ border: 2px solid #871D33;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+ background-color: #871D33;
+ color: #FFF;
+ background-image: url(../img/ico_x.png);
+ background-repeat: no-repeat;
+ background-position: 2px center;
+ background-position: right;
+ padding-left:2px;
+ padding-top: 6px;
+ padding-right:32px;
+ padding-bottom: 6px;
+ font-size: 14px;
+}
+
+#markerhint, #measurehint {
+ position:absolute;
+ top:50px;
+ left:0px;
+ visibility:hidden;
+ padding:1px;
+ z-index:1200;
+ border: 2px solid #871D33;
+ background-color: #FFFFFF;
+ fo background nt-size: 0.8em;
+ -moz-border-radius: 4px;
+ -webkit-border-radius:4px;
+ border-radius:4px;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=90);
+ opacity:0.9;
+ -moz-box-shadow: 4px 4px 2px #333;
+ -webkit-box-shadow: 4px 4px 2px #333;
+ box-shadow: 4px 4px 4px #333;
+ max-width:310px;
+ overflow:auto;
+}
+
+ /* Layersteuerung */
+.checkrow {
+ white-space:nowrap;
+ display: inline-block;
+}
+
+.query_check {
+ display: inline-block;
+ float:left;
+ margin-bottom:1px;
+ padding-left: 40px;
+ padding-right: 6px;
+ padding-top:8px;
+ padding-bottom:8px;
+ background-image: url(../img/ico_checkop.png);
+ background-repeat: no-repeat;
+ background-position: 5px center;
+ -moz-border-radius: 4px;
+ -webkit-border-radius:4px;
+ border-radius: 4px;
+ background-color: #808080;
+ color: #FFF;
+ font-family: "MS Serif", "New York", serif;
+ font-weight: bold;
+ font-style: normal;
+}
+.layer_check, .baselayer_check, .layer_nocheck, .poi_check {
+ width:200px;
+ float:left;
+ margin-bottom:1px;
+ padding-right: 6px;
+ padding-top:8px;
+ padding-bottom:8px;
+ background-repeat: no-repeat;
+ background-position: 5px center;
+ -moz-border-radius: 4px;
+ -webkit-border-radius:4px;
+ border-radius: 4px;
+ background-color: #FFF;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ font-weight: bold;
+ -webkit-tap-highlight-color: rgba(100,200,50,0);
+ -webkit-focus-ring-color: rgba(200, 200,20, 0);
+
+}
+
+.layer_check, .poi_check {
+ background-image: url(../img/ico_check.png);
+ padding-left: 40px;
+}
+
+.poi_check img {
+ vertical-align:bottom;
+}
+
+.baselayer_check {
+ background-image: url(../img/ico_basecheck.png);
+ padding-left: 40px;
+}
+
+.layer_nocheck {
+ background-image: url(../img/dot.gif);
+ padding-left: 6px;
+ font-weight: normal;
+}
+
+.clearfix {
+ visibility: hidden;
+ clear: both;
+}
+
+.infobox {
+ background-color:#FFFFFF;
+ font-size: 12px;
+ padding:2px;
+ border: 1px solid #CCC;
+ margin-top: 2px;
+ margin-bottom: 2px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+}
+
+.searchbutton {
+ z-index:1002;
+ cursor:pointer;
+ border: 2px solid #871D33;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ margin:4px;
+ background-image: url(../img/ico_zoomin.png);
+ background-repeat: no-repeat;
+ background-position: 5px center;
+ padding-top: 10px;
+ padding-right: 8px;
+ padding-bottom: 10px;
+ padding-left: 28px;
+ background-color:#FFFFFF;
+}
+
+#mygooglemap{
+ height:220px;
+ width:295px;
+ margin:4px;
+}
+
+.highlight {
+ background: none repeat scroll 0 0 #FFFF00;
+}
+
+.apptools{
+ background-color:#E8E8E8;
+ border: 1px solid #666;
+ padding:5px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+}
+
+.olLayerGrid .olTileImage {
+ -webkit-transition: opacity 0.2s linear;
+ -moz-transition: opacity 0.2s linear;
+ -o-transition: opacity 0.2s linear;
+ transition: opacity 0.2s linear;
+}
+/* Enable 3d acceleration when operating on tiles, this is
+ known to yield better performance on IOS Safari.
+ http://osgeo-org.1803224.n2.nabble.com/Harware-accelerated-CSS3-animations-for-iOS-td6255560.html
+
+ It also prevents tile blinking effects in iOS 5.
+ See https://github.com/openlayers/openlayers/issues/511
+*/
+ at media (-webkit-transform-3d) {
+img.olTileImage {
+ -webkit-transform: translate3d(0, 0, 0);
+}
+}
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/blank.gif
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/blank.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/cloud-popup-relative.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/cloud-popup-relative.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/drag-rectangle-off.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/drag-rectangle-off.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/drag-rectangle-on.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/drag-rectangle-on.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/east-mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/east-mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/layer-switcher-maximize.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/layer-switcher-maximize.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/layer-switcher-minimize.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/layer-switcher-minimize.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/mapbg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/mapbg.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-blue.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-blue.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-gold.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-gold.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-green.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker-green.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/marker.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/measuring-stick-off.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/measuring-stick-off.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/measuring-stick-on.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/measuring-stick-on.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/north-mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/north-mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/panning-hand-off.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/panning-hand-off.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/panning-hand-on.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/panning-hand-on.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/slider.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/slider.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/south-mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/south-mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/west-mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/west-mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-minus-mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-minus-mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-plus-mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-plus-mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-world-mini.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoom-world-mini.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoombar.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/css/ol_img/zoombar.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/css/ol_style.css
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/css/ol_style.css (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/css/ol_style.css 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,484 @@
+div.olMap {
+ z-index: 0;
+ padding: 0 !important;
+ margin: 0 !important;
+ cursor: default;
+}
+
+div.olMapViewport {
+ text-align: left;
+}
+
+div.olLayerDiv {
+ -moz-user-select: none;
+ -khtml-user-select: none;
+}
+
+.olLayerGoogleCopyright {
+ left: 2px;
+ bottom: 2px;
+}
+.olLayerGoogleV3.olLayerGoogleCopyright {
+ right: auto !important;
+}
+.olLayerGooglePoweredBy {
+ left: 2px;
+ bottom: 15px;
+}
+.olLayerGoogleV3.olLayerGooglePoweredBy {
+ bottom: 15px !important;
+}
+.olControlAttribution {
+ font-size: smaller;
+ right: 3px;
+ bottom: 4.5em;
+ position: absolute;
+ display: block;
+}
+.olControlScale {
+ right: 3px;
+ bottom: 3em;
+ display: block;
+ position: absolute;
+ font-size: smaller;
+}
+.olControlScaleLine {
+ display: block;
+ position: absolute;
+ left: 10px;
+ bottom: 15px;
+ font-size: xx-small;
+}
+.olControlScaleLineBottom {
+ border: solid 2px black;
+ border-bottom: none;
+ margin-top:-2px;
+ text-align: center;
+}
+.olControlScaleLineTop {
+ border: solid 2px black;
+ border-top: none;
+ text-align: center;
+}
+
+.olControlPermalink {
+ right: 3px;
+ bottom: 1.5em;
+ display: block;
+ position: absolute;
+ font-size: smaller;
+}
+
+div.olControlMousePosition {
+ bottom: 0;
+ right: 3px;
+ display: block;
+ position: absolute;
+ font-family: Arial;
+ font-size: smaller;
+}
+
+.olControlOverviewMapContainer {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+}
+
+.olControlOverviewMapElement {
+ padding: 10px 18px 10px 10px;
+ background-color: #00008B;
+ -moz-border-radius: 1em 0 0 0;
+}
+
+.olControlOverviewMapMinimizeButton,
+.olControlOverviewMapMaximizeButton {
+ height: 18px;
+ width: 18px;
+ right: 0;
+ bottom: 80px;
+ cursor: pointer;
+}
+
+.olControlOverviewMapExtentRectangle {
+ overflow: hidden;
+ background-image: url("img/blank.gif");
+ cursor: move;
+ border: 2px dotted red;
+}
+.olControlOverviewMapRectReplacement {
+ overflow: hidden;
+ cursor: move;
+ background-image: url("img/overview_replacement.gif");
+ background-repeat: no-repeat;
+ background-position: center;
+}
+
+.olLayerGeoRSSDescription {
+ float:left;
+ width:100%;
+ overflow:auto;
+ font-size:1.0em;
+}
+.olLayerGeoRSSClose {
+ float:right;
+ color:gray;
+ font-size:1.2em;
+ margin-right:6px;
+ font-family:sans-serif;
+}
+.olLayerGeoRSSTitle {
+ float:left;font-size:1.2em;
+}
+
+.olPopupContent {
+ padding:5px;
+ overflow: auto;
+}
+
+.olControlNavigationHistory {
+ background-image: url("img/navigation_history.png");
+ background-repeat: no-repeat;
+ width: 24px;
+ height: 24px;
+
+}
+.olControlNavigationHistoryPreviousItemActive {
+ background-position: 0 0;
+}
+.olControlNavigationHistoryPreviousItemInactive {
+ background-position: 0 -24px;
+}
+.olControlNavigationHistoryNextItemActive {
+ background-position: -24px 0;
+}
+.olControlNavigationHistoryNextItemInactive {
+ background-position: -24px -24px;
+}
+
+div.olControlSaveFeaturesItemActive {
+ background-image: url(img/save_features_on.png);
+ background-repeat: no-repeat;
+ background-position: 0 1px;
+}
+div.olControlSaveFeaturesItemInactive {
+ background-image: url(img/save_features_off.png);
+ background-repeat: no-repeat;
+ background-position: 0 1px;
+}
+
+.olHandlerBoxZoomBox {
+ border: 2px solid red;
+ position: absolute;
+ background-color: white;
+ opacity: 0.50;
+ font-size: 1px;
+ filter: alpha(opacity=50);
+}
+.olHandlerBoxSelectFeature {
+ border: 2px solid blue;
+ position: absolute;
+ background-color: white;
+ opacity: 0.50;
+ font-size: 1px;
+ filter: alpha(opacity=50);
+}
+
+.olControlPanPanel {
+ top: 10px;
+ left: 5px;
+}
+
+.olControlPanPanel div {
+ background-image: url(img/pan-panel.png);
+ height: 18px;
+ width: 18px;
+ cursor: pointer;
+ position: absolute;
+}
+
+.olControlPanPanel .olControlPanNorthItemInactive {
+ top: 0;
+ left: 9px;
+ background-position: 0 0;
+}
+.olControlPanPanel .olControlPanSouthItemInactive {
+ top: 36px;
+ left: 9px;
+ background-position: 18px 0;
+}
+.olControlPanPanel .olControlPanWestItemInactive {
+ position: absolute;
+ top: 18px;
+ left: 0;
+ background-position: 0 18px;
+}
+.olControlPanPanel .olControlPanEastItemInactive {
+ top: 18px;
+ left: 18px;
+ background-position: 18px 18px;
+}
+
+.olControlZoomPanel {
+ top: 71px;
+ left: 14px;
+}
+
+.olControlZoomPanel div {
+ background-image: url(img/zoom-panel.png);
+ position: absolute;
+ height: 18px;
+ width: 18px;
+ cursor: pointer;
+}
+
+.olControlZoomPanel .olControlZoomInItemInactive {
+ top: 0;
+ left: 0;
+ background-position: 0 0;
+}
+
+.olControlZoomPanel .olControlZoomToMaxExtentItemInactive {
+ top: 18px;
+ left: 0;
+ background-position: 0 -18px;
+}
+
+.olControlZoomPanel .olControlZoomOutItemInactive {
+ top: 36px;
+ left: 0;
+ background-position: 0 18px;
+}
+
+/*
+ * When a potential text is bigger than the image it move the image
+ * with some headers (closes #3154)
+ */
+.olControlPanZoomBar div {
+ font-size: 1px;
+}
+
+.olPopupCloseBox {
+ background: url("img/close.gif") no-repeat;
+ cursor: pointer;
+}
+
+.olFramedCloudPopupContent {
+ padding: 5px;
+ overflow: auto;
+}
+
+.olControlNoSelect {
+ -moz-user-select: none;
+ -khtml-user-select: none;
+}
+
+.olImageLoadError {
+ background-color: pink;
+ opacity: 0.5;
+ filter: alpha(opacity=50); /* IE */
+}
+
+/**
+ * Cursor styles
+ */
+
+.olCursorWait {
+ cursor: wait;
+}
+.olDragDown {
+ cursor: move;
+}
+.olDrawBox {
+ cursor: crosshair;
+}
+.olControlDragFeatureOver {
+ cursor: move;
+}
+.olControlDragFeatureActive.olControlDragFeatureOver.olDragDown {
+ cursor: -moz-grabbing;
+}
+
+/**
+ * Layer switcher
+ */
+.olControlLayerSwitcher {
+ position: absolute;
+ top: 25px;
+ right: 0;
+ width: 20em;
+ font-family: sans-serif;
+ font-weight: bold;
+ margin-top: 3px;
+ margin-left: 3px;
+ margin-bottom: 3px;
+ font-size: smaller;
+ color: white;
+ background-color: transparent;
+}
+
+.olControlLayerSwitcher .layersDiv {
+ padding-top: 5px;
+ padding-left: 10px;
+ padding-bottom: 5px;
+ padding-right: 10px;
+ background-color: darkblue;
+}
+
+.olControlLayerSwitcher .layersDiv .baseLbl,
+.olControlLayerSwitcher .layersDiv .dataLbl {
+ margin-top: 3px;
+ margin-left: 3px;
+ margin-bottom: 3px;
+}
+
+.olControlLayerSwitcher .layersDiv .baseLayersDiv,
+.olControlLayerSwitcher .layersDiv .dataLayersDiv {
+ padding-left: 10px;
+}
+
+.olControlLayerSwitcher .maximizeDiv,
+.olControlLayerSwitcher .minimizeDiv {
+ width: 18px;
+ height: 18px;
+ top: 5px;
+ right: 0;
+ cursor: pointer;
+}
+
+.olBingAttribution {
+ color: #DDD;
+}
+.olBingAttribution.road {
+ color: #333;
+}
+
+.olGoogleAttribution.hybrid, .olGoogleAttribution.satellite {
+ color: #EEE;
+}
+.olGoogleAttribution {
+ color: #333;
+}
+span.olGoogleAttribution a {
+ color: #77C;
+}
+span.olGoogleAttribution.hybrid a, span.olGoogleAttribution.satellite a {
+ color: #EEE;
+}
+
+/**
+ * Editing and navigation icons.
+ * (using the editing_tool_bar.png sprint image)
+ */
+.olControlNavToolbar ,
+.olControlEditingToolbar {
+ margin: 5px 5px 0 0;
+}
+.olControlNavToolbar div,
+.olControlEditingToolbar div {
+ background-image: url("img/editing_tool_bar.png");
+ background-repeat: no-repeat;
+ margin: 0 0 5px 5px;
+ width: 24px;
+ height: 22px;
+ cursor: pointer
+}
+/* positions */
+.olControlEditingToolbar {
+ right: 0;
+ top: 0;
+}
+.olControlNavToolbar {
+ top: 295px;
+ left: 9px;
+}
+/* layouts */
+.olControlEditingToolbar div {
+ float: right;
+}
+/* individual controls */
+.olControlNavToolbar .olControlNavigationItemInactive,
+.olControlEditingToolbar .olControlNavigationItemInactive {
+ background-position: -103px -1px;
+}
+.olControlNavToolbar .olControlNavigationItemActive ,
+.olControlEditingToolbar .olControlNavigationItemActive {
+ background-position: -103px -24px;
+}
+.olControlNavToolbar .olControlZoomBoxItemInactive {
+ background-position: -128px -1px;
+}
+.olControlNavToolbar .olControlZoomBoxItemActive {
+ background-position: -128px -24px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePointItemInactive {
+ background-position: -77px -1px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePointItemActive {
+ background-position: -77px -24px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePathItemInactive {
+ background-position: -51px -1px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePathItemActive {
+ background-position: -51px -24px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive{
+ background-position: -26px -1px;
+}
+.olControlEditingToolbar .olControlDrawFeaturePolygonItemActive {
+ background-position: -26px -24px;
+}
+
+div.olControlZoom {
+ position: absolute;
+ top: 8px;
+ left: 8px;
+ background: rgba(255,255,255,0.4);
+ border-radius: 4px;
+ padding: 2px;
+}
+div.olControlZoom a {
+ display: block;
+ margin: 1px;
+ padding: 0;
+ color: white;
+ font-size: 18px;
+ font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ text-decoration: none;
+ text-align: center;
+ height: 22px;
+ width:22px;
+ line-height: 19px;
+ background: #130085; /* fallback for IE - IE6 requires background shorthand*/
+ background: rgba(0, 60, 136, 0.5);
+ filter: alpha(opacity=80);
+}
+div.olControlZoom a:hover {
+ background: #130085; /* fallback for IE */
+ background: rgba(0, 60, 136, 0.7);
+ filter: alpha(opacity=100);
+}
+ at media only screen and (max-width: 600px) {
+ div.olControlZoom a:hover {
+ background: rgba(0, 60, 136, 0.5);
+ }
+}
+a.olControlZoomIn {
+ border-radius: 4px 4px 0 0;
+}
+a.olControlZoomOut {
+ border-radius: 0 0 4px 4px;
+}
+
+
+/**
+ * Animations
+ */
+
+.olLayerGrid .olTileImage {
+ -webkit-transition: opacity 0.2s linear;
+ -moz-transition: opacity 0.2s linear;
+ -o-transition: opacity 0.2s linear;
+ transition: opacity 0.2s linear;
+}
Added: trunk/mapbender/http/extensions/mobilemap/favicon.ico
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/favicon.ico
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/help/help_de.html
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/help/help_de.html (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/help/help_de.html 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,94 @@
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2"><strong><span lang="de">Hilfe Werkzeuge</span></strong></td>
+ </tr>
+ <tr>
+ <td width="40"><div class="navbuttons" style="margin-top:2px"><img src="img/but_ov.png"></div></td>
+ <td><strong>Anfangsausdehnung</strong> der Karte herstellen</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_zoomin.png"></div></td>
+ <td><strong>Hereinzoomen</strong> - vergröÃert die Kartenansicht um einen vordefinierten Faktor.</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_zoomout.png"></div></td>
+ <td><strong>Herauszoomen</strong> - verkleinert die Kartenansicht um einen vordefinierten Faktor.</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_layer.png"></div></td>
+ <td><strong>Ebenen</strong> ein- und ausblenden - Sie können hier zwischen verschiedenen Hintergrundkarten wählen. Zusätzlich können beliebige Fachebenen dazu geladen werden.</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_locate.png"></div></td>
+ <td><strong>Lokalisierung </strong>des eigenen Standorts - Die Positionsbestimmung verwendet je nach Verfügbarkeit Ihr GPS, das WLAN-Netz oder die IP-Adresse. Ihre Positionsdaten werden nicht auf dem server gespeichert.</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_menu.png"></div></td>
+ <td><strong>Menü </strong>für weiterführende Funktionen </td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_help.png"></div></td>
+ <td><strong>Hilfe </strong>sowie Impressum zu dieser WebApp</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_gear.png"></div></td>
+ <td><strong>Einstellungen </strong> und Informationen zu dieser WebApp</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_measure_line.png"></div></td>
+ <td><strong>Messfunktion </strong> zur Ermittlung von Entfernungen</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_measure_poly.png"></div></td>
+ <td><strong>Messfunktion </strong> zur Ermittlung von Flächen</td>
+ </tr>
+ <tr>
+ <td colspan="2"><strong>Ebenensteuerung:</strong><br>
+ Als <strong>Hintergrundkarten (Baselayer)</strong> kann jeweils immer nur eine aktiviert werden. Tapen Sie dazu auf den Optionsschalter oder den Namen der Hintergrundkarte.<br>
+ Die weiteren <strong>Ebenen (Overlays)</strong> können beliebig dazugeschaltet werden. Aktivieren bzw. deaktivieren Sie dazu die jeweilige Checkbox.<br>
+ Um eine <strong>Ebene abzufragen (Query)</strong> aktivieren Sie den Info- Optionsschalter und tapen danach in der Karte auf das Objekt der Ebene. Es kann immer nur eine Ebene gleichzeitig für die Abfrage aktiviert werden.<br></td>
+ </tr>
+ <tr>
+ <td colspan="2"><strong>Gesten für Touchgeräte:</strong><br>
+ <strong>Pinch-Zoom: </strong>Hinein- bzw. Hinauszoomen durch das gleichzeitige Zusammen- bzw. Auseinanderfahren von zwei Fingern über der Karte.(Hinweis: Unter Android 2.x funktioniert diese Geste noch nicht!)<br>
+ <strong>Double Tap - Zoom</strong>: Durch das schnelle doppelte Tappen mit einem Finger in die Karte zoomen Sie in den entsprechenden Bereich herein.<br>
+ <strong>Pan: </strong>Durch das "Festhalten" der Karte nach einem einfachen Tap und das gleichzeitige Bewegen können Sie den Kartenausschnitt beliebig verschieben.<br>
+ <strong>Einfacher Tap:</strong> Nach einem einfachen Tap können Sie eine Abfrage auslösen (vgl. Info-Werkzeug)<br>
+ <br></td>
+ </tr>
+ <tr>
+ <td colspan="2"><strong>Verantwortlich für den Inhalt:</strong> <br>
+ Zentrale Stelle Geodateninfrastruktur Rheinland-Pfalz<br />
+ Landesamt für Vermessung und Geobasisinformation Rheinland-Pfalz<br />
+ Ferdinand-Sauerbruch-StraÃe 15<br />
+ 56073 Koblenz<br />
+ Telefon: +49 (0) 261 492 - 273 oder - 472<br />
+ Telefonzentrale: +49 (0) 261 492 â 0<br />
+ Fax: +49 (0) 261 492-492<br />
+ E-Mail: <a href="mailto:kontakt at geoportal.rlp.de">kontakt at geoportal.rlp.de </a><br /></td>
+ </tr>
+ <tr>
+ <td colspan="2">This WebApp was created using the great Javascript OpenSource Frameworks <a href="http://openlayers.org/" target="_blank">OpenLayers</a>, <a href="http://trac.osgeo.org/proj4js/" target="_blank">Proj4js</a> and <a href="http://jquerymobile.com/">jQuery Mobile</a>.</td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href="http://jquerymobile.com/" target="_blank"><img src="img/jquery.png" width="180" height="46"></a></td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href="http://openlayers.org/" target="_blank"><img src="img/ol.png" width="180" height="59"></a></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="apptools">
+ App-Version: 0.9.2 beta 2012-11-09<br>
+ includes:<br>
+ jQuery Mobile 1.2.0 (jQuery 1.8.2)<br>
+ openLayers 2.12<br>
+ Proj4js 1.1.0<br>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">NETGIS Trier, Germany<br>
+ <a href="http://www.netgis.de" target="_blank">http://www.netgis.de </a></td>
+ </tr>
+ </table>
\ No newline at end of file
Added: trunk/mapbender/http/extensions/mobilemap/help/help_en.html
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/help/help_en.html (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/help/help_en.html 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,94 @@
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2"><strong><span lang="de">Help Tools</span></strong></td>
+ </tr>
+ <tr>
+ <td width="40"><div class="navbuttons" style="margin-top:2px"><img src="img/but_ov.png"></div></td>
+ <td><strong>Full extent</strong> of the map</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_zoomin.png"></div></td>
+ <td><strong>Zoom in</strong> - enlarges the map by a predefined factor.</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_zoomout.png"></div></td>
+ <td><strong>Zoom out</strong> - shrinks the map by a predefined factor.</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_layer.png"></div></td>
+ <td><strong>Layer-Control </strong>show and hide layers - you can choose between different background maps. In addition you can choose between different overlays.</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_locate.png"></div></td>
+ <td><strong>Localization </strong>of your own location - the software uses, depending on the availability, your GPS, your wireless network or IP address. Your position data will not be stored on the server.</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_menu.png"></div></td>
+ <td><strong>Menu </strong>for more functions</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_help.png"></div></td>
+ <td><strong>Help </strong> and imprint of this WebApp</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_gear.png"></div></td>
+ <td><strong>Settings </strong>and informations of this WebApp</td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_measure_line.png"></div></td>
+ <td><span id="result_box5" lang="en" xml:lang="en"><strong>Measurement function</strong> to determine distances</span></td>
+ </tr>
+ <tr>
+ <td><div class="navbuttons" style="margin-top:2px"><img src="img/but_measure_poly.png"></div></td>
+ <td><span id="result_box6" lang="en" xml:lang="en"><strong>Measurement function</strong> to determine areas</span></td>
+ </tr>
+ <tr>
+ <td colspan="2"><strong>Layer control:</strong><br>
+ You can change the <strong>baselayers </strong>by taping on the radio buttons or names. You can only enable one baselayer.<br />
+ <span id="result_box" lang="en" xml:lang="en">The other<strong> layers (overlays)</strong> can be checked or unchecked with the corresponding checkboxes.</span><br>
+ If you want to query an object of a layer, activate the "info-option" and make a single tap on the object. <br></td>
+ </tr>
+ <tr>
+ <td colspan="2"><strong>Gestures for touchdevices:</strong><br>
+ <strong>Pinch-Zoom:</strong> allows you to zoom in or out by moving two fingers farther apart or closer together while touching the display. (<span id="result_box2" lang="en" xml:lang="en">Note: Android 2.x does not support this gesture!</span>)<br>
+ <strong>Double Tap - Zoom</strong>: using a double tab on the map you can zoom in to the <span id="result_box3" lang="en" xml:lang="en">desired</span> point.<br>
+ <strong>Pan: </strong><span id="result_box4" lang="en" xml:lang="en">"hold" on the map after a simple tap and simultaneously moving the map you can move (pan) freely</span><br>
+ <strong>Single Tap:</strong> with a single tap you can query the active layer (see layer control)<br>
+ <br></td>
+ </tr>
+ <tr>
+ <td colspan="2"><strong>Responsible for contents:</strong> <br>
+ Zentrale Stelle Geodateninfrastruktur Rheinland-Pfalz<br />
+Landesamt für Vermessung und Geobasisinformation Rheinland-Pfalz<br />
+Ferdinand-Sauerbruch-StraÃe 15<br />
+56073 Koblenz<br />
+Telefon: +49 (0) 261 492 - 273 oder - 472<br />
+Telefonzentrale: +49 (0) 261 492 â 0<br />
+Fax: +49 (0) 261 492-492<br />
+E-Mail: <a href="mailto:kontakt at geoportal.rlp.de">kontakt at geoportal.rlp.de </a></td>
+ </tr>
+ <tr>
+ <td colspan="2">This WebApp was created using the great Javascript OpenSource Frameworks <a href="http://openlayers.org/" target="_blank">OpenLayers</a>, <a href="http://trac.osgeo.org/proj4js/" target="_blank">Proj4js</a> and <a href="http://jquerymobile.com/">jQuery Mobile</a>.</td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href="http://jquerymobile.com/" target="_blank"><img src="img/jquery.png" width="180" height="46"></a></td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href="http://openlayers.org/" target="_blank"><img src="img/ol.png" width="180" height="59"></a></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="apptools">
+ App-Version: 0.9.2 beta 2012-11-09<br>
+ includes:<br>
+ jQuery Mobile 1.2.0 (jQuery 1.8.2)<br>
+ openLayers 2.12<br>
+ Proj4js 1.1.0<br>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">NETGIS Trier, Germany<br>
+ <a href="http://www.netgis.de" target="_blank">http://www.netgis.de </a></td>
+ </tr>
+ </table>
\ No newline at end of file
Added: trunk/mapbender/http/extensions/mobilemap/iPhoneIcon.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/iPhoneIcon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/background_gradient.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/background_gradient.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_gear.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_gear.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_help.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_help.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_hilfe.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_hilfe.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_info.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_info.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_layer.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_layer.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_locate.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_locate.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_measure_line.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_measure_line.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_measure_poly.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_measure_poly.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_menu.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_menu.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_ov.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_ov.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_search.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_search.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_sprite.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_sprite.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_zoomin.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_zoomin.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/but_zoomout.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/but_zoomout.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/dot.gif
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/dot.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/fortschritt.gif
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/fortschritt.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_basecheck.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_basecheck.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_basecheck_active.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_basecheck_active.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_check.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_check.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_check_active.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_check_active.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_checkop - Kopie.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_checkop - Kopie.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_checkop.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_checkop.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_checkop_active - Kopie.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_checkop_active - Kopie.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_checkop_active.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_checkop_active.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_x.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_x.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ico_zoomin.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ico_zoomin.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/jquery.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/jquery.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/logo_rlp.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/logo_rlp.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/ol.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/ol.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/img/powered_by_google.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/img/powered_by_google.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/ajax-loader.gif
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/ajax-loader.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/ajax-loader.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/ajax-loader.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-18-black.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-18-black.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-18-white.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-18-white.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-36-black.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-36-black.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-36-white.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/images/icons-36-white.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/rlp-theme.css
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/jquery.mobile/rlp-theme.css (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/jquery.mobile/rlp-theme.css 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,604 @@
+/*
+* jQuery Mobile Framework Git Build: SHA1: c2d61e2e592c67519d9a9ed0ba796fa44787e136 <> Date: Tue Sep 25 10:38:12 2012 -0700
+* http://jquerymobile.com
+*
+* Copyright 2012 jQuery Foundation and other contributors
+* Released under the MIT license.
+* http://jquery.org/license
+*
+*/
+
+
+/* Swatches */
+
+/* A
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-bar-a {
+ border: 1px solid #bbbbbb /*{a-bar-border}*/;
+ background: #bbbbbb /*{a-bar-background-color}*/;
+ color: #333333 /*{a-bar-color}*/;
+ font-weight: bold;
+ text-shadow: 0 /*{a-bar-shadow-x}*/ 1px /*{a-bar-shadow-y}*/ 0 /*{a-bar-shadow-radius}*/ #eeeeee /*{a-bar-shadow-color}*/;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #dddddd /*{a-bar-background-start}*/), to( #bbbbbb /*{a-bar-background-end}*/)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient( #dddddd /*{a-bar-background-start}*/, #bbbbbb /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient( #dddddd /*{a-bar-background-start}*/, #bbbbbb /*{a-bar-background-end}*/); /* FF3.6 */
+ background-image: -ms-linear-gradient( #dddddd /*{a-bar-background-start}*/, #bbbbbb /*{a-bar-background-end}*/); /* IE10 */
+ background-image: -o-linear-gradient( #dddddd /*{a-bar-background-start}*/, #bbbbbb /*{a-bar-background-end}*/); /* Opera 11.10+ */
+ background-image: linear-gradient( #dddddd /*{a-bar-background-start}*/, #bbbbbb /*{a-bar-background-end}*/);
+}
+.ui-bar-a .ui-link-inherit {
+ color: #333333 /*{a-bar-color}*/;
+}
+
+.ui-bar-a a.ui-link {
+ color: #2489ce /*{a-bar-link-color}*/;
+ font-weight: bold;
+}
+
+.ui-bar-a a.ui-link:visited {
+ color: #2489ce /*{a-bar-link-visited}*/;
+}
+
+.ui-bar-a a.ui-link:hover {
+ color: #2489ce /*{a-bar-link-hover}*/;
+}
+
+.ui-bar-a a.ui-link:active {
+ color: #2489ce /*{a-bar-link-active}*/;
+}
+
+.ui-bar-a,
+.ui-bar-a input,
+.ui-bar-a select,
+.ui-bar-a textarea,
+.ui-bar-a button {
+ font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-body-a,
+.ui-overlay-a {
+ border: 1px solid #bbbbbb /*{a-body-border}*/;
+ color: #333333 /*{a-body-color}*/;
+ text-shadow: 0 /*{a-body-shadow-x}*/ 1px /*{a-body-shadow-y}*/ 0 /*{a-body-shadow-radius}*/ #ffffff /*{a-body-shadow-color}*/;
+ background: #ffffff /*{a-body-background-color}*/;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #ffffff /*{a-body-background-start}*/), to( #ffffff /*{a-body-background-end}*/)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient( #ffffff /*{a-body-background-start}*/, #ffffff /*{a-body-background-end}*/); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient( #ffffff /*{a-body-background-start}*/, #ffffff /*{a-body-background-end}*/); /* FF3.6 */
+ background-image: -ms-linear-gradient( #ffffff /*{a-body-background-start}*/, #ffffff /*{a-body-background-end}*/); /* IE10 */
+ background-image: -o-linear-gradient( #ffffff /*{a-body-background-start}*/, #ffffff /*{a-body-background-end}*/); /* Opera 11.10+ */
+ background-image: linear-gradient( #ffffff /*{a-body-background-start}*/, #ffffff /*{a-body-background-end}*/);
+}
+.ui-overlay-a {
+ background-image: none;
+ border-width: 0;
+}
+.ui-body-a,
+.ui-body-a input,
+.ui-body-a select,
+.ui-body-a textarea,
+.ui-body-a button {
+ font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-body-a .ui-link-inherit {
+ color: #333333 /*{a-body-color}*/;
+}
+
+.ui-body-a .ui-link {
+ color: #871D33 /*{a-body-link-color}*/;
+ font-weight: bold;
+}
+
+.ui-body-a .ui-link:visited {
+ color: #2489ce /*{a-body-link-visited}*/;
+}
+
+.ui-body-a .ui-link:hover {
+ color: #2489ce /*{a-body-link-hover}*/;
+}
+
+.ui-body-a .ui-link:active {
+ color: #2489ce /*{a-body-link-active}*/;
+}
+
+.ui-btn-up-a {
+ border: 1px solid #bbbbbb /*{a-bup-border}*/;
+ background: #ffffff /*{a-bup-background-color}*/;
+ font-weight: bold;
+ color: #333333 /*{a-bup-color}*/;
+ text-shadow: 0 /*{a-bup-shadow-x}*/ 1px /*{a-bup-shadow-y}*/ 0 /*{a-bup-shadow-radius}*/ #ffffff /*{a-bup-shadow-color}*/;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #fafafa /*{a-bup-background-start}*/), to( #f6f6f6 /*{a-bup-background-end}*/)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient( #fafafa /*{a-bup-background-start}*/, #f6f6f6 /*{a-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient( #fafafa /*{a-bup-background-start}*/, #f6f6f6 /*{a-bup-background-end}*/); /* FF3.6 */
+ background-image: -ms-linear-gradient( #fafafa /*{a-bup-background-start}*/, #f6f6f6 /*{a-bup-background-end}*/); /* IE10 */
+ background-image: -o-linear-gradient( #fafafa /*{a-bup-background-start}*/, #f6f6f6 /*{a-bup-background-end}*/); /* Opera 11.10+ */
+ background-image: linear-gradient( #fafafa /*{a-bup-background-start}*/, #f6f6f6 /*{a-bup-background-end}*/);
+}
+.ui-btn-up-a:visited,
+.ui-btn-up-a a.ui-link-inherit {
+ color: #333333 /*{a-bup-color}*/;
+}
+.ui-btn-hover-a {
+ border: 1px solid #aaaaaa /*{a-bhover-border}*/;
+ background: #eeeeee /*{a-bhover-background-color}*/;
+ font-weight: bold;
+ color: #333333 /*{a-bhover-color}*/;
+ text-shadow: 0 /*{a-bhover-shadow-x}*/ 1px /*{a-bhover-shadow-y}*/ 0 /*{a-bhover-shadow-radius}*/ #ffffff /*{a-bhover-shadow-color}*/;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #eeeeee /*{a-bhover-background-start}*/), to( #ffffff /*{a-bhover-background-end}*/)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient( #eeeeee /*{a-bhover-background-start}*/, #ffffff /*{a-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient( #eeeeee /*{a-bhover-background-start}*/, #ffffff /*{a-bhover-background-end}*/); /* FF3.6 */
+ background-image: -ms-linear-gradient( #eeeeee /*{a-bhover-background-start}*/, #ffffff /*{a-bhover-background-end}*/); /* IE10 */
+ background-image: -o-linear-gradient( #eeeeee /*{a-bhover-background-start}*/, #ffffff /*{a-bhover-background-end}*/); /* Opera 11.10+ */
+ background-image: linear-gradient( #eeeeee /*{a-bhover-background-start}*/, #ffffff /*{a-bhover-background-end}*/);
+}
+.ui-btn-hover-a:visited,
+.ui-btn-hover-a:hover,
+.ui-btn-hover-a a.ui-link-inherit {
+ color: #333333 /*{a-bhover-color}*/;
+}
+.ui-btn-down-a {
+ border: 1px solid #aaaaaa /*{a-bdown-border}*/;
+ background: #eeeeee /*{a-bdown-background-color}*/;
+ font-weight: bold;
+ color: #333333 /*{a-bdown-color}*/;
+ text-shadow: 0 /*{a-bdown-shadow-x}*/ 1px /*{a-bdown-shadow-y}*/ 0 /*{a-bdown-shadow-radius}*/ #ffffff /*{a-bdown-shadow-color}*/;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #e5e5e5 /*{a-bdown-background-start}*/), to( #f2f2f2 /*{a-bdown-background-end}*/)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient( #e5e5e5 /*{a-bdown-background-start}*/, #f2f2f2 /*{a-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient( #e5e5e5 /*{a-bdown-background-start}*/, #f2f2f2 /*{a-bdown-background-end}*/); /* FF3.6 */
+ background-image: -ms-linear-gradient( #e5e5e5 /*{a-bdown-background-start}*/, #f2f2f2 /*{a-bdown-background-end}*/); /* IE10 */
+ background-image: -o-linear-gradient( #e5e5e5 /*{a-bdown-background-start}*/, #f2f2f2 /*{a-bdown-background-end}*/); /* Opera 11.10+ */
+ background-image: linear-gradient( #e5e5e5 /*{a-bdown-background-start}*/, #f2f2f2 /*{a-bdown-background-end}*/);
+}
+.ui-btn-down-a:visited,
+.ui-btn-down-a:hover,
+.ui-btn-down-a a.ui-link-inherit {
+ color: #333333 /*{a-bdown-color}*/;
+}
+.ui-btn-up-a,
+.ui-btn-hover-a,
+.ui-btn-down-a {
+ font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+ text-decoration: none;
+}
+
+
+/* Structure */
+
+/* links within "buttons"
+-----------------------------------------------------------------------------------------------------------*/
+
+a.ui-link-inherit {
+ text-decoration: none !important;
+}
+
+
+/* Active class used as the "on" state across all themes
+-----------------------------------------------------------------------------------------------------------*/
+.ui-btn-active {
+ border: 1px solid #871D33 /*{global-active-border}*/;
+ background: #871D33 /*{global-active-background-color}*/;
+ font-weight: bold;
+ color: #ffffff /*{global-active-color}*/;
+ cursor: pointer;
+ text-shadow: 0 /*{global-active-shadow-x}*/ 1px /*{global-active-shadow-y}*/ 1px /*{global-active-shadow-radius}*/ #871D33 /*{global-active-shadow-color}*/;
+ text-decoration: none;
+ background-image: -webkit-gradient(linear, left top, left bottom, from( #871d33 /*{global-active-background-start}*/), to( #871d33 /*{global-active-background-end}*/)); /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient( #871d33 /*{global-active-background-start}*/, #871d33 /*{global-active-background-end}*/); /* Chrome 10+, Saf5.1+ */
+ background-image: -moz-linear-gradient( #871d33 /*{global-active-background-start}*/, #871d33 /*{global-active-background-end}*/); /* FF3.6 */
+ background-image: -ms-linear-gradient( #871d33 /*{global-active-background-start}*/, #871d33 /*{global-active-background-end}*/); /* IE10 */
+ background-image: -o-linear-gradient( #871d33 /*{global-active-background-start}*/, #871d33 /*{global-active-background-end}*/); /* Opera 11.10+ */
+ background-image: linear-gradient( #871d33 /*{global-active-background-start}*/, #871d33 /*{global-active-background-end}*/);
+ font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-btn-active:visited,
+.ui-btn-active:hover,
+.ui-btn-active a.ui-link-inherit {
+ color: #ffffff /*{global-active-color}*/;
+}
+
+
+/* button inner top highlight
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-btn-inner {
+ border-top: 1px solid #fff;
+ border-color: rgba(255,255,255,.3);
+}
+
+
+/* corner rounding classes
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-corner-tl {
+ -moz-border-radius-topleft: .6em /*{global-radii-blocks}*/;
+ -webkit-border-top-left-radius: .6em /*{global-radii-blocks}*/;
+ border-top-left-radius: .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-tr {
+ -moz-border-radius-topright: .6em /*{global-radii-blocks}*/;
+ -webkit-border-top-right-radius: .6em /*{global-radii-blocks}*/;
+ border-top-right-radius: .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-bl {
+ -moz-border-radius-bottomleft: .6em /*{global-radii-blocks}*/;
+ -webkit-border-bottom-left-radius: .6em /*{global-radii-blocks}*/;
+ border-bottom-left-radius: .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-br {
+ -moz-border-radius-bottomright: .6em /*{global-radii-blocks}*/;
+ -webkit-border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+ border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-top {
+ -moz-border-radius-topleft: .6em /*{global-radii-blocks}*/;
+ -webkit-border-top-left-radius: .6em /*{global-radii-blocks}*/;
+ border-top-left-radius: .6em /*{global-radii-blocks}*/;
+ -moz-border-radius-topright: .6em /*{global-radii-blocks}*/;
+ -webkit-border-top-right-radius: .6em /*{global-radii-blocks}*/;
+ border-top-right-radius: .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-bottom {
+ -moz-border-radius-bottomleft: .6em /*{global-radii-blocks}*/;
+ -webkit-border-bottom-left-radius: .6em /*{global-radii-blocks}*/;
+ border-bottom-left-radius: .6em /*{global-radii-blocks}*/;
+ -moz-border-radius-bottomright: .6em /*{global-radii-blocks}*/;
+ -webkit-border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+ border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+ }
+.ui-corner-right {
+ -moz-border-radius-topright: .6em /*{global-radii-blocks}*/;
+ -webkit-border-top-right-radius: .6em /*{global-radii-blocks}*/;
+ border-top-right-radius: .6em /*{global-radii-blocks}*/;
+ -moz-border-radius-bottomright: .6em /*{global-radii-blocks}*/;
+ -webkit-border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+ border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-left {
+ -moz-border-radius-topleft: .6em /*{global-radii-blocks}*/;
+ -webkit-border-top-left-radius: .6em /*{global-radii-blocks}*/;
+ border-top-left-radius: .6em /*{global-radii-blocks}*/;
+ -moz-border-radius-bottomleft: .6em /*{global-radii-blocks}*/;
+ -webkit-border-bottom-left-radius: .6em /*{global-radii-blocks}*/;
+ border-bottom-left-radius: .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-all {
+ -moz-border-radius: .6em /*{global-radii-blocks}*/;
+ -webkit-border-radius: .6em /*{global-radii-blocks}*/;
+ border-radius: .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-none {
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+}
+
+/* Form field separator
+-----------------------------------------------------------------------------------------------------------*/
+.ui-br {
+ border-bottom: rgb(130,130,130);
+ border-bottom: rgba(130,130,130,.3);
+ border-bottom-width: 1px;
+ border-bottom-style: solid;
+}
+
+/* Interaction cues
+-----------------------------------------------------------------------------------------------------------*/
+.ui-disabled {
+ filter: Alpha(Opacity=30);
+ opacity: .3;
+ zoom: 1;
+}
+.ui-disabled,
+.ui-disabled a {
+ cursor: default !important;
+ pointer-events: none;
+}
+
+/* Icons
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-icon,
+.ui-icon-searchfield:after {
+ background: #FFFFFF /*{global-icon-color}*/;
+ background: rgba(135,29,51,0.4) /*{global-icon-disc}*/;
+ background-image: url(images/icons-18-white.png) /*{global-icon-set}*/;
+ background-repeat: no-repeat;
+ -moz-border-radius: 9px;
+ -webkit-border-radius: 9px;
+ border-radius: 9px;
+}
+
+
+/* Alt icon color
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-icon-alt {
+ background: #fff;
+ background: rgba(255,255,255,.3);
+ background-image: url(images/icons-18-black.png);
+ background-repeat: no-repeat;
+}
+
+/* HD/"retina" sprite
+-----------------------------------------------------------------------------------------------------------*/
+
+ at media only screen and (-webkit-min-device-pixel-ratio: 1.5),
+ only screen and (min--moz-device-pixel-ratio: 1.5),
+ only screen and (min-resolution: 240dpi) {
+
+ .ui-icon-plus, .ui-icon-minus, .ui-icon-delete, .ui-icon-arrow-r,
+ .ui-icon-arrow-l, .ui-icon-arrow-u, .ui-icon-arrow-d, .ui-icon-check,
+ .ui-icon-gear, .ui-icon-refresh, .ui-icon-forward, .ui-icon-back,
+ .ui-icon-grid, .ui-icon-star, .ui-icon-alert, .ui-icon-info, .ui-icon-home, .ui-icon-search, .ui-icon-searchfield:after,
+ .ui-icon-checkbox-off, .ui-icon-checkbox-on, .ui-icon-radio-off, .ui-icon-radio-on {
+ background-image: url(images/icons-36-white.png);
+ -moz-background-size: 776px 18px;
+ -o-background-size: 776px 18px;
+ -webkit-background-size: 776px 18px;
+ background-size: 776px 18px;
+ }
+ .ui-icon-alt {
+ background-image: url(images/icons-36-black.png);
+ }
+}
+
+/* plus minus */
+.ui-icon-plus {
+ background-position: -0 50%;
+}
+.ui-icon-minus {
+ background-position: -36px 50%;
+}
+
+/* delete/close */
+.ui-icon-delete {
+ background-position: -72px 50%;
+}
+
+/* arrows */
+.ui-icon-arrow-r {
+ background-position: -108px 50%;
+}
+.ui-icon-arrow-l {
+ background-position: -144px 50%;
+}
+.ui-icon-arrow-u {
+ background-position: -180px 50%;
+}
+.ui-icon-arrow-d {
+ background-position: -216px 50%;
+}
+
+/* misc */
+.ui-icon-check {
+ background-position: -252px 50%;
+}
+.ui-icon-gear {
+ background-position: -288px 50%;
+}
+.ui-icon-refresh {
+ background-position: -324px 50%;
+}
+.ui-icon-forward {
+ background-position: -360px 50%;
+}
+.ui-icon-back {
+ background-position: -396px 50%;
+}
+.ui-icon-grid {
+ background-position: -432px 50%;
+}
+.ui-icon-star {
+ background-position: -468px 50%;
+}
+.ui-icon-alert {
+ background-position: -504px 50%;
+}
+.ui-icon-info {
+ background-position: -540px 50%;
+}
+.ui-icon-home {
+ background-position: -576px 50%;
+}
+.ui-icon-search,
+.ui-icon-searchfield:after {
+ background-position: -612px 50%;
+}
+.ui-icon-checkbox-off {
+ background-position: -684px 50%;
+}
+.ui-icon-checkbox-on {
+ background-position: -648px 50%;
+}
+.ui-icon-radio-off {
+ background-position: -756px 50%;
+}
+.ui-icon-radio-on {
+ background-position: -720px 50%;
+}
+
+
+/* checks,radios */
+.ui-checkbox .ui-icon,
+.ui-selectmenu-list .ui-icon {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+.ui-icon-checkbox-off,
+.ui-icon-radio-off {
+ background-color: transparent;
+}
+.ui-checkbox-on .ui-icon,
+.ui-radio-on .ui-icon {
+ background-color: #871D33 /*{global-active-background-color}*/; /* NOTE: this hex should match the active state color. It's repeated here for cascade */
+}
+
+/* loading icon */
+.ui-icon-loading {
+ background: url(images/ajax-loader.gif);
+ background-size: 46px 46px;
+}
+
+
+/* Button corner classes
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-btn-corner-tl {
+ -moz-border-radius-topleft: 1em /*{global-radii-buttons}*/;
+ -webkit-border-top-left-radius: 1em /*{global-radii-buttons}*/;
+ border-top-left-radius: 1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-tr {
+ -moz-border-radius-topright: 1em /*{global-radii-buttons}*/;
+ -webkit-border-top-right-radius: 1em /*{global-radii-buttons}*/;
+ border-top-right-radius: 1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-bl {
+ -moz-border-radius-bottomleft: 1em /*{global-radii-buttons}*/;
+ -webkit-border-bottom-left-radius: 1em /*{global-radii-buttons}*/;
+ border-bottom-left-radius: 1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-br {
+ -moz-border-radius-bottomright: 1em /*{global-radii-buttons}*/;
+ -webkit-border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+ border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-top {
+ -moz-border-radius-topleft: 1em /*{global-radii-buttons}*/;
+ -webkit-border-top-left-radius: 1em /*{global-radii-buttons}*/;
+ border-top-left-radius: 1em /*{global-radii-buttons}*/;
+ -moz-border-radius-topright: 1em /*{global-radii-buttons}*/;
+ -webkit-border-top-right-radius: 1em /*{global-radii-buttons}*/;
+ border-top-right-radius: 1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-bottom {
+ -moz-border-radius-bottomleft: 1em /*{global-radii-buttons}*/;
+ -webkit-border-bottom-left-radius: 1em /*{global-radii-buttons}*/;
+ border-bottom-left-radius: 1em /*{global-radii-buttons}*/;
+ -moz-border-radius-bottomright: 1em /*{global-radii-buttons}*/;
+ -webkit-border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+ border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-right {
+ -moz-border-radius-topright: 1em /*{global-radii-buttons}*/;
+ -webkit-border-top-right-radius: 1em /*{global-radii-buttons}*/;
+ border-top-right-radius: 1em /*{global-radii-buttons}*/;
+ -moz-border-radius-bottomright: 1em /*{global-radii-buttons}*/;
+ -webkit-border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+ border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-left {
+ -moz-border-radius-topleft: 1em /*{global-radii-buttons}*/;
+ -webkit-border-top-left-radius: 1em /*{global-radii-buttons}*/;
+ border-top-left-radius: 1em /*{global-radii-buttons}*/;
+ -moz-border-radius-bottomleft: 1em /*{global-radii-buttons}*/;
+ -webkit-border-bottom-left-radius: 1em /*{global-radii-buttons}*/;
+ border-bottom-left-radius: 1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-all {
+ -moz-border-radius: 1em /*{global-radii-buttons}*/;
+ -webkit-border-radius: 1em /*{global-radii-buttons}*/;
+ border-radius: 1em /*{global-radii-buttons}*/;
+}
+
+/* radius clip workaround for cleaning up corner trapping */
+.ui-corner-tl,
+.ui-corner-tr,
+.ui-corner-bl,
+.ui-corner-br,
+.ui-corner-top,
+.ui-corner-bottom,
+.ui-corner-right,
+.ui-corner-left,
+.ui-corner-all,
+.ui-btn-corner-tl,
+.ui-btn-corner-tr,
+.ui-btn-corner-bl,
+.ui-btn-corner-br,
+.ui-btn-corner-top,
+.ui-btn-corner-bottom,
+.ui-btn-corner-right,
+.ui-btn-corner-left,
+.ui-btn-corner-all {
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+
+/* Overlay / modal
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-overlay {
+ background: #666;
+ filter: Alpha(Opacity=50);
+ opacity: .5;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+.ui-overlay-shadow {
+ -moz-box-shadow: 0px 0px 12px rgba(0,0,0,.6);
+ -webkit-box-shadow: 0px 0px 12px rgba(0,0,0,.6);
+ box-shadow: 0px 0px 12px rgba(0,0,0,.6);
+}
+.ui-shadow {
+ -moz-box-shadow: 0px 1px 4px /*{global-box-shadow-size}*/ rgba(0,0,0,0.3) /*{global-box-shadow-color}*/;
+ -webkit-box-shadow: 0px 1px 4px /*{global-box-shadow-size}*/ rgba(0,0,0,0.3) /*{global-box-shadow-color}*/;
+ box-shadow: 0px 1px 4px /*{global-box-shadow-size}*/ rgba(0,0,0,0.3) /*{global-box-shadow-color}*/;
+}
+.ui-bar-a .ui-shadow,
+.ui-bar-b .ui-shadow ,
+.ui-bar-c .ui-shadow {
+ -moz-box-shadow: 0px 1px 0 rgba(255,255,255,.3);
+ -webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.3);
+ box-shadow: 0px 1px 0 rgba(255,255,255,.3);
+}
+.ui-shadow-inset {
+ -moz-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2);
+ -webkit-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2);
+ box-shadow: inset 0px 1px 4px rgba(0,0,0,.2);
+}
+.ui-icon-shadow {
+ -moz-box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/;
+ -webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/;
+ box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/;
+}
+
+/* Focus state - set here for specificity (note: these classes are added by JavaScript)
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-btn:focus, .ui-link-inherit:focus {
+ outline: 0;
+}
+.ui-btn.ui-focus {
+ z-index: 1;
+}
+.ui-focus,
+.ui-btn:focus {
+ -moz-box-shadow: inset 0px 0px 3px #871D33 /*{global-active-background-color}*/, 0px 0px 9px #871D33 /*{global-active-background-color}*/;
+ -webkit-box-shadow: inset 0px 0px 3px #871D33 /*{global-active-background-color}*/, 0px 0px 9px #871D33 /*{global-active-background-color}*/;
+ box-shadow: inset 0px 0px 3px #871D33 /*{global-active-background-color}*/, 0px 0px 9px #871D33 /*{global-active-background-color}*/;
+}
+.ui-input-text.ui-focus,
+.ui-input-search.ui-focus {
+ -moz-box-shadow: 0px 0px 12px #871D33 /*{global-active-background-color}*/;
+ -webkit-box-shadow: 0px 0px 12px #871D33 /*{global-active-background-color}*/;
+ box-shadow: 0px 0px 12px #871D33 /*{global-active-background-color}*/;
+}
+
+/* unset box shadow in browsers that don't do it right
+-----------------------------------------------------------------------------------------------------------*/
+
+.ui-mobile-nosupport-boxshadow * {
+ -moz-box-shadow: none !important;
+ -webkit-box-shadow: none !important;
+ box-shadow: none !important;
+}
+
+/* ...and bring back focus */
+.ui-mobile-nosupport-boxshadow .ui-focus,
+.ui-mobile-nosupport-boxshadow .ui-btn:focus,
+.ui-mobile-nosupport-boxshadow .ui-link-inherit:focus {
+ outline-width: 1px;
+ outline-style: auto;
+}
Added: trunk/mapbender/http/extensions/mobilemap/jquery.mobile/rlp-theme.min.css
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/jquery.mobile/rlp-theme.min.css (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/jquery.mobile/rlp-theme.min.css 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,11 @@
+/*
+* jQuery Mobile Framework Git Build: SHA1: c2d61e2e592c67519d9a9ed0ba796fa44787e136 <> Date: Tue Sep 25 10:38:12 2012 -0700
+* http://jquerymobile.com
+*
+* Copyright 2012 jQuery Foundation and other contributors
+* Released under the MIT license.
+* http://jquery.org/license
+*
+*/
+
+.ui-bar-a{border:1px solid #bbbbbb ;background:#bbbbbb ;color:#333333 ;font-weight:bold;text-shadow:0 1px 0 #eeeeee ;background-image:-webkit-gradient(linear,left top,left bottom,from( #dddddd ),to( #bbbbbb )); background-image:-webkit-linear-gradient( #dddddd,#bbbbbb ); background-image: -moz-linear-gradient( #dddddd,#bbbbbb ); background-image: -ms-linear-gradient( #dddddd,#bbbbbb ); background-image: -o-linear-gradient( #dddddd,#bbbbbb ); background-image: linear-gradient( #dddddd,#bbbbbb );}.ui-bar-a .ui-link-inherit{color:#333333 ;}.ui-bar-a a.ui-link{color:#2489ce ;font-weight:bold;}.ui-bar-a a.ui-link:visited{ color:#2489ce ;}.ui-bar-a a.ui-link:hover{color:#2489ce ;}.ui-bar-a a.ui-link:active{color:#2489ce ;}.ui-bar-a,.ui-bar-a input,.ui-bar-a select,.ui-bar-a textarea,.ui-bar-a button{ font-family:Helvetica,Arial,sans-serif ;}.ui-body-a,.ui-overlay-a{border:1px solid #bbbbbb ;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background:#ffffff ;
background-image:-webkit-gradient(linear,left top,left bottom,from( #ffffff ),to( #ffffff )); background-image:-webkit-linear-gradient( #ffffff,#ffffff ); background-image: -moz-linear-gradient( #ffffff,#ffffff ); background-image: -ms-linear-gradient( #ffffff,#ffffff ); background-image: -o-linear-gradient( #ffffff,#ffffff ); background-image: linear-gradient( #ffffff,#ffffff );}.ui-overlay-a{background-image:none;border-width:0;}.ui-body-a,.ui-body-a input,.ui-body-a select,.ui-body-a textarea,.ui-body-a button{ font-family:Helvetica,Arial,sans-serif ;}.ui-body-a .ui-link-inherit{color:#333333 ;}.ui-body-a .ui-link{color:#871D33 ;font-weight:bold;}.ui-body-a .ui-link:visited{ color:#2489ce ;}.ui-body-a .ui-link:hover{color:#2489ce ;}.ui-body-a .ui-link:active{color:#2489ce ;}.ui-btn-up-a{border:1px solid #bbbbbb ;background:#ffffff ;font-weight:bold;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bo
ttom,from( #fafafa ),to( #f6f6f6 )); background-image:-webkit-linear-gradient( #fafafa,#f6f6f6 ); background-image: -moz-linear-gradient( #fafafa,#f6f6f6 ); background-image: -ms-linear-gradient( #fafafa,#f6f6f6 ); background-image: -o-linear-gradient( #fafafa,#f6f6f6 ); background-image: linear-gradient( #fafafa,#f6f6f6 );}.ui-btn-up-a:visited,.ui-btn-up-a a.ui-link-inherit{color:#333333 ;}.ui-btn-hover-a{border:1px solid #aaaaaa ;background:#eeeeee ;font-weight:bold;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #eeeeee ),to( #ffffff )); background-image:-webkit-linear-gradient( #eeeeee,#ffffff ); background-image: -moz-linear-gradient( #eeeeee,#ffffff ); background-image: -ms-linear-gradient( #eeeeee,#ffffff ); background-image: -o-linear-gradient( #eeeeee,#ffffff ); background-image: linear-gradient( #eeeeee,#ffffff );}.ui-btn-hover-a:visited,.ui-btn-hover-a:hover,.ui-btn-
hover-a a.ui-link-inherit{color:#333333 ;}.ui-btn-down-a{border:1px solid #aaaaaa ;background:#eeeeee ;font-weight:bold;color:#333333 ;text-shadow:0 1px 0 #ffffff ;background-image:-webkit-gradient(linear,left top,left bottom,from( #e5e5e5 ),to( #f2f2f2 )); background-image:-webkit-linear-gradient( #e5e5e5,#f2f2f2 ); background-image: -moz-linear-gradient( #e5e5e5,#f2f2f2 ); background-image: -ms-linear-gradient( #e5e5e5,#f2f2f2 ); background-image: -o-linear-gradient( #e5e5e5,#f2f2f2 ); background-image: linear-gradient( #e5e5e5,#f2f2f2 );}.ui-btn-down-a:visited,.ui-btn-down-a:hover,.ui-btn-down-a a.ui-link-inherit{color:#333333 ;}.ui-btn-up-a,.ui-btn-hover-a,.ui-btn-down-a{ font-family:Helvetica,Arial,sans-serif ;text-decoration:none;}a.ui-link-inherit{text-decoration:none !important;}.ui-btn-active{border:1px solid #871D33 ;background:#871D33 ;font-weight:bold;color:#ffffff ;cursor:pointer;text-shadow:0 1px 1px #871D33 ;text-decoration:none;backgr
ound-image:-webkit-gradient(linear,left top,left bottom,from( #871d33 ),to( #871d33 )); background-image:-webkit-linear-gradient( #871d33,#871d33 ); background-image: -moz-linear-gradient( #871d33,#871d33 ); background-image: -ms-linear-gradient( #871d33,#871d33 ); background-image: -o-linear-gradient( #871d33,#871d33 ); background-image: linear-gradient( #871d33,#871d33 ); font-family:Helvetica,Arial,sans-serif ;}.ui-btn-active:visited,.ui-btn-active:hover,.ui-btn-active a.ui-link-inherit{color:#ffffff ;}.ui-btn-inner{border-top:1px solid #fff;border-color:rgba(255,255,255,.3);}.ui-corner-tl{-moz-border-radius-topleft:.6em ;-webkit-border-top-left-radius:.6em ;border-top-left-radius:.6em ;}.ui-corner-tr{-moz-border-radius-topright:.6em ;-webkit-border-top-right-radius:.6em ;border-top-right-radius:.6em ;}.ui-corner-bl{-moz-border-radius-bottomleft:.6em ;-webkit-border-bottom-left-radius:.6em ;border-bottom-left-radius:.6em ;}.ui-corner-br{-moz-border-rad
ius-bottomright:.6em ;-webkit-border-bottom-right-radius:.6em ;border-bottom-right-radius:.6em ;}.ui-corner-top{-moz-border-radius-topleft:.6em ;-webkit-border-top-left-radius:.6em ;border-top-left-radius:.6em ;-moz-border-radius-topright:.6em ;-webkit-border-top-right-radius:.6em ;border-top-right-radius:.6em ;}.ui-corner-bottom{-moz-border-radius-bottomleft:.6em ;-webkit-border-bottom-left-radius:.6em ;border-bottom-left-radius:.6em ;-moz-border-radius-bottomright:.6em ;-webkit-border-bottom-right-radius:.6em ;border-bottom-right-radius:.6em ;}.ui-corner-right{-moz-border-radius-topright:.6em ;-webkit-border-top-right-radius:.6em ;border-top-right-radius:.6em ;-moz-border-radius-bottomright:.6em ;-webkit-border-bottom-right-radius:.6em ;border-bottom-right-radius:.6em ;}.ui-corner-left{-moz-border-radius-topleft:.6em ;-webkit-border-top-left-radius:.6em ;border-top-left-radius:.6em ;-moz-border-radius-bottomleft:.6em ;-webkit-border-bottom-left-radius:.6em ;border-bottom-l
eft-radius:.6em ;}.ui-corner-all{-moz-border-radius:.6em ;-webkit-border-radius:.6em ;border-radius:.6em ;}.ui-corner-none{-moz-border-radius: 0;-webkit-border-radius: 0;border-radius: 0;}.ui-br{border-bottom:rgb(130,130,130);border-bottom:rgba(130,130,130,.3);border-bottom-width:1px;border-bottom-style:solid;}.ui-disabled{filter:Alpha(Opacity=30);opacity:.3;zoom:1;}.ui-disabled,.ui-disabled a{cursor:default !important;pointer-events:none;}.ui-icon,.ui-icon-searchfield:after{background:#FFFFFF ;background:rgba(135,29,51,0.4) ;background-image:url(images/icons-18-white.png) ;background-repeat:no-repeat;-moz-border-radius:9px;-webkit-border-radius:9px;border-radius:9px;}.ui-icon-alt{background:#fff;background:rgba(255,255,255,.3);background-image:url(images/icons-18-black.png);background-repeat:no-repeat;}@media only screen and (-webkit-min-device-pixel-ratio:1.5), only screen and (min--moz-device-pixel-ratio:1.5), only screen and (min-resolution:240dpi){.ui-ic
on-plus,.ui-icon-minus,.ui-icon-delete,.ui-icon-arrow-r,.ui-icon-arrow-l,.ui-icon-arrow-u,.ui-icon-arrow-d,.ui-icon-check,.ui-icon-gear,.ui-icon-refresh,.ui-icon-forward,.ui-icon-back,.ui-icon-grid,.ui-icon-star,.ui-icon-alert,.ui-icon-info,.ui-icon-home,.ui-icon-search,.ui-icon-searchfield:after,.ui-icon-checkbox-off,.ui-icon-checkbox-on,.ui-icon-radio-off,.ui-icon-radio-on{background-image:url(images/icons-36-white.png);-moz-background-size:776px 18px;-o-background-size:776px 18px;-webkit-background-size:776px 18px;background-size:776px 18px;}.ui-icon-alt{background-image:url(images/icons-36-black.png);}}.ui-icon-plus{background-position:-0 50%;}.ui-icon-minus{background-position:-36px 50%;}.ui-icon-delete{background-position:-72px 50%;}.ui-icon-arrow-r{background-position:-108px 50%;}.ui-icon-arrow-l{background-position:-144px 50%;}.ui-icon-arrow-u{background-position:-180px 50%;}.ui-icon-arrow-d{background-position:-216px 50%;}.ui-icon-check{background-position:-252px 50
%;}.ui-icon-gear{background-position:-288px 50%;}.ui-icon-refresh{background-position:-324px 50%;}.ui-icon-forward{background-position:-360px 50%;}.ui-icon-back{background-position:-396px 50%;}.ui-icon-grid{background-position:-432px 50%;}.ui-icon-star{background-position:-468px 50%;}.ui-icon-alert{background-position:-504px 50%;}.ui-icon-info{background-position:-540px 50%;}.ui-icon-home{background-position:-576px 50%;}.ui-icon-search,.ui-icon-searchfield:after{background-position:-612px 50%;}.ui-icon-checkbox-off{background-position:-684px 50%;}.ui-icon-checkbox-on{background-position:-648px 50%;}.ui-icon-radio-off{background-position:-756px 50%;}.ui-icon-radio-on{background-position:-720px 50%;}.ui-checkbox .ui-icon,.ui-selectmenu-list .ui-icon{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.ui-icon-checkbox-off,.ui-icon-radio-off{background-color:transparent;}.ui-checkbox-on .ui-icon,.ui-radio-on .ui-icon{background-color:#871D33 ; }.ui-icon-loading{
background:url(images/ajax-loader.gif);background-size:46px 46px;}.ui-btn-corner-tl{-moz-border-radius-topleft:1em ;-webkit-border-top-left-radius:1em ;border-top-left-radius:1em ;}.ui-btn-corner-tr{-moz-border-radius-topright:1em ;-webkit-border-top-right-radius:1em ;border-top-right-radius:1em ;}.ui-btn-corner-bl{-moz-border-radius-bottomleft:1em ;-webkit-border-bottom-left-radius:1em ;border-bottom-left-radius:1em ;}.ui-btn-corner-br{-moz-border-radius-bottomright:1em ;-webkit-border-bottom-right-radius:1em ;border-bottom-right-radius:1em ;}.ui-btn-corner-top{-moz-border-radius-topleft:1em ;-webkit-border-top-left-radius:1em ;border-top-left-radius:1em ;-moz-border-radius-topright:1em ;-webkit-border-top-right-radius:1em ;border-top-right-radius:1em ;}.ui-btn-corner-bottom{-moz-border-radius-bottomleft:1em ;-webkit-border-bottom-left-radius:1em ;border-bottom-left-radius:1em ;-moz-border-radius-bottomright:1em ;-webkit-border-bottom-right-radius:1em ;border-bottom-right-r
adius:1em ;}.ui-btn-corner-right{-moz-border-radius-topright:1em ;-webkit-border-top-right-radius:1em ;border-top-right-radius:1em ;-moz-border-radius-bottomright:1em ;-webkit-border-bottom-right-radius:1em ;border-bottom-right-radius:1em ;}.ui-btn-corner-left{-moz-border-radius-topleft:1em ;-webkit-border-top-left-radius:1em ;border-top-left-radius:1em ;-moz-border-radius-bottomleft:1em ;-webkit-border-bottom-left-radius:1em ;border-bottom-left-radius:1em ;}.ui-btn-corner-all{-moz-border-radius:1em ;-webkit-border-radius:1em ;border-radius:1em ;}.ui-corner-tl,.ui-corner-tr,.ui-corner-bl,.ui-corner-br,.ui-corner-top,.ui-corner-bottom,.ui-corner-right,.ui-corner-left,.ui-corner-all,.ui-btn-corner-tl,.ui-btn-corner-tr,.ui-btn-corner-bl,.ui-btn-corner-br,.ui-btn-corner-top,.ui-btn-corner-bottom,.ui-btn-corner-right,.ui-btn-corner-left,.ui-btn-corner-all{ -webkit-background-clip:padding-box; -moz-background-clip:padding; background-clip:padding-box;}.ui-overlay{back
ground:#666;filter:Alpha(Opacity=50);opacity:.5;position:absolute;width:100%;height:100%;}.ui-overlay-shadow{-moz-box-shadow:0px 0px 12px rgba(0,0,0,.6);-webkit-box-shadow:0px 0px 12px rgba(0,0,0,.6);box-shadow:0px 0px 12px rgba(0,0,0,.6);}.ui-shadow{-moz-box-shadow:0px 1px 4px rgba(0,0,0,0.3) ;-webkit-box-shadow:0px 1px 4px rgba(0,0,0,0.3) ;box-shadow:0px 1px 4px rgba(0,0,0,0.3) ;}.ui-bar-a .ui-shadow,.ui-bar-b .ui-shadow,.ui-bar-c .ui-shadow {-moz-box-shadow:0px 1px 0 rgba(255,255,255,.3);-webkit-box-shadow:0px 1px 0 rgba(255,255,255,.3);box-shadow:0px 1px 0 rgba(255,255,255,.3);}.ui-shadow-inset{-moz-box-shadow:inset 0px 1px 4px rgba(0,0,0,.2);-webkit-box-shadow:inset 0px 1px 4px rgba(0,0,0,.2);box-shadow:inset 0px 1px 4px rgba(0,0,0,.2);}.ui-icon-shadow{-moz-box-shadow:0px 1px 0 rgba(255,255,255,.4) ;-webkit-box-shadow:0px 1px 0 rgba(255,255,255,.4) ;box-shadow:0px 1px 0 rgba(255,255,255,.4) ;}.ui-btn:focus,.ui-link-inherit:focus{outline:0;}.ui-btn.ui-focus{z-index:1;
}.ui-focus,.ui-btn:focus{-moz-box-shadow:inset 0px 0px 3px #871D33,0px 0px 9px #871D33 ;-webkit-box-shadow:inset 0px 0px 3px #871D33,0px 0px 9px #871D33 ;box-shadow:inset 0px 0px 3px #871D33,0px 0px 9px #871D33 ;}.ui-input-text.ui-focus,.ui-input-search.ui-focus{-moz-box-shadow:0px 0px 12px #871D33 ;-webkit-box-shadow:0px 0px 12px #871D33 ;box-shadow:0px 0px 12px #871D33 ;}.ui-mobile-nosupport-boxshadow *{-moz-box-shadow:none !important;-webkit-box-shadow:none !important;box-shadow:none !important;}.ui-mobile-nosupport-boxshadow .ui-focus,.ui-mobile-nosupport-boxshadow .ui-btn:focus,.ui-mobile-nosupport-boxshadow .ui-link-inherit:focus{outline-width:1px;outline-style:auto;}
\ No newline at end of file
Added: trunk/mapbender/http/extensions/mobilemap/js/OpenLayers.mobile.min.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/OpenLayers.mobile.min.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/OpenLayers.mobile.min.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,1257 @@
+/*
+
+ OpenLayers.js -- OpenLayers Map Viewer Library
+
+ Copyright (c) 2006-2012 by OpenLayers Contributors
+ Published under the 2-clause BSD license.
+ See http://openlayers.org/dev/license.txt for the full text of the license, and http://openlayers.org/dev/authors.txt for full list of contributors.
+
+ Includes compressed code under the following licenses:
+
+ (For uncompressed versions of the code used, please see the
+ OpenLayers Github repository: <https://github.com/openlayers/openlayers>)
+
+*/
+
+/**
+ * Contains XMLHttpRequest.js <http://code.google.com/p/xmlhttprequest/>
+ * Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+/**
+ * OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
+ * Copyright (c) 2006, Yahoo! Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use of this software in source and binary forms, with or
+ * without modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * * Neither the name of Yahoo! Inc. nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission of Yahoo! Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+var OpenLayers={VERSION_NUMBER:"Release 2.12",singleFile:true,_getScriptLocation:(function(){var r=new RegExp("(^|(.*?\\/))(OpenLayers[^\\/]*?\\.js)(\\?|$)"),s=document.getElementsByTagName('script'),src,m,l="";for(var i=0,len=s.length;i<len;i++){src=s[i].getAttribute('src');if(src){m=src.match(r);if(m){l=m[1];break;}}}
+return(function(){return l;});})(),ImgPath:''};OpenLayers.Class=function(){var len=arguments.length;var P=arguments[0];var F=arguments[len-1];var C=typeof F.initialize=="function"?F.initialize:function(){P.prototype.initialize.apply(this,arguments);};if(len>1){var newArgs=[C,P].concat(Array.prototype.slice.call(arguments).slice(1,len-1),F);OpenLayers.inherit.apply(null,newArgs);}else{C.prototype=F;}
+return C;};OpenLayers.inherit=function(C,P){var F=function(){};F.prototype=P.prototype;C.prototype=new F;var i,l,o;for(i=2,l=arguments.length;i<l;i++){o=arguments[i];if(typeof o==="function"){o=o.prototype;}
+OpenLayers.Util.extend(C.prototype,o);}};OpenLayers.Util=OpenLayers.Util||{};OpenLayers.Util.extend=function(destination,source){destination=destination||{};if(source){for(var property in source){var value=source[property];if(value!==undefined){destination[property]=value;}}
+var sourceIsEvt=typeof window.Event=="function"&&source instanceof window.Event;if(!sourceIsEvt&&source.hasOwnProperty&&source.hasOwnProperty("toString")){destination.toString=source.toString;}}
+return destination;};OpenLayers.String={startsWith:function(str,sub){return(str.indexOf(sub)==0);},contains:function(str,sub){return(str.indexOf(sub)!=-1);},trim:function(str){return str.replace(/^\s\s*/,'').replace(/\s\s*$/,'');},camelize:function(str){var oStringList=str.split('-');var camelizedString=oStringList[0];for(var i=1,len=oStringList.length;i<len;i++){var s=oStringList[i];camelizedString+=s.charAt(0).toUpperCase()+s.substring(1);}
+return camelizedString;},format:function(template,context,args){if(!context){context=window;}
+var replacer=function(str,match){var replacement;var subs=match.split(/\.+/);for(var i=0;i<subs.length;i++){if(i==0){replacement=context;}
+replacement=replacement[subs[i]];}
+if(typeof replacement=="function"){replacement=args?replacement.apply(null,args):replacement();}
+if(typeof replacement=='undefined'){return'undefined';}else{return replacement;}};return template.replace(OpenLayers.String.tokenRegEx,replacer);},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(value){return OpenLayers.String.numberRegEx.test(value);},numericIf:function(value){return OpenLayers.String.isNumeric(value)?parseFloat(value):value;}};OpenLayers.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(num,sig){var fig=0;if(sig>0){fig=parseFloat(num.toPrecision(sig));}
+return fig;},format:function(num,dec,tsep,dsep){dec=(typeof dec!="undefined")?dec:0;tsep=(typeof tsep!="undefined")?tsep:OpenLayers.Number.thousandsSeparator;dsep=(typeof dsep!="undefined")?dsep:OpenLayers.Number.decimalSeparator;if(dec!=null){num=parseFloat(num.toFixed(dec));}
+var parts=num.toString().split(".");if(parts.length==1&&dec==null){dec=0;}
+var integer=parts[0];if(tsep){var thousands=/(-?[0-9]+)([0-9]{3})/;while(thousands.test(integer)){integer=integer.replace(thousands,"$1"+tsep+"$2");}}
+var str;if(dec==0){str=integer;}else{var rem=parts.length>1?parts[1]:"0";if(dec!=null){rem=rem+new Array(dec-rem.length+1).join("0");}
+str=integer+dsep+rem;}
+return str;}};OpenLayers.Function={bind:function(func,object){var args=Array.prototype.slice.apply(arguments,[2]);return function(){var newArgs=args.concat(Array.prototype.slice.apply(arguments,[0]));return func.apply(object,newArgs);};},bindAsEventListener:function(func,object){return function(event){return func.call(object,event||window.event);};},False:function(){return false;},True:function(){return true;},Void:function(){}};OpenLayers.Array={filter:function(array,callback,caller){var selected=[];if(Array.prototype.filter){selected=array.filter(callback,caller);}else{var len=array.length;if(typeof callback!="function"){throw new TypeError();}
+for(var i=0;i<len;i++){if(i in array){var val=array[i];if(callback.call(caller,val,i,array)){selected.push(val);}}}}
+return selected;}};OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(left,bottom,right,top){if(OpenLayers.Util.isArray(left)){top=left[3];right=left[2];bottom=left[1];left=left[0];}
+if(left!=null){this.left=OpenLayers.Util.toFloat(left);}
+if(bottom!=null){this.bottom=OpenLayers.Util.toFloat(bottom);}
+if(right!=null){this.right=OpenLayers.Util.toFloat(right);}
+if(top!=null){this.top=OpenLayers.Util.toFloat(top);}},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top);},equals:function(bounds){var equals=false;if(bounds!=null){equals=((this.left==bounds.left)&&(this.right==bounds.right)&&(this.top==bounds.top)&&(this.bottom==bounds.bottom));}
+return equals;},toString:function(){return[this.left,this.bottom,this.right,this.top].join(",");},toArray:function(reverseAxisOrder){if(reverseAxisOrder===true){return[this.bottom,this.left,this.top,this.right];}else{return[this.left,this.bottom,this.right,this.top];}},toBBOX:function(decimal,reverseAxisOrder){if(decimal==null){decimal=6;}
+var mult=Math.pow(10,decimal);var xmin=Math.round(this.left*mult)/mult;var ymin=Math.round(this.bottom*mult)/mult;var xmax=Math.round(this.right*mult)/mult;var ymax=Math.round(this.top*mult)/mult;if(reverseAxisOrder===true){return ymin+","+xmin+","+ymax+","+xmax;}else{return xmin+","+ymin+","+xmax+","+ymax;}},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])]);},getWidth:function(){return(this.right-this.left);},getHeight:function(){return(this.top-this.bottom);},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight());},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2);},getCenterLonLat:function(){if(!this.centerLonLat){this.centerLonLat=new Op
enLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2);}
+return this.centerLonLat;},scale:function(ratio,origin){if(origin==null){origin=this.getCenterLonLat();}
+var origx,origy;if(origin.CLASS_NAME=="OpenLayers.LonLat"){origx=origin.lon;origy=origin.lat;}else{origx=origin.x;origy=origin.y;}
+var left=(this.left-origx)*ratio+origx;var bottom=(this.bottom-origy)*ratio+origy;var right=(this.right-origx)*ratio+origx;var top=(this.top-origy)*ratio+origy;return new OpenLayers.Bounds(left,bottom,right,top);},add:function(x,y){if((x==null)||(y==null)){throw new TypeError('Bounds.add cannot receive null values');}
+return new OpenLayers.Bounds(this.left+x,this.bottom+y,this.right+x,this.top+y);},extend:function(object){var bounds=null;if(object){switch(object.CLASS_NAME){case"OpenLayers.LonLat":bounds=new OpenLayers.Bounds(object.lon,object.lat,object.lon,object.lat);break;case"OpenLayers.Geometry.Point":bounds=new OpenLayers.Bounds(object.x,object.y,object.x,object.y);break;case"OpenLayers.Bounds":bounds=object;break;}
+if(bounds){this.centerLonLat=null;if((this.left==null)||(bounds.left<this.left)){this.left=bounds.left;}
+if((this.bottom==null)||(bounds.bottom<this.bottom)){this.bottom=bounds.bottom;}
+if((this.right==null)||(bounds.right>this.right)){this.right=bounds.right;}
+if((this.top==null)||(bounds.top>this.top)){this.top=bounds.top;}}}},containsLonLat:function(ll,options){if(typeof options==="boolean"){options={inclusive:options};}
+options=options||{};var contains=this.contains(ll.lon,ll.lat,options.inclusive),worldBounds=options.worldBounds;if(worldBounds&&!contains){var worldWidth=worldBounds.getWidth();var worldCenterX=(worldBounds.left+worldBounds.right)/2;var worldsAway=Math.round((ll.lon-worldCenterX)/worldWidth);contains=this.containsLonLat({lon:ll.lon-worldsAway*worldWidth,lat:ll.lat},{inclusive:options.inclusive});}
+return contains;},containsPixel:function(px,inclusive){return this.contains(px.x,px.y,inclusive);},contains:function(x,y,inclusive){if(inclusive==null){inclusive=true;}
+if(x==null||y==null){return false;}
+x=OpenLayers.Util.toFloat(x);y=OpenLayers.Util.toFloat(y);var contains=false;if(inclusive){contains=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));}else{contains=((x>this.left)&&(x<this.right)&&(y>this.bottom)&&(y<this.top));}
+return contains;},intersectsBounds:function(bounds,options){if(typeof options==="boolean"){options={inclusive:options};}
+options=options||{};if(options.worldBounds){var self=this.wrapDateLine(options.worldBounds);bounds=bounds.wrapDateLine(options.worldBounds);}else{self=this;}
+if(options.inclusive==null){options.inclusive=true;}
+var intersects=false;var mightTouch=(self.left==bounds.right||self.right==bounds.left||self.top==bounds.bottom||self.bottom==bounds.top);if(options.inclusive||!mightTouch){var inBottom=(((bounds.bottom>=self.bottom)&&(bounds.bottom<=self.top))||((self.bottom>=bounds.bottom)&&(self.bottom<=bounds.top)));var inTop=(((bounds.top>=self.bottom)&&(bounds.top<=self.top))||((self.top>bounds.bottom)&&(self.top<bounds.top)));var inLeft=(((bounds.left>=self.left)&&(bounds.left<=self.right))||((self.left>=bounds.left)&&(self.left<=bounds.right)));var inRight=(((bounds.right>=self.left)&&(bounds.right<=self.right))||((self.right>=bounds.left)&&(self.right<=bounds.right)));intersects=((inBottom||inTop)&&(inLeft||inRight));}
+if(options.worldBounds&&!intersects){var world=options.worldBounds;var width=world.getWidth();var selfCrosses=!world.containsBounds(self);var boundsCrosses=!world.containsBounds(bounds);if(selfCrosses&&!boundsCrosses){bounds=bounds.add(-width,0);intersects=self.intersectsBounds(bounds,{inclusive:options.inclusive});}else if(boundsCrosses&&!selfCrosses){self=self.add(-width,0);intersects=bounds.intersectsBounds(self,{inclusive:options.inclusive});}}
+return intersects;},containsBounds:function(bounds,partial,inclusive){if(partial==null){partial=false;}
+if(inclusive==null){inclusive=true;}
+var bottomLeft=this.contains(bounds.left,bounds.bottom,inclusive);var bottomRight=this.contains(bounds.right,bounds.bottom,inclusive);var topLeft=this.contains(bounds.left,bounds.top,inclusive);var topRight=this.contains(bounds.right,bounds.top,inclusive);return(partial)?(bottomLeft||bottomRight||topLeft||topRight):(bottomLeft&&bottomRight&&topLeft&&topRight);},determineQuadrant:function(lonlat){var quadrant="";var center=this.getCenterLonLat();quadrant+=(lonlat.lat<center.lat)?"b":"t";quadrant+=(lonlat.lon<center.lon)?"l":"r";return quadrant;},transform:function(source,dest){this.centerLonLat=null;var ll=OpenLayers.Projection.transform({'x':this.left,'y':this.bottom},source,dest);var lr=OpenLayers.Projection.transform({'x':this.right,'y':this.bottom},source,dest);var ul=OpenLayers.Projection.transform({'x':this.left,'y':this.top},source,dest);var ur=OpenLayers.Projection.transform({'x':this.right,'y':this.top},source,dest);this.left=Math.min(ll.x,ul.x);this.bottom=Math.min(
ll.y,lr.y);this.right=Math.max(lr.x,ur.x);this.top=Math.max(ul.y,ur.y);return this;},wrapDateLine:function(maxExtent,options){options=options||{};var leftTolerance=options.leftTolerance||0;var rightTolerance=options.rightTolerance||0;var newBounds=this.clone();if(maxExtent){var width=maxExtent.getWidth();while(newBounds.left<maxExtent.left&&newBounds.right-rightTolerance<=maxExtent.left){newBounds=newBounds.add(width,0);}
+while(newBounds.left+leftTolerance>=maxExtent.right&&newBounds.right>maxExtent.right){newBounds=newBounds.add(-width,0);}
+var newLeft=newBounds.left+leftTolerance;if(newLeft<maxExtent.right&&newLeft>maxExtent.left&&newBounds.right-rightTolerance>maxExtent.right){newBounds=newBounds.add(-width,0);}}
+return newBounds;},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(str,reverseAxisOrder){var bounds=str.split(",");return OpenLayers.Bounds.fromArray(bounds,reverseAxisOrder);};OpenLayers.Bounds.fromArray=function(bbox,reverseAxisOrder){return reverseAxisOrder===true?new OpenLayers.Bounds(bbox[1],bbox[0],bbox[3],bbox[2]):new OpenLayers.Bounds(bbox[0],bbox[1],bbox[2],bbox[3]);};OpenLayers.Bounds.fromSize=function(size){return new OpenLayers.Bounds(0,size.h,size.w,0);};OpenLayers.Bounds.oppositeQuadrant=function(quadrant){var opp="";opp+=(quadrant.charAt(0)=='t')?'b':'t';opp+=(quadrant.charAt(1)=='l')?'r':'l';return opp;};OpenLayers.Element={visible:function(element){return OpenLayers.Util.getElement(element).style.display!='none';},toggle:function(){for(var i=0,len=arguments.length;i<len;i++){var element=OpenLayers.Util.getElement(arguments[i]);var display=OpenLayers.Element.visible(element)?'none':'';element.style.display=display;}},remove:function(ele
ment){element=OpenLayers.Util.getElement(element);element.parentNode.removeChild(element);},getHeight:function(element){element=OpenLayers.Util.getElement(element);return element.offsetHeight;},hasClass:function(element,name){var names=element.className;return(!!names&&new RegExp("(^|\\s)"+name+"(\\s|$)").test(names));},addClass:function(element,name){if(!OpenLayers.Element.hasClass(element,name)){element.className+=(element.className?" ":"")+name;}
+return element;},removeClass:function(element,name){var names=element.className;if(names){element.className=OpenLayers.String.trim(names.replace(new RegExp("(^|\\s+)"+name+"(\\s+|$)")," "));}
+return element;},toggleClass:function(element,name){if(OpenLayers.Element.hasClass(element,name)){OpenLayers.Element.removeClass(element,name);}else{OpenLayers.Element.addClass(element,name);}
+return element;},getStyle:function(element,style){element=OpenLayers.Util.getElement(element);var value=null;if(element&&element.style){value=element.style[OpenLayers.String.camelize(style)];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[OpenLayers.String.camelize(style)];}}
+var positions=['left','top','right','bottom'];if(window.opera&&(OpenLayers.Util.indexOf(positions,style)!=-1)&&(OpenLayers.Element.getStyle(element,'position')=='static')){value='auto';}}
+return value=='auto'?null:value;}};OpenLayers.LonLat=OpenLayers.Class({lon:0.0,lat:0.0,initialize:function(lon,lat){if(OpenLayers.Util.isArray(lon)){lat=lon[1];lon=lon[0];}
+this.lon=OpenLayers.Util.toFloat(lon);this.lat=OpenLayers.Util.toFloat(lat);},toString:function(){return("lon="+this.lon+",lat="+this.lat);},toShortString:function(){return(this.lon+", "+this.lat);},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat);},add:function(lon,lat){if((lon==null)||(lat==null)){throw new TypeError('LonLat.add cannot receive null values');}
+return new OpenLayers.LonLat(this.lon+OpenLayers.Util.toFloat(lon),this.lat+OpenLayers.Util.toFloat(lat));},equals:function(ll){var equals=false;if(ll!=null){equals=((this.lon==ll.lon&&this.lat==ll.lat)||(isNaN(this.lon)&&isNaN(this.lat)&&isNaN(ll.lon)&&isNaN(ll.lat)));}
+return equals;},transform:function(source,dest){var point=OpenLayers.Projection.transform({'x':this.lon,'y':this.lat},source,dest);this.lon=point.x;this.lat=point.y;return this;},wrapDateLine:function(maxExtent){var newLonLat=this.clone();if(maxExtent){while(newLonLat.lon<maxExtent.left){newLonLat.lon+=maxExtent.getWidth();}
+while(newLonLat.lon>maxExtent.right){newLonLat.lon-=maxExtent.getWidth();}}
+return newLonLat;},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(str){var pair=str.split(",");return new OpenLayers.LonLat(pair[0],pair[1]);};OpenLayers.LonLat.fromArray=function(arr){var gotArr=OpenLayers.Util.isArray(arr),lon=gotArr&&arr[0],lat=gotArr&&arr[1];return new OpenLayers.LonLat(lon,lat);};OpenLayers.Pixel=OpenLayers.Class({x:0.0,y:0.0,initialize:function(x,y){this.x=parseFloat(x);this.y=parseFloat(y);},toString:function(){return("x="+this.x+",y="+this.y);},clone:function(){return new OpenLayers.Pixel(this.x,this.y);},equals:function(px){var equals=false;if(px!=null){equals=((this.x==px.x&&this.y==px.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(px.x)&&isNaN(px.y)));}
+return equals;},distanceTo:function(px){return Math.sqrt(Math.pow(this.x-px.x,2)+
+Math.pow(this.y-px.y,2));},add:function(x,y){if((x==null)||(y==null)){throw new TypeError('Pixel.add cannot receive null values');}
+return new OpenLayers.Pixel(this.x+x,this.y+y);},offset:function(px){var newPx=this.clone();if(px){newPx=this.add(px.x,px.y);}
+return newPx;},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.Size=OpenLayers.Class({w:0.0,h:0.0,initialize:function(w,h){this.w=parseFloat(w);this.h=parseFloat(h);},toString:function(){return("w="+this.w+",h="+this.h);},clone:function(){return new OpenLayers.Size(this.w,this.h);},equals:function(sz){var equals=false;if(sz!=null){equals=((this.w==sz.w&&this.h==sz.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(sz.w)&&isNaN(sz.h)));}
+return equals;},CLASS_NAME:"OpenLayers.Size"});OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(error){alert(error);},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"};(function(){var scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;i<len;++i){if(scripts[i].src.indexOf("firebug.js")!=-1){if(console){OpenLayers.Util.extend(OpenLayers.Console,console);break;}}}})();OpenLayers.Lang={code:null,defaultCode:"en",getCode:function(){if(!OpenLayers.Lang.code){OpenLayers.Lang.setCode();}
+return OpenLayers.Lang.code;},setCode:function(code){var lang;if(!code){code=(OpenLayers.BROWSER_NAME=="msie")?navigator.userLanguage:navigator.language;}
+var parts=code.split('-');parts[0]=parts[0].toLowerCase();if(typeof OpenLayers.Lang[parts[0]]=="object"){lang=parts[0];}
+if(parts[1]){var testLang=parts[0]+'-'+parts[1].toUpperCase();if(typeof OpenLayers.Lang[testLang]=="object"){lang=testLang;}}
+if(!lang){OpenLayers.Console.warn('Failed to find OpenLayers.Lang.'+parts.join("-")+' dictionary, falling back to default language');lang=OpenLayers.Lang.defaultCode;}
+OpenLayers.Lang.code=lang;},translate:function(key,context){var dictionary=OpenLayers.Lang[OpenLayers.Lang.getCode()];var message=dictionary&&dictionary[key];if(!message){message=key;}
+if(context){message=OpenLayers.String.format(message,context);}
+return message;}};OpenLayers.i18n=OpenLayers.Lang.translate;OpenLayers.Util=OpenLayers.Util||{};OpenLayers.Util.getElement=function(){var elements=[];for(var i=0,len=arguments.length;i<len;i++){var element=arguments[i];if(typeof element=='string'){element=document.getElementById(element);}
+if(arguments.length==1){return element;}
+elements.push(element);}
+return elements;};OpenLayers.Util.isElement=function(o){return!!(o&&o.nodeType===1);};OpenLayers.Util.isArray=function(a){return(Object.prototype.toString.call(a)==='[object Array]');};if(typeof window.$==="undefined"){window.$=OpenLayers.Util.getElement;}
+OpenLayers.Util.removeItem=function(array,item){for(var i=array.length-1;i>=0;i--){if(array[i]==item){array.splice(i,1);}}
+return array;};OpenLayers.Util.indexOf=function(array,obj){if(typeof array.indexOf=="function"){return array.indexOf(obj);}else{for(var i=0,len=array.length;i<len;i++){if(array[i]==obj){return i;}}
+return-1;}};OpenLayers.Util.modifyDOMElement=function(element,id,px,sz,position,border,overflow,opacity){if(id){element.id=id;}
+if(px){element.style.left=px.x+"px";element.style.top=px.y+"px";}
+if(sz){element.style.width=sz.w+"px";element.style.height=sz.h+"px";}
+if(position){element.style.position=position;}
+if(border){element.style.border=border;}
+if(overflow){element.style.overflow=overflow;}
+if(parseFloat(opacity)>=0.0&&parseFloat(opacity)<1.0){element.style.filter='alpha(opacity='+(opacity*100)+')';element.style.opacity=opacity;}else if(parseFloat(opacity)==1.0){element.style.filter='';element.style.opacity='';}};OpenLayers.Util.createDiv=function(id,px,sz,imgURL,position,border,overflow,opacity){var dom=document.createElement('div');if(imgURL){dom.style.backgroundImage='url('+imgURL+')';}
+if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");}
+if(!position){position="absolute";}
+OpenLayers.Util.modifyDOMElement(dom,id,px,sz,position,border,overflow,opacity);return dom;};OpenLayers.Util.createImage=function(id,px,sz,imgURL,position,border,opacity,delayDisplay){var image=document.createElement("img");if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");}
+if(!position){position="relative";}
+OpenLayers.Util.modifyDOMElement(image,id,px,sz,position,border,null,opacity);if(delayDisplay){image.style.display="none";function display(){image.style.display="";OpenLayers.Event.stopObservingElement(image);}
+OpenLayers.Event.observe(image,"load",display);OpenLayers.Event.observe(image,"error",display);}
+image.style.alt=id;image.galleryImg="no";if(imgURL){image.src=imgURL;}
+return image;};OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.alphaHackNeeded=null;OpenLayers.Util.alphaHack=function(){if(OpenLayers.Util.alphaHackNeeded==null){var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);var filter=false;try{filter=!!(document.body.filters);}catch(e){}
+OpenLayers.Util.alphaHackNeeded=(filter&&(version>=5.5)&&(version<7));}
+return OpenLayers.Util.alphaHackNeeded;};OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,position,border,sizing,opacity){OpenLayers.Util.modifyDOMElement(div,id,px,sz,position,null,null,opacity);var img=div.childNodes[0];if(imgURL){img.src=imgURL;}
+OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);if(OpenLayers.Util.alphaHack()){if(div.style.display!="none"){div.style.display="inline-block";}
+if(sizing==null){sizing="scale";}
+div.style.filter="progid:DXImageTransform.Microsoft"+".AlphaImageLoader(src='"+img.src+"', "+"sizingMethod='"+sizing+"')";if(parseFloat(div.style.opacity)>=0.0&&parseFloat(div.style.opacity)<1.0){div.style.filter+=" alpha(opacity="+div.style.opacity*100+")";}
+img.style.filter="alpha(opacity=0)";}};OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,position,border,sizing,opacity,delayDisplay){var div=OpenLayers.Util.createDiv();var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,delayDisplay);img.className="olAlphaImg";div.appendChild(img);OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,position,border,sizing,opacity);return div;};OpenLayers.Util.upperCaseObject=function(object){var uObject={};for(var key in object){uObject[key.toUpperCase()]=object[key];}
+return uObject;};OpenLayers.Util.applyDefaults=function(to,from){to=to||{};var fromIsEvt=typeof window.Event=="function"&&from instanceof window.Event;for(var key in from){if(to[key]===undefined||(!fromIsEvt&&from.hasOwnProperty&&from.hasOwnProperty(key)&&!to.hasOwnProperty(key))){to[key]=from[key];}}
+if(!fromIsEvt&&from&&from.hasOwnProperty&&from.hasOwnProperty('toString')&&!to.hasOwnProperty('toString')){to.toString=from.toString;}
+return to;};OpenLayers.Util.getParameterString=function(params){var paramsArray=[];for(var key in params){var value=params[key];if((value!=null)&&(typeof value!='function')){var encodedValue;if(typeof value=='object'&&value.constructor==Array){var encodedItemArray=[];var item;for(var itemIndex=0,len=value.length;itemIndex<len;itemIndex++){item=value[itemIndex];encodedItemArray.push(encodeURIComponent((item===null||item===undefined)?"":item));}
+encodedValue=encodedItemArray.join(",");}
+else{encodedValue=encodeURIComponent(value);}
+paramsArray.push(encodeURIComponent(key)+"="+encodedValue);}}
+return paramsArray.join("&");};OpenLayers.Util.urlAppend=function(url,paramStr){var newUrl=url;if(paramStr){var parts=(url+" ").split(/[?&]/);newUrl+=(parts.pop()===" "?paramStr:parts.length?"&"+paramStr:"?"+paramStr);}
+return newUrl;};OpenLayers.Util.getImagesLocation=function(){return OpenLayers.ImgPath||(OpenLayers._getScriptLocation()+"img/");};OpenLayers.Util.getImageLocation=function(image){return OpenLayers.Util.getImagesLocation()+image;};OpenLayers.Util.Try=function(){var returnValue=null;for(var i=0,len=arguments.length;i<len;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
+return returnValue;};OpenLayers.Util.getXmlNodeValue=function(node){var val=null;OpenLayers.Util.Try(function(){val=node.text;if(!val){val=node.textContent;}
+if(!val){val=node.firstChild.nodeValue;}},function(){val=node.textContent;});return val;};OpenLayers.Util.mouseLeft=function(evt,div){var target=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;while(target!=div&&target!=null){target=target.parentNode;}
+return(target!=div);};OpenLayers.Util.DEFAULT_PRECISION=14;OpenLayers.Util.toFloat=function(number,precision){if(precision==null){precision=OpenLayers.Util.DEFAULT_PRECISION;}
+if(typeof number!=="number"){number=parseFloat(number);}
+return precision===0?number:parseFloat(number.toPrecision(precision));};OpenLayers.Util.rad=function(x){return x*Math.PI/180;};OpenLayers.Util.deg=function(x){return x*180/Math.PI;};OpenLayers.Util.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563};OpenLayers.Util.distVincenty=function(p1,p2){var ct=OpenLayers.Util.VincentyConstants;var a=ct.a,b=ct.b,f=ct.f;var L=OpenLayers.Util.rad(p2.lon-p1.lon);var U1=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p1.lat)));var U2=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p2.lat)));var sinU1=Math.sin(U1),cosU1=Math.cos(U1);var sinU2=Math.sin(U2),cosU2=Math.cos(U2);var lambda=L,lambdaP=2*Math.PI;var iterLimit=20;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+
+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0){return 0;}
+var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);var cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));}
+if(iterLimit==0){return NaN;}
+var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-
+B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var s=b*A*(sigma-deltaSigma);var d=s.toFixed(3)/1000;return d;};OpenLayers.Util.destinationVincenty=function(lonlat,brng,dist){var u=OpenLayers.Util;var ct=u.VincentyConstants;var a=ct.a,b=ct.b,f=ct.f;var lon1=lonlat.lon;var lat1=lonlat.lat;var s=dist;var alpha1=u.rad(brng);var sinAlpha1=Math.sin(alpha1);var cosAlpha1=Math.cos(alpha1);var tanU1=(1-f)*Math.tan(u.rad(lat1));var cosU1=1/Math.sqrt((1+tanU1*tanU1)),sinU1=tanU1*cosU1;var sigma1=Math.atan2(tanU1,cosAlpha1);var sinAlpha=cosU1*sinAlpha1;var cosSqAlpha=1-sinAlpha*sinAlpha;var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var sigma=s/(b*A),sigmaP=2*Math.PI;while(Math.abs(sigma-sigmaP)>1e-12){var cos2SigmaM=Math.cos(2*sigma1+sigma);var sinSigma=Math.sin(sigma);var cosSigma=Math.cos(sigma);var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2Sigm
aM)-
+B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));sigmaP=sigma;sigma=s/(b*A)+deltaSigma;}
+var tmp=sinU1*sinSigma-cosU1*cosSigma*cosAlpha1;var lat2=Math.atan2(sinU1*cosSigma+cosU1*sinSigma*cosAlpha1,(1-f)*Math.sqrt(sinAlpha*sinAlpha+tmp*tmp));var lambda=Math.atan2(sinSigma*sinAlpha1,cosU1*cosSigma-sinU1*sinSigma*cosAlpha1);var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));var L=lambda-(1-C)*f*sinAlpha*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));var revAz=Math.atan2(sinAlpha,-tmp);return new OpenLayers.LonLat(lon1+u.deg(L),u.deg(lat2));};OpenLayers.Util.getParameters=function(url){url=(url===null||url===undefined)?window.location.href:url;var paramsString="";if(OpenLayers.String.contains(url,'?')){var start=url.indexOf('?')+1;var end=OpenLayers.String.contains(url,"#")?url.indexOf('#'):url.length;paramsString=url.substring(start,end);}
+var parameters={};var pairs=paramsString.split(/[&;]/);for(var i=0,len=pairs.length;i<len;++i){var keyValue=pairs[i].split('=');if(keyValue[0]){var key=keyValue[0];try{key=decodeURIComponent(key);}catch(err){key=unescape(key);}
+var value=(keyValue[1]||'').replace(/\+/g," ");try{value=decodeURIComponent(value);}catch(err){value=unescape(value);}
+value=value.split(",");if(value.length==1){value=value[0];}
+parameters[key]=value;}}
+return parameters;};OpenLayers.Util.lastSeqID=0;OpenLayers.Util.createUniqueID=function(prefix){if(prefix==null){prefix="id_";}
+OpenLayers.Util.lastSeqID+=1;return prefix+OpenLayers.Util.lastSeqID;};OpenLayers.INCHES_PER_UNIT={'inches':1.0,'ft':12.0,'mi':63360.0,'m':39.3701,'km':39370.1,'dd':4374754,'yd':36};OpenLayers.INCHES_PER_UNIT["in"]=OpenLayers.INCHES_PER_UNIT.inches;OpenLayers.INCHES_PER_UNIT["degrees"]=OpenLayers.INCHES_PER_UNIT.dd;OpenLayers.INCHES_PER_UNIT["nmi"]=1852*OpenLayers.INCHES_PER_UNIT.m;OpenLayers.METERS_PER_INCH=0.02540005080010160020;OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{"Inch":OpenLayers.INCHES_PER_UNIT.inches,"Meter":1.0/OpenLayers.METERS_PER_INCH,"Foot":0.30480060960121920243/OpenLayers.METERS_PER_INCH,"IFoot":0.30480000000000000000/OpenLayers.METERS_PER_INCH,"ClarkeFoot":0.3047972651151/OpenLayers.METERS_PER_INCH,"SearsFoot":0.30479947153867624624/OpenLayers.METERS_PER_INCH,"GoldCoastFoot":0.30479971018150881758/OpenLayers.METERS_PER_INCH,"IInch":0.02540000000000000000/OpenLayers.METERS_PER_INCH,"MicroInch":0.00002540000000000000/OpenLayers.METERS_PER_INCH,"Mil
":0.00000002540000000000/OpenLayers.METERS_PER_INCH,"Centimeter":0.01000000000000000000/OpenLayers.METERS_PER_INCH,"Kilometer":1000.00000000000000000000/OpenLayers.METERS_PER_INCH,"Yard":0.91440182880365760731/OpenLayers.METERS_PER_INCH,"SearsYard":0.914398414616029/OpenLayers.METERS_PER_INCH,"IndianYard":0.91439853074444079983/OpenLayers.METERS_PER_INCH,"IndianYd37":0.91439523/OpenLayers.METERS_PER_INCH,"IndianYd62":0.9143988/OpenLayers.METERS_PER_INCH,"IndianYd75":0.9143985/OpenLayers.METERS_PER_INCH,"IndianFoot":0.30479951/OpenLayers.METERS_PER_INCH,"IndianFt37":0.30479841/OpenLayers.METERS_PER_INCH,"IndianFt62":0.3047996/OpenLayers.METERS_PER_INCH,"IndianFt75":0.3047995/OpenLayers.METERS_PER_INCH,"Mile":1609.34721869443738887477/OpenLayers.METERS_PER_INCH,"IYard":0.91440000000000000000/OpenLayers.METERS_PER_INCH,"IMile":1609.34400000000000000000/OpenLayers.METERS_PER_INCH,"NautM":1852.00000000000000000000/OpenLayers.METERS_PER_INCH,"Lat-66":110943.316488932731/OpenLayers
.METERS_PER_INCH,"Lat-83":110946.25736872234125/OpenLayers.METERS_PER_INCH,"Decimeter":0.10000000000000000000/OpenLayers.METERS_PER_INCH,"Millimeter":0.00100000000000000000/OpenLayers.METERS_PER_INCH,"Dekameter":10.00000000000000000000/OpenLayers.METERS_PER_INCH,"Decameter":10.00000000000000000000/OpenLayers.METERS_PER_INCH,"Hectometer":100.00000000000000000000/OpenLayers.METERS_PER_INCH,"GermanMeter":1.0000135965/OpenLayers.METERS_PER_INCH,"CaGrid":0.999738/OpenLayers.METERS_PER_INCH,"ClarkeChain":20.1166194976/OpenLayers.METERS_PER_INCH,"GunterChain":20.11684023368047/OpenLayers.METERS_PER_INCH,"BenoitChain":20.116782494375872/OpenLayers.METERS_PER_INCH,"SearsChain":20.11676512155/OpenLayers.METERS_PER_INCH,"ClarkeLink":0.201166194976/OpenLayers.METERS_PER_INCH,"GunterLink":0.2011684023368047/OpenLayers.METERS_PER_INCH,"BenoitLink":0.20116782494375872/OpenLayers.METERS_PER_INCH,"SearsLink":0.2011676512155/OpenLayers.METERS_PER_INCH,"Rod":5.02921005842012/OpenLayers.METERS_
PER_INCH,"IntnlChain":20.1168/OpenLayers.METERS_PER_INCH,"IntnlLink":0.201168/OpenLayers.METERS_PER_INCH,"Perch":5.02921005842012/OpenLayers.METERS_PER_INCH,"Pole":5.02921005842012/OpenLayers.METERS_PER_INCH,"Furlong":201.1684023368046/OpenLayers.METERS_PER_INCH,"Rood":3.778266898/OpenLayers.METERS_PER_INCH,"CapeFoot":0.3047972615/OpenLayers.METERS_PER_INCH,"Brealey":375.00000000000000000000/OpenLayers.METERS_PER_INCH,"ModAmFt":0.304812252984505969011938/OpenLayers.METERS_PER_INCH,"Fathom":1.8288/OpenLayers.METERS_PER_INCH,"NautM-UK":1853.184/OpenLayers.METERS_PER_INCH,"50kilometers":50000.0/OpenLayers.METERS_PER_INCH,"150kilometers":150000.0/OpenLayers.METERS_PER_INCH});OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT,{"mm":OpenLayers.INCHES_PER_UNIT["Meter"]/1000.0,"cm":OpenLayers.INCHES_PER_UNIT["Meter"]/100.0,"dm":OpenLayers.INCHES_PER_UNIT["Meter"]*100.0,"km":OpenLayers.INCHES_PER_UNIT["Meter"]*1000.0,"kmi":OpenLayers.INCHES_PER_UNIT["nmi"],"fath":OpenLayers.INCHES_PER
_UNIT["Fathom"],"ch":OpenLayers.INCHES_PER_UNIT["IntnlChain"],"link":OpenLayers.INCHES_PER_UNIT["IntnlLink"],"us-in":OpenLayers.INCHES_PER_UNIT["inches"],"us-ft":OpenLayers.INCHES_PER_UNIT["Foot"],"us-yd":OpenLayers.INCHES_PER_UNIT["Yard"],"us-ch":OpenLayers.INCHES_PER_UNIT["GunterChain"],"us-mi":OpenLayers.INCHES_PER_UNIT["Mile"],"ind-yd":OpenLayers.INCHES_PER_UNIT["IndianYd37"],"ind-ft":OpenLayers.INCHES_PER_UNIT["IndianFt37"],"ind-ch":20.11669506/OpenLayers.METERS_PER_INCH});OpenLayers.DOTS_PER_INCH=72;OpenLayers.Util.normalizeScale=function(scale){var normScale=(scale>1.0)?(1.0/scale):scale;return normScale;};OpenLayers.Util.getResolutionFromScale=function(scale,units){var resolution;if(scale){if(units==null){units="degrees";}
+var normScale=OpenLayers.Util.normalizeScale(scale);resolution=1/(normScale*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);}
+return resolution;};OpenLayers.Util.getScaleFromResolution=function(resolution,units){if(units==null){units="degrees";}
+var scale=resolution*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH;return scale;};OpenLayers.Util.pagePosition=function(forElement){var pos=[0,0];var viewportElement=OpenLayers.Util.getViewportElement();if(!forElement||forElement==window||forElement==viewportElement){return pos;}
+var BUGGY_GECKO_BOX_OBJECT=OpenLayers.IS_GECKO&&document.getBoxObjectFor&&OpenLayers.Element.getStyle(forElement,'position')=='absolute'&&(forElement.style.top==''||forElement.style.left=='');var parent=null;var box;if(forElement.getBoundingClientRect){box=forElement.getBoundingClientRect();var scrollTop=viewportElement.scrollTop;var scrollLeft=viewportElement.scrollLeft;pos[0]=box.left+scrollLeft;pos[1]=box.top+scrollTop;}else if(document.getBoxObjectFor&&!BUGGY_GECKO_BOX_OBJECT){box=document.getBoxObjectFor(forElement);var vpBox=document.getBoxObjectFor(viewportElement);pos[0]=box.screenX-vpBox.screenX;pos[1]=box.screenY-vpBox.screenY;}else{pos[0]=forElement.offsetLeft;pos[1]=forElement.offsetTop;parent=forElement.offsetParent;if(parent!=forElement){while(parent){pos[0]+=parent.offsetLeft;pos[1]+=parent.offsetTop;parent=parent.offsetParent;}}
+var browser=OpenLayers.BROWSER_NAME;if(browser=="opera"||(browser=="safari"&&OpenLayers.Element.getStyle(forElement,'position')=='absolute')){pos[1]-=document.body.offsetTop;}
+parent=forElement.offsetParent;while(parent&&parent!=document.body){pos[0]-=parent.scrollLeft;if(browser!="opera"||parent.tagName!='TR'){pos[1]-=parent.scrollTop;}
+parent=parent.offsetParent;}}
+return pos;};OpenLayers.Util.getViewportElement=function(){var viewportElement=arguments.callee.viewportElement;if(viewportElement==undefined){viewportElement=(OpenLayers.BROWSER_NAME=="msie"&&document.compatMode!='CSS1Compat')?document.body:document.documentElement;arguments.callee.viewportElement=viewportElement;}
+return viewportElement;};OpenLayers.Util.isEquivalentUrl=function(url1,url2,options){options=options||{};OpenLayers.Util.applyDefaults(options,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var urlObj1=OpenLayers.Util.createUrlObject(url1,options);var urlObj2=OpenLayers.Util.createUrlObject(url2,options);for(var key in urlObj1){if(key!=="args"){if(urlObj1[key]!=urlObj2[key]){return false;}}}
+for(var key in urlObj1.args){if(urlObj1.args[key]!=urlObj2.args[key]){return false;}
+delete urlObj2.args[key];}
+for(var key in urlObj2.args){return false;}
+return true;};OpenLayers.Util.createUrlObject=function(url,options){options=options||{};if(!(/^\w+:\/\//).test(url)){var loc=window.location;var port=loc.port?":"+loc.port:"";var fullUrl=loc.protocol+"//"+loc.host.split(":").shift()+port;if(url.indexOf("/")===0){url=fullUrl+url;}else{var parts=loc.pathname.split("/");parts.pop();url=fullUrl+parts.join("/")+"/"+url;}}
+if(options.ignoreCase){url=url.toLowerCase();}
+var a=document.createElement('a');a.href=url;var urlObject={};urlObject.host=a.host.split(":").shift();urlObject.protocol=a.protocol;if(options.ignorePort80){urlObject.port=(a.port=="80"||a.port=="0")?"":a.port;}else{urlObject.port=(a.port==""||a.port=="0")?"80":a.port;}
+urlObject.hash=(options.ignoreHash||a.hash==="#")?"":a.hash;var queryString=a.search;if(!queryString){var qMark=url.indexOf("?");queryString=(qMark!=-1)?url.substr(qMark):"";}
+urlObject.args=OpenLayers.Util.getParameters(queryString);urlObject.pathname=(a.pathname.charAt(0)=="/")?a.pathname:"/"+a.pathname;return urlObject;};OpenLayers.Util.removeTail=function(url){var head=null;var qMark=url.indexOf("?");var hashMark=url.indexOf("#");if(qMark==-1){head=(hashMark!=-1)?url.substr(0,hashMark):url;}else{head=(hashMark!=-1)?url.substr(0,Math.min(qMark,hashMark)):url.substr(0,qMark);}
+return head;};OpenLayers.IS_GECKO=(function(){var ua=navigator.userAgent.toLowerCase();return ua.indexOf("webkit")==-1&&ua.indexOf("gecko")!=-1;})();OpenLayers.CANVAS_SUPPORTED=(function(){var elem=document.createElement('canvas');return!!(elem.getContext&&elem.getContext('2d'));})();OpenLayers.BROWSER_NAME=(function(){var name="";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){name="opera";}else if(ua.indexOf("msie")!=-1){name="msie";}else if(ua.indexOf("safari")!=-1){name="safari";}else if(ua.indexOf("mozilla")!=-1){if(ua.indexOf("firefox")!=-1){name="firefox";}else{name="mozilla";}}
+return name;})();OpenLayers.Util.getBrowserName=function(){return OpenLayers.BROWSER_NAME;};OpenLayers.Util.getRenderedDimensions=function(contentHTML,size,options){var w,h;var container=document.createElement("div");container.style.visibility="hidden";var containerElement=(options&&options.containerElement)?options.containerElement:document.body;var parentHasPositionAbsolute=false;var superContainer=null;var parent=containerElement;while(parent&&parent.tagName.toLowerCase()!="body"){var parentPosition=OpenLayers.Element.getStyle(parent,"position");if(parentPosition=="absolute"){parentHasPositionAbsolute=true;break;}else if(parentPosition&&parentPosition!="static"){break;}
+parent=parent.parentNode;}
+if(parentHasPositionAbsolute&&(containerElement.clientHeight===0||containerElement.clientWidth===0)){superContainer=document.createElement("div");superContainer.style.visibility="hidden";superContainer.style.position="absolute";superContainer.style.overflow="visible";superContainer.style.width=document.body.clientWidth+"px";superContainer.style.height=document.body.clientHeight+"px";superContainer.appendChild(container);}
+container.style.position="absolute";if(size){if(size.w){w=size.w;container.style.width=w+"px";}else if(size.h){h=size.h;container.style.height=h+"px";}}
+if(options&&options.displayClass){container.className=options.displayClass;}
+var content=document.createElement("div");content.innerHTML=contentHTML;content.style.overflow="visible";if(content.childNodes){for(var i=0,l=content.childNodes.length;i<l;i++){if(!content.childNodes[i].style)continue;content.childNodes[i].style.overflow="visible";}}
+container.appendChild(content);if(superContainer){containerElement.appendChild(superContainer);}else{containerElement.appendChild(container);}
+if(!w){w=parseInt(content.scrollWidth);container.style.width=w+"px";}
+if(!h){h=parseInt(content.scrollHeight);}
+container.removeChild(content);if(superContainer){superContainer.removeChild(container);containerElement.removeChild(superContainer);}else{containerElement.removeChild(container);}
+return new OpenLayers.Size(w,h);};OpenLayers.Util.getScrollbarWidth=function(){var scrollbarWidth=OpenLayers.Util._scrollbarWidth;if(scrollbarWidth==null){var scr=null;var inn=null;var wNoScroll=0;var wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='scroll';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);OpenLayers.Util._scrollbarWidth=(wNoScroll-wScroll);scrollbarWidth=OpenLayers.Util._scrollbarWidth;}
+return scrollbarWidth;};OpenLayers.Util.getFormattedLonLat=function(coordinate,axis,dmsOption){if(!dmsOption){dmsOption='dms';}
+coordinate=(coordinate+540)%360-180;var abscoordinate=Math.abs(coordinate);var coordinatedegrees=Math.floor(abscoordinate);var coordinateminutes=(abscoordinate-coordinatedegrees)/(1/60);var tempcoordinateminutes=coordinateminutes;coordinateminutes=Math.floor(coordinateminutes);var coordinateseconds=(tempcoordinateminutes-coordinateminutes)/(1/60);coordinateseconds=Math.round(coordinateseconds*10);coordinateseconds/=10;if(coordinateseconds>=60){coordinateseconds-=60;coordinateminutes+=1;if(coordinateminutes>=60){coordinateminutes-=60;coordinatedegrees+=1;}}
+if(coordinatedegrees<10){coordinatedegrees="0"+coordinatedegrees;}
+var str=coordinatedegrees+"\u00B0";if(dmsOption.indexOf('dm')>=0){if(coordinateminutes<10){coordinateminutes="0"+coordinateminutes;}
+str+=coordinateminutes+"'";if(dmsOption.indexOf('dms')>=0){if(coordinateseconds<10){coordinateseconds="0"+coordinateseconds;}
+str+=coordinateseconds+'"';}}
+if(axis=="lon"){str+=coordinate<0?OpenLayers.i18n("W"):OpenLayers.i18n("E");}else{str+=coordinate<0?OpenLayers.i18n("S"):OpenLayers.i18n("N");}
+return str;};OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:null,popup:null,initialize:function(layer,lonlat,data){this.layer=layer;this.lonlat=lonlat;this.data=(data!=null)?data:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup);}}
+if(this.layer!=null&&this.marker!=null){this.layer.removeMarker(this.marker);}
+this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null;}
+if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null;}},onScreen:function(){var onScreen=false;if((this.layer!=null)&&(this.layer.map!=null)){var screenBounds=this.layer.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);}
+return onScreen;},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);}
+return this.marker;},destroyMarker:function(){this.marker.destroy();},createPopup:function(closeBox){if(this.lonlat!=null){if(!this.popup){var anchor=(this.marker)?this.marker.icon:null;var popupClass=this.popupClass?this.popupClass:OpenLayers.Popup.Anchored;this.popup=new popupClass(this.id+"_popup",this.lonlat,this.data.popupSize,this.data.popupContentHTML,anchor,closeBox);}
+if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow;}
+this.popup.feature=this;}
+return this.popup;},destroyPopup:function(){if(this.popup){this.popup.feature=null;this.popup.destroy();this.popup=null;}},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.State={UNKNOWN:'Unknown',INSERT:'Insert',UPDATE:'Update',DELETE:'Delete'};OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,url:null,renderIntent:"default",modified:null,initialize:function(geometry,attributes,style){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,attributes]);this.lonlat=null;this.geometry=geometry?geometry:null;this.state=null;this.attributes={};if(attributes){this.attributes=OpenLayers.Util.extend(this.attributes,attributes);}
+this.style=style?style:null;},destroy:function(){if(this.layer){this.layer.removeFeatures(this);this.layer=null;}
+this.geometry=null;this.modified=null;OpenLayers.Feature.prototype.destroy.apply(this,arguments);},clone:function(){return new OpenLayers.Feature.Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style);},onScreen:function(boundsOnly){var onScreen=false;if(this.layer&&this.layer.map){var screenBounds=this.layer.map.getExtent();if(boundsOnly){var featureBounds=this.geometry.getBounds();onScreen=screenBounds.intersectsBounds(featureBounds);}else{var screenPoly=screenBounds.toGeometry();onScreen=screenPoly.intersects(this.geometry);}}
+return onScreen;},getVisibility:function(){return!(this.style&&this.style.display=='none'||!this.layer||this.layer&&this.layer.styleMap&&this.layer.styleMap.createSymbolizer(this,this.renderIntent).display=='none'||this.layer&&!this.layer.getVisibility());},createMarker:function(){return null;},destroyMarker:function(){},createPopup:function(){return null;},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;if(this.geometry){atPoint=this.geometry.atPoint(lonlat,toleranceLon,toleranceLat);}
+return atPoint;},destroyPopup:function(){},move:function(location){if(!this.layer||!this.geometry.move){return undefined;}
+var pixel;if(location.CLASS_NAME=="OpenLayers.LonLat"){pixel=this.layer.getViewPortPxFromLonLat(location);}else{pixel=location;}
+var lastPixel=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());var res=this.layer.map.getResolution();this.geometry.move(res*(pixel.x-lastPixel.x),res*(lastPixel.y-pixel.y));this.layer.drawFeature(this);return lastPixel;},toState:function(state){if(state==OpenLayers.State.UPDATE){switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=state;break;case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break;}}else if(state==OpenLayers.State.INSERT){switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=state;break;}}else if(state==OpenLayers.State.DELETE){switch(this.state){case OpenLayers.State.INSERT:break;case OpenLayers.State.DELETE:break;case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state=state;break;}}else if(state==OpenLayers.State.UNKNOWN){this.state=state;}},CLASS_NAME:"OpenLayers.Feature.Vector"});OpenLayers.Feature.Vector.style={'default':{fillColor:"#ee9900",fil
lOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},'select':{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},'temporary':{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",str
okeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},'delete':{display:"none"}};OpenLayers.Style=OpenLayers.Class({id:null,name:null,title:null,description:null,layerName:null,isDefault:false,rules:null,context:null,defaultStyle:null,defaultsPerSymbolizer:false,propertyStyles:null,initialize:function(style,options){OpenLayers.Util.extend(this,options);this.rules=[];if(options&&options.rules){this.addRules(options.rules);}
+this.setDefaultStyle(style||OpenLayers.Feature.Vector.style["default"]);this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){for(var i=0,len=this.rules.length;i<len;i++){this.rules[i].destroy();this.rules[i]=null;}
+this.rules=null;this.defaultStyle=null;},createSymbolizer:function(feature){var style=this.defaultsPerSymbolizer?{}:this.createLiterals(OpenLayers.Util.extend({},this.defaultStyle),feature);var rules=this.rules;var rule,context;var elseRules=[];var appliedRules=false;for(var i=0,len=rules.length;i<len;i++){rule=rules[i];var applies=rule.evaluate(feature);if(applies){if(rule instanceof OpenLayers.Rule&&rule.elseFilter){elseRules.push(rule);}else{appliedRules=true;this.applySymbolizer(rule,style,feature);}}}
+if(appliedRules==false&&elseRules.length>0){appliedRules=true;for(var i=0,len=elseRules.length;i<len;i++){this.applySymbolizer(elseRules[i],style,feature);}}
+if(rules.length>0&&appliedRules==false){style.display="none";}
+if(style.label!=null&&typeof style.label!=="string"){style.label=String(style.label);}
+return style;},applySymbolizer:function(rule,style,feature){var symbolizerPrefix=feature.geometry?this.getSymbolizerPrefix(feature.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var symbolizer=rule.symbolizer[symbolizerPrefix]||rule.symbolizer;if(this.defaultsPerSymbolizer===true){var defaults=this.defaultStyle;OpenLayers.Util.applyDefaults(symbolizer,{pointRadius:defaults.pointRadius});if(symbolizer.stroke===true||symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{strokeWidth:defaults.strokeWidth,strokeColor:defaults.strokeColor,strokeOpacity:defaults.strokeOpacity,strokeDashstyle:defaults.strokeDashstyle,strokeLinecap:defaults.strokeLinecap});}
+if(symbolizer.fill===true||symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{fillColor:defaults.fillColor,fillOpacity:defaults.fillOpacity});}
+if(symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{pointRadius:this.defaultStyle.pointRadius,externalGraphic:this.defaultStyle.externalGraphic,graphicName:this.defaultStyle.graphicName,graphicOpacity:this.defaultStyle.graphicOpacity,graphicWidth:this.defaultStyle.graphicWidth,graphicHeight:this.defaultStyle.graphicHeight,graphicXOffset:this.defaultStyle.graphicXOffset,graphicYOffset:this.defaultStyle.graphicYOffset});}}
+return this.createLiterals(OpenLayers.Util.extend(style,symbolizer),feature);},createLiterals:function(style,feature){var context=OpenLayers.Util.extend({},feature.attributes||feature.data);OpenLayers.Util.extend(context,this.context);for(var i in this.propertyStyles){style[i]=OpenLayers.Style.createLiteral(style[i],context,feature,i);}
+return style;},findPropertyStyles:function(){var propertyStyles={};var style=this.defaultStyle;this.addPropertyStyles(propertyStyles,style);var rules=this.rules;var symbolizer,value;for(var i=0,len=rules.length;i<len;i++){symbolizer=rules[i].symbolizer;for(var key in symbolizer){value=symbolizer[key];if(typeof value=="object"){this.addPropertyStyles(propertyStyles,value);}else{this.addPropertyStyles(propertyStyles,symbolizer);break;}}}
+return propertyStyles;},addPropertyStyles:function(propertyStyles,symbolizer){var property;for(var key in symbolizer){property=symbolizer[key];if(typeof property=="string"&&property.match(/\$\{\w+\}/)){propertyStyles[key]=true;}}
+return propertyStyles;},addRules:function(rules){Array.prototype.push.apply(this.rules,rules);this.propertyStyles=this.findPropertyStyles();},setDefaultStyle:function(style){this.defaultStyle=style;this.propertyStyles=this.findPropertyStyles();},getSymbolizerPrefix:function(geometry){var prefixes=OpenLayers.Style.SYMBOLIZER_PREFIXES;for(var i=0,len=prefixes.length;i<len;i++){if(geometry.CLASS_NAME.indexOf(prefixes[i])!=-1){return prefixes[i];}}},clone:function(){var options=OpenLayers.Util.extend({},this);if(this.rules){options.rules=[];for(var i=0,len=this.rules.length;i<len;++i){options.rules.push(this.rules[i].clone());}}
+options.context=this.context&&OpenLayers.Util.extend({},this.context);var defaultStyle=OpenLayers.Util.extend({},this.defaultStyle);return new OpenLayers.Style(defaultStyle,options);},CLASS_NAME:"OpenLayers.Style"});OpenLayers.Style.createLiteral=function(value,context,feature,property){if(typeof value=="string"&&value.indexOf("${")!=-1){value=OpenLayers.String.format(value,context,[feature,property]);value=(isNaN(value)||!value)?value:parseFloat(value);}
+return value;};OpenLayers.Style.SYMBOLIZER_PREFIXES=['Point','Line','Polygon','Text','Raster'];OpenLayers.Animation=(function(window){var isNative=!!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame);var requestFrame=(function(){var request=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback,element){window.setTimeout(callback,16);};return function(callback,element){request.apply(window,[callback,element]);};})();var counter=0;var loops={};function start(callback,duration,element){duration=duration>0?duration:Number.POSITIVE_INFINITY;var id=++counter;var start=+new Date;loops[id]=function(){if(loops[id]&&+new Date-start<=duration){callback();if(loops[id]){requestFrame(loops[id],element);}}else{delete loops[id];}};requestFrame(loops[id],ele
ment);return id;}
+function stop(id){delete loops[id];}
+return{isNative:isNative,requestFrame:requestFrame,start:start,stop:stop};})(window);OpenLayers.Tween=OpenLayers.Class({easing:null,begin:null,finish:null,duration:null,callbacks:null,time:null,animationId:null,playing:false,initialize:function(easing){this.easing=(easing)?easing:OpenLayers.Easing.Expo.easeOut;},start:function(begin,finish,duration,options){this.playing=true;this.begin=begin;this.finish=finish;this.duration=duration;this.callbacks=options.callbacks;this.time=0;OpenLayers.Animation.stop(this.animationId);this.animationId=null;if(this.callbacks&&this.callbacks.start){this.callbacks.start.call(this,this.begin);}
+this.animationId=OpenLayers.Animation.start(OpenLayers.Function.bind(this.play,this));},stop:function(){if(!this.playing){return;}
+if(this.callbacks&&this.callbacks.done){this.callbacks.done.call(this,this.finish);}
+OpenLayers.Animation.stop(this.animationId);this.animationId=null;this.playing=false;},play:function(){var value={};for(var i in this.begin){var b=this.begin[i];var f=this.finish[i];if(b==null||f==null||isNaN(b)||isNaN(f)){throw new TypeError('invalid value for Tween');}
+var c=f-b;value[i]=this.easing.apply(this,[this.time,b,c,this.duration]);}
+this.time++;if(this.callbacks&&this.callbacks.eachStep){this.callbacks.eachStep.call(this,value);}
+if(this.time>this.duration){this.stop();}},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(t,b,c,d){return c*t/d+b;},easeOut:function(t,b,c,d){return c*t/d+b;},easeInOut:function(t,b,c,d){return c*t/d+b;},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOut:function(t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOut:function(t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,boun
ds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){this.id=null;this.bounds=null;},clone:function(){return new OpenLayers.Geometry();},setBounds:function(bounds){if(bounds){this.bounds=bounds.clone();}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds();}},extendBounds:function(newBounds){var bounds=this.getBounds();if(!bounds){this.setBounds(newBounds);}else{this.bounds.extend(newBounds);}},getBounds:function(){if(this.bounds==null){this.calculateBounds();}
+return this.bounds;},calculateBounds:function(){},distanceTo:function(geometry,options){},getVertices:function(nodes){},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;var bounds=this.getBounds();if((bounds!=null)&&(lonlat!=null)){var dX=(toleranceLon!=null)?toleranceLon:0;var dY=(toleranceLat!=null)?toleranceLat:0;var toleranceBounds=new OpenLayers.Bounds(this.bounds.left-dX,this.bounds.bottom-dY,this.bounds.right+dX,this.bounds.top+dY);atPoint=toleranceBounds.containsLonLat(lonlat);}
+return atPoint;},getLength:function(){return 0.0;},getArea:function(){return 0.0;},getCentroid:function(){return null;},toString:function(){var string;if(OpenLayers.Format&&OpenLayers.Format.WKT){string=OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this));}else{string=Object.prototype.toString.call(this);}
+return string;},CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Geometry.fromWKT=function(wkt){var geom;if(OpenLayers.Format&&OpenLayers.Format.WKT){var format=OpenLayers.Geometry.fromWKT.format;if(!format){format=new OpenLayers.Format.WKT();OpenLayers.Geometry.fromWKT.format=format;}
+var result=format.read(wkt);if(result instanceof OpenLayers.Feature.Vector){geom=result.geometry;}else if(OpenLayers.Util.isArray(result)){var len=result.length;var components=new Array(len);for(var i=0;i<len;++i){components[i]=result[i].geometry;}
+geom=new OpenLayers.Geometry.Collection(components);}}
+return geom;};OpenLayers.Geometry.segmentsIntersect=function(seg1,seg2,options){var point=options&&options.point;var tolerance=options&&options.tolerance;var intersection=false;var x11_21=seg1.x1-seg2.x1;var y11_21=seg1.y1-seg2.y1;var x12_11=seg1.x2-seg1.x1;var y12_11=seg1.y2-seg1.y1;var y22_21=seg2.y2-seg2.y1;var x22_21=seg2.x2-seg2.x1;var d=(y22_21*x12_11)-(x22_21*y12_11);var n1=(x22_21*y11_21)-(y22_21*x11_21);var n2=(x12_11*y11_21)-(y12_11*x11_21);if(d==0){if(n1==0&&n2==0){intersection=true;}}else{var along1=n1/d;var along2=n2/d;if(along1>=0&&along1<=1&&along2>=0&&along2<=1){if(!point){intersection=true;}else{var x=seg1.x1+(along1*x12_11);var y=seg1.y1+(along1*y12_11);intersection=new OpenLayers.Geometry.Point(x,y);}}}
+if(tolerance){var dist;if(intersection){if(point){var segs=[seg1,seg2];var seg,x,y;outer:for(var i=0;i<2;++i){seg=segs[i];for(var j=1;j<3;++j){x=seg["x"+j];y=seg["y"+j];dist=Math.sqrt(Math.pow(x-intersection.x,2)+
+Math.pow(y-intersection.y,2));if(dist<tolerance){intersection.x=x;intersection.y=y;break outer;}}}}}else{var segs=[seg1,seg2];var source,target,x,y,p,result;outer:for(var i=0;i<2;++i){source=segs[i];target=segs[(i+1)%2];for(var j=1;j<3;++j){p={x:source["x"+j],y:source["y"+j]};result=OpenLayers.Geometry.distanceToSegment(p,target);if(result.distance<tolerance){if(point){intersection=new OpenLayers.Geometry.Point(p.x,p.y);}else{intersection=true;}
+break outer;}}}}}
+return intersection;};OpenLayers.Geometry.distanceToSegment=function(point,segment){var x0=point.x;var y0=point.y;var x1=segment.x1;var y1=segment.y1;var x2=segment.x2;var y2=segment.y2;var dx=x2-x1;var dy=y2-y1;var along=((dx*(x0-x1))+(dy*(y0-y1)))/(Math.pow(dx,2)+Math.pow(dy,2));var x,y;if(along<=0.0){x=x1;y=y1;}else if(along>=1.0){x=x2;y=y2;}else{x=x1+along*dx;y=y1+along*dy;}
+return{distance:Math.sqrt(Math.pow(x-x0,2)+Math.pow(y-y0,2)),x:x,y:y};};OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(components){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(components!=null){this.addComponents(components);}},destroy:function(){this.components.length=0;this.components=null;OpenLayers.Geometry.prototype.destroy.apply(this,arguments);},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0,len=this.components.length;i<len;i++){geometry.addComponent(this.components[i].clone());}
+OpenLayers.Util.applyDefaults(geometry,this);return geometry;},getComponentsString:function(){var strings=[];for(var i=0,len=this.components.length;i<len;i++){strings.push(this.components[i].toShortString());}
+return strings.join(",");},calculateBounds:function(){this.bounds=null;var bounds=new OpenLayers.Bounds();var components=this.components;if(components){for(var i=0,len=components.length;i<len;i++){bounds.extend(components[i].getBounds());}}
+if(bounds.left!=null&&bounds.bottom!=null&&bounds.right!=null&&bounds.top!=null){this.setBounds(bounds);}},addComponents:function(components){if(!(OpenLayers.Util.isArray(components))){components=[components];}
+for(var i=0,len=components.length;i<len;i++){this.addComponent(components[i]);}},addComponent:function(component,index){var added=false;if(component){if(this.componentTypes==null||(OpenLayers.Util.indexOf(this.componentTypes,component.CLASS_NAME)>-1)){if(index!=null&&(index<this.components.length)){var components1=this.components.slice(0,index);var components2=this.components.slice(index,this.components.length);components1.push(component);this.components=components1.concat(components2);}else{this.components.push(component);}
+component.parent=this;this.clearBounds();added=true;}}
+return added;},removeComponents:function(components){var removed=false;if(!(OpenLayers.Util.isArray(components))){components=[components];}
+for(var i=components.length-1;i>=0;--i){removed=this.removeComponent(components[i])||removed;}
+return removed;},removeComponent:function(component){OpenLayers.Util.removeItem(this.components,component);this.clearBounds();return true;},getLength:function(){var length=0.0;for(var i=0,len=this.components.length;i<len;i++){length+=this.components[i].getLength();}
+return length;},getArea:function(){var area=0.0;for(var i=0,len=this.components.length;i<len;i++){area+=this.components[i].getArea();}
+return area;},getGeodesicArea:function(projection){var area=0.0;for(var i=0,len=this.components.length;i<len;i++){area+=this.components[i].getGeodesicArea(projection);}
+return area;},getCentroid:function(weighted){if(!weighted){return this.components.length&&this.components[0].getCentroid();}
+var len=this.components.length;if(!len){return false;}
+var areas=[];var centroids=[];var areaSum=0;var minArea=Number.MAX_VALUE;var component;for(var i=0;i<len;++i){component=this.components[i];var area=component.getArea();var centroid=component.getCentroid(true);if(isNaN(area)||isNaN(centroid.x)||isNaN(centroid.y)){continue;}
+areas.push(area);areaSum+=area;minArea=(area<minArea&&area>0)?area:minArea;centroids.push(centroid);}
+len=areas.length;if(areaSum===0){for(var i=0;i<len;++i){areas[i]=1;}
+areaSum=areas.length;}else{for(var i=0;i<len;++i){areas[i]/=minArea;}
+areaSum/=minArea;}
+var xSum=0,ySum=0,centroid,area;for(var i=0;i<len;++i){centroid=centroids[i];area=areas[i];xSum+=centroid.x*area;ySum+=centroid.y*area;}
+return new OpenLayers.Geometry.Point(xSum/areaSum,ySum/areaSum);},getGeodesicLength:function(projection){var length=0.0;for(var i=0,len=this.components.length;i<len;i++){length+=this.components[i].getGeodesicLength(projection);}
+return length;},move:function(x,y){for(var i=0,len=this.components.length;i<len;i++){this.components[i].move(x,y);}},rotate:function(angle,origin){for(var i=0,len=this.components.length;i<len;++i){this.components[i].rotate(angle,origin);}},resize:function(scale,origin,ratio){for(var i=0;i<this.components.length;++i){this.components[i].resize(scale,origin,ratio);}
+return this;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var result,best,distance;var min=Number.POSITIVE_INFINITY;for(var i=0,len=this.components.length;i<len;++i){result=this.components[i].distanceTo(geometry,options);distance=details?result.distance:result;if(distance<min){min=distance;best=result;if(min==0){break;}}}
+return best;},equals:function(geometry){var equivalent=true;if(!geometry||!geometry.CLASS_NAME||(this.CLASS_NAME!=geometry.CLASS_NAME)){equivalent=false;}else if(!(OpenLayers.Util.isArray(geometry.components))||(geometry.components.length!=this.components.length)){equivalent=false;}else{for(var i=0,len=this.components.length;i<len;++i){if(!this.components[i].equals(geometry.components[i])){equivalent=false;break;}}}
+return equivalent;},transform:function(source,dest){if(source&&dest){for(var i=0,len=this.components.length;i<len;i++){var component=this.components[i];component.transform(source,dest);}
+this.bounds=null;}
+return this;},intersects:function(geometry){var intersect=false;for(var i=0,len=this.components.length;i<len;++i){intersect=geometry.intersects(this.components[i]);if(intersect){break;}}
+return intersect;},getVertices:function(nodes){var vertices=[];for(var i=0,len=this.components.length;i<len;++i){Array.prototype.push.apply(vertices,this.components[i].getVertices(nodes));}
+return vertices;},CLASS_NAME:"OpenLayers.Geometry.Collection"});OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(x,y){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(x);this.y=parseFloat(y);},clone:function(obj){if(obj==null){obj=new OpenLayers.Geometry.Point(this.x,this.y);}
+OpenLayers.Util.applyDefaults(obj,this);return obj;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y);},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var distance,x0,y0,x1,y1,result;if(geometry instanceof OpenLayers.Geometry.Point){x0=this.x;y0=this.y;x1=geometry.x;y1=geometry.y;distance=Math.sqrt(Math.pow(x0-x1,2)+Math.pow(y0-y1,2));result=!details?distance:{x0:x0,y0:y0,x1:x1,y1:y1,distance:distance};}else{result=geometry.distanceTo(this,options);if(details){result={x0:result.x1,y0:result.y1,x1:result.x0,y1:result.y0,distance:result.distance};}}
+return result;},equals:function(geom){var equals=false;if(geom!=null){equals=((this.x==geom.x&&this.y==geom.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(geom.x)&&isNaN(geom.y)));}
+return equals;},toShortString:function(){return(this.x+", "+this.y);},move:function(x,y){this.x=this.x+x;this.y=this.y+y;this.clearBounds();},rotate:function(angle,origin){angle*=Math.PI/180;var radius=this.distanceTo(origin);var theta=angle+Math.atan2(this.y-origin.y,this.x-origin.x);this.x=origin.x+(radius*Math.cos(theta));this.y=origin.y+(radius*Math.sin(theta));this.clearBounds();},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y);},resize:function(scale,origin,ratio){ratio=(ratio==undefined)?1:ratio;this.x=origin.x+(scale*ratio*(this.x-origin.x));this.y=origin.y+(scale*(this.y-origin.y));this.clearBounds();return this;},intersects:function(geometry){var intersect=false;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.equals(geometry);}else{intersect=geometry.intersects(this);}
+return intersect;},transform:function(source,dest){if((source&&dest)){OpenLayers.Projection.transform(this,source,dest);this.bounds=null;}
+return this;},getVertices:function(nodes){return[this];},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.MultiPoint=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Point"],addPoint:function(point,index){this.addComponent(point,index);},removePoint:function(point){this.removeComponent(point);},CLASS_NAME:"OpenLayers.Geometry.MultiPoint"});OpenLayers.Geometry.Curve=OpenLayers.Class(OpenLayers.Geometry.MultiPoint,{componentTypes:["OpenLayers.Geometry.Point"],getLength:function(){var length=0.0;if(this.components&&(this.components.length>1)){for(var i=1,len=this.components.length;i<len;i++){length+=this.components[i-1].distanceTo(this.components[i]);}}
+return length;},getGeodesicLength:function(projection){var geom=this;if(projection){var gg=new OpenLayers.Projection("EPSG:4326");if(!gg.equals(projection)){geom=this.clone().transform(projection,gg);}}
+var length=0.0;if(geom.components&&(geom.components.length>1)){var p1,p2;for(var i=1,len=geom.components.length;i<len;i++){p1=geom.components[i-1];p2=geom.components[i];length+=OpenLayers.Util.distVincenty({lon:p1.x,lat:p1.y},{lon:p2.x,lat:p2.y});}}
+return length*1000;},CLASS_NAME:"OpenLayers.Geometry.Curve"});OpenLayers.Geometry.LineString=OpenLayers.Class(OpenLayers.Geometry.Curve,{removeComponent:function(point){var removed=this.components&&(this.components.length>2);if(removed){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}
+return removed;},intersects:function(geometry){var intersect=false;var type=geometry.CLASS_NAME;if(type=="OpenLayers.Geometry.LineString"||type=="OpenLayers.Geometry.LinearRing"||type=="OpenLayers.Geometry.Point"){var segs1=this.getSortedSegments();var segs2;if(type=="OpenLayers.Geometry.Point"){segs2=[{x1:geometry.x,y1:geometry.y,x2:geometry.x,y2:geometry.y}];}else{segs2=geometry.getSortedSegments();}
+var seg1,seg1x1,seg1x2,seg1y1,seg1y2,seg2,seg2y1,seg2y2;outer:for(var i=0,len=segs1.length;i<len;++i){seg1=segs1[i];seg1x1=seg1.x1;seg1x2=seg1.x2;seg1y1=seg1.y1;seg1y2=seg1.y2;inner:for(var j=0,jlen=segs2.length;j<jlen;++j){seg2=segs2[j];if(seg2.x1>seg1x2){break;}
+if(seg2.x2<seg1x1){continue;}
+seg2y1=seg2.y1;seg2y2=seg2.y2;if(Math.min(seg2y1,seg2y2)>Math.max(seg1y1,seg1y2)){continue;}
+if(Math.max(seg2y1,seg2y2)<Math.min(seg1y1,seg1y2)){continue;}
+if(OpenLayers.Geometry.segmentsIntersect(seg1,seg2)){intersect=true;break outer;}}}}else{intersect=geometry.intersects(this);}
+return intersect;},getSortedSegments:function(){var numSeg=this.components.length-1;var segments=new Array(numSeg),point1,point2;for(var i=0;i<numSeg;++i){point1=this.components[i];point2=this.components[i+1];if(point1.x<point2.x){segments[i]={x1:point1.x,y1:point1.y,x2:point2.x,y2:point2.y};}else{segments[i]={x1:point2.x,y1:point2.y,x2:point1.x,y2:point1.y};}}
+function byX1(seg1,seg2){return seg1.x1-seg2.x1;}
+return segments.sort(byX1);},splitWithSegment:function(seg,options){var edge=!(options&&options.edge===false);var tolerance=options&&options.tolerance;var lines=[];var verts=this.getVertices();var points=[];var intersections=[];var split=false;var vert1,vert2,point;var node,vertex,target;var interOptions={point:true,tolerance:tolerance};var result=null;for(var i=0,stop=verts.length-2;i<=stop;++i){vert1=verts[i];points.push(vert1.clone());vert2=verts[i+1];target={x1:vert1.x,y1:vert1.y,x2:vert2.x,y2:vert2.y};point=OpenLayers.Geometry.segmentsIntersect(seg,target,interOptions);if(point instanceof OpenLayers.Geometry.Point){if((point.x===seg.x1&&point.y===seg.y1)||(point.x===seg.x2&&point.y===seg.y2)||point.equals(vert1)||point.equals(vert2)){vertex=true;}else{vertex=false;}
+if(vertex||edge){if(!point.equals(intersections[intersections.length-1])){intersections.push(point.clone());}
+if(i===0){if(point.equals(vert1)){continue;}}
+if(point.equals(vert2)){continue;}
+split=true;if(!point.equals(vert1)){points.push(point);}
+lines.push(new OpenLayers.Geometry.LineString(points));points=[point.clone()];}}}
+if(split){points.push(vert2.clone());lines.push(new OpenLayers.Geometry.LineString(points));}
+if(intersections.length>0){var xDir=seg.x1<seg.x2?1:-1;var yDir=seg.y1<seg.y2?1:-1;result={lines:lines,points:intersections.sort(function(p1,p2){return(xDir*p1.x-xDir*p2.x)||(yDir*p1.y-yDir*p2.y);})};}
+return result;},split:function(target,options){var results=null;var mutual=options&&options.mutual;var sourceSplit,targetSplit,sourceParts,targetParts;if(target instanceof OpenLayers.Geometry.LineString){var verts=this.getVertices();var vert1,vert2,seg,splits,lines,point;var points=[];sourceParts=[];for(var i=0,stop=verts.length-2;i<=stop;++i){vert1=verts[i];vert2=verts[i+1];seg={x1:vert1.x,y1:vert1.y,x2:vert2.x,y2:vert2.y};targetParts=targetParts||[target];if(mutual){points.push(vert1.clone());}
+for(var j=0;j<targetParts.length;++j){splits=targetParts[j].splitWithSegment(seg,options);if(splits){lines=splits.lines;if(lines.length>0){lines.unshift(j,1);Array.prototype.splice.apply(targetParts,lines);j+=lines.length-2;}
+if(mutual){for(var k=0,len=splits.points.length;k<len;++k){point=splits.points[k];if(!point.equals(vert1)){points.push(point);sourceParts.push(new OpenLayers.Geometry.LineString(points));if(point.equals(vert2)){points=[];}else{points=[point.clone()];}}}}}}}
+if(mutual&&sourceParts.length>0&&points.length>0){points.push(vert2.clone());sourceParts.push(new OpenLayers.Geometry.LineString(points));}}else{results=target.splitWith(this,options);}
+if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
+if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
+if(targetSplit||sourceSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
+return results;},splitWith:function(geometry,options){return geometry.split(this,options);},getVertices:function(nodes){var vertices;if(nodes===true){vertices=[this.components[0],this.components[this.components.length-1]];}else if(nodes===false){vertices=this.components.slice(1,this.components.length-1);}else{vertices=this.components.slice();}
+return vertices;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var result,best={};var min=Number.POSITIVE_INFINITY;if(geometry instanceof OpenLayers.Geometry.Point){var segs=this.getSortedSegments();var x=geometry.x;var y=geometry.y;var seg;for(var i=0,len=segs.length;i<len;++i){seg=segs[i];result=OpenLayers.Geometry.distanceToSegment(geometry,seg);if(result.distance<min){min=result.distance;best=result;if(min===0){break;}}else{if(seg.x2>x&&((y>seg.y1&&y<seg.y2)||(y<seg.y1&&y>seg.y2))){break;}}}
+if(details){best={distance:best.distance,x0:best.x,y0:best.y,x1:x,y1:y};}else{best=best.distance;}}else if(geometry instanceof OpenLayers.Geometry.LineString){var segs0=this.getSortedSegments();var segs1=geometry.getSortedSegments();var seg0,seg1,intersection,x0,y0;var len1=segs1.length;var interOptions={point:true};outer:for(var i=0,len=segs0.length;i<len;++i){seg0=segs0[i];x0=seg0.x1;y0=seg0.y1;for(var j=0;j<len1;++j){seg1=segs1[j];intersection=OpenLayers.Geometry.segmentsIntersect(seg0,seg1,interOptions);if(intersection){min=0;best={distance:0,x0:intersection.x,y0:intersection.y,x1:intersection.x,y1:intersection.y};break outer;}else{result=OpenLayers.Geometry.distanceToSegment({x:x0,y:y0},seg1);if(result.distance<min){min=result.distance;best={distance:min,x0:x0,y0:y0,x1:result.x,y1:result.y};}}}}
+if(!details){best=best.distance;}
+if(min!==0){if(seg0){result=geometry.distanceTo(new OpenLayers.Geometry.Point(seg0.x2,seg0.y2),options);var dist=details?result.distance:result;if(dist<min){if(details){best={distance:min,x0:result.x1,y0:result.y1,x1:result.x0,y1:result.y0};}else{best=dist;}}}}}else{best=geometry.distanceTo(this,options);if(details){best={distance:best.distance,x0:best.x1,y0:best.y1,x1:best.x0,y1:best.y0};}}
+return best;},simplify:function(tolerance){if(this&&this!==null){var points=this.getVertices();if(points.length<3){return this;}
+var compareNumbers=function(a,b){return(a-b);};var douglasPeuckerReduction=function(points,firstPoint,lastPoint,tolerance){var maxDistance=0;var indexFarthest=0;for(var index=firstPoint,distance;index<lastPoint;index++){distance=perpendicularDistance(points[firstPoint],points[lastPoint],points[index]);if(distance>maxDistance){maxDistance=distance;indexFarthest=index;}}
+if(maxDistance>tolerance&&indexFarthest!=firstPoint){pointIndexsToKeep.push(indexFarthest);douglasPeuckerReduction(points,firstPoint,indexFarthest,tolerance);douglasPeuckerReduction(points,indexFarthest,lastPoint,tolerance);}};var perpendicularDistance=function(point1,point2,point){var area=Math.abs(0.5*(point1.x*point2.y+point2.x*point.y+point.x*point1.y-point2.x*point1.y-point.x*point2.y-point1.x*point.y));var bottom=Math.sqrt(Math.pow(point1.x-point2.x,2)+Math.pow(point1.y-point2.y,2));var height=area/bottom*2;return height;};var firstPoint=0;var lastPoint=points.length-1;var pointIndexsToKeep=[];pointIndexsToKeep.push(firstPoint);pointIndexsToKeep.push(lastPoint);while(points[firstPoint].equals(points[lastPoint])){lastPoint--;pointIndexsToKeep.push(lastPoint);}
+douglasPeuckerReduction(points,firstPoint,lastPoint,tolerance);var returnPoints=[];pointIndexsToKeep.sort(compareNumbers);for(var index=0;index<pointIndexsToKeep.length;index++){returnPoints.push(points[pointIndexsToKeep[index]]);}
+return new OpenLayers.Geometry.LineString(returnPoints);}
+else{return this;}},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],addComponent:function(point,index){var added=false;var lastPoint=this.components.pop();if(index!=null||!point.equals(lastPoint)){added=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);}
+var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);return added;},removeComponent:function(point){var removed=this.components&&(this.components.length>3);if(removed){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);}
+return removed;},move:function(x,y){for(var i=0,len=this.components.length;i<len-1;i++){this.components[i].move(x,y);}},rotate:function(angle,origin){for(var i=0,len=this.components.length;i<len-1;++i){this.components[i].rotate(angle,origin);}},resize:function(scale,origin,ratio){for(var i=0,len=this.components.length;i<len-1;++i){this.components[i].resize(scale,origin,ratio);}
+return this;},transform:function(source,dest){if(source&&dest){for(var i=0,len=this.components.length;i<len-1;i++){var component=this.components[i];component.transform(source,dest);}
+this.bounds=null;}
+return this;},getCentroid:function(){if(this.components&&(this.components.length>2)){var sumX=0.0;var sumY=0.0;for(var i=0;i<this.components.length-1;i++){var b=this.components[i];var c=this.components[i+1];sumX+=(b.x+c.x)*(b.x*c.y-c.x*b.y);sumY+=(b.y+c.y)*(b.x*c.y-c.x*b.y);}
+var area=-1*this.getArea();var x=sumX/(6*area);var y=sumY/(6*area);return new OpenLayers.Geometry.Point(x,y);}else{return null;}},getArea:function(){var area=0.0;if(this.components&&(this.components.length>2)){var sum=0.0;for(var i=0,len=this.components.length;i<len-1;i++){var b=this.components[i];var c=this.components[i+1];sum+=(b.x+c.x)*(c.y-b.y);}
+area=-sum/2.0;}
+return area;},getGeodesicArea:function(projection){var ring=this;if(projection){var gg=new OpenLayers.Projection("EPSG:4326");if(!gg.equals(projection)){ring=this.clone().transform(projection,gg);}}
+var area=0.0;var len=ring.components&&ring.components.length;if(len>2){var p1,p2;for(var i=0;i<len-1;i++){p1=ring.components[i];p2=ring.components[i+1];area+=OpenLayers.Util.rad(p2.x-p1.x)*(2+Math.sin(OpenLayers.Util.rad(p1.y))+
+Math.sin(OpenLayers.Util.rad(p2.y)));}
+area=area*6378137.0*6378137.0/2.0;}
+return area;},containsPoint:function(point){var approx=OpenLayers.Number.limitSigDigs;var digs=14;var px=approx(point.x,digs);var py=approx(point.y,digs);function getX(y,x1,y1,x2,y2){return(y-y2)*((x2-x1)/(y2-y1))+x2;}
+var numSeg=this.components.length-1;var start,end,x1,y1,x2,y2,cx,cy;var crosses=0;for(var i=0;i<numSeg;++i){start=this.components[i];x1=approx(start.x,digs);y1=approx(start.y,digs);end=this.components[i+1];x2=approx(end.x,digs);y2=approx(end.y,digs);if(y1==y2){if(py==y1){if(x1<=x2&&(px>=x1&&px<=x2)||x1>=x2&&(px<=x1&&px>=x2)){crosses=-1;break;}}
+continue;}
+cx=approx(getX(py,x1,y1,x2,y2),digs);if(cx==px){if(y1<y2&&(py>=y1&&py<=y2)||y1>y2&&(py<=y1&&py>=y2)){crosses=-1;break;}}
+if(cx<=px){continue;}
+if(x1!=x2&&(cx<Math.min(x1,x2)||cx>Math.max(x1,x2))){continue;}
+if(y1<y2&&(py>=y1&&py<y2)||y1>y2&&(py<y1&&py>=y2)){++crosses;}}
+var contained=(crosses==-1)?1:!!(crosses&1);return contained;},intersects:function(geometry){var intersect=false;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.containsPoint(geometry);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){intersect=geometry.intersects(this);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){intersect=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[geometry]);}else{for(var i=0,len=geometry.components.length;i<len;++i){intersect=geometry.components[i].intersects(this);if(intersect){break;}}}
+return intersect;},getVertices:function(nodes){return(nodes===true)?[]:this.components.slice(0,this.components.length-1);},CLASS_NAME:"OpenLayers.Geometry.LinearRing"});OpenLayers.Geometry.Polygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LinearRing"],getArea:function(){var area=0.0;if(this.components&&(this.components.length>0)){area+=Math.abs(this.components[0].getArea());for(var i=1,len=this.components.length;i<len;i++){area-=Math.abs(this.components[i].getArea());}}
+return area;},getGeodesicArea:function(projection){var area=0.0;if(this.components&&(this.components.length>0)){area+=Math.abs(this.components[0].getGeodesicArea(projection));for(var i=1,len=this.components.length;i<len;i++){area-=Math.abs(this.components[i].getGeodesicArea(projection));}}
+return area;},containsPoint:function(point){var numRings=this.components.length;var contained=false;if(numRings>0){contained=this.components[0].containsPoint(point);if(contained!==1){if(contained&&numRings>1){var hole;for(var i=1;i<numRings;++i){hole=this.components[i].containsPoint(point);if(hole){if(hole===1){contained=1;}else{contained=false;}
+break;}}}}}
+return contained;},intersects:function(geometry){var intersect=false;var i,len;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.containsPoint(geometry);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"||geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){for(i=0,len=this.components.length;i<len;++i){intersect=geometry.intersects(this.components[i]);if(intersect){break;}}
+if(!intersect){for(i=0,len=geometry.components.length;i<len;++i){intersect=this.containsPoint(geometry.components[i]);if(intersect){break;}}}}else{for(i=0,len=geometry.components.length;i<len;++i){intersect=this.intersects(geometry.components[i]);if(intersect){break;}}}
+if(!intersect&&geometry.CLASS_NAME=="OpenLayers.Geometry.Polygon"){var ring=this.components[0];for(i=0,len=ring.components.length;i<len;++i){intersect=geometry.containsPoint(ring.components[i]);if(intersect){break;}}}
+return intersect;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var result;if(!edge&&this.intersects(geometry)){result=0;}else{result=OpenLayers.Geometry.Collection.prototype.distanceTo.apply(this,[geometry,options]);}
+return result;},CLASS_NAME:"OpenLayers.Geometry.Polygon"});OpenLayers.Geometry.Polygon.createRegularPolygon=function(origin,radius,sides,rotation){var angle=Math.PI*((1/sides)-(1/2));if(rotation){angle+=(rotation/180)*Math.PI;}
+var rotatedAngle,x,y;var points=[];for(var i=0;i<sides;++i){rotatedAngle=angle+(i*2*Math.PI/sides);x=origin.x+(radius*Math.cos(rotatedAngle));y=origin.y+(radius*Math.sin(rotatedAngle));points.push(new OpenLayers.Geometry.Point(x,y));}
+var ring=new OpenLayers.Geometry.LinearRing(points);return new OpenLayers.Geometry.Polygon([ring]);};OpenLayers.Event={observers:false,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(event){return event.target||event.srcElement;},isSingleTouch:function(event){return event.touches&&event.touches.length==1;},isMultiTouch:function(event){return event.touches&&event.touches.length>1;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},isRightClick:function(event){return(((event.which)&&(event.which==3))||((event.button)&&(event.button==2)));},stop:function(event,allowDefault){if(!allowDefault){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}}
+if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},findElement:function(event,tagName){var element=OpenLayers.Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))){element=element.parentNode;}
+return element;},observe:function(elementParam,name,observer,useCapture){var element=OpenLayers.Util.getElement(elementParam);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent)){name='keydown';}
+if(!this.observers){this.observers={};}
+if(!element._eventCacheID){var idPrefix="eventCacheID_";if(element.id){idPrefix=element.id+"_"+idPrefix;}
+element._eventCacheID=OpenLayers.Util.createUniqueID(idPrefix);}
+var cacheID=element._eventCacheID;if(!this.observers[cacheID]){this.observers[cacheID]=[];}
+this.observers[cacheID].push({'element':element,'name':name,'observer':observer,'useCapture':useCapture});if(element.addEventListener){element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){element.attachEvent('on'+name,observer);}},stopObservingElement:function(elementParam){var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[cacheID]);},_removeElementObservers:function(elementObservers){if(elementObservers){for(var i=elementObservers.length-1;i>=0;i--){var entry=elementObservers[i];var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);var removed=OpenLayers.Event.stopObserving.apply(this,args);}}},stopObserving:function(elementParam,name,observer,useCapture){useCapture=useCapture||false;var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;if(name=='keypress'){if(navigator.appVersion.match(/Konqueror|Sa
fari|KHTML/)||element.detachEvent){name='keydown';}}
+var foundEntry=false;var elementObservers=OpenLayers.Event.observers[cacheID];if(elementObservers){var i=0;while(!foundEntry&&i<elementObservers.length){var cacheEntry=elementObservers[i];if((cacheEntry.name==name)&&(cacheEntry.observer==observer)&&(cacheEntry.useCapture==useCapture)){elementObservers.splice(i,1);if(elementObservers.length==0){delete OpenLayers.Event.observers[cacheID];}
+foundEntry=true;break;}
+i++;}}
+if(foundEntry){if(element.removeEventListener){element.removeEventListener(name,observer,useCapture);}else if(element&&element.detachEvent){element.detachEvent('on'+name,observer);}}
+return foundEntry;},unloadCache:function(){if(OpenLayers.Event&&OpenLayers.Event.observers){for(var cacheID in OpenLayers.Event.observers){var elementObservers=OpenLayers.Event.observers[cacheID];OpenLayers.Event._removeElementObservers.apply(this,[elementObservers]);}
+OpenLayers.Event.observers=false;}},CLASS_NAME:"OpenLayers.Event"};OpenLayers.Event.observe(window,'unload',OpenLayers.Event.unloadCache,false);OpenLayers.Events=OpenLayers.Class({BROWSER_EVENTS:["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown"],listeners:null,object:null,element:null,eventHandler:null,fallThrough:null,includeXY:false,extensions:null,extensionCount:null,clearMouseListener:null,initialize:function(object,element,eventTypes,fallThrough,options){OpenLayers.Util.extend(this,options);this.object=object;this.fallThrough=fallThrough;this.listeners={};this.extensions={};this.extensionCount={};if(element!=null){this.attachToElement(element);}},destroy:function(){for(var e in this.extensions){if(typeof this.extensions[e]!=="boolean"){this.extensions[e].destroy();}}
+this.extensions=null;if(this.element){OpenLayers.Event.stopObservingElement(this.element);if(this.element.hasScrollEvent){OpenLayers.Event.stopObserving(window,"scroll",this.clearMouseListener);}}
+this.element=null;this.listeners=null;this.object=null;this.fallThrough=null;this.eventHandler=null;},addEventType:function(eventName){},attachToElement:function(element){if(this.element){OpenLayers.Event.stopObservingElement(this.element);}else{this.eventHandler=OpenLayers.Function.bindAsEventListener(this.handleBrowserEvent,this);this.clearMouseListener=OpenLayers.Function.bind(this.clearMouseCache,this);}
+this.element=element;for(var i=0,len=this.BROWSER_EVENTS.length;i<len;i++){OpenLayers.Event.observe(element,this.BROWSER_EVENTS[i],this.eventHandler);}
+OpenLayers.Event.observe(element,"dragstart",OpenLayers.Event.stop);},on:function(object){for(var type in object){if(type!="scope"&&object.hasOwnProperty(type)){this.register(type,object.scope,object[type]);}}},register:function(type,obj,func,priority){if(type in OpenLayers.Events&&!this.extensions[type]){this.extensions[type]=new OpenLayers.Events[type](this);}
+if(func!=null){if(obj==null){obj=this.object;}
+var listeners=this.listeners[type];if(!listeners){listeners=[];this.listeners[type]=listeners;this.extensionCount[type]=0;}
+var listener={obj:obj,func:func};if(priority){listeners.splice(this.extensionCount[type],0,listener);if(typeof priority==="object"&&priority.extension){this.extensionCount[type]++;}}else{listeners.push(listener);}}},registerPriority:function(type,obj,func){this.register(type,obj,func,true);},un:function(object){for(var type in object){if(type!="scope"&&object.hasOwnProperty(type)){this.unregister(type,object.scope,object[type]);}}},unregister:function(type,obj,func){if(obj==null){obj=this.object;}
+var listeners=this.listeners[type];if(listeners!=null){for(var i=0,len=listeners.length;i<len;i++){if(listeners[i].obj==obj&&listeners[i].func==func){listeners.splice(i,1);break;}}}},remove:function(type){if(this.listeners[type]!=null){this.listeners[type]=[];}},triggerEvent:function(type,evt){var listeners=this.listeners[type];if(!listeners||listeners.length==0){return undefined;}
+if(evt==null){evt={};}
+evt.object=this.object;evt.element=this.element;if(!evt.type){evt.type=type;}
+listeners=listeners.slice();var continueChain;for(var i=0,len=listeners.length;i<len;i++){var callback=listeners[i];continueChain=callback.func.apply(callback.obj,[evt]);if((continueChain!=undefined)&&(continueChain==false)){break;}}
+if(!this.fallThrough){OpenLayers.Event.stop(evt,true);}
+return continueChain;},handleBrowserEvent:function(evt){var type=evt.type,listeners=this.listeners[type];if(!listeners||listeners.length==0){return;}
+var touches=evt.touches;if(touches&&touches[0]){var x=0;var y=0;var num=touches.length;var touch;for(var i=0;i<num;++i){touch=touches[i];x+=touch.clientX;y+=touch.clientY;}
+evt.clientX=x/num;evt.clientY=y/num;}
+if(this.includeXY){evt.xy=this.getMousePosition(evt);}
+this.triggerEvent(type,evt);},clearMouseCache:function(){this.element.scrolls=null;this.element.lefttop=null;var body=document.body;if(body&&!((body.scrollTop!=0||body.scrollLeft!=0)&&navigator.userAgent.match(/iPhone/i))){this.element.offsets=null;}},getMousePosition:function(evt){if(!this.includeXY){this.clearMouseCache();}else if(!this.element.hasScrollEvent){OpenLayers.Event.observe(window,"scroll",this.clearMouseListener);this.element.hasScrollEvent=true;}
+if(!this.element.scrolls){var viewportElement=OpenLayers.Util.getViewportElement();this.element.scrolls=[viewportElement.scrollLeft,viewportElement.scrollTop];}
+if(!this.element.lefttop){this.element.lefttop=[(document.documentElement.clientLeft||0),(document.documentElement.clientTop||0)];}
+if(!this.element.offsets){this.element.offsets=OpenLayers.Util.pagePosition(this.element);}
+return new OpenLayers.Pixel((evt.clientX+this.element.scrolls[0])-this.element.offsets[0]
+-this.element.lefttop[0],(evt.clientY+this.element.scrolls[1])-this.element.offsets[1]
+-this.element.lefttop[1]);},CLASS_NAME:"OpenLayers.Events"});OpenLayers.Projection=OpenLayers.Class({proj:null,projCode:null,titleRegEx:/\+title=[^\+]*/,initialize:function(projCode,options){OpenLayers.Util.extend(this,options);this.projCode=projCode;if(window.Proj4js){this.proj=new Proj4js.Proj(projCode);}},getCode:function(){return this.proj?this.proj.srsCode:this.projCode;},getUnits:function(){return this.proj?this.proj.units:null;},toString:function(){return this.getCode();},equals:function(projection){var p=projection,equals=false;if(p){if(!(p instanceof OpenLayers.Projection)){p=new OpenLayers.Projection(p);}
+if(window.Proj4js&&this.proj.defData&&p.proj.defData){equals=this.proj.defData.replace(this.titleRegEx,"")==p.proj.defData.replace(this.titleRegEx,"");}else if(p.getCode){var source=this.getCode(),target=p.getCode();equals=source==target||!!OpenLayers.Projection.transforms[source]&&OpenLayers.Projection.transforms[source][target]===OpenLayers.Projection.nullTransform;}}
+return equals;},destroy:function(){delete this.proj;delete this.projCode;},CLASS_NAME:"OpenLayers.Projection"});OpenLayers.Projection.transforms={};OpenLayers.Projection.defaults={"EPSG:4326":{units:"degrees",maxExtent:[-180,-90,180,90],yx:true},"CRS:84":{units:"degrees",maxExtent:[-180,-90,180,90]},"EPSG:900913":{units:"m",maxExtent:[-20037508.34,-20037508.34,20037508.34,20037508.34]}};OpenLayers.Projection.addTransform=function(from,to,method){if(method===OpenLayers.Projection.nullTransform){var defaults=OpenLayers.Projection.defaults[from];if(defaults&&!OpenLayers.Projection.defaults[to]){OpenLayers.Projection.defaults[to]=defaults;}}
+if(!OpenLayers.Projection.transforms[from]){OpenLayers.Projection.transforms[from]={};}
+OpenLayers.Projection.transforms[from][to]=method;};OpenLayers.Projection.transform=function(point,source,dest){if(source&&dest){if(!(source instanceof OpenLayers.Projection)){source=new OpenLayers.Projection(source);}
+if(!(dest instanceof OpenLayers.Projection)){dest=new OpenLayers.Projection(dest);}
+if(source.proj&&dest.proj){point=Proj4js.transform(source.proj,dest.proj,point);}else{var sourceCode=source.getCode();var destCode=dest.getCode();var transforms=OpenLayers.Projection.transforms;if(transforms[sourceCode]&&transforms[sourceCode][destCode]){transforms[sourceCode][destCode](point);}}}
+return point;};OpenLayers.Projection.nullTransform=function(point){return point;};(function(){var pole=20037508.34;function inverseMercator(xy){xy.x=180*xy.x/pole;xy.y=180/Math.PI*(2*Math.atan(Math.exp((xy.y/pole)*Math.PI))-Math.PI/2);return xy;}
+function forwardMercator(xy){xy.x=xy.x*pole/180;xy.y=Math.log(Math.tan((90+xy.y)*Math.PI/360))/Math.PI*pole;return xy;}
+function map(base,codes){var add=OpenLayers.Projection.addTransform;var same=OpenLayers.Projection.nullTransform;var i,len,code,other,j;for(i=0,len=codes.length;i<len;++i){code=codes[i];add(base,code,forwardMercator);add(code,base,inverseMercator);for(j=i+1;j<len;++j){other=codes[j];add(code,other,same);add(other,code,same);}}}
+var mercator=["EPSG:900913","EPSG:3857","EPSG:102113","EPSG:102100"],geographic=["CRS:84","urn:ogc:def:crs:EPSG:6.6:4326","EPSG:4326"],i;for(i=mercator.length-1;i>=0;--i){map(mercator[i],geographic);}
+for(i=geographic.length-1;i>=0;--i){map(geographic[i],mercator);}})();OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1000},id:null,fractionalZoom:false,events:null,allOverlays:false,div:null,dragging:false,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,resolution:null,zoom:0,panRatio:1.5,options:null,tileSize:null,projection:"EPSG:4326",units:null,resolutions:null,maxResolution:null,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,displayProjection:null,fallThrough:true,panTween:null,eventListeners:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,paddingForPopups:null,minPx:null,maxPx:null,initialize:function(div,options){if(arguments.length===1&&typeof div==="object"){options=div;div=options&&options.div;}
+this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15);this.theme=OpenLayers._getScriptLocation()+'theme/default/style.css';this.options=OpenLayers.Util.extend({},options);OpenLayers.Util.extend(this,options);var projCode=this.projection instanceof OpenLayers.Projection?this.projection.projCode:this.projection;OpenLayers.Util.applyDefaults(this,OpenLayers.Projection.defaults[projCode]);if(this.maxExtent&&!(this.maxExtent instanceof OpenLayers.Bounds)){this.maxExtent=new OpenLayers.Bounds(this.maxExtent);}
+if(this.minExtent&&!(this.minExtent instanceof OpenLayers.Bounds)){this.minExtent=new OpenLayers.Bounds(this.minExtent);}
+if(this.restrictedExtent&&!(this.restrictedExtent instanceof OpenLayers.Bounds)){this.restrictedExtent=new OpenLayers.Bounds(this.restrictedExtent);}
+if(this.center&&!(this.center instanceof OpenLayers.LonLat)){this.center=new OpenLayers.LonLat(this.center);}
+this.layers=[];this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(div);if(!this.div){this.div=document.createElement("div");this.div.style.height="1px";this.div.style.width="1px";}
+OpenLayers.Element.addClass(this.div,'olMap');var id=this.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(id,null,null,null,"relative",null,"hidden");this.viewPortDiv.style.width="100%";this.viewPortDiv.style.height="100%";this.viewPortDiv.className="olMapViewport";this.div.appendChild(this.viewPortDiv);this.events=new OpenLayers.Events(this,this.viewPortDiv,null,this.fallThrough,{includeXY:true});id=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(id);this.layerContainerDiv.style.width='100px';this.layerContainerDiv.style.height='100px';this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;this.viewPortDiv.appendChild(this.layerContainerDiv);this.updateSize();if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}
+if(parseFloat(navigator.appVersion.split("MSIE")[1])<9){this.events.register("resize",this,this.updateSize);}else{this.updateSizeDestroy=OpenLayers.Function.bind(this.updateSize,this);OpenLayers.Event.observe(window,'resize',this.updateSizeDestroy);}
+if(this.theme){var addNode=true;var nodes=document.getElementsByTagName('link');for(var i=0,len=nodes.length;i<len;++i){if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href,this.theme)){addNode=false;break;}}
+if(addNode){var cssNode=document.createElement('link');cssNode.setAttribute('rel','stylesheet');cssNode.setAttribute('type','text/css');cssNode.setAttribute('href',this.theme);document.getElementsByTagName('head')[0].appendChild(cssNode);}}
+if(this.controls==null){this.controls=[];if(OpenLayers.Control!=null){if(OpenLayers.Control.Navigation){this.controls.push(new OpenLayers.Control.Navigation());}else if(OpenLayers.Control.TouchNavigation){this.controls.push(new OpenLayers.Control.TouchNavigation());}
+if(OpenLayers.Control.Zoom){this.controls.push(new OpenLayers.Control.Zoom());}else if(OpenLayers.Control.PanZoom){this.controls.push(new OpenLayers.Control.PanZoom());}
+if(OpenLayers.Control.ArgParser){this.controls.push(new OpenLayers.Control.ArgParser());}
+if(OpenLayers.Control.Attribution){this.controls.push(new OpenLayers.Control.Attribution());}}}
+for(var i=0,len=this.controls.length;i<len;i++){this.addControlToMap(this.controls[i]);}
+this.popups=[];this.unloadDestroy=OpenLayers.Function.bind(this.destroy,this);OpenLayers.Event.observe(window,'unload',this.unloadDestroy);if(options&&options.layers){delete this.center;this.addLayers(options.layers);if(options.center&&!this.getCenter()){this.setCenter(options.center,options.zoom);}}},getViewport:function(){return this.viewPortDiv;},render:function(div){this.div=OpenLayers.Util.getElement(div);OpenLayers.Element.addClass(this.div,'olMap');this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);this.div.appendChild(this.viewPortDiv);this.updateSize();},unloadDestroy:null,updateSizeDestroy:null,destroy:function(){if(!this.unloadDestroy){return false;}
+if(this.panTween){this.panTween.stop();this.panTween=null;}
+OpenLayers.Event.stopObserving(window,'unload',this.unloadDestroy);this.unloadDestroy=null;if(this.updateSizeDestroy){OpenLayers.Event.stopObserving(window,'resize',this.updateSizeDestroy);}else{this.events.unregister("resize",this,this.updateSize);}
+this.paddingForPopups=null;if(this.controls!=null){for(var i=this.controls.length-1;i>=0;--i){this.controls[i].destroy();}
+this.controls=null;}
+if(this.layers!=null){for(var i=this.layers.length-1;i>=0;--i){this.layers[i].destroy(false);}
+this.layers=null;}
+if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv);}
+this.viewPortDiv=null;if(this.eventListeners){this.events.un(this.eventListeners);this.eventListeners=null;}
+this.events.destroy();this.events=null;this.options=null;},setOptions:function(options){var updatePxExtent=this.minPx&&options.restrictedExtent!=this.restrictedExtent;OpenLayers.Util.extend(this,options);updatePxExtent&&this.moveTo(this.getCachedCenter(),this.zoom,{forceZoomChange:true});},getTileSize:function(){return this.tileSize;},getBy:function(array,property,match){var test=(typeof match.test=="function");var found=OpenLayers.Array.filter(this[array],function(item){return item[property]==match||(test&&match.test(item[property]));});return found;},getLayersBy:function(property,match){return this.getBy("layers",property,match);},getLayersByName:function(match){return this.getLayersBy("name",match);},getLayersByClass:function(match){return this.getLayersBy("CLASS_NAME",match);},getControlsBy:function(property,match){return this.getBy("controls",property,match);},getControlsByClass:function(match){return this.getControlsBy("CLASS_NAME",match);},getLayer:function(id){var fo
undLayer=null;for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];if(layer.id==id){foundLayer=layer;break;}}
+return foundLayer;},setLayerZIndex:function(layer,zIdx){layer.setZIndex(this.Z_INDEX_BASE[layer.isBaseLayer?'BaseLayer':'Overlay']
++zIdx*5);},resetLayersZIndex:function(){for(var i=0,len=this.layers.length;i<len;i++){var layer=this.layers[i];this.setLayerZIndex(layer,i);}},addLayer:function(layer){for(var i=0,len=this.layers.length;i<len;i++){if(this.layers[i]==layer){return false;}}
+if(this.events.triggerEvent("preaddlayer",{layer:layer})===false){return false;}
+if(this.allOverlays){layer.isBaseLayer=false;}
+layer.div.className="olLayerDiv";layer.div.style.overflow="";this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);}
+this.layers.push(layer);layer.setMap(this);if(layer.isBaseLayer||(this.allOverlays&&!this.baseLayer)){if(this.baseLayer==null){this.setBaseLayer(layer);}else{layer.setVisibility(false);}}else{layer.redraw();}
+this.events.triggerEvent("addlayer",{layer:layer});layer.events.triggerEvent("added",{map:this,layer:layer});layer.afterAdd();return true;},addLayers:function(layers){for(var i=0,len=layers.length;i<len;i++){this.addLayer(layers[i]);}},removeLayer:function(layer,setNewBaseLayer){if(this.events.triggerEvent("preremovelayer",{layer:layer})===false){return;}
+if(setNewBaseLayer==null){setNewBaseLayer=true;}
+if(layer.isFixed){this.viewPortDiv.removeChild(layer.div);}else{this.layerContainerDiv.removeChild(layer.div);}
+OpenLayers.Util.removeItem(this.layers,layer);layer.removeMap(this);layer.map=null;if(this.baseLayer==layer){this.baseLayer=null;if(setNewBaseLayer){for(var i=0,len=this.layers.length;i<len;i++){var iLayer=this.layers[i];if(iLayer.isBaseLayer||this.allOverlays){this.setBaseLayer(iLayer);break;}}}}
+this.resetLayersZIndex();this.events.triggerEvent("removelayer",{layer:layer});layer.events.triggerEvent("removed",{map:this,layer:layer});},getNumLayers:function(){return this.layers.length;},getLayerIndex:function(layer){return OpenLayers.Util.indexOf(this.layers,layer);},setLayerIndex:function(layer,idx){var base=this.getLayerIndex(layer);if(idx<0){idx=0;}else if(idx>this.layers.length){idx=this.layers.length;}
+if(base!=idx){this.layers.splice(base,1);this.layers.splice(idx,0,layer);for(var i=0,len=this.layers.length;i<len;i++){this.setLayerZIndex(this.layers[i],i);}
+this.events.triggerEvent("changelayer",{layer:layer,property:"order"});if(this.allOverlays){if(idx===0){this.setBaseLayer(layer);}else if(this.baseLayer!==this.layers[0]){this.setBaseLayer(this.layers[0]);}}}},raiseLayer:function(layer,delta){var idx=this.getLayerIndex(layer)+delta;this.setLayerIndex(layer,idx);},setBaseLayer:function(newBaseLayer){if(newBaseLayer!=this.baseLayer){if(OpenLayers.Util.indexOf(this.layers,newBaseLayer)!=-1){var center=this.getCachedCenter();var newResolution=OpenLayers.Util.getResolutionFromScale(this.getScale(),newBaseLayer.units);if(this.baseLayer!=null&&!this.allOverlays){this.baseLayer.setVisibility(false);}
+this.baseLayer=newBaseLayer;if(!this.allOverlays||this.baseLayer.visibility){this.baseLayer.setVisibility(true);if(this.baseLayer.inRange===false){this.baseLayer.redraw();}}
+if(center!=null){var newZoom=this.getZoomForResolution(newResolution||this.resolution,true);this.setCenter(center,newZoom,false,true);}
+this.events.triggerEvent("changebaselayer",{layer:this.baseLayer});}}},addControl:function(control,px){this.controls.push(control);this.addControlToMap(control,px);},addControls:function(controls,pixels){var pxs=(arguments.length===1)?[]:pixels;for(var i=0,len=controls.length;i<len;i++){var ctrl=controls[i];var px=(pxs[i])?pxs[i]:null;this.addControl(ctrl,px);}},addControlToMap:function(control,px){control.outsideViewport=(control.div!=null);if(this.displayProjection&&!control.displayProjection){control.displayProjection=this.displayProjection;}
+control.setMap(this);var div=control.draw(px);if(div){if(!control.outsideViewport){div.style.zIndex=this.Z_INDEX_BASE['Control']+
+this.controls.length;this.viewPortDiv.appendChild(div);}}
+if(control.autoActivate){control.activate();}},getControl:function(id){var returnControl=null;for(var i=0,len=this.controls.length;i<len;i++){var control=this.controls[i];if(control.id==id){returnControl=control;break;}}
+return returnControl;},removeControl:function(control){if((control)&&(control==this.getControl(control.id))){if(control.div&&(control.div.parentNode==this.viewPortDiv)){this.viewPortDiv.removeChild(control.div);}
+OpenLayers.Util.removeItem(this.controls,control);}},addPopup:function(popup,exclusive){if(exclusive){for(var i=this.popups.length-1;i>=0;--i){this.removePopup(this.popups[i]);}}
+popup.map=this;this.popups.push(popup);var popupDiv=popup.draw();if(popupDiv){popupDiv.style.zIndex=this.Z_INDEX_BASE['Popup']+
+this.popups.length;this.layerContainerDiv.appendChild(popupDiv);}},removePopup:function(popup){OpenLayers.Util.removeItem(this.popups,popup);if(popup.div){try{this.layerContainerDiv.removeChild(popup.div);}
+catch(e){}}
+popup.map=null;},getSize:function(){var size=null;if(this.size!=null){size=this.size.clone();}
+return size;},updateSize:function(){var newSize=this.getCurrentSize();if(newSize&&!isNaN(newSize.h)&&!isNaN(newSize.w)){this.events.clearMouseCache();var oldSize=this.getSize();if(oldSize==null){this.size=oldSize=newSize;}
+if(!newSize.equals(oldSize)){this.size=newSize;for(var i=0,len=this.layers.length;i<len;i++){this.layers[i].onMapResize();}
+var center=this.getCachedCenter();if(this.baseLayer!=null&¢er!=null){var zoom=this.getZoom();this.zoom=null;this.setCenter(center,zoom);}}}},getCurrentSize:function(){var size=new OpenLayers.Size(this.div.clientWidth,this.div.clientHeight);if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){size.w=this.div.offsetWidth;size.h=this.div.offsetHeight;}
+if(size.w==0&&size.h==0||isNaN(size.w)&&isNaN(size.h)){size.w=parseInt(this.div.style.width);size.h=parseInt(this.div.style.height);}
+return size;},calculateBounds:function(center,resolution){var extent=null;if(center==null){center=this.getCachedCenter();}
+if(resolution==null){resolution=this.getResolution();}
+if((center!=null)&&(resolution!=null)){var halfWDeg=(this.size.w*resolution)/2;var halfHDeg=(this.size.h*resolution)/2;extent=new OpenLayers.Bounds(center.lon-halfWDeg,center.lat-halfHDeg,center.lon+halfWDeg,center.lat+halfHDeg);}
+return extent;},getCenter:function(){var center=null;var cachedCenter=this.getCachedCenter();if(cachedCenter){center=cachedCenter.clone();}
+return center;},getCachedCenter:function(){if(!this.center&&this.size){this.center=this.getLonLatFromViewPortPx({x:this.size.w/2,y:this.size.h/2});}
+return this.center;},getZoom:function(){return this.zoom;},pan:function(dx,dy,options){options=OpenLayers.Util.applyDefaults(options,{animate:true,dragging:false});if(options.dragging){if(dx!=0||dy!=0){this.moveByPx(dx,dy);}}else{var centerPx=this.getViewPortPxFromLonLat(this.getCachedCenter());var newCenterPx=centerPx.add(dx,dy);if(this.dragging||!newCenterPx.equals(centerPx)){var newCenterLonLat=this.getLonLatFromViewPortPx(newCenterPx);if(options.animate){this.panTo(newCenterLonLat);}else{this.moveTo(newCenterLonLat);if(this.dragging){this.dragging=false;this.events.triggerEvent("moveend");}}}}},panTo:function(lonlat){if(this.panMethod&&this.getExtent().scale(this.panRatio).containsLonLat(lonlat)){if(!this.panTween){this.panTween=new OpenLayers.Tween(this.panMethod);}
+var center=this.getCachedCenter();if(lonlat.equals(center)){return;}
+var from=this.getPixelFromLonLat(center);var to=this.getPixelFromLonLat(lonlat);var vector={x:to.x-from.x,y:to.y-from.y};var last={x:0,y:0};this.panTween.start({x:0,y:0},vector,this.panDuration,{callbacks:{eachStep:OpenLayers.Function.bind(function(px){var x=px.x-last.x,y=px.y-last.y;this.moveByPx(x,y);last.x=Math.round(px.x);last.y=Math.round(px.y);},this),done:OpenLayers.Function.bind(function(px){this.moveTo(lonlat);this.dragging=false;this.events.triggerEvent("moveend");},this)}});}else{this.setCenter(lonlat);}},setCenter:function(lonlat,zoom,dragging,forceZoomChange){this.panTween&&this.panTween.stop();this.moveTo(lonlat,zoom,{'dragging':dragging,'forceZoomChange':forceZoomChange});},moveByPx:function(dx,dy){var hw=this.size.w/2;var hh=this.size.h/2;var x=hw+dx;var y=hh+dy;var wrapDateLine=this.baseLayer.wrapDateLine;var xRestriction=0;var yRestriction=0;if(this.restrictedExtent){xRestriction=hw;yRestriction=hh;wrapDateLine=false;}
+dx=wrapDateLine||x<=this.maxPx.x-xRestriction&&x>=this.minPx.x+xRestriction?Math.round(dx):0;dy=y<=this.maxPx.y-yRestriction&&y>=this.minPx.y+yRestriction?Math.round(dy):0;if(dx||dy){if(!this.dragging){this.dragging=true;this.events.triggerEvent("movestart");}
+this.center=null;if(dx){this.layerContainerDiv.style.left=parseInt(this.layerContainerDiv.style.left)-dx+"px";this.minPx.x-=dx;this.maxPx.x-=dx;}
+if(dy){this.layerContainerDiv.style.top=parseInt(this.layerContainerDiv.style.top)-dy+"px";this.minPx.y-=dy;this.maxPx.y-=dy;}
+var layer,i,len;for(i=0,len=this.layers.length;i<len;++i){layer=this.layers[i];if(layer.visibility&&(layer===this.baseLayer||layer.inRange)){layer.moveByPx(dx,dy);layer.events.triggerEvent("move");}}
+this.events.triggerEvent("move");}},adjustZoom:function(zoom){var resolution,resolutions=this.baseLayer.resolutions,maxResolution=this.getMaxExtent().getWidth()/this.size.w;if(this.getResolutionForZoom(zoom)>maxResolution){for(var i=zoom|0,ii=resolutions.length;i<ii;++i){if(resolutions[i]<=maxResolution){zoom=i;break;}}}
+return zoom;},moveTo:function(lonlat,zoom,options){if(lonlat!=null&&!(lonlat instanceof OpenLayers.LonLat)){lonlat=new OpenLayers.LonLat(lonlat);}
+if(!options){options={};}
+if(zoom!=null){zoom=parseFloat(zoom);if(!this.fractionalZoom){zoom=Math.round(zoom);}}
+if(this.baseLayer.wrapDateLine){var requestedZoom=zoom;zoom=this.adjustZoom(zoom);if(zoom!==requestedZoom){lonlat=this.getCenter();}}
+var dragging=options.dragging||this.dragging;var forceZoomChange=options.forceZoomChange;if(!this.getCachedCenter()&&!this.isValidLonLat(lonlat)){lonlat=this.maxExtent.getCenterLonLat();this.center=lonlat.clone();}
+if(this.restrictedExtent!=null){if(lonlat==null){lonlat=this.center;}
+if(zoom==null){zoom=this.getZoom();}
+var resolution=this.getResolutionForZoom(zoom);var extent=this.calculateBounds(lonlat,resolution);if(!this.restrictedExtent.containsBounds(extent)){var maxCenter=this.restrictedExtent.getCenterLonLat();if(extent.getWidth()>this.restrictedExtent.getWidth()){lonlat=new OpenLayers.LonLat(maxCenter.lon,lonlat.lat);}else if(extent.left<this.restrictedExtent.left){lonlat=lonlat.add(this.restrictedExtent.left-
+extent.left,0);}else if(extent.right>this.restrictedExtent.right){lonlat=lonlat.add(this.restrictedExtent.right-
+extent.right,0);}
+if(extent.getHeight()>this.restrictedExtent.getHeight()){lonlat=new OpenLayers.LonLat(lonlat.lon,maxCenter.lat);}else if(extent.bottom<this.restrictedExtent.bottom){lonlat=lonlat.add(0,this.restrictedExtent.bottom-
+extent.bottom);}
+else if(extent.top>this.restrictedExtent.top){lonlat=lonlat.add(0,this.restrictedExtent.top-
+extent.top);}}}
+var zoomChanged=forceZoomChange||((this.isValidZoomLevel(zoom))&&(zoom!=this.getZoom()));var centerChanged=(this.isValidLonLat(lonlat))&&(!lonlat.equals(this.center));if(zoomChanged||centerChanged||dragging){dragging||this.events.triggerEvent("movestart");if(centerChanged){if(!zoomChanged&&this.center){this.centerLayerContainer(lonlat);}
+this.center=lonlat.clone();}
+var res=zoomChanged?this.getResolutionForZoom(zoom):this.getResolution();if(zoomChanged||this.layerContainerOrigin==null){this.layerContainerOrigin=this.getCachedCenter();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";var maxExtent=this.getMaxExtent({restricted:true});var maxExtentCenter=maxExtent.getCenterLonLat();var lonDelta=this.center.lon-maxExtentCenter.lon;var latDelta=maxExtentCenter.lat-this.center.lat;var extentWidth=Math.round(maxExtent.getWidth()/res);var extentHeight=Math.round(maxExtent.getHeight()/res);this.minPx={x:(this.size.w-extentWidth)/2-lonDelta/res,y:(this.size.h-extentHeight)/2-latDelta/res};this.maxPx={x:this.minPx.x+Math.round(maxExtent.getWidth()/res),y:this.minPx.y+Math.round(maxExtent.getHeight()/res)};}
+if(zoomChanged){this.zoom=zoom;this.resolution=res;}
+var bounds=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(bounds,zoomChanged,options.dragging);options.dragging||this.baseLayer.events.triggerEvent("moveend",{zoomChanged:zoomChanged});}
+bounds=this.baseLayer.getExtent();for(var i=this.layers.length-1;i>=0;--i){var layer=this.layers[i];if(layer!==this.baseLayer&&!layer.isBaseLayer){var inRange=layer.calculateInRange();if(layer.inRange!=inRange){layer.inRange=inRange;if(!inRange){layer.display(false);}
+this.events.triggerEvent("changelayer",{layer:layer,property:"visibility"});}
+if(inRange&&layer.visibility){layer.moveTo(bounds,zoomChanged,options.dragging);options.dragging||layer.events.triggerEvent("moveend",{zoomChanged:zoomChanged});}}}
+this.events.triggerEvent("move");dragging||this.events.triggerEvent("moveend");if(zoomChanged){for(var i=0,len=this.popups.length;i<len;i++){this.popups[i].updatePosition();}
+this.events.triggerEvent("zoomend");}}},centerLayerContainer:function(lonlat){var originPx=this.getViewPortPxFromLonLat(this.layerContainerOrigin);var newPx=this.getViewPortPxFromLonLat(lonlat);if((originPx!=null)&&(newPx!=null)){var oldLeft=parseInt(this.layerContainerDiv.style.left);var oldTop=parseInt(this.layerContainerDiv.style.top);var newLeft=Math.round(originPx.x-newPx.x);var newTop=Math.round(originPx.y-newPx.y);this.layerContainerDiv.style.left=newLeft+"px";this.layerContainerDiv.style.top=newTop+"px";var dx=oldLeft-newLeft;var dy=oldTop-newTop;this.minPx.x-=dx;this.maxPx.x-=dx;this.minPx.y-=dy;this.maxPx.y-=dy;}},isValidZoomLevel:function(zoomLevel){return((zoomLevel!=null)&&(zoomLevel>=0)&&(zoomLevel<this.getNumZoomLevels()));},isValidLonLat:function(lonlat){var valid=false;if(lonlat!=null){var maxExtent=this.getMaxExtent();var worldBounds=this.baseLayer.wrapDateLine&&maxExtent;valid=maxExtent.containsLonLat(lonlat,{worldBounds:worldBounds});}
+return valid;},getProjection:function(){var projection=this.getProjectionObject();return projection?projection.getCode():null;},getProjectionObject:function(){var projection=null;if(this.baseLayer!=null){projection=this.baseLayer.projection;}
+return projection;},getMaxResolution:function(){var maxResolution=null;if(this.baseLayer!=null){maxResolution=this.baseLayer.maxResolution;}
+return maxResolution;},getMaxExtent:function(options){var maxExtent=null;if(options&&options.restricted&&this.restrictedExtent){maxExtent=this.restrictedExtent;}else if(this.baseLayer!=null){maxExtent=this.baseLayer.maxExtent;}
+return maxExtent;},getNumZoomLevels:function(){var numZoomLevels=null;if(this.baseLayer!=null){numZoomLevels=this.baseLayer.numZoomLevels;}
+return numZoomLevels;},getExtent:function(){var extent=null;if(this.baseLayer!=null){extent=this.baseLayer.getExtent();}
+return extent;},getResolution:function(){var resolution=null;if(this.baseLayer!=null){resolution=this.baseLayer.getResolution();}else if(this.allOverlays===true&&this.layers.length>0){resolution=this.layers[0].getResolution();}
+return resolution;},getUnits:function(){var units=null;if(this.baseLayer!=null){units=this.baseLayer.units;}
+return units;},getScale:function(){var scale=null;if(this.baseLayer!=null){var res=this.getResolution();var units=this.baseLayer.units;scale=OpenLayers.Util.getScaleFromResolution(res,units);}
+return scale;},getZoomForExtent:function(bounds,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForExtent(bounds,closest);}
+return zoom;},getResolutionForZoom:function(zoom){var resolution=null;if(this.baseLayer){resolution=this.baseLayer.getResolutionForZoom(zoom);}
+return resolution;},getZoomForResolution:function(resolution,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForResolution(resolution,closest);}
+return zoom;},zoomTo:function(zoom){if(this.isValidZoomLevel(zoom)){this.setCenter(null,zoom);}},zoomIn:function(){this.zoomTo(this.getZoom()+1);},zoomOut:function(){this.zoomTo(this.getZoom()-1);},zoomToExtent:function(bounds,closest){if(!(bounds instanceof OpenLayers.Bounds)){bounds=new OpenLayers.Bounds(bounds);}
+var center=bounds.getCenterLonLat();if(this.baseLayer.wrapDateLine){var maxExtent=this.getMaxExtent();bounds=bounds.clone();while(bounds.right<bounds.left){bounds.right+=maxExtent.getWidth();}
+center=bounds.getCenterLonLat().wrapDateLine(maxExtent);}
+this.setCenter(center,this.getZoomForExtent(bounds,closest));},zoomToMaxExtent:function(options){var restricted=(options)?options.restricted:true;var maxExtent=this.getMaxExtent({'restricted':restricted});this.zoomToExtent(maxExtent);},zoomToScale:function(scale,closest){var res=OpenLayers.Util.getResolutionFromScale(scale,this.baseLayer.units);var halfWDeg=(this.size.w*res)/2;var halfHDeg=(this.size.h*res)/2;var center=this.getCachedCenter();var extent=new OpenLayers.Bounds(center.lon-halfWDeg,center.lat-halfHDeg,center.lon+halfWDeg,center.lat+halfHDeg);this.zoomToExtent(extent,closest);},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;if(this.baseLayer!=null){lonlat=this.baseLayer.getLonLatFromViewPortPx(viewPortPx);}
+return lonlat;},getViewPortPxFromLonLat:function(lonlat){var px=null;if(this.baseLayer!=null){px=this.baseLayer.getViewPortPxFromLonLat(lonlat);}
+return px;},getLonLatFromPixel:function(px){return this.getLonLatFromViewPortPx(px);},getPixelFromLonLat:function(lonlat){var px=this.getViewPortPxFromLonLat(lonlat);px.x=Math.round(px.x);px.y=Math.round(px.y);return px;},getGeodesicPixelSize:function(px){var lonlat=px?this.getLonLatFromPixel(px):(this.getCachedCenter()||new OpenLayers.LonLat(0,0));var res=this.getResolution();var left=lonlat.add(-res/2,0);var right=lonlat.add(res/2,0);var bottom=lonlat.add(0,-res/2);var top=lonlat.add(0,res/2);var dest=new OpenLayers.Projection("EPSG:4326");var source=this.getProjectionObject()||dest;if(!source.equals(dest)){left.transform(source,dest);right.transform(source,dest);bottom.transform(source,dest);top.transform(source,dest);}
+return new OpenLayers.Size(OpenLayers.Util.distVincenty(left,right),OpenLayers.Util.distVincenty(bottom,top));},getViewPortPxFromLayerPx:function(layerPx){var viewPortPx=null;if(layerPx!=null){var dX=parseInt(this.layerContainerDiv.style.left);var dY=parseInt(this.layerContainerDiv.style.top);viewPortPx=layerPx.add(dX,dY);}
+return viewPortPx;},getLayerPxFromViewPortPx:function(viewPortPx){var layerPx=null;if(viewPortPx!=null){var dX=-parseInt(this.layerContainerDiv.style.left);var dY=-parseInt(this.layerContainerDiv.style.top);layerPx=viewPortPx.add(dX,dY);if(isNaN(layerPx.x)||isNaN(layerPx.y)){layerPx=null;}}
+return layerPx;},getLonLatFromLayerPx:function(px){px=this.getViewPortPxFromLayerPx(px);return this.getLonLatFromViewPortPx(px);},getLayerPxFromLonLat:function(lonlat){var px=this.getPixelFromLonLat(lonlat);return this.getLayerPxFromViewPortPx(px);},CLASS_NAME:"OpenLayers.Map"});OpenLayers.Map.TILE_WIDTH=256;OpenLayers.Map.TILE_HEIGHT=256;OpenLayers.Layer=OpenLayers.Class({id:null,name:null,div:null,opacity:1,alwaysInRange:null,RESOLUTION_PROPERTIES:['scales','resolutions','maxScale','minScale','maxResolution','minResolution','numZoomLevels','maxZoomLevel'],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,attribution:null,inRange:false,imageSize:null,options:null,eventListeners:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,wrapDateLine:false,metadata:null,initiali
ze:function(name,options){this.metadata={};this.addOptions(options);this.name=name;if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");this.div=OpenLayers.Util.createDiv(this.id);this.div.style.width="100%";this.div.style.height="100%";this.div.dir="ltr";this.events=new OpenLayers.Events(this,this.div);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}}},destroy:function(setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;}
+if(this.map!=null){this.map.removeLayer(this,setNewBaseLayer);}
+this.projection=null;this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){if(this.eventListeners){this.events.un(this.eventListeners);}
+this.events.destroy();}
+this.eventListeners=null;this.events=null;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer(this.name,this.getOptions());}
+OpenLayers.Util.applyDefaults(obj,this);obj.map=null;return obj;},getOptions:function(){var options={};for(var o in this.options){options[o]=this[o];}
+return options;},setName:function(newName){if(newName!=this.name){this.name=newName;if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"name"});}}},addOptions:function(newOptions,reinitialize){if(this.options==null){this.options={};}
+if(newOptions){if(typeof newOptions.projection=="string"){newOptions.projection=new OpenLayers.Projection(newOptions.projection);}
+if(newOptions.projection){OpenLayers.Util.applyDefaults(newOptions,OpenLayers.Projection.defaults[newOptions.projection.getCode()]);}
+if(newOptions.maxExtent&&!(newOptions.maxExtent instanceof OpenLayers.Bounds)){newOptions.maxExtent=new OpenLayers.Bounds(newOptions.maxExtent);}
+if(newOptions.minExtent&&!(newOptions.minExtent instanceof OpenLayers.Bounds)){newOptions.minExtent=new OpenLayers.Bounds(newOptions.minExtent);}}
+OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);if(this.projection&&this.projection.getUnits()){this.units=this.projection.getUnits();}
+if(this.map){var resolution=this.map.getResolution();var properties=this.RESOLUTION_PROPERTIES.concat(["projection","units","minExtent","maxExtent"]);for(var o in newOptions){if(newOptions.hasOwnProperty(o)&&OpenLayers.Util.indexOf(properties,o)>=0){this.initResolutions();if(reinitialize&&this.map.baseLayer===this){this.map.setCenter(this.map.getCenter(),this.map.getZoomForResolution(resolution),false,true);this.map.events.triggerEvent("changebaselayer",{layer:this});}
+break;}}}},onMapResize:function(){},redraw:function(){var redrawn=false;if(this.map){this.inRange=this.calculateInRange();var extent=this.getExtent();if(extent&&this.inRange&&this.visibility){var zoomChanged=true;this.moveTo(extent,zoomChanged,false);this.events.triggerEvent("moveend",{"zoomChanged":zoomChanged});redrawn=true;}}
+return redrawn;},moveTo:function(bounds,zoomChanged,dragging){var display=this.visibility;if(!this.isBaseLayer){display=display&&this.inRange;}
+this.display(display);},moveByPx:function(dx,dy){},setMap:function(map){if(this.map==null){this.map=map;this.maxExtent=this.maxExtent||this.map.maxExtent;this.minExtent=this.minExtent||this.map.minExtent;this.projection=this.projection||this.map.projection;if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection);}
+this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var show=((this.visibility)&&(this.inRange));this.div.style.display=show?"":"none";}
+this.setTileSize();}},afterAdd:function(){},removeMap:function(map){},getImageSize:function(bounds){return(this.imageSize||this.tileSize);},setTileSize:function(size){var tileSize=(size)?size:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=tileSize;if(this.gutter){this.imageSize=new OpenLayers.Size(tileSize.w+(2*this.gutter),tileSize.h+(2*this.gutter));}},getVisibility:function(){return this.visibility;},setVisibility:function(visibility){if(visibility!=this.visibility){this.visibility=visibility;this.display(visibility);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"});}
+this.events.triggerEvent("visibilitychanged");}},display:function(display){if(display!=(this.div.style.display!="none")){this.div.style.display=(display&&this.calculateInRange())?"block":"none";}},calculateInRange:function(){var inRange=false;if(this.alwaysInRange){inRange=true;}else{if(this.map){var resolution=this.map.getResolution();inRange=((resolution>=this.minResolution)&&(resolution<=this.maxResolution));}}
+return inRange;},setIsBaseLayer:function(isBaseLayer){if(isBaseLayer!=this.isBaseLayer){this.isBaseLayer=isBaseLayer;if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this});}}},initResolutions:function(){var i,len,p;var props={},alwaysInRange=true;for(i=0,len=this.RESOLUTION_PROPERTIES.length;i<len;i++){p=this.RESOLUTION_PROPERTIES[i];props[p]=this.options[p];if(alwaysInRange&&this.options[p]){alwaysInRange=false;}}
+if(this.alwaysInRange==null){this.alwaysInRange=alwaysInRange;}
+if(props.resolutions==null){props.resolutions=this.resolutionsFromScales(props.scales);}
+if(props.resolutions==null){props.resolutions=this.calculateResolutions(props);}
+if(props.resolutions==null){for(i=0,len=this.RESOLUTION_PROPERTIES.length;i<len;i++){p=this.RESOLUTION_PROPERTIES[i];props[p]=this.options[p]!=null?this.options[p]:this.map[p];}
+if(props.resolutions==null){props.resolutions=this.resolutionsFromScales(props.scales);}
+if(props.resolutions==null){props.resolutions=this.calculateResolutions(props);}}
+var maxResolution;if(this.options.maxResolution&&this.options.maxResolution!=="auto"){maxResolution=this.options.maxResolution;}
+if(this.options.minScale){maxResolution=OpenLayers.Util.getResolutionFromScale(this.options.minScale,this.units);}
+var minResolution;if(this.options.minResolution&&this.options.minResolution!=="auto"){minResolution=this.options.minResolution;}
+if(this.options.maxScale){minResolution=OpenLayers.Util.getResolutionFromScale(this.options.maxScale,this.units);}
+if(props.resolutions){props.resolutions.sort(function(a,b){return(b-a);});if(!maxResolution){maxResolution=props.resolutions[0];}
+if(!minResolution){var lastIdx=props.resolutions.length-1;minResolution=props.resolutions[lastIdx];}}
+this.resolutions=props.resolutions;if(this.resolutions){len=this.resolutions.length;this.scales=new Array(len);for(i=0;i<len;i++){this.scales[i]=OpenLayers.Util.getScaleFromResolution(this.resolutions[i],this.units);}
+this.numZoomLevels=len;}
+this.minResolution=minResolution;if(minResolution){this.maxScale=OpenLayers.Util.getScaleFromResolution(minResolution,this.units);}
+this.maxResolution=maxResolution;if(maxResolution){this.minScale=OpenLayers.Util.getScaleFromResolution(maxResolution,this.units);}},resolutionsFromScales:function(scales){if(scales==null){return;}
+var resolutions,i,len;len=scales.length;resolutions=new Array(len);for(i=0;i<len;i++){resolutions[i]=OpenLayers.Util.getResolutionFromScale(scales[i],this.units);}
+return resolutions;},calculateResolutions:function(props){var viewSize,wRes,hRes;var maxResolution=props.maxResolution;if(props.minScale!=null){maxResolution=OpenLayers.Util.getResolutionFromScale(props.minScale,this.units);}else if(maxResolution=="auto"&&this.maxExtent!=null){viewSize=this.map.getSize();wRes=this.maxExtent.getWidth()/viewSize.w;hRes=this.maxExtent.getHeight()/viewSize.h;maxResolution=Math.max(wRes,hRes);}
+var minResolution=props.minResolution;if(props.maxScale!=null){minResolution=OpenLayers.Util.getResolutionFromScale(props.maxScale,this.units);}else if(props.minResolution=="auto"&&this.minExtent!=null){viewSize=this.map.getSize();wRes=this.minExtent.getWidth()/viewSize.w;hRes=this.minExtent.getHeight()/viewSize.h;minResolution=Math.max(wRes,hRes);}
+if(typeof maxResolution!=="number"&&typeof minResolution!=="number"&&this.maxExtent!=null){var tileSize=this.map.getTileSize();maxResolution=Math.max(this.maxExtent.getWidth()/tileSize.w,this.maxExtent.getHeight()/tileSize.h);}
+var maxZoomLevel=props.maxZoomLevel;var numZoomLevels=props.numZoomLevels;if(typeof minResolution==="number"&&typeof maxResolution==="number"&&numZoomLevels===undefined){var ratio=maxResolution/minResolution;numZoomLevels=Math.floor(Math.log(ratio)/Math.log(2))+1;}else if(numZoomLevels===undefined&&maxZoomLevel!=null){numZoomLevels=maxZoomLevel+1;}
+if(typeof numZoomLevels!=="number"||numZoomLevels<=0||(typeof maxResolution!=="number"&&typeof minResolution!=="number")){return;}
+var resolutions=new Array(numZoomLevels);var base=2;if(typeof minResolution=="number"&&typeof maxResolution=="number"){base=Math.pow((maxResolution/minResolution),(1/(numZoomLevels-1)));}
+var i;if(typeof maxResolution==="number"){for(i=0;i<numZoomLevels;i++){resolutions[i]=maxResolution/Math.pow(base,i);}}else{for(i=0;i<numZoomLevels;i++){resolutions[numZoomLevels-1-i]=minResolution*Math.pow(base,i);}}
+return resolutions;},getResolution:function(){var zoom=this.map.getZoom();return this.getResolutionForZoom(zoom);},getExtent:function(){return this.map.calculateBounds();},getZoomForExtent:function(extent,closest){var viewSize=this.map.getSize();var idealResolution=Math.max(extent.getWidth()/viewSize.w,extent.getHeight()/viewSize.h);return this.getZoomForResolution(idealResolution,closest);},getDataExtent:function(){},getResolutionForZoom:function(zoom){zoom=Math.max(0,Math.min(zoom,this.resolutions.length-1));var resolution;if(this.map.fractionalZoom){var low=Math.floor(zoom);var high=Math.ceil(zoom);resolution=this.resolutions[low]-
+((zoom-low)*(this.resolutions[low]-this.resolutions[high]));}else{resolution=this.resolutions[Math.round(zoom)];}
+return resolution;},getZoomForResolution:function(resolution,closest){var zoom,i,len;if(this.map.fractionalZoom){var lowZoom=0;var highZoom=this.resolutions.length-1;var highRes=this.resolutions[lowZoom];var lowRes=this.resolutions[highZoom];var res;for(i=0,len=this.resolutions.length;i<len;++i){res=this.resolutions[i];if(res>=resolution){highRes=res;lowZoom=i;}
+if(res<=resolution){lowRes=res;highZoom=i;break;}}
+var dRes=highRes-lowRes;if(dRes>0){zoom=lowZoom+((highRes-resolution)/dRes);}else{zoom=lowZoom;}}else{var diff;var minDiff=Number.POSITIVE_INFINITY;for(i=0,len=this.resolutions.length;i<len;i++){if(closest){diff=Math.abs(this.resolutions[i]-resolution);if(diff>minDiff){break;}
+minDiff=diff;}else{if(this.resolutions[i]<resolution){break;}}}
+zoom=Math.max(0,i-1);}
+return zoom;},getLonLatFromViewPortPx:function(viewPortPx){var lonlat=null;var map=this.map;if(viewPortPx!=null&&map.minPx){var res=map.getResolution();var maxExtent=map.getMaxExtent({restricted:true});var lon=(viewPortPx.x-map.minPx.x)*res+maxExtent.left;var lat=(map.minPx.y-viewPortPx.y)*res+maxExtent.top;lonlat=new OpenLayers.LonLat(lon,lat);if(this.wrapDateLine){lonlat=lonlat.wrapDateLine(this.maxExtent);}}
+return lonlat;},getViewPortPxFromLonLat:function(lonlat,resolution){var px=null;if(lonlat!=null){resolution=resolution||this.map.getResolution();var extent=this.map.calculateBounds(null,resolution);px=new OpenLayers.Pixel((1/resolution*(lonlat.lon-extent.left)),(1/resolution*(extent.top-lonlat.lat)));}
+return px;},setOpacity:function(opacity){if(opacity!=this.opacity){this.opacity=opacity;var childNodes=this.div.childNodes;for(var i=0,len=childNodes.length;i<len;++i){var element=childNodes[i].firstChild||childNodes[i];var lastChild=childNodes[i].lastChild;if(lastChild&&lastChild.nodeName.toLowerCase()==="iframe"){element=lastChild.parentNode;}
+OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);}
+if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"opacity"});}}},getZIndex:function(){return this.div.style.zIndex;},setZIndex:function(zIndex){this.div.style.zIndex=zIndex;},adjustBounds:function(bounds){if(this.gutter){var mapGutter=this.gutter*this.map.getResolution();bounds=new OpenLayers.Bounds(bounds.left-mapGutter,bounds.bottom-mapGutter,bounds.right+mapGutter,bounds.top+mapGutter);}
+if(this.wrapDateLine){var wrappingOptions={'rightTolerance':this.getResolution(),'leftTolerance':this.getResolution()};bounds=bounds.wrapDateLine(this.maxExtent,wrappingOptions);}
+return bounds;},CLASS_NAME:"OpenLayers.Layer"});OpenLayers.Layer.HTTPRequest=OpenLayers.Class(OpenLayers.Layer,{URL_HASH_FACTOR:(Math.sqrt(5)-1)/2,url:null,params:null,reproject:false,initialize:function(name,url,params,options){OpenLayers.Layer.prototype.initialize.apply(this,[name,options]);this.url=url;if(!this.params){this.params=OpenLayers.Util.extend({},params);}},destroy:function(){this.url=null;this.params=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.HTTPRequest(this.name,this.url,this.params,this.getOptions());}
+obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);return obj;},setUrl:function(newUrl){this.url=newUrl;},mergeNewParams:function(newParams){this.params=OpenLayers.Util.extend(this.params,newParams);var ret=this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"params"});}
+return ret;},redraw:function(force){if(force){return this.mergeNewParams({"_olSalt":Math.random()});}else{return OpenLayers.Layer.prototype.redraw.apply(this,[]);}},selectUrl:function(paramString,urls){var product=1;for(var i=0,len=paramString.length;i<len;i++){product*=paramString.charCodeAt(i)*this.URL_HASH_FACTOR;product-=Math.floor(product);}
+return urls[Math.floor(product*urls.length)];},getFullRequestString:function(newParams,altUrl){var url=altUrl||this.url;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var paramsString=OpenLayers.Util.getParameterString(allParams);if(OpenLayers.Util.isArray(url)){url=this.selectUrl(paramsString,url);}
+var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}}
+paramsString=OpenLayers.Util.getParameterString(allParams);return OpenLayers.Util.urlAppend(url,paramsString);},CLASS_NAME:"OpenLayers.Layer.HTTPRequest"});OpenLayers.Tile=OpenLayers.Class({events:null,eventListeners:null,id:null,layer:null,url:null,bounds:null,size:null,position:null,isLoading:false,initialize:function(layer,position,bounds,url,size,options){this.layer=layer;this.position=position.clone();this.setBounds(bounds);this.url=url;if(size){this.size=size.clone();}
+this.id=OpenLayers.Util.createUniqueID("Tile_");OpenLayers.Util.extend(this,options);this.events=new OpenLayers.Events(this);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}},unload:function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("unload");}},destroy:function(){this.layer=null;this.bounds=null;this.size=null;this.position=null;if(this.eventListeners){this.events.un(this.eventListeners);}
+this.events.destroy();this.eventListeners=null;this.events=null;},draw:function(deferred){if(!deferred){this.clear();}
+var draw=this.shouldDraw();if(draw&&!deferred){draw=this.events.triggerEvent("beforedraw")!==false;}
+return draw;},shouldDraw:function(){var withinMaxExtent=false,maxExtent=this.layer.maxExtent;if(maxExtent){var map=this.layer.map;var worldBounds=map.baseLayer.wrapDateLine&&map.getMaxExtent();if(this.bounds.intersectsBounds(maxExtent,{inclusive:false,worldBounds:worldBounds})){withinMaxExtent=true;}}
+return withinMaxExtent||this.layer.displayOutsideMaxExtent;},setBounds:function(bounds){bounds=bounds.clone();if(this.layer.map.baseLayer.wrapDateLine){var worldExtent=this.layer.map.getMaxExtent(),tolerance=this.layer.map.getResolution();bounds=bounds.wrapDateLine(worldExtent,{leftTolerance:tolerance,rightTolerance:tolerance});}
+this.bounds=bounds;},moveTo:function(bounds,position,redraw){if(redraw==null){redraw=true;}
+this.setBounds(bounds);this.position=position.clone();if(redraw){this.draw();}},clear:function(draw){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,imageReloadAttempts:null,layerAlphaHack:null,asyncRequestId:null,blankImageUrl:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAQAIBRAA7",maxGetUrlLength:null,canvasContext:null,crossOriginKeyword:null,initialize:function(layer,position,bounds,url,size,options){OpenLayers.Tile.prototype.initialize.apply(this,arguments);this.url=url;this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack();if(this.maxGetUrlLength!=null||this.layer.gutter||this.layerAlphaHack){this.frame=document.createElement("div");this.frame.style.position="absolute";this.frame.style.overflow="hidden";}
+if(this.maxGetUrlLength!=null){OpenLayers.Util.extend(this,OpenLayers.Tile.Image.IFrame);}},destroy:function(){if(this.imgDiv){this.clear();this.imgDiv=null;this.frame=null;}
+this.asyncRequestId=null;OpenLayers.Tile.prototype.destroy.apply(this,arguments);},draw:function(){var drawn=OpenLayers.Tile.prototype.draw.apply(this,arguments);if(drawn){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position);}
+if(this.isLoading){this._loadEvent="reload";}else{this.isLoading=true;this._loadEvent="loadstart";}
+this.positionTile();this.renderTile();}else{this.unload();}
+return drawn;},renderTile:function(){this.layer.div.appendChild(this.getTile());if(this.layer.async){var id=this.asyncRequestId=(this.asyncRequestId||0)+1;this.layer.getURLasync(this.bounds,function(url){if(id==this.asyncRequestId){this.url=url;this.initImage();}},this);}else{this.url=this.layer.getURL(this.bounds);this.initImage();}},positionTile:function(){var style=this.getTile().style,size=this.frame?this.size:this.layer.getImageSize(this.bounds);style.left=this.position.x+"%";style.top=this.position.y+"%";style.width=size.w+"%";style.height=size.h+"%";},clear:function(){OpenLayers.Tile.prototype.clear.apply(this,arguments);var img=this.imgDiv;if(img){OpenLayers.Event.stopObservingElement(img);var tile=this.getTile();if(tile.parentNode===this.layer.div){this.layer.div.removeChild(tile);}
+this.setImgSrc();if(this.layerAlphaHack===true){img.style.filter="";}
+OpenLayers.Element.removeClass(img,"olImageLoadError");}
+this.canvasContext=null;},getImage:function(){if(!this.imgDiv){this.imgDiv=document.createElement("img");this.imgDiv.className="olTileImage";this.imgDiv.galleryImg="no";var style=this.imgDiv.style;if(this.frame){var left=0,top=0;if(this.layer.gutter){left=this.layer.gutter/this.layer.tileSize.w*100;top=this.layer.gutter/this.layer.tileSize.h*100;}
+style.left=-left+"%";style.top=-top+"%";style.width=(2*left+100)+"%";style.height=(2*top+100)+"%";}
+style.visibility="hidden";style.opacity=0;if(this.layer.opacity<1){style.filter='alpha(opacity='+
+(this.layer.opacity*100)+')';}
+style.position="absolute";if(this.layerAlphaHack){style.paddingTop=style.height;style.height="0";style.width="100%";}
+if(this.frame){this.frame.appendChild(this.imgDiv);}}
+return this.imgDiv;},initImage:function(){this.events.triggerEvent(this._loadEvent);var img=this.getImage();if(this.url&&img.getAttribute("src")==this.url){this.onImageLoad();}else{var load=OpenLayers.Function.bind(function(){OpenLayers.Event.stopObservingElement(img);OpenLayers.Event.observe(img,"load",OpenLayers.Function.bind(this.onImageLoad,this));OpenLayers.Event.observe(img,"error",OpenLayers.Function.bind(this.onImageError,this));this.imageReloadAttempts=0;this.setImgSrc(this.url);},this);if(img.getAttribute("src")==this.blankImageUrl){load();}else{OpenLayers.Event.observe(img,"load",load);OpenLayers.Event.observe(img,"error",load);if(this.crossOriginKeyword){img.removeAttribute("crossorigin");}
+img.src=this.blankImageUrl;}}},setImgSrc:function(url){var img=this.imgDiv;img.style.visibility='hidden';img.style.opacity=0;if(url){if(this.crossOriginKeyword){if(url.substr(0,5)!=='data:'){img.setAttribute("crossorigin",this.crossOriginKeyword);}else{img.removeAttribute("crossorigin");}}
+img.src=url;}},getTile:function(){return this.frame?this.frame:this.getImage();},createBackBuffer:function(){if(!this.imgDiv||this.isLoading){return;}
+var backBuffer;if(this.frame){backBuffer=this.frame.cloneNode(false);backBuffer.appendChild(this.imgDiv);}else{backBuffer=this.imgDiv;}
+this.imgDiv=null;return backBuffer;},onImageLoad:function(){var img=this.imgDiv;OpenLayers.Event.stopObservingElement(img);img.style.visibility='inherit';img.style.opacity=this.layer.opacity;this.isLoading=false;this.canvasContext=null;this.events.triggerEvent("loadend");if(parseFloat(navigator.appVersion.split("MSIE")[1])<7&&this.layer&&this.layer.div){var span=document.createElement("span");span.style.display="none";var layerDiv=this.layer.div;layerDiv.appendChild(span);window.setTimeout(function(){span.parentNode===layerDiv&&span.parentNode.removeChild(span);},0);}
+if(this.layerAlphaHack===true){img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+
+img.src+"', sizingMethod='scale')";}},onImageError:function(){var img=this.imgDiv;if(img.src!=null){this.imageReloadAttempts++;if(this.imageReloadAttempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){this.setImgSrc(this.layer.getURL(this.bounds));}else{OpenLayers.Element.addClass(img,"olImageLoadError");this.events.triggerEvent("loaderror");this.onImageLoad();}}},getCanvasContext:function(){if(OpenLayers.CANVAS_SUPPORTED&&this.imgDiv&&!this.isLoading){if(!this.canvasContext){var canvas=document.createElement("canvas");canvas.width=this.size.w;canvas.height=this.size.h;this.canvasContext=canvas.getContext("2d");this.canvasContext.drawImage(this.imgDiv,0,0);}
+return this.canvasContext;}},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Layer.Grid=OpenLayers.Class(OpenLayers.Layer.HTTPRequest,{tileSize:null,tileOriginCorner:"bl",tileOrigin:null,tileOptions:null,tileClass:OpenLayers.Tile.Image,grid:null,singleTile:false,ratio:1.5,buffer:0,transitionEffect:null,numLoadingTiles:0,tileLoadingDelay:85,serverResolutions:null,moveTimerId:null,deferMoveGriddedTiles:null,tileQueueId:null,tileQueue:null,loading:false,backBuffer:null,gridResolution:null,backBufferResolution:null,backBufferLonLat:null,backBufferTimerId:null,removeBackBufferDelay:null,className:null,initialize:function(name,url,params,options){OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this,arguments);this.grid=[];this.tileQueue=[];if(this.removeBackBufferDelay===null){this.removeBackBufferDelay=this.singleTile?0:2500;}
+if(this.className===null){this.className=this.singleTile?'olLayerGridSingleTile':'olLayerGrid';}
+if(!OpenLayers.Animation.isNative){this.deferMoveGriddedTiles=OpenLayers.Function.bind(function(){this.moveGriddedTiles(true);this.moveTimerId=null;},this);}},setMap:function(map){OpenLayers.Layer.HTTPRequest.prototype.setMap.call(this,map);OpenLayers.Element.addClass(this.div,this.className);},removeMap:function(map){if(this.moveTimerId!==null){window.clearTimeout(this.moveTimerId);this.moveTimerId=null;}
+this.clearTileQueue();if(this.backBufferTimerId!==null){window.clearTimeout(this.backBufferTimerId);this.backBufferTimerId=null;}},destroy:function(){this.removeBackBuffer();this.clearGrid();this.grid=null;this.tileSize=null;OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this,arguments);},clearGrid:function(){this.clearTileQueue();if(this.grid){for(var iRow=0,len=this.grid.length;iRow<len;iRow++){var row=this.grid[iRow];for(var iCol=0,clen=row.length;iCol<clen;iCol++){var tile=row[iCol];this.destroyTile(tile);}}
+this.grid=[];this.gridResolution=null;}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Grid(this.name,this.url,this.params,this.getOptions());}
+obj=OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();}
+obj.grid=[];obj.gridResolution=null;obj.backBuffer=null;obj.backBufferTimerId=null;obj.tileQueue=[];obj.tileQueueId=null;obj.loading=false;obj.moveTimerId=null;return obj;},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments);bounds=bounds||this.map.getExtent();if(bounds!=null){var forceReTile=!this.grid.length||zoomChanged;var tilesBounds=this.getTilesBounds();var resolution=this.map.getResolution();var serverResolution=this.getServerResolution(resolution);if(this.singleTile){if(forceReTile||(!dragging&&!tilesBounds.containsBounds(bounds))){if(zoomChanged&&this.transitionEffect!=='resize'){this.removeBackBuffer();}
+if(!zoomChanged||this.transitionEffect==='resize'){this.applyBackBuffer(serverResolution);}
+this.initSingleTile(bounds);}}else{forceReTile=forceReTile||!tilesBounds.intersectsBounds(bounds,{worldBounds:this.map.baseLayer.wrapDateLine&&this.map.getMaxExtent()});if(resolution!==serverResolution){bounds=this.map.calculateBounds(null,serverResolution);if(forceReTile){var scale=serverResolution/resolution;this.transformDiv(scale);}}else{this.div.style.width='100%';this.div.style.height='100%';this.div.style.left='0%';this.div.style.top='0%';}
+if(forceReTile){if(zoomChanged&&this.transitionEffect==='resize'){this.applyBackBuffer(serverResolution);}
+this.initGriddedTiles(bounds);}else{this.moveGriddedTiles();}}}},getTileData:function(loc){var data=null,x=loc.lon,y=loc.lat,numRows=this.grid.length;if(this.map&&numRows){var res=this.map.getResolution(),tileWidth=this.tileSize.w,tileHeight=this.tileSize.h,bounds=this.grid[0][0].bounds,left=bounds.left,top=bounds.top;if(x<left){if(this.map.baseLayer.wrapDateLine){var worldWidth=this.map.getMaxExtent().getWidth();var worldsAway=Math.ceil((left-x)/worldWidth);x+=worldWidth*worldsAway;}}
+var dtx=(x-left)/(res*tileWidth);var dty=(top-y)/(res*tileHeight);var col=Math.floor(dtx);var row=Math.floor(dty);if(row>=0&&row<numRows){var tile=this.grid[row][col];if(tile){data={tile:tile,i:Math.floor((dtx-col)*tileWidth),j:Math.floor((dty-row)*tileHeight)};}}}
+return data;},queueTileDraw:function(evt){var tile=evt.object;if(!~OpenLayers.Util.indexOf(this.tileQueue,tile)){this.tileQueue.push(tile);}
+if(!this.tileQueueId){this.tileQueueId=OpenLayers.Animation.start(OpenLayers.Function.bind(this.drawTileFromQueue,this),null,this.div);}
+return false;},drawTileFromQueue:function(){if(this.tileQueue.length===0){this.clearTileQueue();}else{this.tileQueue.shift().draw(true);}},clearTileQueue:function(){OpenLayers.Animation.stop(this.tileQueueId);this.tileQueueId=null;this.tileQueue=[];},destroyTile:function(tile){this.removeTileMonitoringHooks(tile);tile.destroy();},getServerResolution:function(resolution){resolution=resolution||this.map.getResolution();if(this.serverResolutions&&OpenLayers.Util.indexOf(this.serverResolutions,resolution)===-1){var i,serverResolution;for(i=this.serverResolutions.length-1;i>=0;i--){serverResolution=this.serverResolutions[i];if(serverResolution>resolution){resolution=serverResolution;break;}}
+if(i===-1){throw'no appropriate resolution in serverResolutions';}}
+return resolution;},getServerZoom:function(){var resolution=this.getServerResolution();return this.serverResolutions?OpenLayers.Util.indexOf(this.serverResolutions,resolution):this.map.getZoomForResolution(resolution)+(this.zoomOffset||0);},transformDiv:function(scale){this.div.style.width=100*scale+'%';this.div.style.height=100*scale+'%';var size=this.map.getSize();var lcX=parseInt(this.map.layerContainerDiv.style.left,10);var lcY=parseInt(this.map.layerContainerDiv.style.top,10);var x=(lcX-(size.w/2.0))*(scale-1);var y=(lcY-(size.h/2.0))*(scale-1);this.div.style.left=x+'%';this.div.style.top=y+'%';},getResolutionScale:function(){return parseInt(this.div.style.width,10)/100;},applyBackBuffer:function(resolution){if(this.backBufferTimerId!==null){this.removeBackBuffer();}
+var backBuffer=this.backBuffer;if(!backBuffer){backBuffer=this.createBackBuffer();if(!backBuffer){return;}
+this.div.insertBefore(backBuffer,this.div.firstChild);this.backBuffer=backBuffer;var topLeftTileBounds=this.grid[0][0].bounds;this.backBufferLonLat={lon:topLeftTileBounds.left,lat:topLeftTileBounds.top};this.backBufferResolution=this.gridResolution;}
+var style=backBuffer.style;var ratio=this.backBufferResolution/resolution;style.width=100*ratio+'%';style.height=100*ratio+'%';var position=this.getViewPortPxFromLonLat(this.backBufferLonLat,resolution);var leftOffset=parseInt(this.map.layerContainerDiv.style.left,10);var topOffset=parseInt(this.map.layerContainerDiv.style.top,10);backBuffer.style.left=Math.round(position.x-leftOffset)+'%';backBuffer.style.top=Math.round(position.y-topOffset)+'%';},createBackBuffer:function(){var backBuffer;if(this.grid.length>0){backBuffer=document.createElement('div');backBuffer.id=this.div.id+'_bb';backBuffer.className='olBackBuffer';backBuffer.style.position='absolute';backBuffer.style.width='100%';backBuffer.style.height='100%';for(var i=0,lenI=this.grid.length;i<lenI;i++){for(var j=0,lenJ=this.grid[i].length;j<lenJ;j++){var tile=this.grid[i][j].createBackBuffer();if(!tile){continue;}
+tile.style.top=(i*this.tileSize.h)+'%';tile.style.left=(j*this.tileSize.w)+'%';backBuffer.appendChild(tile);}}}
+return backBuffer;},removeBackBuffer:function(){if(this.backBuffer){this.div.removeChild(this.backBuffer);this.backBuffer=null;this.backBufferResolution=null;if(this.backBufferTimerId!==null){window.clearTimeout(this.backBufferTimerId);this.backBufferTimerId=null;}}},moveByPx:function(dx,dy){if(!this.singleTile){this.moveGriddedTiles();}},setTileSize:function(size){if(this.singleTile){size=this.map.getSize();size.h=parseInt(size.h*this.ratio);size.w=parseInt(size.w*this.ratio);}
+OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this,[size]);},getTilesBounds:function(){var bounds=null;var length=this.grid.length;if(length){var bottomLeftTileBounds=this.grid[length-1][0].bounds,width=this.grid[0].length*bottomLeftTileBounds.getWidth(),height=this.grid.length*bottomLeftTileBounds.getHeight();bounds=new OpenLayers.Bounds(bottomLeftTileBounds.left,bottomLeftTileBounds.bottom,bottomLeftTileBounds.left+width,bottomLeftTileBounds.bottom+height);}
+return bounds;},initSingleTile:function(bounds){this.clearTileQueue();var center=bounds.getCenterLonLat();var tileWidth=bounds.getWidth()*this.ratio;var tileHeight=bounds.getHeight()*this.ratio;var tileBounds=new OpenLayers.Bounds(center.lon-(tileWidth/2),center.lat-(tileHeight/2),center.lon+(tileWidth/2),center.lat+(tileHeight/2));var px=this.map.getLayerPxFromLonLat({lon:tileBounds.left,lat:tileBounds.top});if(!this.grid.length){this.grid[0]=[];}
+var tile=this.grid[0][0];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);tile.draw();this.grid[0][0]=tile;}else{tile.moveTo(tileBounds,px);}
+this.removeExcessTiles(1,1);this.gridResolution=this.getServerResolution();},calculateGridLayout:function(bounds,origin,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-origin.lon;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=origin.lon+tilecol*tilelon;var offsetlat=bounds.top-(origin.lat+tilelat);var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-tilerowremain*this.tileSize.h;var tileoffsetlat=origin.lat+tilerow*tilelat;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},getTileOrigin:function(){var origin=this.tileOrigin;if(!origin){var extent=this.getMaxExtent();var edges=({"tl":["left","top"],"tr":["right","top"],"bl":["left","bottom"],
"br":["right","bottom"]})[this.tileOriginCorner];origin=new OpenLayers.LonLat(extent[edges[0]],extent[edges[1]]);}
+return origin;},initGriddedTiles:function(bounds){this.clearTileQueue();var viewSize=this.map.getSize();var minRows=Math.ceil(viewSize.h/this.tileSize.h)+
+Math.max(1,2*this.buffer);var minCols=Math.ceil(viewSize.w/this.tileSize.w)+
+Math.max(1,2*this.buffer);var origin=this.getTileOrigin();var resolution=this.getServerResolution();var tileLayout=this.calculateGridLayout(bounds,origin,resolution);var tileoffsetx=Math.round(tileLayout.tileoffsetx);var tileoffsety=Math.round(tileLayout.tileoffsety);var tileoffsetlon=tileLayout.tileoffsetlon;var tileoffsetlat=tileLayout.tileoffsetlat;var tilelon=tileLayout.tilelon;var tilelat=tileLayout.tilelat;var startX=tileoffsetx;var startLon=tileoffsetlon;var rowidx=0;var layerContainerDivLeft=parseInt(this.map.layerContainerDiv.style.left);var layerContainerDivTop=parseInt(this.map.layerContainerDiv.style.top);var tileData=[],center=this.map.getCenter();do{var row=this.grid[rowidx++];if(!row){row=[];this.grid.push(row);}
+tileoffsetlon=startLon;tileoffsetx=startX;var colidx=0;do{var tileBounds=new OpenLayers.Bounds(tileoffsetlon,tileoffsetlat,tileoffsetlon+tilelon,tileoffsetlat+tilelat);var x=tileoffsetx;x-=layerContainerDivLeft;var y=tileoffsety;y-=layerContainerDivTop;var px=new OpenLayers.Pixel(x,y);var tile=row[colidx++];if(!tile){tile=this.addTile(tileBounds,px);this.addTileMonitoringHooks(tile);row.push(tile);}else{tile.moveTo(tileBounds,px,false);}
+var tileCenter=tileBounds.getCenterLonLat();tileData.push({tile:tile,distance:Math.pow(tileCenter.lon-center.lon,2)+
+Math.pow(tileCenter.lat-center.lat,2)});tileoffsetlon+=tilelon;tileoffsetx+=this.tileSize.w;}while((tileoffsetlon<=bounds.right+tilelon*this.buffer)||colidx<minCols);tileoffsetlat-=tilelat;tileoffsety+=this.tileSize.h;}while((tileoffsetlat>=bounds.bottom-tilelat*this.buffer)||rowidx<minRows);this.removeExcessTiles(rowidx,colidx);this.gridResolution=this.getServerResolution();tileData.sort(function(a,b){return a.distance-b.distance;});for(var i=0,ii=tileData.length;i<ii;++i){tileData[i].tile.draw();}},getMaxExtent:function(){return this.maxExtent;},addTile:function(bounds,position){var tile=new this.tileClass(this,position,bounds,null,this.tileSize,this.tileOptions);tile.events.register("beforedraw",this,this.queueTileDraw);return tile;},addTileMonitoringHooks:function(tile){tile.onLoadStart=function(){if(this.loading===false){this.loading=true;this.events.triggerEvent("loadstart");}
+this.events.triggerEvent("tileloadstart",{tile:tile});this.numLoadingTiles++;};tile.onLoadEnd=function(){this.numLoadingTiles--;this.events.triggerEvent("tileloaded",{tile:tile});if(this.tileQueue.length===0&&this.numLoadingTiles===0){this.loading=false;this.events.triggerEvent("loadend");if(this.backBuffer){this.backBufferTimerId=window.setTimeout(OpenLayers.Function.bind(this.removeBackBuffer,this),this.removeBackBufferDelay);}}};tile.onLoadError=function(){this.events.triggerEvent("tileerror",{tile:tile});};tile.events.on({"loadstart":tile.onLoadStart,"loadend":tile.onLoadEnd,"unload":tile.onLoadEnd,"loaderror":tile.onLoadError,scope:this});},removeTileMonitoringHooks:function(tile){tile.unload();tile.events.un({"loadstart":tile.onLoadStart,"loadend":tile.onLoadEnd,"unload":tile.onLoadEnd,"loaderror":tile.onLoadError,scope:this});},moveGriddedTiles:function(deferred){if(!deferred&&!OpenLayers.Animation.isNative){if(this.moveTimerId!=null){window.clearTimeout(this.moveTime
rId);}
+this.moveTimerId=window.setTimeout(this.deferMoveGriddedTiles,this.tileLoadingDelay);return;}
+var buffer=this.buffer||1;var scale=this.getResolutionScale();while(true){var tlViewPort={x:(this.grid[0][0].position.x*scale)+
+parseInt(this.div.style.left,10)+
+parseInt(this.map.layerContainerDiv.style.left),y:(this.grid[0][0].position.y*scale)+
+parseInt(this.div.style.top,10)+
+parseInt(this.map.layerContainerDiv.style.top)};var tileSize={w:this.tileSize.w*scale,h:this.tileSize.h*scale};if(tlViewPort.x>-tileSize.w*(buffer-1)){this.shiftColumn(true);}else if(tlViewPort.x<-tileSize.w*buffer){this.shiftColumn(false);}else if(tlViewPort.y>-tileSize.h*(buffer-1)){this.shiftRow(true);}else if(tlViewPort.y<-tileSize.h*buffer){this.shiftRow(false);}else{break;}}},shiftRow:function(prepend){var modelRowIndex=(prepend)?0:(this.grid.length-1);var grid=this.grid;var modelRow=grid[modelRowIndex];var resolution=this.getServerResolution();var deltaY=(prepend)?-this.tileSize.h:this.tileSize.h;var deltaLat=resolution*-deltaY;var row=(prepend)?grid.pop():grid.shift();for(var i=0,len=modelRow.length;i<len;i++){var modelTile=modelRow[i];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.bottom=bounds.bottom+deltaLat;bounds.top=bounds.top+deltaLat;position.y=position.y+deltaY;row[i].moveTo(bounds,position);}
+if(prepend){grid.unshift(row);}else{grid.push(row);}},shiftColumn:function(prepend){var deltaX=(prepend)?-this.tileSize.w:this.tileSize.w;var resolution=this.getServerResolution();var deltaLon=resolution*deltaX;for(var i=0,len=this.grid.length;i<len;i++){var row=this.grid[i];var modelTileIndex=(prepend)?0:(row.length-1);var modelTile=row[modelTileIndex];var bounds=modelTile.bounds.clone();var position=modelTile.position.clone();bounds.left=bounds.left+deltaLon;bounds.right=bounds.right+deltaLon;position.x=position.x+deltaX;var tile=prepend?this.grid[i].pop():this.grid[i].shift();tile.moveTo(bounds,position);if(prepend){row.unshift(tile);}else{row.push(tile);}}},removeExcessTiles:function(rows,columns){var i,l;while(this.grid.length>rows){var row=this.grid.pop();for(i=0,l=row.length;i<l;i++){var tile=row[i];this.destroyTile(tile);}}
+for(i=0,l=this.grid.length;i<l;i++){while(this.grid[i].length>columns){var row=this.grid[i];var tile=row.pop();this.destroyTile(tile);}}},onMapResize:function(){if(this.singleTile){this.clearGrid();this.setTileSize();}},getTileBounds:function(viewPortPx){var maxExtent=this.maxExtent;var resolution=this.getResolution();var tileMapWidth=resolution*this.tileSize.w;var tileMapHeight=resolution*this.tileSize.h;var mapPoint=this.getLonLatFromViewPortPx(viewPortPx);var tileLeft=maxExtent.left+(tileMapWidth*Math.floor((mapPoint.lon-
+maxExtent.left)/tileMapWidth));var tileBottom=maxExtent.bottom+(tileMapHeight*Math.floor((mapPoint.lat-
+maxExtent.bottom)/tileMapHeight));return new OpenLayers.Bounds(tileLeft,tileBottom,tileLeft+tileMapWidth,tileBottom+tileMapHeight);},CLASS_NAME:"OpenLayers.Layer.Grid"});OpenLayers.Protocol=OpenLayers.Class({format:null,options:null,autoDestroy:true,defaultFilter:null,initialize:function(options){options=options||{};OpenLayers.Util.extend(this,options);this.options=options;},mergeWithDefaultFilter:function(filter){var merged;if(filter&&this.defaultFilter){merged=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.defaultFilter,filter]});}else{merged=filter||this.defaultFilter||undefined;}
+return merged;},destroy:function(){this.options=null;this.format=null;},read:function(options){options=options||{};options.filter=this.mergeWithDefaultFilter(options.filter);},create:function(){},update:function(){},"delete":function(){},commit:function(){},abort:function(response){},createCallback:function(method,response,options){return OpenLayers.Function.bind(function(){method.apply(this,[response,options]);},this);},CLASS_NAME:"OpenLayers.Protocol"});OpenLayers.Protocol.Response=OpenLayers.Class({code:null,requestType:null,last:true,features:null,data:null,reqFeatures:null,priv:null,error:null,initialize:function(options){OpenLayers.Util.extend(this,options);},success:function(){return this.code>0;},CLASS_NAME:"OpenLayers.Protocol.Response"});OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;OpenLayers.Control=OpenLayers.Class({id:null,map:null,div:null,type:null,allowSelection:false,displayClass:"",title:"",autoActivate:false,active:null,han
dler:null,eventListeners:null,events:null,initialize:function(options){this.displayClass=this.CLASS_NAME.replace("OpenLayers.","ol").replace(/\./g,"");OpenLayers.Util.extend(this,options);this.events=new OpenLayers.Events(this);if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);}
+if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");}},destroy:function(){if(this.events){if(this.eventListeners){this.events.un(this.eventListeners);}
+this.events.destroy();this.events=null;}
+this.eventListeners=null;if(this.handler){this.handler.destroy();this.handler=null;}
+if(this.handlers){for(var key in this.handlers){if(this.handlers.hasOwnProperty(key)&&typeof this.handlers[key].destroy=="function"){this.handlers[key].destroy();}}
+this.handlers=null;}
+if(this.map){this.map.removeControl(this);this.map=null;}
+this.div=null;},setMap:function(map){this.map=map;if(this.handler){this.handler.setMap(map);}},draw:function(px){if(this.div==null){this.div=OpenLayers.Util.createDiv(this.id);this.div.className=this.displayClass;if(!this.allowSelection){this.div.className+=" olControlNoSelect";this.div.setAttribute("unselectable","on",0);this.div.onselectstart=OpenLayers.Function.False;}
+if(this.title!=""){this.div.title=this.title;}}
+if(px!=null){this.position=px.clone();}
+this.moveTo(this.position);return this.div;},moveTo:function(px){if((px!=null)&&(this.div!=null)){this.div.style.left=px.x+"px";this.div.style.top=px.y+"px";}},activate:function(){if(this.active){return false;}
+if(this.handler){this.handler.activate();}
+this.active=true;if(this.map){OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active");}
+this.events.triggerEvent("activate");return true;},deactivate:function(){if(this.active){if(this.handler){this.handler.deactivate();}
+this.active=false;if(this.map){OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass.replace(/ /g,"")+"Active");}
+this.events.triggerEvent("deactivate");return true;}
+return false;},CLASS_NAME:"OpenLayers.Control"});OpenLayers.Control.TYPE_BUTTON=1;OpenLayers.Control.TYPE_TOGGLE=2;OpenLayers.Control.TYPE_TOOL=3;OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",template:"${layers}",destroy:function(){this.map.events.un({"removelayer":this.updateAttribution,"addlayer":this.updateAttribution,"changelayer":this.updateAttribution,"changebaselayer":this.updateAttribution,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({'changebaselayer':this.updateAttribution,'changelayer':this.updateAttribution,'addlayer':this.updateAttribution,'removelayer':this.updateAttribution,scope:this});this.updateAttribution();return this.div;},updateAttribution:function(){var attributions=[];if(this.map&&this.map.layers){for(var i=0,len=this.map.layers.length;i<len;i++){var layer=this.map.layers[i];if(layer.attribution&&
layer.getVisibility()){if(OpenLayers.Util.indexOf(attributions,layer.attribution)===-1){attributions.push(layer.attribution);}}}
+this.div.innerHTML=OpenLayers.String.format(this.template,{layers:attributions.join(this.separator)});}},CLASS_NAME:"OpenLayers.Control.Attribution"});OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:false,initialize:function(options){OpenLayers.Util.extend(this,options);this.options=options;},destroy:function(){},read:function(data){throw new Error('Read not implemented.');},write:function(object){throw new Error('Write not implemented.');},CLASS_NAME:"OpenLayers.Format"});OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:" ",space:" ",newline:"\n",level:0,pretty:false,nativeJSON:(function(){return!!(window.JSON&&typeof JSON.parse=="function"&&typeof JSON.stringify=="function");})(),read:function(json,filter){var object;if(this.nativeJSON){object=JSON.parse(json,filter);}else try{if(/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\
d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){object=eval('('+json+')');if(typeof filter==='function'){function walk(k,v){if(v&&typeof v==='object'){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i]);}}}
+return filter(k,v);}
+object=walk('',object);}}}catch(e){}
+if(this.keepData){this.data=object;}
+return object;},write:function(value,pretty){this.pretty=!!pretty;var json=null;var type=typeof value;if(this.serialize[type]){try{json=(!this.pretty&&this.nativeJSON)?JSON.stringify(value):this.serialize[type].apply(this,[value]);}catch(err){OpenLayers.Console.error("Trouble serializing: "+err);}}
+return json;},writeIndent:function(){var pieces=[];if(this.pretty){for(var i=0;i<this.level;++i){pieces.push(this.indent);}}
+return pieces.join('');},writeNewline:function(){return(this.pretty)?this.newline:'';},writeSpace:function(){return(this.pretty)?this.space:'';},serialize:{'object':function(object){if(object==null){return"null";}
+if(object.constructor==Date){return this.serialize.date.apply(this,[object]);}
+if(object.constructor==Array){return this.serialize.array.apply(this,[object]);}
+var pieces=['{'];this.level+=1;var key,keyJSON,valueJSON;var addComma=false;for(key in object){if(object.hasOwnProperty(key)){keyJSON=OpenLayers.Format.JSON.prototype.write.apply(this,[key,this.pretty]);valueJSON=OpenLayers.Format.JSON.prototype.write.apply(this,[object[key],this.pretty]);if(keyJSON!=null&&valueJSON!=null){if(addComma){pieces.push(',');}
+pieces.push(this.writeNewline(),this.writeIndent(),keyJSON,':',this.writeSpace(),valueJSON);addComma=true;}}}
+this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),'}');return pieces.join('');},'array':function(array){var json;var pieces=['['];this.level+=1;for(var i=0,len=array.length;i<len;++i){json=OpenLayers.Format.JSON.prototype.write.apply(this,[array[i],this.pretty]);if(json!=null){if(i>0){pieces.push(',');}
+pieces.push(this.writeNewline(),this.writeIndent(),json);}}
+this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),']');return pieces.join('');},'string':function(string){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};if(/["\\\x00-\x1f]/.test(string)){return'"'+string.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}
+c=b.charCodeAt();return'\\u00'+
+Math.floor(c/16).toString(16)+
+(c%16).toString(16);})+'"';}
+return'"'+string+'"';},'number':function(number){return isFinite(number)?String(number):"null";},'boolean':function(bool){return String(bool);},'date':function(date){function format(number){return(number<10)?'0'+number:number;}
+return'"'+date.getFullYear()+'-'+
+format(date.getMonth()+1)+'-'+
+format(date.getDate())+'T'+
+format(date.getHours())+':'+
+format(date.getMinutes())+':'+
+format(date.getSeconds())+'"';}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Kinetic=OpenLayers.Class({threshold:0,deceleration:0.0035,nbPoints:100,delay:200,points:undefined,timerId:undefined,initialize:function(options){OpenLayers.Util.extend(this,options);},begin:function(){OpenLayers.Animation.stop(this.timerId);this.timerId=undefined;this.points=[];},update:function(xy){this.points.unshift({xy:xy,tick:new Date().getTime()});if(this.points.length>this.nbPoints){this.points.pop();}},end:function(xy){var last,now=new Date().getTime();for(var i=0,l=this.points.length,point;i<l;i++){point=this.points[i];if(now-point.tick>this.delay){break;}
+last=point;}
+if(!last){return;}
+var time=new Date().getTime()-last.tick;var dist=Math.sqrt(Math.pow(xy.x-last.xy.x,2)+
+Math.pow(xy.y-last.xy.y,2));var speed=dist/time;if(speed==0||speed<this.threshold){return;}
+var theta=Math.asin((xy.y-last.xy.y)/dist);if(last.xy.x<=xy.x){theta=Math.PI-theta;}
+return{speed:speed,theta:theta};},move:function(info,callback){var v0=info.speed;var fx=Math.cos(info.theta);var fy=-Math.sin(info.theta);var initialTime=new Date().getTime();var lastX=0;var lastY=0;var timerCallback=function(){if(this.timerId==null){return;}
+var t=new Date().getTime()-initialTime;var p=(-this.deceleration*Math.pow(t,2))/2.0+v0*t;var x=p*fx;var y=p*fy;var args={};args.end=false;var v=-this.deceleration*t+v0;if(v<=0){OpenLayers.Animation.stop(this.timerId);this.timerId=null;args.end=true;}
+args.x=x-lastX;args.y=y-lastY;lastX=x;lastY=y;callback(args.x,args.y,args.end);};this.timerId=OpenLayers.Animation.start(OpenLayers.Function.bind(timerCallback,this));},CLASS_NAME:"OpenLayers.Kinetic"});OpenLayers.Rule=OpenLayers.Class({id:null,name:null,title:null,description:null,context:null,filter:null,elseFilter:false,symbolizer:null,symbolizers:null,minScaleDenominator:null,maxScaleDenominator:null,initialize:function(options){this.symbolizer={};OpenLayers.Util.extend(this,options);if(this.symbolizers){delete this.symbolizer;}
+this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){for(var i in this.symbolizer){this.symbolizer[i]=null;}
+this.symbolizer=null;delete this.symbolizers;},evaluate:function(feature){var context=this.getContext(feature);var applies=true;if(this.minScaleDenominator||this.maxScaleDenominator){var scale=feature.layer.map.getScale();}
+if(this.minScaleDenominator){applies=scale>=OpenLayers.Style.createLiteral(this.minScaleDenominator,context);}
+if(applies&&this.maxScaleDenominator){applies=scale<OpenLayers.Style.createLiteral(this.maxScaleDenominator,context);}
+if(applies&&this.filter){if(this.filter.CLASS_NAME=="OpenLayers.Filter.FeatureId"){applies=this.filter.evaluate(feature);}else{applies=this.filter.evaluate(context);}}
+return applies;},getContext:function(feature){var context=this.context;if(!context){context=feature.attributes||feature.data;}
+if(typeof this.context=="function"){context=this.context(feature);}
+return context;},clone:function(){var options=OpenLayers.Util.extend({},this);if(this.symbolizers){var len=this.symbolizers.length;options.symbolizers=new Array(len);for(var i=0;i<len;++i){options.symbolizers[i]=this.symbolizers[i].clone();}}else{options.symbolizer={};var value,type;for(var key in this.symbolizer){value=this.symbolizer[key];type=typeof value;if(type==="object"){options.symbolizer[key]=OpenLayers.Util.extend({},value);}else if(type==="string"){options.symbolizer[key]=value;}}}
+options.filter=this.filter&&this.filter.clone();options.context=this.context&&OpenLayers.Util.extend({},this.context);return new OpenLayers.Rule(options);},CLASS_NAME:"OpenLayers.Rule"});OpenLayers.Handler=OpenLayers.Class({id:null,control:null,map:null,keyMask:null,active:false,evt:null,initialize:function(control,callbacks,options){OpenLayers.Util.extend(this,options);this.control=control;this.callbacks=callbacks;var map=this.map||control.map;if(map){this.setMap(map);}
+this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},setMap:function(map){this.map=map;},checkModifiers:function(evt){if(this.keyMask==null){return true;}
+var keyModifiers=(evt.shiftKey?OpenLayers.Handler.MOD_SHIFT:0)|(evt.ctrlKey?OpenLayers.Handler.MOD_CTRL:0)|(evt.altKey?OpenLayers.Handler.MOD_ALT:0);return(keyModifiers==this.keyMask);},activate:function(){if(this.active){return false;}
+var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0,len=events.length;i<len;i++){if(this[events[i]]){this.register(events[i],this[events[i]]);}}
+this.active=true;return true;},deactivate:function(){if(!this.active){return false;}
+var events=OpenLayers.Events.prototype.BROWSER_EVENTS;for(var i=0,len=events.length;i<len;i++){if(this[events[i]]){this.unregister(events[i],this[events[i]]);}}
+this.active=false;return true;},callback:function(name,args){if(name&&this.callbacks[name]){this.callbacks[name].apply(this.control,args);}},register:function(name,method){this.map.events.registerPriority(name,this,method);this.map.events.registerPriority(name,this,this.setEvent);},unregister:function(name,method){this.map.events.unregister(name,this,method);this.map.events.unregister(name,this,this.setEvent);},setEvent:function(evt){this.evt=evt;return true;},destroy:function(){this.deactivate();this.control=this.map=null;},CLASS_NAME:"OpenLayers.Handler"});OpenLayers.Handler.MOD_NONE=0;OpenLayers.Handler.MOD_SHIFT=1;OpenLayers.Handler.MOD_CTRL=2;OpenLayers.Handler.MOD_ALT=4;OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,'double':false,pixelTolerance:0,dblclickTolerance:13,stopSingle:false,stopDouble:false,timerId:null,touch:false,down:null,last:null,first:null,rightclickTimerId:null,touchstart:function(evt){if(!this.touch){this.unregist
erMouseListeners();this.touch=true;}
+this.down=this.getEventInfo(evt);this.last=this.getEventInfo(evt);return true;},touchmove:function(evt){this.last=this.getEventInfo(evt);return true;},touchend:function(evt){if(this.down){evt.xy=this.last.xy;evt.lastTouches=this.last.touches;this.handleSingle(evt);this.down=null;}
+return true;},unregisterMouseListeners:function(){this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,click:this.click,dblclick:this.dblclick,scope:this});},mousedown:function(evt){this.down=this.getEventInfo(evt);this.last=this.getEventInfo(evt);return true;},mouseup:function(evt){var propagate=true;if(this.checkModifiers(evt)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(evt)){propagate=this.rightclick(evt);}
+return propagate;},rightclick:function(evt){if(this.passesTolerance(evt)){if(this.rightclickTimerId!=null){this.clearTimer();this.callback('dblrightclick',[evt]);return!this.stopDouble;}else{var clickEvent=this['double']?OpenLayers.Util.extend({},evt):this.callback('rightclick',[evt]);var delayedRightCall=OpenLayers.Function.bind(this.delayedRightCall,this,clickEvent);this.rightclickTimerId=window.setTimeout(delayedRightCall,this.delay);}}
+return!this.stopSingle;},delayedRightCall:function(evt){this.rightclickTimerId=null;if(evt){this.callback('rightclick',[evt]);}},click:function(evt){if(!this.last){this.last=this.getEventInfo(evt);}
+this.handleSingle(evt);return!this.stopSingle;},dblclick:function(evt){this.handleDouble(evt);return!this.stopDouble;},handleDouble:function(evt){if(this.passesDblclickTolerance(evt)){if(this["double"]){this.callback("dblclick",[evt]);}
+this.clearTimer();}},handleSingle:function(evt){if(this.passesTolerance(evt)){if(this.timerId!=null){if(this.last.touches&&this.last.touches.length===1){if(this["double"]){OpenLayers.Event.stop(evt);}
+this.handleDouble(evt);}
+if(!this.last.touches||this.last.touches.length!==2){this.clearTimer();}}else{this.first=this.getEventInfo(evt);var clickEvent=this.single?OpenLayers.Util.extend({},evt):null;this.queuePotentialClick(clickEvent);}}},queuePotentialClick:function(evt){this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,evt),this.delay);},passesTolerance:function(evt){var passes=true;if(this.pixelTolerance!=null&&this.down&&this.down.xy){passes=this.pixelTolerance>=this.down.xy.distanceTo(evt.xy);if(passes&&this.touch&&this.down.touches.length===this.last.touches.length){for(var i=0,ii=this.down.touches.length;i<ii;++i){if(this.getTouchDistance(this.down.touches[i],this.last.touches[i])>this.pixelTolerance){passes=false;break;}}}}
+return passes;},getTouchDistance:function(from,to){return Math.sqrt(Math.pow(from.clientX-to.clientX,2)+
+Math.pow(from.clientY-to.clientY,2));},passesDblclickTolerance:function(evt){var passes=true;if(this.down&&this.first){passes=this.down.xy.distanceTo(this.first.xy)<=this.dblclickTolerance;}
+return passes;},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null;}
+if(this.rightclickTimerId!=null){window.clearTimeout(this.rightclickTimerId);this.rightclickTimerId=null;}},delayedCall:function(evt){this.timerId=null;if(evt){this.callback("click",[evt]);}},getEventInfo:function(evt){var touches;if(evt.touches){var len=evt.touches.length;touches=new Array(len);var touch;for(var i=0;i<len;i++){touch=evt.touches[i];touches[i]={clientX:touch.clientX,clientY:touch.clientY};}}
+return{xy:evt.xy,touches:touches};},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.clearTimer();this.down=null;this.first=null;this.last=null;this.touch=false;deactivated=true;}
+return deactivated;},CLASS_NAME:"OpenLayers.Handler.Click"});OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:true,dragging:false,touch:false,last:null,start:null,lastMoveEvt:null,oldOnselectstart:null,interval:0,timeoutId:null,documentDrag:false,documentEvents:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);if(this.documentDrag===true){var me=this;this._docMove=function(evt){me.mousemove({xy:{x:evt.clientX,y:evt.clientY},element:document});};this._docUp=function(evt){me.mouseup({xy:{x:evt.clientX,y:evt.clientY}});};}},dragstart:function(evt){var propagate=true;this.dragging=false;if(this.checkModifiers(evt)&&(OpenLayers.Event.isLeftClick(evt)||OpenLayers.Event.isSingleTouch(evt))){this.started=true;this.start=evt.xy;this.last=evt.xy;OpenLayers.Element.addClass(this.map.viewPortDiv,"olDragDown");this.down(evt);this.callback("down",[evt.xy]);OpenLayers.Event.stop(evt);if(!this
.oldOnselectstart){this.oldOnselectstart=document.onselectstart?document.onselectstart:OpenLayers.Function.True;}
+document.onselectstart=OpenLayers.Function.False;propagate=!this.stopDown;}else{this.started=false;this.start=null;this.last=null;}
+return propagate;},dragmove:function(evt){this.lastMoveEvt=evt;if(this.started&&!this.timeoutId&&(evt.xy.x!=this.last.x||evt.xy.y!=this.last.y)){if(this.documentDrag===true&&this.documentEvents){if(evt.element===document){this.adjustXY(evt);this.setEvent(evt);}else{this.removeDocumentEvents();}}
+if(this.interval>0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval);}
+this.dragging=true;this.move(evt);this.callback("move",[evt.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=OpenLayers.Function.False;}
+this.last=evt.xy;}
+return true;},dragend:function(evt){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(evt);this.removeDocumentEvents();}
+var dragged=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(evt);this.callback("up",[evt.xy]);if(dragged){this.callback("done",[evt.xy]);}
+document.onselectstart=this.oldOnselectstart;}
+return true;},down:function(evt){},move:function(evt){},up:function(evt){},out:function(evt){},mousedown:function(evt){return this.dragstart(evt);},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,scope:this});}
+return this.dragstart(evt);},mousemove:function(evt){return this.dragmove(evt);},touchmove:function(evt){return this.dragmove(evt);},removeTimeout:function(){this.timeoutId=null;if(this.dragging){this.mousemove(this.lastMoveEvt);}},mouseup:function(evt){return this.dragend(evt);},touchend:function(evt){evt.xy=this.last;return this.dragend(evt);},mouseout:function(evt){if(this.started&&OpenLayers.Util.mouseLeft(evt,this.map.viewPortDiv)){if(this.documentDrag===true){this.addDocumentEvents();}else{var dragged=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(evt);this.callback("out",[]);if(dragged){this.callback("done",[evt.xy]);}
+if(document.onselectstart){document.onselectstart=this.oldOnselectstart;}}}
+return true;},click:function(evt){return(this.start==this.last);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;activated=true;}
+return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.touch=false;this.started=false;this.dragging=false;this.start=null;this.last=null;deactivated=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");}
+return deactivated;},adjustXY:function(evt){var pos=OpenLayers.Util.pagePosition(this.map.viewPortDiv);evt.xy.x-=pos[0];evt.xy.y-=pos[1];},addDocumentEvents:function(){OpenLayers.Element.addClass(document.body,"olDragDown");this.documentEvents=true;OpenLayers.Event.observe(document,"mousemove",this._docMove);OpenLayers.Event.observe(document,"mouseup",this._docUp);},removeDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents=false;OpenLayers.Event.stopObserving(document,"mousemove",this._docMove);OpenLayers.Event.stopObserving(document,"mouseup",this._docUp);},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{'click':{'in':'click','out':'clickout'},'mousemove':{'in':'over','out':'out'},'dblclick':{'in':'dblclick','out':null},'mousedown':{'in':null,'out':null},'mouseup':{'in':null,'out':null},'touchstart':{'in':'click','out':'clickout'}},feature:null,lastFeature:n
ull,down:null,up:null,touch:false,clickTolerance:4,geometryTypes:null,stopClick:true,stopDown:true,stopUp:false,initialize:function(control,layer,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.layer=layer;},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,dblclick:this.dblclick,scope:this});}
+return OpenLayers.Event.isMultiTouch(evt)?true:this.mousedown(evt);},touchmove:function(evt){OpenLayers.Event.stop(evt);},mousedown:function(evt){if(OpenLayers.Event.isLeftClick(evt)||OpenLayers.Event.isSingleTouch(evt)){this.down=evt.xy;}
+return this.handle(evt)?!this.stopDown:true;},mouseup:function(evt){this.up=evt.xy;return this.handle(evt)?!this.stopUp:true;},click:function(evt){return this.handle(evt)?!this.stopClick:true;},mousemove:function(evt){if(!this.callbacks['over']&&!this.callbacks['out']){return true;}
+this.handle(evt);return true;},dblclick:function(evt){return!this.handle(evt);},geometryTypeMatches:function(feature){return this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1;},handle:function(evt){if(this.feature&&!this.feature.layer){this.feature=null;}
+var type=evt.type;var handled=false;var previouslyIn=!!(this.feature);var click=(type=="click"||type=="dblclick"||type=="touchstart");this.feature=this.layer.getFeatureFromEvent(evt);if(this.feature&&!this.feature.layer){this.feature=null;}
+if(this.lastFeature&&!this.lastFeature.layer){this.lastFeature=null;}
+if(this.feature){if(type==="touchstart"){OpenLayers.Event.stop(evt);}
+var inNew=(this.feature!=this.lastFeature);if(this.geometryTypeMatches(this.feature)){if(previouslyIn&&inNew){if(this.lastFeature){this.triggerCallback(type,'out',[this.lastFeature]);}
+this.triggerCallback(type,'in',[this.feature]);}else if(!previouslyIn||click){this.triggerCallback(type,'in',[this.feature]);}
+this.lastFeature=this.feature;handled=true;}else{if(this.lastFeature&&(previouslyIn&&inNew||click)){this.triggerCallback(type,'out',[this.lastFeature]);}
+this.feature=null;}}else{if(this.lastFeature&&(previouslyIn||click)){this.triggerCallback(type,'out',[this.lastFeature]);}}
+return handled;},triggerCallback:function(type,mode,args){var key=this.EVENTMAP[type][mode];if(key){if(type=='click'&&this.up&&this.down){var dpx=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+
+Math.pow(this.up.y-this.down.y,2));if(dpx<=this.clickTolerance){this.callback(key,args);}}else{this.callback(key,args);}}},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop();this.map.events.on({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});activated=true;}
+return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.moveLayerBack();this.feature=null;this.lastFeature=null;this.down=null;this.up=null;this.touch=false;this.map.events.un({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});deactivated=true;}
+return deactivated;},handleMapEvents:function(evt){if(evt.type=="removelayer"||evt.property=="order"){this.moveLayerToTop();}},moveLayerToTop:function(){var index=Math.max(this.map.Z_INDEX_BASE['Feature']-1,this.layer.getZIndex())+1;this.layer.setZIndex(index);},moveLayerBack:function(){var index=this.layer.getZIndex()-1;if(index>=this.map.Z_INDEX_BASE['Feature']){this.layer.setZIndex(index);}else{this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer));}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(feature,pixel){},onDrag:function(feature,pixel){},onComplete:function(feature,pixel){},onEnter:function(feature){},onLeave:function(feature){},documentDrag:false,layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(layer,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.layer=layer;this.handlers={d
rag:new OpenLayers.Handler.Drag(this,OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},this.dragCallbacks),{documentDrag:this.documentDrag}),feature:new OpenLayers.Handler.Feature(this,this.layer,OpenLayers.Util.extend({click:this.clickFeature,clickout:this.clickoutFeature,over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})};},clickFeature:function(feature){if(this.handlers.feature.touch&&!this.over&&this.overFeature(feature)){this.handlers.drag.dragstart(this.handlers.feature.evt);this.handlers.drag.stopDown=false;}},clickoutFeature:function(feature){if(this.handlers.feature.touch&&this.over){this.outFeature(feature);this.handlers.drag.stopDown=true;}},destroy:function(){this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[]);},activate:function(){return(this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,ar
guments));},deactivate:function(){this.handlers.drag.deactivate();this.handlers.feature.deactivate();this.feature=null;this.dragging=false;this.lastPixel=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},overFeature:function(feature){var activated=false;if(!this.handlers.drag.dragging){this.feature=feature;this.handlers.drag.activate();activated=true;this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over");this.onEnter(feature);}else{if(this.feature.id==feature.id){this.over=true;}else{this.over=false;}}
+return activated;},downFeature:function(pixel){this.lastPixel=pixel;this.onStart(this.feature,pixel);},moveFeature:function(pixel){var res=this.map.getResolution();this.feature.geometry.move(res*(pixel.x-this.lastPixel.x),res*(this.lastPixel.y-pixel.y));this.layer.drawFeature(this.feature);this.lastPixel=pixel;this.onDrag(this.feature,pixel);},upFeature:function(pixel){if(!this.over){this.handlers.drag.deactivate();}},doneDragging:function(pixel){this.onComplete(this.feature,pixel);},outFeature:function(feature){if(!this.handlers.drag.dragging){this.over=false;this.handlers.drag.deactivate();OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");this.onLeave(feature);this.feature=null;}else{if(this.feature.id==feature.id){this.over=false;}}},cancel:function(){this.handlers.drag.deactivate();this.over=false;},setMap:function(map){this.handlers.drag.setMap(map);this.handlers.feature.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},
CLASS_NAME:"OpenLayers.Control.DragFeature"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:'olHandlerBoxZoomBox',boxOffsets:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.dragHandler=new OpenLayers.Handler.Drag(this,{down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox},{keyMask:this.keyMask});},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);if(this.dragHandler){this.dragHandler.destroy();this.dragHandler=null;}},setMap:function(map){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(map);}},startBox:function(xy){this.callback("start",[]);this.zoomBox=OpenLayers.Util.createDiv('zoomBox',{x:-9999,y:-9999});this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.viewPortDiv.appendChild(this.zoomBox);OpenL
ayers.Element.addClass(this.map.viewPortDiv,"olDrawBox");},moveBox:function(xy){var startX=this.dragHandler.start.x;var startY=this.dragHandler.start.y;var deltaX=Math.abs(startX-xy.x);var deltaY=Math.abs(startY-xy.y);var offset=this.getBoxOffsets();this.zoomBox.style.width=(deltaX+offset.width+1)+"px";this.zoomBox.style.height=(deltaY+offset.height+1)+"px";this.zoomBox.style.left=(xy.x<startX?startX-deltaX-offset.left:startX-offset.left)+"px";this.zoomBox.style.top=(xy.y<startY?startY-deltaY-offset.top:startY-offset.top)+"px";},endBox:function(end){var result;if(Math.abs(this.dragHandler.start.x-end.x)>5||Math.abs(this.dragHandler.start.y-end.y)>5){var start=this.dragHandler.start;var top=Math.min(start.y,end.y);var bottom=Math.max(start.y,end.y);var left=Math.min(start.x,end.x);var right=Math.max(start.x,end.x);result=new OpenLayers.Bounds(left,bottom,right,top);}else{result=this.dragHandler.start.clone();}
+this.removeBox();this.callback("done",[result]);},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;this.boxOffsets=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDrawBox");},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){if(this.dragHandler.deactivate()){if(this.zoomBox){this.removeBox();}}
+return true;}else{return false;}},getBoxOffsets:function(){if(!this.boxOffsets){var testDiv=document.createElement("div");testDiv.style.position="absolute";testDiv.style.border="1px solid black";testDiv.style.width="3px";document.body.appendChild(testDiv);var w3cBoxModel=testDiv.clientWidth==3;document.body.removeChild(testDiv);var left=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"));var right=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"));var top=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"));var bottom=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"));this.boxOffsets={left:left,right:right,top:top,bottom:bottom,width:w3cBoxModel===false?left+right:0,height:w3cBoxModel===false?top+bottom:0};}
+return this.boxOffsets;},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:false,keyMask:null,alwaysZoom:false,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask});},zoomBox:function(position){if(position instanceof OpenLayers.Bounds){var bounds;if(!this.out){var minXY=this.map.getLonLatFromPixel({x:position.left,y:position.bottom});var maxXY=this.map.getLonLatFromPixel({x:position.right,y:position.top});bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);}else{var pixWidth=Math.abs(position.right-position.left);var pixHeight=Math.abs(position.top-position.bottom);var zoomFactor=Math.min((this.map.size.h/pixHeight),(this.map.size.w/pixWidth));var extent=this.map.getExtent();var center=this.map.getLonLatFromPixel(position.getCenterPixel());var xmin=center.lon-(extent.getWidth()/2)*zoomFactor;var xmax=center.lon+(extent
.getWidth()/2)*zoomFactor;var ymin=center.lat-(extent.getHeight()/2)*zoomFactor;var ymax=center.lat+(extent.getHeight()/2)*zoomFactor;bounds=new OpenLayers.Bounds(xmin,ymin,xmax,ymax);}
+var lastZoom=this.map.getZoom();this.map.zoomToExtent(bounds);if(lastZoom==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(lastZoom+(this.out?-1:1));}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()+1);}else{this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()-1);}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:1,documentDrag:false,kinetic:null,enableKinetic:false,kineticInterval:10,draw:function(){if(this.enableKinetic){var config={interval:this.kineticInterval};if(typeof this.enableKinetic==="object"){config=OpenLayers.Util.extend(config,this.enableKinetic);}
+this.kinetic=new OpenLayers.Kinetic(config);}
+this.handler=new OpenLayers.Handler.Drag(this,{"move":this.panMap,"done":this.panMapDone,"down":this.panMapStart},{interval:this.interval,documentDrag:this.documentDrag});},panMapStart:function(){if(this.kinetic){this.kinetic.begin();}},panMap:function(xy){if(this.kinetic){this.kinetic.update(xy);}
+this.panned=true;this.map.pan(this.handler.last.x-xy.x,this.handler.last.y-xy.y,{dragging:true,animate:false});},panMapDone:function(xy){if(this.panned){var res=null;if(this.kinetic){res=this.kinetic.end(xy);}
+this.map.pan(this.handler.last.x-xy.x,this.handler.last.y-xy.y,{dragging:!!res,animate:false});if(res){var self=this;this.kinetic.move(res,function(x,y,end){self.map.pan(x,y,{dragging:!end,animate:false});});}
+this.panned=false;}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Handler.MouseWheel=OpenLayers.Class(OpenLayers.Handler,{wheelListener:null,mousePosition:null,interval:0,delta:0,cumulative:true,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.wheelListener=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);this.wheelListener=null;},onWheelEvent:function(e){if(!this.map||!this.checkModifiers(e)){return;}
+var overScrollableDiv=false;var overLayerDiv=false;var overMapDiv=false;var elem=OpenLayers.Event.element(e);while((elem!=null)&&!overMapDiv&&!overScrollableDiv){if(!overScrollableDiv){try{if(elem.currentStyle){overflow=elem.currentStyle["overflow"];}else{var style=document.defaultView.getComputedStyle(elem,null);var overflow=style.getPropertyValue("overflow");}
+overScrollableDiv=(overflow&&(overflow=="auto")||(overflow=="scroll"));}catch(err){}}
+if(!overLayerDiv){for(var i=0,len=this.map.layers.length;i<len;i++){if(elem==this.map.layers[i].div||elem==this.map.layers[i].pane){overLayerDiv=true;break;}}}
+overMapDiv=(elem==this.map.div);elem=elem.parentNode;}
+if(!overScrollableDiv&&overMapDiv){if(overLayerDiv){var delta=0;if(!e){e=window.event;}
+if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera&&window.opera.version()<9.2){delta=-delta;}}else if(e.detail){delta=-e.detail/3;}
+this.delta=this.delta+delta;if(this.interval){window.clearTimeout(this._timeoutId);this._timeoutId=window.setTimeout(OpenLayers.Function.bind(function(){this.wheelZoom(e);},this),this.interval);}else{this.wheelZoom(e);}}
+OpenLayers.Event.stop(e);}},wheelZoom:function(e){var delta=this.delta;this.delta=0;if(delta){if(this.mousePosition){e.xy=this.mousePosition;}
+if(!e.xy){e.xy=this.map.getPixelFromLonLat(this.map.getCenter());}
+if(delta<0){this.callback("down",[e,this.cumulative?delta:-1]);}else{this.callback("up",[e,this.cumulative?delta:1]);}}},mousemove:function(evt){this.mousePosition=evt.xy;},activate:function(evt){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.observe(window,"mousewheel",wheelListener);OpenLayers.Event.observe(document,"mousewheel",wheelListener);return true;}else{return false;}},deactivate:function(evt){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.stopObserving(window,"mousewheel",wheelListener);OpenLayers.Event.stopObserving(document,"mousewheel",wheelListener);return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});OpenLayers.Control.Navigation=OpenLayers.Class(OpenLayers.Con
trol,{dragPan:null,dragPanOptions:null,pinchZoom:null,pinchZoomOptions:null,documentDrag:false,zoomBox:null,zoomBoxEnabled:true,zoomWheelEnabled:true,mouseWheelOptions:null,handleRightClicks:false,zoomBoxKeyMask:OpenLayers.Handler.MOD_SHIFT,autoActivate:true,initialize:function(options){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){this.deactivate();if(this.dragPan){this.dragPan.destroy();}
+this.dragPan=null;if(this.zoomBox){this.zoomBox.destroy();}
+this.zoomBox=null;if(this.pinchZoom){this.pinchZoom.destroy();}
+this.pinchZoom=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},activate:function(){this.dragPan.activate();if(this.zoomWheelEnabled){this.handlers.wheel.activate();}
+this.handlers.click.activate();if(this.zoomBoxEnabled){this.zoomBox.activate();}
+if(this.pinchZoom){this.pinchZoom.activate();}
+return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){if(this.pinchZoom){this.pinchZoom.deactivate();}
+this.zoomBox.deactivate();this.dragPan.deactivate();this.handlers.click.deactivate();this.handlers.wheel.deactivate();return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},draw:function(){if(this.handleRightClicks){this.map.viewPortDiv.oncontextmenu=OpenLayers.Function.False;}
+var clickCallbacks={'click':this.defaultClick,'dblclick':this.defaultDblClick,'dblrightclick':this.defaultDblRightClick};var clickOptions={'double':true,'stopDouble':true};this.handlers.click=new OpenLayers.Handler.Click(this,clickCallbacks,clickOptions);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map,documentDrag:this.documentDrag},this.dragPanOptions));this.zoomBox=new OpenLayers.Control.ZoomBox({map:this.map,keyMask:this.zoomBoxKeyMask});this.dragPan.draw();this.zoomBox.draw();this.handlers.wheel=new OpenLayers.Handler.MouseWheel(this,{"up":this.wheelUp,"down":this.wheelDown},this.mouseWheelOptions);if(OpenLayers.Control.PinchZoom){this.pinchZoom=new OpenLayers.Control.PinchZoom(OpenLayers.Util.extend({map:this.map},this.pinchZoomOptions));}},defaultClick:function(evt){if(evt.lastTouches&&evt.lastTouches.length==2){this.map.zoomOut();}},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(
newCenter,this.map.zoom+1);},defaultDblRightClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom-1);},wheelChange:function(evt,deltaZ){var currentZoom=this.map.getZoom();var newZoom=this.map.getZoom()+Math.round(deltaZ);newZoom=Math.max(newZoom,0);newZoom=Math.min(newZoom,this.map.getNumZoomLevels());if(newZoom===currentZoom){return;}
+var size=this.map.getSize();var deltaX=size.w/2-evt.xy.x;var deltaY=evt.xy.y-size.h/2;var newRes=this.map.baseLayer.getResolutionForZoom(newZoom);var zoomPoint=this.map.getLonLatFromPixel(evt.xy);var newCenter=new OpenLayers.LonLat(zoomPoint.lon+deltaX*newRes,zoomPoint.lat+deltaY*newRes);this.map.setCenter(newCenter,newZoom);},wheelUp:function(evt,delta){this.wheelChange(evt,delta||1);},wheelDown:function(evt,delta){this.wheelChange(evt,delta||-1);},disableZoomBox:function(){this.zoomBoxEnabled=false;this.zoomBox.deactivate();},enableZoomBox:function(){this.zoomBoxEnabled=true;if(this.active){this.zoomBox.activate();}},disableZoomWheel:function(){this.zoomWheelEnabled=false;this.handlers.wheel.deactivate();},enableZoomWheel:function(){this.zoomWheelEnabled=true;if(this.active){this.handlers.wheel.activate();}},CLASS_NAME:"OpenLayers.Control.Navigation"});OpenLayers.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,multi:false,citeCompliant:false,mouseD
own:false,stoppedDown:null,lastDown:null,lastUp:null,persist:false,stopDown:false,stopUp:false,layerOptions:null,pixelTolerance:5,touch:false,lastTouchPx:null,initialize:function(control,callbacks,options){if(!(options&&options.layerOptions&&options.layerOptions.styleMap)){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});}
+OpenLayers.Handler.prototype.initialize.apply(this,arguments);},activate:function(){if(!OpenLayers.Handler.prototype.activate.apply(this,arguments)){return false;}
+var options=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True,wrapDateLine:this.citeCompliant},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);return true;},createFeature:function(pixel){var lonlat=this.layer.getLonLatFromViewPortPx(pixel);var geometry=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);this.point=new OpenLayers.Feature.Vector(geometry);this.callback("create",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.layer.addFeatures([this.point],{silent:true});},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false;}
+this.cancel();if(this.layer.map!=null){this.destroyFeature(true);this.layer.destroy(false);}
+this.layer=null;this.touch=false;return true;},destroyFeature:function(force){if(this.layer&&(force||!this.persist)){this.layer.destroyFeatures();}
+this.point=null;},destroyPersistedFeature:function(){var layer=this.layer;if(layer&&layer.features.length>1){this.layer.features[0].destroy();}},finalize:function(cancel){var key=cancel?"cancel":"done";this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.lastTouchPx=null;this.callback(key,[this.geometryClone()]);this.destroyFeature(cancel);},cancel:function(){this.finalize(true);},click:function(evt){OpenLayers.Event.stop(evt);return false;},dblclick:function(evt){OpenLayers.Event.stop(evt);return false;},modifyFeature:function(pixel){if(!this.point){this.createFeature(pixel);}
+var lonlat=this.layer.getLonLatFromViewPortPx(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.callback("modify",[this.point.geometry,this.point,false]);this.point.geometry.clearBounds();this.drawFeature();},drawFeature:function(){this.layer.drawFeature(this.point,this.style);},getGeometry:function(){var geometry=this.point&&this.point.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiPoint([geometry]);}
+return geometry;},geometryClone:function(){var geom=this.getGeometry();return geom&&geom.clone();},mousedown:function(evt){return this.down(evt);},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,dblclick:this.dblclick,scope:this});}
+this.lastTouchPx=evt.xy;return this.down(evt);},mousemove:function(evt){return this.move(evt);},touchmove:function(evt){this.lastTouchPx=evt.xy;return this.move(evt);},mouseup:function(evt){return this.up(evt);},touchend:function(evt){evt.xy=this.lastTouchPx;return this.up(evt);},down:function(evt){this.mouseDown=true;this.lastDown=evt.xy;if(!this.touch){this.modifyFeature(evt.xy);}
+this.stoppedDown=this.stopDown;return!this.stopDown;},move:function(evt){if(!this.touch&&(!this.mouseDown||this.stoppedDown)){this.modifyFeature(evt.xy);}
+return true;},up:function(evt){this.mouseDown=false;this.stoppedDown=this.stopDown;if(!this.checkModifiers(evt)){return true;}
+if(this.lastUp&&this.lastUp.equals(evt.xy)){return true;}
+if(this.lastDown&&this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance)){if(this.touch){this.modifyFeature(evt.xy);}
+if(this.persist){this.destroyPersistedFeature();}
+this.lastUp=evt.xy;this.finalize();return!this.stopUp;}else{return true;}},mouseout:function(evt){if(OpenLayers.Util.mouseLeft(evt,this.map.viewPortDiv)){this.stoppedDown=this.stopDown;this.mouseDown=false;}},passesTolerance:function(pixel1,pixel2,tolerance){var passes=true;if(tolerance!=null&&pixel1&&pixel2){var dist=pixel1.distanceTo(pixel2);if(dist>tolerance){passes=false;}}
+return passes;},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Events.buttonclick=OpenLayers.Class({target:null,events:['mousedown','mouseup','click','dblclick','touchstart','touchmove','touchend','keydown'],startRegEx:/^mousedown|touchstart$/,cancelRegEx:/^touchmove$/,completeRegEx:/^mouseup|touchend$/,initialize:function(target){this.target=target;for(var i=this.events.length-1;i>=0;--i){this.target.register(this.events[i],this,this.buttonClick,{extension:true});}},destroy:function(){for(var i=this.events.length-1;i>=0;--i){this.target.unregister(this.events[i],this,this.buttonClick);}
+delete this.target;},getPressedButton:function(element){var depth=3,button;do{if(OpenLayers.Element.hasClass(element,"olButton")){button=element;break;}
+element=element.parentNode;}while(--depth>0&&element);return button;},buttonClick:function(evt){var propagate=true,element=OpenLayers.Event.element(evt);if(element&&(OpenLayers.Event.isLeftClick(evt)||!~evt.type.indexOf("mouse"))){var button=this.getPressedButton(element);if(button){if(evt.type==="keydown"){switch(evt.keyCode){case OpenLayers.Event.KEY_RETURN:case OpenLayers.Event.KEY_SPACE:this.target.triggerEvent("buttonclick",{buttonElement:button});OpenLayers.Event.stop(evt);propagate=false;break;}}else if(this.startEvt){if(this.completeRegEx.test(evt.type)){var pos=OpenLayers.Util.pagePosition(button);this.target.triggerEvent("buttonclick",{buttonElement:button,buttonXY:{x:this.startEvt.clientX-pos[0],y:this.startEvt.clientY-pos[1]}});}
+if(this.cancelRegEx.test(evt.type)){delete this.startEvt;}
+OpenLayers.Event.stop(evt);propagate=false;}
+if(this.startRegEx.test(evt.type)){this.startEvt=evt;OpenLayers.Event.stop(evt);propagate=false;}}else{delete this.startEvt;}}
+return propagate;}});OpenLayers.Handler.Pinch=OpenLayers.Class(OpenLayers.Handler,{started:false,stopDown:false,pinching:false,last:null,start:null,touchstart:function(evt){var propagate=true;this.pinching=false;if(OpenLayers.Event.isMultiTouch(evt)){this.started=true;this.last=this.start={distance:this.getDistance(evt.touches),delta:0,scale:1};this.callback("start",[evt,this.start]);propagate=!this.stopDown;}else{this.started=false;this.start=null;this.last=null;}
+OpenLayers.Event.stop(evt);return propagate;},touchmove:function(evt){if(this.started&&OpenLayers.Event.isMultiTouch(evt)){this.pinching=true;var current=this.getPinchData(evt);this.callback("move",[evt,current]);this.last=current;OpenLayers.Event.stop(evt);}
+return true;},touchend:function(evt){if(this.started){this.started=false;this.pinching=false;this.callback("done",[evt,this.start,this.last]);this.start=null;this.last=null;}
+return true;},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.pinching=false;activated=true;}
+return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.pinching=false;this.start=null;this.last=null;deactivated=true;}
+return deactivated;},getDistance:function(touches){var t0=touches[0];var t1=touches[1];return Math.sqrt(Math.pow(t0.clientX-t1.clientX,2)+
+Math.pow(t0.clientY-t1.clientY,2));},getPinchData:function(evt){var distance=this.getDistance(evt.touches);var scale=distance/this.start.distance;return{distance:distance,delta:this.last.distance-distance,scale:scale};},CLASS_NAME:"OpenLayers.Handler.Pinch"});OpenLayers.Control.PinchZoom=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,containerCenter:null,pinchOrigin:null,currentCenter:null,autoActivate:true,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Pinch(this,{start:this.pinchStart,move:this.pinchMove,done:this.pinchDone},this.handlerOptions);},activate:function(){var activated=OpenLayers.Control.prototype.activate.apply(this,arguments);if(activated){this.map.events.on({moveend:this.updateContainerCenter,scope:this});this.updateContainerCenter();}
+return activated;},deactivate:function(){var deactivated=OpenLayers.Control.prototype.deactivate.apply(this,arguments);if(this.map&&this.map.events){this.map.events.un({moveend:this.updateContainerCenter,scope:this});}
+return deactivated;},updateContainerCenter:function(){var container=this.map.layerContainerDiv;this.containerCenter={x:parseInt(container.style.left,10)+50,y:parseInt(container.style.top,10)+50};},pinchStart:function(evt,pinchData){this.pinchOrigin=evt.xy;this.currentCenter=evt.xy;},pinchMove:function(evt,pinchData){var scale=pinchData.scale;var containerCenter=this.containerCenter;var pinchOrigin=this.pinchOrigin;var current=evt.xy;var dx=Math.round((current.x-pinchOrigin.x)+(scale-1)*(containerCenter.x-pinchOrigin.x));var dy=Math.round((current.y-pinchOrigin.y)+(scale-1)*(containerCenter.y-pinchOrigin.y));this.applyTransform("translate("+dx+"px, "+dy+"px) scale("+scale+")");this.currentCenter=current;},applyTransform:function(transform){var style=this.map.layerContainerDiv.style;style['-webkit-transform']=transform;style['-moz-transform']=transform;},pinchDone:function(evt,start,last){this.applyTransform("");var zoom=this.map.getZoomForResolution(this.map.getResolution()/l
ast.scale,true);if(zoom!==this.map.getZoom()||!this.currentCenter.equals(this.pinchOrigin)){var resolution=this.map.getResolutionForZoom(zoom);var location=this.map.getLonLatFromPixel(this.pinchOrigin);var zoomPixel=this.currentCenter;var size=this.map.getSize();location.lon+=resolution*((size.w/2)-zoomPixel.x);location.lat-=resolution*((size.h/2)-zoomPixel.y);this.map.div.clientWidth=this.map.div.clientWidth;this.map.setCenter(location,zoom);}},CLASS_NAME:"OpenLayers.Control.PinchZoom"});OpenLayers.Control.TouchNavigation=OpenLayers.Class(OpenLayers.Control,{dragPan:null,dragPanOptions:null,pinchZoom:null,pinchZoomOptions:null,clickHandlerOptions:null,documentDrag:false,autoActivate:true,initialize:function(options){this.handlers={};OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){this.deactivate();if(this.dragPan){this.dragPan.destroy();}
+this.dragPan=null;if(this.pinchZoom){this.pinchZoom.destroy();delete this.pinchZoom;}
+OpenLayers.Control.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){this.dragPan.activate();this.handlers.click.activate();this.pinchZoom.activate();return true;}
+return false;},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.dragPan.deactivate();this.handlers.click.deactivate();this.pinchZoom.deactivate();return true;}
+return false;},draw:function(){var clickCallbacks={click:this.defaultClick,dblclick:this.defaultDblClick};var clickOptions=OpenLayers.Util.extend({"double":true,stopDouble:true,pixelTolerance:2},this.clickHandlerOptions);this.handlers.click=new OpenLayers.Handler.Click(this,clickCallbacks,clickOptions);this.dragPan=new OpenLayers.Control.DragPan(OpenLayers.Util.extend({map:this.map,documentDrag:this.documentDrag},this.dragPanOptions));this.dragPan.draw();this.pinchZoom=new OpenLayers.Control.PinchZoom(OpenLayers.Util.extend({map:this.map},this.pinchZoomOptions));},defaultClick:function(evt){if(evt.lastTouches&&evt.lastTouches.length==2){this.map.zoomOut();}},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);},CLASS_NAME:"OpenLayers.Control.TouchNavigation"});OpenLayers.Layer.WMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{service:"WMS",version:"1.1.1",request:"GetMap",styles:"",forma
t:"image/jpeg"},isBaseLayer:true,encodeBBOX:false,noMagic:false,yx:{},initialize:function(name,url,params,options){var newArguments=[];params=OpenLayers.Util.upperCaseObject(params);if(parseFloat(params.VERSION)>=1.3&&!params.EXCEPTIONS){params.EXCEPTIONS="INIMAGE";}
+newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((options==null)||(!options.isBaseLayer)){this.isBaseLayer=false;}
+if(this.params.FORMAT=="image/jpeg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png";}}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.getOptions());}
+obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},reverseAxisOrder:function(){var projCode=this.projection.getCode();return parseFloat(this.params.VERSION)>=1.3&&!!(this.yx[projCode]||OpenLayers.Projection.defaults[projCode].yx);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var imageSize=this.getImageSize();var newParams={};var reverseAxisOrder=this.reverseAxisOrder();newParams.BBOX=this.encodeBBOX?bounds.toBBOX(null,reverseAxisOrder):bounds.toArray(reverseAxisOrder);newParams.WIDTH=imageSize.w;newParams.HEIGHT=imageSize.h;var requestString=this.getFullRequestString(newParams);return requestString;},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,newArguments);},getFullRequestString:function(newParams,altUrl){var mapProjection=this.map.getProjectionObject();var projectionCode=this.projection&&this.pr
ojection.equals(mapProjection)?this.projection.getCode():mapProjection.getCode();var value=(projectionCode=="none")?null:projectionCode;if(parseFloat(this.params.VERSION)>=1.3){this.params.CRS=value;}else{this.params.SRS=value;}
+if(typeof this.params.TRANSPARENT=="boolean"){newParams.TRANSPARENT=this.params.TRANSPARENT?"TRUE":"FALSE";}
+return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Renderer=OpenLayers.Class({container:null,root:null,extent:null,locked:false,size:null,resolution:null,map:null,featureDx:0,initialize:function(containerID,options){this.container=OpenLayers.Util.getElement(containerID);OpenLayers.Util.extend(this,options);},destroy:function(){this.container=null;this.extent=null;this.size=null;this.resolution=null;this.map=null;},supported:function(){return false;},setExtent:function(extent,resolutionChanged){this.extent=extent.clone();if(this.map.baseLayer&&this.map.baseLayer.wrapDateLine){var ratio=extent.getWidth()/this.map.getExtent().getWidth(),extent=extent.scale(1/ratio);this.extent=extent.wrapDateLine(this.map.getMaxExtent()).scale(ratio);}
+if(resolutionChanged){this.resolution=null;}
+return true;},setSize:function(size){this.size=size.clone();this.resolution=null;},getResolution:function(){this.resolution=this.resolution||this.map.getResolution();return this.resolution;},drawFeature:function(feature,style){if(style==null){style=feature.style;}
+if(feature.geometry){var bounds=feature.geometry.getBounds();if(bounds){var worldBounds;if(this.map.baseLayer&&this.map.baseLayer.wrapDateLine){worldBounds=this.map.getMaxExtent();}
+if(!bounds.intersectsBounds(this.extent,{worldBounds:worldBounds})){style={display:"none"};}else{this.calculateFeatureDx(bounds,worldBounds);}
+var rendered=this.drawGeometry(feature.geometry,style,feature.id);if(style.display!="none"&&style.label&&rendered!==false){var location=feature.geometry.getCentroid();if(style.labelXOffset||style.labelYOffset){var xOffset=isNaN(style.labelXOffset)?0:style.labelXOffset;var yOffset=isNaN(style.labelYOffset)?0:style.labelYOffset;var res=this.getResolution();location.move(xOffset*res,yOffset*res);}
+this.drawText(feature.id,style,location);}else{this.removeText(feature.id);}
+return rendered;}}},calculateFeatureDx:function(bounds,worldBounds){this.featureDx=0;if(worldBounds){var worldWidth=worldBounds.getWidth(),rendererCenterX=(this.extent.left+this.extent.right)/2,featureCenterX=(bounds.left+bounds.right)/2,worldsAway=Math.round((featureCenterX-rendererCenterX)/worldWidth);this.featureDx=worldsAway*worldWidth;}},drawGeometry:function(geometry,style,featureId){},drawText:function(featureId,style,location){},removeText:function(featureId){},clear:function(){},getFeatureIdFromEvent:function(evt){},eraseFeatures:function(features){if(!(OpenLayers.Util.isArray(features))){features=[features];}
+for(var i=0,len=features.length;i<len;++i){var feature=features[i];this.eraseGeometry(feature.geometry,feature.id);this.removeText(feature.id);}},eraseGeometry:function(geometry,featureId){},moveRoot:function(renderer){},getRenderLayerId:function(){return this.container.id;},applyDefaultSymbolizer:function(symbolizer){var result=OpenLayers.Util.extend({},OpenLayers.Renderer.defaultSymbolizer);if(symbolizer.stroke===false){delete result.strokeWidth;delete result.strokeColor;}
+if(symbolizer.fill===false){delete result.fillColor;}
+OpenLayers.Util.extend(result,symbolizer);return result;},CLASS_NAME:"OpenLayers.Renderer"});OpenLayers.Renderer.defaultSymbolizer={fillColor:"#000000",strokeColor:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,pointRadius:0,labelAlign:'cm'};OpenLayers.Renderer.symbol={"star":[350,75,379,161,469,161,397,215,423,301,350,250,277,301,303,215,231,161,321,161,350,75],"cross":[4,0,6,0,6,4,10,4,10,6,6,6,6,10,4,10,4,6,0,6,0,4,4,4,4,0],"x":[0,0,25,0,50,35,75,0,100,0,65,50,100,100,75,100,50,65,25,100,0,100,35,50,0,0],"square":[0,0,0,1,1,1,1,0,0,0],"triangle":[0,10,10,10,5,0,0,10]};OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(style,options){this.styles={"default":new OpenLayers.Style(OpenLayers.Feature.Vector.style["default"]),"select":new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]),"temporary":new OpenLayers.Style(OpenLayers.Feature.Vector.style["temporary"]),"delete":new OpenLayers.Style(OpenLayers.Feature.Vector.styl
e["delete"])};if(style instanceof OpenLayers.Style){this.styles["default"]=style;this.styles["select"]=style;this.styles["temporary"]=style;this.styles["delete"]=style;}else if(typeof style=="object"){for(var key in style){if(style[key]instanceof OpenLayers.Style){this.styles[key]=style[key];}else if(typeof style[key]=="object"){this.styles[key]=new OpenLayers.Style(style[key]);}else{this.styles["default"]=new OpenLayers.Style(style);this.styles["select"]=new OpenLayers.Style(style);this.styles["temporary"]=new OpenLayers.Style(style);this.styles["delete"]=new OpenLayers.Style(style);break;}}}
+OpenLayers.Util.extend(this,options);},destroy:function(){for(var key in this.styles){this.styles[key].destroy();}
+this.styles=null;},createSymbolizer:function(feature,intent){if(!feature){feature=new OpenLayers.Feature.Vector();}
+if(!this.styles[intent]){intent="default";}
+feature.renderIntent=intent;var defaultSymbolizer={};if(this.extendDefault&&intent!="default"){defaultSymbolizer=this.styles["default"].createSymbolizer(feature);}
+return OpenLayers.Util.extend(defaultSymbolizer,this.styles[intent].createSymbolizer(feature));},addUniqueValueRules:function(renderIntent,property,symbolizers,context){var rules=[];for(var value in symbolizers){rules.push(new OpenLayers.Rule({symbolizer:symbolizers[value],context:context,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:property,value:value})}));}
+this.styles[renderIntent].addRules(rules);},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,isFixed:false,features:null,filter:null,selectedFeatures:null,unrenderedFeatures:null,reportError:true,style:null,styleMap:null,strategies:null,protocol:null,renderers:['SVG','VML','Canvas'],renderer:null,rendererOptions:null,geometryType:null,drawn:false,ratio:1,initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported()){this.assignRenderer();}
+if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError();}
+if(!this.styleMap){this.styleMap=new OpenLayers.StyleMap();}
+this.features=[];this.selectedFeatures=[];this.unrenderedFeatures={};if(this.strategies){for(var i=0,len=this.strategies.length;i<len;i++){this.strategies[i].setLayer(this);}}},destroy:function(){if(this.strategies){var strategy,i,len;for(i=0,len=this.strategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoDestroy){strategy.destroy();}}
+this.strategies=null;}
+if(this.protocol){if(this.protocol.autoDestroy){this.protocol.destroy();}
+this.protocol=null;}
+this.destroyFeatures();this.features=null;this.selectedFeatures=null;this.unrenderedFeatures=null;if(this.renderer){this.renderer.destroy();}
+this.renderer=null;this.geometryType=null;this.drawn=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Vector(this.name,this.getOptions());}
+obj=OpenLayers.Layer.prototype.clone.apply(this,[obj]);var features=this.features;var len=features.length;var clonedFeatures=new Array(len);for(var i=0;i<len;++i){clonedFeatures[i]=features[i].clone();}
+obj.features=clonedFeatures;return obj;},refresh:function(obj){if(this.calculateInRange()&&this.visibility){this.events.triggerEvent("refresh",obj);}},assignRenderer:function(){for(var i=0,len=this.renderers.length;i<len;i++){var rendererClass=this.renderers[i];var renderer=(typeof rendererClass=="function")?rendererClass:OpenLayers.Renderer[rendererClass];if(renderer&&renderer.prototype.supported()){this.renderer=new renderer(this.div,this.rendererOptions);break;}}},displayError:function(){if(this.reportError){OpenLayers.Console.userError(OpenLayers.i18n("browserNotSupported",{renderers:this.renderers.join('\n')}));}},setMap:function(map){OpenLayers.Layer.prototype.setMap.apply(this,arguments);if(!this.renderer){this.map.removeLayer(this);}else{this.renderer.map=this.map;var newSize=this.map.getSize();newSize.w=newSize.w*this.ratio;newSize.h=newSize.h*this.ratio;this.renderer.setSize(newSize);}},afterAdd:function(){if(this.strategies){var strategy,i,len;for(i=0,len=this.str
ategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoActivate){strategy.activate();}}}},removeMap:function(map){this.drawn=false;if(this.strategies){var strategy,i,len;for(i=0,len=this.strategies.length;i<len;i++){strategy=this.strategies[i];if(strategy.autoActivate){strategy.deactivate();}}}},onMapResize:function(){OpenLayers.Layer.prototype.onMapResize.apply(this,arguments);var newSize=this.map.getSize();newSize.w=newSize.w*this.ratio;newSize.h=newSize.h*this.ratio;this.renderer.setSize(newSize);},moveTo:function(bounds,zoomChanged,dragging){OpenLayers.Layer.prototype.moveTo.apply(this,arguments);var coordSysUnchanged=true;if(!dragging){this.renderer.root.style.visibility='hidden';var viewSize=this.map.getSize(),viewWidth=viewSize.w,viewHeight=viewSize.h,offsetLeft=(viewWidth/2*this.ratio)-viewWidth/2,offsetTop=(viewHeight/2*this.ratio)-viewHeight/2;offsetLeft+=parseInt(this.map.layerContainerDiv.style.left,10);offsetLeft=-Math.round(offsetLeft);offsetTop+
=parseInt(this.map.layerContainerDiv.style.top,10);offsetTop=-Math.round(offsetTop);this.div.style.left=offsetLeft+'px';this.div.style.top=offsetTop+'px';var extent=this.map.getExtent().scale(this.ratio);coordSysUnchanged=this.renderer.setExtent(extent,zoomChanged);this.renderer.root.style.visibility='visible';if(OpenLayers.IS_GECKO===true){this.div.scrollLeft=this.div.scrollLeft;}
+if(!zoomChanged&&coordSysUnchanged){for(var i in this.unrenderedFeatures){var feature=this.unrenderedFeatures[i];this.drawFeature(feature);}}}
+if(!this.drawn||zoomChanged||!coordSysUnchanged){this.drawn=true;var feature;for(var i=0,len=this.features.length;i<len;i++){this.renderer.locked=(i!==(len-1));feature=this.features[i];this.drawFeature(feature);}}},display:function(display){OpenLayers.Layer.prototype.display.apply(this,arguments);var currentDisplay=this.div.style.display;if(currentDisplay!=this.renderer.root.style.display){this.renderer.root.style.display=currentDisplay;}},addFeatures:function(features,options){if(!(OpenLayers.Util.isArray(features))){features=[features];}
+var notify=!options||!options.silent;if(notify){var event={features:features};var ret=this.events.triggerEvent("beforefeaturesadded",event);if(ret===false){return;}
+features=event.features;}
+var featuresAdded=[];for(var i=0,len=features.length;i<len;i++){if(i!=(features.length-1)){this.renderer.locked=true;}else{this.renderer.locked=false;}
+var feature=features[i];if(this.geometryType&&!(feature.geometry instanceof this.geometryType)){throw new TypeError('addFeatures: component should be an '+
+this.geometryType.prototype.CLASS_NAME);}
+feature.layer=this;if(!feature.style&&this.style){feature.style=OpenLayers.Util.extend({},this.style);}
+if(notify){if(this.events.triggerEvent("beforefeatureadded",{feature:feature})===false){continue;}
+this.preFeatureInsert(feature);}
+featuresAdded.push(feature);this.features.push(feature);this.drawFeature(feature);if(notify){this.events.triggerEvent("featureadded",{feature:feature});this.onFeatureInsert(feature);}}
+if(notify){this.events.triggerEvent("featuresadded",{features:featuresAdded});}},removeFeatures:function(features,options){if(!features||features.length===0){return;}
+if(features===this.features){return this.removeAllFeatures(options);}
+if(!(OpenLayers.Util.isArray(features))){features=[features];}
+if(features===this.selectedFeatures){features=features.slice();}
+var notify=!options||!options.silent;if(notify){this.events.triggerEvent("beforefeaturesremoved",{features:features});}
+for(var i=features.length-1;i>=0;i--){if(i!=0&&features[i-1].geometry){this.renderer.locked=true;}else{this.renderer.locked=false;}
+var feature=features[i];delete this.unrenderedFeatures[feature.id];if(notify){this.events.triggerEvent("beforefeatureremoved",{feature:feature});}
+this.features=OpenLayers.Util.removeItem(this.features,feature);feature.layer=null;if(feature.geometry){this.renderer.eraseFeatures(feature);}
+if(OpenLayers.Util.indexOf(this.selectedFeatures,feature)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,feature);}
+if(notify){this.events.triggerEvent("featureremoved",{feature:feature});}}
+if(notify){this.events.triggerEvent("featuresremoved",{features:features});}},removeAllFeatures:function(options){var notify=!options||!options.silent;var features=this.features;if(notify){this.events.triggerEvent("beforefeaturesremoved",{features:features});}
+var feature;for(var i=features.length-1;i>=0;i--){feature=features[i];if(notify){this.events.triggerEvent("beforefeatureremoved",{feature:feature});}
+feature.layer=null;if(notify){this.events.triggerEvent("featureremoved",{feature:feature});}}
+this.renderer.clear();this.features=[];this.unrenderedFeatures={};this.selectedFeatures=[];if(notify){this.events.triggerEvent("featuresremoved",{features:features});}},destroyFeatures:function(features,options){var all=(features==undefined);if(all){features=this.features;}
+if(features){this.removeFeatures(features,options);for(var i=features.length-1;i>=0;i--){features[i].destroy();}}},drawFeature:function(feature,style){if(!this.drawn){return;}
+if(typeof style!="object"){if(!style&&feature.state===OpenLayers.State.DELETE){style="delete";}
+var renderIntent=style||feature.renderIntent;style=feature.style||this.style;if(!style){style=this.styleMap.createSymbolizer(feature,renderIntent);}}
+var drawn=this.renderer.drawFeature(feature,style);if(drawn===false||drawn===null){this.unrenderedFeatures[feature.id]=feature;}else{delete this.unrenderedFeatures[feature.id];}},eraseFeatures:function(features){this.renderer.eraseFeatures(features);},getFeatureFromEvent:function(evt){if(!this.renderer){throw new Error('getFeatureFromEvent called on layer with no '+'renderer. This usually means you destroyed a '+'layer, but not some handler which is associated '+'with it.');}
+var feature=null;var featureId=this.renderer.getFeatureIdFromEvent(evt);if(featureId){if(typeof featureId==="string"){feature=this.getFeatureById(featureId);}else{feature=featureId;}}
+return feature;},getFeatureBy:function(property,value){var feature=null;for(var i=0,len=this.features.length;i<len;++i){if(this.features[i][property]==value){feature=this.features[i];break;}}
+return feature;},getFeatureById:function(featureId){return this.getFeatureBy('id',featureId);},getFeatureByFid:function(featureFid){return this.getFeatureBy('fid',featureFid);},getFeaturesByAttribute:function(attrName,attrValue){var i,feature,len=this.features.length,foundFeatures=[];for(i=0;i<len;i++){feature=this.features[i];if(feature&&feature.attributes){if(feature.attributes[attrName]===attrValue){foundFeatures.push(feature);}}}
+return foundFeatures;},onFeatureInsert:function(feature){},preFeatureInsert:function(feature){},getDataExtent:function(){var maxExtent=null;var features=this.features;if(features&&(features.length>0)){var geometry=null;for(var i=0,len=features.length;i<len;i++){geometry=features[i].geometry;if(geometry){if(maxExtent===null){maxExtent=new OpenLayers.Bounds();}
+maxExtent.extend(geometry.getBounds());}}}
+return maxExtent;},CLASS_NAME:"OpenLayers.Layer.Vector"});OpenLayers.Control.Geolocate=OpenLayers.Class(OpenLayers.Control,{geolocation:navigator.geolocation,bind:true,watch:false,geolocationOptions:null,destroy:function(){this.deactivate();OpenLayers.Control.prototype.destroy.apply(this,arguments);},activate:function(){if(!this.geolocation){this.events.triggerEvent("locationuncapable");return false;}
+if(OpenLayers.Control.prototype.activate.apply(this,arguments)){if(this.watch){this.watchId=this.geolocation.watchPosition(OpenLayers.Function.bind(this.geolocate,this),OpenLayers.Function.bind(this.failure,this),this.geolocationOptions);}else{this.getCurrentLocation();}
+return true;}
+return false;},deactivate:function(){if(this.active&&this.watchId!==null){this.geolocation.clearWatch(this.watchId);}
+return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},geolocate:function(position){var center=new OpenLayers.LonLat(position.coords.longitude,position.coords.latitude).transform(new OpenLayers.Projection("EPSG:4326"),this.map.getProjectionObject());if(this.bind){this.map.setCenter(center);}
+this.events.triggerEvent("locationupdated",{position:position,point:new OpenLayers.Geometry.Point(center.lon,center.lat)});},getCurrentLocation:function(){if(!this.active||this.watch){return false;}
+this.geolocation.getCurrentPosition(OpenLayers.Function.bind(this.geolocate,this),OpenLayers.Function.bind(this.failure,this),this.geolocationOptions);return true;},failure:function(error){this.events.triggerEvent("locationfailed",{error:error});},CLASS_NAME:"OpenLayers.Control.Geolocate"});OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,maxVertices:null,doubleTouchTolerance:20,freehand:false,freehandToggle:'shiftKey',timerId:null,redoStack:null,createFeature:function(pixel){var lonlat=this.layer.getLonLatFromViewPortPx(pixel);var geometry=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);this.point=new OpenLayers.Feature.Vector(geometry);this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([this.point.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.line,this.point],{silent:true});},destroyFeature:function(force){OpenLayers.Handler.P
oint.prototype.destroyFeature.call(this,force);this.line=null;},destroyPersistedFeature:function(){var layer=this.layer;if(layer&&layer.features.length>2){this.layer.features[0].destroy();}},removePoint:function(){if(this.point){this.layer.removeFeatures([this.point]);}},addPoint:function(pixel){this.layer.removeFeatures([this.point]);var lonlat=this.layer.getLonLatFromViewPortPx(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat));this.line.geometry.addComponent(this.point.geometry,this.line.geometry.components.length);this.layer.addFeatures([this.point]);this.callback("point",[this.point.geometry,this.getGeometry()]);this.callback("modify",[this.point.geometry,this.getSketch()]);this.drawFeature();delete this.redoStack;},insertXY:function(x,y){this.line.geometry.addComponent(new OpenLayers.Geometry.Point(x,y),this.getCurrentPointIndex());this.drawFeature();delete this.redoStack;},insertDeltaXY:function(dx,dy){var previousInd
ex=this.getCurrentPointIndex()-1;var p0=this.line.geometry.components[previousIndex];if(p0&&!isNaN(p0.x)&&!isNaN(p0.y)){this.insertXY(p0.x+dx,p0.y+dy);}},insertDirectionLength:function(direction,length){direction*=Math.PI/180;var dx=length*Math.cos(direction);var dy=length*Math.sin(direction);this.insertDeltaXY(dx,dy);},insertDeflectionLength:function(deflection,length){var previousIndex=this.getCurrentPointIndex()-1;if(previousIndex>0){var p1=this.line.geometry.components[previousIndex];var p0=this.line.geometry.components[previousIndex-1];var theta=Math.atan2(p1.y-p0.y,p1.x-p0.x);this.insertDirectionLength((theta*180/Math.PI)+deflection,length);}},getCurrentPointIndex:function(){return this.line.geometry.components.length-1;},undo:function(){var geometry=this.line.geometry;var components=geometry.components;var index=this.getCurrentPointIndex()-1;var target=components[index];var undone=geometry.removeComponent(target);if(undone){if(!this.redoStack){this.redoStack=[];}
+this.redoStack.push(target);this.drawFeature();}
+return undone;},redo:function(){var target=this.redoStack&&this.redoStack.pop();if(target){this.line.geometry.addComponent(target,this.getCurrentPointIndex());this.drawFeature();}
+return!!target;},freehandMode:function(evt){return(this.freehandToggle&&evt[this.freehandToggle])?!this.freehand:this.freehand;},modifyFeature:function(pixel,drawing){if(!this.line){this.createFeature(pixel);}
+var lonlat=this.layer.getLonLatFromViewPortPx(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.callback("modify",[this.point.geometry,this.getSketch(),drawing]);this.point.geometry.clearBounds();this.drawFeature();},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style);},getSketch:function(){return this.line;},getGeometry:function(){var geometry=this.line&&this.line.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiLineString([geometry]);}
+return geometry;},touchstart:function(evt){if(this.timerId&&this.passesTolerance(this.lastTouchPx,evt.xy,this.doubleTouchTolerance)){this.finishGeometry();window.clearTimeout(this.timerId);this.timerId=null;return false;}else{if(this.timerId){window.clearTimeout(this.timerId);this.timerId=null;}
+this.timerId=window.setTimeout(OpenLayers.Function.bind(function(){this.timerId=null;},this),300);return OpenLayers.Handler.Point.prototype.touchstart.call(this,evt);}},down:function(evt){var stopDown=this.stopDown;if(this.freehandMode(evt)){stopDown=true;if(this.touch){this.modifyFeature(evt.xy,!!this.lastUp);OpenLayers.Event.stop(evt);}}
+if(!this.touch&&(!this.lastDown||!this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance))){this.modifyFeature(evt.xy,!!this.lastUp);}
+this.mouseDown=true;this.lastDown=evt.xy;this.stoppedDown=stopDown;return!stopDown;},move:function(evt){if(this.stoppedDown&&this.freehandMode(evt)){if(this.persist){this.destroyPersistedFeature();}
+if(this.maxVertices&&this.line&&this.line.geometry.components.length===this.maxVertices){this.removePoint();this.finalize();}else{this.addPoint(evt.xy);}
+return false;}
+if(!this.touch&&(!this.mouseDown||this.stoppedDown)){this.modifyFeature(evt.xy,!!this.lastUp);}
+return true;},up:function(evt){if(this.mouseDown&&(!this.lastUp||!this.lastUp.equals(evt.xy))){if(this.stoppedDown&&this.freehandMode(evt)){if(this.persist){this.destroyPersistedFeature();}
+this.removePoint();this.finalize();}else{if(this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance)){if(this.touch){this.modifyFeature(evt.xy);}
+if(this.lastUp==null&&this.persist){this.destroyPersistedFeature();}
+this.addPoint(evt.xy);this.lastUp=evt.xy;if(this.line.geometry.components.length===this.maxVertices+1){this.finishGeometry();}}}}
+this.stoppedDown=this.stopDown;this.mouseDown=false;return!this.stopUp;},finishGeometry:function(){var index=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();},dblclick:function(evt){if(!this.freehandMode(evt)){this.finishGeometry();}
+return false;},CLASS_NAME:"OpenLayers.Handler.Path"});OpenLayers.Handler.Polygon=OpenLayers.Class(OpenLayers.Handler.Path,{holeModifier:null,drawingHole:false,polygon:null,createFeature:function(pixel){var lonlat=this.layer.getLonLatFromViewPortPx(pixel);var geometry=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);this.point=new OpenLayers.Feature.Vector(geometry);this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LinearRing([this.point.geometry]));this.polygon=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([this.line.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.polygon,this.point],{silent:true});},addPoint:function(pixel){if(!this.drawingHole&&this.holeModifier&&this.evt&&this.evt[this.holeModifier]){var geometry=this.point.geometry;var features=this.control.layer.features;var candidate,polygon;for(var i=features.length-1;i>=0;--i){candidate=features
[i].geometry;if((candidate instanceof OpenLayers.Geometry.Polygon||candidate instanceof OpenLayers.Geometry.MultiPolygon)&&candidate.intersects(geometry)){polygon=features[i];this.control.layer.removeFeatures([polygon],{silent:true});this.control.layer.events.registerPriority("sketchcomplete",this,this.finalizeInteriorRing);this.control.layer.events.registerPriority("sketchmodified",this,this.enforceTopology);polygon.geometry.addComponent(this.line.geometry);this.polygon=polygon;this.drawingHole=true;break;}}}
+OpenLayers.Handler.Path.prototype.addPoint.apply(this,arguments);},getCurrentPointIndex:function(){return this.line.geometry.components.length-2;},enforceTopology:function(event){var point=event.vertex;var components=this.line.geometry.components;if(!this.polygon.geometry.intersects(point)){var last=components[components.length-3];point.x=last.x;point.y=last.y;}},finishGeometry:function(){var index=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();},finalizeInteriorRing:function(){var ring=this.line.geometry;var modified=(ring.getArea()!==0);if(modified){var rings=this.polygon.geometry.components;for(var i=rings.length-2;i>=0;--i){if(ring.intersects(rings[i])){modified=false;break;}}
+if(modified){var target;outer:for(var i=rings.length-2;i>0;--i){var points=rings[i].components;for(var j=0,jj=points.length;j<jj;++j){if(ring.containsPoint(points[j])){modified=false;break outer;}}}}}
+if(modified){if(this.polygon.state!==OpenLayers.State.INSERT){this.polygon.state=OpenLayers.State.UPDATE;}}else{this.polygon.geometry.removeComponent(ring);}
+this.restoreFeature();return false;},cancel:function(){if(this.drawingHole){this.polygon.geometry.removeComponent(this.line.geometry);this.restoreFeature(true);}
+return OpenLayers.Handler.Path.prototype.cancel.apply(this,arguments);},restoreFeature:function(cancel){this.control.layer.events.unregister("sketchcomplete",this,this.finalizeInteriorRing);this.control.layer.events.unregister("sketchmodified",this,this.enforceTopology);this.layer.removeFeatures([this.polygon],{silent:true});this.control.layer.addFeatures([this.polygon],{silent:true});this.drawingHole=false;if(!cancel){this.control.layer.events.triggerEvent("sketchcomplete",{feature:this.polygon});}},destroyFeature:function(force){OpenLayers.Handler.Path.prototype.destroyFeature.call(this,force);this.polygon=null;},drawFeature:function(){this.layer.drawFeature(this.polygon,this.style);this.layer.drawFeature(this.point,this.style);},getSketch:function(){return this.polygon;},getGeometry:function(){var geometry=this.polygon&&this.polygon.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiPolygon([geometry]);}
+return geometry;},CLASS_NAME:"OpenLayers.Handler.Polygon"});OpenLayers.Renderer.Canvas=OpenLayers.Class(OpenLayers.Renderer,{hitDetection:true,hitOverflow:0,canvas:null,features:null,pendingRedraw:false,cachedSymbolBounds:{},initialize:function(containerID,options){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.root=document.createElement("canvas");this.container.appendChild(this.root);this.canvas=this.root.getContext("2d");this.features={};if(this.hitDetection){this.hitCanvas=document.createElement("canvas");this.hitContext=this.hitCanvas.getContext("2d");}},setExtent:function(){OpenLayers.Renderer.prototype.setExtent.apply(this,arguments);return false;},eraseGeometry:function(geometry,featureId){this.eraseFeatures(this.features[featureId][0]);},supported:function(){return OpenLayers.CANVAS_SUPPORTED;},setSize:function(size){this.size=size.clone();var root=this.root;root.style.width=size.w+"px";root.style.height=size.h+"px";root.width=size.w;root.height
=size.h;this.resolution=null;if(this.hitDetection){var hitCanvas=this.hitCanvas;hitCanvas.style.width=size.w+"px";hitCanvas.style.height=size.h+"px";hitCanvas.width=size.w;hitCanvas.height=size.h;}},drawFeature:function(feature,style){var rendered;if(feature.geometry){style=this.applyDefaultSymbolizer(style||feature.style);var bounds=feature.geometry.getBounds();var worldBounds;if(this.map.baseLayer&&this.map.baseLayer.wrapDateLine){worldBounds=this.map.getMaxExtent();}
+var intersects=bounds&&bounds.intersectsBounds(this.extent,{worldBounds:worldBounds});rendered=(style.display!=="none")&&!!bounds&&intersects;if(rendered){this.features[feature.id]=[feature,style];}
+else{delete(this.features[feature.id]);}
+this.pendingRedraw=true;}
+if(this.pendingRedraw&&!this.locked){this.redraw();this.pendingRedraw=false;}
+return rendered;},drawGeometry:function(geometry,style,featureId){var className=geometry.CLASS_NAME;if((className=="OpenLayers.Geometry.Collection")||(className=="OpenLayers.Geometry.MultiPoint")||(className=="OpenLayers.Geometry.MultiLineString")||(className=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;i<geometry.components.length;i++){this.drawGeometry(geometry.components[i],style,featureId);}
+return;}
+switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":this.drawPoint(geometry,style,featureId);break;case"OpenLayers.Geometry.LineString":this.drawLineString(geometry,style,featureId);break;case"OpenLayers.Geometry.LinearRing":this.drawLinearRing(geometry,style,featureId);break;case"OpenLayers.Geometry.Polygon":this.drawPolygon(geometry,style,featureId);break;default:break;}},drawExternalGraphic:function(geometry,style,featureId){var img=new Image();if(style.graphicTitle){img.title=style.graphicTitle;}
+var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;var onLoad=function(){if(!this.features[featureId]){return;}
+var pt=this.getLocalXY(geometry);var p0=pt[0];var p1=pt[1];if(!isNaN(p0)&&!isNaN(p1)){var x=(p0+xOffset)|0;var y=(p1+yOffset)|0;var canvas=this.canvas;canvas.globalAlpha=opacity;var factor=OpenLayers.Renderer.Canvas.drawImageScaleFactor||(OpenLayers.Renderer.Canvas.drawImageScaleFactor=/android 2.1/.test(navigator.userAgent.toLowerCase())?320/window.screen.width:1);canvas.drawImage(img,x*factor,y*factor,width*factor,height*factor);if(this.hitDetection){this.setHitContextStyle("fill",featureId);this.hitContext.fillRect(x,y,width,height);}}};img.onload=OpenLayers.Function.bind(onLoad,this);img.src=style.externalGraphic;},drawNamedSymbol:function(geometry,style,featureId){var x,y,cx,cy,i,symbolBounds,scaling,angle;var unscaledStrokeWidth;var deg2rad=Math.PI/180.0;var symbol=OpenLayers.Renderer.symbol[style.graphicName];if(!symbol){throw new Error(style.graphicName+' is not a valid symbol name');}
+if(!symbol.length||symbol.length<2)return;var pt=this.getLocalXY(geometry);var p0=pt[0];var p1=pt[1];if(isNaN(p0)||isNaN(p1))return;this.canvas.lineCap="round";this.canvas.lineJoin="round";if(this.hitDetection){this.hitContext.lineCap="round";this.hitContext.lineJoin="round";}
+if(style.graphicName in this.cachedSymbolBounds){symbolBounds=this.cachedSymbolBounds[style.graphicName];}else{symbolBounds=new OpenLayers.Bounds();for(i=0;i<symbol.length;i+=2){symbolBounds.extend(new OpenLayers.LonLat(symbol[i],symbol[i+1]));}
+this.cachedSymbolBounds[style.graphicName]=symbolBounds;}
+this.canvas.save();if(this.hitDetection){this.hitContext.save();}
+this.canvas.translate(p0,p1);if(this.hitDetection){this.hitContext.translate(p0,p1);}
+angle=deg2rad*style.rotation;if(!isNaN(angle)){this.canvas.rotate(angle);if(this.hitDetection){this.hitContext.rotate(angle);}}
+scaling=2.0*style.pointRadius/Math.max(symbolBounds.getWidth(),symbolBounds.getHeight());this.canvas.scale(scaling,scaling);if(this.hitDetection){this.hitContext.scale(scaling,scaling);}
+cx=symbolBounds.getCenterLonLat().lon;cy=symbolBounds.getCenterLonLat().lat;this.canvas.translate(-cx,-cy);if(this.hitDetection){this.hitContext.translate(-cx,-cy);}
+unscaledStrokeWidth=style.strokeWidth;style.strokeWidth=unscaledStrokeWidth/scaling;if(style.fill!==false){this.setCanvasStyle("fill",style);this.canvas.beginPath();for(i=0;i<symbol.length;i=i+2){x=symbol[i];y=symbol[i+1];if(i==0)this.canvas.moveTo(x,y);this.canvas.lineTo(x,y);}
+this.canvas.closePath();this.canvas.fill();if(this.hitDetection){this.setHitContextStyle("fill",featureId,style);this.hitContext.beginPath();for(i=0;i<symbol.length;i=i+2){x=symbol[i];y=symbol[i+1];if(i==0)this.canvas.moveTo(x,y);this.hitContext.lineTo(x,y);}
+this.hitContext.closePath();this.hitContext.fill();}}
+if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();for(i=0;i<symbol.length;i=i+2){x=symbol[i];y=symbol[i+1];if(i==0)this.canvas.moveTo(x,y);this.canvas.lineTo(x,y);}
+this.canvas.closePath();this.canvas.stroke();if(this.hitDetection){this.setHitContextStyle("stroke",featureId,style,scaling);this.hitContext.beginPath();for(i=0;i<symbol.length;i=i+2){x=symbol[i];y=symbol[i+1];if(i==0)this.hitContext.moveTo(x,y);this.hitContext.lineTo(x,y);}
+this.hitContext.closePath();this.hitContext.stroke();}}
+style.strokeWidth=unscaledStrokeWidth;this.canvas.restore();if(this.hitDetection){this.hitContext.restore();}
+this.setCanvasStyle("reset");},setCanvasStyle:function(type,style){if(type==="fill"){this.canvas.globalAlpha=style['fillOpacity'];this.canvas.fillStyle=style['fillColor'];}else if(type==="stroke"){this.canvas.globalAlpha=style['strokeOpacity'];this.canvas.strokeStyle=style['strokeColor'];this.canvas.lineWidth=style['strokeWidth'];}else{this.canvas.globalAlpha=0;this.canvas.lineWidth=1;}},featureIdToHex:function(featureId){var id=Number(featureId.split("_").pop())+1;if(id>=16777216){this.hitOverflow=id-16777215;id=id%16777216+1;}
+var hex="000000"+id.toString(16);var len=hex.length;hex="#"+hex.substring(len-6,len);return hex;},setHitContextStyle:function(type,featureId,symbolizer,strokeScaling){var hex=this.featureIdToHex(featureId);if(type=="fill"){this.hitContext.globalAlpha=1.0;this.hitContext.fillStyle=hex;}else if(type=="stroke"){this.hitContext.globalAlpha=1.0;this.hitContext.strokeStyle=hex;if(typeof strokeScaling==="undefined"){this.hitContext.lineWidth=symbolizer.strokeWidth+2;}else{if(!isNaN(strokeScaling)){this.hitContext.lineWidth=symbolizer.strokeWidth+2.0/strokeScaling;}}}else{this.hitContext.globalAlpha=0;this.hitContext.lineWidth=1;}},drawPoint:function(geometry,style,featureId){if(style.graphic!==false){if(style.externalGraphic){this.drawExternalGraphic(geometry,style,featureId);}else if(style.graphicName&&(style.graphicName!="circle")){this.drawNamedSymbol(geometry,style,featureId);}else{var pt=this.getLocalXY(geometry);var p0=pt[0];var p1=pt[1];if(!isNaN(p0)&&!isNaN(p1)){var twoPi=M
ath.PI*2;var radius=style.pointRadius;if(style.fill!==false){this.setCanvasStyle("fill",style);this.canvas.beginPath();this.canvas.arc(p0,p1,radius,0,twoPi,true);this.canvas.fill();if(this.hitDetection){this.setHitContextStyle("fill",featureId,style);this.hitContext.beginPath();this.hitContext.arc(p0,p1,radius,0,twoPi,true);this.hitContext.fill();}}
+if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();this.canvas.arc(p0,p1,radius,0,twoPi,true);this.canvas.stroke();if(this.hitDetection){this.setHitContextStyle("stroke",featureId,style);this.hitContext.beginPath();this.hitContext.arc(p0,p1,radius,0,twoPi,true);this.hitContext.stroke();}
+this.setCanvasStyle("reset");}}}}},drawLineString:function(geometry,style,featureId){style=OpenLayers.Util.applyDefaults({fill:false},style);this.drawLinearRing(geometry,style,featureId);},drawLinearRing:function(geometry,style,featureId){if(style.fill!==false){this.setCanvasStyle("fill",style);this.renderPath(this.canvas,geometry,style,featureId,"fill");if(this.hitDetection){this.setHitContextStyle("fill",featureId,style);this.renderPath(this.hitContext,geometry,style,featureId,"fill");}}
+if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.renderPath(this.canvas,geometry,style,featureId,"stroke");if(this.hitDetection){this.setHitContextStyle("stroke",featureId,style);this.renderPath(this.hitContext,geometry,style,featureId,"stroke");}}
+this.setCanvasStyle("reset");},renderPath:function(context,geometry,style,featureId,type){var components=geometry.components;var len=components.length;context.beginPath();var start=this.getLocalXY(components[0]);var x=start[0];var y=start[1];if(!isNaN(x)&&!isNaN(y)){context.moveTo(start[0],start[1]);for(var i=1;i<len;++i){var pt=this.getLocalXY(components[i]);context.lineTo(pt[0],pt[1]);}
+if(type==="fill"){context.fill();}else{context.stroke();}}},drawPolygon:function(geometry,style,featureId){var components=geometry.components;var len=components.length;this.drawLinearRing(components[0],style,featureId);for(var i=1;i<len;++i){this.canvas.globalCompositeOperation="destination-out";if(this.hitDetection){this.hitContext.globalCompositeOperation="destination-out";}
+this.drawLinearRing(components[i],OpenLayers.Util.applyDefaults({stroke:false,fillOpacity:1.0},style),featureId);this.canvas.globalCompositeOperation="source-over";if(this.hitDetection){this.hitContext.globalCompositeOperation="source-over";}
+this.drawLinearRing(components[i],OpenLayers.Util.applyDefaults({fill:false},style),featureId);}},drawText:function(location,style){var pt=this.getLocalXY(location);this.setCanvasStyle("reset");this.canvas.fillStyle=style.fontColor;this.canvas.globalAlpha=style.fontOpacity||1.0;var fontStyle=[style.fontStyle?style.fontStyle:"normal","normal",style.fontWeight?style.fontWeight:"normal",style.fontSize?style.fontSize:"1em",style.fontFamily?style.fontFamily:"sans-serif"].join(" ");var labelRows=style.label.split('\n');var numRows=labelRows.length;if(this.canvas.fillText){this.canvas.font=fontStyle;this.canvas.textAlign=OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[0]]||"center";this.canvas.textBaseline=OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[1]]||"middle";var vfactor=OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[1]];if(vfactor==null){vfactor=-.5;}
+var lineHeight=this.canvas.measureText('Mg').height||this.canvas.measureText('xx').width;pt[1]+=lineHeight*vfactor*(numRows-1);for(var i=0;i<numRows;i++){if(style.labelOutlineWidth){this.canvas.save();this.canvas.strokeStyle=style.labelOutlineColor;this.canvas.lineWidth=style.labelOutlineWidth;this.canvas.strokeText(labelRows[i],pt[0],pt[1]+(lineHeight*i)+1);this.canvas.restore();}
+this.canvas.fillText(labelRows[i],pt[0],pt[1]+(lineHeight*i));}}else if(this.canvas.mozDrawText){this.canvas.mozTextStyle=fontStyle;var hfactor=OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[0]];if(hfactor==null){hfactor=-.5;}
+var vfactor=OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[1]];if(vfactor==null){vfactor=-.5;}
+var lineHeight=this.canvas.mozMeasureText('xx');pt[1]+=lineHeight*(1+(vfactor*numRows));for(var i=0;i<numRows;i++){var x=pt[0]+(hfactor*this.canvas.mozMeasureText(labelRows[i]));var y=pt[1]+(i*lineHeight);this.canvas.translate(x,y);this.canvas.mozDrawText(labelRows[i]);this.canvas.translate(-x,-y);}}
+this.setCanvasStyle("reset");},getLocalXY:function(point){var resolution=this.getResolution();var extent=this.extent;var x=((point.x-this.featureDx)/resolution+(-extent.left/resolution));var y=((extent.top/resolution)-point.y/resolution);return[x,y];},clear:function(){var height=this.root.height;var width=this.root.width;this.canvas.clearRect(0,0,width,height);this.features={};if(this.hitDetection){this.hitContext.clearRect(0,0,width,height);}},getFeatureIdFromEvent:function(evt){var featureId,feature;if(this.hitDetection&&this.root.style.display!=="none"){if(!this.map.dragging){var xy=evt.xy;var x=xy.x|0;var y=xy.y|0;var data=this.hitContext.getImageData(x,y,1,1).data;if(data[3]===255){var id=data[2]+(256*(data[1]+(256*data[0])));if(id){featureId="OpenLayers.Feature.Vector_"+(id-1+this.hitOverflow);try{feature=this.features[featureId][0];}catch(err){}}}}}
+return feature;},eraseFeatures:function(features){if(!(OpenLayers.Util.isArray(features))){features=[features];}
+for(var i=0;i<features.length;++i){delete this.features[features[i].id];}
+this.redraw();},redraw:function(){if(!this.locked){var height=this.root.height;var width=this.root.width;this.canvas.clearRect(0,0,width,height);if(this.hitDetection){this.hitContext.clearRect(0,0,width,height);}
+var labelMap=[];var feature,geometry,style;var worldBounds=(this.map.baseLayer&&this.map.baseLayer.wrapDateLine)&&this.map.getMaxExtent();for(var id in this.features){if(!this.features.hasOwnProperty(id)){continue;}
+feature=this.features[id][0];geometry=feature.geometry;this.calculateFeatureDx(geometry.getBounds(),worldBounds);style=this.features[id][1];this.drawGeometry(geometry,style,feature.id);if(style.label){labelMap.push([feature,style]);}}
+var item;for(var i=0,len=labelMap.length;i<len;++i){item=labelMap[i];this.drawText(item[0].geometry.getCentroid(),item[1]);}}},CLASS_NAME:"OpenLayers.Renderer.Canvas"});OpenLayers.Renderer.Canvas.LABEL_ALIGN={"l":"left","r":"right","t":"top","b":"bottom"};OpenLayers.Renderer.Canvas.LABEL_FACTOR={"l":0,"r":-1,"t":0,"b":-1};OpenLayers.Renderer.Canvas.drawImageScaleFactor=null;OpenLayers.ElementsIndexer=OpenLayers.Class({maxZIndex:null,order:null,indices:null,compare:null,initialize:function(yOrdering){this.compare=yOrdering?OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER:OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;this.clear();},insert:function(newNode){if(this.exists(newNode)){this.remove(newNode);}
+var nodeId=newNode.id;this.determineZIndex(newNode);var leftIndex=-1;var rightIndex=this.order.length;var middle;while(rightIndex-leftIndex>1){middle=parseInt((leftIndex+rightIndex)/2);var placement=this.compare(this,newNode,OpenLayers.Util.getElement(this.order[middle]));if(placement>0){leftIndex=middle;}else{rightIndex=middle;}}
+this.order.splice(rightIndex,0,nodeId);this.indices[nodeId]=this.getZIndex(newNode);return this.getNextElement(rightIndex);},remove:function(node){var nodeId=node.id;var arrayIndex=OpenLayers.Util.indexOf(this.order,nodeId);if(arrayIndex>=0){this.order.splice(arrayIndex,1);delete this.indices[nodeId];if(this.order.length>0){var lastId=this.order[this.order.length-1];this.maxZIndex=this.indices[lastId];}else{this.maxZIndex=0;}}},clear:function(){this.order=[];this.indices={};this.maxZIndex=0;},exists:function(node){return(this.indices[node.id]!=null);},getZIndex:function(node){return node._style.graphicZIndex;},determineZIndex:function(node){var zIndex=node._style.graphicZIndex;if(zIndex==null){zIndex=this.maxZIndex;node._style.graphicZIndex=zIndex;}else if(zIndex>this.maxZIndex){this.maxZIndex=zIndex;}},getNextElement:function(index){var nextIndex=index+1;if(nextIndex<this.order.length){var nextElement=OpenLayers.Util.getElement(this.order[nextIndex]);if(nextElement==undefin
ed){nextElement=this.getNextElement(nextIndex);}
+return nextElement;}else{return null;}},CLASS_NAME:"OpenLayers.ElementsIndexer"});OpenLayers.ElementsIndexer.IndexingMethods={Z_ORDER:function(indexer,newNode,nextNode){var newZIndex=indexer.getZIndex(newNode);var returnVal=0;if(nextNode){var nextZIndex=indexer.getZIndex(nextNode);returnVal=newZIndex-nextZIndex;}
+return returnVal;},Z_ORDER_DRAWING_ORDER:function(indexer,newNode,nextNode){var returnVal=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(indexer,newNode,nextNode);if(nextNode&&returnVal==0){returnVal=1;}
+return returnVal;},Z_ORDER_Y_ORDER:function(indexer,newNode,nextNode){var returnVal=OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER(indexer,newNode,nextNode);if(nextNode&&returnVal===0){var result=nextNode._boundsBottom-newNode._boundsBottom;returnVal=(result===0)?1:result;}
+return returnVal;}};OpenLayers.Renderer.Elements=OpenLayers.Class(OpenLayers.Renderer,{rendererRoot:null,root:null,vectorRoot:null,textRoot:null,xmlns:null,xOffset:0,indexer:null,BACKGROUND_ID_SUFFIX:"_background",LABEL_ID_SUFFIX:"_label",LABEL_OUTLINE_SUFFIX:"_outline",initialize:function(containerID,options){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot("_root");this.vectorRoot=this.createRoot("_vroot");this.textRoot=this.createRoot("_troot");this.root.appendChild(this.vectorRoot);this.root.appendChild(this.textRoot);this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);if(options&&(options.zIndexing||options.yOrdering)){this.indexer=new OpenLayers.ElementsIndexer(options.yOrdering);}},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments);},clear:function(){var child
;var root=this.vectorRoot;if(root){while(child=root.firstChild){root.removeChild(child);}}
+root=this.textRoot;if(root){while(child=root.firstChild){root.removeChild(child);}}
+if(this.indexer){this.indexer.clear();}},setExtent:function(extent,resolutionChanged){var coordSysUnchanged=OpenLayers.Renderer.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();if(this.map.baseLayer&&this.map.baseLayer.wrapDateLine){var rightOfDateLine,ratio=extent.getWidth()/this.map.getExtent().getWidth(),extent=extent.scale(1/ratio),world=this.map.getMaxExtent();if(world.right>extent.left&&world.right<extent.right){rightOfDateLine=true;}else if(world.left>extent.left&&world.left<extent.right){rightOfDateLine=false;}
+if(rightOfDateLine!==this.rightOfDateLine||resolutionChanged){coordSysUnchanged=false;this.xOffset=rightOfDateLine===true?world.getWidth()/resolution:0;}
+this.rightOfDateLine=rightOfDateLine;}
+return coordSysUnchanged;},getNodeType:function(geometry,style){},drawGeometry:function(geometry,style,featureId){var className=geometry.CLASS_NAME;var rendered=true;if((className=="OpenLayers.Geometry.Collection")||(className=="OpenLayers.Geometry.MultiPoint")||(className=="OpenLayers.Geometry.MultiLineString")||(className=="OpenLayers.Geometry.MultiPolygon")){for(var i=0,len=geometry.components.length;i<len;i++){rendered=this.drawGeometry(geometry.components[i],style,featureId)&&rendered;}
+return rendered;}
+rendered=false;var removeBackground=false;if(style.display!="none"){if(style.backgroundGraphic){this.redrawBackgroundNode(geometry.id,geometry,style,featureId);}else{removeBackground=true;}
+rendered=this.redrawNode(geometry.id,geometry,style,featureId);}
+if(rendered==false){var node=document.getElementById(geometry.id);if(node){if(node._style.backgroundGraphic){removeBackground=true;}
+node.parentNode.removeChild(node);}}
+if(removeBackground){var node=document.getElementById(geometry.id+this.BACKGROUND_ID_SUFFIX);if(node){node.parentNode.removeChild(node);}}
+return rendered;},redrawNode:function(id,geometry,style,featureId){style=this.applyDefaultSymbolizer(style);var node=this.nodeFactory(id,this.getNodeType(geometry,style));node._featureId=featureId;node._boundsBottom=geometry.getBounds().bottom;node._geometryClass=geometry.CLASS_NAME;node._style=style;var drawResult=this.drawGeometryNode(node,geometry,style);if(drawResult===false){return false;}
+node=drawResult.node;if(this.indexer){var insert=this.indexer.insert(node);if(insert){this.vectorRoot.insertBefore(node,insert);}else{this.vectorRoot.appendChild(node);}}else{if(node.parentNode!==this.vectorRoot){this.vectorRoot.appendChild(node);}}
+this.postDraw(node);return drawResult.complete;},redrawBackgroundNode:function(id,geometry,style,featureId){var backgroundStyle=OpenLayers.Util.extend({},style);backgroundStyle.externalGraphic=backgroundStyle.backgroundGraphic;backgroundStyle.graphicXOffset=backgroundStyle.backgroundXOffset;backgroundStyle.graphicYOffset=backgroundStyle.backgroundYOffset;backgroundStyle.graphicZIndex=backgroundStyle.backgroundGraphicZIndex;backgroundStyle.graphicWidth=backgroundStyle.backgroundWidth||backgroundStyle.graphicWidth;backgroundStyle.graphicHeight=backgroundStyle.backgroundHeight||backgroundStyle.graphicHeight;backgroundStyle.backgroundGraphic=null;backgroundStyle.backgroundXOffset=null;backgroundStyle.backgroundYOffset=null;backgroundStyle.backgroundGraphicZIndex=null;return this.redrawNode(id+this.BACKGROUND_ID_SUFFIX,geometry,backgroundStyle,null);},drawGeometryNode:function(node,geometry,style){style=style||node._style;var options={'isFilled':style.fill===undefined?true:style.
fill,'isStroked':style.stroke===undefined?!!style.strokeWidth:style.stroke};var drawn;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.graphic===false){options.isFilled=false;options.isStroked=false;}
+drawn=this.drawPoint(node,geometry);break;case"OpenLayers.Geometry.LineString":options.isFilled=false;drawn=this.drawLineString(node,geometry);break;case"OpenLayers.Geometry.LinearRing":drawn=this.drawLinearRing(node,geometry);break;case"OpenLayers.Geometry.Polygon":drawn=this.drawPolygon(node,geometry);break;case"OpenLayers.Geometry.Rectangle":drawn=this.drawRectangle(node,geometry);break;default:break;}
+node._options=options;if(drawn!=false){return{node:this.setStyle(node,style,options,geometry),complete:drawn};}else{return false;}},postDraw:function(node){},drawPoint:function(node,geometry){},drawLineString:function(node,geometry){},drawLinearRing:function(node,geometry){},drawPolygon:function(node,geometry){},drawRectangle:function(node,geometry){},drawCircle:function(node,geometry){},removeText:function(featureId){var label=document.getElementById(featureId+this.LABEL_ID_SUFFIX);if(label){this.textRoot.removeChild(label);}
+var outline=document.getElementById(featureId+this.LABEL_OUTLINE_SUFFIX);if(outline){this.textRoot.removeChild(outline);}},getFeatureIdFromEvent:function(evt){var target=evt.target;var useElement=target&&target.correspondingUseElement;var node=useElement?useElement:(target||evt.srcElement);return node._featureId;},eraseGeometry:function(geometry,featureId){if((geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")||(geometry.CLASS_NAME=="OpenLayers.Geometry.Collection")){for(var i=0,len=geometry.components.length;i<len;i++){this.eraseGeometry(geometry.components[i],featureId);}}else{var element=OpenLayers.Util.getElement(geometry.id);if(element&&element.parentNode){if(element.geometry){element.geometry.destroy();element.geometry=null;}
+element.parentNode.removeChild(element);if(this.indexer){this.indexer.remove(element);}
+if(element._style.backgroundGraphic){var backgroundId=geometry.id+this.BACKGROUND_ID_SUFFIX;var bElem=OpenLayers.Util.getElement(backgroundId);if(bElem&&bElem.parentNode){bElem.parentNode.removeChild(bElem);}}}}},nodeFactory:function(id,type){var node=OpenLayers.Util.getElement(id);if(node){if(!this.nodeTypeCompare(node,type)){node.parentNode.removeChild(node);node=this.nodeFactory(id,type);}}else{node=this.createNode(type,id);}
+return node;},nodeTypeCompare:function(node,type){},createNode:function(type,id){},moveRoot:function(renderer){var root=this.root;if(renderer.root.parentNode==this.rendererRoot){root=renderer.root;}
+root.parentNode.removeChild(root);renderer.rendererRoot.appendChild(root);},getRenderLayerId:function(){return this.root.parentNode.parentNode.id;},isComplexSymbol:function(graphicName){return(graphicName!="circle")&&!!graphicName;},CLASS_NAME:"OpenLayers.Renderer.Elements"});OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15000,translationParameters:null,symbolMetrics:null,initialize:function(containerID){if(!this.supported()){return;}
+OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.translationParameters={x:0,y:0};this.symbolMetrics={};},supported:function(){var svgFeature="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(svgFeature+"SVG","1.1")||document.implementation.hasFeature(svgFeature+"BasicStructure","1.1")));},inValidRange:function(x,y,xyOnly){var left=x+(xyOnly?0:this.translationParameters.x);var top=y+(xyOnly?0:this.translationParameters.y);return(left>=-this.MAX_PIXEL&&left<=this.MAX_PIXEL&&top>=-this.MAX_PIXEL&&top<=this.MAX_PIXEL);},setExtent:function(extent,resolutionChanged){var coordSysUnchanged=OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution(),left=-extent.left/resolution,top=extent.top/resolution;if(resolutionChanged){this.left=left;this.top=top;var extentString="0 0 "+this.size.w+" "+this.si
ze.h;this.rendererRoot.setAttributeNS(null,"viewBox",extentString);this.translate(this.xOffset,0);return true;}else{var inRange=this.translate(left-this.left+this.xOffset,top-this.top);if(!inRange){this.setExtent(extent,true);}
+return coordSysUnchanged&&inRange;}},translate:function(x,y){if(!this.inValidRange(x,y,true)){return false;}else{var transformString="";if(x||y){transformString="translate("+x+","+y+")";}
+this.root.setAttributeNS(null,"transform",transformString);this.translationParameters={x:x,y:y};return true;}},setSize:function(size){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.setAttributeNS(null,"width",this.size.w);this.rendererRoot.setAttributeNS(null,"height",this.size.h);},getNodeType:function(geometry,style){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.externalGraphic){nodeType="image";}else if(this.isComplexSymbol(style.graphicName)){nodeType="svg";}else{nodeType="circle";}
+break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":nodeType="path";break;default:break;}
+return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var titleNode=node.getElementsByTagName("title");if(titleNode.length>0){titleNode[0].firstChild.textContent=style.graphicTitle;}else{var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);}}
+if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");}
+var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[src.id][0]*3/size;var parent=no
de.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);}
+node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);}
+var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+
+pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate("
++rotation+" "
++metrics[1]+" "
++metrics[2]+")");}}}
+if(options.isFilled){node.setAttributeNS(null,"fill",style.fillColor);node.setAttributeNS(null,"fill-opacity",style.fillOpacity);}else{node.setAttributeNS(null,"fill","none");}
+if(options.isStroked){node.setAttributeNS(null,"stroke",style.strokeColor);node.setAttributeNS(null,"stroke-opacity",style.strokeOpacity);node.setAttributeNS(null,"stroke-width",style.strokeWidth*widthFactor);node.setAttributeNS(null,"stroke-linecap",style.strokeLinecap||"round");node.setAttributeNS(null,"stroke-linejoin","round");style.strokeDashstyle&&node.setAttributeNS(null,"stroke-dasharray",this.dashStyle(style,widthFactor));}else{node.setAttributeNS(null,"stroke","none");}
+if(style.pointerEvents){node.setAttributeNS(null,"pointer-events",style.pointerEvents);}
+if(style.cursor!=null){node.setAttributeNS(null,"cursor",style.cursor);}
+return node;},dashStyle:function(style,widthFactor){var w=style.strokeWidth*widthFactor;var str=style.strokeDashstyle;switch(str){case'solid':return'none';case'dot':return[1,4*w].join();case'dash':return[4*w,4*w].join();case'dashdot':return[4*w,4*w,1,4*w].join();case'longdash':return[8*w,4*w].join();case'longdashdot':return[8*w,4*w,1,4*w].join();default:return OpenLayers.String.trim(str).replace(/\s+/g,",");}},createNode:function(type,id){var node=document.createElementNS(this.xmlns,type);if(id){node.setAttributeNS(null,"id",id);}
+return node;},nodeTypeCompare:function(node,type){return(type==node.nodeName);},createRenderRoot:function(){var svg=this.nodeFactory(this.container.id+"_svgRoot","svg");svg.style.display="block";return svg;},createRoot:function(suffix){return this.nodeFactory(this.container.id+suffix,"g");},createDefs:function(){var defs=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(defs);return defs;},drawPoint:function(node,geometry){return this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){var resolution=this.getResolution();var x=((geometry.x-this.featureDx)/resolution+this.left);var y=(this.top-geometry.y/resolution);if(this.inValidRange(x,y)){node.setAttributeNS(null,"cx",x);node.setAttributeNS(null,"cy",y);node.setAttributeNS(null,"r",radius);return node;}else{return false;}},drawLineString:function(node,geometry){var componentsResult=this.getComponentsString(geometry.components);if(componentsResult.path){node.setAttributeNS
(null,"points",componentsResult.path);return(componentsResult.complete?node:null);}else{return false;}},drawLinearRing:function(node,geometry){var componentsResult=this.getComponentsString(geometry.components);if(componentsResult.path){node.setAttributeNS(null,"points",componentsResult.path);return(componentsResult.complete?node:null);}else{return false;}},drawPolygon:function(node,geometry){var d="";var draw=true;var complete=true;var linearRingResult,path;for(var j=0,len=geometry.components.length;j<len;j++){d+=" M";linearRingResult=this.getComponentsString(geometry.components[j].components," ");path=linearRingResult.path;if(path){d+=" "+path;complete=linearRingResult.complete&&complete;}else{draw=false;}}
+d+=" z";if(draw){node.setAttributeNS(null,"d",d);node.setAttributeNS(null,"fill-rule","evenodd");return complete?node:null;}else{return false;}},drawRectangle:function(node,geometry){var resolution=this.getResolution();var x=((geometry.x-this.featureDx)/resolution+this.left);var y=(this.top-geometry.y/resolution);if(this.inValidRange(x,y)){node.setAttributeNS(null,"x",x);node.setAttributeNS(null,"y",y);node.setAttributeNS(null,"width",geometry.width/resolution);node.setAttributeNS(null,"height",geometry.height/resolution);return node;}else{return false;}},drawText:function(featureId,style,location){var drawOutline=(!!style.labelOutlineWidth);if(drawOutline){var outlineStyle=OpenLayers.Util.extend({},style);outlineStyle.fontColor=outlineStyle.labelOutlineColor;outlineStyle.fontStrokeColor=outlineStyle.labelOutlineColor;outlineStyle.fontStrokeWidth=style.labelOutlineWidth;delete outlineStyle.labelOutlineWidth;this.drawText(featureId,outlineStyle,location);}
+var resolution=this.getResolution();var x=((location.x-this.featureDx)/resolution+this.left);var y=(location.y/resolution-this.top);var suffix=(drawOutline)?this.LABEL_OUTLINE_SUFFIX:this.LABEL_ID_SUFFIX;var label=this.nodeFactory(featureId+suffix,"text");label.setAttributeNS(null,"x",x);label.setAttributeNS(null,"y",-y);if(style.fontColor){label.setAttributeNS(null,"fill",style.fontColor);}
+if(style.fontStrokeColor){label.setAttributeNS(null,"stroke",style.fontStrokeColor);}
+if(style.fontStrokeWidth){label.setAttributeNS(null,"stroke-width",style.fontStrokeWidth);}
+if(style.fontOpacity){label.setAttributeNS(null,"opacity",style.fontOpacity);}
+if(style.fontFamily){label.setAttributeNS(null,"font-family",style.fontFamily);}
+if(style.fontSize){label.setAttributeNS(null,"font-size",style.fontSize);}
+if(style.fontWeight){label.setAttributeNS(null,"font-weight",style.fontWeight);}
+if(style.fontStyle){label.setAttributeNS(null,"font-style",style.fontStyle);}
+if(style.labelSelect===true){label.setAttributeNS(null,"pointer-events","visible");label._featureId=featureId;}else{label.setAttributeNS(null,"pointer-events","none");}
+var align=style.labelAlign||OpenLayers.Renderer.defaultSymbolizer.labelAlign;label.setAttributeNS(null,"text-anchor",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]]||"middle");if(OpenLayers.IS_GECKO===true){label.setAttributeNS(null,"dominant-baseline",OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]]||"central");}
+var labelRows=style.label.split('\n');var numRows=labelRows.length;while(label.childNodes.length>numRows){label.removeChild(label.lastChild);}
+for(var i=0;i<numRows;i++){var tspan=this.nodeFactory(featureId+suffix+"_tspan_"+i,"tspan");if(style.labelSelect===true){tspan._featureId=featureId;tspan._geometry=location;tspan._geometryClass=location.CLASS_NAME;}
+if(OpenLayers.IS_GECKO===false){tspan.setAttributeNS(null,"baseline-shift",OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]]||"-35%");}
+tspan.setAttribute("x",x);if(i==0){var vfactor=OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];if(vfactor==null){vfactor=-.5;}
+tspan.setAttribute("dy",(vfactor*(numRows-1))+"em");}else{tspan.setAttribute("dy","1em");}
+tspan.textContent=(labelRows[i]==='')?' ':labelRows[i];if(!tspan.parentNode){label.appendChild(tspan);}}
+if(!label.parentNode){this.textRoot.appendChild(label);}},getComponentsString:function(components,separator){var renderCmp=[];var complete=true;var len=components.length;var strings=[];var str,component;for(var i=0;i<len;i++){component=components[i];renderCmp.push(component);str=this.getShortString(component);if(str){strings.push(str);}else{if(i>0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}}
+if(i<len-1){if(this.getShortString(components[i+1])){strings.push(this.clipLine(components[i],components[i+1]));}}
+complete=false;}}
+return{path:strings.join(separator||","),complete:complete};},clipLine:function(badComponent,goodComponent){if(goodComponent.equals(badComponent)){return"";}
+var resolution=this.getResolution();var maxX=this.MAX_PIXEL-this.translationParameters.x;var maxY=this.MAX_PIXEL-this.translationParameters.y;var x1=(goodComponent.x-this.featureDx)/resolution+this.left;var y1=this.top-goodComponent.y/resolution;var x2=(badComponent.x-this.featureDx)/resolution+this.left;var y2=this.top-badComponent.y/resolution;var k;if(x2<-maxX||x2>maxX){k=(y2-y1)/(x2-x1);x2=x2<0?-maxX:maxX;y2=y1+(x2-x1)*k;}
+if(y2<-maxY||y2>maxY){k=(x2-x1)/(y2-y1);y2=y2<0?-maxY:maxY;x2=x1+(y2-y1)*k;}
+return x2+","+y2;},getShortString:function(point){var resolution=this.getResolution();var x=((point.x-this.featureDx)/resolution+this.left);var y=(this.top-point.y/resolution);if(this.inValidRange(x,y)){return x+","+y;}else{return false;}},getPosition:function(node){return({x:parseFloat(node.getAttributeNS(null,"cx")),y:parseFloat(node.getAttributeNS(null,"cy"))});},importSymbol:function(graphicName){if(!this.defs){this.defs=this.createDefs();}
+var id=this.container.id+"-"+graphicName;var existing=document.getElementById(id);if(existing!=null){return existing;}
+var symbol=OpenLayers.Renderer.symbol[graphicName];if(!symbol){throw new Error(graphicName+' is not a valid symbol name');}
+var symbolNode=this.nodeFactory(id,"symbol");var node=this.nodeFactory(null,"polygon");symbolNode.appendChild(node);var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var points=[];var x,y;for(var i=0;i<symbol.length;i=i+2){x=symbol[i];y=symbol[i+1];symbolExtent.left=Math.min(symbolExtent.left,x);symbolExtent.bottom=Math.min(symbolExtent.bottom,y);symbolExtent.right=Math.max(symbolExtent.right,x);symbolExtent.top=Math.max(symbolExtent.top,y);points.push(x,",",y);}
+node.setAttributeNS(null,"points",points.join(" "));var width=symbolExtent.getWidth();var height=symbolExtent.getHeight();var viewBox=[symbolExtent.left-width,symbolExtent.bottom-height,width*3,height*3];symbolNode.setAttributeNS(null,"viewBox",viewBox.join(" "));this.symbolMetrics[id]=[Math.max(width,height),symbolExtent.getCenterLonLat().lon,symbolExtent.getCenterLonLat().lat];this.defs.appendChild(symbolNode);return symbolNode;},getFeatureIdFromEvent:function(evt){var featureId=OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this,arguments);if(!featureId){var target=evt.target;featureId=target.parentNode&&target!=this.rendererRoot?target.parentNode._featureId:undefined;}
+return featureId;},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.SVG.LABEL_ALIGN={"l":"start","r":"end","b":"bottom","t":"hanging"};OpenLayers.Renderer.SVG.LABEL_VSHIFT={"t":"-70%","b":"0"};OpenLayers.Renderer.SVG.LABEL_VFACTOR={"t":0,"b":-1};OpenLayers.Renderer.SVG.preventDefault=function(e){e.preventDefault&&e.preventDefault();};OpenLayers.Control.DrawFeature=OpenLayers.Class(OpenLayers.Control,{layer:null,callbacks:null,multi:false,featureAdded:function(){},handlerOptions:null,initialize:function(layer,handler,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.callbacks=OpenLayers.Util.extend({done:this.drawFeature,modify:function(vertex,feature){this.layer.events.triggerEvent("sketchmodified",{vertex:vertex,feature:feature});},create:function(vertex,feature){this.layer.events.triggerEvent("sketchstarted",{vertex:vertex,feature:feature});}},this.callbacks);this.layer=layer;this.handlerOptions=this.handlerOptions||{};this.handlerOption
s.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{renderers:layer.renderers,rendererOptions:layer.rendererOptions});if(!("multi"in this.handlerOptions)){this.handlerOptions.multi=this.multi;}
+var sketchStyle=this.layer.styleMap&&this.layer.styleMap.styles.temporary;if(sketchStyle){this.handlerOptions.layerOptions=OpenLayers.Util.applyDefaults(this.handlerOptions.layerOptions,{styleMap:new OpenLayers.StyleMap({"default":sketchStyle})});}
+this.handler=new handler(this,this.callbacks,this.handlerOptions);},drawFeature:function(geometry){var feature=new OpenLayers.Feature.Vector(geometry);var proceed=this.layer.events.triggerEvent("sketchcomplete",{feature:feature});if(proceed!==false){feature.state=OpenLayers.State.INSERT;this.layer.addFeatures([feature]);this.featureAdded(feature);this.events.triggerEvent("featureadded",{feature:feature});}},insertXY:function(x,y){if(this.handler&&this.handler.line){this.handler.insertXY(x,y);}},insertDeltaXY:function(dx,dy){if(this.handler&&this.handler.line){this.handler.insertDeltaXY(dx,dy);}},insertDirectionLength:function(direction,length){if(this.handler&&this.handler.line){this.handler.insertDirectionLength(direction,length);}},insertDeflectionLength:function(deflection,length){if(this.handler&&this.handler.line){this.handler.insertDeflectionLength(deflection,length);}},undo:function(){return this.handler.undo&&this.handler.undo();},redo:function(){return this.handler.
redo&&this.handler.redo();},finishSketch:function(){this.handler.finishGeometry();},cancel:function(){this.handler.cancel();},CLASS_NAME:"OpenLayers.Control.DrawFeature"});OpenLayers.Layer.Vector.RootContainer=OpenLayers.Class(OpenLayers.Layer.Vector,{displayInLayerSwitcher:false,layers:null,display:function(){},getFeatureFromEvent:function(evt){var layers=this.layers;var feature;for(var i=0;i<layers.length;i++){feature=layers[i].getFeatureFromEvent(evt);if(feature){return feature;}}},setMap:function(map){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);this.collectRoots();map.events.register("changelayer",this,this.handleChangeLayer);},removeMap:function(map){map.events.unregister("changelayer",this,this.handleChangeLayer);this.resetRoots();OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments);},collectRoots:function(){var layer;for(var i=0;i<this.map.layers.length;++i){layer=this.map.layers[i];if(OpenLayers.Util.indexOf(this.layers,layer)!=-1){lay
er.renderer.moveRoot(this.renderer);}}},resetRoots:function(){var layer;for(var i=0;i<this.layers.length;++i){layer=this.layers[i];if(this.renderer&&layer.renderer.getRenderLayerId()==this.id){this.renderer.moveRoot(layer.renderer);}}},handleChangeLayer:function(evt){var layer=evt.layer;if(evt.property=="order"&&OpenLayers.Util.indexOf(this.layers,layer)!=-1){this.resetRoots();this.collectRoots();}},CLASS_NAME:"OpenLayers.Layer.Vector.RootContainer"});OpenLayers.Control.SelectFeature=OpenLayers.Class(OpenLayers.Control,{multipleKey:null,toggleKey:null,multiple:false,clickout:true,toggle:false,hover:false,highlightOnly:false,box:false,onBeforeSelect:function(){},onSelect:function(){},onUnselect:function(){},scope:null,geometryTypes:null,layer:null,layers:null,callbacks:null,selectStyle:null,renderIntent:"select",handlers:null,initialize:function(layers,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);if(this.scope===null){this.scope=this;}
+this.initLayer(layers);var callbacks={click:this.clickFeature,clickout:this.clickoutFeature};if(this.hover){callbacks.over=this.overFeature;callbacks.out=this.outFeature;}
+this.callbacks=OpenLayers.Util.extend(callbacks,this.callbacks);this.handlers={feature:new OpenLayers.Handler.Feature(this,this.layer,this.callbacks,{geometryTypes:this.geometryTypes})};if(this.box){this.handlers.box=new OpenLayers.Handler.Box(this,{done:this.selectBox},{boxDivClassName:"olHandlerBoxSelectFeature"});}},initLayer:function(layers){if(OpenLayers.Util.isArray(layers)){this.layers=layers;this.layer=new OpenLayers.Layer.Vector.RootContainer(this.id+"_container",{layers:layers});}else{this.layer=layers;}},destroy:function(){if(this.active&&this.layers){this.map.removeLayer(this.layer);}
+OpenLayers.Control.prototype.destroy.apply(this,arguments);if(this.layers){this.layer.destroy();}},activate:function(){if(!this.active){if(this.layers){this.map.addLayer(this.layer);}
+this.handlers.feature.activate();if(this.box&&this.handlers.box){this.handlers.box.activate();}}
+return OpenLayers.Control.prototype.activate.apply(this,arguments);},deactivate:function(){if(this.active){this.handlers.feature.deactivate();if(this.handlers.box){this.handlers.box.deactivate();}
+if(this.layers){this.map.removeLayer(this.layer);}}
+return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},unselectAll:function(options){var layers=this.layers||[this.layer];var layer,feature;for(var l=0;l<layers.length;++l){layer=layers[l];for(var i=layer.selectedFeatures.length-1;i>=0;--i){feature=layer.selectedFeatures[i];if(!options||options.except!=feature){this.unselect(feature);}}}},clickFeature:function(feature){if(!this.hover){var selected=(OpenLayers.Util.indexOf(feature.layer.selectedFeatures,feature)>-1);if(selected){if(this.toggleSelect()){this.unselect(feature);}else if(!this.multipleSelect()){this.unselectAll({except:feature});}}else{if(!this.multipleSelect()){this.unselectAll({except:feature});}
+this.select(feature);}}},multipleSelect:function(){return this.multiple||(this.handlers.feature.evt&&this.handlers.feature.evt[this.multipleKey]);},toggleSelect:function(){return this.toggle||(this.handlers.feature.evt&&this.handlers.feature.evt[this.toggleKey]);},clickoutFeature:function(feature){if(!this.hover&&this.clickout){this.unselectAll();}},overFeature:function(feature){var layer=feature.layer;if(this.hover){if(this.highlightOnly){this.highlight(feature);}else if(OpenLayers.Util.indexOf(layer.selectedFeatures,feature)==-1){this.select(feature);}}},outFeature:function(feature){if(this.hover){if(this.highlightOnly){if(feature._lastHighlighter==this.id){if(feature._prevHighlighter&&feature._prevHighlighter!=this.id){delete feature._lastHighlighter;var control=this.map.getControl(feature._prevHighlighter);if(control){control.highlight(feature);}}else{this.unhighlight(feature);}}}else{this.unselect(feature);}}},highlight:function(feature){var layer=feature.layer;var cont
=this.events.triggerEvent("beforefeaturehighlighted",{feature:feature});if(cont!==false){feature._prevHighlighter=feature._lastHighlighter;feature._lastHighlighter=this.id;var style=this.selectStyle||this.renderIntent;layer.drawFeature(feature,style);this.events.triggerEvent("featurehighlighted",{feature:feature});}},unhighlight:function(feature){var layer=feature.layer;if(feature._prevHighlighter==undefined){delete feature._lastHighlighter;}else if(feature._prevHighlighter==this.id){delete feature._prevHighlighter;}else{feature._lastHighlighter=feature._prevHighlighter;delete feature._prevHighlighter;}
+layer.drawFeature(feature,feature.style||feature.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:feature});},select:function(feature){var cont=this.onBeforeSelect.call(this.scope,feature);var layer=feature.layer;if(cont!==false){cont=layer.events.triggerEvent("beforefeatureselected",{feature:feature});if(cont!==false){layer.selectedFeatures.push(feature);this.highlight(feature);if(!this.handlers.feature.lastFeature){this.handlers.feature.lastFeature=layer.selectedFeatures[0];}
+layer.events.triggerEvent("featureselected",{feature:feature});this.onSelect.call(this.scope,feature);}}},unselect:function(feature){var layer=feature.layer;this.unhighlight(feature);OpenLayers.Util.removeItem(layer.selectedFeatures,feature);layer.events.triggerEvent("featureunselected",{feature:feature});this.onUnselect.call(this.scope,feature);},selectBox:function(position){if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel({x:position.left,y:position.bottom});var maxXY=this.map.getLonLatFromPixel({x:position.right,y:position.top});var bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);if(!this.multipleSelect()){this.unselectAll();}
+var prevMultiple=this.multiple;this.multiple=true;var layers=this.layers||[this.layer];this.events.triggerEvent("boxselectionstart",{layers:layers});var layer;for(var l=0;l<layers.length;++l){layer=layers[l];for(var i=0,len=layer.features.length;i<len;++i){var feature=layer.features[i];if(!feature.getVisibility()){continue;}
+if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1){if(bounds.toGeometry().intersects(feature.geometry)){if(OpenLayers.Util.indexOf(layer.selectedFeatures,feature)==-1){this.select(feature);}}}}}
+this.multiple=prevMultiple;this.events.triggerEvent("boxselectionend",{layers:layers});}},setMap:function(map){this.handlers.feature.setMap(map);if(this.box){this.handlers.box.setMap(map);}
+OpenLayers.Control.prototype.setMap.apply(this,arguments);},setLayer:function(layers){var isActive=this.active;this.unselectAll();this.deactivate();if(this.layers){this.layer.destroy();this.layers=null;}
+this.initLayer(layers);this.handlers.feature.layer=this.layer;if(isActive){this.activate();}},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keyup"],eventListener:null,observeElement:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=OpenLayers.Function.bindAsEventListener(this.handleKeyEvent,this);},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.observeElement=this.observeElement||document;for(var i=0,len=this.KEY_EVENTS.length;i<len;i++){OpenLayers.Event.observe(this.observeElement,this.KEY_EVENTS[i],this.eventListener);}
+return true;}else{return false;}},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){for(var i=0,len=this.KEY_EVENTS.length;i<len;i++){OpenLayers.Event.stopObserving(this.observeElement,this.KEY_EVENTS[i],this.eventListener);}
+deactivated=true;}
+return deactivated;},handleKeyEvent:function(evt){if(this.checkModifiers(evt)){this.callback(evt.type,[evt]);}},CLASS_NAME:"OpenLayers.Handler.Keyboard"});OpenLayers.Control.ModifyFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,clickout:true,toggle:true,standalone:false,layer:null,feature:null,vertices:null,virtualVertices:null,selectControl:null,dragControl:null,handlers:null,deleteCodes:null,virtualStyle:null,vertexRenderIntent:null,mode:null,createVertices:true,modified:false,radiusHandle:null,dragHandle:null,onModificationStart:function(){},onModification:function(){},onModificationEnd:function(){},initialize:function(layer,options){options=options||{};this.layer=layer;this.vertices=[];this.virtualVertices=[];this.virtualStyle=OpenLayers.Util.extend({},this.layer.style||this.layer.styleMap.createSymbolizer(null,options.vertexRenderIntent));this.virtualStyle.fillOpacity=0.3;this.virtualStyle.strokeOpacity=0.3;this.deleteCodes=[46,68];this.mode=OpenLayers.C
ontrol.ModifyFeature.RESHAPE;OpenLayers.Control.prototype.initialize.apply(this,[options]);if(!(OpenLayers.Util.isArray(this.deleteCodes))){this.deleteCodes=[this.deleteCodes];}
+var control=this;var selectOptions={geometryTypes:this.geometryTypes,clickout:this.clickout,toggle:this.toggle,onBeforeSelect:this.beforeSelectFeature,onSelect:this.selectFeature,onUnselect:this.unselectFeature,scope:this};if(this.standalone===false){this.selectControl=new OpenLayers.Control.SelectFeature(layer,selectOptions);}
+var dragOptions={geometryTypes:["OpenLayers.Geometry.Point"],onStart:function(feature,pixel){control.dragStart.apply(control,[feature,pixel]);},onDrag:function(feature,pixel){control.dragVertex.apply(control,[feature,pixel]);},onComplete:function(feature){control.dragComplete.apply(control,[feature]);},featureCallbacks:{over:function(feature){if(control.standalone!==true||feature._sketch||control.feature===feature){control.dragControl.overFeature.apply(control.dragControl,[feature]);}}}};this.dragControl=new OpenLayers.Control.DragFeature(layer,dragOptions);var keyboardOptions={keydown:this.handleKeypress};this.handlers={keyboard:new OpenLayers.Handler.Keyboard(this,keyboardOptions)};},destroy:function(){this.layer=null;this.standalone||this.selectControl.destroy();this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,[]);},activate:function(){return((this.standalone||this.selectControl.activate())&&this.handlers.keyboard.activate()&&OpenLayers.Control.p
rototype.activate.apply(this,arguments));},deactivate:function(){var deactivated=false;if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){this.layer.removeFeatures(this.vertices,{silent:true});this.layer.removeFeatures(this.virtualVertices,{silent:true});this.vertices=[];this.dragControl.deactivate();var feature=this.feature;var valid=feature&&feature.geometry&&feature.layer;if(this.standalone===false){if(valid){this.selectControl.unselect.apply(this.selectControl,[feature]);}
+this.selectControl.deactivate();}else{if(valid){this.unselectFeature(feature);}}
+this.handlers.keyboard.deactivate();deactivated=true;}
+return deactivated;},beforeSelectFeature:function(feature){return this.layer.events.triggerEvent("beforefeaturemodified",{feature:feature});},selectFeature:function(feature){if(!this.standalone||this.beforeSelectFeature(feature)!==false){this.feature=feature;this.modified=false;this.resetVertices();this.dragControl.activate();this.onModificationStart(this.feature);}
+var modified=feature.modified;if(feature.geometry&&!(modified&&modified.geometry)){this._originalGeometry=feature.geometry.clone();}},unselectFeature:function(feature){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});delete this.dragHandle;}
+if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});delete this.radiusHandle;}
+this.feature=null;this.dragControl.deactivate();this.onModificationEnd(feature);this.layer.events.triggerEvent("afterfeaturemodified",{feature:feature,modified:this.modified});this.modified=false;},dragStart:function(feature,pixel){if(feature!=this.feature&&!feature.geometry.parent&&feature!=this.dragHandle&&feature!=this.radiusHandle){if(this.standalone===false&&this.feature){this.selectControl.clickFeature.apply(this.selectControl,[this.feature]);}
+if(this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)!=-1){this.standalone||this.selectControl.clickFeature.apply(this.selectControl,[feature]);this.dragControl.overFeature.apply(this.dragControl,[feature]);this.dragControl.lastPixel=pixel;this.dragControl.handlers.drag.started=true;this.dragControl.handlers.drag.start=pixel;this.dragControl.handlers.drag.last=pixel;}}},dragVertex:function(vertex,pixel){this.modified=true;if(this.feature.geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){if(this.feature!=vertex){this.feature=vertex;}
+this.layer.events.triggerEvent("vertexmodified",{vertex:vertex.geometry,feature:this.feature,pixel:pixel});}else{if(vertex._index){vertex.geometry.parent.addComponent(vertex.geometry,vertex._index);delete vertex._index;OpenLayers.Util.removeItem(this.virtualVertices,vertex);this.vertices.push(vertex);}else if(vertex==this.dragHandle){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null;}}else if(vertex!==this.radiusHandle){this.layer.events.triggerEvent("vertexmodified",{vertex:vertex.geometry,feature:this.feature,pixel:pixel});}
+if(this.virtualVertices.length>0){this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];}
+this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent);}
+this.layer.drawFeature(vertex);},dragComplete:function(vertex){this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature});},setFeatureState:function(){if(this.feature.state!=OpenLayers.State.INSERT&&this.feature.state!=OpenLayers.State.DELETE){this.feature.state=OpenLayers.State.UPDATE;if(this.modified&&this._originalGeometry){var feature=this.feature;feature.modified=OpenLayers.Util.extend(feature.modified,{geometry:this._originalGeometry});delete this._originalGeometry;}}},resetVertices:function(){if(this.dragControl.feature){this.dragControl.outFeature(this.dragControl.feature);}
+if(this.vertices.length>0){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];}
+if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];}
+if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});this.dragHandle=null;}
+if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null;}
+if(this.feature&&this.feature.geometry.CLASS_NAME!="OpenLayers.Geometry.Point"){if((this.mode&OpenLayers.Control.ModifyFeature.DRAG)){this.collectDragHandle();}
+if((this.mode&(OpenLayers.Control.ModifyFeature.ROTATE|OpenLayers.Control.ModifyFeature.RESIZE))){this.collectRadiusHandle();}
+if(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE){if(!(this.mode&OpenLayers.Control.ModifyFeature.RESIZE)){this.collectVertices();}}}},handleKeypress:function(evt){var code=evt.keyCode;if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,code)!=-1){var vertex=this.dragControl.feature;if(vertex&&OpenLayers.Util.indexOf(this.vertices,vertex)!=-1&&!this.dragControl.handlers.drag.dragging&&vertex.geometry.parent){vertex.geometry.parent.removeComponent(vertex.geometry);this.layer.events.triggerEvent("vertexremoved",{vertex:vertex.geometry,feature:this.feature,pixel:evt.xy});this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent);this.modified=true;this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature});}}},collectVertices:function(){this.vertices=[];this.virtualVertices=[];var control=this;function collectComponentVertices(geometry){var i
,vertex,component,len;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(geometry);vertex._sketch=true;vertex.renderIntent=control.vertexRenderIntent;control.vertices.push(vertex);}else{var numVert=geometry.components.length;if(geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){numVert-=1;}
+for(i=0;i<numVert;++i){component=geometry.components[i];if(component.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(component);vertex._sketch=true;vertex.renderIntent=control.vertexRenderIntent;control.vertices.push(vertex);}else{collectComponentVertices(component);}}
+if(control.createVertices&&geometry.CLASS_NAME!="OpenLayers.Geometry.MultiPoint"){for(i=0,len=geometry.components.length;i<len-1;++i){var prevVertex=geometry.components[i];var nextVertex=geometry.components[i+1];if(prevVertex.CLASS_NAME=="OpenLayers.Geometry.Point"&&nextVertex.CLASS_NAME=="OpenLayers.Geometry.Point"){var x=(prevVertex.x+nextVertex.x)/2;var y=(prevVertex.y+nextVertex.y)/2;var point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(x,y),null,control.virtualStyle);point.geometry.parent=geometry;point._index=i+1;point._sketch=true;control.virtualVertices.push(point);}}}}}
+collectComponentVertices.call(this,this.feature.geometry);this.layer.addFeatures(this.virtualVertices,{silent:true});this.layer.addFeatures(this.vertices,{silent:true});},collectDragHandle:function(){var geometry=this.feature.geometry;var center=geometry.getBounds().getCenterLonLat();var originGeometry=new OpenLayers.Geometry.Point(center.lon,center.lat);var origin=new OpenLayers.Feature.Vector(originGeometry);originGeometry.move=function(x,y){OpenLayers.Geometry.Point.prototype.move.call(this,x,y);geometry.move(x,y);};origin._sketch=true;this.dragHandle=origin;this.dragHandle.renderIntent=this.vertexRenderIntent;this.layer.addFeatures([this.dragHandle],{silent:true});},collectRadiusHandle:function(){var geometry=this.feature.geometry;var bounds=geometry.getBounds();var center=bounds.getCenterLonLat();var originGeometry=new OpenLayers.Geometry.Point(center.lon,center.lat);var radiusGeometry=new OpenLayers.Geometry.Point(bounds.right,bounds.bottom);var radius=new OpenLayers.F
eature.Vector(radiusGeometry);var resize=(this.mode&OpenLayers.Control.ModifyFeature.RESIZE);var reshape=(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE);var rotate=(this.mode&OpenLayers.Control.ModifyFeature.ROTATE);radiusGeometry.move=function(x,y){OpenLayers.Geometry.Point.prototype.move.call(this,x,y);var dx1=this.x-originGeometry.x;var dy1=this.y-originGeometry.y;var dx0=dx1-x;var dy0=dy1-y;if(rotate){var a0=Math.atan2(dy0,dx0);var a1=Math.atan2(dy1,dx1);var angle=a1-a0;angle*=180/Math.PI;geometry.rotate(angle,originGeometry);}
+if(resize){var scale,ratio;if(reshape){scale=dy1/dy0;ratio=(dx1/dx0)/scale;}else{var l0=Math.sqrt((dx0*dx0)+(dy0*dy0));var l1=Math.sqrt((dx1*dx1)+(dy1*dy1));scale=l1/l0;}
+geometry.resize(scale,originGeometry,ratio);}};radius._sketch=true;this.radiusHandle=radius;this.radiusHandle.renderIntent=this.vertexRenderIntent;this.layer.addFeatures([this.radiusHandle],{silent:true});},setMap:function(map){this.standalone||this.selectControl.setMap(map);this.dragControl.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.ModifyFeature"});OpenLayers.Control.ModifyFeature.RESHAPE=1;OpenLayers.Control.ModifyFeature.RESIZE=2;OpenLayers.Control.ModifyFeature.ROTATE=4;OpenLayers.Control.ModifyFeature.DRAG=8;OpenLayers.Geometry.MultiLineString=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.LineString"],split:function(geometry,options){var results=null;var mutual=options&&options.mutual;var splits,sourceLine,sourceLines,sourceSplit,targetSplit;var sourceParts=[];var targetParts=[geometry];for(var i=0,len=this.components.length;i<len;++i){sourceLine=this.components[i];sourc
eSplit=false;for(var j=0;j<targetParts.length;++j){splits=sourceLine.split(targetParts[j],options);if(splits){if(mutual){sourceLines=splits[0];for(var k=0,klen=sourceLines.length;k<klen;++k){if(k===0&&sourceParts.length){sourceParts[sourceParts.length-1].addComponent(sourceLines[k]);}else{sourceParts.push(new OpenLayers.Geometry.MultiLineString([sourceLines[k]]));}}
+sourceSplit=true;splits=splits[1];}
+if(splits.length){splits.unshift(j,1);Array.prototype.splice.apply(targetParts,splits);break;}}}
+if(!sourceSplit){if(sourceParts.length){sourceParts[sourceParts.length-1].addComponent(sourceLine.clone());}else{sourceParts=[new OpenLayers.Geometry.MultiLineString(sourceLine.clone())];}}}
+if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
+if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
+if(sourceSplit||targetSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
+return results;},splitWith:function(geometry,options){var results=null;var mutual=options&&options.mutual;var splits,targetLine,sourceLines,sourceSplit,targetSplit,sourceParts,targetParts;if(geometry instanceof OpenLayers.Geometry.LineString){targetParts=[];sourceParts=[geometry];for(var i=0,len=this.components.length;i<len;++i){targetSplit=false;targetLine=this.components[i];for(var j=0;j<sourceParts.length;++j){splits=sourceParts[j].split(targetLine,options);if(splits){if(mutual){sourceLines=splits[0];if(sourceLines.length){sourceLines.unshift(j,1);Array.prototype.splice.apply(sourceParts,sourceLines);j+=sourceLines.length-2;}
+splits=splits[1];if(splits.length===0){splits=[targetLine.clone()];}}
+for(var k=0,klen=splits.length;k<klen;++k){if(k===0&&targetParts.length){targetParts[targetParts.length-1].addComponent(splits[k]);}else{targetParts.push(new OpenLayers.Geometry.MultiLineString([splits[k]]));}}
+targetSplit=true;}}
+if(!targetSplit){if(targetParts.length){targetParts[targetParts.length-1].addComponent(targetLine.clone());}else{targetParts=[new OpenLayers.Geometry.MultiLineString([targetLine.clone()])];}}}}else{results=geometry.split(this);}
+if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];}
+if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];}
+if(sourceSplit||targetSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}}
+return results;},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.ProxyHost="";OpenLayers.Request={DEFAULT_CONFIG:{method:"GET",url:window.location.href,async:true,user:undefined,password:undefined,params:null,proxy:OpenLayers.ProxyHost,headers:{},data:null,callback:function(){},success:null,failure:null,scope:null},URL_SPLIT_REGEX:/([^:]*:)\/\/([^:]*:?[^@]*@)?([^:\/\?]*):?([^\/\?]*)/,events:new OpenLayers.Events(this),makeSameOrigin:function(url,proxy){var sameOrigin=url.indexOf("http")!==0;var urlParts=!sameOrigin&&url.match(this.URL_SPLIT_REGEX);if(urlParts){var location=window.location;sameOrigin=urlParts[1]==location.protocol&&urlParts[3]==location.hostname;var uPort=urlParts[4],lPort=location.port;if(uPort!=80&&uPort!=""||lPort!="80"&&lPort!=""){sameOrigin=sameOrigin&&uPort==lPort;}}
+if(!sameOrigin){if(proxy){if(typeof proxy=="function"){url=proxy(url);}else{url=proxy+encodeURIComponent(url);}}else{OpenLayers.Console.warn(OpenLayers.i18n("proxyNeeded"),{url:url});}}
+return url;},issue:function(config){var defaultConfig=OpenLayers.Util.extend(this.DEFAULT_CONFIG,{proxy:OpenLayers.ProxyHost});config=OpenLayers.Util.applyDefaults(config,defaultConfig);var customRequestedWithHeader=false,headerKey;for(headerKey in config.headers){if(config.headers.hasOwnProperty(headerKey)){if(headerKey.toLowerCase()==='x-requested-with'){customRequestedWithHeader=true;}}}
+if(customRequestedWithHeader===false){config.headers['X-Requested-With']='XMLHttpRequest';}
+var request=new OpenLayers.Request.XMLHttpRequest();var url=OpenLayers.Util.urlAppend(config.url,OpenLayers.Util.getParameterString(config.params||{}));url=OpenLayers.Request.makeSameOrigin(url,config.proxy);request.open(config.method,url,config.async,config.user,config.password);for(var header in config.headers){request.setRequestHeader(header,config.headers[header]);}
+var events=this.events;var self=this;request.onreadystatechange=function(){if(request.readyState==OpenLayers.Request.XMLHttpRequest.DONE){var proceed=events.triggerEvent("complete",{request:request,config:config,requestUrl:url});if(proceed!==false){self.runCallbacks({request:request,config:config,requestUrl:url});}}};if(config.async===false){request.send(config.data);}else{window.setTimeout(function(){if(request.readyState!==0){request.send(config.data);}},0);}
+return request;},runCallbacks:function(options){var request=options.request;var config=options.config;var complete=(config.scope)?OpenLayers.Function.bind(config.callback,config.scope):config.callback;var success;if(config.success){success=(config.scope)?OpenLayers.Function.bind(config.success,config.scope):config.success;}
+var failure;if(config.failure){failure=(config.scope)?OpenLayers.Function.bind(config.failure,config.scope):config.failure;}
+if(OpenLayers.Util.createUrlObject(config.url).protocol=="file:"&&request.responseText){request.status=200;}
+complete(request);if(!request.status||(request.status>=200&&request.status<300)){this.events.triggerEvent("success",options);if(success){success(request);}}
+if(request.status&&(request.status<200||request.status>=300)){this.events.triggerEvent("failure",options);if(failure){failure(request);}}},GET:function(config){config=OpenLayers.Util.extend(config,{method:"GET"});return OpenLayers.Request.issue(config);},POST:function(config){config=OpenLayers.Util.extend(config,{method:"POST"});config.headers=config.headers?config.headers:{};if(!("CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(config.headers))){config.headers["Content-Type"]="application/xml";}
+return OpenLayers.Request.issue(config);},PUT:function(config){config=OpenLayers.Util.extend(config,{method:"PUT"});config.headers=config.headers?config.headers:{};if(!("CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(config.headers))){config.headers["Content-Type"]="application/xml";}
+return OpenLayers.Request.issue(config);},DELETE:function(config){config=OpenLayers.Util.extend(config,{method:"DELETE"});return OpenLayers.Request.issue(config);},HEAD:function(config){config=OpenLayers.Util.extend(config,{method:"HEAD"});return OpenLayers.Request.issue(config);},OPTIONS:function(config){config=OpenLayers.Util.extend(config,{method:"OPTIONS"});return OpenLayers.Request.issue(config);}};(function(){var oXMLHttpRequest=window.XMLHttpRequest;var bGecko=!!window.controllers,bIE=window.document.all&&!window.opera,bIE7=bIE&&window.navigator.userAgent.match(/MSIE 7.0/);function fXMLHttpRequest(){this._object=oXMLHttpRequest&&!bIE7?new oXMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");this._listeners=[];};function cXMLHttpRequest(){return new fXMLHttpRequest;};cXMLHttpRequest.prototype=fXMLHttpRequest.prototype;if(bGecko&&oXMLHttpRequest.wrapped)
+cXMLHttpRequest.wrapped=oXMLHttpRequest.wrapped;cXMLHttpRequest.UNSENT=0;cXMLHttpRequest.OPENED=1;cXMLHttpRequest.HEADERS_RECEIVED=2;cXMLHttpRequest.LOADING=3;cXMLHttpRequest.DONE=4;cXMLHttpRequest.prototype.readyState=cXMLHttpRequest.UNSENT;cXMLHttpRequest.prototype.responseText='';cXMLHttpRequest.prototype.responseXML=null;cXMLHttpRequest.prototype.status=0;cXMLHttpRequest.prototype.statusText='';cXMLHttpRequest.prototype.priority="NORMAL";cXMLHttpRequest.prototype.onreadystatechange=null;cXMLHttpRequest.onreadystatechange=null;cXMLHttpRequest.onopen=null;cXMLHttpRequest.onsend=null;cXMLHttpRequest.onabort=null;cXMLHttpRequest.prototype.open=function(sMethod,sUrl,bAsync,sUser,sPassword){delete this._headers;if(arguments.length<3)
+bAsync=true;this._async=bAsync;var oRequest=this,nState=this.readyState,fOnUnload;if(bIE&&bAsync){fOnUnload=function(){if(nState!=cXMLHttpRequest.DONE){fCleanTransport(oRequest);oRequest.abort();}};window.attachEvent("onunload",fOnUnload);}
+if(cXMLHttpRequest.onopen)
+cXMLHttpRequest.onopen.apply(this,arguments);if(arguments.length>4)
+this._object.open(sMethod,sUrl,bAsync,sUser,sPassword);else
+if(arguments.length>3)
+this._object.open(sMethod,sUrl,bAsync,sUser);else
+this._object.open(sMethod,sUrl,bAsync);this.readyState=cXMLHttpRequest.OPENED;fReadyStateChange(this);this._object.onreadystatechange=function(){if(bGecko&&!bAsync)
+return;oRequest.readyState=oRequest._object.readyState;fSynchronizeValues(oRequest);if(oRequest._aborted){oRequest.readyState=cXMLHttpRequest.UNSENT;return;}
+if(oRequest.readyState==cXMLHttpRequest.DONE){delete oRequest._data;fCleanTransport(oRequest);if(bIE&&bAsync)
+window.detachEvent("onunload",fOnUnload);}
+if(nState!=oRequest.readyState)
+fReadyStateChange(oRequest);nState=oRequest.readyState;}};function fXMLHttpRequest_send(oRequest){oRequest._object.send(oRequest._data);if(bGecko&&!oRequest._async){oRequest.readyState=cXMLHttpRequest.OPENED;fSynchronizeValues(oRequest);while(oRequest.readyState<cXMLHttpRequest.DONE){oRequest.readyState++;fReadyStateChange(oRequest);if(oRequest._aborted)
+return;}}};cXMLHttpRequest.prototype.send=function(vData){if(cXMLHttpRequest.onsend)
+cXMLHttpRequest.onsend.apply(this,arguments);if(!arguments.length)
+vData=null;if(vData&&vData.nodeType){vData=window.XMLSerializer?new window.XMLSerializer().serializeToString(vData):vData.xml;if(!this._headers["Content-Type"])
+this._object.setRequestHeader("Content-Type","application/xml");}
+this._data=vData;fXMLHttpRequest_send(this);};cXMLHttpRequest.prototype.abort=function(){if(cXMLHttpRequest.onabort)
+cXMLHttpRequest.onabort.apply(this,arguments);if(this.readyState>cXMLHttpRequest.UNSENT)
+this._aborted=true;this._object.abort();fCleanTransport(this);this.readyState=cXMLHttpRequest.UNSENT;delete this._data;};cXMLHttpRequest.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders();};cXMLHttpRequest.prototype.getResponseHeader=function(sName){return this._object.getResponseHeader(sName);};cXMLHttpRequest.prototype.setRequestHeader=function(sName,sValue){if(!this._headers)
+this._headers={};this._headers[sName]=sValue;return this._object.setRequestHeader(sName,sValue);};cXMLHttpRequest.prototype.addEventListener=function(sName,fHandler,bUseCapture){for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++)
+if(oListener[0]==sName&&oListener[1]==fHandler&&oListener[2]==bUseCapture)
+return;this._listeners.push([sName,fHandler,bUseCapture]);};cXMLHttpRequest.prototype.removeEventListener=function(sName,fHandler,bUseCapture){for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++)
+if(oListener[0]==sName&&oListener[1]==fHandler&&oListener[2]==bUseCapture)
+break;if(oListener)
+this._listeners.splice(nIndex,1);};cXMLHttpRequest.prototype.dispatchEvent=function(oEvent){var oEventPseudo={'type':oEvent.type,'target':this,'currentTarget':this,'eventPhase':2,'bubbles':oEvent.bubbles,'cancelable':oEvent.cancelable,'timeStamp':oEvent.timeStamp,'stopPropagation':function(){},'preventDefault':function(){},'initEvent':function(){}};if(oEventPseudo.type=="readystatechange"&&this.onreadystatechange)
+(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[oEventPseudo]);for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++)
+if(oListener[0]==oEventPseudo.type&&!oListener[2])
+(oListener[1].handleEvent||oListener[1]).apply(this,[oEventPseudo]);};cXMLHttpRequest.prototype.toString=function(){return'['+"object"+' '+"XMLHttpRequest"+']';};cXMLHttpRequest.toString=function(){return'['+"XMLHttpRequest"+']';};function fReadyStateChange(oRequest){if(cXMLHttpRequest.onreadystatechange)
+cXMLHttpRequest.onreadystatechange.apply(oRequest);oRequest.dispatchEvent({'type':"readystatechange",'bubbles':false,'cancelable':false,'timeStamp':new Date+0});};function fGetDocument(oRequest){var oDocument=oRequest.responseXML,sResponse=oRequest.responseText;if(bIE&&sResponse&&oDocument&&!oDocument.documentElement&&oRequest.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){oDocument=new window.ActiveXObject("Microsoft.XMLDOM");oDocument.async=false;oDocument.validateOnParse=false;oDocument.loadXML(sResponse);}
+if(oDocument)
+if((bIE&&oDocument.parseError!=0)||!oDocument.documentElement||(oDocument.documentElement&&oDocument.documentElement.tagName=="parsererror"))
+return null;return oDocument;};function fSynchronizeValues(oRequest){try{oRequest.responseText=oRequest._object.responseText;}catch(e){}
+try{oRequest.responseXML=fGetDocument(oRequest._object);}catch(e){}
+try{oRequest.status=oRequest._object.status;}catch(e){}
+try{oRequest.statusText=oRequest._object.statusText;}catch(e){}};function fCleanTransport(oRequest){oRequest._object.onreadystatechange=new window.Function;};if(!window.Function.prototype.apply){window.Function.prototype.apply=function(oRequest,oArguments){if(!oArguments)
+oArguments=[];oRequest.__func=this;oRequest.__func(oArguments[0],oArguments[1],oArguments[2],oArguments[3],oArguments[4]);delete oRequest.__func;};};OpenLayers.Request.XMLHttpRequest=cXMLHttpRequest;})();OpenLayers.Protocol.HTTP=OpenLayers.Class(OpenLayers.Protocol,{url:null,headers:null,params:null,callback:null,scope:null,readWithPOST:false,updateWithPOST:false,deleteWithPOST:false,wildcarded:false,srsInBBOX:false,initialize:function(options){options=options||{};this.params={};this.headers={};OpenLayers.Protocol.prototype.initialize.apply(this,arguments);if(!this.filterToParams&&OpenLayers.Format.QueryStringFilter){var format=new OpenLayers.Format.QueryStringFilter({wildcarded:this.wildcarded,srsInBBOX:this.srsInBBOX});this.filterToParams=function(filter,params){return format.write(filter,params);};}},destroy:function(){this.params=null;this.headers=null;OpenLayers.Protocol.prototype.destroy.apply(this);},read:function(options){OpenLayers.Protocol.prototype.read.apply(this
,arguments);options=options||{};options.params=OpenLayers.Util.applyDefaults(options.params,this.options.params);options=OpenLayers.Util.applyDefaults(options,this.options);if(options.filter&&this.filterToParams){options.params=this.filterToParams(options.filter,options.params);}
+var readWithPOST=(options.readWithPOST!==undefined)?options.readWithPOST:this.readWithPOST;var resp=new OpenLayers.Protocol.Response({requestType:"read"});if(readWithPOST){var headers=options.headers||{};headers["Content-Type"]="application/x-www-form-urlencoded";resp.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleRead,resp,options),data:OpenLayers.Util.getParameterString(options.params),headers:headers});}else{resp.priv=OpenLayers.Request.GET({url:options.url,callback:this.createCallback(this.handleRead,resp,options),params:options.params,headers:options.headers});}
+return resp;},handleRead:function(resp,options){this.handleResponse(resp,options);},create:function(features,options){options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:features,requestType:"create"});resp.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleCreate,resp,options),headers:options.headers,data:this.format.write(features)});return resp;},handleCreate:function(resp,options){this.handleResponse(resp,options);},update:function(feature,options){options=options||{};var url=options.url||feature.url||this.options.url+"/"+feature.fid;options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:feature,requestType:"update"});var method=this.updateWithPOST?"POST":"PUT";resp.priv=OpenLayers.Request[method]({url:url,callback:this.createCallback(this.handleUpdate,resp,options),headers:options.headers,data:this.format.write(fea
ture)});return resp;},handleUpdate:function(resp,options){this.handleResponse(resp,options);},"delete":function(feature,options){options=options||{};var url=options.url||feature.url||this.options.url+"/"+feature.fid;options=OpenLayers.Util.applyDefaults(options,this.options);var resp=new OpenLayers.Protocol.Response({reqFeatures:feature,requestType:"delete"});var method=this.deleteWithPOST?"POST":"DELETE";var requestOptions={url:url,callback:this.createCallback(this.handleDelete,resp,options),headers:options.headers};if(this.deleteWithPOST){requestOptions.data=this.format.write(feature);}
+resp.priv=OpenLayers.Request[method](requestOptions);return resp;},handleDelete:function(resp,options){this.handleResponse(resp,options);},handleResponse:function(resp,options){var request=resp.priv;if(options.callback){if(request.status>=200&&request.status<300){if(resp.requestType!="delete"){resp.features=this.parseFeatures(request);}
+resp.code=OpenLayers.Protocol.Response.SUCCESS;}else{resp.code=OpenLayers.Protocol.Response.FAILURE;}
+options.callback.call(options.scope,resp);}},parseFeatures:function(request){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;}
+if(!doc||doc.length<=0){return null;}
+return this.format.read(doc);},commit:function(features,options){options=OpenLayers.Util.applyDefaults(options,this.options);var resp=[],nResponses=0;var types={};types[OpenLayers.State.INSERT]=[];types[OpenLayers.State.UPDATE]=[];types[OpenLayers.State.DELETE]=[];var feature,list,requestFeatures=[];for(var i=0,len=features.length;i<len;++i){feature=features[i];list=types[feature.state];if(list){list.push(feature);requestFeatures.push(feature);}}
+var nRequests=(types[OpenLayers.State.INSERT].length>0?1:0)+
+types[OpenLayers.State.UPDATE].length+
+types[OpenLayers.State.DELETE].length;var success=true;var finalResponse=new OpenLayers.Protocol.Response({reqFeatures:requestFeatures});function insertCallback(response){var len=response.features?response.features.length:0;var fids=new Array(len);for(var i=0;i<len;++i){fids[i]=response.features[i].fid;}
+finalResponse.insertIds=fids;callback.apply(this,[response]);}
+function callback(response){this.callUserCallback(response,options);success=success&&response.success();nResponses++;if(nResponses>=nRequests){if(options.callback){finalResponse.code=success?OpenLayers.Protocol.Response.SUCCESS:OpenLayers.Protocol.Response.FAILURE;options.callback.apply(options.scope,[finalResponse]);}}}
+var queue=types[OpenLayers.State.INSERT];if(queue.length>0){resp.push(this.create(queue,OpenLayers.Util.applyDefaults({callback:insertCallback,scope:this},options.create)));}
+queue=types[OpenLayers.State.UPDATE];for(var i=queue.length-1;i>=0;--i){resp.push(this.update(queue[i],OpenLayers.Util.applyDefaults({callback:callback,scope:this},options.update)));}
+queue=types[OpenLayers.State.DELETE];for(var i=queue.length-1;i>=0;--i){resp.push(this["delete"](queue[i],OpenLayers.Util.applyDefaults({callback:callback,scope:this},options["delete"])));}
+return resp;},abort:function(response){if(response){response.priv.abort();}},callUserCallback:function(resp,options){var opt=options[resp.requestType];if(opt&&opt.callback){opt.callback.call(opt.scope,resp);}},CLASS_NAME:"OpenLayers.Protocol.HTTP"});OpenLayers.Geometry.MultiPolygon=OpenLayers.Class(OpenLayers.Geometry.Collection,{componentTypes:["OpenLayers.Geometry.Polygon"],CLASS_NAME:"OpenLayers.Geometry.MultiPolygon"});OpenLayers.Format.GeoJSON=OpenLayers.Class(OpenLayers.Format.JSON,{ignoreExtraDims:false,read:function(json,type,filter){type=(type)?type:"FeatureCollection";var results=null;var obj=null;if(typeof json=="string"){obj=OpenLayers.Format.JSON.prototype.read.apply(this,[json,filter]);}else{obj=json;}
+if(!obj){OpenLayers.Console.error("Bad JSON: "+json);}else if(typeof(obj.type)!="string"){OpenLayers.Console.error("Bad GeoJSON - no type: "+json);}else if(this.isValidType(obj,type)){switch(type){case"Geometry":try{results=this.parseGeometry(obj);}catch(err){OpenLayers.Console.error(err);}
+break;case"Feature":try{results=this.parseFeature(obj);results.type="Feature";}catch(err){OpenLayers.Console.error(err);}
+break;case"FeatureCollection":results=[];switch(obj.type){case"Feature":try{results.push(this.parseFeature(obj));}catch(err){results=null;OpenLayers.Console.error(err);}
+break;case"FeatureCollection":for(var i=0,len=obj.features.length;i<len;++i){try{results.push(this.parseFeature(obj.features[i]));}catch(err){results=null;OpenLayers.Console.error(err);}}
+break;default:try{var geom=this.parseGeometry(obj);results.push(new OpenLayers.Feature.Vector(geom));}catch(err){results=null;OpenLayers.Console.error(err);}}
+break;}}
+return results;},isValidType:function(obj,type){var valid=false;switch(type){case"Geometry":if(OpenLayers.Util.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],obj.type)==-1){OpenLayers.Console.error("Unsupported geometry type: "+
+obj.type);}else{valid=true;}
+break;case"FeatureCollection":valid=true;break;default:if(obj.type==type){valid=true;}else{OpenLayers.Console.error("Cannot convert types from "+
+obj.type+" to "+type);}}
+return valid;},parseFeature:function(obj){var feature,geometry,attributes,bbox;attributes=(obj.properties)?obj.properties:{};bbox=(obj.geometry&&obj.geometry.bbox)||obj.bbox;try{geometry=this.parseGeometry(obj.geometry);}catch(err){throw err;}
+feature=new OpenLayers.Feature.Vector(geometry,attributes);if(bbox){feature.bounds=OpenLayers.Bounds.fromArray(bbox);}
+if(obj.id){feature.fid=obj.id;}
+return feature;},parseGeometry:function(obj){if(obj==null){return null;}
+var geometry,collection=false;if(obj.type=="GeometryCollection"){if(!(OpenLayers.Util.isArray(obj.geometries))){throw"GeometryCollection must have geometries array: "+obj;}
+var numGeom=obj.geometries.length;var components=new Array(numGeom);for(var i=0;i<numGeom;++i){components[i]=this.parseGeometry.apply(this,[obj.geometries[i]]);}
+geometry=new OpenLayers.Geometry.Collection(components);collection=true;}else{if(!(OpenLayers.Util.isArray(obj.coordinates))){throw"Geometry must have coordinates array: "+obj;}
+if(!this.parseCoords[obj.type.toLowerCase()]){throw"Unsupported geometry type: "+obj.type;}
+try{geometry=this.parseCoords[obj.type.toLowerCase()].apply(this,[obj.coordinates]);}catch(err){throw err;}}
+if(this.internalProjection&&this.externalProjection&&!collection){geometry.transform(this.externalProjection,this.internalProjection);}
+return geometry;},parseCoords:{"point":function(array){if(this.ignoreExtraDims==false&&array.length!=2){throw"Only 2D points are supported: "+array;}
+return new OpenLayers.Geometry.Point(array[0],array[1]);},"multipoint":function(array){var points=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["point"].apply(this,[array[i]]);}catch(err){throw err;}
+points.push(p);}
+return new OpenLayers.Geometry.MultiPoint(points);},"linestring":function(array){var points=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["point"].apply(this,[array[i]]);}catch(err){throw err;}
+points.push(p);}
+return new OpenLayers.Geometry.LineString(points);},"multilinestring":function(array){var lines=[];var l=null;for(var i=0,len=array.length;i<len;++i){try{l=this.parseCoords["linestring"].apply(this,[array[i]]);}catch(err){throw err;}
+lines.push(l);}
+return new OpenLayers.Geometry.MultiLineString(lines);},"polygon":function(array){var rings=[];var r,l;for(var i=0,len=array.length;i<len;++i){try{l=this.parseCoords["linestring"].apply(this,[array[i]]);}catch(err){throw err;}
+r=new OpenLayers.Geometry.LinearRing(l.components);rings.push(r);}
+return new OpenLayers.Geometry.Polygon(rings);},"multipolygon":function(array){var polys=[];var p=null;for(var i=0,len=array.length;i<len;++i){try{p=this.parseCoords["polygon"].apply(this,[array[i]]);}catch(err){throw err;}
+polys.push(p);}
+return new OpenLayers.Geometry.MultiPolygon(polys);},"box":function(array){if(array.length!=2){throw"GeoJSON box coordinates must have 2 elements";}
+return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(array[0][0],array[0][1]),new OpenLayers.Geometry.Point(array[1][0],array[0][1]),new OpenLayers.Geometry.Point(array[1][0],array[1][1]),new OpenLayers.Geometry.Point(array[0][0],array[1][1]),new OpenLayers.Geometry.Point(array[0][0],array[0][1])])]);}},write:function(obj,pretty){var geojson={"type":null};if(OpenLayers.Util.isArray(obj)){geojson.type="FeatureCollection";var numFeatures=obj.length;geojson.features=new Array(numFeatures);for(var i=0;i<numFeatures;++i){var element=obj[i];if(!element instanceof OpenLayers.Feature.Vector){var msg="FeatureCollection only supports collections "+"of features: "+element;throw msg;}
+geojson.features[i]=this.extract.feature.apply(this,[element]);}}else if(obj.CLASS_NAME.indexOf("OpenLayers.Geometry")==0){geojson=this.extract.geometry.apply(this,[obj]);}else if(obj instanceof OpenLayers.Feature.Vector){geojson=this.extract.feature.apply(this,[obj]);if(obj.layer&&obj.layer.projection){geojson.crs=this.createCRSObject(obj);}}
+return OpenLayers.Format.JSON.prototype.write.apply(this,[geojson,pretty]);},createCRSObject:function(object){var proj=object.layer.projection.toString();var crs={};if(proj.match(/epsg:/i)){var code=parseInt(proj.substring(proj.indexOf(":")+1));if(code==4326){crs={"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}};}else{crs={"type":"name","properties":{"name":"EPSG:"+code}};}}
+return crs;},extract:{'feature':function(feature){var geom=this.extract.geometry.apply(this,[feature.geometry]);var json={"type":"Feature","properties":feature.attributes,"geometry":geom};if(feature.fid!=null){json.id=feature.fid;}
+return json;},'geometry':function(geometry){if(geometry==null){return null;}
+if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);}
+var geometryType=geometry.CLASS_NAME.split('.')[2];var data=this.extract[geometryType.toLowerCase()].apply(this,[geometry]);var json;if(geometryType=="Collection"){json={"type":"GeometryCollection","geometries":data};}else{json={"type":geometryType,"coordinates":data};}
+return json;},'point':function(point){return[point.x,point.y];},'multipoint':function(multipoint){var array=[];for(var i=0,len=multipoint.components.length;i<len;++i){array.push(this.extract.point.apply(this,[multipoint.components[i]]));}
+return array;},'linestring':function(linestring){var array=[];for(var i=0,len=linestring.components.length;i<len;++i){array.push(this.extract.point.apply(this,[linestring.components[i]]));}
+return array;},'multilinestring':function(multilinestring){var array=[];for(var i=0,len=multilinestring.components.length;i<len;++i){array.push(this.extract.linestring.apply(this,[multilinestring.components[i]]));}
+return array;},'polygon':function(polygon){var array=[];for(var i=0,len=polygon.components.length;i<len;++i){array.push(this.extract.linestring.apply(this,[polygon.components[i]]));}
+return array;},'multipolygon':function(multipolygon){var array=[];for(var i=0,len=multipolygon.components.length;i<len;++i){array.push(this.extract.polygon.apply(this,[multipolygon.components[i]]));}
+return array;},'collection':function(collection){var len=collection.components.length;var array=new Array(len);for(var i=0;i<len;++i){array[i]=this.extract.geometry.apply(this,[collection.components[i]]);}
+return array;}},CLASS_NAME:"OpenLayers.Format.GeoJSON"});OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",layername:null,type:null,isBaseLayer:true,tileOrigin:null,serverResolutions:null,zoomOffset:0,initialize:function(name,url,options){var newArguments=[];newArguments.push(name,url,{},options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TMS(this.name,this.url,this.getOptions());}
+obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var res=this.getServerResolution();var x=Math.round((bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w));var y=Math.round((bounds.bottom-this.tileOrigin.lat)/(res*this.tileSize.h));var z=this.getServerZoom();var path=this.serviceVersion+"/"+this.layername+"/"+z+"/"+x+"/"+y+"."+this.type;var url=this.url;if(OpenLayers.Util.isArray(url)){url=this.selectUrl(path,url);}
+return url+path;},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.Strategy=OpenLayers.Class({layer:null,options:null,active:null,autoActivate:true,autoDestroy:true,initialize:function(options){OpenLayers.Util.extend(this,options);this.options=options;this.active=false;},destroy:function(){this.deactivate();this.layer=null;this.options=null;},setLayer:function(layer){this.layer=layer;},activate:function(){if(!this.active){this.active=true;return true;}
+return false;},deactivate:function(){if(this.active){this.active=false;return true;}
+return false;},CLASS_NAME:"OpenLayers.Strategy"});OpenLayers.Strategy.Fixed=OpenLayers.Class(OpenLayers.Strategy,{preload:false,activate:function(){if(OpenLayers.Strategy.prototype.activate.apply(this,arguments)){this.layer.events.on({"refresh":this.load,scope:this});if(this.layer.visibility==true||this.preload){this.load();}else{this.layer.events.on({"visibilitychanged":this.load,scope:this});}
+return true;}
+return false;},deactivate:function(){var deactivated=OpenLayers.Strategy.prototype.deactivate.call(this);if(deactivated){this.layer.events.un({"refresh":this.load,"visibilitychanged":this.load,scope:this});}
+return deactivated;},load:function(options){var layer=this.layer;layer.events.triggerEvent("loadstart");layer.protocol.read(OpenLayers.Util.applyDefaults({callback:OpenLayers.Function.bind(this.merge,this,layer.map.getProjectionObject()),filter:layer.filter},options));layer.events.un({"visibilitychanged":this.load,scope:this});},merge:function(mapProjection,resp){var layer=this.layer;layer.destroyFeatures();var features=resp.features;if(features&&features.length>0){if(!mapProjection.equals(layer.projection)){var geom;for(var i=0,len=features.length;i<len;++i){geom=features[i].geometry;if(geom){geom.transform(layer.projection,mapProjection);}}}
+layer.addFeatures(features);}
+layer.events.triggerEvent("loadend");},CLASS_NAME:"OpenLayers.Strategy.Fixed"});OpenLayers.Control.Zoom=OpenLayers.Class(OpenLayers.Control,{zoomInText:"+",zoomInId:"olZoomInLink",zoomOutText:"-",zoomOutId:"olZoomOutLink",draw:function(){var div=OpenLayers.Control.prototype.draw.apply(this),links=this.getOrCreateLinks(div),zoomIn=links.zoomIn,zoomOut=links.zoomOut,eventsInstance=this.map.events;if(zoomOut.parentNode!==div){eventsInstance=this.events;eventsInstance.attachToElement(zoomOut.parentNode);}
+eventsInstance.register("buttonclick",this,this.onZoomClick);this.zoomInLink=zoomIn;this.zoomOutLink=zoomOut;return div;},getOrCreateLinks:function(el){var zoomIn=document.getElementById(this.zoomInId),zoomOut=document.getElementById(this.zoomOutId);if(!zoomIn){zoomIn=document.createElement("a");zoomIn.href="#zoomIn";zoomIn.appendChild(document.createTextNode(this.zoomInText));zoomIn.className="olControlZoomIn";el.appendChild(zoomIn);}
+OpenLayers.Element.addClass(zoomIn,"olButton");if(!zoomOut){zoomOut=document.createElement("a");zoomOut.href="#zoomOut";zoomOut.appendChild(document.createTextNode(this.zoomOutText));zoomOut.className="olControlZoomOut";el.appendChild(zoomOut);}
+OpenLayers.Element.addClass(zoomOut,"olButton");return{zoomIn:zoomIn,zoomOut:zoomOut};},onZoomClick:function(evt){var button=evt.buttonElement;if(button===this.zoomInLink){this.map.zoomIn();}else if(button===this.zoomOutLink){this.map.zoomOut();}},destroy:function(){if(this.map){this.map.events.unregister("buttonclick",this,this.onZoomClick);}
+delete this.zoomInLink;delete this.zoomOutLink;OpenLayers.Control.prototype.destroy.apply(this);},CLASS_NAME:"OpenLayers.Control.Zoom"});OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,autoActivate:true,defaultControl:null,saveState:false,allowDepress:false,activeState:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.controls=[];this.activeState={};},destroy:function(){if(this.map){this.map.events.unregister("buttonclick",this,this.onButtonClick);}
+OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var ctl,i=this.controls.length-1;i>=0;i--){ctl=this.controls[i];if(ctl.events){ctl.events.un({activate:this.iconOn,deactivate:this.iconOff});}
+ctl.panel_div=null;}
+this.activeState=null;},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){var control;for(var i=0,len=this.controls.length;i<len;i++){control=this.controls[i];if(control===this.defaultControl||(this.saveState&&this.activeState[control.id])){control.activate();}}
+if(this.saveState===true){this.defaultControl=null;}
+this.redraw();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)){var control;for(var i=0,len=this.controls.length;i<len;i++){control=this.controls[i];this.activeState[control.id]=control.deactivate();}
+this.redraw();return true;}else{return false;}},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(this.outsideViewport){this.events.attachToElement(this.div);this.events.register("buttonclick",this,this.onButtonClick);}else{this.map.events.register("buttonclick",this,this.onButtonClick);}
+this.addControlsToMap(this.controls);return this.div;},redraw:function(){for(var l=this.div.childNodes.length,i=l-1;i>=0;i--){this.div.removeChild(this.div.childNodes[i]);}
+this.div.innerHTML="";if(this.active){for(var i=0,len=this.controls.length;i<len;i++){this.div.appendChild(this.controls[i].panel_div);}}},activateControl:function(control){if(!this.active){return false;}
+if(control.type==OpenLayers.Control.TYPE_BUTTON){control.trigger();return;}
+if(control.type==OpenLayers.Control.TYPE_TOGGLE){if(control.active){control.deactivate();}else{control.activate();}
+return;}
+if(this.allowDepress&&control.active){control.deactivate();}else{var c;for(var i=0,len=this.controls.length;i<len;i++){c=this.controls[i];if(c!=control&&(c.type===OpenLayers.Control.TYPE_TOOL||c.type==null)){c.deactivate();}}
+control.activate();}},addControls:function(controls){if(!(OpenLayers.Util.isArray(controls))){controls=[controls];}
+this.controls=this.controls.concat(controls);for(var i=0,len=controls.length;i<len;i++){var control=controls[i],element=this.createControlMarkup(control);OpenLayers.Element.addClass(element,control.displayClass+"ItemInactive");OpenLayers.Element.addClass(element,"olButton");if(control.title!=""&&!element.title){element.title=control.title;}
+control.panel_div=element;}
+if(this.map){this.addControlsToMap(controls);this.redraw();}},createControlMarkup:function(control){return document.createElement("div");},addControlsToMap:function(controls){var control;for(var i=0,len=controls.length;i<len;i++){control=controls[i];if(control.autoActivate===true){control.autoActivate=false;this.map.addControl(control);control.autoActivate=true;}else{this.map.addControl(control);control.deactivate();}
+control.events.on({activate:this.iconOn,deactivate:this.iconOff});}},iconOn:function(){var d=this.panel_div;var re=new RegExp("\\b("+this.displayClass+"Item)Inactive\\b");d.className=d.className.replace(re,"$1Active");},iconOff:function(){var d=this.panel_div;var re=new RegExp("\\b("+this.displayClass+"Item)Active\\b");d.className=d.className.replace(re,"$1Inactive");},onButtonClick:function(evt){var controls=this.controls,button=evt.buttonElement;for(var i=controls.length-1;i>=0;--i){if(controls[i].panel_div===button){this.activateControl(controls[i]);break;}}},getControlsBy:function(property,match){var test=(typeof match.test=="function");var found=OpenLayers.Array.filter(this.controls,function(item){return item[property]==match||(test&&match.test(item[property]));});return found;},getControlsByName:function(match){return this.getControlsBy("name",match);},getControlsByClass:function(match){return this.getControlsBy("CLASS_NAME",match);},CLASS_NAME:"OpenLayers.Control.Pane
l"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class(OpenLayers.Control,{autoActivate:true,slideFactor:75,observeElement:null,draw:function(){var observeElement=this.observeElement||document;this.handler=new OpenLayers.Handler.Keyboard(this,{"keydown":this.defaultKeyPress},{observeElement:observeElement});},defaultKeyPress:function(evt){var size,handled=true;switch(evt.keyCode){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:size=this.map.getSize();this.map.pan(0,-0.75*size.h);break;case 34:size=this.map.getSize();this.map.pan(0,0.75*size.h);break;case 35:size=this.map.getSize();this.map.pan(0.75*size.w,0);break;case 36:size=this.map.getSize();this.map.pan(-0.75*size.w,0);break;case 43:case 61:case 187:case 107:this.map.zoomIn();brea
k;case 45:case 109:case 189:case 95:this.map.zoomOut();break;default:handled=false;}
+if(handled){OpenLayers.Event.stop(evt);}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.Control.Measure=OpenLayers.Class(OpenLayers.Control,{handlerOptions:null,callbacks:null,displaySystem:'metric',geodesic:false,displaySystemUnits:{geographic:['dd'],english:['mi','ft','in'],metric:['km','m']},partialDelay:300,delayedTrigger:null,persist:false,immediate:false,initialize:function(handler,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);var callbacks={done:this.measureComplete,point:this.measurePartial};if(this.immediate){callbacks.modify=this.measureImmediate;}
+this.callbacks=OpenLayers.Util.extend(callbacks,this.callbacks);this.handlerOptions=OpenLayers.Util.extend({persist:this.persist},this.handlerOptions);this.handler=new handler(this,this.callbacks,this.handlerOptions);},deactivate:function(){this.cancelDelay();return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},cancel:function(){this.cancelDelay();this.handler.cancel();},setImmediate:function(immediate){this.immediate=immediate;if(this.immediate){this.callbacks.modify=this.measureImmediate;}else{delete this.callbacks.modify;}},updateHandler:function(handler,options){var active=this.active;if(active){this.deactivate();}
+this.handler=new handler(this,this.callbacks,options);if(active){this.activate();}},measureComplete:function(geometry){this.cancelDelay();this.measure(geometry,"measure");},measurePartial:function(point,geometry){this.cancelDelay();geometry=geometry.clone();if(this.handler.freehandMode(this.handler.evt)){this.measure(geometry,"measurepartial");}else{this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.delayedTrigger=null;this.measure(geometry,"measurepartial");},this),this.partialDelay);}},measureImmediate:function(point,feature,drawing){if(drawing&&!this.handler.freehandMode(this.handler.evt)){this.cancelDelay();this.measure(feature.geometry,"measurepartial");}},cancelDelay:function(){if(this.delayedTrigger!==null){window.clearTimeout(this.delayedTrigger);this.delayedTrigger=null;}},measure:function(geometry,eventType){var stat,order;if(geometry.CLASS_NAME.indexOf('LineString')>-1){stat=this.getBestLength(geometry);order=1;}else{stat=this.getBestAr
ea(geometry);order=2;}
+this.events.triggerEvent(eventType,{measure:stat[0],units:stat[1],order:order,geometry:geometry});},getBestArea:function(geometry){var units=this.displaySystemUnits[this.displaySystem];var unit,area;for(var i=0,len=units.length;i<len;++i){unit=units[i];area=this.getArea(geometry,unit);if(area>1){break;}}
+return[area,unit];},getArea:function(geometry,units){var area,geomUnits;if(this.geodesic){area=geometry.getGeodesicArea(this.map.getProjectionObject());geomUnits="m";}else{area=geometry.getArea();geomUnits=this.map.getUnits();}
+var inPerDisplayUnit=OpenLayers.INCHES_PER_UNIT[units];if(inPerDisplayUnit){var inPerMapUnit=OpenLayers.INCHES_PER_UNIT[geomUnits];area*=Math.pow((inPerMapUnit/inPerDisplayUnit),2);}
+return area;},getBestLength:function(geometry){var units=this.displaySystemUnits[this.displaySystem];var unit,length;for(var i=0,len=units.length;i<len;++i){unit=units[i];length=this.getLength(geometry,unit);if(length>1){break;}}
+return[length,unit];},getLength:function(geometry,units){var length,geomUnits;if(this.geodesic){length=geometry.getGeodesicLength(this.map.getProjectionObject());geomUnits="m";}else{length=geometry.getLength();geomUnits=this.map.getUnits();}
+var inPerDisplayUnit=OpenLayers.INCHES_PER_UNIT[units];if(inPerDisplayUnit){var inPerMapUnit=OpenLayers.INCHES_PER_UNIT[geomUnits];length*=(inPerMapUnit/inPerDisplayUnit);}
+return length;},CLASS_NAME:"OpenLayers.Control.Measure"});OpenLayers.Layer.WMTS=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,version:"1.0.0",requestEncoding:"KVP",url:null,layer:null,matrixSet:null,style:null,format:"image/jpeg",tileOrigin:null,tileFullExtent:null,formatSuffix:null,matrixIds:null,dimensions:null,params:null,zoomOffset:0,serverResolutions:null,formatSuffixMap:{"image/png":"png","image/png8":"png","image/png24":"png","image/png32":"png","png":"png","image/jpeg":"jpg","image/jpg":"jpg","jpeg":"jpg","jpg":"jpg"},matrix:null,initialize:function(config){var required={url:true,layer:true,style:true,matrixSet:true};for(var prop in required){if(!(prop in config)){throw new Error("Missing property '"+prop+"' in layer configuration.");}}
+config.params=OpenLayers.Util.upperCaseObject(config.params);var args=[config.name,config.url,config.params,config];OpenLayers.Layer.Grid.prototype.initialize.apply(this,args);if(!this.formatSuffix){this.formatSuffix=this.formatSuffixMap[this.format]||this.format.split("/").pop();}
+if(this.matrixIds){var len=this.matrixIds.length;if(len&&typeof this.matrixIds[0]==="string"){var ids=this.matrixIds;this.matrixIds=new Array(len);for(var i=0;i<len;++i){this.matrixIds[i]={identifier:ids[i]};}}}},setMap:function(){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);this.updateMatrixProperties();},updateMatrixProperties:function(){this.matrix=this.getMatrix();if(this.matrix){if(this.matrix.topLeftCorner){this.tileOrigin=this.matrix.topLeftCorner;}
+if(this.matrix.tileWidth&&this.matrix.tileHeight){this.tileSize=new OpenLayers.Size(this.matrix.tileWidth,this.matrix.tileHeight);}
+if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.top);}
+if(!this.tileFullExtent){this.tileFullExtent=this.maxExtent;}}},moveTo:function(bounds,zoomChanged,dragging){if(zoomChanged||!this.matrix){this.updateMatrixProperties();}
+return OpenLayers.Layer.Grid.prototype.moveTo.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMTS(this.options);}
+obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getIdentifier:function(){return this.getServerZoom();},getMatrix:function(){var matrix;if(!this.matrixIds||this.matrixIds.length===0){matrix={identifier:this.getIdentifier()};}else{if("scaleDenominator"in this.matrixIds[0]){var denom=OpenLayers.METERS_PER_INCH*OpenLayers.INCHES_PER_UNIT[this.units]*this.getServerResolution()/0.28E-3;var diff=Number.POSITIVE_INFINITY;var delta;for(var i=0,ii=this.matrixIds.length;i<ii;++i){delta=Math.abs(1-(this.matrixIds[i].scaleDenominator/denom));if(delta<diff){diff=delta;matrix=this.matrixIds[i];}}}else{matrix=this.matrixIds[this.getIdentifier()];}}
+return matrix;},getTileInfo:function(loc){var res=this.getServerResolution();var fx=(loc.lon-this.tileOrigin.lon)/(res*this.tileSize.w);var fy=(this.tileOrigin.lat-loc.lat)/(res*this.tileSize.h);var col=Math.floor(fx);var row=Math.floor(fy);return{col:col,row:row,i:Math.floor((fx-col)*this.tileSize.w),j:Math.floor((fy-row)*this.tileSize.h)};},getURL:function(bounds){bounds=this.adjustBounds(bounds);var url="";if(!this.tileFullExtent||this.tileFullExtent.intersectsBounds(bounds)){var center=bounds.getCenterLonLat();var info=this.getTileInfo(center);var matrixId=this.matrix.identifier;var dimensions=this.dimensions,params;if(this.requestEncoding.toUpperCase()==="REST"){params=this.params;if(typeof this.url==="string"&&this.url.indexOf("{")!==-1){var template=this.url.replace(/\{/g,"${");var context={style:this.style,Style:this.style,TileMatrixSet:this.matrixSet,TileMatrix:this.matrix.identifier,TileRow:info.row,TileCol:info.col};if(dimensions){var dimension,i;for(i=dimensions.
length-1;i>=0;--i){dimension=dimensions[i];context[dimension]=params[dimension.toUpperCase()];}}
+url=OpenLayers.String.format(template,context);}else{var path=this.version+"/"+this.layer+"/"+this.style+"/";if(dimensions){for(var i=0;i<dimensions.length;i++){if(params[dimensions[i]]){path=path+params[dimensions[i]]+"/";}}}
+path=path+this.matrixSet+"/"+this.matrix.identifier+"/"+info.row+"/"+info.col+"."+this.formatSuffix;if(OpenLayers.Util.isArray(this.url)){url=this.selectUrl(path,this.url);}else{url=this.url;}
+if(!url.match(/\/$/)){url=url+"/";}
+url=url+path;}}else if(this.requestEncoding.toUpperCase()==="KVP"){params={SERVICE:"WMTS",REQUEST:"GetTile",VERSION:this.version,LAYER:this.layer,STYLE:this.style,TILEMATRIXSET:this.matrixSet,TILEMATRIX:this.matrix.identifier,TILEROW:info.row,TILECOL:info.col,FORMAT:this.format};url=OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,[params]);}}
+return url;},mergeNewParams:function(newParams){if(this.requestEncoding.toUpperCase()==="KVP"){return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,[OpenLayers.Util.upperCaseObject(newParams)]);}},CLASS_NAME:"OpenLayers.Layer.WMTS"});
\ No newline at end of file
Added: trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,11 @@
+<?php
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
+$js = "";
+for ($i==0; count($layer);$i++) {
+ $js .= layer[$i];
+}
+//header - javascript
+
+echo $js;
+?>
Added: trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.js~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.js~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.js~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,9 @@
+<?php
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
+$js = "";
+for ($i==0; count($layer);$i++) {
+ $js .= layer[$i];
+}
+echo $js;
+?>
Added: trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.php (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,12 @@
+<?php
+//Basic configuration of mapserver client
+//require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
+echo "test";
+//$js = "";
+/*for ($i = 0; $i < count($layer); $i++) {
+ $js .= $layer[$i];
+}*/
+//header - javascript
+
+//echo $js;
+?>
Added: trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.php~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.php~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/backgroundlayer.php~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,12 @@
+<?php
+//Basic configuration of mapserver client
+//require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
+echo "test";
+$js = "";
+/*for ($i = 0; $i < count($layer); $i++) {
+ $js .= $layer[$i];
+}*/
+//header - javascript
+
+echo $js;
+?>
Added: trunk/mapbender/http/extensions/mobilemap/js/dev/1_ngms_olextent.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/dev/1_ngms_olextent.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/dev/1_ngms_olextent.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,387 @@
+/* ++++++++++++++++++++++++++++++++++++++++++ Openlayers Extension +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+//Erweiterung OpenLayers - angepasster Click Event
+OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ //'double': true,
+ 'pixelTolerance': 0,
+ //'stopDouble': false,
+ 'stopSingle': false
+ },
+
+ initialize: function(options) {
+ var opts = options || {};
+ this.handlerOptions = OpenLayers.Util.applyDefaults(
+ opts.handlerOptions || {},
+ this.defaultHandlerOptions
+ );
+ OpenLayers.Control.prototype.initialize.apply(
+ this,
+ arguments
+ );
+ this.handler = new OpenLayers.Handler.Click(
+ this,
+ {
+ 'click': this.onClick
+ //'dblclick': this.onDblClick
+ },
+ this.handlerOptions
+ );
+ },
+
+ onClick: function( evt ) {
+ // click funcktion
+ var lonlat = map.getLonLatFromViewPortPx(evt.xy);
+ var querylayer = $('#queryselect').val();
+ var actuallang = $('#select-lang').val();
+ //Punkt erzeugen
+ var geompoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ var geompoint1 = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(
+ geompoint,
+ {},
+ olSearchSymbol
+ ),
+ new OpenLayers.Feature.Vector(
+ geompoint1,
+ {},
+ olFeaturequerySymbol
+ )
+ ]);
+
+ //Default Koordinatenabfrage / Rasterquery
+ if(querylayer == "dhm"){
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+ var featureurl = 'query/rasterquery.php?'
+ + 'coord=' + lonlat.lon + ', ' + lonlat.lat
+ + '&lang=' + actuallang;
+ loadFeature(featureurl);
+ //alert("Um eine Ebene abzufragen selektieren Sie bitte unter Abfrage --> Abfrageebene w\u00e4hlen die gew\u00fcnschte Ebenen aus!");
+ }
+ else if(querylayer == "pois"){
+ var activepoilayer = poilayer.params.LAYERS;
+ var featureurl = 'query/poiquery.php?'
+ + 'qx=' + lonlat.lon + '&qy=' + lonlat.lat
+ + '&qlayer=' + activepoilayer
+ + '&qextent=' + map.getExtent().toBBOX()
+ + '&qsize=' + map.size.w + ' ' + map.size.h
+ + '&lang=' + actuallang;
+ loadFeature(featureurl);
+ }
+ else{
+ //Get Feature Query
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+ var featureurl = 'query/proxy.php?wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1'
+ + '&mapfile='+ querylayer
+ + '&layers=' + querylayer + '&QUERY_LAYERS=' + querylayer
+ + '&SRS=' + featurequerySrc
+ + '&BBOX=' + map.getExtent().toBBOX()
+ + '&WIDTH=' + map.size.w + '&HEIGHT=' + map.size.h
+ + '&X=' + evt.xy.x + '&Y=' + evt.xy.y
+ + '&INFO_FORMAT=text/html';
+ //alert('Klick auf Koordinate: ' + lonlat.lon + ', ' + lonlat.lat);
+ loadFeature(featureurl);
+ //alert(featureurl);
+ }
+ },
+
+ /*
+ onDblClick: function( evt ) {
+ doubleClick funcktion
+ var lonlat = map.getLonLatFromViewPortPx(evt.xy);
+ //alert('Doppelklick auf Koordinate: ' + lonlat.lon + ', ' + lonlat.lat);
+ },
+ */
+
+ //Abfrageebene darstellen
+ showQuerylayer: function(){
+ var querylayer = $('#queryselect').val();
+ if(querylayer == "dhm"){
+ setMarkerhint(window.lang.convert('Standardabfrage:'),window.lang.convert('Koordinaten + Hoehe'));
+ }
+ else{
+ setMarkerhint(window.lang.convert('aktuelle Abfrageebene:'), querylayer);
+ }
+ },
+
+ CLASS_NAME: "OpenLayers.Control.Click"
+ }
+);
+
+//Abfrageebene darstellen
+function showQuerylayer(){
+ var querylayer = $('#queryselect').val();
+ if(querylayer == "dhm"){
+ setMarkerhint(window.lang.convert('Standardabfrage:'),window.lang.convert('Koordinaten + Hoehe'));
+ }
+ else{
+ setMarkerhint(window.lang.convert('aktuelle Abfrageebene:'), querylayer);
+ }
+}
+
+//Ajax Aufruf
+function loadFeature(myurl){
+ //showLoader();
+ $.ajax({
+ type: 'GET',
+ url: myurl,
+ //data: {layers:mylayers,imgsize:myimgsize},
+ success: function(ergebnis){
+ if(ergebnis){
+ if(ergebnis.length < 5){
+ ergebnis = window.lang.convert('Kein Ergebnis!');
+ }
+ setMarkerhint(window.lang.convert('Abfrageergebnis:'),ergebnis);
+ }
+ }
+ });
+}
+
+//Erweiterung OpenLayers - Sclaeline vgl. ScaleLine.js
+OpenLayers.Control.ScaleLine = OpenLayers.Class(OpenLayers.Control, {
+ maxWidth: 100,
+ topOutUnits: "km",
+ topInUnits: "m",
+ bottomOutUnits: "mi",
+ bottomInUnits: "ft",
+ eTop: null,
+ eBottom:null,
+ geodesic: false,
+ draw: function() {
+ OpenLayers.Control.prototype.draw.apply(this, arguments);
+ if (!this.eTop) {
+ // stick in the top bar
+ this.eTop = document.createElement("div");
+ this.eTop.className = this.displayClass + "Top";
+ var theLen = this.topInUnits.length;
+ this.div.appendChild(this.eTop);
+ if((this.topOutUnits == "") || (this.topInUnits == "")) {
+ this.eTop.style.visibility = "hidden";
+ } else {
+ this.eTop.style.visibility = "visible";
+ }
+
+ // and the bottom bar
+ this.eBottom = document.createElement("div");
+ this.eBottom.className = this.displayClass + "Bottom";
+ this.div.appendChild(this.eBottom);
+ if((this.bottomOutUnits == "") || (this.bottomInUnits == "")) {
+ this.eBottom.style.visibility = "hidden";
+ } else {
+ this.eBottom.style.visibility = "visible";
+ }
+ }
+ this.map.events.register('moveend', this, this.update);
+ this.update();
+ return this.div;
+ },
+
+ getBarLen: function(maxLen) {
+ // nearest power of 10 lower than maxLen
+ var digits = parseInt(Math.log(maxLen) / Math.log(10));
+ var pow10 = Math.pow(10, digits);
+
+ // ok, find first character
+ var firstChar = parseInt(maxLen / pow10);
+
+ // right, put it into the correct bracket
+ var barLen;
+ if(firstChar > 5) {
+ barLen = 5;
+ } else if(firstChar > 2) {
+ barLen = 2;
+ } else {
+ barLen = 1;
+ }
+
+ // scale it up the correct power of 10
+ return barLen * pow10;
+ },
+
+ update: function() {
+ var res = this.map.getResolution();
+ if (!res) {
+ return;
+ }
+
+ var curMapUnits = this.map.getUnits();
+ var inches = OpenLayers.INCHES_PER_UNIT;
+
+ // convert maxWidth to map units
+ var maxSizeData = this.maxWidth * res * inches[curMapUnits];
+ var geodesicRatio = 1;
+ if(this.geodesic === true) {
+ var maxSizeGeodesic = (this.map.getGeodesicPixelSize().w ||
+ 0.000001) * this.maxWidth;
+ var maxSizeKilometers = maxSizeData / inches["km"];
+ geodesicRatio = maxSizeGeodesic / maxSizeKilometers;
+ maxSizeData *= geodesicRatio;
+ }
+
+ // decide whether to use large or small scale units
+ var topUnits;
+ var bottomUnits;
+ if(maxSizeData > 100000) {
+ topUnits = this.topOutUnits;
+ bottomUnits = this.bottomOutUnits;
+ } else {
+ topUnits = this.topInUnits;
+ bottomUnits = this.bottomInUnits;
+ }
+
+ // and to map units units
+ var topMax = maxSizeData / inches[topUnits];
+ var bottomMax = maxSizeData / inches[bottomUnits];
+
+ // now trim this down to useful block length
+ var topRounded = this.getBarLen(topMax);
+ var bottomRounded = this.getBarLen(bottomMax);
+
+ // and back to display units
+ topMax = topRounded / inches[curMapUnits] * inches[topUnits];
+ bottomMax = bottomRounded / inches[curMapUnits] * inches[bottomUnits];
+
+ // and to pixel units
+ var topPx = topMax / res / geodesicRatio;
+ var bottomPx = bottomMax / res / geodesicRatio;
+
+ // now set the pixel widths
+ // and the values inside them
+
+ if (this.eBottom.style.visibility == "visible"){
+ this.eBottom.style.width = Math.round(bottomPx) + "px";
+ //this.eBottom.innerHTML = bottomRounded + " " + bottomUnits ;
+ }
+
+ if (this.eTop.style.visibility == "visible"){
+ this.eTop.style.width = Math.round(topPx) + "px";
+ this.eTop.innerHTML = topRounded + " " + topUnits;
+ }
+
+ },
+
+ CLASS_NAME: "OpenLayers.Control.ScaleLine"
+});
+
+//Openlayers Loading Control
+OpenLayers.Control.LoadingPanel = OpenLayers.Class(OpenLayers.Control, {
+
+ counter: 0,
+
+ maximized: false,
+
+ visible: true,
+
+ initialize: function(options) {
+ OpenLayers.Control.prototype.initialize.apply(this, [options]);
+ },
+
+ setVisible: function(visible) {
+ this.visible = visible;
+ if (visible) {
+ OpenLayers.Element.show(this.div);
+ } else {
+ OpenLayers.Element.hide(this.div);
+ }
+ },
+
+ getVisible: function() {
+ return this.visible;
+ },
+
+
+ hide: function() {
+ this.setVisible(false);
+ },
+
+
+ show: function() {
+ this.setVisible(true);
+ },
+
+ toggle: function() {
+ this.setVisible(!this.getVisible());
+ },
+
+ addLayer: function(evt) {
+ if (evt.layer) {
+ evt.layer.events.register('loadstart', this, this.increaseCounter);
+ evt.layer.events.register('loadend', this, this.decreaseCounter);
+ }
+ },
+
+ setMap: function(map) {
+ OpenLayers.Control.prototype.setMap.apply(this, arguments);
+ this.map.events.register('preaddlayer', this, this.addLayer);
+ for (var i = 0; i < this.map.layers.length; i++) {
+ var layer = this.map.layers[i];
+ layer.events.register('loadstart', this, this.increaseCounter);
+ layer.events.register('loadend', this, this.decreaseCounter);
+ }
+ },
+
+ increaseCounter: function() {
+ this.counter++;
+ if (this.counter > 0) {
+ if (!this.maximized && this.visible) {
+ this.maximizeControl();
+ }
+ }
+ },
+
+ decreaseCounter: function() {
+ if (this.counter > 0) {
+ this.counter--;
+ }
+ if (this.counter == 0) {
+ if (this.maximized && this.visible) {
+ this.minimizeControl();
+ }
+ }
+ },
+
+ draw: function () {
+ OpenLayers.Control.prototype.draw.apply(this, arguments);
+ return this.div;
+ },
+
+ minimizeControl: function(evt) {
+ this.div.style.display = "none";
+ this.maximized = false;
+
+ if (evt != null) {
+ OpenLayers.Event.stop(evt);
+ }
+ },
+
+ maximizeControl: function(evt) {
+ this.div.style.display = "block";
+ this.maximized = true;
+
+ if (evt != null) {
+ OpenLayers.Event.stop(evt);
+ }
+ },
+
+ destroy: function() {
+ if (this.map) {
+ this.map.events.unregister('preaddlayer', this, this.addLayer);
+ if (this.map.layers) {
+ for (var i = 0; i < this.map.layers.length; i++) {
+ var layer = this.map.layers[i];
+ layer.events.unregister('loadstart', this,
+ this.increaseCounter);
+ layer.events.unregister('loadend', this,
+ this.decreaseCounter);
+ }
+ }
+ }
+ OpenLayers.Control.prototype.destroy.apply(this, arguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Control.LoadingPanel"
+
+});
+
Added: trunk/mapbender/http/extensions/mobilemap/js/dev/2_ngms_global.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/dev/2_ngms_global.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/dev/2_ngms_global.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,88 @@
+// Global
+var map, clickCtrl, measureControls;
+//following contants are defined in conf file
+/*Proj4js.defs["EPSG:25832"] = "+proj=utm +zone=32 +ellps=GRS80 +units=m +datum=WGS84";
+Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
+var mapProj = new OpenLayers.Projection("EPSG:25832");
+var wgs84Proj = new OpenLayers.Projection("EPSG:4326");
+var mymapbounds = new OpenLayers.Bounds(293300,5424000,464300,5654100); //Rlp UTM 32
+var myzoombounds = "off"; //new OpenLayers.Bounds(3460280,5482455,3462440,5484561); //Anfangsausdehnung (deaktiv auf "off" setzen)
+var mymaxscale = 2000000;
+var myminscale = 500;
+var myzoomlevels = 16;
+var myscales = [2000000, 1500000, 1000000, 500000, 250000, 150000, 100000, 50000, 25000, 15000, 10000, 8000, 5000, 3000, 1000, 500]; //MaÃstäbe die dargestellt werden sollen
+var zoomSelect = true; //Soll Select aus myscales dargestellt werden? (true/false)
+var projUnits = 'm';
+var searchMode = 'mapbendersearch'; //Suchmodus (google/streetsearch/mapbendersearch)
+var mapbendersearchurl = 'query/searchproxy.php?resultTarget=web&outputFormat=json&searchEPSG='; //Url bzw. Proxy zur Mapbender Ortsuche
+var searchEPSG = '25832'; //EPSG Anfrage für Mapbender-Suche
+var searchZoom = 12; //Zoomlevel in der Karte
+var defaultHand = "r"; //Anfangs Händigkeit (r/l)
+var googleGeocodeAdmin = "Rheinland-Pfalz"; //Administrative Einheit in der eine Meldung kommen soll falls geocodierter Punkt auÃerhalb liegt
+var directLayerChange = "on"; //Wechsel aus Layersteuerung direkt bei Klick auf Ebene (on/off)
+var pageTransition = {transition: "fade"}; //Objekt, Seitenübergänge (vgl. jQuerymobile, z.B. fade, pop, slide, none)
+var toolColor = "#871D33"; //Farbe der Toolumrandungen
+var featurequerySrc = "EPSG:25832"; //EPSG der FeatureQuery*/
+
+//Openlayers Objekte
+//OpenLayers Kombinations Symbole (Objekt) zur Markierung des Suchergebnis u. Abfragepunktes (Featurequery), mögliche Namen: "star", "cross", "x", "square", "triangle", "circle"
+var olSearchSymbol = { graphicName: 'cross',
+ strokeColor: '#00FFFF',
+ strokeWidth: 1,
+ fillOpacity: 0,
+ pointRadius: 11 };
+var olFeaturequerySymbol = {graphicName: 'circle',
+ strokeColor: '#00FFFF', //'#871D33',
+ fillColor: '#00FFFF',
+ strokeWidth: 3,
+ fillOpacity: 0.2,
+ pointRadius: 15,
+ graphicName: 'circle'};
+
+//OpenLayers Symbol (Objekt) GPS-Lokalisierung, mögliche Namen: "star", "cross", "x", "square", "triangle", "circle"
+var olGpsSymbol = { graphicName: 'cross',
+ strokeColor: '#871D33',
+ strokeWidth: 2,
+ fillOpacity: 0,
+ pointRadius: 12 };
+
+//OpenLayers Symbol (Objekt) zur Markierung der GPS-Kreisfarbe + Stil
+var olGpscircleStyle = { fillOpacity: 0.1,
+ fillColor: '#000',
+ strokeColor: '#871D33',
+ strokeOpacity: 0.6 };
+
+// default style für Zeichnungen
+var sketchSymbolizers = {
+ "Point": {
+ pointRadius: 6,
+ graphicName: "square",
+ fillColor: "white",
+ fillOpacity: 1,
+ strokeWidth: 2,
+ strokeOpacity: 0.8,
+ strokeColor: "#00FFFF"
+ },
+ "Line": {
+ strokeWidth: 3,
+ strokeOpacity: 1,
+ //strokeDashstyle: "dash",
+ strokeColor: "#FF0000"
+
+ },
+ "Polygon": {
+ strokeWidth: 3,
+ strokeOpacity: 1,
+ strokeColor: "#FF0000",
+ fillColor: "white",
+ fillOpacity: 0.5
+ }
+};
+
+//default Style für Zeich- / Messfunktion)
+var style = new OpenLayers.Style();
+style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+]);
+var styleMap = new OpenLayers.StyleMap({"default": style});
+
Added: trunk/mapbender/http/extensions/mobilemap/js/dev/2_ngms_global.js~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/dev/2_ngms_global.js~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/dev/2_ngms_global.js~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,87 @@
+// Global
+var map, clickCtrl, measureControls;
+Proj4js.defs["EPSG:25832"] = "+proj=utm +zone=32 +ellps=GRS80 +units=m +datum=WGS84";
+Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
+var mapProj = new OpenLayers.Projection("EPSG:25832");
+var wgs84Proj = new OpenLayers.Projection("EPSG:4326");
+var mymapbounds = new OpenLayers.Bounds(293300,5424000,464300,5654100); //Rlp UTM 32
+var myzoombounds = "off"; //new OpenLayers.Bounds(3460280,5482455,3462440,5484561); //Anfangsausdehnung (deaktiv auf "off" setzen)
+var mymaxscale = 2000000;
+var myminscale = 500;
+var myzoomlevels = 16;
+var myscales = [2000000, 1500000, 1000000, 500000, 250000, 150000, 100000, 50000, 25000, 15000, 10000, 8000, 5000, 3000, 1000, 500]; //MaÃstäbe die dargestellt werden sollen
+var zoomSelect = true; //Soll Select aus myscales dargestellt werden? (true/false)
+var projUnits = 'm';
+var searchMode = 'mapbendersearch'; //Suchmodus (google/streetsearch/mapbendersearch)
+var mapbendersearchurl = 'query/searchproxy.php?resultTarget=web&outputFormat=json&searchEPSG='; //Url bzw. Proxy zur Mapbender Ortsuche
+var searchEPSG = '25832'; //EPSG Anfrage für Mapbender-Suche
+var searchZoom = 12; //Zoomlevel in der Karte
+var defaultHand = "r"; //Anfangs Händigkeit (r/l)
+var googleGeocodeAdmin = "Rheinland-Pfalz"; //Administrative Einheit in der eine Meldung kommen soll falls geocodierter Punkt auÃerhalb liegt
+var directLayerChange = "on"; //Wechsel aus Layersteuerung direkt bei Klick auf Ebene (on/off)
+var pageTransition = {transition: "fade"}; //Objekt, Seitenübergänge (vgl. jQuerymobile, z.B. fade, pop, slide, none)
+var toolColor = "#871D33"; //Farbe der Toolumrandungen
+var featurequerySrc = "EPSG:25832"; //EPSG der FeatureQuery
+
+//Openlayers Objekte
+//OpenLayers Kombinations Symbole (Objekt) zur Markierung des Suchergebnis u. Abfragepunktes (Featurequery), mögliche Namen: "star", "cross", "x", "square", "triangle", "circle"
+var olSearchSymbol = { graphicName: 'cross',
+ strokeColor: '#00FFFF',
+ strokeWidth: 1,
+ fillOpacity: 0,
+ pointRadius: 11 };
+var olFeaturequerySymbol = {graphicName: 'circle',
+ strokeColor: '#00FFFF', //'#871D33',
+ fillColor: '#00FFFF',
+ strokeWidth: 3,
+ fillOpacity: 0.2,
+ pointRadius: 15,
+ graphicName: 'circle'};
+
+//OpenLayers Symbol (Objekt) GPS-Lokalisierung, mögliche Namen: "star", "cross", "x", "square", "triangle", "circle"
+var olGpsSymbol = { graphicName: 'cross',
+ strokeColor: '#871D33',
+ strokeWidth: 2,
+ fillOpacity: 0,
+ pointRadius: 12 };
+
+//OpenLayers Symbol (Objekt) zur Markierung der GPS-Kreisfarbe + Stil
+var olGpscircleStyle = { fillOpacity: 0.1,
+ fillColor: '#000',
+ strokeColor: '#871D33',
+ strokeOpacity: 0.6 };
+
+// default style für Zeichnungen
+var sketchSymbolizers = {
+ "Point": {
+ pointRadius: 6,
+ graphicName: "square",
+ fillColor: "white",
+ fillOpacity: 1,
+ strokeWidth: 2,
+ strokeOpacity: 0.8,
+ strokeColor: "#00FFFF"
+ },
+ "Line": {
+ strokeWidth: 3,
+ strokeOpacity: 1,
+ //strokeDashstyle: "dash",
+ strokeColor: "#FF0000"
+
+ },
+ "Polygon": {
+ strokeWidth: 3,
+ strokeOpacity: 1,
+ strokeColor: "#FF0000",
+ fillColor: "white",
+ fillOpacity: 0.5
+ }
+};
+
+//default Style für Zeich- / Messfunktion)
+var style = new OpenLayers.Style();
+style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+]);
+var styleMap = new OpenLayers.StyleMap({"default": style});
+
Added: trunk/mapbender/http/extensions/mobilemap/js/dev/3_ngms_layer.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/dev/3_ngms_layer.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/dev/3_ngms_layer.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,97 @@
+//Vektorlayer
+var vector_marker = new OpenLayers.Layer.Vector("Vector Layer", {});
+
+//Baselayer
+var atkis_praes_tms = new OpenLayers.Layer.TMS( "atkis_praes_tms",
+ "http://www.gdi-rp-dienste2.rlp.de/mapcache/tms/",
+ {
+ layername: 'test at UTM32',
+ type: "jpg",
+ serviceVersion:"1.0.0",
+ gutter:0,
+ buffer:0,
+ isBaseLayer:true,
+ transitionEffect:'resize',
+ resolutions:[529.16666666670005270134,396.87500000000000000000,264.58333333330000414207,132.29166666669999585793,66.14583333330000414207,39.68750000000000000000,26.45833333330000058936,13.22916666669999941064,6.61458333329999970118,3.96875000000000000000,2.64583333330000014527,2.11666666670000003236,1.32291666670000007677,0.79375000000000000000,0.26458333330000001204,0.13229166670000001016],
+ units: projUnits,
+ projection: mapProj,
+ sphericalMercator: false
+ }
+ );
+
+var luftbilder = new OpenLayers.Layer.WMS( "luftbilder",
+ "http://geo4.service24.rlp.de/wms/dop40_geo4.fcgi?",
+ {
+ layers: "dop",
+ format: "image/jpeg",
+ transparent: "false",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: false,
+ alwaysInRange: true,
+ 'isBaseLayer': true
+} );
+
+var grenze_leer = new OpenLayers.Layer.WMS( "grenze_leer",
+ "http://map1.naturschutz.rlp.de/service_basis/mod_wms/wms_getmap.php?mapfile=tk_rlp_gesamt&",
+ {
+ layers: "grenzen_land",
+ format: "image/jpeg",
+ transparent: "false",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: true,
+ alwaysInRange: true,
+ 'isBaseLayer': true
+} );
+
+
+//Overlays (Test)
+
+var likar = new OpenLayers.Layer.WMS( "likar",
+ "http://geo4.service24.rlp.de/wms/lika_basis.fcgi?",
+ {
+ layers: "likar:likar",
+ format: "image/png",
+ transparent: "TRUE",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: true,
+ //minScale: 0.1,
+ //maxScale: 8000,
+ 'isBaseLayer': false,
+ visibility: false,
+ alwaysInRange: true
+} );
+
+var naturschutzgebiet = new OpenLayers.Layer.WMS( "naturschutzgebiet", //3
+ "http://map1.naturschutz.rlp.de/service_lanis/mod_wms/wms_getmap.php?mapfile=naturschutzgebiet&",
+ {
+ layers: "naturschutzgebiet",
+ format: "image/png",
+ transparent: "TRUE",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ opacity: 0.6,
+ singleTile: true,
+ 'isBaseLayer': false,
+ visibility: false,
+ alwaysInRange: true
+} );
+
+//Layer hinzufügen
+function addmyLayer(){//Layer hinzufügen
+ map.addLayers([atkis_praes_tms, luftbilder, grenze_leer, likar, naturschutzgebiet, vector_marker]);
+}
Added: trunk/mapbender/http/extensions/mobilemap/js/dev/4_ngms_base.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/dev/4_ngms_base.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/dev/4_ngms_base.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,138 @@
+/* ++++++++++++++++++++++++++++++++++++++++++ Openlayers Base +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+// initialize map when page ready
+var initmap = function () {
+ var mapOptions = {
+ theme: null,
+ projection: mapProj,
+ units: projUnits,
+ //'tileSize': new OpenLayers.Size(320,320),
+ maxExtent: mymapbounds,
+ maxScale: mymaxscale,
+ minScale: myminscale,
+ numZoomLevels: myzoomlevels,
+ scales: myscales,
+ controls: [
+ new OpenLayers.Control.Attribution(),
+ new OpenLayers.Control.Navigation({zoomWheelEnabled: true}),
+ new OpenLayers.Control.KeyboardDefaults(),
+ new OpenLayers.Control.TouchNavigation({
+ dragPanOptions: {
+ interval: 10,
+ enableKinetic: true
+ }
+ }),
+ new OpenLayers.Control.ScaleLine({
+ div: document.getElementById("scaleline"),geodesic:false,maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null
+ }),
+ new OpenLayers.Control.LoadingPanel({})
+ ]
+ }
+
+ //Map erzeugen
+ map = new OpenLayers.Map('map',mapOptions);
+ //Layer hinzufügen
+ addmyLayer();
+
+ //Auf Extent zoomen
+ //
+ if (myzoombounds !== "off") {
+ map.zoomToExtent(myzoombounds);
+ }
+ else {
+ map.zoomToExtent(map.maxExtent);
+ }
+
+ //map.zoomToMaxExtent();
+ //map.setCenter(new OpenLayers.LonLat(739108, 6403856),10);
+
+ var geolocate = new OpenLayers.Control.Geolocate({
+ id: 'locate-control',
+ geolocationOptions: {
+ enableHighAccuracy: true,
+ maximumAge: 0,
+ timeout: 7000
+ }
+ });
+ map.addControl(geolocate);
+
+
+ geolocate.events.register("locationupdated", this, function(e) {
+
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(
+ e.point,
+ {},
+ olGpsSymbol
+ ),
+ new OpenLayers.Feature.Vector(
+ OpenLayers.Geometry.Polygon.createRegularPolygon(
+ new OpenLayers.Geometry.Point(e.point.x, e.point.y),
+ e.position.coords.accuracy / 2,
+ 50,
+ 0
+ ),
+ {},
+ olGpscircleStyle
+ )
+ ]);
+ /*
+ console.log(e.point.x + " - " + e.point.y);
+ console.log(map.maxExtent.top);
+ console.log(map.maxExtent.bottom);
+ console.log(map.maxExtent.left);
+ console.log(map.maxExtent.right);
+ */
+ //Wenn Standoert innerhalb Maxextent
+ if(e.point.x > map.maxExtent.left && e.point.x < map.maxExtent.right && e.point.y > map.maxExtent.bottom && e.point.y < map.maxExtent.top){
+ setMarkerhint(window.lang.convert('Positionsgenauigkeit:'),'~ ' + e.position.coords.accuracy + ' Meter');
+ map.zoomToExtent(vector_marker.getDataExtent());
+ }
+ else{
+ alert(window.lang.convert('Die ermittelte Position liegt auÃerhalb des darstellbaren Kartenausschnitts!'));
+ $('#markerhint').css('visibility','hidden');
+ }
+ });
+
+ //default Style für Zeich- / Messfunktion)
+ var style = new OpenLayers.Style();
+ style.addRules([
+ new OpenLayers.Rule({symbolizer: sketchSymbolizers})
+ ]);
+ var styleMap = new OpenLayers.StyleMap({"default": style});
+
+ //Messcontrol
+ measureControls = {
+ line: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Path, {
+ persist: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ }
+ }
+ ),
+ polygon: new OpenLayers.Control.Measure(
+ OpenLayers.Handler.Polygon, {
+ persist: true,
+ handlerOptions: {
+ layerOptions: {
+ styleMap: styleMap
+ }
+ }
+ }
+ )
+ };
+
+ var control;
+ for(var key in measureControls) {
+ control = measureControls[key];
+ control.events.on({
+ "measure": handleMeasurements,
+ "measurepartial": handleMeasurements
+ });
+ map.addControl(control);
+ }
+
+};
Added: trunk/mapbender/http/extensions/mobilemap/js/dev/5_ngms_jq.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/dev/5_ngms_jq.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/dev/5_ngms_jq.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,724 @@
+/* ++++++++++++++++++++++++++++++++++++++++++ Openlayers JQuery +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+
+//Initialisierung
+$(document).ready(function() {
+
+
+ // Start with the map page
+ if (window.location.hash && window.location.hash!='#mappage') {
+ $.mobile.changePage($("#mappage"),pageTransition);
+ }
+
+ //Openlayers Initialisierung (ngms_base.js)
+ initmap();
+
+ //Soll Zoomselector dargestellt werden?
+ if(zoomSelect){
+ $("#zoomscale").css('visibility','visible');
+ //Selectmenue aus Array erzeugen
+ createZoomselect();
+ //Scalelevel anzeigen
+ map.events.register("moveend", null, displayZoom);
+ }
+
+
+ //neuer OpenLayers Control für Featureinfo
+ clickCtrl = new OpenLayers.Control.Click();
+ map.addControl( clickCtrl );
+ clickCtrl.activate();
+
+ //Aktivierte Layer Checken
+ checkLayers();
+
+ //Events den einzelnen Werkzeugen zuweisen
+
+ //Automatisches Wechseln der Ebenen
+ $("#autolayerchange").change(function(){
+ directLayerChange = this.value;
+ });
+
+ //Menü Buttons
+ $("#layerbut").click(function(){
+ $.mobile.changePage($("#layerpage"),pageTransition);
+ });
+
+ $("#searchbut").click(function(){
+ $.mobile.changePage($("#searchpage"),pageTransition);
+ });
+
+ $("#helpbut").click(function(){
+ $.mobile.changePage($("#helppage"),pageTransition);
+ });
+
+ $("#gearbut").click(function(){
+ $.mobile.changePage($("#gearpage"),pageTransition);
+ });
+
+ $("#measurelinebut").click(function(){
+ toggleMeasure('line');
+ });
+
+ $("#measurepolybut").click(function(){
+ toggleMeasure('polygon');
+ });
+
+ // Mapzoom Buttons
+ $("#ovbut").click(function(){
+ map.zoomToExtent(map.maxExtent);
+ });
+
+ $("#zoominbut").click(function(){
+ map.zoomIn();
+ });
+
+ $("#zoomoutbut").click(function(){
+ map.zoomOut();
+ });
+
+ //Popup für erweitertes Popup-Menü initialisieren und öffnen
+ $("#popupMenu").popup();
+
+ $("#menubut").click(function(){
+ $("#popupMenu").popup( "open" );
+ });
+
+ //Nachrichtenfenster schlieÃen
+ $("#xheader").click(function(){
+ $('#markerhint').css('visibility','hidden');
+ vector_marker.removeAllFeatures();
+ });
+
+ //Nachrichtenfenster schlieÃen
+ $("#mheader").click(function(){
+ $('#measurehint').css('visibility','hidden');
+ toggleMeasure('off');
+ });
+
+ //Suchbutton
+ $('#searchformbut').click(function() {
+ searchCall();
+ });
+
+ //Suchfeld
+ $('#searchfield').live('keypress', function(e) {
+ if(e.keyCode === 13){
+ searchCall();
+ }
+ });
+
+ //zuück zur Karte-Button
+ $(".mapbackbut").click(function(){
+ $.mobile.changePage($("#mappage"),pageTransition);
+ $('body').css('overflow', 'hidden');
+ });
+
+ //Geolocation Aktivieren
+ $("#locatebut").click(function(){
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+ var control = map.getControlsBy("id", "locate-control")[0];
+ if (control.active) {
+ control.getCurrentLocation();
+ } else {
+ control.activate();
+ }
+ });
+
+
+ //Baselayer einstellen
+ $(".baselayer_check").click(function() {
+ //alle zurücksetzen
+ $(".baselayer_check").css("background-image","url(img/ico_basecheck.png)");
+ $(this).css("background-image","url(img/ico_basecheck_active.png)");
+
+ for (var i = 0; i < map.layers.length; i++) {
+ if($(this).attr("id") === map.layers[i].name){
+ map.setBaseLayer(map.layers[i]);
+ }
+ }
+
+ clearanimation();
+ checktranspage();
+ });
+
+ //Overlays einstellen
+ $(".layer_check").click(function() {
+ for (var i = 0; i < map.layers.length; i++) {
+ if($(this).attr("id") === map.layers[i].name){
+ var mylayerindex = i;
+ }
+ }
+ if(map.layers[mylayerindex].getVisibility()){
+ map.layers[mylayerindex].setVisibility(false);
+ $(this).css("background-image","url(img/ico_check.png)");
+ }
+ else{
+ map.layers[mylayerindex].setVisibility(true);
+ $(this).css("background-image","url(img/ico_check_active.png)");
+ }
+
+ clearanimation();
+ checktranspage();
+ });
+
+ //POI-Overlays einstellen
+ $(".poi_check").click(function() {
+ var activepoilayer = poilayer.params.LAYERS;
+ var activepoiarray = [];
+ //console.log("Vorher: " + activepoilayer);
+ if(activepoilayer != ""){
+ var activepoiarray = activepoilayer.split(',');
+ }
+ //wenn Layer schon im POI-Layer aktiv, Layer entfernen
+ if(jQuery.inArray($(this).attr("id"), activepoiarray) != -1){
+ for (var i = 0; i < activepoiarray.length; i++) {
+ if($(this).attr("id") === activepoiarray[i]){
+ activepoiarray.splice(i,1);
+ }
+ }
+ $(this).css("background-image","url(img/ico_check.png)");
+ }
+ //sonst hinzufügen
+ else{
+ activepoiarray.push($(this).attr("id"));
+ $(this).css("background-image","url(img/ico_check_active.png)");
+ }
+
+ activepoilayer = activepoiarray.join(',');
+ //console.log("Nacher: " + activepoilayer);
+ poilayer.mergeNewParams({'layers': activepoilayer});
+ //sichtbar machen, wenn mindestens 1 Layer aktiv
+ if(activepoiarray.length > 0){
+ poilayer.setVisibility(true);
+ }
+ poilayer.redraw();
+
+ clearanimation();
+ checktranspage();
+ });
+
+
+ //Query-Layersetzen
+ $(".query_check").click(function() {
+ //alle zurücksetzen
+ $(".query_check").css("background-image","url(img/ico_checkop.png)");
+ //angeklickten aktiv setzen
+ $(this).css("background-image","url(img/ico_checkop_active.png)");
+ var qstr = $(this).attr("id");
+ var qlayer = qstr.substring(0,qstr.length-6);
+ $('#queryselect').val(qlayer);
+ clearanimation();
+ });
+
+ //CSS Animationen Layersteuerung
+ $(".query_check").touchstart(function() {
+ $(this).css("background-color","#808080");
+ });
+
+ $(".layer_check").touchstart(function() {
+ $(this).css("background-color","#808080");
+ $(this).css("color","#FFFFFF");
+ });
+
+ $(".baselayer_check").touchstart(function() {
+ $(this).css("background-color","#808080");
+ $(this).css("color","#FFFFFF");
+ });
+
+ //CSS Animationen Navigationsbuttons
+ $(".navbuttons").touchstart(function() {
+ $(this).css("border","2px solid #808080");
+ });
+
+ $(".navbuttons").touchend(function() {
+ $(this).css("border","2px solid " + toolColor);
+ });
+
+ //Suchbutton
+ $('.searchbutton').live('touchstart', function(e) {
+ $(this).css("border","2px solid #808080");
+ });
+
+ //Links bzw. Rechtshänder einstellen
+ changeHand(defaultHand);
+
+ //direkter Layerwechsel einstellen
+ $("#autolayerchange").val(directLayerChange);
+
+ //Adressbar verstecken
+ hideAddressBar();
+
+});
+
+//Animationen der Buttons und Checkboxen zurücksetzen
+var clearanimation = function(){
+ $(".query_check").css("background-color","#808080");
+ $(".layer_check, .baselayer_check, .poi_check").css("background-color","#FFFFFF");
+ $(".layer_check, .baselayer_check, .poi_check").css("color","#000000");
+}
+
+//Direkter Wechsel zu Map von Layersteuerung
+var checktranspage = function(){
+ if(directLayerChange === "on"){
+ $.mobile.changePage($("#mappage"),pageTransition);
+ }
+}
+
+//Checken welche Layer an sind
+var checkLayers = function(){
+ //Baselayer prüfen + einstellen
+ $(".baselayer_check").each(function(){
+ for(var i=0;i<map.layers.length;i++){
+ if(map.layers[i].name === $(this).attr("id") && map.layers[i].visibility){
+ //console.log('Aktivierte Baselayer:' + $(this).attr("id"));
+ $(this).css("background-image","url(img/ico_basecheck_active.png)");
+ }
+ }
+ });
+
+ //Overlays einstellen
+ $(".layer_check").each(function(){
+ for(var i=0;i<map.layers.length;i++){
+ if(map.layers[i].name === $(this).attr("id") && map.layers[i].visibility){
+ //console.log('Aktivierte Overlaylayer:' + $(this).attr("id"));
+ $(this).css("background-image","url(img/ico_check_active.png)");
+ }
+ }
+ });
+
+ //POI-Overlays einstellen
+ $(".poi_check").each(function(){
+ var activepoilayer = poilayer.params.LAYERS;
+ var activepoiarray = [];
+ if(activepoilayer != ""){
+ var activepoiarray = activepoilayer.split(',');
+ }
+ //wenn Layer schon im POI-Layer aktiv, Layer entfernen
+ if(jQuery.inArray($(this).attr("id"), activepoiarray) != -1){
+ $(this).css("background-image","url(img/ico_check.png)");
+ }
+ });
+
+ /* */
+ //Querylayer einstellen
+ $(".query_check").each(function() {
+ var qstr = $(this).attr("id");
+ var qlayer = qstr.substring(0,qstr.length-6);
+ if(qlayer === $('#queryselect').val()){
+ //console.log('Aktivierte Querylayer:' + qlayer);
+ $(this).css("background-image","url(img/ico_checkop_active.png)");
+ }
+ });
+
+}
+
+//Aufruf der Suchfunktion je nach globaler Einstellung
+function searchCall(){
+ if(searchMode ==='google'){
+ codeAddress();
+ }
+ else if (searchMode ==='streetsearch'){
+ searchStreet($('#searchfield').val());
+ }
+ else if (searchMode ==='mapbendersearch'){
+ searchMapbender($('#searchfield').val());
+ }
+ else{
+ alert('kein Suchmodus konfiguriert!');
+ }
+}
+
+//Markerhint sichtbar machen
+function setMarkerhint(xheader,xcontent){
+ $('#xheader').html(xheader);
+ $('#xcontent').html(xcontent);
+ $('#markerhint').css('visibility','visible');
+}
+
+//Adressleiste verbergen
+function hideAddressBar(){
+ if(!window.location.hash){
+ if(document.height <= window.outerHeight + 10){
+ document.body.style.height = (window.outerHeight + 50) +'px';
+ setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
+ }
+ else{
+ setTimeout( function(){ window.scrollTo(0, 1); }, 0 );
+ }
+ }
+}
+
+//Händigkeit ändern
+function changeHand(h){
+ //Linkshänder
+ if(h === "l"){
+ defaultHand = "l";
+ $("#scaleline, #copyright, #zoomscale").css("left","auto").css("right","4px");
+ $("#navbutgroup").css("right","auto").css("left","4px");
+ }
+ //Rechtshänder (default)
+ else{
+ defaultHand = "r";
+ $("#scaleline, #copyright, #zoomscale").css("right","auto").css("left","4px");
+ $("#navbutgroup").css("left","auto").css("right","4px");
+ }
+}
+
+//Sprache umstellen
+function changeLanguage(lang,refresh){
+ window.lang.change(lang);
+ $.mobile.showPageLoadingMsg();
+ $.ajax({
+ url: 'help/help_'+lang+'.html',
+ cache: true
+ }).done(function(data) {
+ $("#helpdiv").html(data);
+ $.mobile.hidePageLoadingMsg();
+ });
+ if(refresh){
+ $('#select-hand').selectmenu("refresh",true);
+ }
+ $('#select-lang').val(lang);
+}
+
+//#####Suchfunktionen###########################################################################
+//Geocoding via Google, Adresse Geocodieren
+function codeAddress() {
+ adressgeocoder = new google.maps.Geocoder();
+ var searchaddress = document.getElementById('searchfield').value;
+ adressgeocoder.geocode( { 'address': searchaddress}, function(results, status) {
+ if (status === google.maps.GeocoderStatus.OK) {
+ //console.log(results[0]);
+ //console.log("Anzahl Objekte:" + results[0].formatted_address);
+ var outofborder = "no";
+ for (i = 0; i < results[0].address_components.length; i++) {
+ //console.log("Objekte:" + results[0].address_components[i].long_name);
+ if(results[0].address_components[i].long_name === googleGeocodeAdmin){
+ outofborder = "ok";
+ }
+ }
+ if(outofborder != "ok"){
+ alert("Adresse liegt nicht in "+googleGeocodeAdmin+"!");
+ }
+ else{
+ var mysadr = results[0].formatted_address
+ var myslat = results[0].geometry.location.lat();
+ var myslng = results[0].geometry.location.lng();
+ //Anzeige in Google Maps
+ var mylatlng = new google.maps.LatLng(myslat, myslng);
+ var myOptions = {
+ zoom: 11,
+ center: mylatlng,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ }
+ var gmap = new google.maps.Map(document.getElementById("mygooglemap"), myOptions);
+ var marker = new google.maps.Marker({
+ map: gmap,
+ position: mylatlng
+ });
+
+ //Link generieren
+ var mygglink = window.lang.convert('Suchergebnis: ')+mysadr+' <br><div class="searchbutton" onClick="zoomtosearchpoint(\''+mysadr+'\','+myslng+','+myslat+')" >'+ window.lang.convert('Zoom auf Ergebnis in Karte') + '</div>';
+ //var mygglink = 'Suchergebnis in Google Maps: <a href="http://maps.google.de/maps?f=q&source=s_q&geocode=&q='+myslat+','+myslng+'&t=h&ie=UTF8&ll='+myslat+','+myslng+'&spn=0.009542,0.015407&z=16&iwloc=near" target="_blank"> '+mysadr+'</a>';
+ $('#mygooglelink').html(mygglink);
+
+ }
+ } else {
+ alert("Geocode nicht erfolgreich, Fehler: " + searchaddress + " " + status);
+ }
+ });
+}
+
+//Strassensuche aus Datenbank
+function searchStreet(item){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ var searchUrl = 'mod_streetsearch/street_full.php?lang=de';
+ searchUrl += '&searchfield=' + item;
+ $.getJSON(searchUrl, function(data){
+ if(data.totalResultsCount === "++"){
+ var output = '<li data-role="list-divider">' + window.lang.convert('Zu viele Datensätze! Bitte schränken Sie Ihre Suche ein!') + '</li>';
+ $('#search_results').append(output);
+ $('#search_results').listview('refresh');
+ }
+ else{
+ var output = '<li data-role="list-divider"> ' + data.totalResultsCount + ' ' + window.lang.convert('Suchergebnisse') + '</li>';
+ $('#search_results').append(output);
+ $.each(data.geonames, function(index, place){
+ output = '';
+ //output += '<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+place.title1+'\','+place.x+','+place.y+');" ><h2>' + place.title1 + '</h2>';
+ output += '<li><a href="javascript:void(0);" onClick="searchHsn(\'' + place.strid + '\');" ><h2>' + place.title1 + '</h2>';
+ output += '<p>' + place.title2 + '</p></a></li>';
+ $('#search_results').append(output);
+ });
+
+ $('#search_results').listview('refresh');
+ //Hiliten
+ var o ={words:$('input[name="searchfield"]').val()};
+ highlight("search_results", o);
+ }
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+//Hausnummernsuche aus Datenbank
+function searchHsn(item){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ var searchUrl = 'mod_streetsearch/street_hsn.php?lang=de';
+ searchUrl += '&strid=' + item;
+ $.getJSON(searchUrl, function(data){
+ var output = '<li data-role="list-divider" ><a href="javascript:void(0);" onClick="zoomtosearchpoint(\'' + data.street + '\',' + data.streetx + ',' + data.streety + ');" ><h2>' + data.street + '</h2>';
+ output += '<p>' + data.totalResultsCount + ' ' + window.lang.convert('Hausnummern') + '</p></a></li>';
+ $('#search_results').append(output);
+ $.each(data.geonames, function(index, place){
+ output = '';
+ output += '<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\'' + data.street + ' '+place.title1 + '\',' + place.x + ',' + place.y + ');" ><h2>Nr. ' + place.title1 + '</h2>';
+ output += '<p>' + place.title2 + '</p></a></li>';
+ $('#search_results').append(output);
+ });
+
+ $('#search_results').listview('refresh');
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+//Mapbendersuche via Service
+function searchMapbender(item){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ var searchUrl = mapbendersearchurl+searchEPSG;
+ searchUrl += '&searchText=' + item;
+ $.getJSON(searchUrl, function(data){
+ if(data.totalResultsCount > 500){
+ var output = '<li data-role="list-divider" >' + window.lang.convert('Zu viele Datensätze! Bitte schränken Sie Ihre Suche ein!') + '</li>';
+ $('#search_results').append(output);
+ $('#search_results').listview('refresh');
+ }
+ else{
+ var output = '<li data-role="list-divider" > ' + data.totalResultsCount + ' ' + window.lang.convert('Suchergebnisse') + '</li>';
+ $('#search_results').append(output);
+ $.each(data.geonames, function(index, place){
+ //Mittelpunktkoordinaten
+ var myx = (parseInt(place.minx) + parseInt(place.maxx)) / 2;
+ var myy = (parseInt(place.miny) + parseInt(place.maxy)) / 2;
+ output = '';
+ //Ergebnisse die nur auf Bounds zoomen soll
+ if(place.category === 'gemeinde_neu' || place.category === 'Gemeinde' || place.category === 'verbandsgemeinde' || place.category === 'kreis' || place.category === 'Kreis'){
+ output += '<li><a href="javascript:void(0);" onClick="zoomtoextent(\''+place.title+'\','+place.minx+','+place.miny+','+place.maxx+','+place.maxy+');" ><h2>' + place.title + '</h2>';
+ }
+ else {
+ output += '<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+place.title+'\','+myx+','+myy+');" ><h2>' + place.title + '</h2>';
+ }
+ output += '<p>' + place.category + '</p></a></li>';
+ $('#search_results').append(output);
+ });
+
+ $('#search_results').listview('refresh');
+ //Hiliten
+ var o ={words:$('input[name="searchfield"]').val()};
+ highlight("search_results", o);
+ }
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+//Hiliten von Such-Term
+function highlight(id, options) {
+ var o = {
+ words: '',
+ caseSensitive: false,
+ wordsOnly: true,
+ template: '$1<span class="highlight">$2</span>$3'
+ }, pattern;
+ $.extend(true, o, options || {});
+
+ if (o.words.length == 0) { return; }
+ pattern = new RegExp('(>[^<.]*)(' + o.words + ')([^<.]*)', o.caseSensitive ? "" : "ig");
+
+ $('#'+id).each(function() {
+ var content = $(this).html();
+ if (!content) return;
+ $(this).html(content.replace(pattern, o.template));
+ });
+}
+
+
+
+
+//Zoom auf Punkt aus Ajax Request, z.B. Rasterquery
+function zoompoint(myslng,myslat){
+ var geocodepoint = new OpenLayers.LonLat(myslng,myslat);
+ var geompoint = new OpenLayers.Geometry.Point(myslng,myslat);
+ var geompoint1 = new OpenLayers.Geometry.Point(myslng,myslat);
+ //console.log(transpoint.lon, transpoint.lat)
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(
+ geompoint,
+ {},
+ olSearchSymbol
+ ),
+ new OpenLayers.Feature.Vector(
+ geompoint1,
+ {},
+ olFeaturequerySymbol
+ )
+ ]);
+ map.setCenter(geocodepoint,getZoomlevel());
+}
+
+//auf Geocodierten Punkt in Karte zoomen
+function zoomtosearchpoint(mysadr,myslng,myslat){
+ setMarkerhint(window.lang.convert('Suchergebnis: '), mysadr);
+ var geocodepoint = new OpenLayers.LonLat(myslng,myslat);
+ //Bei Google Geocoding Koordinaten transformieren
+ if(searchMode === "google") {
+ var transpoint = geocodepoint.transform(wgs84Proj,mapProj);
+ }
+ //Bei Strassensuche direkt die Koordinaten verwenden.
+ else if (searchMode === "streetsearch" || searchMode === "mapbendersearch") {
+ var transpoint = geocodepoint;
+
+ }
+ var geompoint = new OpenLayers.Geometry.Point(transpoint.lon, transpoint.lat);
+ var geompoint1 = new OpenLayers.Geometry.Point(transpoint.lon, transpoint.lat);
+ //console.log(transpoint.lon, transpoint.lat)
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(
+ geompoint,
+ {},
+ olSearchSymbol
+ ),
+ new OpenLayers.Feature.Vector(
+ geompoint1,
+ {},
+ olFeaturequerySymbol
+ )
+ ]);
+ map.setCenter(transpoint,getZoomlevel());
+ $.mobile.changePage($("#mappage"),pageTransition);
+}
+
+//auf Extend in Karte zoomen
+function zoomtoextent(mysadr,minx,miny,maxx,maxy){
+ var myextent = new OpenLayers.Bounds(minx, miny, maxx, maxy);
+ if(mysadr !== ""){
+ setMarkerhint(window.lang.convert('Suchergebnis: '), mysadr);
+ }
+ map.zoomToExtent(myextent);
+ $.mobile.changePage($("#mappage"),pageTransition);
+}
+
+//aktuellen Zoomlevel ermitteln (Falls voreingestellter Level kleiner als aktueller wird aktueller verwendet)
+function getZoomlevel(){
+ var actualzoomlevel = Math.round(map.zoom.toFixed(4));
+ if (actualzoomlevel > searchZoom){
+ var myzoomlevel = actualzoomlevel;
+ }
+ else{
+ var myzoomlevel = searchZoom;
+ }
+ return myzoomlevel;
+}
+
+//MaÃstabs-control mit Werten füllen
+function createZoomselect() {
+ $.each(myscales, function(index, value) {
+ //console.log(index + ': ' + value);
+ $('#selectzoom').append($("<option/>", {
+ value: index,
+ text: "1:" + value
+ }));
+ });
+ //Selectmenü initialisieren, sonst Bug bei erstem Refresh
+ $("#selectzoom").selectmenu();
+ displayZoom();
+}
+
+//Aktuellen MaÃstab für Select-Control einstellen
+function displayZoom() {
+ var myindex = Math.round(map.zoom.toFixed(4));
+ //$("#zoomscale").html("1:"+myscales[Math.round(map.zoom.toFixed(4))]);
+ $("#selectzoom").val(''+ myindex +'');
+ //console.log(myindex);
+ //Refresh des Selectmenüs?
+ $("#selectzoom").selectmenu('refresh',true);
+}
+
+//MaÃstab aus Select ändern
+function changeScale(i){
+ map.zoomTo(i);
+ checktranspage();
+ //Adressbar verstecken
+ hideAddressBar();
+}
+
+//Messunktion
+function handleMeasurements(event) {
+ var geometry = event.geometry;
+ var units = event.units;
+ var order = event.order;
+ var measure = event.measure;
+ var element = document.getElementById('measureoutput');
+ var out = "";
+ if (order == 1) {
+ out += window.lang.convert('Entfernung: ') + "<strong>" + measure.toFixed(2) + "</strong> " + units;
+ } else {
+ out += window.lang.convert('Fläche: ') + "<strong>" + measure.toFixed(2) + "</strong> " + units + "<sup>2</" + "sup>";
+ }
+ element.innerHTML = out;
+}
+
+//Messfunktion aktivieren
+function toggleMeasure(c){
+ clickCtrl.deactivate();
+ $("#popupMenu").popup( "close" );
+ measureControls['line'].deactivate();
+ measureControls['polygon'].deactivate();
+ if (c === 'line'){
+ $('#measurehint').css('visibility','visible');
+ measureControls[c].activate();
+ $('#measureoutput').html(window.lang.convert('Entfernungsmessung aktiv!'));
+ }
+ else if (c === 'polygon'){
+ $('#measurehint').css('visibility','visible');
+ measureControls[c].activate();
+ $('#measureoutput').html(window.lang.convert('Flächenmessung aktiv!'));
+ }
+ else {
+ clickCtrl.activate();
+ }
+}
+
+//Mapsize auf vollen Contentbereich skalieren.
+function setmapsize(){
+ window.scrollTo(0,0);
+ var winhigh = $.mobile.getScreenHeight(); //Get available screen height, not including any browser chrome
+ var headhigh = $('[data-role="header"]').first().outerHeight(); //Get height of first page's header
+ var foothigh = $('[data-role="footer"]').first().outerHeight(); //Get height of first page's header
+ var $content=$('[data-role="content"]');
+ var contentpaddingwidth=parseInt($content.css("padding-left").replace("px", ""))+parseInt($('[data-role="content"]').css("padding-right").replace("px", ""));
+ var contentpaddingheight=parseInt($content.css("padding-top").replace("px", ""))+parseInt($('[data-role="content"]').css("padding-bottom").replace("px", ""));
+ winhigh = winhigh - headhigh - foothigh - contentpaddingheight;
+ winwide = $(document).width(); //Get width of document
+ winwide = winwide - contentpaddingwidth;
+ $content.css('width',winwide + 'px').css('height',winhigh + 'px'); //Change div to maximum visible area
+ $("#map").css('width',winwide + 'px').css('height',winhigh + 'px'); //Change div to maximum visible area
+}
+
+
+function checkZindex(){
+ var layers = map.layers;
+ for(var ii=0,len=layers.length; ii<len;ii++) {
+ //console.log("name:"+layers[ii].name+" zindex:"+layers[ii].div.style.zIndex);
+ if(layers[ii].name === "tk_grau"){
+ alert("name:"+layers[ii].name+" zindex:"+layers[ii].div.style.zIndex);
+ }
+ if(layers[ii].name === "Vector Layer"){
+ alert("name:"+layers[ii].name+" zindex:"+layers[ii].div.style.zIndex);
+ }
+ }
+}
+
+
Added: trunk/mapbender/http/extensions/mobilemap/js/jquery-lang.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/jquery-lang.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/jquery-lang.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,203 @@
+var IgeEventsLite = function () {}
+
+IgeEventsLite.prototype.on = function (evtName, fn) {
+ if (evtName && fn) {
+ this.eventList[evtName] = this.eventList[evtName] || [];
+ this.eventList[evtName].push(fn);
+ }
+}
+
+IgeEventsLite.prototype.emit = function (evtName) {
+ if (evtName) {
+ this.eventList = this.eventList || [];
+ var args = [];
+ for (var i = 1; i < arguments.length; i++) {
+ args.push(arguments[i]);
+ }
+ if (evtName) {
+ var fnList = this.eventList[evtName];
+ for (var i in fnList) {
+ if (typeof fnList[i] == 'function') {
+ fnList[i].apply(this, args);
+ }
+ }
+ }
+ }
+}
+
+var jquery_lang_js = function () {
+ this.events = new IgeEventsLite();
+
+ this.on = this.events.on;
+ this.emit = this.events.emit;
+
+ return this;
+}
+
+jquery_lang_js.prototype.lang = {};
+jquery_lang_js.prototype.defaultLang = 'de';
+jquery_lang_js.prototype.currentLang = 'de';
+
+jquery_lang_js.prototype.run = function () {
+ var langElems = $('[lang]');
+ var elemsLength = langElems.length;
+
+ while (elemsLength--) {
+ var elem = langElems[elemsLength];
+ var langElem = $(elem);
+
+ if (langElem.attr('lang') == this.defaultLang) {
+ if (langElem.is("input")) {
+ // An input element
+ switch (langElem.attr('type')) {
+ case 'button':
+ case 'submit':
+ langElem.data('deftext', langElem.val());
+ break;
+
+ case 'text':
+ // Check for a placeholder text value
+ var plText = langElem.attr('placeholder');
+ if (plText) {
+ langElem.data('deftext', plText);
+ }
+ break;
+ }
+ } else {
+ // Not an input element
+ langElem.data('deftext', langElem.html());
+ }
+ }
+ }
+
+ this.change(this.currentLang);
+
+ // Now that the language system is setup, check
+ // if there is a default language and switch to it
+ if (localStorage) {
+ var lsLang = localStorage.getItem('langJs_currentLang');
+ if (lsLang) {
+ this.change(lsLang);
+ }
+ }
+}
+
+jquery_lang_js.prototype.loadPack = function (packPath) {
+ $('<script type="text/javascript" charset="utf-8" src="' + packPath + '" />').appendTo("head");
+}
+
+jquery_lang_js.prototype.change = function (lang) {
+ //console.log('Changing language to ' + lang);
+ if (this.currentLang != lang) { this.update(lang); }
+ this.currentLang = lang;
+
+ // Get the page HTML
+ var langElems = $('[lang]');
+
+ if (lang != this.defaultLang) {
+ if (this.lang[lang]) {
+ var elemsLength = langElems.length;
+ while (elemsLength--) {
+ var elem = langElems[elemsLength];
+ var langElem = $(elem);
+ if (langElem.data('deftext')) {
+ if (langElem.is("input")) {
+ // An input element
+ switch (langElem.attr('type')) {
+ case 'button':
+ case 'submit':
+ // A button or submit, change the value attribute
+ var currentText = langElem.val();
+ var defaultLangText = langElem.data('deftext');
+
+ var newText = this.lang[lang][defaultLangText] || currentText;
+ var newHtml = currentText.replace(currentText, newText);
+ langElem.val(newHtml);
+
+ if (currentText != newHtml) {
+ langElem.attr('lang', lang);
+ }
+ break;
+
+ case 'text':
+ // Check for a placeholder text value
+ var currentText = langElem.attr('placeholder');
+ var defaultLangText = langElem.data('deftext');
+
+ var newText = this.lang[lang][defaultLangText] || currentText;
+ var newHtml = currentText.replace(currentText, newText);
+ langElem.attr('placeholder', newHtml);
+
+ if (currentText != newHtml) {
+ langElem.attr('lang', lang);
+ }
+ break;
+ }
+ } else {
+ // Not an input element
+ var currentText = langElem.html();
+ var defaultLangText = langElem.data('deftext');
+
+ var newText = this.lang[lang][defaultLangText] || currentText;
+ var newHtml = currentText.replace(currentText, newText);
+ langElem.html(newHtml);
+
+ if (currentText != newHtml) {
+ langElem.attr('lang', lang);
+ }
+ }
+ } else {
+ //console.log('No language data for element... have you executed .run() first?');
+ }
+ }
+ } else {
+ console.log('Cannot switch language, no language pack defined for "' + lang + '"');
+ }
+ } else {
+ // Restore the deftext data
+ langElems.each(function () {
+ var langElem = $(this);
+ if (langElem.data('deftext')) {
+ if (langElem.is("input")) {
+ // An input element
+ switch (langElem.attr('type')) {
+ case 'button':
+ case 'submit':
+ langElem.val(langElem.data('deftext'));
+ break;
+
+ case 'text':
+ // Check for a placeholder text value
+ langElem.attr('placeholder', langElem.data('deftext'));
+ break;
+ }
+ } else {
+ langElem.html(langElem.data('deftext'));
+ }
+ }
+ });
+ }
+}
+
+jquery_lang_js.prototype.convert = function (text, lang) {
+ if (lang) {
+ if (lang != this.defaultLang) {
+ return this.lang[lang][text];
+ } else {
+ return text;
+ }
+ } else {
+ if (this.currentLang != this.defaultLang) {
+ return this.lang[this.currentLang][text];
+ } else {
+ return text;
+ }
+ }
+}
+
+jquery_lang_js.prototype.update = function (lang) {
+ if (localStorage) {
+ localStorage.setItem('langJs_currentLang', lang);
+ }
+ this.emit('update', lang);
+}
\ No newline at end of file
Added: trunk/mapbender/http/extensions/mobilemap/js/langpack/en.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/langpack/en.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/langpack/en.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,76 @@
+jquery_lang_js.prototype.lang.en = {
+ //Map
+ '(C) Geobasidaten: LvermGeo Rlp 2012':'(C) Base Geodata: LvermGeo Rlp 2012',
+ 'Karte':'Map',
+ //Ebenensteuerung
+ 'Ebenen':'Layer',
+ 'Hinweis: Um eine Ebene abzufragen aktivieren Sie die Info-Option und tapen danach in der Karte auf das Objekt der Ebene.':'Note: To query a layer select the Info option and then tap on the object of the layer.',
+ 'Ãnderung der Ebenen wechselt direkt zur Kartenansicht':'Changes of layers activate directly mapview',
+
+ //Ebenen
+ 'Hintergrundkarte':'Backgroundmap',
+ 'Topogr. Karte grau':'Topogr. map grey',
+ 'Topogr. Karte farbe':'Topogr. map color',
+ 'Luftbilder':'Aerial photos',
+ 'keine Hintergrundkarte':'No backgroundmap',
+ 'Schutzgebiete':'Protected Areas',
+ 'Naturschutzgebiete':'Nature Reserves',
+ 'Landschaftsschutzgebiete':'Conservation Areas',
+ 'Naturparke':'Nature Parks',
+ 'Natura 2000 Gebiete':'Natura 2000 Areas',
+ 'Vogelschutzgebiete':'Birds Directive Site',
+ 'FFH-Gebiete':'Habitats Directive Site',
+ 'Biotopkataster':'Habitat Cadastral',
+ 'Biotoptypen BT Flächen':'Habitat BT Polygons',
+ 'Biotoptypen BT Linien':'Habitat BT Lines',
+ 'Biotoptypen BT Punkte':'Habitat BT Points',
+ 'Biotope BK Flächen':'Habitat BK Polygons',
+ 'Biotope BK Linien':'Habitat BK Lines',
+ 'Biotope BK Punkte':'Habitat BK Points',
+ 'FFH-Lebensraumtypen':'FFH Habitat Types',
+ 'Artendaten':'Species Data',
+ 'Artenraster (2x2km)':'Species Raster (2x2km)',
+ 'Grenzen':'Borders',
+ 'Liegenschaftskataster':'Cadastral parcel',
+ 'Kreis Grenzen':'District Boundaries',
+ 'Vg Grenzen':'Vg Boundaries',
+ 'Gemeindegrenzen':'Municipal Boundaries',
+ 'Abfrage Höhe + GPS':'Query Altitude + GPS',
+
+ //Suchseite
+ 'Suche':'Search',
+ 'StraÃe suchen:':'Street search:',
+ 'Ort suchen:':'Place search:',
+ 'Suchen':'Search',
+ 'Suchergebnisse':'Search results',
+ 'Hausnummern':'House numbers',
+ 'Zu viele Datensätze! Bitte schränken Sie Ihre Suche ein!':'Too many records! Please narrow your search!',
+
+ //Hilfeseite + Einstellungen
+ 'Hilfe / Info':'Help / Info',
+ 'App Einstellungen':'App settings',
+ 'Einstellungen':'Settings',
+ 'Sprache:':'Language:',
+ 'Händigkeit:':'Handedness',
+ 'Rechtshänder':'Right-handed',
+ 'Linkshänder':'Left-handed',
+
+ //Ajax, JS-Aufrufe ect.
+ 'Meldung:':'Message:',
+ 'bitte warten...':'please wait...',
+ 'Zoom auf Ergebnis in Karte':'Zoom to result on map',
+ 'Suchergebnis: ':'Search result: ',
+ 'Positionsgenauigkeit:':'Positional accuracy:',
+ 'Standardabfrage:':'Standard query:',
+ 'Koordinaten + Hoehe':'Coordinates + altitude',
+ 'aktuelle Abfrageebene:':'actual querylayer:',
+ 'Kein Ergebnis!':'No result!',
+ 'Abfrageergebnis:':'Query result:',
+ 'Die ermittelte Position liegt auÃerhalb des darstellbaren Kartenausschnitts!':'The calculated position is outside the representable map section!',
+ 'Messen':'Measure',
+ 'Entfernung: ':'Distance: ',
+ 'Fläche: ':'Area: ',
+ 'Entfernungsmessung aktiv!':'Distance measurement active!',
+ 'Flächenmessung aktiv!':'Area measurement active!',
+
+}
\ No newline at end of file
Added: trunk/mapbender/http/extensions/mobilemap/js/ngms_event.min.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/ngms_event.min.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/ngms_event.min.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,91 @@
+OpenLayers.Control.Click=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{single:!0,pixelTolerance:0,stopSingle:!1},initialize:function(a){this.handlerOptions=OpenLayers.Util.applyDefaults((a||{}).handlerOptions||{},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{click:this.onClick},this.handlerOptions)},onClick:function(a){var b=map.getLonLatFromViewPortPx(a.xy),c=$("#queryselect").val(),d=$("#select-lang").val(),
+e=new OpenLayers.Geometry.Point(b.lon,b.lat),f=new OpenLayers.Geometry.Point(b.lon,b.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(e,{},olSearchSymbol),new OpenLayers.Feature.Vector(f,{},olFeaturequerySymbol)]);"dhm"==c?(setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")),a="query/rasterquery.php?coord="+b.lon+", "+b.lat+"&lang="+d):"pois"==c?a="query/poiquery.php?qx="+b.lon+"&qy="+b.lat+"&qlayer="+poilayer.params.LAYERS+
+"&qextent="+map.getExtent().toBBOX()+"&qsize="+map.size.w+" "+map.size.h+"&lang="+d:(setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten...")),a="query/proxy.php?wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+c+"&layers="+c+"&QUERY_LAYERS="+c+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html");loadFeature(a)},showQuerylayer:function(){var a=$("#queryselect").val();
+"dhm"==a?setMarkerhint(window.lang.convert("Standardabfrage:"),window.lang.convert("Koordinaten + Hoehe")):setMarkerhint(window.lang.convert("aktuelle Abfrageebene:"),a)},CLASS_NAME:"OpenLayers.Control.Click"});function showQuerylayer(){var a=$("#queryselect").val();"dhm"==a?setMarkerhint(window.lang.convert("Standardabfrage:"),window.lang.convert("Koordinaten + Hoehe")):setMarkerhint(window.lang.convert("aktuelle Abfrageebene:"),a)}
+function loadFeature(a){$.ajax({type:"GET",url:a,success:function(a){a&&(5>a.length&&(a=window.lang.convert("Kein Ergebnis!")),setMarkerhint(window.lang.convert("Abfrageergebnis:"),a))}})}
+OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,geodesic:!1,draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.eTop||(this.eTop=document.createElement("div"),this.eTop.className=this.displayClass+"Top",this.div.appendChild(this.eTop),this.eTop.style.visibility=""==this.topOutUnits||""==this.topInUnits?"hidden":"visible",this.eBottom=document.createElement("div"),
+this.eBottom.className=this.displayClass+"Bottom",this.div.appendChild(this.eBottom),this.eBottom.style.visibility=""==this.bottomOutUnits||""==this.bottomInUnits?"hidden":"visible");this.map.events.register("moveend",this,this.update);this.update();return this.div},getBarLen:function(a){var b=parseInt(Math.log(a)/Math.log(10)),b=Math.pow(10,b),a=parseInt(a/b);return(5<a?5:2<a?2:1)*b},update:function(){var a=this.map.getResolution();if(a){var b=this.map.getUnits(),c=OpenLayers.INCHES_PER_UNIT,d=this.maxWidth*
+a*c[b],e=1;!0===this.geodesic&&(e=(this.map.getGeodesicPixelSize().w||1.0E-6)*this.maxWidth/(d/c.km),d*=e);var f,h;1E5<d?(f=this.topOutUnits,h=this.bottomOutUnits):(f=this.topInUnits,h=this.bottomInUnits);var g=d/c[f],j=d/c[h],d=this.getBarLen(g),j=this.getBarLen(j),g=d/c[b]*c[f],j=j/c[b]*c[h],b=g/a/e,a=j/a/e;"visible"==this.eBottom.style.visibility&&(this.eBottom.style.width=Math.round(a)+"px");"visible"==this.eTop.style.visibility&&(this.eTop.style.width=Math.round(b)+"px",this.eTop.innerHTML=d+
+" "+f)}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});
+OpenLayers.Control.LoadingPanel=OpenLayers.Class(OpenLayers.Control,{counter:0,maximized:!1,visible:!0,initialize:function(a){OpenLayers.Control.prototype.initialize.apply(this,[a])},setVisible:function(a){(this.visible=a)?OpenLayers.Element.show(this.div):OpenLayers.Element.hide(this.div)},getVisible:function(){return this.visible},hide:function(){this.setVisible(!1)},show:function(){this.setVisible(!0)},toggle:function(){this.setVisible(!this.getVisible())},addLayer:function(a){a.layer&&(a.layer.events.register("loadstart",
+this,this.increaseCounter),a.layer.events.register("loadend",this,this.decreaseCounter))},setMap:function(a){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register("preaddlayer",this,this.addLayer);for(var b=0;b<this.map.layers.length;b++){var c=this.map.layers[b];c.events.register("loadstart",this,this.increaseCounter);c.events.register("loadend",this,this.decreaseCounter)}},increaseCounter:function(){this.counter++;0<this.counter&&!this.maximized&&this.visible&&this.maximizeControl()},
+decreaseCounter:function(){0<this.counter&&this.counter--;0==this.counter&&this.maximized&&this.visible&&this.minimizeControl()},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);return this.div},minimizeControl:function(a){this.div.style.display="none";this.maximized=!1;null!=a&&OpenLayers.Event.stop(a)},maximizeControl:function(a){this.div.style.display="block";this.maximized=!0;null!=a&&OpenLayers.Event.stop(a)},destroy:function(){if(this.map&&(this.map.events.unregister("preaddlayer",
+this,this.addLayer),this.map.layers))for(var a=0;a<this.map.layers.length;a++){var b=this.map.layers[a];b.events.unregister("loadstart",this,this.increaseCounter);b.events.unregister("loadend",this,this.decreaseCounter)}OpenLayers.Control.prototype.destroy.apply(this,arguments)},CLASS_NAME:"OpenLayers.Control.LoadingPanel"});var map,clickCtrl,measureControls;Proj4js.defs["EPSG:25832"]="+proj=utm +zone=32 +ellps=GRS80 +units=m +datum=WGS84";Proj4js.defs["EPSG:4326"]="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
+var mapProj=new OpenLayers.Projection("EPSG:25832"),wgs84Proj=new OpenLayers.Projection("EPSG:4326"),mymapbounds=new OpenLayers.Bounds(293300,5424E3,464300,5654100),myzoombounds="off",mymaxscale=2E6,myminscale=500,myzoomlevels=16,myscales=[2E6,15E5,1E6,5E5,25E4,15E4,1E5,5E4,25E3,15E3,1E4,8E3,5E3,3E3,1E3,500],zoomSelect=!0,projUnits="m",searchMode="mapbendersearch",mapbendersearchurl="query/searchproxy.php?resultTarget=web&outputFormat=json&searchEPSG=",searchEPSG="25832",searchZoom=12,defaultHand=
+"r",googleGeocodeAdmin="Rheinland-Pfalz",directLayerChange="on",pageTransition={transition:"fade"},toolColor="#871D33",featurequerySrc="EPSG:25832",olSearchSymbol={graphicName:"cross",strokeColor:"#00FFFF",strokeWidth:1,fillOpacity:0,pointRadius:11},olFeaturequerySymbol={graphicName:"circle",strokeColor:"#00FFFF",fillColor:"#00FFFF",strokeWidth:3,fillOpacity:0.2,pointRadius:15,graphicName:"circle"},olGpsSymbol={graphicName:"cross",strokeColor:"#871D33",strokeWidth:2,fillOpacity:0,pointRadius:12},
+olGpscircleStyle={fillOpacity:0.1,fillColor:"#000",strokeColor:"#871D33",strokeOpacity:0.6},sketchSymbolizers={Point:{pointRadius:6,graphicName:"square",fillColor:"white",fillOpacity:1,strokeWidth:2,strokeOpacity:0.8,strokeColor:"#00FFFF"},Line:{strokeWidth:3,strokeOpacity:1,strokeColor:"#FF0000"},Polygon:{strokeWidth:3,strokeOpacity:1,strokeColor:"#FF0000",fillColor:"white",fillOpacity:0.5}},style=new OpenLayers.Style;style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);
+var styleMap=new OpenLayers.StyleMap({"default":style});
+function Service(a,b,c,d,e,f,h,g){a=$("<li>",{serviceid:a,"class":"service",title:b,desc:c,getMapURL:d,status:e,logoUrl:f,symbolLink:h,avail:g});d=$('<div class="service_container"></div>');d.append($('<table style="margin: 0px; padding: 0px; float:left;"><tr style="margin: 0px; padding: 0px;"><td style="margin: 0px; padding: 0px; height:43px; width:55px; text-align: center; vertical-align: middle;"><img style="max-height: 43px; max-width: 55px; max-height: 43px;" src="'+f+'" class="service_logo" alt="Logo"/></td></tr></table>'));
+d.append($("<div>",{"class":"icon layer_remove",text:" "}).click(function(){removeService($(this).parent().parent())}));d.append($("<div>",{"class":"icon layer_add",text:" "}).click(function(){addService($(this).parent().parent())}));d.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+b+"</h3><h3>"+b+"</h3><p>"+c+"</p></div>");a.append(d);return a}
+function BaseLayer(a,b){return $("<div>",{text:a,title:a,layerids:b,"class":"baselayer base_unchecked"}).click(function(){switchVisibility($(this))})}
+function ResultLayer(a,b,c,d,e,f,h,g){a=$("<div>",{layerid:a,name:c,"class":"layer",title:b,desc:d,previewUrl:e,queryable:f,getMapURL:h,bbox:g});a.append($("<div>",{"class":"icon query_preview "+(f?"query_info":"query_noinfo"),text:" "}));a.append($("<div>",{"class":"layer_icon icon layer_add",text:" "}).click(function(){switchLayer($(this).parent())}));a.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+
+b+"</h3><h3>"+b+"</h3><p>"+d+"</p></div>");return a}
+function OwnLayer(a,b,c,d,e,f,h,g,j,m,n){c=$("<div>",{layerid:a,name:c,servicetitle:e,servicedesc:f,"class":"layer",title:b,desc:d,previewUrl:h,queryable:g,getMapURL:j,bbox:m,avail:n});c.append($("<div>",{"class":"layer_icon icon layer_remove",text:" "}).click(function(){removeLayer($(this).parent())}));g?c.append($("<div>",{"class":"icon query_queryable query_unchecked",text:" "}).click(function(){query_check($(this))})):c.append($("<div>",{"class":"icon query_queryable query_noinfo",text:" "}));
+c.append($("<div>",{"class":"icon layer_visibility layer_checked",text:" "}).click(function(){switchVisibility($(this).parent())}));c.append($("<div>",{"class":"icon move arrow_up",text:" "}).click(function(){up(a)}));g=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"></div>');g.append("<h3>"+b+"</h3>");var j=$("<table></table>"),k=$("<tr></tr>"),l=$('<td class="layerinfo"></td>');h&&l.append($("<div>",{"class":"icon layer_preview",
+text:" "}).click(function(){zoomToBbox(m);$.mobile.changePage($("#mappage"),pageTransition)}));l.append("</br><p>"+n+"%</p>");h=$("<td></td>");h.append("<p><b>"+e+"</b></p><p>"+f+"</p>");h.append("<p><b>"+b+"</b></p><p>"+d+"</p>");k.append(l);k.append(h);j.append(k);g.append(j);c.append(g);return c}var maxlayers=5,maxresults=40,baseinfo=[];searchUrl="mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&maxResults="+maxresults;
+function addmyLayer(){OpenLayers.Control.Click=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{single:!0,pixelTolerance:0,stopSingle:!1},initialize:function(a){this.handlerOptions=OpenLayers.Util.applyDefaults((a||{}).handlerOptions||{},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,arguments);this.handler=new OpenLayers.Handler.Click(this,{click:this.onClick},this.handlerOptions)},onClick:function(a){var b=map.getLonLatFromViewPortPx(a.xy),c=$("#ownlist").find(".query_checked").parent(),
+d=$("#select-lang").val(),e=new OpenLayers.Geometry.Point(b.lon,b.lat),f=new OpenLayers.Geometry.Point(b.lon,b.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(e,{},olSearchSymbol),new OpenLayers.Feature.Vector(f,{},olFeaturequerySymbol)]);setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten..."));0<c.length?(a=c.attr("getmapurl")+"&wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1&mapfile="+c.attr("name")+"&layers="+c.attr("name")+
+"&QUERY_LAYERS="+c.attr("name")+"&SRS="+featurequerySrc+"&BBOX="+map.getExtent().toBBOX()+"&WIDTH="+map.size.w+"&HEIGHT="+map.size.h+"&X="+a.xy.x+"&Y="+a.xy.y+"&INFO_FORMAT=text/html",a=$('<iframe src="'+a+'" class="query_iframe"><p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'),setMarkerhint("Abfrageergebnis:",a)):(a="query/rasterquery.php?coord="+b.lon+", "+b.lat+"&lang="+d,loadFeature(a))},CLASS_NAME:"OpenLayers.Control.Click"});$("#mapbenderbut").click(function(){$.mobile.changePage($("#mod_mapbender"),
+pageTransition);refresh()});$("#mapbendersearchformbut").click(function(){searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$("#mapbendersearchfield").live("keypress",function(a){13===a.keyCode&&searchMaps(searchUrl+"&searchText="+$("#mapbendersearchfield").val())});$("div[data-role=collapsible]").live("expand",function(){$("div[data-role=collapsible]").not($(this)).trigger("collapse")});$(".addToMapBut").click(function(){$("div[data-role=collapsible]").not(".ui-collapsible-collapsed").trigger("collapse");
+$.mobile.changePage($("#mappage"),pageTransition)});addBaselayers()}
+function preview(a,b,c){$.ajax({previewurl:a,layerid:b,bbox:c,success:function(){$("#preview").find("div[data-role=content]").empty();$("#preview").find("div[data-role=content]").append('<img src="'+$(this).attr("previewurl")+'" alt="image" style="width:200px;">');var a=$(this).attr("bbox"),b=$(this).attr("layerid");$("#preview_zoom").click(function(){getOpenlayersIndex(b);zoomToBbox(a);$.mobile.changePage($("#mappage"),pageTransition)});$("#preview").popup("open")}})}
+getInfo=function(a){$("#info_content").empty();$("#info_content").append(a);$("#info").popup("open")};function getOpenlayersIndex(a){for(var b=0;b<map.layers.length;b++)if(map.layers[b].name==a)return b;return-1}function addOpenlayer(a,b,c){a=new OpenLayers.Layer.WMS(a,c,{layers:b,format:"image/png",transparent:"TRUE",transitionEffect:"resize"},{projection:mapProj,units:projUnits,opacity:0.8,singleTile:!0,isBaseLayer:!1,visibility:!0,alwaysInRange:!0});map.addLayer(a);map.setLayerIndex(a,0)}
+function removeOpenlayer(a){a=getOpenlayersIndex(a);0<=a&&map.removeLayer(map.layers[a])}function setOpenBaselayer(a){a=getOpenlayersIndex(a);0<=a&&map.setBaseLayer(map.layers[a])}function selectOpenlayer(a,b){var c=getOpenlayersIndex(a);0<=c&&map.layers[c].setVisibility(b)}
+function addOpenBaselayer(a,b){$.getJSON("mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&resourceIds="+b,function(b){$.each(b.wms.srv,function(b,c){$.each(c.layer,function(b,d){d.layer&&(d=d.layer[0]);var g=new OpenLayers.Layer.WMS(a,c.getMapUrl,{layers:d.name,format:"image/png",transparent:"false",transitionEffect:"resize"},{projection:mapProj,units:projUnits,singleTile:!0,isBaseLayer:!0,alwaysInRange:!0});map.addLayers([g])})})})}
+function zoomToBbox(a){var b=a.split(","),a=(new OpenLayers.LonLat(b[0],b[1])).transform(wgs84Proj,mapProj),b=(new OpenLayers.LonLat(b[2],b[3])).transform(wgs84Proj,mapProj);map.zoomToExtent(new OpenLayers.Bounds(a.lon,a.lat,b.lon,b.lat))}function numServices(){return $("#resultlist").find(".service").length}function numResultLayers(a){return a.find(".layer").length}function layerInList(a,b){for(var c=a.find(".layer"),d=0;d<c.length;d++)if($(c[d]).attr("layerid")==b)return d;return-1}
+function up(a){var b=layerInList($("#ownlist"),a);0<b&&($($("#ownlist").find(".layer")[b]).after($($("#ownlist").find(".layer")[b-1])),console.log("todo: layerreihenfolge"),map.raiseLayer(map.layers[getOpenlayersIndex(a)],1),validateArrows(),refresh())}function numOwnlayers(){return $("#ownlist").find(".layer").length}
+function refresh(){$("#resultlist").listview("refresh");$($("#ownlist").parent()).listview("refresh");$("div[data-role=collapsible]").collapsible();$("a[data-role=button]").button()}
+function validateLayers(){layers=$("#resultlist").find(".layer");$.each(layers,function(a,b){0<=layerInList($("#ownlist"),$(b).attr("layerid"))?($(b).find(".layer_icon").first().attr("class","layer_icon icon layer_remove"),$(b).find(".collapsible").first().removeClass("unselected").addClass("selected")):($(b).find(".layer_icon").first().attr("class","layer_icon icon layer_add"),$(b).find(".collapsible").first().removeClass("selected").addClass("unselected"))})}
+function validateArrows(){var a=$("#ownlist").find(".move");$(a[0]).attr("class","icon move arrow_empty");1<a.length&&$(a[1]).attr("class","icon move arrow_up")}function query_check(a){$(a).hasClass("query_unchecked")?($("#ownlist").find(".query_checked").addClass("query_unchecked").removeClass("query_checked"),$(a).addClass("query_checked").removeClass("query_unchecked")):$(a).addClass("query_unchecked").removeClass("query_checked")}
+function addLayer(a){if(numOwnlayers()>=maxlayers)getInfo("Es können nicht mehr als "+maxlayers+" Ebenen zur Auswahl hinzugefügt werden.");else{$.mobile.showPageLoadingMsg();if(0>layerInList($("#ownlist"),$(a).attr("layerid")))return $("#ownlist").append(OwnLayer(a.attr("layerid"),a.attr("title"),a.attr("name"),a.attr("desc"),a.parent().attr("title"),a.parent().attr("desc"),a.attr("previewUrl"),"true"==a.attr("queryable"),a.attr("getMapUrl"),a.attr("bbox"),a.parent().attr("avail"))),validateLayers(),
+validateArrows(),refresh(),addOpenlayer(a.attr("layerid"),a.attr("name"),a.attr("getMapUrl")),$.mobile.hidePageLoadingMsg(),!0;$.mobile.hidePageLoadingMsg()}return!1}function removeLayer(a){layerInList($("#ownlist"),$(a).attr("layerid"));$($("#ownlist").find(".layer")[layerInList($("#ownlist"),$(a).attr("layerid"))]).remove();validateLayers();validateArrows();refresh();removeOpenlayer($(a).attr("layerid"))}
+function switchLayer(a){0>layerInList($("#ownlist"),$(a).attr("layerid"))?addLayer(a):removeLayer(a)}function addService(a){for(var a=a.find(".layer"),b=0;b<a.length&&!(addLayer($(a[b])),numOwnlayers()>maxlayers);b++);}function removeService(a){$.each(a.find(".layer"),function(a,c){removeLayer($(c))})}
+function switchVisibility(a){$(a).hasClass("layer")?($(a).find(".layer_visibility").toggleClass("layer_checked").toggleClass("layer_unchecked"),selectOpenlayer($(a).attr("layerid"),$(a).find(".layer_visibility").hasClass("layer_checked"))):($("#baselayers").find(".base_checked").addClass("base_unchecked").removeClass("base_checked"),$(a).addClass("base_checked").removeClass("base_unchecked"),setOpenBaselayer($(a).attr("layerids")))}
+function base_check(a){$("#baselayers").find(".base_checked").addClass("base_unchecked").removeClass("base_checked");$(a).addClass("base_checked").removeClass("base_unchecked")}
+function searchMaps(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON(a,function(a){a=parseMapBenderJson(a);appendData(a.services,a.layers,a.nresults);$.mobile.hidePageLoadingMsg();a.nresults>maxresults&&getInfo("Es gab "+a.nresults+" Treffer, es k\u00f6nnen aber nur "+maxresults+" Ergebnisse angezeigt werden.</br><b>Schr\u00e4nken Sie Ihre Suche weiter ein.</b>")})}
+function searchWmc(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON(a,function(a){appendWmc(a);$.mobile.hidePageLoadingMsg()})}function parseMapBenderJson(a){var b=[],c=[];$.each(a.wms.srv,function(a,e){for(var f=!1,h=0;h<b.length;h++)if(b[h].id==e.id){f=!0;break}!e.logged&&!e.nwaccess&&(f||b.push(e),$.each(e.layer,function(a,b){b.layer?$.each(b.layer,function(a,b){c.push([e.id,b])}):c.push([e.id,b])}))});return{services:b,layers:c,nresults:a.wms.md.nresults}}
+function appendData(a,b,c){$("#resultlist").empty();for(var d=0;d<a.length;d++){var e=a[d];service=Service(e.id,e.title,$(e).attr("abstract"),e.getMapUrl,e.status,""==e.logoUrl?"mod_mapbender/img/defaulicon.png":e.logoUrl,e.symbolLink,e.avail);for(var f=0;f<b.length;f++){var h=b[f],g=h[1];h[0]==e.id&&service.append(ResultLayer(g.id,g.title,g.name,$(g).attr("abstract"),g.previewURL,"1"==g.queryable,e.getMapUrl,g.bbox))}$("#resultlist").append(service)}$("#resultlist").prepend('<li data-theme="b">Suchergebnis: '+
+numServices()+" Dienste, "+numResultLayers($("#resultlist"))+" Layer ("+c+" Treffer) </li>");validateLayers();refresh()}
+function appendWmcData(a,b,c){$("#ownlist").empty();for(var d=[],e=0;e<a.length;e++)for(var f=a[e],h=0;h<b.length;h++){var g=b[h],j=g[1];g[0]==f.id&&d.push(OwnLayer(j.id,j.title,j.name,$(j).attr("abstract"),f.title,$(f).attr("abstract"),j.previewURL,"1"==j.queryable,f.getMapUrl,j.bbox,f.avail))}for(e=0;e<c.length;e++)for(h=0;h<d.length;h++)if(c[e].layerId==d[h].attr("layerid")){g=d[h];$("#ownlist").append(g);addOpenlayer(g.attr("layerid"),g.attr("name"),g.attr("getMapUrl"));c[e].active||switchVisibility(g);
+break}validateLayers();validateArrows()}function clearOwnlist(){for(var a=$("#ownlist").find(".layer"),b=0;b<a.length;b++)removeLayer(a[b])}
+function appendWmc(a){for(var b=0;b<a.backGroundLayer.length;b++){var c=a.backGroundLayer[b];if(c.active)for(var d=$("#baselayers").find(".baselayer"),e=0;e<d.length;e++)if($(d[e]).attr("layerids")==c.name){switchVisibility(d[e]);break}}clearOwnlist();var f="";$.each(a.layerList,function(a,b){f=f+","+b.layerId});f=f.substr(1,f.length);$.getJSON(searchUrl+"&resourceIds="+f,function(b){b=parseMapBenderJson(b);appendWmcData(b.services,b.layers,a.layerList);$.mobile.hidePageLoadingMsg()})}
+function addBaselayers(){$("#baselayers").empty();vector_marker=new OpenLayers.Layer.Vector("Vector Layer",{});var a=new OpenLayers.Layer.TMS("Hybrid","http://www.gdi-rp-dienste2.rlp.de/mapcache/tms/",{layername:"test at UTM32",type:"jpeg",serviceVersion:"1.0.0",gutter:0,buffer:0,isBaseLayer:!0,transitionEffect:"resize",resolutions:[529.1666666667,396.875,264.5833333333,132.2916666667,66.1458333333,39.6875,26.4583333333,13.2291666667,6.6145833333,3.96875,2.6458333333,2.1166666667,1.3229166667,0.79375,
+0.2645833333,0.1322916667],units:projUnits,projection:mapProj,sphericalMercator:!1});$("#baselayers").append(BaseLayer("Rlp Zusammenstellung",a.name));var b=new OpenLayers.Layer.WMS("Luftbild","http://geo4.service24.rlp.de/wms/dop40_geo4.fcgi?",{layers:"dop",format:"image/jpeg",transparent:"false",transitionEffect:"resize"},{projection:mapProj,units:projUnits,singleTile:!1,alwaysInRange:!0,isBaseLayer:!0});$("#baselayers").append(BaseLayer("Luftbilder",b.name));var c=new OpenLayers.Layer.WMS("grenze_leer",
+"http://map1.naturschutz.rlp.de/service_basis/mod_wms/wms_getmap.php?mapfile=tk_rlp_gesamt&",{layers:"grenzen_land",format:"image/jpeg",transparent:"false",transitionEffect:"resize"},{projection:mapProj,units:projUnits,singleTile:!0,alwaysInRange:!0,isBaseLayer:!0});$("#baselayers").append(BaseLayer("keine Hintergrundkarte",c.name));map.addLayers([a,b,c,vector_marker]);for(i in baseinfo)a=baseinfo[i][0],b=baseinfo[i][1],$("#baselayers").append(BaseLayer(a,b)),addOpenBaselayer(a,b);base_check($("#baselayers").find(".baselayer").first())}
+var initmap=function(){var a={theme:null,projection:mapProj,units:projUnits,maxExtent:mymapbounds,maxScale:mymaxscale,minScale:myminscale,numZoomLevels:myzoomlevels,scales:myscales,controls:[new OpenLayers.Control.Attribution,new OpenLayers.Control.Navigation({zoomWheelEnabled:!0}),new OpenLayers.Control.KeyboardDefaults,new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:10,enableKinetic:!0}}),new OpenLayers.Control.ScaleLine({div:document.getElementById("scaleline"),geodesic:!1,maxWidth:100,
+topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null}),new OpenLayers.Control.LoadingPanel({})]};map=new OpenLayers.Map("map",a);addmyLayer();"off"!==myzoombounds?map.zoomToExtent(myzoombounds):map.zoomToExtent(map.maxExtent);a=new OpenLayers.Control.Geolocate({id:"locate-control",geolocationOptions:{enableHighAccuracy:!0,maximumAge:0,timeout:7E3}});map.addControl(a);a.events.register("locationupdated",this,function(a){vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(a.point,
+{},olGpsSymbol),new OpenLayers.Feature.Vector(OpenLayers.Geometry.Polygon.createRegularPolygon(new OpenLayers.Geometry.Point(a.point.x,a.point.y),a.position.coords.accuracy/2,50,0),{},olGpscircleStyle)]);a.point.x>map.maxExtent.left&&a.point.x<map.maxExtent.right&&a.point.y>map.maxExtent.bottom&&a.point.y<map.maxExtent.top?(setMarkerhint(window.lang.convert("Positionsgenauigkeit:"),"~ "+a.position.coords.accuracy+" Meter"),map.zoomToExtent(vector_marker.getDataExtent())):(alert(window.lang.convert("Die ermittelte Position liegt au\u00dferhalb des darstellbaren Kartenausschnitts!")),
+$("#markerhint").css("visibility","hidden"))});a=new OpenLayers.Style;a.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);a=new OpenLayers.StyleMap({"default":a});measureControls={line:new OpenLayers.Control.Measure(OpenLayers.Handler.Path,{persist:!0,handlerOptions:{layerOptions:{styleMap:a}}}),polygon:new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon,{persist:!0,handlerOptions:{layerOptions:{styleMap:a}}})};for(var b in measureControls)a=measureControls[b],a.events.on({measure:handleMeasurements,
+measurepartial:handleMeasurements}),map.addControl(a)};
+$(document).ready(function(){window.location.hash&&"#mappage"!=window.location.hash&&$.mobile.changePage($("#mappage"),pageTransition);initmap();zoomSelect&&($("#zoomscale").css("visibility","visible"),createZoomselect(),map.events.register("moveend",null,displayZoom));clickCtrl=new OpenLayers.Control.Click;map.addControl(clickCtrl);clickCtrl.activate();checkLayers();$("#autolayerchange").change(function(){directLayerChange=this.value});$("#layerbut").click(function(){$.mobile.changePage($("#layerpage"),pageTransition)});
+$("#searchbut").click(function(){$.mobile.changePage($("#searchpage"),pageTransition)});$("#helpbut").click(function(){$.mobile.changePage($("#helppage"),pageTransition)});$("#gearbut").click(function(){$.mobile.changePage($("#gearpage"),pageTransition)});$("#measurelinebut").click(function(){toggleMeasure("line")});$("#measurepolybut").click(function(){toggleMeasure("polygon")});$("#ovbut").click(function(){map.zoomToExtent(map.maxExtent)});$("#zoominbut").click(function(){map.zoomIn()});$("#zoomoutbut").click(function(){map.zoomOut()});
+$("#popupMenu").popup();$("#menubut").click(function(){$("#popupMenu").popup("open")});$("#xheader").click(function(){$("#markerhint").css("visibility","hidden");vector_marker.removeAllFeatures()});$("#mheader").click(function(){$("#measurehint").css("visibility","hidden");toggleMeasure("off")});$("#searchformbut").click(function(){searchCall()});$("#searchfield").live("keypress",function(a){13===a.keyCode&&searchCall()});$(".mapbackbut").click(function(){$.mobile.changePage($("#mappage"),pageTransition);
+$("body").css("overflow","hidden")});$("#locatebut").click(function(){setMarkerhint(window.lang.convert("Meldung:"),window.lang.convert("bitte warten..."));var a=map.getControlsBy("id","locate-control")[0];a.active?a.getCurrentLocation():a.activate()});$(".baselayer_check").click(function(){$(".baselayer_check").css("background-image","url(img/ico_basecheck.png)");$(this).css("background-image","url(img/ico_basecheck_active.png)");for(var a=0;a<map.layers.length;a++)$(this).attr("id")===map.layers[a].name&&
+map.setBaseLayer(map.layers[a]);clearanimation();checktranspage()});$(".layer_check").click(function(){for(var a=0;a<map.layers.length;a++)if($(this).attr("id")===map.layers[a].name)var b=a;map.layers[b].getVisibility()?(map.layers[b].setVisibility(!1),$(this).css("background-image","url(img/ico_check.png)")):(map.layers[b].setVisibility(!0),$(this).css("background-image","url(img/ico_check_active.png)"));clearanimation();checktranspage()});$(".poi_check").click(function(){var a=poilayer.params.LAYERS,
+b=[];""!=a&&(b=a.split(","));if(-1!=jQuery.inArray($(this).attr("id"),b)){for(a=0;a<b.length;a++)$(this).attr("id")===b[a]&&b.splice(a,1);$(this).css("background-image","url(img/ico_check.png)")}else b.push($(this).attr("id")),$(this).css("background-image","url(img/ico_check_active.png)");a=b.join(",");poilayer.mergeNewParams({layers:a});0<b.length&&poilayer.setVisibility(!0);poilayer.redraw();clearanimation();checktranspage()});$(".query_check").click(function(){$(".query_check").css("background-image",
+"url(img/ico_checkop.png)");$(this).css("background-image","url(img/ico_checkop_active.png)");var a=$(this).attr("id"),a=a.substring(0,a.length-6);$("#queryselect").val(a);clearanimation()});$(".query_check").touchstart(function(){$(this).css("background-color","#808080")});$(".layer_check").touchstart(function(){$(this).css("background-color","#808080");$(this).css("color","#FFFFFF")});$(".baselayer_check").touchstart(function(){$(this).css("background-color","#808080");$(this).css("color","#FFFFFF")});
+$(".navbuttons").touchstart(function(){$(this).css("border","2px solid #808080")});$(".navbuttons").touchend(function(){$(this).css("border","2px solid "+toolColor)});$(".searchbutton").live("touchstart",function(){$(this).css("border","2px solid #808080")});changeHand(defaultHand);$("#autolayerchange").val(directLayerChange);hideAddressBar()});
+var clearanimation=function(){$(".query_check").css("background-color","#808080");$(".layer_check, .baselayer_check, .poi_check").css("background-color","#FFFFFF");$(".layer_check, .baselayer_check, .poi_check").css("color","#000000")},checktranspage=function(){"on"===directLayerChange&&$.mobile.changePage($("#mappage"),pageTransition)},checkLayers=function(){$(".baselayer_check").each(function(){for(var a=0;a<map.layers.length;a++)map.layers[a].name===$(this).attr("id")&&map.layers[a].visibility&&
+$(this).css("background-image","url(img/ico_basecheck_active.png)")});$(".layer_check").each(function(){for(var a=0;a<map.layers.length;a++)map.layers[a].name===$(this).attr("id")&&map.layers[a].visibility&&$(this).css("background-image","url(img/ico_check_active.png)")});$(".poi_check").each(function(){var a=poilayer.params.LAYERS,b=[];""!=a&&(b=a.split(","));-1!=jQuery.inArray($(this).attr("id"),b)&&$(this).css("background-image","url(img/ico_check.png)")});$(".query_check").each(function(){var a=
+$(this).attr("id");a.substring(0,a.length-6)===$("#queryselect").val()&&$(this).css("background-image","url(img/ico_checkop_active.png)")})};function searchCall(){"google"===searchMode?codeAddress():"streetsearch"===searchMode?searchStreet($("#searchfield").val()):"mapbendersearch"===searchMode?searchMapbender($("#searchfield").val()):alert("kein Suchmodus konfiguriert!")}function setMarkerhint(a,b){$("#xheader").html(a);$("#xcontent").html(b);$("#markerhint").css("visibility","visible")}
+function hideAddressBar(){window.location.hash||(document.height<=window.outerHeight+10?(document.body.style.height=window.outerHeight+50+"px",setTimeout(function(){window.scrollTo(0,1)},50)):setTimeout(function(){window.scrollTo(0,1)},0))}
+function changeHand(a){"l"===a?(defaultHand="l",$("#scaleline, #copyright, #zoomscale").css("left","auto").css("right","4px"),$("#navbutgroup").css("right","auto").css("left","4px")):(defaultHand="r",$("#scaleline, #copyright, #zoomscale").css("right","auto").css("left","4px"),$("#navbutgroup").css("left","auto").css("right","4px"))}
+function changeLanguage(a,b){window.lang.change(a);$.mobile.showPageLoadingMsg();$.ajax({url:"help/help_"+a+".html",cache:!0}).done(function(a){$("#helpdiv").html(a);$.mobile.hidePageLoadingMsg()});b&&$("#select-hand").selectmenu("refresh",!0);$("#select-lang").val(a)}
+function codeAddress(){adressgeocoder=new google.maps.Geocoder;var a=document.getElementById("searchfield").value;adressgeocoder.geocode({address:a},function(b,c){if(c===google.maps.GeocoderStatus.OK){var d="no";for(i=0;i<b[0].address_components.length;i++)b[0].address_components[i].long_name===googleGeocodeAdmin&&(d="ok");if("ok"!=d)alert("Adresse liegt nicht in "+googleGeocodeAdmin+"!");else{var d=b[0].formatted_address,e=b[0].geometry.location.lat(),f=b[0].geometry.location.lng(),h=new google.maps.LatLng(e,
+f),g={zoom:11,center:h,mapTypeId:google.maps.MapTypeId.ROADMAP},g=new google.maps.Map(document.getElementById("mygooglemap"),g);new google.maps.Marker({map:g,position:h});d=window.lang.convert("Suchergebnis: ")+d+' <br><div class="searchbutton" onClick="zoomtosearchpoint(\''+d+"',"+f+","+e+')" >'+window.lang.convert("Zoom auf Ergebnis in Karte")+"</div>";$("#mygooglelink").html(d)}}else alert("Geocode nicht erfolgreich, Fehler: "+a+" "+c)})}
+function searchStreet(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON("mod_streetsearch/street_full.php?lang=de&searchfield="+a,function(a){if("++"===a.totalResultsCount){var c='<li data-role="list-divider">'+window.lang.convert("Zu viele Datens\u00e4tze! Bitte schr\u00e4nken Sie Ihre Suche ein!")+"</li>";$("#search_results").append(c);$("#search_results").listview("refresh")}else c='<li data-role="list-divider"> '+a.totalResultsCount+" "+window.lang.convert("Suchergebnisse")+
+"</li>",$("#search_results").append(c),$.each(a.geonames,function(a,b){c="";c+='<li><a href="javascript:void(0);" onClick="searchHsn(\''+b.strid+"');\" ><h2>"+b.title1+"</h2>";c+="<p>"+b.title2+"</p></a></li>";$("#search_results").append(c)}),$("#search_results").listview("refresh"),a={words:$('input[name="searchfield"]').val()},highlight("search_results",a);$.mobile.hidePageLoadingMsg()})}
+function searchHsn(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();$.getJSON("mod_streetsearch/street_hsn.php?lang=de&strid="+a,function(a){var c='<li data-role="list-divider" ><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+a.street+"',"+a.streetx+","+a.streety+');" ><h2>'+a.street+"</h2>",c=c+("<p>"+a.totalResultsCount+" "+window.lang.convert("Hausnummern")+"</p></a></li>");$("#search_results").append(c);$.each(a.geonames,function(d,e){c="";c+='<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+
+a.street+" "+e.title1+"',"+e.x+","+e.y+');" ><h2>Nr. '+e.title1+"</h2>";c+="<p>"+e.title2+"</p></a></li>";$("#search_results").append(c)});$("#search_results").listview("refresh");$.mobile.hidePageLoadingMsg()})}
+function searchMapbender(a){$.mobile.showPageLoadingMsg();$("#search_results").empty();var b=mapbendersearchurl+searchEPSG;$.getJSON(b+("&searchText="+a),function(a){if(500<a.totalResultsCount){var b='<li data-role="list-divider" >'+window.lang.convert("Zu viele Datens\u00e4tze! Bitte schr\u00e4nken Sie Ihre Suche ein!")+"</li>";$("#search_results").append(b);$("#search_results").listview("refresh")}else b='<li data-role="list-divider" > '+a.totalResultsCount+" "+window.lang.convert("Suchergebnisse")+
+"</li>",$("#search_results").append(b),$.each(a.geonames,function(a,c){var h=(parseInt(c.minx)+parseInt(c.maxx))/2,g=(parseInt(c.miny)+parseInt(c.maxy))/2;b="";b="gemeinde_neu"===c.category||"Gemeinde"===c.category||"verbandsgemeinde"===c.category||"kreis"===c.category||"Kreis"===c.category?b+('<li><a href="javascript:void(0);" onClick="zoomtoextent(\''+c.title+"',"+c.minx+","+c.miny+","+c.maxx+","+c.maxy+');" ><h2>'+c.title+"</h2>"):b+('<li><a href="javascript:void(0);" onClick="zoomtosearchpoint(\''+
+c.title+"',"+h+","+g+');" ><h2>'+c.title+"</h2>");b+="<p>"+c.category+"</p></a></li>";$("#search_results").append(b)}),$("#search_results").listview("refresh"),a={words:$('input[name="searchfield"]').val()},highlight("search_results",a);$.mobile.hidePageLoadingMsg()})}
+function highlight(a,b){var c={words:"",caseSensitive:!1,wordsOnly:!0,template:'$1<span class="highlight">$2</span>$3'},d;$.extend(!0,c,b||{});0!=c.words.length&&(d=RegExp("(>[^<.]*)("+c.words+")([^<.]*)",c.caseSensitive?"":"ig"),$("#"+a).each(function(){var a=$(this).html();a&&$(this).html(a.replace(d,c.template))}))}
+function zoompoint(a,b){var c=new OpenLayers.LonLat(a,b),d=new OpenLayers.Geometry.Point(a,b),e=new OpenLayers.Geometry.Point(a,b);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(d,{},olSearchSymbol),new OpenLayers.Feature.Vector(e,{},olFeaturequerySymbol)]);map.setCenter(c,getZoomlevel())}
+function zoomtosearchpoint(a,b,c){setMarkerhint(window.lang.convert("Suchergebnis: "),a);a=new OpenLayers.LonLat(b,c);if("google"===searchMode)var d=a.transform(wgs84Proj,mapProj);else if("streetsearch"===searchMode||"mapbendersearch"===searchMode)d=a;a=new OpenLayers.Geometry.Point(d.lon,d.lat);b=new OpenLayers.Geometry.Point(d.lon,d.lat);vector_marker.removeAllFeatures();vector_marker.addFeatures([new OpenLayers.Feature.Vector(a,{},olSearchSymbol),new OpenLayers.Feature.Vector(b,{},olFeaturequerySymbol)]);
+map.setCenter(d,getZoomlevel());$.mobile.changePage($("#mappage"),pageTransition)}function zoomtoextent(a,b,c,d,e){b=new OpenLayers.Bounds(b,c,d,e);""!==a&&setMarkerhint(window.lang.convert("Suchergebnis: "),a);map.zoomToExtent(b);$.mobile.changePage($("#mappage"),pageTransition)}function getZoomlevel(){var a=Math.round(map.zoom.toFixed(4));return a>searchZoom?a:searchZoom}
+function createZoomselect(){$.each(myscales,function(a,b){$("#selectzoom").append($("<option/>",{value:a,text:"1:"+b}))});$("#selectzoom").selectmenu();displayZoom()}function displayZoom(){var a=Math.round(map.zoom.toFixed(4));$("#selectzoom").val(""+a+"");$("#selectzoom").selectmenu("refresh",!0)}function changeScale(a){map.zoomTo(a);checktranspage();hideAddressBar()}
+function handleMeasurements(a){var b=a.units,c=a.order,a=a.measure,d=document.getElementById("measureoutput"),e="",e=1==c?e+(window.lang.convert("Entfernung: ")+"<strong>"+a.toFixed(2)+"</strong> "+b):e+(window.lang.convert("Fl\u00e4che: ")+"<strong>"+a.toFixed(2)+"</strong> "+b+"<sup>2</sup>");d.innerHTML=e}
+function toggleMeasure(a){clickCtrl.deactivate();$("#popupMenu").popup("close");measureControls.line.deactivate();measureControls.polygon.deactivate();"line"===a?($("#measurehint").css("visibility","visible"),measureControls[a].activate(),$("#measureoutput").html(window.lang.convert("Entfernungsmessung aktiv!"))):"polygon"===a?($("#measurehint").css("visibility","visible"),measureControls[a].activate(),$("#measureoutput").html(window.lang.convert("Fl\u00e4chenmessung aktiv!"))):clickCtrl.activate()}
+function setmapsize(){window.scrollTo(0,0);var a=$.mobile.getScreenHeight(),b=$('[data-role="header"]').first().outerHeight(),c=$('[data-role="footer"]').first().outerHeight(),d=$('[data-role="content"]'),e=parseInt(d.css("padding-left").replace("px",""))+parseInt($('[data-role="content"]').css("padding-right").replace("px","")),f=parseInt(d.css("padding-top").replace("px",""))+parseInt($('[data-role="content"]').css("padding-bottom").replace("px","")),a=a-b-c-f;winwide=$(document).width();winwide-=
+e;d.css("width",winwide+"px").css("height",a+"px");$("#map").css("width",winwide+"px").css("height",a+"px")}function checkZindex(){for(var a=map.layers,b=0,c=a.length;b<c;b++)"tk_grau"===a[b].name&&alert("name:"+a[b].name+" zindex:"+a[b].div.style.zIndex),"Vector Layer"===a[b].name&&alert("name:"+a[b].name+" zindex:"+a[b].div.style.zIndex)};
Added: trunk/mapbender/http/extensions/mobilemap/js/proj4js.min.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/js/proj4js.min.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/js/proj4js.min.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,180 @@
+/*
+ proj4js.js -- Javascript reprojection library.
+
+ Authors: Mike Adair madairATdmsolutions.ca
+ Richard Greenwood richATgreenwoodmap.com
+ Didier Richard didier.richardATign.fr
+ Stephen Irons stephen.ironsATclear.net.nz
+ Olivier Terral oterralATgmail.com
+
+ License:
+ Copyright (c) 2012, Mike Adair, Richard Greenwood, Didier Richard,
+ Stephen Irons and Olivier Terral
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+ Note: This program is an almost direct port of the C library PROJ.4.
+*/
+var Proj4js={defaultDatum:"WGS84",transform:function(a,c,b){if(!a.readyToUse)return this.reportError("Proj4js initialization for:"+a.srsCode+" not yet complete"),b;if(!c.readyToUse)return this.reportError("Proj4js initialization for:"+c.srsCode+" not yet complete"),b;if(a.datum&&c.datum&&((a.datum.datum_type==Proj4js.common.PJD_3PARAM||a.datum.datum_type==Proj4js.common.PJD_7PARAM)&&"WGS84"!=c.datumCode||(c.datum.datum_type==Proj4js.common.PJD_3PARAM||c.datum.datum_type==Proj4js.common.PJD_7PARAM)&&
+"WGS84"!=a.datumCode)){var d=Proj4js.WGS84;this.transform(a,d,b);a=d}"enu"!=a.axis&&this.adjust_axis(a,!1,b);"longlat"==a.projName?(b.x*=Proj4js.common.D2R,b.y*=Proj4js.common.D2R):(a.to_meter&&(b.x*=a.to_meter,b.y*=a.to_meter),a.inverse(b));a.from_greenwich&&(b.x+=a.from_greenwich);b=this.datum_transform(a.datum,c.datum,b);c.from_greenwich&&(b.x-=c.from_greenwich);"longlat"==c.projName?(b.x*=Proj4js.common.R2D,b.y*=Proj4js.common.R2D):(c.forward(b),c.to_meter&&(b.x/=c.to_meter,b.y/=c.to_meter));
+"enu"!=c.axis&&this.adjust_axis(c,!0,b);return b},datum_transform:function(a,c,b){if(a.compare_datums(c)||a.datum_type==Proj4js.common.PJD_NODATUM||c.datum_type==Proj4js.common.PJD_NODATUM)return b;if(a.es!=c.es||a.a!=c.a||a.datum_type==Proj4js.common.PJD_3PARAM||a.datum_type==Proj4js.common.PJD_7PARAM||c.datum_type==Proj4js.common.PJD_3PARAM||c.datum_type==Proj4js.common.PJD_7PARAM)a.geodetic_to_geocentric(b),(a.datum_type==Proj4js.common.PJD_3PARAM||a.datum_type==Proj4js.common.PJD_7PARAM)&&a.geocentric_to_wgs84(b),
+(c.datum_type==Proj4js.common.PJD_3PARAM||c.datum_type==Proj4js.common.PJD_7PARAM)&&c.geocentric_from_wgs84(b),c.geocentric_to_geodetic(b);return b},adjust_axis:function(a,c,b){for(var d=b.x,e=b.y,f=b.z||0,g,i,h=0;3>h;h++)if(!c||!(2==h&&void 0===b.z))switch(0==h?(g=d,i="x"):1==h?(g=e,i="y"):(g=f,i="z"),a.axis[h]){case "e":b[i]=g;break;case "w":b[i]=-g;break;case "n":b[i]=g;break;case "s":b[i]=-g;break;case "u":void 0!==b[i]&&(b.z=g);break;case "d":void 0!==b[i]&&(b.z=-g);break;default:return alert("ERROR: unknow axis ("+
+a.axis[h]+") - check definition of "+a.projName),null}return b},reportError:function(){},extend:function(a,c){a=a||{};if(c)for(var b in c){var d=c[b];void 0!==d&&(a[b]=d)}return a},Class:function(){for(var a=function(){this.initialize.apply(this,arguments)},c={},b,d=0;d<arguments.length;++d)b="function"==typeof arguments[d]?arguments[d].prototype:arguments[d],Proj4js.extend(c,b);a.prototype=c;return a},bind:function(a,c){var b=Array.prototype.slice.apply(arguments,[2]);return function(){var d=b.concat(Array.prototype.slice.apply(arguments,
+[0]));return a.apply(c,d)}},scriptName:"proj4js-compressed.js",defsLookupService:"http://spatialreference.org/ref",libPath:null,getScriptLocation:function(){if(this.libPath)return this.libPath;for(var a=this.scriptName,c=a.length,b=document.getElementsByTagName("script"),d=0;d<b.length;d++){var e=b[d].getAttribute("src");if(e){var f=e.lastIndexOf(a);if(-1<f&&f+c==e.length){this.libPath=e.slice(0,-c);break}}}return this.libPath||""},loadScript:function(a,c,b,d){var e=document.createElement("script");
+e.defer=!1;e.type="text/javascript";e.id=a;e.src=a;e.onload=c;e.onerror=b;e.loadCheck=d;/MSIE/.test(navigator.userAgent)&&(e.onreadystatechange=this.checkReadyState);document.getElementsByTagName("head")[0].appendChild(e)},checkReadyState:function(){if("loaded"==this.readyState)if(this.loadCheck())this.onload();else this.onerror()}};
+Proj4js.Proj=Proj4js.Class({readyToUse:!1,title:null,projName:null,units:null,datum:null,x0:0,y0:0,localCS:!1,queue:null,initialize:function(a,c){this.srsCodeInput=a;this.queue=[];c&&this.queue.push(c);if(0<=a.indexOf("GEOGCS")||0<=a.indexOf("GEOCCS")||0<=a.indexOf("PROJCS")||0<=a.indexOf("LOCAL_CS"))this.parseWKT(a),this.deriveConstants(),this.loadProjCode(this.projName);else{if(0==a.indexOf("urn:")){var b=a.split(":");if(("ogc"==b[1]||"x-ogc"==b[1])&&"def"==b[2]&&"crs"==b[3])a=b[4]+":"+b[b.length-
+1]}else 0==a.indexOf("http://")&&(b=a.split("#"),b[0].match(/epsg.org/)?a="EPSG:"+b[1]:b[0].match(/RIG.xml/)&&(a="IGNF:"+b[1]));this.srsCode=a.toUpperCase();0==this.srsCode.indexOf("EPSG")?(this.srsCode=this.srsCode,this.srsAuth="epsg",this.srsProjNumber=this.srsCode.substring(5)):0==this.srsCode.indexOf("IGNF")?(this.srsCode=this.srsCode,this.srsAuth="IGNF",this.srsProjNumber=this.srsCode.substring(5)):0==this.srsCode.indexOf("CRS")?(this.srsCode=this.srsCode,this.srsAuth="CRS",this.srsProjNumber=
+this.srsCode.substring(4)):(this.srsAuth="",this.srsProjNumber=this.srsCode);this.loadProjDefinition()}},loadProjDefinition:function(){if(Proj4js.defs[this.srsCode])this.defsLoaded();else{var a=Proj4js.getScriptLocation()+"defs/"+this.srsAuth.toUpperCase()+this.srsProjNumber+".js";Proj4js.loadScript(a,Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.loadFromService,this),Proj4js.bind(this.checkDefsLoaded,this))}},loadFromService:function(){Proj4js.loadScript(Proj4js.defsLookupService+"/"+this.srsAuth+
+"/"+this.srsProjNumber+"/proj4js/",Proj4js.bind(this.defsLoaded,this),Proj4js.bind(this.defsFailed,this),Proj4js.bind(this.checkDefsLoaded,this))},defsLoaded:function(){this.parseDefs();this.loadProjCode(this.projName)},checkDefsLoaded:function(){return Proj4js.defs[this.srsCode]?!0:!1},defsFailed:function(){Proj4js.reportError("failed to load projection definition for: "+this.srsCode);Proj4js.defs[this.srsCode]=Proj4js.defs.WGS84;this.defsLoaded()},loadProjCode:function(a){if(Proj4js.Proj[a])this.initTransforms();
+else{var c=Proj4js.getScriptLocation()+"projCode/"+a+".js";Proj4js.loadScript(c,Proj4js.bind(this.loadProjCodeSuccess,this,a),Proj4js.bind(this.loadProjCodeFailure,this,a),Proj4js.bind(this.checkCodeLoaded,this,a))}},loadProjCodeSuccess:function(a){Proj4js.Proj[a].dependsOn?this.loadProjCode(Proj4js.Proj[a].dependsOn):this.initTransforms()},loadProjCodeFailure:function(a){Proj4js.reportError("failed to find projection file for: "+a)},checkCodeLoaded:function(a){return Proj4js.Proj[a]?!0:!1},initTransforms:function(){Proj4js.extend(this,
+Proj4js.Proj[this.projName]);this.init();this.readyToUse=!0;if(this.queue)for(var a;a=this.queue.shift();)a.call(this,this)},wktRE:/^(\w+)\[(.*)\]$/,parseWKT:function(a){if(a=a.match(this.wktRE)){var c=a[1],b=a[2].split(","),d;d="TOWGS84"==c.toUpperCase()?c:b.shift();d=d.replace(/^\"/,"");d=d.replace(/\"$/,"");for(var a=[],e=0,f="",g=0;g<b.length;++g){for(var i=b[g],h=0;h<i.length;++h)"["==i.charAt(h)&&++e,"]"==i.charAt(h)&&--e;f+=i;0===e?(a.push(f),f=""):f+=","}switch(c){case "LOCAL_CS":this.projName=
+"identity";this.localCS=!0;this.srsCode=d;break;case "GEOGCS":this.projName="longlat";this.geocsCode=d;this.srsCode||(this.srsCode=d);break;case "PROJCS":this.srsCode=d;break;case "PROJECTION":this.projName=Proj4js.wktProjections[d];break;case "DATUM":this.datumName=d;break;case "LOCAL_DATUM":this.datumCode="none";break;case "SPHEROID":this.ellps=d;this.a=parseFloat(a.shift());this.rf=parseFloat(a.shift());break;case "PRIMEM":this.from_greenwich=parseFloat(a.shift());break;case "UNIT":this.units=
+d;this.unitsPerMeter=parseFloat(a.shift());break;case "PARAMETER":c=d.toLowerCase();b=parseFloat(a.shift());switch(c){case "false_easting":this.x0=b;break;case "false_northing":this.y0=b;break;case "scale_factor":this.k0=b;break;case "central_meridian":this.long0=b*Proj4js.common.D2R;break;case "latitude_of_origin":this.lat0=b*Proj4js.common.D2R}break;case "TOWGS84":this.datum_params=a;break;case "AXIS":c=d.toLowerCase();b=a.shift();switch(b){case "EAST":b="e";break;case "WEST":b="w";break;case "NORTH":b=
+"n";break;case "SOUTH":b="s";break;case "UP":b="u";break;case "DOWN":b="d";break;default:b=" "}this.axis||(this.axis="enu");switch(c){case "x":this.axis=b+this.axis.substr(1,2);break;case "y":this.axis=this.axis.substr(0,1)+b+this.axis.substr(2,1);break;case "z":this.axis=this.axis.substr(0,2)+b}}for(g=0;g<a.length;++g)this.parseWKT(a[g])}},parseDefs:function(){this.defData=Proj4js.defs[this.srsCode];var a,c;if(this.defData){for(var b=this.defData.split("+"),d=0;d<b.length;d++)switch(c=b[d].split("="),
+a=c[0].toLowerCase(),c=c[1],a.replace(/\s/gi,"")){case "title":this.title=c;break;case "proj":this.projName=c.replace(/\s/gi,"");break;case "units":this.units=c.replace(/\s/gi,"");break;case "datum":this.datumCode=c.replace(/\s/gi,"");break;case "nadgrids":this.nagrids=c.replace(/\s/gi,"");break;case "ellps":this.ellps=c.replace(/\s/gi,"");break;case "a":this.a=parseFloat(c);break;case "b":this.b=parseFloat(c);break;case "rf":this.rf=parseFloat(c);break;case "lat_0":this.lat0=c*Proj4js.common.D2R;
+break;case "lat_1":this.lat1=c*Proj4js.common.D2R;break;case "lat_2":this.lat2=c*Proj4js.common.D2R;break;case "lat_ts":this.lat_ts=c*Proj4js.common.D2R;break;case "lon_0":this.long0=c*Proj4js.common.D2R;break;case "alpha":this.alpha=parseFloat(c)*Proj4js.common.D2R;break;case "lonc":this.longc=c*Proj4js.common.D2R;break;case "x_0":this.x0=parseFloat(c);break;case "y_0":this.y0=parseFloat(c);break;case "k_0":this.k0=parseFloat(c);break;case "k":this.k0=parseFloat(c);break;case "r_a":this.R_A=!0;break;
+case "zone":this.zone=parseInt(c,10);break;case "south":this.utmSouth=!0;break;case "towgs84":this.datum_params=c.split(",");break;case "to_meter":this.to_meter=parseFloat(c);break;case "from_greenwich":this.from_greenwich=c*Proj4js.common.D2R;break;case "pm":c=c.replace(/\s/gi,"");this.from_greenwich=Proj4js.PrimeMeridian[c]?Proj4js.PrimeMeridian[c]:parseFloat(c);this.from_greenwich*=Proj4js.common.D2R;break;case "axis":c=c.replace(/\s/gi,""),3==c.length&&-1!="ewnsud".indexOf(c.substr(0,1))&&-1!=
+"ewnsud".indexOf(c.substr(1,1))&&-1!="ewnsud".indexOf(c.substr(2,1))&&(this.axis=c)}this.deriveConstants()}},deriveConstants:function(){"@null"==this.nagrids&&(this.datumCode="none");if(this.datumCode&&"none"!=this.datumCode){var a=Proj4js.Datum[this.datumCode];a&&(this.datum_params=a.towgs84?a.towgs84.split(","):null,this.ellps=a.ellipse,this.datumName=a.datumName?a.datumName:this.datumCode)}this.a||Proj4js.extend(this,Proj4js.Ellipsoid[this.ellps]?Proj4js.Ellipsoid[this.ellps]:Proj4js.Ellipsoid.WGS84);
+this.rf&&!this.b&&(this.b=(1-1/this.rf)*this.a);if(0===this.rf||Math.abs(this.a-this.b)<Proj4js.common.EPSLN)this.sphere=!0,this.b=this.a;this.a2=this.a*this.a;this.b2=this.b*this.b;this.es=(this.a2-this.b2)/this.a2;this.e=Math.sqrt(this.es);this.R_A&&(this.a*=1-this.es*(Proj4js.common.SIXTH+this.es*(Proj4js.common.RA4+this.es*Proj4js.common.RA6)),this.a2=this.a*this.a,this.b2=this.b*this.b,this.es=0);this.ep2=(this.a2-this.b2)/this.b2;this.k0||(this.k0=1);this.axis||(this.axis="enu");this.datum=
+new Proj4js.datum(this)}});Proj4js.Proj.longlat={init:function(){},forward:function(a){return a},inverse:function(a){return a}};Proj4js.Proj.identity=Proj4js.Proj.longlat;
+Proj4js.defs={WGS84:"+title=long/lat:WGS84 +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","EPSG:4326":"+title=long/lat:WGS84 +proj=longlat +a=6378137.0 +b=6356752.31424518 +ellps=WGS84 +datum=WGS84 +units=degrees","EPSG:4269":"+title=long/lat:NAD83 +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees","EPSG:3875":"+title= Google Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"};
+Proj4js.defs["EPSG:3785"]=Proj4js.defs["EPSG:3875"];Proj4js.defs.GOOGLE=Proj4js.defs["EPSG:3875"];Proj4js.defs["EPSG:900913"]=Proj4js.defs["EPSG:3875"];Proj4js.defs["EPSG:102113"]=Proj4js.defs["EPSG:3875"];
+Proj4js.common={PI:3.141592653589793,HALF_PI:1.5707963267948966,TWO_PI:6.283185307179586,FORTPI:0.7853981633974483,R2D:57.29577951308232,D2R:0.017453292519943295,SEC_TO_RAD:4.84813681109536E-6,EPSLN:1.0E-10,MAX_ITER:20,COS_67P5:0.3826834323650898,AD_C:1.0026,PJD_UNKNOWN:0,PJD_3PARAM:1,PJD_7PARAM:2,PJD_GRIDSHIFT:3,PJD_WGS84:4,PJD_NODATUM:5,SRS_WGS84_SEMIMAJOR:6378137,SIXTH:0.16666666666666666,RA4:0.04722222222222222,RA6:0.022156084656084655,RV4:0.06944444444444445,RV6:0.04243827160493827,msfnz:function(a,
+c,b){a*=c;return b/Math.sqrt(1-a*a)},tsfnz:function(a,c,b){b*=a;b=Math.pow((1-b)/(1+b),0.5*a);return Math.tan(0.5*(this.HALF_PI-c))/b},phi2z:function(a,c){for(var b=0.5*a,d,e=this.HALF_PI-2*Math.atan(c),f=0;15>=f;f++)if(d=a*Math.sin(e),d=this.HALF_PI-2*Math.atan(c*Math.pow((1-d)/(1+d),b))-e,e+=d,1.0E-10>=Math.abs(d))return e;alert("phi2z has NoConvergence");return-9999},qsfnz:function(a,c){var b;return 1.0E-7<a?(b=a*c,(1-a*a)*(c/(1-b*b)-0.5/a*Math.log((1-b)/(1+b)))):2*c},asinz:function(a){1<Math.abs(a)&&
+(a=1<a?1:-1);return Math.asin(a)},e0fn:function(a){return 1-0.25*a*(1+a/16*(3+1.25*a))},e1fn:function(a){return 0.375*a*(1+0.25*a*(1+0.46875*a))},e2fn:function(a){return 0.05859375*a*a*(1+0.75*a)},e3fn:function(a){return a*a*a*(35/3072)},mlfn:function(a,c,b,d,e){return a*e-c*Math.sin(2*e)+b*Math.sin(4*e)-d*Math.sin(6*e)},srat:function(a,c){return Math.pow((1-a)/(1+a),c)},sign:function(a){return 0>a?-1:1},adjust_lon:function(a){return a=Math.abs(a)<this.PI?a:a-this.sign(a)*this.TWO_PI},adjust_lat:function(a){return a=
+Math.abs(a)<this.HALF_PI?a:a-this.sign(a)*this.PI},latiso:function(a,c,b){if(Math.abs(c)>this.HALF_PI)return+Number.NaN;if(c==this.HALF_PI)return Number.POSITIVE_INFINITY;if(c==-1*this.HALF_PI)return-1*Number.POSITIVE_INFINITY;b*=a;return Math.log(Math.tan((this.HALF_PI+c)/2))+a*Math.log((1-b)/(1+b))/2},fL:function(a,c){return 2*Math.atan(a*Math.exp(c))-this.HALF_PI},invlatiso:function(a,c){var b=this.fL(1,c),d=0,e=0;do d=b,e=a*Math.sin(d),b=this.fL(Math.exp(a*Math.log((1+e)/(1-e))/2),c);while(1.0E-12<
+Math.abs(b-d));return b},sinh:function(a){a=Math.exp(a);return(a-1/a)/2},cosh:function(a){a=Math.exp(a);return(a+1/a)/2},tanh:function(a){a=Math.exp(a);return(a-1/a)/(a+1/a)},asinh:function(a){return(0<=a?1:-1)*Math.log(Math.abs(a)+Math.sqrt(a*a+1))},acosh:function(a){return 2*Math.log(Math.sqrt((a+1)/2)+Math.sqrt((a-1)/2))},atanh:function(a){return Math.log((a-1)/(a+1))/2},gN:function(a,c,b){c*=b;return a/Math.sqrt(1-c*c)},pj_enfn:function(a){var c=[];c[0]=this.C00-a*(this.C02+a*(this.C04+a*(this.C06+
+a*this.C08)));c[1]=a*(this.C22-a*(this.C04+a*(this.C06+a*this.C08)));var b=a*a;c[2]=b*(this.C44-a*(this.C46+a*this.C48));b*=a;c[3]=b*(this.C66-a*this.C68);c[4]=b*a*this.C88;return c},pj_mlfn:function(a,c,b,d){b*=c;c*=c;return d[0]*a-b*(d[1]+c*(d[2]+c*(d[3]+c*d[4])))},pj_inv_mlfn:function(a,c,b){for(var d=1/(1-c),e=a,f=Proj4js.common.MAX_ITER;f;--f){var g=Math.sin(e),i=1-c*g*g,i=(this.pj_mlfn(e,g,Math.cos(e),b)-a)*i*Math.sqrt(i)*d,e=e-i;if(Math.abs(i)<Proj4js.common.EPSLN)return e}Proj4js.reportError("cass:pj_inv_mlfn: Convergence error");
+return e},C00:1,C02:0.25,C04:0.046875,C06:0.01953125,C08:0.01068115234375,C22:0.75,C44:0.46875,C46:0.013020833333333334,C48:0.007120768229166667,C66:0.3645833333333333,C68:0.005696614583333333,C88:0.3076171875};
+Proj4js.datum=Proj4js.Class({initialize:function(a){this.datum_type=Proj4js.common.PJD_WGS84;a.datumCode&&"none"==a.datumCode&&(this.datum_type=Proj4js.common.PJD_NODATUM);if(a&&a.datum_params){for(var c=0;c<a.datum_params.length;c++)a.datum_params[c]=parseFloat(a.datum_params[c]);if(0!=a.datum_params[0]||0!=a.datum_params[1]||0!=a.datum_params[2])this.datum_type=Proj4js.common.PJD_3PARAM;if(3<a.datum_params.length&&(0!=a.datum_params[3]||0!=a.datum_params[4]||0!=a.datum_params[5]||0!=a.datum_params[6]))this.datum_type=
+Proj4js.common.PJD_7PARAM,a.datum_params[3]*=Proj4js.common.SEC_TO_RAD,a.datum_params[4]*=Proj4js.common.SEC_TO_RAD,a.datum_params[5]*=Proj4js.common.SEC_TO_RAD,a.datum_params[6]=a.datum_params[6]/1E6+1}a&&(this.a=a.a,this.b=a.b,this.es=a.es,this.ep2=a.ep2,this.datum_params=a.datum_params)},compare_datums:function(a){return this.datum_type!=a.datum_type||this.a!=a.a||5.0E-11<Math.abs(this.es-a.es)?!1:this.datum_type==Proj4js.common.PJD_3PARAM?this.datum_params[0]==a.datum_params[0]&&this.datum_params[1]==
+a.datum_params[1]&&this.datum_params[2]==a.datum_params[2]:this.datum_type==Proj4js.common.PJD_7PARAM?this.datum_params[0]==a.datum_params[0]&&this.datum_params[1]==a.datum_params[1]&&this.datum_params[2]==a.datum_params[2]&&this.datum_params[3]==a.datum_params[3]&&this.datum_params[4]==a.datum_params[4]&&this.datum_params[5]==a.datum_params[5]&&this.datum_params[6]==a.datum_params[6]:this.datum_type==Proj4js.common.PJD_GRIDSHIFT||a.datum_type==Proj4js.common.PJD_GRIDSHIFT?(alert("ERROR: Grid shift transformations are not implemented."),
+!1):!0},geodetic_to_geocentric:function(a){var c=a.x,b=a.y,d=a.z?a.z:0,e,f,g;if(b<-Proj4js.common.HALF_PI&&b>-1.001*Proj4js.common.HALF_PI)b=-Proj4js.common.HALF_PI;else if(b>Proj4js.common.HALF_PI&&b<1.001*Proj4js.common.HALF_PI)b=Proj4js.common.HALF_PI;else if(b<-Proj4js.common.HALF_PI||b>Proj4js.common.HALF_PI)return Proj4js.reportError("geocent:lat out of range:"+b),null;c>Proj4js.common.PI&&(c-=2*Proj4js.common.PI);f=Math.sin(b);g=Math.cos(b);e=this.a/Math.sqrt(1-this.es*f*f);b=(e+d)*g*Math.cos(c);
+c=(e+d)*g*Math.sin(c);d=(e*(1-this.es)+d)*f;a.x=b;a.y=c;a.z=d;return 0},geocentric_to_geodetic:function(a){var c,b,d,e,f,g,i,h,j,k,l=a.x;d=a.y;var m=a.z?a.z:0;c=Math.sqrt(l*l+d*d);b=Math.sqrt(l*l+d*d+m*m);if(1.0E-12>c/this.a){if(l=0,1.0E-12>b/this.a)return}else l=Math.atan2(d,l);d=m/b;e=c/b;f=1/Math.sqrt(1-this.es*(2-this.es)*e*e);i=e*(1-this.es)*f;h=d*f;k=0;do k++,g=this.a/Math.sqrt(1-this.es*h*h),b=c*i+m*h-g*(1-this.es*h*h),g=this.es*g/(g+b),f=1/Math.sqrt(1-g*(2-g)*e*e),g=e*(1-g)*f,f*=d,j=f*i-g*
+h,i=g,h=f;while(1.0E-24<j*j&&30>k);c=Math.atan(f/Math.abs(g));a.x=l;a.y=c;a.z=b;return a},geocentric_to_geodetic_noniter:function(a){var c=a.x,b=a.y,d=a.z?a.z:0,e,f,g,i,h,c=parseFloat(c),b=parseFloat(b),d=parseFloat(d);h=!1;if(0!=c)e=Math.atan2(b,c);else if(0<b)e=Proj4js.common.HALF_PI;else if(0>b)e=-Proj4js.common.HALF_PI;else if(h=!0,e=0,0<d)f=Proj4js.common.HALF_PI;else if(0>d)f=-Proj4js.common.HALF_PI;else return;g=c*c+b*b;c=Math.sqrt(g);b=d*Proj4js.common.AD_C;g=Math.sqrt(b*b+g);b/=g;g=c/g;b=
+d+this.b*this.ep2*b*b*b;i=c-this.a*this.es*g*g*g;g=Math.sqrt(b*b+i*i);b/=g;g=i/g;i=this.a/Math.sqrt(1-this.es*b*b);d=g>=Proj4js.common.COS_67P5?c/g-i:g<=-Proj4js.common.COS_67P5?c/-g-i:d/b+i*(this.es-1);!1==h&&(f=Math.atan(b/g));a.x=e;a.y=f;a.z=d;return a},geocentric_to_wgs84:function(a){if(this.datum_type==Proj4js.common.PJD_3PARAM)a.x+=this.datum_params[0],a.y+=this.datum_params[1],a.z+=this.datum_params[2];else if(this.datum_type==Proj4js.common.PJD_7PARAM){var c=this.datum_params[3],b=this.datum_params[4],
+d=this.datum_params[5],e=this.datum_params[6],f=e*(d*a.x+a.y-c*a.z)+this.datum_params[1],c=e*(-b*a.x+c*a.y+a.z)+this.datum_params[2];a.x=e*(a.x-d*a.y+b*a.z)+this.datum_params[0];a.y=f;a.z=c}},geocentric_from_wgs84:function(a){if(this.datum_type==Proj4js.common.PJD_3PARAM)a.x-=this.datum_params[0],a.y-=this.datum_params[1],a.z-=this.datum_params[2];else if(this.datum_type==Proj4js.common.PJD_7PARAM){var c=this.datum_params[3],b=this.datum_params[4],d=this.datum_params[5],e=this.datum_params[6],f=(a.x-
+this.datum_params[0])/e,g=(a.y-this.datum_params[1])/e,e=(a.z-this.datum_params[2])/e;a.x=f+d*g-b*e;a.y=-d*f+g+c*e;a.z=b*f-c*g+e}}});
+Proj4js.Point=Proj4js.Class({initialize:function(a,c,b){"object"==typeof a?(this.x=a[0],this.y=a[1],this.z=a[2]||0):"string"==typeof a&&"undefined"==typeof c?(a=a.split(","),this.x=parseFloat(a[0]),this.y=parseFloat(a[1]),this.z=parseFloat(a[2])||0):(this.x=a,this.y=c,this.z=b||0)},clone:function(){return new Proj4js.Point(this.x,this.y,this.z)},toString:function(){return"x="+this.x+",y="+this.y},toShortString:function(){return this.x+", "+this.y}});
+Proj4js.PrimeMeridian={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};
+Proj4js.Ellipsoid={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},"APL4.":{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},
+andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},CPM:{a:6375738.7,rf:334.29,
+ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},
+fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},
+new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS72:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},
+sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};
+Proj4js.Datum={WGS84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},GGRS87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},NAD83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},NAD27:{nadgrids:"@conus, at alaska, at ntv2_0.gsb, at ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",
+ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},OSGB36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"}};
+Proj4js.WGS84=new Proj4js.Proj("WGS84");Proj4js.Datum.OSB36=Proj4js.Datum.OSGB36;Proj4js.wktProjections={"Lambert Tangential Conformal Conic Projection":"lcc",Mercator:"merc","Popular Visualisation Pseudo Mercator":"merc",Mercator_1SP:"merc",Transverse_Mercator:"tmerc","Transverse Mercator":"tmerc","Lambert Azimuthal Equal Area":"laea","Universal Transverse Mercator System":"utm"};
+Proj4js.Proj.aea={init:function(){Math.abs(this.lat1+this.lat2)<Proj4js.common.EPSLN?Proj4js.reportError("aeaInitEqualLatitudes"):(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.con=this.t1=this.sin_po,this.ms1=Proj4js.common.msfnz(this.e3,this.sin_po,this.cos_po),this.qs1=Proj4js.common.qsfnz(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=
+this.sin_po,this.ms2=Proj4js.common.msfnz(this.e3,this.sin_po,this.cos_po),this.qs2=Proj4js.common.qsfnz(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Proj4js.common.qsfnz(this.e3,this.sin_po,this.cos_po),this.ns0=Math.abs(this.lat1-this.lat2)>Proj4js.common.EPSLN?(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/
+this.ns0)},forward:function(a){var c=a.x,b=a.y;this.sin_phi=Math.sin(b);this.cos_phi=Math.cos(b);var b=Proj4js.common.qsfnz(this.e3,this.sin_phi,this.cos_phi),b=this.a*Math.sqrt(this.c-this.ns0*b)/this.ns0,d=this.ns0*Proj4js.common.adjust_lon(c-this.long0),c=b*Math.sin(d)+this.x0,b=this.rh-b*Math.cos(d)+this.y0;a.x=c;a.y=b;return a},inverse:function(a){var c,b,d;a.x-=this.x0;a.y=this.rh-a.y+this.y0;0<=this.ns0?(c=Math.sqrt(a.x*a.x+a.y*a.y),b=1):(c=-Math.sqrt(a.x*a.x+a.y*a.y),b=-1);d=0;0!=c&&(d=Math.atan2(b*
+a.x,b*a.y));b=c*this.ns0/this.a;c=(this.c-b*b)/this.ns0;1.0E-10<=this.e3?(b=1-0.5*(1-this.es)*Math.log((1-this.e3)/(1+this.e3))/this.e3,b=1.0E-10<Math.abs(Math.abs(b)-Math.abs(c))?this.phi1z(this.e3,c):0<=c?0.5*Proj4js.common.PI:-0.5*Proj4js.common.PI):b=this.phi1z(this.e3,c);d=Proj4js.common.adjust_lon(d/this.ns0+this.long0);a.x=d;a.y=b;return a},phi1z:function(a,c){var b,d,e,f,g=Proj4js.common.asinz(0.5*c);if(a<Proj4js.common.EPSLN)return g;for(var i=a*a,h=1;25>=h;h++)if(b=Math.sin(g),d=Math.cos(g),
+e=a*b,f=1-e*e,b=0.5*f*f/d*(c/(1-i)-b/f+0.5/a*Math.log((1-e)/(1+e))),g+=b,1.0E-7>=Math.abs(b))return g;Proj4js.reportError("aea:phi1z:Convergence error");return null}};
+Proj4js.Proj.sterea={dependsOn:"gauss",init:function(){Proj4js.Proj.gauss.init.apply(this);this.rc?(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative")):Proj4js.reportError("sterea:init:E_ERROR_0")},forward:function(a){var c,b,d,e;a.x=Proj4js.common.adjust_lon(a.x-this.long0);Proj4js.Proj.gauss.forward.apply(this,[a]);c=Math.sin(a.y);b=Math.cos(a.y);d=Math.cos(a.x);e=this.k0*this.R2/(1+this.sinc0*c+this.cosc0*
+b*d);a.x=e*b*Math.sin(a.x);a.y=e*(this.cosc0*c-this.sinc0*b*d);a.x=this.a*a.x+this.x0;a.y=this.a*a.y+this.y0;return a},inverse:function(a){var c,b,d,e;a.x=(a.x-this.x0)/this.a;a.y=(a.y-this.y0)/this.a;a.x/=this.k0;a.y/=this.k0;(e=Math.sqrt(a.x*a.x+a.y*a.y))?(d=2*Math.atan2(e,this.R2),c=Math.sin(d),b=Math.cos(d),d=Math.asin(b*this.sinc0+a.y*c*this.cosc0/e),c=Math.atan2(a.x*c,e*this.cosc0*b-a.y*this.sinc0*c)):(d=this.phic0,c=0);a.x=c;a.y=d;Proj4js.Proj.gauss.inverse.apply(this,[a]);a.x=Proj4js.common.adjust_lon(a.x+
+this.long0);return a}};function phi4z(a,c,b,d,e,f,g,i,h){var j,k,l,m,n,o,h=f;for(o=1;15>=o;o++)if(j=Math.sin(h),l=Math.tan(h),i=l*Math.sqrt(1-a*j*j),k=Math.sin(2*h),m=c*h-b*k+d*Math.sin(4*h)-e*Math.sin(6*h),n=c-2*b*Math.cos(2*h)+4*d*Math.cos(4*h)-6*e*Math.cos(6*h),j=2*m+i*(m*m+g)-2*f*(i*m+1),l=a*k*(m*m+g-2*f*m)/(2*i),i=2*(f-m)*(i*n-2/k)-2*n,j/=l+i,h+=j,1.0E-10>=Math.abs(j))return h;Proj4js.reportError("phi4z: No convergence");return null}
+function e4fn(a){var c;c=1+a;a=1-a;return Math.sqrt(Math.pow(c,c)*Math.pow(a,a))}
+Proj4js.Proj.poly={init:function(){0==this.lat0&&(this.lat0=90);this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.ml0=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(a){var c,b,d,e,f;d=a.y;b=Proj4js.common.adjust_lon(a.x-this.long0);1.0E-7>=Math.abs(d)?(f=this.x0+this.a*b,c=this.y0-
+this.a*this.ml0):(c=Math.sin(d),b=Math.cos(d),d=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,d),e=Proj4js.common.msfnz(this.e,c,b),b=c,f=this.x0+this.a*e*Math.sin(b)/c,c=this.y0+this.a*(d-this.ml0+e*(1-Math.cos(b))/c));a.x=f;a.y=c;return a},inverse:function(a){var c,b;a.x-=this.x0;a.y-=this.y0;c=this.ml0+a.y/this.a;if(1.0E-7>=Math.abs(c))c=a.x/this.a+this.long0,b=0;else{c=c*c+a.x/this.a*(a.x/this.a);c=phi4z(this.es,this.e0,this.e1,this.e2,this.e3,this.al,c,void 0,b);if(1!=c)return c;c=Proj4js.common.adjust_lon(Proj4js.common.asinz(NaN*
+a.x/this.a)/Math.sin(b)+this.long0)}a.x=c;a.y=b;return a}};
+Proj4js.Proj.equi={init:function(){this.x0||(this.x0=0);this.y0||(this.y0=0);this.lat0||(this.lat0=0);this.long0||(this.long0=0)},forward:function(a){var c=a.y,b=this.x0+this.a*Proj4js.common.adjust_lon(a.x-this.long0)*Math.cos(this.lat0),c=this.y0+this.a*c;this.t1=b;this.t2=Math.cos(this.lat0);a.x=b;a.y=c;return a},inverse:function(a){a.x-=this.x0;a.y-=this.y0;var c=a.y/this.a;Math.abs(c)>Proj4js.common.HALF_PI&&Proj4js.reportError("equi:Inv:DataError");var b=Proj4js.common.adjust_lon(this.long0+
+a.x/(this.a*Math.cos(this.lat0)));a.x=b;a.y=c}};
+Proj4js.Proj.merc={init:function(){this.lat_ts&&(this.k0=this.sphere?Math.cos(this.lat_ts):Proj4js.common.msfnz(this.es,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(a){var c=a.x,b=a.y;if(90<b*Proj4js.common.R2D&&-90>b*Proj4js.common.R2D&&180<c*Proj4js.common.R2D&&-180>c*Proj4js.common.R2D)return Proj4js.reportError("merc:forward: llInputOutOfRange: "+c+" : "+b),null;if(Math.abs(Math.abs(b)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN)return Proj4js.reportError("merc:forward: ll2mAtPoles"),null;
+if(this.sphere)c=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(c-this.long0),b=this.y0+this.a*this.k0*Math.log(Math.tan(Proj4js.common.FORTPI+0.5*b));else var d=Math.sin(b),b=Proj4js.common.tsfnz(this.e,b,d),c=this.x0+this.a*this.k0*Proj4js.common.adjust_lon(c-this.long0),b=this.y0-this.a*this.k0*Math.log(b);a.x=c;a.y=b;return a},inverse:function(a){var c=a.x-this.x0,b=a.y-this.y0;if(this.sphere)b=Proj4js.common.HALF_PI-2*Math.atan(Math.exp(-b/this.a*this.k0));else if(b=Math.exp(-b/(this.a*this.k0)),
+b=Proj4js.common.phi2z(this.e,b),-9999==b)return Proj4js.reportError("merc:inverse: lat = -9999"),null;c=Proj4js.common.adjust_lon(this.long0+c/(this.a*this.k0));a.x=c;a.y=b;return a}};Proj4js.Proj.utm={dependsOn:"tmerc",init:function(){this.zone?(this.lat0=0,this.long0=(6*Math.abs(this.zone)-183)*Proj4js.common.D2R,this.x0=5E5,this.y0=this.utmSouth?1E7:0,this.k0=0.9996,Proj4js.Proj.tmerc.init.apply(this),this.forward=Proj4js.Proj.tmerc.forward,this.inverse=Proj4js.Proj.tmerc.inverse):Proj4js.reportError("utm:init: zone must be specified for UTM")}};
+Proj4js.Proj.eqdc={init:function(){this.mode||(this.mode=0);this.temp=this.b/this.a;this.es=1-Math.pow(this.temp,2);this.e=Math.sqrt(this.es);this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.sinphi=Math.sin(this.lat1);this.cosphi=Math.cos(this.lat1);this.ms1=Proj4js.common.msfnz(this.e,this.sinphi,this.cosphi);this.ml1=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat1);0!=this.mode?
+(Math.abs(this.lat1+this.lat2)<Proj4js.common.EPSLN&&Proj4js.reportError("eqdc:Init:EqualLatitudes"),this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Proj4js.common.msfnz(this.e,this.sinphi,this.cosphi),this.ml2=Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=Math.abs(this.lat1-this.lat2)>=Proj4js.common.EPSLN?(this.ms1-this.ms2)/(this.ml2-this.ml1):this.sinphi):this.ns=this.sinphi;this.g=this.ml1+this.ms1/this.ns;this.ml0=Proj4js.common.mlfn(this.e0,
+this.e1,this.e2,this.e3,this.lat0);this.rh=this.a*(this.g-this.ml0)},forward:function(a){var c=a.x,b=this.a*(this.g-Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,a.y)),d=this.ns*Proj4js.common.adjust_lon(c-this.long0),c=this.x0+b*Math.sin(d),b=this.y0+this.rh-b*Math.cos(d);a.x=c;a.y=b;return a},inverse:function(a){a.x-=this.x0;a.y=this.rh-a.y+this.y0;var c,b;0<=this.ns?(b=Math.sqrt(a.x*a.x+a.y*a.y),c=1):(b=-Math.sqrt(a.x*a.x+a.y*a.y),c=-1);var d=0;0!=b&&(d=Math.atan2(c*a.x,c*a.y));c=this.phi3z(this.g-
+b/this.a,this.e0,this.e1,this.e2,this.e3);d=Proj4js.common.adjust_lon(this.long0+d/this.ns);a.x=d;a.y=c;return a},phi3z:function(a,c,b,d,e){var f,g;f=a;for(var i=0;15>i;i++)if(g=(a+b*Math.sin(2*f)-d*Math.sin(4*f)+e*Math.sin(6*f))/c-f,f+=g,1.0E-10>=Math.abs(g))return f;Proj4js.reportError("PHI3Z-CONV:Latitude failed to converge after 15 iterations");return null}};
+Proj4js.Proj.tmerc={init:function(){this.e0=Proj4js.common.e0fn(this.es);this.e1=Proj4js.common.e1fn(this.es);this.e2=Proj4js.common.e2fn(this.es);this.e3=Proj4js.common.e3fn(this.es);this.ml0=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(a){var c=a.y,b=Proj4js.common.adjust_lon(a.x-this.long0),d,e;d=Math.sin(c);var f=Math.cos(c);if(this.sphere){var g=f*Math.sin(b);if(1.0E-10>Math.abs(Math.abs(g)-1))return Proj4js.reportError("tmerc:forward: Point projects into infinity"),
+93;e=0.5*this.a*this.k0*Math.log((1+g)/(1-g));d=Math.acos(f*Math.cos(b)/Math.sqrt(1-g*g));0>c&&(d=-d);c=this.a*this.k0*(d-this.lat0)}else{e=f*b;var b=Math.pow(e,2),f=this.ep2*Math.pow(f,2),g=Math.tan(c),i=Math.pow(g,2);d=1-this.es*Math.pow(d,2);d=this.a/Math.sqrt(d);c=this.a*Proj4js.common.mlfn(this.e0,this.e1,this.e2,this.e3,c);e=this.k0*d*e*(1+b/6*(1-i+f+b/20*(5-18*i+Math.pow(i,2)+72*f-58*this.ep2)))+this.x0;c=this.k0*(c-this.ml0+d*g*b*(0.5+b/24*(5-i+9*f+4*Math.pow(f,2)+b/30*(61-58*i+Math.pow(i,
+2)+600*f-330*this.ep2))))+this.y0}a.x=e;a.y=c;return a},inverse:function(a){var c,b,d,e;if(this.sphere){b=Math.exp(a.x/(this.a*this.k0));var f=0.5*(b-1/b);d=this.lat0+a.y/(this.a*this.k0);e=Math.cos(d);c=Math.sqrt((1-e*e)/(1+f*f));b=Proj4js.common.asinz(c);0>d&&(b=-b);c=0==f&&0==e?this.long0:Proj4js.common.adjust_lon(Math.atan2(f,e)+this.long0)}else{var f=a.x-this.x0,g=a.y-this.y0;b=c=(this.ml0+g/this.k0)/this.a;for(e=0;;e++){d=(c+this.e1*Math.sin(2*b)-this.e2*Math.sin(4*b)+this.e3*Math.sin(6*b))/
+this.e0-b;b+=d;if(Math.abs(d)<=Proj4js.common.EPSLN)break;if(6<=e)return Proj4js.reportError("tmerc:inverse: Latitude failed to converge"),95}if(Math.abs(b)<Proj4js.common.HALF_PI){c=Math.sin(b);d=Math.cos(b);var i=Math.tan(b);e=this.ep2*Math.pow(d,2);var g=Math.pow(e,2),h=Math.pow(i,2),j=Math.pow(h,2);c=1-this.es*Math.pow(c,2);var k=this.a/Math.sqrt(c);c=k*(1-this.es)/c;var f=f/(k*this.k0),l=Math.pow(f,2);b-=k*i*l/c*(0.5-l/24*(5+3*h+10*e-4*g-9*this.ep2-l/30*(61+90*h+298*e+45*j-252*this.ep2-3*g)));
+c=Proj4js.common.adjust_lon(this.long0+f*(1-l/6*(1+2*h+e-l/20*(5-2*e+28*h-3*g+8*this.ep2+24*j)))/d)}else b=Proj4js.common.HALF_PI*Proj4js.common.sign(g),c=this.long0}a.x=c;a.y=b;return a}};Proj4js.defs.GOOGLE="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs";Proj4js.defs["EPSG:900913"]=Proj4js.defs.GOOGLE;
+Proj4js.Proj.gstmerc={init:function(){var a=this.b/this.a;this.e=Math.sqrt(1-a*a);this.lc=this.long0;this.rs=Math.sqrt(1+this.e*this.e*Math.pow(Math.cos(this.lat0),4)/(1-this.e*this.e));var a=Math.sin(this.lat0),c=Math.asin(a/this.rs),b=Math.sin(c);this.cp=Proj4js.common.latiso(0,c,b)-this.rs*Proj4js.common.latiso(this.e,this.lat0,a);this.n2=this.k0*this.a*Math.sqrt(1-this.e*this.e)/(1-this.e*this.e*a*a);this.xs=this.x0;this.ys=this.y0-this.n2*c;this.title||(this.title="Gauss Schreiber transverse mercator")},
+forward:function(a){var c=a.y,b=this.rs*(a.x-this.lc),c=this.cp+this.rs*Proj4js.common.latiso(this.e,c,Math.sin(c)),d=Math.asin(Math.sin(b)/Proj4js.common.cosh(c)),d=Proj4js.common.latiso(0,d,Math.sin(d));a.x=this.xs+this.n2*d;a.y=this.ys+this.n2*Math.atan(Proj4js.common.sinh(c)/Math.cos(b));return a},inverse:function(a){var c=a.x,b=a.y,d=Math.atan(Proj4js.common.sinh((c-this.xs)/this.n2)/Math.cos((b-this.ys)/this.n2)),c=Math.asin(Math.sin((b-this.ys)/this.n2)/Proj4js.common.cosh((c-this.xs)/this.n2)),
+c=Proj4js.common.latiso(0,c,Math.sin(c));a.x=this.lc+d/this.rs;a.y=Proj4js.common.invlatiso(this.e,(c-this.cp)/this.rs);return a}};
+Proj4js.Proj.ortho={init:function(){this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0)},forward:function(a){var c,b,d,e,f;b=a.y;d=Proj4js.common.adjust_lon(a.x-this.long0);c=Math.sin(b);b=Math.cos(b);e=Math.cos(d);f=this.sin_p14*c+this.cos_p14*b*e;if(0<f||Math.abs(f)<=Proj4js.common.EPSLN)var g=1*this.a*b*Math.sin(d),i=this.y0+1*this.a*(this.cos_p14*c-this.sin_p14*b*e);else Proj4js.reportError("orthoFwdPointError");a.x=g;a.y=i;return a},inverse:function(a){var c,b,d,e;a.x-=this.x0;
+a.y-=this.y0;c=Math.sqrt(a.x*a.x+a.y*a.y);c>this.a+1.0E-7&&Proj4js.reportError("orthoInvDataError");b=Proj4js.common.asinz(c/this.a);d=Math.sin(b);e=Math.cos(b);b=this.long0;Math.abs(c);d=Proj4js.common.asinz(e*this.sin_p14+a.y*d*this.cos_p14/c);c=Math.abs(this.lat0)-Proj4js.common.HALF_PI;Math.abs(c)<=Proj4js.common.EPSLN&&(b=0<=this.lat0?Proj4js.common.adjust_lon(this.long0+Math.atan2(a.x,-a.y)):Proj4js.common.adjust_lon(this.long0-Math.atan2(-a.x,a.y)));Math.sin(d);a.x=b;a.y=d;return a}};
+Proj4js.Proj.krovak={init:function(){this.a=6377397.155;this.es=0.006674372230614;this.e=Math.sqrt(this.es);this.lat0||(this.lat0=0.863937979737193);this.long0||(this.long0=0.4334234309119251);this.k0||(this.k0=0.9999);this.s45=0.785398163397448;this.s90=2*this.s45;this.fi0=this.lat0;this.e2=this.es;this.e=Math.sqrt(this.e2);this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2));this.uq=1.04216856380474;this.u0=Math.asin(Math.sin(this.fi0)/this.alfa);this.g=Math.pow((1+this.e*Math.sin(this.fi0))/
+(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2);this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g;this.k1=this.k0;this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2));this.s0=1.37008346281555;this.n=Math.sin(this.s0);this.ro0=this.k1*this.n0/Math.tan(this.s0);this.ad=this.s90-this.uq},forward:function(a){var c,b,d;b=a.y;d=Proj4js.common.adjust_lon(a.x-this.long0);c=Math.pow((1+this.e*Math.sin(b))/(1-this.e*Math.sin(b)),this.alfa*
+this.e/2);c=2*(Math.atan(this.k*Math.pow(Math.tan(b/2+this.s45),this.alfa)/c)-this.s45);b=-d*this.alfa;d=Math.asin(Math.cos(this.ad)*Math.sin(c)+Math.sin(this.ad)*Math.cos(c)*Math.cos(b));c=this.n*Math.asin(Math.cos(c)*Math.sin(b)/Math.cos(d));d=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(d/2+this.s45),this.n);a.y=d*Math.cos(c)/1;a.x=d*Math.sin(c)/1;this.czech&&(a.y*=-1,a.x*=-1);return a},inverse:function(a){var c,b,d;c=a.x;a.x=a.y;a.y=c;this.czech&&(a.y*=-1,a.x*=-1);
+c=Math.sqrt(a.x*a.x+a.y*a.y);b=Math.atan2(a.y,a.x)/Math.sin(this.s0);d=2*(Math.atan(Math.pow(this.ro0/c,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45);c=Math.asin(Math.cos(this.ad)*Math.sin(d)-Math.sin(this.ad)*Math.cos(d)*Math.cos(b));b=Math.asin(Math.cos(d)*Math.sin(b)/Math.cos(c));a.x=this.long0-b/this.alfa;b=c;var e=d=0;do a.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(c/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(b))/(1-this.e*Math.sin(b)),this.e/2))-this.s45),1.0E-10>
+Math.abs(b-a.y)&&(d=1),b=a.y,e+=1;while(0==d&&15>e);return 15<=e?(Proj4js.reportError("PHI3Z-CONV:Latitude failed to converge after 15 iterations"),null):a}};
+Proj4js.Proj.somerc={init:function(){var a=this.lat0;this.lambda0=this.long0;var c=Math.sin(a),b=this.a,d=1/this.rf,d=2*d-Math.pow(d,2),e=this.e=Math.sqrt(d);this.R=this.k0*b*Math.sqrt(1-d)/(1-d*Math.pow(c,2));this.alpha=Math.sqrt(1+d/(1-d)*Math.pow(Math.cos(a),4));this.b0=Math.asin(c/this.alpha);this.K=Math.log(Math.tan(Math.PI/4+this.b0/2))-this.alpha*Math.log(Math.tan(Math.PI/4+a/2))+this.alpha*e/2*Math.log((1+e*c)/(1-e*c))},forward:function(a){var c=Math.log(Math.tan(Math.PI/4-a.y/2)),b=this.e/
+2*Math.log((1+this.e*Math.sin(a.y))/(1-this.e*Math.sin(a.y))),b=2*(Math.atan(Math.exp(-this.alpha*(c+b)+this.K))-Math.PI/4),d=this.alpha*(a.x-this.lambda0),c=Math.atan(Math.sin(d)/(Math.sin(this.b0)*Math.tan(b)+Math.cos(this.b0)*Math.cos(d))),b=Math.asin(Math.cos(this.b0)*Math.sin(b)-Math.sin(this.b0)*Math.cos(b)*Math.cos(d));a.y=this.R/2*Math.log((1+Math.sin(b))/(1-Math.sin(b)))+this.y0;a.x=this.R*c+this.x0;return a},inverse:function(a){for(var c=(a.x-this.x0)/this.R,b=2*(Math.atan(Math.exp((a.y-
+this.y0)/this.R))-Math.PI/4),d=Math.asin(Math.cos(this.b0)*Math.sin(b)+Math.sin(this.b0)*Math.cos(b)*Math.cos(c)),c=this.lambda0+Math.atan(Math.sin(c)/(Math.cos(this.b0)*Math.cos(c)-Math.sin(this.b0)*Math.tan(b)))/this.alpha,b=0,e=d,f=-1E3,g=0;1.0E-7<Math.abs(e-f);){if(20<++g){Proj4js.reportError("omercFwdInfinity");return}b=1/this.alpha*(Math.log(Math.tan(Math.PI/4+d/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(e))/2));f=e;e=2*Math.atan(Math.exp(b))-Math.PI/2}a.x=c;a.y=
+e;return a}};
+Proj4js.Proj.stere={ssfn_:function(a,c,b){c*=b;return Math.tan(0.5*(Proj4js.common.HALF_PI+a))*Math.pow((1-c)/(1+c),0.5*b)},TOL:1.0E-8,NITER:8,CONV:1.0E-10,S_POLE:0,N_POLE:1,OBLIQ:2,EQUIT:3,init:function(){this.phits=this.lat_ts?this.lat_ts:Proj4js.common.HALF_PI;var a=Math.abs(this.lat0);this.mode=Math.abs(a)-Proj4js.common.HALF_PI<Proj4js.common.EPSLN?0>this.lat0?this.S_POLE:this.N_POLE:a>Proj4js.common.EPSLN?this.OBLIQ:this.EQUIT;this.phits=Math.abs(this.phits);if(this.es){var c;switch(this.mode){case this.N_POLE:case this.S_POLE:Math.abs(this.phits-Proj4js.common.HALF_PI)<
+Proj4js.common.EPSLN?this.akm1=2*this.k0/Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)):(a=Math.sin(this.phits),this.akm1=Math.cos(this.phits)/Proj4js.common.tsfnz(this.e,this.phits,a),a*=this.e,this.akm1/=Math.sqrt(1-a*a));break;case this.EQUIT:this.akm1=2*this.k0;break;case this.OBLIQ:a=Math.sin(this.lat0),c=2*Math.atan(this.ssfn_(this.lat0,a,this.e))-Proj4js.common.HALF_PI,a*=this.e,this.akm1=2*this.k0*Math.cos(this.lat0)/Math.sqrt(1-a*a),this.sinX1=Math.sin(c),this.cosX1=Math.cos(c)}}else switch(this.mode){case this.OBLIQ:this.sinph0=
+Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0);case this.EQUIT:this.akm1=2*this.k0;break;case this.S_POLE:case this.N_POLE:this.akm1=Math.abs(this.phits-Proj4js.common.HALF_PI)>=Proj4js.common.EPSLN?Math.cos(this.phits)/Math.tan(Proj4js.common.FORTPI-0.5*this.phits):2*this.k0}},forward:function(a){var c=a.x,c=Proj4js.common.adjust_lon(c-this.long0),b=a.y,d,e;if(this.sphere){var f,g,i;f=Math.sin(b);g=Math.cos(b);i=Math.cos(c);c=Math.sin(c);switch(this.mode){case this.EQUIT:e=1+g*i;e<=Proj4js.common.EPSLN&&
+Proj4js.reportError("stere:forward:Equit");e=this.akm1/e;d=e*g*c;e*=f;break;case this.OBLIQ:e=1+this.sinph0*f+this.cosph0*g*i;e<=Proj4js.common.EPSLN&&Proj4js.reportError("stere:forward:Obliq");e=this.akm1/e;d=e*g*c;e*=this.cosph0*f-this.sinph0*g*i;break;case this.N_POLE:i=-i,b=-b;case this.S_POLE:Math.abs(b-Proj4js.common.HALF_PI)<this.TOL&&Proj4js.reportError("stere:forward:S_POLE"),e=this.akm1*Math.tan(Proj4js.common.FORTPI+0.5*b),d=c*e,e*=i}}else{i=Math.cos(c);c=Math.sin(c);f=Math.sin(b);var h;
+if(this.mode==this.OBLIQ||this.mode==this.EQUIT)h=2*Math.atan(this.ssfn_(b,f,this.e)),g=Math.sin(h-Proj4js.common.HALF_PI),h=Math.cos(h);switch(this.mode){case this.OBLIQ:b=this.akm1/(this.cosX1*(1+this.sinX1*g+this.cosX1*h*i));e=b*(this.cosX1*g-this.sinX1*h*i);d=b*h;break;case this.EQUIT:b=2*this.akm1/(1+h*i);e=b*g;d=b*h;break;case this.S_POLE:b=-b,i=-i,f=-f;case this.N_POLE:d=this.akm1*Proj4js.common.tsfnz(this.e,b,f),e=-d*i}d*=c}a.x=d*this.a+this.x0;a.y=e*this.a+this.y0;return a},inverse:function(a){var c=
+(a.x-this.x0)/this.a,b=(a.y-this.y0)/this.a,d,e,f,g=d=0,i,h=f=0;if(this.sphere){g=Math.sqrt(c*c+b*b);h=2*Math.atan(g/this.akm1);f=Math.sin(h);h=Math.cos(h);d=0;switch(this.mode){case this.EQUIT:e=Math.abs(g)<=Proj4js.common.EPSLN?0:Math.asin(b*f/g);if(0!=h||0!=c)d=Math.atan2(c*f,h*g);break;case this.OBLIQ:e=Math.abs(g)<=Proj4js.common.EPSLN?this.phi0:Math.asin(h*this.sinph0+b*f*this.cosph0/g);h-=this.sinph0*Math.sin(e);if(0!=h||0!=c)d=Math.atan2(c*f*this.cosph0,h*g);break;case this.N_POLE:b=-b;case this.S_POLE:e=
+Math.abs(g)<=Proj4js.common.EPSLN?this.phi0:Math.asin(this.mode==this.S_POLE?-h:h),d=0==c&&0==b?0:Math.atan2(c,b)}a.x=Proj4js.common.adjust_lon(d+this.long0);a.y=e}else{i=Math.sqrt(c*c+b*b);switch(this.mode){case this.OBLIQ:case this.EQUIT:d=2*Math.atan2(i*this.cosX1,this.akm1);f=Math.cos(d);e=Math.sin(d);g=0==i?Math.asin(f*this.sinX1):Math.asin(f*this.sinX1+b*e*this.cosX1/i);d=Math.tan(0.5*(Proj4js.common.HALF_PI+g));c*=e;b=i*this.cosX1*f-b*this.sinX1*e;h=Proj4js.common.HALF_PI;f=0.5*this.e;break;
+case this.N_POLE:b=-b;case this.S_POLE:d=-i/this.akm1,g=Proj4js.common.HALF_PI-2*Math.atan(d),h=-Proj4js.common.HALF_PI,f=-0.5*this.e}for(i=this.NITER;i--;g=e)if(e=this.e*Math.sin(g),e=2*Math.atan(d*Math.pow((1+e)/(1-e),f))-h,Math.abs(g-e)<this.CONV)return this.mode==this.S_POLE&&(e=-e),d=0==c&&0==b?0:Math.atan2(c,b),a.x=Proj4js.common.adjust_lon(d+this.long0),a.y=e,a}}};
+Proj4js.Proj.nzmg={iterations:1,init:function(){this.A=[];this.A[1]=0.6399175073;this.A[2]=-0.1358797613;this.A[3]=0.063294409;this.A[4]=-0.02526853;this.A[5]=0.0117879;this.A[6]=-0.0055161;this.A[7]=0.0026906;this.A[8]=-0.001333;this.A[9]=6.7E-4;this.A[10]=-3.4E-4;this.B_re=[];this.B_im=[];this.B_re[1]=0.7557853228;this.B_im[1]=0;this.B_re[2]=0.249204646;this.B_im[2]=0.003371507;this.B_re[3]=-0.001541739;this.B_im[3]=0.04105856;this.B_re[4]=-0.10162907;this.B_im[4]=0.01727609;this.B_re[5]=-0.26623489;
+this.B_im[5]=-0.36249218;this.B_re[6]=-0.6870983;this.B_im[6]=-1.1651967;this.C_re=[];this.C_im=[];this.C_re[1]=1.3231270439;this.C_im[1]=0;this.C_re[2]=-0.577245789;this.C_im[2]=-0.007809598;this.C_re[3]=0.508307513;this.C_im[3]=-0.112208952;this.C_re[4]=-0.15094762;this.C_im[4]=0.18200602;this.C_re[5]=1.01418179;this.C_im[5]=1.64497696;this.C_re[6]=1.9660549;this.C_im[6]=2.5127645;this.D=[];this.D[1]=1.5627014243;this.D[2]=0.5185406398;this.D[3]=-0.03333098;this.D[4]=-0.1052906;this.D[5]=-0.0368594;
+this.D[6]=0.007317;this.D[7]=0.0122;this.D[8]=0.00394;this.D[9]=-0.0013},forward:function(a){for(var c=1.0E-5*((a.y-this.lat0)/Proj4js.common.SEC_TO_RAD),b=a.x-this.long0,d=1,e=0,f=1;10>=f;f++)d*=c,e+=this.A[f]*d;for(var c=e,d=1,g=0,i=0,h=0,f=1;6>=f;f++)e=d*c-g*b,g=g*c+d*b,d=e,i=i+this.B_re[f]*d-this.B_im[f]*g,h=h+this.B_im[f]*d+this.B_re[f]*g;a.x=h*this.a+this.x0;a.y=i*this.a+this.y0;return a},inverse:function(a){for(var c=(a.y-this.y0)/this.a,b=(a.x-this.x0)/this.a,d=1,e=0,f,g=0,i=0,h=1;6>=h;h++)f=
+d*c-e*b,e=e*c+d*b,d=f,g=g+this.C_re[h]*d-this.C_im[h]*e,i=i+this.C_im[h]*d+this.C_re[h]*e;for(d=0;d<this.iterations;d++){var j=g,k=i,l;f=c;e=b;for(h=2;6>=h;h++)l=j*g-k*i,k=k*g+j*i,j=l,f+=(h-1)*(this.B_re[h]*j-this.B_im[h]*k),e+=(h-1)*(this.B_im[h]*j+this.B_re[h]*k);for(var j=1,k=0,m=this.B_re[1],n=this.B_im[1],h=2;6>=h;h++)l=j*g-k*i,k=k*g+j*i,j=l,m+=h*(this.B_re[h]*j-this.B_im[h]*k),n+=h*(this.B_im[h]*j+this.B_re[h]*k);i=m*m+n*n;g=(f*m+e*n)/i;i=(e*m-f*n)/i}c=g;b=1;g=0;for(h=1;9>=h;h++)b*=c,g+=this.D[h]*
+b;h=this.lat0+1E5*g*Proj4js.common.SEC_TO_RAD;a.x=this.long0+i;a.y=h;return a}};Proj4js.Proj.mill={init:function(){},forward:function(a){var c=a.y,b=this.x0+this.a*Proj4js.common.adjust_lon(a.x-this.long0),c=this.y0+1.25*this.a*Math.log(Math.tan(Proj4js.common.PI/4+c/2.5));a.x=b;a.y=c;return a},inverse:function(a){a.x-=this.x0;a.y-=this.y0;var c=Proj4js.common.adjust_lon(this.long0+a.x/this.a),b=2.5*(Math.atan(Math.exp(0.8*a.y/this.a))-Proj4js.common.PI/4);a.x=c;a.y=b;return a}};
+Proj4js.Proj.gnom={init:function(){this.sin_p14=Math.sin(this.lat0);this.cos_p14=Math.cos(this.lat0);this.infinity_dist=1E3*this.a;this.rc=1},forward:function(a){var c,b,d,e,f;b=a.y;d=Proj4js.common.adjust_lon(a.x-this.long0);c=Math.sin(b);b=Math.cos(b);e=Math.cos(d);f=this.sin_p14*c+this.cos_p14*b*e;0<f||Math.abs(f)<=Proj4js.common.EPSLN?(d=this.x0+1*this.a*b*Math.sin(d)/f,c=this.y0+1*this.a*(this.cos_p14*c-this.sin_p14*b*e)/f):(Proj4js.reportError("orthoFwdPointError"),d=this.x0+this.infinity_dist*
+b*Math.sin(d),c=this.y0+this.infinity_dist*(this.cos_p14*c-this.sin_p14*b*e));a.x=d;a.y=c;return a},inverse:function(a){var c,b,d,e;a.x=(a.x-this.x0)/this.a;a.y=(a.y-this.y0)/this.a;a.x/=this.k0;a.y/=this.k0;(c=Math.sqrt(a.x*a.x+a.y*a.y))?(e=Math.atan2(c,this.rc),b=Math.sin(e),d=Math.cos(e),e=Proj4js.common.asinz(d*this.sin_p14+a.y*b*this.cos_p14/c),c=Math.atan2(a.x*b,c*this.cos_p14*d-a.y*this.sin_p14*b),c=Proj4js.common.adjust_lon(this.long0+c)):(e=this.phic0,c=0);a.x=c;a.y=e;return a}};
+Proj4js.Proj.sinu={init:function(){this.sphere?(this.n=1,this.es=this.m=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Proj4js.common.pj_enfn(this.es)},forward:function(a){var c,b;c=a.x;b=a.y;c=Proj4js.common.adjust_lon(c-this.long0);if(this.sphere){if(this.m)for(var d=this.n*Math.sin(b),e=Proj4js.common.MAX_ITER;e;--e){var f=(this.m*b+Math.sin(b)-d)/(this.m+Math.cos(b));b-=f;if(Math.abs(f)<Proj4js.common.EPSLN)break}else b=1!=this.n?Math.asin(this.n*Math.sin(b)):b;
+c=this.a*this.C_x*c*(this.m+Math.cos(b));b*=this.a*this.C_y}else d=Math.sin(b),e=Math.cos(b),b=this.a*Proj4js.common.pj_mlfn(b,d,e,this.en),c=this.a*c*e/Math.sqrt(1-this.es*d*d);a.x=c;a.y=b;return a},inverse:function(a){var c,b;a.x-=this.x0;a.y-=this.y0;if(this.sphere)a.y/=this.C_y,c=this.m?Math.asin((this.m*a.y+Math.sin(a.y))/this.n):1!=this.n?Math.asin(Math.sin(a.y)/this.n):a.y,b=a.x/(this.C_x*(this.m+Math.cos(a.y)));else{c=Proj4js.common.pj_inv_mlfn(a.y/this.a,this.es,this.en);var d=Math.abs(c);
+d<Proj4js.common.HALF_PI?(d=Math.sin(c),b=this.long0+a.x*Math.sqrt(1-this.es*d*d)/(this.a*Math.cos(c)),b=Proj4js.common.adjust_lon(b)):d-Proj4js.common.EPSLN<Proj4js.common.HALF_PI&&(b=this.long0)}a.x=b;a.y=c;return a}};
+Proj4js.Proj.vandg={init:function(){this.R=6370997},forward:function(a){var c=a.y,b=Proj4js.common.adjust_lon(a.x-this.long0);Math.abs(c);var d=Proj4js.common.asinz(2*Math.abs(c/Proj4js.common.PI));(Math.abs(b)<=Proj4js.common.EPSLN||Math.abs(Math.abs(c)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN)&&Math.tan(0.5*d);var e=0.5*Math.abs(Proj4js.common.PI/b-b/Proj4js.common.PI),f=e*e,g=Math.sin(d),d=Math.cos(d),d=d/(g+d-1),g=d*(2/g-1),g=g*g,f=Proj4js.common.PI*this.R*(e*(d-g)+Math.sqrt(f*(d-g)*(d-g)-
+(g+f)*(d*d-g)))/(g+f);0>b&&(f=-f);b=this.x0+f;f=Math.abs(f/(Proj4js.common.PI*this.R));c=0<=c?this.y0+Proj4js.common.PI*this.R*Math.sqrt(1-f*f-2*e*f):this.y0-Proj4js.common.PI*this.R*Math.sqrt(1-f*f-2*e*f);a.x=b;a.y=c;return a},inverse:function(a){var c,b,d,e,f,g,i,h;a.x-=this.x0;a.y-=this.y0;h=Proj4js.common.PI*this.R;c=a.x/h;d=a.y/h;e=c*c+d*d;f=-Math.abs(d)*(1+e);b=f-2*d*d+c*c;g=-2*f+1+2*d*d+e*e;h=d*d/g+(2*b*b*b/g/g/g-9*f*b/g/g)/27;i=(f-b*b/3/g)/g;f=2*Math.sqrt(-i/3);h=3*h/i/f;1<Math.abs(h)&&(h=
+0<=h?1:-1);h=Math.acos(h)/3;b=0<=a.y?(-f*Math.cos(h+Proj4js.common.PI/3)-b/3/g)*Proj4js.common.PI:-(-f*Math.cos(h+Proj4js.common.PI/3)-b/3/g)*Proj4js.common.PI;Math.abs(c);c=Proj4js.common.adjust_lon(this.long0+Proj4js.common.PI*(e-1+Math.sqrt(1+2*(c*c-d*d)+e*e))/2/c);a.x=c;a.y=b;return a}};
+Proj4js.Proj.cea={init:function(){},forward:function(a){var c=a.y,b=this.x0+this.a*Proj4js.common.adjust_lon(a.x-this.long0)*Math.cos(this.lat_ts),c=this.y0+this.a*Math.sin(c)/Math.cos(this.lat_ts);a.x=b;a.y=c;return a},inverse:function(a){a.x-=this.x0;a.y-=this.y0;var c=Proj4js.common.adjust_lon(this.long0+a.x/this.a/Math.cos(this.lat_ts)),b=Math.asin(a.y/this.a*Math.cos(this.lat_ts));a.x=c;a.y=b;return a}};
+Proj4js.Proj.eqc={init:function(){this.x0||(this.x0=0);this.y0||(this.y0=0);this.lat0||(this.lat0=0);this.long0||(this.long0=0);this.lat_ts||(this.lat_ts=0);this.title||(this.title="Equidistant Cylindrical (Plate Carre)");this.rc=Math.cos(this.lat_ts)},forward:function(a){var c=a.y,b=Proj4js.common.adjust_lon(a.x-this.long0),c=Proj4js.common.adjust_lat(c-this.lat0);a.x=this.x0+this.a*b*this.rc;a.y=this.y0+this.a*c;return a},inverse:function(a){var c=a.y;a.x=Proj4js.common.adjust_lon(this.long0+(a.x-
+this.x0)/(this.a*this.rc));a.y=Proj4js.common.adjust_lat(this.lat0+(c-this.y0)/this.a);return a}};
+Proj4js.Proj.cass={init:function(){this.sphere||(this.en=Proj4js.common.pj_enfn(this.es),this.m0=Proj4js.common.pj_mlfn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},C1:0.16666666666666666,C2:0.008333333333333333,C3:0.041666666666666664,C4:0.3333333333333333,C5:0.06666666666666667,forward:function(a){var c,b,d=a.x,e=a.y,d=Proj4js.common.adjust_lon(d-this.long0);this.sphere?(c=Math.asin(Math.cos(e)*Math.sin(d)),b=Math.atan2(Math.tan(e),Math.cos(d))-this.phi0):(this.n=Math.sin(e),this.c=
+Math.cos(e),b=Proj4js.common.pj_mlfn(e,this.n,this.c,this.en),this.n=1/Math.sqrt(1-this.es*this.n*this.n),this.tn=Math.tan(e),this.t=this.tn*this.tn,this.a1=d*this.c,this.c*=this.es*this.c/(1-this.es),this.a2=this.a1*this.a1,c=this.n*this.a1*(1-this.a2*this.t*(this.C1-(8-this.t+8*this.c)*this.a2*this.C2)),b-=this.m0-this.n*this.tn*this.a2*(0.5+(5-this.t+6*this.c)*this.a2*this.C3));a.x=this.a*c+this.x0;a.y=this.a*b+this.y0;return a},inverse:function(a){a.x-=this.x0;a.y-=this.y0;var c=a.x/this.a,b=
+a.y/this.a;if(this.sphere)this.dd=b+this.lat0,b=Math.asin(Math.sin(this.dd)*Math.cos(c)),c=Math.atan2(Math.tan(c),Math.cos(this.dd));else{var d=Proj4js.common.pj_inv_mlfn(this.m0+b,this.es,this.en);this.tn=Math.tan(d);this.t=this.tn*this.tn;this.n=Math.sin(d);this.r=1/(1-this.es*this.n*this.n);this.n=Math.sqrt(this.r);this.r*=(1-this.es)*this.n;this.dd=c/this.n;this.d2=this.dd*this.dd;b=d-this.n*this.tn/this.r*this.d2*(0.5-(1+3*this.t)*this.d2*this.C3);c=this.dd*(1+this.t*this.d2*(-this.C4+(1+3*this.t)*
+this.d2*this.C5))/Math.cos(d)}a.x=Proj4js.common.adjust_lon(this.long0+c);a.y=b;return a}};
+Proj4js.Proj.gauss={init:function(){var a=Math.sin(this.lat0),c=Math.cos(this.lat0),c=c*c;this.rc=Math.sqrt(1-this.es)/(1-this.es*a*a);this.C=Math.sqrt(1+this.es*c*c/(1-this.es));this.phic0=Math.asin(a/this.C);this.ratexp=0.5*this.C*this.e;this.K=Math.tan(0.5*this.phic0+Proj4js.common.FORTPI)/(Math.pow(Math.tan(0.5*this.lat0+Proj4js.common.FORTPI),this.C)*Proj4js.common.srat(this.e*a,this.ratexp))},forward:function(a){var c=a.x,b=a.y;a.y=2*Math.atan(this.K*Math.pow(Math.tan(0.5*b+Proj4js.common.FORTPI),
+this.C)*Proj4js.common.srat(this.e*Math.sin(b),this.ratexp))-Proj4js.common.HALF_PI;a.x=this.C*c;return a},inverse:function(a){for(var c=a.x/this.C,b=a.y,d=Math.pow(Math.tan(0.5*b+Proj4js.common.FORTPI)/this.K,1/this.C),e=Proj4js.common.MAX_ITER;0<e;--e){b=2*Math.atan(d*Proj4js.common.srat(this.e*Math.sin(a.y),-0.5*this.e))-Proj4js.common.HALF_PI;if(1.0E-14>Math.abs(b-a.y))break;a.y=b}if(!e)return Proj4js.reportError("gauss:inverse:convergence failed"),null;a.x=c;a.y=b;return a}};
+Proj4js.Proj.omerc={init:function(){this.mode||(this.mode=0);this.lon1||(this.lon1=0,this.mode=1);this.lon2||(this.lon2=0);this.lat2||(this.lat2=0);var a=1-Math.pow(this.b/this.a,2);Math.sqrt(a);this.sin_p20=Math.sin(this.lat0);this.cos_p20=Math.cos(this.lat0);this.con=1-this.es*this.sin_p20*this.sin_p20;this.com=Math.sqrt(1-a);this.bl=Math.sqrt(1+this.es*Math.pow(this.cos_p20,4)/(1-a));this.al=this.a*this.bl*this.k0*this.com/this.con;Math.abs(this.lat0)<Proj4js.common.EPSLN?this.el=this.d=this.ts=
+1:(this.ts=Proj4js.common.tsfnz(this.e,this.lat0,this.sin_p20),this.con=Math.sqrt(this.con),this.d=this.bl*this.com/(this.cos_p20*this.con),this.f=0<this.d*this.d-1?0<=this.lat0?this.d+Math.sqrt(this.d*this.d-1):this.d-Math.sqrt(this.d*this.d-1):this.d,this.el=this.f*Math.pow(this.ts,this.bl));0!=this.mode?(this.g=0.5*(this.f-1/this.f),this.gama=Proj4js.common.asinz(Math.sin(this.alpha)/this.d),this.longc-=Proj4js.common.asinz(this.g*Math.tan(this.gama))/this.bl,this.con=Math.abs(this.lat0),this.con>
+Proj4js.common.EPSLN&&Math.abs(this.con-Proj4js.common.HALF_PI)>Proj4js.common.EPSLN?(this.singam=Math.sin(this.gama),this.cosgam=Math.cos(this.gama),this.sinaz=Math.sin(this.alpha),this.cosaz=Math.cos(this.alpha),this.u=0<=this.lat0?this.al/this.bl*Math.atan(Math.sqrt(this.d*this.d-1)/this.cosaz):-(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1)/this.cosaz)):Proj4js.reportError("omerc:Init:DataError")):(this.sinphi=Math.sin(this.at1),this.ts1=Proj4js.common.tsfnz(this.e,this.lat1,this.sinphi),
+this.sinphi=Math.sin(this.lat2),this.ts2=Proj4js.common.tsfnz(this.e,this.lat2,this.sinphi),this.h=Math.pow(this.ts1,this.bl),this.l=Math.pow(this.ts2,this.bl),this.f=this.el/this.h,this.g=0.5*(this.f-1/this.f),this.j=(this.el*this.el-this.l*this.h)/(this.el*this.el+this.l*this.h),this.p=(this.l-this.h)/(this.l+this.h),this.dlon=this.lon1-this.lon2,this.dlon<-Proj4js.common.PI&&(this.lon2-=2*Proj4js.common.PI),this.dlon>Proj4js.common.PI&&(this.lon2+=2*Proj4js.common.PI),this.dlon=this.lon1-this.lon2,
+this.longc=0.5*(this.lon1+this.lon2)-Math.atan(this.j*Math.tan(0.5*this.bl*this.dlon)/this.p)/this.bl,this.dlon=Proj4js.common.adjust_lon(this.lon1-this.longc),this.gama=Math.atan(Math.sin(this.bl*this.dlon)/this.g),this.alpha=Proj4js.common.asinz(this.d*Math.sin(this.gama)),Math.abs(this.lat1-this.lat2)<=Proj4js.common.EPSLN?Proj4js.reportError("omercInitDataError"):this.con=Math.abs(this.lat1),this.con<=Proj4js.common.EPSLN||Math.abs(this.con-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN?Proj4js.reportError("omercInitDataError"):
+Math.abs(Math.abs(this.lat0)-Proj4js.common.HALF_PI)<=Proj4js.common.EPSLN&&Proj4js.reportError("omercInitDataError"),this.singam=Math.sin(this.gam),this.cosgam=Math.cos(this.gam),this.sinaz=Math.sin(this.alpha),this.cosaz=Math.cos(this.alpha),this.u=0<=this.lat0?this.al/this.bl*Math.atan(Math.sqrt(this.d*this.d-1)/this.cosaz):-(this.al/this.bl)*Math.atan(Math.sqrt(this.d*this.d-1)/this.cosaz))},forward:function(a){var c,b,d,e,f;d=a.x;b=a.y;c=Math.sin(b);e=Proj4js.common.adjust_lon(d-this.longc);
+d=Math.sin(this.bl*e);Math.abs(Math.abs(b)-Proj4js.common.HALF_PI)>Proj4js.common.EPSLN?(c=Proj4js.common.tsfnz(this.e,b,c),c=this.el/Math.pow(c,this.bl),f=0.5*(c-1/c),c=(f*this.singam-d*this.cosgam)/(0.5*(c+1/c)),b=Math.cos(this.bl*e),1.0E-7>Math.abs(b)?d=this.al*this.bl*e:(d=this.al*Math.atan((f*this.cosgam+d*this.singam)/b)/this.bl,0>b&&(d+=Proj4js.common.PI*this.al/this.bl))):(c=0<=b?this.singam:-this.singam,d=this.al*b/this.bl);Math.abs(Math.abs(c)-1)<=Proj4js.common.EPSLN&&Proj4js.reportError("omercFwdInfinity");
+e=0.5*this.al*Math.log((1-c)/(1+c))/this.bl;d-=this.u;c=this.y0+d*this.cosaz-e*this.sinaz;a.x=this.x0+e*this.cosaz+d*this.sinaz;a.y=c;return a},inverse:function(a){var c,b,d,e;a.x-=this.x0;a.y-=this.y0;c=a.x*this.cosaz-a.y*this.sinaz;d=a.y*this.cosaz+a.x*this.sinaz;d+=this.u;b=Math.exp(-this.bl*c/this.al);c=0.5*(b-1/b);b=0.5*(b+1/b);d=Math.sin(this.bl*d/this.al);e=(d*this.cosgam+c*this.singam)/b;Math.abs(Math.abs(e)-1)<=Proj4js.common.EPSLN?(c=this.longc,e=0<=e?Proj4js.common.HALF_PI:-Proj4js.common.HALF_PI):
+(b=1/this.bl,e=Math.pow(this.el/Math.sqrt((1+e)/(1-e)),b),e=Proj4js.common.phi2z(this.e,e),c=this.longc-Math.atan2(c*this.cosgam-d*this.singam,b)/this.bl,c=Proj4js.common.adjust_lon(c));a.x=c;a.y=e;return a}};
+Proj4js.Proj.lcc={init:function(){this.lat2||(this.lat2=this.lat0);this.k0||(this.k0=1);if(Math.abs(this.lat1+this.lat2)<Proj4js.common.EPSLN)Proj4js.reportError("lcc:init: Equal Latitudes");else{var a=this.b/this.a;this.e=Math.sqrt(1-a*a);var a=Math.sin(this.lat1),c=Math.cos(this.lat1),c=Proj4js.common.msfnz(this.e,a,c),b=Proj4js.common.tsfnz(this.e,this.lat1,a),d=Math.sin(this.lat2),e=Math.cos(this.lat2),e=Proj4js.common.msfnz(this.e,d,e),d=Proj4js.common.tsfnz(this.e,this.lat2,d),f=Proj4js.common.tsfnz(this.e,
+this.lat0,Math.sin(this.lat0));this.ns=Math.abs(this.lat1-this.lat2)>Proj4js.common.EPSLN?Math.log(c/e)/Math.log(b/d):a;this.f0=c/(this.ns*Math.pow(b,this.ns));this.rh=this.a*this.f0*Math.pow(f,this.ns);this.title||(this.title="Lambert Conformal Conic")}},forward:function(a){var c=a.x,b=a.y;if(!(90>=b&&-90<=b&&180>=c&&-180<=c))return Proj4js.reportError("lcc:forward: llInputOutOfRange: "+c+" : "+b),null;var d=Math.abs(Math.abs(b)-Proj4js.common.HALF_PI);if(d>Proj4js.common.EPSLN)b=Proj4js.common.tsfnz(this.e,
+b,Math.sin(b)),b=this.a*this.f0*Math.pow(b,this.ns);else{d=b*this.ns;if(0>=d)return Proj4js.reportError("lcc:forward: No Projection"),null;b=0}c=this.ns*Proj4js.common.adjust_lon(c-this.long0);a.x=this.k0*b*Math.sin(c)+this.x0;a.y=this.k0*(this.rh-b*Math.cos(c))+this.y0;return a},inverse:function(a){var c,b,d,e=(a.x-this.x0)/this.k0,f=this.rh-(a.y-this.y0)/this.k0;0<this.ns?(c=Math.sqrt(e*e+f*f),b=1):(c=-Math.sqrt(e*e+f*f),b=-1);d=0;0!=c&&(d=Math.atan2(b*e,b*f));if(0!=c||0<this.ns){if(b=1/this.ns,
+c=Math.pow(c/(this.a*this.f0),b),c=Proj4js.common.phi2z(this.e,c),-9999==c)return null}else c=-Proj4js.common.HALF_PI;d=Proj4js.common.adjust_lon(d/this.ns+this.long0);a.x=d;a.y=c;return a}};
+Proj4js.Proj.laea={S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4,init:function(){var a=Math.abs(this.lat0);this.mode=Math.abs(a-Proj4js.common.HALF_PI)<Proj4js.common.EPSLN?0>this.lat0?this.S_POLE:this.N_POLE:Math.abs(a)<Proj4js.common.EPSLN?this.EQUIT:this.OBLIQ;if(0<this.es)switch(this.qp=Proj4js.common.qsfnz(this.e,1),this.mmf=0.5/(1-this.es),this.apa=this.authset(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(0.5*this.qp);this.dd=1/this.rq;this.xmf=
+1;this.ymf=0.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(0.5*this.qp),a=Math.sin(this.lat0),this.sinb1=Proj4js.common.qsfnz(this.e,a)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*a*a)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode==this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(a){var c,b,d=a.x,e=a.y,d=Proj4js.common.adjust_lon(d-this.long0);if(this.sphere){var f,
+g,i;i=Math.sin(e);g=Math.cos(e);f=Math.cos(d);switch(this.mode){case this.OBLIQ:case this.EQUIT:b=this.mode==this.EQUIT?1+g*f:1+this.sinph0*i+this.cosph0*g*f;if(b<=Proj4js.common.EPSLN)return Proj4js.reportError("laea:fwd:y less than eps"),null;b=Math.sqrt(2/b);c=b*g*Math.sin(d);b*=this.mode==this.EQUIT?i:this.cosph0*i-this.sinph0*g*f;break;case this.N_POLE:f=-f;case this.S_POLE:if(Math.abs(e+this.phi0)<Proj4js.common.EPSLN)return Proj4js.reportError("laea:fwd:phi < eps"),null;b=Proj4js.common.FORTPI-
+0.5*e;b=2*(this.mode==this.S_POLE?Math.cos(b):Math.sin(b));c=b*Math.sin(d);b*=f}}else{var h=g=0,j=0;f=Math.cos(d);d=Math.sin(d);i=Math.sin(e);i=Proj4js.common.qsfnz(this.e,i);if(this.mode==this.OBLIQ||this.mode==this.EQUIT)g=i/this.qp,h=Math.sqrt(1-g*g);switch(this.mode){case this.OBLIQ:j=1+this.sinb1*g+this.cosb1*h*f;break;case this.EQUIT:j=1+h*f;break;case this.N_POLE:j=Proj4js.common.HALF_PI+e;i=this.qp-i;break;case this.S_POLE:j=e-Proj4js.common.HALF_PI,i=this.qp+i}if(Math.abs(j)<Proj4js.common.EPSLN)return Proj4js.reportError("laea:fwd:b < eps"),
+null;switch(this.mode){case this.OBLIQ:case this.EQUIT:j=Math.sqrt(2/j);b=this.mode==this.OBLIQ?this.ymf*j*(this.cosb1*g-this.sinb1*h*f):(j=Math.sqrt(2/(1+h*f)))*g*this.ymf;c=this.xmf*j*h*d;break;case this.N_POLE:case this.S_POLE:0<=i?(c=(j=Math.sqrt(i))*d,b=f*(this.mode==this.S_POLE?j:-j)):c=b=0}}a.x=this.a*c+this.x0;a.y=this.a*b+this.y0;return a},inverse:function(a){a.x-=this.x0;a.y-=this.y0;var c=a.x/this.a,b=a.y/this.a,d;if(this.sphere){var e=0,f,g=0;f=Math.sqrt(c*c+b*b);d=0.5*f;if(1<d)return Proj4js.reportError("laea:Inv:DataError"),
+null;d=2*Math.asin(d);if(this.mode==this.OBLIQ||this.mode==this.EQUIT)g=Math.sin(d),e=Math.cos(d);switch(this.mode){case this.EQUIT:d=Math.abs(f)<=Proj4js.common.EPSLN?0:Math.asin(b*g/f);c*=g;b=e*f;break;case this.OBLIQ:d=Math.abs(f)<=Proj4js.common.EPSLN?this.phi0:Math.asin(e*this.sinph0+b*g*this.cosph0/f);c*=g*this.cosph0;b=(e-Math.sin(d)*this.sinph0)*f;break;case this.N_POLE:b=-b;d=Proj4js.common.HALF_PI-d;break;case this.S_POLE:d-=Proj4js.common.HALF_PI}c=0==b&&(this.mode==this.EQUIT||this.mode==
+this.OBLIQ)?0:Math.atan2(c,b)}else{d=0;switch(this.mode){case this.EQUIT:case this.OBLIQ:c/=this.dd;b*=this.dd;g=Math.sqrt(c*c+b*b);if(g<Proj4js.common.EPSLN)return a.x=0,a.y=this.phi0,a;f=2*Math.asin(0.5*g/this.rq);e=Math.cos(f);c*=f=Math.sin(f);this.mode==this.OBLIQ?(d=e*this.sinb1+b*f*this.cosb1/g,b=g*this.cosb1*e-b*this.sinb1*f):(d=b*f/g,b=g*e);break;case this.N_POLE:b=-b;case this.S_POLE:d=c*c+b*b;if(!d)return a.x=0,a.y=this.phi0,a;d=1-d/this.qp;this.mode==this.S_POLE&&(d=-d)}c=Math.atan2(c,
+b);d=this.authlat(Math.asin(d),this.apa)}a.x=Proj4js.common.adjust_lon(this.long0+c);a.y=d;return a},P00:0.3333333333333333,P01:0.17222222222222222,P02:0.10257936507936508,P10:0.06388888888888888,P11:0.0664021164021164,P20:0.016415012942191543,authset:function(a){var c,b=[];b[0]=a*this.P00;c=a*a;b[0]+=c*this.P01;b[1]=c*this.P10;c*=a;b[0]+=c*this.P02;b[1]+=c*this.P11;b[2]=c*this.P20;return b},authlat:function(a,c){var b=a+a;return a+c[0]*Math.sin(b)+c[1]*Math.sin(b+b)+c[2]*Math.sin(b+b+b)}};
+Proj4js.Proj.aeqd={init:function(){this.sin_p12=Math.sin(this.lat0);this.cos_p12=Math.cos(this.lat0)},forward:function(a){var c=a.x,b,d=Math.sin(a.y),e=Math.cos(a.y),c=Proj4js.common.adjust_lon(c-this.long0),f=Math.cos(c),g=this.sin_p12*d+this.cos_p12*e*f;if(Math.abs(Math.abs(g)-1)<Proj4js.common.EPSLN){if(b=1,0>g){Proj4js.reportError("aeqd:Fwd:PointError");return}}else b=Math.acos(g),b/=Math.sin(b);a.x=this.x0+this.a*b*e*Math.sin(c);a.y=this.y0+this.a*b*(this.cos_p12*d-this.sin_p12*e*f);return a},
+inverse:function(a){a.x-=this.x0;a.y-=this.y0;var c=Math.sqrt(a.x*a.x+a.y*a.y);if(c>2*Proj4js.common.HALF_PI*this.a)Proj4js.reportError("aeqdInvDataError");else{var b=c/this.a,d=Math.sin(b),b=Math.cos(b),e=this.long0,f;if(Math.abs(c)<=Proj4js.common.EPSLN)f=this.lat0;else{f=Proj4js.common.asinz(b*this.sin_p12+a.y*d*this.cos_p12/c);var g=Math.abs(this.lat0)-Proj4js.common.HALF_PI;Math.abs(g)<=Proj4js.common.EPSLN?e=0<=this.lat0?Proj4js.common.adjust_lon(this.long0+Math.atan2(a.x,-a.y)):Proj4js.common.adjust_lon(this.long0-
+Math.atan2(-a.x,a.y)):(g=b-this.sin_p12*Math.sin(f),Math.abs(g)<Proj4js.common.EPSLN&&Math.abs(a.x)<Proj4js.common.EPSLN||(Math.atan2(a.x*d*this.cos_p12,g*c),e=Proj4js.common.adjust_lon(this.long0+Math.atan2(a.x*d*this.cos_p12,g*c))))}a.x=e;a.y=f;return a}}};
+Proj4js.Proj.moll={init:function(){},forward:function(a){for(var c=a.y,b=Proj4js.common.adjust_lon(a.x-this.long0),d=c,e=Proj4js.common.PI*Math.sin(c),f=0;;f++){var g=-(d+Math.sin(d)-e)/(1+Math.cos(d)),d=d+g;if(Math.abs(g)<Proj4js.common.EPSLN)break;50<=f&&Proj4js.reportError("moll:Fwd:IterationError")}d/=2;Proj4js.common.PI/2-Math.abs(c)<Proj4js.common.EPSLN&&(b=0);c=0.900316316158*this.a*b*Math.cos(d)+this.x0;d=1.4142135623731*this.a*Math.sin(d)+this.y0;a.x=c;a.y=d;return a},inverse:function(a){var c;
+a.x-=this.x0;c=a.y/(1.4142135623731*this.a);0.999999999999<Math.abs(c)&&(c=0.999999999999);c=Math.asin(c);var b=Proj4js.common.adjust_lon(this.long0+a.x/(0.900316316158*this.a*Math.cos(c)));b<-Proj4js.common.PI&&(b=-Proj4js.common.PI);b>Proj4js.common.PI&&(b=Proj4js.common.PI);c=(2*c+Math.sin(2*c))/Proj4js.common.PI;1<Math.abs(c)&&(c=1);c=Math.asin(c);a.x=b;a.y=c;return a}};
Added: trunk/mapbender/http/extensions/mobilemap/map.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/map.php (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/map.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,309 @@
+<?php
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
+
+//Fixes IPhone, Android 2.x
+if(strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'Android 2.')) {
+ $scaleselect = "false";
+}
+else {
+ $scaleselect = "true";
+}
+
+//WMC Anfrage Mapbendermodul
+if (isset($_GET['wmcid'])) {
+ $wmcid = htmlspecialchars($_GET["wmcid"]);
+}
+
+?>
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title><?php echo $apptitle; ?></title>
+<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
+<meta name="apple-mobile-web-app-capable" content="yes">
+<link rel="apple-touch-icon" href="<?php echo $iPhoneIcon; ?>"/>
+<link rel="shortcut icon" href="<?php echo $favIcon; ?>"/>
+<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
+<link href="<?php echo $style_1; ?>" rel="stylesheet" >
+<link href="<?php echo $style_2; ?>" rel="stylesheet" >
+<?php if($googleapi){ ?>
+<script src="http://maps.google.com/maps/api/js?sensor=false®ion=DE"></script>
+<?php } ?>
+<script src="../mobilemap/js/proj4js.min.js" ></script>
+<script src="../mobilemap/js/OpenLayers.mobile.min.js"></script>
+<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
+<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
+<script src="../mobilemap/js/jquery-lang.js"></script>
+<script src="../mobilemap/js/langpack/en.js" charset="utf-8" type="text/javascript"></script>
+<script src="../mobilemap/backgroundlayer.php" charset="utf-8" type="text/javascript"></script>
+<?php if($mapbendermod){ ?>
+<!-- Mod Mapbender -->
+<link href="../mobilemap/mod_mapbender/search.css" rel="stylesheet" >
+<!-- /Mod Mapbedner -->
+<?php } ?>
+<?php if($devmode){ ?>
+<script src="../mobilemap/js/dev/1_ngms_olextent.js" ></script>
+<script src="../mobilemap/js/dev/2_ngms_global.js" ></script>
+<?php if($mapbendermod){ ?>
+<!-- Mod Mapbender -->
+<script src="../mobilemap/mod_mapbender/searchobjects.js"></script>
+<script src="../mobilemap/mod_mapbender/search.js"></script>
+<!-- /Mod Mapbedner -->
+<?php } else { ?>
+<script src="../mobilemap/js/dev/3_ngms_layer.js" ></script>
+<?php } ?>
+<script src="../mobilemap/js/dev/4_ngms_base.js" ></script>
+<script src="../mobilemap/js/dev/5_ngms_jq.js" ></script>
+<?php } else{ ?>
+<script src="../mobilemap/js/ngms_event.min.js" ></script>
+<?php } ?>
+<script type="text/javascript">
+ window.lang = new jquery_lang_js();
+ $().ready(function () {
+ window.lang.run();
+ changeLanguage('<?php echo $mylang; ?>',false);
+ <?php if($wmcid != ''){ ?>
+ var wmcurl = '<?php echo $mapbender_wmcurl.$wmcid; ?>';
+ searchWmc(wmcurl);
+ <?php } ?>
+ });
+</script>
+</head>
+<body>
+
+<!-- Map Seite Start-->
+<div data-role="page" id="mappage">
+ <div data-role="content">
+ <div id="logo"><a href="map.php?lang=<?php echo $mylang; ?>" target="_self"><img src="img/logo.png" ></a></div>
+ <div id="map"></div>
+ <div id="navbutgroup">
+ <div id="ovbut" class="navbuttons" style="margin-top:2px"></div>
+ <div id="zoominbut" class="navbuttons" style="margin-top:2px"></div>
+ <div id="zoomoutbut" class="navbuttons" style="margin-top:2px"></div>
+ </div>
+ <div id="navbutgrouptop">
+ <?php if($mapbendermod){ ?>
+ <!-- Mapbender -->
+ <div id="mapbenderbut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+ <!-- Mapbender -->
+ <?php } else { ?>
+ <div id="layerbut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+ <?php } ?>
+ <div id="searchbut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+ <div id="locatebut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+ <div id="menubut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+
+ </div>
+ <div id="markerhint">
+ <div id="xheader"></div>
+ <div id="xcontent"></div>
+ </div>
+ <div id="measurehint" >
+ <div id="mheader"><span lang="de">Messen</span></div>
+ <div id="measureoutput"></div>
+ </div>
+
+ <div id="scaleline"></div>
+ <div id="copyright"><span lang="de"><?php echo $copyright; ?></span></div>
+ <div id="LoadingPanel"></div>
+ <div id="zoomscale">
+ <select name="selectzoom" id="selectzoom" onChange="changeScale(this.value);" data-inline="true" data-mini="true" data-native-menu="<?php echo $scaleselect; ?>" >
+ </select>
+ <label for="test"></label>
+ </div>
+ <div data-role="popup" id="popupMenu" data-overlay-theme="a" data-theme="a" style="max-width:2280px;" class="ui-corner-all">
+ <a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
+ <div data-role="header" data-theme="a" class="ui-corner-top">
+ <h1>Tools</h1>
+ </div>
+ <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content"><br>
+<table border="0" cellspacing="0" cellpadding="14">
+ <tr>
+ <td><div id="helpbut" class="navbuttons" ></div></td>
+ <td><div id="gearbut" class="navbuttons" ></div></td>
+ </tr>
+ <tr>
+ <td><div id="measurelinebut" class="navbuttons" ></div></td>
+ <td><div id="measurepolybut" class="navbuttons" ></div></td>
+ </tr>
+</table>
+ </div>
+ </div>
+
+ </div>
+ <!-- /content -->
+</div>
+<!-- /Map Seite Ende-->
+
+
+<?php if($mapbendermod){ ?>
+<!-- Mapbender Seite Start-->
+<div data-role="page" id="mod_mapbender" >
+ <div data-role="header" data-position="fixed" data-theme="d"> <a href="#" class="addToMapBut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Katalogsuche</span></h1>
+ </div>
+ <!-- /header -->
+ <div data-role="content" style="padding: 10px; overflow:hidden;" >
+
+ <div data-role="collapsible" >
+ <h3><span lang="de">Hintergrundkarte</span></h3>
+ <div id="baselayers"></div>
+ </div>
+ <label for="mapbendersearchfield"><span lang="de">Layer suchen:</span> </label>
+ <input type="search" name="mapbendersearchfield" id="mapbendersearchfield" value="" />
+ <input type="submit" value="Suchen" lang="de" id="mapbendersearchformbut" data-icon="arrow-r" data-iconpos="right" />
+
+ <ul data-role="listview" data-inset="true">
+ <li data-theme="b">Ihre Auswahl</li>
+ <li id="ownlist"></li>
+ </ul>
+
+ <div data-role="popup" id="preview" data-overlay-theme="a" data-theme="a" style="max-width:2280px;" class="ui-corner-all">
+ <a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
+ <div data-role="header" data-theme="a" class="ui-corner-top">
+ <a href="#" id="preview_zoom" data-icon="search"><span lang="de">Karte</span></a>
+ <h3> </h3>
+ </div>
+ <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content"></div>
+ </div>
+
+ <div data-role="popup" id="info" data-overlay-theme="a" data-theme="a" style="max-width:2280px;" class="ui-corner-all">
+ <a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
+ <div data-role="header" data-theme="a" class="ui-corner-top"><h3><span lang="de">Meldung</span></h3></div>
+ <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
+ <table border="0" cellspacing="0" cellpadding="14">
+ <tr><td id="info_content"></td></tr>
+ </table>
+ </div>
+ </div>
+
+ <ul data-role="listview" data-inset="true" id="resultlist"></ul>
+
+ </div>
+</div>
+<!-- /Mapbender Seite Ende-->
+<?php } else { ?>
+<!-- Layer Seite nicht dynamisch (Beispieleinträge vgl. 3_ngms_layer.js) Start-->
+<div data-role="page" id="layerpage" >
+ <div data-role="header" data-position="fixed" > <a href="#" class="mapbackbut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Ebenen</span></h1>
+ </div>
+ <!-- /header -->
+ <div data-role="content" style="padding: 10px" >
+ <div data-role="collapsible" >
+ <h3><span lang="de">Hintergrundkarte</span></h3>
+ <div class="checkrow" >
+ <div class="baselayer_check" id="atkis_praes_tms" ><span lang="de">Rlp Zusammenstellung</span></div>
+ </div>
+ <div class="clearfix"></div>
+ <div class="checkrow" >
+ <div class="baselayer_check" id="luftbilder" ><span lang="de">Luftbilder</span></div>
+ </div>
+ <div class="clearfix"></div>
+ <div class="checkrow" >
+ <div class="baselayer_check" id="grenze_leer" ><span lang="de">keine Hintergrundkarte</span></div>
+ </div>
+ <div class="clearfix"></div>
+ </div>
+ <div data-role="collapsible" >
+ <h3><span lang="de">Overlays</span></h3>
+ <div class="checkrow" >
+ <div class="layer_check" id="likar" ><span lang="de">Liegenschaftskarte</span></div>
+ </div>
+ <div class="clearfix"></div>
+ <div class="checkrow" >
+ <div class="query_check" id="naturschutzgebiet_query" > </div>
+ <div class="layer_check" id="naturschutzgebiet" ><span lang="de">Naturschutzgebiete</span></div>
+ </div>
+ <div class="clearfix"></div>
+ </div>
+ <div class="infobox" ><span lang="de">Hinweis: Um eine Ebene abzufragen aktivieren Sie die Info-Option und tapen danach in der Karte auf das Objekt der Ebene.</span> </div>
+ <div class="query_check" id="dhm_query" > </div>
+ <div class="layer_nocheck" ><span lang="de">Abfrage Höhe + GPS</span></div>
+ <div class="clearfix"></div>
+ <div class="clearfix"></div>
+ <input name="queryselect" id="queryselect" type="hidden" value="dhm">
+ <br>
+ <div class="infobox" ><span lang="de">Ãnderung der Ebenen wechselt direkt zur Kartenansicht</span></div>
+ <div data-role="fieldcontain" style="margin:1px; padding:1px;">
+ <select name="slider" id="autolayerchange" data-role="slider">
+ <option value="off" selected >off</option>
+ <option value="on">on</option>
+ </select>
+ </div>
+ </div>
+</div>
+<!-- /Layer Seite Ende-->
+<?php } ?>
+
+<!-- Search Seite Start-->
+<div data-role="page" id="searchpage" >
+ <div data-role="header" data-position="fixed" > <a href="#" class="mapbackbut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Suche</span></h1>
+ </div>
+ <!-- /header -->
+ <div data-role="content" style="padding: 10px" >
+ <div>
+ <label for="searchfield"><span lang="de">Ort suchen:</span> </label>
+ <input type="search" name="searchfield" id="searchfield" value="" />
+ <input type="submit" lang="de" value="Suchen" id="searchformbut" data-icon="arrow-r" data-iconpos="right" />
+ </div>
+ <div id="mygooglelink" > </div>
+ <div id="searchdbresult" style="margin-top:20px;" >
+ <ul data-role="listview" id= "search_results" data-theme="a" data-divider-theme="a" >
+ </ul>
+ </div>
+ <div id="mygooglemap" > </div>
+ </div>
+</div>
+<!-- /Search Seite Ende-->
+
+<!-- Hilfe Seite Start-->
+<div data-role="page" id="helppage">
+ <div data-role="header" data-position="fixed" > <a href="#" class="mapbackbut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Hilfe / Info</span></h1>
+ </div>
+ <div data-role="content" style="padding: 10px">
+
+ <div id="helpdiv"> </div>
+ </div>
+ <!-- /content -->
+</div>
+<!-- /Hilfe Seite Ende-->
+
+
+<!-- Einstellungen Start-->
+<div data-role="page" id="gearpage">
+ <div data-role="header" data-position="fixed" > <a href="#" class="mapbackbut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Einstellungen</span></h1>
+ </div>
+ <div data-role="content" style="padding: 10px">
+ <strong><span lang="de">App Einstellungen</span></strong>
+ <br>
+ <label for="select-lang" class="select"><span lang="de">Sprache:</span></label>
+ <select name="select-lang" id="select-lang" onChange="changeLanguage(this.value,true);" data-icon="gear" data-inline="true" data-native-menu="false">
+ <option value="de" lang="de">Deutsch</option>
+ <option value="en" lang="de">English</option>
+ </select>
+ <br>
+ <label for="select-hand" class="select"><span lang="de">Händigkeit:</span></label>
+ <select name="select-hand" id="select-hand" onChange="changeHand(this.value);" data-icon="gear" data-inline="true" data-native-menu="false">
+ <option value="r" lang="de">Rechtshänder</option>
+ <option value="l" lang="de">Linkshänder</option>
+ </select>
+ <br>
+ <br>
+ <div class="apptools">
+ Browserinfo:<br>
+ <?php echo $_SERVER['HTTP_USER_AGENT']; ?> <br>
+ <a href="#" onClick="checkZindex();">Testfunktion</a><br>
+ </div>
+ </div>
+ </div>
+ <!-- /content -->
+</div>
+<!-- /Loading Seite Ende-->
+</body>
+</html>
Added: trunk/mapbender/http/extensions/mobilemap/map.php~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/map.php~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/map.php~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,309 @@
+<?php
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../conf/mobilemap.conf");
+
+//Fixes IPhone, Android 2.x
+if(strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'Android 2.')) {
+ $scaleselect = "false";
+}
+else {
+ $scaleselect = "true";
+}
+
+//WMC Anfrage Mapbendermodul
+if (isset($_GET['wmcid'])) {
+ $wmcid = htmlspecialchars($_GET["wmcid"]);
+}
+
+?>
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title><?php echo $apptitle; ?></title>
+<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
+<meta name="apple-mobile-web-app-capable" content="yes">
+<link rel="apple-touch-icon" href="<?php echo $iPhoneIcon; ?>"/>
+<link rel="shortcut icon" href="<?php echo $favIcon; ?>"/>
+<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
+<link href="<?php echo $style_1; ?>" rel="stylesheet" >
+<link href="<?php echo $style_2; ?>" rel="stylesheet" >
+<?php if($googleapi){ ?>
+<script src="http://maps.google.com/maps/api/js?sensor=false®ion=DE"></script>
+<?php } ?>
+<script src="../mobilemap/js/proj4js.min.js" ></script>
+<script src="../mobilemap/js/OpenLayers.mobile.min.js"></script>
+<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
+<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
+<script src="../mobilemap/js/jquery-lang.js"></script>
+<script src="../mobilemap/js/langpack/en.js" charset="utf-8" type="text/javascript"></script>
+<script src="../mobilemap/backgroundlayer.php" charset="utf-8" type="text/javascript"></script>
+<?php if($mapbendermod){ ?>
+<!-- Mod Mapbender -->
+<link href="../mobilemap/mod_mapbender/search.css" rel="stylesheet" >
+<!-- /Mod Mapbedner -->
+<?php } ?>
+<?php if($devmode){ ?>
+<script src="../mobilemap/js/dev/1_ngms_olextent.js" ></script>
+<script src="../mobilemap/js/dev/2_ngms_global.js" ></script>
+<?php if($mapbendermod){ ?>
+<!-- Mod Mapbender -->
+<script src="../mobilemap/mod_mapbender/searchobjects.js"></script>
+<script src="../mobilemap/mod_mapbender/search.js"></script>
+<!-- /Mod Mapbedner -->
+<?php } else { ?>
+<script src="../mobilemap/js/dev/3_ngms_layer.js" ></script>
+<?php } ?>
+<script src="../mobilemap/js/dev/4_ngms_base.js" ></script>
+<script src="../mobilemap/js/dev/5_ngms_jq.js" ></script>
+<?php } else{ ?>
+<script src="../mobilemap/js/ngms_event.min.js" ></script>
+<?php } ?>
+<script type="text/javascript">
+ window.lang = new jquery_lang_js();
+ $().ready(function () {
+ window.lang.run();
+ changeLanguage('<?php echo $mylang; ?>',false);
+ <?php if($wmcid != ''){ ?>
+ var wmcurl = '<?php echo $mapbender_wmcurl.$wmcid; ?>';
+ searchWmc(wmcurl);
+ <?php } ?>
+ });
+</script>
+</head>
+<body>
+
+<!-- Map Seite Start-->
+<div data-role="page" id="mappage">
+ <div data-role="content">
+ <div id="logo"><a href="map.php?lang=<?php echo $mylang; ?>" target="_self"><img src="img/logo.png" ></a></div>
+ <div id="map"></div>
+ <div id="navbutgroup">
+ <div id="ovbut" class="navbuttons" style="margin-top:2px"></div>
+ <div id="zoominbut" class="navbuttons" style="margin-top:2px"></div>
+ <div id="zoomoutbut" class="navbuttons" style="margin-top:2px"></div>
+ </div>
+ <div id="navbutgrouptop">
+ <?php if($mapbendermod){ ?>
+ <!-- Mapbender -->
+ <div id="mapbenderbut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+ <!-- Mapbender -->
+ <?php } else { ?>
+ <div id="layerbut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+ <?php } ?>
+ <div id="searchbut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+ <div id="locatebut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+ <div id="menubut" class="navbuttons" style="float:left; margin-left:2px;" ></div>
+
+ </div>
+ <div id="markerhint">
+ <div id="xheader"></div>
+ <div id="xcontent"></div>
+ </div>
+ <div id="measurehint" >
+ <div id="mheader"><span lang="de">Messen</span></div>
+ <div id="measureoutput"></div>
+ </div>
+
+ <div id="scaleline"></div>
+ <div id="copyright"><span lang="de">(C) Geobasidaten: LVermGeo Rlp 2012</span></div>
+ <div id="LoadingPanel"></div>
+ <div id="zoomscale">
+ <select name="selectzoom" id="selectzoom" onChange="changeScale(this.value);" data-inline="true" data-mini="true" data-native-menu="<?php echo $scaleselect; ?>" >
+ </select>
+ <label for="test"></label>
+ </div>
+ <div data-role="popup" id="popupMenu" data-overlay-theme="a" data-theme="a" style="max-width:2280px;" class="ui-corner-all">
+ <a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
+ <div data-role="header" data-theme="a" class="ui-corner-top">
+ <h1>Tools</h1>
+ </div>
+ <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content"><br>
+<table border="0" cellspacing="0" cellpadding="14">
+ <tr>
+ <td><div id="helpbut" class="navbuttons" ></div></td>
+ <td><div id="gearbut" class="navbuttons" ></div></td>
+ </tr>
+ <tr>
+ <td><div id="measurelinebut" class="navbuttons" ></div></td>
+ <td><div id="measurepolybut" class="navbuttons" ></div></td>
+ </tr>
+</table>
+ </div>
+ </div>
+
+ </div>
+ <!-- /content -->
+</div>
+<!-- /Map Seite Ende-->
+
+
+<?php if($mapbendermod){ ?>
+<!-- Mapbender Seite Start-->
+<div data-role="page" id="mod_mapbender" >
+ <div data-role="header" data-position="fixed" data-theme="d"> <a href="#" class="addToMapBut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Katalogsuche</span></h1>
+ </div>
+ <!-- /header -->
+ <div data-role="content" style="padding: 10px; overflow:hidden;" >
+
+ <div data-role="collapsible" >
+ <h3><span lang="de">Hintergrundkarte</span></h3>
+ <div id="baselayers"></div>
+ </div>
+ <label for="mapbendersearchfield"><span lang="de">Layer suchen:</span> </label>
+ <input type="search" name="mapbendersearchfield" id="mapbendersearchfield" value="" />
+ <input type="submit" value="Suchen" lang="de" id="mapbendersearchformbut" data-icon="arrow-r" data-iconpos="right" />
+
+ <ul data-role="listview" data-inset="true">
+ <li data-theme="b">Ihre Auswahl</li>
+ <li id="ownlist"></li>
+ </ul>
+
+ <div data-role="popup" id="preview" data-overlay-theme="a" data-theme="a" style="max-width:2280px;" class="ui-corner-all">
+ <a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
+ <div data-role="header" data-theme="a" class="ui-corner-top">
+ <a href="#" id="preview_zoom" data-icon="search"><span lang="de">Karte</span></a>
+ <h3> </h3>
+ </div>
+ <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content"></div>
+ </div>
+
+ <div data-role="popup" id="info" data-overlay-theme="a" data-theme="a" style="max-width:2280px;" class="ui-corner-all">
+ <a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
+ <div data-role="header" data-theme="a" class="ui-corner-top"><h3><span lang="de">Meldung</span></h3></div>
+ <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
+ <table border="0" cellspacing="0" cellpadding="14">
+ <tr><td id="info_content"></td></tr>
+ </table>
+ </div>
+ </div>
+
+ <ul data-role="listview" data-inset="true" id="resultlist"></ul>
+
+ </div>
+</div>
+<!-- /Mapbender Seite Ende-->
+<?php } else { ?>
+<!-- Layer Seite nicht dynamisch (Beispieleinträge vgl. 3_ngms_layer.js) Start-->
+<div data-role="page" id="layerpage" >
+ <div data-role="header" data-position="fixed" > <a href="#" class="mapbackbut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Ebenen</span></h1>
+ </div>
+ <!-- /header -->
+ <div data-role="content" style="padding: 10px" >
+ <div data-role="collapsible" >
+ <h3><span lang="de">Hintergrundkarte</span></h3>
+ <div class="checkrow" >
+ <div class="baselayer_check" id="atkis_praes_tms" ><span lang="de">Rlp Zusammenstellung</span></div>
+ </div>
+ <div class="clearfix"></div>
+ <div class="checkrow" >
+ <div class="baselayer_check" id="luftbilder" ><span lang="de">Luftbilder</span></div>
+ </div>
+ <div class="clearfix"></div>
+ <div class="checkrow" >
+ <div class="baselayer_check" id="grenze_leer" ><span lang="de">keine Hintergrundkarte</span></div>
+ </div>
+ <div class="clearfix"></div>
+ </div>
+ <div data-role="collapsible" >
+ <h3><span lang="de">Overlays</span></h3>
+ <div class="checkrow" >
+ <div class="layer_check" id="likar" ><span lang="de">Liegenschaftskarte</span></div>
+ </div>
+ <div class="clearfix"></div>
+ <div class="checkrow" >
+ <div class="query_check" id="naturschutzgebiet_query" > </div>
+ <div class="layer_check" id="naturschutzgebiet" ><span lang="de">Naturschutzgebiete</span></div>
+ </div>
+ <div class="clearfix"></div>
+ </div>
+ <div class="infobox" ><span lang="de">Hinweis: Um eine Ebene abzufragen aktivieren Sie die Info-Option und tapen danach in der Karte auf das Objekt der Ebene.</span> </div>
+ <div class="query_check" id="dhm_query" > </div>
+ <div class="layer_nocheck" ><span lang="de">Abfrage Höhe + GPS</span></div>
+ <div class="clearfix"></div>
+ <div class="clearfix"></div>
+ <input name="queryselect" id="queryselect" type="hidden" value="dhm">
+ <br>
+ <div class="infobox" ><span lang="de">Ãnderung der Ebenen wechselt direkt zur Kartenansicht</span></div>
+ <div data-role="fieldcontain" style="margin:1px; padding:1px;">
+ <select name="slider" id="autolayerchange" data-role="slider">
+ <option value="off" selected >off</option>
+ <option value="on">on</option>
+ </select>
+ </div>
+ </div>
+</div>
+<!-- /Layer Seite Ende-->
+<?php } ?>
+
+<!-- Search Seite Start-->
+<div data-role="page" id="searchpage" >
+ <div data-role="header" data-position="fixed" > <a href="#" class="mapbackbut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Suche</span></h1>
+ </div>
+ <!-- /header -->
+ <div data-role="content" style="padding: 10px" >
+ <div>
+ <label for="searchfield"><span lang="de">Ort suchen:</span> </label>
+ <input type="search" name="searchfield" id="searchfield" value="" />
+ <input type="submit" lang="de" value="Suchen" id="searchformbut" data-icon="arrow-r" data-iconpos="right" />
+ </div>
+ <div id="mygooglelink" > </div>
+ <div id="searchdbresult" style="margin-top:20px;" >
+ <ul data-role="listview" id= "search_results" data-theme="a" data-divider-theme="a" >
+ </ul>
+ </div>
+ <div id="mygooglemap" > </div>
+ </div>
+</div>
+<!-- /Search Seite Ende-->
+
+<!-- Hilfe Seite Start-->
+<div data-role="page" id="helppage">
+ <div data-role="header" data-position="fixed" > <a href="#" class="mapbackbut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Hilfe / Info</span></h1>
+ </div>
+ <div data-role="content" style="padding: 10px">
+
+ <div id="helpdiv"> </div>
+ </div>
+ <!-- /content -->
+</div>
+<!-- /Hilfe Seite Ende-->
+
+
+<!-- Einstellungen Start-->
+<div data-role="page" id="gearpage">
+ <div data-role="header" data-position="fixed" > <a href="#" class="mapbackbut" data-icon="arrow-l"><span lang="de">Karte</span></a>
+ <h1><span lang="de">Einstellungen</span></h1>
+ </div>
+ <div data-role="content" style="padding: 10px">
+ <strong><span lang="de">App Einstellungen</span></strong>
+ <br>
+ <label for="select-lang" class="select"><span lang="de">Sprache:</span></label>
+ <select name="select-lang" id="select-lang" onChange="changeLanguage(this.value,true);" data-icon="gear" data-inline="true" data-native-menu="false">
+ <option value="de" lang="de">Deutsch</option>
+ <option value="en" lang="de">English</option>
+ </select>
+ <br>
+ <label for="select-hand" class="select"><span lang="de">Händigkeit:</span></label>
+ <select name="select-hand" id="select-hand" onChange="changeHand(this.value);" data-icon="gear" data-inline="true" data-native-menu="false">
+ <option value="r" lang="de">Rechtshänder</option>
+ <option value="l" lang="de">Linkshänder</option>
+ </select>
+ <br>
+ <br>
+ <div class="apptools">
+ Browserinfo:<br>
+ <?php echo $_SERVER['HTTP_USER_AGENT']; ?> <br>
+ <a href="#" onClick="checkZindex();">Testfunktion</a><br>
+ </div>
+ </div>
+ </div>
+ <!-- /content -->
+</div>
+<!-- /Loading Seite Ende-->
+</body>
+</html>
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/defaulicon.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/defaulicon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_arrow_up.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_arrow_up.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_basecheck.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_basecheck.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_basecheck_active.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_basecheck_active.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_check.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_check.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_check_active.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_check_active.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_checkop.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_checkop.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_checkop_active.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_checkop_active.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_delete.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_delete.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_info.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_info.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_noinfo.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_noinfo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_plus.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_plus.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_preview.png
===================================================================
(Binary files differ)
Property changes on: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/img/ico_preview.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/readme.txt
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/readme.txt (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/readme.txt 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,21 @@
+Kurzinfo zum Ablauf der Funktionsaufrufe
+
+Initialisierung Mapbender-Modul: search.js
+addmyLayer();
+addBaselayers()
+fest verdrahtete Hintergrundkarten in addBaselayers();
+kann auch durch baseinfo[] mit dynamischen Hintergrundkarten ergänzt werden
+
+BaseLayer() in searchobjects.js baut Darstellung
+
+
+Suche nach diensten
+searchMaps()
+--> parseMapBenderJson() Parsen der json-Daten
+--> appendData() Ändern: favicon.ico Fügt Dienste in Dom ein
+
+Aufruf WMC:
+map.php
+searchWmc(); // Aufruf Proxyscript wmc
+Antwort json -->appendWmc() ID-String zusammenbauen
+appendWmcData()
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.css
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.css (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.css 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,290 @@
+#mapbenderbut{ background-image:url(../img/but_sprite.png); background-position: 0 -180px; width: 40px; height: 40px; }
+
+.icon {
+ position: relative;
+ display: block;
+ margin-top: 6px;
+ margin-bottom: 6px;
+ margin-left:2px;
+ margin-right:2px;
+ margin-left:2px;
+ width: 35px;
+ height: 35px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ font-weight: normal;
+ font-size: small;
+ -webkit-tap-highlight-color: rgba(100,200,50,0);
+ -webkit-focus-ring-color: rgba(200, 200,20, 0);
+ -moz-border-radius: 5px;
+ -webkit-border-radius:5px;
+ border-radius: 5px;
+
+}
+
+.query_info {
+ float:left;
+ background-image: url(img/ico_info.png);
+ background-color: #808080;
+}
+
+.query_noinfo{
+ float:left;
+ background-image: url(img/ico_noinfo.png);
+ background-color: #CCC;
+}
+
+.layer_checked {
+ float: left;
+ background-image: url(img/ico_check_active.png);
+}
+
+.layer_unchecked {
+ float: left;
+ background-image: url(img/ico_check.png);
+}
+
+.query_queryable {
+ width: 40px;
+}
+
+.query_checked {
+ float: left;
+ background-image: url(img/ico_checkop_active.png);
+ background-color: #808080;
+}
+
+.query_unchecked {
+ float: left;
+ background-image: url(img/ico_checkop.png);
+ background-color: #808080;
+}
+
+.layer_add {
+ float: right;
+ background-image: url(img/ico_plus.png);
+}
+
+.layer_remove {
+ float: right;
+ background-image: url(img/ico_delete.png);
+}
+
+
+.layer_preview {
+ float: center;
+ background-image: url(img/ico_preview.png);
+}
+
+.arrow_up {
+ float: right;
+ background-image: url(img/ico_arrow_up.png);
+}
+
+.arrow_empty {
+ float: right;
+}
+
+.base_checked {
+ background-image: url(img/ico_basecheck_active.png);
+}
+
+.base_unchecked {
+ background-image: url(img/ico_basecheck.png);
+}
+
+
+
+.baselayer {
+ width:200px;
+ display: block;
+ margin-bottom: 4px;
+ padding-left: 44px;
+ padding-right: 4px;
+ padding-top:8px;
+ padding-bottom:8px;
+ background-repeat: no-repeat;
+ background-position: 5px center;
+ -moz-border-radius: 4px;
+ -webkit-border-radius:4px;
+ border-radius: 4px;
+ background-color: #FFF;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ font-weight: bold;
+ -webkit-tap-highlight-color: rgba(100,200,50,0);
+ -webkit-focus-ring-color: rgba(200, 200,20, 0);
+
+}
+
+
+.searchbutton {
+ z-index:1002;
+ cursor:pointer;
+ border: 2px solid #871D33;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ margin:4px;
+ background-image: url(img/ico_zoomin.png);
+ background-repeat: no-repeat;
+ background-position: 5px center;
+ padding-top: 10px;
+ padding-right: 8px;
+ padding-bottom: 10px;
+ padding-left: 28px;
+ background-color:#FFFFFF;
+}
+
+
+.highlight {
+ background: none repeat scroll 0 0 #FFFF00;
+}
+
+.apptools{
+ background-color:#E8E8E8;
+ border: 1px solid #666;
+ padding:5px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+}
+
+.ui-page .ui-content .ui-listview .ui-li-desc {
+ white-space : normal;
+}
+
+.service.ui-li-static.ui-li {
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+#ownlist.ui-li-static.ui-li {
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.ui-collapsible {
+ border-radius: 0.6em;
+ border-radius: 0.6em;
+ border:1px solid #aaa;
+}
+
+.ui-collapsible-heading {
+ padding: 1px;
+}
+
+.layer {
+ padding:0px;
+ background:#f9f9f9;
+}
+
+.unselected {
+ background:#f9f9f9;
+}
+
+.selected {
+ background:#adff2f;
+}
+
+.collapsible {
+ margin-right:-2px;
+ margin-left:-2px;
+}
+
+.layer_added {
+ background:#CCFF99;
+}
+
+.layer_isbase {
+ border:1px solid #aaa;
+ background:#f9f9f9;
+ padding-left: 10px;
+ margin-top: 7px;
+ margin-bottom: 7px;
+ margin-right:-2px;
+ margin-left:-2px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+}
+
+
+.ui-collapsible-content {
+ background:none;
+ border:none;
+}
+
+
+.logo_table {
+ width: 48px;
+ height: 21px;
+ float: left;
+ position: relative;
+}
+
+.logo_container {
+ margin: 0px;
+ padding: 0px;
+ text-align: center;
+ vertical-align: middle;
+}
+
+.logo {
+ max-height: 100%;
+ max-width: 100%;
+}
+
+.logo_header {
+ position: absolute;
+ left: 50px;
+ overflow: hidden;
+ white-space: nowrap;
+ float: left;
+}
+
+.service_container {
+ margin-bottom
+}
+
+.layer_container {
+ padding-left: 10px;
+ padding:1px;
+}
+
+.service_logo {
+ max-width: 50px;
+ height: 40px;
+}
+
+.logo_container {
+ float: left;
+ width: 50px;
+ height: 40px;
+ margin-top:2px;
+ margin-left: 4px;
+ margin-right: 2px;
+}
+
+.layerinfo {
+ vertical-align: top;
+ text-align: center;
+ padding-right: 4px;
+}
+
+.query_iframe{
+ width: 100%
+ max-height: 200px;
+ border:none;
+}
+
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,696 @@
+/*
+Anmerkungen:
+############
+Die Suche gibt Dienste (data.wms.srv zurück), die Dienstinformationen (id, title, abstract ect. enthalten).
+Hier werden auch die Zusatzinformationen zur verfügbarkeit ect. abgelegt.
+Diese beinhalten auch das Objekt data.wms.srv.layer, welches über (id, title, abstract, getMapUrl) verfügt.
+Es scheint jedoch immer nur einer dieser Gruppenlayer vorzuliegen.
+Es handelt sich bei data.wms.srv.layer wiederum um eine Zusammenfassung von Layern mit dem unterobjekt Objekt data.wms.srv.layer.layer.
+Dort finden sich Informationen zum Layer selber (id, title, abstract) und Informationen zur Abfragbarbeit.
+
+Beim Testen fiel auf, dass Services (mit eindeutiger id) auch doppelt mit unterschiedlichen Layern vorkommen können.
+
+
+Implementierung:
+################
+Hier werden diese einzelen Objekte als js-Objekte neu definiert um gegen änderungen in der Mapbender-Schnittstelle unabhängig zu sein.
+
+Hier wurde folgende Objekthierarchie festgelegt
+
+"ServiceList" ist eine Zusammenstellung (Array) von Services und trägt die Informationn ob es sich um das Suchergebnis oder die Auswahlliste handelt
+diese Information wird beim Einfügen eines "Service" weitegegeben.
+
+Ein "Service" ist ein Array von Gruppenlayern
+
+Ein "Gruppenlayer" ist ein Array von Layern
+
+"Layer" enthält die Layerinformation
+
+
+*/
+
+var maxlayers = 5;
+var maxresults = 40;
+
+// Hintergrundkarten (Urls werden erst beim laden in die Karte besorgt)
+var baseinfo = [];
+// Angabe Bezeichnung, kommaseperierte Id's
+//baseinfo.push(["Hintergrund1","27694","4.8,49,9.9,50"]);
+//baseinfo.push(["Hintergrund2","25420","4.8,49,9.9,50"]);
+//baseinfo.push(["Hintergrund3","25351,100110","4.8,49,9.9,50"]);
+
+searchUrl = 'mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&maxResults='+maxresults;
+
+
+// Initialisierung
+function addmyLayer(){
+
+ //Erweiterung OpenLayers - angepasster Click Event
+ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ 'pixelTolerance': 0,
+ 'stopSingle': false
+ },
+
+ initialize: function(options) {
+ var opts = options || {};
+ this.handlerOptions = OpenLayers.Util.applyDefaults(opts.handlerOptions || {},this.defaultHandlerOptions);
+ OpenLayers.Control.prototype.initialize.apply(this,arguments);
+ this.handler = new OpenLayers.Handler.Click(this,{'click': this.onClick},this.handlerOptions);
+ },
+
+ onClick: function( evt ) {
+ // click funcktion
+ var lonlat = map.getLonLatFromViewPortPx(evt.xy);
+ var querylayer = $('#ownlist').find('.query_checked').parent();
+ var actuallang = $('#select-lang').val();
+ //Punkt erzeugen
+ var geompoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ var geompoint1 = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(geompoint,{},olSearchSymbol),
+ new OpenLayers.Feature.Vector(geompoint1,{},olFeaturequerySymbol)
+ ]);
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+
+ if(querylayer.length>0){
+ // Abfrage des ausgewählten Layers
+ var featureurl = querylayer.attr('getmapurl')
+ + '&wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1'
+ + '&mapfile='+ querylayer.attr('name')
+ + '&layers=' + querylayer.attr('name') + '&QUERY_LAYERS=' + querylayer.attr('name')
+ + '&SRS=' + featurequerySrc
+ + '&BBOX=' + map.getExtent().toBBOX()
+ + '&WIDTH=' + map.size.w + '&HEIGHT=' + map.size.h
+ + '&X=' + evt.xy.x + '&Y=' + evt.xy.y
+ + '&INFO_FORMAT=text/html';
+ var iframe=$('<iframe src="'+featureurl+'" class="query_iframe">'
+ +'<p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'
+ );
+ setMarkerhint('Abfrageergebnis:',iframe);
+ } else {
+ // Standartabfrage, falls keiner ausgewählt ist
+ var featureurl = 'query/rasterquery.php?coord='+lonlat.lon+ ', '+lonlat.lat+'&lang='+actuallang;
+ loadFeature(featureurl);
+ }
+ },
+
+ CLASS_NAME: "OpenLayers.Control.Click"
+ });
+
+ $("#mapbenderbut").click(function(){
+ $.mobile.changePage($("#mod_mapbender"),pageTransition);
+ refresh();
+ });
+
+ //Suchbutton
+ $('#mapbendersearchformbut').click(function() {
+ searchMaps(searchUrl+'&searchText='+$('#mapbendersearchfield').val());
+ });
+
+ //Suchfeld
+ $('#mapbendersearchfield').live('keypress', function(e) {
+ if(e.keyCode === 13){
+ searchMaps(searchUrl+'&searchText='+$('#mapbendersearchfield').val());
+ }
+ });
+
+ // Alle anderen Layer einklappen
+ $('div[data-role=collapsible]').live('expand', function(){
+ $("div[data-role=collapsible]").not($(this)).trigger("collapse");
+ });
+
+ //zurück zur Karte-Button
+ $(".addToMapBut").click(function(){
+ $("div[data-role=collapsible]").not('.ui-collapsible-collapsed').trigger("collapse");
+ $.mobile.changePage($("#mappage"),pageTransition);
+ });
+
+ addBaselayers();
+
+}
+
+
+
+// ---------------
+// Popupfenster:
+// ---------------
+
+// Popupfenster für Vorschau mit Ajax (deaktiviert)
+function preview(url,layerid,bbox){
+ $.ajax({
+ previewurl: url,
+ layerid: layerid,
+ bbox: bbox,
+ success: function() {
+ $("#preview").find('div[data-role=content]').empty();
+ $("#preview").find('div[data-role=content]').append('<img src="' + $(this).attr("previewurl") + '" alt="image" style="width:200px;">');
+ var bbox=$(this).attr("bbox");
+ var layerid=$(this).attr("layerid");
+ $("#preview_zoom").click(function(){
+ var index=getOpenlayersIndex(layerid);
+ /*if(index>=0){
+ map.zoomToExtent(map.layers[index].getExtent());
+ };*/
+ zoomToBbox(bbox);
+ $.mobile.changePage($("#mappage"),pageTransition);
+
+ });
+ $('#preview').popup('open');
+ }
+ });
+}
+
+// Anzeigen eines Popups, bei einer zu groÃen Auswahl
+getInfo = function(content){
+ $("#info_content").empty();
+ $("#info_content").append(content);
+ $('#info').popup('open');
+}
+
+
+
+// ----------------------------
+// Funktionen für Openlayers:
+// ----------------------------
+
+// Index des Openlayer Eintrages zurückgeben
+function getOpenlayersIndex(layerid){
+ for (var i=0; i<map.layers.length; i++){
+ if(map.layers[i].name==layerid){
+ return i;
+ }
+ }
+ return -1;
+}
+
+// Layer in die Karte einfügen
+function addOpenlayer(layerid,layername,getMapUrl){
+ var openLayer = new OpenLayers.Layer.WMS(layerid,getMapUrl,
+ { layers: layername, format: "image/png", transparent: "TRUE", transitionEffect: 'resize'},
+ { projection: mapProj, units: projUnits, opacity: 0.8, singleTile: true, 'isBaseLayer': false, visibility: true, alwaysInRange: true
+ }
+ );
+ map.addLayer(openLayer);
+ map.setLayerIndex(openLayer, 0);
+
+}
+
+// Bestimmter Layer aus Karte entfernen
+function removeOpenlayer(layerid){
+ var index=getOpenlayersIndex(layerid);
+ if(index>=0){
+ map.removeLayer(map.layers[index]);
+ }
+}
+
+// Baselayer auswählen
+function setOpenBaselayer(baseid){
+ var index=getOpenlayersIndex(baseid);
+ if(index>=0){
+ map.setBaseLayer(map.layers[index]);
+ }
+}
+
+// Overlay sichtbar schalten
+function selectOpenlayer(layerid,visibility){
+ var index=getOpenlayersIndex(layerid);
+ if(index>=0){
+ map.layers[index].setVisibility(visibility);
+ }
+}
+
+// Dynamische Hintergrundkarte in die Karte einfügen
+function addOpenBaselayer(baselayername,baselayerids){
+
+ // Layerdaten dynamisch laden
+ var searchUrl = 'mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&resourceIds='+baselayerids;
+
+ $.getJSON(
+ searchUrl,
+ function(data){
+
+ // Hintergrundkarten
+ var services=data.wms.srv;
+ $.each(services, function(index,srv){
+ $.each(srv.layer, function(index, layer){
+ if(layer.layer){
+ layer=layer.layer[0];
+ }
+ var layername=layer.name;
+ var getMapUrl=srv.getMapUrl;
+ var openLayer = new OpenLayers.Layer.WMS(baselayername,getMapUrl,
+ { layers:layername, format:"image/png", transparent:"false", transitionEffect:'resize'},
+ { projection:mapProj, units:projUnits, singleTile:true, 'isBaseLayer':true, alwaysInRange:true}
+ );
+ map.addLayers([openLayer]);
+ });
+ });
+ });
+}
+
+// Zoomen auf bestimmte Boundingbox
+function zoomToBbox(bbox){
+ var extend=bbox.split(',');
+ var p1 = new OpenLayers.LonLat(extend[0],extend[1]).transform(wgs84Proj,mapProj);
+ var p2 = new OpenLayers.LonLat(extend[2],extend[3]).transform(wgs84Proj,mapProj);
+ map.zoomToExtent(new OpenLayers.Bounds(p1.lon, p1.lat, p2.lon, p2.lat));
+}
+
+
+// -------------------
+// Listenfunktionen:
+// -------------------
+
+// Anzahl der Dienste zurückgeben
+function numServices(){
+ return $('#resultlist').find('.service').length;
+}
+
+// Anzahl der Layer in einem bestimmten Element zurückgeben
+function numResultLayers(element){
+ return element.find('.layer').length;
+}
+
+// Prüfen ob und wo ein Layer in einer Liste ist
+function layerInList(list,id){
+ var layers=list.find('.layer');
+ for(var i=0; i<layers.length; i++){
+ if($(layers[i]).attr('layerid')==id) { return i }
+ }
+ return -1;
+};
+
+// Layer in Auswahl rauf
+function up(layerid){
+ var position = layerInList($('#ownlist'),layerid);
+ if(position>0){
+ $($('#ownlist').find('.layer')[position]).after($($('#ownlist').find('.layer')[position-1]));
+console.log('todo: layerreihenfolge')
+ map.raiseLayer(map.layers[getOpenlayersIndex(layerid)],1);
+ validateArrows();
+ refresh();
+ }
+}
+
+// Anzahl der Aktuellen Auswahl ausgeben
+function numOwnlayers(){
+ return $('#ownlist').find('.layer').length;
+}
+
+
+
+// ----------------------------------------
+// Funktioen zur Validierung der Anzeige:
+// ----------------------------------------
+
+// Erneuern der Darstellung
+function refresh(){
+ $('#resultlist').listview('refresh');
+ $($('#ownlist').parent()).listview('refresh');
+ $('div[data-role=collapsible]').collapsible();
+ $('a[data-role=button]').button();
+}
+
+// Layerauswahl kennntlich machen
+function validateLayers(){
+ layers=$('#resultlist').find('.layer');
+ $.each(layers, function(index,layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position>=0){
+ $(layer).find('.layer_icon').first().attr('class','layer_icon icon layer_remove');
+ $(layer).find('.collapsible').first().removeClass('unselected').addClass('selected');
+ } else {
+ $(layer).find('.layer_icon').first().attr('class','layer_icon icon layer_add');
+ $(layer).find('.collapsible').first().removeClass('selected').addClass('unselected');
+ }
+ });
+}
+
+// Validierung der Pfeile zum verschieben der Layer
+function validateArrows(){
+ var movers=$('#ownlist').find('.move');
+ $(movers[0]).attr('class','icon move arrow_empty');
+ if(movers.length>1){
+ $(movers[1]).attr('class','icon move arrow_up');
+ }
+}
+
+// Validierung der Queryable-Auswahl
+function query_check(item){
+ if($(item).hasClass('query_unchecked')){
+ $('#ownlist').find('.query_checked').addClass('query_unchecked').removeClass('query_checked');
+ $(item).addClass('query_checked').removeClass('query_unchecked');
+ } else {
+ $(item).addClass('query_unchecked').removeClass('query_checked');
+ }
+}
+
+
+
+
+// ---------------------------------
+// Hinzufüge- + Entfernfunktionen:
+// ---------------------------------
+
+// Layer zur Auswahl hinzufügen
+function addLayer(layer){
+ if(numOwnlayers()>=maxlayers){
+ getInfo('Es können nicht mehr als '+maxlayers+' Ebenen zur Auswahl hinzugefügt werden.');
+ return false;
+ } else {
+ $.mobile.showPageLoadingMsg();
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position<0){
+ // Layer hinzufügen
+ $('#ownlist').append(OwnLayer(layer.attr('layerid'),layer.attr('title'),layer.attr('name'),layer.attr('desc'),layer.parent().attr('title'),layer.parent().attr('desc'),layer.attr('previewUrl'),layer.attr('queryable')=='true',layer.attr('getMapUrl'),layer.attr('bbox'),layer.parent().attr('avail')));
+ validateLayers();
+ validateArrows();
+ refresh();
+ addOpenlayer(layer.attr('layerid'),layer.attr('name'),layer.attr('getMapUrl'));
+ $.mobile.hidePageLoadingMsg();
+ return true;
+ }
+ $.mobile.hidePageLoadingMsg();
+ return false;
+ }
+}
+
+// Layer entfernen
+function removeLayer(layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ $($('#ownlist').find('.layer')[layerInList($('#ownlist'),$(layer).attr('layerid'))]).remove();
+ validateLayers();
+ validateArrows();
+ refresh();
+ removeOpenlayer($(layer).attr('layerid'));
+}
+
+// Layer hinzfügen oder entfernen
+function switchLayer(layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position<0){
+ addLayer(layer);
+ } else {
+ removeLayer(layer);
+ }
+}
+
+// Service mit allen Layern hinzufügen
+function addService(service){
+ var layers=service.find('.layer');
+ for(var i=0; i<layers.length; i++){
+ addLayer($(layers[i]));
+ if(numOwnlayers()>maxlayers){ break; }
+ }
+}
+
+// Service mit allen Layern entfernen
+function removeService(service){
+ $.each(service.find('.layer'), function(index, layer){
+ removeLayer($(layer));
+ });
+}
+
+// Sichtbarkeit eines Layers umschalten
+function switchVisibility(layer){
+ if($(layer).hasClass('layer')){ // Overlay
+ $(layer).find('.layer_visibility').toggleClass('layer_checked').toggleClass('layer_unchecked');
+ selectOpenlayer($(layer).attr('layerid'),$(layer).find('.layer_visibility').hasClass('layer_checked'));
+ } else { // Baselayer
+ $('#baselayers').find('.base_checked').addClass('base_unchecked').removeClass('base_checked');
+ $(layer).addClass('base_checked').removeClass('base_unchecked');
+ setOpenBaselayer($(layer).attr('layerids'));
+ }
+}
+
+// Validierung der Baselayer-Auswahl
+function base_check(item){
+ $('#baselayers').find('.base_checked').addClass('base_unchecked').removeClass('base_checked');
+ $(item).addClass('base_checked').removeClass('base_unchecked');
+}
+
+
+
+// -----------------------
+// Daten Laden + Parsen:
+// -----------------------
+
+// Standardsuche
+function searchMaps(searchurl){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ $.getJSON(searchurl, function(data){
+ var datacollection=parseMapBenderJson(data);
+ appendData(datacollection.services,datacollection.layers,datacollection.nresults);
+ $.mobile.hidePageLoadingMsg();
+ if(datacollection.nresults>maxresults){
+ getInfo('Es gab '+datacollection.nresults
+ +' Treffer, es können aber nur '
+ +maxresults+' Ergebnisse angezeigt werden.'
+ +'</br><b>Schränken Sie Ihre Suche weiter ein.</b>');
+ };
+ });
+}
+
+// Suche über WMC-Dienste
+function searchWmc(wmcurl){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ $.getJSON(wmcurl, function(data){
+ appendWmc(data);
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+// Parst das JSON-Objekt von MapBender in ein Array [services,layers]
+function parseMapBenderJson(json){
+ // Daten generalisieren
+ var srvs=json.wms.srv;
+ var services=[];
+ var layers=[];
+ $.each(srvs, function(index,srv){
+ // Dienste zusammenfassen
+ var dublicated=false;
+ for(var i=0; i<services.length; i++){
+ if(services[i].id==srv.id){
+ dublicated=true;
+ break;
+ }
+ }
+ // Dienst freigegeben?
+ if(!srv.logged && !srv.nwaccess){
+ if(!dublicated){
+ services.push(srv);
+ }
+ // Layer aufnehmen
+ $.each(srv.layer, function(index, grplayer){
+ if(grplayer.layer){
+ $.each(grplayer.layer, function(index, lyr){
+ layers.push([srv.id,lyr]);
+ });
+ } else {
+ layers.push([srv.id,grplayer]);
+ }
+ });
+ }
+ });
+
+ return {"services": services, "layers": layers, "nresults":json.wms.md.nresults};
+}
+
+// Fügt die Dienste und Layer in das DOM ein
+function appendData(services,layers,nresults){
+ $("#resultlist").empty();
+ for(var i=0; i<services.length; i++){
+ var srv=services[i];
+ service=Service(srv.id,srv.title,$(srv).attr('abstract'),srv.getMapUrl,srv.status,(srv.logoUrl==""? 'mod_mapbender/img/defaulicon.png' : srv.logoUrl ),srv.symbolLink,srv.avail);
+ // Layer zuordnen
+ for(var j=0; j<layers.length; j++){
+ var layer=layers[j];
+ var serviceid=layer[0];
+ var lyr=layer[1];
+
+ if(serviceid==srv.id){
+ service.append(ResultLayer(lyr.id,lyr.title,lyr.name,$(lyr).attr('abstract'),lyr.previewURL,lyr.queryable=='1',srv.getMapUrl,lyr.bbox));
+ }
+ }
+ $('#resultlist').append(service);
+ }
+ $('#resultlist').prepend('<li data-theme="b">Suchergebnis: '+numServices()+' Dienste, '
+ +numResultLayers($('#resultlist'))+' Layer '
+ +'('+nresults+' Treffer) </li>');
+ validateLayers();
+ refresh();
+}
+
+// Fügt die WMC-Layer in das DOM ein
+function appendWmcData(services,layers,layerlist){
+ $("#ownlist").empty();
+ var ownlayers = [];
+ for(var i=0; i<services.length; i++){
+ var srv=services[i];
+ // Layer zuordnen
+ for(var j=0; j<layers.length; j++){
+ var layer=layers[j];
+ var serviceid=layer[0];
+ var lyr=layer[1];
+
+ if(serviceid==srv.id){
+ ownlayers.push(OwnLayer(lyr.id,lyr.title,lyr.name,$(lyr).attr('abstract'),srv.title,$(srv).attr('abstract'),lyr.previewURL,lyr.queryable=='1',srv.getMapUrl,lyr.bbox,srv.avail));
+ }
+ }
+ }
+
+
+ // Layer richtig sortiert einfügen und selektieren
+ for(var i=0; i<layerlist.length; i++){
+ for(var j=0; j<ownlayers.length; j++){
+ if(layerlist[i].layerId==ownlayers[j].attr('layerid')){
+ var layer=ownlayers[j];
+ $('#ownlist').append(layer);
+ addOpenlayer(layer.attr('layerid'),layer.attr('name'),layer.attr('getMapUrl'));
+ if(!layerlist[i].active){ // Auswahl umschalten
+ switchVisibility(layer);
+ }
+ break;
+ }
+ }
+ }
+ validateLayers();
+ validateArrows();
+
+}
+
+// Alle ausgewählten Overlays entfernen
+function clearOwnlist(){
+ var layers=$('#ownlist').find('.layer');
+ for(var i=0; i<layers.length; i++){
+ removeLayer(layers[i]);
+ }
+}
+
+// WMC-Daten hinzufügen
+function appendWmc(json){
+
+ // Hintergrundkarte auswählen
+ for(var i=0; i<json.backGroundLayer.length; i++){
+ var layer=json.backGroundLayer[i];
+ if(layer.active){
+ var layers=$('#baselayers').find('.baselayer')
+ for(var j=0; j<layers.length; j++){
+ if($(layers[j]).attr('layerids')==layer.name){
+ switchVisibility(layers[j]);
+ break;
+ }
+ }
+ }
+ }
+
+ // Alle ausgewählten overlays entfernen
+ clearOwnlist();
+
+ // Layerids für die Abfrage zusammenstellen
+ var layerids="";
+ $.each(json.layerList, function(index,layer){
+ layerids=layerids+","+layer.layerId;
+ });
+ layerids=layerids.substr(1,layerids.length);
+
+ // Overlays auswählen
+ $.getJSON(searchUrl+'&resourceIds='+layerids, function(data){
+ // Informationen sammeln und Parsen
+ var datacollection=parseMapBenderJson(data);
+ appendWmcData(datacollection.services,datacollection.layers,json.layerList);
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+
+
+// Hintergrunddaten in Collapsible aufnehmen
+function addBaselayers(){
+
+ $("#baselayers").empty();
+
+ // Vektorlayer
+ vector_marker = new OpenLayers.Layer.Vector("Vector Layer", {});
+
+ // Hintergrund:Topographie ect.
+/* var atkis_praes_tms = new OpenLayers.Layer.TMS(
+ "Hybrid",
+ "http://www.gdi-rp-dienste2.rlp.de/mapcache/tms/",
+ {
+ layername: 'test at UTM32',
+ type: "jpeg",
+ serviceVersion:"1.0.0",
+ gutter:0,
+ buffer:0,
+ isBaseLayer:true,
+ transitionEffect:'resize',
+ resolutions: [529.16666666670005270134,396.87500000000000000000,264.58333333330000414207,132.29166666669999585793,66.14583333330000414207,39.68750000000000000000,26.45833333330000058936,13.22916666669999941064,6.61458333329999970118,3.96875000000000000000,2.64583333330000014527,2.11666666670000003236,1.32291666670000007677,0.79375000000000000000,0.26458333330000001204,0.13229166670000001016],
+ units: projUnits,
+ projection: mapProj,
+ sphericalMercator: false
+ }
+ );*/
+
+ $('#baselayers').append(BaseLayer("RLP Zusammenstellung",atkis_praes_tms.name));
+
+ // Hintergrund: Luftbild
+/* var luftbilder = new OpenLayers.Layer.WMS( "Luftbild",
+ "http://geo4.service24.rlp.de/wms/dop40_geo4.fcgi?",
+ {
+ layers: "dop",
+ format: "image/jpeg",
+ transparent: "false",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: false,
+ alwaysInRange: true,
+ 'isBaseLayer': true
+ }
+ ); */
+
+ $('#baselayers').append(BaseLayer("Luftbilder",luftbilder.name));
+
+/* var grenze_leer = new OpenLayers.Layer.WMS( "grenze_leer",
+ "http://map1.naturschutz.rlp.de/service_basis/mod_wms/wms_getmap.php?mapfile=tk_rlp_gesamt&",
+ {
+ layers: "grenzen_land",
+ format: "image/jpeg",
+ transparent: "false",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: true,
+ alwaysInRange: true,
+ 'isBaseLayer': true
+ } );*/
+
+
+ $('#baselayers').append(BaseLayer("Keine Hintergrundkarte",grenze_leer.name));
+
+ map.addLayers([atkis_praes_tms,luftbilder,grenze_leer,vector_marker]);
+
+ // Dynamische Hintergrundkarten hinzufügen
+ for(i in baseinfo){
+ var name=baseinfo[i][0]
+ var layerids=baseinfo[i][1];
+ $('#baselayers').append(BaseLayer(name,layerids));
+ addOpenBaselayer(name,layerids);
+ }
+
+ // Erste Hintergrundkarte auswählen
+ base_check($('#baselayers').find('.baselayer').first());
+}
+
+
+
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search.js~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,696 @@
+/*
+Anmerkungen:
+############
+Die Suche gibt Dienste (data.wms.srv zurück), die Dienstinformationen (id, title, abstract ect. enthalten).
+Hier werden auch die Zusatzinformationen zur verfügbarkeit ect. abgelegt.
+Diese beinhalten auch das Objekt data.wms.srv.layer, welches über (id, title, abstract, getMapUrl) verfügt.
+Es scheint jedoch immer nur einer dieser Gruppenlayer vorzuliegen.
+Es handelt sich bei data.wms.srv.layer wiederum um eine Zusammenfassung von Layern mit dem unterobjekt Objekt data.wms.srv.layer.layer.
+Dort finden sich Informationen zum Layer selber (id, title, abstract) und Informationen zur Abfragbarbeit.
+
+Beim Testen fiel auf, dass Services (mit eindeutiger id) auch doppelt mit unterschiedlichen Layern vorkommen können.
+
+
+Implementierung:
+################
+Hier werden diese einzelen Objekte als js-Objekte neu definiert um gegen änderungen in der Mapbender-Schnittstelle unabhängig zu sein.
+
+Hier wurde folgende Objekthierarchie festgelegt
+
+"ServiceList" ist eine Zusammenstellung (Array) von Services und trägt die Informationn ob es sich um das Suchergebnis oder die Auswahlliste handelt
+diese Information wird beim Einfügen eines "Service" weitegegeben.
+
+Ein "Service" ist ein Array von Gruppenlayern
+
+Ein "Gruppenlayer" ist ein Array von Layern
+
+"Layer" enthält die Layerinformation
+
+
+*/
+
+var maxlayers = 5;
+var maxresults = 40;
+
+// Hintergrundkarten (Urls werden erst beim laden in die Karte besorgt)
+var baseinfo = [];
+// Angabe Bezeichnung, kommaseperierte Id's
+//baseinfo.push(["Hintergrund1","27694","4.8,49,9.9,50"]);
+//baseinfo.push(["Hintergrund2","25420","4.8,49,9.9,50"]);
+//baseinfo.push(["Hintergrund3","25351,100110","4.8,49,9.9,50"]);
+
+searchUrl = 'mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&maxResults='+maxresults;
+
+
+// Initialisierung
+function addmyLayer(){
+
+ //Erweiterung OpenLayers - angepasster Click Event
+ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
+ defaultHandlerOptions: {
+ 'single': true,
+ 'pixelTolerance': 0,
+ 'stopSingle': false
+ },
+
+ initialize: function(options) {
+ var opts = options || {};
+ this.handlerOptions = OpenLayers.Util.applyDefaults(opts.handlerOptions || {},this.defaultHandlerOptions);
+ OpenLayers.Control.prototype.initialize.apply(this,arguments);
+ this.handler = new OpenLayers.Handler.Click(this,{'click': this.onClick},this.handlerOptions);
+ },
+
+ onClick: function( evt ) {
+ // click funcktion
+ var lonlat = map.getLonLatFromViewPortPx(evt.xy);
+ var querylayer = $('#ownlist').find('.query_checked').parent();
+ var actuallang = $('#select-lang').val();
+ //Punkt erzeugen
+ var geompoint = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ var geompoint1 = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
+ vector_marker.removeAllFeatures();
+ vector_marker.addFeatures([
+ new OpenLayers.Feature.Vector(geompoint,{},olSearchSymbol),
+ new OpenLayers.Feature.Vector(geompoint1,{},olFeaturequerySymbol)
+ ]);
+ setMarkerhint(window.lang.convert('Meldung:'),window.lang.convert('bitte warten...'));
+
+ if(querylayer.length>0){
+ // Abfrage des ausgewählten Layers
+ var featureurl = querylayer.attr('getmapurl')
+ + '&wms=SERVICE=WMS&REQUEST=getFeatureInfo&VERSION=1.1.1'
+ + '&mapfile='+ querylayer.attr('name')
+ + '&layers=' + querylayer.attr('name') + '&QUERY_LAYERS=' + querylayer.attr('name')
+ + '&SRS=' + featurequerySrc
+ + '&BBOX=' + map.getExtent().toBBOX()
+ + '&WIDTH=' + map.size.w + '&HEIGHT=' + map.size.h
+ + '&X=' + evt.xy.x + '&Y=' + evt.xy.y
+ + '&INFO_FORMAT=text/html';
+ var iframe=$('<iframe src="'+featureurl+'" class="query_iframe">'
+ +'<p>Die Abfrage kann leider nicht angezeigt werden.</p></img>'
+ );
+ setMarkerhint('Abfrageergebnis:',iframe);
+ } else {
+ // Standartabfrage, falls keiner ausgewählt ist
+ var featureurl = 'query/rasterquery.php?coord='+lonlat.lon+ ', '+lonlat.lat+'&lang='+actuallang;
+ loadFeature(featureurl);
+ }
+ },
+
+ CLASS_NAME: "OpenLayers.Control.Click"
+ });
+
+ $("#mapbenderbut").click(function(){
+ $.mobile.changePage($("#mod_mapbender"),pageTransition);
+ refresh();
+ });
+
+ //Suchbutton
+ $('#mapbendersearchformbut').click(function() {
+ searchMaps(searchUrl+'&searchText='+$('#mapbendersearchfield').val());
+ });
+
+ //Suchfeld
+ $('#mapbendersearchfield').live('keypress', function(e) {
+ if(e.keyCode === 13){
+ searchMaps(searchUrl+'&searchText='+$('#mapbendersearchfield').val());
+ }
+ });
+
+ // Alle anderen Layer einklappen
+ $('div[data-role=collapsible]').live('expand', function(){
+ $("div[data-role=collapsible]").not($(this)).trigger("collapse");
+ });
+
+ //zurück zur Karte-Button
+ $(".addToMapBut").click(function(){
+ $("div[data-role=collapsible]").not('.ui-collapsible-collapsed').trigger("collapse");
+ $.mobile.changePage($("#mappage"),pageTransition);
+ });
+
+ addBaselayers();
+
+}
+
+
+
+// ---------------
+// Popupfenster:
+// ---------------
+
+// Popupfenster für Vorschau mit Ajax (deaktiviert)
+function preview(url,layerid,bbox){
+ $.ajax({
+ previewurl: url,
+ layerid: layerid,
+ bbox: bbox,
+ success: function() {
+ $("#preview").find('div[data-role=content]').empty();
+ $("#preview").find('div[data-role=content]').append('<img src="' + $(this).attr("previewurl") + '" alt="image" style="width:200px;">');
+ var bbox=$(this).attr("bbox");
+ var layerid=$(this).attr("layerid");
+ $("#preview_zoom").click(function(){
+ var index=getOpenlayersIndex(layerid);
+ /*if(index>=0){
+ map.zoomToExtent(map.layers[index].getExtent());
+ };*/
+ zoomToBbox(bbox);
+ $.mobile.changePage($("#mappage"),pageTransition);
+
+ });
+ $('#preview').popup('open');
+ }
+ });
+}
+
+// Anzeigen eines Popups, bei einer zu groÃen Auswahl
+getInfo = function(content){
+ $("#info_content").empty();
+ $("#info_content").append(content);
+ $('#info').popup('open');
+}
+
+
+
+// ----------------------------
+// Funktionen für Openlayers:
+// ----------------------------
+
+// Index des Openlayer Eintrages zurückgeben
+function getOpenlayersIndex(layerid){
+ for (var i=0; i<map.layers.length; i++){
+ if(map.layers[i].name==layerid){
+ return i;
+ }
+ }
+ return -1;
+}
+
+// Layer in die Karte einfügen
+function addOpenlayer(layerid,layername,getMapUrl){
+ var openLayer = new OpenLayers.Layer.WMS(layerid,getMapUrl,
+ { layers: layername, format: "image/png", transparent: "TRUE", transitionEffect: 'resize'},
+ { projection: mapProj, units: projUnits, opacity: 0.8, singleTile: true, 'isBaseLayer': false, visibility: true, alwaysInRange: true
+ }
+ );
+ map.addLayer(openLayer);
+ map.setLayerIndex(openLayer, 0);
+
+}
+
+// Bestimmter Layer aus Karte entfernen
+function removeOpenlayer(layerid){
+ var index=getOpenlayersIndex(layerid);
+ if(index>=0){
+ map.removeLayer(map.layers[index]);
+ }
+}
+
+// Baselayer auswählen
+function setOpenBaselayer(baseid){
+ var index=getOpenlayersIndex(baseid);
+ if(index>=0){
+ map.setBaseLayer(map.layers[index]);
+ }
+}
+
+// Overlay sichtbar schalten
+function selectOpenlayer(layerid,visibility){
+ var index=getOpenlayersIndex(layerid);
+ if(index>=0){
+ map.layers[index].setVisibility(visibility);
+ }
+}
+
+// Dynamische Hintergrundkarte in die Karte einfügen
+function addOpenBaselayer(baselayername,baselayerids){
+
+ // Layerdaten dynamisch laden
+ var searchUrl = 'mod_mapbender/search_proxy.php?languageCode=de&resultTarget=web&resourceIds='+baselayerids;
+
+ $.getJSON(
+ searchUrl,
+ function(data){
+
+ // Hintergrundkarten
+ var services=data.wms.srv;
+ $.each(services, function(index,srv){
+ $.each(srv.layer, function(index, layer){
+ if(layer.layer){
+ layer=layer.layer[0];
+ }
+ var layername=layer.name;
+ var getMapUrl=srv.getMapUrl;
+ var openLayer = new OpenLayers.Layer.WMS(baselayername,getMapUrl,
+ { layers:layername, format:"image/png", transparent:"false", transitionEffect:'resize'},
+ { projection:mapProj, units:projUnits, singleTile:true, 'isBaseLayer':true, alwaysInRange:true}
+ );
+ map.addLayers([openLayer]);
+ });
+ });
+ });
+}
+
+// Zoomen auf bestimmte Boundingbox
+function zoomToBbox(bbox){
+ var extend=bbox.split(',');
+ var p1 = new OpenLayers.LonLat(extend[0],extend[1]).transform(wgs84Proj,mapProj);
+ var p2 = new OpenLayers.LonLat(extend[2],extend[3]).transform(wgs84Proj,mapProj);
+ map.zoomToExtent(new OpenLayers.Bounds(p1.lon, p1.lat, p2.lon, p2.lat));
+}
+
+
+// -------------------
+// Listenfunktionen:
+// -------------------
+
+// Anzahl der Dienste zurückgeben
+function numServices(){
+ return $('#resultlist').find('.service').length;
+}
+
+// Anzahl der Layer in einem bestimmten Element zurückgeben
+function numResultLayers(element){
+ return element.find('.layer').length;
+}
+
+// Prüfen ob und wo ein Layer in einer Liste ist
+function layerInList(list,id){
+ var layers=list.find('.layer');
+ for(var i=0; i<layers.length; i++){
+ if($(layers[i]).attr('layerid')==id) { return i }
+ }
+ return -1;
+};
+
+// Layer in Auswahl rauf
+function up(layerid){
+ var position = layerInList($('#ownlist'),layerid);
+ if(position>0){
+ $($('#ownlist').find('.layer')[position]).after($($('#ownlist').find('.layer')[position-1]));
+console.log('todo: layerreihenfolge')
+ map.raiseLayer(map.layers[getOpenlayersIndex(layerid)],1);
+ validateArrows();
+ refresh();
+ }
+}
+
+// Anzahl der Aktuellen Auswahl ausgeben
+function numOwnlayers(){
+ return $('#ownlist').find('.layer').length;
+}
+
+
+
+// ----------------------------------------
+// Funktioen zur Validierung der Anzeige:
+// ----------------------------------------
+
+// Erneuern der Darstellung
+function refresh(){
+ $('#resultlist').listview('refresh');
+ $($('#ownlist').parent()).listview('refresh');
+ $('div[data-role=collapsible]').collapsible();
+ $('a[data-role=button]').button();
+}
+
+// Layerauswahl kennntlich machen
+function validateLayers(){
+ layers=$('#resultlist').find('.layer');
+ $.each(layers, function(index,layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position>=0){
+ $(layer).find('.layer_icon').first().attr('class','layer_icon icon layer_remove');
+ $(layer).find('.collapsible').first().removeClass('unselected').addClass('selected');
+ } else {
+ $(layer).find('.layer_icon').first().attr('class','layer_icon icon layer_add');
+ $(layer).find('.collapsible').first().removeClass('selected').addClass('unselected');
+ }
+ });
+}
+
+// Validierung der Pfeile zum verschieben der Layer
+function validateArrows(){
+ var movers=$('#ownlist').find('.move');
+ $(movers[0]).attr('class','icon move arrow_empty');
+ if(movers.length>1){
+ $(movers[1]).attr('class','icon move arrow_up');
+ }
+}
+
+// Validierung der Queryable-Auswahl
+function query_check(item){
+ if($(item).hasClass('query_unchecked')){
+ $('#ownlist').find('.query_checked').addClass('query_unchecked').removeClass('query_checked');
+ $(item).addClass('query_checked').removeClass('query_unchecked');
+ } else {
+ $(item).addClass('query_unchecked').removeClass('query_checked');
+ }
+}
+
+
+
+
+// ---------------------------------
+// Hinzufüge- + Entfernfunktionen:
+// ---------------------------------
+
+// Layer zur Auswahl hinzufügen
+function addLayer(layer){
+ if(numOwnlayers()>=maxlayers){
+ getInfo('Es können nicht mehr als '+maxlayers+' Ebenen zur Auswahl hinzugefügt werden.');
+ return false;
+ } else {
+ $.mobile.showPageLoadingMsg();
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position<0){
+ // Layer hinzufügen
+ $('#ownlist').append(OwnLayer(layer.attr('layerid'),layer.attr('title'),layer.attr('name'),layer.attr('desc'),layer.parent().attr('title'),layer.parent().attr('desc'),layer.attr('previewUrl'),layer.attr('queryable')=='true',layer.attr('getMapUrl'),layer.attr('bbox'),layer.parent().attr('avail')));
+ validateLayers();
+ validateArrows();
+ refresh();
+ addOpenlayer(layer.attr('layerid'),layer.attr('name'),layer.attr('getMapUrl'));
+ $.mobile.hidePageLoadingMsg();
+ return true;
+ }
+ $.mobile.hidePageLoadingMsg();
+ return false;
+ }
+}
+
+// Layer entfernen
+function removeLayer(layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ $($('#ownlist').find('.layer')[layerInList($('#ownlist'),$(layer).attr('layerid'))]).remove();
+ validateLayers();
+ validateArrows();
+ refresh();
+ removeOpenlayer($(layer).attr('layerid'));
+}
+
+// Layer hinzfügen oder entfernen
+function switchLayer(layer){
+ var position = layerInList($('#ownlist'),$(layer).attr('layerid'));
+ if(position<0){
+ addLayer(layer);
+ } else {
+ removeLayer(layer);
+ }
+}
+
+// Service mit allen Layern hinzufügen
+function addService(service){
+ var layers=service.find('.layer');
+ for(var i=0; i<layers.length; i++){
+ addLayer($(layers[i]));
+ if(numOwnlayers()>maxlayers){ break; }
+ }
+}
+
+// Service mit allen Layern entfernen
+function removeService(service){
+ $.each(service.find('.layer'), function(index, layer){
+ removeLayer($(layer));
+ });
+}
+
+// Sichtbarkeit eines Layers umschalten
+function switchVisibility(layer){
+ if($(layer).hasClass('layer')){ // Overlay
+ $(layer).find('.layer_visibility').toggleClass('layer_checked').toggleClass('layer_unchecked');
+ selectOpenlayer($(layer).attr('layerid'),$(layer).find('.layer_visibility').hasClass('layer_checked'));
+ } else { // Baselayer
+ $('#baselayers').find('.base_checked').addClass('base_unchecked').removeClass('base_checked');
+ $(layer).addClass('base_checked').removeClass('base_unchecked');
+ setOpenBaselayer($(layer).attr('layerids'));
+ }
+}
+
+// Validierung der Baselayer-Auswahl
+function base_check(item){
+ $('#baselayers').find('.base_checked').addClass('base_unchecked').removeClass('base_checked');
+ $(item).addClass('base_checked').removeClass('base_unchecked');
+}
+
+
+
+// -----------------------
+// Daten Laden + Parsen:
+// -----------------------
+
+// Standardsuche
+function searchMaps(searchurl){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ $.getJSON(searchurl, function(data){
+ var datacollection=parseMapBenderJson(data);
+ appendData(datacollection.services,datacollection.layers,datacollection.nresults);
+ $.mobile.hidePageLoadingMsg();
+ if(datacollection.nresults>maxresults){
+ getInfo('Es gab '+datacollection.nresults
+ +' Treffer, es können aber nur '
+ +maxresults+' Ergebnisse angezeigt werden.'
+ +'</br><b>Schränken Sie Ihre Suche weiter ein.</b>');
+ };
+ });
+}
+
+// Suche über WMC-Dienste
+function searchWmc(wmcurl){
+ $.mobile.showPageLoadingMsg();
+ $('#search_results').empty();
+ $.getJSON(wmcurl, function(data){
+ appendWmc(data);
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+// Parst das JSON-Objekt von MapBender in ein Array [services,layers]
+function parseMapBenderJson(json){
+ // Daten generalisieren
+ var srvs=json.wms.srv;
+ var services=[];
+ var layers=[];
+ $.each(srvs, function(index,srv){
+ // Dienste zusammenfassen
+ var dublicated=false;
+ for(var i=0; i<services.length; i++){
+ if(services[i].id==srv.id){
+ dublicated=true;
+ break;
+ }
+ }
+ // Dienst freigegeben?
+ if(!srv.logged && !srv.nwaccess){
+ if(!dublicated){
+ services.push(srv);
+ }
+ // Layer aufnehmen
+ $.each(srv.layer, function(index, grplayer){
+ if(grplayer.layer){
+ $.each(grplayer.layer, function(index, lyr){
+ layers.push([srv.id,lyr]);
+ });
+ } else {
+ layers.push([srv.id,grplayer]);
+ }
+ });
+ }
+ });
+
+ return {"services": services, "layers": layers, "nresults":json.wms.md.nresults};
+}
+
+// Fügt die Dienste und Layer in das DOM ein
+function appendData(services,layers,nresults){
+ $("#resultlist").empty();
+ for(var i=0; i<services.length; i++){
+ var srv=services[i];
+ service=Service(srv.id,srv.title,$(srv).attr('abstract'),srv.getMapUrl,srv.status,(srv.logoUrl==""? 'mod_mapbender/img/defaulicon.png' : srv.logoUrl ),srv.symbolLink,srv.avail);
+ // Layer zuordnen
+ for(var j=0; j<layers.length; j++){
+ var layer=layers[j];
+ var serviceid=layer[0];
+ var lyr=layer[1];
+
+ if(serviceid==srv.id){
+ service.append(ResultLayer(lyr.id,lyr.title,lyr.name,$(lyr).attr('abstract'),lyr.previewURL,lyr.queryable=='1',srv.getMapUrl,lyr.bbox));
+ }
+ }
+ $('#resultlist').append(service);
+ }
+ $('#resultlist').prepend('<li data-theme="b">Suchergebnis: '+numServices()+' Dienste, '
+ +numResultLayers($('#resultlist'))+' Layer '
+ +'('+nresults+' Treffer) </li>');
+ validateLayers();
+ refresh();
+}
+
+// Fügt die WMC-Layer in das DOM ein
+function appendWmcData(services,layers,layerlist){
+ $("#ownlist").empty();
+ var ownlayers = [];
+ for(var i=0; i<services.length; i++){
+ var srv=services[i];
+ // Layer zuordnen
+ for(var j=0; j<layers.length; j++){
+ var layer=layers[j];
+ var serviceid=layer[0];
+ var lyr=layer[1];
+
+ if(serviceid==srv.id){
+ ownlayers.push(OwnLayer(lyr.id,lyr.title,lyr.name,$(lyr).attr('abstract'),srv.title,$(srv).attr('abstract'),lyr.previewURL,lyr.queryable=='1',srv.getMapUrl,lyr.bbox,srv.avail));
+ }
+ }
+ }
+
+
+ // Layer richtig sortiert einfügen und selektieren
+ for(var i=0; i<layerlist.length; i++){
+ for(var j=0; j<ownlayers.length; j++){
+ if(layerlist[i].layerId==ownlayers[j].attr('layerid')){
+ var layer=ownlayers[j];
+ $('#ownlist').append(layer);
+ addOpenlayer(layer.attr('layerid'),layer.attr('name'),layer.attr('getMapUrl'));
+ if(!layerlist[i].active){ // Auswahl umschalten
+ switchVisibility(layer);
+ }
+ break;
+ }
+ }
+ }
+ validateLayers();
+ validateArrows();
+
+}
+
+// Alle ausgewählten Overlays entfernen
+function clearOwnlist(){
+ var layers=$('#ownlist').find('.layer');
+ for(var i=0; i<layers.length; i++){
+ removeLayer(layers[i]);
+ }
+}
+
+// WMC-Daten hinzufügen
+function appendWmc(json){
+
+ // Hintergrundkarte auswählen
+ for(var i=0; i<json.backGroundLayer.length; i++){
+ var layer=json.backGroundLayer[i];
+ if(layer.active){
+ var layers=$('#baselayers').find('.baselayer')
+ for(var j=0; j<layers.length; j++){
+ if($(layers[j]).attr('layerids')==layer.name){
+ switchVisibility(layers[j]);
+ break;
+ }
+ }
+ }
+ }
+
+ // Alle ausgewählten overlays entfernen
+ clearOwnlist();
+
+ // Layerids für die Abfrage zusammenstellen
+ var layerids="";
+ $.each(json.layerList, function(index,layer){
+ layerids=layerids+","+layer.layerId;
+ });
+ layerids=layerids.substr(1,layerids.length);
+
+ // Overlays auswählen
+ $.getJSON(searchUrl+'&resourceIds='+layerids, function(data){
+ // Informationen sammeln und Parsen
+ var datacollection=parseMapBenderJson(data);
+ appendWmcData(datacollection.services,datacollection.layers,json.layerList);
+ $.mobile.hidePageLoadingMsg();
+ });
+}
+
+
+
+// Hintergrunddaten in Collapsible aufnehmen
+function addBaselayers(){
+
+ $("#baselayers").empty();
+
+ // Vektorlayer
+ vector_marker = new OpenLayers.Layer.Vector("Vector Layer", {});
+
+ // Hintergrund:Topographie ect.
+/* var atkis_praes_tms = new OpenLayers.Layer.TMS(
+ "Hybrid",
+ "http://www.gdi-rp-dienste2.rlp.de/mapcache/tms/",
+ {
+ layername: 'test at UTM32',
+ type: "jpeg",
+ serviceVersion:"1.0.0",
+ gutter:0,
+ buffer:0,
+ isBaseLayer:true,
+ transitionEffect:'resize',
+ resolutions: [529.16666666670005270134,396.87500000000000000000,264.58333333330000414207,132.29166666669999585793,66.14583333330000414207,39.68750000000000000000,26.45833333330000058936,13.22916666669999941064,6.61458333329999970118,3.96875000000000000000,2.64583333330000014527,2.11666666670000003236,1.32291666670000007677,0.79375000000000000000,0.26458333330000001204,0.13229166670000001016],
+ units: projUnits,
+ projection: mapProj,
+ sphericalMercator: false
+ }
+ );*/
+
+ $('#baselayers').append(BaseLayer("RLP Zusammenstellung",atkis_praes_tms.name));
+
+ // Hintergrund: Luftbild
+/* var luftbilder = new OpenLayers.Layer.WMS( "Luftbild",
+ "http://geo4.service24.rlp.de/wms/dop40_geo4.fcgi?",
+ {
+ layers: "dop",
+ format: "image/jpeg",
+ transparent: "false",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: false,
+ alwaysInRange: true,
+ 'isBaseLayer': true
+ }
+ ); */
+
+ $('#baselayers').append(BaseLayer("Luftbilder",luftbilder.name));
+
+/* var grenze_leer = new OpenLayers.Layer.WMS( "grenze_leer",
+ "http://map1.naturschutz.rlp.de/service_basis/mod_wms/wms_getmap.php?mapfile=tk_rlp_gesamt&",
+ {
+ layers: "grenzen_land",
+ format: "image/jpeg",
+ transparent: "false",
+ transitionEffect: 'resize'
+ },
+ {
+ projection: mapProj,
+ units: projUnits,
+ singleTile: true,
+ alwaysInRange: true,
+ 'isBaseLayer': true
+ } );*/
+
+
+ $('#baselayers').append(BaseLayer("keine Hintergrundkarte",grenze_leer.name));
+
+ map.addLayers([atkis_praes_tms,luftbilder,grenze_leer,vector_marker]);
+
+ // Dynamische Hintergrundkarten hinzufügen
+ for(i in baseinfo){
+ var name=baseinfo[i][0]
+ var layerids=baseinfo[i][1];
+ $('#baselayers').append(BaseLayer(name,layerids));
+ addOpenBaselayer(name,layerids);
+ }
+
+ // Erste Hintergrundkarte auswählen
+ base_check($('#baselayers').find('.baselayer').first());
+}
+
+
+
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search_proxy.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search_proxy.php (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search_proxy.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,60 @@
+<?php
+
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+require_once(dirname(__FILE__)."/../../../../conf/mapbender.conf");
+// PHP Proxy
+// Erlaubte Hostnamen aus baseconfig
+$mapbenderurl = $catalogueInterface;
+//$mapbenderurl = "http://www.geoportal.rlp.de/mapbender/php/mod_callMetadata.php?";
+//Url-Parameter
+$urlparam = $_SERVER['QUERY_STRING'];
+$url = $mapbenderurl.$urlparam ;
+//angefragtes Format GetMap
+if ((isset($_GET['FORMAT'])) && ($_GET['FORMAT'] != "")) {
+ $myformat = $_GET["FORMAT"];
+}
+
+ // Open the Curl session
+ $session = curl_init($url);
+
+ // If it's a POST, put the POST data in the body
+ if ($_POST['yws_path']) {
+ $postvars = '';
+ while ($element = current($_POST)) {
+ $postvars .= urlencode(key($_POST)).'='.urlencode($element).'&';
+ next($_POST);
+ }
+ curl_setopt ($session, CURLOPT_POST, true);
+ curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars);
+ }
+
+ //use proxy if proxy is given in mapbender.conf - from class_connector.php
+ $arURL = parse_url($url);
+ $host = $arURL["host"];
+ $NOT_PROXY_HOSTS_array = explode(",", NOT_PROXY_HOSTS);
+ if(CONNECTION_PROXY != "" AND (in_array($host, $NOT_PROXY_HOSTS_array)!= true)){
+ curl_setopt($session, CURLOPT_PROXY,CONNECTION_PROXY.":".CONNECTION_PORT);
+ if(CONNECTION_PASSWORD != ""){
+ curl_setopt ($session, CURLOPT_PROXYUSERPWD, CONNECTION_USER.':'.CONNECTION_PASSWORD);
+ }
+ }
+
+ // Don't return HTTP headers. Do return the contents of the call
+ curl_setopt($session, CURLOPT_HEADER, false);
+ curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+ // Make the call
+ $response = curl_exec($session);
+
+ //Content-Type
+ if($myformat == "image/jpeg"){
+ header("Content-Type: image/jpeg");
+ }
+
+ //Datenausgabe
+ echo $response;
+ curl_close($session);
+
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search_proxy.php~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search_proxy.php~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/search_proxy.php~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,60 @@
+<?php
+
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+require_once(dirname(__FILE__)."/../../../../conf/mapbender.conf");
+// PHP Proxy
+// Erlaubte Hostnamen aus baseconfig
+$mapbenderurl = $catalogueInterface;
+$mapbenderurl = "http://www.geoportal.rlp.de/mapbender/php/mod_callMetadata.php?";
+//Url-Parameter
+$urlparam = $_SERVER['QUERY_STRING'];
+$url = $mapbenderurl.$urlparam ;
+//angefragtes Format GetMap
+if ((isset($_GET['FORMAT'])) && ($_GET['FORMAT'] != "")) {
+ $myformat = $_GET["FORMAT"];
+}
+
+ // Open the Curl session
+ $session = curl_init($url);
+
+ // If it's a POST, put the POST data in the body
+ if ($_POST['yws_path']) {
+ $postvars = '';
+ while ($element = current($_POST)) {
+ $postvars .= urlencode(key($_POST)).'='.urlencode($element).'&';
+ next($_POST);
+ }
+ curl_setopt ($session, CURLOPT_POST, true);
+ curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars);
+ }
+
+ //use proxy if proxy is given in mapbender.conf - from class_connector.php
+ $arURL = parse_url($url);
+ $host = $arURL["host"];
+ $NOT_PROXY_HOSTS_array = explode(",", NOT_PROXY_HOSTS);
+ if(CONNECTION_PROXY != "" AND (in_array($host, $NOT_PROXY_HOSTS_array)!= true)){
+ curl_setopt($session, CURLOPT_PROXY,CONNECTION_PROXY.":".CONNECTION_PORT);
+ if(CONNECTION_PASSWORD != ""){
+ curl_setopt ($session, CURLOPT_PROXYUSERPWD, CONNECTION_USER.':'.CONNECTION_PASSWORD);
+ }
+ }
+
+ // Don't return HTTP headers. Do return the contents of the call
+ curl_setopt($session, CURLOPT_HEADER, false);
+ curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+ // Make the call
+ $response = curl_exec($session);
+
+ //Content-Type
+ if($myformat == "image/jpeg"){
+ header("Content-Type: image/jpeg");
+ }
+
+ //Datenausgabe
+ echo $response;
+ curl_close($session);
+
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/searchobjects.js
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/searchobjects.js (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/searchobjects.js 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,102 @@
+// Dienst
+function Service(serviceid, title, desc, getMapUrl, status, logoUrl, symbolLink, avail){
+// Anzahl der Layer azeigen
+ var service=$('<li>',{serviceid:serviceid, 'class':'service' , title:title, desc:desc, getMapURL:getMapUrl, status:status, logoUrl:logoUrl, symbolLink:symbolLink, avail:avail});
+
+ var container = $('<div class="service_container"></div>');
+ // Logo
+ container.append(
+ $('<table style="margin: 0px; padding: 0px; float:left;">'
+ +'<tr style="margin: 0px; padding: 0px;">'
+ +'<td style="margin: 0px; padding: 0px; height:43px; width:55px; text-align: center; vertical-align: middle;">'
+ +'<img style="max-height: 43px; max-width: 55px; max-height: 43px;" src="'+logoUrl+'" class="service_logo" alt="Logo"/>'
+ +'</td>'
+ +'</tr>'
+ +'</table>'));
+ // Alle Layer entfernen
+ container.append($('<div>', {'class':'icon layer_remove', text:' '}).click(function(){removeService($(this).parent().parent());}));
+ // Alle Layer hinzufügen
+ container.append($('<div>', {'class':'icon layer_add', text:' '}).click(function(){addService($(this).parent().parent());}));
+
+ container.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+title+'</h3><h3>'+title+'</h3><p>'+desc+'</p></div>');
+
+ service.append(container)
+
+ return service;
+}
+
+
+// Layer in den Hintergrundkarten
+function BaseLayer(title, layerids){
+ return $('<div>',{text:title, title:title, layerids:layerids, 'class':'baselayer base_unchecked'}).click(function(){ switchVisibility($(this)) });
+}
+
+
+// Layer im Suchergebnis
+function ResultLayer(layerid, title, name, desc, previewUrl, queryable, getMapUrl, bbox){
+
+ var layer=$('<div>',{layerid:layerid, name:name, 'class':'layer' , title:title, desc:desc, previewUrl:previewUrl, queryable:queryable, getMapURL:getMapUrl, bbox:bbox});
+
+ layer.append($('<div>', {'class':('icon query_preview '+(queryable ? 'query_info': 'query_noinfo')), text:' '}));
+ layer.append($('<div>', {'class':'layer_icon icon layer_add', text:' '}).click(function(){switchLayer($(this).parent());}));
+
+ layer.append('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"><h3>'+title+'</h3><h3>'+title+'</h3><p>'+desc+'</p></div>');
+
+ return layer;
+}
+
+
+// Layer in der Auswahl
+function OwnLayer(layerid, title, name, desc, servicetitle, servicedesc, previewUrl, queryable, getMapUrl, bbox, avail){
+
+ var layer=$('<div>',{layerid:layerid, name:name, servicetitle:servicetitle, servicedesc:servicedesc, 'class':'layer' , title:title, desc:desc, previewUrl:previewUrl, queryable:queryable, getMapURL:getMapUrl, bbox:bbox, avail:avail});
+
+ layer.append($('<div>', {'class':'layer_icon icon layer_remove', text:' '}).click(function(){removeLayer($(this).parent());}));
+
+ // Abfragbarkeit
+ if(queryable){
+ layer.append($('<div>', {'class':'icon query_queryable query_unchecked', text:' '}).click(function(){query_check($(this))}));
+ } else {
+ layer.append($('<div>', {'class':'icon query_queryable query_noinfo', text:' '}));
+ }
+ layer.append($('<div>', {'class':'icon layer_visibility layer_checked', text:' '}).click(function(){switchVisibility($(this).parent())}));
+
+ // Layerpositionierung
+ layer.append($('<div>', {'class':'icon move arrow_up', text:' '}).click(function(){up(layerid);}));
+
+ // Collapsible
+ var collaps=$('<div class="collapsible unselected" data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c" data-inset="true"></div>');
+ collaps.append('<h3>'+title+'</h3>');
+ // Inhalt
+ var table = $('<table></table>');
+
+ var col=$("<tr></tr>");
+
+ var row1=$('<td class="layerinfo"></td>');
+
+ if(previewUrl){
+ row1.append($('<div>', {'class':'icon layer_preview', text:' '}).click(function(){zoomToBbox(bbox); $.mobile.changePage($("#mappage"),pageTransition);}));
+ }
+ row1.append('</br><p>'+avail+'%</p>');
+
+ var row2=$("<td></td>");
+
+ row2.append('<p><b>'+servicetitle+'</b></p><p>'+servicedesc+'</p>');
+ row2.append('<p><b>'+title+'</b></p><p>'+desc+'</p>');
+
+ col.append(row1);
+ col.append(row2);
+
+ table.append(col);
+
+ collaps.append(table);
+
+
+ layer.append(collaps);
+
+ return layer;
+
+}
+
+
+
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/wmc_proxy.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/wmc_proxy.php (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/wmc_proxy.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,41 @@
+<?php
+
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+require_once(dirname(__FILE__)."/../../../../conf/mapbender.conf");
+// PHP Proxy
+// Erlaubte Hostnamen aus baseconfig
+$mapbenderurl = $wmcInterface;
+//$mapbenderurl = "http://www.geoportal.rlp.de/mapbender/php/mod_exportWmc2Json.php?";
+
+//Url-Parameter
+$urlparam = $_SERVER['QUERY_STRING'];
+$url = $mapbenderurl.$urlparam ;
+
+// Open the Curl session
+$session = curl_init($url);
+
+//use proxy if proxy is given in mapbender.conf - from class_connector.php
+$arURL = parse_url($url);
+$host = $arURL["host"];
+$NOT_PROXY_HOSTS_array = explode(",", NOT_PROXY_HOSTS);
+if(CONNECTION_PROXY != "" AND (in_array($host, $NOT_PROXY_HOSTS_array)!= true)){
+ curl_setopt($session, CURLOPT_PROXY,CONNECTION_PROXY.":".CONNECTION_PORT);
+ if(CONNECTION_PASSWORD != ""){
+ curl_setopt ($session, CURLOPT_PROXYUSERPWD, CONNECTION_USER.':'.CONNECTION_PASSWORD);
+ }
+}
+
+// Don't return HTTP headers. Do return the contents of the call
+curl_setopt($session, CURLOPT_HEADER, false);
+curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+// Make the call
+$response = curl_exec($session);
+
+//Datenausgabe
+echo $response;
+curl_close($session);
+
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/mod_mapbender/wmc_proxy.php~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/mod_mapbender/wmc_proxy.php~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/mod_mapbender/wmc_proxy.php~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,41 @@
+<?php
+
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+require_once(dirname(__FILE__)."/../../../../conf/mapbender.conf");
+// PHP Proxy
+// Erlaubte Hostnamen aus baseconfig
+$mapbenderurl = $wmcInterface;
+$mapbenderurl = "http://www.geoportal.rlp.de/mapbender/php/mod_exportWmc2Json.php?";
+
+//Url-Parameter
+$urlparam = $_SERVER['QUERY_STRING'];
+$url = $mapbenderurl.$urlparam ;
+
+// Open the Curl session
+$session = curl_init($url);
+
+//use proxy if proxy is given in mapbender.conf - from class_connector.php
+$arURL = parse_url($url);
+$host = $arURL["host"];
+$NOT_PROXY_HOSTS_array = explode(",", NOT_PROXY_HOSTS);
+if(CONNECTION_PROXY != "" AND (in_array($host, $NOT_PROXY_HOSTS_array)!= true)){
+ curl_setopt($session, CURLOPT_PROXY,CONNECTION_PROXY.":".CONNECTION_PORT);
+ if(CONNECTION_PASSWORD != ""){
+ curl_setopt ($session, CURLOPT_PROXYUSERPWD, CONNECTION_USER.':'.CONNECTION_PASSWORD);
+ }
+}
+
+// Don't return HTTP headers. Do return the contents of the call
+curl_setopt($session, CURLOPT_HEADER, false);
+curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+// Make the call
+$response = curl_exec($session);
+
+//Datenausgabe
+echo $response;
+curl_close($session);
+
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/query/proxy.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/query/proxy.php (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/query/proxy.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,90 @@
+<?php
+
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+require_once(dirname(__FILE__)."/../../../../conf/mapbender.conf");
+
+// PHP Proxy
+// Erlaubte Hostnamen aus baseconfig
+define ('MAPPROXY_HOSTNAME', $mapproxyurl);
+define ('GETMAP_HOSTNAME',$getmapurl);
+define ('GETFEATURE_HOSTNAME', $getfeatureurl);
+
+//Url-Parameter
+$path = $_SERVER['QUERY_STRING'];
+
+//angefragtes Format GetMap
+if ((isset($_GET['FORMAT'])) && ($_GET['FORMAT'] != "")) {
+ $myformat = $_GET["FORMAT"];
+ $url = GETMAP_HOSTNAME.$path;
+}
+
+//angefragtes Format Featureinfo
+if ((isset($_GET['INFO_FORMAT'])) && ($_GET['INFO_FORMAT'] != "")) {
+ $myformat = $_GET["INFO_FORMAT"];
+ $url = GETFEATURE_HOSTNAME.$path;
+}
+
+//Url ändern falls URL-Variable cache mitgegeben wird
+if ((isset($_GET['CACHE'])) && ($_GET['CACHE'] == "mapproxy")) {
+ $url = MAPPROXY_HOSTNAME.$path;
+}
+
+
+if($useproxy){
+ // Open the Curl session
+ $session = curl_init($url);
+
+ // If it's a POST, put the POST data in the body
+ if ($_POST['yws_path']) {
+ $postvars = '';
+ while ($element = current($_POST)) {
+ $postvars .= urlencode(key($_POST)).'='.urlencode($element).'&';
+ next($_POST);
+ }
+ curl_setopt ($session, CURLOPT_POST, true);
+ curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars);
+ }
+
+ //use proxy if proxy is given in mapbender.conf - from class_connector.php
+ $arURL = parse_url($url);
+ $host = $arURL["host"];
+ $NOT_PROXY_HOSTS_array = explode(",", NOT_PROXY_HOSTS);
+ if(CONNECTION_PROXY != "" AND (in_array($host, $NOT_PROXY_HOSTS_array)!= true)){
+ curl_setopt($session, CURLOPT_PROXY,CONNECTION_PROXY.":".CONNECTION_PORT);
+ if(CONNECTION_PASSWORD != ""){
+ curl_setopt ($session, CURLOPT_PROXYUSERPWD, CONNECTION_USER.':'.CONNECTION_PASSWORD);
+ }
+ }
+
+ // Don't return HTTP headers. Do return the contents of the call
+ curl_setopt($session, CURLOPT_HEADER, false);
+ curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+ // Make the call
+ $response = curl_exec($session);
+
+ //Content-Type
+ if($myformat == "image/jpeg"){
+ header("Content-Type: image/jpeg");
+ }
+ else if($myformat == "image/png"){
+ header("Content-Type: image/png");
+ }
+ else if($myformat == "text/html"){
+ header("Content-Type: text/html");
+ }
+ else {
+ //header("Content-Type: text/plain");
+ }
+
+ //Datenausgabe
+ echo $response;
+ curl_close($session);
+}
+else{
+ Header($url);
+ exit();
+}
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/query/proxy.php~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/query/proxy.php~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/query/proxy.php~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,79 @@
+<?php
+
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+require_once(dirname(__FILE__)."/../../../../conf/mapbender.conf");
+
+// PHP Proxy
+// Erlaubte Hostnamen aus baseconfig
+define ('MAPPROXY_HOSTNAME', $mapproxyurl);
+define ('GETMAP_HOSTNAME',$getmapurl);
+define ('GETFEATURE_HOSTNAME', $getfeatureurl);
+
+//Url-Parameter
+$path = $_SERVER['QUERY_STRING'];
+
+//angefragtes Format GetMap
+if ((isset($_GET['FORMAT'])) && ($_GET['FORMAT'] != "")) {
+ $myformat = $_GET["FORMAT"];
+ $url = GETMAP_HOSTNAME.$path;
+}
+
+//angefragtes Format Featureinfo
+if ((isset($_GET['INFO_FORMAT'])) && ($_GET['INFO_FORMAT'] != "")) {
+ $myformat = $_GET["INFO_FORMAT"];
+ $url = GETFEATURE_HOSTNAME.$path;
+}
+
+//Url ändern falls URL-Variable cache mitgegeben wird
+if ((isset($_GET['CACHE'])) && ($_GET['CACHE'] == "mapproxy")) {
+ $url = MAPPROXY_HOSTNAME.$path;
+}
+
+
+if($useproxy){
+ // Open the Curl session
+ $session = curl_init($url);
+
+ // If it's a POST, put the POST data in the body
+ if ($_POST['yws_path']) {
+ $postvars = '';
+ while ($element = current($_POST)) {
+ $postvars .= urlencode(key($_POST)).'='.urlencode($element).'&';
+ next($_POST);
+ }
+ curl_setopt ($session, CURLOPT_POST, true);
+ curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars);
+ }
+
+ // Don't return HTTP headers. Do return the contents of the call
+ curl_setopt($session, CURLOPT_HEADER, false);
+ curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+ // Make the call
+ $response = curl_exec($session);
+
+ //Content-Type
+ if($myformat == "image/jpeg"){
+ header("Content-Type: image/jpeg");
+ }
+ else if($myformat == "image/png"){
+ header("Content-Type: image/png");
+ }
+ else if($myformat == "text/html"){
+ header("Content-Type: text/html");
+ }
+ else {
+ //header("Content-Type: text/plain");
+ }
+
+ //Datenausgabe
+ echo $response;
+ curl_close($session);
+}
+else{
+ Header($url);
+ exit();
+}
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/query/rasterquery.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/query/rasterquery.php (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/query/rasterquery.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,97 @@
+<?php
+
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+
+$coord = split(',',$_GET["coord"]);
+
+//Mapfile laden
+$map= ms_newMapObj($mapfilepath.'\map.map');
+
+//Punkt erzeugen
+$qPoint = ms_newPointObj();
+$qPoint->setXY($coord[0]*1,$coord[1]*1);
+
+//Layer festlegen
+$layer = $map->getLayerByName($rquerylayer);
+
+//Punktabfrage (Single)
+@$datQuery = $layer->queryByPoint($qPoint, MS_SINGLE, 1);
+ // UMRECHNUNG Eingabe koordinatensystem -> WGS84
+$projInObj = ms_newprojectionobj("init=epsg:$ggepsg");
+$projOutObj = ms_newprojectionobj("init=epsg:4326");
+$qPoint->project($projInObj, $projOutObj);
+$WGS_X = round($qPoint->x,6);
+$WGS_Y = round($qPoint->y,6);
+print '<div id="dhmqueryId" >';
+print ('<table border="0" cellspacing="0" cellpadding="1" class="normal">');
+
+//Wenn Query erfolgreich
+ if ($datQuery == MS_SUCCESS) {
+ for ($j=0; $j<$layer->getNumResults(); $j++) {
+ $result = $layer->getResult($j);
+ //Versionsüberprüfung
+ if (ms_GetVersionInt() < 50600){
+ $layer->open();
+ }
+
+ //Versionsüberprüfung
+ if (ms_GetVersionInt() < 50600){
+ $shpobj = $layer->getShape($result->tileindex,$result->shapeindex);
+ }
+ else{
+ $shpobj = $layer->resultsGetShape($result->shapeindex,$result->tileindex);
+ }
+
+ $attr = $shpobj->values;
+
+ //echo round($attr["value_0"],2);
+ $hoehe = round($attr["value_0"],1);
+ if ($hoehe <0){
+ print '<tr ><td colspan="3" ><strong>'.$maplang['rasterquery_nodata'].'</strong></td></tr>';
+ }
+ else{
+ print '<tr><td>'.$maplang['rasterquery_h'].'</td><td><span class="hilite">'.$hoehe.'</span></td><td>m NN</td></tr>';
+ }
+ $shpobj->free();
+
+ //Versionsüberprüfung
+ if (ms_GetVersionInt() < 50600){
+ $layer->close();
+ }
+ }
+ }
+ else{
+ print '<tr ><td colspan="3" ><strong>'.$maplang['rasterquery_noh'].'</strong></td></tr>';
+ //echo "Kein Wert verfügbar!";
+ }
+
+print ('<tr bgcolor="#E6E6E6"><td colspan="3" >'.$maplang['rasterquery_gps'].'</td></tr>
+ <tr>
+ <td>Lat:</td>
+ <td colspan="2">'.$WGS_Y.'</td>
+ </tr>
+ <tr>
+ <td>Lon:</td>
+ <td colspan="2">'.$WGS_X.'</td>
+ </tr>
+ <tr bgcolor="#E6E6E6">
+ <td colspan="3" >'.$maplang['rasterquery_xy'].'</td>
+ </tr>
+ <tr>
+ <td>X</td>
+ <td colspan="2">'.round($coord[0],0).'</td>
+ </tr>
+ <tr>
+ <td>Y</td>
+ <td colspan="2">'.round($coord[1],0).'</td>
+ </tr>
+ <tr>
+ <td colspan="3" align="left"><a href="javascript:void(0);" onClick="javascript:zoompoint('.round($coord[0],0).','.round($coord[1],0).');" ><img src="'.$applicationurl.'/img/ico_zoomin.png" border="0" > '.$maplang['geocode_result4'].'</a></td>
+ </tr>
+ <tr>
+ <td colspan="3" align="right">');
+
+print(' </td></tr></table></div>');
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/query/rasterquery.php~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/query/rasterquery.php~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/query/rasterquery.php~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,101 @@
+<?php
+
+//Basic configuration of mapserver client
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+
+//Language config
+include_once('../config/language/check_lang.php');
+include_once('../config/language/language.'.$mylang.'.php');
+
+$coord = split(',',$_GET["coord"]);
+
+//Mapfile laden
+$map= ms_newMapObj($mapfilepath.'\map.map');
+
+//Punkt erzeugen
+$qPoint = ms_newPointObj();
+$qPoint->setXY($coord[0]*1,$coord[1]*1);
+
+//Layer festlegen
+$layer = $map->getLayerByName($rquerylayer);
+
+//Punktabfrage (Single)
+@$datQuery = $layer->queryByPoint($qPoint, MS_SINGLE, 1);
+ // UMRECHNUNG Eingabe koordinatensystem -> WGS84
+$projInObj = ms_newprojectionobj("init=epsg:$ggepsg");
+$projOutObj = ms_newprojectionobj("init=epsg:4326");
+$qPoint->project($projInObj, $projOutObj);
+$WGS_X = round($qPoint->x,6);
+$WGS_Y = round($qPoint->y,6);
+print '<div id="dhmqueryId" >';
+print ('<table border="0" cellspacing="0" cellpadding="1" class="normal">');
+
+//Wenn Query erfolgreich
+ if ($datQuery == MS_SUCCESS) {
+ for ($j=0; $j<$layer->getNumResults(); $j++) {
+ $result = $layer->getResult($j);
+ //Versionsüberprüfung
+ if (ms_GetVersionInt() < 50600){
+ $layer->open();
+ }
+
+ //Versionsüberprüfung
+ if (ms_GetVersionInt() < 50600){
+ $shpobj = $layer->getShape($result->tileindex,$result->shapeindex);
+ }
+ else{
+ $shpobj = $layer->resultsGetShape($result->shapeindex,$result->tileindex);
+ }
+
+ $attr = $shpobj->values;
+
+ //echo round($attr["value_0"],2);
+ $hoehe = round($attr["value_0"],1);
+ if ($hoehe <0){
+ print '<tr ><td colspan="3" ><strong>'.$maplang['rasterquery_nodata'].'</strong></td></tr>';
+ }
+ else{
+ print '<tr><td>'.$maplang['rasterquery_h'].'</td><td><span class="hilite">'.$hoehe.'</span></td><td>m NN</td></tr>';
+ }
+ $shpobj->free();
+
+ //Versionsüberprüfung
+ if (ms_GetVersionInt() < 50600){
+ $layer->close();
+ }
+ }
+ }
+ else{
+ print '<tr ><td colspan="3" ><strong>'.$maplang['rasterquery_noh'].'</strong></td></tr>';
+ //echo "Kein Wert verfügbar!";
+ }
+
+print ('<tr bgcolor="#E6E6E6"><td colspan="3" >'.$maplang['rasterquery_gps'].'</td></tr>
+ <tr>
+ <td>Lat:</td>
+ <td colspan="2">'.$WGS_Y.'</td>
+ </tr>
+ <tr>
+ <td>Lon:</td>
+ <td colspan="2">'.$WGS_X.'</td>
+ </tr>
+ <tr bgcolor="#E6E6E6">
+ <td colspan="3" >'.$maplang['rasterquery_xy'].'</td>
+ </tr>
+ <tr>
+ <td>X</td>
+ <td colspan="2">'.round($coord[0],0).'</td>
+ </tr>
+ <tr>
+ <td>Y</td>
+ <td colspan="2">'.round($coord[1],0).'</td>
+ </tr>
+ <tr>
+ <td colspan="3" align="left"><a href="javascript:void(0);" onClick="javascript:zoompoint('.round($coord[0],0).','.round($coord[1],0).');" ><img src="'.$applicationurl.'/img/ico_zoomin.png" border="0" > '.$maplang['geocode_result4'].'</a></td>
+ </tr>
+ <tr>
+ <td colspan="3" align="right">');
+
+print(' </td></tr></table></div>');
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/query/searchproxy.php
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/query/searchproxy.php (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/query/searchproxy.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,48 @@
+<?php
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+require_once(dirname(__FILE__)."/../../../../conf/mapbender.conf");
+// PHP Proxy
+// Erlaubter Hostname
+//$getjsonurl = 'http://www.geoportal.rlp.de/mapbender/geoportal/gaz_geom_mobile.php?';
+
+//Url-Parameter
+$path = $_SERVER['QUERY_STRING'];
+$url = $getjsonurl.$path;
+$useproxy = true;
+
+
+if($useproxy){
+ // Open the Curl session
+ $session = curl_init($url);
+
+ // Don't return HTTP headers. Do return the contents of the call
+ curl_setopt($session, CURLOPT_HEADER, false);
+ curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+ //use proxy if proxy is given in mapbender.conf - from class_connector.php
+ $arURL = parse_url($url);
+ $host = $arURL["host"];
+ $NOT_PROXY_HOSTS_array = explode(",", NOT_PROXY_HOSTS);
+ if(CONNECTION_PROXY != "" AND (in_array($host, $NOT_PROXY_HOSTS_array)!= true)){
+ curl_setopt($session, CURLOPT_PROXY,CONNECTION_PROXY.":".CONNECTION_PORT);
+ if(CONNECTION_PASSWORD != ""){
+ curl_setopt ($session, CURLOPT_PROXYUSERPWD, CONNECTION_USER.':'.CONNECTION_PASSWORD);
+ }
+ }
+
+ // Make the call
+ $response = curl_exec($session);
+
+ //header("Content-Type: text/plain");
+ //header("Content-Type: application/json");
+
+ //Datenausgabe
+ echo $response;
+ curl_close($session);
+}
+else{
+ Header($url);
+ exit();
+}
+
+?>
Added: trunk/mapbender/http/extensions/mobilemap/query/searchproxy.php~
===================================================================
--- trunk/mapbender/http/extensions/mobilemap/query/searchproxy.php~ (rev 0)
+++ trunk/mapbender/http/extensions/mobilemap/query/searchproxy.php~ 2013-02-18 14:10:20 UTC (rev 8561)
@@ -0,0 +1,48 @@
+<?php
+require_once(dirname(__FILE__)."/../../../../conf/mobilemap.conf");
+require_once(dirname(__FILE__)."/../../../../conf/mapbender.conf");
+// PHP Proxy
+// Erlaubter Hostname
+$getjsonurl = 'http://www.geoportal.rlp.de/mapbender/geoportal/gaz_geom_mobile.php?';
+
+//Url-Parameter
+$path = $_SERVER['QUERY_STRING'];
+$url = $getjsonurl.$path;
+$useproxy = true;
+
+
+if($useproxy){
+ // Open the Curl session
+ $session = curl_init($url);
+
+ // Don't return HTTP headers. Do return the contents of the call
+ curl_setopt($session, CURLOPT_HEADER, false);
+ curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+ //use proxy if proxy is given in mapbender.conf - from class_connector.php
+ $arURL = parse_url($url);
+ $host = $arURL["host"];
+ $NOT_PROXY_HOSTS_array = explode(",", NOT_PROXY_HOSTS);
+ if(CONNECTION_PROXY != "" AND (in_array($host, $NOT_PROXY_HOSTS_array)!= true)){
+ curl_setopt($session, CURLOPT_PROXY,CONNECTION_PROXY.":".CONNECTION_PORT);
+ if(CONNECTION_PASSWORD != ""){
+ curl_setopt ($session, CURLOPT_PROXYUSERPWD, CONNECTION_USER.':'.CONNECTION_PASSWORD);
+ }
+ }
+
+ // Make the call
+ $response = curl_exec($session);
+
+ //header("Content-Type: text/plain");
+ //header("Content-Type: application/json");
+
+ //Datenausgabe
+ echo $response;
+ curl_close($session);
+}
+else{
+ Header($url);
+ exit();
+}
+
+?>
Modified: trunk/mapbender/http/geoportal/mod_pullInspireMonitoring.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_pullInspireMonitoring.php 2013-02-14 10:19:14 UTC (rev 8560)
+++ trunk/mapbender/http/geoportal/mod_pullInspireMonitoring.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -19,6 +19,7 @@
$inspireCatId = 11;
$outputFormat = 'json';
$lang = 'de';
+$registratingDepartments = null;
//check http get parameters
if (isset($_REQUEST["outputFormat"]) & $_REQUEST["outputFormat"] != "") {
$testMatch = $_REQUEST["outputFormat"];
@@ -29,6 +30,17 @@
$outputFormat = $testMatch;
$testMatch = NULL;
}
+if (isset($_REQUEST["registratingDepartments"]) & $_REQUEST["registratingDepartments"] != "") {
+ //validate to csv integer list
+ $testMatch = $_REQUEST["registratingDepartments"];
+ $pattern = '/^[\d,]*$/';
+ if (!preg_match($pattern,$testMatch)){
+ echo 'registratingDepartments: <b>'.$testMatch.'</b> is not valid.<br/>';
+ die();
+ }
+ $registratingDepartments = $testMatch;
+ $testMatch = NULL;
+}
if (isset($_REQUEST["language"]) & $_REQUEST["language"] != "") {
$testMatch = $_REQUEST["language"];
if (!($testMatch == 'de' or $testMatch == 'en' or $testMatch == 'fr')){
@@ -90,14 +102,15 @@
//push information from groupOwnerArray to sqlTable
$sqlTable['organization'] = $groupOwnerArray[3];
$sqlTable['userId'] = $groupOwnerArray[2];
+$sqlTable['orgaId'] = $groupOwnerArray[4];
//TODO: check sorting
//$wfsMatrix = $this->flipDiagonally($wfsMatrix); //- see class_metadata_new.php
-array_multisort($sqlTable['uuid'], SORT_STRING);
+//array_multisort($sqlTable['uuid'], SORT_STRING);
//array_multisort($sqlTable['uuid'], SORT_STRING, $sqlTable['resource_type'], SORT_STRING);
//debug output option:
if ($outputFormat == 'table') {
for ($i=0; $i < count($sqlTable['uuid']); $i++){
- echo $sqlTable['uuid'][$i]." - ".$sqlTable['title'][$i]." - ".$sqlTable['resource_type'][$i]." - ".$sqlTable['resource_id'][$i]." - ".$groupOwnerArray[3][$i]." - ".$sqlTable['inspire_cat'][$i]." - ".$sqlTable['organization'][$i]."<br>";
+ echo $sqlTable['uuid'][$i]." - ".$sqlTable['title'][$i]." - ".$sqlTable['resource_type'][$i]." - ".$sqlTable['resource_id'][$i]." - ".$groupOwnerArray[3][$i]." - ".$sqlTable['inspire_cat'][$i]." - ".$sqlTable['organization'][$i]." - ".$sqlTable['orgaId'][$i]."<br>";
}
} else {
//normal output as json
@@ -107,47 +120,51 @@
"aaData" => array()
);
for ($i=0; $i < count($sqlTable['uuid']); $i++){
- if ($sqlTable['uuid'][$i] != $currentUuid) {
- //new metadataset identified - initialize it
- $currentUuid = $sqlTable['uuid'][$i];
- $metadataIndex++;
- $output['aaData'][$metadataIndex]->detailImage = "<img id=\"expander\" src=\"../img/gnome/stock_zoom-in.png\">";
- $output['aaData'][$metadataIndex]->title = $sqlTable['title'][$i];
- $output['aaData'][$metadataIndex]->uuid = $sqlTable['uuid'][$i];
- $output['aaData'][$metadataIndex]->organization = $groupOwnerArray[3][$i];
- $insCat = '';
- $output['aaData'][$metadataIndex]->inspireCategories = '';
- $output['aaData'][$metadataIndex]->numberViewServices = 0;
- $output['aaData'][$metadataIndex]->numberDownloadServices = 0;
- }
- if ($metadataIndex > -1) { //prohibit indexes which are not real - otherwise the json array will become an object
- if ($sqlTable['resource_type'][$i] == "layer") {
- //addview service element
- $output['aaData'][$metadataIndex]->viewServices[]->id = $sqlTable['resource_id'][$i];
- $catString = $sqlTable['inspire_cat'][$i];
- $insCat .= $sqlTable['inspire_cat'][$i];
- if ($insCat != '') {
- $insCat .= ",";
+ //filter for orga_id
+ //generate entry only if orga_id is the same as expected
+ if (!$registratingDepartments || ($registratingDepartments != null && in_array($groupOwnerArray[4][$i],explode(',',$registratingDepartments)))) {
+ if ($sqlTable['uuid'][$i] != $currentUuid) {
+ //new metadataset identified - initialize it
+ $currentUuid = $sqlTable['uuid'][$i];
+ $metadataIndex++;
+ $output['aaData'][$metadataIndex]->detailImage = "<img id=\"expander\" src=\"../img/gnome/stock_zoom-in.png\">";
+ $output['aaData'][$metadataIndex]->title = $sqlTable['title'][$i];
+ $output['aaData'][$metadataIndex]->uuid = $sqlTable['uuid'][$i];
+ $output['aaData'][$metadataIndex]->organization = $sqlTable['organization'][$i];
+ $insCat = '';
+ $output['aaData'][$metadataIndex]->inspireCategories = '';
+ $output['aaData'][$metadataIndex]->numberViewServices = 0;
+ $output['aaData'][$metadataIndex]->numberDownloadServices = 0;
+ }
+ if ($metadataIndex > -1) { //prohibit indexes which are not real - otherwise the json array will become an object
+ if ($sqlTable['resource_type'][$i] == "layer") {
+ //addview service element
+ $output['aaData'][$metadataIndex]->viewServices[]->id = $sqlTable['resource_id'][$i];
+ $catString = $sqlTable['inspire_cat'][$i];
+ $insCat .= $sqlTable['inspire_cat'][$i];
+ if ($insCat != '') {
+ $insCat .= ",";
+ }
+ //increment amount of view services
+ $output['aaData'][$metadataIndex]->numberViewServices++;
+ if ($sqlTable['inspire_download'][$i] == 1) {
+ //add further inspire_download service element for this layer
+ //increment amount of view services
+ $output['aaData'][$metadataIndex]->numberDownloadServices++;
+ }
}
- //increment amount of view services
- $output['aaData'][$metadataIndex]->numberViewServices++;
- if ($sqlTable['inspire_download'][$i] == 1) {
- //add further inspire_download service element for this layer
- //increment amount of view services
+ if ($sqlTable['resource_type'][$i] == "wfs_featuretype" && $sqlTable['inspire_download'][$i] == "1") {
+ //add download service element
$output['aaData'][$metadataIndex]->numberDownloadServices++;
+ $insCat .= $sqlTable['inspire_cat'][$i];
+ if ($insCat != '') {
+ $insCat .= ",";
+ }
+ //$output['aaData'][$metadataIndex]->downloadServices[]->id = $sqlTable['resource_id'][$i];
}
+ //reduce categories if there are double entries
+ $output['aaData'][$metadataIndex]->inspireCategories = implode(',',array_unique(explode(',',(rtrim($insCat,',')))));
}
- if ($sqlTable['resource_type'][$i] == "wfs_featuretype" && $sqlTable['inspire_download'][$i] == "1") {
- //add download service element
- $output['aaData'][$metadataIndex]->numberDownloadServices++;
- $insCat .= $sqlTable['inspire_cat'][$i];
- if ($insCat != '') {
- $insCat .= ",";
- }
- //$output['aaData'][$metadataIndex]->downloadServices[]->id = $sqlTable['resource_id'][$i];
- }
- //reduce categories if there are double entries
- $output['aaData'][$metadataIndex]->inspireCategories = implode(',',array_unique(explode(',',(rtrim($insCat,',')))));
}
}
header('Content-Type: application/json; charset='.CHARSET);
@@ -186,6 +203,7 @@
//push information into metadataContactArray
$metadataContactOwnerArray[$index]['metadatapointofcontactorgname'] = $row['metadatapointofcontactorgname'];
$metadataContactOwnerArray[$index]['mb_user_id'] = $row['mb_user_id'];
+ $metadataContactOwnerArray[$index]['orga_id'] = $row['mb_group_id'];
$index++;
}
$index = 0;
@@ -195,6 +213,7 @@
$index = findIndexInMultiDimArray($metadataContactOwnerArray, $listOwnerIds[$i], 'mb_user_id');
$groupOwnerArray[2][$listOwnerIdsKeys[$i]] = $metadataContactOwnerArray[$index]['user_id']; //user_id - 2
$groupOwnerArray[3][$listOwnerIdsKeys[$i]] = $metadataContactOwnerArray[$index]['metadatapointofcontactorgname']; //orga_name - 3
+ $groupOwnerArray[4][$listOwnerIdsKeys[$i]] = $metadataContactOwnerArray[$index]['orga_id'];
}
}
//for groupList
@@ -206,6 +225,7 @@
//push information into metadataContactArray
$metadataContactGroupArray[$index]['metadatapointofcontactorgname'] = $row['metadatapointofcontactorgname'];
$metadataContactGroupArray[$index]['mb_user_id'] = $row['mb_user_id'];
+ $metadataContactGroupArray[$index]['orga_id'] = $row['mb_group_id'];
$index++;
}
$index = 0;
@@ -215,6 +235,7 @@
$index = findIndexInMultiDimArray($metadataContactGroupArray, $listGroupIds[$i], 'mb_user_id');
$groupOwnerArray[2][$listGroupIdsKeys[$i]] = $metadataContactGroupArray[$index]['mb_user_id']; //user_id - 2
$groupOwnerArray[3][$listGroupIdsKeys[$i]] = $metadataContactGroupArray[$index]['metadatapointofcontactorgname']; //orga_name - 3
+ $groupOwnerArray[4][$listGroupIdsKeys[$i]] = $metadataContactGroupArray[$index]['orga_id'];
}
}
return $groupOwnerArray;
Modified: trunk/mapbender/http/geoportal/mod_showInspireMonitoring.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_showInspireMonitoring.php 2013-02-14 10:19:14 UTC (rev 8560)
+++ trunk/mapbender/http/geoportal/mod_showInspireMonitoring.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -1,5 +1,6 @@
<?php
require_once dirname(__FILE__) . "/../../core/globalSettings.php";
+$registratingDepartments = null;
$sessionLang = Mapbender::session()->get("mb_lang");
if (isset($sessionLang) && ($sessionLang!='')) {
$e = new mb_notice("mod_showMetadata.php: language found in session: ".$sessionLang);
@@ -8,6 +9,17 @@
$langCode = $langCode[0];
$languageCode = $langCode;
}
+if (isset($_REQUEST["registratingDepartments"]) & $_REQUEST["registratingDepartments"] != "") {
+ //validate to csv integer list
+ $testMatch = $_REQUEST["registratingDepartments"];
+ $pattern = '/^[\d,]*$/';
+ if (!preg_match($pattern,$testMatch)){
+ echo 'registratingDepartments: <b>'.$testMatch.'</b> is not valid.<br/>';
+ die();
+ }
+ $registratingDepartments = $testMatch;
+ $testMatch = NULL;
+}
//Array with translations:
switch ($languageCode) {
case "de":
@@ -82,7 +94,9 @@
$html .= $metadataStr;
//define the javascripts to include
$html .= '<link type="text/css" href="../extensions/DataTables-1.9.4/media/css/jquery.dataTables.css" rel="Stylesheet" />';
-$html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />';
+$html .= '<link type="text/css" href="jquery.dataTables.geoportal.css" rel="Stylesheet" />';
+//$html .= '<link type="text/css" href="../extensions/jquery-ui-1.8.1.custom/css/custom-theme/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />';
+//$html .= '<link type="text/css" href="http://www.geoportal.rlp.de/fileadmin/design/geoportal.rlp.css" rel="Stylesheet" />';
$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js"></script>';
$html .= '<script type="text/javascript" src="urlencode.js"></script>';
$html .= '<script type="text/javascript" src="../extensions/jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js"></script>';
@@ -170,7 +184,11 @@
//$html .= "],";
$html .= "\"bProcessing\": true,";
$html .= "\"sAjaxDataProp\": \"aaData\",";
-$html .= "\"sAjaxSource\": \"mod_pullInspireMonitoring.php\",";
+if ($registratingDepartments != null) {
+ $html .= "\"sAjaxSource\": \"mod_pullInspireMonitoring.php?registratingDepartments=".$registratingDepartments."\",";
+} else {
+ $html .= "\"sAjaxSource\": \"mod_pullInspireMonitoring.php\",";
+}
$html .= "\"aoColumns\": [";
//$html .= "\"<img src='../img/add.png'>\",";
$html .= "{ \"mData\": \"detailImage\" },";
Modified: trunk/mapbender/http/php/mod_exportWmc2Json.php
===================================================================
--- trunk/mapbender/http/php/mod_exportWmc2Json.php 2013-02-14 10:19:14 UTC (rev 8560)
+++ trunk/mapbender/http/php/mod_exportWmc2Json.php 2013-02-18 14:10:20 UTC (rev 8561)
@@ -34,7 +34,6 @@
$userId = PUBLIC_USER;
}
-
if (isset($_REQUEST["wmc_id"]) & $_REQUEST["wmc_id"] != "") {
//validate to csv integer list
$testMatch = $_REQUEST["wmc_id"];
@@ -71,7 +70,10 @@
//define list of typical background layer ids
//use wms id because the layers can be pulled dynamically
//background wms list
-$backgroundWms = array(913,914);
+if (!isset($backgroundWms)) {
+ $backgroundWms = array(1819,1382,1635);
+}
+//$backgroundWms = array(1906,1382,1819);
$backgroundLayer = array();
//get list of layers for this wms
$v = array();
@@ -107,8 +109,7 @@
$sqlMiny = "SELECT Y(transform(GeometryFromText('POINT(".pg_escape_string($x)." ".pg_escape_string($y).")',".pg_escape_string($oldEPSG)."),".pg_escape_string($newEPSG).")) as miny";
$resMiny = db_query($sqlMiny);
- $miny = floatval(db_result($resMiny,0,"miny"));
-
+ $miny = floatval(db_result($resMiny,0,"miny"));
}else{
$con_string = "host=" . GEOS_DBSERVER . " port=" . GEOS_PORT .
" dbname=" . GEOS_DB . "user=" . GEOS_OWNER .
@@ -125,8 +126,7 @@
$resMiny = pg_query($con,$sqlMiny);
$miny = floatval(pg_fetch_result($resMiny,0,"miny"));
}
- return array("x" => $minx, "y" => $miny);
-
+ return array("x" => $minx, "y" => $miny);
}
//Function to create an OpenLayers Javascript from a mapbender wmc document
@@ -249,13 +249,10 @@
$layerCount++;
}
}
- }
-
+ }
}
echo json_encode($wmcObject);
-
}
-
//
createJsonFromWmc($wmc_id, $crs);
More information about the Mapbender_commits
mailing list