File | Statements | Executed | Coverage | |
---|---|---|---|---|
Total | 8609 | 482 | 5 % |
|
src/KeyboardPoint.js | 50 | 1 | 2 % |
|
[[-1,'\/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for '],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. '],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * A custom handler that displays a vector point that can be moved using the'],[-1,' * arrow keys of the keyboard. *'],[-1,' * '],[-1,' * @class OpenLayers.Handler.KeyboardPoint'],[-1,' * @requires OpenLayers\/Handler.js'],[-1,' * @requires OpenLayers\/Layer\/Vector.js'],[-1,' * @requires OpenLayers\/StyleMap.js'],[-1,' * @extends OpenLayers.Handler'],[-1,' *\/'],[1,'OpenLayers.Handler.KeyboardPoint = OpenLayers.Class(OpenLayers.Handler, {'],[-1,''],[-1,'\tKEY_EVENTS : [ \"keydown\" ],'],[-1,''],[-1,'\t\/**'],[-1,'\t * @constructor'],[-1,'\t * @param control'],[-1,'\t * @param callbacks'],[-1,'\t * @param options'],[-1,'\t *\/'],[-1,'\tinitialize : function(control, callbacks, options) {'],[0,'\t\tOpenLayers.Handler.prototype.initialize.apply(this, arguments);'],[-1,'\t\t\/\/ cache the bound event listener method so it can be unobserved'],[-1,'\t\t\/\/ later'],[0,'\t\tthis.eventListener = OpenLayers.Function.bindAsEventListener(this.handleKeyEvent, this);'],[-1,'\t},'],[-1,'\t\/**'],[-1,'\t * called on activate.'],[-1,'\t *\/'],[-1,'\tactivate : function() {'],[0,'\t\tif (!OpenLayers.Handler.prototype.activate.apply(this, arguments)) {'],[0,'\t\t\treturn false;'],[-1,'\t\t}'],[0,'\t\tthis.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, {'],[-1,'\t\t\tstyleMap : new OpenLayers.StyleMap({'],[-1,'\t\t\t\texternalGraphic : \'img\/info.png\','],[-1,'\t\t\t\tgraphicHeight : 40,'],[-1,'\t\t\t\tgraphicWidth : 32,'],[-1,'\t\t\t\tgraphicXOffset : -16,'],[-1,'\t\t\t\tgraphicYOffset : -36'],[-1,'\t\t\t})'],[-1,'\t\t});'],[0,'\t\tthis.map.addLayer(this.layer);'],[0,'\t\tthis.observeElement = this.observeElement || document;'],[0,'\t\tfor ( var i = 0, len = this.KEY_EVENTS.length; i < len; i++) {'],[0,'\t\t\tOpenLayers.Event.observe(this.observeElement, this.KEY_EVENTS[i], this.eventListener);'],[-1,'\t\t}'],[0,'\t\tif (!this.point) {'],[0,'\t\t\tthis.createFeature();'],[-1,'\t\t}'],[0,'\t\treturn true;'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * called on deactivate.'],[-1,'\t *\/'],[-1,'\tdeactivate : function() {'],[0,'\t\tif (!OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {'],[0,'\t\t\treturn false;'],[-1,'\t\t}'],[0,'\t\tfor ( var i = 0, len = this.KEY_EVENTS.length; i < len; i++) {'],[0,'\t\t\tOpenLayers.Event.stopObserving(this.observeElement, this.KEY_EVENTS[i], this.eventListener);'],[-1,'\t\t}'],[0,'\t\tthis.map.removeLayer(this.layer);'],[0,'\t\tthis.destroyFeature();'],[0,'\t\treturn true;'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * handles the key events. Moving the selection feature around on the map.'],[-1,'\t * '],[-1,'\t * @param evt'],[-1,'\t * {OpenLayers.Event} key event'],[-1,'\t *\/'],[-1,'\thandleKeyEvent : function(evt) {'],[0,'\t\tswitch (evt.keyCode) {'],[-1,'\t\tcase OpenLayers.Event.KEY_LEFT:'],[0,'\t\t\tthis.modifyFeature(-3, 0);'],[0,'\t\t\tbreak;'],[-1,'\t\tcase OpenLayers.Event.KEY_RIGHT:'],[0,'\t\t\tthis.modifyFeature(3, 0);'],[0,'\t\t\tbreak;'],[-1,'\t\tcase OpenLayers.Event.KEY_UP:'],[0,'\t\t\tthis.modifyFeature(0, 3);'],[0,'\t\t\tbreak;'],[-1,'\t\tcase OpenLayers.Event.KEY_DOWN:'],[0,'\t\t\tthis.modifyFeature(0, -3);'],[0,'\t\t\tbreak;'],[-1,'\t\tcase OpenLayers.Event.KEY_RETURN:'],[0,'\t\t\tthis.callback(\'done\', [ this.point.geometry.clone() ]);'],[0,'\t\t\tbreak;'],[-1,'\t\tcase OpenLayers.Event.KEY_ESC:'],[0,'\t\t\tthis.callback(\'cancel\');'],[0,'\t\t\tbreak;'],[-1,'\t\t}'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * '],[-1,'\t * @param lon'],[-1,'\t * @param lat'],[-1,'\t *\/'],[-1,'\tmodifyFeature : function(lon, lat) {'],[0,'\t\tif (!this.point) {'],[0,'\t\t\tthis.createFeature();'],[-1,'\t\t}'],[0,'\t\tvar resolution = this.map.getResolution();'],[0,'\t\tthis.point.geometry.x = this.point.geometry.x + lon * resolution;'],[0,'\t\tthis.point.geometry.y = this.point.geometry.y + lat * resolution;'],[0,'\t\tthis.callback(\"modify\", [ this.point.geometry, this.point, false ]);'],[0,'\t\tthis.point.geometry.clearBounds();'],[0,'\t\tthis.drawFeature();'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * create the point.'],[-1,'\t *\/'],[-1,'\tcreateFeature : function() {'],[0,'\t\tvar center = this.map.getCenter();'],[0,'\t\tvar geometry = new OpenLayers.Geometry.Point(center.lon, center.lat);'],[0,'\t\tthis.point = new OpenLayers.Feature.Vector(geometry);'],[0,'\t\tthis.callback(\"create\", [ this.point.geometry, this.point ]);'],[0,'\t\tthis.point.geometry.clearBounds();'],[0,'\t\tthis.layer.addFeatures([ this.point ], {'],[-1,'\t\t\tsilent : true'],[-1,'\t\t});'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * destroy the point.'],[-1,'\t *\/'],[-1,'\tdestroyFeature : function() {'],[0,'\t\tthis.layer.destroyFeatures([ this.point ]);'],[0,'\t\tthis.point = null;'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * draw the point.'],[-1,'\t *\/'],[-1,'\tdrawFeature : function() {'],[0,'\t\tthis.layer.drawFeature(this.point);'],[-1,'\t},'],[-1,''],[-1,'\tCLASS_NAME : \'OpenLayers.Handler.KeyboardPoint\''],[-1,'});']] |
||||
src/OverviewMap.js | 48 | 1 | 2 % |
|
[[-1,'\/*'],[-1,' * Copyright (c) 2013, Dienst Landelijk Gebied - Ministerie van Economische Zaken'],[-1,' * '],[-1,' * Gepubliceerd onder de BSD 2-clause licentie, '],[-1,' * zie https:\/\/github.com\/MinELenI\/CBSviewer\/blob\/master\/LICENSE.md voor de volledige licentie. '],[-1,' *\/'],[-1,'\/**'],[-1,' * Overzichtskaart, gebaseerd op OpenLayers.Control.OverviewMap.'],[-1,' * '],[-1,' * @author mprins'],[-1,' * @class {OverviewMap}'],[-1,' * @extends {OpenLayers.Control.OverviewMap}'],[-1,' *\/'],[1,'OverviewMap = OpenLayers.Class(OpenLayers.Control.OverviewMap, {'],[-1,''],[-1,'\t\/** @override *\/'],[-1,'\tmaximized : true,'],[-1,''],[-1,'\t\/** @override *\/'],[-1,'\tmapOptions : {'],[-1,'\t\ttheme : null'],[-1,'\t},'],[-1,''],[-1,'\t\/** @override *\/'],[-1,'\tsize : {'],[-1,'\t\tw : 140,'],[-1,'\t\th : 140'],[-1,'\t},'],[-1,''],[-1,'\t\/** @override *\/'],[-1,'\tautoPan : true,'],[-1,''],[-1,'\t\/**'],[-1,'\t * Constructor: OpenLayers.Control.OverviewMap Create a new overview map'],[-1,'\t * '],[-1,'\t * Parameters: options - {Object} Properties of this object will be set on'],[-1,'\t * the overview map object. Note, to set options on the map object contained'],[-1,'\t * in this control, set <mapOptions> as one of the options properties.'],[-1,'\t * '],[-1,'\t * @override'],[-1,'\t *\/'],[-1,'\tinitialize : function(options) {'],[0,'\t\tthis.layers = [];'],[0,'\t\tthis.handlers = {};'],[0,'\t\tOpenLayers.Control.prototype.initialize.apply(this, [ options ]);'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * Method: draw Render the control in the browser.'],[-1,'\t * '],[-1,'\t * @override'],[-1,'\t *\/'],[-1,'\tdraw : function() {'],[0,'\t\tOpenLayers.Control.prototype.draw.apply(this, arguments);'],[0,'\t\tif (this.layers.length === 0) {'],[0,'\t\t\tif (this.map.baseLayer) {'],[0,'\t\t\t\tvar layer = this.map.baseLayer.clone();'],[0,'\t\t\t\tthis.layers = [ layer ];'],[-1,'\t\t\t} else {'],[0,'\t\t\t\tthis.map.events.register(\"changebaselayer\", this, this.baseLayerDraw);'],[0,'\t\t\t\treturn this.div;'],[-1,'\t\t\t}'],[-1,'\t\t}'],[-1,''],[-1,'\t\t\/\/ create overview map DOM elements'],[0,'\t\tthis.element = document.createElement(\'div\');'],[0,'\t\tthis.element.className = this.displayClass + \'Element\';'],[0,'\t\tthis.element.style.display = \'none\';'],[-1,''],[0,'\t\tthis.mapDiv = document.createElement(\'div\');'],[0,'\t\tthis.mapDiv.style.width = this.size.w + \'px\';'],[0,'\t\tthis.mapDiv.style.height = this.size.h + \'px\';'],[0,'\t\tthis.mapDiv.style.position = \'relative\';'],[0,'\t\tthis.mapDiv.style.overflow = \'hidden\';'],[0,'\t\tthis.mapDiv.id = OpenLayers.Util.createUniqueID(\'overviewMap\');'],[-1,''],[0,'\t\tthis.extentRectangle = document.createElement(\'div\');'],[0,'\t\tthis.extentRectangle.style.position = \'absolute\';'],[0,'\t\tthis.extentRectangle.style.zIndex = 1000; \/\/ HACK'],[0,'\t\tthis.extentRectangle.className = this.displayClass + \'ExtentRectangle\';'],[-1,''],[0,'\t\tthis.element.appendChild(this.mapDiv);'],[-1,''],[0,'\t\tthis.div.appendChild(this.element);'],[-1,''],[0,'\t\tthis.div.className += \" \" + this.displayClass + \'Container\';'],[-1,''],[-1,'\t\t\/\/ maximize button'],[0,'\t\tvar btn = document.createElement(\"button\");'],[0,'\t\tbtn.innerHTML = \'<span role=\"tooltip\">\'+OpenLayers.i18n(\'KEY_TOGGLE_OVERVIEW_ON\')+\'<\/span><img src=\"img\/maximize.png\" alt=\"tonen\"\/>\';'],[0,'\t\tbtn.name = \'tonen\';'],[0,'\t\tthis.maximizeDiv = btn;'],[0,'\t\tthis.maximizeDiv.style.display = \'none\';'],[0,'\t\tthis.maximizeDiv.className = this.displayClass + \'MaximizeButton overviewMapButton olButton hasTooltip\';'],[0,'\t\tthis.div.appendChild(this.maximizeDiv);'],[-1,''],[-1,'\t\t\/\/ minimize button'],[0,'\t\tbtn = document.createElement(\"button\");'],[0,'\t\tbtn.innerHTML = \'<span role=\"tooltip\">\'+OpenLayers.i18n(\'KEY_TOGGLE_OVERVIEW_OFF\')+\'<\/span><img src=\"img\/minimize.png\" alt=\"verbergen\"\/>\';'],[0,'\t\tbtn.name = \'verbergen\';'],[0,'\t\tthis.minimizeDiv = btn;'],[0,'\t\tthis.minimizeDiv.style.display = \'none\';'],[0,'\t\tthis.minimizeDiv.className = this.displayClass + \'MinimizeButton overviewMapButton olButton hasTooltip\';'],[0,'\t\tthis.div.appendChild(this.minimizeDiv);'],[-1,''],[0,'\t\tthis.minimizeControl();'],[-1,''],[0,'\t\tif (this.map.getExtent()) {'],[0,'\t\t\tthis.update();'],[-1,'\t\t}'],[-1,''],[0,'\t\tthis.map.events.on({'],[-1,'\t\t\tbuttonclick : this.onButtonClick,'],[-1,'\t\t\tmoveend : this.update,'],[-1,'\t\t\tscope : this'],[-1,'\t\t});'],[-1,''],[0,'\t\tif (this.maximized) {'],[0,'\t\t\tthis.maximizeControl();'],[-1,'\t\t}'],[0,'\t\treturn this.div;'],[-1,'\t},'],[-1,''],[-1,'\tCLASS_NAME : \'OverviewMap\''],[-1,'});']] |
||||
src/UpdateLegendControl.js | 34 | 1 | 2 % |
|
[[-1,'\/*'],[-1,' * Copyright (c) 2012-2013, Dienst Landelijk Gebied - Ministerie van Economische Zaken'],[-1,' * '],[-1,' * Gepubliceerd onder de BSD 2-clause licentie, '],[-1,' * zie https:\/\/github.com\/MinELenI\/CBSviewer\/blob\/master\/LICENSE.md voor de volledige licentie. '],[-1,' *\/'],[-1,'\/**'],[-1,' * Werkt de legenda bij als de kaart wordt ge-update met een WMS layer.'],[-1,' * '],[-1,' * @author mprins'],[-1,' * @class'],[-1,' * @extends OpenLayers.Control'],[-1,' * @requires OpenLayers\/Control.js'],[-1,' * @requires OpenLayers\/Layer\/WMS\/js'],[-1,' * @constructor'],[-1,' *\/'],[1,'UpdateLegendControl = OpenLayers.Class(OpenLayers.Control, {'],[-1,'\t\/**'],[-1,'\t * Activate the control when it is added to a map. Default is true.'],[-1,'\t * '],[-1,'\t * @type{Boolean}'],[-1,'\t *\/'],[-1,'\tautoActivate : true,'],[-1,''],[-1,'\t\/**'],[-1,'\t * Dom element waar de legenda in wordt gevoegd. Moet een container element'],[-1,'\t * zijn zoals P, DIV, SPAN, MAP, LI, ...'],[-1,'\t * '],[-1,'\t * @type {DOMElement}'],[-1,'\t *\/'],[-1,'\telement : null,'],[-1,''],[-1,'\t\/**'],[-1,'\t * destroy this control.'],[-1,'\t *\/'],[-1,'\tdestroy : function() {'],[0,'\t\tthis.deactivate();'],[0,'\t\tOpenLayers.Control.prototype.destroy.apply(this, arguments);'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * activate this control.'],[-1,'\t *\/'],[-1,'\tactivate : function() {'],[0,'\t\tif (OpenLayers.Control.prototype.activate.apply(this, arguments)) {'],[0,'\t\t\tthis.map.events.register(\'addlayer\', this, this.redraw);'],[0,'\t\t\tthis.redraw();'],[0,'\t\t\treturn true;'],[-1,'\t\t} else {'],[0,'\t\t\treturn false;'],[-1,'\t\t}'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * deactivate this control.'],[-1,'\t *\/'],[-1,'\tdeactivate : function() {'],[0,'\t\tif (OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {'],[0,'\t\t\tthis.map.events.unregister(\'addlayer\', this, this.redraw);'],[0,'\t\t\tthis.element.innerHTML = \"\";'],[0,'\t\t\treturn true;'],[-1,'\t\t} else {'],[0,'\t\t\treturn false;'],[-1,'\t\t}'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * draw this control.'],[-1,'\t * '],[-1,'\t * @returns {DOMElement}'],[-1,'\t *\/'],[-1,'\tdraw : function() {'],[0,'\t\tOpenLayers.Control.prototype.draw.apply(this, arguments);'],[0,'\t\tif (!this.element) {'],[0,'\t\t\tthis.div.left = \"\";'],[0,'\t\t\tthis.div.top = \"\";'],[0,'\t\t\tthis.element = this.div;'],[-1,'\t\t}'],[0,'\t\treturn this.div;'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * redraw this control.'],[-1,'\t * '],[-1,'\t * @param {OpenLayers.Event}'],[-1,'\t * evt De addlayer event'],[-1,'\t *\/'],[-1,'\tredraw : function(evt) {'],[-1,'\t\t\/\/ addlayer event - triggered after a layer has been added. The event'],[-1,'\t\t\/\/ object will include a *layer* property that references the added'],[-1,'\t\t\/\/ layer.'],[0,'\t\tif (evt == null) {'],[0,'\t\t\tthis.reset();'],[0,'\t\t\treturn;'],[-1,'\t\t} else {'],[-1,'\t\t\t\/\/ test if layer is WMS'],[0,'\t\t\tif (evt.layer.CLASS_NAME == \"OpenLayers.Layer.WMS\") {'],[0,'\t\t\t\tvar lyr = evt.layer;'],[0,'\t\t\t\tvar wmsLyrs = (lyr.params.LAYERS).split(\',\');'],[0,'\t\t\t\tvar wmsLyrStyles = (lyr.params.STYLES).split(\',\');'],[0,'\t\t\t\tvar newHtml = \"\";'],[0,'\t\t\t\tfor (i = 0, l = wmsLyrs.length; i < l; i++) {'],[0,'\t\t\t\t\tvar legendUrl = lyr.url + \'?SERVICE=WMS&REQUEST=GetLegendGraphic\' + \'&FORMAT=image%2Fpng\''],[-1,'\t\t\t\t\t\t\t+ \'&WIDTH=36&HEIGHT=36\' + \'&LAYER=\' + wmsLyrs[i] + \'&STYLE=\' + wmsLyrStyles[i]'],[-1,'\t\t\t\t\t\t\t+ \'&VERSION=1.1.1&EXCEPTIONS=\' + lyr.params.EXCEPTIONS;'],[0,'\t\t\t\t\tnewHtml += \'<img src=\"\' + legendUrl + \'\" alt=\"Legenda voor kaartlaag \' + lyr.name + \' (\''],[-1,'\t\t\t\t\t\t\t+ wmsLyrs[i] + \')\"\/>\';'],[-1,'\t\t\t\t}'],[-1,''],[0,'\t\t\t\tif (newHtml != this.element.innerHTML) {'],[0,'\t\t\t\t\tthis.element.innerHTML = newHtml;'],[-1,'\t\t\t\t}'],[-1,'\t\t\t}'],[-1,'\t\t}'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * reset this control.'],[-1,'\t * '],[-1,'\t * @param {OpenLayers.Event}'],[-1,'\t * evt De addlayer event'],[-1,'\t *\/'],[-1,'\treset : function(evt) {'],[0,'\t\tif (this.emptyString !== null) {'],[0,'\t\t\tthis.element.innerHTML = this.emptyString;'],[-1,'\t\t}'],[-1,'\t},'],[-1,' '],[-1,' CLASS_NAME : \'UpdateLegendControl\''],[-1,'});']] |
||||
src/ClickDrawControl.js | 31 | 1 | 3 % |
|
[[-1,'\/*'],[-1,' * Copyright (c) 2012, Dienst Landelijk Gebied - Ministerie van Economische Zaken'],[-1,' * '],[-1,' * Gepubliceerd onder de BSD 2-clause licentie, '],[-1,' * zie https:\/\/github.com\/MinELenI\/CBSviewer\/blob\/master\/LICENSE.md voor de volledige licentie. '],[-1,' *\/'],[-1,'\/**'],[-1,' * Een control die een ikoontje tekent op de plaats waar geklikt is.'],[-1,' * '],[-1,' * @author mprins'],[-1,' * @class {ClickDrawControl}'],[-1,' * @extends {OpenLayers.Control}'],[-1,' *\/'],[1,'ClickDrawControl = OpenLayers.Class(OpenLayers.Control, {'],[-1,'\t\/** @override *\/'],[-1,'\tautoActivate : true,'],[-1,''],[-1,'\t\/** @override *\/'],[-1,'\tdefaultHandlerOptions : {'],[-1,'\t\t\'single\' : true,'],[-1,'\t\t\'double\' : false,'],[-1,'\t\t\'pixelTolerance\' : 0,'],[-1,'\t\t\'stopSingle\' : false,'],[-1,'\t\t\'stopDouble\' : false'],[-1,'\t},'],[-1,''],[-1,'\t\/** @constructor *\/'],[-1,'\tinitialize : function(options) {'],[0,'\t\tthis.handlerOptions = OpenLayers.Util.extend({}, this.defaultHandlerOptions);'],[0,'\t\tOpenLayers.Control.prototype.initialize.apply(this, arguments);'],[0,'\t\tthis.handler = new OpenLayers.Handler.Click(this, {'],[-1,'\t\t\t\'click\' : this.trigger'],[-1,'\t\t}, this.handlerOptions);'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * Klik event handler.'],[-1,'\t * '],[-1,'\t * @param e'],[-1,'\t * {OpenLayers.Event} een muisklik event'],[-1,'\t *\/'],[-1,'\ttrigger : function(e) {'],[0,'\t\tif (!this.layer) {'],[0,'\t\t\tthis.makeLayer();'],[-1,'\t\t}'],[0,'\t\tthis.drawOrMove(e);'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * zorgt voor een vector layer om een marker in te tekenen.'],[-1,'\t * '],[-1,'\t * @private'],[-1,'\t *\/'],[-1,'\tmakeLayer : function() {'],[0,'\t\tthis.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, {'],[-1,'\t\t\tstyleMap : new OpenLayers.StyleMap({'],[-1,'\t\t\t\texternalGraphic : \'img\/info.png\','],[-1,'\t\t\t\tgraphicHeight : 40,'],[-1,'\t\t\t\tgraphicWidth : 32,'],[-1,'\t\t\t\tgraphicXOffset : -16,'],[-1,'\t\t\t\tgraphicYOffset : -36'],[-1,'\t\t\t})'],[-1,'\t\t});'],[0,'\t\tthis.map.addLayer(this.layer);'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * teken een ikoontje.'],[-1,'\t * '],[-1,'\t * @param e'],[-1,'\t * {OpenLayers.Event}'],[-1,'\t * @private'],[-1,'\t *\/'],[-1,'\tdrawOrMove : function(e) {'],[-1,'\t\t\/\/ verplaats naar bovenste'],[0,'\t\tthis.map.setLayerIndex(this.layer, this.map.getNumLayers()-1);'],[0,'\t\tvar lonlat = this.map.getLonLatFromPixel(e.xy);'],[0,'\t\tif (!this.point) {'],[0,'\t\t\tvar geometry = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);'],[0,'\t\t\tthis.point = new OpenLayers.Feature.Vector(geometry);'],[0,'\t\t\tthis.point.geometry.clearBounds();'],[0,'\t\t\tthis.layer.addFeatures([ this.point ], {'],[-1,'\t\t\t\tsilent : true'],[-1,'\t\t\t});'],[-1,'\t\t} else {'],[0,'\t\t\tthis.point.geometry.x = lonlat.lon;'],[0,'\t\t\tthis.point.geometry.y = lonlat.lat;'],[0,'\t\t\tthis.point.geometry.clearBounds();'],[-1,'\t\t}'],[0,'\t\tthis.layer.drawFeature(this.point);'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * activate deze control.'],[-1,'\t * '],[-1,'\t * @returns {Boolean}'],[-1,'\t * @override'],[-1,'\t *\/'],[-1,'\tactivate : function() {'],[0,'\t\tif (!OpenLayers.Control.prototype.activate.apply(this, arguments)) {'],[0,'\t\t\treturn false;'],[-1,'\t\t}'],[0,'\t\treturn true;'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * deactivate deze control, zorgt oa. voor opruimen van resources.'],[-1,'\t * '],[-1,'\t * @returns {Boolean}'],[-1,'\t * @override'],[-1,'\t *\/'],[-1,'\tdeactivate : function() {'],[0,'\t\tif (!OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {'],[0,'\t\t\treturn false;'],[-1,'\t\t}'],[0,'\t\tif (this.layer) {'],[0,'\t\t\tthis.map.removeLayer(this.layer);'],[0,'\t\t\tthis.layer.destroyFeatures([ this.point ]);'],[0,'\t\t\tthis.point = null;'],[0,'\t\t\tthis.layer = null;'],[-1,'\t\t}'],[0,'\t\treturn true;'],[-1,'\t},'],[-1,' '],[-1,'\tCLASS_NAME : \'ClickDrawControl\''],[-1,'});']] |
||||
src/KeyboardClick.js | 32 | 1 | 3 % |
|
[[-1,'\/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for '],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. '],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * A custom control that (a) adds a vector point that can be moved using the'],[-1,' * arrow keys of the keyboard, and (b) displays a browser alert window when the'],[-1,' * RETURN key is pressed. The control can be activated\/deactivated using the \"i\"'],[-1,' * key. When activated the control deactivates any KeyboardDefaults control in'],[-1,' * the map so that the map is not moved when the arrow keys are pressed.'],[-1,' * '],[-1,' * This control relies on the OpenLayers.Handler.KeyboardPoint custom handler.'],[-1,' * '],[-1,' * @class OpenLayers.Control.KeyboardClick'],[-1,' * @requires OpenLayers\/Control.js'],[-1,' * @requires KeyboardPoint.js'],[-1,' * @extends OpenLayers.Control'],[-1,' *\/'],[1,'OpenLayers.Control.KeyboardClick = OpenLayers.Class(OpenLayers.Control, {'],[-1,'\t\/** @constructor *\/'],[-1,'\tinitialize : function(options) {'],[0,'\t\tOpenLayers.Control.prototype.initialize.apply(this, [ options ]);'],[0,'\t\tvar observeElement = this.observeElement || document;'],[0,'\t\tthis.handler = new OpenLayers.Handler.KeyboardPoint(this, {'],[-1,'\t\t\tdone : this.onClick,'],[-1,'\t\t\tcancel : this.deactivate'],[-1,'\t\t}, {'],[-1,'\t\t\tobserveElement : observeElement'],[-1,'\t\t});'],[0,'\t\tOpenLayers.Event.observe(observeElement, \"keydown\", OpenLayers.Function.bindAsEventListener(function(evt) {'],[0,'\t\t\tif (evt.keyCode == 73) { \/\/ \"i\"'],[0,'\t\t\t\tif (this.active) {'],[0,'\t\t\t\t\tthis.deactivate();'],[-1,'\t\t\t\t} else {'],[0,'\t\t\t\t\tthis.activate();'],[-1,'\t\t\t\t}'],[-1,'\t\t\t}'],[-1,'\t\t}, this));'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * Event handler voor click event. Deze handler stuurt de WMSGetFeatureInfo'],[-1,'\t * control aan om een GetFeatureInfo request uit te voeren.'],[-1,'\t * '],[-1,'\t * @param {Openlayers.Geometry}'],[-1,'\t * geometry met real life co\u00F6rdinaten'],[-1,'\t * '],[-1,'\t *\/'],[-1,'\tonClick : function(geometry) {'],[0,'\t\tvar featureInfoCtl = this.map.getControlsByClass(\'WMSGetFeatureInfo\')[0];'],[0,'\t\tif (featureInfoCtl) {'],[0,'\t\t\tvar lonlat = new OpenLayers.LonLat([ geometry.x, geometry.y ]);'],[0,'\t\t\tvar pixel = this.map.getPixelFromLonLat(lonlat);'],[0,'\t\t\tfeatureInfoCtl.getInfoForClick({'],[-1,'\t\t\t\t\'xy\' : pixel,'],[-1,'\t\t\t\t\'lonlat\' : lonlat'],[-1,'\t\t\t});'],[-1,'\t\t}'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * Activeert deze control en zet de default keyboard handler uit (mits'],[-1,'\t * aanwezig).'],[-1,'\t * '],[-1,'\t * @returns {Boolean}'],[-1,'\t *\/'],[-1,'\tactivate : function() {'],[0,'\t\tif (!OpenLayers.Control.prototype.activate.apply(this, arguments)) {'],[0,'\t\t\treturn false;'],[-1,'\t\t}'],[0,'\t\tvar keyboardDefaults = this.map.getControlsByClass(\'OpenLayers.Control.KeyboardDefaults\')[0];'],[0,'\t\tif (keyboardDefaults) {'],[0,'\t\t\tkeyboardDefaults.deactivate();'],[-1,'\t\t}'],[0,'\t\tvar clickDraw = this.map.getControlsByClass(\'ClickDrawControl\')[0];'],[0,'\t\tif (clickDraw) {'],[0,'\t\t\tclickDraw.deactivate();'],[-1,'\t\t}'],[0,'\t\treturn true;'],[-1,'\t},'],[-1,''],[-1,'\t\/**'],[-1,'\t * Deactiveert deze control en zet de default keyboard handler aan (mits'],[-1,'\t * aanwezig).'],[-1,'\t * '],[-1,'\t * @returns {Boolean}'],[-1,'\t *\/'],[-1,'\tdeactivate : function() {'],[0,'\t\tif (!OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {'],[0,'\t\t\treturn false;'],[-1,'\t\t}'],[0,'\t\tvar keyboardDefaults = this.map.getControlsByClass(\'OpenLayers.Control.KeyboardDefaults\')[0];'],[0,'\t\tif (keyboardDefaults) {'],[0,'\t\t\tkeyboardDefaults.activate();'],[-1,'\t\t}'],[0,'\t\tvar clickDraw = this.map.getControlsByClass(\'ClickDrawControl\')[0];'],[0,'\t\tif (clickDraw) {'],[0,'\t\t\tclickDraw.activate();'],[-1,'\t\t}'],[0,'\t\treturn true;'],[-1,'\t},'],[-1,'\t'],[-1,'\tCLASS_NAME: \'OpenLayers.Control.KeyboardClick\''],[-1,'});']] |
||||
src/ZoomControl.js | 25 | 1 | 4 % |
|
[[-1,'\/*'],[-1,' * Copyright (c) 2013, Dienst Landelijk Gebied - Ministerie van Economische Zaken'],[-1,' * '],[-1,' * Gepubliceerd onder de BSD 2-clause licentie, '],[-1,' * zie https:\/\/github.com\/MinELenI\/CBSviewer\/blob\/master\/LICENSE.md voor de volledige licentie. '],[-1,' *\/'],[-1,'\/**'],[-1,' * ZoomControle met ingebouwde tooltips.'],[-1,' * '],[-1,' * @author mprins'],[-1,' * @class'],[-1,' * @extends OpenLayers.Control.Zoom()'],[-1,' * @requires OpenLayers\/Control\/Zoom.js'],[-1,' * @constructor'],[-1,' *\/'],[1,'ZoomControl = OpenLayers.Class(OpenLayers.Control.Zoom, {'],[-1,'\t\/**'],[-1,'\t * Method: getOrCreateLinks'],[-1,'\t * '],[-1,'\t * Parameters: el - {DOMElement}'],[-1,'\t * '],[-1,'\t * Return: {Object} Object with zoomIn and zoomOut properties referencing'],[-1,'\t * links.'],[-1,'\t * @ovveride'],[-1,'\t *\/'],[-1,'\tgetOrCreateLinks : function(el) {'],[0,'\t\tvar zoomIn = document.getElementById(this.zoomInId), zoomOut = document.getElementById(this.zoomOutId);'],[0,'\t\tif (!zoomIn) {'],[0,'\t\t\tzoomIn = document.createElement(\"button\");'],[0,'\t\t\tvar tooltip = document.createElement(\"span\");'],[0,'\t\t\ttooltip.appendChild(document.createTextNode(OpenLayers.i18n(\'KEY_ZOOMIN_TOOLTIP\')));'],[0,'\t\t\ttooltip.role = \'tooltip\';'],[0,'\t\t\tzoomIn.appendChild(tooltip);'],[0,'\t\t\tzoomIn.appendChild(document.createTextNode(this.zoomInText));'],[0,'\t\t\tzoomIn.className = \"olControlZoomIn\";'],[0,'\t\t\tel.appendChild(zoomIn);'],[-1,'\t\t}'],[0,'\t\tOpenLayers.Element.addClass(zoomIn, \"olButton\");'],[0,'\t\tOpenLayers.Element.addClass(zoomIn, \"hasTooltip\");'],[0,'\t\tif (!zoomOut) {'],[0,'\t\t\tzoomOut = document.createElement(\"button\");'],[-1,'\t\t\t\/\/zoomOut.href = \"#zoomOut\";'],[0,'\t\t\tvar tooltip = document.createElement(\"span\");'],[0,'\t\t\ttooltip.appendChild(document.createTextNode(OpenLayers.i18n(\'KEY_ZOOMOUT_TOOLTIP\')));'],[0,'\t\t\ttooltip.role = \'tooltip\';'],[0,'\t\t\tzoomOut.appendChild(tooltip);'],[0,'\t\t\tzoomOut.appendChild(document.createTextNode(this.zoomOutText));'],[0,'\t\t\tzoomOut.className = \"olControlZoomOut\";'],[0,'\t\t\tel.appendChild(zoomOut);'],[-1,'\t\t}'],[0,'\t\tOpenLayers.Element.addClass(zoomOut, \"olButton\");'],[0,'\t\tOpenLayers.Element.addClass(zoomOut, \"hasTooltip\");'],[0,'\t\treturn {'],[-1,'\t\t\tzoomIn : zoomIn,'],[-1,'\t\t\tzoomOut : zoomOut'],[-1,'\t\t};'],[-1,'\t},'],[-1,'\tCLASS_NAME : \"ZoomControl\"'],[-1,'});']] |
||||
src/ZoekFormulier.js | 19 | 1 | 5 % |
|
[[-1,'\/*'],[-1,' * Copyright (c) 2013, Dienst Landelijk Gebied - Ministerie van Economische Zaken'],[-1,' * '],[-1,' * Gepubliceerd onder de BSD 2-clause licentie, '],[-1,' * zie https:\/\/github.com\/MinELenI\/CBSviewer\/blob\/master\/LICENSE.md voor de volledige licentie. '],[-1,' *\/'],[-1,'\/**'],[-1,' * Functies voor het zoekformulier zoals gedefinieerd in zoekformulier.jsp.'],[-1,' * '],[-1,' * @fileoverview zorgt voor afhandeling van het adreszoek formulier.'],[-1,' * @author mprins'],[-1,' * @requires jQuery'],[-1,' * @requires jQueryUI'],[-1,' * @requires zoekformulier.jsp'],[-1,' * @requires Viewer.js'],[-1,' * @class {ZoekFormulier}'],[-1,' *\/'],[1,'var ZoekFormulier = {'],[-1,'\t\/**'],[-1,'\t * Aanhaken van autocomplete handler aan input veld van zoek formulier.'],[-1,'\t * '],[-1,'\t * @constructor'],[-1,'\t *\/'],[-1,'\tinit : function(viewer) {'],[-1,'\t\t\/\/ de zoekknop, method en action van formulier verwijderen, die hebben geen functie meer in de RIA'],[0,'\t\tjQuery(\'input:image\').attr(\"disabled\", true);'],[0,'\t\tjQuery(\'#zoekFormulier\').removeAttr(\'action\');'],[0,'\t\tjQuery(\'#zoekFormulier\').removeAttr(\'method\');'],[0,'\t\tjQuery(\'#adres\').keypress(function (e){'],[0,'\t\t\tif (e.which == 13){'],[0,'\t\t\t\tjQuery(\'#searchbutton\').focus().click();'],[0,'\t\t\t\treturn false;'],[-1,'\t\t\t}'],[-1,'\t\t});'],[-1,'\t\t\/\/ verborgen velden instellen voor RIA functies'],[0,'\t\tjQuery(\'#zoekFormulier\').find(\'input[name=\"coreonly\"]\').val(\'false\');'],[0,'\t\tjQuery(\'#zoekFormulier\').find(\'input[name=\"forward\"]\').val(\'false\');'],[-1,''],[-1,'\t\t\/\/ aanhaken auto complete'],[0,'\t\tjQuery(\'#adres\').autocomplete({'],[-1,'\t\t\tsource : function(request, response) {'],[-1,'\t\t\t\tjQuery.ajax({'],[-1,'\t\t\t\t\turl : \'adres\','],[-1,'\t\t\t\t\tdata : {'],[-1,'\t\t\t\t\t\tadres : request.term,'],[-1,'\t\t\t\t\t\tforward : false,'],[-1,'\t\t\t\t\t\tformat : \'json\','],[-1,'\t\t\t\t\t\tcoreonly : false'],[-1,'\t\t\t\t\t},'],[-1,'\t\t\t\t\tdataType : \'json\''],[0,'\t\t\t\t}).success(function(data) {'],[0,'\t\t\t\t\tvar results = jQuery.map(data, function(val, i) {'],[0,'\t\t\t\t\t\treturn {'],[-1,'\t\t\t\t\t\t\tlabel : val.addressString,'],[-1,'\t\t\t\t\t\t\tx : val.xCoord,'],[-1,'\t\t\t\t\t\t\ty : val.yCoord,'],[-1,'\t\t\t\t\t\t\tr : val.radius'],[-1,'\t\t\t\t\t\t};'],[-1,'\t\t\t\t\t});'],[0,'\t\t\t\t\tresponse(results);'],[-1,'\t\t\t\t});'],[-1,'\t\t\t},'],[-1,'\t\t\tselect : function(event, ui) {'],[-1,'\t\t\t\t\/\/ console.debug(ui.item ? \"Gekozen: \" + ui.item.value + \"'],[-1,'\t\t\t\t\/\/ (x,y,r) :\" + ui.item.x + \",\"'],[-1,'\t\t\t\t\/\/ + ui.item.y + \",\" + ui.item.r : \"Niets gekozen, de input was'],[-1,'\t\t\t\t\/\/ \" + this.value);'],[0,'\t\t\t\tif (ui.item) {'],[0,'\t\t\t\t\tViewer.zoomTo(ui.item.x, ui.item.y, ui.item.r, true);'],[-1,'\t\t\t\t\t\/\/Viewer.featureInfo(ui.item.x, ui.item.y);'],[-1,'\t\t\t\t}'],[-1,'\t\t\t},'],[-1,'\t\t\t\/\/ alleen items uit de lijst mogen ingevuld\/gekozen worden'],[-1,'\t\t\tchange : function(event, ui) {'],[0,'\t\t\t\tif (!ui.item) {'],[0,'\t\t\t\t\tjQuery(this).val(\'\');'],[-1,'\t\t\t\t}'],[-1,'\t\t\t},'],[-1,'\t\t\tminLength : 4 \/* characters *\/,'],[-1,'\t\t\tdelay : 400 \/* milliseconds *\/,'],[-1,'\t\t\tautoFocus : false'],[-1,'\t\t});'],[-1,'\t}'],[-1,'};']] |
||||
src\test\js\lib/OpenLayers-test.js | 8179 | 421 | 5 % |
|
[[-1,'\/*'],[-1,''],[-1,' OpenLayers.js -- OpenLayers Map Viewer Library'],[-1,''],[-1,' Copyright (c) 2006-2013 by OpenLayers Contributors'],[-1,' Published under the 2-clause BSD license.'],[-1,' 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.'],[-1,''],[-1,' Includes compressed code under the following licenses:'],[-1,''],[-1,' (For uncompressed versions of the code used, please see the'],[-1,' OpenLayers Github repository: <https:\/\/github.com\/openlayers\/openlayers>)'],[-1,''],[-1,'*\/'],[-1,''],[-1,'\/**'],[-1,' * Contains XMLHttpRequest.js <http:\/\/code.google.com\/p\/xmlhttprequest\/>'],[-1,' * Copyright 2007 Sergey Ilinsky (http:\/\/www.ilinsky.com)'],[-1,' *'],[-1,' * Licensed under the Apache License, Version 2.0 (the \"License\");'],[-1,' * you may not use this file except in compliance with the License.'],[-1,' * You may obtain a copy of the License at'],[-1,' * http:\/\/www.apache.org\/licenses\/LICENSE-2.0'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * OpenLayers.Util.pagePosition is based on Yahoo\'s getXY method, which is'],[-1,' * Copyright (c) 2006, Yahoo! Inc.'],[-1,' * All rights reserved.'],[-1,' * '],[-1,' * Redistribution and use of this software in source and binary forms, with or'],[-1,' * without modification, are permitted provided that the following conditions'],[-1,' * are met:'],[-1,' * '],[-1,' * * Redistributions of source code must retain the above copyright notice,'],[-1,' * this list of conditions and the following disclaimer.'],[-1,' * '],[-1,' * * Redistributions in binary form must reproduce the above copyright notice,'],[-1,' * this list of conditions and the following disclaimer in the documentation'],[-1,' * and\/or other materials provided with the distribution.'],[-1,' * '],[-1,' * * Neither the name of Yahoo! Inc. nor the names of its contributors may be'],[-1,' * used to endorse or promote products derived from this software without'],[-1,' * specific prior written permission of Yahoo! Inc.'],[-1,' * '],[-1,' * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"'],[-1,' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE'],[-1,' * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE'],[-1,' * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE'],[-1,' * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR'],[-1,' * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF'],[-1,' * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS'],[-1,' * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN'],[-1,' * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)'],[-1,' * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE '],[-1,' * POSSIBILITY OF SUCH DAMAGE.'],[-1,' *\/'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/SingleFile.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[1,'var OpenLayers = {'],[-1,' \/**'],[-1,' * Constant: VERSION_NUMBER'],[-1,' *\/'],[-1,' VERSION_NUMBER: \"Release 2.14 dev\",'],[-1,''],[-1,' \/**'],[-1,' * Constant: singleFile'],[-1,' * TODO: remove this in 3.0 when we stop supporting build profiles that'],[-1,' * include OpenLayers.js'],[-1,' *\/'],[-1,' singleFile: true,'],[-1,''],[-1,' \/**'],[-1,' * Method: _getScriptLocation'],[-1,' * Return the path to this script. This is also implemented in'],[-1,' * OpenLayers.js'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} Path to this script'],[-1,' *\/'],[-1,' _getScriptLocation: (function() {'],[1,' var r = new RegExp(\"(^|(.*?\\\\\/))(OpenLayers[^\\\\\/]*?\\\\.js)(\\\\?|$)\"),'],[-1,' s = document.getElementsByTagName(\'script\'),'],[-1,' src, m, l = \"\";'],[1,' for(var i=0, len=s.length; i<len; i++) {'],[6,' src = s[i].getAttribute(\'src\');'],[6,' if(src) {'],[3,' m = src.match(r);'],[3,' if(m) {'],[1,' l = m[1];'],[1,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[1,' return (function() { return l; });'],[-1,' })(),'],[-1,' '],[-1,' \/**'],[-1,' * Property: ImgPath'],[-1,' * {String} Set this to the path where control images are stored, a path '],[-1,' * given here must end with a slash. If set to \'\' (which is the default) '],[-1,' * OpenLayers will use its script location + \"img\/\".'],[-1,' * '],[-1,' * You will need to set this property when you have a singlefile build of '],[-1,' * OpenLayers that either is not named \"OpenLayers.js\" or if you move'],[-1,' * the file in a way such that the image directory cannot be derived from '],[-1,' * the script location.'],[-1,' * '],[-1,' * If your custom OpenLayers build is named \"my-custom-ol.js\" and the images'],[-1,' * of OpenLayers are in a folder \"\/resources\/external\/images\/ol\" a correct'],[-1,' * way of including OpenLayers in your HTML would be:'],[-1,' * '],[-1,' * (code)'],[-1,' * <script src=\"\/path\/to\/my-custom-ol.js\" type=\"text\/javascript\"><\/script>'],[-1,' * <script type=\"text\/javascript\">'],[-1,' * \/\/ tell OpenLayers where the control images are'],[-1,' * \/\/ remember the trailing slash'],[-1,' * OpenLayers.ImgPath = \"\/resources\/external\/images\/ol\/\";'],[-1,' * <\/script>'],[-1,' * (end code)'],[-1,' * '],[-1,' * Please remember that when your OpenLayers script is not named '],[-1,' * \"OpenLayers.js\" you will have to make sure that the default theme is '],[-1,' * loaded into the page by including an appropriate <link>-tag, '],[-1,' * e.g.:'],[-1,' * '],[-1,' * (code)'],[-1,' * <link rel=\"stylesheet\" href=\"\/path\/to\/default\/style.css\" type=\"text\/css\">'],[-1,' * (end code)'],[-1,' *\/'],[-1,' ImgPath : \'\''],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/* '],[-1,' * @requires OpenLayers\/BaseTypes.js'],[-1,' * @requires OpenLayers\/Lang\/en.js'],[-1,' * @requires OpenLayers\/Console.js'],[-1,' *\/'],[-1,' '],[-1,'\/*'],[-1,' * TODO: In 3.0, we will stop supporting build profiles that include'],[-1,' * OpenLayers.js. This means we will not need the singleFile and scriptFile'],[-1,' * variables, because we don\'t have to handle the singleFile case any more.'],[-1,' *\/'],[-1,''],[1,'(function() {'],[-1,' \/**'],[-1,' * Before creating the OpenLayers namespace, check to see if'],[-1,' * OpenLayers.singleFile is true. This occurs if the'],[-1,' * OpenLayers\/SingleFile.js script is included before this one - as is the'],[-1,' * case with old single file build profiles that included both'],[-1,' * OpenLayers.js and OpenLayers\/SingleFile.js.'],[-1,' *\/'],[1,' var singleFile = (typeof OpenLayers == \"object\" && OpenLayers.singleFile);'],[-1,' '],[-1,' \/**'],[-1,' * Relative path of this script.'],[-1,' *\/'],[1,' var scriptName = (!singleFile) ? \"lib\/OpenLayers.js\" : \"OpenLayers.js\";'],[-1,''],[-1,' \/*'],[-1,' * If window.OpenLayers isn\'t set when this script (OpenLayers.js) is'],[-1,' * evaluated (and if singleFile is false) then this script will load'],[-1,' * *all* OpenLayers scripts. If window.OpenLayers is set to an array'],[-1,' * then this script will attempt to load scripts for each string of'],[-1,' * the array, using the string as the src of the script.'],[-1,' *'],[-1,' * Example:'],[-1,' * (code)'],[-1,' * <script type=\"text\/javascript\">'],[-1,' * window.OpenLayers = ['],[-1,' * \"OpenLayers\/Util.js\",'],[-1,' * \"OpenLayers\/BaseTypes.js\"'],[-1,' * ];'],[-1,' * <\/script>'],[-1,' * <script type=\"text\/javascript\" src=\"..\/lib\/OpenLayers.js\"><\/script>'],[-1,' * (end)'],[-1,' * In this example OpenLayers.js will load Util.js and BaseTypes.js only.'],[-1,' *\/'],[1,' var jsFiles = window.OpenLayers;'],[-1,''],[-1,' \/**'],[-1,' * Namespace: OpenLayers'],[-1,' * The OpenLayers object provides a namespace for all things OpenLayers'],[-1,' *\/'],[1,' window.OpenLayers = {'],[-1,' \/**'],[-1,' * Method: _getScriptLocation'],[-1,' * Return the path to this script. This is also implemented in'],[-1,' * OpenLayers\/SingleFile.js'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} Path to this script'],[-1,' *\/'],[-1,' _getScriptLocation: (function() {'],[1,' var r = new RegExp(\"(^|(.*?\\\\\/))(\" + scriptName + \")(\\\\?|$)\"),'],[-1,' s = document.getElementsByTagName(\'script\'),'],[-1,' src, m, l = \"\";'],[1,' for(var i=0, len=s.length; i<len; i++) {'],[6,' src = s[i].getAttribute(\'src\');'],[6,' if(src) {'],[3,' m = src.match(r);'],[3,' if(m) {'],[0,' l = m[1];'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[1,' return (function() { return l; });'],[-1,' })(),'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: ImgPath'],[-1,' * {String} Set this to the path where control images are stored, a path '],[-1,' * given here must end with a slash. If set to \'\' (which is the default) '],[-1,' * OpenLayers will use its script location + \"img\/\".'],[-1,' * '],[-1,' * You will need to set this property when you have a singlefile build of '],[-1,' * OpenLayers that either is not named \"OpenLayers.js\" or if you move'],[-1,' * the file in a way such that the image directory cannot be derived from '],[-1,' * the script location.'],[-1,' * '],[-1,' * If your custom OpenLayers build is named \"my-custom-ol.js\" and the images'],[-1,' * of OpenLayers are in a folder \"\/resources\/external\/images\/ol\" a correct'],[-1,' * way of including OpenLayers in your HTML would be:'],[-1,' * '],[-1,' * (code)'],[-1,' * <script src=\"\/path\/to\/my-custom-ol.js\" type=\"text\/javascript\"><\/script>'],[-1,' * <script type=\"text\/javascript\">'],[-1,' * \/\/ tell OpenLayers where the control images are'],[-1,' * \/\/ remember the trailing slash'],[-1,' * OpenLayers.ImgPath = \"\/resources\/external\/images\/ol\/\";'],[-1,' * <\/script>'],[-1,' * (end code)'],[-1,' * '],[-1,' * Please remember that when your OpenLayers script is not named '],[-1,' * \"OpenLayers.js\" you will have to make sure that the default theme is '],[-1,' * loaded into the page by including an appropriate <link>-tag, '],[-1,' * e.g.:'],[-1,' * '],[-1,' * (code)'],[-1,' * <link rel=\"stylesheet\" href=\"\/path\/to\/default\/style.css\" type=\"text\/css\">'],[-1,' * (end code)'],[-1,' *\/'],[-1,' ImgPath : \'\''],[-1,' };'],[-1,''],[-1,' \/**'],[-1,' * OpenLayers.singleFile is a flag indicating this file is being included'],[-1,' * in a Single File Library build of the OpenLayers Library.'],[-1,' * '],[-1,' * When we are *not* part of a SFL build we dynamically include the'],[-1,' * OpenLayers library code.'],[-1,' * '],[-1,' * When we *are* part of a SFL build we do not dynamically include the '],[-1,' * OpenLayers library code as it will be appended at the end of this file.'],[-1,' *\/'],[1,' if(!singleFile) {'],[0,' if (!jsFiles) {'],[0,' jsFiles = ['],[-1,' \"OpenLayers\/BaseTypes\/Class.js\",'],[-1,' \"OpenLayers\/Util.js\",'],[-1,' \"OpenLayers\/Util\/vendorPrefix.js\",'],[-1,' \"OpenLayers\/Animation.js\",'],[-1,' \"OpenLayers\/BaseTypes.js\",'],[-1,' \"OpenLayers\/BaseTypes\/Bounds.js\",'],[-1,' \"OpenLayers\/BaseTypes\/Date.js\",'],[-1,' \"OpenLayers\/BaseTypes\/Element.js\",'],[-1,' \"OpenLayers\/BaseTypes\/LonLat.js\",'],[-1,' \"OpenLayers\/BaseTypes\/Pixel.js\",'],[-1,' \"OpenLayers\/BaseTypes\/Size.js\",'],[-1,' \"OpenLayers\/Console.js\",'],[-1,' \"OpenLayers\/Tween.js\",'],[-1,' \"OpenLayers\/Kinetic.js\",'],[-1,' \"OpenLayers\/Events.js\",'],[-1,' \"OpenLayers\/Events\/buttonclick.js\",'],[-1,' \"OpenLayers\/Events\/featureclick.js\",'],[-1,' \"OpenLayers\/Request.js\",'],[-1,' \"OpenLayers\/Request\/XMLHttpRequest.js\",'],[-1,' \"OpenLayers\/Projection.js\",'],[-1,' \"OpenLayers\/Map.js\",'],[-1,' \"OpenLayers\/Layer.js\",'],[-1,' \"OpenLayers\/Icon.js\",'],[-1,' \"OpenLayers\/Marker.js\",'],[-1,' \"OpenLayers\/Marker\/Box.js\",'],[-1,' \"OpenLayers\/Popup.js\",'],[-1,' \"OpenLayers\/Tile.js\",'],[-1,' \"OpenLayers\/Tile\/Image.js\",'],[-1,' \"OpenLayers\/Tile\/Image\/IFrame.js\",'],[-1,' \"OpenLayers\/Tile\/UTFGrid.js\",'],[-1,' \"OpenLayers\/Layer\/Image.js\",'],[-1,' \"OpenLayers\/Layer\/SphericalMercator.js\",'],[-1,' \"OpenLayers\/Layer\/EventPane.js\",'],[-1,' \"OpenLayers\/Layer\/FixedZoomLevels.js\",'],[-1,' \"OpenLayers\/Layer\/Google.js\",'],[-1,' \"OpenLayers\/Layer\/Google\/v3.js\",'],[-1,' \"OpenLayers\/Layer\/HTTPRequest.js\",'],[-1,' \"OpenLayers\/Layer\/Grid.js\",'],[-1,' \"OpenLayers\/Layer\/MapGuide.js\",'],[-1,' \"OpenLayers\/Layer\/MapServer.js\",'],[-1,' \"OpenLayers\/Layer\/KaMap.js\",'],[-1,' \"OpenLayers\/Layer\/KaMapCache.js\",'],[-1,' \"OpenLayers\/Layer\/Markers.js\",'],[-1,' \"OpenLayers\/Layer\/Text.js\",'],[-1,' \"OpenLayers\/Layer\/WorldWind.js\",'],[-1,' \"OpenLayers\/Layer\/ArcGIS93Rest.js\",'],[-1,' \"OpenLayers\/Layer\/WMS.js\",'],[-1,' \"OpenLayers\/Layer\/WMTS.js\",'],[-1,' \"OpenLayers\/Layer\/ArcIMS.js\",'],[-1,' \"OpenLayers\/Layer\/GeoRSS.js\",'],[-1,' \"OpenLayers\/Layer\/Boxes.js\",'],[-1,' \"OpenLayers\/Layer\/XYZ.js\",'],[-1,' \"OpenLayers\/Layer\/UTFGrid.js\",'],[-1,' \"OpenLayers\/Layer\/OSM.js\",'],[-1,' \"OpenLayers\/Layer\/Bing.js\",'],[-1,' \"OpenLayers\/Layer\/TMS.js\",'],[-1,' \"OpenLayers\/Layer\/TileCache.js\",'],[-1,' \"OpenLayers\/Layer\/Zoomify.js\",'],[-1,' \"OpenLayers\/Layer\/ArcGISCache.js\",'],[-1,' \"OpenLayers\/Popup\/Anchored.js\",'],[-1,' \"OpenLayers\/Popup\/Framed.js\",'],[-1,' \"OpenLayers\/Popup\/FramedCloud.js\",'],[-1,' \"OpenLayers\/Feature.js\",'],[-1,' \"OpenLayers\/Feature\/Vector.js\",'],[-1,' \"OpenLayers\/Handler.js\",'],[-1,' \"OpenLayers\/Handler\/Click.js\",'],[-1,' \"OpenLayers\/Handler\/Hover.js\",'],[-1,' \"OpenLayers\/Handler\/Point.js\",'],[-1,' \"OpenLayers\/Handler\/Path.js\",'],[-1,' \"OpenLayers\/Handler\/Polygon.js\",'],[-1,' \"OpenLayers\/Handler\/Feature.js\",'],[-1,' \"OpenLayers\/Handler\/Drag.js\",'],[-1,' \"OpenLayers\/Handler\/Pinch.js\",'],[-1,' \"OpenLayers\/Handler\/RegularPolygon.js\",'],[-1,' \"OpenLayers\/Handler\/Box.js\",'],[-1,' \"OpenLayers\/Handler\/MouseWheel.js\",'],[-1,' \"OpenLayers\/Handler\/Keyboard.js\",'],[-1,' \"OpenLayers\/Control.js\",'],[-1,' \"OpenLayers\/Control\/Attribution.js\",'],[-1,' \"OpenLayers\/Control\/Button.js\",'],[-1,' \"OpenLayers\/Control\/CacheRead.js\",'],[-1,' \"OpenLayers\/Control\/CacheWrite.js\",'],[-1,' \"OpenLayers\/Control\/ZoomBox.js\",'],[-1,' \"OpenLayers\/Control\/ZoomToMaxExtent.js\",'],[-1,' \"OpenLayers\/Control\/DragPan.js\",'],[-1,' \"OpenLayers\/Control\/Navigation.js\",'],[-1,' \"OpenLayers\/Control\/PinchZoom.js\",'],[-1,' \"OpenLayers\/Control\/TouchNavigation.js\",'],[-1,' \"OpenLayers\/Control\/MousePosition.js\",'],[-1,' \"OpenLayers\/Control\/OverviewMap.js\",'],[-1,' \"OpenLayers\/Control\/KeyboardDefaults.js\",'],[-1,' \"OpenLayers\/Control\/PanZoom.js\",'],[-1,' \"OpenLayers\/Control\/PanZoomBar.js\",'],[-1,' \"OpenLayers\/Control\/ArgParser.js\",'],[-1,' \"OpenLayers\/Control\/Permalink.js\",'],[-1,' \"OpenLayers\/Control\/Scale.js\",'],[-1,' \"OpenLayers\/Control\/ScaleLine.js\",'],[-1,' \"OpenLayers\/Control\/Snapping.js\",'],[-1,' \"OpenLayers\/Control\/Split.js\",'],[-1,' \"OpenLayers\/Control\/LayerSwitcher.js\",'],[-1,' \"OpenLayers\/Control\/DrawFeature.js\",'],[-1,' \"OpenLayers\/Control\/DragFeature.js\",'],[-1,' \"OpenLayers\/Control\/ModifyFeature.js\",'],[-1,' \"OpenLayers\/Control\/ModifyFeature\/BySegment.js\",'],[-1,' \"OpenLayers\/Control\/Panel.js\",'],[-1,' \"OpenLayers\/Control\/SelectFeature.js\",'],[-1,' \"OpenLayers\/Control\/NavigationHistory.js\",'],[-1,' \"OpenLayers\/Control\/Measure.js\",'],[-1,' \"OpenLayers\/Control\/WMSGetFeatureInfo.js\",'],[-1,' \"OpenLayers\/Control\/WMTSGetFeatureInfo.js\",'],[-1,' \"OpenLayers\/Control\/Graticule.js\",'],[-1,' \"OpenLayers\/Control\/TransformFeature.js\",'],[-1,' \"OpenLayers\/Control\/UTFGrid.js\",'],[-1,' \"OpenLayers\/Control\/SLDSelect.js\",'],[-1,' \"OpenLayers\/Control\/Zoom.js\",'],[-1,' \"OpenLayers\/Control\/TextButtonPanel.js\",'],[-1,' \"OpenLayers\/Geometry.js\",'],[-1,' \"OpenLayers\/Geometry\/Collection.js\",'],[-1,' \"OpenLayers\/Geometry\/Point.js\",'],[-1,' \"OpenLayers\/Geometry\/MultiPoint.js\",'],[-1,' \"OpenLayers\/Geometry\/Curve.js\",'],[-1,' \"OpenLayers\/Geometry\/LineString.js\",'],[-1,' \"OpenLayers\/Geometry\/LinearRing.js\",'],[-1,' \"OpenLayers\/Geometry\/Polygon.js\",'],[-1,' \"OpenLayers\/Geometry\/MultiLineString.js\",'],[-1,' \"OpenLayers\/Geometry\/MultiPolygon.js\",'],[-1,' \"OpenLayers\/Renderer.js\",'],[-1,' \"OpenLayers\/Renderer\/Elements.js\",'],[-1,' \"OpenLayers\/Renderer\/SVG.js\",'],[-1,' \"OpenLayers\/Renderer\/Canvas.js\",'],[-1,' \"OpenLayers\/Renderer\/VML.js\",'],[-1,' \"OpenLayers\/Layer\/Vector.js\",'],[-1,' \"OpenLayers\/Layer\/PointGrid.js\",'],[-1,' \"OpenLayers\/Layer\/Vector\/RootContainer.js\",'],[-1,' \"OpenLayers\/Strategy.js\",'],[-1,' \"OpenLayers\/Strategy\/Filter.js\",'],[-1,' \"OpenLayers\/Strategy\/Fixed.js\",'],[-1,' \"OpenLayers\/Strategy\/Cluster.js\",'],[-1,' \"OpenLayers\/Strategy\/Paging.js\",'],[-1,' \"OpenLayers\/Strategy\/BBOX.js\",'],[-1,' \"OpenLayers\/Strategy\/Save.js\",'],[-1,' \"OpenLayers\/Strategy\/Refresh.js\",'],[-1,' \"OpenLayers\/Filter.js\",'],[-1,' \"OpenLayers\/Filter\/FeatureId.js\",'],[-1,' \"OpenLayers\/Filter\/Logical.js\",'],[-1,' \"OpenLayers\/Filter\/Comparison.js\",'],[-1,' \"OpenLayers\/Filter\/Spatial.js\",'],[-1,' \"OpenLayers\/Filter\/Function.js\", '],[-1,' \"OpenLayers\/Protocol.js\",'],[-1,' \"OpenLayers\/Protocol\/HTTP.js\",'],[-1,' \"OpenLayers\/Protocol\/WFS.js\",'],[-1,' \"OpenLayers\/Protocol\/WFS\/v1.js\",'],[-1,' \"OpenLayers\/Protocol\/WFS\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Protocol\/WFS\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Protocol\/WFS\/v2_0_0.js\",'],[-1,' \"OpenLayers\/Protocol\/CSW.js\", '],[-1,' \"OpenLayers\/Protocol\/CSW\/v2_0_2.js\",'],[-1,' \"OpenLayers\/Protocol\/Script.js\",'],[-1,' \"OpenLayers\/Protocol\/SOS.js\",'],[-1,' \"OpenLayers\/Protocol\/SOS\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Layer\/PointTrack.js\",'],[-1,' \"OpenLayers\/Style.js\",'],[-1,' \"OpenLayers\/Style2.js\",'],[-1,' \"OpenLayers\/StyleMap.js\",'],[-1,' \"OpenLayers\/Rule.js\",'],[-1,' \"OpenLayers\/Format.js\",'],[-1,' \"OpenLayers\/Format\/QueryStringFilter.js\",'],[-1,' \"OpenLayers\/Format\/XML.js\",'],[-1,' \"OpenLayers\/Format\/XML\/VersionedOGC.js\",'],[-1,' \"OpenLayers\/Format\/Context.js\",'],[-1,' \"OpenLayers\/Format\/ArcXML.js\",'],[-1,' \"OpenLayers\/Format\/ArcXML\/Features.js\",'],[-1,' \"OpenLayers\/Format\/GML.js\",'],[-1,' \"OpenLayers\/Format\/GML\/Base.js\",'],[-1,' \"OpenLayers\/Format\/GML\/v2.js\",'],[-1,' \"OpenLayers\/Format\/GML\/v3.js\",'],[-1,' \"OpenLayers\/Format\/Atom.js\",'],[-1,' \"OpenLayers\/Format\/EncodedPolyline.js\",'],[-1,' \"OpenLayers\/Format\/KML.js\",'],[-1,' \"OpenLayers\/Format\/GeoRSS.js\",'],[-1,' \"OpenLayers\/Format\/WFS.js\",'],[-1,' \"OpenLayers\/Format\/OWSCommon.js\",'],[-1,' \"OpenLayers\/Format\/OWSCommon\/v1.js\",'],[-1,' \"OpenLayers\/Format\/OWSCommon\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/OWSCommon\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/WCSCapabilities.js\",'],[-1,' \"OpenLayers\/Format\/WCSCapabilities\/v1.js\",'],[-1,' \"OpenLayers\/Format\/WCSCapabilities\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WCSCapabilities\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/WCSDescribeCoverage.js\",'],[-1,' \"OpenLayers\/Format\/WCSDescribeCoverage\/v1.js\",'],[-1,' \"OpenLayers\/Format\/WCSDescribeCoverage\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WCSDescribeCoverage\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/WFSCapabilities.js\",'],[-1,' \"OpenLayers\/Format\/WFSCapabilities\/v1.js\",'],[-1,' \"OpenLayers\/Format\/WFSCapabilities\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WFSCapabilities\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/WFSCapabilities\/v2_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WFSDescribeFeatureType.js\",'],[-1,' \"OpenLayers\/Format\/WMSDescribeLayer.js\",'],[-1,' \"OpenLayers\/Format\/WMSDescribeLayer\/v1_1.js\",'],[-1,' \"OpenLayers\/Format\/WKT.js\",'],[-1,' \"OpenLayers\/Format\/CQL.js\",'],[-1,' \"OpenLayers\/Format\/OSM.js\",'],[-1,' \"OpenLayers\/Format\/GPX.js\",'],[-1,' \"OpenLayers\/Format\/Filter.js\",'],[-1,' \"OpenLayers\/Format\/Filter\/v1.js\",'],[-1,' \"OpenLayers\/Format\/Filter\/v2.js\",'],[-1,' \"OpenLayers\/Format\/Filter\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/Filter\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/Filter\/v2_0_0.js\",'],[-1,' \"OpenLayers\/Format\/SLD.js\",'],[-1,' \"OpenLayers\/Format\/SLD\/v1.js\",'],[-1,' \"OpenLayers\/Format\/SLD\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/SLD\/v1_0_0_GeoServer.js\",'],[-1,' \"OpenLayers\/Format\/OWSCommon.js\",'],[-1,' \"OpenLayers\/Format\/OWSCommon\/v1.js\",'],[-1,' \"OpenLayers\/Format\/OWSCommon\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/OWSCommon\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/CSWGetDomain.js\",'],[-1,' \"OpenLayers\/Format\/CSWGetDomain\/v2_0_2.js\",'],[-1,' \"OpenLayers\/Format\/CSWGetRecords.js\",'],[-1,' \"OpenLayers\/Format\/CSWGetRecords\/v2_0_2.js\",'],[-1,' \"OpenLayers\/Format\/WFST.js\",'],[-1,' \"OpenLayers\/Format\/WFST\/v1.js\",'],[-1,' \"OpenLayers\/Format\/WFST\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WFST\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/WFST\/v2_0_0.js\",'],[-1,' \"OpenLayers\/Format\/Text.js\",'],[-1,' \"OpenLayers\/Format\/JSON.js\",'],[-1,' \"OpenLayers\/Format\/GeoJSON.js\",'],[-1,' \"OpenLayers\/Format\/WMC.js\",'],[-1,' \"OpenLayers\/Format\/WMC\/v1.js\",'],[-1,' \"OpenLayers\/Format\/WMC\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WMC\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/WCSGetCoverage.js\",'],[-1,' \"OpenLayers\/Format\/WMSCapabilities.js\",'],[-1,' \"OpenLayers\/Format\/WMSCapabilities\/v1.js\",'],[-1,' \"OpenLayers\/Format\/WMSCapabilities\/v1_1.js\",'],[-1,' \"OpenLayers\/Format\/WMSCapabilities\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/WMSCapabilities\/v1_1_1.js\",'],[-1,' \"OpenLayers\/Format\/WMSCapabilities\/v1_3.js\",'],[-1,' \"OpenLayers\/Format\/WMSCapabilities\/v1_3_0.js\",'],[-1,' \"OpenLayers\/Format\/WMSCapabilities\/v1_1_1_WMSC.js\",'],[-1,' \"OpenLayers\/Format\/WMSGetFeatureInfo.js\",'],[-1,' \"OpenLayers\/Format\/SOSCapabilities.js\",'],[-1,' \"OpenLayers\/Format\/SOSCapabilities\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/SOSGetFeatureOfInterest.js\",'],[-1,' \"OpenLayers\/Format\/SOSGetObservation.js\",'],[-1,' \"OpenLayers\/Format\/OWSContext.js\",'],[-1,' \"OpenLayers\/Format\/OWSContext\/v0_3_1.js\",'],[-1,' \"OpenLayers\/Format\/WMTSCapabilities.js\",'],[-1,' \"OpenLayers\/Format\/WMTSCapabilities\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WPSCapabilities.js\",'],[-1,' \"OpenLayers\/Format\/WPSCapabilities\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WPSDescribeProcess.js\",'],[-1,' \"OpenLayers\/Format\/WPSDescribeProcess\/v1_0_0.js\",'],[-1,' \"OpenLayers\/Format\/WPSExecute.js\",'],[-1,' \"OpenLayers\/Format\/XLS.js\",'],[-1,' \"OpenLayers\/Format\/XLS\/v1.js\",'],[-1,' \"OpenLayers\/Format\/XLS\/v1_1_0.js\",'],[-1,' \"OpenLayers\/Format\/OGCExceptionReport.js\",'],[-1,' \"OpenLayers\/Format\/TMSCapabilities.js\",'],[-1,' \"OpenLayers\/Control\/GetFeature.js\",'],[-1,' \"OpenLayers\/Control\/NavToolbar.js\",'],[-1,' \"OpenLayers\/Control\/PanPanel.js\",'],[-1,' \"OpenLayers\/Control\/Pan.js\",'],[-1,' \"OpenLayers\/Control\/ZoomIn.js\",'],[-1,' \"OpenLayers\/Control\/ZoomOut.js\",'],[-1,' \"OpenLayers\/Control\/ZoomPanel.js\",'],[-1,' \"OpenLayers\/Control\/EditingToolbar.js\",'],[-1,' \"OpenLayers\/Control\/Geolocate.js\",'],[-1,' \"OpenLayers\/Symbolizer.js\",'],[-1,' \"OpenLayers\/Symbolizer\/Point.js\",'],[-1,' \"OpenLayers\/Symbolizer\/Line.js\",'],[-1,' \"OpenLayers\/Symbolizer\/Polygon.js\",'],[-1,' \"OpenLayers\/Symbolizer\/Text.js\",'],[-1,' \"OpenLayers\/Symbolizer\/Raster.js\",'],[-1,' \"OpenLayers\/Lang.js\",'],[-1,' \"OpenLayers\/Lang\/en.js\",'],[-1,' \"OpenLayers\/Spherical.js\",'],[-1,' \"OpenLayers\/TileManager.js\",'],[-1,' \"OpenLayers\/WPSClient.js\",'],[-1,' \"OpenLayers\/WPSProcess.js\"'],[-1,' ]; \/\/ etc.'],[-1,' }'],[-1,''],[-1,' \/\/ use \"parser-inserted scripts\" for guaranteed execution order'],[-1,' \/\/ http:\/\/hsivonen.iki.fi\/script-execution\/'],[0,' var scriptTags = new Array(jsFiles.length);'],[0,' var host = OpenLayers._getScriptLocation() + \"lib\/\";'],[0,' for (var i=0, len=jsFiles.length; i<len; i++) {'],[0,' scriptTags[i] = \"<script src=\'\" + host + jsFiles[i] +'],[-1,' \"\'><\/script>\"; '],[-1,' }'],[0,' if (scriptTags.length > 0) {'],[0,' document.write(scriptTags.join(\"\"));'],[-1,' }'],[-1,' }'],[-1,'})();'],[-1,''],[-1,'\/**'],[-1,' * Constant: VERSION_NUMBER'],[-1,' *'],[-1,' * This constant identifies the version of OpenLayers.'],[-1,' *'],[-1,' * When asking questions or reporting issues, make sure to include the output of'],[-1,' * OpenLayers.VERSION_NUMBER in the question or issue-description.'],[-1,' *\/'],[1,'OpenLayers.VERSION_NUMBER=\"Release 2.14 dev\";'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/BaseTypes.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/SingleFile.js'],[-1,' *\/'],[-1,''],[-1,'\/** '],[-1,' * Header: OpenLayers Base Types'],[-1,' * OpenLayers custom string, number and function functions are described here.'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.String'],[-1,' * Contains convenience functions for string manipulation.'],[-1,' *\/'],[1,'OpenLayers.String = {'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: startsWith'],[-1,' * Test whether a string starts with another string. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * str - {String} The string to test.'],[-1,' * sub - {String} The substring to look for.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The first string starts with the second.'],[-1,' *\/'],[-1,' startsWith: function(str, sub) {'],[0,' return (str.indexOf(sub) == 0);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: contains'],[-1,' * Test whether a string contains another string.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * str - {String} The string to test.'],[-1,' * sub - {String} The substring to look for.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The first string contains the second.'],[-1,' *\/'],[-1,' contains: function(str, sub) {'],[0,' return (str.indexOf(sub) != -1);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: trim'],[-1,' * Removes leading and trailing whitespace characters from a string.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * str - {String} The (potentially) space padded string. This string is not'],[-1,' * modified.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A trimmed version of the string with all leading and '],[-1,' * trailing spaces removed.'],[-1,' *\/'],[-1,' trim: function(str) {'],[0,' return str.replace(\/^\\s\\s*\/, \'\').replace(\/\\s\\s*$\/, \'\');'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: camelize'],[-1,' * Camel-case a hyphenated string. '],[-1,' * Ex. \"chicken-head\" becomes \"chickenHead\", and'],[-1,' * \"-chicken-head\" becomes \"ChickenHead\".'],[-1,' *'],[-1,' * Parameters:'],[-1,' * str - {String} The string to be camelized. The original is not modified.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The string, camelized'],[-1,' *\/'],[-1,' camelize: function(str) {'],[0,' var oStringList = str.split(\'-\');'],[0,' var camelizedString = oStringList[0];'],[0,' for (var i=1, len=oStringList.length; i<len; i++) {'],[0,' var s = oStringList[i];'],[0,' camelizedString += s.charAt(0).toUpperCase() + s.substring(1);'],[-1,' }'],[0,' return camelizedString;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: format'],[-1,' * Given a string with tokens in the form ${token}, return a string'],[-1,' * with tokens replaced with properties from the given context'],[-1,' * object. Represent a literal \"${\" by doubling it, e.g. \"${${\".'],[-1,' *'],[-1,' * Parameters:'],[-1,' * template - {String} A string with tokens to be replaced. A template'],[-1,' * has the form \"literal ${token}\" where the token will be replaced'],[-1,' * by the value of context[\"token\"].'],[-1,' * context - {Object} An optional object with properties corresponding'],[-1,' * to the tokens in the format string. If no context is sent, the'],[-1,' * window object will be used.'],[-1,' * args - {Array} Optional arguments to pass to any functions found in'],[-1,' * the context. If a context property is a function, the token'],[-1,' * will be replaced by the return from the function called with'],[-1,' * these arguments.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} A string with tokens replaced from the context object.'],[-1,' *\/'],[-1,' format: function(template, context, args) {'],[0,' if(!context) {'],[0,' context = window;'],[-1,' }'],[-1,''],[-1,' \/\/ Example matching: '],[-1,' \/\/ str = ${foo.bar}'],[-1,' \/\/ match = foo.bar'],[0,' var replacer = function(str, match) {'],[0,' var replacement;'],[-1,''],[-1,' \/\/ Loop through all subs. Example: ${a.b.c}'],[-1,' \/\/ 0 -> replacement = context[a];'],[-1,' \/\/ 1 -> replacement = context[a][b];'],[-1,' \/\/ 2 -> replacement = context[a][b][c];'],[0,' var subs = match.split(\/\\.+\/);'],[0,' for (var i=0; i< subs.length; i++) {'],[0,' if (i == 0) {'],[0,' replacement = context;'],[-1,' }'],[0,' if (replacement === undefined) {'],[0,' break;'],[-1,' }'],[0,' replacement = replacement[subs[i]];'],[-1,' }'],[-1,''],[0,' if(typeof replacement == \"function\") {'],[0,' replacement = args ?'],[-1,' replacement.apply(null, args) :'],[-1,' replacement();'],[-1,' }'],[-1,''],[-1,' \/\/ If replacement is undefined, return the string \'undefined\'.'],[-1,' \/\/ This is a workaround for a bugs in browsers not properly '],[-1,' \/\/ dealing with non-participating groups in regular expressions:'],[-1,' \/\/ http:\/\/blog.stevenlevithan.com\/archives\/npcg-javascript'],[0,' if (typeof replacement == \'undefined\') {'],[0,' return \'undefined\';'],[-1,' } else {'],[0,' return replacement; '],[-1,' }'],[-1,' };'],[-1,''],[0,' return template.replace(OpenLayers.String.tokenRegEx, replacer);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Property: tokenRegEx'],[-1,' * Used to find tokens in a string.'],[-1,' * Examples: ${a}, ${a.b.c}, ${a-b}, ${5}'],[-1,' *\/'],[-1,' tokenRegEx: \/\\$\\{([\\w.]+?)\\}\/g,'],[-1,' '],[-1,' \/**'],[-1,' * Property: numberRegEx'],[-1,' * Used to test strings as numbers.'],[-1,' *\/'],[-1,' numberRegEx: \/^([+-]?)(?=\\d|\\.\\d)\\d*(\\.\\d*)?([Ee]([+-]?\\d+))?$\/,'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: isNumeric'],[-1,' * Determine whether a string contains only a numeric value.'],[-1,' *'],[-1,' * Examples:'],[-1,' * (code)'],[-1,' * OpenLayers.String.isNumeric(\"6.02e23\") \/\/ true'],[-1,' * OpenLayers.String.isNumeric(\"12 dozen\") \/\/ false'],[-1,' * OpenLayers.String.isNumeric(\"4\") \/\/ true'],[-1,' * OpenLayers.String.isNumeric(\" 4 \") \/\/ false'],[-1,' * (end)'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} String contains only a number.'],[-1,' *\/'],[-1,' isNumeric: function(value) {'],[0,' return OpenLayers.String.numberRegEx.test(value);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: numericIf'],[-1,' * Converts a string that appears to be a numeric value into a number.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * value - {String}'],[-1,' * trimWhitespace - {Boolean}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number|String} a Number if the passed value is a number, a String'],[-1,' * otherwise. '],[-1,' *\/'],[-1,' numericIf: function(value, trimWhitespace) {'],[0,' var originalValue = value;'],[0,' if (trimWhitespace === true && value != null && value.replace) {'],[0,' value = value.replace(\/^\\s*|\\s*$\/g, \"\");'],[-1,' }'],[0,' return OpenLayers.String.isNumeric(value) ? parseFloat(value) : originalValue;'],[-1,' }'],[-1,''],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Number'],[-1,' * Contains convenience functions for manipulating numbers.'],[-1,' *\/'],[1,'OpenLayers.Number = {'],[-1,''],[-1,' \/**'],[-1,' * Property: decimalSeparator'],[-1,' * Decimal separator to use when formatting numbers.'],[-1,' *\/'],[-1,' decimalSeparator: \".\",'],[-1,' '],[-1,' \/**'],[-1,' * Property: thousandsSeparator'],[-1,' * Thousands separator to use when formatting numbers.'],[-1,' *\/'],[-1,' thousandsSeparator: \",\",'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: limitSigDigs'],[-1,' * Limit the number of significant digits on a float.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * num - {Float}'],[-1,' * sig - {Integer}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The number, rounded to the specified number of significant'],[-1,' * digits.'],[-1,' *\/'],[-1,' limitSigDigs: function(num, sig) {'],[0,' var fig = 0;'],[0,' if (sig > 0) {'],[0,' fig = parseFloat(num.toPrecision(sig));'],[-1,' }'],[0,' return fig;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: format'],[-1,' * Formats a number for output.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * num - {Float}'],[-1,' * dec - {Integer} Number of decimal places to round to.'],[-1,' * Defaults to 0. Set to null to leave decimal places unchanged.'],[-1,' * tsep - {String} Thousands separator.'],[-1,' * Default is \",\".'],[-1,' * dsep - {String} Decimal separator.'],[-1,' * Default is \".\".'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} A string representing the formatted number.'],[-1,' *\/'],[-1,' format: function(num, dec, tsep, dsep) {'],[0,' dec = (typeof dec != \"undefined\") ? dec : 0; '],[0,' tsep = (typeof tsep != \"undefined\") ? tsep :'],[-1,' OpenLayers.Number.thousandsSeparator; '],[0,' dsep = (typeof dsep != \"undefined\") ? dsep :'],[-1,' OpenLayers.Number.decimalSeparator;'],[-1,''],[0,' if (dec != null) {'],[0,' num = parseFloat(num.toFixed(dec));'],[-1,' }'],[-1,''],[0,' var parts = num.toString().split(\".\");'],[0,' if (parts.length == 1 && dec == null) {'],[-1,' \/\/ integer where we do not want to touch the decimals'],[0,' dec = 0;'],[-1,' }'],[-1,' '],[0,' var integer = parts[0];'],[0,' if (tsep) {'],[0,' var thousands = \/(-?[0-9]+)([0-9]{3})\/; '],[0,' while(thousands.test(integer)) { '],[0,' integer = integer.replace(thousands, \"$1\" + tsep + \"$2\"); '],[-1,' }'],[-1,' }'],[-1,' '],[0,' var str;'],[0,' if (dec == 0) {'],[0,' str = integer;'],[-1,' } else {'],[0,' var rem = parts.length > 1 ? parts[1] : \"0\";'],[0,' if (dec != null) {'],[0,' rem = rem + new Array(dec - rem.length + 1).join(\"0\");'],[-1,' }'],[0,' str = integer + dsep + rem;'],[-1,' }'],[0,' return str;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: zeroPad'],[-1,' * Create a zero padded string optionally with a radix for casting numbers.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * num - {Number} The number to be zero padded.'],[-1,' * len - {Number} The length of the string to be returned.'],[-1,' * radix - {Number} An integer between 2 and 36 specifying the base to use'],[-1,' * for representing numeric values.'],[-1,' *\/'],[-1,' zeroPad: function(num, len, radix) {'],[0,' var str = num.toString(radix || 10);'],[0,' while (str.length < len) {'],[0,' str = \"0\" + str;'],[-1,' }'],[0,' return str;'],[-1,' } '],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Function'],[-1,' * Contains convenience functions for function manipulation.'],[-1,' *\/'],[1,'OpenLayers.Function = {'],[-1,' \/**'],[-1,' * APIFunction: bind'],[-1,' * Bind a function to an object. Method to easily create closures with'],[-1,' * \'this\' altered.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * func - {Function} Input function.'],[-1,' * object - {Object} The object to bind to the input function (as this).'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Function} A closure with \'this\' set to the passed in object.'],[-1,' *\/'],[-1,' bind: function(func, object) {'],[-1,' \/\/ create a reference to all arguments past the second one'],[1,' var args = Array.prototype.slice.call(arguments, 2);'],[1,' return function() {'],[-1,' \/\/ Push on any additional arguments from the actual function call.'],[-1,' \/\/ These will come after those sent to the bind call.'],[0,' var newArgs = args.concat('],[-1,' Array.prototype.slice.call(arguments, 0)'],[-1,' );'],[0,' return func.apply(object, newArgs);'],[-1,' };'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: bindAsEventListener'],[-1,' * Bind a function to an object, and configure it to receive the event'],[-1,' * object as first parameter when called. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * func - {Function} Input function to serve as an event listener.'],[-1,' * object - {Object} A reference to this.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Function}'],[-1,' *\/'],[-1,' bindAsEventListener: function(func, object) {'],[0,' return function(event) {'],[0,' return func.call(object, event || window.event);'],[-1,' };'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: False'],[-1,' * A simple function to that just does \"return false\". We use this to '],[-1,' * avoid attaching anonymous functions to DOM event handlers, which '],[-1,' * causes \"issues\" on IE<8.'],[-1,' * '],[-1,' * Usage:'],[-1,' * document.onclick = OpenLayers.Function.False;'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' False : function() {'],[0,' return false;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: True'],[-1,' * A simple function to that just does \"return true\". We use this to '],[-1,' * avoid attaching anonymous functions to DOM event handlers, which '],[-1,' * causes \"issues\" on IE<8.'],[-1,' * '],[-1,' * Usage:'],[-1,' * document.onclick = OpenLayers.Function.True;'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' True : function() {'],[0,' return true;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: Void'],[-1,' * A reusable function that returns ``undefined``.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {undefined}'],[-1,' *\/'],[-1,' Void: function() {}'],[-1,''],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Array'],[-1,' * Contains convenience functions for array manipulation.'],[-1,' *\/'],[1,'OpenLayers.Array = {'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: filter'],[-1,' * Filter an array. Provides the functionality of the'],[-1,' * Array.prototype.filter extension to the ECMA-262 standard. Where'],[-1,' * available, Array.prototype.filter will be used.'],[-1,' *'],[-1,' * Based on well known example from http:\/\/developer.mozilla.org\/en\/Core_JavaScript_1.5_Reference\/Global_Objects\/Array\/filter'],[-1,' *'],[-1,' * Parameters:'],[-1,' * array - {Array} The array to be filtered. This array is not mutated.'],[-1,' * Elements added to this array by the callback will not be visited.'],[-1,' * callback - {Function} A function that is called for each element in'],[-1,' * the array. If this function returns true, the element will be'],[-1,' * included in the return. The function will be called with three'],[-1,' * arguments: the element in the array, the index of that element, and'],[-1,' * the array itself. If the optional caller parameter is specified'],[-1,' * the callback will be called with this set to caller.'],[-1,' * caller - {Object} Optional object to be set as this when the callback'],[-1,' * is called.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} An array of elements from the passed in array for which the'],[-1,' * callback returns true.'],[-1,' *\/'],[-1,' filter: function(array, callback, caller) {'],[0,' var selected = [];'],[0,' if (Array.prototype.filter) {'],[0,' selected = array.filter(callback, caller);'],[-1,' } else {'],[0,' var len = array.length;'],[0,' if (typeof callback != \"function\") {'],[0,' throw new TypeError();'],[-1,' }'],[0,' for(var i=0; i<len; i++) {'],[0,' if (i in array) {'],[0,' var val = array[i];'],[0,' if (callback.call(caller, val, i, array)) {'],[0,' selected.push(val);'],[-1,' }'],[-1,' }'],[-1,' } '],[-1,' }'],[0,' return selected;'],[-1,' }'],[-1,' '],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/BaseTypes\/Class.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/SingleFile.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Constructor: OpenLayers.Class'],[-1,' * Base class used to construct all other classes. Includes support for '],[-1,' * multiple inheritance. '],[-1,' * '],[-1,' * This constructor is new in OpenLayers 2.5. At OpenLayers 3.0, the old '],[-1,' * syntax for creating classes and dealing with inheritance '],[-1,' * will be removed.'],[-1,' * '],[-1,' * To create a new OpenLayers-style class, use the following syntax:'],[-1,' * (code)'],[-1,' * var MyClass = OpenLayers.Class(prototype);'],[-1,' * (end)'],[-1,' *'],[-1,' * To create a new OpenLayers-style class with multiple inheritance, use the'],[-1,' * following syntax:'],[-1,' * (code)'],[-1,' * var MyClass = OpenLayers.Class(Class1, Class2, prototype);'],[-1,' * (end)'],[-1,' * '],[-1,' * Note that instanceof reflection will only reveal Class1 as superclass.'],[-1,' *'],[-1,' *\/'],[1,'OpenLayers.Class = function() {'],[66,' var len = arguments.length;'],[66,' var P = arguments[0];'],[66,' var F = arguments[len-1];'],[-1,''],[66,' var C = typeof F.initialize == \"function\" ?'],[-1,' F.initialize :'],[0,' function(){ P.prototype.initialize.apply(this, arguments); };'],[-1,''],[66,' if (len > 1) {'],[44,' var newArgs = [C, P].concat('],[-1,' Array.prototype.slice.call(arguments).slice(1, len-1), F);'],[44,' OpenLayers.inherit.apply(null, newArgs);'],[-1,' } else {'],[22,' C.prototype = F;'],[-1,' }'],[66,' return C;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: OpenLayers.inherit'],[-1,' *'],[-1,' * Parameters:'],[-1,' * C - {Object} the class that inherits'],[-1,' * P - {Object} the superclass to inherit from'],[-1,' *'],[-1,' * In addition to the mandatory C and P parameters, an arbitrary number of'],[-1,' * objects can be passed, which will extend C.'],[-1,' *\/'],[1,'OpenLayers.inherit = function(C, P) {'],[44,' var F = function() {};'],[44,' F.prototype = P.prototype;'],[44,' C.prototype = new F;'],[44,' var i, l, o;'],[44,' for(i=2, l=arguments.length; i<l; i++) {'],[44,' o = arguments[i];'],[44,' if(typeof o === \"function\") {'],[0,' o = o.prototype;'],[-1,' }'],[44,' OpenLayers.Util.extend(C.prototype, o);'],[-1,' }'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * APIFunction: extend'],[-1,' * Copy all properties of a source object to a destination object. Modifies'],[-1,' * the passed in destination object. Any properties on the source object'],[-1,' * that are set to undefined will not be (re)set on the destination object.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * destination - {Object} The object that will be modified'],[-1,' * source - {Object} The object with properties to be set on the destination'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} The destination object.'],[-1,' *\/'],[1,'OpenLayers.Util = OpenLayers.Util || {};'],[1,'OpenLayers.Util.extend = function(destination, source) {'],[48,' destination = destination || {};'],[48,' if (source) {'],[47,' for (var property in source) {'],[869,' var value = source[property];'],[869,' if (value !== undefined) {'],[869,' destination[property] = value;'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/**'],[-1,' * IE doesn\'t include the toString property when iterating over an object\'s'],[-1,' * properties with the for(property in object) syntax. Explicitly check if'],[-1,' * the source has its own toString property.'],[-1,' *\/'],[-1,''],[-1,' \/*'],[-1,' * FF\/Windows < 2.0.0.13 reports \"Illegal operation on WrappedNative'],[-1,' * prototype object\" when calling hawOwnProperty if the source object'],[-1,' * is an instance of window.Event.'],[-1,' *\/'],[-1,''],[47,' var sourceIsEvt = typeof window.Event == \"function\"'],[-1,' && source instanceof window.Event;'],[-1,''],[47,' if (!sourceIsEvt'],[-1,' && source.hasOwnProperty && source.hasOwnProperty(\"toString\")) {'],[0,' destination.toString = source.toString;'],[-1,' }'],[-1,' }'],[48,' return destination;'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Projection.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Projection'],[-1,' * Methods for coordinate transforms between coordinate systems. By default,'],[-1,' * OpenLayers ships with the ability to transform coordinates between'],[-1,' * geographic (EPSG:4326) and web or spherical mercator (EPSG:900913 et al.)'],[-1,' * coordinate reference systems. See the <transform> method for details'],[-1,' * on usage.'],[-1,' *'],[-1,' * Additional transforms may be added by using the <proj4js at http:\/\/proj4js.org\/>'],[-1,' * library. If the proj4js library is included, the <transform> method '],[-1,' * will work between any two coordinate reference systems with proj4js '],[-1,' * definitions.'],[-1,' *'],[-1,' * If the proj4js library is not included, or if you wish to allow transforms'],[-1,' * between arbitrary coordinate reference systems, use the <addTransform>'],[-1,' * method to register a custom transform method.'],[-1,' *\/'],[1,'OpenLayers.Projection = OpenLayers.Class({'],[-1,''],[-1,' \/**'],[-1,' * Property: proj'],[-1,' * {Object} Proj4js.Proj instance.'],[-1,' *\/'],[-1,' proj: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: projCode'],[-1,' * {String}'],[-1,' *\/'],[-1,' projCode: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: titleRegEx'],[-1,' * {RegExp} regular expression to strip the title from a proj4js definition'],[-1,' *\/'],[-1,' titleRegEx: \/\\+title=[^\\+]*\/,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Projection'],[-1,' * This class offers several methods for interacting with a wrapped '],[-1,' * pro4js projection object. '],[-1,' *'],[-1,' * Parameters:'],[-1,' * projCode - {String} A string identifying the Well Known Identifier for'],[-1,' * the projection.'],[-1,' * options - {Object} An optional object to set additional properties'],[-1,' * on the projection.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Projection>} A projection object.'],[-1,' *\/'],[-1,' initialize: function(projCode, options) {'],[0,' OpenLayers.Util.extend(this, options);'],[0,' this.projCode = projCode;'],[0,' if (typeof Proj4js == \"object\") {'],[0,' this.proj = new Proj4js.Proj(projCode);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getCode'],[-1,' * Get the string SRS code.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The SRS code.'],[-1,' *\/'],[-1,' getCode: function() {'],[0,' return this.proj ? this.proj.srsCode : this.projCode;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getUnits'],[-1,' * Get the units string for the projection -- returns null if '],[-1,' * proj4js is not available.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The units abbreviation.'],[-1,' *\/'],[-1,' getUnits: function() {'],[0,' return this.proj ? this.proj.units : null;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: toString'],[-1,' * Convert projection to string (getCode wrapper).'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The projection code.'],[-1,' *\/'],[-1,' toString: function() {'],[0,' return this.getCode();'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: equals'],[-1,' * Test equality of two projection instances. Determines equality based'],[-1,' * solely on the projection code.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The two projections are equivalent.'],[-1,' *\/'],[-1,' equals: function(projection) {'],[0,' var p = projection, equals = false;'],[0,' if (p) {'],[0,' if (!(p instanceof OpenLayers.Projection)) {'],[0,' p = new OpenLayers.Projection(p);'],[-1,' }'],[0,' if ((typeof Proj4js == \"object\") && this.proj.defData && p.proj.defData) {'],[0,' equals = this.proj.defData.replace(this.titleRegEx, \"\") =='],[-1,' p.proj.defData.replace(this.titleRegEx, \"\");'],[0,' } else if (p.getCode) {'],[0,' var source = this.getCode(), target = p.getCode();'],[0,' equals = source == target ||'],[-1,' !!OpenLayers.Projection.transforms[source] &&'],[-1,' OpenLayers.Projection.transforms[source][target] ==='],[-1,' OpenLayers.Projection.nullTransform;'],[-1,' }'],[-1,' }'],[0,' return equals; '],[-1,' },'],[-1,''],[-1,' \/* Method: destroy'],[-1,' * Destroy projection object.'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' delete this.proj;'],[0,' delete this.projCode;'],[-1,' },'],[-1,' '],[-1,' CLASS_NAME: \"OpenLayers.Projection\" '],[-1,'}); '],[-1,''],[-1,'\/**'],[-1,' * Property: transforms'],[-1,' * {Object} Transforms is an object, with from properties, each of which may'],[-1,' * have a to property. This allows you to define projections without '],[-1,' * requiring support for proj4js to be included.'],[-1,' *'],[-1,' * This object has keys which correspond to a \'source\' projection object. The'],[-1,' * keys should be strings, corresponding to the projection.getCode() value.'],[-1,' * Each source projection object should have a set of destination projection'],[-1,' * keys included in the object. '],[-1,' * '],[-1,' * Each value in the destination object should be a transformation function,'],[-1,' * where the function is expected to be passed an object with a .x and a .y'],[-1,' * property. The function should return the object, with the .x and .y'],[-1,' * transformed according to the transformation function.'],[-1,' *'],[-1,' * Note - Properties on this object should not be set directly. To add a'],[-1,' * transform method to this object, use the <addTransform> method. For an'],[-1,' * example of usage, see the OpenLayers.Layer.SphericalMercator file.'],[-1,' *\/'],[1,'OpenLayers.Projection.transforms = {};'],[-1,''],[-1,'\/**'],[-1,' * APIProperty: defaults'],[-1,' * {Object} Defaults for the SRS codes known to OpenLayers (currently'],[-1,' * EPSG:4326, CRS:84, urn:ogc:def:crs:EPSG:6.6:4326, EPSG:900913, EPSG:3857,'],[-1,' * EPSG:102113, EPSG:102100 and OSGEO:41001). Keys are the SRS code, values are'],[-1,' * units, maxExtent (the validity extent for the SRS in projected coordinates),'],[-1,' * worldExtent (the world\'s extent in EPSG:4326) and yx (true if this SRS'],[-1,' * is known to have a reverse axis order).'],[-1,' *\/'],[1,'OpenLayers.Projection.defaults = {'],[-1,' \"EPSG:4326\": {'],[-1,' units: \"degrees\",'],[-1,' maxExtent: [-180, -90, 180, 90],'],[-1,' worldExtent: [-180, -90, 180, 90],'],[-1,' yx: true'],[-1,' },'],[-1,' \"CRS:84\": {'],[-1,' units: \"degrees\",'],[-1,' maxExtent: [-180, -90, 180, 90],'],[-1,' worldExtent: [-180, -90, 180, 90]'],[-1,' },'],[-1,' \"EPSG:900913\": {'],[-1,' units: \"m\",'],[-1,' maxExtent: [-20037508.34, -20037508.34, 20037508.34, 20037508.34],'],[-1,' worldExtent: [-180, -89, 180, 89]'],[-1,' }'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * APIMethod: addTransform'],[-1,' * Set a custom transform method between two projections. Use this method in'],[-1,' * cases where the proj4js lib is not available or where custom projections'],[-1,' * need to be handled.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * from - {String} The code for the source projection'],[-1,' * to - {String} the code for the destination projection'],[-1,' * method - {Function} A function that takes a point as an argument and'],[-1,' * transforms that point from the source to the destination projection'],[-1,' * in place. The original point should be modified.'],[-1,' *\/'],[1,'OpenLayers.Projection.addTransform = function(from, to, method) {'],[150,' if (method === OpenLayers.Projection.nullTransform) {'],[90,' var defaults = OpenLayers.Projection.defaults[from];'],[90,' if (defaults && !OpenLayers.Projection.defaults[to]) {'],[5,' OpenLayers.Projection.defaults[to] = defaults;'],[-1,' }'],[-1,' }'],[150,' if(!OpenLayers.Projection.transforms[from]) {'],[8,' OpenLayers.Projection.transforms[from] = {};'],[-1,' }'],[150,' OpenLayers.Projection.transforms[from][to] = method;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * APIMethod: transform'],[-1,' * Transform a point coordinate from one projection to another. Note that'],[-1,' * the input point is transformed in place.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * point - {<OpenLayers.Geometry.Point> | Object} An object with x and y'],[-1,' * properties representing coordinates in those dimensions.'],[-1,' * source - {OpenLayers.Projection} Source map coordinate system'],[-1,' * dest - {OpenLayers.Projection} Destination map coordinate system'],[-1,' *'],[-1,' * Returns:'],[-1,' * point - {object} A transformed coordinate. The original point is modified.'],[-1,' *\/'],[1,'OpenLayers.Projection.transform = function(point, source, dest) {'],[0,' if (source && dest) {'],[0,' if (!(source instanceof OpenLayers.Projection)) {'],[0,' source = new OpenLayers.Projection(source);'],[-1,' }'],[0,' if (!(dest instanceof OpenLayers.Projection)) {'],[0,' dest = new OpenLayers.Projection(dest);'],[-1,' }'],[0,' if (source.proj && dest.proj) {'],[0,' point = Proj4js.transform(source.proj, dest.proj, point);'],[-1,' } else {'],[0,' var sourceCode = source.getCode();'],[0,' var destCode = dest.getCode();'],[0,' var transforms = OpenLayers.Projection.transforms;'],[0,' if (transforms[sourceCode] && transforms[sourceCode][destCode]) {'],[0,' transforms[sourceCode][destCode](point);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return point;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * APIFunction: nullTransform'],[-1,' * A null transformation - useful for defining projection aliases when'],[-1,' * proj4js is not available:'],[-1,' *'],[-1,' * (code)'],[-1,' * OpenLayers.Projection.addTransform(\"EPSG:3857\", \"EPSG:900913\",'],[-1,' * OpenLayers.Projection.nullTransform);'],[-1,' * OpenLayers.Projection.addTransform(\"EPSG:900913\", \"EPSG:3857\",'],[-1,' * OpenLayers.Projection.nullTransform);'],[-1,' * (end)'],[-1,' *\/'],[1,'OpenLayers.Projection.nullTransform = function(point) {'],[0,' return point;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Note: Transforms for web mercator <-> geographic'],[-1,' * OpenLayers recognizes EPSG:3857, EPSG:900913, EPSG:102113, EPSG:102100 and '],[-1,' * OSGEO:41001. OpenLayers originally started referring to EPSG:900913 as web'],[-1,' * mercator. The EPSG has declared EPSG:3857 to be web mercator.'],[-1,' * ArcGIS 10 recognizes the EPSG:3857, EPSG:102113, and EPSG:102100 as'],[-1,' * equivalent. See http:\/\/blogs.esri.com\/Dev\/blogs\/arcgisserver\/archive\/2009\/11\/20\/ArcGIS-Online-moving-to-Google-_2F00_-Bing-tiling-scheme_3A00_-What-does-this-mean-for-you_3F00_.aspx#12084.'],[-1,' * For geographic, OpenLayers recognizes EPSG:4326, CRS:84 and'],[-1,' * urn:ogc:def:crs:EPSG:6.6:4326. OpenLayers also knows about the reverse axis'],[-1,' * order for EPSG:4326. '],[-1,' *\/'],[1,'(function() {'],[-1,''],[1,' var pole = 20037508.34;'],[-1,''],[1,' function inverseMercator(xy) {'],[0,' xy.x = 180 * xy.x \/ pole;'],[0,' xy.y = 180 \/ Math.PI * (2 * Math.atan(Math.exp((xy.y \/ pole) * Math.PI)) - Math.PI \/ 2);'],[0,' return xy;'],[-1,' }'],[-1,''],[1,' function forwardMercator(xy) {'],[0,' xy.x = xy.x * pole \/ 180;'],[0,' var y = Math.log(Math.tan((90 + xy.y) * Math.PI \/ 360)) \/ Math.PI * pole;'],[0,' xy.y = Math.max(-20037508.34, Math.min(y, 20037508.34));'],[0,' return xy;'],[-1,' }'],[-1,''],[1,' function map(base, codes) {'],[8,' var add = OpenLayers.Projection.addTransform;'],[8,' var same = OpenLayers.Projection.nullTransform;'],[8,' var i, len, code, other, j;'],[8,' for (i=0, len=codes.length; i<len; ++i) {'],[30,' code = codes[i];'],[30,' add(base, code, forwardMercator);'],[30,' add(code, base, inverseMercator);'],[30,' for (j=i+1; j<len; ++j) {'],[45,' other = codes[j];'],[45,' add(code, other, same);'],[45,' add(other, code, same);'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' \/\/ list of equivalent codes for web mercator'],[1,' var mercator = [\"EPSG:900913\", \"EPSG:3857\", \"EPSG:102113\", \"EPSG:102100\", \"OSGEO:41001\"],'],[-1,' geographic = [\"CRS:84\", \"urn:ogc:def:crs:EPSG:6.6:4326\", \"EPSG:4326\"],'],[-1,' i;'],[1,' for (i=mercator.length-1; i>=0; --i) {'],[5,' map(mercator[i], geographic);'],[-1,' }'],[1,' for (i=geographic.length-1; i>=0; --i) {'],[3,' map(geographic[i], mercator);'],[-1,' }'],[-1,''],[-1,'})();'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Util.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes.js'],[-1,' * @requires OpenLayers\/BaseTypes\/Bounds.js'],[-1,' * @requires OpenLayers\/BaseTypes\/Element.js'],[-1,' * @requires OpenLayers\/BaseTypes\/LonLat.js'],[-1,' * @requires OpenLayers\/BaseTypes\/Pixel.js'],[-1,' * @requires OpenLayers\/BaseTypes\/Size.js'],[-1,' * @requires OpenLayers\/Lang.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: Util'],[-1,' *\/'],[1,'OpenLayers.Util = OpenLayers.Util || {};'],[-1,''],[-1,'\/** '],[-1,' * Function: getElement'],[-1,' * This is the old $() from prototype'],[-1,' *'],[-1,' * Parameters:'],[-1,' * e - {String or DOMElement or Window}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(DOMElement) or DOMElement}'],[-1,' *\/'],[1,'OpenLayers.Util.getElement = function() {'],[1,' var elements = [];'],[-1,''],[1,' for (var i=0, len=arguments.length; i<len; i++) {'],[1,' var element = arguments[i];'],[1,' if (typeof element == \'string\') {'],[0,' element = document.getElementById(element);'],[-1,' }'],[1,' if (arguments.length == 1) {'],[1,' return element;'],[-1,' }'],[0,' elements.push(element);'],[-1,' }'],[0,' return elements;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: isElement'],[-1,' * A cross-browser implementation of \"e instanceof Element\".'],[-1,' *'],[-1,' * Parameters:'],[-1,' * o - {Object} The object to test.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[1,'OpenLayers.Util.isElement = function(o) {'],[0,' return !!(o && o.nodeType === 1);'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: isArray'],[-1,' * Tests that the provided object is an array.'],[-1,' * This test handles the cross-IFRAME case not caught'],[-1,' * by \"a instanceof Array\" and should be used instead.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * a - {Object} the object test.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if the object is an array.'],[-1,' *\/'],[1,'OpenLayers.Util.isArray = function(a) {'],[1,' return (Object.prototype.toString.call(a) === \'[object Array]\');'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: removeItem'],[-1,' * Remove an object from an array. Iterates through the array'],[-1,' * to find the item, then removes it.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * array - {Array}'],[-1,' * item - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Array} A reference to the array'],[-1,' *\/'],[1,'OpenLayers.Util.removeItem = function(array, item) {'],[0,' for(var i = array.length - 1; i >= 0; i--) {'],[0,' if(array[i] == item) {'],[0,' array.splice(i,1);'],[-1,' \/\/break;more than once??'],[-1,' }'],[-1,' }'],[0,' return array;'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: indexOf'],[-1,' * Seems to exist already in FF, but not in MOZ.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * array - {Array}'],[-1,' * obj - {*}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer} The index at which the first object was found in the array.'],[-1,' * If not found, returns -1.'],[-1,' *\/'],[1,'OpenLayers.Util.indexOf = function(array, obj) {'],[-1,' \/\/ use the build-in function if available.'],[0,' if (typeof array.indexOf == \"function\") {'],[0,' return array.indexOf(obj);'],[-1,' } else {'],[0,' for (var i = 0, len = array.length; i < len; i++) {'],[0,' if (array[i] == obj) {'],[0,' return i;'],[-1,' }'],[-1,' }'],[0,' return -1; '],[-1,' }'],[-1,'};'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * Property: dotless'],[-1,' * {RegExp}'],[-1,' * Compiled regular expression to match dots (\".\"). This is used for replacing'],[-1,' * dots in identifiers. Because object identifiers are frequently used for'],[-1,' * DOM element identifiers by the library, we avoid using dots to make for'],[-1,' * more sensible CSS selectors.'],[-1,' *'],[-1,' * TODO: Use a module pattern to avoid bloating the API with stuff like this.'],[-1,' *\/'],[1,'OpenLayers.Util.dotless = \/\\.\/g;'],[-1,''],[-1,'\/**'],[-1,' * Function: modifyDOMElement'],[-1,' * '],[-1,' * Modifies many properties of a DOM element all at once. Passing in '],[-1,' * null to an individual parameter will avoid setting the attribute.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} DOM element to modify.'],[-1,' * id - {String} The element id attribute to set. Note that dots (\".\") will be'],[-1,' * replaced with underscore (\"_\") in setting the element id.'],[-1,' * px - {<OpenLayers.Pixel>|Object} The element left and top position,'],[-1,' * OpenLayers.Pixel or an object with'],[-1,' * a \'x\' and \'y\' properties.'],[-1,' * sz - {<OpenLayers.Size>|Object} The element width and height,'],[-1,' * OpenLayers.Size or an object with a'],[-1,' * \'w\' and \'h\' properties.'],[-1,' * position - {String} The position attribute. eg: absolute, '],[-1,' * relative, etc.'],[-1,' * border - {String} The style.border attribute. eg:'],[-1,' * solid black 2px'],[-1,' * overflow - {String} The style.overview attribute. '],[-1,' * opacity - {Float} Fractional value (0.0 - 1.0)'],[-1,' *\/'],[1,'OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position, '],[-1,' border, overflow, opacity) {'],[-1,''],[0,' if (id) {'],[0,' element.id = id.replace(OpenLayers.Util.dotless, \"_\");'],[-1,' }'],[0,' if (px) {'],[0,' element.style.left = px.x + \"px\";'],[0,' element.style.top = px.y + \"px\";'],[-1,' }'],[0,' if (sz) {'],[0,' element.style.width = sz.w + \"px\";'],[0,' element.style.height = sz.h + \"px\";'],[-1,' }'],[0,' if (position) {'],[0,' element.style.position = position;'],[-1,' }'],[0,' if (border) {'],[0,' element.style.border = border;'],[-1,' }'],[0,' if (overflow) {'],[0,' element.style.overflow = overflow;'],[-1,' }'],[0,' if (parseFloat(opacity) >= 0.0 && parseFloat(opacity) < 1.0) {'],[0,' element.style.filter = \'alpha(opacity=\' + (opacity * 100) + \')\';'],[0,' element.style.opacity = opacity;'],[0,' } else if (parseFloat(opacity) == 1.0) {'],[0,' element.style.filter = \'\';'],[0,' element.style.opacity = \'\';'],[-1,' }'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: createDiv'],[-1,' * Creates a new div and optionally set some standard attributes.'],[-1,' * Null may be passed to each parameter if you do not wish to'],[-1,' * set a particular attribute.'],[-1,' * Note - zIndex is NOT set on the resulting div.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * id - {String} An identifier for this element. If no id is'],[-1,' * passed an identifier will be created '],[-1,' * automatically. Note that dots (\".\") will be replaced with'],[-1,' * underscore (\"_\") when generating ids.'],[-1,' * px - {<OpenLayers.Pixel>|Object} The element left and top position,'],[-1,' * OpenLayers.Pixel or an object with'],[-1,' * a \'x\' and \'y\' properties.'],[-1,' * sz - {<OpenLayers.Size>|Object} The element width and height,'],[-1,' * OpenLayers.Size or an object with a'],[-1,' * \'w\' and \'h\' properties.'],[-1,' * imgURL - {String} A url pointing to an image to use as a '],[-1,' * background image.'],[-1,' * position - {String} The style.position value. eg: absolute,'],[-1,' * relative etc.'],[-1,' * border - {String} The the style.border value. '],[-1,' * eg: 2px solid black'],[-1,' * overflow - {String} The style.overflow value. Eg. hidden'],[-1,' * opacity - {Float} Fractional value (0.0 - 1.0)'],[-1,' * '],[-1,' * Returns: '],[-1,' * {DOMElement} A DOM Div created with the specified attributes.'],[-1,' *\/'],[1,'OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position, '],[-1,' border, overflow, opacity) {'],[-1,''],[0,' var dom = document.createElement(\'div\');'],[-1,''],[0,' if (imgURL) {'],[0,' dom.style.backgroundImage = \'url(\' + imgURL + \')\';'],[-1,' }'],[-1,''],[-1,' \/\/set generic properties'],[0,' if (!id) {'],[0,' id = OpenLayers.Util.createUniqueID(\"OpenLayersDiv\");'],[-1,' }'],[0,' if (!position) {'],[0,' position = \"absolute\";'],[-1,' }'],[0,' OpenLayers.Util.modifyDOMElement(dom, id, px, sz, position, '],[-1,' border, overflow, opacity);'],[-1,''],[0,' return dom;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: createImage'],[-1,' * Creates an img element with specific attribute values.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * id - {String} The id field for the img. If none assigned one will be'],[-1,' * automatically generated.'],[-1,' * px - {<OpenLayers.Pixel>|Object} The element left and top position,'],[-1,' * OpenLayers.Pixel or an object with'],[-1,' * a \'x\' and \'y\' properties.'],[-1,' * sz - {<OpenLayers.Size>|Object} The element width and height,'],[-1,' * OpenLayers.Size or an object with a'],[-1,' * \'w\' and \'h\' properties.'],[-1,' * imgURL - {String} The url to use as the image source.'],[-1,' * position - {String} The style.position value.'],[-1,' * border - {String} The border to place around the image.'],[-1,' * opacity - {Float} Fractional value (0.0 - 1.0)'],[-1,' * delayDisplay - {Boolean} If true waits until the image has been'],[-1,' * loaded.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} A DOM Image created with the specified attributes.'],[-1,' *\/'],[1,'OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,'],[-1,' opacity, delayDisplay) {'],[-1,''],[0,' var image = document.createElement(\"img\");'],[-1,''],[-1,' \/\/set generic properties'],[0,' if (!id) {'],[0,' id = OpenLayers.Util.createUniqueID(\"OpenLayersDiv\");'],[-1,' }'],[0,' if (!position) {'],[0,' position = \"relative\";'],[-1,' }'],[0,' OpenLayers.Util.modifyDOMElement(image, id, px, sz, position, '],[-1,' border, null, opacity);'],[-1,''],[0,' if (delayDisplay) {'],[0,' image.style.display = \"none\";'],[0,' function display() {'],[0,' image.style.display = \"\";'],[0,' OpenLayers.Event.stopObservingElement(image);'],[-1,' }'],[0,' OpenLayers.Event.observe(image, \"load\", display);'],[0,' OpenLayers.Event.observe(image, \"error\", display);'],[-1,' }'],[-1,' '],[-1,' \/\/set special properties'],[0,' image.style.alt = id;'],[0,' image.galleryImg = \"no\";'],[0,' if (imgURL) {'],[0,' image.src = imgURL;'],[-1,' }'],[-1,' '],[0,' return image;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Property: IMAGE_RELOAD_ATTEMPTS'],[-1,' * {Integer} How many times should we try to reload an image before giving up?'],[-1,' * Default is 0'],[-1,' *\/'],[1,'OpenLayers.IMAGE_RELOAD_ATTEMPTS = 0;'],[-1,''],[-1,'\/**'],[-1,' * Property: alphaHackNeeded'],[-1,' * {Boolean} true if the png alpha hack is necessary and possible, false otherwise.'],[-1,' *\/'],[1,'OpenLayers.Util.alphaHackNeeded = null;'],[-1,''],[-1,'\/**'],[-1,' * Function: alphaHack'],[-1,' * Checks whether it\'s necessary (and possible) to use the png alpha'],[-1,' * hack which allows alpha transparency for png images under Internet'],[-1,' * Explorer.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if the png alpha hack is necessary and possible, false otherwise.'],[-1,' *\/'],[1,'OpenLayers.Util.alphaHack = function() {'],[0,' if (OpenLayers.Util.alphaHackNeeded == null) {'],[0,' var arVersion = navigator.appVersion.split(\"MSIE\");'],[0,' var version = parseFloat(arVersion[1]);'],[0,' var filter = false;'],[-1,' '],[-1,' \/\/ IEs4Lin dies when trying to access document.body.filters, because '],[-1,' \/\/ the property is there, but requires a DLL that can\'t be provided. This'],[-1,' \/\/ means that we need to wrap this in a try\/catch so that this can'],[-1,' \/\/ continue.'],[-1,' '],[0,' try { '],[0,' filter = !!(document.body.filters);'],[-1,' } catch (e) {} '],[-1,' '],[0,' OpenLayers.Util.alphaHackNeeded = (filter && '],[-1,' (version >= 5.5) && (version < 7));'],[-1,' }'],[0,' return OpenLayers.Util.alphaHackNeeded;'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: modifyAlphaImageDiv'],[-1,' * '],[-1,' * Parameters:'],[-1,' * div - {DOMElement} Div containing Alpha-adjusted Image'],[-1,' * id - {String}'],[-1,' * px - {<OpenLayers.Pixel>|Object} OpenLayers.Pixel or an object with'],[-1,' * a \'x\' and \'y\' properties.'],[-1,' * sz - {<OpenLayers.Size>|Object} OpenLayers.Size or an object with'],[-1,' * a \'w\' and \'h\' properties.'],[-1,' * imgURL - {String}'],[-1,' * position - {String}'],[-1,' * border - {String}'],[-1,' * sizing - {String} \'crop\', \'scale\', or \'image\'. Default is \"scale\"'],[-1,' * opacity - {Float} Fractional value (0.0 - 1.0)'],[-1,' *\/ '],[1,'OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL, '],[-1,' position, border, sizing, '],[-1,' opacity) {'],[-1,''],[0,' OpenLayers.Util.modifyDOMElement(div, id, px, sz, position,'],[-1,' null, null, opacity);'],[-1,''],[0,' var img = div.childNodes[0];'],[-1,''],[0,' if (imgURL) {'],[0,' img.src = imgURL;'],[-1,' }'],[0,' OpenLayers.Util.modifyDOMElement(img, div.id + \"_innerImage\", null, sz, '],[-1,' \"relative\", border);'],[-1,' '],[0,' if (OpenLayers.Util.alphaHack()) {'],[0,' if(div.style.display != \"none\") {'],[0,' div.style.display = \"inline-block\";'],[-1,' }'],[0,' if (sizing == null) {'],[0,' sizing = \"scale\";'],[-1,' }'],[-1,' '],[0,' div.style.filter = \"progid:DXImageTransform.Microsoft\" +'],[-1,' \".AlphaImageLoader(src=\'\" + img.src + \"\', \" +'],[-1,' \"sizingMethod=\'\" + sizing + \"\')\";'],[0,' if (parseFloat(div.style.opacity) >= 0.0 && '],[-1,' parseFloat(div.style.opacity) < 1.0) {'],[0,' div.style.filter += \" alpha(opacity=\" + div.style.opacity * 100 + \")\";'],[-1,' }'],[-1,''],[0,' img.style.filter = \"alpha(opacity=0)\";'],[-1,' }'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: createAlphaImageDiv'],[-1,' * '],[-1,' * Parameters:'],[-1,' * id - {String}'],[-1,' * px - {<OpenLayers.Pixel>|Object} OpenLayers.Pixel or an object with'],[-1,' * a \'x\' and \'y\' properties.'],[-1,' * sz - {<OpenLayers.Size>|Object} OpenLayers.Size or an object with'],[-1,' * a \'w\' and \'h\' properties.'],[-1,' * imgURL - {String}'],[-1,' * position - {String}'],[-1,' * border - {String}'],[-1,' * sizing - {String} \'crop\', \'scale\', or \'image\'. Default is \"scale\"'],[-1,' * opacity - {Float} Fractional value (0.0 - 1.0)'],[-1,' * delayDisplay - {Boolean} If true waits until the image has been'],[-1,' * loaded.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} A DOM Div created with a DOM Image inside it. If the hack is '],[-1,' * needed for transparency in IE, it is added.'],[-1,' *\/ '],[1,'OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL, '],[-1,' position, border, sizing, '],[-1,' opacity, delayDisplay) {'],[-1,' '],[0,' var div = OpenLayers.Util.createDiv();'],[0,' var img = OpenLayers.Util.createImage(null, null, null, null, null, null, '],[-1,' null, delayDisplay);'],[0,' img.className = \"olAlphaImg\";'],[0,' div.appendChild(img);'],[-1,''],[0,' OpenLayers.Util.modifyAlphaImageDiv(div, id, px, sz, imgURL, position, '],[-1,' border, sizing, opacity);'],[-1,' '],[0,' return div;'],[-1,'};'],[-1,''],[-1,''],[-1,'\/** '],[-1,' * Function: upperCaseObject'],[-1,' * Creates a new hashtable and copies over all the keys from the '],[-1,' * passed-in object, but storing them under an uppercased'],[-1,' * version of the key at which they were stored.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * object - {Object}'],[-1,' * '],[-1,' * Returns: '],[-1,' * {Object} A new Object with all the same keys but uppercased'],[-1,' *\/'],[1,'OpenLayers.Util.upperCaseObject = function (object) {'],[0,' var uObject = {};'],[0,' for (var key in object) {'],[0,' uObject[key.toUpperCase()] = object[key];'],[-1,' }'],[0,' return uObject;'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: applyDefaults'],[-1,' * Takes an object and copies any properties that don\'t exist from'],[-1,' * another properties, by analogy with OpenLayers.Util.extend() from'],[-1,' * Prototype.js.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * to - {Object} The destination object.'],[-1,' * from - {Object} The source object. Any properties of this object that'],[-1,' * are undefined in the to object will be set on the to object.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} A reference to the to object. Note that the to argument is modified'],[-1,' * in place and returned by this function.'],[-1,' *\/'],[1,'OpenLayers.Util.applyDefaults = function (to, from) {'],[1,' to = to || {};'],[-1,' \/*'],[-1,' * FF\/Windows < 2.0.0.13 reports \"Illegal operation on WrappedNative'],[-1,' * prototype object\" when calling hawOwnProperty if the source object is an'],[-1,' * instance of window.Event.'],[-1,' *\/'],[1,' var fromIsEvt = typeof window.Event == \"function\"'],[-1,' && from instanceof window.Event;'],[-1,''],[1,' for (var key in from) {'],[0,' if (to[key] === undefined ||'],[-1,' (!fromIsEvt && from.hasOwnProperty'],[-1,' && from.hasOwnProperty(key) && !to.hasOwnProperty(key))) {'],[0,' to[key] = from[key];'],[-1,' }'],[-1,' }'],[-1,' \/**'],[-1,' * IE doesn\'t include the toString property when iterating over an object\'s'],[-1,' * properties with the for(property in object) syntax. Explicitly check if'],[-1,' * the source has its own toString property.'],[-1,' *\/'],[1,' if(!fromIsEvt && from && from.hasOwnProperty'],[-1,' && from.hasOwnProperty(\'toString\') && !to.hasOwnProperty(\'toString\')) {'],[0,' to.toString = from.toString;'],[-1,' }'],[-1,' '],[1,' return to;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: getParameterString'],[-1,' * '],[-1,' * Parameters:'],[-1,' * params - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A concatenation of the properties of an object in '],[-1,' * http parameter notation. '],[-1,' * (ex. <i>\"key1=value1&key2=value2&key3=value3\"<\/i>)'],[-1,' * If a parameter is actually a list, that parameter will then'],[-1,' * be set to a comma-seperated list of values (foo,bar) instead'],[-1,' * of being URL escaped (foo%3Abar). '],[-1,' *\/'],[1,'OpenLayers.Util.getParameterString = function(params) {'],[0,' var paramsArray = [];'],[-1,' '],[0,' for (var key in params) {'],[0,' var value = params[key];'],[0,' if ((value != null) && (typeof value != \'function\')) {'],[0,' var encodedValue;'],[0,' if (typeof value == \'object\' && value.constructor == Array) {'],[-1,' \/* value is an array; encode items and separate with \",\" *\/'],[0,' var encodedItemArray = [];'],[0,' var item;'],[0,' for (var itemIndex=0, len=value.length; itemIndex<len; itemIndex++) {'],[0,' item = value[itemIndex];'],[0,' encodedItemArray.push(encodeURIComponent('],[-1,' (item === null || item === undefined) ? \"\" : item)'],[-1,' );'],[-1,' }'],[0,' encodedValue = encodedItemArray.join(\",\");'],[-1,' }'],[-1,' else {'],[-1,' \/* value is a string; simply encode *\/'],[0,' encodedValue = encodeURIComponent(value);'],[-1,' }'],[0,' paramsArray.push(encodeURIComponent(key) + \"=\" + encodedValue);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' return paramsArray.join(\"&\");'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: urlAppend'],[-1,' * Appends a parameter string to a url. This function includes the logic for'],[-1,' * using the appropriate character (none, & or ?) to append to the url before'],[-1,' * appending the param string.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * url - {String} The url to append to'],[-1,' * paramStr - {String} The param string to append'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The new url'],[-1,' *\/'],[1,'OpenLayers.Util.urlAppend = function(url, paramStr) {'],[0,' var newUrl = url;'],[0,' if(paramStr) {'],[0,' var parts = (url + \" \").split(\/[?&]\/);'],[0,' newUrl += (parts.pop() === \" \" ?'],[-1,' paramStr :'],[-1,' parts.length ? \"&\" + paramStr : \"?\" + paramStr);'],[-1,' }'],[0,' return newUrl;'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: getImagesLocation'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The fully formatted image location string'],[-1,' *\/'],[1,'OpenLayers.Util.getImagesLocation = function() {'],[0,' return OpenLayers.ImgPath || (OpenLayers._getScriptLocation() + \"img\/\");'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: getImageLocation'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The fully formatted location string for a specified image'],[-1,' *\/'],[1,'OpenLayers.Util.getImageLocation = function(image) {'],[0,' return OpenLayers.Util.getImagesLocation() + image;'],[-1,'};'],[-1,''],[-1,''],[-1,'\/** '],[-1,' * Function: Try'],[-1,' * Execute functions until one of them doesn\'t throw an error. '],[-1,' * Capitalized because \"try\" is a reserved word in JavaScript.'],[-1,' * Taken directly from OpenLayers.Util.Try()'],[-1,' * '],[-1,' * Parameters:'],[-1,' * [*] - {Function} Any number of parameters may be passed to Try()'],[-1,' * It will attempt to execute each of them until one of them '],[-1,' * successfully executes. '],[-1,' * If none executes successfully, returns null.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {*} The value returned by the first successfully executed function.'],[-1,' *\/'],[1,'OpenLayers.Util.Try = function() {'],[0,' var returnValue = null;'],[-1,''],[0,' for (var i=0, len=arguments.length; i<len; i++) {'],[0,' var lambda = arguments[i];'],[0,' try {'],[0,' returnValue = lambda();'],[0,' break;'],[-1,' } catch (e) {}'],[-1,' }'],[-1,''],[0,' return returnValue;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: getXmlNodeValue'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {XMLNode}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The text value of the given node, without breaking in firefox or IE'],[-1,' *\/'],[1,'OpenLayers.Util.getXmlNodeValue = function(node) {'],[0,' var val = null;'],[0,' OpenLayers.Util.Try( '],[-1,' function() {'],[0,' val = node.text;'],[0,' if (!val) {'],[0,' val = node.textContent;'],[-1,' }'],[0,' if (!val) {'],[0,' val = node.firstChild.nodeValue;'],[-1,' }'],[-1,' }, '],[-1,' function() {'],[0,' val = node.textContent;'],[-1,' }); '],[0,' return val;'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: mouseLeft'],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' * div - {HTMLDivElement}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[1,'OpenLayers.Util.mouseLeft = function (evt, div) {'],[-1,' \/\/ start with the element to which the mouse has moved'],[0,' var target = (evt.relatedTarget) ? evt.relatedTarget : evt.toElement;'],[-1,' \/\/ walk up the DOM tree.'],[0,' while (target != div && target != null) {'],[0,' target = target.parentNode;'],[-1,' }'],[-1,' \/\/ if the target we stop at isn\'t the div, then we\'ve left the div.'],[0,' return (target != div);'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Property: precision'],[-1,' * {Number} The number of significant digits to retain to avoid'],[-1,' * floating point precision errors.'],[-1,' *'],[-1,' * We use 14 as a \"safe\" default because, although IEEE 754 double floats'],[-1,' * (standard on most modern operating systems) support up to about 16'],[-1,' * significant digits, 14 significant digits are sufficient to represent'],[-1,' * sub-millimeter accuracy in any coordinate system that anyone is likely to'],[-1,' * use with OpenLayers.'],[-1,' *'],[-1,' * If DEFAULT_PRECISION is set to 0, the original non-truncating behavior'],[-1,' * of OpenLayers <2.8 is preserved. Be aware that this will cause problems'],[-1,' * with certain projections, e.g. spherical Mercator.'],[-1,' *'],[-1,' *\/'],[1,'OpenLayers.Util.DEFAULT_PRECISION = 14;'],[-1,''],[-1,'\/**'],[-1,' * Function: toFloat'],[-1,' * Convenience method to cast an object to a Number, rounded to the'],[-1,' * desired floating point precision.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * number - {Number} The number to cast and round.'],[-1,' * precision - {Number} An integer suitable for use with'],[-1,' * Number.toPrecision(). Defaults to OpenLayers.Util.DEFAULT_PRECISION.'],[-1,' * If set to 0, no rounding is performed.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number} The cast, rounded number.'],[-1,' *\/'],[1,'OpenLayers.Util.toFloat = function (number, precision) {'],[4,' if (precision == null) {'],[4,' precision = OpenLayers.Util.DEFAULT_PRECISION;'],[-1,' }'],[4,' if (typeof number !== \"number\") {'],[0,' number = parseFloat(number);'],[-1,' }'],[4,' return precision === 0 ? number :'],[-1,' parseFloat(number.toPrecision(precision));'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: rad'],[-1,' * '],[-1,' * Parameters:'],[-1,' * x - {Float}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[1,'OpenLayers.Util.rad = function(x) {return x*Math.PI\/180;};'],[-1,''],[-1,'\/**'],[-1,' * Function: deg'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Float}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[1,'OpenLayers.Util.deg = function(x) {return x*180\/Math.PI;};'],[-1,''],[-1,'\/**'],[-1,' * Property: VincentyConstants'],[-1,' * {Object} Constants for Vincenty functions.'],[-1,' *\/'],[1,'OpenLayers.Util.VincentyConstants = {'],[-1,' a: 6378137,'],[-1,' b: 6356752.3142,'],[-1,' f: 1\/298.257223563'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * APIFunction: distVincenty'],[-1,' * Given two objects representing points with geographic coordinates, this'],[-1,' * calculates the distance between those points on the surface of an'],[-1,' * ellipsoid.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * p1 - {<OpenLayers.LonLat>} (or any object with both .lat, .lon properties)'],[-1,' * p2 - {<OpenLayers.LonLat>} (or any object with both .lat, .lon properties)'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float} The distance (in km) between the two input points as measured on an'],[-1,' * ellipsoid. Note that the input point objects must be in geographic'],[-1,' * coordinates (decimal degrees) and the return distance is in kilometers.'],[-1,' *\/'],[1,'OpenLayers.Util.distVincenty = function(p1, p2) {'],[0,' var ct = OpenLayers.Util.VincentyConstants;'],[0,' var a = ct.a, b = ct.b, f = ct.f;'],[-1,''],[0,' var L = OpenLayers.Util.rad(p2.lon - p1.lon);'],[0,' var U1 = Math.atan((1-f) * Math.tan(OpenLayers.Util.rad(p1.lat)));'],[0,' var U2 = Math.atan((1-f) * Math.tan(OpenLayers.Util.rad(p2.lat)));'],[0,' var sinU1 = Math.sin(U1), cosU1 = Math.cos(U1);'],[0,' var sinU2 = Math.sin(U2), cosU2 = Math.cos(U2);'],[0,' var lambda = L, lambdaP = 2*Math.PI;'],[0,' var iterLimit = 20;'],[0,' while (Math.abs(lambda-lambdaP) > 1e-12 && --iterLimit>0) {'],[0,' var sinLambda = Math.sin(lambda), cosLambda = Math.cos(lambda);'],[0,' var sinSigma = Math.sqrt((cosU2*sinLambda) * (cosU2*sinLambda) +'],[-1,' (cosU1*sinU2-sinU1*cosU2*cosLambda) * (cosU1*sinU2-sinU1*cosU2*cosLambda));'],[0,' if (sinSigma==0) {'],[0,' return 0; \/\/ co-incident points'],[-1,' }'],[0,' var cosSigma = sinU1*sinU2 + cosU1*cosU2*cosLambda;'],[0,' var sigma = Math.atan2(sinSigma, cosSigma);'],[0,' var alpha = Math.asin(cosU1 * cosU2 * sinLambda \/ sinSigma);'],[0,' var cosSqAlpha = Math.cos(alpha) * Math.cos(alpha);'],[0,' var cos2SigmaM = cosSigma - 2*sinU1*sinU2\/cosSqAlpha;'],[0,' var C = f\/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));'],[0,' lambdaP = lambda;'],[0,' lambda = L + (1-C) * f * Math.sin(alpha) *'],[-1,' (sigma + C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));'],[-1,' }'],[0,' if (iterLimit==0) {'],[0,' return NaN; \/\/ formula failed to converge'],[-1,' }'],[0,' var uSq = cosSqAlpha * (a*a - b*b) \/ (b*b);'],[0,' var A = 1 + uSq\/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));'],[0,' var B = uSq\/1024 * (256+uSq*(-128+uSq*(74-47*uSq)));'],[0,' var deltaSigma = B*sinSigma*(cos2SigmaM+B\/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-'],[-1,' B\/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));'],[0,' var s = b*A*(sigma-deltaSigma);'],[0,' var d = s.toFixed(3)\/1000; \/\/ round to 1mm precision'],[0,' return d;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * APIFunction: destinationVincenty'],[-1,' * Calculate destination point given start point lat\/long (numeric degrees),'],[-1,' * bearing (numeric degrees) & distance (in m).'],[-1,' * Adapted from Chris Veness work, see'],[-1,' * http:\/\/www.movable-type.co.uk\/scripts\/latlong-vincenty-direct.html'],[-1,' *'],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>} (or any object with both .lat, .lon'],[-1,' * properties) The start point.'],[-1,' * brng - {Float} The bearing (degrees).'],[-1,' * dist - {Float} The ground distance (meters).'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} The destination point.'],[-1,' *\/'],[1,'OpenLayers.Util.destinationVincenty = function(lonlat, brng, dist) {'],[0,' var u = OpenLayers.Util;'],[0,' var ct = u.VincentyConstants;'],[0,' var a = ct.a, b = ct.b, f = ct.f;'],[-1,''],[0,' var lon1 = lonlat.lon;'],[0,' var lat1 = lonlat.lat;'],[-1,''],[0,' var s = dist;'],[0,' var alpha1 = u.rad(brng);'],[0,' var sinAlpha1 = Math.sin(alpha1);'],[0,' var cosAlpha1 = Math.cos(alpha1);'],[-1,''],[0,' var tanU1 = (1-f) * Math.tan(u.rad(lat1));'],[0,' var cosU1 = 1 \/ Math.sqrt((1 + tanU1*tanU1)), sinU1 = tanU1*cosU1;'],[0,' var sigma1 = Math.atan2(tanU1, cosAlpha1);'],[0,' var sinAlpha = cosU1 * sinAlpha1;'],[0,' var cosSqAlpha = 1 - sinAlpha*sinAlpha;'],[0,' var uSq = cosSqAlpha * (a*a - b*b) \/ (b*b);'],[0,' var A = 1 + uSq\/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));'],[0,' var B = uSq\/1024 * (256+uSq*(-128+uSq*(74-47*uSq)));'],[-1,''],[0,' var sigma = s \/ (b*A), sigmaP = 2*Math.PI;'],[0,' while (Math.abs(sigma-sigmaP) > 1e-12) {'],[0,' var cos2SigmaM = Math.cos(2*sigma1 + sigma);'],[0,' var sinSigma = Math.sin(sigma);'],[0,' var cosSigma = Math.cos(sigma);'],[0,' var deltaSigma = B*sinSigma*(cos2SigmaM+B\/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-'],[-1,' B\/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));'],[0,' sigmaP = sigma;'],[0,' sigma = s \/ (b*A) + deltaSigma;'],[-1,' }'],[-1,''],[0,' var tmp = sinU1*sinSigma - cosU1*cosSigma*cosAlpha1;'],[0,' var lat2 = Math.atan2(sinU1*cosSigma + cosU1*sinSigma*cosAlpha1,'],[-1,' (1-f)*Math.sqrt(sinAlpha*sinAlpha + tmp*tmp));'],[0,' var lambda = Math.atan2(sinSigma*sinAlpha1, cosU1*cosSigma - sinU1*sinSigma*cosAlpha1);'],[0,' var C = f\/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));'],[0,' var L = lambda - (1-C) * f * sinAlpha *'],[-1,' (sigma + C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));'],[-1,''],[0,' var revAz = Math.atan2(sinAlpha, -tmp); \/\/ final bearing'],[-1,''],[0,' return new OpenLayers.LonLat(lon1+u.deg(L), u.deg(lat2));'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: getParameters'],[-1,' * Parse the parameters from a URL or from the current page itself into a '],[-1,' * JavaScript Object. Note that parameter values with commas are separated'],[-1,' * out into an Array.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * url - {String} Optional url used to extract the query string.'],[-1,' * If url is null or is not supplied, query string is taken '],[-1,' * from the page location.'],[-1,' * options - {Object} Additional options. Optional.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * splitArgs - {Boolean} Split comma delimited params into arrays? Default is'],[-1,' * true.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} An object of key\/value pairs from the query string.'],[-1,' *\/'],[1,'OpenLayers.Util.getParameters = function(url, options) {'],[0,' options = options || {};'],[-1,' \/\/ if no url specified, take it from the location bar'],[0,' url = (url === null || url === undefined) ? window.location.href : url;'],[-1,''],[-1,' \/\/parse out parameters portion of url string'],[0,' var paramsString = \"\";'],[0,' if (OpenLayers.String.contains(url, \'?\')) {'],[0,' var start = url.indexOf(\'?\') + 1;'],[0,' var end = OpenLayers.String.contains(url, \"#\") ?'],[-1,' url.indexOf(\'#\') : url.length;'],[0,' paramsString = url.substring(start, end);'],[-1,' }'],[-1,''],[0,' var parameters = {};'],[0,' var pairs = paramsString.split(\/[&;]\/);'],[0,' for(var i=0, len=pairs.length; i<len; ++i) {'],[0,' var keyValue = pairs[i].split(\'=\');'],[0,' if (keyValue[0]) {'],[-1,''],[0,' var key = keyValue[0];'],[0,' try {'],[0,' key = decodeURIComponent(key);'],[-1,' } catch (err) {'],[0,' key = unescape(key);'],[-1,' }'],[-1,' '],[-1,' \/\/ being liberal by replacing \"+\" with \" \"'],[0,' var value = (keyValue[1] || \'\').replace(\/\\+\/g, \" \");'],[-1,''],[0,' try {'],[0,' value = decodeURIComponent(value);'],[-1,' } catch (err) {'],[0,' value = unescape(value);'],[-1,' }'],[-1,' '],[-1,' \/\/ follow OGC convention of comma delimited values'],[0,' if (options.splitArgs !== false) {'],[0,' value = value.split(\",\");'],[-1,' }'],[-1,''],[-1,' \/\/if there\'s only one value, do not return as array '],[0,' if (value.length == 1) {'],[0,' value = value[0];'],[-1,' } '],[-1,' '],[0,' parameters[key] = value;'],[-1,' }'],[-1,' }'],[0,' return parameters;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Property: lastSeqID'],[-1,' * {Integer} The ever-incrementing count variable.'],[-1,' * Used for generating unique ids.'],[-1,' *\/'],[1,'OpenLayers.Util.lastSeqID = 0;'],[-1,''],[-1,'\/**'],[-1,' * Function: createUniqueID'],[-1,' * Create a unique identifier for this session. Each time this function'],[-1,' * is called, a counter is incremented. The return will be the optional'],[-1,' * prefix (defaults to \"id_\") appended with the counter value.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * prefix - {String} Optional string to prefix unique id. Default is \"id_\".'],[-1,' * Note that dots (\".\") in the prefix will be replaced with underscore (\"_\").'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A unique id string, built on the passed in prefix.'],[-1,' *\/'],[1,'OpenLayers.Util.createUniqueID = function(prefix) {'],[1,' if (prefix == null) {'],[0,' prefix = \"id_\";'],[-1,' } else {'],[1,' prefix = prefix.replace(OpenLayers.Util.dotless, \"_\");'],[-1,' }'],[1,' OpenLayers.Util.lastSeqID += 1; '],[1,' return prefix + OpenLayers.Util.lastSeqID; '],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Constant: INCHES_PER_UNIT'],[-1,' * {Object} Constant inches per unit -- borrowed from MapServer mapscale.c'],[-1,' * derivation of nautical miles from http:\/\/en.wikipedia.org\/wiki\/Nautical_mile'],[-1,' * Includes the full set of units supported by CS-MAP (http:\/\/trac.osgeo.org\/csmap\/)'],[-1,' * and PROJ.4 (http:\/\/trac.osgeo.org\/proj\/)'],[-1,' * The hardcoded table is maintain in a CS-MAP source code module named CSdataU.c'],[-1,' * The hardcoded table of PROJ.4 units are in pj_units.c.'],[-1,' *\/'],[1,'OpenLayers.INCHES_PER_UNIT = { '],[-1,' \'inches\': 1.0,'],[-1,' \'ft\': 12.0,'],[-1,' \'mi\': 63360.0,'],[-1,' \'m\': 39.37,'],[-1,' \'km\': 39370,'],[-1,' \'dd\': 4374754,'],[-1,' \'yd\': 36'],[-1,'};'],[1,'OpenLayers.INCHES_PER_UNIT[\"in\"]= OpenLayers.INCHES_PER_UNIT.inches;'],[1,'OpenLayers.INCHES_PER_UNIT[\"degrees\"] = OpenLayers.INCHES_PER_UNIT.dd;'],[1,'OpenLayers.INCHES_PER_UNIT[\"nmi\"] = 1852 * OpenLayers.INCHES_PER_UNIT.m;'],[-1,''],[-1,'\/\/ Units from CS-Map'],[1,'OpenLayers.METERS_PER_INCH = 0.02540005080010160020;'],[1,'OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT, {'],[-1,' \"Inch\": OpenLayers.INCHES_PER_UNIT.inches,'],[-1,' \"Meter\": 1.0 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9001'],[-1,' \"Foot\": 0.30480060960121920243 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9003'],[-1,' \"IFoot\": 0.30480000000000000000 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9002'],[-1,' \"ClarkeFoot\": 0.3047972651151 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9005'],[-1,' \"SearsFoot\": 0.30479947153867624624 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9041'],[-1,' \"GoldCoastFoot\": 0.30479971018150881758 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9094'],[-1,' \"IInch\": 0.02540000000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"MicroInch\": 0.00002540000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Mil\": 0.00000002540000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Centimeter\": 0.01000000000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Kilometer\": 1000.00000000000000000000 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9036'],[-1,' \"Yard\": 0.91440182880365760731 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"SearsYard\": 0.914398414616029 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9040'],[-1,' \"IndianYard\": 0.91439853074444079983 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9084'],[-1,' \"IndianYd37\": 0.91439523 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9085'],[-1,' \"IndianYd62\": 0.9143988 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9086'],[-1,' \"IndianYd75\": 0.9143985 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9087'],[-1,' \"IndianFoot\": 0.30479951 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9080'],[-1,' \"IndianFt37\": 0.30479841 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9081'],[-1,' \"IndianFt62\": 0.3047996 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9082'],[-1,' \"IndianFt75\": 0.3047995 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9083'],[-1,' \"Mile\": 1609.34721869443738887477 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"IYard\": 0.91440000000000000000 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9096'],[-1,' \"IMile\": 1609.34400000000000000000 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9093'],[-1,' \"NautM\": 1852.00000000000000000000 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9030'],[-1,' \"Lat-66\": 110943.316488932731 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Lat-83\": 110946.25736872234125 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Decimeter\": 0.10000000000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Millimeter\": 0.00100000000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Dekameter\": 10.00000000000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Decameter\": 10.00000000000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Hectometer\": 100.00000000000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"GermanMeter\": 1.0000135965 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9031'],[-1,' \"CaGrid\": 0.999738 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"ClarkeChain\": 20.1166194976 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9038'],[-1,' \"GunterChain\": 20.11684023368047 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9033'],[-1,' \"BenoitChain\": 20.116782494375872 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9062'],[-1,' \"SearsChain\": 20.11676512155 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9042'],[-1,' \"ClarkeLink\": 0.201166194976 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9039'],[-1,' \"GunterLink\": 0.2011684023368047 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9034'],[-1,' \"BenoitLink\": 0.20116782494375872 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9063'],[-1,' \"SearsLink\": 0.2011676512155 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9043'],[-1,' \"Rod\": 5.02921005842012 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"IntnlChain\": 20.1168 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9097'],[-1,' \"IntnlLink\": 0.201168 \/ OpenLayers.METERS_PER_INCH, \/\/EPSG:9098'],[-1,' \"Perch\": 5.02921005842012 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Pole\": 5.02921005842012 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Furlong\": 201.1684023368046 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Rood\": 3.778266898 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"CapeFoot\": 0.3047972615 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Brealey\": 375.00000000000000000000 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"ModAmFt\": 0.304812252984505969011938 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"Fathom\": 1.8288 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"NautM-UK\": 1853.184 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"50kilometers\": 50000.0 \/ OpenLayers.METERS_PER_INCH,'],[-1,' \"150kilometers\": 150000.0 \/ OpenLayers.METERS_PER_INCH'],[-1,'});'],[-1,''],[-1,'\/\/unit abbreviations supported by PROJ.4'],[1,'OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT, {'],[-1,' \"mm\": OpenLayers.INCHES_PER_UNIT[\"Meter\"] \/ 1000.0,'],[-1,' \"cm\": OpenLayers.INCHES_PER_UNIT[\"Meter\"] \/ 100.0,'],[-1,' \"dm\": OpenLayers.INCHES_PER_UNIT[\"Meter\"] * 100.0,'],[-1,' \"km\": OpenLayers.INCHES_PER_UNIT[\"Meter\"] * 1000.0,'],[-1,' \"kmi\": OpenLayers.INCHES_PER_UNIT[\"nmi\"], \/\/International Nautical Mile'],[-1,' \"fath\": OpenLayers.INCHES_PER_UNIT[\"Fathom\"], \/\/International Fathom'],[-1,' \"ch\": OpenLayers.INCHES_PER_UNIT[\"IntnlChain\"], \/\/International Chain'],[-1,' \"link\": OpenLayers.INCHES_PER_UNIT[\"IntnlLink\"], \/\/International Link'],[-1,' \"us-in\": OpenLayers.INCHES_PER_UNIT[\"inches\"], \/\/U.S. Surveyor\'s Inch'],[-1,' \"us-ft\": OpenLayers.INCHES_PER_UNIT[\"Foot\"], \/\/U.S. Surveyor\'s Foot'],[-1,' \"us-yd\": OpenLayers.INCHES_PER_UNIT[\"Yard\"], \/\/U.S. Surveyor\'s Yard'],[-1,' \"us-ch\": OpenLayers.INCHES_PER_UNIT[\"GunterChain\"], \/\/U.S. Surveyor\'s Chain'],[-1,' \"us-mi\": OpenLayers.INCHES_PER_UNIT[\"Mile\"], \/\/U.S. Surveyor\'s Statute Mile'],[-1,' \"ind-yd\": OpenLayers.INCHES_PER_UNIT[\"IndianYd37\"], \/\/Indian Yard'],[-1,' \"ind-ft\": OpenLayers.INCHES_PER_UNIT[\"IndianFt37\"], \/\/Indian Foot'],[-1,' \"ind-ch\": 20.11669506 \/ OpenLayers.METERS_PER_INCH \/\/Indian Chain'],[-1,'});'],[-1,''],[-1,'\/** '],[-1,' * Constant: DOTS_PER_INCH'],[-1,' * {Integer} 72 (A sensible default)'],[-1,' *\/'],[1,'OpenLayers.DOTS_PER_INCH = 72;'],[-1,''],[-1,'\/**'],[-1,' * Function: normalizeScale'],[-1,' * '],[-1,' * Parameters:'],[-1,' * scale - {float}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} A normalized scale value, in 1 \/ X format. '],[-1,' * This means that if a value less than one ( already 1\/x) is passed'],[-1,' * in, it just returns scale directly. Otherwise, it returns '],[-1,' * 1 \/ scale'],[-1,' *\/'],[1,'OpenLayers.Util.normalizeScale = function (scale) {'],[0,' var normScale = (scale > 1.0) ? (1.0 \/ scale) '],[-1,' : scale;'],[0,' return normScale;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: getResolutionFromScale'],[-1,' * '],[-1,' * Parameters:'],[-1,' * scale - {Float}'],[-1,' * units - {String} Index into OpenLayers.INCHES_PER_UNIT hashtable.'],[-1,' * Default is degrees'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The corresponding resolution given passed-in scale and unit '],[-1,' * parameters. If the given scale is falsey, the returned resolution will'],[-1,' * be undefined.'],[-1,' *\/'],[1,'OpenLayers.Util.getResolutionFromScale = function (scale, units) {'],[0,' var resolution;'],[0,' if (scale) {'],[0,' if (units == null) {'],[0,' units = \"degrees\";'],[-1,' }'],[0,' var normScale = OpenLayers.Util.normalizeScale(scale);'],[0,' resolution = 1 \/ (normScale * OpenLayers.INCHES_PER_UNIT[units]'],[-1,' * OpenLayers.DOTS_PER_INCH); '],[-1,' }'],[0,' return resolution;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: getScaleFromResolution'],[-1,' * '],[-1,' * Parameters:'],[-1,' * resolution - {Float}'],[-1,' * units - {String} Index into OpenLayers.INCHES_PER_UNIT hashtable.'],[-1,' * Default is degrees'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The corresponding scale given passed-in resolution and unit '],[-1,' * parameters.'],[-1,' *\/'],[1,'OpenLayers.Util.getScaleFromResolution = function (resolution, units) {'],[-1,''],[0,' if (units == null) {'],[0,' units = \"degrees\";'],[-1,' }'],[-1,''],[0,' var scale = resolution * OpenLayers.INCHES_PER_UNIT[units] *'],[-1,' OpenLayers.DOTS_PER_INCH;'],[0,' return scale;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: pagePosition'],[-1,' * Calculates the position of an element on the page (see'],[-1,' * http:\/\/code.google.com\/p\/doctype\/wiki\/ArticlePageOffset)'],[-1,' *'],[-1,' * OpenLayers.Util.pagePosition is based on Yahoo\'s getXY method, which is'],[-1,' * Copyright (c) 2006, Yahoo! Inc.'],[-1,' * All rights reserved.'],[-1,' * '],[-1,' * Redistribution and use of this software in source and binary forms, with or'],[-1,' * without modification, are permitted provided that the following conditions'],[-1,' * are met:'],[-1,' * '],[-1,' * * Redistributions of source code must retain the above copyright notice,'],[-1,' * this list of conditions and the following disclaimer.'],[-1,' * '],[-1,' * * Redistributions in binary form must reproduce the above copyright notice,'],[-1,' * this list of conditions and the following disclaimer in the documentation'],[-1,' * and\/or other materials provided with the distribution.'],[-1,' * '],[-1,' * * Neither the name of Yahoo! Inc. nor the names of its contributors may be'],[-1,' * used to endorse or promote products derived from this software without'],[-1,' * specific prior written permission of Yahoo! Inc.'],[-1,' * '],[-1,' * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"'],[-1,' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE'],[-1,' * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE'],[-1,' * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE'],[-1,' * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR'],[-1,' * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF'],[-1,' * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS'],[-1,' * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN'],[-1,' * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)'],[-1,' * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE '],[-1,' * POSSIBILITY OF SUCH DAMAGE.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * forElement - {DOMElement}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Array} two item array, Left value then Top value.'],[-1,' *\/'],[1,'OpenLayers.Util.pagePosition = function(forElement) {'],[-1,' \/\/ NOTE: If element is hidden (display none or disconnected or any the'],[-1,' \/\/ ancestors are hidden) we get (0,0) by default but we still do the'],[-1,' \/\/ accumulation of scroll position.'],[-1,''],[0,' var pos = [0, 0];'],[0,' var viewportElement = OpenLayers.Util.getViewportElement();'],[0,' if (!forElement || forElement == window || forElement == viewportElement) {'],[-1,' \/\/ viewport is always at 0,0 as that defined the coordinate system for'],[-1,' \/\/ this function - this avoids special case checks in the code below'],[0,' return pos;'],[-1,' }'],[-1,''],[-1,' \/\/ Gecko browsers normally use getBoxObjectFor to calculate the position.'],[-1,' \/\/ When invoked for an element with an implicit absolute position though it'],[-1,' \/\/ can be off by one. Therefore the recursive implementation is used in'],[-1,' \/\/ those (relatively rare) cases.'],[0,' var BUGGY_GECKO_BOX_OBJECT ='],[-1,' OpenLayers.IS_GECKO && document.getBoxObjectFor &&'],[-1,' OpenLayers.Element.getStyle(forElement, \'position\') == \'absolute\' &&'],[-1,' (forElement.style.top == \'\' || forElement.style.left == \'\');'],[-1,''],[0,' var parent = null;'],[0,' var box;'],[-1,''],[0,' if (forElement.getBoundingClientRect) { \/\/ IE'],[0,' box = forElement.getBoundingClientRect();'],[0,' var scrollTop = window.pageYOffset || viewportElement.scrollTop;'],[0,' var scrollLeft = window.pageXOffset || viewportElement.scrollLeft;'],[-1,' '],[0,' pos[0] = box.left + scrollLeft;'],[0,' pos[1] = box.top + scrollTop;'],[-1,''],[0,' } else if (document.getBoxObjectFor && !BUGGY_GECKO_BOX_OBJECT) { \/\/ gecko'],[-1,' \/\/ Gecko ignores the scroll values for ancestors, up to 1.9. See:'],[-1,' \/\/ https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=328881 and'],[-1,' \/\/ https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=330619'],[-1,''],[0,' box = document.getBoxObjectFor(forElement);'],[0,' var vpBox = document.getBoxObjectFor(viewportElement);'],[0,' pos[0] = box.screenX - vpBox.screenX;'],[0,' pos[1] = box.screenY - vpBox.screenY;'],[-1,''],[-1,' } else { \/\/ safari\/opera'],[0,' pos[0] = forElement.offsetLeft;'],[0,' pos[1] = forElement.offsetTop;'],[0,' parent = forElement.offsetParent;'],[0,' if (parent != forElement) {'],[0,' while (parent) {'],[0,' pos[0] += parent.offsetLeft;'],[0,' pos[1] += parent.offsetTop;'],[0,' parent = parent.offsetParent;'],[-1,' }'],[-1,' }'],[-1,''],[0,' var browser = OpenLayers.BROWSER_NAME;'],[-1,''],[-1,' \/\/ opera & (safari absolute) incorrectly account for body offsetTop'],[0,' if (browser == \"opera\" || (browser == \"safari\" &&'],[-1,' OpenLayers.Element.getStyle(forElement, \'position\') == \'absolute\')) {'],[0,' pos[1] -= document.body.offsetTop;'],[-1,' }'],[-1,''],[-1,' \/\/ accumulate the scroll positions for everything but the body element'],[0,' parent = forElement.offsetParent;'],[0,' while (parent && parent != document.body) {'],[0,' pos[0] -= parent.scrollLeft;'],[-1,' \/\/ see https:\/\/bugs.opera.com\/show_bug.cgi?id=249965'],[0,' if (browser != \"opera\" || parent.tagName != \'TR\') {'],[0,' pos[1] -= parent.scrollTop;'],[-1,' }'],[0,' parent = parent.offsetParent;'],[-1,' }'],[-1,' }'],[-1,' '],[0,' return pos;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: getViewportElement'],[-1,' * Returns die viewport element of the document. The viewport element is'],[-1,' * usually document.documentElement, except in IE,where it is either'],[-1,' * document.body or document.documentElement, depending on the document\'s'],[-1,' * compatibility mode (see'],[-1,' * http:\/\/code.google.com\/p\/doctype\/wiki\/ArticleClientViewportElement)'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[1,'OpenLayers.Util.getViewportElement = function() {'],[0,' var viewportElement = arguments.callee.viewportElement;'],[0,' if (viewportElement == undefined) {'],[0,' viewportElement = (OpenLayers.BROWSER_NAME == \"msie\" &&'],[-1,' document.compatMode != \'CSS1Compat\') ? document.body :'],[-1,' document.documentElement;'],[0,' arguments.callee.viewportElement = viewportElement;'],[-1,' }'],[0,' return viewportElement;'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: isEquivalentUrl'],[-1,' * Test two URLs for equivalence. '],[-1,' * '],[-1,' * Setting \'ignoreCase\' allows for case-independent comparison.'],[-1,' * '],[-1,' * Comparison is based on: '],[-1,' * - Protocol'],[-1,' * - Host (evaluated without the port)'],[-1,' * - Port (set \'ignorePort80\' to ignore \"80\" values)'],[-1,' * - Hash ( set \'ignoreHash\' to disable)'],[-1,' * - Pathname (for relative <-> absolute comparison) '],[-1,' * - Arguments (so they can be out of order)'],[-1,' * '],[-1,' * Parameters:'],[-1,' * url1 - {String}'],[-1,' * url2 - {String}'],[-1,' * options - {Object} Allows for customization of comparison:'],[-1,' * \'ignoreCase\' - Default is True'],[-1,' * \'ignorePort80\' - Default is True'],[-1,' * \'ignoreHash\' - Default is True'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the two URLs are equivalent'],[-1,' *\/'],[1,'OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) {'],[0,' options = options || {};'],[-1,''],[0,' OpenLayers.Util.applyDefaults(options, {'],[-1,' ignoreCase: true,'],[-1,' ignorePort80: true,'],[-1,' ignoreHash: true,'],[-1,' splitArgs: false'],[-1,' });'],[-1,''],[0,' var urlObj1 = OpenLayers.Util.createUrlObject(url1, options);'],[0,' var urlObj2 = OpenLayers.Util.createUrlObject(url2, options);'],[-1,''],[-1,' \/\/compare all keys except for \"args\" (treated below)'],[0,' for(var key in urlObj1) {'],[0,' if(key !== \"args\") {'],[0,' if(urlObj1[key] != urlObj2[key]) {'],[0,' return false;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ compare search args - irrespective of order'],[0,' for(var key in urlObj1.args) {'],[0,' if(urlObj1.args[key] != urlObj2.args[key]) {'],[0,' return false;'],[-1,' }'],[0,' delete urlObj2.args[key];'],[-1,' }'],[-1,' \/\/ urlObj2 shouldn\'t have any args left'],[0,' for(var key in urlObj2.args) {'],[0,' return false;'],[-1,' }'],[-1,' '],[0,' return true;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: createUrlObject'],[-1,' * '],[-1,' * Parameters:'],[-1,' * url - {String}'],[-1,' * options - {Object} A hash of options.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * ignoreCase - {Boolean} lowercase url,'],[-1,' * ignorePort80 - {Boolean} don\'t include explicit port if port is 80,'],[-1,' * ignoreHash - {Boolean} Don\'t include part of url after the hash (#).'],[-1,' * splitArgs - {Boolean} Split comma delimited params into arrays? Default is'],[-1,' * true.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} An object with separate url, a, port, host, and args parsed out '],[-1,' * and ready for comparison'],[-1,' *\/'],[1,'OpenLayers.Util.createUrlObject = function(url, options) {'],[0,' options = options || {};'],[-1,''],[-1,' \/\/ deal with relative urls first'],[0,' if(!(\/^\\w+:\\\/\\\/\/).test(url)) {'],[0,' var loc = window.location;'],[0,' var port = loc.port ? \":\" + loc.port : \"\";'],[0,' var fullUrl = loc.protocol + \"\/\/\" + loc.host.split(\":\").shift() + port;'],[0,' if(url.indexOf(\"\/\") === 0) {'],[-1,' \/\/ full pathname'],[0,' url = fullUrl + url;'],[-1,' } else {'],[-1,' \/\/ relative to current path'],[0,' var parts = loc.pathname.split(\"\/\");'],[0,' parts.pop();'],[0,' url = fullUrl + parts.join(\"\/\") + \"\/\" + url;'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if (options.ignoreCase) {'],[0,' url = url.toLowerCase(); '],[-1,' }'],[-1,''],[0,' var a = document.createElement(\'a\');'],[0,' a.href = url;'],[-1,' '],[0,' var urlObject = {};'],[-1,' '],[-1,' \/\/host (without port)'],[0,' urlObject.host = a.host.split(\":\").shift();'],[-1,''],[-1,' \/\/protocol'],[0,' urlObject.protocol = a.protocol; '],[-1,''],[-1,' \/\/port (get uniform browser behavior with port 80 here)'],[0,' if(options.ignorePort80) {'],[0,' urlObject.port = (a.port == \"80\" || a.port == \"0\") ? \"\" : a.port;'],[-1,' } else {'],[0,' urlObject.port = (a.port == \"\" || a.port == \"0\") ? \"80\" : a.port;'],[-1,' }'],[-1,''],[-1,' \/\/hash'],[0,' urlObject.hash = (options.ignoreHash || a.hash === \"#\") ? \"\" : a.hash; '],[-1,' '],[-1,' \/\/args'],[0,' var queryString = a.search;'],[0,' if (!queryString) {'],[0,' var qMark = url.indexOf(\"?\");'],[0,' queryString = (qMark != -1) ? url.substr(qMark) : \"\";'],[-1,' }'],[0,' urlObject.args = OpenLayers.Util.getParameters(queryString,'],[-1,' {splitArgs: options.splitArgs});'],[-1,''],[-1,' \/\/ pathname'],[-1,' \/\/'],[-1,' \/\/ This is a workaround for Internet Explorer where'],[-1,' \/\/ window.location.pathname has a leading \"\/\", but'],[-1,' \/\/ a.pathname has no leading \"\/\".'],[0,' urlObject.pathname = (a.pathname.charAt(0) == \"\/\") ? a.pathname : \"\/\" + a.pathname;'],[-1,' '],[0,' return urlObject; '],[-1,'};'],[-1,' '],[-1,'\/**'],[-1,' * Function: removeTail'],[-1,' * Takes a url and removes everything after the ? and #'],[-1,' * '],[-1,' * Parameters:'],[-1,' * url - {String} The url to process'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The string with all queryString and Hash removed'],[-1,' *\/'],[1,'OpenLayers.Util.removeTail = function(url) {'],[0,' var head = null;'],[-1,' '],[0,' var qMark = url.indexOf(\"?\");'],[0,' var hashMark = url.indexOf(\"#\");'],[-1,''],[0,' if (qMark == -1) {'],[0,' head = (hashMark != -1) ? url.substr(0,hashMark) : url;'],[-1,' } else {'],[0,' head = (hashMark != -1) ? url.substr(0,Math.min(qMark, hashMark)) '],[-1,' : url.substr(0, qMark);'],[-1,' }'],[0,' return head;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Constant: IS_GECKO'],[-1,' * {Boolean} True if the userAgent reports the browser to use the Gecko engine'],[-1,' *\/'],[1,'OpenLayers.IS_GECKO = (function() {'],[1,' var ua = navigator.userAgent.toLowerCase();'],[1,' return ua.indexOf(\"webkit\") == -1 && ua.indexOf(\"gecko\") != -1;'],[-1,'})();'],[-1,''],[-1,'\/**'],[-1,' * Constant: CANVAS_SUPPORTED'],[-1,' * {Boolean} True if canvas 2d is supported.'],[-1,' *\/'],[1,'OpenLayers.CANVAS_SUPPORTED = (function() {'],[1,' var elem = document.createElement(\'canvas\');'],[1,' return !!(elem.getContext && elem.getContext(\'2d\'));'],[-1,'})();'],[-1,''],[-1,'\/**'],[-1,' * Constant: BROWSER_NAME'],[-1,' * {String}'],[-1,' * A substring of the navigator.userAgent property. Depending on the userAgent'],[-1,' * property, this will be the empty string or one of the following:'],[-1,' * * \"opera\" -- Opera'],[-1,' * * \"msie\" -- Internet Explorer'],[-1,' * * \"safari\" -- Safari'],[-1,' * * \"firefox\" -- Firefox'],[-1,' * * \"mozilla\" -- Mozilla'],[-1,' *\/'],[1,'OpenLayers.BROWSER_NAME = (function() {'],[1,' var name = \"\";'],[1,' var ua = navigator.userAgent.toLowerCase();'],[1,' if (ua.indexOf(\"opera\") != -1) {'],[0,' name = \"opera\";'],[1,' } else if (ua.indexOf(\"msie\") != -1) {'],[0,' name = \"msie\";'],[1,' } else if (ua.indexOf(\"safari\") != -1) {'],[1,' name = \"safari\";'],[0,' } else if (ua.indexOf(\"mozilla\") != -1) {'],[0,' if (ua.indexOf(\"firefox\") != -1) {'],[0,' name = \"firefox\";'],[-1,' } else {'],[0,' name = \"mozilla\";'],[-1,' }'],[-1,' }'],[1,' return name;'],[-1,'})();'],[-1,''],[-1,'\/**'],[-1,' * Function: getBrowserName'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A string which specifies which is the current '],[-1,' * browser in which we are running. '],[-1,' * '],[-1,' * Currently-supported browser detection and codes:'],[-1,' * * \'opera\' -- Opera'],[-1,' * * \'msie\' -- Internet Explorer'],[-1,' * * \'safari\' -- Safari'],[-1,' * * \'firefox\' -- Firefox'],[-1,' * * \'mozilla\' -- Mozilla'],[-1,' * '],[-1,' * If we are unable to property identify the browser, we '],[-1,' * return an empty string.'],[-1,' *\/'],[1,'OpenLayers.Util.getBrowserName = function() {'],[0,' return OpenLayers.BROWSER_NAME;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Method: getRenderedDimensions'],[-1,' * Renders the contentHTML offscreen to determine actual dimensions for'],[-1,' * popup sizing. As we need layout to determine dimensions the content'],[-1,' * is rendered -9999px to the left and absolute to ensure the '],[-1,' * scrollbars do not flicker'],[-1,' * '],[-1,' * Parameters:'],[-1,' * contentHTML'],[-1,' * size - {<OpenLayers.Size>} If either the \'w\' or \'h\' properties is '],[-1,' * specified, we fix that dimension of the div to be measured. This is '],[-1,' * useful in the case where we have a limit in one dimension and must '],[-1,' * therefore meaure the flow in the other dimension.'],[-1,' * options - {Object}'],[-1,' *'],[-1,' * Allowed Options:'],[-1,' * displayClass - {String} Optional parameter. A CSS class name(s) string'],[-1,' * to provide the CSS context of the rendered content.'],[-1,' * containerElement - {DOMElement} Optional parameter. Insert the HTML to '],[-1,' * this node instead of the body root when calculating dimensions. '],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Size>}'],[-1,' *\/'],[1,'OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) {'],[-1,' '],[0,' var w, h;'],[-1,' '],[-1,' \/\/ create temp container div with restricted size'],[0,' var container = document.createElement(\"div\");'],[0,' container.style.visibility = \"hidden\";'],[-1,' '],[0,' var containerElement = (options && options.containerElement) '],[-1,' ? options.containerElement : document.body;'],[-1,' '],[-1,' \/\/ Opera and IE7 can\'t handle a node with position:aboslute if it inherits'],[-1,' \/\/ position:absolute from a parent.'],[0,' var parentHasPositionAbsolute = false;'],[0,' var superContainer = null;'],[0,' var parent = containerElement;'],[0,' while (parent && parent.tagName.toLowerCase()!=\"body\") {'],[0,' var parentPosition = OpenLayers.Element.getStyle(parent, \"position\");'],[0,' if(parentPosition == \"absolute\") {'],[0,' parentHasPositionAbsolute = true;'],[0,' break;'],[0,' } else if (parentPosition && parentPosition != \"static\") {'],[0,' break;'],[-1,' }'],[0,' parent = parent.parentNode;'],[-1,' }'],[0,' if(parentHasPositionAbsolute && (containerElement.clientHeight === 0 || '],[-1,' containerElement.clientWidth === 0) ){'],[0,' superContainer = document.createElement(\"div\");'],[0,' superContainer.style.visibility = \"hidden\";'],[0,' superContainer.style.position = \"absolute\";'],[0,' superContainer.style.overflow = \"visible\";'],[0,' superContainer.style.width = document.body.clientWidth + \"px\";'],[0,' superContainer.style.height = document.body.clientHeight + \"px\";'],[0,' superContainer.appendChild(container);'],[-1,' }'],[0,' container.style.position = \"absolute\";'],[-1,''],[-1,' \/\/fix a dimension, if specified.'],[0,' if (size) {'],[0,' if (size.w) {'],[0,' w = size.w;'],[0,' container.style.width = w + \"px\";'],[0,' } else if (size.h) {'],[0,' h = size.h;'],[0,' container.style.height = h + \"px\";'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/add css classes, if specified'],[0,' if (options && options.displayClass) {'],[0,' container.className = options.displayClass;'],[-1,' }'],[-1,' '],[-1,' \/\/ create temp content div and assign content'],[0,' var content = document.createElement(\"div\");'],[0,' content.innerHTML = contentHTML;'],[-1,' '],[-1,' \/\/ we need overflow visible when calculating the size'],[0,' content.style.overflow = \"visible\";'],[0,' if (content.childNodes) {'],[0,' for (var i=0, l=content.childNodes.length; i<l; i++) {'],[0,' if (!content.childNodes[i].style) continue;'],[0,' content.childNodes[i].style.overflow = \"visible\";'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' \/\/ add content to restricted container '],[0,' container.appendChild(content);'],[-1,' '],[-1,' \/\/ append container to body for rendering'],[0,' if (superContainer) {'],[0,' containerElement.appendChild(superContainer);'],[-1,' } else {'],[0,' containerElement.appendChild(container);'],[-1,' }'],[-1,' '],[-1,' \/\/ calculate scroll width of content and add corners and shadow width'],[0,' if (!w) {'],[0,' w = parseInt(content.scrollWidth);'],[-1,' '],[-1,' \/\/ update container width to allow height to adjust'],[0,' container.style.width = w + \"px\";'],[-1,' } '],[-1,' \/\/ capture height and add shadow and corner image widths'],[0,' if (!h) {'],[0,' h = parseInt(content.scrollHeight);'],[-1,' }'],[-1,''],[-1,' \/\/ remove elements'],[0,' container.removeChild(content);'],[0,' if (superContainer) {'],[0,' superContainer.removeChild(container);'],[0,' containerElement.removeChild(superContainer);'],[-1,' } else {'],[0,' containerElement.removeChild(container);'],[-1,' }'],[-1,' '],[0,' return new OpenLayers.Size(w, h);'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * APIFunction: getScrollbarWidth'],[-1,' * This function has been modified by the OpenLayers from the original version,'],[-1,' * written by Matthew Eernisse and released under the Apache 2 '],[-1,' * license here:'],[-1,' * '],[-1,' * http:\/\/www.fleegix.org\/articles\/2006\/05\/30\/getting-the-scrollbar-width-in-pixels'],[-1,' * '],[-1,' * It has been modified simply to cache its value, since it is physically '],[-1,' * impossible that this code could ever run in more than one browser at '],[-1,' * once. '],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer}'],[-1,' *\/'],[1,'OpenLayers.Util.getScrollbarWidth = function() {'],[-1,' '],[0,' var scrollbarWidth = OpenLayers.Util._scrollbarWidth;'],[-1,' '],[0,' if (scrollbarWidth == null) {'],[0,' var scr = null;'],[0,' var inn = null;'],[0,' var wNoScroll = 0;'],[0,' var wScroll = 0;'],[-1,' '],[-1,' \/\/ Outer scrolling div'],[0,' scr = document.createElement(\'div\');'],[0,' scr.style.position = \'absolute\';'],[0,' scr.style.top = \'-1000px\';'],[0,' scr.style.left = \'-1000px\';'],[0,' scr.style.width = \'100px\';'],[0,' scr.style.height = \'50px\';'],[-1,' \/\/ Start with no scrollbar'],[0,' scr.style.overflow = \'hidden\';'],[-1,' '],[-1,' \/\/ Inner content div'],[0,' inn = document.createElement(\'div\');'],[0,' inn.style.width = \'100%\';'],[0,' inn.style.height = \'200px\';'],[-1,' '],[-1,' \/\/ Put the inner div in the scrolling div'],[0,' scr.appendChild(inn);'],[-1,' \/\/ Append the scrolling div to the doc'],[0,' document.body.appendChild(scr);'],[-1,' '],[-1,' \/\/ Width of the inner div sans scrollbar'],[0,' wNoScroll = inn.offsetWidth;'],[-1,' '],[-1,' \/\/ Add the scrollbar'],[0,' scr.style.overflow = \'scroll\';'],[-1,' \/\/ Width of the inner div width scrollbar'],[0,' wScroll = inn.offsetWidth;'],[-1,' '],[-1,' \/\/ Remove the scrolling div from the doc'],[0,' document.body.removeChild(document.body.lastChild);'],[-1,' '],[-1,' \/\/ Pixel width of the scroller'],[0,' OpenLayers.Util._scrollbarWidth = (wNoScroll - wScroll);'],[0,' scrollbarWidth = OpenLayers.Util._scrollbarWidth;'],[-1,' }'],[-1,''],[0,' return scrollbarWidth;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * APIFunction: getFormattedLonLat'],[-1,' * This function will return latitude or longitude value formatted as '],[-1,' *'],[-1,' * Parameters:'],[-1,' * coordinate - {Float} the coordinate value to be formatted'],[-1,' * axis - {String} value of either \'lat\' or \'lon\' to indicate which axis is to'],[-1,' * to be formatted (default = lat)'],[-1,' * dmsOption - {String} specify the precision of the output can be one of:'],[-1,' * \'dms\' show degrees minutes and seconds'],[-1,' * \'dm\' show only degrees and minutes'],[-1,' * \'d\' show only degrees'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} the coordinate value formatted as a string'],[-1,' *\/'],[1,'OpenLayers.Util.getFormattedLonLat = function(coordinate, axis, dmsOption) {'],[0,' if (!dmsOption) {'],[0,' dmsOption = \'dms\'; \/\/default to show degree, minutes, seconds'],[-1,' }'],[-1,''],[0,' coordinate = (coordinate+540)%360 - 180; \/\/ normalize for sphere being round'],[-1,''],[0,' var abscoordinate = Math.abs(coordinate);'],[0,' var coordinatedegrees = Math.floor(abscoordinate);'],[-1,''],[0,' var coordinateminutes = (abscoordinate - coordinatedegrees)\/(1\/60);'],[0,' var tempcoordinateminutes = coordinateminutes;'],[0,' coordinateminutes = Math.floor(coordinateminutes);'],[0,' var coordinateseconds = (tempcoordinateminutes - coordinateminutes)\/(1\/60);'],[0,' coordinateseconds = Math.round(coordinateseconds*10);'],[0,' coordinateseconds \/= 10;'],[-1,''],[0,' if( coordinateseconds >= 60) { '],[0,' coordinateseconds -= 60; '],[0,' coordinateminutes += 1; '],[0,' if( coordinateminutes >= 60) { '],[0,' coordinateminutes -= 60; '],[0,' coordinatedegrees += 1; '],[-1,' } '],[-1,' }'],[-1,' '],[0,' if( coordinatedegrees < 10 ) {'],[0,' coordinatedegrees = \"0\" + coordinatedegrees;'],[-1,' }'],[0,' var str = coordinatedegrees + \"\\u00B0\";'],[-1,''],[0,' if (dmsOption.indexOf(\'dm\') >= 0) {'],[0,' if( coordinateminutes < 10 ) {'],[0,' coordinateminutes = \"0\" + coordinateminutes;'],[-1,' }'],[0,' str += coordinateminutes + \"\'\";'],[-1,' '],[0,' if (dmsOption.indexOf(\'dms\') >= 0) {'],[0,' if( coordinateseconds < 10 ) {'],[0,' coordinateseconds = \"0\" + coordinateseconds;'],[-1,' }'],[0,' str += coordinateseconds + \'\"\';'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if (axis == \"lon\") {'],[0,' str += coordinate < 0 ? OpenLayers.i18n(\"W\") : OpenLayers.i18n(\"E\");'],[-1,' } else {'],[0,' str += coordinate < 0 ? OpenLayers.i18n(\"S\") : OpenLayers.i18n(\"N\");'],[-1,' }'],[0,' return str;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: getConstructor'],[-1,' * Take an OpenLayers style CLASS_NAME and return a constructor.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * className - {String} The dot delimited class name (e.g. \'OpenLayers.Foo\').'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Function} The constructor.'],[-1,' *\/'],[1,'OpenLayers.Util.getConstructor = function(className) {'],[0,' var Constructor;'],[0,' var parts = className.split(\'.\');'],[0,' if (parts[0] === \"OpenLayers\") {'],[0,' Constructor = OpenLayers;'],[-1,' } else {'],[-1,' \/\/ someone extended our base class and used their own namespace'],[-1,' \/\/ this will not work when the library is evaluated in a closure'],[-1,' \/\/ but it is the best we can do (until we ourselves provide a global)'],[0,' Constructor = window[parts[0]];'],[-1,' }'],[0,' for (var i = 1, ii = parts.length; i < ii; ++i) {'],[0,' Constructor = Constructor[parts[i]];'],[-1,' }'],[0,' return Constructor;'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Console.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Console'],[-1,' * The OpenLayers.Console namespace is used for debugging and error logging.'],[-1,' * If the Firebug Lite (..\/Firebug\/firebug.js) is included before this script,'],[-1,' * calls to OpenLayers.Console methods will get redirected to window.console.'],[-1,' * This makes use of the Firebug extension where available and allows for'],[-1,' * cross-browser debugging Firebug style.'],[-1,' *'],[-1,' * Note:'],[-1,' * Note that behavior will differ with the Firebug extension and Firebug Lite.'],[-1,' * Most notably, the Firebug Lite console does not currently allow for'],[-1,' * hyperlinks to code or for clicking on object to explore their properties.'],[-1,' * '],[-1,' *\/'],[1,'OpenLayers.Console = {'],[-1,' \/**'],[-1,' * Create empty functions for all console methods. The real value of these'],[-1,' * properties will be set if Firebug Lite (..\/Firebug\/firebug.js script) is'],[-1,' * included. We explicitly require the Firebug Lite script to trigger'],[-1,' * functionality of the OpenLayers.Console methods.'],[-1,' *\/'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: log'],[-1,' * Log an object in the console. The Firebug Lite console logs string'],[-1,' * representation of objects. Given multiple arguments, they will'],[-1,' * be cast to strings and logged with a space delimiter. If the first'],[-1,' * argument is a string with printf-like formatting, subsequent arguments'],[-1,' * will be used in string substitution. Any additional arguments (beyond'],[-1,' * the number substituted in a format string) will be appended in a space-'],[-1,' * delimited line.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' log: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: debug'],[-1,' * Writes a message to the console, including a hyperlink to the line'],[-1,' * where it was called.'],[-1,' *'],[-1,' * May be called with multiple arguments as with OpenLayers.Console.log().'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' debug: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: info'],[-1,' * Writes a message to the console with the visual \"info\" icon and color'],[-1,' * coding and a hyperlink to the line where it was called.'],[-1,' *'],[-1,' * May be called with multiple arguments as with OpenLayers.Console.log().'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' info: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: warn'],[-1,' * Writes a message to the console with the visual \"warning\" icon and'],[-1,' * color coding and a hyperlink to the line where it was called.'],[-1,' *'],[-1,' * May be called with multiple arguments as with OpenLayers.Console.log().'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' warn: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: error'],[-1,' * Writes a message to the console with the visual \"error\" icon and color'],[-1,' * coding and a hyperlink to the line where it was called.'],[-1,' *'],[-1,' * May be called with multiple arguments as with OpenLayers.Console.log().'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' error: function() {},'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: userError'],[-1,' * A single interface for showing error messages to the user. The default'],[-1,' * behavior is a Javascript alert, though this can be overridden by'],[-1,' * reassigning OpenLayers.Console.userError to a different function.'],[-1,' *'],[-1,' * Expects a single error message'],[-1,' * '],[-1,' * Parameters:'],[-1,' * error - {Object}'],[-1,' *\/'],[-1,' userError: function(error) {'],[0,' alert(error);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: assert'],[-1,' * Tests that an expression is true. If not, it will write a message to'],[-1,' * the console and throw an exception.'],[-1,' *'],[-1,' * May be called with multiple arguments as with OpenLayers.Console.log().'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' assert: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: dir'],[-1,' * Prints an interactive listing of all properties of the object. This'],[-1,' * looks identical to the view that you would see in the DOM tab.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' dir: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: dirxml'],[-1,' * Prints the XML source tree of an HTML or XML element. This looks'],[-1,' * identical to the view that you would see in the HTML tab. You can click'],[-1,' * on any node to inspect it in the HTML tab.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' dirxml: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: trace'],[-1,' * Prints an interactive stack trace of JavaScript execution at the point'],[-1,' * where it is called. The stack trace details the functions on the stack,'],[-1,' * as well as the values that were passed as arguments to each function.'],[-1,' * You can click each function to take you to its source in the Script tab,'],[-1,' * and click each argument value to inspect it in the DOM or HTML tabs.'],[-1,' * '],[-1,' *\/'],[-1,' trace: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: group'],[-1,' * Writes a message to the console and opens a nested block to indent all'],[-1,' * future messages sent to the console. Call OpenLayers.Console.groupEnd()'],[-1,' * to close the block.'],[-1,' *'],[-1,' * May be called with multiple arguments as with OpenLayers.Console.log().'],[-1,' * '],[-1,' * Parameters:'],[-1,' * object - {Object}'],[-1,' *\/'],[-1,' group: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: groupEnd'],[-1,' * Closes the most recently opened block created by a call to'],[-1,' * OpenLayers.Console.group'],[-1,' *\/'],[-1,' groupEnd: function() {},'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: time'],[-1,' * Creates a new timer under the given name. Call'],[-1,' * OpenLayers.Console.timeEnd(name)'],[-1,' * with the same name to stop the timer and print the time elapsed.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String}'],[-1,' *\/'],[-1,' time: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: timeEnd'],[-1,' * Stops a timer created by a call to OpenLayers.Console.time(name) and'],[-1,' * writes the time elapsed.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String}'],[-1,' *\/'],[-1,' timeEnd: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: profile'],[-1,' * Turns on the JavaScript profiler. The optional argument title would'],[-1,' * contain the text to be printed in the header of the profile report.'],[-1,' *'],[-1,' * This function is not currently implemented in Firebug Lite.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * title - {String} Optional title for the profiler'],[-1,' *\/'],[-1,' profile: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: profileEnd'],[-1,' * Turns off the JavaScript profiler and prints its report.'],[-1,' * '],[-1,' * This function is not currently implemented in Firebug Lite.'],[-1,' *\/'],[-1,' profileEnd: function() {},'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: count'],[-1,' * Writes the number of times that the line of code where count was called'],[-1,' * was executed. The optional argument title will print a message in'],[-1,' * addition to the number of the count.'],[-1,' *'],[-1,' * This function is not currently implemented in Firebug Lite.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * title - {String} Optional title to be printed with count'],[-1,' *\/'],[-1,' count: function() {},'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Console\"'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Execute an anonymous function to extend the OpenLayers.Console namespace'],[-1,' * if the firebug.js script is included. This closure is used so that the'],[-1,' * \"scripts\" and \"i\" variables don\'t pollute the global namespace.'],[-1,' *\/'],[1,'(function() {'],[-1,' \/**'],[-1,' * If Firebug Lite is included (before this script), re-route all'],[-1,' * OpenLayers.Console calls to the console object.'],[-1,' *\/'],[1,' var scripts = document.getElementsByTagName(\"script\");'],[1,' for(var i=0, len=scripts.length; i<len; ++i) {'],[6,' if(scripts[i].src.indexOf(\"firebug.js\") != -1) {'],[0,' if(console) {'],[0,' OpenLayers.Util.extend(OpenLayers.Console, console);'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,'})();'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/BaseTypes\/Bounds.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Bounds'],[-1,' * Instances of this class represent bounding boxes. Data stored as left,'],[-1,' * bottom, right, top floats. All values are initialized to null, however,'],[-1,' * you should make sure you set them before using the bounds for anything.'],[-1,' * '],[-1,' * Possible use case:'],[-1,' * (code)'],[-1,' * bounds = new OpenLayers.Bounds();'],[-1,' * bounds.extend(new OpenLayers.LonLat(4,5));'],[-1,' * bounds.extend(new OpenLayers.LonLat(5,6));'],[-1,' * bounds.toBBOX(); \/\/ returns 4,5,5,6'],[-1,' * (end)'],[-1,' *\/'],[1,'OpenLayers.Bounds = OpenLayers.Class({'],[-1,''],[-1,' \/**'],[-1,' * Property: left'],[-1,' * {Number} Minimum horizontal coordinate.'],[-1,' *\/'],[-1,' left: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: bottom'],[-1,' * {Number} Minimum vertical coordinate.'],[-1,' *\/'],[-1,' bottom: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: right'],[-1,' * {Number} Maximum horizontal coordinate.'],[-1,' *\/'],[-1,' right: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: top'],[-1,' * {Number} Maximum vertical coordinate.'],[-1,' *\/'],[-1,' top: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: centerLonLat'],[-1,' * {<OpenLayers.LonLat>} A cached center location. This should not be'],[-1,' * accessed directly. Use <getCenterLonLat> instead.'],[-1,' *\/'],[-1,' centerLonLat: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Bounds'],[-1,' * Construct a new bounds object. Coordinates can either be passed as four'],[-1,' * arguments, or as a single argument.'],[-1,' *'],[-1,' * Parameters (four arguments):'],[-1,' * left - {Number} The left bounds of the box. Note that for width'],[-1,' * calculations, this is assumed to be less than the right value.'],[-1,' * bottom - {Number} The bottom bounds of the box. Note that for height'],[-1,' * calculations, this is assumed to be less than the top value.'],[-1,' * right - {Number} The right bounds.'],[-1,' * top - {Number} The top bounds.'],[-1,' *'],[-1,' * Parameters (single argument):'],[-1,' * bounds - {Array(Number)} [left, bottom, right, top]'],[-1,' *\/'],[-1,' initialize: function(left, bottom, right, top) {'],[1,' if (OpenLayers.Util.isArray(left)) {'],[0,' top = left[3];'],[0,' right = left[2];'],[0,' bottom = left[1];'],[0,' left = left[0];'],[-1,' }'],[1,' if (left != null) {'],[1,' this.left = OpenLayers.Util.toFloat(left);'],[-1,' }'],[1,' if (bottom != null) {'],[1,' this.bottom = OpenLayers.Util.toFloat(bottom);'],[-1,' }'],[1,' if (right != null) {'],[1,' this.right = OpenLayers.Util.toFloat(right);'],[-1,' }'],[1,' if (top != null) {'],[1,' this.top = OpenLayers.Util.toFloat(top);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: clone'],[-1,' * Create a cloned instance of this bounds.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A fresh copy of the bounds'],[-1,' *\/'],[-1,' clone:function() {'],[0,' return new OpenLayers.Bounds(this.left, this.bottom, '],[-1,' this.right, this.top);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: equals'],[-1,' * Test a two bounds for equivalence.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The passed-in bounds object has the same left,'],[-1,' * right, top, bottom components as this. Note that if bounds '],[-1,' * passed in is null, returns false.'],[-1,' *\/'],[-1,' equals:function(bounds) {'],[0,' var equals = false;'],[0,' if (bounds != null) {'],[0,' equals = ((this.left == bounds.left) && '],[-1,' (this.right == bounds.right) &&'],[-1,' (this.top == bounds.top) && '],[-1,' (this.bottom == bounds.bottom));'],[-1,' }'],[0,' return equals;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: toString'],[-1,' * Returns a string representation of the bounds object.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} String representation of bounds object. '],[-1,' *\/'],[-1,' toString:function() {'],[0,' return [this.left, this.bottom, this.right, this.top].join(\",\");'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: toArray'],[-1,' * Returns an array representation of the bounds object.'],[-1,' *'],[-1,' * Returns an array of left, bottom, right, top properties, or -- when the'],[-1,' * optional parameter is true -- an array of the bottom, left, top,'],[-1,' * right properties.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * reverseAxisOrder - {Boolean} Should we reverse the axis order?'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} array of left, bottom, right, top'],[-1,' *\/'],[-1,' toArray: function(reverseAxisOrder) {'],[0,' if (reverseAxisOrder === true) {'],[0,' return [this.bottom, this.left, this.top, this.right];'],[-1,' } else {'],[0,' return [this.left, this.bottom, this.right, this.top];'],[-1,' }'],[-1,' }, '],[-1,''],[-1,' \/** '],[-1,' * APIMethod: toBBOX'],[-1,' * Returns a boundingbox-string representation of the bounds object.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * decimal - {Integer} How many decimal places in the bbox coords?'],[-1,' * Default is 6'],[-1,' * reverseAxisOrder - {Boolean} Should we reverse the axis order?'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} Simple String representation of bounds object.'],[-1,' * (e.g. \"5,42,10,45\")'],[-1,' *\/'],[-1,' toBBOX:function(decimal, reverseAxisOrder) {'],[0,' if (decimal== null) {'],[0,' decimal = 6; '],[-1,' }'],[0,' var mult = Math.pow(10, decimal);'],[0,' var xmin = Math.round(this.left * mult) \/ mult;'],[0,' var ymin = Math.round(this.bottom * mult) \/ mult;'],[0,' var xmax = Math.round(this.right * mult) \/ mult;'],[0,' var ymax = Math.round(this.top * mult) \/ mult;'],[0,' if (reverseAxisOrder === true) {'],[0,' return ymin + \",\" + xmin + \",\" + ymax + \",\" + xmax;'],[-1,' } else {'],[0,' return xmin + \",\" + ymin + \",\" + xmax + \",\" + ymax;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: toGeometry'],[-1,' * Create a new polygon geometry based on this bounds.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Polygon>} A new polygon with the coordinates'],[-1,' * of this bounds.'],[-1,' *\/'],[-1,' toGeometry: function() {'],[0,' return new OpenLayers.Geometry.Polygon(['],[-1,' new OpenLayers.Geometry.LinearRing(['],[-1,' new OpenLayers.Geometry.Point(this.left, this.bottom),'],[-1,' new OpenLayers.Geometry.Point(this.right, this.bottom),'],[-1,' new OpenLayers.Geometry.Point(this.right, this.top),'],[-1,' new OpenLayers.Geometry.Point(this.left, this.top)'],[-1,' ])'],[-1,' ]);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getWidth'],[-1,' * Returns the width of the bounds.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The width of the bounds (right minus left).'],[-1,' *\/'],[-1,' getWidth:function() {'],[0,' return (this.right - this.left);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getHeight'],[-1,' * Returns the height of the bounds.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The height of the bounds (top minus bottom).'],[-1,' *\/'],[-1,' getHeight:function() {'],[0,' return (this.top - this.bottom);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getSize'],[-1,' * Returns an <OpenLayers.Size> object of the bounds.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Size>} The size of the bounds.'],[-1,' *\/'],[-1,' getSize:function() {'],[0,' return new OpenLayers.Size(this.getWidth(), this.getHeight());'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getCenterPixel'],[-1,' * Returns the <OpenLayers.Pixel> object which represents the center of the'],[-1,' * bounds.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} The center of the bounds in pixel space.'],[-1,' *\/'],[-1,' getCenterPixel:function() {'],[0,' return new OpenLayers.Pixel( (this.left + this.right) \/ 2,'],[-1,' (this.bottom + this.top) \/ 2);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getCenterLonLat'],[-1,' * Returns the <OpenLayers.LonLat> object which represents the center of the'],[-1,' * bounds.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} The center of the bounds in map space.'],[-1,' *\/'],[-1,' getCenterLonLat:function() {'],[0,' if(!this.centerLonLat) {'],[0,' this.centerLonLat = new OpenLayers.LonLat('],[-1,' (this.left + this.right) \/ 2, (this.bottom + this.top) \/ 2'],[-1,' );'],[-1,' }'],[0,' return this.centerLonLat;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: scale'],[-1,' * Scales the bounds around a pixel or lonlat. Note that the new '],[-1,' * bounds may return non-integer properties, even if a pixel'],[-1,' * is passed. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * ratio - {Float} '],[-1,' * origin - {<OpenLayers.Pixel> or <OpenLayers.LonLat>}'],[-1,' * Default is center.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A new bounds that is scaled by ratio'],[-1,' * from origin.'],[-1,' *\/'],[-1,' scale: function(ratio, origin){'],[0,' if(origin == null){'],[0,' origin = this.getCenterLonLat();'],[-1,' }'],[-1,' '],[0,' var origx,origy;'],[-1,''],[-1,' \/\/ get origin coordinates'],[0,' if(origin.CLASS_NAME == \"OpenLayers.LonLat\"){'],[0,' origx = origin.lon;'],[0,' origy = origin.lat;'],[-1,' } else {'],[0,' origx = origin.x;'],[0,' origy = origin.y;'],[-1,' }'],[-1,''],[0,' var left = (this.left - origx) * ratio + origx;'],[0,' var bottom = (this.bottom - origy) * ratio + origy;'],[0,' var right = (this.right - origx) * ratio + origx;'],[0,' var top = (this.top - origy) * ratio + origy;'],[-1,' '],[0,' return new OpenLayers.Bounds(left, bottom, right, top);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: add'],[-1,' * Shifts the coordinates of the bound by the given horizontal and vertical'],[-1,' * deltas.'],[-1,' *'],[-1,' * (start code)'],[-1,' * var bounds = new OpenLayers.Bounds(0, 0, 10, 10);'],[-1,' * bounds.toString();'],[-1,' * \/\/ => \"0,0,10,10\"'],[-1,' *'],[-1,' * bounds.add(-1.5, 4).toString();'],[-1,' * \/\/ => \"-1.5,4,8.5,14\"'],[-1,' * (end)'],[-1,' *'],[-1,' * This method will throw a TypeError if it is passed null as an argument.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Float} horizontal delta'],[-1,' * y - {Float} vertical delta'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A new bounds whose coordinates are the same as'],[-1,' * this, but shifted by the passed-in x and y values.'],[-1,' *\/'],[-1,' add:function(x, y) {'],[0,' if ( (x == null) || (y == null) ) {'],[0,' throw new TypeError(\'Bounds.add cannot receive null values\');'],[-1,' }'],[0,' return new OpenLayers.Bounds(this.left + x, this.bottom + y,'],[-1,' this.right + x, this.top + y);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: extend'],[-1,' * Extend the bounds to include the <OpenLayers.LonLat>,'],[-1,' * <OpenLayers.Geometry.Point> or <OpenLayers.Bounds> specified.'],[-1,' *'],[-1,' * Please note that this function assumes that left < right and'],[-1,' * bottom < top.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * object - {<OpenLayers.LonLat>, <OpenLayers.Geometry.Point> or'],[-1,' * <OpenLayers.Bounds>} The object to be included in the new bounds'],[-1,' * object.'],[-1,' *\/'],[-1,' extend:function(object) {'],[0,' if (object) {'],[0,' switch(object.CLASS_NAME) {'],[-1,' case \"OpenLayers.LonLat\":'],[0,' this.extendXY(object.lon, object.lat);'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.Point\":'],[0,' this.extendXY(object.x, object.y);'],[0,' break;'],[-1,''],[-1,' case \"OpenLayers.Bounds\":'],[-1,' \/\/ clear cached center location'],[0,' this.centerLonLat = null;'],[-1,''],[0,' if ( (this.left == null) || (object.left < this.left)) {'],[0,' this.left = object.left;'],[-1,' }'],[0,' if ( (this.bottom == null) || (object.bottom < this.bottom) ) {'],[0,' this.bottom = object.bottom;'],[-1,' }'],[0,' if ( (this.right == null) || (object.right > this.right) ) {'],[0,' this.right = object.right;'],[-1,' }'],[0,' if ( (this.top == null) || (object.top > this.top) ) {'],[0,' this.top = object.top;'],[-1,' }'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: extendXY'],[-1,' * Extend the bounds to include the XY coordinate specified.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {number} The X part of the the coordinate.'],[-1,' * y - {number} The Y part of the the coordinate.'],[-1,' *\/'],[-1,' extendXY:function(x, y) {'],[-1,' \/\/ clear cached center location'],[0,' this.centerLonLat = null;'],[-1,''],[0,' if ((this.left == null) || (x < this.left)) {'],[0,' this.left = x;'],[-1,' }'],[0,' if ((this.bottom == null) || (y < this.bottom)) {'],[0,' this.bottom = y;'],[-1,' }'],[0,' if ((this.right == null) || (x > this.right)) {'],[0,' this.right = x;'],[-1,' }'],[0,' if ((this.top == null) || (y > this.top)) {'],[0,' this.top = y;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: containsLonLat'],[-1,' * Returns whether the bounds object contains the given <OpenLayers.LonLat>.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * ll - {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an'],[-1,' * object with a \'lon\' and \'lat\' properties.'],[-1,' * options - {Object} Optional parameters'],[-1,' *'],[-1,' * Acceptable options:'],[-1,' * inclusive - {Boolean} Whether or not to include the border.'],[-1,' * Default is true.'],[-1,' * worldBounds - {<OpenLayers.Bounds>} If a worldBounds is provided, the'],[-1,' * ll will be considered as contained if it exceeds the world bounds,'],[-1,' * but can be wrapped around the dateline so it is contained by this'],[-1,' * bounds.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The passed-in lonlat is within this bounds.'],[-1,' *\/'],[-1,' containsLonLat: function(ll, options) {'],[0,' if (typeof options === \"boolean\") {'],[0,' options = {inclusive: options};'],[-1,' }'],[0,' options = options || {};'],[0,' var contains = this.contains(ll.lon, ll.lat, options.inclusive),'],[-1,' worldBounds = options.worldBounds;'],[0,' if (worldBounds && !contains) {'],[0,' var worldWidth = worldBounds.getWidth();'],[0,' var worldCenterX = (worldBounds.left + worldBounds.right) \/ 2;'],[0,' var worldsAway = Math.round((ll.lon - worldCenterX) \/ worldWidth);'],[0,' contains = this.containsLonLat({'],[-1,' lon: ll.lon - worldsAway * worldWidth,'],[-1,' lat: ll.lat'],[-1,' }, {inclusive: options.inclusive});'],[-1,' }'],[0,' return contains;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: containsPixel'],[-1,' * Returns whether the bounds object contains the given <OpenLayers.Pixel>.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>}'],[-1,' * inclusive - {Boolean} Whether or not to include the border. Default is'],[-1,' * true.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The passed-in pixel is within this bounds.'],[-1,' *\/'],[-1,' containsPixel:function(px, inclusive) {'],[0,' return this.contains(px.x, px.y, inclusive);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: contains'],[-1,' * Returns whether the bounds object contains the given x and y.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * x - {Float}'],[-1,' * y - {Float}'],[-1,' * inclusive - {Boolean} Whether or not to include the border. Default is'],[-1,' * true.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the passed-in coordinates are within this'],[-1,' * bounds.'],[-1,' *\/'],[-1,' contains:function(x, y, inclusive) {'],[-1,' \/\/set default'],[0,' if (inclusive == null) {'],[0,' inclusive = true;'],[-1,' }'],[-1,''],[0,' if (x == null || y == null) {'],[0,' return false;'],[-1,' }'],[-1,''],[0,' x = OpenLayers.Util.toFloat(x);'],[0,' y = OpenLayers.Util.toFloat(y);'],[-1,''],[0,' var contains = false;'],[0,' if (inclusive) {'],[0,' contains = ((x >= this.left) && (x <= this.right) && '],[-1,' (y >= this.bottom) && (y <= this.top));'],[-1,' } else {'],[0,' contains = ((x > this.left) && (x < this.right) && '],[-1,' (y > this.bottom) && (y < this.top));'],[-1,' } '],[0,' return contains;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: intersectsBounds'],[-1,' * Determine whether the target bounds intersects this bounds. Bounds are'],[-1,' * considered intersecting if any of their edges intersect or if one'],[-1,' * bounds contains the other.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>} The target bounds.'],[-1,' * options - {Object} Optional parameters.'],[-1,' * '],[-1,' * Acceptable options:'],[-1,' * inclusive - {Boolean} Treat coincident borders as intersecting. Default'],[-1,' * is true. If false, bounds that do not overlap but only touch at the'],[-1,' * border will not be considered as intersecting.'],[-1,' * worldBounds - {<OpenLayers.Bounds>} If a worldBounds is provided, two'],[-1,' * bounds will be considered as intersecting if they intersect when '],[-1,' * shifted to within the world bounds. This applies only to bounds that'],[-1,' * cross or are completely outside the world bounds.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The passed-in bounds object intersects this bounds.'],[-1,' *\/'],[-1,' intersectsBounds:function(bounds, options) {'],[0,' if (typeof options === \"boolean\") {'],[0,' options = {inclusive: options};'],[-1,' }'],[0,' options = options || {};'],[0,' if (options.worldBounds) {'],[0,' var self = this.wrapDateLine(options.worldBounds);'],[0,' bounds = bounds.wrapDateLine(options.worldBounds);'],[-1,' } else {'],[0,' self = this;'],[-1,' }'],[0,' if (options.inclusive == null) {'],[0,' options.inclusive = true;'],[-1,' }'],[0,' var intersects = false;'],[0,' var mightTouch = ('],[-1,' self.left == bounds.right ||'],[-1,' self.right == bounds.left ||'],[-1,' self.top == bounds.bottom ||'],[-1,' self.bottom == bounds.top'],[-1,' );'],[-1,' '],[-1,' \/\/ if the two bounds only touch at an edge, and inclusive is false,'],[-1,' \/\/ then the bounds don\'t *really* intersect.'],[0,' if (options.inclusive || !mightTouch) {'],[-1,' \/\/ otherwise, if one of the boundaries even partially contains another,'],[-1,' \/\/ inclusive of the edges, then they do intersect.'],[0,' var inBottom = ('],[-1,' ((bounds.bottom >= self.bottom) && (bounds.bottom <= self.top)) ||'],[-1,' ((self.bottom >= bounds.bottom) && (self.bottom <= bounds.top))'],[-1,' );'],[0,' var inTop = ('],[-1,' ((bounds.top >= self.bottom) && (bounds.top <= self.top)) ||'],[-1,' ((self.top > bounds.bottom) && (self.top < bounds.top))'],[-1,' );'],[0,' var inLeft = ('],[-1,' ((bounds.left >= self.left) && (bounds.left <= self.right)) ||'],[-1,' ((self.left >= bounds.left) && (self.left <= bounds.right))'],[-1,' );'],[0,' var inRight = ('],[-1,' ((bounds.right >= self.left) && (bounds.right <= self.right)) ||'],[-1,' ((self.right >= bounds.left) && (self.right <= bounds.right))'],[-1,' );'],[0,' intersects = ((inBottom || inTop) && (inLeft || inRight));'],[-1,' }'],[-1,' \/\/ document me'],[0,' if (options.worldBounds && !intersects) {'],[0,' var world = options.worldBounds;'],[0,' var width = world.getWidth();'],[0,' var selfCrosses = !world.containsBounds(self);'],[0,' var boundsCrosses = !world.containsBounds(bounds);'],[0,' if (selfCrosses && !boundsCrosses) {'],[0,' bounds = bounds.add(-width, 0);'],[0,' intersects = self.intersectsBounds(bounds, {inclusive: options.inclusive});'],[0,' } else if (boundsCrosses && !selfCrosses) {'],[0,' self = self.add(-width, 0);'],[0,' intersects = bounds.intersectsBounds(self, {inclusive: options.inclusive}); '],[-1,' }'],[-1,' }'],[0,' return intersects;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: containsBounds'],[-1,' * Returns whether the bounds object contains the given <OpenLayers.Bounds>.'],[-1,' * '],[-1,' * bounds - {<OpenLayers.Bounds>} The target bounds.'],[-1,' * partial - {Boolean} If any of the target corners is within this bounds'],[-1,' * consider the bounds contained. Default is false. If false, the'],[-1,' * entire target bounds must be contained within this bounds.'],[-1,' * inclusive - {Boolean} Treat shared edges as contained. Default is'],[-1,' * true.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The passed-in bounds object is contained within this bounds. '],[-1,' *\/'],[-1,' containsBounds:function(bounds, partial, inclusive) {'],[0,' if (partial == null) {'],[0,' partial = false;'],[-1,' }'],[0,' if (inclusive == null) {'],[0,' inclusive = true;'],[-1,' }'],[0,' var bottomLeft = this.contains(bounds.left, bounds.bottom, inclusive);'],[0,' var bottomRight = this.contains(bounds.right, bounds.bottom, inclusive);'],[0,' var topLeft = this.contains(bounds.left, bounds.top, inclusive);'],[0,' var topRight = this.contains(bounds.right, bounds.top, inclusive);'],[-1,' '],[0,' return (partial) ? (bottomLeft || bottomRight || topLeft || topRight)'],[-1,' : (bottomLeft && bottomRight && topLeft && topRight);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: determineQuadrant'],[-1,' * Returns the the quadrant (\"br\", \"tr\", \"tl\", \"bl\") in which the given'],[-1,' * <OpenLayers.LonLat> lies.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The quadrant (\"br\" \"tr\" \"tl\" \"bl\") of the bounds in which the'],[-1,' * coordinate lies.'],[-1,' *\/'],[-1,' determineQuadrant: function(lonlat) {'],[-1,' '],[0,' var quadrant = \"\";'],[0,' var center = this.getCenterLonLat();'],[-1,' '],[0,' quadrant += (lonlat.lat < center.lat) ? \"b\" : \"t\";'],[0,' quadrant += (lonlat.lon < center.lon) ? \"l\" : \"r\";'],[-1,' '],[0,' return quadrant; '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: transform'],[-1,' * Transform the Bounds object from source to dest. '],[-1,' *'],[-1,' * Parameters: '],[-1,' * source - {<OpenLayers.Projection>} Source projection. '],[-1,' * dest - {<OpenLayers.Projection>} Destination projection. '],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} Itself, for use in chaining operations.'],[-1,' *\/'],[-1,' transform: function(source, dest) {'],[-1,' \/\/ clear cached center location'],[0,' this.centerLonLat = null;'],[0,' var ll = OpenLayers.Projection.transform('],[-1,' {\'x\': this.left, \'y\': this.bottom}, source, dest);'],[0,' var lr = OpenLayers.Projection.transform('],[-1,' {\'x\': this.right, \'y\': this.bottom}, source, dest);'],[0,' var ul = OpenLayers.Projection.transform('],[-1,' {\'x\': this.left, \'y\': this.top}, source, dest);'],[0,' var ur = OpenLayers.Projection.transform('],[-1,' {\'x\': this.right, \'y\': this.top}, source, dest);'],[0,' this.left = Math.min(ll.x, ul.x);'],[0,' this.bottom = Math.min(ll.y, lr.y);'],[0,' this.right = Math.max(lr.x, ur.x);'],[0,' this.top = Math.max(ul.y, ur.y);'],[0,' return this;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: wrapDateLine'],[-1,' * Wraps the bounds object around the dateline.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * maxExtent - {<OpenLayers.Bounds>}'],[-1,' * options - {Object} Some possible options are:'],[-1,' *'],[-1,' * Allowed Options:'],[-1,' * leftTolerance - {float} Allow for a margin of error '],[-1,' * with the \'left\' value of this '],[-1,' * bound.'],[-1,' * Default is 0.'],[-1,' * rightTolerance - {float} Allow for a margin of error '],[-1,' * with the \'right\' value of '],[-1,' * this bound.'],[-1,' * Default is 0.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A copy of this bounds, but wrapped around the '],[-1,' * \"dateline\" (as specified by the borders of '],[-1,' * maxExtent). Note that this function only returns '],[-1,' * a different bounds value if this bounds is '],[-1,' * *entirely* outside of the maxExtent. If this '],[-1,' * bounds straddles the dateline (is part in\/part '],[-1,' * out of maxExtent), the returned bounds will always '],[-1,' * cross the left edge of the given maxExtent.'],[-1,' *.'],[-1,' *\/'],[-1,' wrapDateLine: function(maxExtent, options) { '],[0,' options = options || {};'],[-1,' '],[0,' var leftTolerance = options.leftTolerance || 0;'],[0,' var rightTolerance = options.rightTolerance || 0;'],[-1,''],[0,' var newBounds = this.clone();'],[-1,' '],[0,' if (maxExtent) {'],[0,' var width = maxExtent.getWidth();'],[-1,''],[-1,' \/\/shift right?'],[0,' while (newBounds.left < maxExtent.left && '],[-1,' newBounds.right - rightTolerance <= maxExtent.left ) { '],[0,' newBounds = newBounds.add(width, 0);'],[-1,' }'],[-1,''],[-1,' \/\/shift left?'],[0,' while (newBounds.left + leftTolerance >= maxExtent.right && '],[-1,' newBounds.right > maxExtent.right ) { '],[0,' newBounds = newBounds.add(-width, 0);'],[-1,' }'],[-1,' '],[-1,' \/\/ crosses right only? force left'],[0,' var newLeft = newBounds.left + leftTolerance;'],[0,' if (newLeft < maxExtent.right && newLeft > maxExtent.left && '],[-1,' newBounds.right - rightTolerance > maxExtent.right) {'],[0,' newBounds = newBounds.add(-width, 0);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' return newBounds;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Bounds\"'],[-1,'});'],[-1,''],[-1,'\/** '],[-1,' * APIFunction: fromString'],[-1,' * Alternative constructor that builds a new OpenLayers.Bounds from a '],[-1,' * parameter string.'],[-1,' *'],[-1,' * (begin code)'],[-1,' * OpenLayers.Bounds.fromString(\"5,42,10,45\");'],[-1,' * \/\/ => equivalent to ...'],[-1,' * new OpenLayers.Bounds(5, 42, 10, 45);'],[-1,' * (end)'],[-1,' *'],[-1,' * Parameters: '],[-1,' * str - {String} Comma-separated bounds string. (e.g. \"5,42,10,45\")'],[-1,' * reverseAxisOrder - {Boolean} Does the string use reverse axis order?'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} New bounds object built from the '],[-1,' * passed-in String.'],[-1,' *\/'],[1,'OpenLayers.Bounds.fromString = function(str, reverseAxisOrder) {'],[0,' var bounds = str.split(\",\");'],[0,' return OpenLayers.Bounds.fromArray(bounds, reverseAxisOrder);'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * APIFunction: fromArray'],[-1,' * Alternative constructor that builds a new OpenLayers.Bounds from an array.'],[-1,' *'],[-1,' * (begin code)'],[-1,' * OpenLayers.Bounds.fromArray( [5, 42, 10, 45] );'],[-1,' * \/\/ => equivalent to ...'],[-1,' * new OpenLayers.Bounds(5, 42, 10, 45);'],[-1,' * (end)'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bbox - {Array(Float)} Array of bounds values (e.g. [5,42,10,45])'],[-1,' * reverseAxisOrder - {Boolean} Does the array use reverse axis order?'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} New bounds object built from the passed-in Array.'],[-1,' *\/'],[1,'OpenLayers.Bounds.fromArray = function(bbox, reverseAxisOrder) {'],[0,' return reverseAxisOrder === true ?'],[-1,' new OpenLayers.Bounds(bbox[1], bbox[0], bbox[3], bbox[2]) :'],[-1,' new OpenLayers.Bounds(bbox[0], bbox[1], bbox[2], bbox[3]);'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * APIFunction: fromSize'],[-1,' * Alternative constructor that builds a new OpenLayers.Bounds from a size.'],[-1,' *'],[-1,' * (begin code)'],[-1,' * OpenLayers.Bounds.fromSize( new OpenLayers.Size(10, 20) );'],[-1,' * \/\/ => equivalent to ...'],[-1,' * new OpenLayers.Bounds(0, 20, 10, 0);'],[-1,' * (end)'],[-1,' *'],[-1,' * Parameters:'],[-1,' * size - {<OpenLayers.Size> or Object} <OpenLayers.Size> or an object with'],[-1,' * both \'w\' and \'h\' properties.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} New bounds object built from the passed-in size.'],[-1,' *\/'],[1,'OpenLayers.Bounds.fromSize = function(size) {'],[0,' return new OpenLayers.Bounds(0,'],[-1,' size.h,'],[-1,' size.w,'],[-1,' 0);'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: oppositeQuadrant'],[-1,' * Get the opposite quadrant for a given quadrant string.'],[-1,' *'],[-1,' * (begin code)'],[-1,' * OpenLayers.Bounds.oppositeQuadrant( \"tl\" );'],[-1,' * \/\/ => \"br\"'],[-1,' *'],[-1,' * OpenLayers.Bounds.oppositeQuadrant( \"tr\" );'],[-1,' * \/\/ => \"bl\"'],[-1,' * (end)'],[-1,' *'],[-1,' * Parameters:'],[-1,' * quadrant - {String} two character quadrant shortstring'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The opposing quadrant (\"br\" \"tr\" \"tl\" \"bl\"). For Example, if '],[-1,' * you pass in \"bl\" it returns \"tr\", if you pass in \"br\" it '],[-1,' * returns \"tl\", etc.'],[-1,' *\/'],[1,'OpenLayers.Bounds.oppositeQuadrant = function(quadrant) {'],[0,' var opp = \"\";'],[-1,' '],[0,' opp += (quadrant.charAt(0) == \'t\') ? \'b\' : \'t\';'],[0,' opp += (quadrant.charAt(1) == \'l\') ? \'r\' : \'l\';'],[-1,' '],[0,' return opp;'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/BaseTypes\/Element.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' * @requires OpenLayers\/BaseTypes.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Element'],[-1,' *\/'],[1,'OpenLayers.Element = {'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: visible'],[-1,' * '],[-1,' * Parameters: '],[-1,' * element - {DOMElement}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Is the element visible?'],[-1,' *\/'],[-1,' visible: function(element) {'],[0,' return OpenLayers.Util.getElement(element).style.display != \'none\';'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: toggle'],[-1,' * Toggle the visibility of element(s) passed in'],[-1,' * '],[-1,' * Parameters:'],[-1,' * element - {DOMElement} Actually user can pass any number of elements'],[-1,' *\/'],[-1,' toggle: function() {'],[0,' for (var i=0, len=arguments.length; i<len; i++) {'],[0,' var element = OpenLayers.Util.getElement(arguments[i]);'],[0,' var display = OpenLayers.Element.visible(element) ? \'none\' '],[-1,' : \'\';'],[0,' element.style.display = display;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: remove'],[-1,' * Remove the specified element from the DOM.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * element - {DOMElement}'],[-1,' *\/'],[-1,' remove: function(element) {'],[0,' element = OpenLayers.Util.getElement(element);'],[0,' element.parentNode.removeChild(element);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: getHeight'],[-1,' * '],[-1,' * Parameters:'],[-1,' * element - {DOMElement}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer} The offset height of the element passed in'],[-1,' *\/'],[-1,' getHeight: function(element) {'],[0,' element = OpenLayers.Util.getElement(element);'],[0,' return element.offsetHeight;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Function: hasClass'],[-1,' * Tests if an element has the given CSS class name.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} A DOM element node.'],[-1,' * name - {String} The CSS class name to search for.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The element has the given class name.'],[-1,' *\/'],[-1,' hasClass: function(element, name) {'],[0,' var names = element.className;'],[0,' return (!!names && new RegExp(\"(^|\\\\s)\" + name + \"(\\\\s|$)\").test(names));'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Function: addClass'],[-1,' * Add a CSS class name to an element. Safe where element already has'],[-1,' * the class name.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} A DOM element node.'],[-1,' * name - {String} The CSS class name to add.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The element.'],[-1,' *\/'],[-1,' addClass: function(element, name) {'],[0,' if(!OpenLayers.Element.hasClass(element, name)) {'],[0,' element.className += (element.className ? \" \" : \"\") + name;'],[-1,' }'],[0,' return element;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Function: removeClass'],[-1,' * Remove a CSS class name from an element. Safe where element does not'],[-1,' * have the class name.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} A DOM element node.'],[-1,' * name - {String} The CSS class name to remove.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The element.'],[-1,' *\/'],[-1,' removeClass: function(element, name) {'],[0,' var names = element.className;'],[0,' if(names) {'],[0,' element.className = OpenLayers.String.trim('],[-1,' names.replace('],[-1,' new RegExp(\"(^|\\\\s+)\" + name + \"(\\\\s+|$)\"), \" \"'],[-1,' )'],[-1,' );'],[-1,' }'],[0,' return element;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Function: toggleClass'],[-1,' * Remove a CSS class name from an element if it exists. Add the class name'],[-1,' * if it doesn\'t exist.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} A DOM element node.'],[-1,' * name - {String} The CSS class name to toggle.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The element.'],[-1,' *\/'],[-1,' toggleClass: function(element, name) {'],[0,' if(OpenLayers.Element.hasClass(element, name)) {'],[0,' OpenLayers.Element.removeClass(element, name);'],[-1,' } else {'],[0,' OpenLayers.Element.addClass(element, name);'],[-1,' }'],[0,' return element;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIFunction: getStyle'],[-1,' * '],[-1,' * Parameters:'],[-1,' * element - {DOMElement}'],[-1,' * style - {?}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {?}'],[-1,' *\/'],[-1,' getStyle: function(element, style) {'],[0,' element = OpenLayers.Util.getElement(element);'],[-1,''],[0,' var value = null;'],[0,' if (element && element.style) {'],[0,' value = element.style[OpenLayers.String.camelize(style)];'],[0,' if (!value) {'],[0,' if (document.defaultView && '],[-1,' document.defaultView.getComputedStyle) {'],[-1,' '],[0,' var css = document.defaultView.getComputedStyle(element, null);'],[0,' value = css ? css.getPropertyValue(style) : null;'],[0,' } else if (element.currentStyle) {'],[0,' value = element.currentStyle[OpenLayers.String.camelize(style)];'],[-1,' }'],[-1,' }'],[-1,' '],[0,' var positions = [\'left\', \'top\', \'right\', \'bottom\'];'],[0,' if (window.opera &&'],[-1,' (OpenLayers.Util.indexOf(positions,style) != -1) &&'],[-1,' (OpenLayers.Element.getStyle(element, \'position\') == \'static\')) { '],[0,' value = \'auto\';'],[-1,' }'],[-1,' }'],[-1,' '],[0,' return value == \'auto\' ? null : value;'],[-1,' }'],[-1,''],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/BaseTypes\/LonLat.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.LonLat'],[-1,' * This class represents a longitude and latitude pair'],[-1,' *\/'],[1,'OpenLayers.LonLat = OpenLayers.Class({'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: lon'],[-1,' * {Float} The x-axis coodinate in map units'],[-1,' *\/'],[-1,' lon: 0.0,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: lat'],[-1,' * {Float} The y-axis coordinate in map units'],[-1,' *\/'],[-1,' lat: 0.0,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.LonLat'],[-1,' * Create a new map location. Coordinates can be passed either as two'],[-1,' * arguments, or as a single argument.'],[-1,' *'],[-1,' * Parameters (two arguments):'],[-1,' * lon - {Number} The x-axis coordinate in map units. If your map is in'],[-1,' * a geographic projection, this will be the Longitude. Otherwise,'],[-1,' * it will be the x coordinate of the map location in your map units.'],[-1,' * lat - {Number} The y-axis coordinate in map units. If your map is in'],[-1,' * a geographic projection, this will be the Latitude. Otherwise,'],[-1,' * it will be the y coordinate of the map location in your map units.'],[-1,' *'],[-1,' * Parameters (single argument):'],[-1,' * location - {Array(Float)} [lon, lat]'],[-1,' *\/'],[-1,' initialize: function(lon, lat) {'],[0,' if (OpenLayers.Util.isArray(lon)) {'],[0,' lat = lon[1];'],[0,' lon = lon[0];'],[-1,' }'],[0,' this.lon = OpenLayers.Util.toFloat(lon);'],[0,' this.lat = OpenLayers.Util.toFloat(lat);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: toString'],[-1,' * Return a readable string version of the lonlat'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} String representation of OpenLayers.LonLat object. '],[-1,' * (e.g. <i>\"lon=5,lat=42\"<\/i>)'],[-1,' *\/'],[-1,' toString:function() {'],[0,' return (\"lon=\" + this.lon + \",lat=\" + this.lat);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: toShortString'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} Shortened String representation of OpenLayers.LonLat object. '],[-1,' * (e.g. <i>\"5, 42\"<\/i>)'],[-1,' *\/'],[-1,' toShortString:function() {'],[0,' return (this.lon + \", \" + this.lat);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: clone'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} New OpenLayers.LonLat object with the same lon '],[-1,' * and lat values'],[-1,' *\/'],[-1,' clone:function() {'],[0,' return new OpenLayers.LonLat(this.lon, this.lat);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: add'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lon - {Float}'],[-1,' * lat - {Float}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} A new OpenLayers.LonLat object with the lon and '],[-1,' * lat passed-in added to this\'s. '],[-1,' *\/'],[-1,' add:function(lon, lat) {'],[0,' if ( (lon == null) || (lat == null) ) {'],[0,' throw new TypeError(\'LonLat.add cannot receive null values\');'],[-1,' }'],[0,' return new OpenLayers.LonLat(this.lon + OpenLayers.Util.toFloat(lon), '],[-1,' this.lat + OpenLayers.Util.toFloat(lat));'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: equals'],[-1,' * '],[-1,' * Parameters:'],[-1,' * ll - {<OpenLayers.LonLat>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Boolean value indicating whether the passed-in '],[-1,' * <OpenLayers.LonLat> object has the same lon and lat '],[-1,' * components as this.'],[-1,' * Note: if ll passed in is null, returns false'],[-1,' *\/'],[-1,' equals:function(ll) {'],[0,' var equals = false;'],[0,' if (ll != null) {'],[0,' equals = ((this.lon == ll.lon && this.lat == ll.lat) ||'],[-1,' (isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat)));'],[-1,' }'],[0,' return equals;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: transform'],[-1,' * Transform the LonLat object from source to dest. This transformation is'],[-1,' * *in place*: if you want a *new* lonlat, use .clone() first.'],[-1,' *'],[-1,' * Parameters: '],[-1,' * source - {<OpenLayers.Projection>} Source projection. '],[-1,' * dest - {<OpenLayers.Projection>} Destination projection. '],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} Itself, for use in chaining operations.'],[-1,' *\/'],[-1,' transform: function(source, dest) {'],[0,' var point = OpenLayers.Projection.transform('],[-1,' {\'x\': this.lon, \'y\': this.lat}, source, dest);'],[0,' this.lon = point.x;'],[0,' this.lat = point.y;'],[0,' return this;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: wrapDateLine'],[-1,' * '],[-1,' * Parameters:'],[-1,' * maxExtent - {<OpenLayers.Bounds>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} A copy of this lonlat, but wrapped around the '],[-1,' * \"dateline\" (as specified by the borders of '],[-1,' * maxExtent)'],[-1,' *\/'],[-1,' wrapDateLine: function(maxExtent) { '],[-1,''],[0,' var newLonLat = this.clone();'],[-1,' '],[0,' if (maxExtent) {'],[-1,' \/\/shift right?'],[0,' while (newLonLat.lon < maxExtent.left) {'],[0,' newLonLat.lon += maxExtent.getWidth();'],[-1,' } '],[-1,' '],[-1,' \/\/shift left?'],[0,' while (newLonLat.lon > maxExtent.right) {'],[0,' newLonLat.lon -= maxExtent.getWidth();'],[-1,' } '],[-1,' }'],[-1,' '],[0,' return newLonLat;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.LonLat\"'],[-1,'});'],[-1,''],[-1,'\/** '],[-1,' * Function: fromString'],[-1,' * Alternative constructor that builds a new <OpenLayers.LonLat> from a '],[-1,' * parameter string'],[-1,' * '],[-1,' * Parameters:'],[-1,' * str - {String} Comma-separated Lon,Lat coordinate string. '],[-1,' * (e.g. <i>\"5,40\"<\/i>)'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} New <OpenLayers.LonLat> object built from the '],[-1,' * passed-in String.'],[-1,' *\/'],[1,'OpenLayers.LonLat.fromString = function(str) {'],[0,' var pair = str.split(\",\");'],[0,' return new OpenLayers.LonLat(pair[0], pair[1]);'],[-1,'};'],[-1,''],[-1,'\/** '],[-1,' * Function: fromArray'],[-1,' * Alternative constructor that builds a new <OpenLayers.LonLat> from an '],[-1,' * array of two numbers that represent lon- and lat-values.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * arr - {Array(Float)} Array of lon\/lat values (e.g. [5,-42])'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} New <OpenLayers.LonLat> object built from the '],[-1,' * passed-in array.'],[-1,' *\/'],[1,'OpenLayers.LonLat.fromArray = function(arr) {'],[0,' var gotArr = OpenLayers.Util.isArray(arr),'],[-1,' lon = gotArr && arr[0],'],[-1,' lat = gotArr && arr[1];'],[0,' return new OpenLayers.LonLat(lon, lat);'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/BaseTypes\/Pixel.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Pixel'],[-1,' * This class represents a screen coordinate, in x and y coordinates'],[-1,' *\/'],[1,'OpenLayers.Pixel = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: x'],[-1,' * {Number} The x coordinate'],[-1,' *\/'],[-1,' x: 0.0,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: y'],[-1,' * {Number} The y coordinate'],[-1,' *\/'],[-1,' y: 0.0,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Pixel'],[-1,' * Create a new OpenLayers.Pixel instance'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Number} The x coordinate'],[-1,' * y - {Number} The y coordinate'],[-1,' *'],[-1,' * Returns:'],[-1,' * An instance of OpenLayers.Pixel'],[-1,' *\/'],[-1,' initialize: function(x, y) {'],[0,' this.x = parseFloat(x);'],[0,' this.y = parseFloat(y);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: toString'],[-1,' * Cast this object into a string'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The string representation of Pixel. ex: \"x=200.4,y=242.2\"'],[-1,' *\/'],[-1,' toString:function() {'],[0,' return (\"x=\" + this.x + \",y=\" + this.y);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * Return a clone of this pixel object'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} A clone pixel'],[-1,' *\/'],[-1,' clone:function() {'],[0,' return new OpenLayers.Pixel(this.x, this.y); '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: equals'],[-1,' * Determine whether one pixel is equivalent to another'],[-1,' *'],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with'],[-1,' * a \'x\' and \'y\' properties.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The point passed in as parameter is equal to this. Note that'],[-1,' * if px passed in is null, returns false.'],[-1,' *\/'],[-1,' equals:function(px) {'],[0,' var equals = false;'],[0,' if (px != null) {'],[0,' equals = ((this.x == px.x && this.y == px.y) ||'],[-1,' (isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y)));'],[-1,' }'],[0,' return equals;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: distanceTo'],[-1,' * Returns the distance to the pixel point passed in as a parameter.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float} The pixel point passed in as parameter to calculate the'],[-1,' * distance to.'],[-1,' *\/'],[-1,' distanceTo:function(px) {'],[0,' return Math.sqrt('],[-1,' Math.pow(this.x - px.x, 2) +'],[-1,' Math.pow(this.y - px.y, 2)'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: add'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Integer}'],[-1,' * y - {Integer}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} A new Pixel with this pixel\'s x&y augmented by the '],[-1,' * values passed in.'],[-1,' *\/'],[-1,' add:function(x, y) {'],[0,' if ( (x == null) || (y == null) ) {'],[0,' throw new TypeError(\'Pixel.add cannot receive null values\');'],[-1,' }'],[0,' return new OpenLayers.Pixel(this.x + x, this.y + y);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: offset'],[-1,' * '],[-1,' * Parameters'],[-1,' * px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with'],[-1,' * a \'x\' and \'y\' properties.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} A new Pixel with this pixel\'s x&y augmented by the '],[-1,' * x&y values of the pixel passed in.'],[-1,' *\/'],[-1,' offset:function(px) {'],[0,' var newPx = this.clone();'],[0,' if (px) {'],[0,' newPx = this.add(px.x, px.y);'],[-1,' }'],[0,' return newPx;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Pixel\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/BaseTypes\/Size.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Size'],[-1,' * Instances of this class represent a width\/height pair'],[-1,' *\/'],[1,'OpenLayers.Size = OpenLayers.Class({'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: w'],[-1,' * {Number} width'],[-1,' *\/'],[-1,' w: 0.0,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: h'],[-1,' * {Number} height'],[-1,' *\/'],[-1,' h: 0.0,'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Size'],[-1,' * Create an instance of OpenLayers.Size'],[-1,' *'],[-1,' * Parameters:'],[-1,' * w - {Number} width'],[-1,' * h - {Number} height'],[-1,' *\/'],[-1,' initialize: function(w, h) {'],[0,' this.w = parseFloat(w);'],[0,' this.h = parseFloat(h);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: toString'],[-1,' * Return the string representation of a size object'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The string representation of OpenLayers.Size object. '],[-1,' * (e.g. <i>\"w=55,h=66\"<\/i>)'],[-1,' *\/'],[-1,' toString:function() {'],[0,' return (\"w=\" + this.w + \",h=\" + this.h);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * Create a clone of this size object'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Size>} A new OpenLayers.Size object with the same w and h'],[-1,' * values'],[-1,' *\/'],[-1,' clone:function() {'],[0,' return new OpenLayers.Size(this.w, this.h);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' *'],[-1,' * APIMethod: equals'],[-1,' * Determine where this size is equal to another'],[-1,' *'],[-1,' * Parameters:'],[-1,' * sz - {<OpenLayers.Size>|Object} An OpenLayers.Size or an object with'],[-1,' * a \'w\' and \'h\' properties.'],[-1,' *'],[-1,' * Returns: '],[-1,' * {Boolean} The passed in size has the same h and w properties as this one.'],[-1,' * Note that if sz passed in is null, returns false.'],[-1,' *\/'],[-1,' equals:function(sz) {'],[0,' var equals = false;'],[0,' if (sz != null) {'],[0,' equals = ((this.w == sz.w && this.h == sz.h) ||'],[-1,' (isNaN(this.w) && isNaN(this.h) && isNaN(sz.w) && isNaN(sz.h)));'],[-1,' }'],[0,' return equals;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Size\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Lang.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes.js'],[-1,' * @requires OpenLayers\/Console.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Lang'],[-1,' * Internationalization namespace. Contains dictionaries in various languages'],[-1,' * and methods to set and get the current language.'],[-1,' *\/'],[1,'OpenLayers.Lang = {'],[-1,' '],[-1,' \/** '],[-1,' * Property: code'],[-1,' * {String} Current language code to use in OpenLayers. Use the'],[-1,' * <setCode> method to set this value and the <getCode> method to'],[-1,' * retrieve it.'],[-1,' *\/'],[-1,' code: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: defaultCode'],[-1,' * {String} Default language to use when a specific language can\'t be'],[-1,' * found. Default is \"en\".'],[-1,' *\/'],[-1,' defaultCode: \"en\",'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: getCode'],[-1,' * Get the current language code.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The current language code.'],[-1,' *\/'],[-1,' getCode: function() {'],[4,' if(!OpenLayers.Lang.code) {'],[4,' OpenLayers.Lang.setCode();'],[-1,' }'],[0,' return OpenLayers.Lang.code;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIFunction: setCode'],[-1,' * Set the language code for string translation. This code is used by'],[-1,' * the <OpenLayers.Lang.translate> method.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * code - {String} These codes follow the IETF recommendations at'],[-1,' * http:\/\/www.ietf.org\/rfc\/rfc3066.txt. If no value is set, the'],[-1,' * browser\'s language setting will be tested. If no <OpenLayers.Lang>'],[-1,' * dictionary exists for the code, the <OpenLayers.String.defaultLang>'],[-1,' * will be used.'],[-1,' *\/'],[-1,' setCode: function(code) {'],[4,' var lang;'],[4,' if(!code) {'],[4,' code = (OpenLayers.BROWSER_NAME == \"msie\") ?'],[-1,' navigator.userLanguage : navigator.language;'],[-1,' }'],[4,' var parts = code.split(\'-\');'],[0,' parts[0] = parts[0].toLowerCase();'],[0,' if(typeof OpenLayers.Lang[parts[0]] == \"object\") {'],[0,' lang = parts[0];'],[-1,' }'],[-1,''],[-1,' \/\/ check for regional extensions'],[0,' if(parts[1]) {'],[0,' var testLang = parts[0] + \'-\' + parts[1].toUpperCase();'],[0,' if(typeof OpenLayers.Lang[testLang] == \"object\") {'],[0,' lang = testLang;'],[-1,' }'],[-1,' }'],[0,' if(!lang) {'],[0,' OpenLayers.Console.warn('],[-1,' \'Failed to find OpenLayers.Lang.\' + parts.join(\"-\") +'],[-1,' \' dictionary, falling back to default language\''],[-1,' );'],[0,' lang = OpenLayers.Lang.defaultCode;'],[-1,' }'],[-1,' '],[0,' OpenLayers.Lang.code = lang;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: translate'],[-1,' * Looks up a key from a dictionary based on the current language string.'],[-1,' * The value of <getCode> will be used to determine the appropriate'],[-1,' * dictionary. Dictionaries are stored in <OpenLayers.Lang>.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * key - {String} The key for an i18n string value in the dictionary.'],[-1,' * context - {Object} Optional context to be used with'],[-1,' * <OpenLayers.String.format>.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A internationalized string.'],[-1,' *\/'],[-1,' translate: function(key, context) {'],[4,' var dictionary = OpenLayers.Lang[OpenLayers.Lang.getCode()];'],[0,' var message = dictionary && dictionary[key];'],[0,' if(!message) {'],[-1,' \/\/ Message not found, fall back to message key'],[0,' message = key;'],[-1,' }'],[0,' if(context) {'],[0,' message = OpenLayers.String.format(message, context);'],[-1,' }'],[0,' return message;'],[-1,' }'],[-1,' '],[-1,'};'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * APIMethod: OpenLayers.i18n'],[-1,' * Alias for <OpenLayers.Lang.translate>. Looks up a key from a dictionary'],[-1,' * based on the current language string. The value of'],[-1,' * <OpenLayers.Lang.getCode> will be used to determine the appropriate'],[-1,' * dictionary. Dictionaries are stored in <OpenLayers.Lang>.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * key - {String} The key for an i18n string value in the dictionary.'],[-1,' * context - {Object} Optional context to be used with'],[-1,' * <OpenLayers.String.format>.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A internationalized string.'],[-1,' *\/'],[1,'OpenLayers.i18n = OpenLayers.Lang.translate;'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Feature.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Feature'],[-1,' * Features are combinations of geography and attributes. The OpenLayers.Feature'],[-1,' * class specifically combines a marker and a lonlat.'],[-1,' *\/'],[1,'OpenLayers.Feature = OpenLayers.Class({'],[-1,''],[-1,' \/** '],[-1,' * Property: layer '],[-1,' * {<OpenLayers.Layer>} '],[-1,' *\/'],[-1,' layer: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: id '],[-1,' * {String} '],[-1,' *\/'],[-1,' id: null,'],[-1,' '],[-1,' \/** '],[-1,' * Property: lonlat '],[-1,' * {<OpenLayers.LonLat>} '],[-1,' *\/'],[-1,' lonlat: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: data '],[-1,' * {Object} '],[-1,' *\/'],[-1,' data: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: marker '],[-1,' * {<OpenLayers.Marker>} '],[-1,' *\/'],[-1,' marker: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: popupClass'],[-1,' * {<OpenLayers.Class>} The class which will be used to instantiate'],[-1,' * a new Popup. Default is <OpenLayers.Popup.Anchored>.'],[-1,' *\/'],[-1,' popupClass: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: popup '],[-1,' * {<OpenLayers.Popup>} '],[-1,' *\/'],[-1,' popup: null,'],[-1,''],[-1,' \/** '],[-1,' * Constructor: OpenLayers.Feature'],[-1,' * Constructor for features.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>} '],[-1,' * lonlat - {<OpenLayers.LonLat>} '],[-1,' * data - {Object} '],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Feature>}'],[-1,' *\/'],[-1,' initialize: function(layer, lonlat, data) {'],[0,' this.layer = layer;'],[0,' this.lonlat = lonlat;'],[0,' this.data = (data != null) ? data : {};'],[0,' this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + \"_\"); '],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: destroy'],[-1,' * nullify references to prevent circular references and memory leaks'],[-1,' *\/'],[-1,' destroy: function() {'],[-1,''],[-1,' \/\/remove the popup from the map'],[0,' if ((this.layer != null) && (this.layer.map != null)) {'],[0,' if (this.popup != null) {'],[0,' this.layer.map.removePopup(this.popup);'],[-1,' }'],[-1,' }'],[-1,' \/\/ remove the marker from the layer'],[0,' if (this.layer != null && this.marker != null) {'],[0,' this.layer.removeMarker(this.marker);'],[-1,' }'],[-1,''],[0,' this.layer = null;'],[0,' this.id = null;'],[0,' this.lonlat = null;'],[0,' this.data = null;'],[0,' if (this.marker != null) {'],[0,' this.destroyMarker(this.marker);'],[0,' this.marker = null;'],[-1,' }'],[0,' if (this.popup != null) {'],[0,' this.destroyPopup(this.popup);'],[0,' this.popup = null;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: onScreen'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the feature is currently visible on screen'],[-1,' * (based on its \'lonlat\' property)'],[-1,' *\/'],[-1,' onScreen:function() {'],[-1,' '],[0,' var onScreen = false;'],[0,' if ((this.layer != null) && (this.layer.map != null)) {'],[0,' var screenBounds = this.layer.map.getExtent();'],[0,' onScreen = screenBounds.containsLonLat(this.lonlat);'],[-1,' } '],[0,' return onScreen;'],[-1,' },'],[-1,' '],[-1,''],[-1,' \/**'],[-1,' * Method: createMarker'],[-1,' * Based on the data associated with the Feature, create and return a marker object.'],[-1,' *'],[-1,' * Returns: '],[-1,' * {<OpenLayers.Marker>} A Marker Object created from the \'lonlat\' and \'icon\' properties'],[-1,' * set in this.data. If no \'lonlat\' is set, returns null. If no'],[-1,' * \'icon\' is set, OpenLayers.Marker() will load the default image.'],[-1,' * '],[-1,' * Note - this.marker is set to return value'],[-1,' * '],[-1,' *\/'],[-1,' createMarker: function() {'],[-1,''],[0,' if (this.lonlat != null) {'],[0,' this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon);'],[-1,' }'],[0,' return this.marker;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroyMarker'],[-1,' * Destroys marker.'],[-1,' * If user overrides the createMarker() function, s\/he should be able'],[-1,' * to also specify an alternative function for destroying it'],[-1,' *\/'],[-1,' destroyMarker: function() {'],[0,' this.marker.destroy(); '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createPopup'],[-1,' * Creates a popup object created from the \'lonlat\', \'popupSize\','],[-1,' * and \'popupContentHTML\' properties set in this.data. It uses'],[-1,' * this.marker.icon as default anchor. '],[-1,' * '],[-1,' * If no \'lonlat\' is set, returns null. '],[-1,' * If no this.marker has been created, no anchor is sent.'],[-1,' *'],[-1,' * Note - the returned popup object is \'owned\' by the feature, so you'],[-1,' * cannot use the popup\'s destroy method to discard the popup.'],[-1,' * Instead, you must use the feature\'s destroyPopup'],[-1,' * '],[-1,' * Note - this.popup is set to return value'],[-1,' * '],[-1,' * Parameters: '],[-1,' * closeBox - {Boolean} create popup with closebox or not'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Popup>} Returns the created popup, which is also set'],[-1,' * as \'popup\' property of this feature. Will be of whatever type'],[-1,' * specified by this feature\'s \'popupClass\' property, but must be'],[-1,' * of type <OpenLayers.Popup>.'],[-1,' * '],[-1,' *\/'],[-1,' createPopup: function(closeBox) {'],[-1,''],[0,' if (this.lonlat != null) {'],[0,' if (!this.popup) {'],[0,' var anchor = (this.marker) ? this.marker.icon : null;'],[0,' var popupClass = this.popupClass ? '],[-1,' this.popupClass : OpenLayers.Popup.Anchored;'],[0,' this.popup = new popupClass(this.id + \"_popup\", '],[-1,' this.lonlat,'],[-1,' this.data.popupSize,'],[-1,' this.data.popupContentHTML,'],[-1,' anchor, '],[-1,' closeBox); '],[-1,' } '],[0,' if (this.data.overflow != null) {'],[0,' this.popup.contentDiv.style.overflow = this.data.overflow;'],[-1,' } '],[-1,' '],[0,' this.popup.feature = this;'],[-1,' } '],[0,' return this.popup;'],[-1,' },'],[-1,''],[-1,' '],[-1,' \/**'],[-1,' * Method: destroyPopup'],[-1,' * Destroys the popup created via createPopup.'],[-1,' *'],[-1,' * As with the marker, if user overrides the createPopup() function, s\/he '],[-1,' * should also be able to override the destruction'],[-1,' *\/'],[-1,' destroyPopup: function() {'],[0,' if (this.popup) {'],[0,' this.popup.feature = null;'],[0,' this.popup.destroy();'],[0,' this.popup = null;'],[-1,' } '],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Feature\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Feature\/Vector.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/\/ TRASH THIS'],[1,'OpenLayers.State = {'],[-1,' \/** states *\/'],[-1,' UNKNOWN: \'Unknown\','],[-1,' INSERT: \'Insert\','],[-1,' UPDATE: \'Update\','],[-1,' DELETE: \'Delete\''],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Feature.js'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Feature.Vector'],[-1,' * Vector features use the OpenLayers.Geometry classes as geometry description.'],[-1,' * They have an \'attributes\' property, which is the data object, and a \'style\''],[-1,' * property, the default values of which are defined in the '],[-1,' * <OpenLayers.Feature.Vector.style> objects.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Feature>'],[-1,' *\/'],[1,'OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, {'],[-1,''],[-1,' \/** '],[-1,' * Property: fid '],[-1,' * {String} '],[-1,' *\/'],[-1,' fid: null,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: geometry '],[-1,' * {<OpenLayers.Geometry>} '],[-1,' *\/'],[-1,' geometry: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: attributes '],[-1,' * {Object} This object holds arbitrary, serializable properties that'],[-1,' * describe the feature.'],[-1,' *\/'],[-1,' attributes: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: bounds'],[-1,' * {<OpenLayers.Bounds>} The box bounding that feature\'s geometry, that'],[-1,' * property can be set by an <OpenLayers.Format> object when'],[-1,' * deserializing the feature, so in most cases it represents an'],[-1,' * information set by the server. '],[-1,' *\/'],[-1,' bounds: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: state '],[-1,' * {String} '],[-1,' *\/'],[-1,' state: null,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: style '],[-1,' * {Object} '],[-1,' *\/'],[-1,' style: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: url'],[-1,' * {String} If this property is set it will be taken into account by'],[-1,' * {<OpenLayers.HTTP>} when updating or deleting the feature.'],[-1,' *\/'],[-1,' url: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: renderIntent'],[-1,' * {String} rendering intent currently being used'],[-1,' *\/'],[-1,' renderIntent: \"default\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: modified'],[-1,' * {Object} An object with the originals of the geometry and attributes of'],[-1,' * the feature, if they were changed. Currently this property is only read'],[-1,' * by <OpenLayers.Format.WFST.v1>, and written by'],[-1,' * <OpenLayers.Control.ModifyFeature>, which sets the geometry property.'],[-1,' * Applications can set the originals of modified attributes in the'],[-1,' * attributes property. Note that applications have to check if this'],[-1,' * object and the attributes property is already created before using it.'],[-1,' * After a change made with ModifyFeature, this object could look like'],[-1,' *'],[-1,' * (code)'],[-1,' * {'],[-1,' * geometry: >Object'],[-1,' * }'],[-1,' * (end)'],[-1,' *'],[-1,' * When an application has made changes to feature attributes, it could'],[-1,' * have set the attributes to something like this:'],[-1,' *'],[-1,' * (code)'],[-1,' * {'],[-1,' * attributes: {'],[-1,' * myAttribute: \"original\"'],[-1,' * }'],[-1,' * }'],[-1,' * (end)'],[-1,' *'],[-1,' * Note that <OpenLayers.Format.WFST.v1> only checks for truthy values in'],[-1,' * *modified.geometry* and the attribute names in *modified.attributes*,'],[-1,' * but it is recommended to set the original values (and not just true) as'],[-1,' * attribute value, so applications could use this information to undo'],[-1,' * changes.'],[-1,' *\/'],[-1,' modified: null,'],[-1,''],[-1,' \/** '],[-1,' * Constructor: OpenLayers.Feature.Vector'],[-1,' * Create a vector feature. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} The geometry that this feature'],[-1,' * represents.'],[-1,' * attributes - {Object} An optional object that will be mapped to the'],[-1,' * <attributes> property. '],[-1,' * style - {Object} An optional style object.'],[-1,' *\/'],[-1,' initialize: function(geometry, attributes, style) {'],[0,' OpenLayers.Feature.prototype.initialize.apply(this,'],[-1,' [null, null, attributes]);'],[0,' this.lonlat = null;'],[0,' this.geometry = geometry ? geometry : null;'],[0,' this.state = null;'],[0,' this.attributes = {};'],[0,' if (attributes) {'],[0,' this.attributes = OpenLayers.Util.extend(this.attributes,'],[-1,' attributes);'],[-1,' }'],[0,' this.style = style ? style : null; '],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: destroy'],[-1,' * nullify references to prevent circular references and memory leaks'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' if (this.layer) {'],[0,' this.layer.removeFeatures(this);'],[0,' this.layer = null;'],[-1,' }'],[-1,' '],[0,' this.geometry = null;'],[0,' this.modified = null;'],[0,' OpenLayers.Feature.prototype.destroy.apply(this, arguments);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: clone'],[-1,' * Create a clone of this vector feature. Does not set any non-standard'],[-1,' * properties.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Feature.Vector>} An exact clone of this vector feature.'],[-1,' *\/'],[-1,' clone: function () {'],[0,' return new OpenLayers.Feature.Vector('],[-1,' this.geometry ? this.geometry.clone() : null,'],[-1,' this.attributes,'],[-1,' this.style);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: onScreen'],[-1,' * Determine whether the feature is within the map viewport. This method'],[-1,' * tests for an intersection between the geometry and the viewport'],[-1,' * bounds. If a more efficient but less precise geometry bounds'],[-1,' * intersection is desired, call the method with the boundsOnly'],[-1,' * parameter true.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * boundsOnly - {Boolean} Only test whether a feature\'s bounds intersects'],[-1,' * the viewport bounds. Default is false. If false, the feature\'s'],[-1,' * geometry must intersect the viewport for onScreen to return true.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The feature is currently visible on screen (optionally'],[-1,' * based on its bounds if boundsOnly is true).'],[-1,' *\/'],[-1,' onScreen:function(boundsOnly) {'],[0,' var onScreen = false;'],[0,' if(this.layer && this.layer.map) {'],[0,' var screenBounds = this.layer.map.getExtent();'],[0,' if(boundsOnly) {'],[0,' var featureBounds = this.geometry.getBounds();'],[0,' onScreen = screenBounds.intersectsBounds(featureBounds);'],[-1,' } else {'],[0,' var screenPoly = screenBounds.toGeometry();'],[0,' onScreen = screenPoly.intersects(this.geometry);'],[-1,' }'],[-1,' } '],[0,' return onScreen;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getVisibility'],[-1,' * Determine whether the feature is displayed or not. It may not displayed'],[-1,' * because:'],[-1,' * - its style display property is set to \'none\','],[-1,' * - it doesn\'t belong to any layer,'],[-1,' * - the styleMap creates a symbolizer with display property set to \'none\''],[-1,' * for it,'],[-1,' * - the layer which it belongs to is not visible.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The feature is currently displayed.'],[-1,' *\/'],[-1,' getVisibility: function() {'],[0,' return !(this.style && this.style.display == \'none\' ||'],[-1,' !this.layer ||'],[-1,' this.layer && this.layer.styleMap &&'],[-1,' this.layer.styleMap.createSymbolizer(this, this.renderIntent).display == \'none\' ||'],[-1,' this.layer && !this.layer.getVisibility());'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: createMarker'],[-1,' * HACK - we need to decide if all vector features should be able to'],[-1,' * create markers'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Marker>} For now just returns null'],[-1,' *\/'],[-1,' createMarker: function() {'],[0,' return null;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroyMarker'],[-1,' * HACK - we need to decide if all vector features should be able to'],[-1,' * delete markers'],[-1,' * '],[-1,' * If user overrides the createMarker() function, s\/he should be able'],[-1,' * to also specify an alternative function for destroying it'],[-1,' *\/'],[-1,' destroyMarker: function() {'],[-1,' \/\/ pass'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createPopup'],[-1,' * HACK - we need to decide if all vector features should be able to'],[-1,' * create popups'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Popup>} For now just returns null'],[-1,' *\/'],[-1,' createPopup: function() {'],[0,' return null;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: atPoint'],[-1,' * Determins whether the feature intersects with the specified location.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * lonlat - {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an'],[-1,' * object with a \'lon\' and \'lat\' properties.'],[-1,' * toleranceLon - {float} Optional tolerance in Geometric Coords'],[-1,' * toleranceLat - {float} Optional tolerance in Geographic Coords'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the feature is at the specified location'],[-1,' *\/'],[-1,' atPoint: function(lonlat, toleranceLon, toleranceLat) {'],[0,' var atPoint = false;'],[0,' if(this.geometry) {'],[0,' atPoint = this.geometry.atPoint(lonlat, toleranceLon, '],[-1,' toleranceLat);'],[-1,' }'],[0,' return atPoint;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroyPopup'],[-1,' * HACK - we need to decide if all vector features should be able to'],[-1,' * delete popups'],[-1,' *\/'],[-1,' destroyPopup: function() {'],[-1,' \/\/ pass'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: move'],[-1,' * Moves the feature and redraws it at its new location'],[-1,' *'],[-1,' * Parameters:'],[-1,' * location - {<OpenLayers.LonLat> or <OpenLayers.Pixel>} the'],[-1,' * location to which to move the feature.'],[-1,' *\/'],[-1,' move: function(location) {'],[-1,''],[0,' if(!this.layer || !this.geometry.move){'],[-1,' \/\/do nothing if no layer or immoveable geometry'],[0,' return undefined;'],[-1,' }'],[-1,''],[0,' var pixel;'],[0,' if (location.CLASS_NAME == \"OpenLayers.LonLat\") {'],[0,' pixel = this.layer.getViewPortPxFromLonLat(location);'],[-1,' } else {'],[0,' pixel = location;'],[-1,' }'],[-1,' '],[0,' var lastPixel = this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());'],[0,' var res = this.layer.map.getResolution();'],[0,' this.geometry.move(res * (pixel.x - lastPixel.x),'],[-1,' res * (lastPixel.y - pixel.y));'],[0,' this.layer.drawFeature(this);'],[0,' return lastPixel;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: toState'],[-1,' * Sets the new state'],[-1,' *'],[-1,' * Parameters:'],[-1,' * state - {String} '],[-1,' *\/'],[-1,' toState: function(state) {'],[0,' if (state == OpenLayers.State.UPDATE) {'],[0,' switch (this.state) {'],[-1,' case OpenLayers.State.UNKNOWN:'],[-1,' case OpenLayers.State.DELETE:'],[0,' this.state = state;'],[0,' break;'],[-1,' case OpenLayers.State.UPDATE:'],[-1,' case OpenLayers.State.INSERT:'],[0,' break;'],[-1,' }'],[0,' } else if (state == OpenLayers.State.INSERT) {'],[0,' switch (this.state) {'],[-1,' case OpenLayers.State.UNKNOWN:'],[0,' break;'],[-1,' default:'],[0,' this.state = state;'],[0,' break;'],[-1,' }'],[0,' } else if (state == OpenLayers.State.DELETE) {'],[0,' switch (this.state) {'],[-1,' case OpenLayers.State.INSERT:'],[-1,' \/\/ the feature should be destroyed'],[0,' break;'],[-1,' case OpenLayers.State.DELETE:'],[0,' break;'],[-1,' case OpenLayers.State.UNKNOWN:'],[-1,' case OpenLayers.State.UPDATE:'],[0,' this.state = state;'],[0,' break;'],[-1,' }'],[0,' } else if (state == OpenLayers.State.UNKNOWN) {'],[0,' this.state = state;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' CLASS_NAME: \"OpenLayers.Feature.Vector\"'],[-1,'});'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Feature.Vector.style'],[-1,' * OpenLayers features can have a number of style attributes. The \'default\' '],[-1,' * style will typically be used if no other style is specified. These'],[-1,' * styles correspond for the most part, to the styling properties defined'],[-1,' * by the SVG standard. '],[-1,' * Information on fill properties: http:\/\/www.w3.org\/TR\/SVG\/painting.html#FillProperties'],[-1,' * Information on stroke properties: http:\/\/www.w3.org\/TR\/SVG\/painting.html#StrokeProperties'],[-1,' *'],[-1,' * Symbolizer properties:'],[-1,' * fill - {Boolean} Set to false if no fill is desired.'],[-1,' * fillColor - {String} Hex fill color. Default is \"#ee9900\".'],[-1,' * fillOpacity - {Number} Fill opacity (0-1). Default is 0.4 '],[-1,' * stroke - {Boolean} Set to false if no stroke is desired.'],[-1,' * strokeColor - {String} Hex stroke color. Default is \"#ee9900\".'],[-1,' * strokeOpacity - {Number} Stroke opacity (0-1). Default is 1.'],[-1,' * strokeWidth - {Number} Pixel stroke width. Default is 1.'],[-1,' * strokeLinecap - {String} Stroke cap type. Default is \"round\". [butt | round | square]'],[-1,' * strokeDashstyle - {String} Stroke dash style. Default is \"solid\". [dot | dash | dashdot | longdash | longdashdot | solid]'],[-1,' * graphic - {Boolean} Set to false if no graphic is desired.'],[-1,' * pointRadius - {Number} Pixel point radius. Default is 6.'],[-1,' * pointerEvents - {String} Default is \"visiblePainted\".'],[-1,' * cursor - {String} Default is \"\".'],[-1,' * externalGraphic - {String} Url to an external graphic that will be used for rendering points.'],[-1,' * graphicWidth - {Number} Pixel width for sizing an external graphic.'],[-1,' * graphicHeight - {Number} Pixel height for sizing an external graphic.'],[-1,' * graphicOpacity - {Number} Opacity (0-1) for an external graphic.'],[-1,' * graphicXOffset - {Number} Pixel offset along the positive x axis for displacing an external graphic.'],[-1,' * graphicYOffset - {Number} Pixel offset along the positive y axis for displacing an external graphic.'],[-1,' * rotation - {Number} For point symbolizers, this is the rotation of a graphic in the clockwise direction about its center point (or any point off center as specified by graphicXOffset and graphicYOffset).'],[-1,' * graphicZIndex - {Number} The integer z-index value to use in rendering.'],[-1,' * graphicName - {String} Named graphic to use when rendering points. Supported values include \"circle\" (default),'],[-1,' * \"square\", \"star\", \"x\", \"cross\", \"triangle\".'],[-1,' * graphicTitle - {String} Tooltip when hovering over a feature. *deprecated*, use title instead'],[-1,' * title - {String} Tooltip when hovering over a feature. Not supported by the canvas renderer.'],[-1,' * backgroundGraphic - {String} Url to a graphic to be used as the background under an externalGraphic.'],[-1,' * backgroundGraphicZIndex - {Number} The integer z-index value to use in rendering the background graphic.'],[-1,' * backgroundXOffset - {Number} The x offset (in pixels) for the background graphic.'],[-1,' * backgroundYOffset - {Number} The y offset (in pixels) for the background graphic.'],[-1,' * backgroundHeight - {Number} The height of the background graphic. If not provided, the graphicHeight will be used.'],[-1,' * backgroundWidth - {Number} The width of the background width. If not provided, the graphicWidth will be used.'],[-1,' * label - {String} The text for an optional label. For browsers that use the canvas renderer, this requires either'],[-1,' * fillText or mozDrawText to be available.'],[-1,' * labelAlign - {String} Label alignment. This specifies the insertion point relative to the text. It is a string'],[-1,' * composed of two characters. The first character is for the horizontal alignment, the second for the vertical'],[-1,' * alignment. Valid values for horizontal alignment: \"l\"=left, \"c\"=center, \"r\"=right. Valid values for vertical'],[-1,' * alignment: \"t\"=top, \"m\"=middle, \"b\"=bottom. Example values: \"lt\", \"cm\", \"rb\". Default is \"cm\".'],[-1,' * labelXOffset - {Number} Pixel offset along the positive x axis for displacing the label. Not supported by the canvas renderer.'],[-1,' * labelYOffset - {Number} Pixel offset along the positive y axis for displacing the label. Not supported by the canvas renderer.'],[-1,' * labelSelect - {Boolean} If set to true, labels will be selectable using SelectFeature or similar controls.'],[-1,' * Default is false.'],[-1,' * labelOutlineColor - {String} The color of the label outline. Default is \'white\'. Only supported by the canvas & SVG renderers.'],[-1,' * labelOutlineWidth - {Number} The width of the label outline. Default is 3, set to 0 or null to disable. Only supported by the SVG renderers.'],[-1,' * labelOutlineOpacity - {Number} The opacity (0-1) of the label outline. Default is fontOpacity. Only supported by the canvas & SVG renderers.'],[-1,' * fontColor - {String} The font color for the label, to be provided like CSS.'],[-1,' * fontOpacity - {Number} Opacity (0-1) for the label'],[-1,' * fontFamily - {String} The font family for the label, to be provided like in CSS.'],[-1,' * fontSize - {String} The font size for the label, to be provided like in CSS.'],[-1,' * fontStyle - {String} The font style for the label, to be provided like in CSS.'],[-1,' * fontWeight - {String} The font weight for the label, to be provided like in CSS.'],[-1,' * display - {String} Symbolizers will have no effect if display is set to \"none\". All other values have no effect.'],[-1,' *\/ '],[1,'OpenLayers.Feature.Vector.style = {'],[-1,' \'default\': {'],[-1,' fillColor: \"#ee9900\",'],[-1,' fillOpacity: 0.4, '],[-1,' hoverFillColor: \"white\",'],[-1,' hoverFillOpacity: 0.8,'],[-1,' strokeColor: \"#ee9900\",'],[-1,' strokeOpacity: 1,'],[-1,' strokeWidth: 1,'],[-1,' strokeLinecap: \"round\",'],[-1,' strokeDashstyle: \"solid\",'],[-1,' hoverStrokeColor: \"red\",'],[-1,' hoverStrokeOpacity: 1,'],[-1,' hoverStrokeWidth: 0.2,'],[-1,' pointRadius: 6,'],[-1,' hoverPointRadius: 1,'],[-1,' hoverPointUnit: \"%\",'],[-1,' pointerEvents: \"visiblePainted\",'],[-1,' cursor: \"inherit\",'],[-1,' fontColor: \"#000000\",'],[-1,' labelAlign: \"cm\",'],[-1,' labelOutlineColor: \"white\",'],[-1,' labelOutlineWidth: 3'],[-1,' },'],[-1,' \'select\': {'],[-1,' fillColor: \"blue\",'],[-1,' fillOpacity: 0.4, '],[-1,' hoverFillColor: \"white\",'],[-1,' hoverFillOpacity: 0.8,'],[-1,' strokeColor: \"blue\",'],[-1,' strokeOpacity: 1,'],[-1,' strokeWidth: 2,'],[-1,' strokeLinecap: \"round\",'],[-1,' strokeDashstyle: \"solid\",'],[-1,' hoverStrokeColor: \"red\",'],[-1,' hoverStrokeOpacity: 1,'],[-1,' hoverStrokeWidth: 0.2,'],[-1,' pointRadius: 6,'],[-1,' hoverPointRadius: 1,'],[-1,' hoverPointUnit: \"%\",'],[-1,' pointerEvents: \"visiblePainted\",'],[-1,' cursor: \"pointer\",'],[-1,' fontColor: \"#000000\",'],[-1,' labelAlign: \"cm\",'],[-1,' labelOutlineColor: \"white\",'],[-1,' labelOutlineWidth: 3'],[-1,''],[-1,' },'],[-1,' \'temporary\': {'],[-1,' fillColor: \"#66cccc\",'],[-1,' fillOpacity: 0.2, '],[-1,' hoverFillColor: \"white\",'],[-1,' hoverFillOpacity: 0.8,'],[-1,' strokeColor: \"#66cccc\",'],[-1,' strokeOpacity: 1,'],[-1,' strokeLinecap: \"round\",'],[-1,' strokeWidth: 2,'],[-1,' strokeDashstyle: \"solid\",'],[-1,' hoverStrokeColor: \"red\",'],[-1,' hoverStrokeOpacity: 1,'],[-1,' hoverStrokeWidth: 0.2,'],[-1,' pointRadius: 6,'],[-1,' hoverPointRadius: 1,'],[-1,' hoverPointUnit: \"%\",'],[-1,' pointerEvents: \"visiblePainted\",'],[-1,' cursor: \"inherit\",'],[-1,' fontColor: \"#000000\",'],[-1,' labelAlign: \"cm\",'],[-1,' labelOutlineColor: \"white\",'],[-1,' labelOutlineWidth: 3'],[-1,''],[-1,' },'],[-1,' \'delete\': {'],[-1,' display: \"none\"'],[-1,' }'],[-1,'}; '],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Style.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' * @requires OpenLayers\/Feature\/Vector.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Style'],[-1,' * This class represents a UserStyle obtained'],[-1,' * from a SLD, containing styling rules.'],[-1,' *\/'],[1,'OpenLayers.Style = OpenLayers.Class({'],[-1,''],[-1,' \/**'],[-1,' * Property: id'],[-1,' * {String} A unique id for this session.'],[-1,' *\/'],[-1,' id: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: name'],[-1,' * {String}'],[-1,' *\/'],[-1,' name: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: title'],[-1,' * {String} Title of this style (set if included in SLD)'],[-1,' *\/'],[-1,' title: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: description'],[-1,' * {String} Description of this style (set if abstract is included in SLD)'],[-1,' *\/'],[-1,' description: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: layerName'],[-1,' * {<String>} name of the layer that this style belongs to, usually'],[-1,' * according to the NamedLayer attribute of an SLD document.'],[-1,' *\/'],[-1,' layerName: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: isDefault'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' isDefault: false,'],[-1,' '],[-1,' \/** '],[-1,' * Property: rules '],[-1,' * {Array(<OpenLayers.Rule>)}'],[-1,' *\/'],[-1,' rules: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: context'],[-1,' * {Object} An optional object with properties that symbolizers\' property'],[-1,' * values should be evaluated against. If no context is specified,'],[-1,' * feature.attributes will be used'],[-1,' *\/'],[-1,' context: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: defaultStyle'],[-1,' * {Object} hash of style properties to use as default for merging'],[-1,' * rule-based style symbolizers onto. If no rules are defined,'],[-1,' * createSymbolizer will return this style. If <defaultsPerSymbolizer> is set to'],[-1,' * true, the defaultStyle will only be taken into account if there are'],[-1,' * rules defined.'],[-1,' *\/'],[-1,' defaultStyle: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: defaultsPerSymbolizer'],[-1,' * {Boolean} If set to true, the <defaultStyle> will extend the symbolizer'],[-1,' * of every rule. Properties of the <defaultStyle> will also be used to set'],[-1,' * missing symbolizer properties if the symbolizer has stroke, fill or'],[-1,' * graphic set to true. Default is false.'],[-1,' *\/'],[-1,' defaultsPerSymbolizer: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: propertyStyles'],[-1,' * {Hash of Boolean} cache of style properties that need to be parsed for'],[-1,' * propertyNames. Property names are keys, values won\'t be used.'],[-1,' *\/'],[-1,' propertyStyles: null,'],[-1,' '],[-1,''],[-1,' \/** '],[-1,' * Constructor: OpenLayers.Style'],[-1,' * Creates a UserStyle.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * style - {Object} Optional hash of style properties that will be'],[-1,' * used as default style for this style object. This style'],[-1,' * applies if no rules are specified. Symbolizers defined in'],[-1,' * rules will extend this default style.'],[-1,' * options - {Object} An optional object with properties to set on the'],[-1,' * style.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * rules - {Array(<OpenLayers.Rule>)} List of rules to be added to the'],[-1,' * style.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Style>}'],[-1,' *\/'],[-1,' initialize: function(style, options) {'],[-1,''],[0,' OpenLayers.Util.extend(this, options);'],[0,' this.rules = [];'],[0,' if(options && options.rules) {'],[0,' this.addRules(options.rules);'],[-1,' }'],[-1,''],[-1,' \/\/ use the default style from OpenLayers.Feature.Vector if no style'],[-1,' \/\/ was given in the constructor'],[0,' this.setDefaultStyle(style ||'],[-1,' OpenLayers.Feature.Vector.style[\"default\"]);'],[-1,''],[0,' this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + \"_\");'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: destroy'],[-1,' * nullify references to prevent circular references and memory leaks'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' for (var i=0, len=this.rules.length; i<len; i++) {'],[0,' this.rules[i].destroy();'],[0,' this.rules[i] = null;'],[-1,' }'],[0,' this.rules = null;'],[0,' this.defaultStyle = null;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: createSymbolizer'],[-1,' * creates a style by applying all feature-dependent rules to the base'],[-1,' * style.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * feature - {<OpenLayers.Feature>} feature to evaluate rules for'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} symbolizer hash'],[-1,' *\/'],[-1,' createSymbolizer: function(feature) {'],[0,' var style = this.defaultsPerSymbolizer ? {} : this.createLiterals('],[-1,' OpenLayers.Util.extend({}, this.defaultStyle), feature);'],[-1,' '],[0,' var rules = this.rules;'],[-1,''],[0,' var rule, context;'],[0,' var elseRules = [];'],[0,' var appliedRules = false;'],[0,' for(var i=0, len=rules.length; i<len; i++) {'],[0,' rule = rules[i];'],[-1,' \/\/ does the rule apply?'],[0,' var applies = rule.evaluate(feature);'],[-1,' '],[0,' if(applies) {'],[0,' if(rule instanceof OpenLayers.Rule && rule.elseFilter) {'],[0,' elseRules.push(rule);'],[-1,' } else {'],[0,' appliedRules = true;'],[0,' this.applySymbolizer(rule, style, feature);'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' \/\/ if no other rules apply, apply the rules with else filters'],[0,' if(appliedRules == false && elseRules.length > 0) {'],[0,' appliedRules = true;'],[0,' for(var i=0, len=elseRules.length; i<len; i++) {'],[0,' this.applySymbolizer(elseRules[i], style, feature);'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ don\'t display if there were rules but none applied'],[0,' if(rules.length > 0 && appliedRules == false) {'],[0,' style.display = \"none\";'],[-1,' }'],[-1,' '],[0,' if (style.label != null && typeof style.label !== \"string\") {'],[0,' style.label = String(style.label);'],[-1,' }'],[-1,' '],[0,' return style;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: applySymbolizer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * rule - {<OpenLayers.Rule>}'],[-1,' * style - {Object}'],[-1,' * feature - {<OpenLayer.Feature.Vector>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} A style with new symbolizer applied.'],[-1,' *\/'],[-1,' applySymbolizer: function(rule, style, feature) {'],[0,' var symbolizerPrefix = feature.geometry ?'],[-1,' this.getSymbolizerPrefix(feature.geometry) :'],[-1,' OpenLayers.Style.SYMBOLIZER_PREFIXES[0];'],[-1,''],[0,' var symbolizer = rule.symbolizer[symbolizerPrefix] || rule.symbolizer;'],[-1,' '],[0,' if(this.defaultsPerSymbolizer === true) {'],[0,' var defaults = this.defaultStyle;'],[0,' OpenLayers.Util.applyDefaults(symbolizer, {'],[-1,' pointRadius: defaults.pointRadius'],[-1,' });'],[0,' if(symbolizer.stroke === true || symbolizer.graphic === true) {'],[0,' OpenLayers.Util.applyDefaults(symbolizer, {'],[-1,' strokeWidth: defaults.strokeWidth,'],[-1,' strokeColor: defaults.strokeColor,'],[-1,' strokeOpacity: defaults.strokeOpacity,'],[-1,' strokeDashstyle: defaults.strokeDashstyle,'],[-1,' strokeLinecap: defaults.strokeLinecap'],[-1,' });'],[-1,' }'],[0,' if(symbolizer.fill === true || symbolizer.graphic === true) {'],[0,' OpenLayers.Util.applyDefaults(symbolizer, {'],[-1,' fillColor: defaults.fillColor,'],[-1,' fillOpacity: defaults.fillOpacity'],[-1,' });'],[-1,' }'],[0,' if(symbolizer.graphic === true) {'],[0,' OpenLayers.Util.applyDefaults(symbolizer, {'],[-1,' pointRadius: this.defaultStyle.pointRadius,'],[-1,' externalGraphic: this.defaultStyle.externalGraphic,'],[-1,' graphicName: this.defaultStyle.graphicName,'],[-1,' graphicOpacity: this.defaultStyle.graphicOpacity,'],[-1,' graphicWidth: this.defaultStyle.graphicWidth,'],[-1,' graphicHeight: this.defaultStyle.graphicHeight,'],[-1,' graphicXOffset: this.defaultStyle.graphicXOffset,'],[-1,' graphicYOffset: this.defaultStyle.graphicYOffset'],[-1,' });'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ merge the style with the current style'],[0,' return this.createLiterals('],[-1,' OpenLayers.Util.extend(style, symbolizer), feature);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: createLiterals'],[-1,' * creates literals for all style properties that have an entry in'],[-1,' * <this.propertyStyles>.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * style - {Object} style to create literals for. Will be modified'],[-1,' * inline.'],[-1,' * feature - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} the modified style'],[-1,' *\/'],[-1,' createLiterals: function(style, feature) {'],[0,' var context = OpenLayers.Util.extend({}, feature.attributes || feature.data);'],[0,' OpenLayers.Util.extend(context, this.context);'],[-1,' '],[0,' for (var i in this.propertyStyles) {'],[0,' style[i] = OpenLayers.Style.createLiteral(style[i], context, feature, i);'],[-1,' }'],[0,' return style;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: findPropertyStyles'],[-1,' * Looks into all rules for this style and the defaultStyle to collect'],[-1,' * all the style hash property names containing ${...} strings that have'],[-1,' * to be replaced using the createLiteral method before returning them.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} hash of property names that need createLiteral parsing. The'],[-1,' * name of the property is the key, and the value is true;'],[-1,' *\/'],[-1,' findPropertyStyles: function() {'],[0,' var propertyStyles = {};'],[-1,''],[-1,' \/\/ check the default style'],[0,' var style = this.defaultStyle;'],[0,' this.addPropertyStyles(propertyStyles, style);'],[-1,''],[-1,' \/\/ walk through all rules to check for properties in their symbolizer'],[0,' var rules = this.rules;'],[0,' var symbolizer, value;'],[0,' for (var i=0, len=rules.length; i<len; i++) {'],[0,' symbolizer = rules[i].symbolizer;'],[0,' for (var key in symbolizer) {'],[0,' value = symbolizer[key];'],[0,' if (typeof value == \"object\") {'],[-1,' \/\/ symbolizer key is \"Point\", \"Line\" or \"Polygon\"'],[0,' this.addPropertyStyles(propertyStyles, value);'],[-1,' } else {'],[-1,' \/\/ symbolizer is a hash of style properties'],[0,' this.addPropertyStyles(propertyStyles, symbolizer);'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return propertyStyles;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: addPropertyStyles'],[-1,' * '],[-1,' * Parameters:'],[-1,' * propertyStyles - {Object} hash to add new property styles to. Will be'],[-1,' * modified inline'],[-1,' * symbolizer - {Object} search this symbolizer for property styles'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} propertyStyles hash'],[-1,' *\/'],[-1,' addPropertyStyles: function(propertyStyles, symbolizer) {'],[0,' var property;'],[0,' for (var key in symbolizer) {'],[0,' property = symbolizer[key];'],[0,' if (typeof property == \"string\" &&'],[-1,' property.match(\/\\$\\{\\w+\\}\/)) {'],[0,' propertyStyles[key] = true;'],[-1,' }'],[-1,' }'],[0,' return propertyStyles;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: addRules'],[-1,' * Adds rules to this style.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * rules - {Array(<OpenLayers.Rule>)}'],[-1,' *\/'],[-1,' addRules: function(rules) {'],[0,' Array.prototype.push.apply(this.rules, rules);'],[0,' this.propertyStyles = this.findPropertyStyles();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: setDefaultStyle'],[-1,' * Sets the default style for this style object.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * style - {Object} Hash of style properties'],[-1,' *\/'],[-1,' setDefaultStyle: function(style) {'],[0,' this.defaultStyle = style; '],[0,' this.propertyStyles = this.findPropertyStyles();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getSymbolizerPrefix'],[-1,' * Returns the correct symbolizer prefix according to the'],[-1,' * geometry type of the passed geometry'],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} key of the according symbolizer'],[-1,' *\/'],[-1,' getSymbolizerPrefix: function(geometry) {'],[0,' var prefixes = OpenLayers.Style.SYMBOLIZER_PREFIXES;'],[0,' for (var i=0, len=prefixes.length; i<len; i++) {'],[0,' if (geometry.CLASS_NAME.indexOf(prefixes[i]) != -1) {'],[0,' return prefixes[i];'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * Clones this style.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Style>} Clone of this style.'],[-1,' *\/'],[-1,' clone: function() {'],[0,' var options = OpenLayers.Util.extend({}, this);'],[-1,' \/\/ clone rules'],[0,' if(this.rules) {'],[0,' options.rules = [];'],[0,' for(var i=0, len=this.rules.length; i<len; ++i) {'],[0,' options.rules.push(this.rules[i].clone());'],[-1,' }'],[-1,' }'],[-1,' \/\/ clone context'],[0,' options.context = this.context && OpenLayers.Util.extend({}, this.context);'],[-1,' \/\/clone default style'],[0,' var defaultStyle = OpenLayers.Util.extend({}, this.defaultStyle);'],[0,' return new OpenLayers.Style(defaultStyle, options);'],[-1,' },'],[-1,' '],[-1,' CLASS_NAME: \"OpenLayers.Style\"'],[-1,'});'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * Function: createLiteral'],[-1,' * converts a style value holding a combination of PropertyName and Literal'],[-1,' * into a Literal, taking the property values from the passed features.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * value - {String} value to parse. If this string contains a construct like'],[-1,' * \"foo ${bar}\", then \"foo \" will be taken as literal, and \"${bar}\"'],[-1,' * will be replaced by the value of the \"bar\" attribute of the passed'],[-1,' * feature.'],[-1,' * context - {Object} context to take attribute values from'],[-1,' * feature - {<OpenLayers.Feature.Vector>} optional feature to pass to'],[-1,' * <OpenLayers.String.format> for evaluating functions in the'],[-1,' * context.'],[-1,' * property - {String} optional, name of the property for which the literal is'],[-1,' * being created for evaluating functions in the context.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} the parsed value. In the example of the value parameter above, the'],[-1,' * result would be \"foo valueOfBar\", assuming that the passed feature has an'],[-1,' * attribute named \"bar\" with the value \"valueOfBar\".'],[-1,' *\/'],[1,'OpenLayers.Style.createLiteral = function(value, context, feature, property) {'],[0,' if (typeof value == \"string\" && value.indexOf(\"${\") != -1) {'],[0,' value = OpenLayers.String.format(value, context, [feature, property]);'],[0,' value = (isNaN(value) || !value) ? value : parseFloat(value);'],[-1,' }'],[0,' return value;'],[-1,'};'],[-1,' '],[-1,'\/**'],[-1,' * Constant: OpenLayers.Style.SYMBOLIZER_PREFIXES'],[-1,' * {Array} prefixes of the sld symbolizers. These are the'],[-1,' * same as the main geometry types'],[-1,' *\/'],[1,'OpenLayers.Style.SYMBOLIZER_PREFIXES = [\'Point\', \'Line\', \'Polygon\', \'Text\','],[-1,' \'Raster\'];'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Renderer.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Renderer '],[-1,' * This is the base class for all renderers.'],[-1,' *'],[-1,' * This is based on a merger code written by Paul Spencer and Bertil Chapuis.'],[-1,' * It is largely composed of virtual functions that are to be implemented'],[-1,' * in technology-specific subclasses, but there is some generic code too.'],[-1,' * '],[-1,' * The functions that *are* implemented here merely deal with the maintenance'],[-1,' * of the size and extent variables, as well as the cached \'resolution\' '],[-1,' * value. '],[-1,' * '],[-1,' * A note to the user that all subclasses should use getResolution() instead'],[-1,' * of directly accessing this.resolution in order to correctly use the '],[-1,' * cacheing system.'],[-1,' *'],[-1,' *\/'],[1,'OpenLayers.Renderer = OpenLayers.Class({'],[-1,''],[-1,' \/** '],[-1,' * Property: container'],[-1,' * {DOMElement} '],[-1,' *\/'],[-1,' container: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: root'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' root: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: extent'],[-1,' * {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' extent: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: locked'],[-1,' * {Boolean} If the renderer is currently in a state where many things'],[-1,' * are changing, the \'locked\' property is set to true. This means '],[-1,' * that renderers can expect at least one more drawFeature event to be'],[-1,' * called with the \'locked\' property set to \'true\': In some renderers,'],[-1,' * this might make sense to use as a \'only update local information\''],[-1,' * flag. '],[-1,' *\/ '],[-1,' locked: false,'],[-1,' '],[-1,' \/** '],[-1,' * Property: size'],[-1,' * {<OpenLayers.Size>} '],[-1,' *\/'],[-1,' size: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: resolution'],[-1,' * {Float} cache of current map resolution'],[-1,' *\/'],[-1,' resolution: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: map '],[-1,' * {<OpenLayers.Map>} Reference to the map -- this is set in Vector\'s setMap()'],[-1,' *\/'],[-1,' map: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: featureDx'],[-1,' * {Number} Feature offset in x direction. Will be calculated for and'],[-1,' * applied to the current feature while rendering (see'],[-1,' * <calculateFeatureDx>).'],[-1,' *\/'],[-1,' featureDx: 0,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Renderer '],[-1,' *'],[-1,' * Parameters:'],[-1,' * containerID - {<String>} '],[-1,' * options - {Object} options for this renderer. See sublcasses for'],[-1,' * supported options.'],[-1,' *\/'],[-1,' initialize: function(containerID, options) {'],[0,' this.container = OpenLayers.Util.getElement(containerID);'],[0,' OpenLayers.Util.extend(this, options);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' this.container = null;'],[0,' this.extent = null;'],[0,' this.size = null;'],[0,' this.resolution = null;'],[0,' this.map = null;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: supported'],[-1,' * This should be overridden by specific subclasses'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the browser supports the renderer class'],[-1,' *\/'],[-1,' supported: function() {'],[0,' return false;'],[-1,' }, '],[-1,' '],[-1,' \/**'],[-1,' * Method: setExtent'],[-1,' * Set the visible part of the layer.'],[-1,' *'],[-1,' * Resolution has probably changed, so we nullify the resolution '],[-1,' * cache (this.resolution) -- this way it will be re-computed when '],[-1,' * next it is needed.'],[-1,' * We nullify the resolution cache (this.resolution) if resolutionChanged'],[-1,' * is set to true - this way it will be re-computed on the next'],[-1,' * getResolution() request.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * extent - {<OpenLayers.Bounds>}'],[-1,' * resolutionChanged - {Boolean}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} true to notify the layer that the new extent does not exceed'],[-1,' * the coordinate range, and the features will not need to be redrawn.'],[-1,' * False otherwise.'],[-1,' *\/'],[-1,' setExtent: function(extent, resolutionChanged) {'],[0,' this.extent = extent.clone();'],[0,' if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {'],[0,' var ratio = extent.getWidth() \/ this.map.getExtent().getWidth(),'],[-1,' extent = extent.scale(1 \/ ratio);'],[0,' this.extent = extent.wrapDateLine(this.map.getMaxExtent()).scale(ratio);'],[-1,' }'],[0,' if (resolutionChanged) {'],[0,' this.resolution = null;'],[-1,' }'],[0,' return true;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setSize'],[-1,' * Sets the size of the drawing surface.'],[-1,' * '],[-1,' * Resolution has probably changed, so we nullify the resolution '],[-1,' * cache (this.resolution) -- this way it will be re-computed when '],[-1,' * next it is needed.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * size - {<OpenLayers.Size>} '],[-1,' *\/'],[-1,' setSize: function(size) {'],[0,' this.size = size.clone();'],[0,' this.resolution = null;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: getResolution'],[-1,' * Uses cached copy of resolution if available to minimize computing'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The current map\'s resolution'],[-1,' *\/'],[-1,' getResolution: function() {'],[0,' this.resolution = this.resolution || this.map.getResolution();'],[0,' return this.resolution;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawFeature'],[-1,' * Draw the feature. The optional style argument can be used'],[-1,' * to override the feature\'s own style. This method should only'],[-1,' * be called from layer.drawFeature().'],[-1,' *'],[-1,' * Parameters:'],[-1,' * feature - {<OpenLayers.Feature.Vector>} '],[-1,' * style - {<Object>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if the feature has been drawn completely, false if not,'],[-1,' * undefined if the feature had no geometry'],[-1,' *\/'],[-1,' drawFeature: function(feature, style) {'],[0,' if(style == null) {'],[0,' style = feature.style;'],[-1,' }'],[0,' if (feature.geometry) {'],[0,' var bounds = feature.geometry.getBounds();'],[0,' if(bounds) {'],[0,' var worldBounds;'],[0,' if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {'],[0,' worldBounds = this.map.getMaxExtent();'],[-1,' }'],[0,' if (!bounds.intersectsBounds(this.extent, {worldBounds: worldBounds})) {'],[0,' style = {display: \"none\"};'],[-1,' } else {'],[0,' this.calculateFeatureDx(bounds, worldBounds);'],[-1,' }'],[0,' var rendered = this.drawGeometry(feature.geometry, style, feature.id);'],[0,' if(style.display != \"none\" && style.label && rendered !== false) {'],[-1,''],[0,' var location = feature.geometry.getCentroid(); '],[0,' if(style.labelXOffset || style.labelYOffset) {'],[0,' var xOffset = isNaN(style.labelXOffset) ? 0 : style.labelXOffset;'],[0,' var yOffset = isNaN(style.labelYOffset) ? 0 : style.labelYOffset;'],[0,' var res = this.getResolution();'],[0,' location.move(xOffset*res, yOffset*res);'],[-1,' }'],[0,' this.drawText(feature.id, style, location);'],[-1,' } else {'],[0,' this.removeText(feature.id);'],[-1,' }'],[0,' return rendered;'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: calculateFeatureDx'],[-1,' * {Number} Calculates the feature offset in x direction. Looking at the'],[-1,' * center of the feature bounds and the renderer extent, we calculate how'],[-1,' * many world widths the two are away from each other. This distance is'],[-1,' * used to shift the feature as close as possible to the center of the'],[-1,' * current enderer extent, which ensures that the feature is visible in the'],[-1,' * current viewport.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>} Bounds of the feature'],[-1,' * worldBounds - {<OpenLayers.Bounds>} Bounds of the world'],[-1,' *\/'],[-1,' calculateFeatureDx: function(bounds, worldBounds) {'],[0,' this.featureDx = 0;'],[0,' if (worldBounds) {'],[0,' var worldWidth = worldBounds.getWidth(),'],[-1,' rendererCenterX = (this.extent.left + this.extent.right) \/ 2,'],[-1,' featureCenterX = (bounds.left + bounds.right) \/ 2,'],[-1,' worldsAway = Math.round((featureCenterX - rendererCenterX) \/ worldWidth);'],[0,' this.featureDx = worldsAway * worldWidth;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: drawGeometry'],[-1,' * '],[-1,' * Draw a geometry. This should only be called from the renderer itself.'],[-1,' * Use layer.drawFeature() from outside the renderer.'],[-1,' * virtual function'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} '],[-1,' * style - {Object} '],[-1,' * featureId - {<String>} '],[-1,' *\/'],[-1,' drawGeometry: function(geometry, style, featureId) {},'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawText'],[-1,' * Function for drawing text labels.'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * featureId - {String}'],[-1,' * style -'],[-1,' * location - {<OpenLayers.Geometry.Point>}'],[-1,' *\/'],[-1,' drawText: function(featureId, style, location) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: removeText'],[-1,' * Function for removing text labels.'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * featureId - {String}'],[-1,' *\/'],[-1,' removeText: function(featureId) {},'],[-1,' '],[-1,' \/**'],[-1,' * Method: clear'],[-1,' * Clear all vectors from the renderer.'],[-1,' * virtual function.'],[-1,' *\/ '],[-1,' clear: function() {},'],[-1,''],[-1,' \/**'],[-1,' * Method: getFeatureIdFromEvent'],[-1,' * Returns a feature id from an event on the renderer. '],[-1,' * How this happens is specific to the renderer. This should be'],[-1,' * called from layer.getFeatureFromEvent().'],[-1,' * Virtual function.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {<OpenLayers.Event>} '],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} A feature id or undefined.'],[-1,' *\/'],[-1,' getFeatureIdFromEvent: function(evt) {},'],[-1,' '],[-1,' \/**'],[-1,' * Method: eraseFeatures '],[-1,' * This is called by the layer to erase features'],[-1,' * '],[-1,' * Parameters:'],[-1,' * features - {Array(<OpenLayers.Feature.Vector>)} '],[-1,' *\/'],[-1,' eraseFeatures: function(features) {'],[0,' if(!(OpenLayers.Util.isArray(features))) {'],[0,' features = [features];'],[-1,' }'],[0,' for(var i=0, len=features.length; i<len; ++i) {'],[0,' var feature = features[i];'],[0,' this.eraseGeometry(feature.geometry, feature.id);'],[0,' this.removeText(feature.id);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: eraseGeometry'],[-1,' * Remove a geometry from the renderer (by id).'],[-1,' * virtual function.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} '],[-1,' * featureId - {String}'],[-1,' *\/'],[-1,' eraseGeometry: function(geometry, featureId) {},'],[-1,' '],[-1,' \/**'],[-1,' * Method: moveRoot'],[-1,' * moves this renderer\'s root to a (different) renderer.'],[-1,' * To be implemented by subclasses that require a common renderer root for'],[-1,' * feature selection.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * renderer - {<OpenLayers.Renderer>} target renderer for the moved root'],[-1,' *\/'],[-1,' moveRoot: function(renderer) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: getRenderLayerId'],[-1,' * Gets the layer that this renderer\'s output appears on. If moveRoot was'],[-1,' * used, this will be different from the id of the layer containing the'],[-1,' * features rendered by this renderer.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} the id of the output layer.'],[-1,' *\/'],[-1,' getRenderLayerId: function() {'],[0,' return this.container.id;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: applyDefaultSymbolizer'],[-1,' * '],[-1,' * Parameters:'],[-1,' * symbolizer - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object}'],[-1,' *\/'],[-1,' applyDefaultSymbolizer: function(symbolizer) {'],[0,' var result = OpenLayers.Util.extend({},'],[-1,' OpenLayers.Renderer.defaultSymbolizer);'],[0,' if(symbolizer.stroke === false) {'],[0,' delete result.strokeWidth;'],[0,' delete result.strokeColor;'],[-1,' }'],[0,' if(symbolizer.fill === false) {'],[0,' delete result.fillColor;'],[-1,' }'],[0,' OpenLayers.Util.extend(result, symbolizer);'],[0,' return result;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Renderer\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.defaultSymbolizer'],[-1,' * {Object} Properties from this symbolizer will be applied to symbolizers'],[-1,' * with missing properties. This can also be used to set a global'],[-1,' * symbolizer default in OpenLayers. To be SLD 1.x compliant, add the'],[-1,' * following code before rendering any vector features:'],[-1,' * (code)'],[-1,' * OpenLayers.Renderer.defaultSymbolizer = {'],[-1,' * fillColor: \"#808080\",'],[-1,' * fillOpacity: 1,'],[-1,' * strokeColor: \"#000000\",'],[-1,' * strokeOpacity: 1,'],[-1,' * strokeWidth: 1,'],[-1,' * pointRadius: 3,'],[-1,' * graphicName: \"square\"'],[-1,' * };'],[-1,' * (end)'],[-1,' *\/'],[1,'OpenLayers.Renderer.defaultSymbolizer = {'],[-1,' fillColor: \"#000000\",'],[-1,' strokeColor: \"#000000\",'],[-1,' strokeWidth: 2,'],[-1,' fillOpacity: 1,'],[-1,' strokeOpacity: 1,'],[-1,' pointRadius: 0,'],[-1,' labelAlign: \'cm\''],[-1,'};'],[-1,' '],[-1,''],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.symbol'],[-1,' * Coordinate arrays for well known (named) symbols.'],[-1,' *\/'],[1,'OpenLayers.Renderer.symbol = {'],[-1,' \"star\": [350,75, 379,161, 469,161, 397,215, 423,301, 350,250, 277,301,'],[-1,' 303,215, 231,161, 321,161, 350,75],'],[-1,' \"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,'],[-1,' 4,0],'],[-1,' \"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],'],[-1,' \"square\": [0,0, 0,1, 1,1, 1,0, 0,0],'],[-1,' \"triangle\": [0,10, 10,10, 5,0, 0,10]'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Renderer\/Elements.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Renderer.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.ElementsIndexer'],[-1,' * This class takes care of figuring out which order elements should be'],[-1,' * placed in the DOM based on given indexing methods. '],[-1,' *\/'],[1,'OpenLayers.ElementsIndexer = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * Property: maxZIndex'],[-1,' * {Integer} This is the largest-most z-index value for a node'],[-1,' * contained within the indexer.'],[-1,' *\/'],[-1,' maxZIndex: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: order'],[-1,' * {Array<String>} This is an array of node id\'s stored in the'],[-1,' * order that they should show up on screen. Id\'s higher up in the'],[-1,' * array (higher array index) represent nodes with higher z-indeces.'],[-1,' *\/'],[-1,' order: null, '],[-1,' '],[-1,' \/**'],[-1,' * Property: indices'],[-1,' * {Object} This is a hash that maps node ids to their z-index value'],[-1,' * stored in the indexer. This is done to make finding a nodes z-index '],[-1,' * value O(1).'],[-1,' *\/'],[-1,' indices: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: compare'],[-1,' * {Function} This is the function used to determine placement of'],[-1,' * of a new node within the indexer. If null, this defaults to to'],[-1,' * the Z_ORDER_DRAWING_ORDER comparison method.'],[-1,' *\/'],[-1,' compare: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: initialize'],[-1,' * Create a new indexer with '],[-1,' * '],[-1,' * Parameters:'],[-1,' * yOrdering - {Boolean} Whether to use y-ordering.'],[-1,' *\/'],[-1,' initialize: function(yOrdering) {'],[-1,''],[0,' this.compare = yOrdering ? '],[-1,' OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER :'],[-1,' OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER;'],[-1,''],[0,' this.clear();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: insert'],[-1,' * Insert a new node into the indexer. In order to find the correct '],[-1,' * positioning for the node to be inserted, this method uses a binary '],[-1,' * search. This makes inserting O(log(n)). '],[-1,' * '],[-1,' * Parameters:'],[-1,' * newNode - {DOMElement} The new node to be inserted.'],[-1,' * '],[-1,' * Returns'],[-1,' * {DOMElement} the node before which we should insert our newNode, or'],[-1,' * null if newNode can just be appended.'],[-1,' *\/'],[-1,' insert: function(newNode) {'],[-1,' \/\/ If the node is known to the indexer, remove it so we can'],[-1,' \/\/ recalculate where it should go.'],[0,' if (this.exists(newNode)) {'],[0,' this.remove(newNode);'],[-1,' }'],[-1,' '],[0,' var nodeId = newNode.id;'],[-1,' '],[0,' this.determineZIndex(newNode); '],[-1,''],[0,' var leftIndex = -1;'],[0,' var rightIndex = this.order.length;'],[0,' var middle;'],[-1,''],[0,' while (rightIndex - leftIndex > 1) {'],[0,' middle = parseInt((leftIndex + rightIndex) \/ 2);'],[-1,' '],[0,' var placement = this.compare(this, newNode,'],[-1,' OpenLayers.Util.getElement(this.order[middle]));'],[-1,' '],[0,' if (placement > 0) {'],[0,' leftIndex = middle;'],[-1,' } else {'],[0,' rightIndex = middle;'],[-1,' } '],[-1,' }'],[-1,' '],[0,' this.order.splice(rightIndex, 0, nodeId);'],[0,' this.indices[nodeId] = this.getZIndex(newNode);'],[-1,' '],[-1,' \/\/ If the new node should be before another in the index'],[-1,' \/\/ order, return the node before which we have to insert the new one;'],[-1,' \/\/ else, return null to indicate that the new node can be appended.'],[0,' return this.getNextElement(rightIndex);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: remove'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node to be removed.'],[-1,' *\/'],[-1,' remove: function(node) {'],[0,' var nodeId = node.id;'],[0,' var arrayIndex = OpenLayers.Util.indexOf(this.order, nodeId);'],[0,' if (arrayIndex >= 0) {'],[-1,' \/\/ Remove it from the order array, as well as deleting the node'],[-1,' \/\/ from the indeces hash.'],[0,' this.order.splice(arrayIndex, 1);'],[0,' delete this.indices[nodeId];'],[-1,' '],[-1,' \/\/ Reset the maxium z-index based on the last item in the '],[-1,' \/\/ order array.'],[0,' if (this.order.length > 0) {'],[0,' var lastId = this.order[this.order.length - 1];'],[0,' this.maxZIndex = this.indices[lastId];'],[-1,' } else {'],[0,' this.maxZIndex = 0;'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: clear'],[-1,' *\/'],[-1,' clear: function() {'],[0,' this.order = [];'],[0,' this.indices = {};'],[0,' this.maxZIndex = 0;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: exists'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node to test for existence.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the node exists in the indexer?'],[-1,' *\/'],[-1,' exists: function(node) {'],[0,' return (this.indices[node.id] != null);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getZIndex'],[-1,' * Get the z-index value for the current node from the node data itself.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node whose z-index to get.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer} The z-index value for the specified node (from the node '],[-1,' * data itself).'],[-1,' *\/'],[-1,' getZIndex: function(node) {'],[0,' return node._style.graphicZIndex; '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: determineZIndex'],[-1,' * Determine the z-index for the current node if there isn\'t one, '],[-1,' * and set the maximum value if we\'ve found a new maximum.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement} '],[-1,' *\/'],[-1,' determineZIndex: function(node) {'],[0,' var zIndex = node._style.graphicZIndex;'],[-1,' '],[-1,' \/\/ Everything must have a zIndex. If none is specified,'],[-1,' \/\/ this means the user *must* (hint: assumption) want this'],[-1,' \/\/ node to succomb to drawing order. To enforce drawing order'],[-1,' \/\/ over all indexing methods, we\'ll create a new z-index that\'s'],[-1,' \/\/ greater than any currently in the indexer.'],[0,' if (zIndex == null) {'],[0,' zIndex = this.maxZIndex;'],[0,' node._style.graphicZIndex = zIndex; '],[0,' } else if (zIndex > this.maxZIndex) {'],[0,' this.maxZIndex = zIndex;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getNextElement'],[-1,' * Get the next element in the order stack.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * index - {Integer} The index of the current node in this.order.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} the node following the index passed in, or'],[-1,' * null.'],[-1,' *\/'],[-1,' getNextElement: function(index) {'],[0,' for (var nextIndex = index + 1, nextElement = undefined;'],[-1,' (nextIndex < this.order.length) && (nextElement == undefined);'],[-1,' nextIndex++) {'],[0,' nextElement = OpenLayers.Util.getElement(this.order[nextIndex]);'],[-1,' }'],[-1,' '],[0,' return nextElement || null;'],[-1,' },'],[-1,' '],[-1,' CLASS_NAME: \"OpenLayers.ElementsIndexer\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.ElementsIndexer.IndexingMethods'],[-1,' * These are the compare methods for figuring out where a new node should be '],[-1,' * placed within the indexer. These methods are very similar to general '],[-1,' * sorting methods in that they return -1, 0, and 1 to specify the '],[-1,' * direction in which new nodes fall in the ordering.'],[-1,' *\/'],[1,'OpenLayers.ElementsIndexer.IndexingMethods = {'],[-1,' '],[-1,' \/**'],[-1,' * Method: Z_ORDER'],[-1,' * This compare method is used by other comparison methods.'],[-1,' * It can be used individually for ordering, but is not recommended,'],[-1,' * because it doesn\'t subscribe to drawing order.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * indexer - {<OpenLayers.ElementsIndexer>}'],[-1,' * newNode - {DOMElement}'],[-1,' * nextNode - {DOMElement}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer}'],[-1,' *\/'],[-1,' Z_ORDER: function(indexer, newNode, nextNode) {'],[0,' var newZIndex = indexer.getZIndex(newNode);'],[-1,''],[0,' var returnVal = 0;'],[0,' if (nextNode) {'],[0,' var nextZIndex = indexer.getZIndex(nextNode);'],[0,' returnVal = newZIndex - nextZIndex; '],[-1,' }'],[-1,' '],[0,' return returnVal;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: Z_ORDER_DRAWING_ORDER'],[-1,' * This method orders nodes by their z-index, but does so in a way'],[-1,' * that, if there are other nodes with the same z-index, the newest '],[-1,' * drawn will be the front most within that z-index. This is the '],[-1,' * default indexing method.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * indexer - {<OpenLayers.ElementsIndexer>}'],[-1,' * newNode - {DOMElement}'],[-1,' * nextNode - {DOMElement}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer}'],[-1,' *\/'],[-1,' Z_ORDER_DRAWING_ORDER: function(indexer, newNode, nextNode) {'],[0,' var returnVal = OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER('],[-1,' indexer, '],[-1,' newNode, '],[-1,' nextNode'],[-1,' );'],[-1,' '],[-1,' \/\/ Make Z_ORDER subscribe to drawing order by pushing it above'],[-1,' \/\/ all of the other nodes with the same z-index.'],[0,' if (nextNode && returnVal == 0) {'],[0,' returnVal = 1;'],[-1,' }'],[-1,' '],[0,' return returnVal;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: Z_ORDER_Y_ORDER'],[-1,' * This one should really be called Z_ORDER_Y_ORDER_DRAWING_ORDER, as it'],[-1,' * best describes which ordering methods have precedence (though, the '],[-1,' * name would be too long). This method orders nodes by their z-index, '],[-1,' * but does so in a way that, if there are other nodes with the same '],[-1,' * z-index, the nodes with the lower y position will be \"closer\" than '],[-1,' * those with a higher y position. If two nodes have the exact same y '],[-1,' * position, however, then this method will revert to using drawing '],[-1,' * order to decide placement.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * indexer - {<OpenLayers.ElementsIndexer>}'],[-1,' * newNode - {DOMElement}'],[-1,' * nextNode - {DOMElement}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer}'],[-1,' *\/'],[-1,' Z_ORDER_Y_ORDER: function(indexer, newNode, nextNode) {'],[0,' var returnVal = OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER('],[-1,' indexer, '],[-1,' newNode, '],[-1,' nextNode'],[-1,' );'],[-1,' '],[0,' if (nextNode && returnVal === 0) { '],[0,' var result = nextNode._boundsBottom - newNode._boundsBottom;'],[0,' returnVal = (result === 0) ? 1 : result;'],[-1,' }'],[-1,' '],[0,' return returnVal; '],[-1,' }'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Renderer.Elements'],[-1,' * This is another virtual class in that it should never be instantiated by '],[-1,' * itself as a Renderer. It exists because there is *tons* of shared '],[-1,' * functionality between different vector libraries which use nodes\/elements'],[-1,' * as a base for rendering vectors. '],[-1,' * '],[-1,' * The highlevel bits of code that are implemented here are the adding and '],[-1,' * removing of geometries, which is essentially the same for any '],[-1,' * element-based renderer. The details of creating each node and drawing the'],[-1,' * paths are of course different, but the machinery is the same. '],[-1,' * '],[-1,' * Inherits:'],[-1,' * - <OpenLayers.Renderer>'],[-1,' *\/'],[1,'OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {'],[-1,''],[-1,' \/**'],[-1,' * Property: rendererRoot'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' rendererRoot: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: root'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' root: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: vectorRoot'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' vectorRoot: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: textRoot'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' textRoot: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: xmlns'],[-1,' * {String}'],[-1,' *\/ '],[-1,' xmlns: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: xOffset'],[-1,' * {Number} Offset to apply to the renderer viewport translation in x'],[-1,' * direction. If the renderer extent\'s center is on the right of the'],[-1,' * dateline (i.e. exceeds the world bounds), we shift the viewport to the'],[-1,' * left by one world width. This avoids that features disappear from the'],[-1,' * map viewport. Because our dateline handling logic in other places'],[-1,' * ensures that extents crossing the dateline always have a center'],[-1,' * exceeding the world bounds on the left, we need this offset to make sure'],[-1,' * that the same is true for the renderer extent in pixel space as well.'],[-1,' *\/'],[-1,' xOffset: 0,'],[-1,' '],[-1,' \/**'],[-1,' * Property: rightOfDateLine'],[-1,' * {Boolean} Keeps track of the location of the map extent relative to the'],[-1,' * date line. The <setExtent> method compares this value (which is the one'],[-1,' * from the previous <setExtent> call) with the current position of the map'],[-1,' * extent relative to the date line and updates the xOffset when the extent'],[-1,' * has moved from one side of the date line to the other.'],[-1,' *\/'],[-1,' '],[-1,' \/**'],[-1,' * Property: Indexer'],[-1,' * {<OpenLayers.ElementIndexer>} An instance of OpenLayers.ElementsIndexer '],[-1,' * created upon initialization if the zIndexing or yOrdering options'],[-1,' * passed to this renderer\'s constructor are set to true.'],[-1,' *\/'],[-1,' indexer: null, '],[-1,' '],[-1,' \/**'],[-1,' * Constant: BACKGROUND_ID_SUFFIX'],[-1,' * {String}'],[-1,' *\/'],[-1,' BACKGROUND_ID_SUFFIX: \"_background\",'],[-1,' '],[-1,' \/**'],[-1,' * Constant: LABEL_ID_SUFFIX'],[-1,' * {String}'],[-1,' *\/'],[-1,' LABEL_ID_SUFFIX: \"_label\",'],[-1,' '],[-1,' \/**'],[-1,' * Constant: LABEL_OUTLINE_SUFFIX'],[-1,' * {String}'],[-1,' *\/'],[-1,' LABEL_OUTLINE_SUFFIX: \"_outline\",'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Renderer.Elements'],[-1,' * '],[-1,' * Parameters:'],[-1,' * containerID - {String}'],[-1,' * options - {Object} options for this renderer. '],[-1,' *'],[-1,' * Supported options are:'],[-1,' * yOrdering - {Boolean} Whether to use y-ordering'],[-1,' * zIndexing - {Boolean} Whether to use z-indexing. Will be ignored'],[-1,' * if yOrdering is set to true.'],[-1,' *\/'],[-1,' initialize: function(containerID, options) {'],[0,' OpenLayers.Renderer.prototype.initialize.apply(this, arguments);'],[-1,''],[0,' this.rendererRoot = this.createRenderRoot();'],[0,' this.root = this.createRoot(\"_root\");'],[0,' this.vectorRoot = this.createRoot(\"_vroot\");'],[0,' this.textRoot = this.createRoot(\"_troot\");'],[-1,' '],[0,' this.root.appendChild(this.vectorRoot);'],[0,' this.root.appendChild(this.textRoot);'],[-1,' '],[0,' this.rendererRoot.appendChild(this.root);'],[0,' this.container.appendChild(this.rendererRoot);'],[-1,' '],[0,' if(options && (options.zIndexing || options.yOrdering)) {'],[0,' this.indexer = new OpenLayers.ElementsIndexer(options.yOrdering);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' *\/'],[-1,' destroy: function() {'],[-1,''],[0,' this.clear(); '],[-1,''],[0,' this.rendererRoot = null;'],[0,' this.root = null;'],[0,' this.xmlns = null;'],[-1,''],[0,' OpenLayers.Renderer.prototype.destroy.apply(this, arguments);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: clear'],[-1,' * Remove all the elements from the root'],[-1,' *\/ '],[-1,' clear: function() {'],[0,' var child;'],[0,' var root = this.vectorRoot;'],[0,' if (root) {'],[0,' while (child = root.firstChild) {'],[0,' root.removeChild(child);'],[-1,' }'],[-1,' }'],[0,' root = this.textRoot;'],[0,' if (root) {'],[0,' while (child = root.firstChild) {'],[0,' root.removeChild(child);'],[-1,' }'],[-1,' }'],[0,' if (this.indexer) {'],[0,' this.indexer.clear();'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setExtent'],[-1,' * Set the visible part of the layer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * extent - {<OpenLayers.Bounds>}'],[-1,' * resolutionChanged - {Boolean}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} true to notify the layer that the new extent does not exceed'],[-1,' * the coordinate range, and the features will not need to be redrawn.'],[-1,' * False otherwise.'],[-1,' *\/'],[-1,' setExtent: function(extent, resolutionChanged) {'],[0,' var coordSysUnchanged = OpenLayers.Renderer.prototype.setExtent.apply(this, arguments);'],[0,' var resolution = this.getResolution();'],[0,' if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {'],[0,' var rightOfDateLine,'],[-1,' ratio = extent.getWidth() \/ this.map.getExtent().getWidth(),'],[-1,' extent = extent.scale(1 \/ ratio),'],[-1,' world = this.map.getMaxExtent();'],[0,' if (world.right > extent.left && world.right < extent.right) {'],[0,' rightOfDateLine = true;'],[0,' } else if (world.left > extent.left && world.left < extent.right) {'],[0,' rightOfDateLine = false;'],[-1,' }'],[0,' if (rightOfDateLine !== this.rightOfDateLine || resolutionChanged) {'],[0,' coordSysUnchanged = false;'],[0,' this.xOffset = rightOfDateLine === true ?'],[-1,' world.getWidth() \/ resolution : 0;'],[-1,' }'],[0,' this.rightOfDateLine = rightOfDateLine;'],[-1,' }'],[0,' return coordSysUnchanged;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: getNodeType'],[-1,' * This function is in charge of asking the specific renderer which type'],[-1,' * of node to create for the given geometry and style. All geometries'],[-1,' * in an Elements-based renderer consist of one node and some'],[-1,' * attributes. We have the nodeFactory() function which creates a node'],[-1,' * for us, but it takes a \'type\' as input, and that is precisely what'],[-1,' * this function tells us. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The corresponding node type for the specified geometry'],[-1,' *\/'],[-1,' getNodeType: function(geometry, style) { },'],[-1,''],[-1,' \/** '],[-1,' * Method: drawGeometry '],[-1,' * Draw the geometry, creating new nodes, setting paths, setting style,'],[-1,' * setting featureId on the node. This method should only be called'],[-1,' * by the renderer itself.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if the geometry has been drawn completely; null if'],[-1,' * incomplete; false otherwise'],[-1,' *\/'],[-1,' drawGeometry: function(geometry, style, featureId) {'],[0,' var className = geometry.CLASS_NAME;'],[0,' var rendered = true;'],[0,' if ((className == \"OpenLayers.Geometry.Collection\") ||'],[-1,' (className == \"OpenLayers.Geometry.MultiPoint\") ||'],[-1,' (className == \"OpenLayers.Geometry.MultiLineString\") ||'],[-1,' (className == \"OpenLayers.Geometry.MultiPolygon\")) {'],[0,' for (var i = 0, len=geometry.components.length; i<len; i++) {'],[0,' rendered = this.drawGeometry('],[-1,' geometry.components[i], style, featureId) && rendered;'],[-1,' }'],[0,' return rendered;'],[-1,' }'],[-1,''],[0,' rendered = false;'],[0,' var removeBackground = false;'],[0,' if (style.display != \"none\") {'],[0,' if (style.backgroundGraphic) {'],[0,' this.redrawBackgroundNode(geometry.id, geometry, style,'],[-1,' featureId);'],[-1,' } else {'],[0,' removeBackground = true;'],[-1,' }'],[0,' rendered = this.redrawNode(geometry.id, geometry, style,'],[-1,' featureId);'],[-1,' }'],[0,' if (rendered == false) {'],[0,' var node = document.getElementById(geometry.id);'],[0,' if (node) {'],[0,' if (node._style.backgroundGraphic) {'],[0,' removeBackground = true;'],[-1,' }'],[0,' node.parentNode.removeChild(node);'],[-1,' }'],[-1,' }'],[0,' if (removeBackground) {'],[0,' var node = document.getElementById('],[-1,' geometry.id + this.BACKGROUND_ID_SUFFIX);'],[0,' if (node) {'],[0,' node.parentNode.removeChild(node);'],[-1,' }'],[-1,' }'],[0,' return rendered;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: redrawNode'],[-1,' * '],[-1,' * Parameters:'],[-1,' * id - {String}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if the complete geometry could be drawn, null if parts of'],[-1,' * the geometry could not be drawn, false otherwise'],[-1,' *\/'],[-1,' redrawNode: function(id, geometry, style, featureId) {'],[0,' style = this.applyDefaultSymbolizer(style);'],[-1,' \/\/ Get the node if it\'s already on the map.'],[0,' var node = this.nodeFactory(id, this.getNodeType(geometry, style));'],[-1,' '],[-1,' \/\/ Set the data for the node, then draw it.'],[0,' node._featureId = featureId;'],[0,' node._boundsBottom = geometry.getBounds().bottom;'],[0,' node._geometryClass = geometry.CLASS_NAME;'],[0,' node._style = style;'],[-1,''],[0,' var drawResult = this.drawGeometryNode(node, geometry, style);'],[0,' if(drawResult === false) {'],[0,' return false;'],[-1,' }'],[-1,' '],[0,' node = drawResult.node;'],[-1,' '],[-1,' \/\/ Insert the node into the indexer so it can show us where to'],[-1,' \/\/ place it. Note that this operation is O(log(n)). If there\'s a'],[-1,' \/\/ performance problem (when dragging, for instance) this is'],[-1,' \/\/ likely where it would be.'],[0,' if (this.indexer) {'],[0,' var insert = this.indexer.insert(node);'],[0,' if (insert) {'],[0,' this.vectorRoot.insertBefore(node, insert);'],[-1,' } else {'],[0,' this.vectorRoot.appendChild(node);'],[-1,' }'],[-1,' } else {'],[-1,' \/\/ if there\'s no indexer, simply append the node to root,'],[-1,' \/\/ but only if the node is a new one'],[0,' if (node.parentNode !== this.vectorRoot){ '],[0,' this.vectorRoot.appendChild(node);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' this.postDraw(node);'],[-1,' '],[0,' return drawResult.complete;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: redrawBackgroundNode'],[-1,' * Redraws the node using special \'background\' style properties. Basically'],[-1,' * just calls redrawNode(), but instead of directly using the '],[-1,' * \'externalGraphic\', \'graphicXOffset\', \'graphicYOffset\', and '],[-1,' * \'graphicZIndex\' properties directly from the specified \'style\' '],[-1,' * parameter, we create a new style object and set those properties '],[-1,' * from the corresponding \'background\'-prefixed properties from '],[-1,' * specified \'style\' parameter.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * id - {String}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if the complete geometry could be drawn, null if parts of'],[-1,' * the geometry could not be drawn, false otherwise'],[-1,' *\/'],[-1,' redrawBackgroundNode: function(id, geometry, style, featureId) {'],[0,' var backgroundStyle = OpenLayers.Util.extend({}, style);'],[-1,' '],[-1,' \/\/ Set regular style attributes to apply to the background styles.'],[0,' backgroundStyle.externalGraphic = backgroundStyle.backgroundGraphic;'],[0,' backgroundStyle.graphicXOffset = backgroundStyle.backgroundXOffset;'],[0,' backgroundStyle.graphicYOffset = backgroundStyle.backgroundYOffset;'],[0,' backgroundStyle.graphicZIndex = backgroundStyle.backgroundGraphicZIndex;'],[0,' backgroundStyle.graphicWidth = backgroundStyle.backgroundWidth || backgroundStyle.graphicWidth;'],[0,' backgroundStyle.graphicHeight = backgroundStyle.backgroundHeight || backgroundStyle.graphicHeight;'],[-1,' '],[-1,' \/\/ Erase background styles.'],[0,' backgroundStyle.backgroundGraphic = null;'],[0,' backgroundStyle.backgroundXOffset = null;'],[0,' backgroundStyle.backgroundYOffset = null;'],[0,' backgroundStyle.backgroundGraphicZIndex = null;'],[-1,' '],[0,' return this.redrawNode('],[-1,' id + this.BACKGROUND_ID_SUFFIX, '],[-1,' geometry, '],[-1,' backgroundStyle, '],[-1,' null'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawGeometryNode'],[-1,' * Given a node, draw a geometry on the specified layer.'],[-1,' * node and geometry are required arguments, style is optional.'],[-1,' * This method is only called by the render itself.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} a hash with properties \"node\" (the drawn node) and \"complete\"'],[-1,' * (null if parts of the geometry could not be drawn, false if nothing'],[-1,' * could be drawn)'],[-1,' *\/'],[-1,' drawGeometryNode: function(node, geometry, style) {'],[0,' style = style || node._style;'],[-1,''],[0,' var options = {'],[-1,' \'isFilled\': style.fill === undefined ?'],[-1,' true :'],[-1,' style.fill,'],[-1,' \'isStroked\': style.stroke === undefined ?'],[-1,' !!style.strokeWidth :'],[-1,' style.stroke'],[-1,' };'],[0,' var drawn;'],[0,' switch (geometry.CLASS_NAME) {'],[-1,' case \"OpenLayers.Geometry.Point\":'],[0,' if(style.graphic === false) {'],[0,' options.isFilled = false;'],[0,' options.isStroked = false;'],[-1,' }'],[0,' drawn = this.drawPoint(node, geometry);'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.LineString\":'],[0,' options.isFilled = false;'],[0,' drawn = this.drawLineString(node, geometry);'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.LinearRing\":'],[0,' drawn = this.drawLinearRing(node, geometry);'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.Polygon\":'],[0,' drawn = this.drawPolygon(node, geometry);'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.Rectangle\":'],[0,' drawn = this.drawRectangle(node, geometry);'],[0,' break;'],[-1,' default:'],[0,' break;'],[-1,' }'],[-1,''],[0,' node._options = options; '],[-1,''],[-1,' \/\/set style'],[-1,' \/\/TBD simplify this'],[0,' if (drawn != false) {'],[0,' return {'],[-1,' node: this.setStyle(node, style, options, geometry),'],[-1,' complete: drawn'],[-1,' };'],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: postDraw'],[-1,' * Things that have do be done after the geometry node is appended'],[-1,' * to its parent node. To be overridden by subclasses.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' *\/'],[-1,' postDraw: function(node) {},'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawPoint'],[-1,' * Virtual function for drawing Point Geometry. '],[-1,' * Should be implemented by subclasses.'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or false if the renderer could not draw the point'],[-1,' *\/ '],[-1,' drawPoint: function(node, geometry) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: drawLineString'],[-1,' * Virtual function for drawing LineString Geometry. '],[-1,' * Should be implemented by subclasses.'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or null if the renderer could not draw all components of'],[-1,' * the linestring, or false if nothing could be drawn'],[-1,' *\/ '],[-1,' drawLineString: function(node, geometry) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: drawLinearRing'],[-1,' * Virtual function for drawing LinearRing Geometry. '],[-1,' * Should be implemented by subclasses.'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or null if the renderer could not draw all components'],[-1,' * of the linear ring, or false if nothing could be drawn'],[-1,' *\/ '],[-1,' drawLinearRing: function(node, geometry) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: drawPolygon'],[-1,' * Virtual function for drawing Polygon Geometry. '],[-1,' * Should be implemented by subclasses.'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or null if the renderer could not draw all components'],[-1,' * of the polygon, or false if nothing could be drawn'],[-1,' *\/ '],[-1,' drawPolygon: function(node, geometry) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: drawRectangle'],[-1,' * Virtual function for drawing Rectangle Geometry. '],[-1,' * Should be implemented by subclasses.'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or false if the renderer could not draw the rectangle'],[-1,' *\/ '],[-1,' drawRectangle: function(node, geometry) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: drawCircle'],[-1,' * Virtual function for drawing Circle Geometry. '],[-1,' * Should be implemented by subclasses.'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or false if the renderer could not draw the circle'],[-1,' *\/ '],[-1,' drawCircle: function(node, geometry) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: removeText'],[-1,' * Removes a label'],[-1,' * '],[-1,' * Parameters:'],[-1,' * featureId - {String}'],[-1,' *\/'],[-1,' removeText: function(featureId) {'],[0,' var label = document.getElementById(featureId + this.LABEL_ID_SUFFIX);'],[0,' if (label) {'],[0,' this.textRoot.removeChild(label);'],[-1,' }'],[0,' var outline = document.getElementById(featureId + this.LABEL_OUTLINE_SUFFIX);'],[0,' if (outline) {'],[0,' this.textRoot.removeChild(outline);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getFeatureIdFromEvent'],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Object} An <OpenLayers.Event> object'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} A feature id or undefined.'],[-1,' *\/'],[-1,' getFeatureIdFromEvent: function(evt) {'],[0,' var target = evt.target;'],[0,' var useElement = target && target.correspondingUseElement;'],[0,' var node = useElement ? useElement : (target || evt.srcElement);'],[0,' return node._featureId;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: eraseGeometry'],[-1,' * Erase a geometry from the renderer. In the case of a multi-geometry, '],[-1,' * we cycle through and recurse on ourselves. Otherwise, we look for a '],[-1,' * node with the geometry.id, destroy its geometry, and remove it from'],[-1,' * the DOM.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * featureId - {String}'],[-1,' *\/'],[-1,' eraseGeometry: function(geometry, featureId) {'],[0,' if ((geometry.CLASS_NAME == \"OpenLayers.Geometry.MultiPoint\") ||'],[-1,' (geometry.CLASS_NAME == \"OpenLayers.Geometry.MultiLineString\") ||'],[-1,' (geometry.CLASS_NAME == \"OpenLayers.Geometry.MultiPolygon\") ||'],[-1,' (geometry.CLASS_NAME == \"OpenLayers.Geometry.Collection\")) {'],[0,' for (var i=0, len=geometry.components.length; i<len; i++) {'],[0,' this.eraseGeometry(geometry.components[i], featureId);'],[-1,' }'],[-1,' } else { '],[0,' var element = OpenLayers.Util.getElement(geometry.id);'],[0,' if (element && element.parentNode) {'],[0,' if (element.geometry) {'],[0,' element.geometry.destroy();'],[0,' element.geometry = null;'],[-1,' }'],[0,' element.parentNode.removeChild(element);'],[-1,''],[0,' if (this.indexer) {'],[0,' this.indexer.remove(element);'],[-1,' }'],[-1,' '],[0,' if (element._style.backgroundGraphic) {'],[0,' var backgroundId = geometry.id + this.BACKGROUND_ID_SUFFIX;'],[0,' var bElem = OpenLayers.Util.getElement(backgroundId);'],[0,' if (bElem && bElem.parentNode) {'],[-1,' \/\/ No need to destroy the geometry since the element and the background'],[-1,' \/\/ node share the same geometry.'],[0,' bElem.parentNode.removeChild(bElem);'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: nodeFactory'],[-1,' * Create new node of the specified type, with the (optional) specified id.'],[-1,' * '],[-1,' * If node already exists with same ID and a different type, we remove it'],[-1,' * and then call ourselves again to recreate it.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * id - {String}'],[-1,' * type - {String} type Kind of node to draw.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} A new node of the given type and id.'],[-1,' *\/'],[-1,' nodeFactory: function(id, type) {'],[0,' var node = OpenLayers.Util.getElement(id);'],[0,' if (node) {'],[0,' if (!this.nodeTypeCompare(node, type)) {'],[0,' node.parentNode.removeChild(node);'],[0,' node = this.nodeFactory(id, type);'],[-1,' }'],[-1,' } else {'],[0,' node = this.createNode(type, id);'],[-1,' }'],[0,' return node;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: nodeTypeCompare'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * type - {String} Kind of node'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the specified node is of the specified type'],[-1,' * This function must be overridden by subclasses.'],[-1,' *\/'],[-1,' nodeTypeCompare: function(node, type) {},'],[-1,' '],[-1,' \/** '],[-1,' * Method: createNode'],[-1,' * '],[-1,' * Parameters:'],[-1,' * type - {String} Kind of node to draw.'],[-1,' * id - {String} Id for node.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} A new node of the given type and id.'],[-1,' * This function must be overridden by subclasses.'],[-1,' *\/'],[-1,' createNode: function(type, id) {},'],[-1,''],[-1,' \/**'],[-1,' * Method: moveRoot'],[-1,' * moves this renderer\'s root to a different renderer.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * renderer - {<OpenLayers.Renderer>} target renderer for the moved root'],[-1,' *\/'],[-1,' moveRoot: function(renderer) {'],[0,' var root = this.root;'],[0,' if(renderer.root.parentNode == this.rendererRoot) {'],[0,' root = renderer.root;'],[-1,' }'],[0,' root.parentNode.removeChild(root);'],[0,' renderer.rendererRoot.appendChild(root);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getRenderLayerId'],[-1,' * Gets the layer that this renderer\'s output appears on. If moveRoot was'],[-1,' * used, this will be different from the id of the layer containing the'],[-1,' * features rendered by this renderer.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} the id of the output layer.'],[-1,' *\/'],[-1,' getRenderLayerId: function() {'],[0,' return this.root.parentNode.parentNode.id;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: isComplexSymbol'],[-1,' * Determines if a symbol cannot be rendered using drawCircle'],[-1,' * '],[-1,' * Parameters:'],[-1,' * graphicName - {String}'],[-1,' * '],[-1,' * Returns'],[-1,' * {Boolean} true if the symbol is complex, false if not'],[-1,' *\/'],[-1,' isComplexSymbol: function(graphicName) {'],[0,' return (graphicName != \"circle\") && !!graphicName;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Renderer.Elements\"'],[-1,'});'],[-1,''],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Renderer\/VML.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Renderer\/Elements.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Renderer.VML'],[-1,' * Render vector features in browsers with VML capability. Construct a new'],[-1,' * VML renderer with the <OpenLayers.Renderer.VML> constructor.'],[-1,' * '],[-1,' * Note that for all calculations in this class, we use (num | 0) to truncate a '],[-1,' * float value to an integer. This is done because it seems that VML doesn\'t '],[-1,' * support float values.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Renderer.Elements>'],[-1,' *\/'],[1,'OpenLayers.Renderer.VML = OpenLayers.Class(OpenLayers.Renderer.Elements, {'],[-1,''],[-1,' \/**'],[-1,' * Property: xmlns'],[-1,' * {String} XML Namespace URN'],[-1,' *\/'],[-1,' xmlns: \"urn:schemas-microsoft-com:vml\",'],[-1,' '],[-1,' \/**'],[-1,' * Property: symbolCache'],[-1,' * {DOMElement} node holding symbols. This hash is keyed by symbol name,'],[-1,' * and each value is a hash with a \"path\" and an \"extent\" property.'],[-1,' *\/'],[-1,' symbolCache: {},'],[-1,''],[-1,' \/**'],[-1,' * Property: offset'],[-1,' * {Object} Hash with \"x\" and \"y\" properties'],[-1,' *\/'],[-1,' offset: null,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Renderer.VML'],[-1,' * Create a new VML renderer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * containerID - {String} The id for the element that contains the renderer'],[-1,' *\/'],[-1,' initialize: function(containerID) {'],[0,' if (!this.supported()) { '],[0,' return; '],[-1,' }'],[0,' if (!document.namespaces.olv) {'],[0,' document.namespaces.add(\"olv\", this.xmlns);'],[0,' var style = document.createStyleSheet();'],[0,' var shapes = [\'shape\',\'rect\', \'oval\', \'fill\', \'stroke\', \'imagedata\', \'group\',\'textbox\']; '],[0,' for (var i = 0, len = shapes.length; i < len; i++) {'],[-1,''],[0,' style.addRule(\'olv\\\\:\' + shapes[i], \"behavior: url(#default#VML); \" +'],[-1,' \"position: absolute; display: inline-block;\");'],[-1,' } '],[-1,' }'],[-1,' '],[0,' OpenLayers.Renderer.Elements.prototype.initialize.apply(this, '],[-1,' arguments);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: supported'],[-1,' * Determine whether a browser supports this renderer.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The browser supports the VML renderer'],[-1,' *\/'],[-1,' supported: function() {'],[0,' return !!(document.namespaces);'],[-1,' }, '],[-1,''],[-1,' \/**'],[-1,' * Method: setExtent'],[-1,' * Set the renderer\'s extent'],[-1,' *'],[-1,' * Parameters:'],[-1,' * extent - {<OpenLayers.Bounds>}'],[-1,' * resolutionChanged - {Boolean}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true to notify the layer that the new extent does not exceed'],[-1,' * the coordinate range, and the features will not need to be redrawn.'],[-1,' *\/'],[-1,' setExtent: function(extent, resolutionChanged) {'],[0,' var coordSysUnchanged = OpenLayers.Renderer.Elements.prototype.setExtent.apply(this, arguments);'],[0,' var resolution = this.getResolution();'],[-1,' '],[0,' var left = (extent.left\/resolution) | 0;'],[0,' var top = (extent.top\/resolution - this.size.h) | 0;'],[0,' if (resolutionChanged || !this.offset) {'],[0,' this.offset = {x: left, y: top};'],[0,' left = 0;'],[0,' top = 0;'],[-1,' } else {'],[0,' left = left - this.offset.x;'],[0,' top = top - this.offset.y;'],[-1,' }'],[-1,''],[-1,' '],[0,' var org = (left - this.xOffset) + \" \" + top;'],[0,' this.root.coordorigin = org;'],[0,' var roots = [this.root, this.vectorRoot, this.textRoot];'],[0,' var root;'],[0,' for(var i=0, len=roots.length; i<len; ++i) {'],[0,' root = roots[i];'],[-1,''],[0,' var size = this.size.w + \" \" + this.size.h;'],[0,' root.coordsize = size;'],[-1,' '],[-1,' }'],[-1,' \/\/ flip the VML display Y axis upside down so it '],[-1,' \/\/ matches the display Y axis of the map'],[0,' this.root.style.flip = \"y\";'],[-1,' '],[0,' return coordSysUnchanged;'],[-1,' },'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * Method: setSize'],[-1,' * Set the size of the drawing surface'],[-1,' *'],[-1,' * Parameters:'],[-1,' * size - {<OpenLayers.Size>} the size of the drawing surface'],[-1,' *\/'],[-1,' setSize: function(size) {'],[0,' OpenLayers.Renderer.prototype.setSize.apply(this, arguments);'],[-1,' '],[-1,' \/\/ setting width and height on all roots to avoid flicker which we'],[-1,' \/\/ would get with 100% width and height on child roots'],[0,' var roots = ['],[-1,' this.rendererRoot,'],[-1,' this.root,'],[-1,' this.vectorRoot,'],[-1,' this.textRoot'],[-1,' ];'],[0,' var w = this.size.w + \"px\";'],[0,' var h = this.size.h + \"px\";'],[0,' var root;'],[0,' for(var i=0, len=roots.length; i<len; ++i) {'],[0,' root = roots[i];'],[0,' root.style.width = w;'],[0,' root.style.height = h;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getNodeType'],[-1,' * Get the node type for a geometry and style'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The corresponding node type for the specified geometry'],[-1,' *\/'],[-1,' getNodeType: function(geometry, style) {'],[0,' var nodeType = null;'],[0,' switch (geometry.CLASS_NAME) {'],[-1,' case \"OpenLayers.Geometry.Point\":'],[0,' if (style.externalGraphic) {'],[0,' nodeType = \"olv:rect\";'],[0,' } else if (this.isComplexSymbol(style.graphicName)) {'],[0,' nodeType = \"olv:shape\";'],[-1,' } else {'],[0,' nodeType = \"olv:oval\";'],[-1,' }'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.Rectangle\":'],[0,' nodeType = \"olv:rect\";'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.LineString\":'],[-1,' case \"OpenLayers.Geometry.LinearRing\":'],[-1,' case \"OpenLayers.Geometry.Polygon\":'],[-1,' case \"OpenLayers.Geometry.Curve\":'],[0,' nodeType = \"olv:shape\";'],[0,' break;'],[-1,' default:'],[0,' break;'],[-1,' }'],[0,' return nodeType;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setStyle'],[-1,' * Use to set all the style attributes to a VML node.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} An VML element to decorate'],[-1,' * style - {Object}'],[-1,' * options - {Object} Currently supported options include '],[-1,' * \'isFilled\' {Boolean} and'],[-1,' * \'isStroked\' {Boolean}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' *\/'],[-1,' setStyle: function(node, style, options, geometry) {'],[0,' style = style || node._style;'],[0,' options = options || node._options;'],[0,' var fillColor = style.fillColor;'],[-1,''],[0,' var title = style.title || style.graphicTitle;'],[0,' if (title) {'],[0,' node.title = title;'],[-1,' } '],[-1,''],[0,' if (node._geometryClass === \"OpenLayers.Geometry.Point\") {'],[0,' if (style.externalGraphic) {'],[0,' options.isFilled = true;'],[0,' var width = style.graphicWidth || style.graphicHeight;'],[0,' var height = style.graphicHeight || style.graphicWidth;'],[0,' width = width ? width : style.pointRadius*2;'],[0,' height = height ? height : style.pointRadius*2;'],[-1,''],[0,' var resolution = this.getResolution();'],[0,' var xOffset = (style.graphicXOffset != undefined) ?'],[-1,' style.graphicXOffset : -(0.5 * width);'],[0,' var yOffset = (style.graphicYOffset != undefined) ?'],[-1,' style.graphicYOffset : -(0.5 * height);'],[-1,' '],[0,' node.style.left = ((((geometry.x - this.featureDx)\/resolution - this.offset.x)+xOffset) | 0) + \"px\";'],[0,' node.style.top = (((geometry.y\/resolution - this.offset.y)-(yOffset+height)) | 0) + \"px\";'],[0,' node.style.width = width + \"px\";'],[0,' node.style.height = height + \"px\";'],[0,' node.style.flip = \"y\";'],[-1,' '],[-1,' \/\/ modify fillColor and options for stroke styling below'],[0,' fillColor = \"none\";'],[0,' options.isStroked = false;'],[0,' } else if (this.isComplexSymbol(style.graphicName)) {'],[0,' var cache = this.importSymbol(style.graphicName);'],[0,' node.path = cache.path;'],[0,' node.coordorigin = cache.left + \",\" + cache.bottom;'],[0,' var size = cache.size;'],[0,' node.coordsize = size + \",\" + size; '],[0,' this.drawCircle(node, geometry, style.pointRadius);'],[0,' node.style.flip = \"y\";'],[-1,' } else {'],[0,' this.drawCircle(node, geometry, style.pointRadius);'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ fill '],[0,' if (options.isFilled) { '],[0,' node.fillcolor = fillColor; '],[-1,' } else { '],[0,' node.filled = \"false\"; '],[-1,' }'],[0,' var fills = node.getElementsByTagName(\"fill\");'],[0,' var fill = (fills.length == 0) ? null : fills[0];'],[0,' if (!options.isFilled) {'],[0,' if (fill) {'],[0,' node.removeChild(fill);'],[-1,' }'],[-1,' } else {'],[0,' if (!fill) {'],[0,' fill = this.createNode(\'olv:fill\', node.id + \"_fill\");'],[-1,' }'],[0,' fill.opacity = style.fillOpacity;'],[-1,''],[0,' if (node._geometryClass === \"OpenLayers.Geometry.Point\" &&'],[-1,' style.externalGraphic) {'],[-1,''],[-1,' \/\/ override fillOpacity'],[0,' if (style.graphicOpacity) {'],[0,' fill.opacity = style.graphicOpacity;'],[-1,' }'],[-1,' '],[0,' fill.src = style.externalGraphic;'],[0,' fill.type = \"frame\";'],[-1,' '],[0,' if (!(style.graphicWidth && style.graphicHeight)) {'],[0,' fill.aspect = \"atmost\";'],[-1,' } '],[-1,' }'],[0,' if (fill.parentNode != node) {'],[0,' node.appendChild(fill);'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ additional rendering for rotated graphics or symbols'],[0,' var rotation = style.rotation;'],[0,' if ((rotation !== undefined || node._rotation !== undefined)) {'],[0,' node._rotation = rotation;'],[0,' if (style.externalGraphic) {'],[0,' this.graphicRotate(node, xOffset, yOffset, style);'],[-1,' \/\/ make the fill fully transparent, because we now have'],[-1,' \/\/ the graphic as imagedata element. We cannot just remove'],[-1,' \/\/ the fill, because this is part of the hack described'],[-1,' \/\/ in graphicRotate'],[0,' fill.opacity = 0;'],[0,' } else if(node._geometryClass === \"OpenLayers.Geometry.Point\") {'],[0,' node.style.rotation = rotation || 0;'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ stroke '],[0,' var strokes = node.getElementsByTagName(\"stroke\");'],[0,' var stroke = (strokes.length == 0) ? null : strokes[0];'],[0,' if (!options.isStroked) {'],[0,' node.stroked = false;'],[0,' if (stroke) {'],[0,' stroke.on = false;'],[-1,' }'],[-1,' } else {'],[0,' if (!stroke) {'],[0,' stroke = this.createNode(\'olv:stroke\', node.id + \"_stroke\");'],[0,' node.appendChild(stroke);'],[-1,' }'],[0,' stroke.on = true;'],[0,' stroke.color = style.strokeColor; '],[0,' stroke.weight = style.strokeWidth + \"px\"; '],[0,' stroke.opacity = style.strokeOpacity;'],[0,' stroke.endcap = style.strokeLinecap == \'butt\' ? \'flat\' :'],[-1,' (style.strokeLinecap || \'round\');'],[0,' if (style.strokeDashstyle) {'],[0,' stroke.dashstyle = this.dashStyle(style);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if (style.cursor != \"inherit\" && style.cursor != null) {'],[0,' node.style.cursor = style.cursor;'],[-1,' }'],[0,' return node;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: graphicRotate'],[-1,' * If a point is to be styled with externalGraphic and rotation, VML fills'],[-1,' * cannot be used to display the graphic, because rotation of graphic'],[-1,' * fills is not supported by the VML implementation of Internet Explorer.'],[-1,' * This method creates a olv:imagedata element inside the VML node,'],[-1,' * DXImageTransform.Matrix and BasicImage filters for rotation and'],[-1,' * opacity, and a 3-step hack to remove rendering artefacts from the'],[-1,' * graphic and preserve the ability of graphics to trigger events.'],[-1,' * Finally, OpenLayers methods are used to determine the correct'],[-1,' * insertion point of the rotated image, because DXImageTransform.Matrix'],[-1,' * does the rotation without the ability to specify a rotation center'],[-1,' * point.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * xOffset - {Number} rotation center relative to image, x coordinate'],[-1,' * yOffset - {Number} rotation center relative to image, y coordinate'],[-1,' * style - {Object}'],[-1,' *\/'],[-1,' graphicRotate: function(node, xOffset, yOffset, style) {'],[0,' var style = style || node._style;'],[0,' var rotation = style.rotation || 0;'],[-1,' '],[0,' var aspectRatio, size;'],[0,' if (!(style.graphicWidth && style.graphicHeight)) {'],[-1,' \/\/ load the image to determine its size'],[0,' var img = new Image();'],[0,' img.onreadystatechange = OpenLayers.Function.bind(function() {'],[0,' if(img.readyState == \"complete\" ||'],[-1,' img.readyState == \"interactive\") {'],[0,' aspectRatio = img.width \/ img.height;'],[0,' size = Math.max(style.pointRadius * 2, '],[-1,' style.graphicWidth || 0,'],[-1,' style.graphicHeight || 0);'],[0,' xOffset = xOffset * aspectRatio;'],[0,' style.graphicWidth = size * aspectRatio;'],[0,' style.graphicHeight = size;'],[0,' this.graphicRotate(node, xOffset, yOffset, style);'],[-1,' }'],[-1,' }, this);'],[0,' img.src = style.externalGraphic;'],[-1,' '],[-1,' \/\/ will be called again by the onreadystate handler'],[0,' return;'],[-1,' } else {'],[0,' size = Math.max(style.graphicWidth, style.graphicHeight);'],[0,' aspectRatio = style.graphicWidth \/ style.graphicHeight;'],[-1,' }'],[-1,' '],[0,' var width = Math.round(style.graphicWidth || size * aspectRatio);'],[0,' var height = Math.round(style.graphicHeight || size);'],[0,' node.style.width = width + \"px\";'],[0,' node.style.height = height + \"px\";'],[-1,' '],[-1,' \/\/ Three steps are required to remove artefacts for images with'],[-1,' \/\/ transparent backgrounds (resulting from using DXImageTransform'],[-1,' \/\/ filters on svg objects), while preserving awareness for browser'],[-1,' \/\/ events on images:'],[-1,' \/\/ - Use the fill as usual (like for unrotated images) to handle'],[-1,' \/\/ events'],[-1,' \/\/ - specify an imagedata element with the same src as the fill'],[-1,' \/\/ - style the imagedata element with an AlphaImageLoader filter'],[-1,' \/\/ with empty src'],[0,' var image = document.getElementById(node.id + \"_image\");'],[0,' if (!image) {'],[0,' image = this.createNode(\"olv:imagedata\", node.id + \"_image\");'],[0,' node.appendChild(image);'],[-1,' }'],[0,' image.style.width = width + \"px\";'],[0,' image.style.height = height + \"px\";'],[0,' image.src = style.externalGraphic;'],[0,' image.style.filter ='],[-1,' \"progid:DXImageTransform.Microsoft.AlphaImageLoader(\" + '],[-1,' \"src=\'\', sizingMethod=\'scale\')\";'],[-1,''],[0,' var rot = rotation * Math.PI \/ 180;'],[0,' var sintheta = Math.sin(rot);'],[0,' var costheta = Math.cos(rot);'],[-1,''],[-1,' \/\/ do the rotation on the image'],[0,' var filter ='],[-1,' \"progid:DXImageTransform.Microsoft.Matrix(M11=\" + costheta +'],[-1,' \",M12=\" + (-sintheta) + \",M21=\" + sintheta + \",M22=\" + costheta +'],[-1,' \",SizingMethod=\'auto expand\')\\n\";'],[-1,''],[-1,' \/\/ set the opacity (needed for the imagedata)'],[0,' var opacity = style.graphicOpacity || style.fillOpacity;'],[0,' if (opacity && opacity != 1) {'],[0,' filter += '],[-1,' \"progid:DXImageTransform.Microsoft.BasicImage(opacity=\" + '],[-1,' opacity+\")\\n\";'],[-1,' }'],[0,' node.style.filter = filter;'],[-1,''],[-1,' \/\/ do the rotation again on a box, so we know the insertion point'],[0,' var centerPoint = new OpenLayers.Geometry.Point(-xOffset, -yOffset);'],[0,' var imgBox = new OpenLayers.Bounds(0, 0, width, height).toGeometry();'],[0,' imgBox.rotate(style.rotation, centerPoint);'],[0,' var imgBounds = imgBox.getBounds();'],[-1,''],[0,' node.style.left = Math.round('],[-1,' parseInt(node.style.left) + imgBounds.left) + \"px\";'],[0,' node.style.top = Math.round('],[-1,' parseInt(node.style.top) - imgBounds.bottom) + \"px\";'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: postDraw'],[-1,' * Does some node postprocessing to work around browser issues:'],[-1,' * - Some versions of Internet Explorer seem to be unable to set fillcolor'],[-1,' * and strokecolor to \"none\" correctly before the fill node is appended'],[-1,' * to a visible vml node. This method takes care of that and sets'],[-1,' * fillcolor and strokecolor again if needed.'],[-1,' * - In some cases, a node won\'t become visible after being drawn. Setting'],[-1,' * style.visibility to \"visible\" works around that.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' *\/'],[-1,' postDraw: function(node) {'],[0,' node.style.visibility = \"visible\";'],[0,' var fillColor = node._style.fillColor;'],[0,' var strokeColor = node._style.strokeColor;'],[0,' if (fillColor == \"none\" &&'],[-1,' node.fillcolor != fillColor) {'],[0,' node.fillcolor = fillColor;'],[-1,' }'],[0,' if (strokeColor == \"none\" &&'],[-1,' node.strokecolor != strokeColor) {'],[0,' node.strokecolor = strokeColor;'],[-1,' }'],[-1,' },'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * Method: setNodeDimension'],[-1,' * Get the geometry\'s bounds, convert it to our vml coordinate system, '],[-1,' * then set the node\'s position, size, and local coordinate system.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' *\/'],[-1,' setNodeDimension: function(node, geometry) {'],[-1,''],[0,' var bbox = geometry.getBounds();'],[0,' if(bbox) {'],[0,' var resolution = this.getResolution();'],[-1,' '],[0,' var scaledBox = '],[-1,' new OpenLayers.Bounds(((bbox.left - this.featureDx)\/resolution - this.offset.x) | 0,'],[-1,' (bbox.bottom\/resolution - this.offset.y) | 0,'],[-1,' ((bbox.right - this.featureDx)\/resolution - this.offset.x) | 0,'],[-1,' (bbox.top\/resolution - this.offset.y) | 0);'],[-1,' '],[-1,' \/\/ Set the internal coordinate system to draw the path'],[0,' node.style.left = scaledBox.left + \"px\";'],[0,' node.style.top = scaledBox.top + \"px\";'],[0,' node.style.width = scaledBox.getWidth() + \"px\";'],[0,' node.style.height = scaledBox.getHeight() + \"px\";'],[-1,' '],[0,' node.coordorigin = scaledBox.left + \" \" + scaledBox.top;'],[0,' node.coordsize = scaledBox.getWidth()+ \" \" + scaledBox.getHeight();'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: dashStyle'],[-1,' * '],[-1,' * Parameters:'],[-1,' * style - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A VML compliant \'stroke-dasharray\' value'],[-1,' *\/'],[-1,' dashStyle: function(style) {'],[0,' var dash = style.strokeDashstyle;'],[0,' switch (dash) {'],[-1,' case \'solid\':'],[-1,' case \'dot\':'],[-1,' case \'dash\':'],[-1,' case \'dashdot\':'],[-1,' case \'longdash\':'],[-1,' case \'longdashdot\':'],[0,' return dash;'],[-1,' default:'],[-1,' \/\/ very basic guessing of dash style patterns'],[0,' var parts = dash.split(\/[ ,]\/);'],[0,' if (parts.length == 2) {'],[0,' if (1*parts[0] >= 2*parts[1]) {'],[0,' return \"longdash\";'],[-1,' }'],[0,' return (parts[0] == 1 || parts[1] == 1) ? \"dot\" : \"dash\";'],[0,' } else if (parts.length == 4) {'],[0,' return (1*parts[0] >= 2*parts[1]) ? \"longdashdot\" :'],[-1,' \"dashdot\";'],[-1,' }'],[0,' return \"solid\";'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createNode'],[-1,' * Create a new node'],[-1,' *'],[-1,' * Parameters:'],[-1,' * type - {String} Kind of node to draw'],[-1,' * id - {String} Id for node'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A new node of the given type and id'],[-1,' *\/'],[-1,' createNode: function(type, id) {'],[0,' var node = document.createElement(type);'],[0,' if (id) {'],[0,' node.id = id;'],[-1,' }'],[-1,' '],[-1,' \/\/ IE hack to make elements unselectable, to prevent \'blue flash\''],[-1,' \/\/ while dragging vectors; #1410'],[0,' node.unselectable = \'on\';'],[0,' node.onselectstart = OpenLayers.Function.False;'],[-1,' '],[0,' return node; '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: nodeTypeCompare'],[-1,' * Determine whether a node is of a given type'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} An VML element'],[-1,' * type - {String} Kind of node'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the specified node is of the specified type'],[-1,' *\/'],[-1,' nodeTypeCompare: function(node, type) {'],[-1,''],[-1,' \/\/split type'],[0,' var subType = type;'],[0,' var splitIndex = subType.indexOf(\":\");'],[0,' if (splitIndex != -1) {'],[0,' subType = subType.substr(splitIndex+1);'],[-1,' }'],[-1,''],[-1,' \/\/split nodeName'],[0,' var nodeName = node.nodeName;'],[0,' splitIndex = nodeName.indexOf(\":\");'],[0,' if (splitIndex != -1) {'],[0,' nodeName = nodeName.substr(splitIndex+1);'],[-1,' }'],[-1,''],[0,' return (subType == nodeName);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createRenderRoot'],[-1,' * Create the renderer root'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The specific render engine\'s root element'],[-1,' *\/'],[-1,' createRenderRoot: function() {'],[0,' return this.nodeFactory(this.container.id + \"_vmlRoot\", \"div\");'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createRoot'],[-1,' * Create the main root element'],[-1,' * '],[-1,' * Parameters:'],[-1,' * suffix - {String} suffix to append to the id'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' createRoot: function(suffix) {'],[0,' return this.nodeFactory(this.container.id + suffix, \"olv:group\");'],[-1,' },'],[-1,' '],[-1,' \/**************************************'],[-1,' * *'],[-1,' * GEOMETRY DRAWING FUNCTIONS *'],[-1,' * *'],[-1,' **************************************\/'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawPoint'],[-1,' * Render a point'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or false if the point could not be drawn'],[-1,' *\/'],[-1,' drawPoint: function(node, geometry) {'],[0,' return this.drawCircle(node, geometry, 1);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawCircle'],[-1,' * Render a circle.'],[-1,' * Size and Center a circle given geometry (x,y center) and radius'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * radius - {float}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or false if the circle could not ne drawn'],[-1,' *\/'],[-1,' drawCircle: function(node, geometry, radius) {'],[0,' if(!isNaN(geometry.x)&& !isNaN(geometry.y)) {'],[0,' var resolution = this.getResolution();'],[-1,''],[0,' node.style.left = ((((geometry.x - this.featureDx) \/resolution - this.offset.x) | 0) - radius) + \"px\";'],[0,' node.style.top = (((geometry.y \/resolution - this.offset.y) | 0) - radius) + \"px\";'],[-1,' '],[0,' var diameter = radius * 2;'],[-1,' '],[0,' node.style.width = diameter + \"px\";'],[0,' node.style.height = diameter + \"px\";'],[0,' return node;'],[-1,' }'],[0,' return false;'],[-1,' },'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * Method: drawLineString'],[-1,' * Render a linestring.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' drawLineString: function(node, geometry) {'],[0,' return this.drawLine(node, geometry, false);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawLinearRing'],[-1,' * Render a linearring'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' drawLinearRing: function(node, geometry) {'],[0,' return this.drawLine(node, geometry, true);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: DrawLine'],[-1,' * Render a line.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * closeLine - {Boolean} Close the line? (make it a ring?)'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' drawLine: function(node, geometry, closeLine) {'],[-1,''],[0,' this.setNodeDimension(node, geometry);'],[-1,''],[0,' var resolution = this.getResolution();'],[0,' var numComponents = geometry.components.length;'],[0,' var parts = new Array(numComponents);'],[-1,''],[0,' var comp, x, y;'],[0,' for (var i = 0; i < numComponents; i++) {'],[0,' comp = geometry.components[i];'],[0,' x = ((comp.x - this.featureDx)\/resolution - this.offset.x) | 0;'],[0,' y = (comp.y\/resolution - this.offset.y) | 0;'],[0,' parts[i] = \" \" + x + \",\" + y + \" l \";'],[-1,' }'],[0,' var end = (closeLine) ? \" x e\" : \" e\";'],[0,' node.path = \"m\" + parts.join(\"\") + end;'],[0,' return node;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawPolygon'],[-1,' * Render a polygon'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' drawPolygon: function(node, geometry) {'],[0,' this.setNodeDimension(node, geometry);'],[-1,''],[0,' var resolution = this.getResolution();'],[-1,' '],[0,' var path = [];'],[0,' var j, jj, points, area, first, second, i, ii, comp, pathComp, x, y;'],[0,' for (j=0, jj=geometry.components.length; j<jj; j++) {'],[0,' path.push(\"m\");'],[0,' points = geometry.components[j].components;'],[-1,' \/\/ we only close paths of interior rings with area'],[0,' area = (j === 0);'],[0,' first = null;'],[0,' second = null;'],[0,' for (i=0, ii=points.length; i<ii; i++) {'],[0,' comp = points[i];'],[0,' x = ((comp.x - this.featureDx) \/ resolution - this.offset.x) | 0;'],[0,' y = (comp.y \/ resolution - this.offset.y) | 0;'],[0,' pathComp = \" \" + x + \",\" + y;'],[0,' path.push(pathComp);'],[0,' if (i==0) {'],[0,' path.push(\" l\");'],[-1,' }'],[0,' if (!area) {'],[-1,' \/\/ IE improperly renders sub-paths that have no area.'],[-1,' \/\/ Instead of checking the area of every ring, we confirm'],[-1,' \/\/ the ring has at least three distinct points. This does'],[-1,' \/\/ not catch all non-zero area cases, but it greatly improves'],[-1,' \/\/ interior ring digitizing and is a minor performance hit'],[-1,' \/\/ when rendering rings with many points.'],[0,' if (!first) {'],[0,' first = pathComp;'],[0,' } else if (first != pathComp) {'],[0,' if (!second) {'],[0,' second = pathComp;'],[0,' } else if (second != pathComp) {'],[-1,' \/\/ stop looking'],[0,' area = true;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' path.push(area ? \" x \" : \" \");'],[-1,' }'],[0,' path.push(\"e\");'],[0,' node.path = path.join(\"\");'],[0,' return node;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawRectangle'],[-1,' * Render a rectangle'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' drawRectangle: function(node, geometry) {'],[0,' var resolution = this.getResolution();'],[-1,' '],[0,' node.style.left = (((geometry.x - this.featureDx)\/resolution - this.offset.x) | 0) + \"px\";'],[0,' node.style.top = ((geometry.y\/resolution - this.offset.y) | 0) + \"px\";'],[0,' node.style.width = ((geometry.width\/resolution) | 0) + \"px\";'],[0,' node.style.height = ((geometry.height\/resolution) | 0) + \"px\";'],[-1,' '],[0,' return node;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawText'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * featureId - {String}'],[-1,' * style -'],[-1,' * location - {<OpenLayers.Geometry.Point>}'],[-1,' *\/'],[-1,' drawText: function(featureId, style, location) {'],[0,' var label = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX, \"olv:rect\");'],[0,' var textbox = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX + \"_textbox\", \"olv:textbox\");'],[-1,' '],[0,' var resolution = this.getResolution();'],[0,' label.style.left = (((location.x - this.featureDx)\/resolution - this.offset.x) | 0) + \"px\";'],[0,' label.style.top = ((location.y\/resolution - this.offset.y) | 0) + \"px\";'],[0,' label.style.flip = \"y\";'],[-1,''],[0,' textbox.innerText = style.label;'],[-1,''],[0,' if (style.cursor != \"inherit\" && style.cursor != null) {'],[0,' textbox.style.cursor = style.cursor;'],[-1,' }'],[0,' if (style.fontColor) {'],[0,' textbox.style.color = style.fontColor;'],[-1,' }'],[0,' if (style.fontOpacity) {'],[0,' textbox.style.filter = \'alpha(opacity=\' + (style.fontOpacity * 100) + \')\';'],[-1,' }'],[0,' if (style.fontFamily) {'],[0,' textbox.style.fontFamily = style.fontFamily;'],[-1,' }'],[0,' if (style.fontSize) {'],[0,' textbox.style.fontSize = style.fontSize;'],[-1,' }'],[0,' if (style.fontWeight) {'],[0,' textbox.style.fontWeight = style.fontWeight;'],[-1,' }'],[0,' if (style.fontStyle) {'],[0,' textbox.style.fontStyle = style.fontStyle;'],[-1,' }'],[0,' if(style.labelSelect === true) {'],[0,' label._featureId = featureId;'],[0,' textbox._featureId = featureId;'],[0,' textbox._geometry = location;'],[0,' textbox._geometryClass = location.CLASS_NAME;'],[-1,' }'],[0,' textbox.style.whiteSpace = \"nowrap\";'],[-1,' \/\/ fun with IE: IE7 in standards compliant mode does not display any'],[-1,' \/\/ text with a left inset of 0. So we set this to 1px and subtract one'],[-1,' \/\/ pixel later when we set label.style.left'],[0,' textbox.inset = \"1px,0px,0px,0px\";'],[-1,''],[0,' if(!label.parentNode) {'],[0,' label.appendChild(textbox);'],[0,' this.textRoot.appendChild(label);'],[-1,' }'],[-1,''],[0,' var align = style.labelAlign || \"cm\";'],[0,' if (align.length == 1) {'],[0,' align += \"m\";'],[-1,' }'],[0,' var xshift = textbox.clientWidth *'],[-1,' (OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(0,1)]);'],[0,' var yshift = textbox.clientHeight *'],[-1,' (OpenLayers.Renderer.VML.LABEL_SHIFT[align.substr(1,1)]);'],[0,' label.style.left = parseInt(label.style.left)-xshift-1+\"px\";'],[0,' label.style.top = parseInt(label.style.top)+yshift+\"px\";'],[-1,' '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: moveRoot'],[-1,' * moves this renderer\'s root to a different renderer.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * renderer - {<OpenLayers.Renderer>} target renderer for the moved root'],[-1,' * root - {DOMElement} optional root node. To be used when this renderer'],[-1,' * holds roots from multiple layers to tell this method which one to'],[-1,' * detach'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if successful, false otherwise'],[-1,' *\/'],[-1,' moveRoot: function(renderer) {'],[0,' var layer = this.map.getLayer(renderer.container.id);'],[0,' if(layer instanceof OpenLayers.Layer.Vector.RootContainer) {'],[0,' layer = this.map.getLayer(this.container.id);'],[-1,' }'],[0,' layer && layer.renderer.clear();'],[0,' OpenLayers.Renderer.Elements.prototype.moveRoot.apply(this, arguments);'],[0,' layer && layer.redraw();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: importSymbol'],[-1,' * add a new symbol definition from the rendererer\'s symbol hash'],[-1,' * '],[-1,' * Parameters:'],[-1,' * graphicName - {String} name of the symbol to import'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} - hash of {DOMElement} \"symbol\" and {Number} \"size\"'],[-1,' *\/ '],[-1,' importSymbol: function (graphicName) {'],[0,' var id = this.container.id + \"-\" + graphicName;'],[-1,' '],[-1,' \/\/ check if symbol already exists in the cache'],[0,' var cache = this.symbolCache[id];'],[0,' if (cache) {'],[0,' return cache;'],[-1,' }'],[-1,' '],[0,' var symbol = OpenLayers.Renderer.symbol[graphicName];'],[0,' if (!symbol) {'],[0,' throw new Error(graphicName + \' is not a valid symbol name\');'],[-1,' }'],[-1,''],[0,' var symbolExtent = new OpenLayers.Bounds('],[-1,' Number.MAX_VALUE, Number.MAX_VALUE, 0, 0);'],[-1,' '],[0,' var pathitems = [\"m\"];'],[0,' for (var i=0; i<symbol.length; i=i+2) {'],[0,' var x = symbol[i];'],[0,' var y = symbol[i+1];'],[0,' symbolExtent.left = Math.min(symbolExtent.left, x);'],[0,' symbolExtent.bottom = Math.min(symbolExtent.bottom, y);'],[0,' symbolExtent.right = Math.max(symbolExtent.right, x);'],[0,' symbolExtent.top = Math.max(symbolExtent.top, y);'],[-1,''],[0,' pathitems.push(x);'],[0,' pathitems.push(y);'],[0,' if (i == 0) {'],[0,' pathitems.push(\"l\");'],[-1,' }'],[-1,' }'],[0,' pathitems.push(\"x e\");'],[0,' var path = pathitems.join(\" \");'],[-1,''],[0,' var diff = (symbolExtent.getWidth() - symbolExtent.getHeight()) \/ 2;'],[0,' if(diff > 0) {'],[0,' symbolExtent.bottom = symbolExtent.bottom - diff;'],[0,' symbolExtent.top = symbolExtent.top + diff;'],[-1,' } else {'],[0,' symbolExtent.left = symbolExtent.left + diff;'],[0,' symbolExtent.right = symbolExtent.right - diff;'],[-1,' }'],[-1,' '],[0,' cache = {'],[-1,' path: path,'],[-1,' size: symbolExtent.getWidth(), \/\/ equals getHeight() now'],[-1,' left: symbolExtent.left,'],[-1,' bottom: symbolExtent.bottom'],[-1,' };'],[0,' this.symbolCache[id] = cache;'],[-1,' '],[0,' return cache;'],[-1,' },'],[-1,' '],[-1,' CLASS_NAME: \"OpenLayers.Renderer.VML\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.VML.LABEL_SHIFT'],[-1,' * {Object}'],[-1,' *\/'],[1,'OpenLayers.Renderer.VML.LABEL_SHIFT = {'],[-1,' \"l\": 0,'],[-1,' \"c\": .5,'],[-1,' \"r\": 1,'],[-1,' \"t\": 0,'],[-1,' \"m\": .5,'],[-1,' \"b\": 1'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Util\/vendorPrefix.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/SingleFile.js'],[-1,' *\/'],[-1,''],[1,'OpenLayers.Util = OpenLayers.Util || {};'],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Util.vendorPrefix'],[-1,' * A collection of utility functions to detect vendor prefixed features'],[-1,' *\/'],[1,'OpenLayers.Util.vendorPrefix = (function() {'],[1,' \"use strict\";'],[-1,' '],[1,' var VENDOR_PREFIXES = [\"\", \"O\", \"ms\", \"Moz\", \"Webkit\"],'],[-1,' divStyle = document.createElement(\"div\").style,'],[-1,' cssCache = {},'],[-1,' jsCache = {};'],[-1,''],[-1,' '],[-1,' \/**'],[-1,' * Function: domToCss'],[-1,' * Converts a upper camel case DOM style property name to a CSS property'],[-1,' * i.e. transformOrigin -> transform-origin'],[-1,' * or WebkitTransformOrigin -> -webkit-transform-origin'],[-1,' *'],[-1,' * Parameters:'],[-1,' * prefixedDom - {String} The property to convert'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The CSS property'],[-1,' *\/'],[1,' function domToCss(prefixedDom) {'],[0,' if (!prefixedDom) { return null; }'],[0,' return prefixedDom.'],[0,' replace(\/([A-Z])\/g, function(c) { return \"-\" + c.toLowerCase(); }).'],[-1,' replace(\/^ms-\/, \"-ms-\");'],[-1,' }'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: css'],[-1,' * Detect which property is used for a CSS property'],[-1,' *'],[-1,' * Parameters:'],[-1,' * property - {String} The standard (unprefixed) CSS property name'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The standard CSS property, prefixed property or null if not'],[-1,' * supported'],[-1,' *\/'],[1,' function css(property) {'],[0,' if (cssCache[property] === undefined) {'],[0,' var domProperty = property.'],[0,' replace(\/(-[\\s\\S])\/g, function(c) { return c.charAt(1).toUpperCase(); });'],[0,' var prefixedDom = style(domProperty);'],[0,' cssCache[property] = domToCss(prefixedDom);'],[-1,' }'],[0,' return cssCache[property];'],[-1,' }'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: js'],[-1,' * Detect which property is used for a JS property\/method'],[-1,' *'],[-1,' * Parameters:'],[-1,' * obj - {Object} The object to test on'],[-1,' * property - {String} The standard (unprefixed) JS property name'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The standard JS property, prefixed property or null if not'],[-1,' * supported'],[-1,' *\/'],[1,' function js(obj, property) {'],[1,' if (jsCache[property] === undefined) {'],[1,' var tmpProp,'],[-1,' i = 0,'],[-1,' l = VENDOR_PREFIXES.length,'],[-1,' prefix,'],[-1,' isStyleObj = (typeof obj.cssText !== \"undefined\");'],[-1,''],[1,' jsCache[property] = null;'],[1,' for(; i<l; i++) {'],[5,' prefix = VENDOR_PREFIXES[i];'],[5,' if(prefix) {'],[4,' if (!isStyleObj) {'],[-1,' \/\/ js prefix should be lower-case, while style'],[-1,' \/\/ properties have upper case on first character'],[4,' prefix = prefix.toLowerCase();'],[-1,' }'],[4,' tmpProp = prefix + property.charAt(0).toUpperCase() + property.slice(1);'],[-1,' } else {'],[1,' tmpProp = property;'],[-1,' }'],[-1,''],[5,' if(obj[tmpProp] !== undefined) {'],[0,' jsCache[property] = tmpProp;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[1,' return jsCache[property];'],[-1,' }'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: style'],[-1,' * Detect which property is used for a DOM style property'],[-1,' *'],[-1,' * Parameters:'],[-1,' * property - {String} The standard (unprefixed) style property name'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The standard style property, prefixed property or null if not'],[-1,' * supported'],[-1,' *\/'],[1,' function style(property) {'],[0,' return js(divStyle, property);'],[-1,' }'],[-1,' '],[1,' return {'],[-1,' css: css,'],[-1,' js: js,'],[-1,' style: style,'],[-1,' '],[-1,' \/\/ used for testing'],[-1,' cssCache: cssCache,'],[-1,' jsCache: jsCache'],[-1,' };'],[-1,'}());'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Animation.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/SingleFile.js'],[-1,' * @requires OpenLayers\/Util\/vendorPrefix.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Animation'],[-1,' * A collection of utility functions for executing methods that repaint a '],[-1,' * portion of the browser window. These methods take advantage of the'],[-1,' * browser\'s scheduled repaints where requestAnimationFrame is available.'],[-1,' *\/'],[1,'OpenLayers.Animation = (function(window) {'],[-1,' '],[-1,' \/**'],[-1,' * Property: isNative'],[-1,' * {Boolean} true if a native requestAnimationFrame function is available'],[-1,' *\/'],[1,' var requestAnimationFrame = OpenLayers.Util.vendorPrefix.js(window, \"requestAnimationFrame\");'],[1,' var isNative = !!(requestAnimationFrame);'],[-1,' '],[-1,' \/**'],[-1,' * Function: requestFrame'],[-1,' * Schedule a function to be called at the next available animation frame.'],[-1,' * Uses the native method where available. Where requestAnimationFrame is'],[-1,' * not available, setTimeout will be called with a 16ms delay.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * callback - {Function} The function to be called at the next animation frame.'],[-1,' * element - {DOMElement} Optional element that visually bounds the animation.'],[-1,' *\/'],[1,' var requestFrame = (function() {'],[1,' var request = window[requestAnimationFrame] ||'],[-1,' function(callback, element) {'],[0,' window.setTimeout(callback, 16);'],[-1,' };'],[-1,' \/\/ bind to window to avoid illegal invocation of native function'],[1,' return function(callback, element) {'],[0,' request.apply(window, [callback, element]);'],[-1,' };'],[-1,' })();'],[-1,' '],[-1,' \/\/ private variables for animation loops'],[1,' var counter = 0;'],[1,' var loops = {};'],[-1,' '],[-1,' \/**'],[-1,' * Function: start'],[-1,' * Executes a method with <requestFrame> in series for some '],[-1,' * duration.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * callback - {Function} The function to be called at the next animation frame.'],[-1,' * duration - {Number} Optional duration for the loop. If not provided, the'],[-1,' * animation loop will execute indefinitely.'],[-1,' * element - {DOMElement} Optional element that visually bounds the animation.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number} Identifier for the animation loop. Used to stop animations with'],[-1,' * <stop>.'],[-1,' *\/'],[1,' function start(callback, duration, element) {'],[0,' duration = duration > 0 ? duration : Number.POSITIVE_INFINITY;'],[0,' var id = ++counter;'],[0,' var start = +new Date;'],[0,' loops[id] = function() {'],[0,' if (loops[id] && +new Date - start <= duration) {'],[0,' callback();'],[0,' if (loops[id]) {'],[0,' requestFrame(loops[id], element);'],[-1,' }'],[-1,' } else {'],[0,' delete loops[id];'],[-1,' }'],[-1,' };'],[0,' requestFrame(loops[id], element);'],[0,' return id;'],[-1,' }'],[-1,' '],[-1,' \/**'],[-1,' * Function: stop'],[-1,' * Terminates an animation loop started with <start>.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * id - {Number} Identifier returned from <start>.'],[-1,' *\/'],[1,' function stop(id) {'],[0,' delete loops[id];'],[-1,' }'],[-1,' '],[1,' return {'],[-1,' isNative: isNative,'],[-1,' requestFrame: requestFrame,'],[-1,' start: start,'],[-1,' stop: stop'],[-1,' };'],[-1,' '],[-1,'})(window);'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Tween.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Animation.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Tween'],[-1,' *\/'],[1,'OpenLayers.Tween = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: easing'],[-1,' * {<OpenLayers.Easing>(Function)} Easing equation used for the animation'],[-1,' * Defaultly set to OpenLayers.Easing.Expo.easeOut'],[-1,' *\/'],[-1,' easing: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: begin'],[-1,' * {Object} Values to start the animation with'],[-1,' *\/'],[-1,' begin: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: finish'],[-1,' * {Object} Values to finish the animation with'],[-1,' *\/'],[-1,' finish: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: duration'],[-1,' * {int} duration of the tween (number of steps)'],[-1,' *\/'],[-1,' duration: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: callbacks'],[-1,' * {Object} An object with start, eachStep and done properties whose values'],[-1,' * are functions to be call during the animation. They are passed the'],[-1,' * current computed value as argument.'],[-1,' *\/'],[-1,' callbacks: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: time'],[-1,' * {int} Step counter'],[-1,' *\/'],[-1,' time: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: minFrameRate'],[-1,' * {Number} The minimum framerate for animations in frames per second. After'],[-1,' * each step, the time spent in the animation is compared to the calculated'],[-1,' * time at this frame rate. If the animation runs longer than the calculated'],[-1,' * time, the next step is skipped. Default is 30.'],[-1,' *\/'],[-1,' minFrameRate: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: startTime'],[-1,' * {Number} The timestamp of the first execution step. Used for skipping'],[-1,' * frames'],[-1,' *\/'],[-1,' startTime: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: animationId'],[-1,' * {int} Loop id returned by OpenLayers.Animation.start'],[-1,' *\/'],[-1,' animationId: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: playing'],[-1,' * {Boolean} Tells if the easing is currently playing'],[-1,' *\/'],[-1,' playing: false,'],[-1,' '],[-1,' \/** '],[-1,' * Constructor: OpenLayers.Tween'],[-1,' * Creates a Tween.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * easing - {<OpenLayers.Easing>(Function)} easing function method to use'],[-1,' *\/ '],[-1,' initialize: function(easing) {'],[0,' this.easing = (easing) ? easing : OpenLayers.Easing.Expo.easeOut;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: start'],[-1,' * Plays the Tween, and calls the callback method on each step'],[-1,' * '],[-1,' * Parameters:'],[-1,' * begin - {Object} values to start the animation with'],[-1,' * finish - {Object} values to finish the animation with'],[-1,' * duration - {int} duration of the tween (number of steps)'],[-1,' * options - {Object} hash of options (callbacks (start, eachStep, done),'],[-1,' * minFrameRate)'],[-1,' *\/'],[-1,' start: function(begin, finish, duration, options) {'],[0,' this.playing = true;'],[0,' this.begin = begin;'],[0,' this.finish = finish;'],[0,' this.duration = duration;'],[0,' this.callbacks = options.callbacks;'],[0,' this.minFrameRate = options.minFrameRate || 30;'],[0,' this.time = 0;'],[0,' this.startTime = new Date().getTime();'],[0,' OpenLayers.Animation.stop(this.animationId);'],[0,' this.animationId = null;'],[0,' if (this.callbacks && this.callbacks.start) {'],[0,' this.callbacks.start.call(this, this.begin);'],[-1,' }'],[0,' this.animationId = OpenLayers.Animation.start('],[-1,' OpenLayers.Function.bind(this.play, this)'],[-1,' );'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: stop'],[-1,' * Stops the Tween, and calls the done callback'],[-1,' * Doesn\'t do anything if animation is already finished'],[-1,' *\/'],[-1,' stop: function() {'],[0,' if (!this.playing) {'],[0,' return;'],[-1,' }'],[-1,' '],[0,' if (this.callbacks && this.callbacks.done) {'],[0,' this.callbacks.done.call(this, this.finish);'],[-1,' }'],[0,' OpenLayers.Animation.stop(this.animationId);'],[0,' this.animationId = null;'],[0,' this.playing = false;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: play'],[-1,' * Calls the appropriate easing method'],[-1,' *\/'],[-1,' play: function() {'],[0,' var value = {};'],[0,' for (var i in this.begin) {'],[0,' var b = this.begin[i];'],[0,' var f = this.finish[i];'],[0,' if (b == null || f == null || isNaN(b) || isNaN(f)) {'],[0,' throw new TypeError(\'invalid value for Tween\');'],[-1,' }'],[-1,''],[0,' var c = f - b;'],[0,' value[i] = this.easing.apply(this, [this.time, b, c, this.duration]);'],[-1,' }'],[0,' this.time++;'],[-1,' '],[0,' if (this.callbacks && this.callbacks.eachStep) {'],[-1,' \/\/ skip frames if frame rate drops below threshold'],[0,' if ((new Date().getTime() - this.startTime) \/ this.time <= 1000 \/ this.minFrameRate) {'],[0,' this.callbacks.eachStep.call(this, value);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if (this.time > this.duration) {'],[0,' this.stop();'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Create empty functions for all easing methods.'],[-1,' *\/'],[-1,' CLASS_NAME: \"OpenLayers.Tween\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Easing'],[-1,' * '],[-1,' * Credits:'],[-1,' * Easing Equations by Robert Penner, <http:\/\/www.robertpenner.com\/easing\/>'],[-1,' *\/'],[1,'OpenLayers.Easing = {'],[-1,' \/**'],[-1,' * Create empty functions for all easing methods.'],[-1,' *\/'],[-1,' CLASS_NAME: \"OpenLayers.Easing\"'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Easing.Linear'],[-1,' *\/'],[1,'OpenLayers.Easing.Linear = {'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeIn'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeIn: function(t, b, c, d) {'],[0,' return c*t\/d + b;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeOut'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeOut: function(t, b, c, d) {'],[0,' return c*t\/d + b;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeInOut'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeInOut: function(t, b, c, d) {'],[0,' return c*t\/d + b;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Easing.Linear\"'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Easing.Expo'],[-1,' *\/'],[1,'OpenLayers.Easing.Expo = {'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeIn'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeIn: function(t, b, c, d) {'],[0,' return (t==0) ? b : c * Math.pow(2, 10 * (t\/d - 1)) + b;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeOut'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeOut: function(t, b, c, d) {'],[0,' return (t==d) ? b+c : c * (-Math.pow(2, -10 * t\/d) + 1) + b;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeInOut'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeInOut: function(t, b, c, d) {'],[0,' if (t==0) return b;'],[0,' if (t==d) return b+c;'],[0,' if ((t\/=d\/2) < 1) return c\/2 * Math.pow(2, 10 * (t - 1)) + b;'],[0,' return c\/2 * (-Math.pow(2, -10 * --t) + 2) + b;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Easing.Expo\"'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Easing.Quad'],[-1,' *\/'],[1,'OpenLayers.Easing.Quad = {'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeIn'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeIn: function(t, b, c, d) {'],[0,' return c*(t\/=d)*t + b;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeOut'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeOut: function(t, b, c, d) {'],[0,' return -c *(t\/=d)*(t-2) + b;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Function: easeInOut'],[-1,' * '],[-1,' * Parameters:'],[-1,' * t - {Float} time'],[-1,' * b - {Float} beginning position'],[-1,' * c - {Float} total change'],[-1,' * d - {Float} duration of the transition'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float}'],[-1,' *\/'],[-1,' easeInOut: function(t, b, c, d) {'],[0,' if ((t\/=d\/2) < 1) return c\/2*t*t + b;'],[0,' return -c\/2 * ((--t)*(t-2) - 1) + b;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Easing.Quad\"'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,' '],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry'],[-1,' * A Geometry is a description of a geographic object. Create an instance of'],[-1,' * this class with the <OpenLayers.Geometry> constructor. This is a base class,'],[-1,' * typical geometry types are described by subclasses of this class.'],[-1,' *'],[-1,' * Note that if you use the <OpenLayers.Geometry.fromWKT> method, you must'],[-1,' * explicitly include the OpenLayers.Format.WKT in your build.'],[-1,' *\/'],[1,'OpenLayers.Geometry = OpenLayers.Class({'],[-1,''],[-1,' \/**'],[-1,' * Property: id'],[-1,' * {String} A unique identifier for this geometry.'],[-1,' *\/'],[-1,' id: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: parent'],[-1,' * {<OpenLayers.Geometry>}This is set when a Geometry is added as component'],[-1,' * of another geometry'],[-1,' *\/'],[-1,' parent: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: bounds '],[-1,' * {<OpenLayers.Bounds>} The bounds of this geometry'],[-1,' *\/'],[-1,' bounds: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry'],[-1,' * Creates a geometry object. '],[-1,' *\/'],[-1,' initialize: function() {'],[0,' this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME+ \"_\");'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' * Destroy this geometry.'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' this.id = null;'],[0,' this.bounds = null;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * Create a clone of this geometry. Does not set any non-standard'],[-1,' * properties of the cloned geometry.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry>} An exact clone of this geometry.'],[-1,' *\/'],[-1,' clone: function() {'],[0,' return new OpenLayers.Geometry();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setBounds'],[-1,' * Set the bounds for this Geometry.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>} '],[-1,' *\/'],[-1,' setBounds: function(bounds) {'],[0,' if (bounds) {'],[0,' this.bounds = bounds.clone();'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: clearBounds'],[-1,' * Nullify this components bounds and that of its parent as well.'],[-1,' *\/'],[-1,' clearBounds: function() {'],[0,' this.bounds = null;'],[0,' if (this.parent) {'],[0,' this.parent.clearBounds();'],[-1,' } '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: extendBounds'],[-1,' * Extend the existing bounds to include the new bounds. '],[-1,' * If geometry\'s bounds is not yet set, then set a new Bounds.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newBounds - {<OpenLayers.Bounds>} '],[-1,' *\/'],[-1,' extendBounds: function(newBounds){'],[0,' var bounds = this.getBounds();'],[0,' if (!bounds) {'],[0,' this.setBounds(newBounds);'],[-1,' } else {'],[0,' this.bounds.extend(newBounds);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getBounds'],[-1,' * Get the bounds for this Geometry. If bounds is not set, it '],[-1,' * is calculated again, this makes queries faster.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' getBounds: function() {'],[0,' if (this.bounds == null) {'],[0,' this.calculateBounds();'],[-1,' }'],[0,' return this.bounds;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: calculateBounds'],[-1,' * Recalculate the bounds for the geometry. '],[-1,' *\/'],[-1,' calculateBounds: function() {'],[-1,' \/\/'],[-1,' \/\/ This should be overridden by subclasses.'],[-1,' \/\/'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: distanceTo'],[-1,' * Calculate the closest distance between two geometries (on the x-y plane).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} The target geometry.'],[-1,' * options - {Object} Optional properties for configuring the distance'],[-1,' * calculation.'],[-1,' *'],[-1,' * Valid options depend on the specific geometry type.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Number | Object} The distance between this geometry and the target.'],[-1,' * If details is true, the return will be an object with distance,'],[-1,' * x0, y0, x1, and x2 properties. The x0 and y0 properties represent'],[-1,' * the coordinates of the closest point on this geometry. The x1 and y1'],[-1,' * properties represent the coordinates of the closest point on the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' distanceTo: function(geometry, options) {'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getVertices'],[-1,' * Return a list of all points in this geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * nodes - {Boolean} For lines, only return vertices that are'],[-1,' * endpoints. If false, for lines, only vertices that are not'],[-1,' * endpoints will be returned. If not provided, all vertices will'],[-1,' * be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} A list of all vertices in the geometry.'],[-1,' *\/'],[-1,' getVertices: function(nodes) {'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: atPoint'],[-1,' * Note - This is only an approximation based on the bounds of the '],[-1,' * geometry.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an'],[-1,' * object with a \'lon\' and \'lat\' properties.'],[-1,' * toleranceLon - {float} Optional tolerance in Geometric Coords'],[-1,' * toleranceLat - {float} Optional tolerance in Geographic Coords'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the geometry is at the specified location'],[-1,' *\/'],[-1,' atPoint: function(lonlat, toleranceLon, toleranceLat) {'],[0,' var atPoint = false;'],[0,' var bounds = this.getBounds();'],[0,' if ((bounds != null) && (lonlat != null)) {'],[-1,''],[0,' var dX = (toleranceLon != null) ? toleranceLon : 0;'],[0,' var dY = (toleranceLat != null) ? toleranceLat : 0;'],[-1,' '],[0,' var toleranceBounds = '],[-1,' new OpenLayers.Bounds(this.bounds.left - dX,'],[-1,' this.bounds.bottom - dY,'],[-1,' this.bounds.right + dX,'],[-1,' this.bounds.top + dY);'],[-1,''],[0,' atPoint = toleranceBounds.containsLonLat(lonlat);'],[-1,' }'],[0,' return atPoint;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getLength'],[-1,' * Calculate the length of this geometry. This method is defined in'],[-1,' * subclasses.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The length of the collection by summing its parts'],[-1,' *\/'],[-1,' getLength: function() {'],[-1,' \/\/to be overridden by geometries that actually have a length'],[-1,' \/\/'],[0,' return 0.0;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getArea'],[-1,' * Calculate the area of this geometry. This method is defined in subclasses.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The area of the collection by summing its parts'],[-1,' *\/'],[-1,' getArea: function() {'],[-1,' \/\/to be overridden by geometries that actually have an area'],[-1,' \/\/'],[0,' return 0.0;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getCentroid'],[-1,' * Calculate the centroid of this geometry. This method is defined in subclasses.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Point>} The centroid of the collection'],[-1,' *\/'],[-1,' getCentroid: function() {'],[0,' return null;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: toString'],[-1,' * Returns a text representation of the geometry. If the WKT format is'],[-1,' * included in a build, this will be the Well-Known Text '],[-1,' * representation.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} String representation of this geometry.'],[-1,' *\/'],[-1,' toString: function() {'],[0,' var string;'],[0,' if (OpenLayers.Format && OpenLayers.Format.WKT) {'],[0,' string = OpenLayers.Format.WKT.prototype.write('],[-1,' new OpenLayers.Feature.Vector(this)'],[-1,' );'],[-1,' } else {'],[0,' string = Object.prototype.toString.call(this);'],[-1,' }'],[0,' return string;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Function: OpenLayers.Geometry.fromWKT'],[-1,' * Generate a geometry given a Well-Known Text string. For this method to'],[-1,' * work, you must include the OpenLayers.Format.WKT in your build '],[-1,' * explicitly.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * wkt - {String} A string representing the geometry in Well-Known Text.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry>} A geometry of the appropriate class.'],[-1,' *\/'],[1,'OpenLayers.Geometry.fromWKT = function(wkt) {'],[0,' var geom;'],[0,' if (OpenLayers.Format && OpenLayers.Format.WKT) {'],[0,' var format = OpenLayers.Geometry.fromWKT.format;'],[0,' if (!format) {'],[0,' format = new OpenLayers.Format.WKT();'],[0,' OpenLayers.Geometry.fromWKT.format = format;'],[-1,' }'],[0,' var result = format.read(wkt);'],[0,' if (result instanceof OpenLayers.Feature.Vector) {'],[0,' geom = result.geometry;'],[0,' } else if (OpenLayers.Util.isArray(result)) {'],[0,' var len = result.length;'],[0,' var components = new Array(len);'],[0,' for (var i=0; i<len; ++i) {'],[0,' components[i] = result[i].geometry;'],[-1,' }'],[0,' geom = new OpenLayers.Geometry.Collection(components);'],[-1,' }'],[-1,' }'],[0,' return geom;'],[-1,'};'],[-1,' '],[-1,'\/**'],[-1,' * Method: OpenLayers.Geometry.segmentsIntersect'],[-1,' * Determine whether two line segments intersect. Optionally calculates'],[-1,' * and returns the intersection point. This function is optimized for'],[-1,' * cases where seg1.x2 >= seg2.x1 || seg2.x2 >= seg1.x1. In those'],[-1,' * obvious cases where there is no intersection, the function should'],[-1,' * not be called.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * seg1 - {Object} Object representing a segment with properties x1, y1, x2,'],[-1,' * and y2. The start point is represented by x1 and y1. The end point'],[-1,' * is represented by x2 and y2. Start and end are ordered so that x1 < x2.'],[-1,' * seg2 - {Object} Object representing a segment with properties x1, y1, x2,'],[-1,' * and y2. The start point is represented by x1 and y1. The end point'],[-1,' * is represented by x2 and y2. Start and end are ordered so that x1 < x2.'],[-1,' * options - {Object} Optional properties for calculating the intersection.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * point - {Boolean} Return the intersection point. If false, the actual'],[-1,' * intersection point will not be calculated. If true and the segments'],[-1,' * intersect, the intersection point will be returned. If true and'],[-1,' * the segments do not intersect, false will be returned. If true and'],[-1,' * the segments are coincident, true will be returned.'],[-1,' * tolerance - {Number} If a non-null value is provided, if the segments are'],[-1,' * within the tolerance distance, this will be considered an intersection.'],[-1,' * In addition, if the point option is true and the calculated intersection'],[-1,' * is within the tolerance distance of an end point, the endpoint will be'],[-1,' * returned instead of the calculated intersection. Further, if the'],[-1,' * intersection is within the tolerance of endpoints on both segments, or'],[-1,' * if two segment endpoints are within the tolerance distance of eachother'],[-1,' * (but no intersection is otherwise calculated), an endpoint on the'],[-1,' * first segment provided will be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean | <OpenLayers.Geometry.Point>} The two segments intersect.'],[-1,' * If the point argument is true, the return will be the intersection'],[-1,' * point or false if none exists. If point is true and the segments'],[-1,' * are coincident, return will be true (and the instersection is equal'],[-1,' * to the shorter segment).'],[-1,' *\/'],[1,'OpenLayers.Geometry.segmentsIntersect = function(seg1, seg2, options) {'],[0,' var point = options && options.point;'],[0,' var tolerance = options && options.tolerance;'],[0,' var intersection = false;'],[0,' var x11_21 = seg1.x1 - seg2.x1;'],[0,' var y11_21 = seg1.y1 - seg2.y1;'],[0,' var x12_11 = seg1.x2 - seg1.x1;'],[0,' var y12_11 = seg1.y2 - seg1.y1;'],[0,' var y22_21 = seg2.y2 - seg2.y1;'],[0,' var x22_21 = seg2.x2 - seg2.x1;'],[0,' var d = (y22_21 * x12_11) - (x22_21 * y12_11);'],[0,' var n1 = (x22_21 * y11_21) - (y22_21 * x11_21);'],[0,' var n2 = (x12_11 * y11_21) - (y12_11 * x11_21);'],[0,' if(d == 0) {'],[-1,' \/\/ parallel'],[0,' if(n1 == 0 && n2 == 0) {'],[-1,' \/\/ coincident'],[0,' intersection = true;'],[-1,' }'],[-1,' } else {'],[0,' var along1 = n1 \/ d;'],[0,' var along2 = n2 \/ d;'],[0,' if(along1 >= 0 && along1 <= 1 && along2 >=0 && along2 <= 1) {'],[-1,' \/\/ intersect'],[0,' if(!point) {'],[0,' intersection = true;'],[-1,' } else {'],[-1,' \/\/ calculate the intersection point'],[0,' var x = seg1.x1 + (along1 * x12_11);'],[0,' var y = seg1.y1 + (along1 * y12_11);'],[0,' intersection = new OpenLayers.Geometry.Point(x, y);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' if(tolerance) {'],[0,' var dist;'],[0,' if(intersection) {'],[0,' if(point) {'],[0,' var segs = [seg1, seg2];'],[0,' var seg, x, y;'],[-1,' \/\/ check segment endpoints for proximity to intersection'],[-1,' \/\/ set intersection to first endpoint within the tolerance'],[0,' outer: for(var i=0; i<2; ++i) {'],[0,' seg = segs[i];'],[0,' for(var j=1; j<3; ++j) {'],[0,' x = seg[\"x\" + j];'],[0,' y = seg[\"y\" + j];'],[0,' dist = Math.sqrt('],[-1,' Math.pow(x - intersection.x, 2) +'],[-1,' Math.pow(y - intersection.y, 2)'],[-1,' );'],[0,' if(dist < tolerance) {'],[0,' intersection.x = x;'],[0,' intersection.y = y;'],[0,' break outer;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' }'],[-1,' } else {'],[-1,' \/\/ no calculated intersection, but segments could be within'],[-1,' \/\/ the tolerance of one another'],[0,' var segs = [seg1, seg2];'],[0,' var source, target, x, y, p, result;'],[-1,' \/\/ check segment endpoints for proximity to intersection'],[-1,' \/\/ set intersection to first endpoint within the tolerance'],[0,' outer: for(var i=0; i<2; ++i) {'],[0,' source = segs[i];'],[0,' target = segs[(i+1)%2];'],[0,' for(var j=1; j<3; ++j) {'],[0,' p = {x: source[\"x\"+j], y: source[\"y\"+j]};'],[0,' result = OpenLayers.Geometry.distanceToSegment(p, target);'],[0,' if(result.distance < tolerance) {'],[0,' if(point) {'],[0,' intersection = new OpenLayers.Geometry.Point(p.x, p.y);'],[-1,' } else {'],[0,' intersection = true;'],[-1,' }'],[0,' break outer;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return intersection;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: OpenLayers.Geometry.distanceToSegment'],[-1,' *'],[-1,' * Parameters:'],[-1,' * point - {Object} An object with x and y properties representing the'],[-1,' * point coordinates.'],[-1,' * segment - {Object} An object with x1, y1, x2, and y2 properties'],[-1,' * representing endpoint coordinates.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An object with distance, along, x, and y properties. The distance'],[-1,' * will be the shortest distance between the input point and segment.'],[-1,' * The x and y properties represent the coordinates along the segment'],[-1,' * where the shortest distance meets the segment. The along attribute'],[-1,' * describes how far between the two segment points the given point is.'],[-1,' *\/'],[1,'OpenLayers.Geometry.distanceToSegment = function(point, segment) {'],[0,' var result = OpenLayers.Geometry.distanceSquaredToSegment(point, segment);'],[0,' result.distance = Math.sqrt(result.distance);'],[0,' return result;'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: OpenLayers.Geometry.distanceSquaredToSegment'],[-1,' *'],[-1,' * Usually the distanceToSegment function should be used. This variant however'],[-1,' * can be used for comparisons where the exact distance is not important.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * point - {Object} An object with x and y properties representing the'],[-1,' * point coordinates.'],[-1,' * segment - {Object} An object with x1, y1, x2, and y2 properties'],[-1,' * representing endpoint coordinates.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An object with squared distance, along, x, and y properties.'],[-1,' * The distance will be the shortest distance between the input point and'],[-1,' * segment. The x and y properties represent the coordinates along the'],[-1,' * segment where the shortest distance meets the segment. The along'],[-1,' * attribute describes how far between the two segment points the given'],[-1,' * point is.'],[-1,' *\/'],[1,'OpenLayers.Geometry.distanceSquaredToSegment = function(point, segment) {'],[0,' var x0 = point.x;'],[0,' var y0 = point.y;'],[0,' var x1 = segment.x1;'],[0,' var y1 = segment.y1;'],[0,' var x2 = segment.x2;'],[0,' var y2 = segment.y2;'],[0,' var dx = x2 - x1;'],[0,' var dy = y2 - y1;'],[0,' var along = (dx == 0 && dy == 0) ? 0 : ((dx * (x0 - x1)) + (dy * (y0 - y1))) \/'],[-1,' (Math.pow(dx, 2) + Math.pow(dy, 2));'],[0,' var x, y;'],[0,' if(along <= 0.0) {'],[0,' x = x1;'],[0,' y = y1;'],[0,' } else if(along >= 1.0) {'],[0,' x = x2;'],[0,' y = y2;'],[-1,' } else {'],[0,' x = x1 + along * dx;'],[0,' y = y1 + along * dy;'],[-1,' }'],[0,' return {'],[-1,' distance: Math.pow(x - x0, 2) + Math.pow(y - y0, 2),'],[-1,' x: x, y: y,'],[-1,' along: along'],[-1,' };'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/Collection.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.Collection'],[-1,' * A Collection is exactly what it sounds like: A collection of different '],[-1,' * Geometries. These are stored in the local parameter <components> (which'],[-1,' * can be passed as a parameter to the constructor). '],[-1,' * '],[-1,' * As new geometries are added to the collection, they are NOT cloned. '],[-1,' * When removing geometries, they need to be specified by reference (ie you '],[-1,' * have to pass in the *exact* geometry to be removed).'],[-1,' * '],[-1,' * The <getArea> and <getLength> functions here merely iterate through'],[-1,' * the components, summing their respective areas and lengths.'],[-1,' *'],[-1,' * Create a new instance with the <OpenLayers.Geometry.Collection> constructor.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Geometry> '],[-1,' *\/'],[1,'OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, {'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: components'],[-1,' * {Array(<OpenLayers.Geometry>)} The component parts of this geometry'],[-1,' *\/'],[-1,' components: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: componentTypes'],[-1,' * {Array(String)} An array of class names representing the types of'],[-1,' * components that the collection can include. A null value means the'],[-1,' * component types are not restricted.'],[-1,' *\/'],[-1,' componentTypes: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.Collection'],[-1,' * Creates a Geometry Collection -- a list of geoms.'],[-1,' *'],[-1,' * Parameters: '],[-1,' * components - {Array(<OpenLayers.Geometry>)} Optional array of geometries'],[-1,' *'],[-1,' *\/'],[-1,' initialize: function (components) {'],[0,' OpenLayers.Geometry.prototype.initialize.apply(this, arguments);'],[0,' this.components = [];'],[0,' if (components != null) {'],[0,' this.addComponents(components);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' * Destroy this geometry.'],[-1,' *\/'],[-1,' destroy: function () {'],[0,' this.components.length = 0;'],[0,' this.components = null;'],[0,' OpenLayers.Geometry.prototype.destroy.apply(this, arguments);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * Clone this geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Collection>} An exact clone of this collection'],[-1,' *\/'],[-1,' clone: function() {'],[0,' var Constructor = OpenLayers.Util.getConstructor(this.CLASS_NAME);'],[0,' var geometry = new Constructor();'],[0,' for(var i=0, len=this.components.length; i<len; i++) {'],[0,' geometry.addComponent(this.components[i].clone());'],[-1,' }'],[-1,' '],[-1,' \/\/ catch any randomly tagged-on properties'],[0,' OpenLayers.Util.applyDefaults(geometry, this);'],[-1,' '],[0,' return geometry;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getComponentsString'],[-1,' * Get a string representing the components for this collection'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A string representation of the components of this geometry'],[-1,' *\/'],[-1,' getComponentsString: function(){'],[0,' var strings = [];'],[0,' for(var i=0, len=this.components.length; i<len; i++) {'],[0,' strings.push(this.components[i].toShortString()); '],[-1,' }'],[0,' return strings.join(\",\");'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: calculateBounds'],[-1,' * Recalculate the bounds by iterating through the components and '],[-1,' * calling calling extendBounds() on each item.'],[-1,' *\/'],[-1,' calculateBounds: function() {'],[0,' this.bounds = null;'],[0,' var bounds = new OpenLayers.Bounds();'],[0,' var components = this.components;'],[0,' if (components) {'],[0,' for (var i=0, len=components.length; i<len; i++) {'],[0,' bounds.extend(components[i].getBounds());'],[-1,' }'],[-1,' }'],[-1,' \/\/ to preserve old behavior, we only set bounds if non-null'],[-1,' \/\/ in the future, we could add bounds.isEmpty()'],[0,' if (bounds.left != null && bounds.bottom != null && '],[-1,' bounds.right != null && bounds.top != null) {'],[0,' this.setBounds(bounds);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addComponents'],[-1,' * Add components to this geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * components - {Array(<OpenLayers.Geometry>)} An array of geometries to add'],[-1,' *\/'],[-1,' addComponents: function(components){'],[0,' if(!(OpenLayers.Util.isArray(components))) {'],[0,' components = [components];'],[-1,' }'],[0,' for(var i=0, len=components.length; i<len; i++) {'],[0,' this.addComponent(components[i]);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: addComponent'],[-1,' * Add a new component (geometry) to the collection. If this.componentTypes'],[-1,' * is set, then the component class name must be in the componentTypes array.'],[-1,' *'],[-1,' * The bounds cache is reset.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * component - {<OpenLayers.Geometry>} A geometry to add'],[-1,' * index - {int} Optional index into the array to insert the component'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The component geometry was successfully added'],[-1,' *\/ '],[-1,' addComponent: function(component, index) {'],[0,' var added = false;'],[0,' if(component) {'],[0,' if(this.componentTypes == null ||'],[-1,' (OpenLayers.Util.indexOf(this.componentTypes,'],[-1,' component.CLASS_NAME) > -1)) {'],[-1,''],[0,' if(index != null && (index < this.components.length)) {'],[0,' var components1 = this.components.slice(0, index);'],[0,' var components2 = this.components.slice(index, '],[-1,' this.components.length);'],[0,' components1.push(component);'],[0,' this.components = components1.concat(components2);'],[-1,' } else {'],[0,' this.components.push(component);'],[-1,' }'],[0,' component.parent = this;'],[0,' this.clearBounds();'],[0,' added = true;'],[-1,' }'],[-1,' }'],[0,' return added;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: removeComponents'],[-1,' * Remove components from this geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * components - {Array(<OpenLayers.Geometry>)} The components to be removed'],[-1,' *'],[-1,' * Returns: '],[-1,' * {Boolean} A component was removed.'],[-1,' *\/'],[-1,' removeComponents: function(components) {'],[0,' var removed = false;'],[-1,''],[0,' if(!(OpenLayers.Util.isArray(components))) {'],[0,' components = [components];'],[-1,' }'],[0,' for(var i=components.length-1; i>=0; --i) {'],[0,' removed = this.removeComponent(components[i]) || removed;'],[-1,' }'],[0,' return removed;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: removeComponent'],[-1,' * Remove a component from this geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * component - {<OpenLayers.Geometry>} '],[-1,' *'],[-1,' * Returns: '],[-1,' * {Boolean} The component was removed.'],[-1,' *\/'],[-1,' removeComponent: function(component) {'],[-1,' '],[0,' OpenLayers.Util.removeItem(this.components, component);'],[-1,' '],[-1,' \/\/ clearBounds() so that it gets recalculated on the next call'],[-1,' \/\/ to this.getBounds();'],[0,' this.clearBounds();'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getLength'],[-1,' * Calculate the length of this geometry'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float} The length of the geometry'],[-1,' *\/'],[-1,' getLength: function() {'],[0,' var length = 0.0;'],[0,' for (var i=0, len=this.components.length; i<len; i++) {'],[0,' length += this.components[i].getLength();'],[-1,' }'],[0,' return length;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getArea'],[-1,' * Calculate the area of this geometry. Note how this function is overridden'],[-1,' * in <OpenLayers.Geometry.Polygon>.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Float} The area of the collection by summing its parts'],[-1,' *\/'],[-1,' getArea: function() {'],[0,' var area = 0.0;'],[0,' for (var i=0, len=this.components.length; i<len; i++) {'],[0,' area += this.components[i].getArea();'],[-1,' }'],[0,' return area;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: getGeodesicArea'],[-1,' * Calculate the approximate area of the polygon were it projected onto'],[-1,' * the earth.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * projection - {<OpenLayers.Projection>} The spatial reference system'],[-1,' * for the geometry coordinates. If not provided, Geographic\/WGS84 is'],[-1,' * assumed.'],[-1,' * '],[-1,' * Reference:'],[-1,' * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for'],[-1,' * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion'],[-1,' * Laboratory, Pasadena, CA, June 2007 http:\/\/trs-new.jpl.nasa.gov\/dspace\/handle\/2014\/40409'],[-1,' *'],[-1,' * Returns:'],[-1,' * {float} The approximate geodesic area of the geometry in square meters.'],[-1,' *\/'],[-1,' getGeodesicArea: function(projection) {'],[0,' var area = 0.0;'],[0,' for(var i=0, len=this.components.length; i<len; i++) {'],[0,' area += this.components[i].getGeodesicArea(projection);'],[-1,' }'],[0,' return area;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getCentroid'],[-1,' *'],[-1,' * Compute the centroid for this geometry collection.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * weighted - {Boolean} Perform the getCentroid computation recursively,'],[-1,' * returning an area weighted average of all geometries in this collection.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Point>} The centroid of the collection'],[-1,' *\/'],[-1,' getCentroid: function(weighted) {'],[0,' if (!weighted) {'],[0,' return this.components.length && this.components[0].getCentroid();'],[-1,' }'],[0,' var len = this.components.length;'],[0,' if (!len) {'],[0,' return false;'],[-1,' }'],[-1,' '],[0,' var areas = [];'],[0,' var centroids = [];'],[0,' var areaSum = 0;'],[0,' var minArea = Number.MAX_VALUE;'],[0,' var component;'],[0,' for (var i=0; i<len; ++i) {'],[0,' component = this.components[i];'],[0,' var area = component.getArea();'],[0,' var centroid = component.getCentroid(true);'],[0,' if (isNaN(area) || isNaN(centroid.x) || isNaN(centroid.y)) {'],[0,' continue;'],[-1,' }'],[0,' areas.push(area);'],[0,' areaSum += area;'],[0,' minArea = (area < minArea && area > 0) ? area : minArea;'],[0,' centroids.push(centroid);'],[-1,' }'],[0,' len = areas.length;'],[0,' if (areaSum === 0) {'],[-1,' \/\/ all the components in this collection have 0 area'],[-1,' \/\/ probably a collection of points -- weight all the points the same'],[0,' for (var i=0; i<len; ++i) {'],[0,' areas[i] = 1;'],[-1,' }'],[0,' areaSum = areas.length;'],[-1,' } else {'],[-1,' \/\/ normalize all the areas where the smallest area will get'],[-1,' \/\/ a value of 1'],[0,' for (var i=0; i<len; ++i) {'],[0,' areas[i] \/= minArea;'],[-1,' }'],[0,' areaSum \/= minArea;'],[-1,' }'],[-1,' '],[0,' var xSum = 0, ySum = 0, centroid, area;'],[0,' for (var i=0; i<len; ++i) {'],[0,' centroid = centroids[i];'],[0,' area = areas[i];'],[0,' xSum += centroid.x * area;'],[0,' ySum += centroid.y * area;'],[-1,' }'],[-1,' '],[0,' return new OpenLayers.Geometry.Point(xSum\/areaSum, ySum\/areaSum);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getGeodesicLength'],[-1,' * Calculate the approximate length of the geometry were it projected onto'],[-1,' * the earth.'],[-1,' *'],[-1,' * projection - {<OpenLayers.Projection>} The spatial reference system'],[-1,' * for the geometry coordinates. If not provided, Geographic\/WGS84 is'],[-1,' * assumed.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The appoximate geodesic length of the geometry in meters.'],[-1,' *\/'],[-1,' getGeodesicLength: function(projection) {'],[0,' var length = 0.0;'],[0,' for(var i=0, len=this.components.length; i<len; i++) {'],[0,' length += this.components[i].getGeodesicLength(projection);'],[-1,' }'],[0,' return length;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: move'],[-1,' * Moves a geometry by the given displacement along positive x and y axes.'],[-1,' * This modifies the position of the geometry and clears the cached'],[-1,' * bounds.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Float} Distance to move geometry in positive x direction. '],[-1,' * y - {Float} Distance to move geometry in positive y direction.'],[-1,' *\/'],[-1,' move: function(x, y) {'],[0,' for(var i=0, len=this.components.length; i<len; i++) {'],[0,' this.components[i].move(x, y);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: rotate'],[-1,' * Rotate a geometry around some origin'],[-1,' *'],[-1,' * Parameters:'],[-1,' * angle - {Float} Rotation angle in degrees (measured counterclockwise'],[-1,' * from the positive x-axis)'],[-1,' * origin - {<OpenLayers.Geometry.Point>} Center point for the rotation'],[-1,' *\/'],[-1,' rotate: function(angle, origin) {'],[0,' for(var i=0, len=this.components.length; i<len; ++i) {'],[0,' this.components[i].rotate(angle, origin);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: resize'],[-1,' * Resize a geometry relative to some origin. Use this method to apply'],[-1,' * a uniform scaling to a geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * scale - {Float} Factor by which to scale the geometry. A scale of 2'],[-1,' * doubles the size of the geometry in each dimension'],[-1,' * (lines, for example, will be twice as long, and polygons'],[-1,' * will have four times the area).'],[-1,' * origin - {<OpenLayers.Geometry.Point>} Point of origin for resizing'],[-1,' * ratio - {Float} Optional x:y ratio for resizing. Default ratio is 1.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry>} - The current geometry. '],[-1,' *\/'],[-1,' resize: function(scale, origin, ratio) {'],[0,' for(var i=0; i<this.components.length; ++i) {'],[0,' this.components[i].resize(scale, origin, ratio);'],[-1,' }'],[0,' return this;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: distanceTo'],[-1,' * Calculate the closest distance between two geometries (on the x-y plane).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} The target geometry.'],[-1,' * options - {Object} Optional properties for configuring the distance'],[-1,' * calculation.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * details - {Boolean} Return details from the distance calculation.'],[-1,' * Default is false.'],[-1,' * edge - {Boolean} Calculate the distance from this geometry to the'],[-1,' * nearest edge of the target geometry. Default is true. If true,'],[-1,' * calling distanceTo from a geometry that is wholly contained within'],[-1,' * the target will result in a non-zero distance. If false, whenever'],[-1,' * geometries intersect, calling distanceTo will return 0. If false,'],[-1,' * details cannot be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number | Object} The distance between this geometry and the target.'],[-1,' * If details is true, the return will be an object with distance,'],[-1,' * x0, y0, x1, and y1 properties. The x0 and y0 properties represent'],[-1,' * the coordinates of the closest point on this geometry. The x1 and y1'],[-1,' * properties represent the coordinates of the closest point on the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' distanceTo: function(geometry, options) {'],[0,' var edge = !(options && options.edge === false);'],[0,' var details = edge && options && options.details;'],[0,' var result, best, distance;'],[0,' var min = Number.POSITIVE_INFINITY;'],[0,' for(var i=0, len=this.components.length; i<len; ++i) {'],[0,' result = this.components[i].distanceTo(geometry, options);'],[0,' distance = details ? result.distance : result;'],[0,' if(distance < min) {'],[0,' min = distance;'],[0,' best = result;'],[0,' if(min == 0) {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return best;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: equals'],[-1,' * Determine whether another geometry is equivalent to this one. Geometries'],[-1,' * are considered equivalent if all components have the same coordinates.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} The geometry to test. '],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The supplied geometry is equivalent to this geometry.'],[-1,' *\/'],[-1,' equals: function(geometry) {'],[0,' var equivalent = true;'],[0,' if(!geometry || !geometry.CLASS_NAME ||'],[-1,' (this.CLASS_NAME != geometry.CLASS_NAME)) {'],[0,' equivalent = false;'],[0,' } else if(!(OpenLayers.Util.isArray(geometry.components)) ||'],[-1,' (geometry.components.length != this.components.length)) {'],[0,' equivalent = false;'],[-1,' } else {'],[0,' for(var i=0, len=this.components.length; i<len; ++i) {'],[0,' if(!this.components[i].equals(geometry.components[i])) {'],[0,' equivalent = false;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return equivalent;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: transform'],[-1,' * Reproject the components geometry from source to dest.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * source - {<OpenLayers.Projection>} '],[-1,' * dest - {<OpenLayers.Projection>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry>} '],[-1,' *\/'],[-1,' transform: function(source, dest) {'],[0,' if (source && dest) {'],[0,' for (var i=0, len=this.components.length; i<len; i++) { '],[0,' var component = this.components[i];'],[0,' component.transform(source, dest);'],[-1,' }'],[0,' this.bounds = null;'],[-1,' }'],[0,' return this;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: intersects'],[-1,' * Determine if the input geometry intersects this one.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} Any type of geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The input geometry intersects this one.'],[-1,' *\/'],[-1,' intersects: function(geometry) {'],[0,' var intersect = false;'],[0,' for(var i=0, len=this.components.length; i<len; ++ i) {'],[0,' intersect = geometry.intersects(this.components[i]);'],[0,' if(intersect) {'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' return intersect;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getVertices'],[-1,' * Return a list of all points in this geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * nodes - {Boolean} For lines, only return vertices that are'],[-1,' * endpoints. If false, for lines, only vertices that are not'],[-1,' * endpoints will be returned. If not provided, all vertices will'],[-1,' * be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} A list of all vertices in the geometry.'],[-1,' *\/'],[-1,' getVertices: function(nodes) {'],[0,' var vertices = [];'],[0,' for(var i=0, len=this.components.length; i<len; ++i) {'],[0,' Array.prototype.push.apply('],[-1,' vertices, this.components[i].getVertices(nodes)'],[-1,' );'],[-1,' }'],[0,' return vertices;'],[-1,' },'],[-1,''],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.Collection\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/Point.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.Point'],[-1,' * Point geometry class. '],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Geometry> '],[-1,' *\/'],[1,'OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, {'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: x '],[-1,' * {float} '],[-1,' *\/'],[-1,' x: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: y '],[-1,' * {float} '],[-1,' *\/'],[-1,' y: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.Point'],[-1,' * Construct a point geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {float} '],[-1,' * y - {float}'],[-1,' * '],[-1,' *\/'],[-1,' initialize: function(x, y) {'],[0,' OpenLayers.Geometry.prototype.initialize.apply(this, arguments);'],[-1,' '],[0,' this.x = parseFloat(x);'],[0,' this.y = parseFloat(y);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Point>} An exact clone of this OpenLayers.Geometry.Point'],[-1,' *\/'],[-1,' clone: function(obj) {'],[0,' if (obj == null) {'],[0,' obj = new OpenLayers.Geometry.Point(this.x, this.y);'],[-1,' }'],[-1,''],[-1,' \/\/ catch any randomly tagged-on properties'],[0,' OpenLayers.Util.applyDefaults(obj, this);'],[-1,''],[0,' return obj;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: calculateBounds'],[-1,' * Create a new Bounds based on the lon\/lat'],[-1,' *\/'],[-1,' calculateBounds: function () {'],[0,' this.bounds = new OpenLayers.Bounds(this.x, this.y,'],[-1,' this.x, this.y);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: distanceTo'],[-1,' * Calculate the closest distance between two geometries (on the x-y plane).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} The target geometry.'],[-1,' * options - {Object} Optional properties for configuring the distance'],[-1,' * calculation.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * details - {Boolean} Return details from the distance calculation.'],[-1,' * Default is false.'],[-1,' * edge - {Boolean} Calculate the distance from this geometry to the'],[-1,' * nearest edge of the target geometry. Default is true. If true,'],[-1,' * calling distanceTo from a geometry that is wholly contained within'],[-1,' * the target will result in a non-zero distance. If false, whenever'],[-1,' * geometries intersect, calling distanceTo will return 0. If false,'],[-1,' * details cannot be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number | Object} The distance between this geometry and the target.'],[-1,' * If details is true, the return will be an object with distance,'],[-1,' * x0, y0, x1, and x2 properties. The x0 and y0 properties represent'],[-1,' * the coordinates of the closest point on this geometry. The x1 and y1'],[-1,' * properties represent the coordinates of the closest point on the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' distanceTo: function(geometry, options) {'],[0,' var edge = !(options && options.edge === false);'],[0,' var details = edge && options && options.details;'],[0,' var distance, x0, y0, x1, y1, result;'],[0,' if(geometry instanceof OpenLayers.Geometry.Point) {'],[0,' x0 = this.x;'],[0,' y0 = this.y;'],[0,' x1 = geometry.x;'],[0,' y1 = geometry.y;'],[0,' distance = Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));'],[0,' result = !details ?'],[-1,' distance : {x0: x0, y0: y0, x1: x1, y1: y1, distance: distance};'],[-1,' } else {'],[0,' result = geometry.distanceTo(this, options);'],[0,' if(details) {'],[-1,' \/\/ switch coord order since this geom is target'],[0,' result = {'],[-1,' x0: result.x1, y0: result.y1,'],[-1,' x1: result.x0, y1: result.y0,'],[-1,' distance: result.distance'],[-1,' };'],[-1,' }'],[-1,' }'],[0,' return result;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: equals'],[-1,' * Determine whether another geometry is equivalent to this one. Geometries'],[-1,' * are considered equivalent if all components have the same coordinates.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * geom - {<OpenLayers.Geometry.Point>} The geometry to test. '],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The supplied geometry is equivalent to this geometry.'],[-1,' *\/'],[-1,' equals: function(geom) {'],[0,' var equals = false;'],[0,' if (geom != null) {'],[0,' equals = ((this.x == geom.x && this.y == geom.y) ||'],[-1,' (isNaN(this.x) && isNaN(this.y) && isNaN(geom.x) && isNaN(geom.y)));'],[-1,' }'],[0,' return equals;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: toShortString'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} Shortened String representation of Point object. '],[-1,' * (ex. <i>\"5, 42\"<\/i>)'],[-1,' *\/'],[-1,' toShortString: function() {'],[0,' return (this.x + \", \" + this.y);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: move'],[-1,' * Moves a geometry by the given displacement along positive x and y axes.'],[-1,' * This modifies the position of the geometry and clears the cached'],[-1,' * bounds.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Float} Distance to move geometry in positive x direction. '],[-1,' * y - {Float} Distance to move geometry in positive y direction.'],[-1,' *\/'],[-1,' move: function(x, y) {'],[0,' this.x = this.x + x;'],[0,' this.y = this.y + y;'],[0,' this.clearBounds();'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: rotate'],[-1,' * Rotate a point around another.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * angle - {Float} Rotation angle in degrees (measured counterclockwise'],[-1,' * from the positive x-axis)'],[-1,' * origin - {<OpenLayers.Geometry.Point>} Center point for the rotation'],[-1,' *\/'],[-1,' rotate: function(angle, origin) {'],[0,' angle *= Math.PI \/ 180;'],[0,' var radius = this.distanceTo(origin);'],[0,' var theta = angle + Math.atan2(this.y - origin.y, this.x - origin.x);'],[0,' this.x = origin.x + (radius * Math.cos(theta));'],[0,' this.y = origin.y + (radius * Math.sin(theta));'],[0,' this.clearBounds();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getCentroid'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Point>} The centroid of the collection'],[-1,' *\/'],[-1,' getCentroid: function() {'],[0,' return new OpenLayers.Geometry.Point(this.x, this.y);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: resize'],[-1,' * Resize a point relative to some origin. For points, this has the effect'],[-1,' * of scaling a vector (from the origin to the point). This method is'],[-1,' * more useful on geometry collection subclasses.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * scale - {Float} Ratio of the new distance from the origin to the old'],[-1,' * distance from the origin. A scale of 2 doubles the'],[-1,' * distance between the point and origin.'],[-1,' * origin - {<OpenLayers.Geometry.Point>} Point of origin for resizing'],[-1,' * ratio - {Float} Optional x:y ratio for resizing. Default ratio is 1.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry>} - The current geometry. '],[-1,' *\/'],[-1,' resize: function(scale, origin, ratio) {'],[0,' ratio = (ratio == undefined) ? 1 : ratio;'],[0,' this.x = origin.x + (scale * ratio * (this.x - origin.x));'],[0,' this.y = origin.y + (scale * (this.y - origin.y));'],[0,' this.clearBounds();'],[0,' return this;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: intersects'],[-1,' * Determine if the input geometry intersects this one.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} Any type of geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The input geometry intersects this one.'],[-1,' *\/'],[-1,' intersects: function(geometry) {'],[0,' var intersect = false;'],[0,' if(geometry.CLASS_NAME == \"OpenLayers.Geometry.Point\") {'],[0,' intersect = this.equals(geometry);'],[-1,' } else {'],[0,' intersect = geometry.intersects(this);'],[-1,' }'],[0,' return intersect;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: transform'],[-1,' * Translate the x,y properties of the point from source to dest.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * source - {<OpenLayers.Projection>} '],[-1,' * dest - {<OpenLayers.Projection>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry>} '],[-1,' *\/'],[-1,' transform: function(source, dest) {'],[0,' if ((source && dest)) {'],[0,' OpenLayers.Projection.transform('],[-1,' this, source, dest); '],[0,' this.bounds = null;'],[-1,' } '],[0,' return this;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getVertices'],[-1,' * Return a list of all points in this geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * nodes - {Boolean} For lines, only return vertices that are'],[-1,' * endpoints. If false, for lines, only vertices that are not'],[-1,' * endpoints will be returned. If not provided, all vertices will'],[-1,' * be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} A list of all vertices in the geometry.'],[-1,' *\/'],[-1,' getVertices: function(nodes) {'],[0,' return [this];'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.Point\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/MultiPoint.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry\/Collection.js'],[-1,' * @requires OpenLayers\/Geometry\/Point.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.MultiPoint'],[-1,' * MultiPoint is a collection of Points. Create a new instance with the'],[-1,' * <OpenLayers.Geometry.MultiPoint> constructor.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Geometry.Collection>'],[-1,' * - <OpenLayers.Geometry>'],[-1,' *\/'],[1,'OpenLayers.Geometry.MultiPoint = OpenLayers.Class('],[-1,' OpenLayers.Geometry.Collection, {'],[-1,''],[-1,' \/**'],[-1,' * Property: componentTypes'],[-1,' * {Array(String)} An array of class names representing the types of'],[-1,' * components that the collection can include. A null value means the'],[-1,' * component types are not restricted.'],[-1,' *\/'],[-1,' componentTypes: [\"OpenLayers.Geometry.Point\"],'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.MultiPoint'],[-1,' * Create a new MultiPoint Geometry'],[-1,' *'],[-1,' * Parameters:'],[-1,' * components - {Array(<OpenLayers.Geometry.Point>)} '],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.MultiPoint>}'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addPoint'],[-1,' * Wrapper for <OpenLayers.Geometry.Collection.addComponent>'],[-1,' *'],[-1,' * Parameters:'],[-1,' * point - {<OpenLayers.Geometry.Point>} Point to be added'],[-1,' * index - {Integer} Optional index'],[-1,' *\/'],[-1,' addPoint: function(point, index) {'],[0,' this.addComponent(point, index);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: removePoint'],[-1,' * Wrapper for <OpenLayers.Geometry.Collection.removeComponent>'],[-1,' *'],[-1,' * Parameters:'],[-1,' * point - {<OpenLayers.Geometry.Point>} Point to be removed'],[-1,' *\/'],[-1,' removePoint: function(point){'],[0,' this.removeComponent(point);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.MultiPoint\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/Curve.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry\/MultiPoint.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.Curve'],[-1,' * A Curve is a MultiPoint, whose points are assumed to be connected. To '],[-1,' * this end, we provide a \"getLength()\" function, which iterates through '],[-1,' * the points, summing the distances between them. '],[-1,' * '],[-1,' * Inherits: '],[-1,' * - <OpenLayers.Geometry.MultiPoint>'],[-1,' *\/'],[1,'OpenLayers.Geometry.Curve = OpenLayers.Class(OpenLayers.Geometry.MultiPoint, {'],[-1,''],[-1,' \/**'],[-1,' * Property: componentTypes'],[-1,' * {Array(String)} An array of class names representing the types of '],[-1,' * components that the collection can include. A null '],[-1,' * value means the component types are not restricted.'],[-1,' *\/'],[-1,' componentTypes: [\"OpenLayers.Geometry.Point\"],'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.Curve'],[-1,' * '],[-1,' * Parameters:'],[-1,' * point - {Array(<OpenLayers.Geometry.Point>)}'],[-1,' *\/'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getLength'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The length of the curve'],[-1,' *\/'],[-1,' getLength: function() {'],[0,' var length = 0.0;'],[0,' if ( this.components && (this.components.length > 1)) {'],[0,' for(var i=1, len=this.components.length; i<len; i++) {'],[0,' length += this.components[i-1].distanceTo(this.components[i]);'],[-1,' }'],[-1,' }'],[0,' return length;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getGeodesicLength'],[-1,' * Calculate the approximate length of the geometry were it projected onto'],[-1,' * the earth.'],[-1,' *'],[-1,' * projection - {<OpenLayers.Projection>} The spatial reference system'],[-1,' * for the geometry coordinates. If not provided, Geographic\/WGS84 is'],[-1,' * assumed.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The appoximate geodesic length of the geometry in meters.'],[-1,' *\/'],[-1,' getGeodesicLength: function(projection) {'],[0,' var geom = this; \/\/ so we can work with a clone if needed'],[0,' if(projection) {'],[0,' var gg = new OpenLayers.Projection(\"EPSG:4326\");'],[0,' if(!gg.equals(projection)) {'],[0,' geom = this.clone().transform(projection, gg);'],[-1,' }'],[-1,' }'],[0,' var length = 0.0;'],[0,' if(geom.components && (geom.components.length > 1)) {'],[0,' var p1, p2;'],[0,' for(var i=1, len=geom.components.length; i<len; i++) {'],[0,' p1 = geom.components[i-1];'],[0,' p2 = geom.components[i];'],[-1,' \/\/ this returns km and requires lon\/lat properties'],[0,' length += OpenLayers.Util.distVincenty('],[-1,' {lon: p1.x, lat: p1.y}, {lon: p2.x, lat: p2.y}'],[-1,' );'],[-1,' }'],[-1,' }'],[-1,' \/\/ convert to m'],[0,' return length * 1000;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.Curve\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/LineString.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry\/Curve.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.LineString'],[-1,' * A LineString is a Curve which, once two points have been added to it, can '],[-1,' * never be less than two points long.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Geometry.Curve>'],[-1,' *\/'],[1,'OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, {'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.LineString'],[-1,' * Create a new LineString geometry'],[-1,' *'],[-1,' * Parameters:'],[-1,' * points - {Array(<OpenLayers.Geometry.Point>)} An array of points used to'],[-1,' * generate the linestring'],[-1,' *'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: removeComponent'],[-1,' * Only allows removal of a point if there are three or more points in '],[-1,' * the linestring. (otherwise the result would be just a single point)'],[-1,' *'],[-1,' * Parameters: '],[-1,' * point - {<OpenLayers.Geometry.Point>} The point to be removed'],[-1,' *'],[-1,' * Returns: '],[-1,' * {Boolean} The component was removed.'],[-1,' *\/'],[-1,' removeComponent: function(point) {'],[0,' var removed = this.components && (this.components.length > 2);'],[0,' if (removed) {'],[0,' OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, '],[-1,' arguments);'],[-1,' }'],[0,' return removed;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: intersects'],[-1,' * Test for instersection between two geometries. This is a cheapo'],[-1,' * implementation of the Bently-Ottmann algorigithm. It doesn\'t'],[-1,' * really keep track of a sweep line data structure. It is closer'],[-1,' * to the brute force method, except that segments are sorted and'],[-1,' * potential intersections are only calculated when bounding boxes'],[-1,' * intersect.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The input geometry intersects this geometry.'],[-1,' *\/'],[-1,' intersects: function(geometry) {'],[0,' var intersect = false;'],[0,' var type = geometry.CLASS_NAME;'],[0,' if(type == \"OpenLayers.Geometry.LineString\" ||'],[-1,' type == \"OpenLayers.Geometry.LinearRing\" ||'],[-1,' type == \"OpenLayers.Geometry.Point\") {'],[0,' var segs1 = this.getSortedSegments();'],[0,' var segs2;'],[0,' if(type == \"OpenLayers.Geometry.Point\") {'],[0,' segs2 = [{'],[-1,' x1: geometry.x, y1: geometry.y,'],[-1,' x2: geometry.x, y2: geometry.y'],[-1,' }];'],[-1,' } else {'],[0,' segs2 = geometry.getSortedSegments();'],[-1,' }'],[0,' var seg1, seg1x1, seg1x2, seg1y1, seg1y2,'],[-1,' seg2, seg2y1, seg2y2;'],[-1,' \/\/ sweep right'],[0,' outer: for(var i=0, len=segs1.length; i<len; ++i) {'],[0,' seg1 = segs1[i];'],[0,' seg1x1 = seg1.x1;'],[0,' seg1x2 = seg1.x2;'],[0,' seg1y1 = seg1.y1;'],[0,' seg1y2 = seg1.y2;'],[0,' inner: for(var j=0, jlen=segs2.length; j<jlen; ++j) {'],[0,' seg2 = segs2[j];'],[0,' if(seg2.x1 > seg1x2) {'],[-1,' \/\/ seg1 still left of seg2'],[0,' break;'],[-1,' }'],[0,' if(seg2.x2 < seg1x1) {'],[-1,' \/\/ seg2 still left of seg1'],[0,' continue;'],[-1,' }'],[0,' seg2y1 = seg2.y1;'],[0,' seg2y2 = seg2.y2;'],[0,' if(Math.min(seg2y1, seg2y2) > Math.max(seg1y1, seg1y2)) {'],[-1,' \/\/ seg2 above seg1'],[0,' continue;'],[-1,' }'],[0,' if(Math.max(seg2y1, seg2y2) < Math.min(seg1y1, seg1y2)) {'],[-1,' \/\/ seg2 below seg1'],[0,' continue;'],[-1,' }'],[0,' if(OpenLayers.Geometry.segmentsIntersect(seg1, seg2)) {'],[0,' intersect = true;'],[0,' break outer;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' } else {'],[0,' intersect = geometry.intersects(this);'],[-1,' }'],[0,' return intersect;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getSortedSegments'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} An array of segment objects. Segment objects have properties'],[-1,' * x1, y1, x2, and y2. The start point is represented by x1 and y1.'],[-1,' * The end point is represented by x2 and y2. Start and end are'],[-1,' * ordered so that x1 < x2.'],[-1,' *\/'],[-1,' getSortedSegments: function() {'],[0,' var numSeg = this.components.length - 1;'],[0,' var segments = new Array(numSeg), point1, point2;'],[0,' for(var i=0; i<numSeg; ++i) {'],[0,' point1 = this.components[i];'],[0,' point2 = this.components[i + 1];'],[0,' if(point1.x < point2.x) {'],[0,' segments[i] = {'],[-1,' x1: point1.x,'],[-1,' y1: point1.y,'],[-1,' x2: point2.x,'],[-1,' y2: point2.y'],[-1,' };'],[-1,' } else {'],[0,' segments[i] = {'],[-1,' x1: point2.x,'],[-1,' y1: point2.y,'],[-1,' x2: point1.x,'],[-1,' y2: point1.y'],[-1,' };'],[-1,' }'],[-1,' }'],[-1,' \/\/ more efficient to define this somewhere static'],[0,' function byX1(seg1, seg2) {'],[0,' return seg1.x1 - seg2.x1;'],[-1,' }'],[0,' return segments.sort(byX1);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: splitWithSegment'],[-1,' * Split this geometry with the given segment.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * seg - {Object} An object with x1, y1, x2, and y2 properties referencing'],[-1,' * segment endpoint coordinates.'],[-1,' * options - {Object} Properties of this object will be used to determine'],[-1,' * how the split is conducted.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * edge - {Boolean} Allow splitting when only edges intersect. Default is'],[-1,' * true. If false, a vertex on the source segment must be within the'],[-1,' * tolerance distance of the intersection to be considered a split.'],[-1,' * tolerance - {Number} If a non-null value is provided, intersections'],[-1,' * within the tolerance distance of one of the source segment\'s'],[-1,' * endpoints will be assumed to occur at the endpoint.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An object with *lines* and *points* properties. If the given'],[-1,' * segment intersects this linestring, the lines array will reference'],[-1,' * geometries that result from the split. The points array will contain'],[-1,' * all intersection points. Intersection points are sorted along the'],[-1,' * segment (in order from x1,y1 to x2,y2).'],[-1,' *\/'],[-1,' splitWithSegment: function(seg, options) {'],[0,' var edge = !(options && options.edge === false);'],[0,' var tolerance = options && options.tolerance;'],[0,' var lines = [];'],[0,' var verts = this.getVertices();'],[0,' var points = [];'],[0,' var intersections = [];'],[0,' var split = false;'],[0,' var vert1, vert2, point;'],[0,' var node, vertex, target;'],[0,' var interOptions = {point: true, tolerance: tolerance};'],[0,' var result = null;'],[0,' for(var i=0, stop=verts.length-2; i<=stop; ++i) {'],[0,' vert1 = verts[i];'],[0,' points.push(vert1.clone());'],[0,' vert2 = verts[i+1];'],[0,' target = {x1: vert1.x, y1: vert1.y, x2: vert2.x, y2: vert2.y};'],[0,' point = OpenLayers.Geometry.segmentsIntersect('],[-1,' seg, target, interOptions'],[-1,' );'],[0,' if(point instanceof OpenLayers.Geometry.Point) {'],[0,' if((point.x === seg.x1 && point.y === seg.y1) ||'],[-1,' (point.x === seg.x2 && point.y === seg.y2) ||'],[-1,' point.equals(vert1) || point.equals(vert2)) {'],[0,' vertex = true;'],[-1,' } else {'],[0,' vertex = false;'],[-1,' }'],[0,' if(vertex || edge) {'],[-1,' \/\/ push intersections different than the previous'],[0,' if(!point.equals(intersections[intersections.length-1])) {'],[0,' intersections.push(point.clone());'],[-1,' }'],[0,' if(i === 0) {'],[0,' if(point.equals(vert1)) {'],[0,' continue;'],[-1,' }'],[-1,' }'],[0,' if(point.equals(vert2)) {'],[0,' continue;'],[-1,' }'],[0,' split = true;'],[0,' if(!point.equals(vert1)) {'],[0,' points.push(point);'],[-1,' }'],[0,' lines.push(new OpenLayers.Geometry.LineString(points));'],[0,' points = [point.clone()];'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' if(split) {'],[0,' points.push(vert2.clone());'],[0,' lines.push(new OpenLayers.Geometry.LineString(points));'],[-1,' }'],[0,' if(intersections.length > 0) {'],[-1,' \/\/ sort intersections along segment'],[0,' var xDir = seg.x1 < seg.x2 ? 1 : -1;'],[0,' var yDir = seg.y1 < seg.y2 ? 1 : -1;'],[0,' result = {'],[-1,' lines: lines,'],[-1,' points: intersections.sort(function(p1, p2) {'],[0,' return (xDir * p1.x - xDir * p2.x) || (yDir * p1.y - yDir * p2.y);'],[-1,' })'],[-1,' };'],[-1,' }'],[0,' return result;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: split'],[-1,' * Use this geometry (the source) to attempt to split a target geometry.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * target - {<OpenLayers.Geometry>} The target geometry.'],[-1,' * options - {Object} Properties of this object will be used to determine'],[-1,' * how the split is conducted.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * mutual - {Boolean} Split the source geometry in addition to the target'],[-1,' * geometry. Default is false.'],[-1,' * edge - {Boolean} Allow splitting when only edges intersect. Default is'],[-1,' * true. If false, a vertex on the source must be within the tolerance'],[-1,' * distance of the intersection to be considered a split.'],[-1,' * tolerance - {Number} If a non-null value is provided, intersections'],[-1,' * within the tolerance distance of an existing vertex on the source'],[-1,' * will be assumed to occur at the vertex.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Array} A list of geometries (of this same type as the target) that'],[-1,' * result from splitting the target with the source geometry. The'],[-1,' * source and target geometry will remain unmodified. If no split'],[-1,' * results, null will be returned. If mutual is true and a split'],[-1,' * results, return will be an array of two arrays - the first will be'],[-1,' * all geometries that result from splitting the source geometry and'],[-1,' * the second will be all geometries that result from splitting the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' split: function(target, options) {'],[0,' var results = null;'],[0,' var mutual = options && options.mutual;'],[0,' var sourceSplit, targetSplit, sourceParts, targetParts;'],[0,' if(target instanceof OpenLayers.Geometry.LineString) {'],[0,' var verts = this.getVertices();'],[0,' var vert1, vert2, seg, splits, lines, point;'],[0,' var points = [];'],[0,' sourceParts = [];'],[0,' for(var i=0, stop=verts.length-2; i<=stop; ++i) {'],[0,' vert1 = verts[i];'],[0,' vert2 = verts[i+1];'],[0,' seg = {'],[-1,' x1: vert1.x, y1: vert1.y,'],[-1,' x2: vert2.x, y2: vert2.y'],[-1,' };'],[0,' targetParts = targetParts || [target];'],[0,' if(mutual) {'],[0,' points.push(vert1.clone());'],[-1,' }'],[0,' for(var j=0; j<targetParts.length; ++j) {'],[0,' splits = targetParts[j].splitWithSegment(seg, options);'],[0,' if(splits) {'],[-1,' \/\/ splice in new features'],[0,' lines = splits.lines;'],[0,' if(lines.length > 0) {'],[0,' lines.unshift(j, 1);'],[0,' Array.prototype.splice.apply(targetParts, lines);'],[0,' j += lines.length - 2;'],[-1,' }'],[0,' if(mutual) {'],[0,' for(var k=0, len=splits.points.length; k<len; ++k) {'],[0,' point = splits.points[k];'],[0,' if(!point.equals(vert1)) {'],[0,' points.push(point);'],[0,' sourceParts.push(new OpenLayers.Geometry.LineString(points));'],[0,' if(point.equals(vert2)) {'],[0,' points = [];'],[-1,' } else {'],[0,' points = [point.clone()];'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' if(mutual && sourceParts.length > 0 && points.length > 0) {'],[0,' points.push(vert2.clone());'],[0,' sourceParts.push(new OpenLayers.Geometry.LineString(points));'],[-1,' }'],[-1,' } else {'],[0,' results = target.splitWith(this, options);'],[-1,' }'],[0,' if(targetParts && targetParts.length > 1) {'],[0,' targetSplit = true;'],[-1,' } else {'],[0,' targetParts = [];'],[-1,' }'],[0,' if(sourceParts && sourceParts.length > 1) {'],[0,' sourceSplit = true;'],[-1,' } else {'],[0,' sourceParts = [];'],[-1,' }'],[0,' if(targetSplit || sourceSplit) {'],[0,' if(mutual) {'],[0,' results = [sourceParts, targetParts];'],[-1,' } else {'],[0,' results = targetParts;'],[-1,' }'],[-1,' }'],[0,' return results;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: splitWith'],[-1,' * Split this geometry (the target) with the given geometry (the source).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} A geometry used to split this'],[-1,' * geometry (the source).'],[-1,' * options - {Object} Properties of this object will be used to determine'],[-1,' * how the split is conducted.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * mutual - {Boolean} Split the source geometry in addition to the target'],[-1,' * geometry. Default is false.'],[-1,' * edge - {Boolean} Allow splitting when only edges intersect. Default is'],[-1,' * true. If false, a vertex on the source must be within the tolerance'],[-1,' * distance of the intersection to be considered a split.'],[-1,' * tolerance - {Number} If a non-null value is provided, intersections'],[-1,' * within the tolerance distance of an existing vertex on the source'],[-1,' * will be assumed to occur at the vertex.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Array} A list of geometries (of this same type as the target) that'],[-1,' * result from splitting the target with the source geometry. The'],[-1,' * source and target geometry will remain unmodified. If no split'],[-1,' * results, null will be returned. If mutual is true and a split'],[-1,' * results, return will be an array of two arrays - the first will be'],[-1,' * all geometries that result from splitting the source geometry and'],[-1,' * the second will be all geometries that result from splitting the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' splitWith: function(geometry, options) {'],[0,' return geometry.split(this, options);'],[-1,''],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getVertices'],[-1,' * Return a list of all points in this geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * nodes - {Boolean} For lines, only return vertices that are'],[-1,' * endpoints. If false, for lines, only vertices that are not'],[-1,' * endpoints will be returned. If not provided, all vertices will'],[-1,' * be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} A list of all vertices in the geometry.'],[-1,' *\/'],[-1,' getVertices: function(nodes) {'],[0,' var vertices;'],[0,' if(nodes === true) {'],[0,' vertices = ['],[-1,' this.components[0],'],[-1,' this.components[this.components.length-1]'],[-1,' ];'],[0,' } else if (nodes === false) {'],[0,' vertices = this.components.slice(1, this.components.length-1);'],[-1,' } else {'],[0,' vertices = this.components.slice();'],[-1,' }'],[0,' return vertices;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: distanceTo'],[-1,' * Calculate the closest distance between two geometries (on the x-y plane).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} The target geometry.'],[-1,' * options - {Object} Optional properties for configuring the distance'],[-1,' * calculation.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * details - {Boolean} Return details from the distance calculation.'],[-1,' * Default is false.'],[-1,' * edge - {Boolean} Calculate the distance from this geometry to the'],[-1,' * nearest edge of the target geometry. Default is true. If true,'],[-1,' * calling distanceTo from a geometry that is wholly contained within'],[-1,' * the target will result in a non-zero distance. If false, whenever'],[-1,' * geometries intersect, calling distanceTo will return 0. If false,'],[-1,' * details cannot be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number | Object} The distance between this geometry and the target.'],[-1,' * If details is true, the return will be an object with distance,'],[-1,' * x0, y0, x1, and x2 properties. The x0 and y0 properties represent'],[-1,' * the coordinates of the closest point on this geometry. The x1 and y1'],[-1,' * properties represent the coordinates of the closest point on the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' distanceTo: function(geometry, options) {'],[0,' var edge = !(options && options.edge === false);'],[0,' var details = edge && options && options.details;'],[0,' var result, best = {};'],[0,' var min = Number.POSITIVE_INFINITY;'],[0,' if(geometry instanceof OpenLayers.Geometry.Point) {'],[0,' var segs = this.getSortedSegments();'],[0,' var x = geometry.x;'],[0,' var y = geometry.y;'],[0,' var seg;'],[0,' for(var i=0, len=segs.length; i<len; ++i) {'],[0,' seg = segs[i];'],[0,' result = OpenLayers.Geometry.distanceToSegment(geometry, seg);'],[0,' if(result.distance < min) {'],[0,' min = result.distance;'],[0,' if(details) {'],[0,' best = {'],[-1,' distance: min,'],[-1,' x0: result.x, y0: result.y,'],[-1,' x1: x, y1: y,'],[-1,' index: i,'],[-1,' indexDistance: new OpenLayers.Geometry.Point(seg.x1, seg.y1).distanceTo(geometry)'],[-1,' };'],[-1,' } else {'],[0,' best = min;'],[-1,' }'],[0,' if(min === 0) {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' } else if(geometry instanceof OpenLayers.Geometry.LineString) { '],[0,' var segs0 = this.getSortedSegments();'],[0,' var segs1 = geometry.getSortedSegments();'],[0,' var seg0, seg1, intersection, x0, y0;'],[0,' var len1 = segs1.length;'],[0,' var interOptions = {point: true};'],[0,' outer: for(var i=0, len=segs0.length; i<len; ++i) {'],[0,' seg0 = segs0[i];'],[0,' x0 = seg0.x1;'],[0,' y0 = seg0.y1;'],[0,' for(var j=0; j<len1; ++j) {'],[0,' seg1 = segs1[j];'],[0,' intersection = OpenLayers.Geometry.segmentsIntersect(seg0, seg1, interOptions);'],[0,' if(intersection) {'],[0,' min = 0;'],[0,' best = {'],[-1,' distance: 0,'],[-1,' x0: intersection.x, y0: intersection.y,'],[-1,' x1: intersection.x, y1: intersection.y'],[-1,' };'],[0,' break outer;'],[-1,' } else {'],[0,' result = OpenLayers.Geometry.distanceToSegment({x: x0, y: y0}, seg1);'],[0,' if(result.distance < min) {'],[0,' min = result.distance;'],[0,' best = {'],[-1,' distance: min,'],[-1,' x0: x0, y0: y0,'],[-1,' x1: result.x, y1: result.y'],[-1,' };'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' if(!details) {'],[0,' best = best.distance;'],[-1,' }'],[0,' if(min !== 0) {'],[-1,' \/\/ check the final vertex in this line\'s sorted segments'],[0,' if(seg0) {'],[0,' result = geometry.distanceTo('],[-1,' new OpenLayers.Geometry.Point(seg0.x2, seg0.y2),'],[-1,' options'],[-1,' );'],[0,' var dist = details ? result.distance : result;'],[0,' if(dist < min) {'],[0,' if(details) {'],[0,' best = {'],[-1,' distance: min,'],[-1,' x0: result.x1, y0: result.y1,'],[-1,' x1: result.x0, y1: result.y0'],[-1,' };'],[-1,' } else {'],[0,' best = dist;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' } else {'],[0,' best = geometry.distanceTo(this, options);'],[-1,' \/\/ swap since target comes from this line'],[0,' if(details) {'],[0,' best = {'],[-1,' distance: best.distance,'],[-1,' x0: best.x1, y0: best.y1,'],[-1,' x1: best.x0, y1: best.y0'],[-1,' };'],[-1,' }'],[-1,' }'],[0,' return best;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: simplify'],[-1,' * This function will return a simplified LineString.'],[-1,' * Simplification is based on the Douglas-Peucker algorithm.'],[-1,' *'],[-1,' *'],[-1,' * Parameters:'],[-1,' * tolerance - {number} threshold for simplification in map units'],[-1,' *'],[-1,' * Returns:'],[-1,' * {OpenLayers.Geometry.LineString} the simplified LineString'],[-1,' *\/'],[-1,' simplify: function(tolerance){'],[0,' if (this && this !== null) {'],[0,' var points = this.getVertices();'],[0,' if (points.length < 3) {'],[0,' return this;'],[-1,' }'],[-1,' '],[0,' var compareNumbers = function(a, b){'],[0,' return (a-b);'],[-1,' };'],[-1,' '],[-1,' \/**'],[-1,' * Private function doing the Douglas-Peucker reduction'],[-1,' *\/'],[0,' var douglasPeuckerReduction = function(points, firstPoint, lastPoint, tolerance){'],[0,' var maxDistance = 0;'],[0,' var indexFarthest = 0;'],[-1,' '],[0,' for (var index = firstPoint, distance; index < lastPoint; index++) {'],[0,' distance = perpendicularDistance(points[firstPoint], points[lastPoint], points[index]);'],[0,' if (distance > maxDistance) {'],[0,' maxDistance = distance;'],[0,' indexFarthest = index;'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if (maxDistance > tolerance && indexFarthest != firstPoint) {'],[-1,' \/\/Add the largest point that exceeds the tolerance'],[0,' pointIndexsToKeep.push(indexFarthest);'],[0,' douglasPeuckerReduction(points, firstPoint, indexFarthest, tolerance);'],[0,' douglasPeuckerReduction(points, indexFarthest, lastPoint, tolerance);'],[-1,' }'],[-1,' };'],[-1,' '],[-1,' \/**'],[-1,' * Private function calculating the perpendicular distance'],[-1,' * TODO: check whether OpenLayers.Geometry.LineString::distanceTo() is faster or slower'],[-1,' *\/'],[0,' var perpendicularDistance = function(point1, point2, point){'],[-1,' \/\/Area = |(1\/2)(x1y2 + x2y3 + x3y1 - x2y1 - x3y2 - x1y3)| *Area of triangle'],[-1,' \/\/Base = v((x1-x2)\u00B2+(x1-x2)\u00B2) *Base of Triangle*'],[-1,' \/\/Area = .5*Base*H *Solve for height'],[-1,' \/\/Height = Area\/.5\/Base'],[-1,' '],[0,' 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));'],[0,' var bottom = Math.sqrt(Math.pow(point1.x - point2.x, 2) + Math.pow(point1.y - point2.y, 2));'],[0,' var height = area \/ bottom * 2;'],[-1,' '],[0,' return height;'],[-1,' };'],[-1,' '],[0,' var firstPoint = 0;'],[0,' var lastPoint = points.length - 1;'],[0,' var pointIndexsToKeep = [];'],[-1,' '],[-1,' \/\/Add the first and last index to the keepers'],[0,' pointIndexsToKeep.push(firstPoint);'],[0,' pointIndexsToKeep.push(lastPoint);'],[-1,' '],[-1,' \/\/The first and the last point cannot be the same'],[0,' while (points[firstPoint].equals(points[lastPoint])) {'],[0,' lastPoint--;'],[-1,' \/\/Addition: the first point not equal to first point in the LineString is kept as well'],[0,' pointIndexsToKeep.push(lastPoint);'],[-1,' }'],[-1,' '],[0,' douglasPeuckerReduction(points, firstPoint, lastPoint, tolerance);'],[0,' var returnPoints = [];'],[0,' pointIndexsToKeep.sort(compareNumbers);'],[0,' for (var index = 0; index < pointIndexsToKeep.length; index++) {'],[0,' returnPoints.push(points[pointIndexsToKeep[index]]);'],[-1,' }'],[0,' return new OpenLayers.Geometry.LineString(returnPoints);'],[-1,' '],[-1,' }'],[-1,' else {'],[0,' return this;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.LineString\"'],[-1,'});'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * Function: OpenLayers.Geometry.LineString.geodesic'],[-1,' *'],[-1,' * Parameters:'],[-1,' * interpolate - {function(number): OpenLayers.Geometry.Point} Interpolate'],[-1,' * function.'],[-1,' * transform - {function(OpenLayers.Geometry.Point): OpenLayers.Geometry.Point}'],[-1,' * Transform from longitude\/latitude to projected coordinates.'],[-1,' * squaredTolerance - {number} Squared tolerance.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {OpenLayers.Geometry.LineString}'],[-1,' *\/'],[1,'OpenLayers.Geometry.LineString.geodesic ='],[-1,' function(interpolate, transform, squaredTolerance) {'],[-1,' \/\/ FIXME reduce garbage generation'],[-1,' \/\/ FIXME optimize stack operations'],[-1,''],[0,' var components = [];'],[-1,''],[0,' var geoA = interpolate(0);'],[0,' var geoB = interpolate(1);'],[-1,''],[0,' var a = transform(geoA);'],[0,' var b = transform(geoB);'],[-1,''],[0,' var geoStack = [geoB, geoA];'],[0,' var stack = [b, a];'],[0,' var fractionStack = [1, 0];'],[-1,''],[0,' var fractions = {};'],[-1,''],[0,' var maxIterations = 1e5;'],[0,' var geoM, m, fracA, fracB, fracM, key;'],[-1,''],[0,' while (--maxIterations > 0 && fractionStack.length > 0) {'],[-1,' \/\/ Pop the a coordinate off the stack'],[0,' fracA = fractionStack.pop();'],[0,' geoA = geoStack.pop();'],[0,' a = stack.pop();'],[-1,' \/\/ Add the a coordinate if it has not been added yet'],[0,' key = fracA.toString();'],[0,' if (!(key in fractions)) {'],[0,' components.push(a);'],[0,' fractions[key] = true;'],[-1,' }'],[-1,' \/\/ Pop the b coordinate off the stack'],[0,' fracB = fractionStack.pop();'],[0,' geoB = geoStack.pop();'],[0,' b = stack.pop();'],[-1,' \/\/ Find the m point between the a and b coordinates'],[0,' fracM = (fracA + fracB) \/ 2;'],[0,' geoM = interpolate(fracM);'],[0,' m = transform(geoM);'],[0,' if (OpenLayers.Geometry.distanceSquaredToSegment(m, {x1: a.x, y1: a.y,'],[-1,' x2: b.x, y2: b.y}).distance < squaredTolerance) {'],[-1,' \/\/ If the m point is sufficiently close to the straight line, then'],[-1,' \/\/ we discard it. Just use the b coordinate and move on to the next'],[-1,' \/\/ line segment.'],[0,' components.push(b);'],[0,' key = fracB.toString();'],[0,' fractions[key] = true;'],[-1,' } else {'],[-1,' \/\/ Otherwise, we need to subdivide the current line segment.'],[-1,' \/\/ Split it into two and push the two line segments onto the stack.'],[0,' fractionStack.push(fracB, fracM, fracM, fracA);'],[0,' stack.push(b, m, m, a);'],[0,' geoStack.push(geoB, geoM, geoM, geoA);'],[-1,' }'],[-1,' }'],[-1,''],[0,' return new OpenLayers.Geometry.LineString(components);'],[-1,'};'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * Function: OpenLayers.Geometry.LineString.geodesicMeridian'],[-1,' * Generate a meridian (line at constant longitude).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * lon - {number} Longitude.'],[-1,' * lat1 - {number} Latitude 1.'],[-1,' * lat2 - {number} Latitude 2.'],[-1,' * projection - {OpenLayers.Projection} Projection.'],[-1,' * squaredTolerance - {number} Squared tolerance.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {OpenLayers.Geometry.LineString} Line geometry for the meridian at <lon>.'],[-1,' *\/'],[1,'OpenLayers.Geometry.LineString.geodesicMeridian ='],[-1,' function(lon, lat1, lat2, projection, squaredTolerance) {'],[0,' var epsg4326Projection = new OpenLayers.Projection(\'EPSG:4326\');'],[0,' return OpenLayers.Geometry.LineString.geodesic('],[-1,' function(frac) {'],[0,' return new OpenLayers.Geometry.Point('],[-1,' lon, lat1 + ((lat2 - lat1) * frac));'],[-1,' },'],[-1,' function(point) {'],[0,' return point.transform(epsg4326Projection, projection);'],[-1,' },'],[-1,' squaredTolerance'],[-1,' );'],[-1,'};'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * Function: OpenLayers.Geometry.LineString.geodesicParallel'],[-1,' * Generate a parallel (line at constant latitude).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * lat - {number} Latitude.'],[-1,' * lon1 - {number} Longitude 1.'],[-1,' * lon2 - {number} Longitude 2.'],[-1,' * projection {OpenLayers.Projection} Projection.'],[-1,' * squaredTolerance - {number} Squared tolerance.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {OpenLayers.Geometry.LineString} Line geometry for the parallel at <lat>.'],[-1,' *\/'],[1,'OpenLayers.Geometry.LineString.geodesicParallel ='],[-1,' function(lat, lon1, lon2, projection, squaredTolerance) {'],[0,' var epsg4326Projection = new OpenLayers.Projection(\'EPSG:4326\');'],[0,' return OpenLayers.Geometry.LineString.geodesic('],[-1,' function(frac) {'],[0,' return new OpenLayers.Geometry.Point('],[-1,' lon1 + ((lon2 - lon1) * frac), lat);'],[-1,' },'],[-1,' function(point) {'],[0,' return point.transform(epsg4326Projection, projection);'],[-1,' },'],[-1,' squaredTolerance'],[-1,' );'],[-1,'};'],[-1,''],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/LinearRing.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry\/LineString.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.LinearRing'],[-1,' * '],[-1,' * A Linear Ring is a special LineString which is closed. It closes itself '],[-1,' * automatically on every addPoint\/removePoint by adding a copy of the first'],[-1,' * point as the last point. '],[-1,' * '],[-1,' * Also, as it is the first in the line family to close itself, a getArea()'],[-1,' * function is defined to calculate the enclosed area of the linearRing'],[-1,' * '],[-1,' * Inherits:'],[-1,' * - <OpenLayers.Geometry.LineString>'],[-1,' *\/'],[1,'OpenLayers.Geometry.LinearRing = OpenLayers.Class('],[-1,' OpenLayers.Geometry.LineString, {'],[-1,''],[-1,' \/**'],[-1,' * Property: componentTypes'],[-1,' * {Array(String)} An array of class names representing the types of '],[-1,' * components that the collection can include. A null '],[-1,' * value means the component types are not restricted.'],[-1,' *\/'],[-1,' componentTypes: [\"OpenLayers.Geometry.Point\"],'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.LinearRing'],[-1,' * Linear rings are constructed with an array of points. This array'],[-1,' * can represent a closed or open ring. If the ring is open (the last'],[-1,' * point does not equal the first point), the constructor will close'],[-1,' * the ring. If the ring is already closed (the last point does equal'],[-1,' * the first point), it will be left closed.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * points - {Array(<OpenLayers.Geometry.Point>)} points'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addComponent'],[-1,' * Adds a point to geometry components. If the point is to be added to'],[-1,' * the end of the components array and it is the same as the last point'],[-1,' * already in that array, the duplicate point is not added. This has '],[-1,' * the effect of closing the ring if it is not already closed, and '],[-1,' * doing the right thing if it is already closed. This behavior can '],[-1,' * be overridden by calling the method with a non-null index as the '],[-1,' * second argument.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * point - {<OpenLayers.Geometry.Point>}'],[-1,' * index - {Integer} Index into the array to insert the component'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Was the Point successfully added?'],[-1,' *\/'],[-1,' addComponent: function(point, index) {'],[0,' var added = false;'],[-1,''],[-1,' \/\/remove last point'],[0,' var lastPoint = this.components.pop();'],[-1,''],[-1,' \/\/ given an index, add the point'],[-1,' \/\/ without an index only add non-duplicate points'],[0,' if(index != null || !point.equals(lastPoint)) {'],[0,' added = OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, '],[-1,' arguments);'],[-1,' }'],[-1,''],[-1,' \/\/append copy of first point'],[0,' var firstPoint = this.components[0];'],[0,' OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, '],[-1,' [firstPoint]);'],[-1,' '],[0,' return added;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: removeComponent'],[-1,' * Removes a point from geometry components.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * point - {<OpenLayers.Geometry.Point>}'],[-1,' *'],[-1,' * Returns: '],[-1,' * {Boolean} The component was removed.'],[-1,' *\/'],[-1,' removeComponent: function(point) {'],[0,' var removed = this.components && (this.components.length > 3);'],[0,' if (removed) {'],[-1,' \/\/remove last point'],[0,' this.components.pop();'],[-1,' '],[-1,' \/\/remove our point'],[0,' OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, '],[-1,' arguments);'],[-1,' \/\/append copy of first point'],[0,' var firstPoint = this.components[0];'],[0,' OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, '],[-1,' [firstPoint]);'],[-1,' }'],[0,' return removed;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: move'],[-1,' * Moves a geometry by the given displacement along positive x and y axes.'],[-1,' * This modifies the position of the geometry and clears the cached'],[-1,' * bounds.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Float} Distance to move geometry in positive x direction. '],[-1,' * y - {Float} Distance to move geometry in positive y direction.'],[-1,' *\/'],[-1,' move: function(x, y) {'],[0,' for(var i = 0, len=this.components.length; i<len - 1; i++) {'],[0,' this.components[i].move(x, y);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: rotate'],[-1,' * Rotate a geometry around some origin'],[-1,' *'],[-1,' * Parameters:'],[-1,' * angle - {Float} Rotation angle in degrees (measured counterclockwise'],[-1,' * from the positive x-axis)'],[-1,' * origin - {<OpenLayers.Geometry.Point>} Center point for the rotation'],[-1,' *\/'],[-1,' rotate: function(angle, origin) {'],[0,' for(var i=0, len=this.components.length; i<len - 1; ++i) {'],[0,' this.components[i].rotate(angle, origin);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: resize'],[-1,' * Resize a geometry relative to some origin. Use this method to apply'],[-1,' * a uniform scaling to a geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * scale - {Float} Factor by which to scale the geometry. A scale of 2'],[-1,' * doubles the size of the geometry in each dimension'],[-1,' * (lines, for example, will be twice as long, and polygons'],[-1,' * will have four times the area).'],[-1,' * origin - {<OpenLayers.Geometry.Point>} Point of origin for resizing'],[-1,' * ratio - {Float} Optional x:y ratio for resizing. Default ratio is 1.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry>} - The current geometry. '],[-1,' *\/'],[-1,' resize: function(scale, origin, ratio) {'],[0,' for(var i=0, len=this.components.length; i<len - 1; ++i) {'],[0,' this.components[i].resize(scale, origin, ratio);'],[-1,' }'],[0,' return this;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: transform'],[-1,' * Reproject the components geometry from source to dest.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * source - {<OpenLayers.Projection>}'],[-1,' * dest - {<OpenLayers.Projection>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry>} '],[-1,' *\/'],[-1,' transform: function(source, dest) {'],[0,' if (source && dest) {'],[0,' for (var i=0, len=this.components.length; i<len - 1; i++) {'],[0,' var component = this.components[i];'],[0,' component.transform(source, dest);'],[-1,' }'],[0,' this.bounds = null;'],[-1,' }'],[0,' return this;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getCentroid'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Point>} The centroid of the collection'],[-1,' *\/'],[-1,' getCentroid: function() {'],[0,' if (this.components) {'],[0,' var len = this.components.length;'],[0,' if (len > 0 && len <= 2) {'],[0,' return this.components[0].clone();'],[0,' } else if (len > 2) {'],[0,' var sumX = 0.0;'],[0,' var sumY = 0.0;'],[0,' var x0 = this.components[0].x;'],[0,' var y0 = this.components[0].y;'],[0,' var area = -1 * this.getArea();'],[0,' if (area != 0) {'],[0,' for (var i = 0; i < len - 1; i++) {'],[0,' var b = this.components[i];'],[0,' var c = this.components[i+1];'],[0,' sumX += (b.x + c.x - 2 * x0) * ((b.x - x0) * (c.y - y0) - (c.x - x0) * (b.y - y0));'],[0,' sumY += (b.y + c.y - 2 * y0) * ((b.x - x0) * (c.y - y0) - (c.x - x0) * (b.y - y0));'],[-1,' }'],[0,' var x = x0 + sumX \/ (6 * area);'],[0,' var y = y0 + sumY \/ (6 * area);'],[-1,' } else {'],[0,' for (var i = 0; i < len - 1; i++) {'],[0,' sumX += this.components[i].x;'],[0,' sumY += this.components[i].y;'],[-1,' }'],[0,' var x = sumX \/ (len - 1);'],[0,' var y = sumY \/ (len - 1);'],[-1,' }'],[0,' return new OpenLayers.Geometry.Point(x, y);'],[-1,' } else {'],[0,' return null;'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getArea'],[-1,' * Note - The area is positive if the ring is oriented CW, otherwise'],[-1,' * it will be negative.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The signed area for a ring.'],[-1,' *\/'],[-1,' getArea: function() {'],[0,' var area = 0.0;'],[0,' if ( this.components && (this.components.length > 2)) {'],[0,' var sum = 0.0;'],[0,' for (var i=0, len=this.components.length; i<len - 1; i++) {'],[0,' var b = this.components[i];'],[0,' var c = this.components[i+1];'],[0,' sum += (b.x + c.x) * (c.y - b.y);'],[-1,' }'],[0,' area = - sum \/ 2.0;'],[-1,' }'],[0,' return area;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getGeodesicArea'],[-1,' * Calculate the approximate area of the polygon were it projected onto'],[-1,' * the earth. Note that this area will be positive if ring is oriented'],[-1,' * clockwise, otherwise it will be negative.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * projection - {<OpenLayers.Projection>} The spatial reference system'],[-1,' * for the geometry coordinates. If not provided, Geographic\/WGS84 is'],[-1,' * assumed.'],[-1,' * '],[-1,' * Reference:'],[-1,' * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for'],[-1,' * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion'],[-1,' * Laboratory, Pasadena, CA, June 2007 http:\/\/trs-new.jpl.nasa.gov\/dspace\/handle\/2014\/40409'],[-1,' *'],[-1,' * Returns:'],[-1,' * {float} The approximate signed geodesic area of the polygon in square'],[-1,' * meters.'],[-1,' *\/'],[-1,' getGeodesicArea: function(projection) {'],[0,' var ring = this; \/\/ so we can work with a clone if needed'],[0,' if(projection) {'],[0,' var gg = new OpenLayers.Projection(\"EPSG:4326\");'],[0,' if(!gg.equals(projection)) {'],[0,' ring = this.clone().transform(projection, gg);'],[-1,' }'],[-1,' }'],[0,' var area = 0.0;'],[0,' var len = ring.components && ring.components.length;'],[0,' if(len > 2) {'],[0,' var p1, p2;'],[0,' for(var i=0; i<len-1; i++) {'],[0,' p1 = ring.components[i];'],[0,' p2 = ring.components[i+1];'],[0,' area += OpenLayers.Util.rad(p2.x - p1.x) *'],[-1,' (2 + Math.sin(OpenLayers.Util.rad(p1.y)) +'],[-1,' Math.sin(OpenLayers.Util.rad(p2.y)));'],[-1,' }'],[0,' area = area * OpenLayers.Util.VincentyConstants.a * OpenLayers.Util.VincentyConstants.a \/ 2.0;'],[-1,' }'],[0,' return area;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: containsPoint'],[-1,' * Test if a point is inside a linear ring. For the case where a point'],[-1,' * is coincident with a linear ring edge, returns 1. Otherwise,'],[-1,' * returns boolean.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * point - {<OpenLayers.Geometry.Point>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean | Number} The point is inside the linear ring. Returns 1 if'],[-1,' * the point is coincident with an edge. Returns boolean otherwise.'],[-1,' *\/'],[-1,' containsPoint: function(point) {'],[0,' var approx = OpenLayers.Number.limitSigDigs;'],[0,' var digs = 14;'],[0,' var px = approx(point.x, digs);'],[0,' var py = approx(point.y, digs);'],[0,' function getX(y, x1, y1, x2, y2) {'],[0,' return (y - y2) * ((x2 - x1) \/ (y2 - y1)) + x2;'],[-1,' }'],[0,' var numSeg = this.components.length - 1;'],[0,' var start, end, x1, y1, x2, y2, cx, cy;'],[0,' var crosses = 0;'],[0,' for(var i=0; i<numSeg; ++i) {'],[0,' start = this.components[i];'],[0,' x1 = approx(start.x, digs);'],[0,' y1 = approx(start.y, digs);'],[0,' end = this.components[i + 1];'],[0,' x2 = approx(end.x, digs);'],[0,' y2 = approx(end.y, digs);'],[-1,' '],[-1,' \/**'],[-1,' * The following conditions enforce five edge-crossing rules:'],[-1,' * 1. points coincident with edges are considered contained;'],[-1,' * 2. an upward edge includes its starting endpoint, and'],[-1,' * excludes its final endpoint;'],[-1,' * 3. a downward edge excludes its starting endpoint, and'],[-1,' * includes its final endpoint;'],[-1,' * 4. horizontal edges are excluded; and'],[-1,' * 5. the edge-ray intersection point must be strictly right'],[-1,' * of the point P.'],[-1,' *\/'],[0,' if(y1 == y2) {'],[-1,' \/\/ horizontal edge'],[0,' if(py == y1) {'],[-1,' \/\/ point on horizontal line'],[0,' if(x1 <= x2 && (px >= x1 && px <= x2) || \/\/ right or vert'],[-1,' x1 >= x2 && (px <= x1 && px >= x2)) { \/\/ left or vert'],[-1,' \/\/ point on edge'],[0,' crosses = -1;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' \/\/ ignore other horizontal edges'],[0,' continue;'],[-1,' }'],[0,' cx = approx(getX(py, x1, y1, x2, y2), digs);'],[0,' if(cx == px) {'],[-1,' \/\/ point on line'],[0,' if(y1 < y2 && (py >= y1 && py <= y2) || \/\/ upward'],[-1,' y1 > y2 && (py <= y1 && py >= y2)) { \/\/ downward'],[-1,' \/\/ point on edge'],[0,' crosses = -1;'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' if(cx <= px) {'],[-1,' \/\/ no crossing to the right'],[0,' continue;'],[-1,' }'],[0,' if(x1 != x2 && (cx < Math.min(x1, x2) || cx > Math.max(x1, x2))) {'],[-1,' \/\/ no crossing'],[0,' continue;'],[-1,' }'],[0,' if(y1 < y2 && (py >= y1 && py < y2) || \/\/ upward'],[-1,' y1 > y2 && (py < y1 && py >= y2)) { \/\/ downward'],[0,' ++crosses;'],[-1,' }'],[-1,' }'],[0,' var contained = (crosses == -1) ?'],[-1,' \/\/ on edge'],[-1,' 1 :'],[-1,' \/\/ even (out) or odd (in)'],[-1,' !!(crosses & 1);'],[-1,''],[0,' return contained;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: intersects'],[-1,' * Determine if the input geometry intersects this one.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} Any type of geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The input geometry intersects this one.'],[-1,' *\/'],[-1,' intersects: function(geometry) {'],[0,' var intersect = false;'],[0,' if(geometry.CLASS_NAME == \"OpenLayers.Geometry.Point\") {'],[0,' intersect = this.containsPoint(geometry);'],[0,' } else if(geometry.CLASS_NAME == \"OpenLayers.Geometry.LineString\") {'],[0,' intersect = geometry.intersects(this);'],[0,' } else if(geometry.CLASS_NAME == \"OpenLayers.Geometry.LinearRing\") {'],[0,' intersect = OpenLayers.Geometry.LineString.prototype.intersects.apply('],[-1,' this, [geometry]'],[-1,' );'],[-1,' } else {'],[-1,' \/\/ check for component intersections'],[0,' for(var i=0, len=geometry.components.length; i<len; ++ i) {'],[0,' intersect = geometry.components[i].intersects(this);'],[0,' if(intersect) {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return intersect;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getVertices'],[-1,' * Return a list of all points in this geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * nodes - {Boolean} For lines, only return vertices that are'],[-1,' * endpoints. If false, for lines, only vertices that are not'],[-1,' * endpoints will be returned. If not provided, all vertices will'],[-1,' * be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} A list of all vertices in the geometry.'],[-1,' *\/'],[-1,' getVertices: function(nodes) {'],[0,' return (nodes === true) ? [] : this.components.slice(0, this.components.length-1);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.LinearRing\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/Polygon.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry\/Collection.js'],[-1,' * @requires OpenLayers\/Geometry\/LinearRing.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.Polygon '],[-1,' * Polygon is a collection of Geometry.LinearRings. '],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Geometry.Collection> '],[-1,' * - <OpenLayers.Geometry> '],[-1,' *\/'],[1,'OpenLayers.Geometry.Polygon = OpenLayers.Class('],[-1,' OpenLayers.Geometry.Collection, {'],[-1,''],[-1,' \/**'],[-1,' * Property: componentTypes'],[-1,' * {Array(String)} An array of class names representing the types of'],[-1,' * components that the collection can include. A null value means the'],[-1,' * component types are not restricted.'],[-1,' *\/'],[-1,' componentTypes: [\"OpenLayers.Geometry.LinearRing\"],'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.Polygon'],[-1,' * Constructor for a Polygon geometry. '],[-1,' * The first ring (this.component[0])is the outer bounds of the polygon and '],[-1,' * all subsequent rings (this.component[1-n]) are internal holes.'],[-1,' *'],[-1,' *'],[-1,' * Parameters:'],[-1,' * components - {Array(<OpenLayers.Geometry.LinearRing>)} '],[-1,' *\/'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: getArea'],[-1,' * Calculated by subtracting the areas of the internal holes from the '],[-1,' * area of the outer hole.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {float} The area of the geometry'],[-1,' *\/'],[-1,' getArea: function() {'],[0,' var area = 0.0;'],[0,' if ( this.components && (this.components.length > 0)) {'],[0,' area += Math.abs(this.components[0].getArea());'],[0,' for (var i=1, len=this.components.length; i<len; i++) {'],[0,' area -= Math.abs(this.components[i].getArea());'],[-1,' }'],[-1,' }'],[0,' return area;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: getGeodesicArea'],[-1,' * Calculate the approximate area of the polygon were it projected onto'],[-1,' * the earth.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * projection - {<OpenLayers.Projection>} The spatial reference system'],[-1,' * for the geometry coordinates. If not provided, Geographic\/WGS84 is'],[-1,' * assumed.'],[-1,' * '],[-1,' * Reference:'],[-1,' * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for'],[-1,' * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion'],[-1,' * Laboratory, Pasadena, CA, June 2007 http:\/\/trs-new.jpl.nasa.gov\/dspace\/handle\/2014\/40409'],[-1,' *'],[-1,' * Returns:'],[-1,' * {float} The approximate geodesic area of the polygon in square meters.'],[-1,' *\/'],[-1,' getGeodesicArea: function(projection) {'],[0,' var area = 0.0;'],[0,' if(this.components && (this.components.length > 0)) {'],[0,' area += Math.abs(this.components[0].getGeodesicArea(projection));'],[0,' for(var i=1, len=this.components.length; i<len; i++) {'],[0,' area -= Math.abs(this.components[i].getGeodesicArea(projection));'],[-1,' }'],[-1,' }'],[0,' return area;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: containsPoint'],[-1,' * Test if a point is inside a polygon. Points on a polygon edge are'],[-1,' * considered inside.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * point - {<OpenLayers.Geometry.Point>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean | Number} The point is inside the polygon. Returns 1 if the'],[-1,' * point is on an edge. Returns boolean otherwise.'],[-1,' *\/'],[-1,' containsPoint: function(point) {'],[0,' var numRings = this.components.length;'],[0,' var contained = false;'],[0,' if(numRings > 0) {'],[-1,' \/\/ check exterior ring - 1 means on edge, boolean otherwise'],[0,' contained = this.components[0].containsPoint(point);'],[0,' if(contained !== 1) {'],[0,' if(contained && numRings > 1) {'],[-1,' \/\/ check interior rings'],[0,' var hole;'],[0,' for(var i=1; i<numRings; ++i) {'],[0,' hole = this.components[i].containsPoint(point);'],[0,' if(hole) {'],[0,' if(hole === 1) {'],[-1,' \/\/ on edge'],[0,' contained = 1;'],[-1,' } else {'],[-1,' \/\/ in hole'],[0,' contained = false;'],[-1,' } '],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return contained;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: intersects'],[-1,' * Determine if the input geometry intersects this one.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} Any type of geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The input geometry intersects this one.'],[-1,' *\/'],[-1,' intersects: function(geometry) {'],[0,' var intersect = false;'],[0,' var i, len;'],[0,' if(geometry.CLASS_NAME == \"OpenLayers.Geometry.Point\") {'],[0,' intersect = this.containsPoint(geometry);'],[0,' } else if(geometry.CLASS_NAME == \"OpenLayers.Geometry.LineString\" ||'],[-1,' geometry.CLASS_NAME == \"OpenLayers.Geometry.LinearRing\") {'],[-1,' \/\/ check if rings\/linestrings intersect'],[0,' for(i=0, len=this.components.length; i<len; ++i) {'],[0,' intersect = geometry.intersects(this.components[i]);'],[0,' if(intersect) {'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' if(!intersect) {'],[-1,' \/\/ check if this poly contains points of the ring\/linestring'],[0,' for(i=0, len=geometry.components.length; i<len; ++i) {'],[0,' intersect = this.containsPoint(geometry.components[i]);'],[0,' if(intersect) {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' } else {'],[0,' for(i=0, len=geometry.components.length; i<len; ++ i) {'],[0,' intersect = this.intersects(geometry.components[i]);'],[0,' if(intersect) {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' \/\/ check case where this poly is wholly contained by another'],[0,' if(!intersect && geometry.CLASS_NAME == \"OpenLayers.Geometry.Polygon\") {'],[-1,' \/\/ exterior ring points will be contained in the other geometry'],[0,' var ring = this.components[0];'],[0,' for(i=0, len=ring.components.length; i<len; ++i) {'],[0,' intersect = geometry.containsPoint(ring.components[i]);'],[0,' if(intersect) {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return intersect;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: distanceTo'],[-1,' * Calculate the closest distance between two geometries (on the x-y plane).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} The target geometry.'],[-1,' * options - {Object} Optional properties for configuring the distance'],[-1,' * calculation.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * details - {Boolean} Return details from the distance calculation.'],[-1,' * Default is false.'],[-1,' * edge - {Boolean} Calculate the distance from this geometry to the'],[-1,' * nearest edge of the target geometry. Default is true. If true,'],[-1,' * calling distanceTo from a geometry that is wholly contained within'],[-1,' * the target will result in a non-zero distance. If false, whenever'],[-1,' * geometries intersect, calling distanceTo will return 0. If false,'],[-1,' * details cannot be returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number | Object} The distance between this geometry and the target.'],[-1,' * If details is true, the return will be an object with distance,'],[-1,' * x0, y0, x1, and y1 properties. The x0 and y0 properties represent'],[-1,' * the coordinates of the closest point on this geometry. The x1 and y1'],[-1,' * properties represent the coordinates of the closest point on the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' distanceTo: function(geometry, options) {'],[0,' var edge = !(options && options.edge === false);'],[0,' var result;'],[-1,' \/\/ this is the case where we might not be looking for distance to edge'],[0,' if(!edge && this.intersects(geometry)) {'],[0,' result = 0;'],[-1,' } else {'],[0,' result = OpenLayers.Geometry.Collection.prototype.distanceTo.apply('],[-1,' this, [geometry, options]'],[-1,' );'],[-1,' }'],[0,' return result;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.Polygon\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * APIMethod: createRegularPolygon'],[-1,' * Create a regular polygon around a radius. Useful for creating circles '],[-1,' * and the like.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * origin - {<OpenLayers.Geometry.Point>} center of polygon.'],[-1,' * radius - {Float} distance to vertex, in map units.'],[-1,' * sides - {Integer} Number of sides. 20 approximates a circle.'],[-1,' * rotation - {Float} original angle of rotation, in degrees.'],[-1,' *\/'],[1,'OpenLayers.Geometry.Polygon.createRegularPolygon = function(origin, radius, sides, rotation) { '],[0,' var angle = Math.PI * ((1\/sides) - (1\/2));'],[0,' if(rotation) {'],[0,' angle += (rotation \/ 180) * Math.PI;'],[-1,' }'],[0,' var rotatedAngle, x, y;'],[0,' var points = [];'],[0,' for(var i=0; i<sides; ++i) {'],[0,' rotatedAngle = angle + (i * 2 * Math.PI \/ sides);'],[0,' x = origin.x + (radius * Math.cos(rotatedAngle));'],[0,' y = origin.y + (radius * Math.sin(rotatedAngle));'],[0,' points.push(new OpenLayers.Geometry.Point(x, y));'],[-1,' }'],[0,' var ring = new OpenLayers.Geometry.LinearRing(points);'],[0,' return new OpenLayers.Geometry.Polygon([ring]);'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Events.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Event'],[-1,' * Utility functions for event handling.'],[-1,' *\/'],[1,'OpenLayers.Event = {'],[-1,''],[-1,' \/** '],[-1,' * Property: observers '],[-1,' * {Object} A hashtable cache of the event observers. Keyed by'],[-1,' * element._eventCacheID '],[-1,' *\/'],[-1,' observers: false,'],[-1,''],[-1,' \/**'],[-1,' * Constant: KEY_SPACE'],[-1,' * {int}'],[-1,' *\/'],[-1,' KEY_SPACE: 32,'],[-1,' '],[-1,' \/** '],[-1,' * Constant: KEY_BACKSPACE '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_BACKSPACE: 8,'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_TAB '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_TAB: 9,'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_RETURN '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_RETURN: 13,'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_ESC '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_ESC: 27,'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_LEFT '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_LEFT: 37,'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_UP '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_UP: 38,'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_RIGHT '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_RIGHT: 39,'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_DOWN '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_DOWN: 40,'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_DELETE '],[-1,' * {int} '],[-1,' *\/'],[-1,' KEY_DELETE: 46,'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * Method: element'],[-1,' * Cross browser event element detection.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * event - {Event} '],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} The element that caused the event '],[-1,' *\/'],[-1,' element: function(event) {'],[0,' return event.target || event.srcElement;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: isSingleTouch'],[-1,' * Determine whether event was caused by a single touch'],[-1,' *'],[-1,' * Parameters:'],[-1,' * event - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' isSingleTouch: function(event) {'],[0,' return event.touches && event.touches.length == 1;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: isMultiTouch'],[-1,' * Determine whether event was caused by a multi touch'],[-1,' *'],[-1,' * Parameters:'],[-1,' * event - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' isMultiTouch: function(event) {'],[0,' return event.touches && event.touches.length > 1;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: isLeftClick'],[-1,' * Determine whether event was caused by a left click. '],[-1,' *'],[-1,' * Parameters:'],[-1,' * event - {Event} '],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' isLeftClick: function(event) {'],[0,' return (((event.which) && (event.which == 1)) ||'],[-1,' ((event.button) && (event.button == 1)));'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: isRightClick'],[-1,' * Determine whether event was caused by a right mouse click. '],[-1,' *'],[-1,' * Parameters:'],[-1,' * event - {Event} '],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' isRightClick: function(event) {'],[0,' return (((event.which) && (event.which == 3)) ||'],[-1,' ((event.button) && (event.button == 2)));'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: stop'],[-1,' * Stops an event from propagating. '],[-1,' *'],[-1,' * Parameters: '],[-1,' * event - {Event} '],[-1,' * allowDefault - {Boolean} If true, we stop the event chain but '],[-1,' * still allow the default browser behaviour (text selection,'],[-1,' * radio-button clicking, etc). Default is false.'],[-1,' *\/'],[-1,' stop: function(event, allowDefault) {'],[-1,' '],[0,' if (!allowDefault) { '],[0,' OpenLayers.Event.preventDefault(event);'],[-1,' }'],[-1,' '],[0,' if (event.stopPropagation) {'],[0,' event.stopPropagation();'],[-1,' } else {'],[0,' event.cancelBubble = true;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: preventDefault'],[-1,' * Cancels the event if it is cancelable, without stopping further'],[-1,' * propagation of the event.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * event - {Event}'],[-1,' *\/'],[-1,' preventDefault: function(event) {'],[0,' if (event.preventDefault) {'],[0,' event.preventDefault();'],[-1,' } else {'],[0,' event.returnValue = false;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: findElement'],[-1,' * '],[-1,' * Parameters:'],[-1,' * event - {Event} '],[-1,' * tagName - {String} '],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} The first node with the given tagName, starting from the'],[-1,' * node the event was triggered on and traversing the DOM upwards'],[-1,' *\/'],[-1,' findElement: function(event, tagName) {'],[0,' var element = OpenLayers.Event.element(event);'],[0,' while (element.parentNode && (!element.tagName ||'],[-1,' (element.tagName.toUpperCase() != tagName.toUpperCase()))){'],[0,' element = element.parentNode;'],[-1,' }'],[0,' return element;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: observe'],[-1,' * '],[-1,' * Parameters:'],[-1,' * elementParam - {DOMElement || String} '],[-1,' * name - {String} '],[-1,' * observer - {function} '],[-1,' * useCapture - {Boolean} '],[-1,' *\/'],[-1,' observe: function(elementParam, name, observer, useCapture) {'],[1,' var element = OpenLayers.Util.getElement(elementParam);'],[1,' useCapture = useCapture || false;'],[-1,''],[1,' if (name == \'keypress\' &&'],[-1,' (navigator.appVersion.match(\/Konqueror|Safari|KHTML\/)'],[-1,' || element.attachEvent)) {'],[0,' name = \'keydown\';'],[-1,' }'],[-1,''],[-1,' \/\/if observers cache has not yet been created, create it'],[1,' if (!this.observers) {'],[1,' this.observers = {};'],[-1,' }'],[-1,''],[-1,' \/\/if not already assigned, make a new unique cache ID'],[1,' if (!element._eventCacheID) {'],[1,' var idPrefix = \"eventCacheID_\";'],[1,' if (element.id) {'],[0,' idPrefix = element.id + \"_\" + idPrefix;'],[-1,' }'],[1,' element._eventCacheID = OpenLayers.Util.createUniqueID(idPrefix);'],[-1,' }'],[-1,''],[1,' var cacheID = element._eventCacheID;'],[-1,''],[-1,' \/\/if there is not yet a hash entry for this element, add one'],[1,' if (!this.observers[cacheID]) {'],[1,' this.observers[cacheID] = [];'],[-1,' }'],[-1,''],[-1,' \/\/add a new observer to this element\'s list'],[1,' this.observers[cacheID].push({'],[-1,' \'element\': element,'],[-1,' \'name\': name,'],[-1,' \'observer\': observer,'],[-1,' \'useCapture\': useCapture'],[-1,' });'],[-1,''],[-1,' \/\/add the actual browser event listener'],[1,' if (element.addEventListener) {'],[1,' element.addEventListener(name, observer, useCapture);'],[0,' } else if (element.attachEvent) {'],[0,' element.attachEvent(\'on\' + name, observer);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: stopObservingElement'],[-1,' * Given the id of an element to stop observing, cycle through the '],[-1,' * element\'s cached observers, calling stopObserving on each one, '],[-1,' * skipping those entries which can no longer be removed.'],[-1,' * '],[-1,' * parameters:'],[-1,' * elementParam - {DOMElement || String} '],[-1,' *\/'],[-1,' stopObservingElement: function(elementParam) {'],[0,' var element = OpenLayers.Util.getElement(elementParam);'],[0,' var cacheID = element._eventCacheID;'],[-1,''],[0,' this._removeElementObservers(OpenLayers.Event.observers[cacheID]);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: _removeElementObservers'],[-1,' *'],[-1,' * Parameters:'],[-1,' * elementObservers - {Array(Object)} Array of (element, name, '],[-1,' * observer, usecapture) objects, '],[-1,' * taken directly from hashtable'],[-1,' *\/'],[-1,' _removeElementObservers: function(elementObservers) {'],[0,' if (elementObservers) {'],[0,' for(var i = elementObservers.length-1; i >= 0; i--) {'],[0,' var entry = elementObservers[i];'],[0,' OpenLayers.Event.stopObserving.apply(this, ['],[-1,' entry.element, entry.name, entry.observer, entry.useCapture'],[-1,' ]);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: stopObserving'],[-1,' * '],[-1,' * Parameters:'],[-1,' * elementParam - {DOMElement || String} '],[-1,' * name - {String} '],[-1,' * observer - {function} '],[-1,' * useCapture - {Boolean} '],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the event observer was removed'],[-1,' *\/'],[-1,' stopObserving: function(elementParam, name, observer, useCapture) {'],[0,' useCapture = useCapture || false;'],[-1,' '],[0,' var element = OpenLayers.Util.getElement(elementParam);'],[0,' var cacheID = element._eventCacheID;'],[-1,''],[0,' if (name == \'keypress\') {'],[0,' if ( navigator.appVersion.match(\/Konqueror|Safari|KHTML\/) || '],[-1,' element.detachEvent) {'],[0,' name = \'keydown\';'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ find element\'s entry in this.observers cache and remove it'],[0,' var foundEntry = false;'],[0,' var elementObservers = OpenLayers.Event.observers[cacheID];'],[0,' if (elementObservers) {'],[-1,' '],[-1,' \/\/ find the specific event type in the element\'s list'],[0,' var i=0;'],[0,' while(!foundEntry && i < elementObservers.length) {'],[0,' var cacheEntry = elementObservers[i];'],[-1,' '],[0,' if ((cacheEntry.name == name) &&'],[-1,' (cacheEntry.observer == observer) &&'],[-1,' (cacheEntry.useCapture == useCapture)) {'],[-1,' '],[0,' elementObservers.splice(i, 1);'],[0,' if (elementObservers.length == 0) {'],[0,' delete OpenLayers.Event.observers[cacheID];'],[-1,' }'],[0,' foundEntry = true;'],[0,' break; '],[-1,' }'],[0,' i++; '],[-1,' }'],[-1,' }'],[-1,' '],[-1,' \/\/actually remove the event listener from browser'],[0,' if (foundEntry) {'],[0,' if (element.removeEventListener) {'],[0,' element.removeEventListener(name, observer, useCapture);'],[0,' } else if (element && element.detachEvent) {'],[0,' element.detachEvent(\'on\' + name, observer);'],[-1,' }'],[-1,' }'],[0,' return foundEntry;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: unloadCache'],[-1,' * Cycle through all the element entries in the events cache and call'],[-1,' * stopObservingElement on each. '],[-1,' *\/'],[-1,' unloadCache: function() {'],[-1,' \/\/ check for OpenLayers.Event before checking for observers, because'],[-1,' \/\/ OpenLayers.Event may be undefined in IE if no map instance was'],[-1,' \/\/ created'],[0,' if (OpenLayers.Event && OpenLayers.Event.observers) {'],[0,' for (var cacheID in OpenLayers.Event.observers) {'],[0,' var elementObservers = OpenLayers.Event.observers[cacheID];'],[0,' OpenLayers.Event._removeElementObservers.apply(this, '],[-1,' [elementObservers]);'],[-1,' }'],[0,' OpenLayers.Event.observers = false;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Event\"'],[-1,'};'],[-1,''],[-1,'\/* prevent memory leaks in IE *\/'],[1,'OpenLayers.Event.observe(window, \'unload\', OpenLayers.Event.unloadCache, false);'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Events'],[-1,' *\/'],[1,'OpenLayers.Events = OpenLayers.Class({'],[-1,''],[-1,' \/** '],[-1,' * Constant: BROWSER_EVENTS'],[-1,' * {Array(String)} supported events '],[-1,' *\/'],[-1,' BROWSER_EVENTS: ['],[-1,' \"mouseover\", \"mouseout\",'],[-1,' \"mousedown\", \"mouseup\", \"mousemove\", '],[-1,' \"click\", \"dblclick\", \"rightclick\", \"dblrightclick\",'],[-1,' \"resize\", \"focus\", \"blur\",'],[-1,' \"touchstart\", \"touchmove\", \"touchend\",'],[-1,' \"keydown\"'],[-1,' ],'],[-1,''],[-1,' \/** '],[-1,' * Property: listeners '],[-1,' * {Object} Hashtable of Array(Function): events listener functions '],[-1,' *\/'],[-1,' listeners: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: object '],[-1,' * {Object} the code object issuing application events '],[-1,' *\/'],[-1,' object: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: element '],[-1,' * {DOMElement} the DOM element receiving browser events '],[-1,' *\/'],[-1,' element: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: eventHandler '],[-1,' * {Function} bound event handler attached to elements '],[-1,' *\/'],[-1,' eventHandler: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: fallThrough '],[-1,' * {Boolean} '],[-1,' *\/'],[-1,' fallThrough: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: includeXY'],[-1,' * {Boolean} Should the .xy property automatically be created for browser'],[-1,' * mouse events? In general, this should be false. If it is true, then'],[-1,' * mouse events will automatically generate a \'.xy\' property on the '],[-1,' * event object that is passed. (Prior to OpenLayers 2.7, this was true'],[-1,' * by default.) Otherwise, you can call the getMousePosition on the'],[-1,' * relevant events handler on the object available via the \'evt.object\''],[-1,' * property of the evt object. So, for most events, you can call:'],[-1,' * function named(evt) { '],[-1,' * this.xy = this.object.events.getMousePosition(evt) '],[-1,' * } '],[-1,' *'],[-1,' * This option typically defaults to false for performance reasons:'],[-1,' * when creating an events object whose primary purpose is to manage'],[-1,' * relatively positioned mouse events within a div, it may make'],[-1,' * sense to set it to true.'],[-1,' *'],[-1,' * This option is also used to control whether the events object caches'],[-1,' * offsets. If this is false, it will not: the reason for this is that'],[-1,' * it is only expected to be called many times if the includeXY property'],[-1,' * is set to true. If you set this to true, you are expected to clear '],[-1,' * the offset cache manually (using this.clearMouseCache()) if:'],[-1,' * the border of the element changes'],[-1,' * the location of the element in the page changes'],[-1,' *\/'],[-1,' includeXY: false, '],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: extensions'],[-1,' * {Object} Event extensions registered with this instance. Keys are'],[-1,' * event types, values are {OpenLayers.Events.*} extension instances or'],[-1,' * {Boolean} for events that an instantiated extension provides in'],[-1,' * addition to the one it was created for.'],[-1,' *'],[-1,' * Extensions create an event in addition to browser events, which usually'],[-1,' * fires when a sequence of browser events is completed. Extensions are'],[-1,' * automatically instantiated when a listener is registered for an event'],[-1,' * provided by an extension.'],[-1,' *'],[-1,' * Extensions are created in the <OpenLayers.Events> namespace using'],[-1,' * <OpenLayers.Class>, and named after the event they provide.'],[-1,' * The constructor receives the target <OpenLayers.Events> instance as'],[-1,' * argument. Extensions that need to capture browser events before they'],[-1,' * propagate can register their listeners events using <register>, with'],[-1,' * {extension: true} as 4th argument.'],[-1,' *'],[-1,' * If an extension creates more than one event, an alias for each event'],[-1,' * type should be created and reference the same class. The constructor'],[-1,' * should set a reference in the target\'s extensions registry to itself.'],[-1,' *'],[-1,' * Below is a minimal extension that provides the \"foostart\" and \"fooend\"'],[-1,' * event types, which replace the native \"click\" event type if clicked on'],[-1,' * an element with the css class \"foo\":'],[-1,' *'],[-1,' * (code)'],[-1,' * OpenLayers.Events.foostart = OpenLayers.Class({'],[-1,' * initialize: function(target) {'],[-1,' * this.target = target;'],[-1,' * this.target.register(\"click\", this, this.doStuff, {extension: true});'],[-1,' * \/\/ only required if extension provides more than one event type'],[-1,' * this.target.extensions[\"foostart\"] = true;'],[-1,' * this.target.extensions[\"fooend\"] = true;'],[-1,' * },'],[-1,' * destroy: function() {'],[-1,' * var target = this.target;'],[-1,' * target.unregister(\"click\", this, this.doStuff);'],[-1,' * delete this.target;'],[-1,' * \/\/ only required if extension provides more than one event type'],[-1,' * delete target.extensions[\"foostart\"];'],[-1,' * delete target.extensions[\"fooend\"];'],[-1,' * },'],[-1,' * doStuff: function(evt) {'],[-1,' * var propagate = true;'],[-1,' * if (OpenLayers.Event.element(evt).className === \"foo\") {'],[-1,' * propagate = false;'],[-1,' * var target = this.target;'],[-1,' * target.triggerEvent(\"foostart\");'],[-1,' * window.setTimeout(function() {'],[-1,' * target.triggerEvent(\"fooend\");'],[-1,' * }, 1000);'],[-1,' * }'],[-1,' * return propagate;'],[-1,' * }'],[-1,' * });'],[-1,' * \/\/ only required if extension provides more than one event type'],[-1,' * OpenLayers.Events.fooend = OpenLayers.Events.foostart;'],[-1,' * (end)'],[-1,' * '],[-1,' *\/'],[-1,' extensions: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: extensionCount'],[-1,' * {Object} Keys are event types (like in <listeners>), values are the'],[-1,' * number of extension listeners for each event type.'],[-1,' *\/'],[-1,' extensionCount: null,'],[-1,''],[-1,' \/**'],[-1,' * Method: clearMouseListener'],[-1,' * A version of <clearMouseCache> that is bound to this instance so that'],[-1,' * it can be used with <OpenLayers.Event.observe> and'],[-1,' * <OpenLayers.Event.stopObserving>.'],[-1,' *\/'],[-1,' clearMouseListener: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Events'],[-1,' * Construct an OpenLayers.Events object.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * object - {Object} The js object to which this Events object is being added'],[-1,' * element - {DOMElement} A dom element to respond to browser events'],[-1,' * eventTypes - {Array(String)} Deprecated. Array of custom application'],[-1,' * events. A listener may be registered for any named event, regardless'],[-1,' * of the values provided here.'],[-1,' * fallThrough - {Boolean} Allow events to fall through after these have'],[-1,' * been handled?'],[-1,' * options - {Object} Options for the events object.'],[-1,' *\/'],[-1,' initialize: function (object, element, eventTypes, fallThrough, options) {'],[1,' OpenLayers.Util.extend(this, options);'],[1,' this.object = object;'],[1,' this.fallThrough = fallThrough;'],[1,' this.listeners = {};'],[1,' this.extensions = {};'],[1,' this.extensionCount = {};'],[1,' this._msTouches = [];'],[-1,' '],[-1,' \/\/ if a dom element is specified, add a listeners list '],[-1,' \/\/ for browser events on the element and register them'],[1,' if (element != null) {'],[0,' this.attachToElement(element);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' *\/'],[-1,' destroy: function () {'],[0,' for (var e in this.extensions) {'],[0,' if (typeof this.extensions[e] !== \"boolean\") {'],[0,' this.extensions[e].destroy();'],[-1,' }'],[-1,' }'],[0,' this.extensions = null;'],[0,' if (this.element) {'],[0,' OpenLayers.Event.stopObservingElement(this.element);'],[0,' if(this.element.hasScrollEvent) {'],[0,' OpenLayers.Event.stopObserving('],[-1,' window, \"scroll\", this.clearMouseListener'],[-1,' );'],[-1,' }'],[-1,' }'],[0,' this.element = null;'],[-1,''],[0,' this.listeners = null;'],[0,' this.object = null;'],[0,' this.fallThrough = null;'],[0,' this.eventHandler = null;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addEventType'],[-1,' * Deprecated. Any event can be triggered without adding it first.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * eventName - {String}'],[-1,' *\/'],[-1,' addEventType: function(eventName) {'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: attachToElement'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {HTMLDOMElement} a DOM element to attach browser events to'],[-1,' *\/'],[-1,' attachToElement: function (element) {'],[0,' if (this.element) {'],[0,' OpenLayers.Event.stopObservingElement(this.element);'],[-1,' } else {'],[-1,' \/\/ keep a bound copy of handleBrowserEvent() so that we can'],[-1,' \/\/ pass the same function to both Event.observe() and .stopObserving()'],[0,' this.eventHandler = OpenLayers.Function.bindAsEventListener('],[-1,' this.handleBrowserEvent, this'],[-1,' );'],[-1,' '],[-1,' \/\/ to be used with observe and stopObserving'],[0,' this.clearMouseListener = OpenLayers.Function.bind('],[-1,' this.clearMouseCache, this'],[-1,' );'],[-1,' }'],[0,' this.element = element;'],[0,' var msTouch = !!window.navigator.msMaxTouchPoints;'],[0,' var type;'],[0,' for (var i = 0, len = this.BROWSER_EVENTS.length; i < len; i++) {'],[0,' type = this.BROWSER_EVENTS[i];'],[-1,' \/\/ register the event cross-browser'],[0,' OpenLayers.Event.observe(element, type, this.eventHandler'],[-1,' );'],[0,' if (msTouch && type.indexOf(\'touch\') === 0) {'],[0,' this.addMsTouchListener(element, type, this.eventHandler);'],[-1,' }'],[-1,' }'],[-1,' \/\/ disable dragstart in IE so that mousedown\/move\/up works normally'],[0,' OpenLayers.Event.observe(element, \"dragstart\", OpenLayers.Event.stop);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: on'],[-1,' * Convenience method for registering listeners with a common scope.'],[-1,' * Internally, this method calls <register> as shown in the examples'],[-1,' * below.'],[-1,' *'],[-1,' * Example use:'],[-1,' * (code)'],[-1,' * \/\/ register a single listener for the \"loadstart\" event'],[-1,' * events.on({\"loadstart\": loadStartListener});'],[-1,' *'],[-1,' * \/\/ this is equivalent to the following'],[-1,' * events.register(\"loadstart\", undefined, loadStartListener);'],[-1,' *'],[-1,' * \/\/ register multiple listeners to be called with the same `this` object'],[-1,' * events.on({'],[-1,' * \"loadstart\": loadStartListener,'],[-1,' * \"loadend\": loadEndListener,'],[-1,' * scope: object'],[-1,' * });'],[-1,' *'],[-1,' * \/\/ this is equivalent to the following'],[-1,' * events.register(\"loadstart\", object, loadStartListener);'],[-1,' * events.register(\"loadend\", object, loadEndListener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Parameters:'],[-1,' * object - {Object} '],[-1,' *\/'],[-1,' on: function(object) {'],[0,' for(var type in object) {'],[0,' if(type != \"scope\" && object.hasOwnProperty(type)) {'],[0,' this.register(type, object.scope, object[type]);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: register'],[-1,' * Register an event on the events object.'],[-1,' *'],[-1,' * When the event is triggered, the \'func\' function will be called, in the'],[-1,' * context of \'obj\'. Imagine we were to register an event, specifying an '],[-1,' * OpenLayers.Bounds Object as \'obj\'. When the event is triggered, the '],[-1,' * context in the callback function will be our Bounds object. This means'],[-1,' * that within our callback function, we can access the properties and '],[-1,' * methods of the Bounds object through the \"this\" variable. So our '],[-1,' * callback could execute something like: '],[-1,' * : leftStr = \"Left: \" + this.left;'],[-1,' * '],[-1,' * or'],[-1,' * '],[-1,' * : centerStr = \"Center: \" + this.getCenterLonLat();'],[-1,' *'],[-1,' * Parameters:'],[-1,' * type - {String} Name of the event to register'],[-1,' * obj - {Object} The object to bind the context to for the callback#.'],[-1,' * If no object is specified, default is the Events\'s \'object\' property.'],[-1,' * func - {Function} The callback function. If no callback is '],[-1,' * specified, this function does nothing.'],[-1,' * priority - {Boolean|Object} If true, adds the new listener to the'],[-1,' * *front* of the events queue instead of to the end.'],[-1,' *'],[-1,' * Valid options for priority:'],[-1,' * extension - {Boolean} If true, then the event will be registered as'],[-1,' * extension event. Extension events are handled before all other'],[-1,' * events.'],[-1,' *\/'],[-1,' register: function (type, obj, func, priority) {'],[0,' if (type in OpenLayers.Events && !this.extensions[type]) {'],[0,' this.extensions[type] = new OpenLayers.Events[type](this);'],[-1,' }'],[0,' if (func != null) {'],[0,' if (obj == null) {'],[0,' obj = this.object;'],[-1,' }'],[0,' var listeners = this.listeners[type];'],[0,' if (!listeners) {'],[0,' listeners = [];'],[0,' this.listeners[type] = listeners;'],[0,' this.extensionCount[type] = 0;'],[-1,' }'],[0,' var listener = {obj: obj, func: func};'],[0,' if (priority) {'],[0,' listeners.splice(this.extensionCount[type], 0, listener);'],[0,' if (typeof priority === \"object\" && priority.extension) {'],[0,' this.extensionCount[type]++;'],[-1,' }'],[-1,' } else {'],[0,' listeners.push(listener);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: registerPriority'],[-1,' * Same as register() but adds the new listener to the *front* of the'],[-1,' * events queue instead of to the end.'],[-1,' * '],[-1,' * TODO: get rid of this in 3.0 - Decide whether listeners should be '],[-1,' * called in the order they were registered or in reverse order.'],[-1,' *'],[-1,' *'],[-1,' * Parameters:'],[-1,' * type - {String} Name of the event to register'],[-1,' * obj - {Object} The object to bind the context to for the callback#.'],[-1,' * If no object is specified, default is the Events\'s '],[-1,' * \'object\' property.'],[-1,' * func - {Function} The callback function. If no callback is '],[-1,' * specified, this function does nothing.'],[-1,' *\/'],[-1,' registerPriority: function (type, obj, func) {'],[0,' this.register(type, obj, func, true);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: un'],[-1,' * Convenience method for unregistering listeners with a common scope.'],[-1,' * Internally, this method calls <unregister> as shown in the examples'],[-1,' * below.'],[-1,' *'],[-1,' * Example use:'],[-1,' * (code)'],[-1,' * \/\/ unregister a single listener for the \"loadstart\" event'],[-1,' * events.un({\"loadstart\": loadStartListener});'],[-1,' *'],[-1,' * \/\/ this is equivalent to the following'],[-1,' * events.unregister(\"loadstart\", undefined, loadStartListener);'],[-1,' *'],[-1,' * \/\/ unregister multiple listeners with the same `this` object'],[-1,' * events.un({'],[-1,' * \"loadstart\": loadStartListener,'],[-1,' * \"loadend\": loadEndListener,'],[-1,' * scope: object'],[-1,' * });'],[-1,' *'],[-1,' * \/\/ this is equivalent to the following'],[-1,' * events.unregister(\"loadstart\", object, loadStartListener);'],[-1,' * events.unregister(\"loadend\", object, loadEndListener);'],[-1,' * (end)'],[-1,' *\/'],[-1,' un: function(object) {'],[0,' for(var type in object) {'],[0,' if(type != \"scope\" && object.hasOwnProperty(type)) {'],[0,' this.unregister(type, object.scope, object[type]);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: unregister'],[-1,' *'],[-1,' * Parameters:'],[-1,' * type - {String} '],[-1,' * obj - {Object} If none specified, defaults to this.object'],[-1,' * func - {Function} '],[-1,' *\/'],[-1,' unregister: function (type, obj, func) {'],[0,' if (obj == null) {'],[0,' obj = this.object;'],[-1,' }'],[0,' var listeners = this.listeners[type];'],[0,' if (listeners != null) {'],[0,' for (var i=0, len=listeners.length; i<len; i++) {'],[0,' if (listeners[i].obj == obj && listeners[i].func == func) {'],[0,' listeners.splice(i, 1);'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: remove'],[-1,' * Remove all listeners for a given event type. If type is not registered,'],[-1,' * does nothing.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * type - {String} '],[-1,' *\/'],[-1,' remove: function(type) {'],[0,' if (this.listeners[type] != null) {'],[0,' this.listeners[type] = [];'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: triggerEvent'],[-1,' * Trigger a specified registered event. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * type - {String} '],[-1,' * evt - {Event || Object} will be passed to the listeners.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The last listener return. If a listener returns false, the'],[-1,' * chain of listeners will stop getting called.'],[-1,' *\/'],[-1,' triggerEvent: function (type, evt) {'],[0,' var listeners = this.listeners[type];'],[-1,''],[-1,' \/\/ fast path'],[0,' if(!listeners || listeners.length == 0) {'],[0,' return undefined;'],[-1,' }'],[-1,''],[-1,' \/\/ prep evt object with object & div references'],[0,' if (evt == null) {'],[0,' evt = {};'],[-1,' }'],[0,' evt.object = this.object;'],[0,' evt.element = this.element;'],[0,' if(!evt.type) {'],[0,' evt.type = type;'],[-1,' }'],[-1,' '],[-1,' \/\/ execute all callbacks registered for specified type'],[-1,' \/\/ get a clone of the listeners array to'],[-1,' \/\/ allow for splicing during callbacks'],[0,' listeners = listeners.slice();'],[0,' var continueChain;'],[0,' for (var i=0, len=listeners.length; i<len; i++) {'],[0,' var callback = listeners[i];'],[-1,' \/\/ bind the context to callback.obj'],[0,' continueChain = callback.func.apply(callback.obj, [evt]);'],[-1,''],[0,' if ((continueChain != undefined) && (continueChain == false)) {'],[-1,' \/\/ if callback returns false, execute no more callbacks.'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' \/\/ don\'t fall through to other DOM elements'],[0,' if (!this.fallThrough) { '],[0,' OpenLayers.Event.stop(evt, true);'],[-1,' }'],[0,' return continueChain;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: handleBrowserEvent'],[-1,' * Basically just a wrapper to the triggerEvent() function, but takes '],[-1,' * care to set a property \'xy\' on the event with the current mouse '],[-1,' * position.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} '],[-1,' *\/'],[-1,' handleBrowserEvent: function (evt) {'],[0,' var type = evt.type, listeners = this.listeners[type];'],[0,' if(!listeners || listeners.length == 0) {'],[-1,' \/\/ noone\'s listening, bail out'],[0,' return;'],[-1,' }'],[-1,' \/\/ add clientX & clientY to all events - corresponds to average x, y'],[0,' var touches = evt.touches;'],[0,' if (touches && touches[0]) {'],[0,' var x = 0;'],[0,' var y = 0;'],[0,' var num = touches.length;'],[0,' var touch;'],[0,' for (var i=0; i<num; ++i) {'],[0,' touch = this.getTouchClientXY(touches[i]);'],[0,' x += touch.clientX;'],[0,' y += touch.clientY;'],[-1,' }'],[0,' evt.clientX = x \/ num;'],[0,' evt.clientY = y \/ num;'],[-1,' }'],[0,' if (this.includeXY) {'],[0,' evt.xy = this.getMousePosition(evt);'],[-1,' } '],[0,' this.triggerEvent(type, evt);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getTouchClientXY'],[-1,' * WebKit has a few bugs for clientX\/clientY. This method detects them'],[-1,' * and calculate the correct values.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Touch} a Touch object from a TouchEvent'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} An object with only clientX and clientY properties with the'],[-1,' * calculated values.'],[-1,' *\/'],[-1,' getTouchClientXY: function (evt) {'],[-1,' \/\/ olMochWin is to override window, used for testing'],[0,' var win = window.olMockWin || window,'],[-1,' winPageX = win.pageXOffset,'],[-1,' winPageY = win.pageYOffset,'],[-1,' x = evt.clientX,'],[-1,' y = evt.clientY;'],[-1,' '],[0,' if (evt.pageY === 0 && Math.floor(y) > Math.floor(evt.pageY) ||'],[-1,' evt.pageX === 0 && Math.floor(x) > Math.floor(evt.pageX)) {'],[-1,' \/\/ iOS4 include scroll offset in clientX\/Y'],[0,' x = x - winPageX;'],[0,' y = y - winPageY;'],[0,' } else if (y < (evt.pageY - winPageY) || x < (evt.pageX - winPageX) ) {'],[-1,' \/\/ Some Android browsers have totally bogus values for clientX\/Y'],[-1,' \/\/ when scrolling\/zooming a page'],[0,' x = evt.pageX - winPageX;'],[0,' y = evt.pageY - winPageY;'],[-1,' }'],[-1,' '],[0,' evt.olClientX = x;'],[0,' evt.olClientY = y;'],[-1,' '],[0,' return {'],[-1,' clientX: x,'],[-1,' clientY: y'],[-1,' };'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: clearMouseCache'],[-1,' * Clear cached data about the mouse position. This should be called any '],[-1,' * time the element that events are registered on changes position '],[-1,' * within the page.'],[-1,' *\/'],[-1,' clearMouseCache: function() { '],[0,' this.element.scrolls = null;'],[0,' this.element.lefttop = null;'],[0,' this.element.offsets = null;'],[-1,' }, '],[-1,''],[-1,' \/**'],[-1,' * Method: getMousePosition'],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Event} '],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} The current xy coordinate of the mouse, adjusted'],[-1,' * for offsets'],[-1,' *\/'],[-1,' getMousePosition: function (evt) {'],[0,' if (!this.includeXY) {'],[0,' this.clearMouseCache();'],[0,' } else if (!this.element.hasScrollEvent) {'],[0,' OpenLayers.Event.observe(window, \"scroll\", this.clearMouseListener);'],[0,' this.element.hasScrollEvent = true;'],[-1,' }'],[-1,' '],[0,' if (!this.element.scrolls) {'],[0,' var viewportElement = OpenLayers.Util.getViewportElement();'],[0,' this.element.scrolls = ['],[-1,' window.pageXOffset || viewportElement.scrollLeft,'],[-1,' window.pageYOffset || viewportElement.scrollTop'],[-1,' ];'],[-1,' }'],[-1,''],[0,' if (!this.element.lefttop) {'],[0,' this.element.lefttop = ['],[-1,' (document.documentElement.clientLeft || 0),'],[-1,' (document.documentElement.clientTop || 0)'],[-1,' ];'],[-1,' }'],[-1,' '],[0,' if (!this.element.offsets) {'],[0,' this.element.offsets = OpenLayers.Util.pagePosition(this.element);'],[-1,' }'],[-1,''],[0,' return new OpenLayers.Pixel('],[-1,' (evt.clientX + this.element.scrolls[0]) - this.element.offsets[0]'],[-1,' - this.element.lefttop[0], '],[-1,' (evt.clientY + this.element.scrolls[1]) - this.element.offsets[1]'],[-1,' - this.element.lefttop[1]'],[-1,' ); '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: addMsTouchListener'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} The DOM element to register the listener on'],[-1,' * type - {String} The event type'],[-1,' * handler - {Function} the handler'],[-1,' *\/'],[-1,' addMsTouchListener: function (element, type, handler) {'],[0,' var eventHandler = this.eventHandler;'],[0,' var touches = this._msTouches;'],[-1,''],[0,' function msHandler(evt) {'],[0,' handler(OpenLayers.Util.applyDefaults({'],[-1,' stopPropagation: function() {'],[0,' for (var i=touches.length-1; i>=0; --i) {'],[0,' touches[i].stopPropagation();'],[-1,' }'],[-1,' },'],[-1,' preventDefault: function() {'],[0,' for (var i=touches.length-1; i>=0; --i) {'],[0,' touches[i].preventDefault();'],[-1,' }'],[-1,' },'],[-1,' type: type'],[-1,' }, evt));'],[-1,' }'],[-1,''],[0,' switch (type) {'],[-1,' case \'touchstart\':'],[0,' return this.addMsTouchListenerStart(element, type, msHandler);'],[-1,' case \'touchend\':'],[0,' return this.addMsTouchListenerEnd(element, type, msHandler);'],[-1,' case \'touchmove\':'],[0,' return this.addMsTouchListenerMove(element, type, msHandler);'],[-1,' default:'],[0,' throw \'Unknown touch event type\';'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: addMsTouchListenerStart'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} The DOM element to register the listener on'],[-1,' * type - {String} The event type'],[-1,' * handler - {Function} the handler'],[-1,' *\/'],[-1,' addMsTouchListenerStart: function(element, type, handler) {'],[0,' var touches = this._msTouches;'],[-1,''],[0,' var cb = function(e) {'],[-1,''],[0,' var alreadyInArray = false;'],[0,' for (var i=0, ii=touches.length; i<ii; ++i) {'],[0,' if (touches[i].pointerId == e.pointerId) {'],[0,' alreadyInArray = true;'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' if (!alreadyInArray) {'],[0,' touches.push(e);'],[-1,' }'],[-1,''],[0,' e.touches = touches.slice();'],[0,' handler(e);'],[-1,' };'],[-1,''],[0,' OpenLayers.Event.observe(element, \'MSPointerDown\', cb);'],[-1,' '],[-1,' \/\/ the pointerId only needs to be removed from the _msTouches array'],[-1,' \/\/ when the pointer has left its element'],[0,' var internalCb = function (e) {'],[0,' var up = false;'],[0,' for (var i = 0, ii = touches.length; i < ii; ++i) {'],[0,' if (touches[i].pointerId == e.pointerId) {'],[0,' if (this.clientWidth != 0 && this.clientHeight != 0) {'],[0,' if ((Math.ceil(e.clientX) >= this.clientWidth || Math.ceil(e.clientY) >= this.clientHeight)) {'],[0,' touches.splice(i, 1);'],[-1,' }'],[-1,' }'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' };'],[0,' OpenLayers.Event.observe(element, \'MSPointerOut\', internalCb);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: addMsTouchListenerMove'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} The DOM element to register the listener on'],[-1,' * type - {String} The event type'],[-1,' * handler - {Function} the handler'],[-1,' *\/'],[-1,' addMsTouchListenerMove: function (element, type, handler) {'],[0,' var touches = this._msTouches;'],[0,' var cb = function(e) {'],[-1,''],[-1,' \/\/Don\'t fire touch moves when mouse isn\'t down'],[0,' if (e.pointerType == e.MSPOINTER_TYPE_MOUSE && e.buttons == 0) {'],[0,' return;'],[-1,' }'],[-1,''],[0,' if (touches.length == 1 && touches[0].pageX == e.pageX &&'],[-1,' touches[0].pageY == e.pageY) {'],[-1,' \/\/ don\'t trigger event when pointer has not moved'],[0,' return;'],[-1,' }'],[0,' for (var i=0, ii=touches.length; i<ii; ++i) {'],[0,' if (touches[i].pointerId == e.pointerId) {'],[0,' touches[i] = e;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,''],[0,' e.touches = touches.slice();'],[0,' handler(e);'],[-1,' };'],[-1,''],[0,' OpenLayers.Event.observe(element, \'MSPointerMove\', cb);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: addMsTouchListenerEnd'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} The DOM element to register the listener on'],[-1,' * type - {String} The event type'],[-1,' * handler - {Function} the handler'],[-1,' *\/'],[-1,' addMsTouchListenerEnd: function (element, type, handler) {'],[0,' var touches = this._msTouches;'],[-1,''],[0,' var cb = function(e) {'],[-1,''],[0,' for (var i=0, ii=touches.length; i<ii; ++i) {'],[0,' if (touches[i].pointerId == e.pointerId) {'],[0,' touches.splice(i, 1);'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' '],[0,' e.touches = touches.slice();'],[0,' handler(e);'],[-1,' };'],[-1,''],[0,' OpenLayers.Event.observe(element, \'MSPointerUp\', cb);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Events\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Map.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' * @requires OpenLayers\/Util\/vendorPrefix.js'],[-1,' * @requires OpenLayers\/Events.js'],[-1,' * @requires OpenLayers\/Tween.js'],[-1,' * @requires OpenLayers\/Projection.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Map'],[-1,' * Instances of OpenLayers.Map are interactive maps embedded in a web page.'],[-1,' * Create a new map with the <OpenLayers.Map> constructor.'],[-1,' * '],[-1,' * On their own maps do not provide much functionality. To extend a map'],[-1,' * it\'s necessary to add controls (<OpenLayers.Control>) and '],[-1,' * layers (<OpenLayers.Layer>) to the map. '],[-1,' *\/'],[1,'OpenLayers.Map = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * Constant: Z_INDEX_BASE'],[-1,' * {Object} Base z-indexes for different classes of thing '],[-1,' *\/'],[-1,' Z_INDEX_BASE: {'],[-1,' BaseLayer: 100,'],[-1,' Overlay: 325,'],[-1,' Feature: 725,'],[-1,' Popup: 750,'],[-1,' Control: 1000'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>}'],[-1,' *'],[-1,' * Register a listener for a particular event with the following syntax:'],[-1,' * (code)'],[-1,' * map.events.register(type, obj, listener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Listeners will be called with a reference to an event object. The'],[-1,' * properties of this event depends on exactly what happened.'],[-1,' *'],[-1,' * All event objects have at least the following properties:'],[-1,' * object - {Object} A reference to map.events.object.'],[-1,' * element - {DOMElement} A reference to map.events.element.'],[-1,' *'],[-1,' * Browser events have the following additional properties:'],[-1,' * xy - {<OpenLayers.Pixel>} The pixel location of the event (relative'],[-1,' * to the the map viewport).'],[-1,' *'],[-1,' * Supported map event types:'],[-1,' * preaddlayer - triggered before a layer has been added. The event'],[-1,' * object will include a *layer* property that references the layer '],[-1,' * to be added. When a listener returns \"false\" the adding will be '],[-1,' * aborted.'],[-1,' * addlayer - triggered after a layer has been added. The event object'],[-1,' * will include a *layer* property that references the added layer.'],[-1,' * preremovelayer - triggered before a layer has been removed. The event'],[-1,' * object will include a *layer* property that references the layer '],[-1,' * to be removed. When a listener returns \"false\" the removal will be '],[-1,' * aborted.'],[-1,' * removelayer - triggered after a layer has been removed. The event'],[-1,' * object will include a *layer* property that references the removed'],[-1,' * layer.'],[-1,' * changelayer - triggered after a layer name change, order change,'],[-1,' * opacity change, params change, visibility change (actual visibility,'],[-1,' * not the layer\'s visibility property) or attribution change (due to'],[-1,' * extent change). Listeners will receive an event object with *layer*'],[-1,' * and *property* properties. The *layer* property will be a reference'],[-1,' * to the changed layer. The *property* property will be a key to the'],[-1,' * changed property (name, order, opacity, params, visibility or'],[-1,' * attribution).'],[-1,' * movestart - triggered after the start of a drag, pan, or zoom. The event'],[-1,' * object may include a *zoomChanged* property that tells whether the'],[-1,' * zoom has changed.'],[-1,' * move - triggered after each drag, pan, or zoom'],[-1,' * moveend - triggered after a drag, pan, or zoom completes'],[-1,' * zoomstart - triggered when a zoom starts. Listeners receive an object'],[-1,' * with *center* and *zoom* properties, for the target center and zoom'],[-1,' * level.'],[-1,' * zoomend - triggered after a zoom completes'],[-1,' * mouseover - triggered after mouseover the map'],[-1,' * mouseout - triggered after mouseout the map'],[-1,' * mousemove - triggered after mousemove the map'],[-1,' * changebaselayer - triggered after the base layer changes'],[-1,' * updatesize - triggered after the <updateSize> method was executed'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Property: id'],[-1,' * {String} Unique identifier for the map'],[-1,' *\/'],[-1,' id: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: fractionalZoom'],[-1,' * {Boolean} For a base layer that supports it, allow the map resolution'],[-1,' * to be set to a value between one of the values in the resolutions'],[-1,' * array. Default is false.'],[-1,' *'],[-1,' * When fractionalZoom is set to true, it is possible to zoom to'],[-1,' * an arbitrary extent. This requires a base layer from a source'],[-1,' * that supports requests for arbitrary extents (i.e. not cached'],[-1,' * tiles on a regular lattice). This means that fractionalZoom'],[-1,' * will not work with commercial layers (Google, Yahoo, VE), layers'],[-1,' * using TileCache, or any other pre-cached data sources.'],[-1,' *'],[-1,' * If you are using fractionalZoom, then you should also use'],[-1,' * <getResolutionForZoom> instead of layer.resolutions[zoom] as the'],[-1,' * former works for non-integer zoom levels.'],[-1,' *\/'],[-1,' fractionalZoom: false,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>} An events object that handles all '],[-1,' * events on the map'],[-1,' *\/'],[-1,' events: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: allOverlays'],[-1,' * {Boolean} Allow the map to function with \"overlays\" only. Defaults to'],[-1,' * false. If true, the lowest layer in the draw order will act as'],[-1,' * the base layer. In addition, if set to true, all layers will'],[-1,' * have isBaseLayer set to false when they are added to the map.'],[-1,' *'],[-1,' * Note:'],[-1,' * If you set map.allOverlays to true, then you *cannot* use'],[-1,' * map.setBaseLayer or layer.setIsBaseLayer. With allOverlays true,'],[-1,' * the lowest layer in the draw layer is the base layer. So, to change'],[-1,' * the base layer, use <setLayerIndex> or <raiseLayer> to set the layer'],[-1,' * index to 0.'],[-1,' *\/'],[-1,' allOverlays: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: div'],[-1,' * {DOMElement|String} The element that contains the map (or an id for'],[-1,' * that element). If the <OpenLayers.Map> constructor is called'],[-1,' * with two arguments, this should be provided as the first argument.'],[-1,' * Alternatively, the map constructor can be called with the options'],[-1,' * object as the only argument. In this case (one argument), a'],[-1,' * div property may or may not be provided. If the div property'],[-1,' * is not provided, the map can be rendered to a container later'],[-1,' * using the <render> method.'],[-1,' * '],[-1,' * Note:'],[-1,' * If you are calling <render> after map construction, do not use'],[-1,' * <maxResolution> auto. Instead, divide your <maxExtent> by your'],[-1,' * maximum expected dimension.'],[-1,' *\/'],[-1,' div: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: dragging'],[-1,' * {Boolean} The map is currently being dragged.'],[-1,' *\/'],[-1,' dragging: false,'],[-1,''],[-1,' \/**'],[-1,' * Property: size'],[-1,' * {<OpenLayers.Size>} Size of the main div (this.div)'],[-1,' *\/'],[-1,' size: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: viewPortDiv'],[-1,' * {HTMLDivElement} The element that represents the map viewport'],[-1,' *\/'],[-1,' viewPortDiv: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: layerContainerOrigin'],[-1,' * {<OpenLayers.LonLat>} The lonlat at which the later container was'],[-1,' * re-initialized (on-zoom)'],[-1,' *\/'],[-1,' layerContainerOrigin: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: layerContainerDiv'],[-1,' * {HTMLDivElement} The element that contains the layers.'],[-1,' *\/'],[-1,' layerContainerDiv: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: layers'],[-1,' * {Array(<OpenLayers.Layer>)} Ordered list of layers in the map'],[-1,' *\/'],[-1,' layers: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: controls'],[-1,' * {Array(<OpenLayers.Control>)} List of controls associated with the map.'],[-1,' *'],[-1,' * If not provided in the map options at construction, the map will'],[-1,' * by default be given the following controls if present in the build:'],[-1,' * - <OpenLayers.Control.Navigation> or <OpenLayers.Control.TouchNavigation>'],[-1,' * - <OpenLayers.Control.Zoom> or <OpenLayers.Control.PanZoom>'],[-1,' * - <OpenLayers.Control.ArgParser>'],[-1,' * - <OpenLayers.Control.Attribution>'],[-1,' *\/'],[-1,' controls: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: popups'],[-1,' * {Array(<OpenLayers.Popup>)} List of popups associated with the map'],[-1,' *\/'],[-1,' popups: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: baseLayer'],[-1,' * {<OpenLayers.Layer>} The currently selected base layer. This determines'],[-1,' * min\/max zoom level, projection, etc.'],[-1,' *\/'],[-1,' baseLayer: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: center'],[-1,' * {<OpenLayers.LonLat>} The current center of the map'],[-1,' *\/'],[-1,' center: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: resolution'],[-1,' * {Float} The resolution of the map.'],[-1,' *\/'],[-1,' resolution: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: zoom'],[-1,' * {Integer} The current zoom level of the map'],[-1,' *\/'],[-1,' zoom: 0, '],[-1,''],[-1,' \/**'],[-1,' * Property: panRatio'],[-1,' * {Float} The ratio of the current extent within'],[-1,' * which panning will tween.'],[-1,' *\/'],[-1,' panRatio: 1.5, '],[-1,''],[-1,' \/**'],[-1,' * APIProperty: options'],[-1,' * {Object} The options object passed to the class constructor. Read-only.'],[-1,' *\/'],[-1,' options: null,'],[-1,''],[-1,' \/\/ Options'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: tileSize'],[-1,' * {<OpenLayers.Size>} Set in the map options to override the default tile'],[-1,' * size for this map.'],[-1,' *\/'],[-1,' tileSize: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: projection'],[-1,' * {String} Set in the map options to specify the default projection '],[-1,' * for layers added to this map. When using a projection other than EPSG:4326'],[-1,' * (CRS:84, Geographic) or EPSG:3857 (EPSG:900913, Web Mercator),'],[-1,' * also set maxExtent, maxResolution or resolutions. Default is \"EPSG:4326\".'],[-1,' * Note that the projection of the map is usually determined'],[-1,' * by that of the current baseLayer (see <baseLayer> and <getProjectionObject>).'],[-1,' *\/'],[-1,' projection: \"EPSG:4326\", '],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: units'],[-1,' * {String} The map units. Possible values are \'degrees\' (or \'dd\'), \'m\', '],[-1,' * \'ft\', \'km\', \'mi\', \'inches\'. Normally taken from the projection.'],[-1,' * Only required if both map and layers do not define a projection,'],[-1,' * or if they define a projection which does not define units'],[-1,' *\/'],[-1,' units: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: resolutions'],[-1,' * {Array(Float)} A list of map resolutions (map units per pixel) in '],[-1,' * descending order. If this is not set in the layer constructor, it '],[-1,' * will be set based on other resolution related properties '],[-1,' * (maxExtent, maxResolution, maxScale, etc.).'],[-1,' *\/'],[-1,' resolutions: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: maxResolution'],[-1,' * {Float} Required if you are not displaying the whole world on a tile'],[-1,' * with the size specified in <tileSize>.'],[-1,' *\/'],[-1,' maxResolution: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: minResolution'],[-1,' * {Float}'],[-1,' *\/'],[-1,' minResolution: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: maxScale'],[-1,' * {Float}'],[-1,' *\/'],[-1,' maxScale: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: minScale'],[-1,' * {Float}'],[-1,' *\/'],[-1,' minScale: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: maxExtent'],[-1,' * {<OpenLayers.Bounds>|Array} If provided as an array, the array'],[-1,' * should consist of four values (left, bottom, right, top).'],[-1,' * The maximum extent for the map.'],[-1,' * Default depends on projection; if this is one of those defined in OpenLayers.Projection.defaults'],[-1,' * (EPSG:4326 or web mercator), maxExtent will be set to the value defined there;'],[-1,' * else, defaults to null.'],[-1,' * To restrict user panning and zooming of the map, use <restrictedExtent> instead.'],[-1,' * The value for <maxExtent> will change calculations for tile URLs.'],[-1,' *\/'],[-1,' maxExtent: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: minExtent'],[-1,' * {<OpenLayers.Bounds>|Array} If provided as an array, the array'],[-1,' * should consist of four values (left, bottom, right, top).'],[-1,' * The minimum extent for the map. Defaults to null.'],[-1,' *\/'],[-1,' minExtent: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: restrictedExtent'],[-1,' * {<OpenLayers.Bounds>|Array} If provided as an array, the array'],[-1,' * should consist of four values (left, bottom, right, top).'],[-1,' * Limit map navigation to this extent where possible.'],[-1,' * If a non-null restrictedExtent is set, panning will be restricted'],[-1,' * to the given bounds. In addition, zooming to a resolution that'],[-1,' * displays more than the restricted extent will center the map'],[-1,' * on the restricted extent. If you wish to limit the zoom level'],[-1,' * or resolution, use maxResolution.'],[-1,' *\/'],[-1,' restrictedExtent: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: numZoomLevels'],[-1,' * {Integer} Number of zoom levels for the map. Defaults to 16. Set a'],[-1,' * different value in the map options if needed.'],[-1,' *\/'],[-1,' numZoomLevels: 16,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: theme'],[-1,' * {String} Relative path to a CSS file from which to load theme styles.'],[-1,' * Specify null in the map options (e.g. {theme: null}) if you '],[-1,' * want to get cascading style declarations - by putting links to '],[-1,' * stylesheets or style declarations directly in your page.'],[-1,' *\/'],[-1,' theme: null,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: displayProjection'],[-1,' * {<OpenLayers.Projection>} Requires proj4js support for projections other'],[-1,' * than EPSG:4326 or EPSG:900913\/EPSG:3857. Projection used by'],[-1,' * several controls to display data to user. If this property is set,'],[-1,' * it will be set on any control which has a null displayProjection'],[-1,' * property at the time the control is added to the map. '],[-1,' *\/'],[-1,' displayProjection: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: tileManager'],[-1,' * {<OpenLayers.TileManager>|Object} By default, and if the build contains'],[-1,' * TileManager.js, the map will use the TileManager to queue image requests'],[-1,' * and to cache tile image elements. To create a map without a TileManager'],[-1,' * configure the map with tileManager: null. To create a TileManager with'],[-1,' * non-default options, supply the options instead or alternatively supply'],[-1,' * an instance of {<OpenLayers.TileManager>}.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: fallThrough'],[-1,' * {Boolean} Should OpenLayers allow events on the map to fall through to'],[-1,' * other elements on the page, or should it swallow them? (#457)'],[-1,' * Default is to swallow.'],[-1,' *\/'],[-1,' fallThrough: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: autoUpdateSize'],[-1,' * {Boolean} Should OpenLayers automatically update the size of the map'],[-1,' * when the resize event is fired. Default is true.'],[-1,' *\/'],[-1,' autoUpdateSize: true,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: eventListeners'],[-1,' * {Object} If set as an option at construction, the eventListeners'],[-1,' * object will be registered with <OpenLayers.Events.on>. Object'],[-1,' * structure must be a listeners object as shown in the example for'],[-1,' * the events.on method.'],[-1,' *\/'],[-1,' eventListeners: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: panTween'],[-1,' * {<OpenLayers.Tween>} Animated panning tween object, see panTo()'],[-1,' *\/'],[-1,' panTween: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: panMethod'],[-1,' * {Function} The Easing function to be used for tweening. Default is'],[-1,' * OpenLayers.Easing.Expo.easeOut. Setting this to \'null\' turns off'],[-1,' * animated panning.'],[-1,' *\/'],[-1,' panMethod: OpenLayers.Easing.Expo.easeOut,'],[-1,' '],[-1,' \/**'],[-1,' * Property: panDuration'],[-1,' * {Integer} The number of steps to be passed to the'],[-1,' * OpenLayers.Tween.start() method when the map is'],[-1,' * panned.'],[-1,' * Default is 50.'],[-1,' *\/'],[-1,' panDuration: 50,'],[-1,' '],[-1,' \/**'],[-1,' * Property: zoomTween'],[-1,' * {<OpenLayers.Tween>} Animated zooming tween object, see zoomTo()'],[-1,' *\/'],[-1,' zoomTween: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: zoomMethod'],[-1,' * {Function} The Easing function to be used for tweening. Default is'],[-1,' * OpenLayers.Easing.Quad.easeOut. Setting this to \'null\' turns off'],[-1,' * animated zooming.'],[-1,' *\/'],[-1,' zoomMethod: OpenLayers.Easing.Quad.easeOut,'],[-1,' '],[-1,' \/**'],[-1,' * Property: zoomDuration'],[-1,' * {Integer} The number of steps to be passed to the'],[-1,' * OpenLayers.Tween.start() method when the map is zoomed.'],[-1,' * Default is 20.'],[-1,' *\/'],[-1,' zoomDuration: 20,'],[-1,' '],[-1,' \/**'],[-1,' * Property: paddingForPopups'],[-1,' * {<OpenLayers.Bounds>} Outside margin of the popup. Used to prevent '],[-1,' * the popup from getting too close to the map border.'],[-1,' *\/'],[-1,' paddingForPopups : null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: layerContainerOriginPx'],[-1,' * {Object} Cached object representing the layer container origin (in pixels).'],[-1,' *\/'],[-1,' layerContainerOriginPx: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: minPx'],[-1,' * {Object} An object with a \'x\' and \'y\' values that is the lower'],[-1,' * left of maxExtent in viewport pixel space.'],[-1,' * Used to verify in moveByPx that the new location we\'re moving to'],[-1,' * is valid. It is also used in the getLonLatFromViewPortPx function'],[-1,' * of Layer.'],[-1,' *\/'],[-1,' minPx: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: maxPx'],[-1,' * {Object} An object with a \'x\' and \'y\' values that is the top'],[-1,' * right of maxExtent in viewport pixel space.'],[-1,' * Used to verify in moveByPx that the new location we\'re moving to'],[-1,' * is valid.'],[-1,' *\/'],[-1,' maxPx: null,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Map'],[-1,' * Constructor for a new OpenLayers.Map instance. There are two possible'],[-1,' * ways to call the map constructor. See the examples below.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * div - {DOMElement|String} The element or id of an element in your page'],[-1,' * that will contain the map. May be omitted if the <div> option is'],[-1,' * provided or if you intend to call the <render> method later.'],[-1,' * options - {Object} Optional object with properties to tag onto the map.'],[-1,' *'],[-1,' * Valid options (in addition to the listed API properties):'],[-1,' * center - {<OpenLayers.LonLat>|Array} The default initial center of the map.'],[-1,' * If provided as array, the first value is the x coordinate,'],[-1,' * and the 2nd value is the y coordinate.'],[-1,' * Only specify if <layers> is provided.'],[-1,' * Note that if an ArgParser\/Permalink control is present,'],[-1,' * and the querystring contains coordinates, center will be set'],[-1,' * by that, and this option will be ignored.'],[-1,' * zoom - {Number} The initial zoom level for the map. Only specify if'],[-1,' * <layers> is provided.'],[-1,' * Note that if an ArgParser\/Permalink control is present,'],[-1,' * and the querystring contains a zoom level, zoom will be set'],[-1,' * by that, and this option will be ignored.'],[-1,' * '],[-1,' * Examples:'],[-1,' * (code)'],[-1,' * \/\/ create a map with default options in an element with the id \"map1\"'],[-1,' * var map = new OpenLayers.Map(\"map1\");'],[-1,' *'],[-1,' * \/\/ create a map with non-default options in an element with id \"map2\"'],[-1,' * var options = {'],[-1,' * projection: \"EPSG:3857\",'],[-1,' * maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000),'],[-1,' * center: new OpenLayers.LonLat(-12356463.476333, 5621521.4854095)'],[-1,' * };'],[-1,' * var map = new OpenLayers.Map(\"map2\", options);'],[-1,' *'],[-1,' * \/\/ map with non-default options - same as above but with a single argument,'],[-1,' * \/\/ a restricted extent, and using arrays for bounds and center'],[-1,' * var map = new OpenLayers.Map({'],[-1,' * div: \"map_id\",'],[-1,' * projection: \"EPSG:3857\",'],[-1,' * maxExtent: [-18924313.432222, -15538711.094146, 18924313.432222, 15538711.094146],'],[-1,' * restrictedExtent: [-13358338.893333, -9608371.5085962, 13358338.893333, 9608371.5085962],'],[-1,' * center: [-12356463.476333, 5621521.4854095]'],[-1,' * });'],[-1,' *'],[-1,' * \/\/ create a map without a reference to a container - call render later'],[-1,' * var map = new OpenLayers.Map({'],[-1,' * projection: \"EPSG:3857\",'],[-1,' * maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000)'],[-1,' * });'],[-1,' * (end)'],[-1,' *\/ '],[-1,' initialize: function (div, options) {'],[-1,' '],[-1,' \/\/ If only one argument is provided, check if it is an object.'],[0,' var isDOMElement = OpenLayers.Util.isElement(div);'],[0,' if(arguments.length === 1 && typeof div === \"object\" && !isDOMElement) {'],[0,' options = div;'],[0,' div = options && options.div;'],[-1,' }'],[-1,''],[-1,' \/\/ Simple-type defaults are set in class definition. '],[-1,' \/\/ Now set complex-type defaults '],[0,' this.tileSize = new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,'],[-1,' OpenLayers.Map.TILE_HEIGHT);'],[-1,' '],[0,' this.paddingForPopups = new OpenLayers.Bounds(15, 15, 15, 15);'],[-1,''],[0,' this.theme = OpenLayers._getScriptLocation() + '],[-1,' \'theme\/default\/style.css\'; '],[-1,''],[-1,' \/\/ backup original options'],[0,' this.options = OpenLayers.Util.extend({}, options);'],[-1,''],[-1,' \/\/ now override default options '],[0,' OpenLayers.Util.extend(this, options);'],[-1,' '],[0,' var projCode = this.projection instanceof OpenLayers.Projection ?'],[-1,' this.projection.projCode : this.projection;'],[0,' OpenLayers.Util.applyDefaults(this, OpenLayers.Projection.defaults[projCode]);'],[-1,' '],[-1,' \/\/ allow extents and center to be arrays'],[0,' if (this.maxExtent && !(this.maxExtent instanceof OpenLayers.Bounds)) {'],[0,' this.maxExtent = new OpenLayers.Bounds(this.maxExtent);'],[-1,' }'],[0,' if (this.minExtent && !(this.minExtent instanceof OpenLayers.Bounds)) {'],[0,' this.minExtent = new OpenLayers.Bounds(this.minExtent);'],[-1,' }'],[0,' if (this.restrictedExtent && !(this.restrictedExtent instanceof OpenLayers.Bounds)) {'],[0,' this.restrictedExtent = new OpenLayers.Bounds(this.restrictedExtent);'],[-1,' }'],[0,' if (this.center && !(this.center instanceof OpenLayers.LonLat)) {'],[0,' this.center = new OpenLayers.LonLat(this.center);'],[-1,' }'],[-1,''],[-1,' \/\/ initialize layers array'],[0,' this.layers = [];'],[-1,''],[0,' this.id = OpenLayers.Util.createUniqueID(\"OpenLayers.Map_\");'],[-1,''],[0,' this.div = OpenLayers.Util.getElement(div);'],[0,' if(!this.div) {'],[0,' this.div = document.createElement(\"div\");'],[0,' this.div.style.height = \"1px\";'],[0,' this.div.style.width = \"1px\";'],[-1,' }'],[-1,' '],[0,' OpenLayers.Element.addClass(this.div, \'olMap\');'],[-1,''],[-1,' \/\/ the viewPortDiv is the outermost div we modify'],[0,' var id = this.id + \"_OpenLayers_ViewPort\";'],[0,' this.viewPortDiv = OpenLayers.Util.createDiv(id, null, null, null,'],[-1,' \"relative\", null,'],[-1,' \"hidden\");'],[0,' this.viewPortDiv.style.width = \"100%\";'],[0,' this.viewPortDiv.style.height = \"100%\";'],[0,' this.viewPortDiv.className = \"olMapViewport\";'],[0,' this.div.appendChild(this.viewPortDiv);'],[-1,''],[0,' this.events = new OpenLayers.Events('],[-1,' this, this.viewPortDiv, null, this.fallThrough, '],[-1,' {includeXY: true}'],[-1,' );'],[-1,' '],[0,' if (OpenLayers.TileManager && this.tileManager !== null) {'],[0,' if (!(this.tileManager instanceof OpenLayers.TileManager)) {'],[0,' this.tileManager = new OpenLayers.TileManager(this.tileManager);'],[-1,' }'],[0,' this.tileManager.addMap(this);'],[-1,' }'],[-1,''],[-1,' \/\/ the layerContainerDiv is the one that holds all the layers'],[0,' id = this.id + \"_OpenLayers_Container\";'],[0,' this.layerContainerDiv = OpenLayers.Util.createDiv(id);'],[0,' this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE[\'Popup\']-1;'],[0,' this.layerContainerOriginPx = {x: 0, y: 0};'],[0,' this.applyTransform();'],[-1,' '],[0,' this.viewPortDiv.appendChild(this.layerContainerDiv);'],[-1,''],[0,' this.updateSize();'],[0,' if(this.eventListeners instanceof Object) {'],[0,' this.events.on(this.eventListeners);'],[-1,' }'],[-1,''],[0,' if (this.autoUpdateSize === true) {'],[-1,' \/\/ updateSize on catching the window\'s resize'],[-1,' \/\/ Note that this is ok, as updateSize() does nothing if the '],[-1,' \/\/ map\'s size has not actually changed.'],[0,' this.updateSizeDestroy = OpenLayers.Function.bind(this.updateSize, '],[-1,' this);'],[0,' OpenLayers.Event.observe(window, \'resize\','],[-1,' this.updateSizeDestroy);'],[-1,' }'],[-1,' '],[-1,' \/\/ only append link stylesheet if the theme property is set'],[0,' if(this.theme) {'],[-1,' \/\/ check existing links for equivalent url'],[0,' var addNode = true;'],[0,' var nodes = document.getElementsByTagName(\'link\');'],[0,' for(var i=0, len=nodes.length; i<len; ++i) {'],[0,' if(OpenLayers.Util.isEquivalentUrl(nodes.item(i).href,'],[-1,' this.theme)) {'],[0,' addNode = false;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' \/\/ only add a new node if one with an equivalent url hasn\'t already'],[-1,' \/\/ been added'],[0,' if(addNode) {'],[0,' var cssNode = document.createElement(\'link\');'],[0,' cssNode.setAttribute(\'rel\', \'stylesheet\');'],[0,' cssNode.setAttribute(\'type\', \'text\/css\');'],[0,' cssNode.setAttribute(\'href\', this.theme);'],[0,' document.getElementsByTagName(\'head\')[0].appendChild(cssNode);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if (this.controls == null) { \/\/ default controls'],[0,' this.controls = [];'],[0,' if (OpenLayers.Control != null) { \/\/ running full or lite?'],[-1,' \/\/ Navigation or TouchNavigation depending on what is in build'],[0,' if (OpenLayers.Control.Navigation) {'],[0,' this.controls.push(new OpenLayers.Control.Navigation());'],[0,' } else if (OpenLayers.Control.TouchNavigation) {'],[0,' this.controls.push(new OpenLayers.Control.TouchNavigation());'],[-1,' }'],[0,' if (OpenLayers.Control.Zoom) {'],[0,' this.controls.push(new OpenLayers.Control.Zoom());'],[0,' } else if (OpenLayers.Control.PanZoom) {'],[0,' this.controls.push(new OpenLayers.Control.PanZoom());'],[-1,' }'],[-1,''],[0,' if (OpenLayers.Control.ArgParser) {'],[0,' this.controls.push(new OpenLayers.Control.ArgParser());'],[-1,' }'],[0,' if (OpenLayers.Control.Attribution) {'],[0,' this.controls.push(new OpenLayers.Control.Attribution());'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[0,' for(var i=0, len=this.controls.length; i<len; i++) {'],[0,' this.addControlToMap(this.controls[i]);'],[-1,' }'],[-1,''],[0,' this.popups = [];'],[-1,''],[0,' this.unloadDestroy = OpenLayers.Function.bind(this.destroy, this);'],[-1,' '],[-1,''],[-1,' \/\/ always call map.destroy()'],[0,' OpenLayers.Event.observe(window, \'unload\', this.unloadDestroy);'],[-1,' '],[-1,' \/\/ add any initial layers'],[0,' if (options && options.layers) {'],[-1,' \/** '],[-1,' * If you have set options.center, the map center property will be'],[-1,' * set at this point. However, since setCenter has not been called,'],[-1,' * addLayers gets confused. So we delete the map center in this '],[-1,' * case. Because the check below uses options.center, it will'],[-1,' * be properly set below.'],[-1,' *\/'],[0,' delete this.center;'],[0,' delete this.zoom;'],[0,' this.addLayers(options.layers);'],[-1,' \/\/ set center (and optionally zoom)'],[0,' if (options.center && !this.getCenter()) {'],[-1,' \/\/ zoom can be undefined here'],[0,' this.setCenter(options.center, options.zoom);'],[-1,' }'],[-1,' }'],[-1,''],[0,' if (this.panMethod) {'],[0,' this.panTween = new OpenLayers.Tween(this.panMethod);'],[-1,' }'],[0,' if (this.zoomMethod && this.applyTransform.transform) {'],[0,' this.zoomTween = new OpenLayers.Tween(this.zoomMethod);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: getViewport'],[-1,' * Get the DOMElement representing the view port.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' getViewport: function() {'],[0,' return this.viewPortDiv;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: render'],[-1,' * Render the map to a specified container.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * div - {String|DOMElement} The container that the map should be rendered'],[-1,' * to. If different than the current container, the map viewport'],[-1,' * will be moved from the current to the new container.'],[-1,' *\/'],[-1,' render: function(div) {'],[0,' this.div = OpenLayers.Util.getElement(div);'],[0,' OpenLayers.Element.addClass(this.div, \'olMap\');'],[0,' this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);'],[0,' this.div.appendChild(this.viewPortDiv);'],[0,' this.updateSize();'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: unloadDestroy'],[-1,' * Function that is called to destroy the map on page unload. stored here'],[-1,' * so that if map is manually destroyed, we can unregister this.'],[-1,' *\/'],[-1,' unloadDestroy: null,'],[-1,' '],[-1,' \/**'],[-1,' * Method: updateSizeDestroy'],[-1,' * When the map is destroyed, we need to stop listening to updateSize'],[-1,' * events: this method stores the function we need to unregister in '],[-1,' * non-IE browsers.'],[-1,' *\/'],[-1,' updateSizeDestroy: null,'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' * Destroy this map.'],[-1,' * Note that if you are using an application which removes a container'],[-1,' * of the map from the DOM, you need to ensure that you destroy the'],[-1,' * map *before* this happens; otherwise, the page unload handler'],[-1,' * will fail because the DOM elements that map.destroy() wants'],[-1,' * to clean up will be gone. (See '],[-1,' * http:\/\/trac.osgeo.org\/openlayers\/ticket\/2277 for more information).'],[-1,' * This will apply to GeoExt and also to other applications which'],[-1,' * modify the DOM of the container of the OpenLayers Map.'],[-1,' *\/'],[-1,' destroy:function() {'],[-1,' \/\/ if unloadDestroy is null, we\'ve already been destroyed'],[0,' if (!this.unloadDestroy) {'],[0,' return false;'],[-1,' }'],[-1,' '],[-1,' \/\/ make sure panning doesn\'t continue after destruction'],[0,' if(this.panTween) {'],[0,' this.panTween.stop();'],[0,' this.panTween = null;'],[-1,' }'],[-1,' \/\/ make sure zooming doesn\'t continue after destruction'],[0,' if(this.zoomTween) {'],[0,' this.zoomTween.stop();'],[0,' this.zoomTween = null;'],[-1,' }'],[-1,''],[-1,' \/\/ map has been destroyed. dont do it again!'],[0,' OpenLayers.Event.stopObserving(window, \'unload\', this.unloadDestroy);'],[0,' this.unloadDestroy = null;'],[-1,''],[0,' if (this.updateSizeDestroy) {'],[0,' OpenLayers.Event.stopObserving(window, \'resize\', '],[-1,' this.updateSizeDestroy);'],[-1,' }'],[-1,' '],[0,' this.paddingForPopups = null; '],[-1,''],[0,' if (this.controls != null) {'],[0,' for (var i = this.controls.length - 1; i>=0; --i) {'],[0,' this.controls[i].destroy();'],[-1,' } '],[0,' this.controls = null;'],[-1,' }'],[0,' if (this.layers != null) {'],[0,' for (var i = this.layers.length - 1; i>=0; --i) {'],[-1,' \/\/pass \'false\' to destroy so that map wont try to set a new '],[-1,' \/\/ baselayer after each baselayer is removed'],[0,' this.layers[i].destroy(false);'],[-1,' } '],[0,' this.layers = null;'],[-1,' }'],[0,' if (this.viewPortDiv && this.viewPortDiv.parentNode) {'],[0,' this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);'],[-1,' }'],[0,' this.viewPortDiv = null;'],[-1,' '],[0,' if (this.tileManager) {'],[0,' this.tileManager.removeMap(this);'],[0,' this.tileManager = null;'],[-1,' }'],[-1,''],[0,' if(this.eventListeners) {'],[0,' this.events.un(this.eventListeners);'],[0,' this.eventListeners = null;'],[-1,' }'],[0,' this.events.destroy();'],[0,' this.events = null;'],[-1,''],[0,' this.options = null;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: setOptions'],[-1,' * Change the map options'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} Hashtable of options to tag to the map'],[-1,' *\/'],[-1,' setOptions: function(options) {'],[0,' var updatePxExtent = this.minPx &&'],[-1,' options.restrictedExtent != this.restrictedExtent;'],[0,' OpenLayers.Util.extend(this, options);'],[-1,' \/\/ force recalculation of minPx and maxPx'],[0,' updatePxExtent && this.moveTo(this.getCachedCenter(), this.zoom, {'],[-1,' forceZoomChange: true'],[-1,' });'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getTileSize'],[-1,' * Get the tile size for the map'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Size>}'],[-1,' *\/'],[-1,' getTileSize: function() {'],[0,' return this.tileSize;'],[-1,' },'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getBy'],[-1,' * Get a list of objects given a property and a match item.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * array - {String} A property on the map whose value is an array.'],[-1,' * property - {String} A property on each item of the given array.'],[-1,' * match - {String | Object} A string to match. Can also be a regular'],[-1,' * expression literal or object. In addition, it can be any object'],[-1,' * with a method named test. For reqular expressions or other, if'],[-1,' * match.test(map[array][i][property]) evaluates to true, the item will'],[-1,' * be included in the array returned. If no items are found, an empty'],[-1,' * array is returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array} An array of items where the given property matches the given'],[-1,' * criteria.'],[-1,' *\/'],[-1,' getBy: function(array, property, match) {'],[0,' var test = (typeof match.test == \"function\");'],[0,' var found = OpenLayers.Array.filter(this[array], function(item) {'],[0,' return item[property] == match || (test && match.test(item[property]));'],[-1,' });'],[0,' return found;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getLayersBy'],[-1,' * Get a list of layers with properties matching the given criteria.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * property - {String} A layer property to be matched.'],[-1,' * match - {String | Object} A string to match. Can also be a regular'],[-1,' * expression literal or object. In addition, it can be any object'],[-1,' * with a method named test. For reqular expressions or other, if'],[-1,' * match.test(layer[property]) evaluates to true, the layer will be'],[-1,' * included in the array returned. If no layers are found, an empty'],[-1,' * array is returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(<OpenLayers.Layer>)} A list of layers matching the given criteria.'],[-1,' * An empty array is returned if no matches are found.'],[-1,' *\/'],[-1,' getLayersBy: function(property, match) {'],[0,' return this.getBy(\"layers\", property, match);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getLayersByName'],[-1,' * Get a list of layers with names matching the given name.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * match - {String | Object} A layer name. The name can also be a regular'],[-1,' * expression literal or object. In addition, it can be any object'],[-1,' * with a method named test. For reqular expressions or other, if'],[-1,' * name.test(layer.name) evaluates to true, the layer will be included'],[-1,' * in the list of layers returned. If no layers are found, an empty'],[-1,' * array is returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(<OpenLayers.Layer>)} A list of layers matching the given name.'],[-1,' * An empty array is returned if no matches are found.'],[-1,' *\/'],[-1,' getLayersByName: function(match) {'],[0,' return this.getLayersBy(\"name\", match);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getLayersByClass'],[-1,' * Get a list of layers of a given class (CLASS_NAME).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * match - {String | Object} A layer class name. The match can also be a'],[-1,' * regular expression literal or object. In addition, it can be any'],[-1,' * object with a method named test. For reqular expressions or other,'],[-1,' * if type.test(layer.CLASS_NAME) evaluates to true, the layer will'],[-1,' * be included in the list of layers returned. If no layers are'],[-1,' * found, an empty array is returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(<OpenLayers.Layer>)} A list of layers matching the given class.'],[-1,' * An empty array is returned if no matches are found.'],[-1,' *\/'],[-1,' getLayersByClass: function(match) {'],[0,' return this.getLayersBy(\"CLASS_NAME\", match);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getControlsBy'],[-1,' * Get a list of controls with properties matching the given criteria.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * property - {String} A control property to be matched.'],[-1,' * match - {String | Object} A string to match. Can also be a regular'],[-1,' * expression literal or object. In addition, it can be any object'],[-1,' * with a method named test. For reqular expressions or other, if'],[-1,' * match.test(layer[property]) evaluates to true, the layer will be'],[-1,' * included in the array returned. If no layers are found, an empty'],[-1,' * array is returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(<OpenLayers.Control>)} A list of controls matching the given'],[-1,' * criteria. An empty array is returned if no matches are found.'],[-1,' *\/'],[-1,' getControlsBy: function(property, match) {'],[0,' return this.getBy(\"controls\", property, match);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getControlsByClass'],[-1,' * Get a list of controls of a given class (CLASS_NAME).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * match - {String | Object} A control class name. The match can also be a'],[-1,' * regular expression literal or object. In addition, it can be any'],[-1,' * object with a method named test. For reqular expressions or other,'],[-1,' * if type.test(control.CLASS_NAME) evaluates to true, the control will'],[-1,' * be included in the list of controls returned. If no controls are'],[-1,' * found, an empty array is returned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(<OpenLayers.Control>)} A list of controls matching the given class.'],[-1,' * An empty array is returned if no matches are found.'],[-1,' *\/'],[-1,' getControlsByClass: function(match) {'],[0,' return this.getControlsBy(\"CLASS_NAME\", match);'],[-1,' },'],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Layer Functions *\/'],[-1,' \/* *\/'],[-1,' \/* The following functions deal with adding and *\/'],[-1,' \/* removing Layers to and from the Map *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/ '],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getLayer'],[-1,' * Get a layer based on its id'],[-1,' *'],[-1,' * Parameters:'],[-1,' * id - {String} A layer id'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Layer>} The Layer with the corresponding id from the map\'s '],[-1,' * layer collection, or null if not found.'],[-1,' *\/'],[-1,' getLayer: function(id) {'],[0,' var foundLayer = null;'],[0,' for (var i=0, len=this.layers.length; i<len; i++) {'],[0,' var layer = this.layers[i];'],[0,' if (layer.id == id) {'],[0,' foundLayer = layer;'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' return foundLayer;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setLayerZIndex'],[-1,' * '],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>} '],[-1,' * zIdx - {int} '],[-1,' *\/ '],[-1,' setLayerZIndex: function (layer, zIdx) {'],[0,' layer.setZIndex('],[-1,' this.Z_INDEX_BASE[layer.isBaseLayer ? \'BaseLayer\' : \'Overlay\']'],[-1,' + zIdx * 5 );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: resetLayersZIndex'],[-1,' * Reset each layer\'s z-index based on layer\'s array index'],[-1,' *\/'],[-1,' resetLayersZIndex: function() {'],[0,' for (var i=0, len=this.layers.length; i<len; i++) {'],[0,' var layer = this.layers[i];'],[0,' this.setLayerZIndex(layer, i);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addLayer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>} '],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} True if the layer has been added to the map.'],[-1,' *\/ '],[-1,' addLayer: function (layer) {'],[0,' for(var i = 0, len = this.layers.length; i < len; i++) {'],[0,' if (this.layers[i] == layer) {'],[0,' return false;'],[-1,' }'],[-1,' }'],[0,' if (this.events.triggerEvent(\"preaddlayer\", {layer: layer}) === false) {'],[0,' return false;'],[-1,' }'],[0,' if(this.allOverlays) {'],[0,' layer.isBaseLayer = false;'],[-1,' }'],[-1,' '],[0,' layer.div.className = \"olLayerDiv\";'],[0,' layer.div.style.overflow = \"\";'],[0,' this.setLayerZIndex(layer, this.layers.length);'],[-1,''],[0,' if (layer.isFixed) {'],[0,' this.viewPortDiv.appendChild(layer.div);'],[-1,' } else {'],[0,' this.layerContainerDiv.appendChild(layer.div);'],[-1,' }'],[0,' this.layers.push(layer);'],[0,' layer.setMap(this);'],[-1,''],[0,' if (layer.isBaseLayer || (this.allOverlays && !this.baseLayer)) {'],[0,' if (this.baseLayer == null) {'],[-1,' \/\/ set the first baselaye we add as the baselayer'],[0,' this.setBaseLayer(layer);'],[-1,' } else {'],[0,' layer.setVisibility(false);'],[-1,' }'],[-1,' } else {'],[0,' layer.redraw();'],[-1,' }'],[-1,''],[0,' this.events.triggerEvent(\"addlayer\", {layer: layer});'],[0,' layer.events.triggerEvent(\"added\", {map: this, layer: layer});'],[0,' layer.afterAdd();'],[-1,''],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addLayers '],[-1,' *'],[-1,' * Parameters:'],[-1,' * layers - {Array(<OpenLayers.Layer>)} '],[-1,' *\/ '],[-1,' addLayers: function (layers) {'],[0,' for (var i=0, len=layers.length; i<len; i++) {'],[0,' this.addLayer(layers[i]);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: removeLayer'],[-1,' * Removes a layer from the map by removing its visual element (the '],[-1,' * layer.div property), then removing it from the map\'s internal list '],[-1,' * of layers, setting the layer\'s map property to null. '],[-1,' * '],[-1,' * a \"removelayer\" event is triggered.'],[-1,' * '],[-1,' * very worthy of mention is that simply removing a layer from a map'],[-1,' * will not cause the removal of any popups which may have been created'],[-1,' * by the layer. this is due to the fact that it was decided at some'],[-1,' * point that popups would not belong to layers. thus there is no way '],[-1,' * for us to know here to which layer the popup belongs.'],[-1,' * '],[-1,' * A simple solution to this is simply to call destroy() on the layer.'],[-1,' * the default OpenLayers.Layer class\'s destroy() function'],[-1,' * automatically takes care to remove itself from whatever map it has'],[-1,' * been attached to. '],[-1,' * '],[-1,' * The correct solution is for the layer itself to register an '],[-1,' * event-handler on \"removelayer\" and when it is called, if it '],[-1,' * recognizes itself as the layer being removed, then it cycles through'],[-1,' * its own personal list of popups, removing them from the map.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>} '],[-1,' * setNewBaseLayer - {Boolean} Default is true'],[-1,' *\/'],[-1,' removeLayer: function(layer, setNewBaseLayer) {'],[0,' if (this.events.triggerEvent(\"preremovelayer\", {layer: layer}) === false) {'],[0,' return;'],[-1,' }'],[0,' if (setNewBaseLayer == null) {'],[0,' setNewBaseLayer = true;'],[-1,' }'],[-1,''],[0,' if (layer.isFixed) {'],[0,' this.viewPortDiv.removeChild(layer.div);'],[-1,' } else {'],[0,' this.layerContainerDiv.removeChild(layer.div);'],[-1,' }'],[0,' OpenLayers.Util.removeItem(this.layers, layer);'],[0,' layer.removeMap(this);'],[0,' layer.map = null;'],[-1,''],[-1,' \/\/ if we removed the base layer, need to set a new one'],[0,' if(this.baseLayer == layer) {'],[0,' this.baseLayer = null;'],[0,' if(setNewBaseLayer) {'],[0,' for(var i=0, len=this.layers.length; i<len; i++) {'],[0,' var iLayer = this.layers[i];'],[0,' if (iLayer.isBaseLayer || this.allOverlays) {'],[0,' this.setBaseLayer(iLayer);'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[0,' this.resetLayersZIndex();'],[-1,''],[0,' this.events.triggerEvent(\"removelayer\", {layer: layer});'],[0,' layer.events.triggerEvent(\"removed\", {map: this, layer: layer});'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getNumLayers'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Int} The number of layers attached to the map.'],[-1,' *\/'],[-1,' getNumLayers: function () {'],[0,' return this.layers.length;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: getLayerIndex'],[-1,' *'],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Integer} The current (zero-based) index of the given layer in the map\'s'],[-1,' * layer stack. Returns -1 if the layer isn\'t on the map.'],[-1,' *\/'],[-1,' getLayerIndex: function (layer) {'],[0,' return OpenLayers.Util.indexOf(this.layers, layer);'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: setLayerIndex'],[-1,' * Move the given layer to the specified (zero-based) index in the layer'],[-1,' * list, changing its z-index in the map display. Use'],[-1,' * map.getLayerIndex() to find out the current index of a layer. Note'],[-1,' * that this cannot (or at least should not) be effectively used to'],[-1,' * raise base layers above overlays.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>} '],[-1,' * idx - {int} '],[-1,' *\/'],[-1,' setLayerIndex: function (layer, idx) {'],[0,' var base = this.getLayerIndex(layer);'],[0,' if (idx < 0) {'],[0,' idx = 0;'],[0,' } else if (idx > this.layers.length) {'],[0,' idx = this.layers.length;'],[-1,' }'],[0,' if (base != idx) {'],[0,' this.layers.splice(base, 1);'],[0,' this.layers.splice(idx, 0, layer);'],[0,' for (var i=0, len=this.layers.length; i<len; i++) {'],[0,' this.setLayerZIndex(this.layers[i], i);'],[-1,' }'],[0,' this.events.triggerEvent(\"changelayer\", {'],[-1,' layer: layer, property: \"order\"'],[-1,' });'],[0,' if(this.allOverlays) {'],[0,' if(idx === 0) {'],[0,' this.setBaseLayer(layer);'],[0,' } else if(this.baseLayer !== this.layers[0]) {'],[0,' this.setBaseLayer(this.layers[0]);'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: raiseLayer'],[-1,' * Change the index of the given layer by delta. If delta is positive, '],[-1,' * the layer is moved up the map\'s layer stack; if delta is negative,'],[-1,' * the layer is moved down. Again, note that this cannot (or at least'],[-1,' * should not) be effectively used to raise base layers above overlays.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>} '],[-1,' * delta - {int} '],[-1,' *\/'],[-1,' raiseLayer: function (layer, delta) {'],[0,' var idx = this.getLayerIndex(layer) + delta;'],[0,' this.setLayerIndex(layer, idx);'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: setBaseLayer'],[-1,' * Allows user to specify one of the currently-loaded layers as the Map\'s'],[-1,' * new base layer.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newBaseLayer - {<OpenLayers.Layer>}'],[-1,' *\/'],[-1,' setBaseLayer: function(newBaseLayer) {'],[-1,' '],[0,' if (newBaseLayer != this.baseLayer) {'],[-1,' '],[-1,' \/\/ ensure newBaseLayer is already loaded'],[0,' if (OpenLayers.Util.indexOf(this.layers, newBaseLayer) != -1) {'],[-1,''],[-1,' \/\/ preserve center and scale when changing base layers'],[0,' var center = this.getCachedCenter();'],[0,' var oldResolution = this.getResolution();'],[0,' var newResolution = OpenLayers.Util.getResolutionFromScale('],[-1,' this.getScale(), newBaseLayer.units'],[-1,' );'],[-1,''],[-1,' \/\/ make the old base layer invisible '],[0,' if (this.baseLayer != null && !this.allOverlays) {'],[0,' this.baseLayer.setVisibility(false);'],[-1,' }'],[-1,''],[-1,' \/\/ set new baselayer'],[0,' this.baseLayer = newBaseLayer;'],[-1,' '],[0,' if(!this.allOverlays || this.baseLayer.visibility) {'],[0,' this.baseLayer.setVisibility(true);'],[-1,' \/\/ Layer may previously have been visible but not in range.'],[-1,' \/\/ In this case we need to redraw it to make it visible.'],[0,' if (this.baseLayer.inRange === false) {'],[0,' this.baseLayer.redraw();'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ recenter the map'],[0,' if (center != null) {'],[-1,' \/\/ new zoom level derived from old scale'],[0,' var newZoom = this.getZoomForResolution('],[-1,' newResolution || this.resolution, true'],[-1,' );'],[-1,' \/\/ zoom and force zoom change'],[0,' this.setCenter(center, newZoom, false, oldResolution != newResolution);'],[-1,' }'],[-1,''],[0,' this.events.triggerEvent(\"changebaselayer\", {'],[-1,' layer: this.baseLayer'],[-1,' });'],[-1,' } '],[-1,' }'],[-1,' },'],[-1,''],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Control Functions *\/'],[-1,' \/* *\/'],[-1,' \/* The following functions deal with adding and *\/'],[-1,' \/* removing Controls to and from the Map *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/ '],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addControl'],[-1,' * Add the passed over control to the map. Optionally '],[-1,' * position the control at the given pixel.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>}'],[-1,' * px - {<OpenLayers.Pixel>}'],[-1,' *\/ '],[-1,' addControl: function (control, px) {'],[0,' this.controls.push(control);'],[0,' this.addControlToMap(control, px);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: addControls'],[-1,' * Add all of the passed over controls to the map. '],[-1,' * You can pass over an optional second array'],[-1,' * with pixel-objects to position the controls.'],[-1,' * The indices of the two arrays should match and'],[-1,' * you can add null as pixel for those controls '],[-1,' * you want to be autopositioned. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * controls - {Array(<OpenLayers.Control>)}'],[-1,' * pixels - {Array(<OpenLayers.Pixel>)}'],[-1,' *\/ '],[-1,' addControls: function (controls, pixels) {'],[0,' var pxs = (arguments.length === 1) ? [] : pixels;'],[0,' for (var i=0, len=controls.length; i<len; i++) {'],[0,' var ctrl = controls[i];'],[0,' var px = (pxs[i]) ? pxs[i] : null;'],[0,' this.addControl( ctrl, px );'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: addControlToMap'],[-1,' * '],[-1,' * Parameters:'],[-1,' * '],[-1,' * control - {<OpenLayers.Control>}'],[-1,' * px - {<OpenLayers.Pixel>}'],[-1,' *\/ '],[-1,' addControlToMap: function (control, px) {'],[-1,' \/\/ If a control doesn\'t have a div at this point, it belongs in the'],[-1,' \/\/ viewport.'],[0,' control.outsideViewport = (control.div != null);'],[-1,' '],[-1,' \/\/ If the map has a displayProjection, and the control doesn\'t, set '],[-1,' \/\/ the display projection.'],[0,' if (this.displayProjection && !control.displayProjection) {'],[0,' control.displayProjection = this.displayProjection;'],[-1,' } '],[-1,' '],[0,' control.setMap(this);'],[0,' var div = control.draw(px);'],[0,' if (div) {'],[0,' if(!control.outsideViewport) {'],[0,' div.style.zIndex = this.Z_INDEX_BASE[\'Control\'] +'],[-1,' this.controls.length;'],[0,' this.viewPortDiv.appendChild( div );'],[-1,' }'],[-1,' }'],[0,' if(control.autoActivate) {'],[0,' control.activate();'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getControl'],[-1,' * '],[-1,' * Parameters:'],[-1,' * id - {String} ID of the control to return.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Control>} The control from the map\'s list of controls '],[-1,' * which has a matching \'id\'. If none found, '],[-1,' * returns null.'],[-1,' *\/ '],[-1,' getControl: function (id) {'],[0,' var returnControl = null;'],[0,' for(var i=0, len=this.controls.length; i<len; i++) {'],[0,' var control = this.controls[i];'],[0,' if (control.id == id) {'],[0,' returnControl = control;'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' return returnControl;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: removeControl'],[-1,' * Remove a control from the map. Removes the control both from the map '],[-1,' * object\'s internal array of controls, as well as from the map\'s '],[-1,' * viewPort (assuming the control was not added outsideViewport)'],[-1,' * '],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>} The control to remove.'],[-1,' *\/ '],[-1,' removeControl: function (control) {'],[-1,' \/\/make sure control is non-null and actually part of our map'],[0,' if ( (control) && (control == this.getControl(control.id)) ) {'],[0,' if (control.div && (control.div.parentNode == this.viewPortDiv)) {'],[0,' this.viewPortDiv.removeChild(control.div);'],[-1,' }'],[0,' OpenLayers.Util.removeItem(this.controls, control);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Popup Functions *\/'],[-1,' \/* *\/'],[-1,' \/* The following functions deal with adding and *\/'],[-1,' \/* removing Popups to and from the Map *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/ '],[-1,''],[-1,' \/** '],[-1,' * APIMethod: addPopup'],[-1,' * '],[-1,' * Parameters:'],[-1,' * popup - {<OpenLayers.Popup>}'],[-1,' * exclusive - {Boolean} If true, closes all other popups first'],[-1,' *\/'],[-1,' addPopup: function(popup, exclusive) {'],[-1,''],[0,' if (exclusive) {'],[-1,' \/\/remove all other popups from screen'],[0,' for (var i = this.popups.length - 1; i >= 0; --i) {'],[0,' this.removePopup(this.popups[i]);'],[-1,' }'],[-1,' }'],[-1,''],[0,' popup.map = this;'],[0,' this.popups.push(popup);'],[0,' var popupDiv = popup.draw();'],[0,' if (popupDiv) {'],[0,' popupDiv.style.zIndex = this.Z_INDEX_BASE[\'Popup\'] +'],[-1,' this.popups.length;'],[0,' this.layerContainerDiv.appendChild(popupDiv);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: removePopup'],[-1,' * '],[-1,' * Parameters:'],[-1,' * popup - {<OpenLayers.Popup>}'],[-1,' *\/'],[-1,' removePopup: function(popup) {'],[0,' OpenLayers.Util.removeItem(this.popups, popup);'],[0,' if (popup.div) {'],[0,' try { this.layerContainerDiv.removeChild(popup.div); }'],[-1,' catch (e) { } \/\/ Popups sometimes apparently get disconnected'],[-1,' \/\/ from the layerContainerDiv, and cause complaints.'],[-1,' }'],[0,' popup.map = null;'],[-1,' },'],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Container Div Functions *\/'],[-1,' \/* *\/'],[-1,' \/* The following functions deal with the access to *\/'],[-1,' \/* and maintenance of the size of the container div *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/ '],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getSize'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Size>} An <OpenLayers.Size> object that represents the '],[-1,' * size, in pixels, of the div into which OpenLayers '],[-1,' * has been loaded. '],[-1,' * Note - A clone() of this locally cached variable is'],[-1,' * returned, so as not to allow users to modify it.'],[-1,' *\/'],[-1,' getSize: function () {'],[0,' var size = null;'],[0,' if (this.size != null) {'],[0,' size = this.size.clone();'],[-1,' }'],[0,' return size;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: updateSize'],[-1,' * This function should be called by any external code which dynamically'],[-1,' * changes the size of the map div (because mozilla wont let us catch '],[-1,' * the \"onresize\" for an element)'],[-1,' *\/'],[-1,' updateSize: function() {'],[-1,' \/\/ the div might have moved on the page, also'],[0,' var newSize = this.getCurrentSize();'],[0,' if (newSize && !isNaN(newSize.h) && !isNaN(newSize.w)) {'],[0,' this.events.clearMouseCache();'],[0,' var oldSize = this.getSize();'],[0,' if (oldSize == null) {'],[0,' this.size = oldSize = newSize;'],[-1,' }'],[0,' if (!newSize.equals(oldSize)) {'],[-1,' '],[-1,' \/\/ store the new size'],[0,' this.size = newSize;'],[-1,' '],[-1,' \/\/notify layers of mapresize'],[0,' for(var i=0, len=this.layers.length; i<len; i++) {'],[0,' this.layers[i].onMapResize(); '],[-1,' }'],[-1,' '],[0,' var center = this.getCachedCenter();'],[-1,' '],[0,' if (this.baseLayer != null && center != null) {'],[0,' var zoom = this.getZoom();'],[0,' this.zoom = null;'],[0,' this.setCenter(center, zoom);'],[-1,' }'],[-1,' '],[-1,' }'],[-1,' }'],[0,' this.events.triggerEvent(\"updatesize\");'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getCurrentSize'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Size>} A new <OpenLayers.Size> object with the dimensions '],[-1,' * of the map div'],[-1,' *\/'],[-1,' getCurrentSize: function() {'],[-1,''],[0,' var size = new OpenLayers.Size(this.div.clientWidth, '],[-1,' this.div.clientHeight);'],[-1,''],[0,' if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {'],[0,' size.w = this.div.offsetWidth;'],[0,' size.h = this.div.offsetHeight;'],[-1,' }'],[0,' if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {'],[0,' size.w = parseInt(this.div.style.width);'],[0,' size.h = parseInt(this.div.style.height);'],[-1,' }'],[0,' return size;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: calculateBounds'],[-1,' * '],[-1,' * Parameters:'],[-1,' * center - {<OpenLayers.LonLat>} Default is this.getCenter()'],[-1,' * resolution - {float} Default is this.getResolution() '],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A bounds based on resolution, center, and '],[-1,' * current mapsize.'],[-1,' *\/'],[-1,' calculateBounds: function(center, resolution) {'],[-1,''],[0,' var extent = null;'],[-1,' '],[0,' if (center == null) {'],[0,' center = this.getCachedCenter();'],[-1,' } '],[0,' if (resolution == null) {'],[0,' resolution = this.getResolution();'],[-1,' }'],[-1,' '],[0,' if ((center != null) && (resolution != null)) {'],[0,' var halfWDeg = (this.size.w * resolution) \/ 2;'],[0,' var halfHDeg = (this.size.h * resolution) \/ 2;'],[-1,' '],[0,' extent = new OpenLayers.Bounds(center.lon - halfWDeg,'],[-1,' center.lat - halfHDeg,'],[-1,' center.lon + halfWDeg,'],[-1,' center.lat + halfHDeg);'],[-1,' }'],[-1,''],[0,' return extent;'],[-1,' },'],[-1,''],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Zoom, Center, Pan Functions *\/'],[-1,' \/* *\/'],[-1,' \/* The following functions handle the validation, *\/'],[-1,' \/* getting and setting of the Zoom Level and Center *\/'],[-1,' \/* as well as the panning of the Map *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/'],[-1,' \/**'],[-1,' * APIMethod: getCenter'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>}'],[-1,' *\/'],[-1,' getCenter: function () {'],[0,' var center = null;'],[0,' var cachedCenter = this.getCachedCenter();'],[0,' if (cachedCenter) {'],[0,' center = cachedCenter.clone();'],[-1,' }'],[0,' return center;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getCachedCenter'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>}'],[-1,' *\/'],[-1,' getCachedCenter: function() {'],[0,' if (!this.center && this.size) {'],[0,' this.center = this.getLonLatFromViewPortPx({'],[-1,' x: this.size.w \/ 2,'],[-1,' y: this.size.h \/ 2'],[-1,' });'],[-1,' }'],[0,' return this.center;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getZoom'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer}'],[-1,' *\/'],[-1,' getZoom: function () {'],[0,' return this.zoom;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: pan'],[-1,' * Allows user to pan by a value of screen pixels'],[-1,' * '],[-1,' * Parameters:'],[-1,' * dx - {Integer}'],[-1,' * dy - {Integer}'],[-1,' * options - {Object} Options to configure panning:'],[-1,' * - *animate* {Boolean} Use panTo instead of setCenter. Default is true.'],[-1,' * - *dragging* {Boolean} Call setCenter with dragging true. Default is'],[-1,' * false.'],[-1,' *\/'],[-1,' pan: function(dx, dy, options) {'],[0,' options = OpenLayers.Util.applyDefaults(options, {'],[-1,' animate: true,'],[-1,' dragging: false'],[-1,' });'],[0,' if (options.dragging) {'],[0,' if (dx != 0 || dy != 0) {'],[0,' this.moveByPx(dx, dy);'],[-1,' }'],[-1,' } else {'],[-1,' \/\/ getCenter'],[0,' var centerPx = this.getViewPortPxFromLonLat(this.getCachedCenter());'],[-1,''],[-1,' \/\/ adjust'],[0,' var newCenterPx = centerPx.add(dx, dy);'],[-1,''],[0,' if (this.dragging || !newCenterPx.equals(centerPx)) {'],[0,' var newCenterLonLat = this.getLonLatFromViewPortPx(newCenterPx);'],[0,' if (options.animate) {'],[0,' this.panTo(newCenterLonLat);'],[-1,' } else {'],[0,' this.moveTo(newCenterLonLat);'],[0,' if(this.dragging) {'],[0,' this.dragging = false;'],[0,' this.events.triggerEvent(\"moveend\");'],[-1,' }'],[-1,' } '],[-1,' }'],[-1,' } '],[-1,''],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: panTo'],[-1,' * Allows user to pan to a new lonlat.'],[-1,' * If the new lonlat is in the current extent the map will slide smoothly'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>}'],[-1,' *\/'],[-1,' panTo: function(lonlat) {'],[0,' if (this.panTween && this.getExtent().scale(this.panRatio).containsLonLat(lonlat)) {'],[0,' var center = this.getCachedCenter();'],[-1,''],[-1,' \/\/ center will not change, don\'t do nothing'],[0,' if (lonlat.equals(center)) {'],[0,' return;'],[-1,' }'],[-1,''],[0,' var from = this.getPixelFromLonLat(center);'],[0,' var to = this.getPixelFromLonLat(lonlat);'],[0,' var vector = { x: to.x - from.x, y: to.y - from.y };'],[0,' var last = { x: 0, y: 0 };'],[-1,''],[0,' this.panTween.start( { x: 0, y: 0 }, vector, this.panDuration, {'],[-1,' callbacks: {'],[-1,' eachStep: OpenLayers.Function.bind(function(px) {'],[0,' var x = px.x - last.x,'],[-1,' y = px.y - last.y;'],[0,' this.moveByPx(x, y);'],[0,' last.x = Math.round(px.x);'],[0,' last.y = Math.round(px.y);'],[-1,' }, this),'],[-1,' done: OpenLayers.Function.bind(function(px) {'],[0,' this.moveTo(lonlat);'],[0,' this.dragging = false;'],[0,' this.events.triggerEvent(\"moveend\");'],[-1,' }, this)'],[-1,' }'],[-1,' });'],[-1,' } else {'],[0,' this.setCenter(lonlat);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: setCenter'],[-1,' * Set the map center (and optionally, the zoom level).'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>|Array} The new center location.'],[-1,' * If provided as array, the first value is the x coordinate,'],[-1,' * and the 2nd value is the y coordinate.'],[-1,' * zoom - {Integer} Optional zoom level.'],[-1,' * dragging - {Boolean} Specifies whether or not to trigger '],[-1,' * movestart\/end events'],[-1,' * forceZoomChange - {Boolean} Specifies whether or not to trigger zoom '],[-1,' * change events (needed on baseLayer change)'],[-1,' *'],[-1,' * TBD: reconsider forceZoomChange in 3.0'],[-1,' *\/'],[-1,' setCenter: function(lonlat, zoom, dragging, forceZoomChange) {'],[0,' if (this.panTween) {'],[0,' this.panTween.stop();'],[-1,' }'],[0,' if (this.zoomTween) {'],[0,' this.zoomTween.stop();'],[-1,' } '],[0,' this.moveTo(lonlat, zoom, {'],[-1,' \'dragging\': dragging,'],[-1,' \'forceZoomChange\': forceZoomChange'],[-1,' });'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: moveByPx'],[-1,' * Drag the map by pixels.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * dx - {Number}'],[-1,' * dy - {Number}'],[-1,' *\/'],[-1,' moveByPx: function(dx, dy) {'],[0,' var hw = this.size.w \/ 2;'],[0,' var hh = this.size.h \/ 2;'],[0,' var x = hw + dx;'],[0,' var y = hh + dy;'],[0,' var wrapDateLine = this.baseLayer.wrapDateLine;'],[0,' var xRestriction = 0;'],[0,' var yRestriction = 0;'],[0,' if (this.restrictedExtent) {'],[0,' xRestriction = hw;'],[0,' yRestriction = hh;'],[-1,' \/\/ wrapping the date line makes no sense for restricted extents'],[0,' wrapDateLine = false;'],[-1,' }'],[0,' dx = wrapDateLine ||'],[-1,' x <= this.maxPx.x - xRestriction &&'],[-1,' x >= this.minPx.x + xRestriction ? Math.round(dx) : 0;'],[0,' dy = y <= this.maxPx.y - yRestriction &&'],[-1,' y >= this.minPx.y + yRestriction ? Math.round(dy) : 0;'],[0,' if (dx || dy) {'],[0,' if (!this.dragging) {'],[0,' this.dragging = true;'],[0,' this.events.triggerEvent(\"movestart\");'],[-1,' }'],[0,' this.center = null;'],[0,' if (dx) {'],[0,' this.layerContainerOriginPx.x -= dx;'],[0,' this.minPx.x -= dx;'],[0,' this.maxPx.x -= dx;'],[-1,' }'],[0,' if (dy) {'],[0,' this.layerContainerOriginPx.y -= dy;'],[0,' this.minPx.y -= dy;'],[0,' this.maxPx.y -= dy;'],[-1,' }'],[0,' this.applyTransform();'],[0,' var layer, i, len;'],[0,' for (i=0, len=this.layers.length; i<len; ++i) {'],[0,' layer = this.layers[i];'],[0,' if (layer.visibility &&'],[-1,' (layer === this.baseLayer || layer.inRange)) {'],[0,' layer.moveByPx(dx, dy);'],[0,' layer.events.triggerEvent(\"move\");'],[-1,' }'],[-1,' }'],[0,' this.events.triggerEvent(\"move\");'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: adjustZoom'],[-1,' *'],[-1,' * Parameters:'],[-1,' * zoom - {Number} The zoom level to adjust'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Integer} Adjusted zoom level that shows a map not wider than its'],[-1,' * <baseLayer>\'s maxExtent.'],[-1,' *\/'],[-1,' adjustZoom: function(zoom) {'],[0,' if (this.baseLayer && this.baseLayer.wrapDateLine) {'],[0,' var resolution, resolutions = this.baseLayer.resolutions,'],[-1,' maxResolution = this.getMaxExtent().getWidth() \/ this.size.w;'],[0,' if (this.getResolutionForZoom(zoom) > maxResolution) {'],[0,' if (this.fractionalZoom) {'],[0,' zoom = this.getZoomForResolution(maxResolution);'],[-1,' } else {'],[0,' for (var i=zoom|0, ii=resolutions.length; i<ii; ++i) {'],[0,' if (resolutions[i] <= maxResolution) {'],[0,' zoom = i;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' } '],[-1,' }'],[-1,' }'],[0,' return zoom;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getMinZoom'],[-1,' * Returns the minimum zoom level for the current map view. If the base'],[-1,' * layer is configured with <wrapDateLine> set to true, this will be the'],[-1,' * first zoom level that shows no more than one world width in the current'],[-1,' * map viewport. Components that rely on this value (e.g. zoom sliders)'],[-1,' * should also listen to the map\'s \"updatesize\" event and call this method'],[-1,' * in the \"updatesize\" listener.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number} Minimum zoom level that shows a map not wider than its'],[-1,' * <baseLayer>\'s maxExtent. This is an Integer value, unless the map is'],[-1,' * configured with <fractionalZoom> set to true.'],[-1,' *\/'],[-1,' getMinZoom: function() {'],[0,' return this.adjustZoom(0);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: moveTo'],[-1,' *'],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>}'],[-1,' * zoom - {Integer}'],[-1,' * options - {Object}'],[-1,' *\/'],[-1,' moveTo: function(lonlat, zoom, options) {'],[0,' if (lonlat != null && !(lonlat instanceof OpenLayers.LonLat)) {'],[0,' lonlat = new OpenLayers.LonLat(lonlat);'],[-1,' }'],[0,' if (!options) { '],[0,' options = {};'],[-1,' }'],[0,' if (zoom != null) {'],[0,' zoom = parseFloat(zoom);'],[0,' if (!this.fractionalZoom) {'],[0,' zoom = Math.round(zoom);'],[-1,' }'],[-1,' }'],[0,' var requestedZoom = zoom;'],[0,' zoom = this.adjustZoom(zoom);'],[0,' if (zoom !== requestedZoom) {'],[-1,' \/\/ zoom was adjusted, so keep old lonlat to avoid panning'],[0,' lonlat = this.getCenter();'],[-1,' }'],[-1,' \/\/ dragging is false by default'],[0,' var dragging = options.dragging || this.dragging;'],[-1,' \/\/ forceZoomChange is false by default'],[0,' var forceZoomChange = options.forceZoomChange;'],[-1,''],[0,' if (!this.getCachedCenter() && !this.isValidLonLat(lonlat)) {'],[0,' lonlat = this.maxExtent.getCenterLonLat();'],[0,' this.center = lonlat.clone();'],[-1,' }'],[-1,''],[0,' if(this.restrictedExtent != null) {'],[-1,' \/\/ In 3.0, decide if we want to change interpretation of maxExtent.'],[0,' if(lonlat == null) { '],[0,' lonlat = this.center; '],[-1,' }'],[0,' if(zoom == null) { '],[0,' zoom = this.getZoom(); '],[-1,' }'],[0,' var resolution = this.getResolutionForZoom(zoom);'],[0,' var extent = this.calculateBounds(lonlat, resolution); '],[0,' if(!this.restrictedExtent.containsBounds(extent)) {'],[0,' var maxCenter = this.restrictedExtent.getCenterLonLat(); '],[0,' if(extent.getWidth() > this.restrictedExtent.getWidth()) { '],[0,' lonlat = new OpenLayers.LonLat(maxCenter.lon, lonlat.lat); '],[0,' } else if(extent.left < this.restrictedExtent.left) {'],[0,' lonlat = lonlat.add(this.restrictedExtent.left -'],[-1,' extent.left, 0); '],[0,' } else if(extent.right > this.restrictedExtent.right) { '],[0,' lonlat = lonlat.add(this.restrictedExtent.right -'],[-1,' extent.right, 0); '],[-1,' } '],[0,' if(extent.getHeight() > this.restrictedExtent.getHeight()) { '],[0,' lonlat = new OpenLayers.LonLat(lonlat.lon, maxCenter.lat); '],[0,' } else if(extent.bottom < this.restrictedExtent.bottom) { '],[0,' lonlat = lonlat.add(0, this.restrictedExtent.bottom -'],[-1,' extent.bottom); '],[-1,' } '],[0,' else if(extent.top > this.restrictedExtent.top) { '],[0,' lonlat = lonlat.add(0, this.restrictedExtent.top -'],[-1,' extent.top); '],[-1,' } '],[-1,' }'],[-1,' }'],[-1,' '],[0,' var zoomChanged = forceZoomChange || ('],[-1,' (this.isValidZoomLevel(zoom)) && '],[-1,' (zoom != this.getZoom()) );'],[-1,''],[0,' var centerChanged = (this.isValidLonLat(lonlat)) && '],[-1,' (!lonlat.equals(this.center));'],[-1,''],[-1,' \/\/ if neither center nor zoom will change, no need to do anything'],[0,' if (zoomChanged || centerChanged || dragging) {'],[0,' dragging || this.events.triggerEvent(\"movestart\", {'],[-1,' zoomChanged: zoomChanged'],[-1,' });'],[-1,''],[0,' if (centerChanged) {'],[0,' if (!zoomChanged && this.center) { '],[-1,' \/\/ if zoom hasn\'t changed, just slide layerContainer'],[-1,' \/\/ (must be done before setting this.center to new value)'],[0,' this.centerLayerContainer(lonlat);'],[-1,' }'],[0,' this.center = lonlat.clone();'],[-1,' }'],[-1,''],[0,' var res = zoomChanged ?'],[-1,' this.getResolutionForZoom(zoom) : this.getResolution();'],[-1,' \/\/ (re)set the layerContainerDiv\'s location'],[0,' if (zoomChanged || this.layerContainerOrigin == null) {'],[0,' this.layerContainerOrigin = this.getCachedCenter();'],[0,' this.layerContainerOriginPx.x = 0;'],[0,' this.layerContainerOriginPx.y = 0;'],[0,' this.applyTransform();'],[0,' var maxExtent = this.getMaxExtent({restricted: true});'],[0,' var maxExtentCenter = maxExtent.getCenterLonLat();'],[0,' var lonDelta = this.center.lon - maxExtentCenter.lon;'],[0,' var latDelta = maxExtentCenter.lat - this.center.lat;'],[0,' var extentWidth = Math.round(maxExtent.getWidth() \/ res);'],[0,' var extentHeight = Math.round(maxExtent.getHeight() \/ res);'],[0,' this.minPx = {'],[-1,' x: (this.size.w - extentWidth) \/ 2 - lonDelta \/ res,'],[-1,' y: (this.size.h - extentHeight) \/ 2 - latDelta \/ res'],[-1,' };'],[0,' this.maxPx = {'],[-1,' x: this.minPx.x + Math.round(maxExtent.getWidth() \/ res),'],[-1,' y: this.minPx.y + Math.round(maxExtent.getHeight() \/ res)'],[-1,' };'],[-1,' }'],[-1,''],[0,' if (zoomChanged) {'],[0,' this.zoom = zoom;'],[0,' this.resolution = res;'],[-1,' } '],[-1,' '],[0,' var bounds = this.getExtent();'],[-1,' '],[-1,' \/\/send the move call to the baselayer and all the overlays '],[-1,''],[0,' if(this.baseLayer.visibility) {'],[0,' this.baseLayer.moveTo(bounds, zoomChanged, options.dragging);'],[0,' options.dragging || this.baseLayer.events.triggerEvent('],[-1,' \"moveend\", {zoomChanged: zoomChanged}'],[-1,' );'],[-1,' }'],[-1,' '],[0,' bounds = this.baseLayer.getExtent();'],[-1,' '],[0,' for (var i=this.layers.length-1; i>=0; --i) {'],[0,' var layer = this.layers[i];'],[0,' if (layer !== this.baseLayer && !layer.isBaseLayer) {'],[0,' var inRange = layer.calculateInRange();'],[0,' if (layer.inRange != inRange) {'],[-1,' \/\/ the inRange property has changed. If the layer is'],[-1,' \/\/ no longer in range, we turn it off right away. If'],[-1,' \/\/ the layer is no longer out of range, the moveTo'],[-1,' \/\/ call below will turn on the layer.'],[0,' layer.inRange = inRange;'],[0,' if (!inRange) {'],[0,' layer.display(false);'],[-1,' }'],[0,' this.events.triggerEvent(\"changelayer\", {'],[-1,' layer: layer, property: \"visibility\"'],[-1,' });'],[-1,' }'],[0,' if (inRange && layer.visibility) {'],[0,' layer.moveTo(bounds, zoomChanged, options.dragging);'],[0,' options.dragging || layer.events.triggerEvent('],[-1,' \"moveend\", {zoomChanged: zoomChanged}'],[-1,' );'],[-1,' }'],[-1,' } '],[-1,' }'],[-1,' '],[0,' this.events.triggerEvent(\"move\");'],[0,' dragging || this.events.triggerEvent(\"moveend\");'],[-1,''],[0,' if (zoomChanged) {'],[-1,' \/\/redraw popups'],[0,' for (var i=0, len=this.popups.length; i<len; i++) {'],[0,' this.popups[i].updatePosition();'],[-1,' }'],[0,' this.events.triggerEvent(\"zoomend\");'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: centerLayerContainer'],[-1,' * This function takes care to recenter the layerContainerDiv.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>}'],[-1,' *\/'],[-1,' centerLayerContainer: function (lonlat) {'],[0,' var originPx = this.getViewPortPxFromLonLat(this.layerContainerOrigin);'],[0,' var newPx = this.getViewPortPxFromLonLat(lonlat);'],[-1,''],[0,' if ((originPx != null) && (newPx != null)) {'],[0,' var oldLeft = this.layerContainerOriginPx.x;'],[0,' var oldTop = this.layerContainerOriginPx.y;'],[0,' var newLeft = Math.round(originPx.x - newPx.x);'],[0,' var newTop = Math.round(originPx.y - newPx.y);'],[0,' this.applyTransform('],[-1,' (this.layerContainerOriginPx.x = newLeft),'],[-1,' (this.layerContainerOriginPx.y = newTop));'],[0,' var dx = oldLeft - newLeft;'],[0,' var dy = oldTop - newTop;'],[0,' this.minPx.x -= dx;'],[0,' this.maxPx.x -= dx;'],[0,' this.minPx.y -= dy;'],[0,' this.maxPx.y -= dy;'],[-1,' } '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: isValidZoomLevel'],[-1,' * '],[-1,' * Parameters:'],[-1,' * zoomLevel - {Integer}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the zoom level passed in is non-null and '],[-1,' * within the min\/max range of zoom levels.'],[-1,' *\/'],[-1,' isValidZoomLevel: function(zoomLevel) {'],[0,' return ( (zoomLevel != null) &&'],[-1,' (zoomLevel >= 0) && '],[-1,' (zoomLevel < this.getNumZoomLevels()) );'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: isValidLonLat'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the lonlat passed in is non-null and within'],[-1,' * the maxExtent bounds'],[-1,' *\/'],[-1,' isValidLonLat: function(lonlat) {'],[0,' var valid = false;'],[0,' if (lonlat != null) {'],[0,' var maxExtent = this.getMaxExtent();'],[0,' var worldBounds = this.baseLayer.wrapDateLine && maxExtent;'],[0,' valid = maxExtent.containsLonLat(lonlat, {worldBounds: worldBounds});'],[-1,' }'],[0,' return valid;'],[-1,' },'],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Layer Options *\/'],[-1,' \/* *\/'],[-1,' \/* Accessor functions to Layer Options parameters *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getProjection'],[-1,' * This method returns a string representing the projection. In '],[-1,' * the case of projection support, this will be the srsCode which'],[-1,' * is loaded -- otherwise it will simply be the string value that'],[-1,' * was passed to the projection at startup.'],[-1,' *'],[-1,' * FIXME: In 3.0, we will remove getProjectionObject, and instead'],[-1,' * return a Projection object from this function. '],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The Projection string from the base layer or null. '],[-1,' *\/'],[-1,' getProjection: function() {'],[0,' var projection = this.getProjectionObject();'],[0,' return projection ? projection.getCode() : null;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getProjectionObject'],[-1,' * Returns the projection obect from the baselayer.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Projection>} The Projection of the base layer.'],[-1,' *\/'],[-1,' getProjectionObject: function() {'],[0,' var projection = null;'],[0,' if (this.baseLayer != null) {'],[0,' projection = this.baseLayer.projection;'],[-1,' }'],[0,' return projection;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getMaxResolution'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The Map\'s Maximum Resolution'],[-1,' *\/'],[-1,' getMaxResolution: function() {'],[0,' var maxResolution = null;'],[0,' if (this.baseLayer != null) {'],[0,' maxResolution = this.baseLayer.maxResolution;'],[-1,' }'],[0,' return maxResolution;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getMaxExtent'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} '],[-1,' * '],[-1,' * Allowed Options:'],[-1,' * restricted - {Boolean} If true, returns restricted extent (if it is '],[-1,' * available.)'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} The maxExtent property as set on the current '],[-1,' * baselayer, unless the \'restricted\' option is set, in which case'],[-1,' * the \'restrictedExtent\' option from the map is returned (if it'],[-1,' * is set).'],[-1,' *\/'],[-1,' getMaxExtent: function (options) {'],[0,' var maxExtent = null;'],[0,' if(options && options.restricted && this.restrictedExtent){'],[0,' maxExtent = this.restrictedExtent;'],[0,' } else if (this.baseLayer != null) {'],[0,' maxExtent = this.baseLayer.maxExtent;'],[-1,' } '],[0,' return maxExtent;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getNumZoomLevels'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer} The total number of zoom levels that can be displayed by the '],[-1,' * current baseLayer.'],[-1,' *\/'],[-1,' getNumZoomLevels: function() {'],[0,' var numZoomLevels = null;'],[0,' if (this.baseLayer != null) {'],[0,' numZoomLevels = this.baseLayer.numZoomLevels;'],[-1,' }'],[0,' return numZoomLevels;'],[-1,' },'],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Baselayer Functions *\/'],[-1,' \/* *\/'],[-1,' \/* The following functions, all publicly exposed *\/'],[-1,' \/* in the API?, are all merely wrappers to the *\/'],[-1,' \/* the same calls on whatever layer is set as *\/'],[-1,' \/* the current base layer *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getExtent'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A Bounds object which represents the lon\/lat '],[-1,' * bounds of the current viewPort. '],[-1,' * If no baselayer is set, returns null.'],[-1,' *\/'],[-1,' getExtent: function () {'],[0,' var extent = null;'],[0,' if (this.baseLayer != null) {'],[0,' extent = this.baseLayer.getExtent();'],[-1,' }'],[0,' return extent;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getResolution'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The current resolution of the map. '],[-1,' * If no baselayer is set, returns null.'],[-1,' *\/'],[-1,' getResolution: function () {'],[0,' var resolution = null;'],[0,' if (this.baseLayer != null) {'],[0,' resolution = this.baseLayer.getResolution();'],[0,' } else if(this.allOverlays === true && this.layers.length > 0) {'],[-1,' \/\/ while adding the 1st layer to the map in allOverlays mode,'],[-1,' \/\/ this.baseLayer is not set yet when we need the resolution'],[-1,' \/\/ for calculateInRange.'],[0,' resolution = this.layers[0].getResolution();'],[-1,' }'],[0,' return resolution;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getUnits'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The current units of the map. '],[-1,' * If no baselayer is set, returns null.'],[-1,' *\/'],[-1,' getUnits: function () {'],[0,' var units = null;'],[0,' if (this.baseLayer != null) {'],[0,' units = this.baseLayer.units;'],[-1,' }'],[0,' return units;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getScale'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The current scale denominator of the map. '],[-1,' * If no baselayer is set, returns null.'],[-1,' *\/'],[-1,' getScale: function () {'],[0,' var scale = null;'],[0,' if (this.baseLayer != null) {'],[0,' var res = this.getResolution();'],[0,' var units = this.baseLayer.units;'],[0,' scale = OpenLayers.Util.getScaleFromResolution(res, units);'],[-1,' }'],[0,' return scale;'],[-1,' },'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getZoomForExtent'],[-1,' * '],[-1,' * Parameters: '],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * closest - {Boolean} Find the zoom level that most closely fits the '],[-1,' * specified bounds. Note that this may result in a zoom that does '],[-1,' * not exactly contain the entire extent.'],[-1,' * Default is false.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer} A suitable zoom level for the specified bounds.'],[-1,' * If no baselayer is set, returns null.'],[-1,' *\/'],[-1,' getZoomForExtent: function (bounds, closest) {'],[0,' var zoom = null;'],[0,' if (this.baseLayer != null) {'],[0,' zoom = this.baseLayer.getZoomForExtent(bounds, closest);'],[-1,' }'],[0,' return zoom;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getResolutionForZoom'],[-1,' * '],[-1,' * Parameters:'],[-1,' * zoom - {Float}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} A suitable resolution for the specified zoom. If no baselayer'],[-1,' * is set, returns null.'],[-1,' *\/'],[-1,' getResolutionForZoom: function(zoom) {'],[0,' var resolution = null;'],[0,' if(this.baseLayer) {'],[0,' resolution = this.baseLayer.getResolutionForZoom(zoom);'],[-1,' }'],[0,' return resolution;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getZoomForResolution'],[-1,' * '],[-1,' * Parameters:'],[-1,' * resolution - {Float}'],[-1,' * closest - {Boolean} Find the zoom level that corresponds to the absolute '],[-1,' * closest resolution, which may result in a zoom whose corresponding'],[-1,' * resolution is actually smaller than we would have desired (if this'],[-1,' * is being called from a getZoomForExtent() call, then this means that'],[-1,' * the returned zoom index might not actually contain the entire '],[-1,' * extent specified... but it\'ll be close).'],[-1,' * Default is false.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer} A suitable zoom level for the specified resolution.'],[-1,' * If no baselayer is set, returns null.'],[-1,' *\/'],[-1,' getZoomForResolution: function(resolution, closest) {'],[0,' var zoom = null;'],[0,' if (this.baseLayer != null) {'],[0,' zoom = this.baseLayer.getZoomForResolution(resolution, closest);'],[-1,' }'],[0,' return zoom;'],[-1,' },'],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Zooming Functions *\/'],[-1,' \/* *\/'],[-1,' \/* The following functions, all publicly exposed *\/'],[-1,' \/* in the API, are all merely wrappers to the *\/'],[-1,' \/* the setCenter() function *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: zoomTo'],[-1,' * Zoom to a specific zoom level. Zooming will be animated unless the map'],[-1,' * is configured with {zoomMethod: null}. To zoom without animation, use'],[-1,' * <setCenter> without a lonlat argument.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * zoom - {Integer}'],[-1,' *\/'],[-1,' zoomTo: function(zoom, xy) {'],[-1,' \/\/ non-API arguments:'],[-1,' \/\/ xy - {<OpenLayers.Pixel>} optional zoom origin'],[-1,' '],[0,' var map = this;'],[0,' if (map.isValidZoomLevel(zoom)) {'],[0,' if (map.baseLayer.wrapDateLine) {'],[0,' zoom = map.adjustZoom(zoom);'],[-1,' }'],[0,' var center = xy ?'],[-1,' map.getZoomTargetCenter(xy, map.getResolutionForZoom(zoom)) :'],[-1,' map.getCenter();'],[0,' if (center) {'],[0,' map.events.triggerEvent(\'zoomstart\', {'],[-1,' center: center,'],[-1,' zoom: zoom'],[-1,' });'],[-1,' }'],[0,' if (map.zoomTween) {'],[0,' map.zoomTween.stop();'],[0,' var currentRes = map.getResolution(),'],[-1,' targetRes = map.getResolutionForZoom(zoom),'],[-1,' start = {scale: 1},'],[-1,' end = {scale: currentRes \/ targetRes};'],[0,' if (!xy) {'],[0,' var size = map.getSize();'],[0,' xy = {x: size.w \/ 2, y: size.h \/ 2};'],[-1,' }'],[0,' map.zoomTween.start(start, end, map.zoomDuration, {'],[-1,' minFrameRate: 50, \/\/ don\'t spend much time zooming'],[-1,' callbacks: {'],[-1,' eachStep: function(data) {'],[0,' var containerOrigin = map.layerContainerOriginPx,'],[-1,' scale = data.scale,'],[-1,' dx = ((scale - 1) * (containerOrigin.x - xy.x)) | 0,'],[-1,' dy = ((scale - 1) * (containerOrigin.y - xy.y)) | 0;'],[0,' map.applyTransform(containerOrigin.x + dx, containerOrigin.y + dy, scale);'],[-1,' },'],[-1,' done: function(data) {'],[0,' map.applyTransform();'],[0,' var resolution = map.getResolution() \/ data.scale,'],[-1,' newZoom = map.getZoomForResolution(resolution, true),'],[-1,' newCenter = data.scale === 1 ? center :'],[-1,' map.getZoomTargetCenter(xy, resolution);'],[0,' map.moveTo(newCenter, newZoom);'],[-1,' }'],[-1,' }'],[-1,' });'],[-1,' } else {'],[0,' map.setCenter(center, zoom);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: zoomIn'],[-1,' * '],[-1,' *\/'],[-1,' zoomIn: function() {'],[0,' if (this.zoomTween) {'],[0,' this.zoomTween.stop();'],[-1,' }'],[0,' this.zoomTo(this.getZoom() + 1);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: zoomOut'],[-1,' * '],[-1,' *\/'],[-1,' zoomOut: function() {'],[0,' if (this.zoomTween) {'],[0,' this.zoomTween.stop();'],[-1,' }'],[0,' this.zoomTo(this.getZoom() - 1);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: zoomToExtent'],[-1,' * Zoom to the passed in bounds, recenter'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>|Array} If provided as an array, the array'],[-1,' * should consist of four values (left, bottom, right, top).'],[-1,' * closest - {Boolean} Find the zoom level that most closely fits the '],[-1,' * specified bounds. Note that this may result in a zoom that does '],[-1,' * not exactly contain the entire extent.'],[-1,' * Default is false.'],[-1,' * '],[-1,' *\/'],[-1,' zoomToExtent: function(bounds, closest) {'],[0,' if (!(bounds instanceof OpenLayers.Bounds)) {'],[0,' bounds = new OpenLayers.Bounds(bounds);'],[-1,' }'],[0,' var center = bounds.getCenterLonLat();'],[0,' if (this.baseLayer.wrapDateLine) {'],[0,' var maxExtent = this.getMaxExtent();'],[-1,''],[-1,' \/\/fix straddling bounds (in the case of a bbox that straddles the '],[-1,' \/\/ dateline, it\'s left and right boundaries will appear backwards. '],[-1,' \/\/ we fix this by allowing a right value that is greater than the'],[-1,' \/\/ max value at the dateline -- this allows us to pass a valid '],[-1,' \/\/ bounds to calculate zoom)'],[-1,' \/\/'],[0,' bounds = bounds.clone();'],[0,' while (bounds.right < bounds.left) {'],[0,' bounds.right += maxExtent.getWidth();'],[-1,' }'],[-1,' \/\/if the bounds was straddling (see above), then the center point '],[-1,' \/\/ we got from it was wrong. So we take our new bounds and ask it'],[-1,' \/\/ for the center.'],[-1,' \/\/'],[0,' center = bounds.getCenterLonLat().wrapDateLine(maxExtent);'],[-1,' }'],[0,' this.setCenter(center, this.getZoomForExtent(bounds, closest));'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: zoomToMaxExtent'],[-1,' * Zoom to the full extent and recenter.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object}'],[-1,' * '],[-1,' * Allowed Options:'],[-1,' * restricted - {Boolean} True to zoom to restricted extent if it is '],[-1,' * set. Defaults to true.'],[-1,' *\/'],[-1,' zoomToMaxExtent: function(options) {'],[-1,' \/\/restricted is true by default'],[0,' var restricted = (options) ? options.restricted : true;'],[-1,''],[0,' var maxExtent = this.getMaxExtent({'],[-1,' \'restricted\': restricted '],[-1,' });'],[0,' this.zoomToExtent(maxExtent);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: zoomToScale'],[-1,' * Zoom to a specified scale '],[-1,' * '],[-1,' * Parameters:'],[-1,' * scale - {float}'],[-1,' * closest - {Boolean} Find the zoom level that most closely fits the '],[-1,' * specified scale. Note that this may result in a zoom that does '],[-1,' * not exactly contain the entire extent.'],[-1,' * Default is false.'],[-1,' * '],[-1,' *\/'],[-1,' zoomToScale: function(scale, closest) {'],[0,' var res = OpenLayers.Util.getResolutionFromScale(scale, '],[-1,' this.baseLayer.units);'],[-1,''],[0,' var halfWDeg = (this.size.w * res) \/ 2;'],[0,' var halfHDeg = (this.size.h * res) \/ 2;'],[0,' var center = this.getCachedCenter();'],[-1,''],[0,' var extent = new OpenLayers.Bounds(center.lon - halfWDeg,'],[-1,' center.lat - halfHDeg,'],[-1,' center.lon + halfWDeg,'],[-1,' center.lat + halfHDeg);'],[0,' this.zoomToExtent(extent, closest);'],[-1,' },'],[-1,' '],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Translation Functions *\/'],[-1,' \/* *\/'],[-1,' \/* The following functions translate between *\/'],[-1,' \/* LonLat, LayerPx, and ViewPortPx *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/'],[-1,' '],[-1,' \/\/'],[-1,' \/\/ TRANSLATION: LonLat <-> ViewPortPx'],[-1,' \/\/'],[-1,''],[-1,' \/**'],[-1,' * Method: getLonLatFromViewPortPx'],[-1,' * '],[-1,' * Parameters:'],[-1,' * viewPortPx - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or'],[-1,' * an object with a \'x\''],[-1,' * and \'y\' properties.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} An OpenLayers.LonLat which is the passed-in view '],[-1,' * port <OpenLayers.Pixel>, translated into lon\/lat'],[-1,' * by the current base layer.'],[-1,' *\/'],[-1,' getLonLatFromViewPortPx: function (viewPortPx) {'],[0,' var lonlat = null; '],[0,' if (this.baseLayer != null) {'],[0,' lonlat = this.baseLayer.getLonLatFromViewPortPx(viewPortPx);'],[-1,' }'],[0,' return lonlat;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getViewPortPxFromLonLat'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} An OpenLayers.Pixel which is the passed-in '],[-1,' * <OpenLayers.LonLat>, translated into view port '],[-1,' * pixels by the current base layer.'],[-1,' *\/'],[-1,' getViewPortPxFromLonLat: function (lonlat) {'],[0,' var px = null; '],[0,' if (this.baseLayer != null) {'],[0,' px = this.baseLayer.getViewPortPxFromLonLat(lonlat);'],[-1,' }'],[0,' return px;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getZoomTargetCenter'],[-1,' *'],[-1,' * Parameters:'],[-1,' * xy - {<OpenLayers.Pixel>} The zoom origin pixel location on the screen'],[-1,' * resolution - {Float} The resolution we want to get the center for'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} The location of the map center after the'],[-1,' * transformation described by the origin xy and the target resolution.'],[-1,' *\/'],[-1,' getZoomTargetCenter: function (xy, resolution) {'],[0,' var lonlat = null,'],[-1,' size = this.getSize(),'],[-1,' deltaX = size.w\/2 - xy.x,'],[-1,' deltaY = xy.y - size.h\/2,'],[-1,' zoomPoint = this.getLonLatFromPixel(xy);'],[0,' if (zoomPoint) {'],[0,' lonlat = new OpenLayers.LonLat('],[-1,' zoomPoint.lon + deltaX * resolution,'],[-1,' zoomPoint.lat + deltaY * resolution'],[-1,' );'],[-1,' }'],[0,' return lonlat;'],[-1,' },'],[-1,' '],[-1,' \/\/'],[-1,' \/\/ CONVENIENCE TRANSLATION FUNCTIONS FOR API'],[-1,' \/\/'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getLonLatFromPixel'],[-1,' * '],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with'],[-1,' * a \'x\' and \'y\' properties.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} An OpenLayers.LonLat corresponding to the given'],[-1,' * OpenLayers.Pixel, translated into lon\/lat by the '],[-1,' * current base layer'],[-1,' *\/'],[-1,' getLonLatFromPixel: function (px) {'],[0,' return this.getLonLatFromViewPortPx(px);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getPixelFromLonLat'],[-1,' * Returns a pixel location given a map location. The map location is'],[-1,' * translated to an integer pixel location (in viewport pixel'],[-1,' * coordinates) by the current base layer.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>} A map location.'],[-1,' * '],[-1,' * Returns: '],[-1,' * {<OpenLayers.Pixel>} An OpenLayers.Pixel corresponding to the '],[-1,' * <OpenLayers.LonLat> translated into view port pixels by the current'],[-1,' * base layer.'],[-1,' *\/'],[-1,' getPixelFromLonLat: function (lonlat) {'],[0,' var px = this.getViewPortPxFromLonLat(lonlat);'],[0,' px.x = Math.round(px.x);'],[0,' px.y = Math.round(px.y);'],[0,' return px;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getGeodesicPixelSize'],[-1,' * '],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>} The pixel to get the geodesic length for. If'],[-1,' * not provided, the center pixel of the map viewport will be used.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Size>} The geodesic size of the pixel in kilometers.'],[-1,' *\/'],[-1,' getGeodesicPixelSize: function(px) {'],[0,' var lonlat = px ? this.getLonLatFromPixel(px) : ('],[-1,' this.getCachedCenter() || new OpenLayers.LonLat(0, 0));'],[0,' var res = this.getResolution();'],[0,' var left = lonlat.add(-res \/ 2, 0);'],[0,' var right = lonlat.add(res \/ 2, 0);'],[0,' var bottom = lonlat.add(0, -res \/ 2);'],[0,' var top = lonlat.add(0, res \/ 2);'],[0,' var dest = new OpenLayers.Projection(\"EPSG:4326\");'],[0,' var source = this.getProjectionObject() || dest;'],[0,' if(!source.equals(dest)) {'],[0,' left.transform(source, dest);'],[0,' right.transform(source, dest);'],[0,' bottom.transform(source, dest);'],[0,' top.transform(source, dest);'],[-1,' }'],[-1,' '],[0,' return new OpenLayers.Size('],[-1,' OpenLayers.Util.distVincenty(left, right),'],[-1,' OpenLayers.Util.distVincenty(bottom, top)'],[-1,' );'],[-1,' },'],[-1,''],[-1,''],[-1,''],[-1,' \/\/'],[-1,' \/\/ TRANSLATION: ViewPortPx <-> LayerPx'],[-1,' \/\/'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getViewPortPxFromLayerPx'],[-1,' * '],[-1,' * Parameters:'],[-1,' * layerPx - {<OpenLayers.Pixel>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} Layer Pixel translated into ViewPort Pixel '],[-1,' * coordinates'],[-1,' *\/'],[-1,' getViewPortPxFromLayerPx:function(layerPx) {'],[0,' var viewPortPx = null;'],[0,' if (layerPx != null) {'],[0,' var dX = this.layerContainerOriginPx.x;'],[0,' var dY = this.layerContainerOriginPx.y;'],[0,' viewPortPx = layerPx.add(dX, dY); '],[-1,' }'],[0,' return viewPortPx;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getLayerPxFromViewPortPx'],[-1,' * '],[-1,' * Parameters:'],[-1,' * viewPortPx - {<OpenLayers.Pixel>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} ViewPort Pixel translated into Layer Pixel '],[-1,' * coordinates'],[-1,' *\/'],[-1,' getLayerPxFromViewPortPx:function(viewPortPx) {'],[0,' var layerPx = null;'],[0,' if (viewPortPx != null) {'],[0,' var dX = -this.layerContainerOriginPx.x;'],[0,' var dY = -this.layerContainerOriginPx.y;'],[0,' layerPx = viewPortPx.add(dX, dY);'],[0,' if (isNaN(layerPx.x) || isNaN(layerPx.y)) {'],[0,' layerPx = null;'],[-1,' }'],[-1,' }'],[0,' return layerPx;'],[-1,' },'],[-1,' '],[-1,' \/\/'],[-1,' \/\/ TRANSLATION: LonLat <-> LayerPx'],[-1,' \/\/'],[-1,''],[-1,' \/**'],[-1,' * Method: getLonLatFromLayerPx'],[-1,' * '],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>}'],[-1,' *\/'],[-1,' getLonLatFromLayerPx: function (px) {'],[-1,' \/\/adjust for displacement of layerContainerDiv'],[0,' px = this.getViewPortPxFromLayerPx(px);'],[0,' return this.getLonLatFromViewPortPx(px); '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getLayerPxFromLonLat'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>} lonlat'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Pixel>} An OpenLayers.Pixel which is the passed-in '],[-1,' * <OpenLayers.LonLat>, translated into layer pixels '],[-1,' * by the current base layer'],[-1,' *\/'],[-1,' getLayerPxFromLonLat: function (lonlat) {'],[-1,' \/\/adjust for displacement of layerContainerDiv'],[0,' var px = this.getPixelFromLonLat(lonlat);'],[0,' return this.getLayerPxFromViewPortPx(px); '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: applyTransform'],[-1,' * Applies the given transform to the <layerContainerDiv>. This method has'],[-1,' * a 2-stage fallback from translate3d\/scale3d via translate\/scale to plain'],[-1,' * style.left\/style.top, in which case no scaling is supported.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Number} x parameter for the translation. Defaults to the x value of'],[-1,' * the map\'s <layerContainerOriginPx>'],[-1,' * y - {Number} y parameter for the translation. Defaults to the y value of'],[-1,' * the map\'s <layerContainerOriginPx>'],[-1,' * scale - {Number} scale. Defaults to 1 if not provided.'],[-1,' *\/'],[-1,' applyTransform: function(x, y, scale) {'],[0,' scale = scale || 1;'],[0,' var origin = this.layerContainerOriginPx,'],[-1,' needTransform = scale !== 1;'],[0,' x = x || origin.x;'],[0,' y = y || origin.y;'],[-1,' '],[0,' var style = this.layerContainerDiv.style,'],[-1,' transform = this.applyTransform.transform,'],[-1,' template = this.applyTransform.template;'],[-1,' '],[0,' if (transform === undefined) {'],[0,' transform = OpenLayers.Util.vendorPrefix.style(\'transform\');'],[0,' this.applyTransform.transform = transform;'],[0,' if (transform) {'],[-1,' \/\/ Try translate3d, but only if the viewPortDiv has a transform'],[-1,' \/\/ defined in a stylesheet'],[0,' var computedStyle = OpenLayers.Element.getStyle(this.viewPortDiv,'],[-1,' OpenLayers.Util.vendorPrefix.css(\'transform\'));'],[0,' if (!computedStyle || computedStyle !== \'none\') {'],[0,' template = [\'translate3d(\', \',0) \', \'scale3d(\', \',1)\'];'],[0,' style[transform] = [template[0], \'0,0\', template[1]].join(\'\');'],[-1,' }'],[-1,' \/\/ If no transform is defined in the stylesheet or translate3d'],[-1,' \/\/ does not stick, use translate and scale'],[0,' if (!template || !~style[transform].indexOf(template[0])) {'],[0,' template = [\'translate(\', \') \', \'scale(\', \')\'];'],[-1,' }'],[0,' this.applyTransform.template = template;'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' \/\/ If we do 3d transforms, we always want to use them. If we do 2d'],[-1,' \/\/ transforms, we only use them when we need to.'],[0,' if (transform !== null && (template[0] === \'translate3d(\' || needTransform === true)) {'],[-1,' \/\/ Our 2d transforms are combined with style.left and style.top, so'],[-1,' \/\/ adjust x and y values and set the origin as left and top'],[0,' if (needTransform === true && template[0] === \'translate(\') {'],[0,' x -= origin.x;'],[0,' y -= origin.y;'],[0,' style.left = origin.x + \'px\';'],[0,' style.top = origin.y + \'px\';'],[-1,' }'],[0,' style[transform] = ['],[-1,' template[0], x, \'px,\', y, \'px\', template[1],'],[-1,' template[2], scale, \',\', scale, template[3]'],[-1,' ].join(\'\');'],[-1,' } else {'],[0,' style.left = x + \'px\';'],[0,' style.top = y + \'px\';'],[-1,' \/\/ We previously might have had needTransform, so remove transform'],[0,' if (transform !== null) {'],[0,' style[transform] = \'\';'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' CLASS_NAME: \"OpenLayers.Map\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Constant: TILE_WIDTH'],[-1,' * {Integer} 256 Default tile width (unless otherwise specified)'],[-1,' *\/'],[1,'OpenLayers.Map.TILE_WIDTH = 256;'],[-1,'\/**'],[-1,' * Constant: TILE_HEIGHT'],[-1,' * {Integer} 256 Default tile height (unless otherwise specified)'],[-1,' *\/'],[1,'OpenLayers.Map.TILE_HEIGHT = 256;'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Layer.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Map.js'],[-1,' * @requires OpenLayers\/Projection.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Layer'],[-1,' *\/'],[1,'OpenLayers.Layer = OpenLayers.Class({'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: id'],[-1,' * {String}'],[-1,' *\/'],[-1,' id: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: name'],[-1,' * {String}'],[-1,' *\/'],[-1,' name: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: div'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' div: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: opacity'],[-1,' * {Float} The layer\'s opacity. Float number between 0.0 and 1.0. Default'],[-1,' * is 1.'],[-1,' *\/'],[-1,' opacity: 1,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: alwaysInRange'],[-1,' * {Boolean} If a layer\'s display should not be scale-based, this should '],[-1,' * be set to true. This will cause the layer, as an overlay, to always '],[-1,' * be \'active\', by always returning true from the calculateInRange() '],[-1,' * function. '],[-1,' * '],[-1,' * If not explicitly specified for a layer, its value will be '],[-1,' * determined on startup in initResolutions() based on whether or not '],[-1,' * any scale-specific properties have been set as options on the '],[-1,' * layer. If no scale-specific options have been set on the layer, we '],[-1,' * assume that it should always be in range.'],[-1,' * '],[-1,' * See #987 for more info.'],[-1,' *\/'],[-1,' alwaysInRange: null, '],[-1,''],[-1,' \/**'],[-1,' * Constant: RESOLUTION_PROPERTIES'],[-1,' * {Array} The properties that are used for calculating resolutions'],[-1,' * information.'],[-1,' *\/'],[-1,' RESOLUTION_PROPERTIES: ['],[-1,' \'scales\', \'resolutions\','],[-1,' \'maxScale\', \'minScale\','],[-1,' \'maxResolution\', \'minResolution\','],[-1,' \'numZoomLevels\', \'maxZoomLevel\''],[-1,' ],'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>}'],[-1,' *'],[-1,' * Register a listener for a particular event with the following syntax:'],[-1,' * (code)'],[-1,' * layer.events.register(type, obj, listener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Listeners will be called with a reference to an event object. The'],[-1,' * properties of this event depends on exactly what happened.'],[-1,' *'],[-1,' * All event objects have at least the following properties:'],[-1,' * object - {Object} A reference to layer.events.object.'],[-1,' * element - {DOMElement} A reference to layer.events.element.'],[-1,' *'],[-1,' * Supported map event types:'],[-1,' * loadstart - Triggered when layer loading starts. When using a Vector '],[-1,' * layer with a Fixed or BBOX strategy, the event object includes '],[-1,' * a *filter* property holding the OpenLayers.Filter used when '],[-1,' * calling read on the protocol.'],[-1,' * loadend - Triggered when layer loading ends. When using a Vector layer'],[-1,' * with a Fixed or BBOX strategy, the event object includes a '],[-1,' * *response* property holding an OpenLayers.Protocol.Response object.'],[-1,' * visibilitychanged - Triggered when the layer\'s visibility property is'],[-1,' * changed, e.g. by turning the layer on or off in the layer switcher.'],[-1,' * Note that the actual visibility of the layer can also change if it'],[-1,' * gets out of range (see <calculateInRange>). If you also want to catch'],[-1,' * these cases, register for the map\'s \'changelayer\' event instead.'],[-1,' * move - Triggered when layer moves (triggered with every mousemove'],[-1,' * during a drag).'],[-1,' * moveend - Triggered when layer is done moving, object passed as'],[-1,' * argument has a zoomChanged boolean property which tells that the'],[-1,' * zoom has changed.'],[-1,' * added - Triggered after the layer is added to a map. Listeners will'],[-1,' * receive an object with a *map* property referencing the map and a'],[-1,' * *layer* property referencing the layer.'],[-1,' * removed - Triggered after the layer is removed from the map. Listeners'],[-1,' * will receive an object with a *map* property referencing the map and'],[-1,' * a *layer* property referencing the layer.'],[-1,' *\/'],[-1,' events: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: map'],[-1,' * {<OpenLayers.Map>} This variable is set when the layer is added to '],[-1,' * the map, via the accessor function setMap().'],[-1,' *\/'],[-1,' map: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: isBaseLayer'],[-1,' * {Boolean} Whether or not the layer is a base layer. This should be set '],[-1,' * individually by all subclasses. Default is false'],[-1,' *\/'],[-1,' isBaseLayer: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: alpha'],[-1,' * {Boolean} The layer\'s images have an alpha channel. Default is false.'],[-1,' *\/'],[-1,' alpha: false,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: displayInLayerSwitcher'],[-1,' * {Boolean} Display the layer\'s name in the layer switcher. Default is'],[-1,' * true.'],[-1,' *\/'],[-1,' displayInLayerSwitcher: true,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: visibility'],[-1,' * {Boolean} The layer should be displayed in the map. Default is true.'],[-1,' *\/'],[-1,' visibility: true,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: attribution'],[-1,' * {<Object>} or {<String>} Attribution information, displayed when an'],[-1,' * <OpenLayers.Control.Attribution> has been added to the map.'],[-1,' *'],[-1,' * An object is required to store the full attribution information'],[-1,' * from a WMS capabilities response. Example attribution object:'],[-1,' * {title:\"\",href:\"\",logo:{format:\"\",width:10,height:10,href:\"\"}}'],[-1,' *\/'],[-1,' attribution: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: inRange'],[-1,' * {Boolean} The current map resolution is within the layer\'s min\/max '],[-1,' * range. This is set in <OpenLayers.Map.setCenter> whenever the zoom '],[-1,' * changes.'],[-1,' *\/'],[-1,' inRange: false,'],[-1,' '],[-1,' \/**'],[-1,' * Propery: imageSize'],[-1,' * {<OpenLayers.Size>} For layers with a gutter, the image is larger than '],[-1,' * the tile by twice the gutter in each dimension.'],[-1,' *\/'],[-1,' imageSize: null,'],[-1,' '],[-1,' \/\/ OPTIONS'],[-1,''],[-1,' \/** '],[-1,' * Property: options'],[-1,' * {Object} An optional object whose properties will be set on the layer.'],[-1,' * Any of the layer properties can be set as a property of the options'],[-1,' * object and sent to the constructor when the layer is created.'],[-1,' *\/'],[-1,' options: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: eventListeners'],[-1,' * {Object} If set as an option at construction, the eventListeners'],[-1,' * object will be registered with <OpenLayers.Events.on>. Object'],[-1,' * structure must be a listeners object as shown in the example for'],[-1,' * the events.on method.'],[-1,' *\/'],[-1,' eventListeners: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: gutter'],[-1,' * {Integer} Determines the width (in pixels) of the gutter around image'],[-1,' * tiles to ignore. By setting this property to a non-zero value,'],[-1,' * images will be requested that are wider and taller than the tile'],[-1,' * size by a value of 2 x gutter. This allows artifacts of rendering'],[-1,' * at tile edges to be ignored. Set a gutter value that is equal to'],[-1,' * half the size of the widest symbol that needs to be displayed.'],[-1,' * Defaults to zero. Non-tiled layers always have zero gutter.'],[-1,' *\/ '],[-1,' gutter: 0, '],[-1,''],[-1,' \/**'],[-1,' * APIProperty: projection'],[-1,' * {<OpenLayers.Projection>} or {<String>} Specifies the projection of the layer.'],[-1,' * Can be set in the layer options. If not specified in the layer options,'],[-1,' * it is set to the default projection specified in the map,'],[-1,' * when the layer is added to the map.'],[-1,' * Projection along with default maxExtent and resolutions'],[-1,' * are set automatically with commercial baselayers in EPSG:3857,'],[-1,' * such as Google, Bing and OpenStreetMap, and do not need to be specified.'],[-1,' * Otherwise, if specifying projection, also set maxExtent,'],[-1,' * maxResolution or resolutions as appropriate.'],[-1,' * When using vector layers with strategies, layer projection should be set'],[-1,' * to the projection of the source data if that is different from the map default.'],[-1,' * '],[-1,' * Can be either a string or an <OpenLayers.Projection> object;'],[-1,' * if a string is passed, will be converted to an object when'],[-1,' * the layer is added to the map.'],[-1,' * '],[-1,' *\/'],[-1,' projection: null, '],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: units'],[-1,' * {String} The layer map units. Defaults to null. Possible values'],[-1,' * are \'degrees\' (or \'dd\'), \'m\', \'ft\', \'km\', \'mi\', \'inches\'.'],[-1,' * Normally taken from the projection.'],[-1,' * Only required if both map and layers do not define a projection,'],[-1,' * or if they define a projection which does not define units.'],[-1,' *\/'],[-1,' units: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: scales'],[-1,' * {Array} An array of map scales in descending order. The values in the'],[-1,' * array correspond to the map scale denominator. Note that these'],[-1,' * values only make sense if the display (monitor) resolution of the'],[-1,' * client is correctly guessed by whomever is configuring the'],[-1,' * application. In addition, the units property must also be set.'],[-1,' * Use <resolutions> instead wherever possible.'],[-1,' *\/'],[-1,' scales: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: resolutions'],[-1,' * {Array} A list of map resolutions (map units per pixel) in descending'],[-1,' * order. If this is not set in the layer constructor, it will be set'],[-1,' * based on other resolution related properties (maxExtent,'],[-1,' * maxResolution, maxScale, etc.).'],[-1,' *\/'],[-1,' resolutions: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: maxExtent'],[-1,' * {<OpenLayers.Bounds>|Array} If provided as an array, the array'],[-1,' * should consist of four values (left, bottom, right, top).'],[-1,' * The maximum extent for the layer. Defaults to null.'],[-1,' * '],[-1,' * The center of these bounds will not stray outside'],[-1,' * of the viewport extent during panning. In addition, if'],[-1,' * <displayOutsideMaxExtent> is set to false, data will not be'],[-1,' * requested that falls completely outside of these bounds.'],[-1,' *\/'],[-1,' maxExtent: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: minExtent'],[-1,' * {<OpenLayers.Bounds>|Array} If provided as an array, the array'],[-1,' * should consist of four values (left, bottom, right, top).'],[-1,' * The minimum extent for the layer. Defaults to null.'],[-1,' *\/'],[-1,' minExtent: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: maxResolution'],[-1,' * {Float} Default max is 360 deg \/ 256 px, which corresponds to'],[-1,' * zoom level 0 on gmaps. Specify a different value in the layer '],[-1,' * options if you are not using the default <OpenLayers.Map.tileSize>'],[-1,' * and displaying the whole world.'],[-1,' *\/'],[-1,' maxResolution: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: minResolution'],[-1,' * {Float}'],[-1,' *\/'],[-1,' minResolution: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: numZoomLevels'],[-1,' * {Integer}'],[-1,' *\/'],[-1,' numZoomLevels: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: minScale'],[-1,' * {Float}'],[-1,' *\/'],[-1,' minScale: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: maxScale'],[-1,' * {Float}'],[-1,' *\/'],[-1,' maxScale: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: displayOutsideMaxExtent'],[-1,' * {Boolean} Request map tiles that are completely outside of the max '],[-1,' * extent for this layer. Defaults to false.'],[-1,' *\/'],[-1,' displayOutsideMaxExtent: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: wrapDateLine'],[-1,' * {Boolean} Wraps the world at the international dateline, so the map can'],[-1,' * be panned infinitely in longitudinal direction. Only use this on the'],[-1,' * base layer, and only if the layer\'s maxExtent equals the world bounds.'],[-1,' * #487 for more info. '],[-1,' *\/'],[-1,' wrapDateLine: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: metadata'],[-1,' * {Object} This object can be used to store additional information on a'],[-1,' * layer object.'],[-1,' *\/'],[-1,' metadata: null,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Layer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String} The layer name'],[-1,' * options - {Object} Hashtable of extra options to tag onto the layer'],[-1,' *\/'],[-1,' initialize: function(name, options) {'],[-1,''],[0,' this.metadata = {};'],[-1,' '],[0,' options = OpenLayers.Util.extend({}, options);'],[-1,' \/\/ make sure we respect alwaysInRange if set on the prototype'],[0,' if (this.alwaysInRange != null) {'],[0,' options.alwaysInRange = this.alwaysInRange;'],[-1,' }'],[0,' this.addOptions(options);'],[-1,''],[0,' this.name = name;'],[-1,' '],[0,' if (this.id == null) {'],[-1,''],[0,' this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + \"_\");'],[-1,''],[0,' this.div = OpenLayers.Util.createDiv(this.id);'],[0,' this.div.style.width = \"100%\";'],[0,' this.div.style.height = \"100%\";'],[0,' this.div.dir = \"ltr\";'],[-1,''],[0,' this.events = new OpenLayers.Events(this, this.div);'],[0,' if(this.eventListeners instanceof Object) {'],[0,' this.events.on(this.eventListeners);'],[-1,' }'],[-1,''],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' * Destroy is a destructor: this is to alleviate cyclic references which'],[-1,' * the Javascript garbage cleaner can not take care of on its own.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * setNewBaseLayer - {Boolean} Set a new base layer when this layer has'],[-1,' * been destroyed. Default is true.'],[-1,' *\/'],[-1,' destroy: function(setNewBaseLayer) {'],[0,' if (setNewBaseLayer == null) {'],[0,' setNewBaseLayer = true;'],[-1,' }'],[0,' if (this.map != null) {'],[0,' this.map.removeLayer(this, setNewBaseLayer);'],[-1,' }'],[0,' this.projection = null;'],[0,' this.map = null;'],[0,' this.name = null;'],[0,' this.div = null;'],[0,' this.options = null;'],[-1,''],[0,' if (this.events) {'],[0,' if(this.eventListeners) {'],[0,' this.events.un(this.eventListeners);'],[-1,' }'],[0,' this.events.destroy();'],[-1,' }'],[0,' this.eventListeners = null;'],[0,' this.events = null;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: clone'],[-1,' *'],[-1,' * Parameters:'],[-1,' * obj - {<OpenLayers.Layer>} The layer to be cloned'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Layer>} An exact clone of this <OpenLayers.Layer>'],[-1,' *\/'],[-1,' clone: function (obj) {'],[-1,' '],[0,' if (obj == null) {'],[0,' obj = new OpenLayers.Layer(this.name, this.getOptions());'],[-1,' }'],[-1,' '],[-1,' \/\/ catch any randomly tagged-on properties'],[0,' OpenLayers.Util.applyDefaults(obj, this);'],[-1,' '],[-1,' \/\/ a cloned layer should never have its map property set'],[-1,' \/\/ because it has not been added to a map yet. '],[0,' obj.map = null;'],[-1,' '],[0,' return obj;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getOptions'],[-1,' * Extracts an object from the layer with the properties that were set as'],[-1,' * options, but updates them with the values currently set on the'],[-1,' * instance.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} the <options> of the layer, representing the current state.'],[-1,' *\/'],[-1,' getOptions: function() {'],[0,' var options = {};'],[0,' for(var o in this.options) {'],[0,' options[o] = this[o];'],[-1,' }'],[0,' return options;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: setName'],[-1,' * Sets the new layer name for this layer. Can trigger a changelayer event'],[-1,' * on the map.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * newName - {String} The new name.'],[-1,' *\/'],[-1,' setName: function(newName) {'],[0,' if (newName != this.name) {'],[0,' this.name = newName;'],[0,' if (this.map != null) {'],[0,' this.map.events.triggerEvent(\"changelayer\", {'],[-1,' layer: this,'],[-1,' property: \"name\"'],[-1,' });'],[-1,' }'],[-1,' }'],[-1,' }, '],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: addOptions'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newOptions - {Object}'],[-1,' * reinitialize - {Boolean} If set to true, and if resolution options of the'],[-1,' * current baseLayer were changed, the map will be recentered to make'],[-1,' * sure that it is displayed with a valid resolution, and a'],[-1,' * changebaselayer event will be triggered.'],[-1,' *\/'],[-1,' addOptions: function (newOptions, reinitialize) {'],[-1,''],[0,' if (this.options == null) {'],[0,' this.options = {};'],[-1,' }'],[-1,' '],[0,' if (newOptions) {'],[-1,' \/\/ make sure this.projection references a projection object'],[0,' if(typeof newOptions.projection == \"string\") {'],[0,' newOptions.projection = new OpenLayers.Projection(newOptions.projection);'],[-1,' }'],[0,' if (newOptions.projection) {'],[-1,' \/\/ get maxResolution, units and maxExtent from projection defaults if'],[-1,' \/\/ they are not defined already'],[0,' OpenLayers.Util.applyDefaults(newOptions,'],[-1,' OpenLayers.Projection.defaults[newOptions.projection.getCode()]);'],[-1,' }'],[-1,' \/\/ allow array for extents'],[0,' if (newOptions.maxExtent && !(newOptions.maxExtent instanceof OpenLayers.Bounds)) {'],[0,' newOptions.maxExtent = new OpenLayers.Bounds(newOptions.maxExtent);'],[-1,' }'],[0,' if (newOptions.minExtent && !(newOptions.minExtent instanceof OpenLayers.Bounds)) {'],[0,' newOptions.minExtent = new OpenLayers.Bounds(newOptions.minExtent);'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ update our copy for clone'],[0,' OpenLayers.Util.extend(this.options, newOptions);'],[-1,''],[-1,' \/\/ add new options to this'],[0,' OpenLayers.Util.extend(this, newOptions);'],[-1,' '],[-1,' \/\/ get the units from the projection, if we have a projection'],[-1,' \/\/ and it it has units'],[0,' if(this.projection && this.projection.getUnits()) {'],[0,' this.units = this.projection.getUnits();'],[-1,' }'],[-1,''],[-1,' \/\/ re-initialize resolutions if necessary, i.e. if any of the'],[-1,' \/\/ properties of the \"properties\" array defined below is set'],[-1,' \/\/ in the new options'],[0,' if(this.map) {'],[-1,' \/\/ store current resolution so we can try to restore it later'],[0,' var resolution = this.map.getResolution();'],[0,' var properties = this.RESOLUTION_PROPERTIES.concat('],[-1,' [\"projection\", \"units\", \"minExtent\", \"maxExtent\"]'],[-1,' );'],[0,' for(var o in newOptions) {'],[0,' if(newOptions.hasOwnProperty(o) &&'],[-1,' OpenLayers.Util.indexOf(properties, o) >= 0) {'],[-1,''],[0,' this.initResolutions();'],[0,' if (reinitialize && this.map.baseLayer === this) {'],[-1,' \/\/ update map position, and restore previous resolution'],[0,' this.map.setCenter(this.map.getCenter(),'],[-1,' this.map.getZoomForResolution(resolution),'],[-1,' false, true'],[-1,' );'],[-1,' \/\/ trigger a changebaselayer event to make sure that'],[-1,' \/\/ all controls (especially'],[-1,' \/\/ OpenLayers.Control.PanZoomBar) get notified of the'],[-1,' \/\/ new options'],[0,' this.map.events.triggerEvent(\"changebaselayer\", {'],[-1,' layer: this'],[-1,' });'],[-1,' }'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: onMapResize'],[-1,' * This function can be implemented by subclasses'],[-1,' *\/'],[-1,' onMapResize: function() {'],[-1,' \/\/this function can be implemented by subclasses '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: redraw'],[-1,' * Redraws the layer. Returns true if the layer was redrawn, false if not.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The layer was redrawn.'],[-1,' *\/'],[-1,' redraw: function() {'],[0,' var redrawn = false;'],[0,' if (this.map) {'],[-1,''],[-1,' \/\/ min\/max Range may have changed'],[0,' this.inRange = this.calculateInRange();'],[-1,''],[-1,' \/\/ map\'s center might not yet be set'],[0,' var extent = this.getExtent();'],[-1,''],[0,' if (extent && this.inRange && this.visibility) {'],[0,' var zoomChanged = true;'],[0,' this.moveTo(extent, zoomChanged, false);'],[0,' this.events.triggerEvent(\"moveend\",'],[-1,' {\"zoomChanged\": zoomChanged});'],[0,' redrawn = true;'],[-1,' }'],[-1,' }'],[0,' return redrawn;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: moveTo'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to'],[-1,' * do some init work in that case.'],[-1,' * dragging - {Boolean}'],[-1,' *\/'],[-1,' moveTo:function(bounds, zoomChanged, dragging) {'],[0,' var display = this.visibility;'],[0,' if (!this.isBaseLayer) {'],[0,' display = display && this.inRange;'],[-1,' }'],[0,' this.display(display);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: moveByPx'],[-1,' * Move the layer based on pixel vector. To be implemented by subclasses.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * dx - {Number} The x coord of the displacement vector.'],[-1,' * dy - {Number} The y coord of the displacement vector.'],[-1,' *\/'],[-1,' moveByPx: function(dx, dy) {'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setMap'],[-1,' * Set the map property for the layer. This is done through an accessor'],[-1,' * so that subclasses can override this and take special action once '],[-1,' * they have their map variable set. '],[-1,' * '],[-1,' * Here we take care to bring over any of the necessary default '],[-1,' * properties from the map. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>}'],[-1,' *\/'],[-1,' setMap: function(map) {'],[0,' if (this.map == null) {'],[-1,' '],[0,' this.map = map;'],[-1,' '],[-1,' \/\/ grab some essential layer data from the map if it hasn\'t already'],[-1,' \/\/ been set'],[0,' this.maxExtent = this.maxExtent || this.map.maxExtent;'],[0,' this.minExtent = this.minExtent || this.map.minExtent;'],[-1,''],[0,' this.projection = this.projection || this.map.projection;'],[0,' if (typeof this.projection == \"string\") {'],[0,' this.projection = new OpenLayers.Projection(this.projection);'],[-1,' }'],[-1,''],[-1,' \/\/ Check the projection to see if we can get units -- if not, refer'],[-1,' \/\/ to properties.'],[0,' if (this.projection && this.projection.getUnits()) {'],[0,' this.units = this.projection.getUnits();'],[-1,' }'],[-1,' else {'],[0,' this.units = this.units || this.map.units;'],[-1,' }'],[-1,' '],[0,' this.initResolutions();'],[-1,' '],[0,' if (!this.isBaseLayer) {'],[0,' this.inRange = this.calculateInRange();'],[0,' var show = ((this.visibility) && (this.inRange));'],[0,' this.div.style.display = show ? \"\" : \"none\";'],[-1,' }'],[-1,' '],[-1,' \/\/ deal with gutters'],[0,' this.setTileSize();'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: afterAdd'],[-1,' * Called at the end of the map.addLayer sequence. At this point, the map'],[-1,' * will have a base layer. To be overridden by subclasses.'],[-1,' *\/'],[-1,' afterAdd: function() {'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: removeMap'],[-1,' * Just as setMap() allows each layer the possibility to take a '],[-1,' * personalized action on being added to the map, removeMap() allows'],[-1,' * each layer to take a personalized action on being removed from it. '],[-1,' * For now, this will be mostly unused, except for the EventPane layer,'],[-1,' * which needs this hook so that it can remove the special invisible'],[-1,' * pane. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>}'],[-1,' *\/'],[-1,' removeMap: function(map) {'],[-1,' \/\/to be overridden by subclasses'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getImageSize'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>} optional tile bounds, can be used'],[-1,' * by subclasses that have to deal with different tile sizes at the'],[-1,' * layer extent edges (e.g. Zoomify)'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Size>} The size that the image should be, taking into '],[-1,' * account gutters.'],[-1,' *\/ '],[-1,' getImageSize: function(bounds) { '],[0,' return (this.imageSize || this.tileSize); '],[-1,' }, '],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: setTileSize'],[-1,' * Set the tile size based on the map size. This also sets layer.imageSize'],[-1,' * or use by Tile.Image.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * size - {<OpenLayers.Size>}'],[-1,' *\/'],[-1,' setTileSize: function(size) {'],[0,' var tileSize = (size) ? size :'],[-1,' ((this.tileSize) ? this.tileSize :'],[-1,' this.map.getTileSize());'],[0,' this.tileSize = tileSize;'],[0,' if(this.gutter) {'],[-1,' \/\/ layers with gutters need non-null tile sizes'],[-1,' \/\/if(tileSize == null) {'],[-1,' \/\/ OpenLayers.console.error(\"Error in layer.setMap() for \" +'],[-1,' \/\/ this.name + \": layers with \" +'],[-1,' \/\/ \"gutters need non-null tile sizes\");'],[-1,' \/\/}'],[0,' this.imageSize = new OpenLayers.Size(tileSize.w + (2*this.gutter), '],[-1,' tileSize.h + (2*this.gutter)); '],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getVisibility'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The layer should be displayed (if in range).'],[-1,' *\/'],[-1,' getVisibility: function() {'],[0,' return this.visibility;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: setVisibility'],[-1,' * Set the visibility flag for the layer and hide\/show & redraw '],[-1,' * accordingly. Fire event unless otherwise specified'],[-1,' * '],[-1,' * Note that visibility is no longer simply whether or not the layer\'s'],[-1,' * style.display is set to \"block\". Now we store a \'visibility\' state '],[-1,' * property on the layer class, this allows us to remember whether or '],[-1,' * not we *desire* for a layer to be visible. In the case where the '],[-1,' * map\'s resolution is out of the layer\'s range, this desire may be '],[-1,' * subverted.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * visibility - {Boolean} Whether or not to display the layer (if in range)'],[-1,' *\/'],[-1,' setVisibility: function(visibility) {'],[0,' if (visibility != this.visibility) {'],[0,' this.visibility = visibility;'],[0,' this.display(visibility);'],[0,' this.redraw();'],[0,' if (this.map != null) {'],[0,' this.map.events.triggerEvent(\"changelayer\", {'],[-1,' layer: this,'],[-1,' property: \"visibility\"'],[-1,' });'],[-1,' }'],[0,' this.events.triggerEvent(\"visibilitychanged\");'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: display'],[-1,' * Hide or show the Layer. This is designed to be used internally, and '],[-1,' * is not generally the way to enable or disable the layer. For that,'],[-1,' * use the setVisibility function instead..'],[-1,' * '],[-1,' * Parameters:'],[-1,' * display - {Boolean}'],[-1,' *\/'],[-1,' display: function(display) {'],[0,' if (display != (this.div.style.display != \"none\")) {'],[0,' this.div.style.display = (display && this.calculateInRange()) ? \"block\" : \"none\";'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: calculateInRange'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The layer is displayable at the current map\'s current'],[-1,' * resolution. Note that if \'alwaysInRange\' is true for the layer, '],[-1,' * this function will always return true.'],[-1,' *\/'],[-1,' calculateInRange: function() {'],[0,' var inRange = false;'],[-1,''],[0,' if (this.alwaysInRange) {'],[0,' inRange = true;'],[-1,' } else {'],[0,' if (this.map) {'],[0,' var resolution = this.map.getResolution();'],[0,' inRange = ( (resolution >= this.minResolution) &&'],[-1,' (resolution <= this.maxResolution) );'],[-1,' }'],[-1,' }'],[0,' return inRange;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: setIsBaseLayer'],[-1,' * '],[-1,' * Parameters:'],[-1,' * isBaseLayer - {Boolean}'],[-1,' *\/'],[-1,' setIsBaseLayer: function(isBaseLayer) {'],[0,' if (isBaseLayer != this.isBaseLayer) {'],[0,' this.isBaseLayer = isBaseLayer;'],[0,' if (this.map != null) {'],[0,' this.map.events.triggerEvent(\"changebaselayer\", {'],[-1,' layer: this'],[-1,' });'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/********************************************************\/'],[-1,' \/* *\/'],[-1,' \/* Baselayer Functions *\/'],[-1,' \/* *\/'],[-1,' \/********************************************************\/'],[-1,' '],[-1,' \/** '],[-1,' * Method: initResolutions'],[-1,' * This method\'s responsibility is to set up the \'resolutions\' array '],[-1,' * for the layer -- this array is what the layer will use to interface'],[-1,' * between the zoom levels of the map and the resolution display '],[-1,' * of the layer.'],[-1,' * '],[-1,' * The user has several options that determine how the array is set up.'],[-1,' * '],[-1,' * For a detailed explanation, see the following wiki from the '],[-1,' * openlayers.org homepage:'],[-1,' * http:\/\/trac.openlayers.org\/wiki\/SettingZoomLevels'],[-1,' *\/'],[-1,' initResolutions: function() {'],[-1,''],[-1,' \/\/ ok we want resolutions, here\'s our strategy:'],[-1,' \/\/'],[-1,' \/\/ 1. if resolutions are defined in the layer config, use them'],[-1,' \/\/ 2. else, if scales are defined in the layer config then derive'],[-1,' \/\/ resolutions from these scales'],[-1,' \/\/ 3. else, attempt to calculate resolutions from maxResolution,'],[-1,' \/\/ minResolution, numZoomLevels, maxZoomLevel set in the'],[-1,' \/\/ layer config'],[-1,' \/\/ 4. if we still don\'t have resolutions, and if resolutions'],[-1,' \/\/ are defined in the same, use them'],[-1,' \/\/ 5. else, if scales are defined in the map then derive'],[-1,' \/\/ resolutions from these scales'],[-1,' \/\/ 6. else, attempt to calculate resolutions from maxResolution,'],[-1,' \/\/ minResolution, numZoomLevels, maxZoomLevel set in the'],[-1,' \/\/ map'],[-1,' \/\/ 7. hope for the best!'],[-1,''],[0,' var i, len, p;'],[0,' var props = {}, alwaysInRange = true;'],[-1,''],[-1,' \/\/ get resolution data from layer config'],[-1,' \/\/ (we also set alwaysInRange in the layer as appropriate)'],[0,' for(i=0, len=this.RESOLUTION_PROPERTIES.length; i<len; i++) {'],[0,' p = this.RESOLUTION_PROPERTIES[i];'],[0,' props[p] = this.options[p];'],[0,' if(alwaysInRange && this.options[p]) {'],[0,' alwaysInRange = false;'],[-1,' }'],[-1,' }'],[0,' if(this.options.alwaysInRange == null) {'],[0,' this.alwaysInRange = alwaysInRange;'],[-1,' }'],[-1,''],[-1,' \/\/ if we don\'t have resolutions then attempt to derive them from scales'],[0,' if(props.resolutions == null) {'],[0,' props.resolutions = this.resolutionsFromScales(props.scales);'],[-1,' }'],[-1,''],[-1,' \/\/ if we still don\'t have resolutions then attempt to calculate them'],[0,' if(props.resolutions == null) {'],[0,' props.resolutions = this.calculateResolutions(props);'],[-1,' }'],[-1,''],[-1,' \/\/ if we couldn\'t calculate resolutions then we look at we have'],[-1,' \/\/ in the map'],[0,' if(props.resolutions == null) {'],[0,' for(i=0, len=this.RESOLUTION_PROPERTIES.length; i<len; i++) {'],[0,' p = this.RESOLUTION_PROPERTIES[i];'],[0,' props[p] = this.options[p] != null ?'],[-1,' this.options[p] : this.map[p];'],[-1,' }'],[0,' if(props.resolutions == null) {'],[0,' props.resolutions = this.resolutionsFromScales(props.scales);'],[-1,' }'],[0,' if(props.resolutions == null) {'],[0,' props.resolutions = this.calculateResolutions(props);'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ ok, we new need to set properties in the instance'],[-1,''],[-1,' \/\/ get maxResolution from the config if it\'s defined there'],[0,' var maxResolution;'],[0,' if(this.options.maxResolution &&'],[-1,' this.options.maxResolution !== \"auto\") {'],[0,' maxResolution = this.options.maxResolution;'],[-1,' }'],[0,' if(this.options.minScale) {'],[0,' maxResolution = OpenLayers.Util.getResolutionFromScale('],[-1,' this.options.minScale, this.units);'],[-1,' }'],[-1,''],[-1,' \/\/ get minResolution from the config if it\'s defined there'],[0,' var minResolution;'],[0,' if(this.options.minResolution &&'],[-1,' this.options.minResolution !== \"auto\") {'],[0,' minResolution = this.options.minResolution;'],[-1,' }'],[0,' if(this.options.maxScale) {'],[0,' minResolution = OpenLayers.Util.getResolutionFromScale('],[-1,' this.options.maxScale, this.units);'],[-1,' }'],[-1,''],[0,' if(props.resolutions) {'],[-1,''],[-1,' \/\/sort resolutions array descendingly'],[0,' props.resolutions.sort(function(a, b) {'],[0,' return (b - a);'],[-1,' });'],[-1,''],[-1,' \/\/ if we still don\'t have a maxResolution get it from the'],[-1,' \/\/ resolutions array'],[0,' if(!maxResolution) {'],[0,' maxResolution = props.resolutions[0];'],[-1,' }'],[-1,''],[-1,' \/\/ if we still don\'t have a minResolution get it from the'],[-1,' \/\/ resolutions array'],[0,' if(!minResolution) {'],[0,' var lastIdx = props.resolutions.length - 1;'],[0,' minResolution = props.resolutions[lastIdx];'],[-1,' }'],[-1,' }'],[-1,''],[0,' this.resolutions = props.resolutions;'],[0,' if(this.resolutions) {'],[0,' len = this.resolutions.length;'],[0,' this.scales = new Array(len);'],[0,' for(i=0; i<len; i++) {'],[0,' this.scales[i] = OpenLayers.Util.getScaleFromResolution('],[-1,' this.resolutions[i], this.units);'],[-1,' }'],[0,' this.numZoomLevels = len;'],[-1,' }'],[0,' this.minResolution = minResolution;'],[0,' if(minResolution) {'],[0,' this.maxScale = OpenLayers.Util.getScaleFromResolution('],[-1,' minResolution, this.units);'],[-1,' }'],[0,' this.maxResolution = maxResolution;'],[0,' if(maxResolution) {'],[0,' this.minScale = OpenLayers.Util.getScaleFromResolution('],[-1,' maxResolution, this.units);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: resolutionsFromScales'],[-1,' * Derive resolutions from scales.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * scales - {Array(Number)} Scales'],[-1,' *'],[-1,' * Returns'],[-1,' * {Array(Number)} Resolutions'],[-1,' *\/'],[-1,' resolutionsFromScales: function(scales) {'],[0,' if(scales == null) {'],[0,' return;'],[-1,' }'],[0,' var resolutions, i, len;'],[0,' len = scales.length;'],[0,' resolutions = new Array(len);'],[0,' for(i=0; i<len; i++) {'],[0,' resolutions[i] = OpenLayers.Util.getResolutionFromScale('],[-1,' scales[i], this.units);'],[-1,' }'],[0,' return resolutions;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: calculateResolutions'],[-1,' * Calculate resolutions based on the provided properties.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * props - {Object} Properties'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array({Number})} Array of resolutions.'],[-1,' *\/'],[-1,' calculateResolutions: function(props) {'],[-1,''],[0,' var viewSize, wRes, hRes;'],[-1,''],[-1,' \/\/ determine maxResolution'],[0,' var maxResolution = props.maxResolution;'],[0,' if(props.minScale != null) {'],[0,' maxResolution ='],[-1,' OpenLayers.Util.getResolutionFromScale(props.minScale,'],[-1,' this.units);'],[0,' } else if(maxResolution == \"auto\" && this.maxExtent != null) {'],[0,' viewSize = this.map.getSize();'],[0,' wRes = this.maxExtent.getWidth() \/ viewSize.w;'],[0,' hRes = this.maxExtent.getHeight() \/ viewSize.h;'],[0,' maxResolution = Math.max(wRes, hRes);'],[-1,' }'],[-1,''],[-1,' \/\/ determine minResolution'],[0,' var minResolution = props.minResolution;'],[0,' if(props.maxScale != null) {'],[0,' minResolution ='],[-1,' OpenLayers.Util.getResolutionFromScale(props.maxScale,'],[-1,' this.units);'],[0,' } else if(props.minResolution == \"auto\" && this.minExtent != null) {'],[0,' viewSize = this.map.getSize();'],[0,' wRes = this.minExtent.getWidth() \/ viewSize.w;'],[0,' hRes = this.minExtent.getHeight()\/ viewSize.h;'],[0,' minResolution = Math.max(wRes, hRes);'],[-1,' }'],[-1,''],[0,' if(typeof maxResolution !== \"number\" &&'],[-1,' typeof minResolution !== \"number\" &&'],[-1,' this.maxExtent != null) {'],[-1,' \/\/ maxResolution for default grid sets assumes that at zoom'],[-1,' \/\/ level zero, the whole world fits on one tile.'],[0,' var tileSize = this.map.getTileSize();'],[0,' maxResolution = Math.max('],[-1,' this.maxExtent.getWidth() \/ tileSize.w,'],[-1,' this.maxExtent.getHeight() \/ tileSize.h'],[-1,' );'],[-1,' }'],[-1,''],[-1,' \/\/ determine numZoomLevels'],[0,' var maxZoomLevel = props.maxZoomLevel;'],[0,' var numZoomLevels = props.numZoomLevels;'],[0,' if(typeof minResolution === \"number\" &&'],[-1,' typeof maxResolution === \"number\" && numZoomLevels === undefined) {'],[0,' var ratio = maxResolution \/ minResolution;'],[0,' numZoomLevels = Math.floor(Math.log(ratio) \/ Math.log(2)) + 1;'],[0,' } else if(numZoomLevels === undefined && maxZoomLevel != null) {'],[0,' numZoomLevels = maxZoomLevel + 1;'],[-1,' }'],[-1,''],[-1,' \/\/ are we able to calculate resolutions?'],[0,' if(typeof numZoomLevels !== \"number\" || numZoomLevels <= 0 ||'],[-1,' (typeof maxResolution !== \"number\" &&'],[-1,' typeof minResolution !== \"number\")) {'],[0,' return;'],[-1,' }'],[-1,''],[-1,' \/\/ now we have numZoomLevels and at least one of maxResolution'],[-1,' \/\/ or minResolution, we can populate the resolutions array'],[-1,''],[0,' var resolutions = new Array(numZoomLevels);'],[0,' var base = 2;'],[0,' if(typeof minResolution == \"number\" &&'],[-1,' typeof maxResolution == \"number\") {'],[-1,' \/\/ if maxResolution and minResolution are set, we calculate'],[-1,' \/\/ the base for exponential scaling that starts at'],[-1,' \/\/ maxResolution and ends at minResolution in numZoomLevels'],[-1,' \/\/ steps.'],[0,' base = Math.pow('],[-1,' (maxResolution \/ minResolution),'],[-1,' (1 \/ (numZoomLevels - 1))'],[-1,' );'],[-1,' }'],[-1,''],[0,' var i;'],[0,' if(typeof maxResolution === \"number\") {'],[0,' for(i=0; i<numZoomLevels; i++) {'],[0,' resolutions[i] = maxResolution \/ Math.pow(base, i);'],[-1,' }'],[-1,' } else {'],[0,' for(i=0; i<numZoomLevels; i++) {'],[0,' resolutions[numZoomLevels - 1 - i] ='],[-1,' minResolution * Math.pow(base, i);'],[-1,' }'],[-1,' }'],[-1,''],[0,' return resolutions;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getResolution'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} The currently selected resolution of the map, taken from the'],[-1,' * resolutions array, indexed by current zoom level.'],[-1,' *\/'],[-1,' getResolution: function() {'],[0,' var zoom = this.map.getZoom();'],[0,' return this.getResolutionForZoom(zoom);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: getExtent'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A Bounds object which represents the lon\/lat '],[-1,' * bounds of the current viewPort.'],[-1,' *\/'],[-1,' getExtent: function() {'],[-1,' \/\/ just use stock map calculateBounds function -- passing no arguments'],[-1,' \/\/ means it will user map\'s current center & resolution'],[-1,' \/\/'],[0,' return this.map.calculateBounds();'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getZoomForExtent'],[-1,' * '],[-1,' * Parameters:'],[-1,' * extent - {<OpenLayers.Bounds>}'],[-1,' * closest - {Boolean} Find the zoom level that most closely fits the '],[-1,' * specified bounds. Note that this may result in a zoom that does '],[-1,' * not exactly contain the entire extent.'],[-1,' * Default is false.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Integer} The index of the zoomLevel (entry in the resolutions array) '],[-1,' * for the passed-in extent. We do this by calculating the ideal '],[-1,' * resolution for the given extent (based on the map size) and then '],[-1,' * calling getZoomForResolution(), passing along the \'closest\''],[-1,' * parameter.'],[-1,' *\/'],[-1,' getZoomForExtent: function(extent, closest) {'],[0,' var viewSize = this.map.getSize();'],[0,' var idealResolution = Math.max( extent.getWidth() \/ viewSize.w,'],[-1,' extent.getHeight() \/ viewSize.h );'],[-1,''],[0,' return this.getZoomForResolution(idealResolution, closest);'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: getDataExtent'],[-1,' * Calculates the max extent which includes all of the data for the layer.'],[-1,' * This function is to be implemented by subclasses.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' getDataExtent: function () {'],[-1,' \/\/to be implemented by subclasses'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getResolutionForZoom'],[-1,' * '],[-1,' * Parameters:'],[-1,' * zoom - {Float}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} A suitable resolution for the specified zoom.'],[-1,' *\/'],[-1,' getResolutionForZoom: function(zoom) {'],[0,' zoom = Math.max(0, Math.min(zoom, this.resolutions.length - 1));'],[0,' var resolution;'],[0,' if(this.map.fractionalZoom) {'],[0,' var low = Math.floor(zoom);'],[0,' var high = Math.ceil(zoom);'],[0,' resolution = this.resolutions[low] -'],[-1,' ((zoom-low) * (this.resolutions[low]-this.resolutions[high]));'],[-1,' } else {'],[0,' resolution = this.resolutions[Math.round(zoom)];'],[-1,' }'],[0,' return resolution;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getZoomForResolution'],[-1,' * '],[-1,' * Parameters:'],[-1,' * resolution - {Float}'],[-1,' * closest - {Boolean} Find the zoom level that corresponds to the absolute '],[-1,' * closest resolution, which may result in a zoom whose corresponding'],[-1,' * resolution is actually smaller than we would have desired (if this'],[-1,' * is being called from a getZoomForExtent() call, then this means that'],[-1,' * the returned zoom index might not actually contain the entire '],[-1,' * extent specified... but it\'ll be close).'],[-1,' * Default is false.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Integer} The index of the zoomLevel (entry in the resolutions array) '],[-1,' * that corresponds to the best fit resolution given the passed in '],[-1,' * value and the \'closest\' specification.'],[-1,' *\/'],[-1,' getZoomForResolution: function(resolution, closest) {'],[0,' var zoom, i, len;'],[0,' if(this.map.fractionalZoom) {'],[0,' var lowZoom = 0;'],[0,' var highZoom = this.resolutions.length - 1;'],[0,' var highRes = this.resolutions[lowZoom];'],[0,' var lowRes = this.resolutions[highZoom];'],[0,' var res;'],[0,' for(i=0, len=this.resolutions.length; i<len; ++i) {'],[0,' res = this.resolutions[i];'],[0,' if(res >= resolution) {'],[0,' highRes = res;'],[0,' lowZoom = i;'],[-1,' }'],[0,' if(res <= resolution) {'],[0,' lowRes = res;'],[0,' highZoom = i;'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' var dRes = highRes - lowRes;'],[0,' if(dRes > 0) {'],[0,' zoom = lowZoom + ((highRes - resolution) \/ dRes);'],[-1,' } else {'],[0,' zoom = lowZoom;'],[-1,' }'],[-1,' } else {'],[0,' var diff;'],[0,' var minDiff = Number.POSITIVE_INFINITY;'],[0,' for(i=0, len=this.resolutions.length; i<len; i++) { '],[0,' if (closest) {'],[0,' diff = Math.abs(this.resolutions[i] - resolution);'],[0,' if (diff > minDiff) {'],[0,' break;'],[-1,' }'],[0,' minDiff = diff;'],[-1,' } else {'],[0,' if (this.resolutions[i] < resolution) {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' zoom = Math.max(0, i-1);'],[-1,' }'],[0,' return zoom;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getLonLatFromViewPortPx'],[-1,' * '],[-1,' * Parameters:'],[-1,' * viewPortPx - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or'],[-1,' * an object with a \'x\''],[-1,' * and \'y\' properties.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} An OpenLayers.LonLat which is the passed-in '],[-1,' * view port <OpenLayers.Pixel>, translated into lon\/lat by the layer.'],[-1,' *\/'],[-1,' getLonLatFromViewPortPx: function (viewPortPx) {'],[0,' var lonlat = null;'],[0,' var map = this.map;'],[0,' if (viewPortPx != null && map.minPx) {'],[0,' var res = map.getResolution();'],[0,' var maxExtent = map.getMaxExtent({restricted: true});'],[0,' var lon = (viewPortPx.x - map.minPx.x) * res + maxExtent.left;'],[0,' var lat = (map.minPx.y - viewPortPx.y) * res + maxExtent.top;'],[0,' lonlat = new OpenLayers.LonLat(lon, lat);'],[-1,''],[0,' if (this.wrapDateLine) {'],[0,' lonlat = lonlat.wrapDateLine(this.maxExtent);'],[-1,' }'],[-1,' }'],[0,' return lonlat;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getViewPortPxFromLonLat'],[-1,' * Returns a pixel location given a map location. This method will return'],[-1,' * fractional pixel values.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>|Object} An OpenLayers.LonLat or'],[-1,' * an object with a \'lon\''],[-1,' * and \'lat\' properties.'],[-1,' *'],[-1,' * Returns: '],[-1,' * {<OpenLayers.Pixel>} An <OpenLayers.Pixel> which is the passed-in '],[-1,' * lonlat translated into view port pixels.'],[-1,' *\/'],[-1,' getViewPortPxFromLonLat: function (lonlat, resolution) {'],[0,' var px = null; '],[0,' if (lonlat != null) {'],[0,' resolution = resolution || this.map.getResolution();'],[0,' var extent = this.map.calculateBounds(null, resolution);'],[0,' px = new OpenLayers.Pixel('],[-1,' (1\/resolution * (lonlat.lon - extent.left)),'],[-1,' (1\/resolution * (extent.top - lonlat.lat))'],[-1,' ); '],[-1,' }'],[0,' return px;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: setOpacity'],[-1,' * Sets the opacity for the entire layer (all images)'],[-1,' * '],[-1,' * Parameters:'],[-1,' * opacity - {Float}'],[-1,' *\/'],[-1,' setOpacity: function(opacity) {'],[0,' if (opacity != this.opacity) {'],[0,' this.opacity = opacity;'],[0,' var childNodes = this.div.childNodes;'],[0,' for(var i = 0, len = childNodes.length; i < len; ++i) {'],[0,' var element = childNodes[i].firstChild || childNodes[i];'],[0,' var lastChild = childNodes[i].lastChild;'],[-1,' \/\/TODO de-uglify this'],[0,' if (lastChild && lastChild.nodeName.toLowerCase() === \"iframe\") {'],[0,' element = lastChild.parentNode;'],[-1,' }'],[0,' OpenLayers.Util.modifyDOMElement(element, null, null, null, '],[-1,' null, null, null, opacity);'],[-1,' }'],[0,' if (this.map != null) {'],[0,' this.map.events.triggerEvent(\"changelayer\", {'],[-1,' layer: this,'],[-1,' property: \"opacity\"'],[-1,' });'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getZIndex'],[-1,' * '],[-1,' * Returns: '],[-1,' * {Integer} the z-index of this layer'],[-1,' *\/ '],[-1,' getZIndex: function () {'],[0,' return this.div.style.zIndex;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setZIndex'],[-1,' * '],[-1,' * Parameters: '],[-1,' * zIndex - {Integer}'],[-1,' *\/ '],[-1,' setZIndex: function (zIndex) {'],[0,' this.div.style.zIndex = zIndex;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: adjustBounds'],[-1,' * This function will take a bounds, and if wrapDateLine option is set'],[-1,' * on the layer, it will return a bounds which is wrapped around the '],[-1,' * world. We do not wrap for bounds which *cross* the '],[-1,' * maxExtent.left\/right, only bounds which are entirely to the left '],[-1,' * or entirely to the right.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' adjustBounds: function (bounds) {'],[-1,''],[0,' if (this.gutter) {'],[-1,' \/\/ Adjust the extent of a bounds in map units by the '],[-1,' \/\/ layer\'s gutter in pixels.'],[0,' var mapGutter = this.gutter * this.map.getResolution();'],[0,' bounds = new OpenLayers.Bounds(bounds.left - mapGutter,'],[-1,' bounds.bottom - mapGutter,'],[-1,' bounds.right + mapGutter,'],[-1,' bounds.top + mapGutter);'],[-1,' }'],[-1,''],[0,' if (this.wrapDateLine) {'],[-1,' \/\/ wrap around the date line, within the limits of rounding error'],[0,' var wrappingOptions = { '],[-1,' \'rightTolerance\':this.getResolution(),'],[-1,' \'leftTolerance\':this.getResolution()'],[-1,' }; '],[0,' bounds = bounds.wrapDateLine(this.maxExtent, wrappingOptions);'],[-1,' '],[-1,' }'],[0,' return bounds;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Layer\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Layer\/HTTPRequest.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Layer.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Layer.HTTPRequest'],[-1,' * '],[-1,' * Inherits from: '],[-1,' * - <OpenLayers.Layer>'],[-1,' *\/'],[1,'OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, {'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>}'],[-1,' *'],[-1,' * Supported event types (in addition to those from <OpenLayers.Layer.events>):'],[-1,' * refresh - Triggered when a redraw is forced, to re-fetch data from the'],[-1,' * server.'],[-1,' *\/'],[-1,''],[-1,' \/** '],[-1,' * Constant: URL_HASH_FACTOR'],[-1,' * {Float} Used to hash URL param strings for multi-WMS server selection.'],[-1,' * Set to the Golden Ratio per Knuth\'s recommendation.'],[-1,' *\/'],[-1,' URL_HASH_FACTOR: (Math.sqrt(5) - 1) \/ 2,'],[-1,''],[-1,' \/** '],[-1,' * Property: url'],[-1,' * {Array(String) or String} This is either an array of url strings or '],[-1,' * a single url string. '],[-1,' *\/'],[-1,' url: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: params'],[-1,' * {Object} Hashtable of key\/value parameters'],[-1,' *\/'],[-1,' params: null,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: reproject'],[-1,' * *Deprecated*. See http:\/\/docs.openlayers.org\/library\/spherical_mercator.html'],[-1,' * for information on the replacement for this functionality. '],[-1,' * {Boolean} Whether layer should reproject itself based on base layer '],[-1,' * locations. This allows reprojection onto commercial layers. '],[-1,' * Default is false: Most layers can\'t reproject, but layers '],[-1,' * which can create non-square geographic pixels can, like WMS.'],[-1,' * '],[-1,' *\/'],[-1,' reproject: false,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Layer.HTTPRequest'],[-1,' * '],[-1,' * Parameters:'],[-1,' * name - {String}'],[-1,' * url - {Array(String) or String}'],[-1,' * params - {Object}'],[-1,' * options - {Object} Hashtable of extra options to tag onto the layer'],[-1,' *\/'],[-1,' initialize: function(name, url, params, options) {'],[0,' OpenLayers.Layer.prototype.initialize.apply(this, [name, options]);'],[0,' this.url = url;'],[0,' if (!this.params) {'],[0,' this.params = OpenLayers.Util.extend({}, params);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' this.url = null;'],[0,' this.params = null;'],[0,' OpenLayers.Layer.prototype.destroy.apply(this, arguments); '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * '],[-1,' * Parameters:'],[-1,' * obj - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Layer.HTTPRequest>} An exact clone of this '],[-1,' * <OpenLayers.Layer.HTTPRequest>'],[-1,' *\/'],[-1,' clone: function (obj) {'],[-1,' '],[0,' if (obj == null) {'],[0,' obj = new OpenLayers.Layer.HTTPRequest(this.name,'],[-1,' this.url,'],[-1,' this.params,'],[-1,' this.getOptions());'],[-1,' }'],[-1,' '],[-1,' \/\/get all additions from superclasses'],[0,' obj = OpenLayers.Layer.prototype.clone.apply(this, [obj]);'],[-1,''],[-1,' \/\/ copy\/set any non-init, non-simple values here'],[-1,' '],[0,' return obj;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: setUrl'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newUrl - {String}'],[-1,' *\/'],[-1,' setUrl: function(newUrl) {'],[0,' this.url = newUrl;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: mergeNewParams'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newParams - {Object}'],[-1,' *'],[-1,' * Returns:'],[-1,' * redrawn: {Boolean} whether the layer was actually redrawn.'],[-1,' *\/'],[-1,' mergeNewParams:function(newParams) {'],[0,' this.params = OpenLayers.Util.extend(this.params, newParams);'],[0,' var ret = this.redraw();'],[0,' if(this.map != null) {'],[0,' this.map.events.triggerEvent(\"changelayer\", {'],[-1,' layer: this,'],[-1,' property: \"params\"'],[-1,' });'],[-1,' }'],[0,' return ret;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: redraw'],[-1,' * Redraws the layer. Returns true if the layer was redrawn, false if not.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * force - {Boolean} Force redraw by adding random parameter.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The layer was redrawn.'],[-1,' *\/'],[-1,' redraw: function(force) { '],[0,' if (force) {'],[0,' this.events.triggerEvent(\'refresh\');'],[0,' return this.mergeNewParams({\"_olSalt\": Math.random()});'],[-1,' } else {'],[0,' return OpenLayers.Layer.prototype.redraw.apply(this, []);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: selectUrl'],[-1,' * selectUrl() implements the standard floating-point multiplicative'],[-1,' * hash function described by Knuth, and hashes the contents of the '],[-1,' * given param string into a float between 0 and 1. This float is then'],[-1,' * scaled to the size of the provided urls array, and used to select'],[-1,' * a URL.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * paramString - {String}'],[-1,' * urls - {Array(String)}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} An entry from the urls array, deterministically selected based'],[-1,' * on the paramString.'],[-1,' *\/'],[-1,' selectUrl: function(paramString, urls) {'],[0,' var product = 1;'],[0,' for (var i=0, len=paramString.length; i<len; i++) { '],[0,' product *= paramString.charCodeAt(i) * this.URL_HASH_FACTOR; '],[0,' product -= Math.floor(product); '],[-1,' }'],[0,' return urls[Math.floor(product * urls.length)];'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: getFullRequestString'],[-1,' * Combine url with layer\'s params and these newParams. '],[-1,' * '],[-1,' * does checking on the serverPath variable, allowing for cases when it '],[-1,' * is supplied with trailing ? or &, as well as cases where not. '],[-1,' *'],[-1,' * return in formatted string like this:'],[-1,' * \"server?key1=value1&key2=value2&key3=value3\"'],[-1,' * '],[-1,' * WARNING: The altUrl parameter is deprecated and will be removed in 3.0.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * newParams - {Object}'],[-1,' * altUrl - {String} Use this as the url instead of the layer\'s url'],[-1,' * '],[-1,' * Returns: '],[-1,' * {String}'],[-1,' *\/'],[-1,' getFullRequestString:function(newParams, altUrl) {'],[-1,''],[-1,' \/\/ if not altUrl passed in, use layer\'s url'],[0,' var url = altUrl || this.url;'],[-1,' '],[-1,' \/\/ create a new params hashtable with all the layer params and the '],[-1,' \/\/ new params together. then convert to string'],[0,' var allParams = OpenLayers.Util.extend({}, this.params);'],[0,' allParams = OpenLayers.Util.extend(allParams, newParams);'],[0,' var paramsString = OpenLayers.Util.getParameterString(allParams);'],[-1,' '],[-1,' \/\/ if url is not a string, it should be an array of strings, '],[-1,' \/\/ in which case we will deterministically select one of them in '],[-1,' \/\/ order to evenly distribute requests to different urls.'],[-1,' \/\/'],[0,' if (OpenLayers.Util.isArray(url)) {'],[0,' url = this.selectUrl(paramsString, url);'],[-1,' } '],[-1,' '],[-1,' \/\/ ignore parameters that are already in the url search string'],[0,' var urlParams = '],[-1,' OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));'],[0,' for(var key in allParams) {'],[0,' if(key.toUpperCase() in urlParams) {'],[0,' delete allParams[key];'],[-1,' }'],[-1,' }'],[0,' paramsString = OpenLayers.Util.getParameterString(allParams);'],[-1,' '],[0,' return OpenLayers.Util.urlAppend(url, paramsString);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Layer.HTTPRequest\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Tile.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Tile '],[-1,' * This is a class designed to designate a single tile, however'],[-1,' * it is explicitly designed to do relatively little. Tiles store '],[-1,' * information about themselves -- such as the URL that they are related'],[-1,' * to, and their size - but do not add themselves to the layer div '],[-1,' * automatically, for example. Create a new tile with the '],[-1,' * <OpenLayers.Tile> constructor, or a subclass. '],[-1,' * '],[-1,' * TBD 3.0 - remove reference to url in above paragraph'],[-1,' * '],[-1,' *\/'],[1,'OpenLayers.Tile = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>} An events object that handles all '],[-1,' * events on the tile.'],[-1,' *'],[-1,' * Register a listener for a particular event with the following syntax:'],[-1,' * (code)'],[-1,' * tile.events.register(type, obj, listener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Supported event types:'],[-1,' * beforedraw - Triggered before the tile is drawn. Used to defer'],[-1,' * drawing to an animation queue. To defer drawing, listeners need'],[-1,' * to return false, which will abort drawing. The queue handler needs'],[-1,' * to call <draw>(true) to actually draw the tile.'],[-1,' * loadstart - Triggered when tile loading starts.'],[-1,' * loadend - Triggered when tile loading ends.'],[-1,' * loaderror - Triggered before the loadend event (i.e. when the tile is'],[-1,' * still hidden) if the tile could not be loaded.'],[-1,' * reload - Triggered when an already loading tile is reloaded.'],[-1,' * unload - Triggered before a tile is unloaded.'],[-1,' *\/'],[-1,' events: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: eventListeners'],[-1,' * {Object} If set as an option at construction, the eventListeners'],[-1,' * object will be registered with <OpenLayers.Events.on>. Object'],[-1,' * structure must be a listeners object as shown in the example for'],[-1,' * the events.on method.'],[-1,' *'],[-1,' * This options can be set in the ``tileOptions`` option from'],[-1,' * <OpenLayers.Layer.Grid>. For example, to be notified of the'],[-1,' * ``loadend`` event of each tiles:'],[-1,' * (code)'],[-1,' * new OpenLayers.Layer.OSM(\'osm\', \'http:\/\/tile.openstreetmap.org\/${z}\/${x}\/${y}.png\', {'],[-1,' * tileOptions: {'],[-1,' * eventListeners: {'],[-1,' * \'loadend\': function(evt) {'],[-1,' * \/\/ do something on loadend'],[-1,' * }'],[-1,' * }'],[-1,' * }'],[-1,' * });'],[-1,' * (end)'],[-1,' *\/'],[-1,' eventListeners: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: id '],[-1,' * {String} null'],[-1,' *\/'],[-1,' id: null,'],[-1,' '],[-1,' \/** '],[-1,' * Property: layer '],[-1,' * {<OpenLayers.Layer>} layer the tile is attached to '],[-1,' *\/'],[-1,' layer: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: url'],[-1,' * {String} url of the request.'],[-1,' *'],[-1,' * TBD 3.0 '],[-1,' * Deprecated. The base tile class does not need an url. This should be '],[-1,' * handled in subclasses. Does not belong here.'],[-1,' *\/'],[-1,' url: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: bounds '],[-1,' * {<OpenLayers.Bounds>} null'],[-1,' *\/'],[-1,' bounds: null,'],[-1,' '],[-1,' \/** '],[-1,' * Property: size '],[-1,' * {<OpenLayers.Size>} null'],[-1,' *\/'],[-1,' size: null,'],[-1,' '],[-1,' \/** '],[-1,' * Property: position '],[-1,' * {<OpenLayers.Pixel>} Top Left pixel of the tile'],[-1,' *\/ '],[-1,' position: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: isLoading'],[-1,' * {Boolean} Is the tile loading?'],[-1,' *\/'],[-1,' isLoading: false,'],[-1,' '],[-1,' \/** TBD 3.0 -- remove \'url\' from the list of parameters to the constructor.'],[-1,' * there is no need for the base tile class to have a url.'],[-1,' *\/'],[-1,''],[-1,' \/** '],[-1,' * Constructor: OpenLayers.Tile'],[-1,' * Constructor for a new <OpenLayers.Tile> instance.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>} layer that the tile will go in.'],[-1,' * position - {<OpenLayers.Pixel>}'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * url - {<String>}'],[-1,' * size - {<OpenLayers.Size>}'],[-1,' * options - {Object}'],[-1,' *\/ '],[-1,' initialize: function(layer, position, bounds, url, size, options) {'],[0,' this.layer = layer;'],[0,' this.position = position.clone();'],[0,' this.setBounds(bounds);'],[0,' this.url = url;'],[0,' if (size) {'],[0,' this.size = size.clone();'],[-1,' }'],[-1,''],[-1,' \/\/give the tile a unique id based on its BBOX.'],[0,' this.id = OpenLayers.Util.createUniqueID(\"Tile_\");'],[-1,''],[0,' OpenLayers.Util.extend(this, options);'],[-1,''],[0,' this.events = new OpenLayers.Events(this);'],[0,' if (this.eventListeners instanceof Object) {'],[0,' this.events.on(this.eventListeners);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: unload'],[-1,' * Call immediately before destroying if you are listening to tile'],[-1,' * events, so that counters are properly handled if tile is still'],[-1,' * loading at destroy-time. Will only fire an event if the tile is'],[-1,' * still loading.'],[-1,' *\/'],[-1,' unload: function() {'],[0,' if (this.isLoading) { '],[0,' this.isLoading = false; '],[0,' this.events.triggerEvent(\"unload\"); '],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: destroy'],[-1,' * Nullify references to prevent circular references and memory leaks.'],[-1,' *\/'],[-1,' destroy:function() {'],[0,' this.layer = null;'],[0,' this.bounds = null;'],[0,' this.size = null;'],[0,' this.position = null;'],[-1,' '],[0,' if (this.eventListeners) {'],[0,' this.events.un(this.eventListeners);'],[-1,' }'],[0,' this.events.destroy();'],[0,' this.eventListeners = null;'],[0,' this.events = null;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: draw'],[-1,' * Clear whatever is currently in the tile, then return whether or not '],[-1,' * it should actually be re-drawn. This is an example implementation'],[-1,' * that can be overridden by subclasses. The minimum thing to do here'],[-1,' * is to call <clear> and return the result from <shouldDraw>.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * force - {Boolean} If true, the tile will not be cleared and no beforedraw'],[-1,' * event will be fired. This is used for drawing tiles asynchronously'],[-1,' * after drawing has been cancelled by returning false from a beforedraw'],[-1,' * listener.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the tile should actually be drawn. Returns null'],[-1,' * if a beforedraw listener returned false.'],[-1,' *\/'],[-1,' draw: function(force) {'],[0,' if (!force) {'],[-1,' \/\/clear tile\'s contents and mark as not drawn'],[0,' this.clear();'],[-1,' }'],[0,' var draw = this.shouldDraw();'],[0,' if (draw && !force && this.events.triggerEvent(\"beforedraw\") === false) {'],[0,' draw = null;'],[-1,' }'],[0,' return draw;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: shouldDraw'],[-1,' * Return whether or not the tile should actually be (re-)drawn. The only'],[-1,' * case where we *wouldn\'t* want to draw the tile is if the tile is outside'],[-1,' * its layer\'s maxExtent'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the tile should actually be drawn.'],[-1,' *\/'],[-1,' shouldDraw: function() { '],[0,' var withinMaxExtent = false,'],[-1,' maxExtent = this.layer.maxExtent;'],[0,' if (maxExtent) {'],[0,' var map = this.layer.map;'],[0,' var worldBounds = map.baseLayer.wrapDateLine && map.getMaxExtent();'],[0,' if (this.bounds.intersectsBounds(maxExtent, {inclusive: false, worldBounds: worldBounds})) {'],[0,' withinMaxExtent = true;'],[-1,' }'],[-1,' }'],[-1,' '],[0,' return withinMaxExtent || this.layer.displayOutsideMaxExtent;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setBounds'],[-1,' * Sets the bounds on this instance'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' setBounds: function(bounds) {'],[0,' bounds = bounds.clone();'],[0,' if (this.layer.map.baseLayer.wrapDateLine) {'],[0,' var worldExtent = this.layer.map.getMaxExtent(),'],[-1,' tolerance = this.layer.map.getResolution();'],[0,' bounds = bounds.wrapDateLine(worldExtent, {'],[-1,' leftTolerance: tolerance,'],[-1,' rightTolerance: tolerance'],[-1,' });'],[-1,' }'],[0,' this.bounds = bounds;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: moveTo'],[-1,' * Reposition the tile.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * position - {<OpenLayers.Pixel>}'],[-1,' * redraw - {Boolean} Call draw method on tile after moving.'],[-1,' * Default is true'],[-1,' *\/'],[-1,' moveTo: function (bounds, position, redraw) {'],[0,' if (redraw == null) {'],[0,' redraw = true;'],[-1,' }'],[-1,''],[0,' this.setBounds(bounds);'],[0,' this.position = position.clone();'],[0,' if (redraw) {'],[0,' this.draw();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: clear'],[-1,' * Clear the tile of any bounds\/position-related data so that it can '],[-1,' * be reused in a new location.'],[-1,' *\/'],[-1,' clear: function(draw) {'],[-1,' \/\/ to be extended by subclasses'],[-1,' },'],[-1,' '],[-1,' CLASS_NAME: \"OpenLayers.Tile\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Tile\/Image.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Tile.js'],[-1,' * @requires OpenLayers\/Animation.js'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Tile.Image'],[-1,' * Instances of OpenLayers.Tile.Image are used to manage the image tiles'],[-1,' * used by various layers. Create a new image tile with the'],[-1,' * <OpenLayers.Tile.Image> constructor.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Tile>'],[-1,' *\/'],[1,'OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>} An events object that handles all '],[-1,' * events on the tile.'],[-1,' *'],[-1,' * Register a listener for a particular event with the following syntax:'],[-1,' * (code)'],[-1,' * tile.events.register(type, obj, listener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Supported event types (in addition to the <OpenLayers.Tile> events):'],[-1,' * beforeload - Triggered before an image is prepared for loading, when the'],[-1,' * url for the image is known already. Listeners may call <setImage> on'],[-1,' * the tile instance. If they do so, that image will be used and no new'],[-1,' * one will be created.'],[-1,' *\/'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: url'],[-1,' * {String} The URL of the image being requested. No default. Filled in by'],[-1,' * layer.getURL() function. May be modified by loadstart listeners.'],[-1,' *\/'],[-1,' url: null,'],[-1,' '],[-1,' \/** '],[-1,' * Property: imgDiv'],[-1,' * {HTMLImageElement} The image for this tile.'],[-1,' *\/'],[-1,' imgDiv: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: frame'],[-1,' * {DOMElement} The image element is appended to the frame. Any gutter on'],[-1,' * the image will be hidden behind the frame. If no gutter is set,'],[-1,' * this will be null.'],[-1,' *\/ '],[-1,' frame: null, '],[-1,''],[-1,' \/** '],[-1,' * Property: imageReloadAttempts'],[-1,' * {Integer} Attempts to load the image.'],[-1,' *\/'],[-1,' imageReloadAttempts: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: layerAlphaHack'],[-1,' * {Boolean} True if the png alpha hack needs to be applied on the layer\'s div.'],[-1,' *\/'],[-1,' layerAlphaHack: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: asyncRequestId'],[-1,' * {Integer} ID of an request to see if request is still valid. This is a'],[-1,' * number which increments by 1 for each asynchronous request.'],[-1,' *\/'],[-1,' asyncRequestId: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: maxGetUrlLength'],[-1,' * {Number} If set, requests that would result in GET urls with more'],[-1,' * characters than the number provided will be made using form-encoded'],[-1,' * HTTP POST. It is good practice to avoid urls that are longer than 2048'],[-1,' * characters.'],[-1,' *'],[-1,' * Caution:'],[-1,' * Older versions of Gecko based browsers (e.g. Firefox < 3.5) and most'],[-1,' * Opera versions do not fully support this option. On all browsers,'],[-1,' * transition effects are not supported if POST requests are used.'],[-1,' *\/'],[-1,' maxGetUrlLength: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: canvasContext'],[-1,' * {CanvasRenderingContext2D} A canvas context associated with'],[-1,' * the tile image.'],[-1,' *\/'],[-1,' canvasContext: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: crossOriginKeyword'],[-1,' * The value of the crossorigin keyword to use when loading images. This is'],[-1,' * only relevant when using <getCanvasContext> for tiles from remote'],[-1,' * origins and should be set to either \'anonymous\' or \'use-credentials\''],[-1,' * for servers that send Access-Control-Allow-Origin headers with their'],[-1,' * tiles.'],[-1,' *\/'],[-1,' crossOriginKeyword: null,'],[-1,''],[-1,' \/** TBD 3.0 - reorder the parameters to the init function to remove '],[-1,' * URL. the getUrl() function on the layer gets called on '],[-1,' * each draw(), so no need to specify it here.'],[-1,' *\/'],[-1,''],[-1,' \/** '],[-1,' * Constructor: OpenLayers.Tile.Image'],[-1,' * Constructor for a new <OpenLayers.Tile.Image> instance.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer>} layer that the tile will go in.'],[-1,' * position - {<OpenLayers.Pixel>}'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * url - {<String>} Deprecated. Remove me in 3.0.'],[-1,' * size - {<OpenLayers.Size>}'],[-1,' * options - {Object}'],[-1,' *\/ '],[-1,' initialize: function(layer, position, bounds, url, size, options) {'],[0,' OpenLayers.Tile.prototype.initialize.apply(this, arguments);'],[-1,''],[0,' this.url = url; \/\/deprecated remove me'],[-1,' '],[0,' this.layerAlphaHack = this.layer.alpha && OpenLayers.Util.alphaHack();'],[-1,''],[0,' if (this.maxGetUrlLength != null || this.layer.gutter || this.layerAlphaHack) {'],[-1,' \/\/ only create frame if it\'s needed'],[0,' this.frame = document.createElement(\"div\");'],[0,' this.frame.style.position = \"absolute\";'],[0,' this.frame.style.overflow = \"hidden\";'],[-1,' }'],[0,' if (this.maxGetUrlLength != null) {'],[0,' OpenLayers.Util.extend(this, OpenLayers.Tile.Image.IFrame);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: destroy'],[-1,' * nullify references to prevent circular references and memory leaks'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' if (this.imgDiv) {'],[0,' this.clear();'],[0,' this.imgDiv = null;'],[0,' this.frame = null;'],[-1,' }'],[-1,' \/\/ don\'t handle async requests any more'],[0,' this.asyncRequestId = null;'],[0,' OpenLayers.Tile.prototype.destroy.apply(this, arguments);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: draw'],[-1,' * Check that a tile should be drawn, and draw it.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Was a tile drawn? Or null if a beforedraw listener returned'],[-1,' * false.'],[-1,' *\/'],[-1,' draw: function() {'],[0,' var shouldDraw = OpenLayers.Tile.prototype.draw.apply(this, arguments);'],[0,' if (shouldDraw) {'],[-1,' \/\/ The layer\'s reproject option is deprecated.'],[0,' if (this.layer != this.layer.map.baseLayer && this.layer.reproject) {'],[-1,' \/\/ getBoundsFromBaseLayer is defined in deprecated.js.'],[0,' this.bounds = this.getBoundsFromBaseLayer(this.position);'],[-1,' }'],[0,' if (this.isLoading) {'],[-1,' \/\/if we\'re already loading, send \'reload\' instead of \'loadstart\'.'],[0,' this._loadEvent = \"reload\";'],[-1,' } else {'],[0,' this.isLoading = true;'],[0,' this._loadEvent = \"loadstart\";'],[-1,' }'],[0,' this.renderTile();'],[0,' this.positionTile();'],[0,' } else if (shouldDraw === false) {'],[0,' this.unload();'],[-1,' }'],[0,' return shouldDraw;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: renderTile'],[-1,' * Internal function to actually initialize the image tile,'],[-1,' * position it correctly, and set its url.'],[-1,' *\/'],[-1,' renderTile: function() {'],[0,' if (this.layer.async) {'],[-1,' \/\/ Asynchronous image requests call the asynchronous getURL method'],[-1,' \/\/ on the layer to fetch an image that covers \'this.bounds\'.'],[0,' var id = this.asyncRequestId = (this.asyncRequestId || 0) + 1;'],[0,' this.layer.getURLasync(this.bounds, function(url) {'],[0,' if (id == this.asyncRequestId) {'],[0,' this.url = url;'],[0,' this.initImage();'],[-1,' }'],[-1,' }, this);'],[-1,' } else {'],[-1,' \/\/ synchronous image requests get the url immediately.'],[0,' this.url = this.layer.getURL(this.bounds);'],[0,' this.initImage();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: positionTile'],[-1,' * Using the properties currenty set on the layer, position the tile correctly.'],[-1,' * This method is used both by the async and non-async versions of the Tile.Image'],[-1,' * code.'],[-1,' *\/'],[-1,' positionTile: function() {'],[0,' var style = this.getTile().style,'],[-1,' size = this.frame ? this.size :'],[-1,' this.layer.getImageSize(this.bounds),'],[-1,' ratio = 1;'],[0,' if (this.layer instanceof OpenLayers.Layer.Grid) {'],[0,' ratio = this.layer.getServerResolution() \/ this.layer.map.getResolution();'],[-1,' }'],[0,' style.left = this.position.x + \"px\";'],[0,' style.top = this.position.y + \"px\";'],[0,' style.width = Math.round(ratio * size.w) + \"px\";'],[0,' style.height = Math.round(ratio * size.h) + \"px\";'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: clear'],[-1,' * Remove the tile from the DOM, clear it of any image related data so that'],[-1,' * it can be reused in a new location.'],[-1,' *\/'],[-1,' clear: function() {'],[0,' OpenLayers.Tile.prototype.clear.apply(this, arguments);'],[0,' var img = this.imgDiv;'],[0,' if (img) {'],[0,' var tile = this.getTile();'],[0,' if (tile.parentNode === this.layer.div) {'],[0,' this.layer.div.removeChild(tile);'],[-1,' }'],[0,' this.setImgSrc();'],[0,' if (this.layerAlphaHack === true) {'],[0,' img.style.filter = \"\";'],[-1,' }'],[0,' OpenLayers.Element.removeClass(img, \"olImageLoadError\");'],[-1,' }'],[0,' this.canvasContext = null;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getImage'],[-1,' * Returns or creates and returns the tile image.'],[-1,' *\/'],[-1,' getImage: function() {'],[0,' if (!this.imgDiv) {'],[0,' this.imgDiv = OpenLayers.Tile.Image.IMAGE.cloneNode(false);'],[-1,''],[0,' var style = this.imgDiv.style;'],[0,' if (this.frame) {'],[0,' var left = 0, top = 0;'],[0,' if (this.layer.gutter) {'],[0,' left = this.layer.gutter \/ this.layer.tileSize.w * 100;'],[0,' top = this.layer.gutter \/ this.layer.tileSize.h * 100;'],[-1,' }'],[0,' style.left = -left + \"%\";'],[0,' style.top = -top + \"%\";'],[0,' style.width = (2 * left + 100) + \"%\";'],[0,' style.height = (2 * top + 100) + \"%\";'],[-1,' }'],[0,' style.visibility = \"hidden\";'],[0,' style.opacity = 0;'],[0,' if (this.layer.opacity < 1) {'],[0,' style.filter = \'alpha(opacity=\' +'],[-1,' (this.layer.opacity * 100) +'],[-1,' \')\';'],[-1,' }'],[0,' style.position = \"absolute\";'],[0,' if (this.layerAlphaHack) {'],[-1,' \/\/ move the image out of sight'],[0,' style.paddingTop = style.height;'],[0,' style.height = \"0\";'],[0,' style.width = \"100%\";'],[-1,' }'],[0,' if (this.frame) {'],[0,' this.frame.appendChild(this.imgDiv);'],[-1,' }'],[-1,' }'],[-1,''],[0,' return this.imgDiv;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: setImage'],[-1,' * Sets the image element for this tile. This method should only be called'],[-1,' * from beforeload listeners.'],[-1,' *'],[-1,' * Parameters'],[-1,' * img - {HTMLImageElement} The image to use for this tile.'],[-1,' *\/'],[-1,' setImage: function(img) {'],[0,' this.imgDiv = img;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: initImage'],[-1,' * Creates the content for the frame on the tile.'],[-1,' *\/'],[-1,' initImage: function() {'],[0,' if (!this.url && !this.imgDiv) {'],[-1,' \/\/ fast path out - if there is no tile url and no previous image'],[0,' this.isLoading = false;'],[0,' return;'],[-1,' }'],[0,' this.events.triggerEvent(\'beforeload\');'],[0,' this.layer.div.appendChild(this.getTile());'],[0,' this.events.triggerEvent(this._loadEvent);'],[0,' var img = this.getImage();'],[0,' var src = img.getAttribute(\'src\') || \'\';'],[0,' if (this.url && OpenLayers.Util.isEquivalentUrl(src, this.url)) {'],[0,' this._loadTimeout = window.setTimeout('],[-1,' OpenLayers.Function.bind(this.onImageLoad, this), 0'],[-1,' );'],[-1,' } else {'],[0,' this.stopLoading();'],[0,' if (this.crossOriginKeyword) {'],[0,' img.removeAttribute(\"crossorigin\");'],[-1,' }'],[0,' OpenLayers.Event.observe(img, \"load\",'],[-1,' OpenLayers.Function.bind(this.onImageLoad, this)'],[-1,' );'],[0,' OpenLayers.Event.observe(img, \"error\",'],[-1,' OpenLayers.Function.bind(this.onImageError, this)'],[-1,' );'],[0,' this.imageReloadAttempts = 0;'],[0,' this.setImgSrc(this.url);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setImgSrc'],[-1,' * Sets the source for the tile image'],[-1,' *'],[-1,' * Parameters:'],[-1,' * url - {String} or undefined to hide the image'],[-1,' *\/'],[-1,' setImgSrc: function(url) {'],[0,' var img = this.imgDiv;'],[0,' if (url) {'],[0,' img.style.visibility = \'hidden\';'],[0,' img.style.opacity = 0;'],[-1,' \/\/ don\'t set crossOrigin if the url is a data URL'],[0,' if (this.crossOriginKeyword) {'],[0,' if (url.substr(0, 5) !== \'data:\') {'],[0,' img.setAttribute(\"crossorigin\", this.crossOriginKeyword);'],[-1,' } else {'],[0,' img.removeAttribute(\"crossorigin\");'],[-1,' }'],[-1,' }'],[0,' img.src = url;'],[-1,' } else {'],[-1,' \/\/ Remove reference to the image, and leave it to the browser\'s'],[-1,' \/\/ caching and garbage collection.'],[0,' this.stopLoading();'],[0,' this.imgDiv = null;'],[0,' if (img.parentNode) {'],[0,' img.parentNode.removeChild(img);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getTile'],[-1,' * Get the tile\'s markup.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The tile\'s markup'],[-1,' *\/'],[-1,' getTile: function() {'],[0,' return this.frame ? this.frame : this.getImage();'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createBackBuffer'],[-1,' * Create a backbuffer for this tile. A backbuffer isn\'t exactly a clone'],[-1,' * of the tile\'s markup, because we want to avoid the reloading of the'],[-1,' * image. So we clone the frame, and steal the image from the tile.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The markup, or undefined if the tile has no image'],[-1,' * or if it\'s currently loading.'],[-1,' *\/'],[-1,' createBackBuffer: function() {'],[0,' if (!this.imgDiv || this.isLoading) {'],[0,' return;'],[-1,' }'],[0,' var backBuffer;'],[0,' if (this.frame) {'],[0,' backBuffer = this.frame.cloneNode(false);'],[0,' backBuffer.appendChild(this.imgDiv);'],[-1,' } else {'],[0,' backBuffer = this.imgDiv;'],[-1,' }'],[0,' this.imgDiv = null;'],[0,' return backBuffer;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: onImageLoad'],[-1,' * Handler for the image onload event'],[-1,' *\/'],[-1,' onImageLoad: function() {'],[0,' var img = this.imgDiv;'],[0,' this.stopLoading();'],[0,' img.style.visibility = \'inherit\';'],[0,' img.style.opacity = this.layer.opacity;'],[0,' this.isLoading = false;'],[0,' this.canvasContext = null;'],[0,' this.events.triggerEvent(\"loadend\");'],[-1,''],[0,' if (this.layerAlphaHack === true) {'],[0,' img.style.filter ='],[-1,' \"progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'\" +'],[-1,' img.src + \"\', sizingMethod=\'scale\')\";'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: onImageError'],[-1,' * Handler for the image onerror event'],[-1,' *\/'],[-1,' onImageError: function() {'],[0,' var img = this.imgDiv;'],[0,' if (img.src != null) {'],[0,' this.imageReloadAttempts++;'],[0,' if (this.imageReloadAttempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) {'],[0,' this.setImgSrc(this.layer.getURL(this.bounds));'],[-1,' } else {'],[0,' OpenLayers.Element.addClass(img, \"olImageLoadError\");'],[0,' this.events.triggerEvent(\"loaderror\");'],[0,' this.onImageLoad();'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: stopLoading'],[-1,' * Stops a loading sequence so <onImageLoad> won\'t be executed.'],[-1,' *\/'],[-1,' stopLoading: function() {'],[0,' OpenLayers.Event.stopObservingElement(this.imgDiv);'],[0,' window.clearTimeout(this._loadTimeout);'],[0,' delete this._loadTimeout;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getCanvasContext'],[-1,' * Returns a canvas context associated with the tile image (with'],[-1,' * the image drawn on it).'],[-1,' * Returns undefined if the browser does not support canvas, if'],[-1,' * the tile has no image or if it\'s currently loading.'],[-1,' *'],[-1,' * The function returns a canvas context instance but the'],[-1,' * underlying canvas is still available in the \'canvas\' property:'],[-1,' * (code)'],[-1,' * var context = tile.getCanvasContext();'],[-1,' * if (context) {'],[-1,' * var data = context.canvas.toDataURL(\'image\/jpeg\');'],[-1,' * }'],[-1,' * (end)'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' getCanvasContext: function() {'],[0,' if (OpenLayers.CANVAS_SUPPORTED && this.imgDiv && !this.isLoading) {'],[0,' if (!this.canvasContext) {'],[0,' var canvas = document.createElement(\"canvas\");'],[0,' canvas.width = this.size.w;'],[0,' canvas.height = this.size.h;'],[0,' this.canvasContext = canvas.getContext(\"2d\");'],[0,' this.canvasContext.drawImage(this.imgDiv, 0, 0);'],[-1,' }'],[0,' return this.canvasContext;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Tile.Image\"'],[-1,''],[-1,'});'],[-1,''],[-1,'\/** '],[-1,' * Constant: OpenLayers.Tile.Image.IMAGE'],[-1,' * {HTMLImageElement} The image for a tile.'],[-1,' *\/'],[1,'OpenLayers.Tile.Image.IMAGE = (function() {'],[1,' var img = new Image();'],[1,' img.className = \"olTileImage\";'],[-1,' \/\/ avoid image gallery menu in IE6'],[1,' img.galleryImg = \"no\";'],[1,' return img;'],[-1,'}());'],[-1,''],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Layer\/Grid.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Layer\/HTTPRequest.js'],[-1,' * @requires OpenLayers\/Tile\/Image.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Layer.Grid'],[-1,' * Base class for layers that use a lattice of tiles. Create a new grid'],[-1,' * layer with the <OpenLayers.Layer.Grid> constructor.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Layer.HTTPRequest>'],[-1,' *\/'],[1,'OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: tileSize'],[-1,' * {<OpenLayers.Size>}'],[-1,' *\/'],[-1,' tileSize: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: tileOriginCorner'],[-1,' * {String} If the <tileOrigin> property is not provided, the tile origin '],[-1,' * will be derived from the layer\'s <maxExtent>. The corner of the '],[-1,' * <maxExtent> used is determined by this property. Acceptable values'],[-1,' * are \"tl\" (top left), \"tr\" (top right), \"bl\" (bottom left), and \"br\"'],[-1,' * (bottom right). Default is \"bl\".'],[-1,' *\/'],[-1,' tileOriginCorner: \"bl\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: tileOrigin'],[-1,' * {<OpenLayers.LonLat>} Optional origin for aligning the grid of tiles.'],[-1,' * If provided, requests for tiles at all resolutions will be aligned'],[-1,' * with this location (no tiles shall overlap this location). If'],[-1,' * not provided, the grid of tiles will be aligned with the layer\'s'],[-1,' * <maxExtent>. Default is ``null``.'],[-1,' *\/'],[-1,' tileOrigin: null,'],[-1,' '],[-1,' \/** APIProperty: tileOptions'],[-1,' * {Object} optional configuration options for <OpenLayers.Tile> instances'],[-1,' * created by this Layer, if supported by the tile class.'],[-1,' *\/'],[-1,' tileOptions: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: tileClass'],[-1,' * {<OpenLayers.Tile>} The tile class to use for this layer.'],[-1,' * Defaults is OpenLayers.Tile.Image.'],[-1,' *\/'],[-1,' tileClass: OpenLayers.Tile.Image,'],[-1,' '],[-1,' \/**'],[-1,' * Property: grid'],[-1,' * {Array(Array(<OpenLayers.Tile>))} This is an array of rows, each row is '],[-1,' * an array of tiles.'],[-1,' *\/'],[-1,' grid: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: singleTile'],[-1,' * {Boolean} Moves the layer into single-tile mode, meaning that one tile '],[-1,' * will be loaded. The tile\'s size will be determined by the \'ratio\''],[-1,' * property. When the tile is dragged such that it does not cover the '],[-1,' * entire viewport, it is reloaded.'],[-1,' *\/'],[-1,' singleTile: false,'],[-1,''],[-1,' \/** APIProperty: ratio'],[-1,' * {Float} Used only when in single-tile mode, this specifies the '],[-1,' * ratio of the size of the single tile to the size of the map.'],[-1,' * Default value is 1.5.'],[-1,' *\/'],[-1,' ratio: 1.5,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: buffer'],[-1,' * {Integer} Used only when in gridded mode, this specifies the number of '],[-1,' * extra rows and columns of tiles on each side which will'],[-1,' * surround the minimum grid tiles to cover the map.'],[-1,' * For very slow loading layers, a larger value may increase'],[-1,' * performance somewhat when dragging, but will increase bandwidth'],[-1,' * use significantly. '],[-1,' *\/'],[-1,' buffer: 0,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: transitionEffect'],[-1,' * {String} The transition effect to use when the map is zoomed.'],[-1,' * Two possible values:'],[-1,' *'],[-1,' * \"resize\" - Existing tiles are resized on zoom to provide a visual'],[-1,' * effect of the zoom having taken place immediately. As the'],[-1,' * new tiles become available, they are drawn on top of the'],[-1,' * resized tiles (this is the default setting).'],[-1,' * \"map-resize\" - Existing tiles are resized on zoom and placed below the'],[-1,' * base layer. New tiles for the base layer will cover existing tiles.'],[-1,' * This setting is recommended when having an overlay duplicated during'],[-1,' * the transition is undesirable (e.g. street labels or big transparent'],[-1,' * fills). '],[-1,' * null - No transition effect.'],[-1,' *'],[-1,' * Using \"resize\" on non-opaque layers can cause undesired visual'],[-1,' * effects. Set transitionEffect to null in this case.'],[-1,' *\/'],[-1,' transitionEffect: \"resize\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: numLoadingTiles'],[-1,' * {Integer} How many tiles are still loading?'],[-1,' *\/'],[-1,' numLoadingTiles: 0,'],[-1,''],[-1,' \/**'],[-1,' * Property: serverResolutions'],[-1,' * {Array(Number}} This property is documented in subclasses as'],[-1,' * an API property.'],[-1,' *\/'],[-1,' serverResolutions: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: loading'],[-1,' * {Boolean} Indicates if tiles are being loaded.'],[-1,' *\/'],[-1,' loading: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: backBuffer'],[-1,' * {DOMElement} The back buffer.'],[-1,' *\/'],[-1,' backBuffer: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: gridResolution'],[-1,' * {Number} The resolution of the current grid. Used for backbuffer and'],[-1,' * client zoom. This property is updated every time the grid is'],[-1,' * initialized.'],[-1,' *\/'],[-1,' gridResolution: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: backBufferResolution'],[-1,' * {Number} The resolution of the current back buffer. This property is'],[-1,' * updated each time a back buffer is created.'],[-1,' *\/'],[-1,' backBufferResolution: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: backBufferLonLat'],[-1,' * {Object} The top-left corner of the current back buffer. Includes lon'],[-1,' * and lat properties. This object is updated each time a back buffer'],[-1,' * is created.'],[-1,' *\/'],[-1,' backBufferLonLat: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: backBufferTimerId'],[-1,' * {Number} The id of the back buffer timer. This timer is used to'],[-1,' * delay the removal of the back buffer, thereby preventing'],[-1,' * flash effects caused by tile animation.'],[-1,' *\/'],[-1,' backBufferTimerId: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: removeBackBufferDelay'],[-1,' * {Number} Delay for removing the backbuffer when all tiles have finished'],[-1,' * loading. Can be set to 0 when no css opacity transitions for the'],[-1,' * olTileImage class are used. Default is 0 for <singleTile> layers,'],[-1,' * 2500 for tiled layers. See <className> for more information on'],[-1,' * tile animation.'],[-1,' *\/'],[-1,' removeBackBufferDelay: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: className'],[-1,' * {String} Name of the class added to the layer div. If not set in the'],[-1,' * options passed to the constructor then className defaults to'],[-1,' * \"olLayerGridSingleTile\" for single tile layers (see <singleTile>),'],[-1,' * and \"olLayerGrid\" for non single tile layers.'],[-1,' *'],[-1,' * Note:'],[-1,' *'],[-1,' * The displaying of tiles is not animated by default for single tile'],[-1,' * layers - OpenLayers\' default theme (style.css) includes this:'],[-1,' * (code)'],[-1,' * .olLayerGrid .olTileImage {'],[-1,' * -webkit-transition: opacity 0.2s linear;'],[-1,' * -moz-transition: opacity 0.2s linear;'],[-1,' * -o-transition: opacity 0.2s linear;'],[-1,' * transition: opacity 0.2s linear;'],[-1,' * }'],[-1,' * (end)'],[-1,' * To animate tile displaying for any grid layer the following'],[-1,' * CSS rule can be used:'],[-1,' * (code)'],[-1,' * .olTileImage {'],[-1,' * -webkit-transition: opacity 0.2s linear;'],[-1,' * -moz-transition: opacity 0.2s linear;'],[-1,' * -o-transition: opacity 0.2s linear;'],[-1,' * transition: opacity 0.2s linear;'],[-1,' * }'],[-1,' * (end)'],[-1,' * In that case, to avoid flash effects, <removeBackBufferDelay>'],[-1,' * should not be zero.'],[-1,' *\/'],[-1,' className: null,'],[-1,' '],[-1,' \/**'],[-1,' * Register a listener for a particular event with the following syntax:'],[-1,' * (code)'],[-1,' * layer.events.register(type, obj, listener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Listeners will be called with a reference to an event object. The'],[-1,' * properties of this event depends on exactly what happened.'],[-1,' *'],[-1,' * All event objects have at least the following properties:'],[-1,' * object - {Object} A reference to layer.events.object.'],[-1,' * element - {DOMElement} A reference to layer.events.element.'],[-1,' *'],[-1,' * Supported event types:'],[-1,' * addtile - Triggered when a tile is added to this layer. Listeners receive'],[-1,' * an object as first argument, which has a tile property that'],[-1,' * references the tile that has been added.'],[-1,' * tileloadstart - Triggered when a tile starts loading. Listeners receive'],[-1,' * an object as first argument, which has a tile property that'],[-1,' * references the tile that starts loading.'],[-1,' * tileloaded - Triggered when each new tile is'],[-1,' * loaded, as a means of progress update to listeners.'],[-1,' * listeners can access \'numLoadingTiles\' if they wish to keep'],[-1,' * track of the loading progress. Listeners are called with an object'],[-1,' * with a \'tile\' property as first argument, making the loaded tile'],[-1,' * available to the listener, and an \'aborted\' property, which will be'],[-1,' * true when loading was aborted and no tile data is available.'],[-1,' * tileerror - Triggered before the tileloaded event (i.e. when the tile is'],[-1,' * still hidden) if a tile failed to load. Listeners receive an object'],[-1,' * as first argument, which has a tile property that references the'],[-1,' * tile that could not be loaded.'],[-1,' * retile - Triggered when the layer recreates its tile grid.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Property: gridLayout'],[-1,' * {Object} Object containing properties tilelon, tilelat, startcol,'],[-1,' * startrow'],[-1,' *\/'],[-1,' gridLayout: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: rowSign'],[-1,' * {Number} 1 for grids starting at the top, -1 for grids starting at the'],[-1,' * bottom. This is used for several grid index and offset calculations.'],[-1,' *\/'],[-1,' rowSign: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: transitionendEvents'],[-1,' * {Array} Event names for transitionend'],[-1,' *\/'],[-1,' transitionendEvents: ['],[-1,' \'transitionend\', \'webkitTransitionEnd\', \'otransitionend\','],[-1,' \'oTransitionEnd\''],[-1,' ],'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Layer.Grid'],[-1,' * Create a new grid layer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String}'],[-1,' * url - {String}'],[-1,' * params - {Object}'],[-1,' * options - {Object} Hashtable of extra options to tag onto the layer'],[-1,' *\/'],[-1,' initialize: function(name, url, params, options) {'],[0,' OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, '],[-1,' arguments);'],[0,' this.grid = [];'],[0,' this._removeBackBuffer = OpenLayers.Function.bind(this.removeBackBuffer, this);'],[-1,''],[0,' this.initProperties();'],[-1,''],[0,' this.rowSign = this.tileOriginCorner.substr(0, 1) === \"t\" ? 1 : -1;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: initProperties'],[-1,' * Set any properties that depend on the value of singleTile.'],[-1,' * Currently sets removeBackBufferDelay and className'],[-1,' *\/'],[-1,' initProperties: function() {'],[0,' if (this.options.removeBackBufferDelay === undefined) {'],[0,' this.removeBackBufferDelay = this.singleTile ? 0 : 2500;'],[-1,' }'],[-1,''],[0,' if (this.options.className === undefined) {'],[0,' this.className = this.singleTile ? \'olLayerGridSingleTile\' :'],[-1,' \'olLayerGrid\';'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setMap'],[-1,' *'],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>} The map.'],[-1,' *\/'],[-1,' setMap: function(map) {'],[0,' OpenLayers.Layer.HTTPRequest.prototype.setMap.call(this, map);'],[0,' OpenLayers.Element.addClass(this.div, this.className);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: removeMap'],[-1,' * Called when the layer is removed from the map.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>} The map.'],[-1,' *\/'],[-1,' removeMap: function(map) {'],[0,' this.removeBackBuffer();'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' * Deconstruct the layer and clear the grid.'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' this.removeBackBuffer();'],[0,' this.clearGrid();'],[-1,''],[0,' this.grid = null;'],[0,' this.tileSize = null;'],[0,' OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments); '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: mergeNewParams'],[-1,' * Refetches tiles with new params merged, keeping a backbuffer. Each'],[-1,' * loading new tile will have a css class of \'.olTileReplacing\'. If a'],[-1,' * stylesheet applies a \'display: none\' style to that class, any fade-in'],[-1,' * transition will not apply, and backbuffers for each tile will be removed'],[-1,' * as soon as the tile is loaded.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newParams - {Object}'],[-1,' *'],[-1,' * Returns:'],[-1,' * redrawn: {Boolean} whether the layer was actually redrawn.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Method: clearGrid'],[-1,' * Go through and remove all tiles from the grid, calling'],[-1,' * destroy() on each of them to kill circular references'],[-1,' *\/'],[-1,' clearGrid:function() {'],[0,' if (this.grid) {'],[0,' for(var iRow=0, len=this.grid.length; iRow<len; iRow++) {'],[0,' var row = this.grid[iRow];'],[0,' for(var iCol=0, clen=row.length; iCol<clen; iCol++) {'],[0,' var tile = row[iCol];'],[0,' this.destroyTile(tile);'],[-1,' }'],[-1,' }'],[0,' this.grid = [];'],[0,' this.gridResolution = null;'],[0,' this.gridLayout = null;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addOptions'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newOptions - {Object}'],[-1,' * reinitialize - {Boolean} If set to true, and if resolution options of the'],[-1,' * current baseLayer were changed, the map will be recentered to make'],[-1,' * sure that it is displayed with a valid resolution, and a'],[-1,' * changebaselayer event will be triggered.'],[-1,' *\/'],[-1,' addOptions: function (newOptions, reinitialize) {'],[0,' var singleTileChanged = newOptions.singleTile !== undefined && '],[-1,' newOptions.singleTile !== this.singleTile;'],[0,' OpenLayers.Layer.HTTPRequest.prototype.addOptions.apply(this, arguments);'],[0,' if (this.map && singleTileChanged) {'],[0,' this.initProperties();'],[0,' this.clearGrid();'],[0,' this.tileSize = this.options.tileSize;'],[0,' this.setTileSize();'],[0,' this.moveTo(null, true);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * Create a clone of this layer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * obj - {Object} Is this ever used?'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Layer.Grid>} An exact clone of this OpenLayers.Layer.Grid'],[-1,' *\/'],[-1,' clone: function (obj) {'],[-1,' '],[0,' if (obj == null) {'],[0,' obj = new OpenLayers.Layer.Grid(this.name,'],[-1,' this.url,'],[-1,' this.params,'],[-1,' this.getOptions());'],[-1,' }'],[-1,''],[-1,' \/\/get all additions from superclasses'],[0,' obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]);'],[-1,''],[-1,' \/\/ copy\/set any non-init, non-simple values here'],[0,' if (this.tileSize != null) {'],[0,' obj.tileSize = this.tileSize.clone();'],[-1,' }'],[-1,' '],[-1,' \/\/ we do not want to copy reference to grid, so we make a new array'],[0,' obj.grid = [];'],[0,' obj.gridResolution = null;'],[-1,' \/\/ same for backbuffer'],[0,' obj.backBuffer = null;'],[0,' obj.backBufferTimerId = null;'],[0,' obj.loading = false;'],[0,' obj.numLoadingTiles = 0;'],[-1,''],[0,' return obj;'],[-1,' }, '],[-1,''],[-1,' \/**'],[-1,' * Method: moveTo'],[-1,' * This function is called whenever the map is moved. All the moving'],[-1,' * of actual \'tiles\' is done by the map, but moveTo\'s role is to accept'],[-1,' * a bounds and make sure the data that that bounds requires is pre-loaded.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * zoomChanged - {Boolean}'],[-1,' * dragging - {Boolean}'],[-1,' *\/'],[-1,' moveTo:function(bounds, zoomChanged, dragging) {'],[-1,''],[0,' OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this, arguments);'],[-1,''],[0,' bounds = bounds || this.map.getExtent();'],[-1,''],[0,' if (bounds != null) {'],[-1,' '],[-1,' \/\/ if grid is empty or zoom has changed, we *must* re-tile'],[0,' var forceReTile = !this.grid.length || zoomChanged;'],[-1,' '],[-1,' \/\/ total bounds of the tiles'],[0,' var tilesBounds = this.getTilesBounds(); '],[-1,''],[-1,' \/\/ the new map resolution'],[0,' var resolution = this.map.getResolution();'],[-1,''],[-1,' \/\/ the server-supported resolution for the new map resolution'],[0,' var serverResolution = this.getServerResolution(resolution);'],[-1,''],[0,' if (this.singleTile) {'],[-1,' '],[-1,' \/\/ We want to redraw whenever even the slightest part of the '],[-1,' \/\/ current bounds is not contained by our tile.'],[-1,' \/\/ (thus, we do not specify partial -- its default is false)'],[-1,''],[0,' if ( forceReTile ||'],[-1,' (!dragging && !tilesBounds.containsBounds(bounds))) {'],[-1,''],[-1,' \/\/ In single tile mode with no transition effect, we insert'],[-1,' \/\/ a non-scaled backbuffer when the layer is moved. But if'],[-1,' \/\/ a zoom occurs right after a move, i.e. before the new'],[-1,' \/\/ image is received, we need to remove the backbuffer, or'],[-1,' \/\/ an ill-positioned image will be visible during the zoom'],[-1,' \/\/ transition.'],[-1,''],[0,' if(zoomChanged && this.transitionEffect !== \'resize\') {'],[0,' this.removeBackBuffer();'],[-1,' }'],[-1,''],[0,' if(!zoomChanged || this.transitionEffect === \'resize\') {'],[0,' this.applyBackBuffer(resolution);'],[-1,' }'],[-1,''],[0,' this.initSingleTile(bounds);'],[-1,' }'],[-1,' } else {'],[-1,''],[-1,' \/\/ if the bounds have changed such that they are not even '],[-1,' \/\/ *partially* contained by our tiles (e.g. when user has '],[-1,' \/\/ programmatically panned to the other side of the earth on'],[-1,' \/\/ zoom level 18), then moveGriddedTiles could potentially have'],[-1,' \/\/ to run through thousands of cycles, so we want to reTile'],[-1,' \/\/ instead (thus, partial true). '],[0,' forceReTile = forceReTile ||'],[-1,' !tilesBounds.intersectsBounds(bounds, {'],[-1,' worldBounds: this.map.baseLayer.wrapDateLine &&'],[-1,' this.map.getMaxExtent()'],[-1,' });'],[-1,''],[0,' if(forceReTile) {'],[0,' if(zoomChanged && (this.transitionEffect === \'resize\' ||'],[-1,' this.gridResolution === resolution)) {'],[0,' this.applyBackBuffer(resolution);'],[-1,' }'],[0,' this.initGriddedTiles(bounds);'],[-1,' } else {'],[0,' this.moveGriddedTiles();'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getTileData'],[-1,' * Given a map location, retrieve a tile and the pixel offset within that'],[-1,' * tile corresponding to the location. If there is not an existing '],[-1,' * tile in the grid that covers the given location, null will be '],[-1,' * returned.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * loc - {<OpenLayers.LonLat>} map location'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} Object with the following properties: tile ({<OpenLayers.Tile>}),'],[-1,' * i ({Number} x-pixel offset from top left), and j ({Integer} y-pixel'],[-1,' * offset from top left).'],[-1,' *\/'],[-1,' getTileData: function(loc) {'],[0,' var data = null,'],[-1,' x = loc.lon,'],[-1,' y = loc.lat,'],[-1,' numRows = this.grid.length;'],[-1,''],[0,' if (this.map && numRows) {'],[0,' var res = this.map.getResolution(),'],[-1,' tileWidth = this.tileSize.w,'],[-1,' tileHeight = this.tileSize.h,'],[-1,' bounds = this.grid[0][0].bounds,'],[-1,' left = bounds.left,'],[-1,' top = bounds.top;'],[-1,''],[0,' if (x < left) {'],[-1,' \/\/ deal with multiple worlds'],[0,' if (this.map.baseLayer.wrapDateLine) {'],[0,' var worldWidth = this.map.getMaxExtent().getWidth();'],[0,' var worldsAway = Math.ceil((left - x) \/ worldWidth);'],[0,' x += worldWidth * worldsAway;'],[-1,' }'],[-1,' }'],[-1,' \/\/ tile distance to location (fractional number of tiles);'],[0,' var dtx = (x - left) \/ (res * tileWidth);'],[0,' var dty = (top - y) \/ (res * tileHeight);'],[-1,' \/\/ index of tile in grid'],[0,' var col = Math.floor(dtx);'],[0,' var row = Math.floor(dty);'],[0,' if (row >= 0 && row < numRows) {'],[0,' var tile = this.grid[row][col];'],[0,' if (tile) {'],[0,' data = {'],[-1,' tile: tile,'],[-1,' \/\/ pixel index within tile'],[-1,' i: Math.floor((dtx - col) * tileWidth),'],[-1,' j: Math.floor((dty - row) * tileHeight)'],[-1,' }; '],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return data;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: destroyTile'],[-1,' *'],[-1,' * Parameters:'],[-1,' * tile - {<OpenLayers.Tile>}'],[-1,' *\/'],[-1,' destroyTile: function(tile) {'],[0,' this.removeTileMonitoringHooks(tile);'],[0,' tile.destroy();'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getServerResolution'],[-1,' * Return the closest server-supported resolution.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * resolution - {Number} The base resolution. If undefined the'],[-1,' * map resolution is used.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number} The closest server resolution value.'],[-1,' *\/'],[-1,' getServerResolution: function(resolution) {'],[0,' var distance = Number.POSITIVE_INFINITY;'],[0,' resolution = resolution || this.map.getResolution();'],[0,' if(this.serverResolutions &&'],[-1,' OpenLayers.Util.indexOf(this.serverResolutions, resolution) === -1) {'],[0,' var i, newDistance, newResolution, serverResolution;'],[0,' for(i=this.serverResolutions.length-1; i>= 0; i--) {'],[0,' newResolution = this.serverResolutions[i];'],[0,' newDistance = Math.abs(newResolution - resolution);'],[0,' if (newDistance > distance) {'],[0,' break;'],[-1,' }'],[0,' distance = newDistance;'],[0,' serverResolution = newResolution;'],[-1,' }'],[0,' resolution = serverResolution;'],[-1,' }'],[0,' return resolution;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getServerZoom'],[-1,' * Return the zoom value corresponding to the best matching server'],[-1,' * resolution, taking into account <serverResolutions> and <zoomOffset>.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Number} The closest server supported zoom. This is not the map zoom'],[-1,' * level, but an index of the server\'s resolutions array.'],[-1,' *\/'],[-1,' getServerZoom: function() {'],[0,' var resolution = this.getServerResolution();'],[0,' return this.serverResolutions ?'],[-1,' OpenLayers.Util.indexOf(this.serverResolutions, resolution) :'],[-1,' this.map.getZoomForResolution(resolution) + (this.zoomOffset || 0);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: applyBackBuffer'],[-1,' * Create, insert, scale and position a back buffer for the layer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * resolution - {Number} The resolution to transition to.'],[-1,' *\/'],[-1,' applyBackBuffer: function(resolution) {'],[0,' if(this.backBufferTimerId !== null) {'],[0,' this.removeBackBuffer();'],[-1,' }'],[0,' var backBuffer = this.backBuffer;'],[0,' if(!backBuffer) {'],[0,' backBuffer = this.createBackBuffer();'],[0,' if(!backBuffer) {'],[0,' return;'],[-1,' }'],[0,' if (resolution === this.gridResolution) {'],[0,' this.div.insertBefore(backBuffer, this.div.firstChild);'],[-1,' } else {'],[0,' this.map.baseLayer.div.parentNode.insertBefore(backBuffer, this.map.baseLayer.div);'],[-1,' }'],[0,' this.backBuffer = backBuffer;'],[-1,''],[-1,' \/\/ set some information in the instance for subsequent'],[-1,' \/\/ calls to applyBackBuffer where the same back buffer'],[-1,' \/\/ is reused'],[0,' var topLeftTileBounds = this.grid[0][0].bounds;'],[0,' this.backBufferLonLat = {'],[-1,' lon: topLeftTileBounds.left,'],[-1,' lat: topLeftTileBounds.top'],[-1,' };'],[0,' this.backBufferResolution = this.gridResolution;'],[-1,' }'],[-1,' '],[0,' var ratio = this.backBufferResolution \/ resolution;'],[-1,''],[-1,' \/\/ scale the tiles inside the back buffer'],[0,' var tiles = backBuffer.childNodes, tile;'],[0,' for (var i=tiles.length-1; i>=0; --i) {'],[0,' tile = tiles[i];'],[0,' tile.style.top = ((ratio * tile._i * backBuffer._th) | 0) + \'px\';'],[0,' tile.style.left = ((ratio * tile._j * backBuffer._tw) | 0) + \'px\';'],[0,' tile.style.width = Math.round(ratio * tile._w) + \'px\';'],[0,' tile.style.height = Math.round(ratio * tile._h) + \'px\';'],[-1,' }'],[-1,''],[-1,' \/\/ and position it (based on the grid\'s top-left corner)'],[0,' var position = this.getViewPortPxFromLonLat('],[-1,' this.backBufferLonLat, resolution);'],[0,' var leftOffset = this.map.layerContainerOriginPx.x;'],[0,' var topOffset = this.map.layerContainerOriginPx.y;'],[0,' backBuffer.style.left = Math.round(position.x - leftOffset) + \'px\';'],[0,' backBuffer.style.top = Math.round(position.y - topOffset) + \'px\';'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createBackBuffer'],[-1,' * Create a back buffer.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The DOM element for the back buffer, undefined if the'],[-1,' * grid isn\'t initialized yet.'],[-1,' *\/'],[-1,' createBackBuffer: function() {'],[0,' var backBuffer;'],[0,' if(this.grid.length > 0) {'],[0,' backBuffer = document.createElement(\'div\');'],[0,' backBuffer.id = this.div.id + \'_bb\';'],[0,' backBuffer.className = \'olBackBuffer\';'],[0,' backBuffer.style.position = \'absolute\';'],[0,' var map = this.map;'],[0,' backBuffer.style.zIndex = this.transitionEffect === \'resize\' ?'],[-1,' this.getZIndex() - 1 :'],[-1,' \/\/ \'map-resize\':'],[-1,' map.Z_INDEX_BASE.BaseLayer -'],[-1,' (map.getNumLayers() - map.getLayerIndex(this));'],[0,' for(var i=0, lenI=this.grid.length; i<lenI; i++) {'],[0,' for(var j=0, lenJ=this.grid[i].length; j<lenJ; j++) {'],[0,' var tile = this.grid[i][j],'],[-1,' markup = this.grid[i][j].createBackBuffer();'],[0,' if (markup) {'],[0,' markup._i = i;'],[0,' markup._j = j;'],[0,' markup._w = this.singleTile ?'],[-1,' this.getImageSize(tile.bounds).w : tile.size.w;'],[0,' markup._h = tile.size.h;'],[0,' markup.id = tile.id + \'_bb\';'],[0,' backBuffer.appendChild(markup);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' backBuffer._tw = this.tileSize.w;'],[0,' backBuffer._th = this.tileSize.h;'],[-1,' }'],[0,' return backBuffer;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: removeBackBuffer'],[-1,' * Remove back buffer from DOM.'],[-1,' *\/'],[-1,' removeBackBuffer: function() {'],[0,' if (this._transitionElement) {'],[0,' for (var i=this.transitionendEvents.length-1; i>=0; --i) {'],[0,' OpenLayers.Event.stopObserving(this._transitionElement,'],[-1,' this.transitionendEvents[i], this._removeBackBuffer);'],[-1,' }'],[0,' delete this._transitionElement;'],[-1,' }'],[0,' if(this.backBuffer) {'],[0,' if (this.backBuffer.parentNode) {'],[0,' this.backBuffer.parentNode.removeChild(this.backBuffer);'],[-1,' }'],[0,' this.backBuffer = null;'],[0,' this.backBufferResolution = null;'],[0,' if(this.backBufferTimerId !== null) {'],[0,' window.clearTimeout(this.backBufferTimerId);'],[0,' this.backBufferTimerId = null;'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: moveByPx'],[-1,' * Move the layer based on pixel vector.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * dx - {Number}'],[-1,' * dy - {Number}'],[-1,' *\/'],[-1,' moveByPx: function(dx, dy) {'],[0,' if (!this.singleTile) {'],[0,' this.moveGriddedTiles();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: setTileSize'],[-1,' * Check if we are in singleTile mode and if so, set the size as a ratio'],[-1,' * of the map size (as specified by the layer\'s \'ratio\' property).'],[-1,' * '],[-1,' * Parameters:'],[-1,' * size - {<OpenLayers.Size>}'],[-1,' *\/'],[-1,' setTileSize: function(size) { '],[0,' if (this.singleTile) {'],[0,' size = this.map.getSize();'],[0,' size.h = parseInt(size.h * this.ratio, 10);'],[0,' size.w = parseInt(size.w * this.ratio, 10);'],[-1,' } '],[0,' OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this, [size]);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getTilesBounds'],[-1,' * Return the bounds of the tile grid.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A Bounds object representing the bounds of all the'],[-1,' * currently loaded tiles (including those partially or not at all seen '],[-1,' * onscreen).'],[-1,' *\/'],[-1,' getTilesBounds: function() { '],[0,' var bounds = null; '],[-1,' '],[0,' var length = this.grid.length;'],[0,' if (length) {'],[0,' var bottomLeftTileBounds = this.grid[length - 1][0].bounds,'],[-1,' width = this.grid[0].length * bottomLeftTileBounds.getWidth(),'],[-1,' height = this.grid.length * bottomLeftTileBounds.getHeight();'],[-1,' '],[0,' bounds = new OpenLayers.Bounds(bottomLeftTileBounds.left, '],[-1,' bottomLeftTileBounds.bottom,'],[-1,' bottomLeftTileBounds.left + width, '],[-1,' bottomLeftTileBounds.bottom + height);'],[-1,' } '],[0,' return bounds;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: initSingleTile'],[-1,' * '],[-1,' * Parameters: '],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' initSingleTile: function(bounds) {'],[0,' this.events.triggerEvent(\"retile\");'],[-1,''],[-1,' \/\/determine new tile bounds'],[0,' var center = bounds.getCenterLonLat();'],[0,' var tileWidth = bounds.getWidth() * this.ratio;'],[0,' var tileHeight = bounds.getHeight() * this.ratio;'],[-1,' '],[0,' var tileBounds = '],[-1,' new OpenLayers.Bounds(center.lon - (tileWidth\/2),'],[-1,' center.lat - (tileHeight\/2),'],[-1,' center.lon + (tileWidth\/2),'],[-1,' center.lat + (tileHeight\/2));'],[-1,''],[-1,' \/\/ store the resolution of the grid'],[0,' this.gridResolution = this.getServerResolution();'],[-1,' '],[-1,' \/\/ same logic as OpenLayers.Tile#shouldDraw'],[0,' var maxExtent = this.maxExtent;'],[0,' if (maxExtent && (!this.displayOutsideMaxExtent ||'],[-1,' (this.map.baseLayer.wrapDateLine &&'],[-1,' this.maxExtent.equals(this.map.getMaxExtent())))) {'],[0,' tileBounds.left = Math.max(tileBounds.left, maxExtent.left);'],[0,' tileBounds.right = Math.min(tileBounds.right, maxExtent.right);'],[-1,' }'],[-1,''],[0,' var px = this.map.getLayerPxFromLonLat({'],[-1,' lon: tileBounds.left,'],[-1,' lat: tileBounds.top'],[-1,' });'],[-1,''],[0,' if (!this.grid.length) {'],[0,' this.grid[0] = [];'],[-1,' }'],[-1,''],[0,' var tile = this.grid[0][0];'],[0,' if (!tile) {'],[0,' tile = this.addTile(tileBounds, px);'],[-1,''],[0,' this.addTileMonitoringHooks(tile);'],[0,' tile.draw();'],[0,' this.grid[0][0] = tile;'],[-1,' } else {'],[0,' tile.moveTo(tileBounds, px);'],[-1,' } '],[-1,' '],[-1,' \/\/remove all but our single tile'],[0,' this.removeExcessTiles(1,1);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: calculateGridLayout'],[-1,' * Generate parameters for the grid layout.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bound>|Object} OpenLayers.Bounds or an'],[-1,' * object with a \'left\' and \'top\' properties.'],[-1,' * origin - {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an'],[-1,' * object with a \'lon\' and \'lat\' properties.'],[-1,' * resolution - {Number}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} Object containing properties tilelon, tilelat, startcol,'],[-1,' * startrow'],[-1,' *\/'],[-1,' calculateGridLayout: function(bounds, origin, resolution) {'],[0,' var tilelon = resolution * this.tileSize.w;'],[0,' var tilelat = resolution * this.tileSize.h;'],[-1,' '],[0,' var offsetlon = bounds.left - origin.lon;'],[0,' var tilecol = Math.floor(offsetlon\/tilelon) - this.buffer;'],[-1,' '],[0,' var rowSign = this.rowSign;'],[-1,''],[0,' var offsetlat = rowSign * (origin.lat - bounds.top + tilelat); '],[0,' var tilerow = Math[~rowSign ? \'floor\' : \'ceil\'](offsetlat\/tilelat) - this.buffer * rowSign;'],[-1,' '],[0,' return { '],[-1,' tilelon: tilelon, tilelat: tilelat,'],[-1,' startcol: tilecol, startrow: tilerow'],[-1,' };'],[-1,''],[-1,' },'],[-1,''],[-1,' getImageSize: function(bounds) {'],[0,' var tileSize = OpenLayers.Layer.HTTPRequest.prototype.getImageSize.apply(this, arguments);'],[0,' if (this.singleTile) {'],[0,' tileSize = new OpenLayers.Size('],[-1,' Math.round(bounds.getWidth() \/ this.gridResolution),'],[-1,' tileSize.h'],[-1,' );'],[-1,' }'],[0,' return tileSize;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getTileOrigin'],[-1,' * Determine the origin for aligning the grid of tiles. If a <tileOrigin>'],[-1,' * property is supplied, that will be returned. Otherwise, the origin'],[-1,' * will be derived from the layer\'s <maxExtent> property. In this case,'],[-1,' * the tile origin will be the corner of the <maxExtent> given by the '],[-1,' * <tileOriginCorner> property.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.LonLat>} The tile origin.'],[-1,' *\/'],[-1,' getTileOrigin: function() {'],[0,' var origin = this.tileOrigin;'],[0,' if (!origin) {'],[0,' var extent = this.getMaxExtent();'],[0,' var edges = ({'],[-1,' \"tl\": [\"left\", \"top\"],'],[-1,' \"tr\": [\"right\", \"top\"],'],[-1,' \"bl\": [\"left\", \"bottom\"],'],[-1,' \"br\": [\"right\", \"bottom\"]'],[-1,' })[this.tileOriginCorner];'],[0,' origin = new OpenLayers.LonLat(extent[edges[0]], extent[edges[1]]);'],[-1,' }'],[0,' return origin;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getTileBoundsForGridIndex'],[-1,' *'],[-1,' * Parameters:'],[-1,' * row - {Number} The row of the grid'],[-1,' * col - {Number} The column of the grid'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} The bounds for the tile at (row, col)'],[-1,' *\/'],[-1,' getTileBoundsForGridIndex: function(row, col) {'],[0,' var origin = this.getTileOrigin();'],[0,' var tileLayout = this.gridLayout;'],[0,' var tilelon = tileLayout.tilelon;'],[0,' var tilelat = tileLayout.tilelat;'],[0,' var startcol = tileLayout.startcol;'],[0,' var startrow = tileLayout.startrow;'],[0,' var rowSign = this.rowSign;'],[0,' return new OpenLayers.Bounds('],[-1,' origin.lon + (startcol + col) * tilelon,'],[-1,' origin.lat - (startrow + row * rowSign) * tilelat * rowSign,'],[-1,' origin.lon + (startcol + col + 1) * tilelon,'],[-1,' origin.lat - (startrow + (row - 1) * rowSign) * tilelat * rowSign'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: initGriddedTiles'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' initGriddedTiles:function(bounds) {'],[0,' this.events.triggerEvent(\"retile\");'],[-1,''],[-1,' \/\/ work out mininum number of rows and columns; this is the number of'],[-1,' \/\/ tiles required to cover the viewport plus at least one for panning'],[-1,''],[0,' var viewSize = this.map.getSize();'],[-1,' '],[0,' var origin = this.getTileOrigin();'],[0,' var resolution = this.map.getResolution(),'],[-1,' serverResolution = this.getServerResolution(),'],[-1,' ratio = resolution \/ serverResolution,'],[-1,' tileSize = {'],[-1,' w: this.tileSize.w \/ ratio,'],[-1,' h: this.tileSize.h \/ ratio'],[-1,' };'],[-1,''],[0,' var minRows = Math.ceil(viewSize.h\/tileSize.h) + '],[-1,' 2 * this.buffer + 1;'],[0,' var minCols = Math.ceil(viewSize.w\/tileSize.w) +'],[-1,' 2 * this.buffer + 1;'],[-1,''],[0,' var tileLayout = this.calculateGridLayout(bounds, origin, serverResolution);'],[0,' this.gridLayout = tileLayout;'],[-1,' '],[0,' var tilelon = tileLayout.tilelon;'],[0,' var tilelat = tileLayout.tilelat;'],[-1,' '],[0,' var layerContainerDivLeft = this.map.layerContainerOriginPx.x;'],[0,' var layerContainerDivTop = this.map.layerContainerOriginPx.y;'],[-1,''],[0,' var tileBounds = this.getTileBoundsForGridIndex(0, 0);'],[0,' var startPx = this.map.getViewPortPxFromLonLat('],[-1,' new OpenLayers.LonLat(tileBounds.left, tileBounds.top)'],[-1,' );'],[0,' startPx.x = Math.round(startPx.x) - layerContainerDivLeft;'],[0,' startPx.y = Math.round(startPx.y) - layerContainerDivTop;'],[-1,''],[0,' var tileData = [], center = this.map.getCenter();'],[-1,''],[0,' var rowidx = 0;'],[0,' do {'],[0,' var row = this.grid[rowidx];'],[0,' if (!row) {'],[0,' row = [];'],[0,' this.grid.push(row);'],[-1,' }'],[-1,' '],[0,' var colidx = 0;'],[0,' do {'],[0,' tileBounds = this.getTileBoundsForGridIndex(rowidx, colidx);'],[0,' var px = startPx.clone();'],[0,' px.x = px.x + colidx * Math.round(tileSize.w);'],[0,' px.y = px.y + rowidx * Math.round(tileSize.h);'],[0,' var tile = row[colidx];'],[0,' if (!tile) {'],[0,' tile = this.addTile(tileBounds, px);'],[0,' this.addTileMonitoringHooks(tile);'],[0,' row.push(tile);'],[-1,' } else {'],[0,' tile.moveTo(tileBounds, px, false);'],[-1,' }'],[0,' var tileCenter = tileBounds.getCenterLonLat();'],[0,' tileData.push({'],[-1,' tile: tile,'],[-1,' distance: Math.pow(tileCenter.lon - center.lon, 2) +'],[-1,' Math.pow(tileCenter.lat - center.lat, 2)'],[-1,' });'],[-1,' '],[0,' colidx += 1;'],[-1,' } while ((tileBounds.right <= bounds.right + tilelon * this.buffer)'],[-1,' || colidx < minCols);'],[-1,' '],[0,' rowidx += 1;'],[-1,' } while((tileBounds.bottom >= bounds.bottom - tilelat * this.buffer)'],[-1,' || rowidx < minRows);'],[-1,' '],[-1,' \/\/shave off excess rows and columns'],[0,' this.removeExcessTiles(rowidx, colidx);'],[-1,''],[0,' var resolution = this.getServerResolution();'],[-1,' \/\/ store the resolution of the grid'],[0,' this.gridResolution = resolution;'],[-1,''],[-1,' \/\/now actually draw the tiles'],[0,' tileData.sort(function(a, b) {'],[0,' return a.distance - b.distance; '],[-1,' });'],[0,' for (var i=0, ii=tileData.length; i<ii; ++i) {'],[0,' tileData[i].tile.draw();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getMaxExtent'],[-1,' * Get this layer\'s maximum extent. (Implemented as a getter for'],[-1,' * potential specific implementations in sub-classes.)'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' getMaxExtent: function() {'],[0,' return this.maxExtent;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addTile'],[-1,' * Create a tile, initialize it, and add it to the layer div. '],[-1,' *'],[-1,' * Parameters'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * position - {<OpenLayers.Pixel>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Tile>} The added OpenLayers.Tile'],[-1,' *\/'],[-1,' addTile: function(bounds, position) {'],[0,' var tile = new this.tileClass('],[-1,' this, position, bounds, null, this.tileSize, this.tileOptions'],[-1,' );'],[0,' this.events.triggerEvent(\"addtile\", {tile: tile});'],[0,' return tile;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: addTileMonitoringHooks'],[-1,' * This function takes a tile as input and adds the appropriate hooks to '],[-1,' * the tile so that the layer can keep track of the loading tiles.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * tile - {<OpenLayers.Tile>}'],[-1,' *\/'],[-1,' addTileMonitoringHooks: function(tile) {'],[-1,' '],[0,' var replacingCls = \'olTileReplacing\';'],[-1,''],[0,' tile.onLoadStart = function() {'],[-1,' \/\/if that was first tile then trigger a \'loadstart\' on the layer'],[0,' if (this.loading === false) {'],[0,' this.loading = true;'],[0,' this.events.triggerEvent(\"loadstart\");'],[-1,' }'],[0,' this.events.triggerEvent(\"tileloadstart\", {tile: tile});'],[0,' this.numLoadingTiles++;'],[0,' if (!this.singleTile && this.backBuffer && this.gridResolution === this.backBufferResolution) {'],[0,' OpenLayers.Element.addClass(tile.getTile(), replacingCls);'],[-1,' }'],[-1,' };'],[-1,' '],[0,' tile.onLoadEnd = function(evt) {'],[0,' this.numLoadingTiles--;'],[0,' var aborted = evt.type === \'unload\';'],[0,' this.events.triggerEvent(\"tileloaded\", {'],[-1,' tile: tile,'],[-1,' aborted: aborted'],[-1,' });'],[0,' if (!this.singleTile && !aborted && this.backBuffer && this.gridResolution === this.backBufferResolution) {'],[0,' var tileDiv = tile.getTile();'],[0,' if (OpenLayers.Element.getStyle(tileDiv, \'display\') === \'none\') {'],[0,' var bufferTile = document.getElementById(tile.id + \'_bb\');'],[0,' if (bufferTile) {'],[0,' bufferTile.parentNode.removeChild(bufferTile);'],[-1,' }'],[-1,' }'],[0,' OpenLayers.Element.removeClass(tileDiv, replacingCls);'],[-1,' }'],[-1,' \/\/if that was the last tile, then trigger a \'loadend\' on the layer'],[0,' if (this.numLoadingTiles === 0) {'],[0,' if (this.backBuffer) {'],[0,' if (this.backBuffer.childNodes.length === 0) {'],[-1,' \/\/ no tiles transitioning, remove immediately'],[0,' this.removeBackBuffer();'],[-1,' } else {'],[-1,' \/\/ wait until transition has ended or delay has passed'],[0,' this._transitionElement = aborted ?'],[-1,' this.div.lastChild : tile.imgDiv;'],[0,' var transitionendEvents = this.transitionendEvents;'],[0,' for (var i=transitionendEvents.length-1; i>=0; --i) {'],[0,' OpenLayers.Event.observe(this._transitionElement,'],[-1,' transitionendEvents[i],'],[-1,' this._removeBackBuffer);'],[-1,' }'],[-1,' \/\/ the removal of the back buffer is delayed to prevent'],[-1,' \/\/ flash effects due to the animation of tile displaying'],[0,' this.backBufferTimerId = window.setTimeout('],[-1,' this._removeBackBuffer, this.removeBackBufferDelay'],[-1,' );'],[-1,' }'],[-1,' }'],[0,' this.loading = false;'],[0,' this.events.triggerEvent(\"loadend\");'],[-1,' }'],[-1,' };'],[-1,' '],[0,' tile.onLoadError = function() {'],[0,' this.events.triggerEvent(\"tileerror\", {tile: tile});'],[-1,' };'],[-1,' '],[0,' tile.events.on({'],[-1,' \"loadstart\": tile.onLoadStart,'],[-1,' \"loadend\": tile.onLoadEnd,'],[-1,' \"unload\": tile.onLoadEnd,'],[-1,' \"loaderror\": tile.onLoadError,'],[-1,' scope: this'],[-1,' });'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: removeTileMonitoringHooks'],[-1,' * This function takes a tile as input and removes the tile hooks '],[-1,' * that were added in addTileMonitoringHooks()'],[-1,' * '],[-1,' * Parameters: '],[-1,' * tile - {<OpenLayers.Tile>}'],[-1,' *\/'],[-1,' removeTileMonitoringHooks: function(tile) {'],[0,' tile.unload();'],[0,' tile.events.un({'],[-1,' \"loadstart\": tile.onLoadStart,'],[-1,' \"loadend\": tile.onLoadEnd,'],[-1,' \"unload\": tile.onLoadEnd,'],[-1,' \"loaderror\": tile.onLoadError,'],[-1,' scope: this'],[-1,' });'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: moveGriddedTiles'],[-1,' *\/'],[-1,' moveGriddedTiles: function() {'],[0,' var buffer = this.buffer + 1;'],[0,' while(true) {'],[0,' var tlTile = this.grid[0][0];'],[0,' var tlViewPort = {'],[-1,' x: tlTile.position.x +'],[-1,' this.map.layerContainerOriginPx.x,'],[-1,' y: tlTile.position.y +'],[-1,' this.map.layerContainerOriginPx.y'],[-1,' };'],[0,' var ratio = this.getServerResolution() \/ this.map.getResolution();'],[0,' var tileSize = {'],[-1,' w: Math.round(this.tileSize.w * ratio),'],[-1,' h: Math.round(this.tileSize.h * ratio)'],[-1,' };'],[0,' if (tlViewPort.x > -tileSize.w * (buffer - 1)) {'],[0,' this.shiftColumn(true, tileSize);'],[0,' } else if (tlViewPort.x < -tileSize.w * buffer) {'],[0,' this.shiftColumn(false, tileSize);'],[0,' } else if (tlViewPort.y > -tileSize.h * (buffer - 1)) {'],[0,' this.shiftRow(true, tileSize);'],[0,' } else if (tlViewPort.y < -tileSize.h * buffer) {'],[0,' this.shiftRow(false, tileSize);'],[-1,' } else {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: shiftRow'],[-1,' * Shifty grid work'],[-1,' *'],[-1,' * Parameters:'],[-1,' * prepend - {Boolean} if true, prepend to beginning.'],[-1,' * if false, then append to end'],[-1,' * tileSize - {Object} rendered tile size; object with w and h properties'],[-1,' *\/'],[-1,' shiftRow: function(prepend, tileSize) {'],[0,' var grid = this.grid;'],[0,' var rowIndex = prepend ? 0 : (grid.length - 1);'],[0,' var sign = prepend ? -1 : 1;'],[0,' var rowSign = this.rowSign;'],[0,' var tileLayout = this.gridLayout;'],[0,' tileLayout.startrow += sign * rowSign;'],[-1,''],[0,' var modelRow = grid[rowIndex];'],[0,' var row = grid[prepend ? \'pop\' : \'shift\']();'],[0,' for (var i=0, len=row.length; i<len; i++) {'],[0,' var tile = row[i];'],[0,' var position = modelRow[i].position.clone();'],[0,' position.y += tileSize.h * sign;'],[0,' tile.moveTo(this.getTileBoundsForGridIndex(rowIndex, i), position);'],[-1,' }'],[0,' grid[prepend ? \'unshift\' : \'push\'](row);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: shiftColumn'],[-1,' * Shift grid work in the other dimension'],[-1,' *'],[-1,' * Parameters:'],[-1,' * prepend - {Boolean} if true, prepend to beginning.'],[-1,' * if false, then append to end'],[-1,' * tileSize - {Object} rendered tile size; object with w and h properties'],[-1,' *\/'],[-1,' shiftColumn: function(prepend, tileSize) {'],[0,' var grid = this.grid;'],[0,' var colIndex = prepend ? 0 : (grid[0].length - 1);'],[0,' var sign = prepend ? -1 : 1;'],[0,' var tileLayout = this.gridLayout;'],[0,' tileLayout.startcol += sign;'],[-1,''],[0,' for (var i=0, len=grid.length; i<len; i++) {'],[0,' var row = grid[i];'],[0,' var position = row[colIndex].position.clone();'],[0,' var tile = row[prepend ? \'pop\' : \'shift\'](); '],[0,' position.x += tileSize.w * sign;'],[0,' tile.moveTo(this.getTileBoundsForGridIndex(i, colIndex), position);'],[0,' row[prepend ? \'unshift\' : \'push\'](tile);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: removeExcessTiles'],[-1,' * When the size of the map or the buffer changes, we may need to'],[-1,' * remove some excess rows and columns.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * rows - {Integer} Maximum number of rows we want our grid to have.'],[-1,' * columns - {Integer} Maximum number of columns we want our grid to have.'],[-1,' *\/'],[-1,' removeExcessTiles: function(rows, columns) {'],[0,' var i, l;'],[-1,' '],[-1,' \/\/ remove extra rows'],[0,' while (this.grid.length > rows) {'],[0,' var row = this.grid.pop();'],[0,' for (i=0, l=row.length; i<l; i++) {'],[0,' var tile = row[i];'],[0,' this.destroyTile(tile);'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' \/\/ remove extra columns'],[0,' for (i=0, l=this.grid.length; i<l; i++) {'],[0,' while (this.grid[i].length > columns) {'],[0,' var row = this.grid[i];'],[0,' var tile = row.pop();'],[0,' this.destroyTile(tile);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: onMapResize'],[-1,' * For singleTile layers, this will set a new tile size according to the'],[-1,' * dimensions of the map pane.'],[-1,' *\/'],[-1,' onMapResize: function() {'],[0,' if (this.singleTile) {'],[0,' this.clearGrid();'],[0,' this.setTileSize();'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getTileBounds'],[-1,' * Returns The tile bounds for a layer given a pixel location.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * viewPortPx - {<OpenLayers.Pixel>} The location in the viewport.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} Bounds of the tile at the given pixel location.'],[-1,' *\/'],[-1,' getTileBounds: function(viewPortPx) {'],[0,' var maxExtent = this.maxExtent;'],[0,' var resolution = this.getResolution();'],[0,' var tileMapWidth = resolution * this.tileSize.w;'],[0,' var tileMapHeight = resolution * this.tileSize.h;'],[0,' var mapPoint = this.getLonLatFromViewPortPx(viewPortPx);'],[0,' var tileLeft = maxExtent.left + (tileMapWidth *'],[-1,' Math.floor((mapPoint.lon -'],[-1,' maxExtent.left) \/'],[-1,' tileMapWidth));'],[0,' var tileBottom = maxExtent.bottom + (tileMapHeight *'],[-1,' Math.floor((mapPoint.lat -'],[-1,' maxExtent.bottom) \/'],[-1,' tileMapHeight));'],[0,' return new OpenLayers.Bounds(tileLeft, tileBottom,'],[-1,' tileLeft + tileMapWidth,'],[-1,' tileBottom + tileMapHeight);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Layer.Grid\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Handler.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Events.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Handler'],[-1,' * Base class to construct a higher-level handler for event sequences. All'],[-1,' * handlers have activate and deactivate methods. In addition, they have'],[-1,' * methods named like browser events. When a handler is activated, any'],[-1,' * additional methods named like a browser event is registered as a'],[-1,' * listener for the corresponding event. When a handler is deactivated,'],[-1,' * those same methods are unregistered as event listeners.'],[-1,' *'],[-1,' * Handlers also typically have a callbacks object with keys named like'],[-1,' * the abstracted events or event sequences that they are in charge of'],[-1,' * handling. The controls that wrap handlers define the methods that'],[-1,' * correspond to these abstract events - so instead of listening for'],[-1,' * individual browser events, they only listen for the abstract events'],[-1,' * defined by the handler.'],[-1,' * '],[-1,' * Handlers are created by controls, which ultimately have the responsibility'],[-1,' * of making changes to the the state of the application. Handlers'],[-1,' * themselves may make temporary changes, but in general are expected to'],[-1,' * return the application in the same state that they found it.'],[-1,' *\/'],[1,'OpenLayers.Handler = OpenLayers.Class({'],[-1,''],[-1,' \/**'],[-1,' * Property: id'],[-1,' * {String}'],[-1,' *\/'],[-1,' id: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: control'],[-1,' * {<OpenLayers.Control>}. The control that initialized this handler. The'],[-1,' * control is assumed to have a valid map property - that map is used'],[-1,' * in the handler\'s own setMap method.'],[-1,' *\/'],[-1,' control: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: map'],[-1,' * {<OpenLayers.Map>}'],[-1,' *\/'],[-1,' map: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: keyMask'],[-1,' * {Integer} Use bitwise operators and one or more of the OpenLayers.Handler'],[-1,' * constants to construct a keyMask. The keyMask is used by'],[-1,' * <checkModifiers>. If the keyMask matches the combination of keys'],[-1,' * down on an event, checkModifiers returns true.'],[-1,' *'],[-1,' * Example:'],[-1,' * (code)'],[-1,' * \/\/ handler only responds if the Shift key is down'],[-1,' * handler.keyMask = OpenLayers.Handler.MOD_SHIFT;'],[-1,' *'],[-1,' * \/\/ handler only responds if Ctrl-Shift is down'],[-1,' * handler.keyMask = OpenLayers.Handler.MOD_SHIFT |'],[-1,' * OpenLayers.Handler.MOD_CTRL;'],[-1,' * (end)'],[-1,' *\/'],[-1,' keyMask: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: active'],[-1,' * {Boolean}'],[-1,' *\/'],[-1,' active: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: evt'],[-1,' * {Event} This property references the last event handled by the handler.'],[-1,' * Note that this property is not part of the stable API. Use of the'],[-1,' * evt property should be restricted to controls in the library'],[-1,' * or other applications that are willing to update with changes to'],[-1,' * the OpenLayers code.'],[-1,' *\/'],[-1,' evt: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: touch'],[-1,' * {Boolean} Indicates the support of touch events. When touch events are '],[-1,' * started touch will be true and all mouse related listeners will do '],[-1,' * nothing.'],[-1,' *\/'],[-1,' touch: false,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Handler'],[-1,' * Construct a handler.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>} The control that initialized this'],[-1,' * handler. The control is assumed to have a valid map property; that'],[-1,' * map is used in the handler\'s own setMap method. If a map property'],[-1,' * is present in the options argument it will be used instead.'],[-1,' * callbacks - {Object} An object whose properties correspond to abstracted'],[-1,' * events or sequences of browser events. The values for these'],[-1,' * properties are functions defined by the control that get called by'],[-1,' * the handler.'],[-1,' * options - {Object} An optional object whose properties will be set on'],[-1,' * the handler.'],[-1,' *\/'],[-1,' initialize: function(control, callbacks, options) {'],[0,' OpenLayers.Util.extend(this, options);'],[0,' this.control = control;'],[0,' this.callbacks = callbacks;'],[-1,''],[0,' var map = this.map || control.map;'],[0,' if (map) {'],[0,' this.setMap(map); '],[-1,' }'],[-1,' '],[0,' this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + \"_\");'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setMap'],[-1,' *\/'],[-1,' setMap: function (map) {'],[0,' this.map = map;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: checkModifiers'],[-1,' * Check the keyMask on the handler. If no <keyMask> is set, this always'],[-1,' * returns true. If a <keyMask> is set and it matches the combination'],[-1,' * of keys down on an event, this returns true.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The keyMask matches the keys down on an event.'],[-1,' *\/'],[-1,' checkModifiers: function (evt) {'],[0,' if(this.keyMask == null) {'],[0,' return true;'],[-1,' }'],[-1,' \/* calculate the keyboard modifier mask for this event *\/'],[0,' var keyModifiers ='],[-1,' (evt.shiftKey ? OpenLayers.Handler.MOD_SHIFT : 0) |'],[-1,' (evt.ctrlKey ? OpenLayers.Handler.MOD_CTRL : 0) |'],[-1,' (evt.altKey ? OpenLayers.Handler.MOD_ALT : 0) |'],[-1,' (evt.metaKey ? OpenLayers.Handler.MOD_META : 0);'],[-1,' '],[-1,' \/* if it differs from the handler object\'s key mask,'],[-1,' bail out of the event handler *\/'],[0,' return (keyModifiers == this.keyMask);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: activate'],[-1,' * Turn on the handler. Returns false if the handler was already active.'],[-1,' * '],[-1,' * Returns: '],[-1,' * {Boolean} The handler was activated.'],[-1,' *\/'],[-1,' activate: function() {'],[0,' if(this.active) {'],[0,' return false;'],[-1,' }'],[-1,' \/\/ register for event handlers defined on this class.'],[0,' var events = OpenLayers.Events.prototype.BROWSER_EVENTS;'],[0,' for (var i=0, len=events.length; i<len; i++) {'],[0,' if (this[events[i]]) {'],[0,' this.register(events[i], this[events[i]]); '],[-1,' }'],[-1,' } '],[0,' this.active = true;'],[0,' return true;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: deactivate'],[-1,' * Turn off the handler. Returns false if the handler was already inactive.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The handler was deactivated.'],[-1,' *\/'],[-1,' deactivate: function() {'],[0,' if(!this.active) {'],[0,' return false;'],[-1,' }'],[-1,' \/\/ unregister event handlers defined on this class.'],[0,' var events = OpenLayers.Events.prototype.BROWSER_EVENTS;'],[0,' for (var i=0, len=events.length; i<len; i++) {'],[0,' if (this[events[i]]) {'],[0,' this.unregister(events[i], this[events[i]]); '],[-1,' }'],[-1,' } '],[0,' this.touch = false;'],[0,' this.active = false;'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: startTouch'],[-1,' * Start touch events, this method must be called by subclasses in '],[-1,' * \"touchstart\" method. When touch events are started <touch> will be'],[-1,' * true and all mouse related listeners will do nothing.'],[-1,' *\/'],[-1,' startTouch: function() {'],[0,' if (!this.touch) {'],[0,' this.touch = true;'],[0,' var events = ['],[-1,' \"mousedown\", \"mouseup\", \"mousemove\", \"click\", \"dblclick\",'],[-1,' \"mouseout\"'],[-1,' ];'],[0,' for (var i=0, len=events.length; i<len; i++) {'],[0,' if (this[events[i]]) {'],[0,' this.unregister(events[i], this[events[i]]); '],[-1,' }'],[-1,' } '],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: callback'],[-1,' * Trigger the control\'s named callback with the given arguments'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String} The key for the callback that is one of the properties'],[-1,' * of the handler\'s callbacks object.'],[-1,' * args - {Array(*)} An array of arguments (any type) with which to call '],[-1,' * the callback (defined by the control).'],[-1,' *\/'],[-1,' callback: function (name, args) {'],[0,' if (name && this.callbacks[name]) {'],[0,' this.callbacks[name].apply(this.control, args);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: register'],[-1,' * register an event on the map'],[-1,' *\/'],[-1,' register: function (name, method) {'],[-1,' \/\/ TODO: deal with registerPriority in 3.0'],[0,' this.map.events.registerPriority(name, this, method);'],[0,' this.map.events.registerPriority(name, this, this.setEvent);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: unregister'],[-1,' * unregister an event from the map'],[-1,' *\/'],[-1,' unregister: function (name, method) {'],[0,' this.map.events.unregister(name, this, method); '],[0,' this.map.events.unregister(name, this, this.setEvent);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setEvent'],[-1,' * With each registered browser event, the handler sets its own evt'],[-1,' * property. This property can be accessed by controls if needed'],[-1,' * to get more information about the event that the handler is'],[-1,' * processing.'],[-1,' *'],[-1,' * This allows modifier keys on the event to be checked (alt, shift, ctrl,'],[-1,' * and meta cannot be checked with the keyboard handler). For a'],[-1,' * control to determine which modifier keys are associated with the'],[-1,' * event that a handler is currently processing, it should access'],[-1,' * (code)handler.evt.altKey || handler.evt.shiftKey ||'],[-1,' * handler.evt.ctrlKey || handler.evt.metaKey(end).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} The browser event.'],[-1,' *\/'],[-1,' setEvent: function(evt) {'],[0,' this.evt = evt;'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' * Deconstruct the handler.'],[-1,' *\/'],[-1,' destroy: function () {'],[-1,' \/\/ unregister event listeners'],[0,' this.deactivate();'],[-1,' \/\/ eliminate circular references'],[0,' this.control = this.map = null; '],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Handler\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Handler.MOD_NONE'],[-1,' * If set as the <keyMask>, <checkModifiers> returns false if any key is down.'],[-1,' *\/'],[1,'OpenLayers.Handler.MOD_NONE = 0;'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Handler.MOD_SHIFT'],[-1,' * If set as the <keyMask>, <checkModifiers> returns false if Shift is down.'],[-1,' *\/'],[1,'OpenLayers.Handler.MOD_SHIFT = 1;'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Handler.MOD_CTRL'],[-1,' * If set as the <keyMask>, <checkModifiers> returns false if Ctrl is down.'],[-1,' *\/'],[1,'OpenLayers.Handler.MOD_CTRL = 2;'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Handler.MOD_ALT'],[-1,' * If set as the <keyMask>, <checkModifiers> returns false if Alt is down.'],[-1,' *\/'],[1,'OpenLayers.Handler.MOD_ALT = 4;'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Handler.MOD_META'],[-1,' * If set as the <keyMask>, <checkModifiers> returns false if Cmd is down.'],[-1,' *\/'],[1,'OpenLayers.Handler.MOD_META = 8;'],[-1,''],[-1,''],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Handler\/Click.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Handler.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Handler.Click'],[-1,' * A handler for mouse clicks. The intention of this handler is to give'],[-1,' * controls more flexibility with handling clicks. Browsers trigger'],[-1,' * click events twice for a double-click. In addition, the mousedown,'],[-1,' * mousemove, mouseup sequence fires a click event. With this handler,'],[-1,' * controls can decide whether to ignore clicks associated with a double'],[-1,' * click. By setting a <pixelTolerance>, controls can also ignore clicks'],[-1,' * that include a drag. Create a new instance with the'],[-1,' * <OpenLayers.Handler.Click> constructor.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Handler> '],[-1,' *\/'],[1,'OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {'],[-1,' \/**'],[-1,' * APIProperty: delay'],[-1,' * {Number} Number of milliseconds between clicks before the event is'],[-1,' * considered a double-click.'],[-1,' *\/'],[-1,' delay: 300,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: single'],[-1,' * {Boolean} Handle single clicks. Default is true. If false, clicks'],[-1,' * will not be reported. If true, single-clicks will be reported.'],[-1,' *\/'],[-1,' single: true,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: double'],[-1,' * {Boolean} Handle double-clicks. Default is false.'],[-1,' *\/'],[-1,' \'double\': false,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: pixelTolerance'],[-1,' * {Number} Maximum number of pixels between mouseup and mousedown for an'],[-1,' * event to be considered a click. Default is 0. If set to an'],[-1,' * integer value, clicks with a drag greater than the value will be'],[-1,' * ignored. This property can only be set when the handler is'],[-1,' * constructed.'],[-1,' *\/'],[-1,' pixelTolerance: 0,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: dblclickTolerance'],[-1,' * {Number} Maximum distance in pixels between clicks for a sequence of '],[-1,' * events to be considered a double click. Default is 13. If the'],[-1,' * distance between two clicks is greater than this value, a double-'],[-1,' * click will not be fired.'],[-1,' *\/'],[-1,' dblclickTolerance: 13,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: stopSingle'],[-1,' * {Boolean} Stop other listeners from being notified of clicks. Default'],[-1,' * is false. If true, any listeners registered before this one for '],[-1,' * click or rightclick events will not be notified.'],[-1,' *\/'],[-1,' stopSingle: false,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: stopDouble'],[-1,' * {Boolean} Stop other listeners from being notified of double-clicks.'],[-1,' * Default is false. If true, any click listeners registered before'],[-1,' * this one will not be notified of *any* double-click events.'],[-1,' * '],[-1,' * The one caveat with stopDouble is that given a map with two click'],[-1,' * handlers, one with stopDouble true and the other with stopSingle'],[-1,' * true, the stopSingle handler should be activated last to get'],[-1,' * uniform cross-browser performance. Since IE triggers one click'],[-1,' * with a dblclick and FF triggers two, if a stopSingle handler is'],[-1,' * activated first, all it gets in IE is a single click when the'],[-1,' * second handler stops propagation on the dblclick.'],[-1,' *\/'],[-1,' stopDouble: false,'],[-1,''],[-1,' \/**'],[-1,' * Property: timerId'],[-1,' * {Number} The id of the timeout waiting to clear the <delayedCall>.'],[-1,' *\/'],[-1,' timerId: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: down'],[-1,' * {Object} Object that store relevant information about the last'],[-1,' * mousedown or touchstart. Its \'xy\' OpenLayers.Pixel property gives'],[-1,' * the average location of the mouse\/touch event. Its \'touches\''],[-1,' * property records clientX\/clientY of each touches.'],[-1,' *\/'],[-1,' down: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: last'],[-1,' * {Object} Object that store relevant information about the last'],[-1,' * mousemove or touchmove. Its \'xy\' OpenLayers.Pixel property gives'],[-1,' * the average location of the mouse\/touch event. Its \'touches\''],[-1,' * property records clientX\/clientY of each touches.'],[-1,' *\/'],[-1,' last: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: first'],[-1,' * {Object} When waiting for double clicks, this object will store '],[-1,' * information about the first click in a two click sequence.'],[-1,' *\/'],[-1,' first: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: rightclickTimerId'],[-1,' * {Number} The id of the right mouse timeout waiting to clear the '],[-1,' * <delayedEvent>.'],[-1,' *\/'],[-1,' rightclickTimerId: null,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Handler.Click'],[-1,' * Create a new click handler.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>} The control that is making use of'],[-1,' * this handler. If a handler is being used without a control, the'],[-1,' * handler\'s setMap method must be overridden to deal properly with'],[-1,' * the map.'],[-1,' * callbacks - {Object} An object with keys corresponding to callbacks'],[-1,' * that will be called by the handler. The callbacks should'],[-1,' * expect to receive a single argument, the click event.'],[-1,' * Callbacks for \'click\' and \'dblclick\' are supported.'],[-1,' * options - {Object} Optional object whose properties will be set on the'],[-1,' * handler.'],[-1,' *\/'],[-1,' '],[-1,' \/**'],[-1,' * Method: touchstart'],[-1,' * Handle touchstart.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' touchstart: function(evt) {'],[0,' this.startTouch();'],[0,' this.down = this.getEventInfo(evt);'],[0,' this.last = this.getEventInfo(evt);'],[0,' return true;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: touchmove'],[-1,' * Store position of last move, because touchend event can have'],[-1,' * an empty \"touches\" property.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' touchmove: function(evt) {'],[0,' this.last = this.getEventInfo(evt);'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: touchend'],[-1,' * Correctly set event xy property, and add lastTouches to have'],[-1,' * touches property from last touchstart or touchmove'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' touchend: function(evt) {'],[-1,' \/\/ touchstart may not have been allowed to propagate'],[0,' if (this.down) {'],[0,' evt.xy = this.last.xy;'],[0,' evt.lastTouches = this.last.touches;'],[0,' this.handleSingle(evt);'],[0,' this.down = null;'],[-1,' }'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: mousedown'],[-1,' * Handle mousedown.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' mousedown: function(evt) {'],[0,' this.down = this.getEventInfo(evt);'],[0,' this.last = this.getEventInfo(evt);'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: mouseup'],[-1,' * Handle mouseup. Installed to support collection of right mouse events.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' mouseup: function (evt) {'],[0,' var propagate = true;'],[-1,''],[-1,' \/\/ Collect right mouse clicks from the mouseup'],[-1,' \/\/ IE - ignores the second right click in mousedown so using'],[-1,' \/\/ mouseup instead'],[0,' if (this.checkModifiers(evt) && this.control.handleRightClicks &&'],[-1,' OpenLayers.Event.isRightClick(evt)) {'],[0,' propagate = this.rightclick(evt);'],[-1,' }'],[-1,''],[0,' return propagate;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: rightclick'],[-1,' * Handle rightclick. For a dblrightclick, we get two clicks so we need '],[-1,' * to always register for dblrightclick to properly handle single '],[-1,' * clicks.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' rightclick: function(evt) {'],[0,' if(this.passesTolerance(evt)) {'],[0,' if(this.rightclickTimerId != null) {'],[-1,' \/\/Second click received before timeout this must be '],[-1,' \/\/ a double click'],[0,' this.clearTimer();'],[0,' this.callback(\'dblrightclick\', [evt]);'],[0,' return !this.stopDouble;'],[-1,' } else { '],[-1,' \/\/Set the rightclickTimerId, send evt only if double is '],[-1,' \/\/ true else trigger single'],[0,' var clickEvent = this[\'double\'] ?'],[-1,' OpenLayers.Util.extend({}, evt) : '],[-1,' this.callback(\'rightclick\', [evt]);'],[-1,''],[0,' var delayedRightCall = OpenLayers.Function.bind('],[-1,' this.delayedRightCall, '],[-1,' this, '],[-1,' clickEvent'],[-1,' );'],[0,' this.rightclickTimerId = window.setTimeout('],[-1,' delayedRightCall, this.delay'],[-1,' );'],[-1,' } '],[-1,' }'],[0,' return !this.stopSingle;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: delayedRightCall'],[-1,' * Sets <rightclickTimerId> to null. And optionally triggers the '],[-1,' * rightclick callback if evt is set.'],[-1,' *\/'],[-1,' delayedRightCall: function(evt) {'],[0,' this.rightclickTimerId = null;'],[0,' if (evt) {'],[0,' this.callback(\'rightclick\', [evt]);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: click'],[-1,' * Handle click events from the browser. This is registered as a listener'],[-1,' * for click events and should not be called from other events in this'],[-1,' * handler.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' click: function(evt) {'],[0,' if (!this.last) {'],[0,' this.last = this.getEventInfo(evt);'],[-1,' }'],[0,' this.handleSingle(evt);'],[0,' return !this.stopSingle;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: dblclick'],[-1,' * Handle dblclick. For a dblclick, we get two clicks in some browsers'],[-1,' * (FF) and one in others (IE). So we need to always register for'],[-1,' * dblclick to properly handle single clicks. This method is registered'],[-1,' * as a listener for the dblclick browser event. It should *not* be'],[-1,' * called by other methods in this handler.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' dblclick: function(evt) {'],[0,' this.handleDouble(evt);'],[0,' return !this.stopDouble;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: handleDouble'],[-1,' * Handle double-click sequence.'],[-1,' *\/'],[-1,' handleDouble: function(evt) {'],[0,' if (this.passesDblclickTolerance(evt)) {'],[0,' if (this[\"double\"]) {'],[0,' this.callback(\"dblclick\", [evt]);'],[-1,' }'],[-1,' \/\/ to prevent a dblclick from firing the click callback in IE'],[0,' this.clearTimer();'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: handleSingle'],[-1,' * Handle single click sequence.'],[-1,' *\/'],[-1,' handleSingle: function(evt) {'],[0,' if (this.passesTolerance(evt)) {'],[0,' if (this.timerId != null) {'],[-1,' \/\/ already received a click'],[0,' if (this.last.touches && this.last.touches.length === 1) {'],[-1,' \/\/ touch device, no dblclick event - this may be a double'],[0,' if (this[\"double\"]) {'],[-1,' \/\/ on Android don\'t let the browser zoom on the page'],[0,' OpenLayers.Event.preventDefault(evt);'],[-1,' }'],[0,' this.handleDouble(evt);'],[-1,' }'],[-1,' \/\/ if we\'re not in a touch environment we clear the click timer'],[-1,' \/\/ if we\'ve got a second touch, we\'ll get two touchend events'],[0,' if (!this.last.touches || this.last.touches.length !== 2) {'],[0,' this.clearTimer();'],[-1,' }'],[-1,' } else {'],[-1,' \/\/ remember the first click info so we can compare to the second'],[0,' this.first = this.getEventInfo(evt);'],[-1,' \/\/ set the timer, send evt only if single is true'],[-1,' \/\/use a clone of the event object because it will no longer '],[-1,' \/\/be a valid event object in IE in the timer callback'],[0,' var clickEvent = this.single ?'],[-1,' OpenLayers.Util.extend({}, evt) : null;'],[0,' this.queuePotentialClick(clickEvent);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: queuePotentialClick'],[-1,' * This method is separated out largely to make testing easier (so we'],[-1,' * don\'t have to override window.setTimeout)'],[-1,' *\/'],[-1,' queuePotentialClick: function(evt) {'],[0,' this.timerId = window.setTimeout('],[-1,' OpenLayers.Function.bind(this.delayedCall, this, evt),'],[-1,' this.delay'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: passesTolerance'],[-1,' * Determine whether the event is within the optional pixel tolerance. Note'],[-1,' * that the pixel tolerance check only works if mousedown events get to'],[-1,' * the listeners registered here. If they are stopped by other elements,'],[-1,' * the <pixelTolerance> will have no effect here (this method will always'],[-1,' * return true).'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The click is within the pixel tolerance (if specified).'],[-1,' *\/'],[-1,' passesTolerance: function(evt) {'],[0,' var passes = true;'],[0,' if (this.pixelTolerance != null && this.down && this.down.xy) {'],[0,' passes = this.pixelTolerance >= this.down.xy.distanceTo(evt.xy);'],[-1,' \/\/ for touch environments, we also enforce that all touches'],[-1,' \/\/ start and end within the given tolerance to be considered a click'],[0,' if (passes && this.touch && '],[-1,' this.down.touches.length === this.last.touches.length) {'],[-1,' \/\/ the touchend event doesn\'t come with touches, so we check'],[-1,' \/\/ down and last'],[0,' for (var i=0, ii=this.down.touches.length; i<ii; ++i) {'],[0,' if (this.getTouchDistance('],[-1,' this.down.touches[i], '],[-1,' this.last.touches[i]'],[-1,' ) > this.pixelTolerance) {'],[0,' passes = false;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return passes;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: getTouchDistance'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The pixel displacement between two touches.'],[-1,' *\/'],[-1,' getTouchDistance: function(from, to) {'],[0,' return Math.sqrt('],[-1,' Math.pow(from.clientX - to.clientX, 2) +'],[-1,' Math.pow(from.clientY - to.clientY, 2)'],[-1,' );'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: passesDblclickTolerance'],[-1,' * Determine whether the event is within the optional double-cick pixel '],[-1,' * tolerance.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The click is within the double-click pixel tolerance.'],[-1,' *\/'],[-1,' passesDblclickTolerance: function(evt) {'],[0,' var passes = true;'],[0,' if (this.down && this.first) {'],[0,' passes = this.down.xy.distanceTo(this.first.xy) <= this.dblclickTolerance;'],[-1,' }'],[0,' return passes;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: clearTimer'],[-1,' * Clear the timer and set <timerId> to null.'],[-1,' *\/'],[-1,' clearTimer: function() {'],[0,' if (this.timerId != null) {'],[0,' window.clearTimeout(this.timerId);'],[0,' this.timerId = null;'],[-1,' }'],[0,' if (this.rightclickTimerId != null) {'],[0,' window.clearTimeout(this.rightclickTimerId);'],[0,' this.rightclickTimerId = null;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: delayedCall'],[-1,' * Sets <timerId> to null. And optionally triggers the click callback if'],[-1,' * evt is set.'],[-1,' *\/'],[-1,' delayedCall: function(evt) {'],[0,' this.timerId = null;'],[0,' if (evt) {'],[0,' this.callback(\"click\", [evt]);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getEventInfo'],[-1,' * This method allows us to store event information without storing the'],[-1,' * actual event. In touch devices (at least), the same event is '],[-1,' * modified between touchstart, touchmove, and touchend.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An object with event related info.'],[-1,' *\/'],[-1,' getEventInfo: function(evt) {'],[0,' var touches;'],[0,' if (evt.touches) {'],[0,' var len = evt.touches.length;'],[0,' touches = new Array(len);'],[0,' var touch;'],[0,' for (var i=0; i<len; i++) {'],[0,' touch = evt.touches[i];'],[0,' touches[i] = {'],[-1,' clientX: touch.olClientX,'],[-1,' clientY: touch.olClientY'],[-1,' };'],[-1,' }'],[-1,' }'],[0,' return {'],[-1,' xy: evt.xy,'],[-1,' touches: touches'],[-1,' };'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: deactivate'],[-1,' * Deactivate the handler.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The handler was successfully deactivated.'],[-1,' *\/'],[-1,' deactivate: function() {'],[0,' var deactivated = false;'],[0,' if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {'],[0,' this.clearTimer();'],[0,' this.down = null;'],[0,' this.first = null;'],[0,' this.last = null;'],[0,' deactivated = true;'],[-1,' }'],[0,' return deactivated;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Handler.Click\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Format.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Format'],[-1,' * Base class for format reading\/writing a variety of formats. Subclasses'],[-1,' * of OpenLayers.Format are expected to have read and write methods.'],[-1,' *\/'],[1,'OpenLayers.Format = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * Property: options'],[-1,' * {Object} A reference to options passed to the constructor.'],[-1,' *\/'],[-1,' options: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: externalProjection'],[-1,' * {<OpenLayers.Projection>} When passed a externalProjection and'],[-1,' * internalProjection, the format will reproject the geometries it'],[-1,' * reads or writes. The externalProjection is the projection used by'],[-1,' * the content which is passed into read or which comes out of write.'],[-1,' * In order to reproject, a projection transformation function for the'],[-1,' * specified projections must be available. This support may be '],[-1,' * provided via proj4js or via a custom transformation function. See'],[-1,' * {<OpenLayers.Projection.addTransform>} for more information on'],[-1,' * custom transformations.'],[-1,' *\/'],[-1,' externalProjection: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: internalProjection'],[-1,' * {<OpenLayers.Projection>} When passed a externalProjection and'],[-1,' * internalProjection, the format will reproject the geometries it'],[-1,' * reads or writes. The internalProjection is the projection used by'],[-1,' * the geometries which are returned by read or which are passed into'],[-1,' * write. In order to reproject, a projection transformation function'],[-1,' * for the specified projections must be available. This support may be'],[-1,' * provided via proj4js or via a custom transformation function. See'],[-1,' * {<OpenLayers.Projection.addTransform>} for more information on'],[-1,' * custom transformations.'],[-1,' *\/'],[-1,' internalProjection: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: data'],[-1,' * {Object} When <keepData> is true, this is the parsed string sent to'],[-1,' * <read>.'],[-1,' *\/'],[-1,' data: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: keepData'],[-1,' * {Object} Maintain a reference (<data>) to the most recently read data.'],[-1,' * Default is false.'],[-1,' *\/'],[-1,' keepData: false,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Format'],[-1,' * Instances of this class are not useful. See one of the subclasses.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} An optional object with properties to set on the'],[-1,' * format'],[-1,' *'],[-1,' * Valid options:'],[-1,' * keepData - {Boolean} If true, upon <read>, the data property will be'],[-1,' * set to the parsed object (e.g. the json or xml object).'],[-1,' *'],[-1,' * Returns:'],[-1,' * An instance of OpenLayers.Format'],[-1,' *\/'],[-1,' initialize: function(options) {'],[0,' OpenLayers.Util.extend(this, options);'],[0,' this.options = options;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' * Clean up.'],[-1,' *\/'],[-1,' destroy: function() {'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: read'],[-1,' * Read data from a string, and return an object whose type depends on the'],[-1,' * subclass. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * data - {string} Data to read\/parse.'],[-1,' *'],[-1,' * Returns:'],[-1,' * Depends on the subclass'],[-1,' *\/'],[-1,' read: function(data) {'],[0,' throw new Error(\'Read not implemented.\');'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: write'],[-1,' * Accept an object, and return a string. '],[-1,' *'],[-1,' * Parameters:'],[-1,' * object - {Object} Object to be serialized'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} A string representation of the object.'],[-1,' *\/'],[-1,' write: function(object) {'],[0,' throw new Error(\'Write not implemented.\');'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Format\"'],[-1,'}); '],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Format\/XML.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Format.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Format.XML'],[-1,' * Read and write XML. For cross-browser XML generation, use methods on an'],[-1,' * instance of the XML format class instead of on <code>document<end>.'],[-1,' * The DOM creation and traversing methods exposed here all mimic the'],[-1,' * W3C XML DOM methods. Create a new parser with the'],[-1,' * <OpenLayers.Format.XML> constructor.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Format>'],[-1,' *\/'],[1,'OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {'],[-1,' '],[-1,' \/**'],[-1,' * Property: namespaces'],[-1,' * {Object} Mapping of namespace aliases to namespace URIs. Properties'],[-1,' * of this object should not be set individually. Read-only. All'],[-1,' * XML subclasses should have their own namespaces object. Use'],[-1,' * <setNamespace> to add or set a namespace alias after construction.'],[-1,' *\/'],[-1,' namespaces: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: namespaceAlias'],[-1,' * {Object} Mapping of namespace URI to namespace alias. This object'],[-1,' * is read-only. Use <setNamespace> to add or set a namespace alias.'],[-1,' *\/'],[-1,' namespaceAlias: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: defaultPrefix'],[-1,' * {String} The default namespace alias for creating element nodes.'],[-1,' *\/'],[-1,' defaultPrefix: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: readers'],[-1,' * Contains public functions, grouped by namespace prefix, that will'],[-1,' * be applied when a namespaced node is found matching the function'],[-1,' * name. The function will be applied in the scope of this parser'],[-1,' * with two arguments: the node being read and a context object passed'],[-1,' * from the parent.'],[-1,' *\/'],[-1,' readers: {},'],[-1,' '],[-1,' \/**'],[-1,' * Property: writers'],[-1,' * As a compliment to the <readers> property, this structure contains public'],[-1,' * writing functions grouped by namespace alias and named like the'],[-1,' * node names they produce.'],[-1,' *\/'],[-1,' writers: {},'],[-1,''],[-1,' \/**'],[-1,' * Property: xmldom'],[-1,' * {XMLDom} If this browser uses ActiveX, this will be set to a XMLDOM'],[-1,' * object. It is not intended to be a browser sniffing property.'],[-1,' * Instead, the xmldom property is used instead of <code>document<end>'],[-1,' * where namespaced node creation methods are not supported. In all'],[-1,' * other browsers, this remains null.'],[-1,' *\/'],[-1,' xmldom: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Format.XML'],[-1,' * Construct an XML parser. The parser is used to read and write XML.'],[-1,' * Reading XML from a string returns a DOM element. Writing XML from'],[-1,' * a DOM element returns a string.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} Optional object whose properties will be set on'],[-1,' * the object.'],[-1,' *\/'],[-1,' initialize: function(options) {'],[0,' if(window.ActiveXObject) {'],[0,' this.xmldom = new ActiveXObject(\"Microsoft.XMLDOM\");'],[-1,' }'],[0,' OpenLayers.Format.prototype.initialize.apply(this, [options]);'],[-1,' \/\/ clone the namespace object and set all namespace aliases'],[0,' this.namespaces = OpenLayers.Util.extend({}, this.namespaces);'],[0,' this.namespaceAlias = {};'],[0,' for(var alias in this.namespaces) {'],[0,' this.namespaceAlias[this.namespaces[alias]] = alias;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' * Clean up.'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' this.xmldom = null;'],[0,' OpenLayers.Format.prototype.destroy.apply(this, arguments);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setNamespace'],[-1,' * Set a namespace alias and URI for the format.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * alias - {String} The namespace alias (prefix).'],[-1,' * uri - {String} The namespace URI.'],[-1,' *\/'],[-1,' setNamespace: function(alias, uri) {'],[0,' this.namespaces[alias] = uri;'],[0,' this.namespaceAlias[uri] = alias;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: read'],[-1,' * Deserialize a XML string and return a DOM node.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * text - {String} A XML string'],[-1,' '],[-1,' * Returns:'],[-1,' * {DOMElement} A DOM node'],[-1,' *\/'],[-1,' read: function(text) {'],[0,' var index = text.indexOf(\'<\');'],[0,' if(index > 0) {'],[0,' text = text.substring(index);'],[-1,' }'],[0,' var node = OpenLayers.Util.Try('],[-1,' OpenLayers.Function.bind(('],[-1,' function() {'],[0,' var xmldom;'],[-1,' \/**'],[-1,' * Since we want to be able to call this method on the prototype'],[-1,' * itself, this.xmldom may not exist even if in IE.'],[-1,' *\/'],[0,' if(window.ActiveXObject && !this.xmldom) {'],[0,' xmldom = new ActiveXObject(\"Microsoft.XMLDOM\");'],[-1,' } else {'],[0,' xmldom = this.xmldom;'],[-1,' '],[-1,' }'],[0,' xmldom.loadXML(text);'],[0,' return xmldom;'],[-1,' }'],[-1,' ), this),'],[-1,' function() {'],[0,' return new DOMParser().parseFromString(text, \'text\/xml\');'],[-1,' },'],[-1,' function() {'],[0,' var req = new XMLHttpRequest();'],[0,' req.open(\"GET\", \"data:\" + \"text\/xml\" +'],[-1,' \";charset=utf-8,\" + encodeURIComponent(text), false);'],[0,' if(req.overrideMimeType) {'],[0,' req.overrideMimeType(\"text\/xml\");'],[-1,' }'],[0,' req.send(null);'],[0,' return req.responseXML;'],[-1,' }'],[-1,' );'],[-1,''],[0,' if(this.keepData) {'],[0,' this.data = node;'],[-1,' }'],[-1,''],[0,' return node;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: write'],[-1,' * Serialize a DOM node into a XML string.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A DOM node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The XML string representation of the input node.'],[-1,' *\/'],[-1,' write: function(node) {'],[0,' var data;'],[0,' if(this.xmldom) {'],[0,' data = node.xml;'],[-1,' } else {'],[0,' var serializer = new XMLSerializer();'],[0,' if (node.nodeType == 1) {'],[-1,' \/\/ Add nodes to a document before serializing. Everything else'],[-1,' \/\/ is serialized as is. This may need more work. See #1218 .'],[0,' var doc = document.implementation.createDocument(\"\", \"\", null);'],[0,' if (doc.importNode) {'],[0,' node = doc.importNode(node, true);'],[-1,' }'],[0,' doc.appendChild(node);'],[0,' data = serializer.serializeToString(doc);'],[-1,' } else {'],[0,' data = serializer.serializeToString(node);'],[-1,' }'],[-1,' }'],[0,' return data;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: createElementNS'],[-1,' * Create a new element with namespace. This node can be appended to'],[-1,' * another node with the standard node.appendChild method. For'],[-1,' * cross-browser support, this method must be used instead of'],[-1,' * document.createElementNS.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * uri - {String} Namespace URI for the element.'],[-1,' * name - {String} The qualified name of the element (prefix:localname).'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Element} A DOM element with namespace.'],[-1,' *\/'],[-1,' createElementNS: function(uri, name) {'],[0,' var element;'],[0,' if(this.xmldom) {'],[0,' if(typeof uri == \"string\") {'],[0,' element = this.xmldom.createNode(1, name, uri);'],[-1,' } else {'],[0,' element = this.xmldom.createNode(1, name, \"\");'],[-1,' }'],[-1,' } else {'],[0,' element = document.createElementNS(uri, name);'],[-1,' }'],[0,' return element;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: createDocumentFragment'],[-1,' * Create a document fragment node that can be appended to another node'],[-1,' * created by createElementNS. This will call '],[-1,' * document.createDocumentFragment outside of IE. In IE, the ActiveX'],[-1,' * object\'s createDocumentFragment method is used.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Element} A document fragment.'],[-1,' *\/'],[-1,' createDocumentFragment: function() {'],[0,' var element;'],[0,' if (this.xmldom) {'],[0,' element = this.xmldom.createDocumentFragment();'],[-1,' } else {'],[0,' element = document.createDocumentFragment();'],[-1,' }'],[0,' return element;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: createTextNode'],[-1,' * Create a text node. This node can be appended to another node with'],[-1,' * the standard node.appendChild method. For cross-browser support,'],[-1,' * this method must be used instead of document.createTextNode.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * text - {String} The text of the node.'],[-1,' * '],[-1,' * Returns: '],[-1,' * {DOMElement} A DOM text node.'],[-1,' *\/'],[-1,' createTextNode: function(text) {'],[0,' var node;'],[0,' if (typeof text !== \"string\") {'],[0,' text = String(text);'],[-1,' }'],[0,' if(this.xmldom) {'],[0,' node = this.xmldom.createTextNode(text);'],[-1,' } else {'],[0,' node = document.createTextNode(text);'],[-1,' }'],[0,' return node;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getElementsByTagNameNS'],[-1,' * Get a list of elements on a node given the namespace URI and local name.'],[-1,' * To return all nodes in a given namespace, use \'*\' for the name'],[-1,' * argument. To return all nodes of a given (local) name, regardless'],[-1,' * of namespace, use \'*\' for the uri argument.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {Element} Node on which to search for other nodes.'],[-1,' * uri - {String} Namespace URI.'],[-1,' * name - {String} Local name of the tag (without the prefix).'],[-1,' * '],[-1,' * Returns:'],[-1,' * {NodeList} A node list or array of elements.'],[-1,' *\/'],[-1,' getElementsByTagNameNS: function(node, uri, name) {'],[0,' var elements = [];'],[0,' if(node.getElementsByTagNameNS) {'],[0,' elements = node.getElementsByTagNameNS(uri, name);'],[-1,' } else {'],[-1,' \/\/ brute force method'],[0,' var allNodes = node.getElementsByTagName(\"*\");'],[0,' var potentialNode, fullName;'],[0,' for(var i=0, len=allNodes.length; i<len; ++i) {'],[0,' potentialNode = allNodes[i];'],[0,' fullName = (potentialNode.prefix) ?'],[-1,' (potentialNode.prefix + \":\" + name) : name;'],[0,' if((name == \"*\") || (fullName == potentialNode.nodeName)) {'],[0,' if((uri == \"*\") || (uri == potentialNode.namespaceURI)) {'],[0,' elements.push(potentialNode);'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return elements;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getAttributeNodeNS'],[-1,' * Get an attribute node given the namespace URI and local name.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {Element} Node on which to search for attribute nodes.'],[-1,' * uri - {String} Namespace URI.'],[-1,' * name - {String} Local name of the attribute (without the prefix).'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} An attribute node or null if none found.'],[-1,' *\/'],[-1,' getAttributeNodeNS: function(node, uri, name) {'],[0,' var attributeNode = null;'],[0,' if(node.getAttributeNodeNS) {'],[0,' attributeNode = node.getAttributeNodeNS(uri, name);'],[-1,' } else {'],[0,' var attributes = node.attributes;'],[0,' var potentialNode, fullName;'],[0,' for(var i=0, len=attributes.length; i<len; ++i) {'],[0,' potentialNode = attributes[i];'],[0,' if(potentialNode.namespaceURI == uri) {'],[0,' fullName = (potentialNode.prefix) ?'],[-1,' (potentialNode.prefix + \":\" + name) : name;'],[0,' if(fullName == potentialNode.nodeName) {'],[0,' attributeNode = potentialNode;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return attributeNode;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getAttributeNS'],[-1,' * Get an attribute value given the namespace URI and local name.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {Element} Node on which to search for an attribute.'],[-1,' * uri - {String} Namespace URI.'],[-1,' * name - {String} Local name of the attribute (without the prefix).'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} An attribute value or and empty string if none found.'],[-1,' *\/'],[-1,' getAttributeNS: function(node, uri, name) {'],[0,' var attributeValue = \"\";'],[0,' if(node.getAttributeNS) {'],[0,' attributeValue = node.getAttributeNS(uri, name) || \"\";'],[-1,' } else {'],[0,' var attributeNode = this.getAttributeNodeNS(node, uri, name);'],[0,' if(attributeNode) {'],[0,' attributeValue = attributeNode.nodeValue;'],[-1,' }'],[-1,' }'],[0,' return attributeValue;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getChildValue'],[-1,' * Get the textual value of the node if it exists, or return an'],[-1,' * optional default string. Returns an empty string if no first child'],[-1,' * exists and no default value is supplied.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The element used to look for a first child value.'],[-1,' * def - {String} Optional string to return in the event that no'],[-1,' * first child value exists.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} The value of the first child of the given node.'],[-1,' *\/'],[-1,' getChildValue: function(node, def) {'],[0,' var value = def || \"\";'],[0,' if(node) {'],[0,' for(var child=node.firstChild; child; child=child.nextSibling) {'],[0,' switch(child.nodeType) {'],[-1,' case 3: \/\/ text node'],[-1,' case 4: \/\/ cdata section'],[0,' value += child.nodeValue;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return value;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: isSimpleContent'],[-1,' * Test if the given node has only simple content (i.e. no child element'],[-1,' * nodes).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} An element node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The node has no child element nodes (nodes of type 1). '],[-1,' *\/'],[-1,' isSimpleContent: function(node) {'],[0,' var simple = true;'],[0,' for(var child=node.firstChild; child; child=child.nextSibling) {'],[0,' if(child.nodeType === 1) {'],[0,' simple = false;'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' return simple;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: contentType'],[-1,' * Determine the content type for a given node.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Integer} One of OpenLayers.Format.XML.CONTENT_TYPE.{EMPTY,SIMPLE,COMPLEX,MIXED}'],[-1,' * if the node has no, simple, complex, or mixed content.'],[-1,' *\/'],[-1,' contentType: function(node) {'],[0,' var simple = false,'],[-1,' complex = false;'],[-1,' '],[0,' var type = OpenLayers.Format.XML.CONTENT_TYPE.EMPTY;'],[-1,''],[0,' for(var child=node.firstChild; child; child=child.nextSibling) {'],[0,' switch(child.nodeType) {'],[-1,' case 1: \/\/ element'],[0,' complex = true;'],[0,' break;'],[-1,' case 8: \/\/ comment'],[0,' break;'],[-1,' default:'],[0,' simple = true;'],[-1,' }'],[0,' if(complex && simple) {'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if(complex && simple) {'],[0,' type = OpenLayers.Format.XML.CONTENT_TYPE.MIXED;'],[0,' } else if(complex) {'],[0,' return OpenLayers.Format.XML.CONTENT_TYPE.COMPLEX;'],[0,' } else if(simple) {'],[0,' return OpenLayers.Format.XML.CONTENT_TYPE.SIMPLE;'],[-1,' }'],[0,' return type;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: hasAttributeNS'],[-1,' * Determine whether a node has a particular attribute matching the given'],[-1,' * name and namespace.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {Element} Node on which to search for an attribute.'],[-1,' * uri - {String} Namespace URI.'],[-1,' * name - {String} Local name of the attribute (without the prefix).'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The node has an attribute matching the name and namespace.'],[-1,' *\/'],[-1,' hasAttributeNS: function(node, uri, name) {'],[0,' var found = false;'],[0,' if(node.hasAttributeNS) {'],[0,' found = node.hasAttributeNS(uri, name);'],[-1,' } else {'],[0,' found = !!this.getAttributeNodeNS(node, uri, name);'],[-1,' }'],[0,' return found;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: setAttributeNS'],[-1,' * Adds a new attribute or changes the value of an attribute with the given'],[-1,' * namespace and name.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {Element} Element node on which to set the attribute.'],[-1,' * uri - {String} Namespace URI for the attribute.'],[-1,' * name - {String} Qualified name (prefix:localname) for the attribute.'],[-1,' * value - {String} Attribute value.'],[-1,' *\/'],[-1,' setAttributeNS: function(node, uri, name, value) {'],[0,' if(node.setAttributeNS) {'],[0,' node.setAttributeNS(uri, name, value);'],[-1,' } else {'],[0,' if(this.xmldom) {'],[0,' if(uri) {'],[0,' var attribute = node.ownerDocument.createNode('],[-1,' 2, name, uri'],[-1,' );'],[0,' attribute.nodeValue = value;'],[0,' node.setAttributeNode(attribute);'],[-1,' } else {'],[0,' node.setAttribute(name, value);'],[-1,' }'],[-1,' } else {'],[0,' throw \"setAttributeNS not implemented\";'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createElementNSPlus'],[-1,' * Shorthand for creating namespaced elements with optional attributes and'],[-1,' * child text nodes.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String} The qualified node name.'],[-1,' * options - {Object} Optional object for node configuration.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * uri - {String} Optional namespace uri for the element - supply a prefix'],[-1,' * instead if the namespace uri is a property of the format\'s namespace'],[-1,' * object.'],[-1,' * attributes - {Object} Optional attributes to be set using the'],[-1,' * <setAttributes> method.'],[-1,' * value - {String} Optional text to be appended as a text node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Element} An element node.'],[-1,' *\/'],[-1,' createElementNSPlus: function(name, options) {'],[0,' options = options || {};'],[-1,' \/\/ order of prefix preference'],[-1,' \/\/ 1. in the uri option'],[-1,' \/\/ 2. in the prefix option'],[-1,' \/\/ 3. in the qualified name'],[-1,' \/\/ 4. from the defaultPrefix'],[0,' var uri = options.uri || this.namespaces[options.prefix];'],[0,' if(!uri) {'],[0,' var loc = name.indexOf(\":\");'],[0,' uri = this.namespaces[name.substring(0, loc)];'],[-1,' }'],[0,' if(!uri) {'],[0,' uri = this.namespaces[this.defaultPrefix];'],[-1,' }'],[0,' var node = this.createElementNS(uri, name);'],[0,' if(options.attributes) {'],[0,' this.setAttributes(node, options.attributes);'],[-1,' }'],[0,' var value = options.value;'],[0,' if(value != null) {'],[0,' node.appendChild(this.createTextNode(value));'],[-1,' }'],[0,' return node;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setAttributes'],[-1,' * Set multiple attributes given key value pairs from an object.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {Element} An element node.'],[-1,' * obj - {Object || Array} An object whose properties represent attribute'],[-1,' * names and values represent attribute values. If an attribute name'],[-1,' * is a qualified name (\"prefix:local\"), the prefix will be looked up'],[-1,' * in the parsers {namespaces} object. If the prefix is found,'],[-1,' * setAttributeNS will be used instead of setAttribute.'],[-1,' *\/'],[-1,' setAttributes: function(node, obj) {'],[0,' var value, uri;'],[0,' for(var name in obj) {'],[0,' if(obj[name] != null && obj[name].toString) {'],[0,' value = obj[name].toString();'],[-1,' \/\/ check for qualified attribute name (\"prefix:local\")'],[0,' uri = this.namespaces[name.substring(0, name.indexOf(\":\"))] || null;'],[0,' this.setAttributeNS(node, uri, name, value);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getFirstElementChild'],[-1,' * Implementation of firstElementChild attribute that works on ie7 and ie8.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The parent node (required).'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The first child element.'],[-1,' *\/'],[-1,' getFirstElementChild: function(node) {'],[0,' if (node.firstElementChild) {'],[0,' return node.firstElementChild;'],[-1,' }'],[-1,' else {'],[0,' var child = node.firstChild;'],[0,' while (child.nodeType != 1 && (child = child.nextSibling)) {}'],[0,' return child;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: readNode'],[-1,' * Shorthand for applying one of the named readers given the node'],[-1,' * namespace and local name. Readers take two args (node, obj) and'],[-1,' * generally extend or modify the second.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node to be read (required).'],[-1,' * obj - {Object} The object to be modified (optional).'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} The input object, modified (or a new one if none was provided).'],[-1,' *\/'],[-1,' readNode: function(node, obj) {'],[0,' if(!obj) {'],[0,' obj = {};'],[-1,' }'],[0,' var group = this.readers[node.namespaceURI ? this.namespaceAlias[node.namespaceURI]: this.defaultPrefix];'],[0,' if(group) {'],[0,' var local = node.localName || node.nodeName.split(\":\").pop();'],[0,' var reader = group[local] || group[\"*\"];'],[0,' if(reader) {'],[0,' reader.apply(this, [node, obj]);'],[-1,' }'],[-1,' }'],[0,' return obj;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: readChildNodes'],[-1,' * Shorthand for applying the named readers to all children of a node.'],[-1,' * For each child of type 1 (element), <readSelf> is called.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node to be read (required).'],[-1,' * obj - {Object} The object to be modified (optional).'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} The input object, modified.'],[-1,' *\/'],[-1,' readChildNodes: function(node, obj) {'],[0,' if(!obj) {'],[0,' obj = {};'],[-1,' }'],[0,' var children = node.childNodes;'],[0,' var child;'],[0,' for(var i=0, len=children.length; i<len; ++i) {'],[0,' child = children[i];'],[0,' if(child.nodeType == 1) {'],[0,' this.readNode(child, obj);'],[-1,' }'],[-1,' }'],[0,' return obj;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: writeNode'],[-1,' * Shorthand for applying one of the named writers and appending the'],[-1,' * results to a node. If a qualified name is not provided for the'],[-1,' * second argument (and a local name is used instead), the namespace'],[-1,' * of the parent node will be assumed.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String} The name of a node to generate. If a qualified name'],[-1,' * (e.g. \"pre:Name\") is used, the namespace prefix is assumed to be'],[-1,' * in the <writers> group. If a local name is used (e.g. \"Name\") then'],[-1,' * the namespace of the parent is assumed. If a local name is used'],[-1,' * and no parent is supplied, then the default namespace is assumed.'],[-1,' * obj - {Object} Structure containing data for the writer.'],[-1,' * parent - {DOMElement} Result will be appended to this node. If no parent'],[-1,' * is supplied, the node will not be appended to anything.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The child node.'],[-1,' *\/'],[-1,' writeNode: function(name, obj, parent) {'],[0,' var prefix, local;'],[0,' var split = name.indexOf(\":\");'],[0,' if(split > 0) {'],[0,' prefix = name.substring(0, split);'],[0,' local = name.substring(split + 1);'],[-1,' } else {'],[0,' if(parent) {'],[0,' prefix = this.namespaceAlias[parent.namespaceURI];'],[-1,' } else {'],[0,' prefix = this.defaultPrefix;'],[-1,' }'],[0,' local = name;'],[-1,' }'],[0,' var child = this.writers[prefix][local].apply(this, [obj]);'],[0,' if(parent) {'],[0,' parent.appendChild(child);'],[-1,' }'],[0,' return child;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getChildEl'],[-1,' * Get the first child element. Optionally only return the first child'],[-1,' * if it matches the given name and namespace URI.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The parent node.'],[-1,' * name - {String} Optional node name (local) to search for.'],[-1,' * uri - {String} Optional namespace URI to search for.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The first child. Returns null if no element is found, if'],[-1,' * something significant besides an element is found, or if the element'],[-1,' * found does not match the optional name and uri.'],[-1,' *\/'],[-1,' getChildEl: function(node, name, uri) {'],[0,' return node && this.getThisOrNextEl(node.firstChild, name, uri);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getNextEl'],[-1,' * Get the next sibling element. Optionally get the first sibling only'],[-1,' * if it matches the given local name and namespace URI.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node.'],[-1,' * name - {String} Optional local name of the sibling to search for.'],[-1,' * uri - {String} Optional namespace URI of the sibling to search for.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The next sibling element. Returns null if no element is'],[-1,' * found, something significant besides an element is found, or the'],[-1,' * found element does not match the optional name and uri.'],[-1,' *\/'],[-1,' getNextEl: function(node, name, uri) {'],[0,' return node && this.getThisOrNextEl(node.nextSibling, name, uri);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getThisOrNextEl'],[-1,' * Return this node or the next element node. Optionally get the first'],[-1,' * sibling with the given local name or namespace URI.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node.'],[-1,' * name - {String} Optional local name of the sibling to search for.'],[-1,' * uri - {String} Optional namespace URI of the sibling to search for.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The next sibling element. Returns null if no element is'],[-1,' * found, something significant besides an element is found, or the'],[-1,' * found element does not match the query.'],[-1,' *\/'],[-1,' getThisOrNextEl: function(node, name, uri) {'],[0,' outer: for(var sibling=node; sibling; sibling=sibling.nextSibling) {'],[0,' switch(sibling.nodeType) {'],[-1,' case 1: \/\/ Element'],[0,' if((!name || name === (sibling.localName || sibling.nodeName.split(\":\").pop())) &&'],[-1,' (!uri || uri === sibling.namespaceURI)) {'],[-1,' \/\/ matches'],[0,' break outer;'],[-1,' }'],[0,' sibling = null;'],[0,' break outer;'],[-1,' case 3: \/\/ Text'],[0,' if(\/^\\s*$\/.test(sibling.nodeValue)) {'],[0,' break;'],[-1,' }'],[-1,' case 4: \/\/ CDATA'],[-1,' case 6: \/\/ ENTITY_NODE'],[-1,' case 12: \/\/ NOTATION_NODE'],[-1,' case 10: \/\/ DOCUMENT_TYPE_NODE'],[-1,' case 11: \/\/ DOCUMENT_FRAGMENT_NODE'],[0,' sibling = null;'],[0,' break outer;'],[-1,' } \/\/ ignore comments and processing instructions'],[-1,' }'],[0,' return sibling || null;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: lookupNamespaceURI'],[-1,' * Takes a prefix and returns the namespace URI associated with it on the given'],[-1,' * node if found (and null if not). Supplying null for the prefix will'],[-1,' * return the default namespace.'],[-1,' *'],[-1,' * For browsers that support it, this calls the native lookupNamesapceURI'],[-1,' * function. In other browsers, this is an implementation of'],[-1,' * http:\/\/www.w3.org\/TR\/DOM-Level-3-Core\/core.html#Node3-lookupNamespaceURI.'],[-1,' *'],[-1,' * For browsers that don\'t support the attribute.ownerElement property, this'],[-1,' * method cannot be called on attribute nodes.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node from which to start looking.'],[-1,' * prefix - {String} The prefix to lookup or null to lookup the default namespace.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The namespace URI for the given prefix. Returns null if the prefix'],[-1,' * cannot be found or the node is the wrong type.'],[-1,' *\/'],[-1,' lookupNamespaceURI: function(node, prefix) {'],[0,' var uri = null;'],[0,' if(node) {'],[0,' if(node.lookupNamespaceURI) {'],[0,' uri = node.lookupNamespaceURI(prefix);'],[-1,' } else {'],[0,' outer: switch(node.nodeType) {'],[-1,' case 1: \/\/ ELEMENT_NODE'],[0,' if(node.namespaceURI !== null && node.prefix === prefix) {'],[0,' uri = node.namespaceURI;'],[0,' break outer;'],[-1,' }'],[0,' var len = node.attributes.length;'],[0,' if(len) {'],[0,' var attr;'],[0,' for(var i=0; i<len; ++i) {'],[0,' attr = node.attributes[i];'],[0,' if(attr.prefix === \"xmlns\" && attr.name === \"xmlns:\" + prefix) {'],[0,' uri = attr.value || null;'],[0,' break outer;'],[0,' } else if(attr.name === \"xmlns\" && prefix === null) {'],[0,' uri = attr.value || null;'],[0,' break outer;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' uri = this.lookupNamespaceURI(node.parentNode, prefix);'],[0,' break outer;'],[-1,' case 2: \/\/ ATTRIBUTE_NODE'],[0,' uri = this.lookupNamespaceURI(node.ownerElement, prefix);'],[0,' break outer;'],[-1,' case 9: \/\/ DOCUMENT_NODE'],[0,' uri = this.lookupNamespaceURI(node.documentElement, prefix);'],[0,' break outer;'],[-1,' case 6: \/\/ ENTITY_NODE'],[-1,' case 12: \/\/ NOTATION_NODE'],[-1,' case 10: \/\/ DOCUMENT_TYPE_NODE'],[-1,' case 11: \/\/ DOCUMENT_FRAGMENT_NODE'],[0,' break outer;'],[-1,' default: '],[-1,' \/\/ TEXT_NODE (3), CDATA_SECTION_NODE (4), ENTITY_REFERENCE_NODE (5),'],[-1,' \/\/ PROCESSING_INSTRUCTION_NODE (7), COMMENT_NODE (8)'],[0,' uri = this.lookupNamespaceURI(node.parentNode, prefix);'],[0,' break outer;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return uri;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getXMLDoc'],[-1,' * Get an XML document for nodes that are not supported in HTML (e.g.'],[-1,' * createCDATASection). On IE, this will either return an existing or'],[-1,' * create a new <xmldom> on the instance. On other browsers, this will'],[-1,' * either return an existing or create a new shared document (see'],[-1,' * <OpenLayers.Format.XML.document>).'],[-1,' *'],[-1,' * Returns:'],[-1,' * {XMLDocument}'],[-1,' *\/'],[-1,' getXMLDoc: function() {'],[0,' if (!OpenLayers.Format.XML.document && !this.xmldom) {'],[0,' if (document.implementation && document.implementation.createDocument) {'],[0,' OpenLayers.Format.XML.document ='],[-1,' document.implementation.createDocument(\"\", \"\", null);'],[0,' } else if (!this.xmldom && window.ActiveXObject) {'],[0,' this.xmldom = new ActiveXObject(\"Microsoft.XMLDOM\");'],[-1,' }'],[-1,' }'],[0,' return OpenLayers.Format.XML.document || this.xmldom;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Format.XML\" '],[-1,''],[-1,'}); '],[-1,''],[1,'OpenLayers.Format.XML.CONTENT_TYPE = {EMPTY: 0, SIMPLE: 1, COMPLEX: 2, MIXED: 3};'],[-1,''],[-1,'\/**'],[-1,' * APIFunction: OpenLayers.Format.XML.lookupNamespaceURI'],[-1,' * Takes a prefix and returns the namespace URI associated with it on the given'],[-1,' * node if found (and null if not). Supplying null for the prefix will'],[-1,' * return the default namespace.'],[-1,' *'],[-1,' * For browsers that support it, this calls the native lookupNamesapceURI'],[-1,' * function. In other browsers, this is an implementation of'],[-1,' * http:\/\/www.w3.org\/TR\/DOM-Level-3-Core\/core.html#Node3-lookupNamespaceURI.'],[-1,' *'],[-1,' * For browsers that don\'t support the attribute.ownerElement property, this'],[-1,' * method cannot be called on attribute nodes.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement} The node from which to start looking.'],[-1,' * prefix - {String} The prefix to lookup or null to lookup the default namespace.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The namespace URI for the given prefix. Returns null if the prefix'],[-1,' * cannot be found or the node is the wrong type.'],[-1,' *\/'],[1,'OpenLayers.Format.XML.lookupNamespaceURI = OpenLayers.Function.bind('],[-1,' OpenLayers.Format.XML.prototype.lookupNamespaceURI,'],[-1,' OpenLayers.Format.XML.prototype'],[-1,');'],[-1,''],[-1,'\/**'],[-1,' * Property: OpenLayers.Format.XML.document'],[-1,' * {XMLDocument} XML document to reuse for creating non-HTML compliant nodes,'],[-1,' * like document.createCDATASection.'],[-1,' *\/'],[1,'OpenLayers.Format.XML.document = null;'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Kinetic.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Animation.js'],[-1,' *\/'],[-1,''],[1,'OpenLayers.Kinetic = OpenLayers.Class({'],[-1,''],[-1,' \/**'],[-1,' * Property: threshold'],[-1,' * In most cases changing the threshold isn\'t needed.'],[-1,' * In px\/ms, default to 0.'],[-1,' *\/'],[-1,' threshold: 0,'],[-1,''],[-1,' \/**'],[-1,' * Property: deceleration'],[-1,' * {Float} the deseleration in px\/ms\u00B2, default to 0.0035.'],[-1,' *\/'],[-1,' deceleration: 0.0035,'],[-1,''],[-1,' \/**'],[-1,' * Property: nbPoints'],[-1,' * {Integer} the number of points we use to calculate the kinetic'],[-1,' * initial values.'],[-1,' *\/'],[-1,' nbPoints: 100,'],[-1,''],[-1,' \/**'],[-1,' * Property: delay'],[-1,' * {Float} time to consider to calculate the kinetic initial values.'],[-1,' * In ms, default to 200.'],[-1,' *\/'],[-1,' delay: 200,'],[-1,''],[-1,' \/**'],[-1,' * Property: points'],[-1,' * List of points use to calculate the kinetic initial values.'],[-1,' *\/'],[-1,' points: undefined,'],[-1,''],[-1,' \/**'],[-1,' * Property: timerId'],[-1,' * ID of the timer.'],[-1,' *\/'],[-1,' timerId: undefined,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Kinetic'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object}'],[-1,' *\/'],[-1,' initialize: function(options) {'],[0,' OpenLayers.Util.extend(this, options);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: begin'],[-1,' * Begins the dragging.'],[-1,' *\/'],[-1,' begin: function() {'],[0,' OpenLayers.Animation.stop(this.timerId);'],[0,' this.timerId = undefined;'],[0,' this.points = [];'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: update'],[-1,' * Updates during the dragging.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * xy - {<OpenLayers.Pixel>} The new position.'],[-1,' *\/'],[-1,' update: function(xy) {'],[0,' this.points.unshift({xy: xy, tick: new Date().getTime()});'],[0,' if (this.points.length > this.nbPoints) {'],[0,' this.points.pop();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: end'],[-1,' * Ends the dragging, start the kinetic.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * xy - {<OpenLayers.Pixel>} The last position.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An object with two properties: \"speed\", and \"theta\". The'],[-1,' * \"speed\" and \"theta\" values are to be passed to the move '],[-1,' * function when starting the animation.'],[-1,' *\/'],[-1,' end: function(xy) {'],[0,' var last, now = new Date().getTime();'],[0,' for (var i = 0, l = this.points.length, point; i < l; i++) {'],[0,' point = this.points[i];'],[0,' if (now - point.tick > this.delay) {'],[0,' break;'],[-1,' }'],[0,' last = point;'],[-1,' }'],[0,' if (!last) {'],[0,' return;'],[-1,' }'],[0,' var time = new Date().getTime() - last.tick;'],[0,' var dist = Math.sqrt(Math.pow(xy.x - last.xy.x, 2) +'],[-1,' Math.pow(xy.y - last.xy.y, 2));'],[0,' var speed = dist \/ time;'],[0,' if (speed == 0 || speed < this.threshold) {'],[0,' return;'],[-1,' }'],[0,' var theta = Math.asin((xy.y - last.xy.y) \/ dist);'],[0,' if (last.xy.x <= xy.x) {'],[0,' theta = Math.PI - theta;'],[-1,' }'],[0,' return {speed: speed, theta: theta};'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: move'],[-1,' * Launch the kinetic move pan.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * info - {Object} An object with two properties, \"speed\", and \"theta\".'],[-1,' * These values are those returned from the \"end\" call.'],[-1,' * callback - {Function} Function called on every step of the animation,'],[-1,' * receives x, y (values to pan), end (is the last point).'],[-1,' *\/'],[-1,' move: function(info, callback) {'],[0,' var v0 = info.speed;'],[0,' var fx = Math.cos(info.theta);'],[0,' var fy = -Math.sin(info.theta);'],[-1,''],[0,' var initialTime = new Date().getTime();'],[-1,''],[0,' var lastX = 0;'],[0,' var lastY = 0;'],[-1,''],[0,' var timerCallback = function() {'],[0,' if (this.timerId == null) {'],[0,' return;'],[-1,' }'],[-1,''],[0,' var t = new Date().getTime() - initialTime;'],[-1,''],[0,' var p = (-this.deceleration * Math.pow(t, 2)) \/ 2.0 + v0 * t;'],[0,' var x = p * fx;'],[0,' var y = p * fy;'],[-1,''],[0,' var args = {};'],[0,' args.end = false;'],[0,' var v = -this.deceleration * t + v0;'],[-1,''],[0,' if (v <= 0) {'],[0,' OpenLayers.Animation.stop(this.timerId);'],[0,' this.timerId = null;'],[0,' args.end = true;'],[-1,' }'],[-1,''],[0,' args.x = x - lastX;'],[0,' args.y = y - lastY;'],[0,' lastX = x;'],[0,' lastY = y;'],[0,' callback(args.x, args.y, args.end);'],[-1,' };'],[-1,''],[0,' this.timerId = OpenLayers.Animation.start('],[-1,' OpenLayers.Function.bind(timerCallback, this)'],[-1,' );'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Kinetic\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control'],[-1,' * Controls affect the display or behavior of the map. They allow everything'],[-1,' * from panning and zooming to displaying a scale indicator. Controls by '],[-1,' * default are added to the map they are contained within however it is'],[-1,' * possible to add a control to an external div by passing the div in the'],[-1,' * options parameter.'],[-1,' * '],[-1,' * Example:'],[-1,' * The following example shows how to add many of the common controls'],[-1,' * to a map.'],[-1,' * '],[-1,' * > var map = new OpenLayers.Map(\'map\', { controls: [] });'],[-1,' * >'],[-1,' * > map.addControl(new OpenLayers.Control.PanZoomBar());'],[-1,' * > map.addControl(new OpenLayers.Control.LayerSwitcher({\'ascending\':false}));'],[-1,' * > map.addControl(new OpenLayers.Control.Permalink());'],[-1,' * > map.addControl(new OpenLayers.Control.Permalink(\'permalink\'));'],[-1,' * > map.addControl(new OpenLayers.Control.MousePosition());'],[-1,' * > map.addControl(new OpenLayers.Control.OverviewMap());'],[-1,' * > map.addControl(new OpenLayers.Control.KeyboardDefaults());'],[-1,' *'],[-1,' * The next code fragment is a quick example of how to intercept '],[-1,' * shift-mouse click to display the extent of the bounding box'],[-1,' * dragged out by the user. Usually controls are not created'],[-1,' * in exactly this manner. See the source for a more complete '],[-1,' * example:'],[-1,' *'],[-1,' * > var control = new OpenLayers.Control();'],[-1,' * > OpenLayers.Util.extend(control, {'],[-1,' * > draw: function () {'],[-1,' * > \/\/ this Handler.Box will intercept the shift-mousedown'],[-1,' * > \/\/ before Control.MouseDefault gets to see it'],[-1,' * > this.box = new OpenLayers.Handler.Box( control, '],[-1,' * > {\"done\": this.notice},'],[-1,' * > {keyMask: OpenLayers.Handler.MOD_SHIFT});'],[-1,' * > this.box.activate();'],[-1,' * > },'],[-1,' * >'],[-1,' * > notice: function (bounds) {'],[-1,' * > OpenLayers.Console.userError(bounds);'],[-1,' * > }'],[-1,' * > }); '],[-1,' * > map.addControl(control);'],[-1,' * '],[-1,' *\/'],[1,'OpenLayers.Control = OpenLayers.Class({'],[-1,''],[-1,' \/** '],[-1,' * Property: id '],[-1,' * {String} '],[-1,' *\/'],[-1,' id: null,'],[-1,' '],[-1,' \/** '],[-1,' * Property: map '],[-1,' * {<OpenLayers.Map>} this gets set in the addControl() function in'],[-1,' * OpenLayers.Map '],[-1,' *\/'],[-1,' map: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: div '],[-1,' * {DOMElement} The element that contains the control, if not present the '],[-1,' * control is placed inside the map.'],[-1,' *\/'],[-1,' div: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: type '],[-1,' * {Number} Controls can have a \'type\'. The type determines the type of'],[-1,' * interactions which are possible with them when they are placed in an'],[-1,' * <OpenLayers.Control.Panel>. '],[-1,' *\/'],[-1,' type: null, '],[-1,''],[-1,' \/** '],[-1,' * Property: allowSelection'],[-1,' * {Boolean} By default, controls do not allow selection, because'],[-1,' * it may interfere with map dragging. If this is true, OpenLayers'],[-1,' * will not prevent selection of the control.'],[-1,' * Default is false.'],[-1,' *\/'],[-1,' allowSelection: false, '],[-1,''],[-1,' \/** '],[-1,' * Property: displayClass '],[-1,' * {string} This property is used for CSS related to the drawing of the'],[-1,' * Control. '],[-1,' *\/'],[-1,' displayClass: \"\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: title '],[-1,' * {string} This property is used for showing a tooltip over the '],[-1,' * Control. '],[-1,' *\/ '],[-1,' title: \"\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: autoActivate'],[-1,' * {Boolean} Activate the control when it is added to a map. Default is'],[-1,' * false.'],[-1,' *\/'],[-1,' autoActivate: false,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: active '],[-1,' * {Boolean} The control is active (read-only). Use <activate> and '],[-1,' * <deactivate> to change control state.'],[-1,' *\/'],[-1,' active: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: handlerOptions'],[-1,' * {Object} Used to set non-default properties on the control\'s handler'],[-1,' *\/'],[-1,' handlerOptions: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: handler '],[-1,' * {<OpenLayers.Handler>} null'],[-1,' *\/'],[-1,' handler: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: eventListeners'],[-1,' * {Object} If set as an option at construction, the eventListeners'],[-1,' * object will be registered with <OpenLayers.Events.on>. Object'],[-1,' * structure must be a listeners object as shown in the example for'],[-1,' * the events.on method.'],[-1,' *\/'],[-1,' eventListeners: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>} Events instance for listeners and triggering'],[-1,' * control specific events.'],[-1,' *'],[-1,' * Register a listener for a particular event with the following syntax:'],[-1,' * (code)'],[-1,' * control.events.register(type, obj, listener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Listeners will be called with a reference to an event object. The'],[-1,' * properties of this event depends on exactly what happened.'],[-1,' *'],[-1,' * All event objects have at least the following properties:'],[-1,' * object - {Object} A reference to control.events.object (a reference'],[-1,' * to the control).'],[-1,' * element - {DOMElement} A reference to control.events.element (which'],[-1,' * will be null unless documented otherwise).'],[-1,' *'],[-1,' * Supported map event types:'],[-1,' * activate - Triggered when activated.'],[-1,' * deactivate - Triggered when deactivated.'],[-1,' *\/'],[-1,' events: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Control'],[-1,' * Create an OpenLayers Control. The options passed as a parameter'],[-1,' * directly extend the control. For example passing the following:'],[-1,' * '],[-1,' * > var control = new OpenLayers.Control({div: myDiv});'],[-1,' *'],[-1,' * Overrides the default div attribute value of null.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * options - {Object} '],[-1,' *\/'],[-1,' initialize: function (options) {'],[-1,' \/\/ We do this before the extend so that instances can override'],[-1,' \/\/ className in options.'],[0,' this.displayClass = '],[-1,' this.CLASS_NAME.replace(\"OpenLayers.\", \"ol\").replace(\/\\.\/g, \"\");'],[-1,' '],[0,' OpenLayers.Util.extend(this, options);'],[-1,' '],[0,' this.events = new OpenLayers.Events(this);'],[0,' if(this.eventListeners instanceof Object) {'],[0,' this.events.on(this.eventListeners);'],[-1,' }'],[0,' if (this.id == null) {'],[0,' this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + \"_\");'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' * The destroy method is used to perform any clean up before the control'],[-1,' * is dereferenced. Typically this is where event listeners are removed'],[-1,' * to prevent memory leaks.'],[-1,' *\/'],[-1,' destroy: function () {'],[0,' if(this.events) {'],[0,' if(this.eventListeners) {'],[0,' this.events.un(this.eventListeners);'],[-1,' }'],[0,' this.events.destroy();'],[0,' this.events = null;'],[-1,' }'],[0,' this.eventListeners = null;'],[-1,''],[-1,' \/\/ eliminate circular references'],[0,' if (this.handler) {'],[0,' this.handler.destroy();'],[0,' this.handler = null;'],[-1,' }'],[0,' if(this.handlers) {'],[0,' for(var key in this.handlers) {'],[0,' if(this.handlers.hasOwnProperty(key) &&'],[-1,' typeof this.handlers[key].destroy == \"function\") {'],[0,' this.handlers[key].destroy();'],[-1,' }'],[-1,' }'],[0,' this.handlers = null;'],[-1,' }'],[0,' if (this.map) {'],[0,' this.map.removeControl(this);'],[0,' this.map = null;'],[-1,' }'],[0,' this.div = null;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: setMap'],[-1,' * Set the map property for the control. This is done through an accessor'],[-1,' * so that subclasses can override this and take special action once '],[-1,' * they have their map variable set. '],[-1,' *'],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>} '],[-1,' *\/'],[-1,' setMap: function(map) {'],[0,' this.map = map;'],[0,' if (this.handler) {'],[0,' this.handler.setMap(map);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: draw'],[-1,' * The draw method is called when the control is ready to be displayed'],[-1,' * on the page. If a div has not been created one is created. Controls'],[-1,' * with a visual component will almost always want to override this method '],[-1,' * to customize the look of control. '],[-1,' *'],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>} The top-left pixel position of the control'],[-1,' * or null.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A reference to the DIV DOMElement containing the control'],[-1,' *\/'],[-1,' draw: function (px) {'],[0,' if (this.div == null) {'],[0,' this.div = OpenLayers.Util.createDiv(this.id);'],[0,' this.div.className = this.displayClass;'],[0,' if (!this.allowSelection) {'],[0,' this.div.className += \" olControlNoSelect\";'],[0,' this.div.setAttribute(\"unselectable\", \"on\", 0);'],[0,' this.div.onselectstart = OpenLayers.Function.False; '],[-1,' } '],[0,' if (this.title != \"\") {'],[0,' this.div.title = this.title;'],[-1,' }'],[-1,' }'],[0,' if (px != null) {'],[0,' this.position = px.clone();'],[-1,' }'],[0,' this.moveTo(this.position);'],[0,' return this.div;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: moveTo'],[-1,' * Sets the left and top style attributes to the passed in pixel '],[-1,' * coordinates.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>}'],[-1,' *\/'],[-1,' moveTo: function (px) {'],[0,' if ((px != null) && (this.div != null)) {'],[0,' this.div.style.left = px.x + \"px\";'],[0,' this.div.style.top = px.y + \"px\";'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: activate'],[-1,' * Explicitly activates a control and its associated'],[-1,' * handler if one has been set. Controls can be'],[-1,' * deactivated by calling the deactivate() method.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} True if the control was successfully activated or'],[-1,' * false if the control was already active.'],[-1,' *\/'],[-1,' activate: function () {'],[0,' if (this.active) {'],[0,' return false;'],[-1,' }'],[0,' if (this.handler) {'],[0,' this.handler.activate();'],[-1,' }'],[0,' this.active = true;'],[0,' if(this.map) {'],[0,' OpenLayers.Element.addClass('],[-1,' this.map.viewPortDiv,'],[-1,' this.displayClass.replace(\/ \/g, \"\") + \"Active\"'],[-1,' );'],[-1,' }'],[0,' this.events.triggerEvent(\"activate\");'],[0,' return true;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: deactivate'],[-1,' * Deactivates a control and its associated handler if any. The exact'],[-1,' * effect of this depends on the control itself.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} True if the control was effectively deactivated or false'],[-1,' * if the control was already inactive.'],[-1,' *\/'],[-1,' deactivate: function () {'],[0,' if (this.active) {'],[0,' if (this.handler) {'],[0,' this.handler.deactivate();'],[-1,' }'],[0,' this.active = false;'],[0,' if(this.map) {'],[0,' OpenLayers.Element.removeClass('],[-1,' this.map.viewPortDiv,'],[-1,' this.displayClass.replace(\/ \/g, \"\") + \"Active\"'],[-1,' );'],[-1,' }'],[0,' this.events.triggerEvent(\"deactivate\");'],[0,' return true;'],[-1,' }'],[0,' return false;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Control\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Control.TYPE_BUTTON'],[-1,' *\/'],[1,'OpenLayers.Control.TYPE_BUTTON = 1;'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Control.TYPE_TOGGLE'],[-1,' *\/'],[1,'OpenLayers.Control.TYPE_TOGGLE = 2;'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Control.TYPE_TOOL'],[-1,' *\/'],[1,'OpenLayers.Control.TYPE_TOOL = 3;'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Handler\/Hover.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Handler.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Handler.Hover'],[-1,' * The hover handler is to be used to emulate mouseovers on objects'],[-1,' * on the map that aren\'t DOM elements. For example one can use'],[-1,' * this handler to send WMS\/GetFeatureInfo requests as the user'],[-1,' * moves the mouve over the map.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Handler> '],[-1,' *\/'],[1,'OpenLayers.Handler.Hover = OpenLayers.Class(OpenLayers.Handler, {'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: delay'],[-1,' * {Integer} - Number of milliseconds between mousemoves before'],[-1,' * the event is considered a hover. Default is 500.'],[-1,' *\/'],[-1,' delay: 500,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: pixelTolerance'],[-1,' * {Integer} - Maximum number of pixels between mousemoves for'],[-1,' * an event to be considered a hover. Default is null.'],[-1,' *\/'],[-1,' pixelTolerance: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: stopMove'],[-1,' * {Boolean} - Stop other listeners from being notified on mousemoves.'],[-1,' * Default is false.'],[-1,' *\/'],[-1,' stopMove: false,'],[-1,''],[-1,' \/**'],[-1,' * Property: px'],[-1,' * {<OpenLayers.Pixel>} - The location of the last mousemove, expressed'],[-1,' * in pixels.'],[-1,' *\/'],[-1,' px: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: timerId'],[-1,' * {Number} - The id of the timer.'],[-1,' *\/'],[-1,' timerId: null,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Handler.Hover'],[-1,' * Construct a hover handler.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>} The control that initialized this'],[-1,' * handler. The control is assumed to have a valid map property; that'],[-1,' * map is used in the handler\'s own setMap method.'],[-1,' * callbacks - {Object} An object with keys corresponding to callbacks'],[-1,' * that will be called by the handler. The callbacks should'],[-1,' * expect to receive a single argument, the event. Callbacks for'],[-1,' * \'move\', the mouse is moving, and \'pause\', the mouse is pausing,'],[-1,' * are supported.'],[-1,' * options - {Object} An optional object whose properties will be set on'],[-1,' * the handler.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Method: mousemove'],[-1,' * Called when the mouse moves on the map.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {<OpenLayers.Event>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' mousemove: function(evt) {'],[0,' if(this.passesTolerance(evt.xy)) {'],[0,' this.clearTimer();'],[0,' this.callback(\'move\', [evt]);'],[0,' this.px = evt.xy;'],[-1,' \/\/ clone the evt so original properties can be accessed even'],[-1,' \/\/ if the browser deletes them during the delay'],[0,' evt = OpenLayers.Util.extend({}, evt);'],[0,' this.timerId = window.setTimeout('],[-1,' OpenLayers.Function.bind(this.delayedCall, this, evt),'],[-1,' this.delay'],[-1,' );'],[-1,' }'],[0,' return !this.stopMove;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: mouseout'],[-1,' * Called when the mouse goes out of the map.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {<OpenLayers.Event>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Continue propagating this event.'],[-1,' *\/'],[-1,' mouseout: function(evt) {'],[0,' if (OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {'],[0,' this.clearTimer();'],[0,' this.callback(\'move\', [evt]);'],[-1,' }'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: passesTolerance'],[-1,' * Determine whether the mouse move is within the optional pixel tolerance.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The mouse move is within the pixel tolerance.'],[-1,' *\/'],[-1,' passesTolerance: function(px) {'],[0,' var passes = true;'],[0,' if(this.pixelTolerance && this.px) {'],[0,' var dpx = Math.sqrt('],[-1,' Math.pow(this.px.x - px.x, 2) +'],[-1,' Math.pow(this.px.y - px.y, 2)'],[-1,' );'],[0,' if(dpx < this.pixelTolerance) {'],[0,' passes = false;'],[-1,' }'],[-1,' }'],[0,' return passes;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: clearTimer'],[-1,' * Clear the timer and set <timerId> to null.'],[-1,' *\/'],[-1,' clearTimer: function() {'],[0,' if(this.timerId != null) {'],[0,' window.clearTimeout(this.timerId);'],[0,' this.timerId = null;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: delayedCall'],[-1,' * Triggers pause callback.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {<OpenLayers.Event>}'],[-1,' *\/'],[-1,' delayedCall: function(evt) {'],[0,' this.callback(\'pause\', [evt]);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: deactivate'],[-1,' * Deactivate the handler.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The handler was successfully deactivated.'],[-1,' *\/'],[-1,' deactivate: function() {'],[0,' var deactivated = false;'],[0,' if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {'],[0,' this.clearTimer();'],[0,' deactivated = true;'],[-1,' }'],[0,' return deactivated;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Handler.Hover\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Events\/buttonclick.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Events.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Events.buttonclick'],[-1,' * Extension event type for handling buttons on top of a dom element. This'],[-1,' * event type fires \"buttonclick\" on its <target> when a button was'],[-1,' * clicked. Buttons are detected by the \"olButton\" class.'],[-1,' *'],[-1,' * This event type makes sure that button clicks do not interfere with other'],[-1,' * events that are registered on the same <element>.'],[-1,' *'],[-1,' * Event types provided by this extension:'],[-1,' * - *buttonclick* Triggered when a button is clicked. Listeners receive an'],[-1,' * object with a *buttonElement* property referencing the dom element of'],[-1,' * the clicked button, and an *buttonXY* property with the click position'],[-1,' * relative to the button.'],[-1,' *\/'],[1,'OpenLayers.Events.buttonclick = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * Property: target'],[-1,' * {<OpenLayers.Events>} The events instance that the buttonclick event will'],[-1,' * be triggered on.'],[-1,' *\/'],[-1,' target: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: events'],[-1,' * {Array} Events to observe and conditionally stop from propagating when'],[-1,' * an element with the olButton class (or its olAlphaImg child) is'],[-1,' * clicked.'],[-1,' *\/'],[-1,' events: ['],[-1,' \'mousedown\', \'mouseup\', \'click\', \'dblclick\','],[-1,' \'touchstart\', \'touchmove\', \'touchend\', \'keydown\''],[-1,' ],'],[-1,' '],[-1,' \/**'],[-1,' * Property: startRegEx'],[-1,' * {RegExp} Regular expression to test Event.type for events that start'],[-1,' * a buttonclick sequence.'],[-1,' *\/'],[-1,' startRegEx: \/^mousedown|touchstart$\/,'],[-1,''],[-1,' \/**'],[-1,' * Property: cancelRegEx'],[-1,' * {RegExp} Regular expression to test Event.type for events that cancel'],[-1,' * a buttonclick sequence.'],[-1,' *\/'],[-1,' cancelRegEx: \/^touchmove$\/,'],[-1,''],[-1,' \/**'],[-1,' * Property: completeRegEx'],[-1,' * {RegExp} Regular expression to test Event.type for events that complete'],[-1,' * a buttonclick sequence.'],[-1,' *\/'],[-1,' completeRegEx: \/^mouseup|touchend$\/,'],[-1,''],[-1,' \/**'],[-1,' * Property: isDeviceTouchCapable'],[-1,' * {Boolean} Tells whether the browser detects touch events.'],[-1,' *\/'],[-1,' isDeviceTouchCapable: \'ontouchstart\' in window ||'],[-1,' window.DocumentTouch && document instanceof window.DocumentTouch,'],[-1,' '],[-1,' \/**'],[-1,' * Property: startEvt'],[-1,' * {Event} The event that started the click sequence'],[-1,' *\/'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Events.buttonclick'],[-1,' * Construct a buttonclick event type. Applications are not supposed to'],[-1,' * create instances of this class - they are created on demand by'],[-1,' * <OpenLayers.Events> instances.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * target - {<OpenLayers.Events>} The events instance that the buttonclick'],[-1,' * event will be triggered on.'],[-1,' *\/'],[-1,' initialize: function(target) {'],[0,' this.target = target;'],[0,' for (var i=this.events.length-1; i>=0; --i) {'],[0,' this.target.register(this.events[i], this, this.buttonClick, {'],[-1,' extension: true'],[-1,' });'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' for (var i=this.events.length-1; i>=0; --i) {'],[0,' this.target.unregister(this.events[i], this, this.buttonClick);'],[-1,' }'],[0,' delete this.target;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getPressedButton'],[-1,' * Get the pressed button, if any. Returns undefined if no button'],[-1,' * was pressed.'],[-1,' *'],[-1,' * Arguments:'],[-1,' * element - {DOMElement} The event target.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The button element, or undefined.'],[-1,' *\/'],[-1,' getPressedButton: function(element) {'],[0,' var depth = 3, \/\/ limit the search depth'],[-1,' button;'],[0,' do {'],[0,' if(OpenLayers.Element.hasClass(element, \"olButton\")) {'],[-1,' \/\/ hit!'],[0,' button = element;'],[0,' break;'],[-1,' }'],[0,' element = element.parentNode;'],[-1,' } while(--depth > 0 && element);'],[0,' return button;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: ignore'],[-1,' * Check for event target elements that should be ignored by OpenLayers.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * element - {DOMElement} The event target.'],[-1,' *\/'],[-1,' ignore: function(element) {'],[0,' var depth = 3,'],[-1,' ignore = false;'],[0,' do {'],[0,' if (element.nodeName.toLowerCase() === \'a\') {'],[0,' ignore = true;'],[0,' break;'],[-1,' }'],[0,' element = element.parentNode;'],[-1,' } while (--depth > 0 && element);'],[0,' return ignore;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: buttonClick'],[-1,' * Check if a button was clicked, and fire the buttonclick event'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *\/'],[-1,' buttonClick: function(evt) {'],[0,' var propagate = true,'],[-1,' element = OpenLayers.Event.element(evt);'],[-1,''],[0,' if (element &&'],[-1,' (OpenLayers.Event.isLeftClick(evt) &&'],[-1,' !this.isDeviceTouchCapable ||'],[-1,' !~evt.type.indexOf(\"mouse\"))) {'],[-1,' \/\/ was a button pressed?'],[0,' var button = this.getPressedButton(element);'],[0,' if (button) {'],[0,' if (evt.type === \"keydown\") {'],[0,' switch (evt.keyCode) {'],[-1,' case OpenLayers.Event.KEY_RETURN:'],[-1,' case OpenLayers.Event.KEY_SPACE:'],[0,' this.target.triggerEvent(\"buttonclick\", {'],[-1,' buttonElement: button'],[-1,' });'],[0,' OpenLayers.Event.stop(evt);'],[0,' propagate = false;'],[0,' break;'],[-1,' }'],[0,' } else if (this.startEvt) {'],[0,' if (this.completeRegEx.test(evt.type)) {'],[0,' var pos = OpenLayers.Util.pagePosition(button);'],[0,' var viewportElement = OpenLayers.Util.getViewportElement();'],[0,' var scrollTop = window.pageYOffset || viewportElement.scrollTop;'],[0,' var scrollLeft = window.pageXOffset || viewportElement.scrollLeft;'],[0,' pos[0] = pos[0] - scrollLeft;'],[0,' pos[1] = pos[1] - scrollTop;'],[-1,' '],[0,' this.target.triggerEvent(\"buttonclick\", {'],[-1,' buttonElement: button,'],[-1,' buttonXY: {'],[-1,' x: this.startEvt.clientX - pos[0],'],[-1,' y: this.startEvt.clientY - pos[1]'],[-1,' }'],[-1,' });'],[-1,' }'],[0,' if (this.cancelRegEx.test(evt.type)) {'],[0,' delete this.startEvt;'],[-1,' }'],[0,' OpenLayers.Event.stop(evt);'],[0,' propagate = false;'],[-1,' }'],[0,' if (this.startRegEx.test(evt.type)) {'],[0,' this.startEvt = evt;'],[0,' OpenLayers.Event.stop(evt);'],[0,' propagate = false;'],[-1,' }'],[-1,' } else {'],[0,' propagate = !this.ignore(OpenLayers.Event.element(evt));'],[0,' delete this.startEvt;'],[-1,' }'],[-1,' }'],[0,' return propagate;'],[-1,' }'],[-1,' '],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/TileManager.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Util.js'],[-1,' * @requires OpenLayers\/BaseTypes.js'],[-1,' * @requires OpenLayers\/BaseTypes\/Element.js'],[-1,' * @requires OpenLayers\/Layer\/Grid.js'],[-1,' * @requires OpenLayers\/Tile\/Image.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.TileManager'],[-1,' * Provides queueing of image requests and caching of image elements.'],[-1,' *'],[-1,' * Queueing avoids unnecessary image requests while changing zoom levels'],[-1,' * quickly, and helps improve dragging performance on mobile devices that show'],[-1,' * a lag in dragging when loading of new images starts. <zoomDelay> and'],[-1,' * <moveDelay> are the configuration options to control this behavior.'],[-1,' *'],[-1,' * Caching avoids setting the src on image elements for images that have already'],[-1,' * been used. Several maps can share a TileManager instance, in which case each'],[-1,' * map gets its own tile queue, but all maps share the same tile cache.'],[-1,' *\/'],[1,'OpenLayers.TileManager = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: cacheSize'],[-1,' * {Number} Number of image elements to keep referenced in this instance\'s'],[-1,' * cache for fast reuse. Default is 256.'],[-1,' *\/'],[-1,' cacheSize: 256,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: tilesPerFrame'],[-1,' * {Number} Number of queued tiles to load per frame (see <frameDelay>).'],[-1,' * Default is 2.'],[-1,' *\/'],[-1,' tilesPerFrame: 2,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: frameDelay'],[-1,' * {Number} Delay between tile loading frames (see <tilesPerFrame>) in'],[-1,' * milliseconds. Default is 16.'],[-1,' *\/'],[-1,' frameDelay: 16,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: moveDelay'],[-1,' * {Number} Delay in milliseconds after a map\'s move event before loading'],[-1,' * tiles. Default is 100.'],[-1,' *\/'],[-1,' moveDelay: 100,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: zoomDelay'],[-1,' * {Number} Delay in milliseconds after a map\'s zoomend event before loading'],[-1,' * tiles. Default is 200.'],[-1,' *\/'],[-1,' zoomDelay: 200,'],[-1,' '],[-1,' \/**'],[-1,' * Property: maps'],[-1,' * {Array(<OpenLayers.Map>)} The maps to manage tiles on.'],[-1,' *\/'],[-1,' maps: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: tileQueueId'],[-1,' * {Object} The ids of the <drawTilesFromQueue> loop, keyed by map id.'],[-1,' *\/'],[-1,' tileQueueId: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: tileQueue'],[-1,' * {Object(Array(<OpenLayers.Tile>))} Tiles queued for drawing, keyed by'],[-1,' * map id.'],[-1,' *\/'],[-1,' tileQueue: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: tileCache'],[-1,' * {Object} Cached image elements, keyed by URL.'],[-1,' *\/'],[-1,' tileCache: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: tileCacheIndex'],[-1,' * {Array(String)} URLs of cached tiles. First entry is the least recently'],[-1,' * used.'],[-1,' *\/'],[-1,' tileCacheIndex: null, '],[-1,' '],[-1,' \/** '],[-1,' * Constructor: OpenLayers.TileManager'],[-1,' * Constructor for a new <OpenLayers.TileManager> instance.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * options - {Object} Configuration for this instance.'],[-1,' *\/ '],[-1,' initialize: function(options) {'],[0,' OpenLayers.Util.extend(this, options);'],[0,' this.maps = [];'],[0,' this.tileQueueId = {};'],[0,' this.tileQueue = {};'],[0,' this.tileCache = {};'],[0,' this.tileCacheIndex = [];'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: addMap'],[-1,' * Binds this instance to a map'],[-1,' *'],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>}'],[-1,' *\/'],[-1,' addMap: function(map) {'],[0,' if (this._destroyed || !OpenLayers.Layer.Grid) {'],[0,' return;'],[-1,' }'],[0,' this.maps.push(map);'],[0,' this.tileQueue[map.id] = [];'],[0,' for (var i=0, ii=map.layers.length; i<ii; ++i) {'],[0,' this.addLayer({layer: map.layers[i]});'],[-1,' }'],[0,' map.events.on({'],[-1,' move: this.move,'],[-1,' zoomend: this.zoomEnd,'],[-1,' changelayer: this.changeLayer,'],[-1,' addlayer: this.addLayer,'],[-1,' preremovelayer: this.removeLayer,'],[-1,' scope: this'],[-1,' });'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: removeMap'],[-1,' * Unbinds this instance from a map'],[-1,' *'],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>}'],[-1,' *\/'],[-1,' removeMap: function(map) {'],[0,' if (this._destroyed || !OpenLayers.Layer.Grid) {'],[0,' return;'],[-1,' }'],[0,' window.clearTimeout(this.tileQueueId[map.id]);'],[0,' if (map.layers) {'],[0,' for (var i=0, ii=map.layers.length; i<ii; ++i) {'],[0,' this.removeLayer({layer: map.layers[i]});'],[-1,' }'],[-1,' }'],[0,' if (map.events) {'],[0,' map.events.un({'],[-1,' move: this.move,'],[-1,' zoomend: this.zoomEnd,'],[-1,' changelayer: this.changeLayer,'],[-1,' addlayer: this.addLayer,'],[-1,' preremovelayer: this.removeLayer,'],[-1,' scope: this'],[-1,' });'],[-1,' }'],[0,' delete this.tileQueue[map.id];'],[0,' delete this.tileQueueId[map.id];'],[0,' OpenLayers.Util.removeItem(this.maps, map);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: move'],[-1,' * Handles the map\'s move event'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} Listener argument'],[-1,' *\/'],[-1,' move: function(evt) {'],[0,' this.updateTimeout(evt.object, this.moveDelay, true);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: zoomEnd'],[-1,' * Handles the map\'s zoomEnd event'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} Listener argument'],[-1,' *\/'],[-1,' zoomEnd: function(evt) {'],[0,' this.updateTimeout(evt.object, this.zoomDelay);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: changeLayer'],[-1,' * Handles the map\'s changeLayer event'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} Listener argument'],[-1,' *\/'],[-1,' changeLayer: function(evt) {'],[0,' if (evt.property === \'visibility\' || evt.property === \'params\') {'],[0,' this.updateTimeout(evt.object, 0);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: addLayer'],[-1,' * Handles the map\'s addlayer event'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} The listener argument'],[-1,' *\/'],[-1,' addLayer: function(evt) {'],[0,' var layer = evt.layer;'],[0,' if (layer instanceof OpenLayers.Layer.Grid) {'],[0,' layer.events.on({'],[-1,' addtile: this.addTile,'],[-1,' refresh: this.handleLayerRefresh,'],[-1,' retile: this.clearTileQueue,'],[-1,' scope: this'],[-1,' });'],[0,' var i, j, tile;'],[0,' for (i=layer.grid.length-1; i>=0; --i) {'],[0,' for (j=layer.grid[i].length-1; j>=0; --j) {'],[0,' tile = layer.grid[i][j];'],[0,' this.addTile({tile: tile});'],[0,' if (tile.url && !tile.imgDiv) {'],[0,' this.manageTileCache({object: tile});'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: removeLayer'],[-1,' * Handles the map\'s preremovelayer event'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} The listener argument'],[-1,' *\/'],[-1,' removeLayer: function(evt) {'],[0,' var layer = evt.layer;'],[0,' if (layer instanceof OpenLayers.Layer.Grid) {'],[0,' this.clearTileQueue({object: layer});'],[0,' if (layer.events) {'],[0,' layer.events.un({'],[-1,' addtile: this.addTile,'],[-1,' refresh: this.handleLayerRefresh,'],[-1,' retile: this.clearTileQueue,'],[-1,' scope: this'],[-1,' });'],[-1,' }'],[0,' if (layer.grid) {'],[0,' var i, j, tile;'],[0,' for (i=layer.grid.length-1; i>=0; --i) {'],[0,' for (j=layer.grid[i].length-1; j>=0; --j) {'],[0,' tile = layer.grid[i][j];'],[0,' this.unloadTile({object: tile});'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: handleLayerRefresh'],[-1,' * Clears the cache when a redraw is forced on a layer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} The listener argument'],[-1,' *\/'],[-1,' handleLayerRefresh: function(evt) {'],[0,' var layer = evt.object;'],[0,' if (layer.grid) {'],[0,' var i, j, tile;'],[0,' for (i=layer.grid.length-1; i>=0; --i) {'],[0,' for (j=layer.grid[i].length-1; j>=0; --j) {'],[0,' tile = layer.grid[i][j];'],[0,' OpenLayers.Util.removeItem(this.tileCacheIndex, tile.url);'],[0,' delete this.tileCache[tile.url];'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: updateTimeout'],[-1,' * Applies the <moveDelay> or <zoomDelay> to the <drawTilesFromQueue> loop,'],[-1,' * and schedules more queue processing after <frameDelay> if there are still'],[-1,' * tiles in the queue.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>} The map to update the timeout for'],[-1,' * delay - {Number} The delay to apply'],[-1,' * nice - {Boolean} If true, the timeout function will only be created if'],[-1,' * the tilequeue is not empty. This is used by the move handler to'],[-1,' * avoid impacts on dragging performance. For other events, the tile'],[-1,' * queue may not be populated yet, so we need to set the timer'],[-1,' * regardless of the queue size.'],[-1,' *\/'],[-1,' updateTimeout: function(map, delay, nice) {'],[0,' window.clearTimeout(this.tileQueueId[map.id]);'],[0,' var tileQueue = this.tileQueue[map.id];'],[0,' if (!nice || tileQueue.length) {'],[0,' this.tileQueueId[map.id] = window.setTimeout('],[-1,' OpenLayers.Function.bind(function() {'],[0,' this.drawTilesFromQueue(map);'],[0,' if (tileQueue.length) {'],[0,' this.updateTimeout(map, this.frameDelay);'],[-1,' }'],[-1,' }, this), delay'],[-1,' );'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: addTile'],[-1,' * Listener for the layer\'s addtile event'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} The listener argument'],[-1,' *\/'],[-1,' addTile: function(evt) {'],[0,' if (evt.tile instanceof OpenLayers.Tile.Image) {'],[0,' if (!evt.tile.layer.singleTile) {'],[0,' evt.tile.events.on({'],[-1,' beforedraw: this.queueTileDraw,'],[-1,' beforeload: this.manageTileCache,'],[-1,' loadend: this.addToCache,'],[-1,' unload: this.unloadTile,'],[-1,' scope: this'],[-1,' }); '],[-1,' }'],[-1,' } else {'],[-1,' \/\/ Layer has the wrong tile type, so don\'t handle it any longer'],[0,' this.removeLayer({layer: evt.tile.layer});'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: unloadTile'],[-1,' * Listener for the tile\'s unload event'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} The listener argument'],[-1,' *\/'],[-1,' unloadTile: function(evt) {'],[0,' var tile = evt.object;'],[0,' tile.events.un({'],[-1,' beforedraw: this.queueTileDraw,'],[-1,' beforeload: this.manageTileCache,'],[-1,' loadend: this.addToCache,'],[-1,' unload: this.unloadTile,'],[-1,' scope: this'],[-1,' });'],[0,' OpenLayers.Util.removeItem(this.tileQueue[tile.layer.map.id], tile);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: queueTileDraw'],[-1,' * Adds a tile to the queue that will draw it.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} Listener argument of the tile\'s beforedraw event'],[-1,' *\/'],[-1,' queueTileDraw: function(evt) {'],[0,' var tile = evt.object;'],[0,' var queued = false;'],[0,' var layer = tile.layer;'],[0,' var url = layer.getURL(tile.bounds);'],[0,' var img = this.tileCache[url];'],[0,' if (img && img.className !== \'olTileImage\') {'],[-1,' \/\/ cached image no longer valid, e.g. because we\'re olTileReplacing'],[0,' delete this.tileCache[url];'],[0,' OpenLayers.Util.removeItem(this.tileCacheIndex, url);'],[0,' img = null;'],[-1,' }'],[-1,' \/\/ queue only if image with same url not cached already'],[0,' if (layer.url && (layer.async || !img)) {'],[-1,' \/\/ add to queue only if not in queue already'],[0,' var tileQueue = this.tileQueue[layer.map.id];'],[0,' if (!~OpenLayers.Util.indexOf(tileQueue, tile)) {'],[0,' tileQueue.push(tile);'],[-1,' }'],[0,' queued = true;'],[-1,' }'],[0,' return !queued;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawTilesFromQueue'],[-1,' * Draws tiles from the tileQueue, and unqueues the tiles'],[-1,' *\/'],[-1,' drawTilesFromQueue: function(map) {'],[0,' var tileQueue = this.tileQueue[map.id];'],[0,' var limit = this.tilesPerFrame;'],[0,' var animating = map.zoomTween && map.zoomTween.playing;'],[0,' while (!animating && tileQueue.length && limit) {'],[0,' tileQueue.shift().draw(true);'],[0,' --limit;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: manageTileCache'],[-1,' * Adds, updates, removes and fetches cache entries.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} Listener argument of the tile\'s beforeload event'],[-1,' *\/'],[-1,' manageTileCache: function(evt) {'],[0,' var tile = evt.object;'],[0,' var img = this.tileCache[tile.url];'],[0,' if (img) {'],[-1,' \/\/ if image is on its layer\'s backbuffer, remove it from backbuffer'],[0,' if (img.parentNode &&'],[-1,' OpenLayers.Element.hasClass(img.parentNode, \'olBackBuffer\')) {'],[0,' img.parentNode.removeChild(img);'],[0,' img.id = null;'],[-1,' }'],[-1,' \/\/ only use image from cache if it is not on a layer already'],[0,' if (!img.parentNode) {'],[0,' img.style.visibility = \'hidden\';'],[0,' img.style.opacity = 0;'],[0,' tile.setImage(img);'],[-1,' \/\/ LRU - move tile to the end of the array to mark it as the most'],[-1,' \/\/ recently used'],[0,' OpenLayers.Util.removeItem(this.tileCacheIndex, tile.url);'],[0,' this.tileCacheIndex.push(tile.url);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: addToCache'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} Listener argument for the tile\'s loadend event'],[-1,' *\/'],[-1,' addToCache: function(evt) {'],[0,' var tile = evt.object;'],[0,' if (!this.tileCache[tile.url]) {'],[0,' if (!OpenLayers.Element.hasClass(tile.imgDiv, \'olImageLoadError\')) {'],[0,' if (this.tileCacheIndex.length >= this.cacheSize) {'],[0,' delete this.tileCache[this.tileCacheIndex[0]];'],[0,' this.tileCacheIndex.shift();'],[-1,' }'],[0,' this.tileCache[tile.url] = tile.imgDiv;'],[0,' this.tileCacheIndex.push(tile.url);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: clearTileQueue'],[-1,' * Clears the tile queue from tiles of a specific layer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object} Listener argument of the layer\'s retile event'],[-1,' *\/'],[-1,' clearTileQueue: function(evt) {'],[0,' var layer = evt.object;'],[0,' var tileQueue = this.tileQueue[layer.map.id];'],[0,' for (var i=tileQueue.length-1; i>=0; --i) {'],[0,' if (tileQueue[i].layer === layer) {'],[0,' tileQueue.splice(i, 1);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' for (var i=this.maps.length-1; i>=0; --i) {'],[0,' this.removeMap(this.maps[i]);'],[-1,' }'],[0,' this.maps = null;'],[0,' this.tileQueue = null;'],[0,' this.tileQueueId = null;'],[0,' this.tileCache = null;'],[0,' this.tileCacheIndex = null;'],[0,' this._destroyed = true;'],[-1,' }'],[-1,''],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Handler\/Drag.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Handler.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Handler.Drag'],[-1,' * The drag handler is used to deal with sequences of browser events related'],[-1,' * to dragging. The handler is used by controls that want to know when'],[-1,' * a drag sequence begins, when a drag is happening, and when it has'],[-1,' * finished.'],[-1,' *'],[-1,' * Controls that use the drag handler typically construct it with callbacks'],[-1,' * for \'down\', \'move\', and \'done\'. Callbacks for these keys are called'],[-1,' * when the drag begins, with each move, and when the drag is done. In'],[-1,' * addition, controls can have callbacks keyed to \'up\' and \'out\' if they'],[-1,' * care to differentiate between the types of events that correspond with'],[-1,' * the end of a drag sequence. If no drag actually occurs (no mouse move)'],[-1,' * the \'down\' and \'up\' callbacks will be called, but not the \'done\''],[-1,' * callback.'],[-1,' *'],[-1,' * Create a new drag handler with the <OpenLayers.Handler.Drag> constructor.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Handler>'],[-1,' *\/'],[1,'OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {'],[-1,' '],[-1,' \/** '],[-1,' * Property: started'],[-1,' * {Boolean} When a mousedown or touchstart event is received, we want to'],[-1,' * record it, but not set \'dragging\' until the mouse moves after starting.'],[-1,' *\/'],[-1,' started: false,'],[-1,''],[-1,' \/**'],[-1,' * Property: stopDown'],[-1,' * {Boolean} Stop propagation of mousedown events from getting to listeners'],[-1,' * on the same element. Default is true.'],[-1,' *\/'],[-1,' stopDown: true,'],[-1,''],[-1,' \/** '],[-1,' * Property: dragging '],[-1,' * {Boolean} '],[-1,' *\/'],[-1,' dragging: false,'],[-1,''],[-1,' \/** '],[-1,' * Property: last'],[-1,' * {<OpenLayers.Pixel>} The last pixel location of the drag.'],[-1,' *\/'],[-1,' last: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: start'],[-1,' * {<OpenLayers.Pixel>} The first pixel location of the drag.'],[-1,' *\/'],[-1,' start: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: lastMoveEvt'],[-1,' * {Object} The last mousemove event that occurred. Used to'],[-1,' * position the map correctly when our \"delay drag\"'],[-1,' * timeout expired.'],[-1,' *\/'],[-1,' lastMoveEvt: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: oldOnselectstart'],[-1,' * {Function}'],[-1,' *\/'],[-1,' oldOnselectstart: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: interval'],[-1,' * {Integer} In order to increase performance, an interval (in '],[-1,' * milliseconds) can be set to reduce the number of drag events '],[-1,' * called. If set, a new drag event will not be set until the '],[-1,' * interval has passed. '],[-1,' * Defaults to 0, meaning no interval. '],[-1,' *\/'],[-1,' interval: 0,'],[-1,' '],[-1,' \/**'],[-1,' * Property: timeoutId'],[-1,' * {String} The id of the timeout used for the mousedown interval.'],[-1,' * This is \"private\", and should be left alone.'],[-1,' *\/'],[-1,' timeoutId: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: documentDrag'],[-1,' * {Boolean} If set to true, the handler will also handle mouse moves when'],[-1,' * the cursor has moved out of the map viewport. Default is false.'],[-1,' *\/'],[-1,' documentDrag: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: documentEvents'],[-1,' * {Boolean} Are we currently observing document events?'],[-1,' *\/'],[-1,' documentEvents: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Handler.Drag'],[-1,' * Returns OpenLayers.Handler.Drag'],[-1,' * '],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>} The control that is making use of'],[-1,' * this handler. If a handler is being used without a control, the'],[-1,' * handlers setMap method must be overridden to deal properly with'],[-1,' * the map.'],[-1,' * callbacks - {Object} An object containing a single function to be'],[-1,' * called when the drag operation is finished. The callback should'],[-1,' * expect to receive a single argument, the pixel location of the event.'],[-1,' * Callbacks for \'move\' and \'done\' are supported. You can also speficy'],[-1,' * callbacks for \'down\', \'up\', and \'out\' to respond to those events.'],[-1,' * options - {Object} '],[-1,' *\/'],[-1,' initialize: function(control, callbacks, options) {'],[0,' OpenLayers.Handler.prototype.initialize.apply(this, arguments);'],[-1,' '],[0,' if (this.documentDrag === true) {'],[0,' var me = this;'],[0,' this._docMove = function(evt) {'],[0,' me.mousemove({'],[-1,' xy: {x: evt.clientX, y: evt.clientY},'],[-1,' element: document'],[-1,' });'],[-1,' };'],[0,' this._docUp = function(evt) {'],[0,' me.mouseup({xy: {x: evt.clientX, y: evt.clientY}});'],[-1,' };'],[-1,' }'],[-1,' },'],[-1,''],[-1,' '],[-1,' \/**'],[-1,' * Method: dragstart'],[-1,' * This private method is factorized from mousedown and touchstart methods'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} The event'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' dragstart: function (evt) {'],[0,' var propagate = true;'],[0,' this.dragging = false;'],[0,' if (this.checkModifiers(evt) &&'],[-1,' (OpenLayers.Event.isLeftClick(evt) ||'],[-1,' OpenLayers.Event.isSingleTouch(evt))) {'],[0,' this.started = true;'],[0,' this.start = evt.xy;'],[0,' this.last = evt.xy;'],[0,' OpenLayers.Element.addClass('],[-1,' this.map.viewPortDiv, \"olDragDown\"'],[-1,' );'],[0,' this.down(evt);'],[0,' this.callback(\"down\", [evt.xy]);'],[-1,''],[-1,' \/\/ prevent document dragging'],[0,' OpenLayers.Event.preventDefault(evt);'],[-1,''],[0,' if(!this.oldOnselectstart) {'],[0,' this.oldOnselectstart = document.onselectstart ?'],[-1,' document.onselectstart : OpenLayers.Function.True;'],[-1,' }'],[0,' document.onselectstart = OpenLayers.Function.False;'],[-1,''],[0,' propagate = !this.stopDown;'],[-1,' } else {'],[0,' this.started = false;'],[0,' this.start = null;'],[0,' this.last = null;'],[-1,' }'],[0,' return propagate;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: dragmove'],[-1,' * This private method is factorized from mousemove and touchmove methods'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} The event'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' dragmove: function (evt) {'],[0,' this.lastMoveEvt = evt;'],[0,' if (this.started && !this.timeoutId && (evt.xy.x != this.last.x ||'],[-1,' evt.xy.y != this.last.y)) {'],[0,' if(this.documentDrag === true && this.documentEvents) {'],[0,' if(evt.element === document) {'],[0,' this.adjustXY(evt);'],[-1,' \/\/ do setEvent manually because the documentEvents are not'],[-1,' \/\/ registered with the map'],[0,' this.setEvent(evt);'],[-1,' } else {'],[0,' this.removeDocumentEvents();'],[-1,' }'],[-1,' }'],[0,' if (this.interval > 0) {'],[0,' this.timeoutId = setTimeout('],[-1,' OpenLayers.Function.bind(this.removeTimeout, this),'],[-1,' this.interval);'],[-1,' }'],[0,' this.dragging = true;'],[-1,''],[0,' this.move(evt);'],[0,' this.callback(\"move\", [evt.xy]);'],[0,' if(!this.oldOnselectstart) {'],[0,' this.oldOnselectstart = document.onselectstart;'],[0,' document.onselectstart = OpenLayers.Function.False;'],[-1,' }'],[0,' this.last = evt.xy;'],[-1,' }'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: dragend'],[-1,' * This private method is factorized from mouseup and touchend methods'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} The event'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' dragend: function (evt) {'],[0,' if (this.started) {'],[0,' if(this.documentDrag === true && this.documentEvents) {'],[0,' this.adjustXY(evt);'],[0,' this.removeDocumentEvents();'],[-1,' }'],[0,' var dragged = (this.start != this.last);'],[0,' this.started = false;'],[0,' this.dragging = false;'],[0,' OpenLayers.Element.removeClass('],[-1,' this.map.viewPortDiv, \"olDragDown\"'],[-1,' );'],[0,' this.up(evt);'],[0,' this.callback(\"up\", [evt.xy]);'],[0,' if(dragged) {'],[0,' this.callback(\"done\", [evt.xy]);'],[-1,' }'],[0,' document.onselectstart = this.oldOnselectstart;'],[-1,' }'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * The four methods below (down, move, up, and out) are used by subclasses'],[-1,' * to do their own processing related to these mouse events.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Method: down'],[-1,' * This method is called during the handling of the mouse down event.'],[-1,' * Subclasses can do their own processing here.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} The mouse down event'],[-1,' *\/'],[-1,' down: function(evt) {'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: move'],[-1,' * This method is called during the handling of the mouse move event.'],[-1,' * Subclasses can do their own processing here.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} The mouse move event'],[-1,' *'],[-1,' *\/'],[-1,' move: function(evt) {'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: up'],[-1,' * This method is called during the handling of the mouse up event.'],[-1,' * Subclasses can do their own processing here.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} The mouse up event'],[-1,' *\/'],[-1,' up: function(evt) {'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: out'],[-1,' * This method is called during the handling of the mouse out event.'],[-1,' * Subclasses can do their own processing here.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} The mouse out event'],[-1,' *\/'],[-1,' out: function(evt) {'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * The methods below are part of the magic of event handling. Because'],[-1,' * they are named like browser events, they are registered as listeners'],[-1,' * for the events they represent.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Method: mousedown'],[-1,' * Handle mousedown events'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' mousedown: function(evt) {'],[0,' return this.dragstart(evt);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: touchstart'],[-1,' * Handle touchstart events'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' touchstart: function(evt) {'],[0,' this.startTouch();'],[0,' return this.dragstart(evt);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: mousemove'],[-1,' * Handle mousemove events'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' mousemove: function(evt) {'],[0,' return this.dragmove(evt);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: touchmove'],[-1,' * Handle touchmove events'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' touchmove: function(evt) {'],[0,' return this.dragmove(evt);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: removeTimeout'],[-1,' * Private. Called by mousemove() to remove the drag timeout.'],[-1,' *\/'],[-1,' removeTimeout: function() {'],[0,' this.timeoutId = null;'],[-1,' \/\/ if timeout expires while we\'re still dragging (mouseup'],[-1,' \/\/ hasn\'t occurred) then call mousemove to move to the'],[-1,' \/\/ correct position'],[0,' if(this.dragging) {'],[0,' this.mousemove(this.lastMoveEvt);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: mouseup'],[-1,' * Handle mouseup events'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' mouseup: function(evt) {'],[0,' return this.dragend(evt);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: touchend'],[-1,' * Handle touchend events'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' touchend: function(evt) {'],[-1,' \/\/ override evt.xy with last position since touchend does not have'],[-1,' \/\/ any touch position'],[0,' evt.xy = this.last;'],[0,' return this.dragend(evt);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: mouseout'],[-1,' * Handle mouseout events'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' mouseout: function (evt) {'],[0,' if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {'],[0,' if(this.documentDrag === true) {'],[0,' this.addDocumentEvents();'],[-1,' } else {'],[0,' var dragged = (this.start != this.last);'],[0,' this.started = false; '],[0,' this.dragging = false;'],[0,' OpenLayers.Element.removeClass('],[-1,' this.map.viewPortDiv, \"olDragDown\"'],[-1,' );'],[0,' this.out(evt);'],[0,' this.callback(\"out\", []);'],[0,' if(dragged) {'],[0,' this.callback(\"done\", [evt.xy]);'],[-1,' }'],[0,' if(document.onselectstart) {'],[0,' document.onselectstart = this.oldOnselectstart;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return true;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: click'],[-1,' * The drag handler captures the click event. If something else registers'],[-1,' * for clicks on the same element, its listener will not be called '],[-1,' * after a drag.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * evt - {Event} '],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Let the event propagate.'],[-1,' *\/'],[-1,' click: function (evt) {'],[-1,' \/\/ let the click event propagate only if the mouse moved'],[0,' return (this.start == this.last);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: activate'],[-1,' * Activate the handler.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The handler was successfully activated.'],[-1,' *\/'],[-1,' activate: function() {'],[0,' var activated = false;'],[0,' if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) {'],[0,' this.dragging = false;'],[0,' activated = true;'],[-1,' }'],[0,' return activated;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: deactivate '],[-1,' * Deactivate the handler.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} The handler was successfully deactivated.'],[-1,' *\/'],[-1,' deactivate: function() {'],[0,' var deactivated = false;'],[0,' if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {'],[0,' this.started = false;'],[0,' this.dragging = false;'],[0,' this.start = null;'],[0,' this.last = null;'],[0,' deactivated = true;'],[0,' OpenLayers.Element.removeClass('],[-1,' this.map.viewPortDiv, \"olDragDown\"'],[-1,' );'],[-1,' }'],[0,' return deactivated;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: adjustXY'],[-1,' * Converts event coordinates that are relative to the document body to'],[-1,' * ones that are relative to the map viewport. The latter is the default in'],[-1,' * OpenLayers.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Object}'],[-1,' *\/'],[-1,' adjustXY: function(evt) {'],[0,' var pos = OpenLayers.Util.pagePosition(this.map.viewPortDiv);'],[0,' evt.xy.x -= pos[0];'],[0,' evt.xy.y -= pos[1];'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: addDocumentEvents'],[-1,' * Start observing document events when documentDrag is true and the mouse'],[-1,' * cursor leaves the map viewport while dragging.'],[-1,' *\/'],[-1,' addDocumentEvents: function() {'],[0,' OpenLayers.Element.addClass(document.body, \"olDragDown\");'],[0,' this.documentEvents = true;'],[0,' OpenLayers.Event.observe(document, \"mousemove\", this._docMove);'],[0,' OpenLayers.Event.observe(document, \"mouseup\", this._docUp);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: removeDocumentEvents'],[-1,' * Stops observing document events when documentDrag is true and the mouse'],[-1,' * cursor re-enters the map viewport while dragging.'],[-1,' *\/'],[-1,' removeDocumentEvents: function() {'],[0,' OpenLayers.Element.removeClass(document.body, \"olDragDown\");'],[0,' this.documentEvents = false;'],[0,' OpenLayers.Event.stopObserving(document, \"mousemove\", this._docMove);'],[0,' OpenLayers.Event.stopObserving(document, \"mouseup\", this._docUp);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Handler.Drag\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Handler\/Box.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Handler.js'],[-1,' * @requires OpenLayers\/Handler\/Drag.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Handler.Box'],[-1,' * Handler for dragging a rectangle across the map. Box is displayed '],[-1,' * on mouse down, moves on mouse move, and is finished on mouse up.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Handler> '],[-1,' *\/'],[1,'OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {'],[-1,''],[-1,' \/** '],[-1,' * Property: dragHandler '],[-1,' * {<OpenLayers.Handler.Drag>} '],[-1,' *\/'],[-1,' dragHandler: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: boxDivClassName'],[-1,' * {String} The CSS class to use for drawing the box. Default is'],[-1,' * olHandlerBoxZoomBox'],[-1,' *\/'],[-1,' boxDivClassName: \'olHandlerBoxZoomBox\','],[-1,' '],[-1,' \/**'],[-1,' * Property: boxOffsets'],[-1,' * {Object} Caches box offsets from css. This is used by the getBoxOffsets'],[-1,' * method.'],[-1,' *\/'],[-1,' boxOffsets: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Handler.Box'],[-1,' *'],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>} '],[-1,' * callbacks - {Object} An object with a properties whose values are'],[-1,' * functions. Various callbacks described below.'],[-1,' * options - {Object} '],[-1,' *'],[-1,' * Named callbacks:'],[-1,' * start - Called when the box drag operation starts.'],[-1,' * done - Called when the box drag operation is finished.'],[-1,' * The callback should expect to receive a single argument, the box '],[-1,' * bounds or a pixel. If the box dragging didn\'t span more than a 5 '],[-1,' * pixel distance, a pixel will be returned instead of a bounds object.'],[-1,' *\/'],[-1,' initialize: function(control, callbacks, options) {'],[0,' OpenLayers.Handler.prototype.initialize.apply(this, arguments);'],[0,' this.dragHandler = new OpenLayers.Handler.Drag('],[-1,' this, '],[-1,' {'],[-1,' down: this.startBox, '],[-1,' move: this.moveBox, '],[-1,' out: this.removeBox,'],[-1,' up: this.endBox'],[-1,' }, '],[-1,' {keyMask: this.keyMask}'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' OpenLayers.Handler.prototype.destroy.apply(this, arguments);'],[0,' if (this.dragHandler) {'],[0,' this.dragHandler.destroy();'],[0,' this.dragHandler = null;'],[-1,' } '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setMap'],[-1,' *\/'],[-1,' setMap: function (map) {'],[0,' OpenLayers.Handler.prototype.setMap.apply(this, arguments);'],[0,' if (this.dragHandler) {'],[0,' this.dragHandler.setMap(map);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: startBox'],[-1,' *'],[-1,' * Parameters:'],[-1,' * xy - {<OpenLayers.Pixel>}'],[-1,' *\/'],[-1,' startBox: function (xy) {'],[0,' this.callback(\"start\", []);'],[0,' this.zoomBox = OpenLayers.Util.createDiv(\'zoomBox\', {'],[-1,' x: -9999, y: -9999'],[-1,' });'],[0,' this.zoomBox.className = this.boxDivClassName; '],[0,' this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE[\"Popup\"] - 1;'],[-1,' '],[0,' this.map.viewPortDiv.appendChild(this.zoomBox);'],[-1,' '],[0,' OpenLayers.Element.addClass('],[-1,' this.map.viewPortDiv, \"olDrawBox\"'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: moveBox'],[-1,' *\/'],[-1,' moveBox: function (xy) {'],[0,' var startX = this.dragHandler.start.x;'],[0,' var startY = this.dragHandler.start.y;'],[0,' var deltaX = Math.abs(startX - xy.x);'],[0,' var deltaY = Math.abs(startY - xy.y);'],[-1,''],[0,' var offset = this.getBoxOffsets();'],[0,' this.zoomBox.style.width = (deltaX + offset.width + 1) + \"px\";'],[0,' this.zoomBox.style.height = (deltaY + offset.height + 1) + \"px\";'],[0,' this.zoomBox.style.left = (xy.x < startX ?'],[-1,' startX - deltaX - offset.left : startX - offset.left) + \"px\";'],[0,' this.zoomBox.style.top = (xy.y < startY ?'],[-1,' startY - deltaY - offset.top : startY - offset.top) + \"px\";'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: endBox'],[-1,' *\/'],[-1,' endBox: function(end) {'],[0,' var result;'],[0,' if (Math.abs(this.dragHandler.start.x - end.x) > 5 || '],[-1,' Math.abs(this.dragHandler.start.y - end.y) > 5) { '],[0,' var start = this.dragHandler.start;'],[0,' var top = Math.min(start.y, end.y);'],[0,' var bottom = Math.max(start.y, end.y);'],[0,' var left = Math.min(start.x, end.x);'],[0,' var right = Math.max(start.x, end.x);'],[0,' result = new OpenLayers.Bounds(left, bottom, right, top);'],[-1,' } else {'],[0,' result = this.dragHandler.start.clone(); \/\/ i.e. OL.Pixel'],[-1,' } '],[0,' this.removeBox();'],[-1,''],[0,' this.callback(\"done\", [result]);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: removeBox'],[-1,' * Remove the zoombox from the screen and nullify our reference to it.'],[-1,' *\/'],[-1,' removeBox: function() {'],[0,' this.map.viewPortDiv.removeChild(this.zoomBox);'],[0,' this.zoomBox = null;'],[0,' this.boxOffsets = null;'],[0,' OpenLayers.Element.removeClass('],[-1,' this.map.viewPortDiv, \"olDrawBox\"'],[-1,' );'],[-1,''],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: activate'],[-1,' *\/'],[-1,' activate: function () {'],[0,' if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) {'],[0,' this.dragHandler.activate();'],[0,' return true;'],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: deactivate'],[-1,' *\/'],[-1,' deactivate: function () {'],[0,' if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {'],[0,' if (this.dragHandler.deactivate()) {'],[0,' if (this.zoomBox) {'],[0,' this.removeBox();'],[-1,' }'],[-1,' }'],[0,' return true;'],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getBoxOffsets'],[-1,' * Determines border offsets for a box, according to the box model.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} an object with the following offsets:'],[-1,' * - left'],[-1,' * - right'],[-1,' * - top'],[-1,' * - bottom'],[-1,' * - width'],[-1,' * - height'],[-1,' *\/'],[-1,' getBoxOffsets: function() {'],[0,' if (!this.boxOffsets) {'],[-1,' \/\/ Determine the box model. If the testDiv\'s clientWidth is 3, then'],[-1,' \/\/ the borders are outside and we are dealing with the w3c box'],[-1,' \/\/ model. Otherwise, the browser uses the traditional box model and'],[-1,' \/\/ the borders are inside the box bounds, leaving us with a'],[-1,' \/\/ clientWidth of 1.'],[0,' var testDiv = document.createElement(\"div\");'],[-1,' \/\/testDiv.style.visibility = \"hidden\";'],[0,' testDiv.style.position = \"absolute\";'],[0,' testDiv.style.border = \"1px solid black\";'],[0,' testDiv.style.width = \"3px\";'],[0,' document.body.appendChild(testDiv);'],[0,' var w3cBoxModel = testDiv.clientWidth == 3;'],[0,' document.body.removeChild(testDiv);'],[-1,' '],[0,' var left = parseInt(OpenLayers.Element.getStyle(this.zoomBox,'],[-1,' \"border-left-width\"));'],[0,' var right = parseInt(OpenLayers.Element.getStyle('],[-1,' this.zoomBox, \"border-right-width\"));'],[0,' var top = parseInt(OpenLayers.Element.getStyle(this.zoomBox,'],[-1,' \"border-top-width\"));'],[0,' var bottom = parseInt(OpenLayers.Element.getStyle('],[-1,' this.zoomBox, \"border-bottom-width\"));'],[0,' this.boxOffsets = {'],[-1,' left: left,'],[-1,' right: right,'],[-1,' top: top,'],[-1,' bottom: bottom,'],[-1,' width: w3cBoxModel === false ? left + right : 0,'],[-1,' height: w3cBoxModel === false ? top + bottom : 0'],[-1,' };'],[-1,' }'],[0,' return this.boxOffsets;'],[-1,' },'],[-1,' '],[-1,' CLASS_NAME: \"OpenLayers.Handler.Box\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control\/ZoomBox.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Control.js'],[-1,' * @requires OpenLayers\/Handler\/Box.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control.ZoomBox'],[-1,' * The ZoomBox control enables zooming directly to a given extent, by drawing '],[-1,' * a box on the map. The box is drawn by holding down shift, whilst dragging '],[-1,' * the mouse.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Control>'],[-1,' *\/'],[1,'OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, {'],[-1,' \/**'],[-1,' * Property: type'],[-1,' * {OpenLayers.Control.TYPE}'],[-1,' *\/'],[-1,' type: OpenLayers.Control.TYPE_TOOL,'],[-1,''],[-1,' \/**'],[-1,' * Property: out'],[-1,' * {Boolean} Should the control be used for zooming out?'],[-1,' *\/'],[-1,' out: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: keyMask'],[-1,' * {Integer} Zoom only occurs if the keyMask matches the combination of '],[-1,' * keys down. Use bitwise operators and one or more of the'],[-1,' * <OpenLayers.Handler> constants to construct a keyMask. Leave null if '],[-1,' * not used mask. Default is null.'],[-1,' *\/'],[-1,' keyMask: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: alwaysZoom'],[-1,' * {Boolean} Always zoom in\/out when box drawn, even if the zoom level does'],[-1,' * not change.'],[-1,' *\/'],[-1,' alwaysZoom: false,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: zoomOnClick'],[-1,' * {Boolean} Should we zoom when no box was dragged, i.e. the user only'],[-1,' * clicked? Default is true.'],[-1,' *\/'],[-1,' zoomOnClick: true,'],[-1,''],[-1,' \/**'],[-1,' * Method: draw'],[-1,' *\/ '],[-1,' draw: function() {'],[0,' this.handler = new OpenLayers.Handler.Box( this,'],[-1,' {done: this.zoomBox}, {keyMask: this.keyMask} );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: zoomBox'],[-1,' *'],[-1,' * Parameters:'],[-1,' * position - {<OpenLayers.Bounds>} or {<OpenLayers.Pixel>}'],[-1,' *\/'],[-1,' zoomBox: function (position) {'],[0,' if (position instanceof OpenLayers.Bounds) {'],[0,' var bounds,'],[-1,' targetCenterPx = position.getCenterPixel();'],[0,' if (!this.out) {'],[0,' var minXY = this.map.getLonLatFromPixel({'],[-1,' x: position.left,'],[-1,' y: position.bottom'],[-1,' });'],[0,' var maxXY = this.map.getLonLatFromPixel({'],[-1,' x: position.right,'],[-1,' y: position.top'],[-1,' });'],[0,' bounds = new OpenLayers.Bounds(minXY.lon, minXY.lat,'],[-1,' maxXY.lon, maxXY.lat);'],[-1,' } else {'],[0,' var pixWidth = position.right - position.left;'],[0,' var pixHeight = position.bottom - position.top;'],[0,' var zoomFactor = Math.min((this.map.size.h \/ pixHeight),'],[-1,' (this.map.size.w \/ pixWidth));'],[0,' var extent = this.map.getExtent();'],[0,' var center = this.map.getLonLatFromPixel(targetCenterPx);'],[0,' var xmin = center.lon - (extent.getWidth()\/2)*zoomFactor;'],[0,' var xmax = center.lon + (extent.getWidth()\/2)*zoomFactor;'],[0,' var ymin = center.lat - (extent.getHeight()\/2)*zoomFactor;'],[0,' var ymax = center.lat + (extent.getHeight()\/2)*zoomFactor;'],[0,' bounds = new OpenLayers.Bounds(xmin, ymin, xmax, ymax);'],[-1,' }'],[-1,' \/\/ always zoom in\/out '],[0,' var lastZoom = this.map.getZoom(),'],[-1,' size = this.map.getSize(),'],[-1,' centerPx = {x: size.w \/ 2, y: size.h \/ 2},'],[-1,' zoom = this.map.getZoomForExtent(bounds),'],[-1,' oldRes = this.map.getResolution(),'],[-1,' newRes = this.map.getResolutionForZoom(zoom);'],[0,' if (oldRes == newRes) {'],[0,' this.map.setCenter(this.map.getLonLatFromPixel(targetCenterPx));'],[-1,' } else {'],[0,' var zoomOriginPx = {'],[-1,' x: (oldRes * targetCenterPx.x - newRes * centerPx.x) \/'],[-1,' (oldRes - newRes),'],[-1,' y: (oldRes * targetCenterPx.y - newRes * centerPx.y) \/'],[-1,' (oldRes - newRes)'],[-1,' };'],[0,' this.map.zoomTo(zoom, zoomOriginPx);'],[-1,' }'],[0,' if (lastZoom == this.map.getZoom() && this.alwaysZoom == true){ '],[0,' this.map.zoomTo(lastZoom + (this.out ? -1 : 1)); '],[-1,' }'],[0,' } else if (this.zoomOnClick) { \/\/ it\'s a pixel'],[0,' if (!this.out) {'],[0,' this.map.zoomTo(this.map.getZoom() + 1, position);'],[-1,' } else {'],[0,' this.map.zoomTo(this.map.getZoom() - 1, position);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Control.ZoomBox\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control\/DragPan.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Control.js'],[-1,' * @requires OpenLayers\/Handler\/Drag.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control.DragPan'],[-1,' * The DragPan control pans the map with a drag of the mouse.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Control>'],[-1,' *\/'],[1,'OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {'],[-1,''],[-1,' \/** '],[-1,' * Property: type'],[-1,' * {OpenLayers.Control.TYPES}'],[-1,' *\/'],[-1,' type: OpenLayers.Control.TYPE_TOOL,'],[-1,' '],[-1,' \/**'],[-1,' * Property: panned'],[-1,' * {Boolean} The map moved.'],[-1,' *\/'],[-1,' panned: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: interval'],[-1,' * {Integer} The number of milliseconds that should ellapse before'],[-1,' * panning the map again. Defaults to 0 milliseconds, which means that'],[-1,' * no separate cycle is used for panning. In most cases you won\'t want'],[-1,' * to change this value. For slow machines\/devices larger values can be'],[-1,' * tried out.'],[-1,' *\/'],[-1,' interval: 0,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: documentDrag'],[-1,' * {Boolean} If set to true, mouse dragging will continue even if the'],[-1,' * mouse cursor leaves the map viewport. Default is false.'],[-1,' *\/'],[-1,' documentDrag: false,'],[-1,''],[-1,' \/**'],[-1,' * Property: kinetic'],[-1,' * {<OpenLayers.Kinetic>} The OpenLayers.Kinetic object.'],[-1,' *\/'],[-1,' kinetic: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: enableKinetic'],[-1,' * {Boolean} Set this option to enable \"kinetic dragging\". Can be'],[-1,' * set to true or to an object. If set to an object this'],[-1,' * object will be passed to the {<OpenLayers.Kinetic>}'],[-1,' * constructor. Defaults to true.'],[-1,' * To get kinetic dragging, ensure that OpenLayers\/Kinetic.js is'],[-1,' * included in your build config.'],[-1,' *\/'],[-1,' enableKinetic: true,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: kineticInterval'],[-1,' * {Integer} Interval in milliseconds between 2 steps in the \"kinetic'],[-1,' * scrolling\". Applies only if enableKinetic is set. Defaults'],[-1,' * to 10 milliseconds.'],[-1,' *\/'],[-1,' kineticInterval: 10,'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * Method: draw'],[-1,' * Creates a Drag handler, using <panMap> and'],[-1,' * <panMapDone> as callbacks.'],[-1,' *\/ '],[-1,' draw: function() {'],[0,' if (this.enableKinetic && OpenLayers.Kinetic) {'],[0,' var config = {interval: this.kineticInterval};'],[0,' if(typeof this.enableKinetic === \"object\") {'],[0,' config = OpenLayers.Util.extend(config, this.enableKinetic);'],[-1,' }'],[0,' this.kinetic = new OpenLayers.Kinetic(config);'],[-1,' }'],[0,' this.handler = new OpenLayers.Handler.Drag(this, {'],[-1,' \"move\": this.panMap,'],[-1,' \"done\": this.panMapDone,'],[-1,' \"down\": this.panMapStart'],[-1,' }, {'],[-1,' interval: this.interval,'],[-1,' documentDrag: this.documentDrag'],[-1,' }'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: panMapStart'],[-1,' *\/'],[-1,' panMapStart: function() {'],[0,' if(this.kinetic) {'],[0,' this.kinetic.begin();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: panMap'],[-1,' *'],[-1,' * Parameters:'],[-1,' * xy - {<OpenLayers.Pixel>} Pixel of the mouse position'],[-1,' *\/'],[-1,' panMap: function(xy) {'],[0,' if(this.kinetic) {'],[0,' this.kinetic.update(xy);'],[-1,' }'],[0,' this.panned = true;'],[0,' this.map.pan('],[-1,' this.handler.last.x - xy.x,'],[-1,' this.handler.last.y - xy.y,'],[-1,' {dragging: true, animate: false}'],[-1,' );'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: panMapDone'],[-1,' * Finish the panning operation. Only call setCenter (through <panMap>)'],[-1,' * if the map has actually been moved.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * xy - {<OpenLayers.Pixel>} Pixel of the mouse position'],[-1,' *\/'],[-1,' panMapDone: function(xy) {'],[0,' if(this.panned) {'],[0,' var res = null;'],[0,' if (this.kinetic) {'],[0,' res = this.kinetic.end(xy);'],[-1,' }'],[0,' this.map.pan('],[-1,' this.handler.last.x - xy.x,'],[-1,' this.handler.last.y - xy.y,'],[-1,' {dragging: !!res, animate: false}'],[-1,' );'],[0,' if (res) {'],[0,' var self = this;'],[0,' this.kinetic.move(res, function(x, y, end) {'],[0,' self.map.pan(x, y, {dragging: !end, animate: false});'],[-1,' });'],[-1,' }'],[0,' this.panned = false;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Control.DragPan\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Handler\/MouseWheel.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Handler.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Handler.MouseWheel'],[-1,' * Handler for wheel up\/down events.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Handler>'],[-1,' *\/'],[1,'OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, {'],[-1,' \/** '],[-1,' * Property: wheelListener '],[-1,' * {function} '],[-1,' *\/'],[-1,' wheelListener: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: interval'],[-1,' * {Integer} In order to increase server performance, an interval (in '],[-1,' * milliseconds) can be set to reduce the number of up\/down events '],[-1,' * called. If set, a new up\/down event will not be set until the '],[-1,' * interval has passed. '],[-1,' * Defaults to 0, meaning no interval. '],[-1,' *\/'],[-1,' interval: 0,'],[-1,' '],[-1,' \/**'],[-1,' * Property: maxDelta'],[-1,' * {Integer} Maximum delta to collect before breaking from the current'],[-1,' * interval. In cumulative mode, this also limits the maximum delta'],[-1,' * returned from the handler. Default is Number.POSITIVE_INFINITY.'],[-1,' *\/'],[-1,' maxDelta: Number.POSITIVE_INFINITY,'],[-1,' '],[-1,' \/**'],[-1,' * Property: delta'],[-1,' * {Integer} When interval is set, delta collects the mousewheel z-deltas'],[-1,' * of the events that occur within the interval.'],[-1,' * See also the cumulative option'],[-1,' *\/'],[-1,' delta: 0,'],[-1,' '],[-1,' \/**'],[-1,' * Property: cumulative'],[-1,' * {Boolean} When interval is set: true to collect all the mousewheel '],[-1,' * z-deltas, false to only record the delta direction (positive or'],[-1,' * negative)'],[-1,' *\/'],[-1,' cumulative: true,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Handler.MouseWheel'],[-1,' *'],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>} '],[-1,' * callbacks - {Object} An object containing a single function to be'],[-1,' * called when the drag operation is finished.'],[-1,' * The callback should expect to receive a single'],[-1,' * argument, the point geometry.'],[-1,' * options - {Object} '],[-1,' *\/'],[-1,' initialize: function(control, callbacks, options) {'],[0,' OpenLayers.Handler.prototype.initialize.apply(this, arguments);'],[0,' this.wheelListener = OpenLayers.Function.bindAsEventListener('],[-1,' this.onWheelEvent, this'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' *\/ '],[-1,' destroy: function() {'],[0,' OpenLayers.Handler.prototype.destroy.apply(this, arguments);'],[0,' this.wheelListener = null;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Mouse ScrollWheel code thanks to http:\/\/adomas.org\/javascript-mouse-wheel\/'],[-1,' *\/'],[-1,''],[-1,' \/** '],[-1,' * Method: onWheelEvent'],[-1,' * Catch the wheel event and handle it xbrowserly'],[-1,' * '],[-1,' * Parameters:'],[-1,' * e - {Event} '],[-1,' *\/'],[-1,' onWheelEvent: function(e){'],[-1,' '],[-1,' \/\/ make sure we have a map and check keyboard modifiers'],[0,' if (!this.map || !this.checkModifiers(e)) {'],[0,' return;'],[-1,' }'],[-1,' '],[-1,' \/\/ Ride up the element\'s DOM hierarchy to determine if it or any of '],[-1,' \/\/ its ancestors was: '],[-1,' \/\/ * specifically marked as scrollable (CSS overflow property)'],[-1,' \/\/ * one of our layer divs or a div marked as scrollable'],[-1,' \/\/ (\'olScrollable\' CSS class)'],[-1,' \/\/ * the map div'],[-1,' \/\/'],[0,' var overScrollableDiv = false;'],[0,' var allowScroll = false;'],[0,' var overMapDiv = false;'],[-1,' '],[0,' var elem = OpenLayers.Event.element(e);'],[0,' while((elem != null) && !overMapDiv && !overScrollableDiv) {'],[-1,''],[0,' if (!overScrollableDiv) {'],[0,' try {'],[0,' var overflow;'],[0,' if (elem.currentStyle) {'],[0,' overflow = elem.currentStyle[\"overflow\"];'],[-1,' } else {'],[0,' var style = '],[-1,' document.defaultView.getComputedStyle(elem, null);'],[0,' overflow = style.getPropertyValue(\"overflow\");'],[-1,' }'],[0,' overScrollableDiv = ( overflow && '],[-1,' (overflow == \"auto\") || (overflow == \"scroll\") );'],[-1,' } catch(err) {'],[-1,' \/\/sometimes when scrolling in a popup, this causes '],[-1,' \/\/ obscure browser error'],[-1,' }'],[-1,' }'],[-1,''],[0,' if (!allowScroll) {'],[0,' allowScroll = OpenLayers.Element.hasClass(elem, \'olScrollable\');'],[0,' if (!allowScroll) {'],[0,' for (var i = 0, len = this.map.layers.length; i < len; i++) {'],[-1,' \/\/ Are we in the layer div? Note that we have two cases'],[-1,' \/\/ here: one is to catch EventPane layers, which have a'],[-1,' \/\/ pane above the layer (layer.pane)'],[0,' var layer = this.map.layers[i];'],[0,' if (elem == layer.div || elem == layer.pane) {'],[0,' allowScroll = true;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' overMapDiv = (elem == this.map.div);'],[-1,''],[0,' elem = elem.parentNode;'],[-1,' }'],[-1,' '],[-1,' \/\/ Logic below is the following:'],[-1,' \/\/'],[-1,' \/\/ If we are over a scrollable div or not over the map div:'],[-1,' \/\/ * do nothing (let the browser handle scrolling)'],[-1,' \/\/'],[-1,' \/\/ otherwise '],[-1,' \/\/ '],[-1,' \/\/ If we are over the layer div or a \'olScrollable\' div:'],[-1,' \/\/ * zoom\/in out'],[-1,' \/\/ then'],[-1,' \/\/ * kill event (so as not to also scroll the page after zooming)'],[-1,' \/\/'],[-1,' \/\/ otherwise'],[-1,' \/\/'],[-1,' \/\/ Kill the event (dont scroll the page if we wheel over the '],[-1,' \/\/ layerswitcher or the pan\/zoom control)'],[-1,' \/\/'],[0,' if (!overScrollableDiv && overMapDiv) {'],[0,' if (allowScroll) {'],[0,' var delta = 0;'],[-1,' '],[0,' if (e.wheelDelta) {'],[0,' delta = e.wheelDelta;'],[0,' if (delta % 160 === 0) {'],[-1,' \/\/ opera have steps of 160 instead of 120'],[0,' delta = delta * 0.75;'],[-1,' }'],[0,' delta = delta \/ 120;'],[0,' } else if (e.detail) {'],[-1,' \/\/ detail in Firefox on OS X is 1\/3 of Windows'],[-1,' \/\/ so force delta 1 \/ -1'],[0,' delta = - (e.detail \/ Math.abs(e.detail));'],[-1,' }'],[0,' this.delta += delta;'],[-1,''],[0,' window.clearTimeout(this._timeoutId);'],[0,' if(this.interval && Math.abs(this.delta) < this.maxDelta) {'],[-1,' \/\/ store e because window.event might change during delay'],[0,' var evt = OpenLayers.Util.extend({}, e);'],[0,' this._timeoutId = window.setTimeout('],[-1,' OpenLayers.Function.bind(function(){'],[0,' this.wheelZoom(evt);'],[-1,' }, this),'],[-1,' this.interval'],[-1,' );'],[-1,' } else {'],[0,' this.wheelZoom(e);'],[-1,' }'],[-1,' }'],[0,' OpenLayers.Event.stop(e);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: wheelZoom'],[-1,' * Given the wheel event, we carry out the appropriate zooming in or out,'],[-1,' * based on the \'wheelDelta\' or \'detail\' property of the event.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * e - {Event}'],[-1,' *\/'],[-1,' wheelZoom: function(e) {'],[0,' var delta = this.delta;'],[0,' this.delta = 0;'],[-1,' '],[0,' if (delta) {'],[0,' e.xy = this.map.events.getMousePosition(e);'],[0,' if (delta < 0) {'],[0,' this.callback(\"down\",'],[-1,' [e, this.cumulative ? Math.max(-this.maxDelta, delta) : -1]);'],[-1,' } else {'],[0,' this.callback(\"up\",'],[-1,' [e, this.cumulative ? Math.min(this.maxDelta, delta) : 1]);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: activate '],[-1,' *\/'],[-1,' activate: function (evt) {'],[0,' if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) {'],[-1,' \/\/register mousewheel events specifically on the window and document'],[0,' var wheelListener = this.wheelListener;'],[0,' OpenLayers.Event.observe(window, \"DOMMouseScroll\", wheelListener);'],[0,' OpenLayers.Event.observe(window, \"mousewheel\", wheelListener);'],[0,' OpenLayers.Event.observe(document, \"mousewheel\", wheelListener);'],[0,' return true;'],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: deactivate '],[-1,' *\/'],[-1,' deactivate: function (evt) {'],[0,' if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {'],[-1,' \/\/ unregister mousewheel events specifically on the window and document'],[0,' var wheelListener = this.wheelListener;'],[0,' OpenLayers.Event.stopObserving(window, \"DOMMouseScroll\", wheelListener);'],[0,' OpenLayers.Event.stopObserving(window, \"mousewheel\", wheelListener);'],[0,' OpenLayers.Event.stopObserving(document, \"mousewheel\", wheelListener);'],[0,' return true;'],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Handler.MouseWheel\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control\/Navigation.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Control\/ZoomBox.js'],[-1,' * @requires OpenLayers\/Control\/DragPan.js'],[-1,' * @requires OpenLayers\/Handler\/MouseWheel.js'],[-1,' * @requires OpenLayers\/Handler\/Click.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control.Navigation'],[-1,' * The navigation control handles map browsing with mouse events (dragging,'],[-1,' * double-clicking, and scrolling the wheel). Create a new navigation '],[-1,' * control with the <OpenLayers.Control.Navigation> control. '],[-1,' * '],[-1,' * Note that this control is added to the map by default (if no controls '],[-1,' * array is sent in the options object to the <OpenLayers.Map> '],[-1,' * constructor).'],[-1,' * '],[-1,' * Inherits:'],[-1,' * - <OpenLayers.Control>'],[-1,' *\/'],[1,'OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {'],[-1,''],[-1,' \/** '],[-1,' * Property: dragPan'],[-1,' * {<OpenLayers.Control.DragPan>} '],[-1,' *\/'],[-1,' dragPan: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: dragPanOptions'],[-1,' * {Object} Options passed to the DragPan control.'],[-1,' *\/'],[-1,' dragPanOptions: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: pinchZoom'],[-1,' * {<OpenLayers.Control.PinchZoom>}'],[-1,' *\/'],[-1,' pinchZoom: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: pinchZoomOptions'],[-1,' * {Object} Options passed to the PinchZoom control.'],[-1,' *\/'],[-1,' pinchZoomOptions: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: documentDrag'],[-1,' * {Boolean} Allow panning of the map by dragging outside map viewport.'],[-1,' * Default is false.'],[-1,' *\/'],[-1,' documentDrag: false,'],[-1,''],[-1,' \/** '],[-1,' * Property: zoomBox'],[-1,' * {<OpenLayers.Control.ZoomBox>}'],[-1,' *\/'],[-1,' zoomBox: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: zoomBoxEnabled'],[-1,' * {Boolean} Whether the user can draw a box to zoom'],[-1,' *\/'],[-1,' zoomBoxEnabled: true, '],[-1,''],[-1,' \/**'],[-1,' * APIProperty: zoomWheelEnabled'],[-1,' * {Boolean} Whether the mousewheel should zoom the map'],[-1,' *\/'],[-1,' zoomWheelEnabled: true,'],[-1,' '],[-1,' \/**'],[-1,' * Property: mouseWheelOptions'],[-1,' * {Object} Options passed to the MouseWheel control (only useful if'],[-1,' * <zoomWheelEnabled> is set to true). Default is no options for maps'],[-1,' * with fractionalZoom set to true, otherwise'],[-1,' * {cumulative: false, interval: 50, maxDelta: 6} '],[-1,' *\/'],[-1,' mouseWheelOptions: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: handleRightClicks'],[-1,' * {Boolean} Whether or not to handle right clicks. Default is false.'],[-1,' *\/'],[-1,' handleRightClicks: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: zoomBoxKeyMask'],[-1,' * {Integer} <OpenLayers.Handler> key code of the key, which has to be'],[-1,' * pressed, while drawing the zoom box with the mouse on the screen. '],[-1,' * You should probably set handleRightClicks to true if you use this'],[-1,' * with MOD_CTRL, to disable the context menu for machines which use'],[-1,' * CTRL-Click as a right click.'],[-1,' * Default: <OpenLayers.Handler.MOD_SHIFT>'],[-1,' *\/'],[-1,' zoomBoxKeyMask: OpenLayers.Handler.MOD_SHIFT,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: autoActivate'],[-1,' * {Boolean} Activate the control when it is added to a map. Default is'],[-1,' * true.'],[-1,' *\/'],[-1,' autoActivate: true,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Control.Navigation'],[-1,' * Create a new navigation control'],[-1,' * '],[-1,' * Parameters:'],[-1,' * options - {Object} An optional object whose properties will be set on'],[-1,' * the control'],[-1,' *\/'],[-1,' initialize: function(options) {'],[0,' this.handlers = {};'],[0,' OpenLayers.Control.prototype.initialize.apply(this, arguments);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' * The destroy method is used to perform any clean up before the control'],[-1,' * is dereferenced. Typically this is where event listeners are removed'],[-1,' * to prevent memory leaks.'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' this.deactivate();'],[-1,''],[0,' if (this.dragPan) {'],[0,' this.dragPan.destroy();'],[-1,' }'],[0,' this.dragPan = null;'],[-1,''],[0,' if (this.zoomBox) {'],[0,' this.zoomBox.destroy();'],[-1,' }'],[0,' this.zoomBox = null;'],[-1,''],[0,' if (this.pinchZoom) {'],[0,' this.pinchZoom.destroy();'],[-1,' }'],[0,' this.pinchZoom = null;'],[-1,''],[0,' OpenLayers.Control.prototype.destroy.apply(this,arguments);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: activate'],[-1,' *\/'],[-1,' activate: function() {'],[0,' this.dragPan.activate();'],[0,' if (this.zoomWheelEnabled) {'],[0,' this.handlers.wheel.activate();'],[-1,' } '],[0,' this.handlers.click.activate();'],[0,' if (this.zoomBoxEnabled) {'],[0,' this.zoomBox.activate();'],[-1,' }'],[0,' if (this.pinchZoom) {'],[0,' this.pinchZoom.activate();'],[-1,' }'],[0,' return OpenLayers.Control.prototype.activate.apply(this,arguments);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: deactivate'],[-1,' *\/'],[-1,' deactivate: function() {'],[0,' if (this.pinchZoom) {'],[0,' this.pinchZoom.deactivate();'],[-1,' }'],[0,' this.zoomBox.deactivate();'],[0,' this.dragPan.deactivate();'],[0,' this.handlers.click.deactivate();'],[0,' this.handlers.wheel.deactivate();'],[0,' return OpenLayers.Control.prototype.deactivate.apply(this,arguments);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: draw'],[-1,' *\/'],[-1,' draw: function() {'],[-1,' \/\/ disable right mouse context menu for support of right click events'],[0,' if (this.handleRightClicks) {'],[0,' this.map.viewPortDiv.oncontextmenu = OpenLayers.Function.False;'],[-1,' }'],[-1,''],[0,' var clickCallbacks = { '],[-1,' \'click\': this.defaultClick,'],[-1,' \'dblclick\': this.defaultDblClick, '],[-1,' \'dblrightclick\': this.defaultDblRightClick '],[-1,' };'],[0,' var clickOptions = {'],[-1,' \'double\': true, '],[-1,' \'stopDouble\': true'],[-1,' };'],[0,' this.handlers.click = new OpenLayers.Handler.Click('],[-1,' this, clickCallbacks, clickOptions'],[-1,' );'],[0,' this.dragPan = new OpenLayers.Control.DragPan('],[-1,' OpenLayers.Util.extend({'],[-1,' map: this.map,'],[-1,' documentDrag: this.documentDrag'],[-1,' }, this.dragPanOptions)'],[-1,' );'],[0,' this.zoomBox = new OpenLayers.Control.ZoomBox('],[-1,' {map: this.map, keyMask: this.zoomBoxKeyMask});'],[0,' this.dragPan.draw();'],[0,' this.zoomBox.draw();'],[0,' var wheelOptions = this.map.fractionalZoom ? {} : {'],[-1,' cumulative: false,'],[-1,' interval: 50,'],[-1,' maxDelta: 6'],[-1,' };'],[0,' this.handlers.wheel = new OpenLayers.Handler.MouseWheel('],[-1,' this, {up : this.wheelUp, down: this.wheelDown},'],[-1,' OpenLayers.Util.extend(wheelOptions, this.mouseWheelOptions)'],[-1,' );'],[0,' if (OpenLayers.Control.PinchZoom) {'],[0,' this.pinchZoom = new OpenLayers.Control.PinchZoom('],[-1,' OpenLayers.Util.extend('],[-1,' {map: this.map}, this.pinchZoomOptions));'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: defaultClick'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *\/'],[-1,' defaultClick: function (evt) {'],[0,' if (evt.lastTouches && evt.lastTouches.length == 2) {'],[0,' this.map.zoomOut();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: defaultDblClick '],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Event} '],[-1,' *\/'],[-1,' defaultDblClick: function (evt) {'],[0,' this.map.zoomTo(this.map.zoom + 1, evt.xy);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: defaultDblRightClick '],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Event} '],[-1,' *\/'],[-1,' defaultDblRightClick: function (evt) {'],[0,' this.map.zoomTo(this.map.zoom - 1, evt.xy);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: wheelChange '],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' * deltaZ - {Integer}'],[-1,' *\/'],[-1,' wheelChange: function(evt, deltaZ) {'],[0,' if (!this.map.fractionalZoom) {'],[0,' deltaZ = Math.round(deltaZ);'],[-1,' }'],[0,' var currentZoom = this.map.getZoom(),'],[-1,' newZoom = currentZoom + deltaZ;'],[0,' newZoom = Math.max(newZoom, 0);'],[0,' newZoom = Math.min(newZoom, this.map.getNumZoomLevels());'],[0,' if (newZoom === currentZoom) {'],[0,' return;'],[-1,' }'],[0,' this.map.zoomTo(newZoom, evt.xy);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: wheelUp'],[-1,' * User spun scroll wheel up'],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' * delta - {Integer}'],[-1,' *\/'],[-1,' wheelUp: function(evt, delta) {'],[0,' this.wheelChange(evt, delta || 1);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: wheelDown'],[-1,' * User spun scroll wheel down'],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' * delta - {Integer}'],[-1,' *\/'],[-1,' wheelDown: function(evt, delta) {'],[0,' this.wheelChange(evt, delta || -1);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: disableZoomBox'],[-1,' *\/'],[-1,' disableZoomBox : function() {'],[0,' this.zoomBoxEnabled = false;'],[0,' this.zoomBox.deactivate(); '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: enableZoomBox'],[-1,' *\/'],[-1,' enableZoomBox : function() {'],[0,' this.zoomBoxEnabled = true;'],[0,' if (this.active) {'],[0,' this.zoomBox.activate();'],[-1,' } '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: disableZoomWheel'],[-1,' *\/'],[-1,' '],[-1,' disableZoomWheel : function() {'],[0,' this.zoomWheelEnabled = false;'],[0,' this.handlers.wheel.deactivate(); '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: enableZoomWheel'],[-1,' *\/'],[-1,' '],[-1,' enableZoomWheel : function() {'],[0,' this.zoomWheelEnabled = true;'],[0,' if (this.active) {'],[0,' this.handlers.wheel.activate();'],[-1,' } '],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Control.Navigation\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Layer\/WMS.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Layer\/Grid.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Layer.WMS'],[-1,' * Instances of OpenLayers.Layer.WMS are used to display data from OGC Web'],[-1,' * Mapping Services. Create a new WMS layer with the <OpenLayers.Layer.WMS>'],[-1,' * constructor.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Layer.Grid>'],[-1,' *\/'],[1,'OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, {'],[-1,''],[-1,' \/**'],[-1,' * Constant: DEFAULT_PARAMS'],[-1,' * {Object} Hashtable of default parameter key\/value pairs '],[-1,' *\/'],[-1,' DEFAULT_PARAMS: { service: \"WMS\",'],[-1,' version: \"1.1.1\",'],[-1,' request: \"GetMap\",'],[-1,' styles: \"\",'],[-1,' format: \"image\/jpeg\"'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: isBaseLayer'],[-1,' * {Boolean} Default is true for WMS layer'],[-1,' *\/'],[-1,' isBaseLayer: true,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: encodeBBOX'],[-1,' * {Boolean} Should the BBOX commas be encoded? The WMS spec says \'no\', '],[-1,' * but some services want it that way. Default false.'],[-1,' *\/'],[-1,' encodeBBOX: false,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: noMagic '],[-1,' * {Boolean} If true, the image format will not be automagicaly switched '],[-1,' * from image\/jpeg to image\/png or image\/gif when using '],[-1,' * TRANSPARENT=TRUE. Also isBaseLayer will not changed by the '],[-1,' * constructor. Default false. '],[-1,' *\/ '],[-1,' noMagic: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: yx'],[-1,' * {Object} Keys in this object are EPSG codes for which the axis order'],[-1,' * is to be reversed (yx instead of xy, LatLon instead of LonLat), with'],[-1,' * true as value. This is only relevant for WMS versions >= 1.3.0, and'],[-1,' * only if yx is not set in <OpenLayers.Projection.defaults> for the'],[-1,' * used projection.'],[-1,' *\/'],[-1,' yx: {},'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Layer.WMS'],[-1,' * Create a new WMS layer object'],[-1,' *'],[-1,' * Examples:'],[-1,' *'],[-1,' * The code below creates a simple WMS layer using the image\/jpeg format.'],[-1,' * (code)'],[-1,' * var wms = new OpenLayers.Layer.WMS(\"NASA Global Mosaic\",'],[-1,' * \"http:\/\/wms.jpl.nasa.gov\/wms.cgi\", '],[-1,' * {layers: \"modis,global_mosaic\"});'],[-1,' * (end)'],[-1,' * Note the 3rd argument (params). Properties added to this object will be'],[-1,' * added to the WMS GetMap requests used for this layer\'s tiles. The only'],[-1,' * mandatory parameter is \"layers\". Other common WMS params include'],[-1,' * \"transparent\", \"styles\" and \"format\". Note that the \"srs\" param will'],[-1,' * always be ignored. Instead, it will be derived from the baseLayer\'s or'],[-1,' * map\'s projection.'],[-1,' *'],[-1,' * The code below creates a transparent WMS layer with additional options.'],[-1,' * (code)'],[-1,' * var wms = new OpenLayers.Layer.WMS(\"NASA Global Mosaic\",'],[-1,' * \"http:\/\/wms.jpl.nasa.gov\/wms.cgi\", '],[-1,' * {'],[-1,' * layers: \"modis,global_mosaic\",'],[-1,' * transparent: true'],[-1,' * }, {'],[-1,' * opacity: 0.5,'],[-1,' * singleTile: true'],[-1,' * });'],[-1,' * (end)'],[-1,' * Note that by default, a WMS layer is configured as baseLayer. Setting'],[-1,' * the \"transparent\" param to true will apply some magic (see <noMagic>).'],[-1,' * The default image format changes from image\/jpeg to image\/png, and the'],[-1,' * layer is not configured as baseLayer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String} A name for the layer'],[-1,' * url - {String} Base url for the WMS'],[-1,' * (e.g. http:\/\/wms.jpl.nasa.gov\/wms.cgi)'],[-1,' * params - {Object} An object with key\/value pairs representing the'],[-1,' * GetMap query string parameters and parameter values.'],[-1,' * options - {Object} Hashtable of extra options to tag onto the layer.'],[-1,' * These options include all properties listed above, plus the ones'],[-1,' * inherited from superclasses.'],[-1,' *\/'],[-1,' initialize: function(name, url, params, options) {'],[0,' var newArguments = [];'],[-1,' \/\/uppercase params'],[0,' params = OpenLayers.Util.upperCaseObject(params);'],[0,' if (parseFloat(params.VERSION) >= 1.3 && !params.EXCEPTIONS) {'],[0,' params.EXCEPTIONS = \"INIMAGE\";'],[-1,' } '],[0,' newArguments.push(name, url, params, options);'],[0,' OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);'],[0,' OpenLayers.Util.applyDefaults('],[-1,' this.params, '],[-1,' OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS)'],[-1,' );'],[-1,''],[-1,''],[-1,' \/\/layer is transparent '],[0,' if (!this.noMagic && this.params.TRANSPARENT && '],[-1,' this.params.TRANSPARENT.toString().toLowerCase() == \"true\") {'],[-1,' '],[-1,' \/\/ unless explicitly set in options, make layer an overlay'],[0,' if ( (options == null) || (!options.isBaseLayer) ) {'],[0,' this.isBaseLayer = false;'],[-1,' } '],[-1,' '],[-1,' \/\/ jpegs can never be transparent, so intelligently switch the '],[-1,' \/\/ format, depending on the browser\'s capabilities'],[0,' if (this.params.FORMAT == \"image\/jpeg\") {'],[0,' this.params.FORMAT = OpenLayers.Util.alphaHack() ? \"image\/gif\"'],[-1,' : \"image\/png\";'],[-1,' }'],[-1,' }'],[-1,''],[-1,' }, '],[-1,''],[-1,' \/**'],[-1,' * Method: clone'],[-1,' * Create a clone of this layer'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Layer.WMS>} An exact clone of this layer'],[-1,' *\/'],[-1,' clone: function (obj) {'],[-1,' '],[0,' if (obj == null) {'],[0,' obj = new OpenLayers.Layer.WMS(this.name,'],[-1,' this.url,'],[-1,' this.params,'],[-1,' this.getOptions());'],[-1,' }'],[-1,''],[-1,' \/\/get all additions from superclasses'],[0,' obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);'],[-1,''],[-1,' \/\/ copy\/set any non-init, non-simple values here'],[-1,''],[0,' return obj;'],[-1,' }, '],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: reverseAxisOrder'],[-1,' * Returns true if the axis order is reversed for the WMS version and'],[-1,' * projection of the layer.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if the axis order is reversed, false otherwise.'],[-1,' *\/'],[-1,' reverseAxisOrder: function() {'],[0,' var projCode = this.projection.getCode();'],[0,' return parseFloat(this.params.VERSION) >= 1.3 && '],[-1,' !!(this.yx[projCode] || (OpenLayers.Projection.defaults[projCode] && '],[-1,' OpenLayers.Projection.defaults[projCode].yx));'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getURL'],[-1,' * Return a GetMap query string for this layer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>} A bounds representing the bbox for the'],[-1,' * request.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} A string with the layer\'s url and parameters and also the'],[-1,' * passed-in bounds and appropriate tile size specified as '],[-1,' * parameters.'],[-1,' *\/'],[-1,' getURL: function (bounds) {'],[0,' bounds = this.adjustBounds(bounds);'],[-1,' '],[0,' var imageSize = this.getImageSize(bounds);'],[0,' var newParams = {};'],[-1,' \/\/ WMS 1.3 introduced axis order'],[0,' var reverseAxisOrder = this.reverseAxisOrder();'],[0,' newParams.BBOX = this.encodeBBOX ?'],[-1,' bounds.toBBOX(null, reverseAxisOrder) :'],[-1,' bounds.toArray(reverseAxisOrder);'],[0,' newParams.WIDTH = imageSize.w;'],[0,' newParams.HEIGHT = imageSize.h;'],[0,' var requestString = this.getFullRequestString(newParams);'],[0,' return requestString;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: mergeNewParams'],[-1,' * Catch changeParams and uppercase the new params to be merged in'],[-1,' * before calling changeParams on the super class.'],[-1,' * '],[-1,' * Once params have been changed, the tiles will be reloaded with'],[-1,' * the new parameters.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newParams - {Object} Hashtable of new params to use'],[-1,' *\/'],[-1,' mergeNewParams:function(newParams) {'],[0,' var upperParams = OpenLayers.Util.upperCaseObject(newParams);'],[0,' var newArguments = [upperParams];'],[0,' return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this, '],[-1,' newArguments);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: getFullRequestString'],[-1,' * Combine the layer\'s url with its params and these newParams. '],[-1,' * '],[-1,' * Add the SRS parameter from projection -- this is probably'],[-1,' * more eloquently done via a setProjection() method, but this '],[-1,' * works for now and always.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * newParams - {Object}'],[-1,' * altUrl - {String} Use this as the url instead of the layer\'s url'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} '],[-1,' *\/'],[-1,' getFullRequestString:function(newParams, altUrl) {'],[0,' var mapProjection = this.map.getProjectionObject();'],[0,' var projectionCode = this.projection && this.projection.equals(mapProjection) ?'],[-1,' this.projection.getCode() :'],[-1,' mapProjection.getCode();'],[0,' var value = (projectionCode == \"none\") ? null : projectionCode;'],[0,' if (parseFloat(this.params.VERSION) >= 1.3) {'],[0,' this.params.CRS = value;'],[-1,' } else {'],[0,' this.params.SRS = value;'],[-1,' }'],[-1,' '],[0,' if (typeof this.params.TRANSPARENT == \"boolean\") {'],[0,' newParams.TRANSPARENT = this.params.TRANSPARENT ? \"TRUE\" : \"FALSE\";'],[-1,' }'],[-1,''],[0,' return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply('],[-1,' this, arguments);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Layer.WMS\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/StyleMap.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/BaseTypes\/Class.js'],[-1,' * @requires OpenLayers\/Style.js'],[-1,' * @requires OpenLayers\/Feature\/Vector.js'],[-1,' *\/'],[-1,' '],[-1,'\/**'],[-1,' * Class: OpenLayers.StyleMap'],[-1,' *\/'],[1,'OpenLayers.StyleMap = OpenLayers.Class({'],[-1,' '],[-1,' \/**'],[-1,' * Property: styles'],[-1,' * {Object} Hash of {<OpenLayers.Style>}, keyed by names of well known'],[-1,' * rendering intents (e.g. \"default\", \"temporary\", \"select\", \"delete\").'],[-1,' *\/'],[-1,' styles: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: extendDefault'],[-1,' * {Boolean} if true, every render intent will extend the symbolizers'],[-1,' * specified for the \"default\" intent at rendering time. Otherwise, every'],[-1,' * rendering intent will be treated as a completely independent style.'],[-1,' *\/'],[-1,' extendDefault: true,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.StyleMap'],[-1,' * '],[-1,' * Parameters:'],[-1,' * style - {Object} Optional. Either a style hash, or a style object, or'],[-1,' * a hash of style objects (style hashes) keyed by rendering'],[-1,' * intent. If just one style hash or style object is passed,'],[-1,' * this will be used for all known render intents (default,'],[-1,' * select, temporary)'],[-1,' * options - {Object} optional hash of additional options for this'],[-1,' * instance'],[-1,' *\/'],[-1,' initialize: function (style, options) {'],[0,' this.styles = {'],[-1,' \"default\": new OpenLayers.Style('],[-1,' OpenLayers.Feature.Vector.style[\"default\"]),'],[-1,' \"select\": new OpenLayers.Style('],[-1,' OpenLayers.Feature.Vector.style[\"select\"]),'],[-1,' \"temporary\": new OpenLayers.Style('],[-1,' OpenLayers.Feature.Vector.style[\"temporary\"]),'],[-1,' \"delete\": new OpenLayers.Style('],[-1,' OpenLayers.Feature.Vector.style[\"delete\"])'],[-1,' };'],[-1,' '],[-1,' \/\/ take whatever the user passed as style parameter and convert it'],[-1,' \/\/ into parts of stylemap.'],[0,' if(style instanceof OpenLayers.Style) {'],[-1,' \/\/ user passed a style object'],[0,' this.styles[\"default\"] = style;'],[0,' this.styles[\"select\"] = style;'],[0,' this.styles[\"temporary\"] = style;'],[0,' this.styles[\"delete\"] = style;'],[0,' } else if(typeof style == \"object\") {'],[0,' for(var key in style) {'],[0,' if(style[key] instanceof OpenLayers.Style) {'],[-1,' \/\/ user passed a hash of style objects'],[0,' this.styles[key] = style[key];'],[0,' } else if(typeof style[key] == \"object\") {'],[-1,' \/\/ user passsed a hash of style hashes'],[0,' this.styles[key] = new OpenLayers.Style(style[key]);'],[-1,' } else {'],[-1,' \/\/ user passed a style hash (i.e. symbolizer)'],[0,' this.styles[\"default\"] = new OpenLayers.Style(style);'],[0,' this.styles[\"select\"] = new OpenLayers.Style(style);'],[0,' this.styles[\"temporary\"] = new OpenLayers.Style(style);'],[0,' this.styles[\"delete\"] = new OpenLayers.Style(style);'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' OpenLayers.Util.extend(this, options);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' for(var key in this.styles) {'],[0,' this.styles[key].destroy();'],[-1,' }'],[0,' this.styles = null;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: createSymbolizer'],[-1,' * Creates the symbolizer for a feature for a render intent.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * feature - {<OpenLayers.Feature>} The feature to evaluate the rules'],[-1,' * of the intended style against.'],[-1,' * intent - {String} The intent determines the symbolizer that will be'],[-1,' * used to draw the feature. Well known intents are \"default\"'],[-1,' * (for just drawing the features), \"select\" (for selected'],[-1,' * features) and \"temporary\" (for drawing features).'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} symbolizer hash'],[-1,' *\/'],[-1,' createSymbolizer: function(feature, intent) {'],[0,' if(!feature) {'],[0,' feature = new OpenLayers.Feature.Vector();'],[-1,' }'],[0,' if(!this.styles[intent]) {'],[0,' intent = \"default\";'],[-1,' }'],[0,' feature.renderIntent = intent;'],[0,' var defaultSymbolizer = {};'],[0,' if(this.extendDefault && intent != \"default\") {'],[0,' defaultSymbolizer = this.styles[\"default\"].createSymbolizer(feature);'],[-1,' }'],[0,' return OpenLayers.Util.extend(defaultSymbolizer,'],[-1,' this.styles[intent].createSymbolizer(feature));'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: addUniqueValueRules'],[-1,' * Convenience method to create comparison rules for unique values of a'],[-1,' * property. The rules will be added to the style object for a specified'],[-1,' * rendering intent. This method is a shortcut for creating something like'],[-1,' * the \"unique value legends\" familiar from well known desktop GIS systems'],[-1,' * '],[-1,' * Parameters:'],[-1,' * renderIntent - {String} rendering intent to add the rules to'],[-1,' * property - {String} values of feature attributes to create the'],[-1,' * rules for'],[-1,' * symbolizers - {Object} Hash of symbolizers, keyed by the desired'],[-1,' * property values '],[-1,' * context - {Object} An optional object with properties that'],[-1,' * symbolizers\' property values should be evaluated'],[-1,' * against. If no context is specified, feature.attributes'],[-1,' * will be used'],[-1,' *\/'],[-1,' addUniqueValueRules: function(renderIntent, property, symbolizers, context) {'],[0,' var rules = [];'],[0,' for (var value in symbolizers) {'],[0,' rules.push(new OpenLayers.Rule({'],[-1,' symbolizer: symbolizers[value],'],[-1,' context: context,'],[-1,' filter: new OpenLayers.Filter.Comparison({'],[-1,' type: OpenLayers.Filter.Comparison.EQUAL_TO,'],[-1,' property: property,'],[-1,' value: value'],[-1,' })'],[-1,' }));'],[-1,' }'],[0,' this.styles[renderIntent].addRules(rules);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.StyleMap\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Layer\/Vector.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Layer.js'],[-1,' * @requires OpenLayers\/Renderer.js'],[-1,' * @requires OpenLayers\/StyleMap.js'],[-1,' * @requires OpenLayers\/Feature\/Vector.js'],[-1,' * @requires OpenLayers\/Console.js'],[-1,' * @requires OpenLayers\/Lang.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Layer.Vector'],[-1,' * Instances of OpenLayers.Layer.Vector are used to render vector data from'],[-1,' * a variety of sources. Create a new vector layer with the'],[-1,' * <OpenLayers.Layer.Vector> constructor.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Layer>'],[-1,' *\/'],[1,'OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>}'],[-1,' *'],[-1,' * Register a listener for a particular event with the following syntax:'],[-1,' * (code)'],[-1,' * layer.events.register(type, obj, listener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Listeners will be called with a reference to an event object. The'],[-1,' * properties of this event depends on exactly what happened.'],[-1,' *'],[-1,' * All event objects have at least the following properties:'],[-1,' * object - {Object} A reference to layer.events.object.'],[-1,' * element - {DOMElement} A reference to layer.events.element.'],[-1,' *'],[-1,' * Supported map event types (in addition to those from <OpenLayers.Layer.events>):'],[-1,' * beforefeatureadded - Triggered before a feature is added. Listeners'],[-1,' * will receive an object with a *feature* property referencing the'],[-1,' * feature to be added. To stop the feature from being added, a'],[-1,' * listener should return false.'],[-1,' * beforefeaturesadded - Triggered before an array of features is added.'],[-1,' * Listeners will receive an object with a *features* property'],[-1,' * referencing the feature to be added. To stop the features from'],[-1,' * being added, a listener should return false.'],[-1,' * featureadded - Triggered after a feature is added. The event'],[-1,' * object passed to listeners will have a *feature* property with a'],[-1,' * reference to the added feature.'],[-1,' * featuresadded - Triggered after features are added. The event'],[-1,' * object passed to listeners will have a *features* property with a'],[-1,' * reference to an array of added features.'],[-1,' * beforefeatureremoved - Triggered before a feature is removed. Listeners'],[-1,' * will receive an object with a *feature* property referencing the'],[-1,' * feature to be removed.'],[-1,' * beforefeaturesremoved - Triggered before multiple features are removed. '],[-1,' * Listeners will receive an object with a *features* property'],[-1,' * referencing the features to be removed.'],[-1,' * featureremoved - Triggered after a feature is removed. The event'],[-1,' * object passed to listeners will have a *feature* property with a'],[-1,' * reference to the removed feature.'],[-1,' * featuresremoved - Triggered after features are removed. The event'],[-1,' * object passed to listeners will have a *features* property with a'],[-1,' * reference to an array of removed features.'],[-1,' * beforefeatureselected - Triggered before a feature is selected. Listeners'],[-1,' * will receive an object with a *feature* property referencing the'],[-1,' * feature to be selected. To stop the feature from being selectd, a'],[-1,' * listener should return false.'],[-1,' * featureselected - Triggered after a feature is selected. Listeners'],[-1,' * will receive an object with a *feature* property referencing the'],[-1,' * selected feature.'],[-1,' * featureunselected - Triggered after a feature is unselected.'],[-1,' * Listeners will receive an object with a *feature* property'],[-1,' * referencing the unselected feature.'],[-1,' * beforefeaturemodified - Triggered when a feature is selected to '],[-1,' * be modified. Listeners will receive an object with a *feature* '],[-1,' * property referencing the selected feature.'],[-1,' * featuremodified - Triggered when a feature has been modified.'],[-1,' * Listeners will receive an object with a *feature* property referencing '],[-1,' * the modified feature.'],[-1,' * afterfeaturemodified - Triggered when a feature is finished being modified.'],[-1,' * Listeners will receive an object with a *feature* property referencing '],[-1,' * the modified feature.'],[-1,' * vertexmodified - Triggered when a vertex within any feature geometry'],[-1,' * has been modified. Listeners will receive an object with a'],[-1,' * *feature* property referencing the modified feature, a *vertex*'],[-1,' * property referencing the vertex modified (always a point geometry),'],[-1,' * and a *pixel* property referencing the pixel location of the'],[-1,' * modification.'],[-1,' * vertexremoved - Triggered when a vertex within any feature geometry'],[-1,' * has been deleted. Listeners will receive an object with a'],[-1,' * *feature* property referencing the modified feature, a *vertex*'],[-1,' * property referencing the vertex modified (always a point geometry),'],[-1,' * and a *pixel* property referencing the pixel location of the'],[-1,' * removal.'],[-1,' * sketchstarted - Triggered when a feature sketch bound for this layer'],[-1,' * is started. Listeners will receive an object with a *feature*'],[-1,' * property referencing the new sketch feature and a *vertex* property'],[-1,' * referencing the creation point.'],[-1,' * sketchmodified - Triggered when a feature sketch bound for this layer'],[-1,' * is modified. Listeners will receive an object with a *vertex*'],[-1,' * property referencing the modified vertex and a *feature* property'],[-1,' * referencing the sketch feature.'],[-1,' * sketchcomplete - Triggered when a feature sketch bound for this layer'],[-1,' * is complete. Listeners will receive an object with a *feature*'],[-1,' * property referencing the sketch feature. By returning false, a'],[-1,' * listener can stop the sketch feature from being added to the layer.'],[-1,' * refresh - Triggered when something wants a strategy to ask the protocol'],[-1,' * for a new set of features.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: isBaseLayer'],[-1,' * {Boolean} The layer is a base layer. Default is false. Set this property'],[-1,' * in the layer options.'],[-1,' *\/'],[-1,' isBaseLayer: false,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: isFixed'],[-1,' * {Boolean} Whether the layer remains in one place while dragging the'],[-1,' * map. Note that setting this to true will move the layer to the bottom'],[-1,' * of the layer stack.'],[-1,' *\/'],[-1,' isFixed: false,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: features'],[-1,' * {Array(<OpenLayers.Feature.Vector>)} '],[-1,' *\/'],[-1,' features: null,'],[-1,' '],[-1,' \/** '],[-1,' * Property: filter'],[-1,' * {<OpenLayers.Filter>} The filter set in this layer,'],[-1,' * a strategy launching read requests can combined'],[-1,' * this filter with its own filter.'],[-1,' *\/'],[-1,' filter: null,'],[-1,' '],[-1,' \/** '],[-1,' * Property: selectedFeatures'],[-1,' * {Array(<OpenLayers.Feature.Vector>)} '],[-1,' *\/'],[-1,' selectedFeatures: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: unrenderedFeatures'],[-1,' * {Object} hash of features, keyed by feature.id, that the renderer'],[-1,' * failed to draw'],[-1,' *\/'],[-1,' unrenderedFeatures: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: reportError'],[-1,' * {Boolean} report friendly error message when loading of renderer'],[-1,' * fails.'],[-1,' *\/'],[-1,' reportError: true, '],[-1,''],[-1,' \/** '],[-1,' * APIProperty: style'],[-1,' * {Object} Default style for the layer'],[-1,' *\/'],[-1,' style: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: styleMap'],[-1,' * {<OpenLayers.StyleMap>}'],[-1,' *\/'],[-1,' styleMap: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: strategies'],[-1,' * {Array(<OpenLayers.Strategy>})} Optional list of strategies for the layer.'],[-1,' *\/'],[-1,' strategies: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: protocol'],[-1,' * {<OpenLayers.Protocol>} Optional protocol for the layer.'],[-1,' *\/'],[-1,' protocol: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: renderers'],[-1,' * {Array(String)} List of supported Renderer classes. Add to this list to'],[-1,' * add support for additional renderers. This list is ordered:'],[-1,' * the first renderer which returns true for the \'supported()\''],[-1,' * method will be used, if not defined in the \'renderer\' option.'],[-1,' *\/'],[-1,' renderers: [\'SVG\', \'VML\', \'Canvas\'],'],[-1,' '],[-1,' \/** '],[-1,' * Property: renderer'],[-1,' * {<OpenLayers.Renderer>}'],[-1,' *\/'],[-1,' renderer: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: rendererOptions'],[-1,' * {Object} Options for the renderer. See {<OpenLayers.Renderer>} for'],[-1,' * supported options.'],[-1,' *\/'],[-1,' rendererOptions: null,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: geometryType'],[-1,' * {String} geometryType allows you to limit the types of geometries this'],[-1,' * layer supports. This should be set to something like'],[-1,' * \"OpenLayers.Geometry.Point\" to limit types.'],[-1,' *\/'],[-1,' geometryType: null,'],[-1,''],[-1,' \/** '],[-1,' * Property: drawn'],[-1,' * {Boolean} Whether the Vector Layer features have been drawn yet.'],[-1,' *\/'],[-1,' drawn: false,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: ratio'],[-1,' * {Float} This specifies the ratio of the size of the visiblity of the Vector Layer features to the size of the map.'],[-1,' *\/ '],[-1,' ratio: 1,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Layer.Vector'],[-1,' * Create a new vector layer'],[-1,' *'],[-1,' * Parameters:'],[-1,' * name - {String} A name for the layer'],[-1,' * options - {Object} Optional object with non-default properties to set on'],[-1,' * the layer.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Layer.Vector>} A new vector layer'],[-1,' *\/'],[-1,' initialize: function(name, options) {'],[0,' OpenLayers.Layer.prototype.initialize.apply(this, arguments);'],[-1,''],[-1,' \/\/ allow user-set renderer, otherwise assign one'],[0,' if (!this.renderer || !this.renderer.supported()) { '],[0,' this.assignRenderer();'],[-1,' }'],[-1,''],[-1,' \/\/ if no valid renderer found, display error'],[0,' if (!this.renderer || !this.renderer.supported()) {'],[0,' this.renderer = null;'],[0,' this.displayError();'],[-1,' } '],[-1,''],[0,' if (!this.styleMap) {'],[0,' this.styleMap = new OpenLayers.StyleMap();'],[-1,' }'],[-1,''],[0,' this.features = [];'],[0,' this.selectedFeatures = [];'],[0,' this.unrenderedFeatures = {};'],[-1,' '],[-1,' \/\/ Allow for custom layer behavior'],[0,' if(this.strategies){'],[0,' for(var i=0, len=this.strategies.length; i<len; i++) {'],[0,' this.strategies[i].setLayer(this);'],[-1,' }'],[-1,' }'],[-1,''],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' * Destroy this layer'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' if (this.strategies) {'],[0,' var strategy, i, len;'],[0,' for(i=0, len=this.strategies.length; i<len; i++) {'],[0,' strategy = this.strategies[i];'],[0,' if(strategy.autoDestroy) {'],[0,' strategy.destroy();'],[-1,' }'],[-1,' }'],[0,' this.strategies = null;'],[-1,' }'],[0,' if (this.protocol) {'],[0,' if(this.protocol.autoDestroy) {'],[0,' this.protocol.destroy();'],[-1,' }'],[0,' this.protocol = null;'],[-1,' }'],[0,' this.destroyFeatures();'],[0,' this.features = null;'],[0,' this.selectedFeatures = null;'],[0,' this.unrenderedFeatures = null;'],[0,' if (this.renderer) {'],[0,' this.renderer.destroy();'],[-1,' }'],[0,' this.renderer = null;'],[0,' this.geometryType = null;'],[0,' this.drawn = null;'],[0,' OpenLayers.Layer.prototype.destroy.apply(this, arguments); '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: clone'],[-1,' * Create a clone of this layer.'],[-1,' * '],[-1,' * Note: Features of the layer are also cloned.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Layer.Vector>} An exact clone of this layer'],[-1,' *\/'],[-1,' clone: function (obj) {'],[-1,' '],[0,' if (obj == null) {'],[0,' obj = new OpenLayers.Layer.Vector(this.name, this.getOptions());'],[-1,' }'],[-1,''],[-1,' \/\/get all additions from superclasses'],[0,' obj = OpenLayers.Layer.prototype.clone.apply(this, [obj]);'],[-1,''],[-1,' \/\/ copy\/set any non-init, non-simple values here'],[0,' var features = this.features;'],[0,' var len = features.length;'],[0,' var clonedFeatures = new Array(len);'],[0,' for(var i=0; i<len; ++i) {'],[0,' clonedFeatures[i] = features[i].clone();'],[-1,' }'],[0,' obj.features = clonedFeatures;'],[-1,''],[0,' return obj;'],[-1,' }, '],[-1,' '],[-1,' \/**'],[-1,' * Method: refresh'],[-1,' * Ask the layer to request features again and redraw them. Triggers'],[-1,' * the refresh event if the layer is in range and visible.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * obj - {Object} Optional object with properties for any listener of'],[-1,' * the refresh event.'],[-1,' *\/'],[-1,' refresh: function(obj) {'],[0,' if(this.calculateInRange() && this.visibility) {'],[0,' this.events.triggerEvent(\"refresh\", obj);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: assignRenderer'],[-1,' * Iterates through the available renderer implementations and selects '],[-1,' * and assigns the first one whose \"supported()\" function returns true.'],[-1,' *\/ '],[-1,' assignRenderer: function() {'],[0,' for (var i=0, len=this.renderers.length; i<len; i++) {'],[0,' var rendererClass = this.renderers[i];'],[0,' var renderer = (typeof rendererClass == \"function\") ?'],[-1,' rendererClass :'],[-1,' OpenLayers.Renderer[rendererClass];'],[0,' if (renderer && renderer.prototype.supported()) {'],[0,' this.renderer = new renderer(this.div, this.rendererOptions);'],[0,' break;'],[-1,' } '],[-1,' } '],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: displayError '],[-1,' * Let the user know their browser isn\'t supported.'],[-1,' *\/'],[-1,' displayError: function() {'],[0,' if (this.reportError) {'],[0,' OpenLayers.Console.userError(OpenLayers.i18n(\"browserNotSupported\", '],[-1,' {renderers: this. renderers.join(\'\\n\')}));'],[-1,' } '],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: setMap'],[-1,' * The layer has been added to the map. '],[-1,' * '],[-1,' * If there is no renderer set, the layer can\'t be used. Remove it.'],[-1,' * Otherwise, give the renderer a reference to the map and set its size.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>} '],[-1,' *\/'],[-1,' setMap: function(map) { '],[0,' OpenLayers.Layer.prototype.setMap.apply(this, arguments);'],[-1,''],[0,' if (!this.renderer) {'],[0,' this.map.removeLayer(this);'],[-1,' } else {'],[0,' this.renderer.map = this.map;'],[-1,''],[0,' var newSize = this.map.getSize();'],[0,' newSize.w = newSize.w * this.ratio;'],[0,' newSize.h = newSize.h * this.ratio;'],[0,' this.renderer.setSize(newSize);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: afterAdd'],[-1,' * Called at the end of the map.addLayer sequence. At this point, the map'],[-1,' * will have a base layer. Any autoActivate strategies will be'],[-1,' * activated here.'],[-1,' *\/'],[-1,' afterAdd: function() {'],[0,' if(this.strategies) {'],[0,' var strategy, i, len;'],[0,' for(i=0, len=this.strategies.length; i<len; i++) {'],[0,' strategy = this.strategies[i];'],[0,' if(strategy.autoActivate) {'],[0,' strategy.activate();'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: removeMap'],[-1,' * The layer has been removed from the map.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * map - {<OpenLayers.Map>}'],[-1,' *\/'],[-1,' removeMap: function(map) {'],[0,' this.drawn = false;'],[0,' if(this.strategies) {'],[0,' var strategy, i, len;'],[0,' for(i=0, len=this.strategies.length; i<len; i++) {'],[0,' strategy = this.strategies[i];'],[0,' if(strategy.autoActivate) {'],[0,' strategy.deactivate();'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: onMapResize'],[-1,' * Notify the renderer of the change in size. '],[-1,' * '],[-1,' *\/'],[-1,' onMapResize: function() {'],[0,' OpenLayers.Layer.prototype.onMapResize.apply(this, arguments);'],[-1,' '],[0,' var newSize = this.map.getSize();'],[0,' newSize.w = newSize.w * this.ratio;'],[0,' newSize.h = newSize.h * this.ratio;'],[0,' this.renderer.setSize(newSize);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: moveTo'],[-1,' * Reset the vector layer\'s div so that it once again is lined up with '],[-1,' * the map. Notify the renderer of the change of extent, and in the'],[-1,' * case of a change of zoom level (resolution), have the '],[-1,' * renderer redraw features.'],[-1,' * '],[-1,' * If the layer has not yet been drawn, cycle through the layer\'s '],[-1,' * features and draw each one.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>} '],[-1,' * zoomChanged - {Boolean} '],[-1,' * dragging - {Boolean} '],[-1,' *\/'],[-1,' moveTo: function(bounds, zoomChanged, dragging) {'],[0,' OpenLayers.Layer.prototype.moveTo.apply(this, arguments);'],[-1,' '],[0,' var coordSysUnchanged = true;'],[0,' if (!dragging) {'],[0,' this.renderer.root.style.visibility = \'hidden\';'],[-1,''],[0,' var viewSize = this.map.getSize(),'],[-1,' viewWidth = viewSize.w,'],[-1,' viewHeight = viewSize.h,'],[-1,' offsetLeft = (viewWidth \/ 2 * this.ratio) - viewWidth \/ 2,'],[-1,' offsetTop = (viewHeight \/ 2 * this.ratio) - viewHeight \/ 2;'],[0,' offsetLeft += this.map.layerContainerOriginPx.x;'],[0,' offsetLeft = -Math.round(offsetLeft);'],[0,' offsetTop += this.map.layerContainerOriginPx.y;'],[0,' offsetTop = -Math.round(offsetTop);'],[-1,''],[0,' this.div.style.left = offsetLeft + \'px\';'],[0,' this.div.style.top = offsetTop + \'px\';'],[-1,''],[0,' var extent = this.map.getExtent().scale(this.ratio);'],[0,' coordSysUnchanged = this.renderer.setExtent(extent, zoomChanged);'],[-1,''],[0,' this.renderer.root.style.visibility = \'visible\';'],[-1,''],[-1,' \/\/ Force a reflow on gecko based browsers to prevent jump\/flicker.'],[-1,' \/\/ This seems to happen on only certain configurations; it was originally'],[-1,' \/\/ noticed in FF 2.0 and Linux.'],[0,' if (OpenLayers.IS_GECKO === true) {'],[0,' this.div.scrollLeft = this.div.scrollLeft;'],[-1,' }'],[-1,' '],[0,' if (!zoomChanged && coordSysUnchanged) {'],[0,' for (var i in this.unrenderedFeatures) {'],[0,' var feature = this.unrenderedFeatures[i];'],[0,' this.drawFeature(feature);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' if (!this.drawn || zoomChanged || !coordSysUnchanged) {'],[0,' this.drawn = true;'],[0,' var feature;'],[0,' for(var i=0, len=this.features.length; i<len; i++) {'],[0,' this.renderer.locked = (i !== (len - 1));'],[0,' feature = this.features[i];'],[0,' this.drawFeature(feature);'],[-1,' }'],[-1,' } '],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: display'],[-1,' * Hide or show the Layer'],[-1,' * '],[-1,' * Parameters:'],[-1,' * display - {Boolean}'],[-1,' *\/'],[-1,' display: function(display) {'],[0,' OpenLayers.Layer.prototype.display.apply(this, arguments);'],[-1,' \/\/ we need to set the display style of the root in case it is attached'],[-1,' \/\/ to a foreign layer'],[0,' var currentDisplay = this.div.style.display;'],[0,' if(currentDisplay != this.renderer.root.style.display) {'],[0,' this.renderer.root.style.display = currentDisplay;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: addFeatures'],[-1,' * Add Features to the layer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * features - {Array(<OpenLayers.Feature.Vector>)} '],[-1,' * options - {Object}'],[-1,' *\/'],[-1,' addFeatures: function(features, options) {'],[0,' if (!(OpenLayers.Util.isArray(features))) {'],[0,' features = [features];'],[-1,' }'],[-1,' '],[0,' var notify = !options || !options.silent;'],[0,' if(notify) {'],[0,' var event = {features: features};'],[0,' var ret = this.events.triggerEvent(\"beforefeaturesadded\", event);'],[0,' if(ret === false) {'],[0,' return;'],[-1,' }'],[0,' features = event.features;'],[-1,' }'],[-1,' '],[-1,' \/\/ Track successfully added features for featuresadded event, since'],[-1,' \/\/ beforefeatureadded can veto single features.'],[0,' var featuresAdded = [];'],[0,' for (var i=0, len=features.length; i<len; i++) {'],[0,' if (i != (features.length - 1)) {'],[0,' this.renderer.locked = true;'],[-1,' } else {'],[0,' this.renderer.locked = false;'],[-1,' } '],[0,' var feature = features[i];'],[-1,' '],[0,' if (this.geometryType &&'],[-1,' !(feature.geometry instanceof this.geometryType)) {'],[0,' throw new TypeError(\'addFeatures: component should be an \' +'],[-1,' this.geometryType.prototype.CLASS_NAME);'],[-1,' }'],[-1,''],[-1,' \/\/give feature reference to its layer'],[0,' feature.layer = this;'],[-1,''],[0,' if (!feature.style && this.style) {'],[0,' feature.style = OpenLayers.Util.extend({}, this.style);'],[-1,' }'],[-1,''],[0,' if (notify) {'],[0,' if(this.events.triggerEvent(\"beforefeatureadded\",'],[-1,' {feature: feature}) === false) {'],[0,' continue;'],[-1,' }'],[0,' this.preFeatureInsert(feature);'],[-1,' }'],[-1,''],[0,' featuresAdded.push(feature);'],[0,' this.features.push(feature);'],[0,' this.drawFeature(feature);'],[-1,' '],[0,' if (notify) {'],[0,' this.events.triggerEvent(\"featureadded\", {'],[-1,' feature: feature'],[-1,' });'],[0,' this.onFeatureInsert(feature);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if(notify) {'],[0,' this.events.triggerEvent(\"featuresadded\", {features: featuresAdded});'],[-1,' }'],[-1,' },'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * APIMethod: removeFeatures'],[-1,' * Remove features from the layer. This erases any drawn features and'],[-1,' * removes them from the layer\'s control. The beforefeatureremoved'],[-1,' * and featureremoved events will be triggered for each feature. The'],[-1,' * featuresremoved event will be triggered after all features have'],[-1,' * been removed. To suppress event triggering, use the silent option.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * features - {Array(<OpenLayers.Feature.Vector>)} List of features to be'],[-1,' * removed.'],[-1,' * options - {Object} Optional properties for changing behavior of the'],[-1,' * removal.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * silent - {Boolean} Suppress event triggering. Default is false.'],[-1,' *\/'],[-1,' removeFeatures: function(features, options) {'],[0,' if(!features || features.length === 0) {'],[0,' return;'],[-1,' }'],[0,' if (features === this.features) {'],[0,' return this.removeAllFeatures(options);'],[-1,' }'],[0,' if (!(OpenLayers.Util.isArray(features))) {'],[0,' features = [features];'],[-1,' }'],[0,' if (features === this.selectedFeatures) {'],[0,' features = features.slice();'],[-1,' }'],[-1,''],[0,' var notify = !options || !options.silent;'],[-1,' '],[0,' if (notify) {'],[0,' this.events.triggerEvent('],[-1,' \"beforefeaturesremoved\", {features: features}'],[-1,' );'],[-1,' }'],[-1,''],[0,' for (var i = features.length - 1; i >= 0; i--) {'],[-1,' \/\/ We remain locked so long as we\'re not at 0'],[-1,' \/\/ and the \'next\' feature has a geometry. We do the geometry check'],[-1,' \/\/ because if all the features after the current one are \'null\', we'],[-1,' \/\/ won\'t call eraseGeometry, so we break the \'renderer functions'],[-1,' \/\/ will always be called with locked=false *last*\' rule. The end result'],[-1,' \/\/ is a possible gratiutious unlocking to save a loop through the rest '],[-1,' \/\/ of the list checking the remaining features every time. So long as'],[-1,' \/\/ null geoms are rare, this is probably okay. '],[0,' if (i != 0 && features[i-1].geometry) {'],[0,' this.renderer.locked = true;'],[-1,' } else {'],[0,' this.renderer.locked = false;'],[-1,' }'],[-1,' '],[0,' var feature = features[i];'],[0,' delete this.unrenderedFeatures[feature.id];'],[-1,''],[0,' if (notify) {'],[0,' this.events.triggerEvent(\"beforefeatureremoved\", {'],[-1,' feature: feature'],[-1,' });'],[-1,' }'],[-1,''],[0,' this.features = OpenLayers.Util.removeItem(this.features, feature);'],[-1,' \/\/ feature has no layer at this point'],[0,' feature.layer = null;'],[-1,''],[0,' if (feature.geometry) {'],[0,' this.renderer.eraseFeatures(feature);'],[-1,' }'],[-1,' '],[-1,' \/\/in the case that this feature is one of the selected features, '],[-1,' \/\/ remove it from that array as well.'],[0,' if (OpenLayers.Util.indexOf(this.selectedFeatures, feature) != -1){'],[0,' OpenLayers.Util.removeItem(this.selectedFeatures, feature);'],[-1,' }'],[-1,''],[0,' if (notify) {'],[0,' this.events.triggerEvent(\"featureremoved\", {'],[-1,' feature: feature'],[-1,' });'],[-1,' }'],[-1,' }'],[-1,''],[0,' if (notify) {'],[0,' this.events.triggerEvent(\"featuresremoved\", {features: features});'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * APIMethod: removeAllFeatures'],[-1,' * Remove all features from the layer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} Optional properties for changing behavior of the'],[-1,' * removal.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * silent - {Boolean} Suppress event triggering. Default is false.'],[-1,' *\/'],[-1,' removeAllFeatures: function(options) {'],[0,' var notify = !options || !options.silent;'],[0,' var features = this.features;'],[0,' if (notify) {'],[0,' this.events.triggerEvent('],[-1,' \"beforefeaturesremoved\", {features: features}'],[-1,' );'],[-1,' }'],[0,' var feature;'],[0,' for (var i = features.length-1; i >= 0; i--) {'],[0,' feature = features[i];'],[0,' if (notify) {'],[0,' this.events.triggerEvent(\"beforefeatureremoved\", {'],[-1,' feature: feature'],[-1,' });'],[-1,' }'],[0,' feature.layer = null;'],[0,' if (notify) {'],[0,' this.events.triggerEvent(\"featureremoved\", {'],[-1,' feature: feature'],[-1,' });'],[-1,' }'],[-1,' }'],[0,' this.renderer.clear();'],[0,' this.features = [];'],[0,' this.unrenderedFeatures = {};'],[0,' this.selectedFeatures = [];'],[0,' if (notify) {'],[0,' this.events.triggerEvent(\"featuresremoved\", {features: features});'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: destroyFeatures'],[-1,' * Erase and destroy features on the layer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * features - {Array(<OpenLayers.Feature.Vector>)} An optional array of'],[-1,' * features to destroy. If not supplied, all features on the layer'],[-1,' * will be destroyed.'],[-1,' * options - {Object}'],[-1,' *\/'],[-1,' destroyFeatures: function(features, options) {'],[0,' var all = (features == undefined); \/\/ evaluates to true if'],[-1,' \/\/ features is null'],[0,' if(all) {'],[0,' features = this.features;'],[-1,' }'],[0,' if(features) {'],[0,' this.removeFeatures(features, options);'],[0,' for(var i=features.length-1; i>=0; i--) {'],[0,' features[i].destroy();'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: drawFeature'],[-1,' * Draw (or redraw) a feature on the layer. If the optional style argument'],[-1,' * is included, this style will be used. If no style is included, the'],[-1,' * feature\'s style will be used. If the feature doesn\'t have a style,'],[-1,' * the layer\'s style will be used.'],[-1,' * '],[-1,' * This function is not designed to be used when adding features to '],[-1,' * the layer (use addFeatures instead). It is meant to be used when'],[-1,' * the style of a feature has changed, or in some other way needs to '],[-1,' * visually updated *after* it has already been added to a layer. You'],[-1,' * must add the feature to the layer for most layer-related events to '],[-1,' * happen.'],[-1,' *'],[-1,' * Parameters: '],[-1,' * feature - {<OpenLayers.Feature.Vector>} '],[-1,' * style - {String | Object} Named render intent or full symbolizer object.'],[-1,' *\/'],[-1,' drawFeature: function(feature, style) {'],[-1,' \/\/ don\'t try to draw the feature with the renderer if the layer is not '],[-1,' \/\/ drawn itself'],[0,' if (!this.drawn) {'],[0,' return;'],[-1,' }'],[0,' if (typeof style != \"object\") {'],[0,' if(!style && feature.state === OpenLayers.State.DELETE) {'],[0,' style = \"delete\";'],[-1,' }'],[0,' var renderIntent = style || feature.renderIntent;'],[0,' style = feature.style || this.style;'],[0,' if (!style) {'],[0,' style = this.styleMap.createSymbolizer(feature, renderIntent);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' var drawn = this.renderer.drawFeature(feature, style);'],[-1,' \/\/TODO remove the check for null when we get rid of Renderer.SVG'],[0,' if (drawn === false || drawn === null) {'],[0,' this.unrenderedFeatures[feature.id] = feature;'],[-1,' } else {'],[0,' delete this.unrenderedFeatures[feature.id];'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: eraseFeatures'],[-1,' * Erase features from the layer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * features - {Array(<OpenLayers.Feature.Vector>)} '],[-1,' *\/'],[-1,' eraseFeatures: function(features) {'],[0,' this.renderer.eraseFeatures(features);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getFeatureFromEvent'],[-1,' * Given an event, return a feature if the event occurred over one.'],[-1,' * Otherwise, return null.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} '],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Feature.Vector>} A feature if one was under the event.'],[-1,' *\/'],[-1,' getFeatureFromEvent: function(evt) {'],[0,' if (!this.renderer) {'],[0,' throw new Error(\'getFeatureFromEvent called on layer with no \' +'],[-1,' \'renderer. This usually means you destroyed a \' +'],[-1,' \'layer, but not some handler which is associated \' +'],[-1,' \'with it.\');'],[-1,' }'],[0,' var feature = null;'],[0,' var featureId = this.renderer.getFeatureIdFromEvent(evt);'],[0,' if (featureId) {'],[0,' if (typeof featureId === \"string\") {'],[0,' feature = this.getFeatureById(featureId);'],[-1,' } else {'],[0,' feature = featureId;'],[-1,' }'],[-1,' }'],[0,' return feature;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getFeatureBy'],[-1,' * Given a property value, return the feature if it exists in the features array'],[-1,' *'],[-1,' * Parameters:'],[-1,' * property - {String}'],[-1,' * value - {String}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Feature.Vector>} A feature corresponding to the given'],[-1,' * property value or null if there is no such feature.'],[-1,' *\/'],[-1,' getFeatureBy: function(property, value) {'],[-1,' \/\/TBD - would it be more efficient to use a hash for this.features?'],[0,' var feature = null;'],[0,' for(var i=0, len=this.features.length; i<len; ++i) {'],[0,' if(this.features[i][property] == value) {'],[0,' feature = this.features[i];'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' return feature;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getFeatureById'],[-1,' * Given a feature id, return the feature if it exists in the features array'],[-1,' *'],[-1,' * Parameters:'],[-1,' * featureId - {String}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Feature.Vector>} A feature corresponding to the given'],[-1,' * featureId or null if there is no such feature.'],[-1,' *\/'],[-1,' getFeatureById: function(featureId) {'],[0,' return this.getFeatureBy(\'id\', featureId);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: getFeatureByFid'],[-1,' * Given a feature fid, return the feature if it exists in the features array'],[-1,' *'],[-1,' * Parameters:'],[-1,' * featureFid - {String}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Feature.Vector>} A feature corresponding to the given'],[-1,' * featureFid or null if there is no such feature.'],[-1,' *\/'],[-1,' getFeatureByFid: function(featureFid) {'],[0,' return this.getFeatureBy(\'fid\', featureFid);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: getFeaturesByAttribute'],[-1,' * Returns an array of features that have the given attribute key set to the'],[-1,' * given value. Comparison of attribute values takes care of datatypes, e.g.'],[-1,' * the string \'1234\' is not equal to the number 1234.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * attrName - {String}'],[-1,' * attrValue - {Mixed}'],[-1,' *'],[-1,' * Returns:'],[-1,' * Array({<OpenLayers.Feature.Vector>}) An array of features that have the '],[-1,' * passed named attribute set to the given value.'],[-1,' *\/'],[-1,' getFeaturesByAttribute: function(attrName, attrValue) {'],[0,' var i,'],[-1,' feature, '],[-1,' len = this.features.length,'],[-1,' foundFeatures = [];'],[0,' for(i = 0; i < len; i++) { '],[0,' feature = this.features[i];'],[0,' if(feature && feature.attributes) {'],[0,' if (feature.attributes[attrName] === attrValue) {'],[0,' foundFeatures.push(feature);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return foundFeatures;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Unselect the selected features'],[-1,' * i.e. clears the featureSelection array'],[-1,' * change the style back'],[-1,' clearSelection: function() {'],[-1,''],[-1,' var vectorLayer = this.map.vectorLayer;'],[-1,' for (var i = 0; i < this.map.featureSelection.length; i++) {'],[-1,' var featureSelection = this.map.featureSelection[i];'],[-1,' vectorLayer.drawFeature(featureSelection, vectorLayer.style);'],[-1,' }'],[-1,' this.map.featureSelection = [];'],[-1,' },'],[-1,' *\/'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * APIMethod: onFeatureInsert'],[-1,' * method called after a feature is inserted.'],[-1,' * Does nothing by default. Override this if you'],[-1,' * need to do something on feature updates.'],[-1,' *'],[-1,' * Parameters: '],[-1,' * feature - {<OpenLayers.Feature.Vector>} '],[-1,' *\/'],[-1,' onFeatureInsert: function(feature) {'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: preFeatureInsert'],[-1,' * method called before a feature is inserted.'],[-1,' * Does nothing by default. Override this if you'],[-1,' * need to do something when features are first added to the'],[-1,' * layer, but before they are drawn, such as adjust the style.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * feature - {<OpenLayers.Feature.Vector>} '],[-1,' *\/'],[-1,' preFeatureInsert: function(feature) {'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * APIMethod: getDataExtent'],[-1,' * Calculates the max extent which includes all of the features.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} or null if the layer has no features with'],[-1,' * geometries.'],[-1,' *\/'],[-1,' getDataExtent: function () {'],[0,' var maxExtent = null;'],[0,' var features = this.features;'],[0,' if(features && (features.length > 0)) {'],[0,' var geometry = null;'],[0,' for(var i=0, len=features.length; i<len; i++) {'],[0,' geometry = features[i].geometry;'],[0,' if (geometry) {'],[0,' if (maxExtent === null) {'],[0,' maxExtent = new OpenLayers.Bounds();'],[-1,' }'],[0,' maxExtent.extend(geometry.getBounds());'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return maxExtent;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Layer.Vector\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Renderer\/Canvas.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Renderer.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Renderer.Canvas '],[-1,' * A renderer based on the 2D \'canvas\' drawing element.'],[-1,' * '],[-1,' * Inherits:'],[-1,' * - <OpenLayers.Renderer>'],[-1,' *\/'],[1,'OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: hitDetection'],[-1,' * {Boolean} Allow for hit detection of features. Default is true.'],[-1,' *\/'],[-1,' hitDetection: true,'],[-1,' '],[-1,' \/**'],[-1,' * Property: hitOverflow'],[-1,' * {Number} The method for converting feature identifiers to color values'],[-1,' * supports 16777215 sequential values. Two features cannot be '],[-1,' * predictably detected if their identifiers differ by more than this'],[-1,' * value. The hitOverflow allows for bigger numbers (but the '],[-1,' * difference in values is still limited).'],[-1,' *\/'],[-1,' hitOverflow: 0,'],[-1,''],[-1,' \/**'],[-1,' * Property: canvas'],[-1,' * {Canvas} The canvas context object.'],[-1,' *\/'],[-1,' canvas: null, '],[-1,' '],[-1,' \/**'],[-1,' * Property: features'],[-1,' * {Object} Internal object of feature\/style pairs for use in redrawing the layer.'],[-1,' *\/'],[-1,' features: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: pendingRedraw'],[-1,' * {Boolean} The renderer needs a redraw call to render features added while'],[-1,' * the renderer was locked.'],[-1,' *\/'],[-1,' pendingRedraw: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: cachedSymbolBounds'],[-1,' * {Object} Internal cache of calculated symbol extents.'],[-1,' *\/'],[-1,' cachedSymbolBounds: {},'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Renderer.Canvas'],[-1,' *'],[-1,' * Parameters:'],[-1,' * containerID - {<String>}'],[-1,' * options - {Object} Optional properties to be set on the renderer.'],[-1,' *\/'],[-1,' initialize: function(containerID, options) {'],[0,' OpenLayers.Renderer.prototype.initialize.apply(this, arguments);'],[0,' this.root = document.createElement(\"canvas\");'],[0,' this.container.appendChild(this.root);'],[0,' this.canvas = this.root.getContext(\"2d\");'],[0,' this._clearRectId = OpenLayers.Util.createUniqueID();'],[0,' this.features = {};'],[0,' if (this.hitDetection) {'],[0,' this.hitCanvas = document.createElement(\"canvas\");'],[0,' this.hitContext = this.hitCanvas.getContext(\"2d\");'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setExtent'],[-1,' * Set the visible part of the layer.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * extent - {<OpenLayers.Bounds>}'],[-1,' * resolutionChanged - {Boolean}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} true to notify the layer that the new extent does not exceed'],[-1,' * the coordinate range, and the features will not need to be redrawn.'],[-1,' * False otherwise.'],[-1,' *\/'],[-1,' setExtent: function() {'],[0,' OpenLayers.Renderer.prototype.setExtent.apply(this, arguments);'],[-1,' \/\/ always redraw features'],[0,' return false;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: eraseGeometry'],[-1,' * Erase a geometry from the renderer. Because the Canvas renderer has'],[-1,' * \'memory\' of the features that it has drawn, we have to remove the'],[-1,' * feature so it doesn\'t redraw. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * featureId - {String}'],[-1,' *\/'],[-1,' eraseGeometry: function(geometry, featureId) {'],[0,' this.eraseFeatures(this.features[featureId][0]);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: supported'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the browser supports the renderer class'],[-1,' *\/'],[-1,' supported: function() {'],[0,' return OpenLayers.CANVAS_SUPPORTED;'],[-1,' }, '],[-1,' '],[-1,' \/**'],[-1,' * Method: setSize'],[-1,' * Sets the size of the drawing surface.'],[-1,' *'],[-1,' * Once the size is updated, redraw the canvas.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * size - {<OpenLayers.Size>} '],[-1,' *\/'],[-1,' setSize: function(size) {'],[0,' this.size = size.clone();'],[0,' var root = this.root;'],[0,' root.style.width = size.w + \"px\";'],[0,' root.style.height = size.h + \"px\";'],[0,' root.width = size.w;'],[0,' root.height = size.h;'],[0,' this.resolution = null;'],[0,' if (this.hitDetection) {'],[0,' var hitCanvas = this.hitCanvas;'],[0,' hitCanvas.style.width = size.w + \"px\";'],[0,' hitCanvas.style.height = size.h + \"px\";'],[0,' hitCanvas.width = size.w;'],[0,' hitCanvas.height = size.h;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawFeature'],[-1,' * Draw the feature. Stores the feature in the features list,'],[-1,' * then redraws the layer. '],[-1,' *'],[-1,' * Parameters:'],[-1,' * feature - {<OpenLayers.Feature.Vector>} '],[-1,' * style - {<Object>} '],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The feature has been drawn completely. If the feature has no'],[-1,' * geometry, undefined will be returned. If the feature is not rendered'],[-1,' * for other reasons, false will be returned.'],[-1,' *\/'],[-1,' drawFeature: function(feature, style) {'],[0,' var rendered;'],[0,' if (feature.geometry) {'],[0,' style = this.applyDefaultSymbolizer(style || feature.style);'],[-1,' \/\/ don\'t render if display none or feature outside extent'],[0,' var bounds = feature.geometry.getBounds();'],[-1,''],[0,' var worldBounds;'],[0,' if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {'],[0,' worldBounds = this.map.getMaxExtent();'],[-1,' }'],[-1,''],[0,' var intersects = bounds && bounds.intersectsBounds(this.extent, {worldBounds: worldBounds});'],[-1,''],[0,' rendered = (style.display !== \"none\") && !!bounds && intersects;'],[0,' if (rendered) {'],[-1,' \/\/ keep track of what we have rendered for redraw'],[0,' this.features[feature.id] = [feature, style];'],[-1,' }'],[-1,' else {'],[-1,' \/\/ remove from features tracked for redraw'],[0,' delete(this.features[feature.id]);'],[-1,' }'],[0,' this.pendingRedraw = true;'],[-1,' }'],[0,' if (this.pendingRedraw && !this.locked) {'],[0,' this.redraw();'],[0,' this.pendingRedraw = false;'],[-1,' }'],[0,' return rendered;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: drawGeometry'],[-1,' * Used when looping (in redraw) over the features; draws'],[-1,' * the canvas. '],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} '],[-1,' * style - {Object} '],[-1,' *\/'],[-1,' drawGeometry: function(geometry, style, featureId) {'],[0,' var className = geometry.CLASS_NAME;'],[0,' if ((className == \"OpenLayers.Geometry.Collection\") ||'],[-1,' (className == \"OpenLayers.Geometry.MultiPoint\") ||'],[-1,' (className == \"OpenLayers.Geometry.MultiLineString\") ||'],[-1,' (className == \"OpenLayers.Geometry.MultiPolygon\")) {'],[0,' var worldBounds = (this.map.baseLayer && this.map.baseLayer.wrapDateLine) && this.map.getMaxExtent();'],[0,' for (var i = 0; i < geometry.components.length; i++) {'],[0,' this.calculateFeatureDx(geometry.components[i].getBounds(), worldBounds);'],[0,' this.drawGeometry(geometry.components[i], style, featureId);'],[-1,' }'],[0,' return;'],[-1,' }'],[0,' switch (geometry.CLASS_NAME) {'],[-1,' case \"OpenLayers.Geometry.Point\":'],[0,' this.drawPoint(geometry, style, featureId);'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.LineString\":'],[0,' this.drawLineString(geometry, style, featureId);'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.LinearRing\":'],[0,' this.drawLinearRing(geometry, style, featureId);'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.Polygon\":'],[0,' this.drawPolygon(geometry, style, featureId);'],[0,' break;'],[-1,' default:'],[0,' break;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawExternalGraphic'],[-1,' * Called to draw External graphics. '],[-1,' * '],[-1,' * Parameters: '],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' *\/ '],[-1,' drawExternalGraphic: function(geometry, style, featureId) {'],[0,' var img = new Image();'],[-1,''],[0,' var title = style.title || style.graphicTitle; '],[0,' if (title) {'],[0,' img.title = title; '],[-1,' }'],[-1,''],[0,' var width = style.graphicWidth || style.graphicHeight;'],[0,' var height = style.graphicHeight || style.graphicWidth;'],[0,' width = width ? width : style.pointRadius * 2;'],[0,' height = height ? height : style.pointRadius * 2;'],[0,' var xOffset = (style.graphicXOffset != undefined) ?'],[-1,' style.graphicXOffset : -(0.5 * width);'],[0,' var yOffset = (style.graphicYOffset != undefined) ?'],[-1,' style.graphicYOffset : -(0.5 * height);'],[0,' var _clearRectId = this._clearRectId;'],[-1,''],[0,' var opacity = style.graphicOpacity || style.fillOpacity;'],[-1,' '],[0,' var onLoad = function() {'],[0,' if(!this.features[featureId] ||'],[-1,' _clearRectId !== this._clearRectId) {'],[0,' return;'],[-1,' }'],[0,' var pt = this.getLocalXY(geometry);'],[0,' var p0 = pt[0];'],[0,' var p1 = pt[1];'],[0,' if(!isNaN(p0) && !isNaN(p1)) {'],[0,' var x = (p0 + xOffset) | 0;'],[0,' var y = (p1 + yOffset) | 0;'],[0,' var canvas = this.canvas;'],[0,' canvas.globalAlpha = opacity;'],[0,' var factor = OpenLayers.Renderer.Canvas.drawImageScaleFactor ||'],[-1,' (OpenLayers.Renderer.Canvas.drawImageScaleFactor ='],[-1,' \/android 2.1\/.test(navigator.userAgent.toLowerCase()) ?'],[-1,' \/\/ 320 is the screen width of the G1 phone, for'],[-1,' \/\/ which drawImage works out of the box.'],[-1,' 320 \/ window.screen.width : 1'],[-1,' );'],[0,' canvas.drawImage('],[-1,' img, x*factor, y*factor, width*factor, height*factor'],[-1,' );'],[0,' if (this.hitDetection) {'],[0,' this.setHitContextStyle(\"fill\", featureId);'],[0,' this.hitContext.fillRect(x, y, width, height);'],[-1,' }'],[-1,' }'],[-1,' };'],[0,' img.onload = OpenLayers.Function.bind(onLoad, this);'],[0,' img.src = style.externalGraphic;'],[0,' if (img.complete) {'],[0,' img.onload();'],[0,' img.onload = null;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawNamedSymbol'],[-1,' * Called to draw Well Known Graphic Symbol Name. '],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' *\/ '],[-1,' drawNamedSymbol: function(geometry, style, featureId) {'],[0,' var x, y, cx, cy, i, symbolBounds, scaling, angle;'],[0,' var unscaledStrokeWidth;'],[0,' var deg2rad = Math.PI \/ 180.0;'],[-1,' '],[0,' var symbol = OpenLayers.Renderer.symbol[style.graphicName];'],[-1,' '],[0,' if (!symbol) {'],[0,' throw new Error(style.graphicName + \' is not a valid symbol name\');'],[-1,' }'],[-1,' '],[0,' if (!symbol.length || symbol.length < 2) return;'],[-1,' '],[0,' var pt = this.getLocalXY(geometry);'],[0,' var p0 = pt[0];'],[0,' var p1 = pt[1];'],[-1,' '],[0,' if (isNaN(p0) || isNaN(p1)) return;'],[-1,' '],[-1,' \/\/ Use rounded line caps'],[0,' this.canvas.lineCap = \"round\";'],[0,' this.canvas.lineJoin = \"round\";'],[-1,' '],[0,' if (this.hitDetection) {'],[0,' this.hitContext.lineCap = \"round\";'],[0,' this.hitContext.lineJoin = \"round\";'],[-1,' }'],[-1,' '],[-1,' \/\/ Scale and rotate symbols, using precalculated bounds whenever possible.'],[0,' if (style.graphicName in this.cachedSymbolBounds) {'],[0,' symbolBounds = this.cachedSymbolBounds[style.graphicName];'],[-1,' } else {'],[0,' symbolBounds = new OpenLayers.Bounds();'],[0,' for(i = 0; i < symbol.length; i+=2) {'],[0,' symbolBounds.extend(new OpenLayers.LonLat(symbol[i], symbol[i+1]));'],[-1,' }'],[0,' this.cachedSymbolBounds[style.graphicName] = symbolBounds;'],[-1,' }'],[-1,' '],[-1,' \/\/ Push symbol scaling, translation and rotation onto the transformation stack in reverse order.'],[-1,' \/\/ Don\'t forget to apply all canvas transformations to the hitContext canvas as well(!)'],[0,' this.canvas.save();'],[0,' if (this.hitDetection) { this.hitContext.save(); }'],[-1,' '],[-1,' \/\/ Step 3: place symbol at the desired location'],[0,' this.canvas.translate(p0,p1);'],[0,' if (this.hitDetection) { this.hitContext.translate(p0,p1); }'],[-1,' '],[-1,' \/\/ Step 2a. rotate the symbol if necessary'],[0,' angle = deg2rad * style.rotation; \/\/ will be NaN when style.rotation is undefined.'],[0,' if (!isNaN(angle)) {'],[0,' this.canvas.rotate(angle);'],[0,' if (this.hitDetection) { this.hitContext.rotate(angle); }'],[-1,' }'],[-1,' '],[-1,' \/\/ \/\/ Step 2: scale symbol such that pointRadius equals half the maximum symbol dimension.'],[0,' scaling = 2.0 * style.pointRadius \/ Math.max(symbolBounds.getWidth(), symbolBounds.getHeight());'],[0,' this.canvas.scale(scaling,scaling);'],[0,' if (this.hitDetection) { this.hitContext.scale(scaling,scaling); }'],[-1,' '],[-1,' \/\/ Step 1: center the symbol at the origin '],[0,' cx = symbolBounds.getCenterLonLat().lon;'],[0,' cy = symbolBounds.getCenterLonLat().lat;'],[0,' this.canvas.translate(-cx,-cy);'],[0,' if (this.hitDetection) { this.hitContext.translate(-cx,-cy); } '],[-1,''],[-1,' \/\/ Don\'t forget to scale stroke widths, because they are affected by canvas scale transformations as well(!)'],[-1,' \/\/ Alternative: scale symbol coordinates manually, so stroke width scaling is not needed anymore.'],[0,' unscaledStrokeWidth = style.strokeWidth;'],[0,' style.strokeWidth = unscaledStrokeWidth \/ scaling;'],[-1,' '],[0,' if (style.fill !== false) {'],[0,' this.setCanvasStyle(\"fill\", style);'],[0,' this.canvas.beginPath();'],[0,' for (i=0; i<symbol.length; i=i+2) {'],[0,' x = symbol[i];'],[0,' y = symbol[i+1];'],[0,' if (i == 0) this.canvas.moveTo(x,y);'],[0,' this.canvas.lineTo(x,y);'],[-1,' }'],[0,' this.canvas.closePath();'],[0,' this.canvas.fill();'],[-1,''],[0,' if (this.hitDetection) {'],[0,' this.setHitContextStyle(\"fill\", featureId, style);'],[0,' this.hitContext.beginPath();'],[0,' for (i=0; i<symbol.length; i=i+2) {'],[0,' x = symbol[i];'],[0,' y = symbol[i+1];'],[0,' if (i == 0) this.canvas.moveTo(x,y);'],[0,' this.hitContext.lineTo(x,y);'],[-1,' }'],[0,' this.hitContext.closePath();'],[0,' this.hitContext.fill();'],[-1,' }'],[-1,' } '],[-1,' '],[0,' if (style.stroke !== false) {'],[0,' this.setCanvasStyle(\"stroke\", style);'],[0,' this.canvas.beginPath();'],[0,' for (i=0; i<symbol.length; i=i+2) {'],[0,' x = symbol[i];'],[0,' y = symbol[i+1];'],[0,' if (i == 0) this.canvas.moveTo(x,y);'],[0,' this.canvas.lineTo(x,y);'],[-1,' }'],[0,' this.canvas.closePath();'],[0,' this.canvas.stroke();'],[-1,' '],[-1,' '],[0,' if (this.hitDetection) {'],[0,' this.setHitContextStyle(\"stroke\", featureId, style, scaling);'],[0,' this.hitContext.beginPath();'],[0,' for (i=0; i<symbol.length; i=i+2) {'],[0,' x = symbol[i];'],[0,' y = symbol[i+1];'],[0,' if (i == 0) this.hitContext.moveTo(x,y);'],[0,' this.hitContext.lineTo(x,y);'],[-1,' }'],[0,' this.hitContext.closePath();'],[0,' this.hitContext.stroke();'],[-1,' }'],[-1,' '],[-1,' }'],[-1,' '],[0,' style.strokeWidth = unscaledStrokeWidth;'],[0,' this.canvas.restore();'],[0,' if (this.hitDetection) { this.hitContext.restore(); }'],[0,' this.setCanvasStyle(\"reset\"); '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setCanvasStyle'],[-1,' * Prepare the canvas for drawing by setting various global settings.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * type - {String} one of \'stroke\', \'fill\', or \'reset\''],[-1,' * style - {Object} Symbolizer hash'],[-1,' *\/'],[-1,' setCanvasStyle: function(type, style) {'],[0,' if (type === \"fill\") { '],[0,' this.canvas.globalAlpha = style[\'fillOpacity\'];'],[0,' this.canvas.fillStyle = style[\'fillColor\'];'],[0,' } else if (type === \"stroke\") { '],[0,' this.canvas.globalAlpha = style[\'strokeOpacity\'];'],[0,' this.canvas.strokeStyle = style[\'strokeColor\'];'],[0,' this.canvas.lineWidth = style[\'strokeWidth\'];'],[-1,' } else {'],[0,' this.canvas.globalAlpha = 0;'],[0,' this.canvas.lineWidth = 1;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: featureIdToHex'],[-1,' * Convert a feature ID string into an RGB hex string.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * featureId - {String} Feature id'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} RGB hex string.'],[-1,' *\/'],[-1,' featureIdToHex: function(featureId) {'],[0,' var id = Number(featureId.split(\"_\").pop()) + 1; \/\/ zero for no feature'],[0,' if (id >= 16777216) {'],[0,' this.hitOverflow = id - 16777215;'],[0,' id = id % 16777216 + 1;'],[-1,' }'],[0,' var hex = \"000000\" + id.toString(16);'],[0,' var len = hex.length;'],[0,' hex = \"#\" + hex.substring(len-6, len);'],[0,' return hex;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setHitContextStyle'],[-1,' * Prepare the hit canvas for drawing by setting various global settings.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * type - {String} one of \'stroke\', \'fill\', or \'reset\''],[-1,' * featureId - {String} The feature id.'],[-1,' * symbolizer - {<OpenLayers.Symbolizer>} The symbolizer.'],[-1,' *\/'],[-1,' setHitContextStyle: function(type, featureId, symbolizer, strokeScaling) {'],[0,' var hex = this.featureIdToHex(featureId);'],[0,' if (type == \"fill\") {'],[0,' this.hitContext.globalAlpha = 1.0;'],[0,' this.hitContext.fillStyle = hex;'],[0,' } else if (type == \"stroke\") { '],[0,' this.hitContext.globalAlpha = 1.0;'],[0,' this.hitContext.strokeStyle = hex;'],[-1,' \/\/ bump up stroke width to deal with antialiasing. If strokeScaling is defined, we\'re rendering a symbol '],[-1,' \/\/ on a transformed canvas, so the antialias width bump has to scale as well.'],[0,' if (typeof strokeScaling === \"undefined\") {'],[0,' this.hitContext.lineWidth = symbolizer.strokeWidth + 2;'],[-1,' } else {'],[0,' if (!isNaN(strokeScaling)) { this.hitContext.lineWidth = symbolizer.strokeWidth + 2.0 \/ strokeScaling; }'],[-1,' }'],[-1,' } else {'],[0,' this.hitContext.globalAlpha = 0;'],[0,' this.hitContext.lineWidth = 1;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawPoint'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' *\/ '],[-1,' drawPoint: function(geometry, style, featureId) {'],[0,' if(style.graphic !== false) {'],[0,' if(style.externalGraphic) {'],[0,' this.drawExternalGraphic(geometry, style, featureId);'],[0,' } else if (style.graphicName && (style.graphicName != \"circle\")) {'],[0,' this.drawNamedSymbol(geometry, style, featureId);'],[-1,' } else {'],[0,' var pt = this.getLocalXY(geometry);'],[0,' var p0 = pt[0];'],[0,' var p1 = pt[1];'],[0,' if(!isNaN(p0) && !isNaN(p1)) {'],[0,' var twoPi = Math.PI*2;'],[0,' var radius = style.pointRadius;'],[0,' if(style.fill !== false) {'],[0,' this.setCanvasStyle(\"fill\", style);'],[0,' this.canvas.beginPath();'],[0,' this.canvas.arc(p0, p1, radius, 0, twoPi, true);'],[0,' this.canvas.fill();'],[0,' if (this.hitDetection) {'],[0,' this.setHitContextStyle(\"fill\", featureId, style);'],[0,' this.hitContext.beginPath();'],[0,' this.hitContext.arc(p0, p1, radius, 0, twoPi, true);'],[0,' this.hitContext.fill();'],[-1,' }'],[-1,' }'],[-1,''],[0,' if(style.stroke !== false) {'],[0,' this.setCanvasStyle(\"stroke\", style);'],[0,' this.canvas.beginPath();'],[0,' this.canvas.arc(p0, p1, radius, 0, twoPi, true);'],[0,' this.canvas.stroke();'],[0,' if (this.hitDetection) {'],[0,' this.setHitContextStyle(\"stroke\", featureId, style);'],[0,' this.hitContext.beginPath();'],[0,' this.hitContext.arc(p0, p1, radius, 0, twoPi, true);'],[0,' this.hitContext.stroke();'],[-1,' }'],[0,' this.setCanvasStyle(\"reset\");'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawLineString'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' *\/ '],[-1,' drawLineString: function(geometry, style, featureId) {'],[0,' style = OpenLayers.Util.applyDefaults({fill: false}, style);'],[0,' this.drawLinearRing(geometry, style, featureId);'],[-1,' }, '],[-1,' '],[-1,' \/**'],[-1,' * Method: drawLinearRing'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' *\/ '],[-1,' drawLinearRing: function(geometry, style, featureId) {'],[0,' if (style.fill !== false) {'],[0,' this.setCanvasStyle(\"fill\", style);'],[0,' this.renderPath(this.canvas, geometry, style, featureId, \"fill\");'],[0,' if (this.hitDetection) {'],[0,' this.setHitContextStyle(\"fill\", featureId, style);'],[0,' this.renderPath(this.hitContext, geometry, style, featureId, \"fill\");'],[-1,' }'],[-1,' }'],[0,' if (style.stroke !== false) {'],[0,' this.setCanvasStyle(\"stroke\", style);'],[0,' this.renderPath(this.canvas, geometry, style, featureId, \"stroke\");'],[0,' if (this.hitDetection) {'],[0,' this.setHitContextStyle(\"stroke\", featureId, style);'],[0,' this.renderPath(this.hitContext, geometry, style, featureId, \"stroke\");'],[-1,' }'],[-1,' }'],[0,' this.setCanvasStyle(\"reset\");'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: renderPath'],[-1,' * Render a path with stroke and optional fill.'],[-1,' *\/'],[-1,' renderPath: function(context, geometry, style, featureId, type) {'],[0,' var components = geometry.components;'],[0,' var len = components.length;'],[0,' context.beginPath();'],[0,' var start = this.getLocalXY(components[0]);'],[0,' var x = start[0];'],[0,' var y = start[1];'],[0,' if (!isNaN(x) && !isNaN(y)) {'],[0,' context.moveTo(start[0], start[1]);'],[0,' for (var i=1; i<len; ++i) {'],[0,' var pt = this.getLocalXY(components[i]);'],[0,' context.lineTo(pt[0], pt[1]);'],[-1,' }'],[0,' if (type === \"fill\") {'],[0,' context.fill();'],[-1,' } else {'],[0,' context.stroke();'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawPolygon'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * featureId - {String}'],[-1,' *\/ '],[-1,' drawPolygon: function(geometry, style, featureId) {'],[0,' var components = geometry.components;'],[0,' var len = components.length;'],[0,' this.drawLinearRing(components[0], style, featureId);'],[-1,' \/\/ erase inner rings'],[0,' for (var i=1; i<len; ++i) {'],[-1,' \/** '],[-1,' * Note that this is overly aggressive. Here we punch holes through '],[-1,' * all previously rendered features on the same canvas. A better '],[-1,' * solution for polygons with interior rings would be to draw the '],[-1,' * polygon on a sketch canvas first. We could erase all holes '],[-1,' * there and then copy the drawing to the layer canvas. '],[-1,' * TODO: http:\/\/trac.osgeo.org\/openlayers\/ticket\/3130 '],[-1,' *\/'],[0,' this.canvas.globalCompositeOperation = \"destination-out\";'],[0,' if (this.hitDetection) {'],[0,' this.hitContext.globalCompositeOperation = \"destination-out\";'],[-1,' }'],[0,' this.drawLinearRing('],[-1,' components[i], '],[-1,' OpenLayers.Util.applyDefaults({stroke: false, fillOpacity: 1.0}, style),'],[-1,' featureId'],[-1,' );'],[0,' this.canvas.globalCompositeOperation = \"source-over\";'],[0,' if (this.hitDetection) {'],[0,' this.hitContext.globalCompositeOperation = \"source-over\";'],[-1,' }'],[0,' this.drawLinearRing('],[-1,' components[i], '],[-1,' OpenLayers.Util.applyDefaults({fill: false}, style),'],[-1,' featureId'],[-1,' );'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawText'],[-1,' * This method is only called by the renderer itself.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * location - {<OpenLayers.Point>}'],[-1,' * style - {Object}'],[-1,' *\/'],[-1,' drawText: function(location, style) {'],[0,' var pt = this.getLocalXY(location);'],[-1,''],[0,' this.setCanvasStyle(\"reset\");'],[0,' this.canvas.fillStyle = style.fontColor;'],[0,' this.canvas.globalAlpha = style.fontOpacity || 1.0;'],[0,' var fontStyle = [style.fontStyle ? style.fontStyle : \"normal\",'],[-1,' \"normal\", \/\/ \"font-variant\" not supported'],[-1,' style.fontWeight ? style.fontWeight : \"normal\",'],[-1,' style.fontSize ? style.fontSize : \"1em\",'],[-1,' style.fontFamily ? style.fontFamily : \"sans-serif\"].join(\" \");'],[0,' var labelRows = style.label.split(\'\\n\');'],[0,' var numRows = labelRows.length;'],[0,' if (this.canvas.fillText) {'],[-1,' \/\/ HTML5'],[0,' this.canvas.font = fontStyle;'],[0,' this.canvas.textAlign ='],[-1,' OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[0]] ||'],[-1,' \"center\";'],[0,' this.canvas.textBaseline ='],[-1,' OpenLayers.Renderer.Canvas.LABEL_ALIGN[style.labelAlign[1]] ||'],[-1,' \"middle\";'],[0,' var vfactor ='],[-1,' OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[1]];'],[0,' if (vfactor == null) {'],[0,' vfactor = -.5;'],[-1,' }'],[0,' var lineHeight ='],[-1,' this.canvas.measureText(\'Mg\').height ||'],[-1,' this.canvas.measureText(\'xx\').width;'],[0,' pt[1] += lineHeight*vfactor*(numRows-1);'],[0,' for (var i = 0; i < numRows; i++) {'],[0,' if (style.labelOutlineWidth) {'],[0,' this.canvas.save();'],[0,' this.canvas.globalAlpha = style.labelOutlineOpacity || style.fontOpacity || 1.0;'],[0,' this.canvas.strokeStyle = style.labelOutlineColor;'],[0,' this.canvas.lineWidth = style.labelOutlineWidth;'],[0,' this.canvas.strokeText(labelRows[i], pt[0], pt[1] + (lineHeight*i) + 1);'],[0,' this.canvas.restore();'],[-1,' }'],[0,' this.canvas.fillText(labelRows[i], pt[0], pt[1] + (lineHeight*i));'],[-1,' }'],[0,' } else if (this.canvas.mozDrawText) {'],[-1,' \/\/ Mozilla pre-Gecko1.9.1 (<FF3.1)'],[0,' this.canvas.mozTextStyle = fontStyle;'],[-1,' \/\/ No built-in text alignment, so we measure and adjust the position'],[0,' var hfactor ='],[-1,' OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[0]];'],[0,' if (hfactor == null) {'],[0,' hfactor = -.5;'],[-1,' }'],[0,' var vfactor ='],[-1,' OpenLayers.Renderer.Canvas.LABEL_FACTOR[style.labelAlign[1]];'],[0,' if (vfactor == null) {'],[0,' vfactor = -.5;'],[-1,' }'],[0,' var lineHeight = this.canvas.mozMeasureText(\'xx\');'],[0,' pt[1] += lineHeight*(1 + (vfactor*numRows));'],[0,' for (var i = 0; i < numRows; i++) {'],[0,' var x = pt[0] + (hfactor*this.canvas.mozMeasureText(labelRows[i]));'],[0,' var y = pt[1] + (i*lineHeight);'],[0,' this.canvas.translate(x, y);'],[0,' this.canvas.mozDrawText(labelRows[i]);'],[0,' this.canvas.translate(-x, -y);'],[-1,' }'],[-1,' }'],[0,' this.setCanvasStyle(\"reset\");'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getLocalXY'],[-1,' * transform geographic xy into pixel xy'],[-1,' *'],[-1,' * Parameters: '],[-1,' * point - {<OpenLayers.Geometry.Point>}'],[-1,' *\/'],[-1,' getLocalXY: function(point) {'],[0,' var resolution = this.getResolution();'],[0,' var extent = this.extent;'],[0,' var x = ((point.x - this.featureDx) \/ resolution + (-extent.left \/ resolution));'],[0,' var y = ((extent.top \/ resolution) - point.y \/ resolution);'],[0,' return [x, y];'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: clear'],[-1,' * Clear all vectors from the renderer.'],[-1,' *\/ '],[-1,' clear: function() {'],[0,' this.clearCanvas();'],[0,' this.features = {};'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: clearCanvas'],[-1,' * Clear the canvas element of the renderer.'],[-1,' *\/ '],[-1,' clearCanvas: function() {'],[0,' var height = this.root.height;'],[0,' var width = this.root.width;'],[0,' this.canvas.clearRect(0, 0, width, height);'],[0,' this._clearRectId = OpenLayers.Util.createUniqueID();'],[0,' if (this.hitDetection) {'],[0,' this.hitContext.clearRect(0, 0, width, height);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getFeatureIdFromEvent'],[-1,' * Returns a feature id from an event on the renderer. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {<OpenLayers.Event>} '],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Feature.Vector} A feature or undefined. This method returns a '],[-1,' * feature instead of a feature id to avoid an unnecessary lookup on the'],[-1,' * layer.'],[-1,' *\/'],[-1,' getFeatureIdFromEvent: function(evt) {'],[0,' var featureId, feature;'],[-1,' '],[0,' if (this.hitDetection && this.root.style.display !== \"none\") {'],[-1,' \/\/ this dragging check should go in the feature handler'],[0,' if (!this.map.dragging) {'],[0,' var xy = evt.xy;'],[0,' var x = xy.x | 0;'],[0,' var y = xy.y | 0;'],[0,' var data = this.hitContext.getImageData(x, y, 1, 1).data;'],[0,' if (data[3] === 255) { \/\/ antialiased'],[0,' var id = data[2] + (256 * (data[1] + (256 * data[0])));'],[0,' if (id) {'],[0,' featureId = \"OpenLayers_Feature_Vector_\" + (id - 1 + this.hitOverflow);'],[0,' try {'],[0,' feature = this.features[featureId][0];'],[-1,' } catch(err) {'],[-1,' \/\/ Because of antialiasing on the canvas, when the hit location is at a point where the edge of'],[-1,' \/\/ one symbol intersects the interior of another symbol, a wrong hit color (and therefore id) results.'],[-1,' \/\/ todo: set Antialiasing = \'off\' on the hitContext as soon as browsers allow it.'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return feature;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: eraseFeatures '],[-1,' * This is called by the layer to erase features; removes the feature from'],[-1,' * the list, then redraws the layer.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * features - {Array(<OpenLayers.Feature.Vector>)} '],[-1,' *\/'],[-1,' eraseFeatures: function(features) {'],[0,' if(!(OpenLayers.Util.isArray(features))) {'],[0,' features = [features];'],[-1,' }'],[0,' for(var i=0; i<features.length; ++i) {'],[0,' delete this.features[features[i].id];'],[-1,' }'],[0,' this.redraw();'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: redraw'],[-1,' * The real \'meat\' of the function: any time things have changed,'],[-1,' * redraw() can be called to loop over all the data and (you guessed'],[-1,' * it) redraw it. Unlike Elements-based Renderers, we can\'t interact'],[-1,' * with things once they\'re drawn, to remove them, for example, so'],[-1,' * instead we have to just clear everything and draw from scratch.'],[-1,' *\/'],[-1,' redraw: function() {'],[0,' if (!this.locked) {'],[0,' this.clearCanvas();'],[0,' var labelMap = [];'],[0,' var feature, geometry, style;'],[0,' var worldBounds = (this.map.baseLayer && this.map.baseLayer.wrapDateLine) && this.map.getMaxExtent();'],[0,' for (var id in this.features) {'],[0,' if (!this.features.hasOwnProperty(id)) { continue; }'],[0,' feature = this.features[id][0];'],[0,' geometry = feature.geometry;'],[0,' this.calculateFeatureDx(geometry.getBounds(), worldBounds);'],[0,' style = this.features[id][1];'],[0,' this.drawGeometry(geometry, style, feature.id);'],[0,' if(style.label) {'],[0,' labelMap.push([feature, style]);'],[-1,' }'],[-1,' }'],[0,' var item;'],[0,' for (var i=0, len=labelMap.length; i<len; ++i) {'],[0,' item = labelMap[i];'],[0,' this.drawText(item[0].geometry.getCentroid(), item[1]);'],[-1,' }'],[-1,' } '],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Renderer.Canvas\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.Canvas.LABEL_ALIGN'],[-1,' * {Object}'],[-1,' *\/'],[1,'OpenLayers.Renderer.Canvas.LABEL_ALIGN = {'],[-1,' \"l\": \"left\",'],[-1,' \"r\": \"right\",'],[-1,' \"t\": \"top\",'],[-1,' \"b\": \"bottom\"'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.Canvas.LABEL_FACTOR'],[-1,' * {Object}'],[-1,' *\/'],[1,'OpenLayers.Renderer.Canvas.LABEL_FACTOR = {'],[-1,' \"l\": 0,'],[-1,' \"r\": -1,'],[-1,' \"t\": 0,'],[-1,' \"b\": -1'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.Canvas.drawImageScaleFactor'],[-1,' * {Number} Scale factor to apply to the canvas drawImage arguments. This'],[-1,' * is always 1 except for Android 2.1 devices, to work around'],[-1,' * http:\/\/code.google.com\/p\/android\/issues\/detail?id=5141.'],[-1,' *\/'],[1,'OpenLayers.Renderer.Canvas.drawImageScaleFactor = null;'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Request\/XMLHttpRequest.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/\/ XMLHttpRequest.js Copyright (C) 2010 Sergey Ilinsky (http:\/\/www.ilinsky.com)'],[-1,'\/\/'],[-1,'\/\/ Licensed under the Apache License, Version 2.0 (the \"License\");'],[-1,'\/\/ you may not use this file except in compliance with the License.'],[-1,'\/\/ You may obtain a copy of the License at'],[-1,'\/\/'],[-1,'\/\/ http:\/\/www.apache.org\/licenses\/LICENSE-2.0'],[-1,'\/\/'],[-1,'\/\/ Unless required by applicable law or agreed to in writing, software'],[-1,'\/\/ distributed under the License is distributed on an \"AS IS\" BASIS,'],[-1,'\/\/ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.'],[-1,'\/\/ See the License for the specific language governing permissions and'],[-1,'\/\/ limitations under the License.'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Request.js'],[-1,' *\/'],[-1,''],[1,'(function () {'],[-1,''],[-1,' \/\/ Save reference to earlier defined object implementation (if any)'],[1,' var oXMLHttpRequest = window.XMLHttpRequest;'],[-1,''],[-1,' \/\/ Define on browser type'],[1,' var bGecko = !!window.controllers,'],[-1,' bIE = window.document.all && !window.opera,'],[-1,' bIE7 = bIE && window.navigator.userAgent.match(\/MSIE 7.0\/);'],[-1,''],[-1,' \/\/ Enables \"XMLHttpRequest()\" call next to \"new XMLHttpReques()\"'],[1,' function fXMLHttpRequest() {'],[0,' this._object = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject(\"Microsoft.XMLHTTP\");'],[0,' this._listeners = [];'],[-1,' };'],[-1,''],[-1,' \/\/ Constructor'],[1,' function cXMLHttpRequest() {'],[0,' return new fXMLHttpRequest;'],[-1,' };'],[1,' cXMLHttpRequest.prototype = fXMLHttpRequest.prototype;'],[-1,''],[-1,' \/\/ BUGFIX: Firefox with Firebug installed would break pages if not executed'],[1,' if (bGecko && oXMLHttpRequest.wrapped)'],[0,' cXMLHttpRequest.wrapped = oXMLHttpRequest.wrapped;'],[-1,''],[-1,' \/\/ Constants'],[1,' cXMLHttpRequest.UNSENT = 0;'],[1,' cXMLHttpRequest.OPENED = 1;'],[1,' cXMLHttpRequest.HEADERS_RECEIVED = 2;'],[1,' cXMLHttpRequest.LOADING = 3;'],[1,' cXMLHttpRequest.DONE = 4;'],[-1,''],[-1,' \/\/ Public Properties'],[1,' cXMLHttpRequest.prototype.readyState = cXMLHttpRequest.UNSENT;'],[1,' cXMLHttpRequest.prototype.responseText = \'\';'],[1,' cXMLHttpRequest.prototype.responseXML = null;'],[1,' cXMLHttpRequest.prototype.status = 0;'],[1,' cXMLHttpRequest.prototype.statusText = \'\';'],[-1,''],[-1,' \/\/ Priority proposal'],[1,' cXMLHttpRequest.prototype.priority = \"NORMAL\";'],[-1,''],[-1,' \/\/ Instance-level Events Handlers'],[1,' cXMLHttpRequest.prototype.onreadystatechange = null;'],[-1,''],[-1,' \/\/ Class-level Events Handlers'],[1,' cXMLHttpRequest.onreadystatechange = null;'],[1,' cXMLHttpRequest.onopen = null;'],[1,' cXMLHttpRequest.onsend = null;'],[1,' cXMLHttpRequest.onabort = null;'],[-1,''],[-1,' \/\/ Public Methods'],[1,' cXMLHttpRequest.prototype.open = function(sMethod, sUrl, bAsync, sUser, sPassword) {'],[-1,' \/\/ Delete headers, required when object is reused'],[0,' delete this._headers;'],[-1,''],[-1,' \/\/ When bAsync parameter value is omitted, use true as default'],[0,' if (arguments.length < 3)'],[0,' bAsync = true;'],[-1,''],[-1,' \/\/ Save async parameter for fixing Gecko bug with missing readystatechange in synchronous requests'],[0,' this._async = bAsync;'],[-1,''],[-1,' \/\/ Set the onreadystatechange handler'],[0,' var oRequest = this,'],[-1,' nState = this.readyState,'],[-1,' fOnUnload;'],[-1,''],[-1,' \/\/ BUGFIX: IE - memory leak on page unload (inter-page leak)'],[0,' if (bIE && bAsync) {'],[0,' fOnUnload = function() {'],[0,' if (nState != cXMLHttpRequest.DONE) {'],[0,' fCleanTransport(oRequest);'],[-1,' \/\/ Safe to abort here since onreadystatechange handler removed'],[0,' oRequest.abort();'],[-1,' }'],[-1,' };'],[0,' window.attachEvent(\"onunload\", fOnUnload);'],[-1,' }'],[-1,''],[-1,' \/\/ Add method sniffer'],[0,' if (cXMLHttpRequest.onopen)'],[0,' cXMLHttpRequest.onopen.apply(this, arguments);'],[-1,''],[0,' if (arguments.length > 4)'],[0,' this._object.open(sMethod, sUrl, bAsync, sUser, sPassword);'],[-1,' else'],[0,' if (arguments.length > 3)'],[0,' this._object.open(sMethod, sUrl, bAsync, sUser);'],[-1,' else'],[0,' this._object.open(sMethod, sUrl, bAsync);'],[-1,''],[0,' this.readyState = cXMLHttpRequest.OPENED;'],[0,' fReadyStateChange(this);'],[-1,''],[0,' this._object.onreadystatechange = function() {'],[0,' if (bGecko && !bAsync)'],[0,' return;'],[-1,''],[-1,' \/\/ Synchronize state'],[0,' oRequest.readyState = oRequest._object.readyState;'],[-1,''],[-1,' \/\/'],[0,' fSynchronizeValues(oRequest);'],[-1,''],[-1,' \/\/ BUGFIX: Firefox fires unnecessary DONE when aborting'],[0,' if (oRequest._aborted) {'],[-1,' \/\/ Reset readyState to UNSENT'],[0,' oRequest.readyState = cXMLHttpRequest.UNSENT;'],[-1,''],[-1,' \/\/ Return now'],[0,' return;'],[-1,' }'],[-1,''],[0,' if (oRequest.readyState == cXMLHttpRequest.DONE) {'],[-1,' \/\/ Free up queue'],[0,' delete oRequest._data;'],[-1,'\/* if (bAsync)'],[-1,' fQueue_remove(oRequest);*\/'],[-1,' \/\/'],[0,' fCleanTransport(oRequest);'],[-1,'\/\/ Uncomment this block if you need a fix for IE cache'],[-1,'\/*'],[-1,' \/\/ BUGFIX: IE - cache issue'],[-1,' if (!oRequest._object.getResponseHeader(\"Date\")) {'],[-1,' \/\/ Save object to cache'],[-1,' oRequest._cached = oRequest._object;'],[-1,''],[-1,' \/\/ Instantiate a new transport object'],[-1,' cXMLHttpRequest.call(oRequest);'],[-1,''],[-1,' \/\/ Re-send request'],[-1,' if (sUser) {'],[-1,' if (sPassword)'],[-1,' oRequest._object.open(sMethod, sUrl, bAsync, sUser, sPassword);'],[-1,' else'],[-1,' oRequest._object.open(sMethod, sUrl, bAsync, sUser);'],[-1,' }'],[-1,' else'],[-1,' oRequest._object.open(sMethod, sUrl, bAsync);'],[-1,' oRequest._object.setRequestHeader(\"If-Modified-Since\", oRequest._cached.getResponseHeader(\"Last-Modified\") || new window.Date(0));'],[-1,' \/\/ Copy headers set'],[-1,' if (oRequest._headers)'],[-1,' for (var sHeader in oRequest._headers)'],[-1,' if (typeof oRequest._headers[sHeader] == \"string\") \/\/ Some frameworks prototype objects with functions'],[-1,' oRequest._object.setRequestHeader(sHeader, oRequest._headers[sHeader]);'],[-1,''],[-1,' oRequest._object.onreadystatechange = function() {'],[-1,' \/\/ Synchronize state'],[-1,' oRequest.readyState = oRequest._object.readyState;'],[-1,''],[-1,' if (oRequest._aborted) {'],[-1,' \/\/'],[-1,' oRequest.readyState = cXMLHttpRequest.UNSENT;'],[-1,''],[-1,' \/\/ Return'],[-1,' return;'],[-1,' }'],[-1,''],[-1,' if (oRequest.readyState == cXMLHttpRequest.DONE) {'],[-1,' \/\/ Clean Object'],[-1,' fCleanTransport(oRequest);'],[-1,''],[-1,' \/\/ get cached request'],[-1,' if (oRequest.status == 304)'],[-1,' oRequest._object = oRequest._cached;'],[-1,''],[-1,' \/\/'],[-1,' delete oRequest._cached;'],[-1,''],[-1,' \/\/'],[-1,' fSynchronizeValues(oRequest);'],[-1,''],[-1,' \/\/'],[-1,' fReadyStateChange(oRequest);'],[-1,''],[-1,' \/\/ BUGFIX: IE - memory leak in interrupted'],[-1,' if (bIE && bAsync)'],[-1,' window.detachEvent(\"onunload\", fOnUnload);'],[-1,' }'],[-1,' };'],[-1,' oRequest._object.send(null);'],[-1,''],[-1,' \/\/ Return now - wait until re-sent request is finished'],[-1,' return;'],[-1,' };'],[-1,'*\/'],[-1,' \/\/ BUGFIX: IE - memory leak in interrupted'],[0,' if (bIE && bAsync)'],[0,' window.detachEvent(\"onunload\", fOnUnload);'],[-1,' }'],[-1,''],[-1,' \/\/ BUGFIX: Some browsers (Internet Explorer, Gecko) fire OPEN readystate twice'],[0,' if (nState != oRequest.readyState)'],[0,' fReadyStateChange(oRequest);'],[-1,''],[0,' nState = oRequest.readyState;'],[-1,' }'],[-1,' };'],[1,' function fXMLHttpRequest_send(oRequest) {'],[0,' oRequest._object.send(oRequest._data);'],[-1,''],[-1,' \/\/ BUGFIX: Gecko - missing readystatechange calls in synchronous requests'],[0,' if (bGecko && !oRequest._async) {'],[0,' oRequest.readyState = cXMLHttpRequest.OPENED;'],[-1,''],[-1,' \/\/ Synchronize state'],[0,' fSynchronizeValues(oRequest);'],[-1,''],[-1,' \/\/ Simulate missing states'],[0,' while (oRequest.readyState < cXMLHttpRequest.DONE) {'],[0,' oRequest.readyState++;'],[0,' fReadyStateChange(oRequest);'],[-1,' \/\/ Check if we are aborted'],[0,' if (oRequest._aborted)'],[0,' return;'],[-1,' }'],[-1,' }'],[-1,' };'],[1,' cXMLHttpRequest.prototype.send = function(vData) {'],[-1,' \/\/ Add method sniffer'],[0,' if (cXMLHttpRequest.onsend)'],[0,' cXMLHttpRequest.onsend.apply(this, arguments);'],[-1,''],[0,' if (!arguments.length)'],[0,' vData = null;'],[-1,''],[-1,' \/\/ BUGFIX: Safari - fails sending documents created\/modified dynamically, so an explicit serialization required'],[-1,' \/\/ BUGFIX: IE - rewrites any custom mime-type to \"text\/xml\" in case an XMLNode is sent'],[-1,' \/\/ BUGFIX: Gecko - fails sending Element (this is up to the implementation either to standard)'],[0,' if (vData && vData.nodeType) {'],[0,' vData = window.XMLSerializer ? new window.XMLSerializer().serializeToString(vData) : vData.xml;'],[0,' if (!this._headers[\"Content-Type\"])'],[0,' this._object.setRequestHeader(\"Content-Type\", \"application\/xml\");'],[-1,' }'],[-1,''],[0,' this._data = vData;'],[-1,'\/*'],[-1,' \/\/ Add to queue'],[-1,' if (this._async)'],[-1,' fQueue_add(this);'],[-1,' else*\/'],[0,' fXMLHttpRequest_send(this);'],[-1,' };'],[1,' cXMLHttpRequest.prototype.abort = function() {'],[-1,' \/\/ Add method sniffer'],[0,' if (cXMLHttpRequest.onabort)'],[0,' cXMLHttpRequest.onabort.apply(this, arguments);'],[-1,''],[-1,' \/\/ BUGFIX: Gecko - unnecessary DONE when aborting'],[0,' if (this.readyState > cXMLHttpRequest.UNSENT)'],[0,' this._aborted = true;'],[-1,''],[0,' this._object.abort();'],[-1,''],[-1,' \/\/ BUGFIX: IE - memory leak'],[0,' fCleanTransport(this);'],[-1,''],[0,' this.readyState = cXMLHttpRequest.UNSENT;'],[-1,''],[0,' delete this._data;'],[-1,'\/* if (this._async)'],[-1,' fQueue_remove(this);*\/'],[-1,' };'],[1,' cXMLHttpRequest.prototype.getAllResponseHeaders = function() {'],[0,' return this._object.getAllResponseHeaders();'],[-1,' };'],[1,' cXMLHttpRequest.prototype.getResponseHeader = function(sName) {'],[0,' return this._object.getResponseHeader(sName);'],[-1,' };'],[1,' cXMLHttpRequest.prototype.setRequestHeader = function(sName, sValue) {'],[-1,' \/\/ BUGFIX: IE - cache issue'],[0,' if (!this._headers)'],[0,' this._headers = {};'],[0,' this._headers[sName] = sValue;'],[-1,''],[0,' return this._object.setRequestHeader(sName, sValue);'],[-1,' };'],[-1,''],[-1,' \/\/ EventTarget interface implementation'],[1,' cXMLHttpRequest.prototype.addEventListener = function(sName, fHandler, bUseCapture) {'],[0,' for (var nIndex = 0, oListener; oListener = this._listeners[nIndex]; nIndex++)'],[0,' if (oListener[0] == sName && oListener[1] == fHandler && oListener[2] == bUseCapture)'],[0,' return;'],[-1,' \/\/ Add listener'],[0,' this._listeners.push([sName, fHandler, bUseCapture]);'],[-1,' };'],[-1,''],[1,' cXMLHttpRequest.prototype.removeEventListener = function(sName, fHandler, bUseCapture) {'],[0,' for (var nIndex = 0, oListener; oListener = this._listeners[nIndex]; nIndex++)'],[0,' if (oListener[0] == sName && oListener[1] == fHandler && oListener[2] == bUseCapture)'],[0,' break;'],[-1,' \/\/ Remove listener'],[0,' if (oListener)'],[0,' this._listeners.splice(nIndex, 1);'],[-1,' };'],[-1,''],[1,' cXMLHttpRequest.prototype.dispatchEvent = function(oEvent) {'],[0,' var oEventPseudo = {'],[-1,' \'type\': oEvent.type,'],[-1,' \'target\': this,'],[-1,' \'currentTarget\':this,'],[-1,' \'eventPhase\': 2,'],[-1,' \'bubbles\': oEvent.bubbles,'],[-1,' \'cancelable\': oEvent.cancelable,'],[-1,' \'timeStamp\': oEvent.timeStamp,'],[-1,' \'stopPropagation\': function() {}, \/\/ There is no flow'],[-1,' \'preventDefault\': function() {}, \/\/ There is no default action'],[-1,' \'initEvent\': function() {} \/\/ Original event object should be initialized'],[-1,' };'],[-1,''],[-1,' \/\/ Execute onreadystatechange'],[0,' if (oEventPseudo.type == \"readystatechange\" && this.onreadystatechange)'],[0,' (this.onreadystatechange.handleEvent || this.onreadystatechange).apply(this, [oEventPseudo]);'],[-1,''],[-1,' \/\/ Execute listeners'],[0,' for (var nIndex = 0, oListener; oListener = this._listeners[nIndex]; nIndex++)'],[0,' if (oListener[0] == oEventPseudo.type && !oListener[2])'],[0,' (oListener[1].handleEvent || oListener[1]).apply(this, [oEventPseudo]);'],[-1,' };'],[-1,''],[-1,' \/\/'],[1,' cXMLHttpRequest.prototype.toString = function() {'],[0,' return \'[\' + \"object\" + \' \' + \"XMLHttpRequest\" + \']\';'],[-1,' };'],[-1,''],[1,' cXMLHttpRequest.toString = function() {'],[0,' return \'[\' + \"XMLHttpRequest\" + \']\';'],[-1,' };'],[-1,''],[-1,' \/\/ Helper function'],[1,' function fReadyStateChange(oRequest) {'],[-1,' \/\/ Sniffing code'],[0,' if (cXMLHttpRequest.onreadystatechange)'],[0,' cXMLHttpRequest.onreadystatechange.apply(oRequest);'],[-1,''],[-1,' \/\/ Fake event'],[0,' oRequest.dispatchEvent({'],[-1,' \'type\': \"readystatechange\",'],[-1,' \'bubbles\': false,'],[-1,' \'cancelable\': false,'],[-1,' \'timeStamp\': new Date + 0'],[-1,' });'],[-1,' };'],[-1,''],[1,' function fGetDocument(oRequest) {'],[0,' var oDocument = oRequest.responseXML,'],[-1,' sResponse = oRequest.responseText;'],[-1,' \/\/ Try parsing responseText'],[0,' if (bIE && sResponse && oDocument && !oDocument.documentElement && oRequest.getResponseHeader(\"Content-Type\").match(\/[^\\\/]+\\\/[^\\+]+\\+xml\/)) {'],[0,' oDocument = new window.ActiveXObject(\"Microsoft.XMLDOM\");'],[0,' oDocument.async = false;'],[0,' oDocument.validateOnParse = false;'],[0,' oDocument.loadXML(sResponse);'],[-1,' }'],[-1,' \/\/ Check if there is no error in document'],[0,' if (oDocument)'],[-1,' if ((bIE && oDocument.parseError != 0) || !oDocument.documentElement || (oDocument.documentElement && oDocument.documentElement.tagName == \"parsererror\"))'],[0,' return null;'],[0,' return oDocument;'],[-1,' };'],[-1,''],[1,' function fSynchronizeValues(oRequest) {'],[0,' try { oRequest.responseText = oRequest._object.responseText; } catch (e) {}'],[0,' try { oRequest.responseXML = fGetDocument(oRequest._object); } catch (e) {}'],[0,' try { oRequest.status = oRequest._object.status; } catch (e) {}'],[0,' try { oRequest.statusText = oRequest._object.statusText; } catch (e) {}'],[-1,' };'],[-1,''],[1,' function fCleanTransport(oRequest) {'],[-1,' \/\/ BUGFIX: IE - memory leak (on-page leak)'],[0,' oRequest._object.onreadystatechange = new window.Function;'],[-1,' };'],[-1,'\/*'],[-1,' \/\/ Queue manager'],[-1,' var oQueuePending = {\"CRITICAL\":[],\"HIGH\":[],\"NORMAL\":[],\"LOW\":[],\"LOWEST\":[]},'],[-1,' aQueueRunning = [];'],[-1,' function fQueue_add(oRequest) {'],[-1,' oQueuePending[oRequest.priority in oQueuePending ? oRequest.priority : \"NORMAL\"].push(oRequest);'],[-1,' \/\/'],[-1,' setTimeout(fQueue_process);'],[-1,' };'],[-1,''],[-1,' function fQueue_remove(oRequest) {'],[-1,' for (var nIndex = 0, bFound = false; nIndex < aQueueRunning.length; nIndex++)'],[-1,' if (bFound)'],[-1,' aQueueRunning[nIndex - 1] = aQueueRunning[nIndex];'],[-1,' else'],[-1,' if (aQueueRunning[nIndex] == oRequest)'],[-1,' bFound = true;'],[-1,' if (bFound)'],[-1,' aQueueRunning.length--;'],[-1,' \/\/'],[-1,' setTimeout(fQueue_process);'],[-1,' };'],[-1,''],[-1,' function fQueue_process() {'],[-1,' if (aQueueRunning.length < 6) {'],[-1,' for (var sPriority in oQueuePending) {'],[-1,' if (oQueuePending[sPriority].length) {'],[-1,' var oRequest = oQueuePending[sPriority][0];'],[-1,' oQueuePending[sPriority] = oQueuePending[sPriority].slice(1);'],[-1,' \/\/'],[-1,' aQueueRunning.push(oRequest);'],[-1,' \/\/ Send request'],[-1,' fXMLHttpRequest_send(oRequest);'],[-1,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' };'],[-1,'*\/'],[-1,' \/\/ Internet Explorer 5.0 (missing apply)'],[1,' if (!window.Function.prototype.apply) {'],[0,' window.Function.prototype.apply = function(oRequest, oArguments) {'],[0,' if (!oArguments)'],[0,' oArguments = [];'],[0,' oRequest.__func = this;'],[0,' oRequest.__func(oArguments[0], oArguments[1], oArguments[2], oArguments[3], oArguments[4]);'],[0,' delete oRequest.__func;'],[-1,' };'],[-1,' };'],[-1,''],[-1,' \/\/ Register new object with window'],[-1,' \/**'],[-1,' * Class: OpenLayers.Request.XMLHttpRequest'],[-1,' * Standard-compliant (W3C) cross-browser implementation of the'],[-1,' * XMLHttpRequest object. From'],[-1,' * http:\/\/code.google.com\/p\/xmlhttprequest\/.'],[-1,' *\/'],[1,' if (!OpenLayers.Request) {'],[-1,' \/**'],[-1,' * This allows for OpenLayers\/Request.js to be included'],[-1,' * before or after this script.'],[-1,' *\/'],[1,' OpenLayers.Request = {};'],[-1,' }'],[1,' OpenLayers.Request.XMLHttpRequest = cXMLHttpRequest;'],[-1,'})();'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Request.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Events.js'],[-1,' * @requires OpenLayers\/Request\/XMLHttpRequest.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * TODO: deprecate me'],[-1,' * Use OpenLayers.Request.proxy instead.'],[-1,' *\/'],[1,'OpenLayers.ProxyHost = \"\";'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Request'],[-1,' * The OpenLayers.Request namespace contains convenience methods for working'],[-1,' * with XMLHttpRequests. These methods work with a cross-browser'],[-1,' * W3C compliant <OpenLayers.Request.XMLHttpRequest> class.'],[-1,' *\/'],[1,'if (!OpenLayers.Request) {'],[-1,' \/**'],[-1,' * This allows for OpenLayers\/Request\/XMLHttpRequest.js to be included'],[-1,' * before or after this script.'],[-1,' *\/'],[0,' OpenLayers.Request = {};'],[-1,'}'],[1,'OpenLayers.Util.extend(OpenLayers.Request, {'],[-1,' '],[-1,' \/**'],[-1,' * Constant: DEFAULT_CONFIG'],[-1,' * {Object} Default configuration for all requests.'],[-1,' *\/'],[-1,' DEFAULT_CONFIG: {'],[-1,' method: \"GET\",'],[-1,' url: window.location.href,'],[-1,' async: true,'],[-1,' user: undefined,'],[-1,' password: undefined,'],[-1,' params: null,'],[-1,' proxy: OpenLayers.ProxyHost,'],[-1,' headers: {},'],[-1,' data: null,'],[-1,' callback: function() {},'],[-1,' success: null,'],[-1,' failure: null,'],[-1,' scope: null'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Constant: URL_SPLIT_REGEX'],[-1,' *\/'],[-1,' URL_SPLIT_REGEX: \/([^:]*:)\\\/\\\/([^:]*:?[^@]*@)?([^:\\\/\\?]*):?([^\\\/\\?]*)\/,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>} An events object that handles all '],[-1,' * events on the {<OpenLayers.Request>} object.'],[-1,' *'],[-1,' * All event listeners will receive an event object with three properties:'],[-1,' * request - {<OpenLayers.Request.XMLHttpRequest>} The request object.'],[-1,' * config - {Object} The config object sent to the specific request method.'],[-1,' * requestUrl - {String} The request url.'],[-1,' * '],[-1,' * Supported event types:'],[-1,' * complete - Triggered when we have a response from the request, if a'],[-1,' * listener returns false, no further response processing will take'],[-1,' * place.'],[-1,' * success - Triggered when the HTTP response has a success code (200-299).'],[-1,' * failure - Triggered when the HTTP response does not have a success code.'],[-1,' *\/'],[-1,' events: new OpenLayers.Events(this),'],[-1,' '],[-1,' \/**'],[-1,' * Method: makeSameOrigin'],[-1,' * Using the specified proxy, returns a same origin url of the provided url.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * url - {String} An arbitrary url'],[-1,' * proxy {String|Function} The proxy to use to make the provided url a'],[-1,' * same origin url.'],[-1,' *'],[-1,' * Returns'],[-1,' * {String} the same origin url. If no proxy is provided, the returned url'],[-1,' * will be the same as the provided url.'],[-1,' *\/'],[-1,' makeSameOrigin: function(url, proxy) {'],[0,' var sameOrigin = url.indexOf(\"http\") !== 0;'],[0,' var urlParts = !sameOrigin && url.match(this.URL_SPLIT_REGEX);'],[0,' if (urlParts) {'],[0,' var location = window.location;'],[0,' sameOrigin ='],[-1,' urlParts[1] == location.protocol &&'],[-1,' urlParts[3] == location.hostname;'],[0,' var uPort = urlParts[4], lPort = location.port;'],[0,' if (uPort != 80 && uPort != \"\" || lPort != \"80\" && lPort != \"\") {'],[0,' sameOrigin = sameOrigin && uPort == lPort;'],[-1,' }'],[-1,' }'],[0,' if (!sameOrigin) {'],[0,' if (proxy) {'],[0,' if (typeof proxy == \"function\") {'],[0,' url = proxy(url);'],[-1,' } else {'],[0,' url = proxy + encodeURIComponent(url);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return url;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: issue'],[-1,' * Create a new XMLHttpRequest object, open it, set any headers, bind'],[-1,' * a callback to done state, and send any data. It is recommended that'],[-1,' * you use one <GET>, <POST>, <PUT>, <DELETE>, <OPTIONS>, or <HEAD>.'],[-1,' * This method is only documented to provide detail on the configuration'],[-1,' * options available to all request methods.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * config - {Object} Object containing properties for configuring the'],[-1,' * request. Allowed configuration properties are described below.'],[-1,' * This object is modified and should not be reused.'],[-1,' *'],[-1,' * Allowed config properties:'],[-1,' * method - {String} One of GET, POST, PUT, DELETE, HEAD, or'],[-1,' * OPTIONS. Default is GET.'],[-1,' * url - {String} URL for the request.'],[-1,' * async - {Boolean} Open an asynchronous request. Default is true.'],[-1,' * user - {String} User for relevant authentication scheme. Set'],[-1,' * to null to clear current user.'],[-1,' * password - {String} Password for relevant authentication scheme.'],[-1,' * Set to null to clear current password.'],[-1,' * proxy - {String} Optional proxy. Defaults to'],[-1,' * <OpenLayers.ProxyHost>.'],[-1,' * params - {Object} Any key:value pairs to be appended to the'],[-1,' * url as a query string. Assumes url doesn\'t already include a query'],[-1,' * string or hash. Typically, this is only appropriate for <GET>'],[-1,' * requests where the query string will be appended to the url.'],[-1,' * Parameter values that are arrays will be'],[-1,' * concatenated with a comma (note that this goes against form-encoding)'],[-1,' * as is done with <OpenLayers.Util.getParameterString>.'],[-1,' * headers - {Object} Object with header:value pairs to be set on'],[-1,' * the request.'],[-1,' * data - {String | Document} Optional data to send with the request.'],[-1,' * Typically, this is only used with <POST> and <PUT> requests.'],[-1,' * Make sure to provide the appropriate \"Content-Type\" header for your'],[-1,' * data. For <POST> and <PUT> requests, the content type defaults to'],[-1,' * \"application-xml\". If your data is a different content type, or'],[-1,' * if you are using a different HTTP method, set the \"Content-Type\"'],[-1,' * header to match your data type.'],[-1,' * callback - {Function} Function to call when request is done.'],[-1,' * To determine if the request failed, check request.status (200'],[-1,' * indicates success).'],[-1,' * success - {Function} Optional function to call if request status is in'],[-1,' * the 200s. This will be called in addition to callback above and'],[-1,' * would typically only be used as an alternative.'],[-1,' * failure - {Function} Optional function to call if request status is not'],[-1,' * in the 200s. This will be called in addition to callback above and'],[-1,' * would typically only be used as an alternative.'],[-1,' * scope - {Object} If callback is a public method on some object,'],[-1,' * set the scope to that object.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {XMLHttpRequest} Request object. To abort the request before a response'],[-1,' * is received, call abort() on the request object.'],[-1,' *\/'],[-1,' issue: function(config) { '],[-1,' \/\/ apply default config - proxy host may have changed'],[0,' var defaultConfig = OpenLayers.Util.extend('],[-1,' this.DEFAULT_CONFIG,'],[-1,' {proxy: OpenLayers.ProxyHost}'],[-1,' );'],[0,' config = config || {};'],[0,' config.headers = config.headers || {};'],[0,' config = OpenLayers.Util.applyDefaults(config, defaultConfig);'],[0,' config.headers = OpenLayers.Util.applyDefaults(config.headers, defaultConfig.headers);'],[-1,' \/\/ Always set the \"X-Requested-With\" header to signal that this request'],[-1,' \/\/ was issued through the XHR-object. Since header keys are case '],[-1,' \/\/ insensitive and we want to allow overriding of the \"X-Requested-With\"'],[-1,' \/\/ header through the user we cannot use applyDefaults, but have to '],[-1,' \/\/ check manually whether we were called with a \"X-Requested-With\"'],[-1,' \/\/ header.'],[0,' var customRequestedWithHeader = false,'],[-1,' headerKey;'],[0,' for(headerKey in config.headers) {'],[0,' if (config.headers.hasOwnProperty( headerKey )) {'],[0,' if (headerKey.toLowerCase() === \'x-requested-with\') {'],[0,' customRequestedWithHeader = true;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' if (customRequestedWithHeader === false) {'],[-1,' \/\/ we did not have a custom \"X-Requested-With\" header'],[0,' config.headers[\'X-Requested-With\'] = \'XMLHttpRequest\';'],[-1,' }'],[-1,''],[-1,' \/\/ create request, open, and set headers'],[0,' var request = new OpenLayers.Request.XMLHttpRequest();'],[0,' var url = OpenLayers.Util.urlAppend(config.url, '],[-1,' OpenLayers.Util.getParameterString(config.params || {}));'],[0,' url = OpenLayers.Request.makeSameOrigin(url, config.proxy);'],[0,' request.open('],[-1,' config.method, url, config.async, config.user, config.password'],[-1,' );'],[0,' for(var header in config.headers) {'],[0,' request.setRequestHeader(header, config.headers[header]);'],[-1,' }'],[-1,''],[0,' var events = this.events;'],[-1,''],[-1,' \/\/ we want to execute runCallbacks with \"this\" as the'],[-1,' \/\/ execution scope'],[0,' var self = this;'],[-1,' '],[0,' request.onreadystatechange = function() {'],[0,' if(request.readyState == OpenLayers.Request.XMLHttpRequest.DONE) {'],[0,' var proceed = events.triggerEvent('],[-1,' \"complete\",'],[-1,' {request: request, config: config, requestUrl: url}'],[-1,' );'],[0,' if(proceed !== false) {'],[0,' self.runCallbacks('],[-1,' {request: request, config: config, requestUrl: url}'],[-1,' );'],[-1,' }'],[-1,' }'],[-1,' };'],[-1,' '],[-1,' \/\/ send request (optionally with data) and return'],[-1,' \/\/ call in a timeout for asynchronous requests so the return is'],[-1,' \/\/ available before readyState == 4 for cached docs'],[0,' if(config.async === false) {'],[0,' request.send(config.data);'],[-1,' } else {'],[0,' window.setTimeout(function(){'],[0,' if (request.readyState !== 0) { \/\/ W3C: 0-UNSENT'],[0,' request.send(config.data);'],[-1,' }'],[-1,' }, 0);'],[-1,' }'],[0,' return request;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: runCallbacks'],[-1,' * Calls the complete, success and failure callbacks. Application'],[-1,' * can listen to the \"complete\" event, have the listener '],[-1,' * display a confirm window and always return false, and'],[-1,' * execute OpenLayers.Request.runCallbacks if the user'],[-1,' * hits \"yes\" in the confirm window.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} Hash containing request, config and requestUrl keys'],[-1,' *\/'],[-1,' runCallbacks: function(options) {'],[0,' var request = options.request;'],[0,' var config = options.config;'],[-1,' '],[-1,' \/\/ bind callbacks to readyState 4 (done)'],[0,' var complete = (config.scope) ?'],[-1,' OpenLayers.Function.bind(config.callback, config.scope) :'],[-1,' config.callback;'],[-1,' '],[-1,' \/\/ optional success callback'],[0,' var success;'],[0,' if(config.success) {'],[0,' success = (config.scope) ?'],[-1,' OpenLayers.Function.bind(config.success, config.scope) :'],[-1,' config.success;'],[-1,' }'],[-1,''],[-1,' \/\/ optional failure callback'],[0,' var failure;'],[0,' if(config.failure) {'],[0,' failure = (config.scope) ?'],[-1,' OpenLayers.Function.bind(config.failure, config.scope) :'],[-1,' config.failure;'],[-1,' }'],[-1,''],[0,' if (OpenLayers.Util.createUrlObject(config.url).protocol == \"file:\" &&'],[-1,' request.responseText) {'],[0,' request.status = 200;'],[-1,' }'],[0,' complete(request);'],[-1,''],[0,' if (!request.status || (request.status >= 200 && request.status < 300)) {'],[0,' this.events.triggerEvent(\"success\", options);'],[0,' if(success) {'],[0,' success(request);'],[-1,' }'],[-1,' }'],[0,' if(request.status && (request.status < 200 || request.status >= 300)) { '],[0,' this.events.triggerEvent(\"failure\", options);'],[0,' if(failure) {'],[0,' failure(request);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: GET'],[-1,' * Send an HTTP GET request. Additional configuration properties are'],[-1,' * documented in the <issue> method, with the method property set'],[-1,' * to GET.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * config - {Object} Object with properties for configuring the request.'],[-1,' * See the <issue> method for documentation of allowed properties.'],[-1,' * This object is modified and should not be reused.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {XMLHttpRequest} Request object.'],[-1,' *\/'],[-1,' GET: function(config) {'],[0,' config = OpenLayers.Util.extend(config, {method: \"GET\"});'],[0,' return OpenLayers.Request.issue(config);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: POST'],[-1,' * Send a POST request. Additional configuration properties are'],[-1,' * documented in the <issue> method, with the method property set'],[-1,' * to POST and \"Content-Type\" header set to \"application\/xml\".'],[-1,' *'],[-1,' * Parameters:'],[-1,' * config - {Object} Object with properties for configuring the request.'],[-1,' * See the <issue> method for documentation of allowed properties. The'],[-1,' * default \"Content-Type\" header will be set to \"application-xml\" if'],[-1,' * none is provided. This object is modified and should not be reused.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {XMLHttpRequest} Request object.'],[-1,' *\/'],[-1,' POST: function(config) {'],[0,' config = OpenLayers.Util.extend(config, {method: \"POST\"});'],[-1,' \/\/ set content type to application\/xml if it isn\'t already set'],[0,' config.headers = config.headers ? config.headers : {};'],[0,' if(!(\"CONTENT-TYPE\" in OpenLayers.Util.upperCaseObject(config.headers))) {'],[0,' config.headers[\"Content-Type\"] = \"application\/xml\";'],[-1,' }'],[0,' return OpenLayers.Request.issue(config);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: PUT'],[-1,' * Send an HTTP PUT request. Additional configuration properties are'],[-1,' * documented in the <issue> method, with the method property set'],[-1,' * to PUT and \"Content-Type\" header set to \"application\/xml\".'],[-1,' *'],[-1,' * Parameters:'],[-1,' * config - {Object} Object with properties for configuring the request.'],[-1,' * See the <issue> method for documentation of allowed properties. The'],[-1,' * default \"Content-Type\" header will be set to \"application-xml\" if'],[-1,' * none is provided. This object is modified and should not be reused.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {XMLHttpRequest} Request object.'],[-1,' *\/'],[-1,' PUT: function(config) {'],[0,' config = OpenLayers.Util.extend(config, {method: \"PUT\"});'],[-1,' \/\/ set content type to application\/xml if it isn\'t already set'],[0,' config.headers = config.headers ? config.headers : {};'],[0,' if(!(\"CONTENT-TYPE\" in OpenLayers.Util.upperCaseObject(config.headers))) {'],[0,' config.headers[\"Content-Type\"] = \"application\/xml\";'],[-1,' }'],[0,' return OpenLayers.Request.issue(config);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: DELETE'],[-1,' * Send an HTTP DELETE request. Additional configuration properties are'],[-1,' * documented in the <issue> method, with the method property set'],[-1,' * to DELETE.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * config - {Object} Object with properties for configuring the request.'],[-1,' * See the <issue> method for documentation of allowed properties.'],[-1,' * This object is modified and should not be reused.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {XMLHttpRequest} Request object.'],[-1,' *\/'],[-1,' DELETE: function(config) {'],[0,' config = OpenLayers.Util.extend(config, {method: \"DELETE\"});'],[0,' return OpenLayers.Request.issue(config);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: HEAD'],[-1,' * Send an HTTP HEAD request. Additional configuration properties are'],[-1,' * documented in the <issue> method, with the method property set'],[-1,' * to HEAD.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * config - {Object} Object with properties for configuring the request.'],[-1,' * See the <issue> method for documentation of allowed properties.'],[-1,' * This object is modified and should not be reused.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {XMLHttpRequest} Request object.'],[-1,' *\/'],[-1,' HEAD: function(config) {'],[0,' config = OpenLayers.Util.extend(config, {method: \"HEAD\"});'],[0,' return OpenLayers.Request.issue(config);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: OPTIONS'],[-1,' * Send an HTTP OPTIONS request. Additional configuration properties are'],[-1,' * documented in the <issue> method, with the method property set'],[-1,' * to OPTIONS.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * config - {Object} Object with properties for configuring the request.'],[-1,' * See the <issue> method for documentation of allowed properties.'],[-1,' * This object is modified and should not be reused.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {XMLHttpRequest} Request object.'],[-1,' *\/'],[-1,' OPTIONS: function(config) {'],[0,' config = OpenLayers.Util.extend(config, {method: \"OPTIONS\"});'],[0,' return OpenLayers.Request.issue(config);'],[-1,' }'],[-1,''],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Format\/WMSGetFeatureInfo.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Format\/XML.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Format.WMSGetFeatureInfo'],[-1,' * Class to read GetFeatureInfo responses from Web Mapping Services'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Format.XML>'],[-1,' *\/'],[1,'OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: layerIdentifier'],[-1,' * {String} All xml nodes containing this search criteria will populate an'],[-1,' * internal array of layer nodes.'],[-1,' *\/'],[-1,' layerIdentifier: \'_layer\','],[-1,''],[-1,' \/**'],[-1,' * APIProperty: featureIdentifier'],[-1,' * {String} All xml nodes containing this search criteria will populate an'],[-1,' * internal array of feature nodes for each layer node found.'],[-1,' *\/'],[-1,' featureIdentifier: \'_feature\','],[-1,''],[-1,' \/**'],[-1,' * Property: regExes'],[-1,' * Compiled regular expressions for manipulating strings.'],[-1,' *\/'],[-1,' regExes: {'],[-1,' trimSpace: (\/^\\s*|\\s*$\/g),'],[-1,' removeSpace: (\/\\s*\/g),'],[-1,' splitSpace: (\/\\s+\/),'],[-1,' trimComma: (\/\\s*,\\s*\/g)'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Property: gmlFormat'],[-1,' * {<OpenLayers.Format.GML>} internal GML format for parsing geometries'],[-1,' * in msGMLOutput'],[-1,' *\/'],[-1,' gmlFormat: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Format.WMSGetFeatureInfo'],[-1,' * Create a new parser for WMS GetFeatureInfo responses'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} An optional object whose properties will be set on'],[-1,' * this instance.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: read'],[-1,' * Read WMS GetFeatureInfo data from a string, and return an array of features'],[-1,' *'],[-1,' * Parameters:'],[-1,' * data - {String} or {DOMElement} data to read\/parse.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(<OpenLayers.Feature.Vector>)} An array of features.'],[-1,' *\/'],[-1,' read: function(data) {'],[0,' var result;'],[0,' if(typeof data == \"string\") {'],[0,' data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);'],[-1,' }'],[0,' var root = data.documentElement;'],[0,' if(root) {'],[0,' var scope = this;'],[0,' var read = this[\"read_\" + root.nodeName];'],[0,' if(read) {'],[0,' result = read.call(this, root);'],[-1,' } else {'],[-1,' \/\/ fall-back to GML since this is a common output format for WMS'],[-1,' \/\/ GetFeatureInfo responses'],[0,' result = new OpenLayers.Format.GML((this.options ? this.options : {})).read(data);'],[-1,' }'],[-1,' } else {'],[0,' result = data;'],[-1,' }'],[0,' return result;'],[-1,' },'],[-1,''],[-1,''],[-1,' \/**'],[-1,' * Method: read_msGMLOutput'],[-1,' * Parse msGMLOutput nodes.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * data - {DOMElement}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array}'],[-1,' *\/'],[-1,' read_msGMLOutput: function(data) {'],[0,' var response = [];'],[0,' var layerNodes = this.getSiblingNodesByTagCriteria(data,'],[-1,' this.layerIdentifier);'],[0,' if (layerNodes) {'],[0,' for (var i=0, len=layerNodes.length; i<len; ++i) {'],[0,' var node = layerNodes[i];'],[0,' var layerName = node.nodeName;'],[0,' if (node.prefix) {'],[0,' layerName = layerName.split(\':\')[1];'],[-1,' }'],[0,' var layerName = layerName.replace(this.layerIdentifier, \'\');'],[0,' var featureNodes = this.getSiblingNodesByTagCriteria(node,'],[-1,' this.featureIdentifier);'],[0,' if (featureNodes) {'],[0,' for (var j = 0; j < featureNodes.length; j++) {'],[0,' var featureNode = featureNodes[j];'],[0,' var geomInfo = this.parseGeometry(featureNode);'],[0,' var attributes = this.parseAttributes(featureNode);'],[0,' var feature = new OpenLayers.Feature.Vector(geomInfo.geometry,'],[-1,' attributes, null);'],[0,' feature.bounds = geomInfo.bounds;'],[0,' feature.type = layerName;'],[0,' response.push(feature);'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return response;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: read_FeatureInfoResponse'],[-1,' * Parse FeatureInfoResponse nodes.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * data - {DOMElement}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array}'],[-1,' *\/'],[-1,' read_FeatureInfoResponse: function(data) {'],[0,' var response = [];'],[0,' var featureNodes = this.getElementsByTagNameNS(data, \'*\','],[-1,' \'FIELDS\');'],[-1,''],[0,' for(var i=0, len=featureNodes.length;i<len;i++) {'],[0,' var featureNode = featureNodes[i];'],[0,' var geom = null;'],[-1,''],[-1,' \/\/ attributes can be actual attributes on the FIELDS tag,'],[-1,' \/\/ or FIELD children'],[0,' var attributes = {};'],[0,' var j;'],[0,' var jlen = featureNode.attributes.length;'],[0,' if (jlen > 0) {'],[0,' for(j=0; j<jlen; j++) {'],[0,' var attribute = featureNode.attributes[j];'],[0,' attributes[attribute.nodeName] = attribute.nodeValue;'],[-1,' }'],[-1,' } else {'],[0,' var nodes = featureNode.childNodes;'],[0,' for (j=0, jlen=nodes.length; j<jlen; ++j) {'],[0,' var node = nodes[j];'],[0,' if (node.nodeType != 3) {'],[0,' attributes[node.getAttribute(\"name\")] ='],[-1,' node.getAttribute(\"value\");'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[0,' response.push('],[-1,' new OpenLayers.Feature.Vector(geom, attributes, null)'],[-1,' );'],[-1,' }'],[0,' return response;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getSiblingNodesByTagCriteria'],[-1,' * Recursively searches passed xml node and all it\'s descendant levels for'],[-1,' * nodes whose tagName contains the passed search string. This returns an'],[-1,' * array of all sibling nodes which match the criteria from the highest'],[-1,' * hierarchial level from which a match is found.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} An xml node'],[-1,' * criteria - {String} Search string which will match some part of a tagName'],[-1,' *'],[-1,' * Returns:'],[-1,' * Array({DOMElement}) An array of sibling xml nodes'],[-1,' *\/'],[-1,' getSiblingNodesByTagCriteria: function(node, criteria){'],[0,' var nodes = [];'],[0,' var children, tagName, n, matchNodes, child;'],[0,' if (node && node.hasChildNodes()) {'],[0,' children = node.childNodes;'],[0,' n = children.length;'],[-1,''],[0,' for(var k=0; k<n; k++){'],[0,' child = children[k];'],[0,' while (child && child.nodeType != 1) {'],[0,' child = child.nextSibling;'],[0,' k++;'],[-1,' }'],[0,' tagName = (child ? child.nodeName : \'\');'],[0,' if (tagName.length > 0 && tagName.indexOf(criteria) > -1) {'],[0,' nodes.push(child);'],[-1,' } else {'],[0,' matchNodes = this.getSiblingNodesByTagCriteria('],[-1,' child, criteria);'],[-1,''],[0,' if(matchNodes.length > 0){'],[0,' (nodes.length == 0) ?'],[-1,' nodes = matchNodes : nodes.push(matchNodes);'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[-1,' }'],[0,' return nodes;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: parseAttributes'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {<DOMElement>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An attributes object.'],[-1,' *'],[-1,' * Notes:'],[-1,' * Assumes that attributes are direct child xml nodes of the passed node'],[-1,' * and contain only a single text node.'],[-1,' *\/'],[-1,' parseAttributes: function(node){'],[0,' var attributes = {};'],[0,' if (node.nodeType == 1) {'],[0,' var children = node.childNodes;'],[0,' var n = children.length;'],[0,' for (var i = 0; i < n; ++i) {'],[0,' var child = children[i];'],[0,' if (child.nodeType == 1) {'],[0,' var grandchildren = child.childNodes;'],[0,' var name = (child.prefix) ?'],[-1,' child.nodeName.split(\":\")[1] : child.nodeName;'],[0,' if (grandchildren.length == 0) {'],[0,' attributes[name] = null;'],[0,' } else if (grandchildren.length == 1 ||'],[-1,' \/\/ to include separate big tag (with Firefox)'],[-1,' \/\/ without including boundedBy and geom.'],[-1,' grandchildren[0].nodeValue.replace('],[-1,' this.regExes.trimSpace, \"\").length > 0) {'],[0,' var grandchild = grandchildren[0];'],[0,' if (grandchild.nodeType == 3 ||'],[-1,' grandchild.nodeType == 4) {'],[-1,' \/\/ wholeText doesn\'t exist everywhere but we need it for FireFox'],[-1,' \/\/ see i.e.: http:\/\/msdn.microsoft.com\/en-us\/library\/ie\/ff974769%28v=vs.85%29.aspx'],[0,' var attribute = grandchild.wholeText ?'],[-1,' grandchild.wholeText :'],[-1,' grandchild.nodeValue;'],[0,' attributes[name] = attribute.replace('],[-1,' this.regExes.trimSpace, \"\");'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return attributes;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: parseGeometry'],[-1,' * Parse the geometry and the feature bounds out of the node using'],[-1,' * Format.GML'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {<DOMElement>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An object containing the geometry and the feature bounds'],[-1,' *\/'],[-1,' parseGeometry: function(node) {'],[-1,' \/\/ we need to use the old Format.GML parser since we do not know the'],[-1,' \/\/ geometry name'],[0,' if (!this.gmlFormat) {'],[0,' this.gmlFormat = new OpenLayers.Format.GML();'],[-1,' }'],[0,' var feature = this.gmlFormat.parseFeature(node);'],[0,' var geometry, bounds = null;'],[0,' if (feature) {'],[0,' geometry = feature.geometry && feature.geometry.clone();'],[0,' bounds = feature.bounds && feature.bounds.clone();'],[0,' feature.destroy();'],[-1,' }'],[0,' return {geometry: geometry, bounds: bounds};'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Format.WMSGetFeatureInfo\"'],[-1,''],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control\/WMSGetFeatureInfo.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Control.js'],[-1,' * @requires OpenLayers\/Handler\/Click.js'],[-1,' * @requires OpenLayers\/Handler\/Hover.js'],[-1,' * @requires OpenLayers\/Request.js'],[-1,' * @requires OpenLayers\/Format\/WMSGetFeatureInfo.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control.WMSGetFeatureInfo'],[-1,' * The WMSGetFeatureInfo control uses a WMS query to get information about a point on the map. The'],[-1,' * information may be in a display-friendly format such as HTML, or a machine-friendly format such'],[-1,' * as GML, depending on the server\'s capabilities and the client\'s configuration. This control'],[-1,' * handles click or hover events, attempts to parse the results using an OpenLayers.Format, and'],[-1,' * fires a \'getfeatureinfo\' event with the click position, the raw body of the response, and an'],[-1,' * array of features if it successfully read the response.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Control>'],[-1,' *\/'],[1,'OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: hover'],[-1,' * {Boolean} Send GetFeatureInfo requests when mouse stops moving.'],[-1,' * Default is false.'],[-1,' *\/'],[-1,' hover: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: drillDown'],[-1,' * {Boolean} Drill down over all WMS layers in the map. When'],[-1,' * using drillDown mode, hover is not possible, and an infoFormat that'],[-1,' * returns parseable features is required. Default is false.'],[-1,' *\/'],[-1,' drillDown: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: maxFeatures'],[-1,' * {Integer} Maximum number of features to return from a WMS query. This'],[-1,' * sets the feature_count parameter on WMS GetFeatureInfo'],[-1,' * requests.'],[-1,' *\/'],[-1,' maxFeatures: 10,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: clickCallback'],[-1,' * {String} The click callback to register in the'],[-1,' * {<OpenLayers.Handler.Click>} object created when the hover'],[-1,' * option is set to false. Default is \"click\".'],[-1,' *\/'],[-1,' clickCallback: \"click\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: output'],[-1,' * {String} Either \"features\" or \"object\". When triggering a getfeatureinfo'],[-1,' * request should we pass on an array of features or an object with with'],[-1,' * a \"features\" property and other properties (such as the url of the'],[-1,' * WMS). Default is \"features\".'],[-1,' *\/'],[-1,' output: \"features\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: layers'],[-1,' * {Array(<OpenLayers.Layer.WMS>)} The layers to query for feature info.'],[-1,' * If omitted, all map WMS layers with a url that matches this <url> or'],[-1,' * <layerUrls> will be considered.'],[-1,' *\/'],[-1,' layers: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: queryVisible'],[-1,' * {Boolean} If true, filter out hidden layers when searching the map for'],[-1,' * layers to query. Default is false.'],[-1,' *\/'],[-1,' queryVisible: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: url'],[-1,' * {String} The URL of the WMS service to use. If not provided, the url'],[-1,' * of the first eligible layer will be used.'],[-1,' *\/'],[-1,' url: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: layerUrls'],[-1,' * {Array(String)} Optional list of urls for layers that should be queried.'],[-1,' * This can be used when the layer url differs from the url used for'],[-1,' * making GetFeatureInfo requests (in the case of a layer using cached'],[-1,' * tiles).'],[-1,' *\/'],[-1,' layerUrls: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: infoFormat'],[-1,' * {String} The mimetype to request from the server. If you are using'],[-1,' * drillDown mode and have multiple servers that do not share a common'],[-1,' * infoFormat, you can override the control\'s infoFormat by providing an'],[-1,' * INFO_FORMAT parameter in your <OpenLayers.Layer.WMS> instance(s).'],[-1,' *\/'],[-1,' infoFormat: \'text\/html\','],[-1,''],[-1,' \/**'],[-1,' * APIProperty: vendorParams'],[-1,' * {Object} Additional parameters that will be added to the request, for'],[-1,' * WMS implementations that support them. This could e.g. look like'],[-1,' * (start code)'],[-1,' * {'],[-1,' * radius: 5'],[-1,' * }'],[-1,' * (end)'],[-1,' *\/'],[-1,' vendorParams: {},'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: format'],[-1,' * {<OpenLayers.Format>} A format for parsing GetFeatureInfo responses.'],[-1,' * Default is <OpenLayers.Format.WMSGetFeatureInfo>.'],[-1,' *\/'],[-1,' format: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: formatOptions'],[-1,' * {Object} Optional properties to set on the format (if one is not provided'],[-1,' * in the <format> property.'],[-1,' *\/'],[-1,' formatOptions: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: handlerOptions'],[-1,' * {Object} Additional options for the handlers used by this control, e.g.'],[-1,' * (start code)'],[-1,' * {'],[-1,' * \"click\": {delay: 100},'],[-1,' * \"hover\": {delay: 300}'],[-1,' * }'],[-1,' * (end)'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Property: handler'],[-1,' * {Object} Reference to the <OpenLayers.Handler> for this control'],[-1,' *\/'],[-1,' handler: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: hoverRequest'],[-1,' * {<OpenLayers.Request>} contains the currently running hover request'],[-1,' * (if any).'],[-1,' *\/'],[-1,' hoverRequest: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: events'],[-1,' * {<OpenLayers.Events>} Events instance for listeners and triggering'],[-1,' * control specific events.'],[-1,' *'],[-1,' * Register a listener for a particular event with the following syntax:'],[-1,' * (code)'],[-1,' * control.events.register(type, obj, listener);'],[-1,' * (end)'],[-1,' *'],[-1,' * Supported event types (in addition to those from <OpenLayers.Control.events>):'],[-1,' * beforegetfeatureinfo - Triggered before the request is sent.'],[-1,' * The event object has an *xy* property with the position of the'],[-1,' * mouse click or hover event that triggers the request.'],[-1,' * nogetfeatureinfo - no queryable layers were found.'],[-1,' * getfeatureinfo - Triggered when a GetFeatureInfo response is received.'],[-1,' * The event object has a *text* property with the body of the'],[-1,' * response (String), a *features* property with an array of the'],[-1,' * parsed features, an *xy* property with the position of the mouse'],[-1,' * click or hover event that triggered the request, and a *request*'],[-1,' * property with the request itself. If drillDown is set to true and'],[-1,' * multiple requests were issued to collect feature info from all'],[-1,' * layers, *text* and *request* will only contain the response body'],[-1,' * and request object of the last request.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Constructor: <OpenLayers.Control.WMSGetFeatureInfo>'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object}'],[-1,' *\/'],[-1,' initialize: function(options) {'],[0,' options = options || {};'],[0,' options.handlerOptions = options.handlerOptions || {};'],[-1,''],[0,' OpenLayers.Control.prototype.initialize.apply(this, [options]);'],[-1,''],[0,' if(!this.format) {'],[0,' this.format = new OpenLayers.Format.WMSGetFeatureInfo('],[-1,' options.formatOptions'],[-1,' );'],[-1,' }'],[-1,''],[0,' if(this.drillDown === true) {'],[0,' this.hover = false;'],[-1,' }'],[-1,''],[0,' if(this.hover) {'],[0,' this.handler = new OpenLayers.Handler.Hover('],[-1,' this, {'],[-1,' \'move\': this.cancelHover,'],[-1,' \'pause\': this.getInfoForHover'],[-1,' },'],[-1,' OpenLayers.Util.extend(this.handlerOptions.hover || {}, {'],[-1,' \'delay\': 250'],[-1,' }));'],[-1,' } else {'],[0,' var callbacks = {};'],[0,' callbacks[this.clickCallback] = this.getInfoForClick;'],[0,' this.handler = new OpenLayers.Handler.Click('],[-1,' this, callbacks, this.handlerOptions.click || {});'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getInfoForClick'],[-1,' * Called on click'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {<OpenLayers.Event>}'],[-1,' *\/'],[-1,' getInfoForClick: function(evt) {'],[0,' this.events.triggerEvent(\"beforegetfeatureinfo\", {xy: evt.xy});'],[-1,' \/\/ Set the cursor to \"wait\" to tell the user we\'re working on their'],[-1,' \/\/ click.'],[0,' OpenLayers.Element.addClass(this.map.viewPortDiv, \"olCursorWait\");'],[0,' this.request(evt.xy, {});'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getInfoForHover'],[-1,' * Pause callback for the hover handler'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Object}'],[-1,' *\/'],[-1,' getInfoForHover: function(evt) {'],[0,' this.events.triggerEvent(\"beforegetfeatureinfo\", {xy: evt.xy});'],[0,' this.request(evt.xy, {hover: true});'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: cancelHover'],[-1,' * Cancel callback for the hover handler'],[-1,' *\/'],[-1,' cancelHover: function() {'],[0,' if (this.hoverRequest) {'],[0,' this.hoverRequest.abort();'],[0,' this.hoverRequest = null;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: findLayers'],[-1,' * Internal method to get the layers, independent of whether we are'],[-1,' * inspecting the map or using a client-provided array'],[-1,' *\/'],[-1,' findLayers: function() {'],[-1,''],[0,' var candidates = this.layers || this.map.layers;'],[0,' var layers = [];'],[0,' var layer, url;'],[0,' for(var i = candidates.length - 1; i >= 0; --i) {'],[0,' layer = candidates[i];'],[0,' if(layer instanceof OpenLayers.Layer.WMS &&'],[-1,' (!this.queryVisible || layer.getVisibility())) {'],[0,' url = OpenLayers.Util.isArray(layer.url) ? layer.url[0] : layer.url;'],[-1,' \/\/ if the control was not configured with a url, set it'],[-1,' \/\/ to the first layer url'],[0,' if(this.drillDown === false && !this.url) {'],[0,' this.url = url;'],[-1,' }'],[0,' if(this.drillDown === true || this.urlMatches(url)) {'],[0,' layers.push(layer);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return layers;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: urlMatches'],[-1,' * Test to see if the provided url matches either the control <url> or one'],[-1,' * of the <layerUrls>.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * url - {String} The url to test.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Boolean} The provided url matches the control <url> or one of the'],[-1,' * <layerUrls>.'],[-1,' *\/'],[-1,' urlMatches: function(url) {'],[0,' var matches = OpenLayers.Util.isEquivalentUrl(this.url, url);'],[0,' if(!matches && this.layerUrls) {'],[0,' for(var i=0, len=this.layerUrls.length; i<len; ++i) {'],[0,' if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[i], url)) {'],[0,' matches = true;'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return matches;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: buildWMSOptions'],[-1,' * Build an object with the relevant WMS options for the GetFeatureInfo request'],[-1,' *'],[-1,' * Parameters:'],[-1,' * url - {String} The url to be used for sending the request'],[-1,' * layers - {Array(<OpenLayers.Layer.WMS)} An array of layers'],[-1,' * clickPosition - {<OpenLayers.Pixel>} The position on the map where the mouse'],[-1,' * event occurred.'],[-1,' * format - {String} The format from the corresponding GetMap request'],[-1,' *\/'],[-1,' buildWMSOptions: function(url, layers, clickPosition, format) {'],[0,' var layerNames = [], styleNames = [];'],[0,' for (var i = 0, len = layers.length; i < len; i++) {'],[0,' if (layers[i].params.LAYERS != null) {'],[0,' layerNames = layerNames.concat(layers[i].params.LAYERS);'],[0,' styleNames = styleNames.concat(this.getStyleNames(layers[i]));'],[-1,' }'],[-1,' }'],[0,' var firstLayer = layers[0];'],[-1,' \/\/ use the firstLayer\'s projection if it matches the map projection -'],[-1,' \/\/ this assumes that all layers will be available in this projection'],[0,' var projection = this.map.getProjection();'],[0,' var layerProj = firstLayer.projection;'],[0,' if (layerProj && layerProj.equals(this.map.getProjectionObject())) {'],[0,' projection = layerProj.getCode();'],[-1,' }'],[0,' var params = OpenLayers.Util.extend({'],[-1,' service: \"WMS\",'],[-1,' version: firstLayer.params.VERSION,'],[-1,' request: \"GetFeatureInfo\",'],[-1,' exceptions: firstLayer.params.EXCEPTIONS,'],[-1,' bbox: this.map.getExtent().toBBOX(null,'],[-1,' firstLayer.reverseAxisOrder()),'],[-1,' feature_count: this.maxFeatures,'],[-1,' height: this.map.getSize().h,'],[-1,' width: this.map.getSize().w,'],[-1,' format: format,'],[-1,' info_format: firstLayer.params.INFO_FORMAT || this.infoFormat'],[-1,' }, (parseFloat(firstLayer.params.VERSION) >= 1.3) ?'],[-1,' {'],[-1,' crs: projection,'],[-1,' i: parseInt(clickPosition.x),'],[-1,' j: parseInt(clickPosition.y)'],[-1,' } :'],[-1,' {'],[-1,' srs: projection,'],[-1,' x: parseInt(clickPosition.x),'],[-1,' y: parseInt(clickPosition.y)'],[-1,' }'],[-1,' );'],[0,' if (layerNames.length != 0) {'],[0,' params = OpenLayers.Util.extend({'],[-1,' layers: layerNames,'],[-1,' query_layers: layerNames,'],[-1,' styles: styleNames'],[-1,' }, params);'],[-1,' }'],[0,' OpenLayers.Util.applyDefaults(params, this.vendorParams);'],[0,' return {'],[-1,' url: url,'],[-1,' params: OpenLayers.Util.upperCaseObject(params),'],[-1,' callback: function(request) {'],[0,' this.handleResponse(clickPosition, request, url);'],[-1,' },'],[-1,' scope: this'],[-1,' };'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getStyleNames'],[-1,' * Gets the STYLES parameter for the layer. Make sure the STYLES parameter'],[-1,' * matches the LAYERS parameter'],[-1,' *'],[-1,' * Parameters:'],[-1,' * layer - {<OpenLayers.Layer.WMS>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(String)} The STYLES parameter'],[-1,' *\/'],[-1,' getStyleNames: function(layer) {'],[-1,' \/\/ in the event of a WMS layer bundling multiple layers but not'],[-1,' \/\/ specifying styles,we need the same number of commas to specify'],[-1,' \/\/ the default style for each of the layers. We can\'t just leave it'],[-1,' \/\/ blank as we may be including other layers that do specify styles.'],[0,' var styleNames;'],[0,' if (layer.params.STYLES) {'],[0,' styleNames = layer.params.STYLES;'],[-1,' } else {'],[0,' if (OpenLayers.Util.isArray(layer.params.LAYERS)) {'],[0,' styleNames = new Array(layer.params.LAYERS.length);'],[-1,' } else {'],[0,' styleNames = layer.params.LAYERS.toString().replace(\/[^,]\/g, \"\");'],[-1,' }'],[-1,' }'],[0,' return styleNames;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: request'],[-1,' * Sends a GetFeatureInfo request to the WMS'],[-1,' *'],[-1,' * Parameters:'],[-1,' * clickPosition - {<OpenLayers.Pixel>} The position on the map where the'],[-1,' * mouse event occurred.'],[-1,' * options - {Object} additional options for this method.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * - *hover* {Boolean} true if we do the request for the hover handler'],[-1,' *\/'],[-1,' request: function(clickPosition, options) {'],[0,' var layers = this.findLayers();'],[0,' if(layers.length == 0) {'],[0,' this.events.triggerEvent(\"nogetfeatureinfo\");'],[-1,' \/\/ Reset the cursor.'],[0,' OpenLayers.Element.removeClass(this.map.viewPortDiv, \"olCursorWait\");'],[0,' return;'],[-1,' }'],[-1,''],[0,' options = options || {};'],[0,' if(this.drillDown === false) {'],[0,' var wmsOptions = this.buildWMSOptions(this.url, layers,'],[-1,' clickPosition, layers[0].params.FORMAT);'],[0,' var request = OpenLayers.Request.GET(wmsOptions);'],[-1,''],[0,' if (options.hover === true) {'],[0,' this.hoverRequest = request;'],[-1,' }'],[-1,' } else {'],[0,' this._requestCount = 0;'],[0,' this._numRequests = 0;'],[0,' this.features = [];'],[-1,' \/\/ group according to service url to combine requests'],[0,' var services = {}, url;'],[0,' for(var i=0, len=layers.length; i<len; i++) {'],[0,' var layer = layers[i];'],[0,' var service, found = false;'],[0,' url = OpenLayers.Util.isArray(layer.url) ? layer.url[0] : layer.url;'],[0,' if(url in services) {'],[0,' services[url].push(layer);'],[-1,' } else {'],[0,' this._numRequests++;'],[0,' services[url] = [layer];'],[-1,' }'],[-1,' }'],[0,' var layers;'],[0,' for (var url in services) {'],[0,' layers = services[url];'],[0,' var wmsOptions = this.buildWMSOptions(url, layers,'],[-1,' clickPosition, layers[0].params.FORMAT);'],[0,' OpenLayers.Request.GET(wmsOptions);'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: triggerGetFeatureInfo'],[-1,' * Trigger the getfeatureinfo event when all is done'],[-1,' *'],[-1,' * Parameters:'],[-1,' * request - {XMLHttpRequest} The request object'],[-1,' * xy - {<OpenLayers.Pixel>} The position on the map where the'],[-1,' * mouse event occurred.'],[-1,' * features - {Array(<OpenLayers.Feature.Vector>)} or'],[-1,' * {Array({Object}) when output is \"object\". The object has a url and a'],[-1,' * features property which contains an array of features.'],[-1,' *\/'],[-1,' triggerGetFeatureInfo: function(request, xy, features) {'],[0,' this.events.triggerEvent(\"getfeatureinfo\", {'],[-1,' text: request.responseText,'],[-1,' features: features,'],[-1,' request: request,'],[-1,' xy: xy'],[-1,' });'],[-1,''],[-1,' \/\/ Reset the cursor.'],[0,' OpenLayers.Element.removeClass(this.map.viewPortDiv, \"olCursorWait\");'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: handleResponse'],[-1,' * Handler for the GetFeatureInfo response.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * xy - {<OpenLayers.Pixel>} The position on the map where the'],[-1,' * mouse event occurred.'],[-1,' * request - {XMLHttpRequest} The request object.'],[-1,' * url - {String} The url which was used for this request.'],[-1,' *\/'],[-1,' handleResponse: function(xy, request, url) {'],[-1,''],[0,' var doc = request.responseXML;'],[0,' if(!doc || !doc.documentElement) {'],[0,' doc = request.responseText;'],[-1,' }'],[-1,''],[0,' var features = [];'],[0,' var responseHeaders = request.getAllResponseHeaders();'],[0,' if(responseHeaders && this.infoFormat === \"application\/json\" && responseHeaders.indexOf(\"application\/json\") !== -1) {'],[0,' features = new OpenLayers.Format.GeoJSON().read(doc);'],[-1,' }'],[-1,' else {'],[0,' features = this.format.read(doc);'],[-1,' }'],[-1,''],[0,' if (this.drillDown === false) {'],[0,' this.triggerGetFeatureInfo(request, xy, features);'],[-1,' } else {'],[0,' this._requestCount++;'],[0,' if (this.output === \"object\") {'],[0,' this._features = (this._features || []).concat('],[-1,' {url: url, features: features}'],[-1,' );'],[-1,' } else {'],[0,' this._features = (this._features || []).concat(features);'],[-1,' }'],[-1,''],[0,' if (this._requestCount === this._numRequests) {'],[0,' this.triggerGetFeatureInfo(request, xy, this._features.concat());'],[0,' delete this._features;'],[0,' delete this._requestCount;'],[0,' delete this._numRequests;'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Control.WMSGetFeatureInfo\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Renderer\/SVG.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Renderer\/Elements.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Renderer.SVG'],[-1,' * '],[-1,' * Inherits:'],[-1,' * - <OpenLayers.Renderer.Elements>'],[-1,' *\/'],[1,'OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {'],[-1,''],[-1,' \/** '],[-1,' * Property: xmlns'],[-1,' * {String}'],[-1,' *\/'],[-1,' xmlns: \"http:\/\/www.w3.org\/2000\/svg\",'],[-1,' '],[-1,' \/**'],[-1,' * Property: xlinkns'],[-1,' * {String}'],[-1,' *\/'],[-1,' xlinkns: \"http:\/\/www.w3.org\/1999\/xlink\",'],[-1,''],[-1,' \/**'],[-1,' * Constant: MAX_PIXEL'],[-1,' * {Integer} Firefox has a limitation where values larger or smaller than '],[-1,' * about 15000 in an SVG document lock the browser up. This '],[-1,' * works around it.'],[-1,' *\/'],[-1,' MAX_PIXEL: 15000,'],[-1,''],[-1,' \/**'],[-1,' * Property: translationParameters'],[-1,' * {Object} Hash with \"x\" and \"y\" properties'],[-1,' *\/'],[-1,' translationParameters: null,'],[-1,' '],[-1,' \/**'],[-1,' * Property: symbolMetrics'],[-1,' * {Object} Cache for symbol metrics according to their svg coordinate'],[-1,' * space. This is an object keyed by the symbol\'s id, and values are'],[-1,' * an array of [width, centerX, centerY].'],[-1,' *\/'],[-1,' symbolMetrics: null,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Renderer.SVG'],[-1,' * '],[-1,' * Parameters:'],[-1,' * containerID - {String}'],[-1,' *\/'],[-1,' initialize: function(containerID) {'],[0,' if (!this.supported()) { '],[0,' return; '],[-1,' }'],[0,' OpenLayers.Renderer.Elements.prototype.initialize.apply(this, '],[-1,' arguments);'],[0,' this.translationParameters = {x: 0, y: 0};'],[-1,' '],[0,' this.symbolMetrics = {};'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: supported'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the browser supports the SVG renderer'],[-1,' *\/'],[-1,' supported: function() {'],[0,' var svgFeature = \"http:\/\/www.w3.org\/TR\/SVG11\/feature#\";'],[0,' return (document.implementation && '],[-1,' (document.implementation.hasFeature(\"org.w3c.svg\", \"1.0\") || '],[-1,' document.implementation.hasFeature(svgFeature + \"SVG\", \"1.1\") || '],[-1,' document.implementation.hasFeature(svgFeature + \"BasicStructure\", \"1.1\") ));'],[-1,' }, '],[-1,''],[-1,' \/**'],[-1,' * Method: inValidRange'],[-1,' * See #669 for more information'],[-1,' *'],[-1,' * Parameters:'],[-1,' * x - {Integer}'],[-1,' * y - {Integer}'],[-1,' * xyOnly - {Boolean} whether or not to just check for x and y, which means'],[-1,' * to not take the current translation parameters into account if true.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the \'x\' and \'y\' coordinates are in the '],[-1,' * valid range.'],[-1,' *\/ '],[-1,' inValidRange: function(x, y, xyOnly) {'],[0,' var left = x + (xyOnly ? 0 : this.translationParameters.x);'],[0,' var top = y + (xyOnly ? 0 : this.translationParameters.y);'],[0,' return (left >= -this.MAX_PIXEL && left <= this.MAX_PIXEL &&'],[-1,' top >= -this.MAX_PIXEL && top <= this.MAX_PIXEL);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setExtent'],[-1,' * '],[-1,' * Parameters:'],[-1,' * extent - {<OpenLayers.Bounds>}'],[-1,' * resolutionChanged - {Boolean}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true to notify the layer that the new extent does not exceed'],[-1,' * the coordinate range, and the features will not need to be redrawn.'],[-1,' * False otherwise.'],[-1,' *\/'],[-1,' setExtent: function(extent, resolutionChanged) {'],[0,' var coordSysUnchanged = OpenLayers.Renderer.Elements.prototype.setExtent.apply(this, arguments);'],[-1,' '],[0,' var resolution = this.getResolution(),'],[-1,' left = -extent.left \/ resolution,'],[-1,' top = extent.top \/ resolution;'],[-1,''],[-1,' \/\/ If the resolution has changed, start over changing the corner, because'],[-1,' \/\/ the features will redraw.'],[0,' if (resolutionChanged) {'],[0,' this.left = left;'],[0,' this.top = top;'],[-1,' \/\/ Set the viewbox'],[0,' var extentString = \"0 0 \" + this.size.w + \" \" + this.size.h;'],[-1,''],[0,' this.rendererRoot.setAttributeNS(null, \"viewBox\", extentString);'],[0,' this.translate(this.xOffset, 0);'],[0,' return true;'],[-1,' } else {'],[0,' var inRange = this.translate(left - this.left + this.xOffset, top - this.top);'],[0,' if (!inRange) {'],[-1,' \/\/ recenter the coordinate system'],[0,' this.setExtent(extent, true);'],[-1,' }'],[0,' return coordSysUnchanged && inRange;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: translate'],[-1,' * Transforms the SVG coordinate system'],[-1,' * '],[-1,' * Parameters:'],[-1,' * x - {Float}'],[-1,' * y - {Float}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} true if the translation parameters are in the valid coordinates'],[-1,' * range, false otherwise.'],[-1,' *\/'],[-1,' translate: function(x, y) {'],[0,' if (!this.inValidRange(x, y, true)) {'],[0,' return false;'],[-1,' } else {'],[0,' var transformString = \"\";'],[0,' if (x || y) {'],[0,' transformString = \"translate(\" + x + \",\" + y + \")\";'],[-1,' }'],[0,' this.root.setAttributeNS(null, \"transform\", transformString);'],[0,' this.translationParameters = {x: x, y: y};'],[0,' return true;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setSize'],[-1,' * Sets the size of the drawing surface.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * size - {<OpenLayers.Size>} The size of the drawing surface'],[-1,' *\/'],[-1,' setSize: function(size) {'],[0,' OpenLayers.Renderer.prototype.setSize.apply(this, arguments);'],[-1,' '],[0,' this.rendererRoot.setAttributeNS(null, \"width\", this.size.w);'],[0,' this.rendererRoot.setAttributeNS(null, \"height\", this.size.h);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: getNodeType '],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * style - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} The corresponding node type for the specified geometry'],[-1,' *\/'],[-1,' getNodeType: function(geometry, style) {'],[0,' var nodeType = null;'],[0,' switch (geometry.CLASS_NAME) {'],[-1,' case \"OpenLayers.Geometry.Point\":'],[0,' if (style.externalGraphic) {'],[0,' nodeType = \"image\";'],[0,' } else if (this.isComplexSymbol(style.graphicName)) {'],[0,' nodeType = \"svg\";'],[-1,' } else {'],[0,' nodeType = \"circle\";'],[-1,' }'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.Rectangle\":'],[0,' nodeType = \"rect\";'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.LineString\":'],[0,' nodeType = \"polyline\";'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.LinearRing\":'],[0,' nodeType = \"polygon\";'],[0,' break;'],[-1,' case \"OpenLayers.Geometry.Polygon\":'],[-1,' case \"OpenLayers.Geometry.Curve\":'],[0,' nodeType = \"path\";'],[0,' break;'],[-1,' default:'],[0,' break;'],[-1,' }'],[0,' return nodeType;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: setStyle'],[-1,' * Use to set all the style attributes to a SVG node.'],[-1,' * '],[-1,' * Takes care to adjust stroke width and point radius to be'],[-1,' * resolution-relative'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {SVGDomElement} An SVG element to decorate'],[-1,' * style - {Object}'],[-1,' * options - {Object} Currently supported options include '],[-1,' * \'isFilled\' {Boolean} and'],[-1,' * \'isStroked\' {Boolean}'],[-1,' *\/'],[-1,' setStyle: function(node, style, options) {'],[0,' style = style || node._style;'],[0,' options = options || node._options;'],[-1,''],[0,' var title = style.title || style.graphicTitle;'],[0,' if (title) {'],[0,' node.setAttributeNS(null, \"title\", title);'],[-1,' \/\/Standards-conformant SVG'],[-1,' \/\/ Prevent duplicate nodes. See issue https:\/\/github.com\/openlayers\/openlayers\/issues\/92 '],[0,' var titleNode = node.getElementsByTagName(\"title\");'],[0,' if (titleNode.length > 0) {'],[0,' titleNode[0].firstChild.textContent = title;'],[-1,' } else {'],[0,' var label = this.nodeFactory(null, \"title\");'],[0,' label.textContent = title;'],[0,' node.appendChild(label);'],[-1,' }'],[-1,' }'],[-1,''],[0,' var r = parseFloat(node.getAttributeNS(null, \"r\"));'],[0,' var widthFactor = 1;'],[0,' var pos;'],[0,' if (node._geometryClass == \"OpenLayers.Geometry.Point\" && r) {'],[0,' node.style.visibility = \"\";'],[0,' if (style.graphic === false) {'],[0,' node.style.visibility = \"hidden\";'],[0,' } else if (style.externalGraphic) {'],[0,' pos = this.getPosition(node);'],[0,' if (style.graphicWidth && style.graphicHeight) {'],[0,' node.setAttributeNS(null, \"preserveAspectRatio\", \"none\");'],[-1,' }'],[0,' var width = style.graphicWidth || style.graphicHeight;'],[0,' var height = style.graphicHeight || style.graphicWidth;'],[0,' width = width ? width : style.pointRadius*2;'],[0,' height = height ? height : style.pointRadius*2;'],[0,' var xOffset = (style.graphicXOffset != undefined) ?'],[-1,' style.graphicXOffset : -(0.5 * width);'],[0,' var yOffset = (style.graphicYOffset != undefined) ?'],[-1,' style.graphicYOffset : -(0.5 * height);'],[-1,''],[0,' var opacity = style.graphicOpacity || style.fillOpacity;'],[-1,' '],[0,' node.setAttributeNS(null, \"x\", (pos.x + xOffset).toFixed());'],[0,' node.setAttributeNS(null, \"y\", (pos.y + yOffset).toFixed());'],[0,' node.setAttributeNS(null, \"width\", width);'],[0,' node.setAttributeNS(null, \"height\", height);'],[0,' node.setAttributeNS(this.xlinkns, \"xlink:href\", style.externalGraphic);'],[0,' node.setAttributeNS(null, \"style\", \"opacity: \"+opacity);'],[0,' node.onclick = OpenLayers.Event.preventDefault;'],[0,' } else if (this.isComplexSymbol(style.graphicName)) {'],[-1,' \/\/ the symbol viewBox is three times as large as the symbol'],[0,' var offset = style.pointRadius * 3;'],[0,' var size = offset * 2;'],[0,' var src = this.importSymbol(style.graphicName);'],[0,' pos = this.getPosition(node);'],[0,' widthFactor = this.symbolMetrics[src.id][0] * 3 \/ size;'],[-1,' '],[-1,' \/\/ remove the node from the dom before we modify it. This'],[-1,' \/\/ prevents various rendering issues in Safari and FF'],[0,' var parent = node.parentNode;'],[0,' var nextSibling = node.nextSibling;'],[0,' if(parent) {'],[0,' parent.removeChild(node);'],[-1,' }'],[-1,' '],[-1,' \/\/ The more appropriate way to implement this would be use\/defs,'],[-1,' \/\/ but due to various issues in several browsers, it is safer to'],[-1,' \/\/ copy the symbols instead of referencing them. '],[-1,' \/\/ See e.g. ticket http:\/\/trac.osgeo.org\/openlayers\/ticket\/2985 '],[-1,' \/\/ and this email thread'],[-1,' \/\/ http:\/\/osgeo-org.1803224.n2.nabble.com\/Select-Control-Ctrl-click-on-Feature-with-a-graphicName-opens-new-browser-window-tc5846039.html'],[0,' node.firstChild && node.removeChild(node.firstChild);'],[0,' node.appendChild(src.firstChild.cloneNode(true));'],[0,' node.setAttributeNS(null, \"viewBox\", src.getAttributeNS(null, \"viewBox\"));'],[-1,' '],[0,' node.setAttributeNS(null, \"width\", size);'],[0,' node.setAttributeNS(null, \"height\", size);'],[0,' node.setAttributeNS(null, \"x\", pos.x - offset);'],[0,' node.setAttributeNS(null, \"y\", pos.y - offset);'],[-1,' '],[-1,' \/\/ now that the node has all its new properties, insert it'],[-1,' \/\/ back into the dom where it was'],[0,' if(nextSibling) {'],[0,' parent.insertBefore(node, nextSibling);'],[0,' } else if(parent) {'],[0,' parent.appendChild(node);'],[-1,' }'],[-1,' } else {'],[0,' node.setAttributeNS(null, \"r\", style.pointRadius);'],[-1,' }'],[-1,''],[0,' var rotation = style.rotation;'],[-1,' '],[0,' if ((rotation !== undefined || node._rotation !== undefined) && pos) {'],[0,' node._rotation = rotation;'],[0,' rotation |= 0;'],[0,' if (node.nodeName !== \"svg\") { '],[0,' node.setAttributeNS(null, \"transform\", '],[-1,' \"rotate(\" + rotation + \" \" + pos.x + \" \" + '],[-1,' pos.y + \")\"); '],[-1,' } else {'],[0,' var metrics = this.symbolMetrics[src.id];'],[0,' node.firstChild.setAttributeNS(null, \"transform\", \"rotate(\" '],[-1,' + rotation + \" \" '],[-1,' + metrics[1] + \" \"'],[-1,' + metrics[2] + \")\");'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if (options.isFilled) {'],[0,' node.setAttributeNS(null, \"fill\", style.fillColor);'],[0,' node.setAttributeNS(null, \"fill-opacity\", style.fillOpacity);'],[-1,' } else {'],[0,' node.setAttributeNS(null, \"fill\", \"none\");'],[-1,' }'],[-1,''],[0,' if (options.isStroked) {'],[0,' node.setAttributeNS(null, \"stroke\", style.strokeColor);'],[0,' node.setAttributeNS(null, \"stroke-opacity\", style.strokeOpacity);'],[0,' node.setAttributeNS(null, \"stroke-width\", style.strokeWidth * widthFactor);'],[0,' node.setAttributeNS(null, \"stroke-linecap\", style.strokeLinecap || \"round\");'],[-1,' \/\/ Hard-coded linejoin for now, to make it look the same as in VML.'],[-1,' \/\/ There is no strokeLinejoin property yet for symbolizers.'],[0,' node.setAttributeNS(null, \"stroke-linejoin\", \"round\");'],[0,' style.strokeDashstyle && node.setAttributeNS(null,'],[-1,' \"stroke-dasharray\", this.dashStyle(style, widthFactor));'],[-1,' } else {'],[0,' node.setAttributeNS(null, \"stroke\", \"none\");'],[-1,' }'],[-1,' '],[0,' if (style.pointerEvents) {'],[0,' node.setAttributeNS(null, \"pointer-events\", style.pointerEvents);'],[-1,' }'],[-1,' '],[0,' if (style.cursor != null) {'],[0,' node.setAttributeNS(null, \"cursor\", style.cursor);'],[-1,' }'],[-1,' '],[0,' return node;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: dashStyle'],[-1,' * '],[-1,' * Parameters:'],[-1,' * style - {Object}'],[-1,' * widthFactor - {Number}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A SVG compliant \'stroke-dasharray\' value'],[-1,' *\/'],[-1,' dashStyle: function(style, widthFactor) {'],[0,' var w = style.strokeWidth * widthFactor;'],[0,' var str = style.strokeDashstyle;'],[0,' switch (str) {'],[-1,' case \'solid\':'],[0,' return \'none\';'],[-1,' case \'dot\':'],[0,' return [1, 4 * w].join();'],[-1,' case \'dash\':'],[0,' return [4 * w, 4 * w].join();'],[-1,' case \'dashdot\':'],[0,' return [4 * w, 4 * w, 1, 4 * w].join();'],[-1,' case \'longdash\':'],[0,' return [8 * w, 4 * w].join();'],[-1,' case \'longdashdot\':'],[0,' return [8 * w, 4 * w, 1, 4 * w].join();'],[-1,' default:'],[0,' return OpenLayers.String.trim(str).replace(\/\\s+\/g, \",\");'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: createNode'],[-1,' * '],[-1,' * Parameters:'],[-1,' * type - {String} Kind of node to draw'],[-1,' * id - {String} Id for node'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} A new node of the given type and id'],[-1,' *\/'],[-1,' createNode: function(type, id) {'],[0,' var node = document.createElementNS(this.xmlns, type);'],[0,' if (id) {'],[0,' node.setAttributeNS(null, \"id\", id);'],[-1,' }'],[0,' return node; '],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: nodeTypeCompare'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {SVGDomElement} An SVG element'],[-1,' * type - {String} Kind of node'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Boolean} Whether or not the specified node is of the specified type'],[-1,' *\/'],[-1,' nodeTypeCompare: function(node, type) {'],[0,' return (type == node.nodeName);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: createRenderRoot'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} The specific render engine\'s root element'],[-1,' *\/'],[-1,' createRenderRoot: function() {'],[0,' var svg = this.nodeFactory(this.container.id + \"_svgRoot\", \"svg\");'],[0,' svg.style.display = \"block\";'],[0,' return svg;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createRoot'],[-1,' * '],[-1,' * Parameters:'],[-1,' * suffix - {String} suffix to append to the id'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' createRoot: function(suffix) {'],[0,' return this.nodeFactory(this.container.id + suffix, \"g\");'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: createDefs'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} The element to which we\'ll add the symbol definitions'],[-1,' *\/'],[-1,' createDefs: function() {'],[0,' var defs = this.nodeFactory(this.container.id + \"_defs\", \"defs\");'],[0,' this.rendererRoot.appendChild(defs);'],[0,' return defs;'],[-1,' },'],[-1,''],[-1,' \/**************************************'],[-1,' * *'],[-1,' * GEOMETRY DRAWING FUNCTIONS *'],[-1,' * *'],[-1,' **************************************\/'],[-1,''],[-1,' \/**'],[-1,' * Method: drawPoint'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or false if the renderer could not draw the point'],[-1,' *\/ '],[-1,' drawPoint: function(node, geometry) {'],[0,' return this.drawCircle(node, geometry, 1);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: drawCircle'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * radius - {Float}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or false if the renderer could not draw the circle'],[-1,' *\/'],[-1,' drawCircle: function(node, geometry, radius) {'],[0,' var resolution = this.getResolution();'],[0,' var x = ((geometry.x - this.featureDx) \/ resolution + this.left);'],[0,' var y = (this.top - geometry.y \/ resolution);'],[-1,''],[0,' if (this.inValidRange(x, y)) { '],[0,' node.setAttributeNS(null, \"cx\", x);'],[0,' node.setAttributeNS(null, \"cy\", y);'],[0,' node.setAttributeNS(null, \"r\", radius);'],[0,' return node;'],[-1,' } else {'],[0,' return false;'],[-1,' } '],[-1,' '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawLineString'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or null if the renderer could not draw all components of'],[-1,' * the linestring, or false if nothing could be drawn'],[-1,' *\/ '],[-1,' drawLineString: function(node, geometry) {'],[0,' var componentsResult = this.getComponentsString(geometry.components);'],[0,' if (componentsResult.path) {'],[0,' node.setAttributeNS(null, \"points\", componentsResult.path);'],[0,' return (componentsResult.complete ? node : null); '],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawLinearRing'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or null if the renderer could not draw all components'],[-1,' * of the linear ring, or false if nothing could be drawn'],[-1,' *\/ '],[-1,' drawLinearRing: function(node, geometry) {'],[0,' var componentsResult = this.getComponentsString(geometry.components);'],[0,' if (componentsResult.path) {'],[0,' node.setAttributeNS(null, \"points\", componentsResult.path);'],[0,' return (componentsResult.complete ? node : null); '],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawPolygon'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or null if the renderer could not draw all components'],[-1,' * of the polygon, or false if nothing could be drawn'],[-1,' *\/ '],[-1,' drawPolygon: function(node, geometry) {'],[0,' var d = \"\";'],[0,' var draw = true;'],[0,' var complete = true;'],[0,' var linearRingResult, path;'],[0,' for (var j=0, len=geometry.components.length; j<len; j++) {'],[0,' d += \" M\";'],[0,' linearRingResult = this.getComponentsString('],[-1,' geometry.components[j].components, \" \");'],[0,' path = linearRingResult.path;'],[0,' if (path) {'],[0,' d += \" \" + path;'],[0,' complete = linearRingResult.complete && complete;'],[-1,' } else {'],[0,' draw = false;'],[-1,' }'],[-1,' }'],[0,' d += \" z\";'],[0,' if (draw) {'],[0,' node.setAttributeNS(null, \"d\", d);'],[0,' node.setAttributeNS(null, \"fill-rule\", \"evenodd\");'],[0,' return complete ? node : null;'],[-1,' } else {'],[0,' return false;'],[-1,' } '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawRectangle'],[-1,' * This method is only called by the renderer itself.'],[-1,' * '],[-1,' * Parameters: '],[-1,' * node - {DOMElement}'],[-1,' * geometry - {<OpenLayers.Geometry>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} or false if the renderer could not draw the rectangle'],[-1,' *\/ '],[-1,' drawRectangle: function(node, geometry) {'],[0,' var resolution = this.getResolution();'],[0,' var x = ((geometry.x - this.featureDx) \/ resolution + this.left);'],[0,' var y = (this.top - geometry.y \/ resolution);'],[-1,''],[0,' if (this.inValidRange(x, y)) { '],[0,' node.setAttributeNS(null, \"x\", x);'],[0,' node.setAttributeNS(null, \"y\", y);'],[0,' node.setAttributeNS(null, \"width\", geometry.width \/ resolution);'],[0,' node.setAttributeNS(null, \"height\", geometry.height \/ resolution);'],[0,' return node;'],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: drawText'],[-1,' * This method is only called by the renderer itself.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * featureId - {String}'],[-1,' * style -'],[-1,' * location - {<OpenLayers.Geometry.Point>}'],[-1,' *\/'],[-1,' drawText: function(featureId, style, location) {'],[0,' var drawOutline = (!!style.labelOutlineWidth);'],[-1,' \/\/ First draw text in halo color and size and overlay the'],[-1,' \/\/ normal text afterwards'],[0,' if (drawOutline) {'],[0,' var outlineStyle = OpenLayers.Util.extend({}, style);'],[0,' outlineStyle.fontColor = outlineStyle.labelOutlineColor;'],[0,' outlineStyle.fontStrokeColor = outlineStyle.labelOutlineColor;'],[0,' outlineStyle.fontStrokeWidth = style.labelOutlineWidth;'],[0,' if (style.labelOutlineOpacity) {'],[0,' outlineStyle.fontOpacity = style.labelOutlineOpacity;'],[-1,' }'],[0,' delete outlineStyle.labelOutlineWidth;'],[0,' this.drawText(featureId, outlineStyle, location);'],[-1,' }'],[-1,''],[0,' var resolution = this.getResolution();'],[-1,''],[0,' var x = ((location.x - this.featureDx) \/ resolution + this.left);'],[0,' var y = (location.y \/ resolution - this.top);'],[-1,''],[0,' var suffix = (drawOutline)?this.LABEL_OUTLINE_SUFFIX:this.LABEL_ID_SUFFIX;'],[0,' var label = this.nodeFactory(featureId + suffix, \"text\");'],[-1,''],[0,' label.setAttributeNS(null, \"x\", x);'],[0,' label.setAttributeNS(null, \"y\", -y);'],[-1,''],[0,' if (style.fontColor) {'],[0,' label.setAttributeNS(null, \"fill\", style.fontColor);'],[-1,' }'],[0,' if (style.fontStrokeColor) {'],[0,' label.setAttributeNS(null, \"stroke\", style.fontStrokeColor);'],[-1,' }'],[0,' if (style.fontStrokeWidth) {'],[0,' label.setAttributeNS(null, \"stroke-width\", style.fontStrokeWidth);'],[-1,' }'],[0,' if (style.fontOpacity) {'],[0,' label.setAttributeNS(null, \"opacity\", style.fontOpacity);'],[-1,' }'],[0,' if (style.fontFamily) {'],[0,' label.setAttributeNS(null, \"font-family\", style.fontFamily);'],[-1,' }'],[0,' if (style.fontSize) {'],[0,' label.setAttributeNS(null, \"font-size\", style.fontSize);'],[-1,' }'],[0,' if (style.fontWeight) {'],[0,' label.setAttributeNS(null, \"font-weight\", style.fontWeight);'],[-1,' }'],[0,' if (style.fontStyle) {'],[0,' label.setAttributeNS(null, \"font-style\", style.fontStyle);'],[-1,' }'],[0,' if (style.labelSelect === true) {'],[0,' label.setAttributeNS(null, \"pointer-events\", \"visible\");'],[0,' label._featureId = featureId;'],[-1,' } else {'],[0,' label.setAttributeNS(null, \"pointer-events\", \"none\");'],[-1,' }'],[0,' var align = style.labelAlign || OpenLayers.Renderer.defaultSymbolizer.labelAlign;'],[0,' label.setAttributeNS(null, \"text-anchor\",'],[-1,' OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]] || \"middle\");'],[-1,''],[0,' if (OpenLayers.IS_GECKO === true) {'],[0,' label.setAttributeNS(null, \"dominant-baseline\",'],[-1,' OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]] || \"central\");'],[-1,' }'],[-1,''],[0,' var labelRows = style.label.split(\'\\n\');'],[0,' var numRows = labelRows.length;'],[0,' while (label.childNodes.length > numRows) {'],[0,' label.removeChild(label.lastChild);'],[-1,' }'],[0,' for (var i = 0; i < numRows; i++) {'],[0,' var tspan = this.nodeFactory(featureId + suffix + \"_tspan_\" + i, \"tspan\");'],[0,' if (style.labelSelect === true) {'],[0,' tspan._featureId = featureId;'],[0,' tspan._geometry = location;'],[0,' tspan._geometryClass = location.CLASS_NAME;'],[-1,' }'],[0,' if (OpenLayers.IS_GECKO === false) {'],[0,' tspan.setAttributeNS(null, \"baseline-shift\",'],[-1,' OpenLayers.Renderer.SVG.LABEL_VSHIFT[align[1]] || \"-35%\");'],[-1,' }'],[0,' tspan.setAttribute(\"x\", x);'],[0,' if (i == 0) {'],[0,' var vfactor = OpenLayers.Renderer.SVG.LABEL_VFACTOR[align[1]];'],[0,' if (vfactor == null) {'],[0,' vfactor = -.5;'],[-1,' }'],[0,' tspan.setAttribute(\"dy\", (vfactor*(numRows-1)) + \"em\");'],[-1,' } else {'],[0,' tspan.setAttribute(\"dy\", \"1em\");'],[-1,' }'],[0,' tspan.textContent = (labelRows[i] === \'\') ? \' \' : labelRows[i];'],[0,' if (!tspan.parentNode) {'],[0,' label.appendChild(tspan);'],[-1,' }'],[-1,' }'],[-1,''],[0,' if (!label.parentNode) {'],[0,' this.textRoot.appendChild(label);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: getComponentString'],[-1,' * '],[-1,' * Parameters:'],[-1,' * components - {Array(<OpenLayers.Geometry.Point>)} Array of points'],[-1,' * separator - {String} character between coordinate pairs. Defaults to \",\"'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} hash with properties \"path\" (the string created from the'],[-1,' * components and \"complete\" (false if the renderer was unable to'],[-1,' * draw all components)'],[-1,' *\/'],[-1,' getComponentsString: function(components, separator) {'],[0,' var renderCmp = [];'],[0,' var complete = true;'],[0,' var len = components.length;'],[0,' var strings = [];'],[0,' var str, component;'],[0,' for(var i=0; i<len; i++) {'],[0,' component = components[i];'],[0,' renderCmp.push(component);'],[0,' str = this.getShortString(component);'],[0,' if (str) {'],[0,' strings.push(str);'],[-1,' } else {'],[-1,' \/\/ The current component is outside the valid range. Let\'s'],[-1,' \/\/ see if the previous or next component is inside the range.'],[-1,' \/\/ If so, add the coordinate of the intersection with the'],[-1,' \/\/ valid range bounds.'],[0,' if (i > 0) {'],[0,' if (this.getShortString(components[i - 1])) {'],[0,' strings.push(this.clipLine(components[i],'],[-1,' components[i-1]));'],[-1,' }'],[-1,' }'],[0,' if (i < len - 1) {'],[0,' if (this.getShortString(components[i + 1])) {'],[0,' strings.push(this.clipLine(components[i],'],[-1,' components[i+1]));'],[-1,' }'],[-1,' }'],[0,' complete = false;'],[-1,' }'],[-1,' }'],[-1,''],[0,' return {'],[-1,' path: strings.join(separator || \",\"),'],[-1,' complete: complete'],[-1,' };'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: clipLine'],[-1,' * Given two points (one inside the valid range, and one outside),'],[-1,' * clips the line betweeen the two points so that the new points are both'],[-1,' * inside the valid range.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * badComponent - {<OpenLayers.Geometry.Point>} original geometry of the'],[-1,' * invalid point'],[-1,' * goodComponent - {<OpenLayers.Geometry.Point>} original geometry of the'],[-1,' * valid point'],[-1,' * Returns'],[-1,' * {String} the SVG coordinate pair of the clipped point (like'],[-1,' * getShortString), or an empty string if both passed componets are at'],[-1,' * the same point.'],[-1,' *\/'],[-1,' clipLine: function(badComponent, goodComponent) {'],[0,' if (goodComponent.equals(badComponent)) {'],[0,' return \"\";'],[-1,' }'],[0,' var resolution = this.getResolution();'],[0,' var maxX = this.MAX_PIXEL - this.translationParameters.x;'],[0,' var maxY = this.MAX_PIXEL - this.translationParameters.y;'],[0,' var x1 = (goodComponent.x - this.featureDx) \/ resolution + this.left;'],[0,' var y1 = this.top - goodComponent.y \/ resolution;'],[0,' var x2 = (badComponent.x - this.featureDx) \/ resolution + this.left;'],[0,' var y2 = this.top - badComponent.y \/ resolution;'],[0,' var k;'],[0,' if (x2 < -maxX || x2 > maxX) {'],[0,' k = (y2 - y1) \/ (x2 - x1);'],[0,' x2 = x2 < 0 ? -maxX : maxX;'],[0,' y2 = y1 + (x2 - x1) * k;'],[-1,' }'],[0,' if (y2 < -maxY || y2 > maxY) {'],[0,' k = (x2 - x1) \/ (y2 - y1);'],[0,' y2 = y2 < 0 ? -maxY : maxY;'],[0,' x2 = x1 + (y2 - y1) * k;'],[-1,' }'],[0,' return x2 + \",\" + y2;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: getShortString'],[-1,' * '],[-1,' * Parameters:'],[-1,' * point - {<OpenLayers.Geometry.Point>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} or false if point is outside the valid range'],[-1,' *\/'],[-1,' getShortString: function(point) {'],[0,' var resolution = this.getResolution();'],[0,' var x = ((point.x - this.featureDx) \/ resolution + this.left);'],[0,' var y = (this.top - point.y \/ resolution);'],[-1,''],[0,' if (this.inValidRange(x, y)) { '],[0,' return x + \",\" + y;'],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getPosition'],[-1,' * Finds the position of an svg node.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Object} hash with x and y properties, representing the coordinates'],[-1,' * within the svg coordinate system'],[-1,' *\/'],[-1,' getPosition: function(node) {'],[0,' return({'],[-1,' x: parseFloat(node.getAttributeNS(null, \"cx\")),'],[-1,' y: parseFloat(node.getAttributeNS(null, \"cy\"))'],[-1,' });'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: importSymbol'],[-1,' * add a new symbol definition from the rendererer\'s symbol hash'],[-1,' * '],[-1,' * Parameters:'],[-1,' * graphicName - {String} name of the symbol to import'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement} - the imported symbol'],[-1,' *\/ '],[-1,' importSymbol: function (graphicName) {'],[0,' if (!this.defs) {'],[-1,' \/\/ create svg defs tag'],[0,' this.defs = this.createDefs();'],[-1,' }'],[0,' var id = this.container.id + \"-\" + graphicName;'],[-1,' '],[-1,' \/\/ check if symbol already exists in the defs'],[0,' var existing = document.getElementById(id);'],[0,' if (existing != null) {'],[0,' return existing;'],[-1,' }'],[-1,' '],[0,' var symbol = OpenLayers.Renderer.symbol[graphicName];'],[0,' if (!symbol) {'],[0,' throw new Error(graphicName + \' is not a valid symbol name\');'],[-1,' }'],[-1,''],[0,' var symbolNode = this.nodeFactory(id, \"symbol\");'],[0,' var node = this.nodeFactory(null, \"polygon\");'],[0,' symbolNode.appendChild(node);'],[0,' var symbolExtent = new OpenLayers.Bounds('],[-1,' Number.MAX_VALUE, Number.MAX_VALUE, 0, 0);'],[-1,''],[0,' var points = [];'],[0,' var x,y;'],[0,' for (var i=0; i<symbol.length; i=i+2) {'],[0,' x = symbol[i];'],[0,' y = symbol[i+1];'],[0,' symbolExtent.left = Math.min(symbolExtent.left, x);'],[0,' symbolExtent.bottom = Math.min(symbolExtent.bottom, y);'],[0,' symbolExtent.right = Math.max(symbolExtent.right, x);'],[0,' symbolExtent.top = Math.max(symbolExtent.top, y);'],[0,' points.push(x, \",\", y);'],[-1,' }'],[-1,' '],[0,' node.setAttributeNS(null, \"points\", points.join(\" \"));'],[-1,' '],[0,' var width = symbolExtent.getWidth();'],[0,' var height = symbolExtent.getHeight();'],[-1,' \/\/ create a viewBox three times as large as the symbol itself,'],[-1,' \/\/ to allow for strokeWidth being displayed correctly at the corners.'],[0,' var viewBox = [symbolExtent.left - width,'],[-1,' symbolExtent.bottom - height, width * 3, height * 3];'],[0,' symbolNode.setAttributeNS(null, \"viewBox\", viewBox.join(\" \"));'],[0,' this.symbolMetrics[id] = ['],[-1,' Math.max(width, height),'],[-1,' symbolExtent.getCenterLonLat().lon,'],[-1,' symbolExtent.getCenterLonLat().lat'],[-1,' ];'],[-1,' '],[0,' this.defs.appendChild(symbolNode);'],[0,' return symbolNode;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getFeatureIdFromEvent'],[-1,' * '],[-1,' * Parameters:'],[-1,' * evt - {Object} An <OpenLayers.Event> object'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} A feature id or undefined.'],[-1,' *\/'],[-1,' getFeatureIdFromEvent: function(evt) {'],[0,' var featureId = OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this, arguments);'],[0,' if(!featureId) {'],[0,' var target = evt.target;'],[0,' featureId = target.parentNode && target != this.rendererRoot ?'],[-1,' target.parentNode._featureId : undefined;'],[-1,' }'],[0,' return featureId;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Renderer.SVG\"'],[-1,'});'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.SVG.LABEL_ALIGN'],[-1,' * {Object}'],[-1,' *\/'],[1,'OpenLayers.Renderer.SVG.LABEL_ALIGN = {'],[-1,' \"l\": \"start\",'],[-1,' \"r\": \"end\",'],[-1,' \"b\": \"bottom\",'],[-1,' \"t\": \"hanging\"'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.SVG.LABEL_VSHIFT'],[-1,' * {Object}'],[-1,' *\/'],[1,'OpenLayers.Renderer.SVG.LABEL_VSHIFT = {'],[-1,' \/\/ according to'],[-1,' \/\/ http:\/\/www.w3.org\/Graphics\/SVG\/Test\/20061213\/htmlObjectHarness\/full-text-align-02-b.html'],[-1,' \/\/ a baseline-shift of -70% shifts the text exactly from the'],[-1,' \/\/ bottom to the top of the baseline, so -35% moves the text to'],[-1,' \/\/ the center of the baseline.'],[-1,' \"t\": \"-70%\",'],[-1,' \"b\": \"0\" '],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Constant: OpenLayers.Renderer.SVG.LABEL_VFACTOR'],[-1,' * {Object}'],[-1,' *\/'],[1,'OpenLayers.Renderer.SVG.LABEL_VFACTOR = {'],[-1,' \"t\": 0,'],[-1,' \"b\": -1'],[-1,'};'],[-1,''],[-1,'\/**'],[-1,' * Function: OpenLayers.Renderer.SVG.preventDefault'],[-1,' * *Deprecated*. Use <OpenLayers.Event.preventDefault> method instead.'],[-1,' * Used to prevent default events (especially opening images in a new tab on'],[-1,' * ctrl-click) from being executed for externalGraphic symbols'],[-1,' *\/'],[1,'OpenLayers.Renderer.SVG.preventDefault = function(e) {'],[0,' OpenLayers.Event.preventDefault(e);'],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control\/ScaleLine.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Control.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control.ScaleLine'],[-1,' * The ScaleLine displays a small line indicator representing the current '],[-1,' * map scale on the map. By default it is drawn in the lower left corner of'],[-1,' * the map.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Control>'],[-1,' * '],[-1,' * Is a very close copy of:'],[-1,' * - <OpenLayers.Control.Scale>'],[-1,' *\/'],[1,'OpenLayers.Control.ScaleLine = OpenLayers.Class(OpenLayers.Control, {'],[-1,''],[-1,' \/**'],[-1,' * Property: maxWidth'],[-1,' * {Integer} Maximum width of the scale line in pixels. Default is 100.'],[-1,' *\/'],[-1,' maxWidth: 100,'],[-1,''],[-1,' \/**'],[-1,' * Property: topOutUnits'],[-1,' * {String} Units for zoomed out on top bar. Default is km.'],[-1,' *\/'],[-1,' topOutUnits: \"km\",'],[-1,' '],[-1,' \/**'],[-1,' * Property: topInUnits'],[-1,' * {String} Units for zoomed in on top bar. Default is m.'],[-1,' *\/'],[-1,' topInUnits: \"m\",'],[-1,''],[-1,' \/**'],[-1,' * Property: bottomOutUnits'],[-1,' * {String} Units for zoomed out on bottom bar. Default is mi.'],[-1,' *\/'],[-1,' bottomOutUnits: \"mi\",'],[-1,''],[-1,' \/**'],[-1,' * Property: bottomInUnits'],[-1,' * {String} Units for zoomed in on bottom bar. Default is ft.'],[-1,' *\/'],[-1,' bottomInUnits: \"ft\",'],[-1,' '],[-1,' \/**'],[-1,' * Property: eTop'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' eTop: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: eBottom'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' eBottom:null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: geodesic'],[-1,' * {Boolean} Use geodesic measurement. Default is false. The recommended'],[-1,' * setting for maps in EPSG:4326 is false, and true EPSG:900913. If set to'],[-1,' * true, the scale will be calculated based on the horizontal size of the'],[-1,' * pixel in the center of the map viewport.'],[-1,' *\/'],[-1,' geodesic: false,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Control.ScaleLine'],[-1,' * Create a new scale line control.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * options - {Object} An optional object whose properties will be used'],[-1,' * to extend the control.'],[-1,' *\/'],[-1,''],[-1,' \/**'],[-1,' * Method: draw'],[-1,' * '],[-1,' * Returns:'],[-1,' * {DOMElement}'],[-1,' *\/'],[-1,' draw: function() {'],[0,' OpenLayers.Control.prototype.draw.apply(this, arguments);'],[0,' if (!this.eTop) {'],[-1,' \/\/ stick in the top bar'],[0,' this.eTop = document.createElement(\"div\");'],[0,' this.eTop.className = this.displayClass + \"Top\";'],[0,' var theLen = this.topInUnits.length;'],[0,' this.div.appendChild(this.eTop);'],[0,' if((this.topOutUnits == \"\") || (this.topInUnits == \"\")) {'],[0,' this.eTop.style.visibility = \"hidden\";'],[-1,' } else {'],[0,' this.eTop.style.visibility = \"visible\";'],[-1,' }'],[-1,''],[-1,' \/\/ and the bottom bar'],[0,' this.eBottom = document.createElement(\"div\");'],[0,' this.eBottom.className = this.displayClass + \"Bottom\";'],[0,' this.div.appendChild(this.eBottom);'],[0,' if((this.bottomOutUnits == \"\") || (this.bottomInUnits == \"\")) {'],[0,' this.eBottom.style.visibility = \"hidden\";'],[-1,' } else {'],[0,' this.eBottom.style.visibility = \"visible\";'],[-1,' }'],[-1,' }'],[0,' this.map.events.register(\'moveend\', this, this.update);'],[0,' this.update();'],[0,' return this.div;'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: getBarLen'],[-1,' * Given a number, round it down to the nearest 1,2,5 times a power of 10.'],[-1,' * That seems a fairly useful set of number groups to use.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * maxLen - {float} the number we\'re rounding down from'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Float} the rounded number (less than or equal to maxLen)'],[-1,' *\/'],[-1,' getBarLen: function(maxLen) {'],[-1,' \/\/ nearest power of 10 lower than maxLen'],[0,' var digits = parseInt(Math.log(maxLen) \/ Math.log(10));'],[0,' var pow10 = Math.pow(10, digits);'],[-1,' '],[-1,' \/\/ ok, find first character'],[0,' var firstChar = parseInt(maxLen \/ pow10);'],[-1,''],[-1,' \/\/ right, put it into the correct bracket'],[0,' var barLen;'],[0,' if(firstChar > 5) {'],[0,' barLen = 5;'],[0,' } else if(firstChar > 2) {'],[0,' barLen = 2;'],[-1,' } else {'],[0,' barLen = 1;'],[-1,' }'],[-1,''],[-1,' \/\/ scale it up the correct power of 10'],[0,' return barLen * pow10;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: update'],[-1,' * Update the size of the bars, and the labels they contain.'],[-1,' *\/'],[-1,' update: function() {'],[0,' var res = this.map.getResolution();'],[0,' if (!res) {'],[0,' return;'],[-1,' }'],[-1,''],[0,' var curMapUnits = this.map.getUnits();'],[0,' var inches = OpenLayers.INCHES_PER_UNIT;'],[-1,''],[-1,' \/\/ convert maxWidth to map units'],[0,' var maxSizeData = this.maxWidth * res * inches[curMapUnits];'],[0,' var geodesicRatio = 1;'],[0,' if(this.geodesic === true) {'],[0,' var maxSizeGeodesic = (this.map.getGeodesicPixelSize().w ||'],[-1,' 0.000001) * this.maxWidth;'],[0,' var maxSizeKilometers = maxSizeData \/ inches[\"km\"];'],[0,' geodesicRatio = maxSizeGeodesic \/ maxSizeKilometers;'],[0,' maxSizeData *= geodesicRatio;'],[-1,' }'],[-1,''],[-1,' \/\/ decide whether to use large or small scale units '],[0,' var topUnits;'],[0,' var bottomUnits;'],[0,' if(maxSizeData > 100000) {'],[0,' topUnits = this.topOutUnits;'],[0,' bottomUnits = this.bottomOutUnits;'],[-1,' } else {'],[0,' topUnits = this.topInUnits;'],[0,' bottomUnits = this.bottomInUnits;'],[-1,' }'],[-1,''],[-1,' \/\/ and to map units units'],[0,' var topMax = maxSizeData \/ inches[topUnits];'],[0,' var bottomMax = maxSizeData \/ inches[bottomUnits];'],[-1,''],[-1,' \/\/ now trim this down to useful block length'],[0,' var topRounded = this.getBarLen(topMax);'],[0,' var bottomRounded = this.getBarLen(bottomMax);'],[-1,''],[-1,' \/\/ and back to display units'],[0,' topMax = topRounded \/ inches[curMapUnits] * inches[topUnits];'],[0,' bottomMax = bottomRounded \/ inches[curMapUnits] * inches[bottomUnits];'],[-1,''],[-1,' \/\/ and to pixel units'],[0,' var topPx = topMax \/ res \/ geodesicRatio;'],[0,' var bottomPx = bottomMax \/ res \/ geodesicRatio;'],[-1,' '],[-1,' \/\/ now set the pixel widths'],[-1,' \/\/ and the values inside them'],[-1,' '],[0,' if (this.eBottom.style.visibility == \"visible\"){'],[0,' this.eBottom.style.width = Math.round(bottomPx) + \"px\"; '],[0,' this.eBottom.innerHTML = bottomRounded + \" \" + bottomUnits ;'],[-1,' }'],[-1,' '],[0,' if (this.eTop.style.visibility == \"visible\"){'],[0,' this.eTop.style.width = Math.round(topPx) + \"px\";'],[0,' this.eTop.innerHTML = topRounded + \" \" + topUnits;'],[-1,' }'],[-1,' '],[-1,' }, '],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Control.ScaleLine\"'],[-1,'});'],[-1,''],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/MultiLineString.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry\/Collection.js'],[-1,' * @requires OpenLayers\/Geometry\/LineString.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.MultiLineString'],[-1,' * A MultiLineString is a geometry with multiple <OpenLayers.Geometry.LineString>'],[-1,' * components.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Geometry.Collection>'],[-1,' * - <OpenLayers.Geometry> '],[-1,' *\/'],[1,'OpenLayers.Geometry.MultiLineString = OpenLayers.Class('],[-1,' OpenLayers.Geometry.Collection, {'],[-1,''],[-1,' \/**'],[-1,' * Property: componentTypes'],[-1,' * {Array(String)} An array of class names representing the types of'],[-1,' * components that the collection can include. A null value means the'],[-1,' * component types are not restricted.'],[-1,' *\/'],[-1,' componentTypes: [\"OpenLayers.Geometry.LineString\"],'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.MultiLineString'],[-1,' * Constructor for a MultiLineString Geometry.'],[-1,' *'],[-1,' * Parameters: '],[-1,' * components - {Array(<OpenLayers.Geometry.LineString>)} '],[-1,' *'],[-1,' *\/'],[-1,' '],[-1,' \/**'],[-1,' * Method: split'],[-1,' * Use this geometry (the source) to attempt to split a target geometry.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} The target geometry.'],[-1,' * options - {Object} Properties of this object will be used to determine'],[-1,' * how the split is conducted.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * mutual - {Boolean} Split the source geometry in addition to the target'],[-1,' * geometry. Default is false.'],[-1,' * edge - {Boolean} Allow splitting when only edges intersect. Default is'],[-1,' * true. If false, a vertex on the source must be within the tolerance'],[-1,' * distance of the intersection to be considered a split.'],[-1,' * tolerance - {Number} If a non-null value is provided, intersections'],[-1,' * within the tolerance distance of an existing vertex on the source'],[-1,' * will be assumed to occur at the vertex.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Array} A list of geometries (of this same type as the target) that'],[-1,' * result from splitting the target with the source geometry. The'],[-1,' * source and target geometry will remain unmodified. If no split'],[-1,' * results, null will be returned. If mutual is true and a split'],[-1,' * results, return will be an array of two arrays - the first will be'],[-1,' * all geometries that result from splitting the source geometry and'],[-1,' * the second will be all geometries that result from splitting the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' split: function(geometry, options) {'],[0,' var results = null;'],[0,' var mutual = options && options.mutual;'],[0,' var splits, sourceLine, sourceLines, sourceSplit, targetSplit;'],[0,' var sourceParts = [];'],[0,' var targetParts = [geometry];'],[0,' for(var i=0, len=this.components.length; i<len; ++i) {'],[0,' sourceLine = this.components[i];'],[0,' sourceSplit = false;'],[0,' for(var j=0; j < targetParts.length; ++j) { '],[0,' splits = sourceLine.split(targetParts[j], options);'],[0,' if(splits) {'],[0,' if(mutual) {'],[0,' sourceLines = splits[0];'],[0,' for(var k=0, klen=sourceLines.length; k<klen; ++k) {'],[0,' if(k===0 && sourceParts.length) {'],[0,' sourceParts[sourceParts.length-1].addComponent('],[-1,' sourceLines[k]'],[-1,' );'],[-1,' } else {'],[0,' sourceParts.push('],[-1,' new OpenLayers.Geometry.MultiLineString(['],[-1,' sourceLines[k]'],[-1,' ])'],[-1,' );'],[-1,' }'],[-1,' }'],[0,' sourceSplit = true;'],[0,' splits = splits[1];'],[-1,' }'],[0,' if(splits.length) {'],[-1,' \/\/ splice in new target parts'],[0,' splits.unshift(j, 1);'],[0,' Array.prototype.splice.apply(targetParts, splits);'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' if(!sourceSplit) {'],[-1,' \/\/ source line was not hit'],[0,' if(sourceParts.length) {'],[-1,' \/\/ add line to existing multi'],[0,' sourceParts[sourceParts.length-1].addComponent('],[-1,' sourceLine.clone()'],[-1,' );'],[-1,' } else {'],[-1,' \/\/ create a fresh multi'],[0,' sourceParts = ['],[-1,' new OpenLayers.Geometry.MultiLineString('],[-1,' sourceLine.clone()'],[-1,' )'],[-1,' ];'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' if(sourceParts && sourceParts.length > 1) {'],[0,' sourceSplit = true;'],[-1,' } else {'],[0,' sourceParts = [];'],[-1,' }'],[0,' if(targetParts && targetParts.length > 1) {'],[0,' targetSplit = true;'],[-1,' } else {'],[0,' targetParts = [];'],[-1,' }'],[0,' if(sourceSplit || targetSplit) {'],[0,' if(mutual) {'],[0,' results = [sourceParts, targetParts];'],[-1,' } else {'],[0,' results = targetParts;'],[-1,' }'],[-1,' }'],[0,' return results;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: splitWith'],[-1,' * Split this geometry (the target) with the given geometry (the source).'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry>} A geometry used to split this'],[-1,' * geometry (the source).'],[-1,' * options - {Object} Properties of this object will be used to determine'],[-1,' * how the split is conducted.'],[-1,' *'],[-1,' * Valid options:'],[-1,' * mutual - {Boolean} Split the source geometry in addition to the target'],[-1,' * geometry. Default is false.'],[-1,' * edge - {Boolean} Allow splitting when only edges intersect. Default is'],[-1,' * true. If false, a vertex on the source must be within the tolerance'],[-1,' * distance of the intersection to be considered a split.'],[-1,' * tolerance - {Number} If a non-null value is provided, intersections'],[-1,' * within the tolerance distance of an existing vertex on the source'],[-1,' * will be assumed to occur at the vertex.'],[-1,' * '],[-1,' * Returns:'],[-1,' * {Array} A list of geometries (of this same type as the target) that'],[-1,' * result from splitting the target with the source geometry. The'],[-1,' * source and target geometry will remain unmodified. If no split'],[-1,' * results, null will be returned. If mutual is true and a split'],[-1,' * results, return will be an array of two arrays - the first will be'],[-1,' * all geometries that result from splitting the source geometry and'],[-1,' * the second will be all geometries that result from splitting the'],[-1,' * target geometry.'],[-1,' *\/'],[-1,' splitWith: function(geometry, options) {'],[0,' var results = null;'],[0,' var mutual = options && options.mutual;'],[0,' var splits, targetLine, sourceLines, sourceSplit, targetSplit, sourceParts, targetParts;'],[0,' if(geometry instanceof OpenLayers.Geometry.LineString) {'],[0,' targetParts = [];'],[0,' sourceParts = [geometry];'],[0,' for(var i=0, len=this.components.length; i<len; ++i) {'],[0,' targetSplit = false;'],[0,' targetLine = this.components[i];'],[0,' for(var j=0; j<sourceParts.length; ++j) {'],[0,' splits = sourceParts[j].split(targetLine, options);'],[0,' if(splits) {'],[0,' if(mutual) {'],[0,' sourceLines = splits[0];'],[0,' if(sourceLines.length) {'],[-1,' \/\/ splice in new source parts'],[0,' sourceLines.unshift(j, 1);'],[0,' Array.prototype.splice.apply(sourceParts, sourceLines);'],[0,' j += sourceLines.length - 2;'],[-1,' }'],[0,' splits = splits[1];'],[0,' if(splits.length === 0) {'],[0,' splits = [targetLine.clone()];'],[-1,' }'],[-1,' }'],[0,' for(var k=0, klen=splits.length; k<klen; ++k) {'],[0,' if(k===0 && targetParts.length) {'],[0,' targetParts[targetParts.length-1].addComponent('],[-1,' splits[k]'],[-1,' );'],[-1,' } else {'],[0,' targetParts.push('],[-1,' new OpenLayers.Geometry.MultiLineString(['],[-1,' splits[k]'],[-1,' ])'],[-1,' );'],[-1,' }'],[-1,' }'],[0,' targetSplit = true; '],[-1,' }'],[-1,' }'],[0,' if(!targetSplit) {'],[-1,' \/\/ target component was not hit'],[0,' if(targetParts.length) {'],[-1,' \/\/ add it to any existing multi-line'],[0,' targetParts[targetParts.length-1].addComponent('],[-1,' targetLine.clone()'],[-1,' );'],[-1,' } else {'],[-1,' \/\/ or start with a fresh multi-line'],[0,' targetParts = ['],[-1,' new OpenLayers.Geometry.MultiLineString(['],[-1,' targetLine.clone()'],[-1,' ])'],[-1,' ];'],[-1,' }'],[-1,' '],[-1,' }'],[-1,' }'],[-1,' } else {'],[0,' results = geometry.split(this);'],[-1,' }'],[0,' if(sourceParts && sourceParts.length > 1) {'],[0,' sourceSplit = true;'],[-1,' } else {'],[0,' sourceParts = [];'],[-1,' }'],[0,' if(targetParts && targetParts.length > 1) {'],[0,' targetSplit = true;'],[-1,' } else {'],[0,' targetParts = [];'],[-1,' }'],[0,' if(sourceSplit || targetSplit) {'],[0,' if(mutual) {'],[0,' results = [sourceParts, targetParts];'],[-1,' } else {'],[0,' results = targetParts;'],[-1,' }'],[-1,' }'],[0,' return results;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.MultiLineString\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Geometry\/MultiPolygon.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Geometry\/Collection.js'],[-1,' * @requires OpenLayers\/Geometry\/Polygon.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Geometry.MultiPolygon'],[-1,' * MultiPolygon is a geometry with multiple <OpenLayers.Geometry.Polygon>'],[-1,' * components. Create a new instance with the <OpenLayers.Geometry.MultiPolygon>'],[-1,' * constructor.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Geometry.Collection>'],[-1,' *\/'],[1,'OpenLayers.Geometry.MultiPolygon = OpenLayers.Class('],[-1,' OpenLayers.Geometry.Collection, {'],[-1,''],[-1,' \/**'],[-1,' * Property: componentTypes'],[-1,' * {Array(String)} An array of class names representing the types of'],[-1,' * components that the collection can include. A null value means the'],[-1,' * component types are not restricted.'],[-1,' *\/'],[-1,' componentTypes: [\"OpenLayers.Geometry.Polygon\"],'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Geometry.MultiPolygon'],[-1,' * Create a new MultiPolygon geometry'],[-1,' *'],[-1,' * Parameters:'],[-1,' * components - {Array(<OpenLayers.Geometry.Polygon>)} An array of polygons'],[-1,' * used to generate the MultiPolygon'],[-1,' *'],[-1,' *\/'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Geometry.MultiPolygon\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Format\/GML.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Format\/XML.js'],[-1,' * @requires OpenLayers\/Feature\/Vector.js'],[-1,' * @requires OpenLayers\/Geometry\/Point.js'],[-1,' * @requires OpenLayers\/Geometry\/MultiPoint.js'],[-1,' * @requires OpenLayers\/Geometry\/LineString.js'],[-1,' * @requires OpenLayers\/Geometry\/MultiLineString.js'],[-1,' * @requires OpenLayers\/Geometry\/Polygon.js'],[-1,' * @requires OpenLayers\/Geometry\/MultiPolygon.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Format.GML'],[-1,' * Read\/Write GML. Create a new instance with the <OpenLayers.Format.GML>'],[-1,' * constructor. Supports the GML simple features profile.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Format.XML>'],[-1,' *\/'],[1,'OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, {'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: featureNS'],[-1,' * {String} Namespace used for feature attributes. Default is'],[-1,' * \"http:\/\/mapserver.gis.umn.edu\/mapserver\".'],[-1,' *\/'],[-1,' featureNS: \"http:\/\/mapserver.gis.umn.edu\/mapserver\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: featurePrefix'],[-1,' * {String} Namespace alias (or prefix) for feature nodes. Default is'],[-1,' * \"feature\".'],[-1,' *\/'],[-1,' featurePrefix: \"feature\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: featureName'],[-1,' * {String} Element name for features. Default is \"featureMember\".'],[-1,' *\/'],[-1,' featureName: \"featureMember\", '],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: layerName'],[-1,' * {String} Name of data layer. Default is \"features\".'],[-1,' *\/'],[-1,' layerName: \"features\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: geometryName'],[-1,' * {String} Name of geometry element. Defaults to \"geometry\".'],[-1,' *\/'],[-1,' geometryName: \"geometry\",'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: collectionName'],[-1,' * {String} Name of featureCollection element.'],[-1,' *\/'],[-1,' collectionName: \"FeatureCollection\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: gmlns'],[-1,' * {String} GML Namespace.'],[-1,' *\/'],[-1,' gmlns: \"http:\/\/www.opengis.net\/gml\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: extractAttributes'],[-1,' * {Boolean} Extract attributes from GML.'],[-1,' *\/'],[-1,' extractAttributes: true,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: xy'],[-1,' * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x)'],[-1,' * Changing is not recommended, a new Format should be instantiated.'],[-1,' *\/ '],[-1,' xy: true,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Format.GML'],[-1,' * Create a new parser for GML.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} An optional object whose properties will be set on'],[-1,' * this instance.'],[-1,' *\/'],[-1,' initialize: function(options) {'],[-1,' \/\/ compile regular expressions once instead of every time they are used'],[0,' this.regExes = {'],[-1,' trimSpace: (\/^\\s*|\\s*$\/g),'],[-1,' removeSpace: (\/\\s*\/g),'],[-1,' splitSpace: (\/\\s+\/),'],[-1,' trimComma: (\/\\s*,\\s*\/g)'],[-1,' };'],[0,' OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: read'],[-1,' * Read data from a string, and return a list of features. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * data - {String} or {DOMElement} data to read\/parse.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Array(<OpenLayers.Feature.Vector>)} An array of features.'],[-1,' *\/'],[-1,' read: function(data) {'],[0,' if(typeof data == \"string\") { '],[0,' data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);'],[-1,' }'],[0,' var featureNodes = this.getElementsByTagNameNS(data.documentElement,'],[-1,' this.gmlns,'],[-1,' this.featureName);'],[0,' var features = [];'],[0,' for(var i=0; i<featureNodes.length; i++) {'],[0,' var feature = this.parseFeature(featureNodes[i]);'],[0,' if(feature) {'],[0,' features.push(feature);'],[-1,' }'],[-1,' }'],[0,' return features;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: parseFeature'],[-1,' * This function is the core of the GML parsing code in OpenLayers.'],[-1,' * It creates the geometries that are then attached to the returned'],[-1,' * feature, and calls parseAttributes() to get attribute data out.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A GML feature node. '],[-1,' *\/'],[-1,' parseFeature: function(node) {'],[-1,' \/\/ only accept one geometry per feature - look for highest \"order\"'],[0,' var order = [\"MultiPolygon\", \"Polygon\",'],[-1,' \"MultiLineString\", \"LineString\",'],[-1,' \"MultiPoint\", \"Point\", \"Envelope\"];'],[-1,' \/\/ FIXME: In case we parse a feature with no geometry, but boundedBy an Envelope,'],[-1,' \/\/ this code creates a geometry derived from the Envelope. This is not correct.'],[0,' var type, nodeList, geometry, parser;'],[0,' for(var i=0; i<order.length; ++i) {'],[0,' type = order[i];'],[0,' nodeList = this.getElementsByTagNameNS(node, this.gmlns, type);'],[0,' if(nodeList.length > 0) {'],[-1,' \/\/ only deal with first geometry of this type'],[0,' parser = this.parseGeometry[type.toLowerCase()];'],[0,' if(parser) {'],[0,' geometry = parser.apply(this, [nodeList[0]]);'],[0,' if (this.internalProjection && this.externalProjection) {'],[0,' geometry.transform(this.externalProjection, '],[-1,' this.internalProjection); '],[-1,' } '],[-1,' } else {'],[0,' throw new TypeError(\"Unsupported geometry type: \" + type);'],[-1,' }'],[-1,' \/\/ stop looking for different geometry types'],[0,' break;'],[-1,' }'],[-1,' }'],[-1,''],[0,' var bounds;'],[0,' var boxNodes = this.getElementsByTagNameNS(node, this.gmlns, \"Box\");'],[0,' for(i=0; i<boxNodes.length; ++i) {'],[0,' var boxNode = boxNodes[i];'],[0,' var box = this.parseGeometry[\"box\"].apply(this, [boxNode]);'],[0,' var parentNode = boxNode.parentNode;'],[0,' var parentName = parentNode.localName ||'],[-1,' parentNode.nodeName.split(\":\").pop();'],[0,' if(parentName === \"boundedBy\") {'],[0,' bounds = box;'],[-1,' } else {'],[0,' geometry = box.toGeometry();'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' \/\/ construct feature (optionally with attributes)'],[0,' var attributes;'],[0,' if(this.extractAttributes) {'],[0,' attributes = this.parseAttributes(node);'],[-1,' }'],[0,' var feature = new OpenLayers.Feature.Vector(geometry, attributes);'],[0,' feature.bounds = bounds;'],[-1,' '],[0,' var firstChild = this.getFirstElementChild(node);'],[0,' feature.gml = {'],[-1,' featureType: firstChild.nodeName.split(\":\")[1],'],[-1,' featureNS: firstChild.namespaceURI,'],[-1,' featureNSPrefix: firstChild.prefix'],[-1,' };'],[0,' feature.type = feature.gml.featureType;'],[-1,' '],[-1,' \/\/ assign fid - this can come from a \"fid\" or \"id\" attribute'],[0,' var childNode = node.firstChild;'],[0,' var fid;'],[0,' while(childNode) {'],[0,' if(childNode.nodeType == 1) {'],[0,' fid = childNode.getAttribute(\"fid\") ||'],[-1,' childNode.getAttribute(\"id\");'],[0,' if(fid) {'],[0,' break;'],[-1,' }'],[-1,' }'],[0,' childNode = childNode.nextSibling;'],[-1,' }'],[0,' feature.fid = fid;'],[0,' return feature;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Property: parseGeometry'],[-1,' * Properties of this object are the functions that parse geometries based'],[-1,' * on their type.'],[-1,' *\/'],[-1,' parseGeometry: {'],[-1,' '],[-1,' \/**'],[-1,' * Method: parseGeometry.point'],[-1,' * Given a GML node representing a point geometry, create an OpenLayers'],[-1,' * point geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A GML node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Point>} A point geometry.'],[-1,' *\/'],[-1,' point: function(node) {'],[-1,' \/**'],[-1,' * Three coordinate variations to consider:'],[-1,' * 1) <gml:pos>x y z<\/gml:pos>'],[-1,' * 2) <gml:coordinates>x, y, z<\/gml:coordinates>'],[-1,' * 3) <gml:coord><gml:X>x<\/gml:X><gml:Y>y<\/gml:Y><\/gml:coord>'],[-1,' *\/'],[0,' var nodeList, coordString;'],[0,' var coords = [];'],[-1,''],[-1,' \/\/ look for <gml:pos>'],[0,' var nodeList = this.getElementsByTagNameNS(node, this.gmlns, \"pos\");'],[0,' if(nodeList.length > 0) {'],[0,' coordString = nodeList[0].firstChild.nodeValue;'],[0,' coordString = coordString.replace(this.regExes.trimSpace, \"\");'],[0,' coords = coordString.split(this.regExes.splitSpace);'],[-1,' }'],[-1,''],[-1,' \/\/ look for <gml:coordinates>'],[0,' if(coords.length == 0) {'],[0,' nodeList = this.getElementsByTagNameNS(node, this.gmlns,'],[-1,' \"coordinates\");'],[0,' if(nodeList.length > 0) {'],[0,' coordString = nodeList[0].firstChild.nodeValue;'],[0,' coordString = coordString.replace(this.regExes.removeSpace,'],[-1,' \"\");'],[0,' coords = coordString.split(\",\");'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ look for <gml:coord>'],[0,' if(coords.length == 0) {'],[0,' nodeList = this.getElementsByTagNameNS(node, this.gmlns,'],[-1,' \"coord\");'],[0,' if(nodeList.length > 0) {'],[0,' var xList = this.getElementsByTagNameNS(nodeList[0],'],[-1,' this.gmlns, \"X\");'],[0,' var yList = this.getElementsByTagNameNS(nodeList[0],'],[-1,' this.gmlns, \"Y\");'],[0,' if(xList.length > 0 && yList.length > 0) {'],[0,' coords = [xList[0].firstChild.nodeValue,'],[-1,' yList[0].firstChild.nodeValue];'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' \/\/ preserve third dimension'],[0,' if(coords.length == 2) {'],[0,' coords[2] = null;'],[-1,' }'],[-1,' '],[0,' if (this.xy) {'],[0,' return new OpenLayers.Geometry.Point(coords[0], coords[1],'],[-1,' coords[2]);'],[-1,' }'],[-1,' else{'],[0,' return new OpenLayers.Geometry.Point(coords[1], coords[0],'],[-1,' coords[2]);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: parseGeometry.multipoint'],[-1,' * Given a GML node representing a multipoint geometry, create an'],[-1,' * OpenLayers multipoint geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A GML node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.MultiPoint>} A multipoint geometry.'],[-1,' *\/'],[-1,' multipoint: function(node) {'],[0,' var nodeList = this.getElementsByTagNameNS(node, this.gmlns,'],[-1,' \"Point\");'],[0,' var components = [];'],[0,' if(nodeList.length > 0) {'],[0,' var point;'],[0,' for(var i=0; i<nodeList.length; ++i) {'],[0,' point = this.parseGeometry.point.apply(this, [nodeList[i]]);'],[0,' if(point) {'],[0,' components.push(point);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return new OpenLayers.Geometry.MultiPoint(components);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: parseGeometry.linestring'],[-1,' * Given a GML node representing a linestring geometry, create an'],[-1,' * OpenLayers linestring geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A GML node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.LineString>} A linestring geometry.'],[-1,' *\/'],[-1,' linestring: function(node, ring) {'],[-1,' \/**'],[-1,' * Two coordinate variations to consider:'],[-1,' * 1) <gml:posList dimension=\"d\">x0 y0 z0 x1 y1 z1<\/gml:posList>'],[-1,' * 2) <gml:coordinates>x0, y0, z0 x1, y1, z1<\/gml:coordinates>'],[-1,' *\/'],[0,' var nodeList, coordString;'],[0,' var coords = [];'],[0,' var points = [];'],[-1,''],[-1,' \/\/ look for <gml:posList>'],[0,' nodeList = this.getElementsByTagNameNS(node, this.gmlns, \"posList\");'],[0,' if(nodeList.length > 0) {'],[0,' coordString = this.getChildValue(nodeList[0]);'],[0,' coordString = coordString.replace(this.regExes.trimSpace, \"\");'],[0,' coords = coordString.split(this.regExes.splitSpace);'],[0,' var dim = parseInt(nodeList[0].getAttribute(\"dimension\"));'],[0,' var j, x, y, z;'],[0,' for(var i=0; i<coords.length\/dim; ++i) {'],[0,' j = i * dim;'],[0,' x = coords[j];'],[0,' y = coords[j+1];'],[0,' z = (dim == 2) ? null : coords[j+2];'],[0,' if (this.xy) {'],[0,' points.push(new OpenLayers.Geometry.Point(x, y, z));'],[-1,' } else {'],[0,' points.push(new OpenLayers.Geometry.Point(y, x, z));'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ look for <gml:coordinates>'],[0,' if(coords.length == 0) {'],[0,' nodeList = this.getElementsByTagNameNS(node, this.gmlns,'],[-1,' \"coordinates\");'],[0,' if(nodeList.length > 0) {'],[0,' coordString = this.getChildValue(nodeList[0]);'],[0,' coordString = coordString.replace(this.regExes.trimSpace,'],[-1,' \"\");'],[0,' coordString = coordString.replace(this.regExes.trimComma,'],[-1,' \",\");'],[0,' var pointList = coordString.split(this.regExes.splitSpace);'],[0,' for(var i=0; i<pointList.length; ++i) {'],[0,' coords = pointList[i].split(\",\");'],[0,' if(coords.length == 2) {'],[0,' coords[2] = null;'],[-1,' }'],[0,' if (this.xy) {'],[0,' points.push(new OpenLayers.Geometry.Point(coords[0],'],[-1,' coords[1],'],[-1,' coords[2]));'],[-1,' } else {'],[0,' points.push(new OpenLayers.Geometry.Point(coords[1],'],[-1,' coords[0],'],[-1,' coords[2]));'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[0,' var line = null;'],[0,' if(points.length != 0) {'],[0,' if(ring) {'],[0,' line = new OpenLayers.Geometry.LinearRing(points);'],[-1,' } else {'],[0,' line = new OpenLayers.Geometry.LineString(points);'],[-1,' }'],[-1,' }'],[0,' return line;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: parseGeometry.multilinestring'],[-1,' * Given a GML node representing a multilinestring geometry, create an'],[-1,' * OpenLayers multilinestring geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A GML node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.MultiLineString>} A multilinestring geometry.'],[-1,' *\/'],[-1,' multilinestring: function(node) {'],[0,' var nodeList = this.getElementsByTagNameNS(node, this.gmlns,'],[-1,' \"LineString\");'],[0,' var components = [];'],[0,' if(nodeList.length > 0) {'],[0,' var line;'],[0,' for(var i=0; i<nodeList.length; ++i) {'],[0,' line = this.parseGeometry.linestring.apply(this,'],[-1,' [nodeList[i]]);'],[0,' if(line) {'],[0,' components.push(line);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return new OpenLayers.Geometry.MultiLineString(components);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: parseGeometry.polygon'],[-1,' * Given a GML node representing a polygon geometry, create an'],[-1,' * OpenLayers polygon geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A GML node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.Polygon>} A polygon geometry.'],[-1,' *\/'],[-1,' polygon: function(node) {'],[0,' var nodeList = this.getElementsByTagNameNS(node, this.gmlns,'],[-1,' \"LinearRing\");'],[0,' var components = [];'],[0,' if(nodeList.length > 0) {'],[-1,' \/\/ this assumes exterior ring first, inner rings after'],[0,' var ring;'],[0,' for(var i=0; i<nodeList.length; ++i) {'],[0,' ring = this.parseGeometry.linestring.apply(this,'],[-1,' [nodeList[i], true]);'],[0,' if(ring) {'],[0,' components.push(ring);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return new OpenLayers.Geometry.Polygon(components);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: parseGeometry.multipolygon'],[-1,' * Given a GML node representing a multipolygon geometry, create an'],[-1,' * OpenLayers multipolygon geometry.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A GML node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Geometry.MultiPolygon>} A multipolygon geometry.'],[-1,' *\/'],[-1,' multipolygon: function(node) {'],[0,' var nodeList = this.getElementsByTagNameNS(node, this.gmlns,'],[-1,' \"Polygon\");'],[0,' var components = [];'],[0,' if(nodeList.length > 0) {'],[0,' var polygon;'],[0,' for(var i=0; i<nodeList.length; ++i) {'],[0,' polygon = this.parseGeometry.polygon.apply(this,'],[-1,' [nodeList[i]]);'],[0,' if(polygon) {'],[0,' components.push(polygon);'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' return new OpenLayers.Geometry.MultiPolygon(components);'],[-1,' },'],[-1,' '],[-1,' envelope: function(node) {'],[0,' var components = [];'],[0,' var coordString;'],[0,' var envelope;'],[-1,' '],[0,' var lpoint = this.getElementsByTagNameNS(node, this.gmlns, \"lowerCorner\");'],[0,' if (lpoint.length > 0) {'],[0,' var coords = [];'],[-1,' '],[0,' if(lpoint.length > 0) {'],[0,' coordString = lpoint[0].firstChild.nodeValue;'],[0,' coordString = coordString.replace(this.regExes.trimSpace, \"\");'],[0,' coords = coordString.split(this.regExes.splitSpace);'],[-1,' }'],[-1,' '],[0,' if(coords.length == 2) {'],[0,' coords[2] = null;'],[-1,' }'],[0,' if (this.xy) {'],[0,' var lowerPoint = new OpenLayers.Geometry.Point(coords[0], coords[1],coords[2]);'],[-1,' } else {'],[0,' var lowerPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' var upoint = this.getElementsByTagNameNS(node, this.gmlns, \"upperCorner\");'],[0,' if (upoint.length > 0) {'],[0,' var coords = [];'],[-1,' '],[0,' if(upoint.length > 0) {'],[0,' coordString = upoint[0].firstChild.nodeValue;'],[0,' coordString = coordString.replace(this.regExes.trimSpace, \"\");'],[0,' coords = coordString.split(this.regExes.splitSpace);'],[-1,' }'],[-1,' '],[0,' if(coords.length == 2) {'],[0,' coords[2] = null;'],[-1,' }'],[0,' if (this.xy) {'],[0,' var upperPoint = new OpenLayers.Geometry.Point(coords[0], coords[1],coords[2]);'],[-1,' } else {'],[0,' var upperPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]);'],[-1,' }'],[-1,' }'],[-1,' '],[0,' if (lowerPoint && upperPoint) {'],[0,' components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y));'],[0,' components.push(new OpenLayers.Geometry.Point(upperPoint.x, lowerPoint.y));'],[0,' components.push(new OpenLayers.Geometry.Point(upperPoint.x, upperPoint.y));'],[0,' components.push(new OpenLayers.Geometry.Point(lowerPoint.x, upperPoint.y));'],[0,' components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y));'],[-1,' '],[0,' var ring = new OpenLayers.Geometry.LinearRing(components);'],[0,' envelope = new OpenLayers.Geometry.Polygon([ring]);'],[-1,' }'],[0,' return envelope; '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: parseGeometry.box'],[-1,' * Given a GML node representing a box geometry, create an'],[-1,' * OpenLayers.Bounds.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement} A GML node.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} A bounds representing the box.'],[-1,' *\/'],[-1,' box: function(node) {'],[0,' var nodeList = this.getElementsByTagNameNS(node, this.gmlns,'],[-1,' \"coordinates\");'],[0,' var coordString;'],[0,' var coords, beginPoint = null, endPoint = null;'],[0,' if (nodeList.length > 0) {'],[0,' coordString = nodeList[0].firstChild.nodeValue;'],[0,' coords = coordString.split(\" \");'],[0,' if (coords.length == 2) {'],[0,' beginPoint = coords[0].split(\",\");'],[0,' endPoint = coords[1].split(\",\");'],[-1,' }'],[-1,' }'],[0,' if (beginPoint !== null && endPoint !== null) {'],[0,' return new OpenLayers.Bounds(parseFloat(beginPoint[0]),'],[-1,' parseFloat(beginPoint[1]),'],[-1,' parseFloat(endPoint[0]),'],[-1,' parseFloat(endPoint[1]) );'],[-1,' }'],[-1,' }'],[-1,' '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: parseAttributes'],[-1,' *'],[-1,' * Parameters:'],[-1,' * node - {DOMElement}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An attributes object.'],[-1,' *\/'],[-1,' parseAttributes: function(node) {'],[0,' var attributes = {};'],[-1,' \/\/ assume attributes are children of the first type 1 child'],[0,' var childNode = node.firstChild;'],[0,' var children, i, child, grandchildren, grandchild, name, value;'],[0,' while(childNode) {'],[0,' if(childNode.nodeType == 1) {'],[-1,' \/\/ attributes are type 1 children with one type 3 child'],[0,' children = childNode.childNodes;'],[0,' for(i=0; i<children.length; ++i) {'],[0,' child = children[i];'],[0,' if(child.nodeType == 1) {'],[0,' grandchildren = child.childNodes;'],[0,' if(grandchildren.length == 1) {'],[0,' grandchild = grandchildren[0];'],[0,' if(grandchild.nodeType == 3 ||'],[-1,' grandchild.nodeType == 4) {'],[0,' name = (child.prefix) ?'],[-1,' child.nodeName.split(\":\")[1] :'],[-1,' child.nodeName;'],[0,' value = grandchild.nodeValue.replace('],[-1,' this.regExes.trimSpace, \"\");'],[0,' attributes[name] = value;'],[-1,' }'],[-1,' } else {'],[-1,' \/\/ If child has no childNodes (grandchildren),'],[-1,' \/\/ set an attribute with null value.'],[-1,' \/\/ e.g. <prefix:fieldname\/> becomes'],[-1,' \/\/ {fieldname: null}'],[0,' attributes[child.nodeName.split(\":\").pop()] = null;'],[-1,' }'],[-1,' }'],[-1,' }'],[0,' break;'],[-1,' }'],[0,' childNode = childNode.nextSibling;'],[-1,' }'],[0,' return attributes;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: write'],[-1,' * Generate a GML document string given a list of features. '],[-1,' * '],[-1,' * Parameters:'],[-1,' * features - {Array(<OpenLayers.Feature.Vector>)} List of features to'],[-1,' * serialize into a string.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {String} A string representing the GML document.'],[-1,' *\/'],[-1,' write: function(features) {'],[0,' if(!(OpenLayers.Util.isArray(features))) {'],[0,' features = [features];'],[-1,' }'],[0,' var gml = this.createElementNS(\"http:\/\/www.opengis.net\/wfs\",'],[-1,' \"wfs:\" + this.collectionName);'],[0,' for(var i=0; i<features.length; i++) {'],[0,' gml.appendChild(this.createFeatureXML(features[i]));'],[-1,' }'],[0,' return OpenLayers.Format.XML.prototype.write.apply(this, [gml]);'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: createFeatureXML'],[-1,' * Accept an OpenLayers.Feature.Vector, and build a GML node for it.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * feature - {<OpenLayers.Feature.Vector>} The feature to be built as GML.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A node reprensting the feature in GML.'],[-1,' *\/'],[-1,' createFeatureXML: function(feature) {'],[0,' var geometry = feature.geometry;'],[0,' var geometryNode = this.buildGeometryNode(geometry);'],[0,' var geomContainer = this.createElementNS(this.featureNS,'],[-1,' this.featurePrefix + \":\" +'],[-1,' this.geometryName);'],[0,' geomContainer.appendChild(geometryNode);'],[0,' var featureNode = this.createElementNS(this.gmlns,'],[-1,' \"gml:\" + this.featureName);'],[0,' var featureContainer = this.createElementNS(this.featureNS,'],[-1,' this.featurePrefix + \":\" +'],[-1,' this.layerName);'],[0,' var fid = feature.fid || feature.id;'],[0,' featureContainer.setAttribute(\"fid\", fid);'],[0,' featureContainer.appendChild(geomContainer);'],[0,' for(var attr in feature.attributes) {'],[0,' var attrText = this.createTextNode(feature.attributes[attr]); '],[0,' var nodename = attr.substring(attr.lastIndexOf(\":\") + 1);'],[0,' var attrContainer = this.createElementNS(this.featureNS,'],[-1,' this.featurePrefix + \":\" +'],[-1,' nodename);'],[0,' attrContainer.appendChild(attrText);'],[0,' featureContainer.appendChild(attrContainer);'],[-1,' } '],[0,' featureNode.appendChild(featureContainer);'],[0,' return featureNode;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: buildGeometryNode'],[-1,' *\/'],[-1,' buildGeometryNode: function(geometry) {'],[0,' if (this.externalProjection && this.internalProjection) {'],[0,' geometry = geometry.clone();'],[0,' geometry.transform(this.internalProjection, '],[-1,' this.externalProjection);'],[-1,' } '],[0,' var className = geometry.CLASS_NAME;'],[0,' var type = className.substring(className.lastIndexOf(\".\") + 1);'],[0,' var builder = this.buildGeometry[type.toLowerCase()];'],[0,' return builder.apply(this, [geometry]);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Property: buildGeometry'],[-1,' * Object containing methods to do the actual geometry node building'],[-1,' * based on geometry type.'],[-1,' *\/'],[-1,' buildGeometry: {'],[-1,' \/\/ TBD retrieve the srs from layer'],[-1,' \/\/ srsName is non-standard, so not including it until it\'s right.'],[-1,' \/\/ gml.setAttribute(\"srsName\",'],[-1,' \/\/ \"http:\/\/www.opengis.net\/gml\/srs\/epsg.xml#4326\");'],[-1,''],[-1,' \/**'],[-1,' * Method: buildGeometry.point'],[-1,' * Given an OpenLayers point geometry, create a GML point.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry.Point>} A point geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A GML point node.'],[-1,' *\/'],[-1,' point: function(geometry) {'],[0,' var gml = this.createElementNS(this.gmlns, \"gml:Point\");'],[0,' gml.appendChild(this.buildCoordinatesNode(geometry));'],[0,' return gml;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: buildGeometry.multipoint'],[-1,' * Given an OpenLayers multipoint geometry, create a GML multipoint.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry.MultiPoint>} A multipoint geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A GML multipoint node.'],[-1,' *\/'],[-1,' multipoint: function(geometry) {'],[0,' var gml = this.createElementNS(this.gmlns, \"gml:MultiPoint\");'],[0,' var points = geometry.components;'],[0,' var pointMember, pointGeom;'],[0,' for(var i=0; i<points.length; i++) { '],[0,' pointMember = this.createElementNS(this.gmlns,'],[-1,' \"gml:pointMember\");'],[0,' pointGeom = this.buildGeometry.point.apply(this,'],[-1,' [points[i]]);'],[0,' pointMember.appendChild(pointGeom);'],[0,' gml.appendChild(pointMember);'],[-1,' }'],[0,' return gml; '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: buildGeometry.linestring'],[-1,' * Given an OpenLayers linestring geometry, create a GML linestring.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry.LineString>} A linestring geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A GML linestring node.'],[-1,' *\/'],[-1,' linestring: function(geometry) {'],[0,' var gml = this.createElementNS(this.gmlns, \"gml:LineString\");'],[0,' gml.appendChild(this.buildCoordinatesNode(geometry));'],[0,' return gml;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: buildGeometry.multilinestring'],[-1,' * Given an OpenLayers multilinestring geometry, create a GML'],[-1,' * multilinestring.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry.MultiLineString>} A multilinestring'],[-1,' * geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A GML multilinestring node.'],[-1,' *\/'],[-1,' multilinestring: function(geometry) {'],[0,' var gml = this.createElementNS(this.gmlns, \"gml:MultiLineString\");'],[0,' var lines = geometry.components;'],[0,' var lineMember, lineGeom;'],[0,' for(var i=0; i<lines.length; ++i) {'],[0,' lineMember = this.createElementNS(this.gmlns,'],[-1,' \"gml:lineStringMember\");'],[0,' lineGeom = this.buildGeometry.linestring.apply(this,'],[-1,' [lines[i]]);'],[0,' lineMember.appendChild(lineGeom);'],[0,' gml.appendChild(lineMember);'],[-1,' }'],[0,' return gml;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: buildGeometry.linearring'],[-1,' * Given an OpenLayers linearring geometry, create a GML linearring.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry.LinearRing>} A linearring geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A GML linearring node.'],[-1,' *\/'],[-1,' linearring: function(geometry) {'],[0,' var gml = this.createElementNS(this.gmlns, \"gml:LinearRing\");'],[0,' gml.appendChild(this.buildCoordinatesNode(geometry));'],[0,' return gml;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: buildGeometry.polygon'],[-1,' * Given an OpenLayers polygon geometry, create a GML polygon.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry.Polygon>} A polygon geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A GML polygon node.'],[-1,' *\/'],[-1,' polygon: function(geometry) {'],[0,' var gml = this.createElementNS(this.gmlns, \"gml:Polygon\");'],[0,' var rings = geometry.components;'],[0,' var ringMember, ringGeom, type;'],[0,' for(var i=0; i<rings.length; ++i) {'],[0,' type = (i==0) ? \"outerBoundaryIs\" : \"innerBoundaryIs\";'],[0,' ringMember = this.createElementNS(this.gmlns,'],[-1,' \"gml:\" + type);'],[0,' ringGeom = this.buildGeometry.linearring.apply(this,'],[-1,' [rings[i]]);'],[0,' ringMember.appendChild(ringGeom);'],[0,' gml.appendChild(ringMember);'],[-1,' }'],[0,' return gml;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: buildGeometry.multipolygon'],[-1,' * Given an OpenLayers multipolygon geometry, create a GML multipolygon.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * geometry - {<OpenLayers.Geometry.MultiPolygon>} A multipolygon'],[-1,' * geometry.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A GML multipolygon node.'],[-1,' *\/'],[-1,' multipolygon: function(geometry) {'],[0,' var gml = this.createElementNS(this.gmlns, \"gml:MultiPolygon\");'],[0,' var polys = geometry.components;'],[0,' var polyMember, polyGeom;'],[0,' for(var i=0; i<polys.length; ++i) {'],[0,' polyMember = this.createElementNS(this.gmlns,'],[-1,' \"gml:polygonMember\");'],[0,' polyGeom = this.buildGeometry.polygon.apply(this,'],[-1,' [polys[i]]);'],[0,' polyMember.appendChild(polyGeom);'],[0,' gml.appendChild(polyMember);'],[-1,' }'],[0,' return gml;'],[-1,''],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: buildGeometry.bounds'],[-1,' * Given an OpenLayers bounds, create a GML box.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Geometry.Bounds>} A bounds object.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A GML box node.'],[-1,' *\/'],[-1,' bounds: function(bounds) {'],[0,' var gml = this.createElementNS(this.gmlns, \"gml:Box\");'],[0,' gml.appendChild(this.buildCoordinatesNode(bounds));'],[0,' return gml;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: buildCoordinates'],[-1,' * builds the coordinates XmlNode'],[-1,' * (code)'],[-1,' * <gml:coordinates decimal=\".\" cs=\",\" ts=\" \">...<\/gml:coordinates>'],[-1,' * (end)'],[-1,' *'],[-1,' * Parameters: '],[-1,' * geometry - {<OpenLayers.Geometry>} '],[-1,' *'],[-1,' * Returns:'],[-1,' * {XmlNode} created xmlNode'],[-1,' *\/'],[-1,' buildCoordinatesNode: function(geometry) {'],[0,' var coordinatesNode = this.createElementNS(this.gmlns,'],[-1,' \"gml:coordinates\");'],[0,' coordinatesNode.setAttribute(\"decimal\", \".\");'],[0,' coordinatesNode.setAttribute(\"cs\", \",\");'],[0,' coordinatesNode.setAttribute(\"ts\", \" \");'],[-1,''],[0,' var parts = [];'],[-1,''],[0,' if(geometry instanceof OpenLayers.Bounds){'],[0,' parts.push(geometry.left + \",\" + geometry.bottom);'],[0,' parts.push(geometry.right + \",\" + geometry.top);'],[-1,' } else {'],[0,' var points = (geometry.components) ? geometry.components : [geometry];'],[0,' for(var i=0; i<points.length; i++) {'],[0,' parts.push(points[i].x + \",\" + points[i].y); '],[-1,' } '],[-1,' }'],[-1,''],[0,' var txtNode = this.createTextNode(parts.join(\" \"));'],[0,' coordinatesNode.appendChild(txtNode);'],[-1,' '],[0,' return coordinatesNode;'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Format.GML\" '],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Lang\/nl.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Translators (2009 onwards):'],[-1,' * - Siebrand'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Lang.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Lang[\"nl\"]'],[-1,' * Dictionary for Nederlands. Keys for entries are used in calls to'],[-1,' * <OpenLayers.Lang.translate>. Entry bodies are normal strings or'],[-1,' * strings formatted for use with <OpenLayers.String.format> calls.'],[-1,' *\/'],[1,'OpenLayers.Lang[\"nl\"] = OpenLayers.Util.applyDefaults({'],[-1,''],[-1,' \'unhandledRequest\': \"Het verzoek is niet afgehandeld met de volgende melding: ${statusText}\",'],[-1,''],[-1,' \'Permalink\': \"Permanente verwijzing\",'],[-1,''],[-1,' \'Overlays\': \"Overlays\",'],[-1,''],[-1,' \'Base Layer\': \"Achtergrondkaart\",'],[-1,''],[-1,' \'noFID\': \"Een optie die geen FID heeft kan niet bijgewerkt worden.\",'],[-1,''],[-1,' \'browserNotSupported\': \"Uw browser ondersteunt het weergeven van vectoren niet.\\nMomenteel ondersteunde weergavemogelijkheden:\\n${renderers}\",'],[-1,''],[-1,' \'minZoomLevelError\': \"De eigenschap minZoomLevel is alleen bedoeld voor gebruik lagen met die afstammen van FixedZoomLevels-lagen.\\nDat deze WFS-laag minZoomLevel controleert, is een overblijfsel uit het verleden.\\nWe kunnen deze controle echter niet verwijderen zonder op OL gebaseerde applicaties die hervan afhankelijk zijn stuk te maken.\\nDaarom heeft deze functionaliteit de eigenschap \\\'deprecated\\\' gekregen - de minZoomLevel wordt verwijderd in versie 3.0.\\nGebruik in plaats van deze functie de mogelijkheid om min\/max voor resolutie in te stellen zoals op de volgende pagina wordt beschreven:\\nhttp:\/\/trac.openlayers.org\/wiki\/SettingZoomLevels\",'],[-1,''],[-1,' \'commitSuccess\': \"WFS-transactie: succesvol ${response}\",'],[-1,''],[-1,' \'commitFailed\': \"WFS-transactie: mislukt ${response}\",'],[-1,''],[-1,' \'googleWarning\': \"De Google-Layer kon niet correct geladen worden.\\x3cbr \/\\x3e\\x3cbr \/\\x3e\\nOm deze melding niet meer te krijgen, moet u een andere achtergrondkaart kiezen in de laagwisselaar in de rechterbovenhoek.\\x3cbr \/\\x3e\\x3cbr \/\\x3e\\nDit komt waarschijnlijk doordat de bibliotheek ${layerLib} niet correct ingevoegd is.\\x3cbr \/\\x3e\\x3cbr \/\\x3e\\nOntwikkelaars: \\x3ca href=\\\'http:\/\/trac.openlayers.org\/wiki\/${layerLib}\\\' target=\\\'_blank\\\'\\x3eklik hier\\x3c\/a\\x3e om dit werkend te krijgen.\",'],[-1,''],[-1,' \'getLayerWarning\': \"De laag ${layerType} kon niet goed geladen worden.\\x3cbr \/\\x3e\\x3cbr \/\\x3e\\nOm deze melding niet meer te krijgen, moet u een andere achtergrondkaart kiezen in de laagwisselaar in de rechterbovenhoek.\\x3cbr \/\\x3e\\x3cbr \/\\x3e\\nDit komt waarschijnlijk doordat de bibliotheek ${layerLib} niet correct is ingevoegd.\\x3cbr \/\\x3e\\x3cbr \/\\x3e\\nOntwikkelaars: \\x3ca href=\\\'http:\/\/trac.openlayers.org\/wiki\/${layerLib}\\\' target=\\\'_blank\\\'\\x3eklik hier\\x3c\/a\\x3e om dit werkend te krijgen.\",'],[-1,''],[-1,' \'Scale = 1 : ${scaleDenom}\': \"Schaal = 1 : ${scaleDenom}\",'],[-1,''],[-1,' \'W\': \"W\",'],[-1,''],[-1,' \'E\': \"O\",'],[-1,''],[-1,' \'N\': \"N\",'],[-1,''],[-1,' \'S\': \"Z\",'],[-1,''],[-1,' \'reprojectDeprecated\': \"U gebruikt de optie \\\'reproject\\\' op de laag ${layerName}.\\nDeze optie is vervallen: deze optie was ontwikkeld om gegevens over commerci\u00EBle basiskaarten weer te geven, maar deze functionaliteit wordt nu bereikt door ondersteuning van Spherical Mercator.\\nMeer informatie is beschikbaar op http:\/\/trac.openlayers.org\/wiki\/SphericalMercator.\",'],[-1,''],[-1,' \'methodDeprecated\': \"Deze methode is verouderd en wordt verwijderd in versie 3.0.\\nGebruik ${newMethod}.\"'],[-1,''],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control\/OverviewMap.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/** '],[-1,' * @requires OpenLayers\/Control.js'],[-1,' * @requires OpenLayers\/BaseTypes.js'],[-1,' * @requires OpenLayers\/Events\/buttonclick.js'],[-1,' * @requires OpenLayers\/Map.js'],[-1,' * @requires OpenLayers\/Handler\/Click.js'],[-1,' * @requires OpenLayers\/Handler\/Drag.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control.OverviewMap'],[-1,' * The OverMap control creates a small overview map, useful to display the '],[-1,' * extent of a zoomed map and your main map and provide additional '],[-1,' * navigation options to the User. By default the overview map is drawn in'],[-1,' * the lower right corner of the main map. Create a new overview map with the'],[-1,' * <OpenLayers.Control.OverviewMap> constructor.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Control>'],[-1,' *\/'],[1,'OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {'],[-1,''],[-1,' \/**'],[-1,' * Property: element'],[-1,' * {DOMElement} The DOM element that contains the overview map'],[-1,' *\/'],[-1,' element: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: ovmap'],[-1,' * {<OpenLayers.Map>} A reference to the overview map itself.'],[-1,' *\/'],[-1,' ovmap: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: size'],[-1,' * {<OpenLayers.Size>} The overvew map size in pixels. Note that this is'],[-1,' * the size of the map itself - the element that contains the map (default'],[-1,' * class name olControlOverviewMapElement) may have padding or other style'],[-1,' * attributes added via CSS.'],[-1,' *\/'],[-1,' size: {w: 180, h: 90},'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: layers'],[-1,' * {Array(<OpenLayers.Layer>)} Ordered list of layers in the overview map.'],[-1,' * If none are sent at construction, the base layer for the main map is used.'],[-1,' *\/'],[-1,' layers: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: minRectSize'],[-1,' * {Integer} The minimum width or height (in pixels) of the extent'],[-1,' * rectangle on the overview map. When the extent rectangle reaches'],[-1,' * this size, it will be replaced depending on the value of the'],[-1,' * <minRectDisplayClass> property. Default is 15 pixels.'],[-1,' *\/'],[-1,' minRectSize: 15,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: minRectDisplayClass'],[-1,' * {String} Replacement style class name for the extent rectangle when'],[-1,' * <minRectSize> is reached. This string will be suffixed on to the'],[-1,' * displayClass. Default is \"RectReplacement\".'],[-1,' *'],[-1,' * Example CSS declaration:'],[-1,' * (code)'],[-1,' * .olControlOverviewMapRectReplacement {'],[-1,' * overflow: hidden;'],[-1,' * cursor: move;'],[-1,' * background-image: url(\"img\/overview_replacement.gif\");'],[-1,' * background-repeat: no-repeat;'],[-1,' * background-position: center;'],[-1,' * }'],[-1,' * (end)'],[-1,' *\/'],[-1,' minRectDisplayClass: \"RectReplacement\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: minRatio'],[-1,' * {Float} The ratio of the overview map resolution to the main map'],[-1,' * resolution at which to zoom farther out on the overview map.'],[-1,' *\/'],[-1,' minRatio: 8,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: maxRatio'],[-1,' * {Float} The ratio of the overview map resolution to the main map'],[-1,' * resolution at which to zoom farther in on the overview map.'],[-1,' *\/'],[-1,' maxRatio: 32,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: mapOptions'],[-1,' * {Object} An object containing any non-default properties to be sent to'],[-1,' * the overview map\'s map constructor. These should include any'],[-1,' * non-default options that the main map was constructed with.'],[-1,' *\/'],[-1,' mapOptions: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: autoPan'],[-1,' * {Boolean} Always pan the overview map, so the extent marker remains in'],[-1,' * the center. Default is false. If true, when you drag the extent'],[-1,' * marker, the overview map will update itself so the marker returns'],[-1,' * to the center.'],[-1,' *\/'],[-1,' autoPan: false,'],[-1,' '],[-1,' \/**'],[-1,' * Property: handlers'],[-1,' * {Object}'],[-1,' *\/'],[-1,' handlers: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: resolutionFactor'],[-1,' * {Object}'],[-1,' *\/'],[-1,' resolutionFactor: 1,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: maximized'],[-1,' * {Boolean} Start as maximized (visible). Defaults to false.'],[-1,' *\/'],[-1,' maximized: false,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: maximizeTitle'],[-1,' * {String} This property is used for showing a tooltip over the '],[-1,' * maximize div. Defaults to \"\" (no title).'],[-1,' *\/ '],[-1,' maximizeTitle: \"\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: minimizeTitle'],[-1,' * {String} This property is used for showing a tooltip over the '],[-1,' * minimize div. Defaults to \"\" (no title).'],[-1,' *\/ '],[-1,' minimizeTitle: \"\",'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Control.OverviewMap'],[-1,' * Create a new overview map'],[-1,' *'],[-1,' * Parameters:'],[-1,' * options - {Object} Properties of this object will be set on the overview'],[-1,' * map object. Note, to set options on the map object contained in this'],[-1,' * control, set <mapOptions> as one of the options properties.'],[-1,' *\/'],[-1,' initialize: function(options) {'],[0,' this.layers = [];'],[0,' this.handlers = {};'],[0,' OpenLayers.Control.prototype.initialize.apply(this, [options]);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: destroy'],[-1,' * Deconstruct the control'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' if (!this.mapDiv) { \/\/ we\'ve already been destroyed'],[0,' return;'],[-1,' }'],[0,' if (this.handlers.click) {'],[0,' this.handlers.click.destroy();'],[-1,' }'],[0,' if (this.handlers.drag) {'],[0,' this.handlers.drag.destroy();'],[-1,' }'],[-1,''],[0,' this.ovmap && this.ovmap.viewPortDiv.removeChild(this.extentRectangle);'],[0,' this.extentRectangle = null;'],[-1,''],[0,' if (this.rectEvents) {'],[0,' this.rectEvents.destroy();'],[0,' this.rectEvents = null;'],[-1,' }'],[-1,''],[0,' if (this.ovmap) {'],[0,' this.ovmap.destroy();'],[0,' this.ovmap = null;'],[-1,' }'],[-1,' '],[0,' this.element.removeChild(this.mapDiv);'],[0,' this.mapDiv = null;'],[-1,''],[0,' this.div.removeChild(this.element);'],[0,' this.element = null;'],[-1,''],[0,' if (this.maximizeDiv) {'],[0,' this.div.removeChild(this.maximizeDiv);'],[0,' this.maximizeDiv = null;'],[-1,' }'],[-1,' '],[0,' if (this.minimizeDiv) {'],[0,' this.div.removeChild(this.minimizeDiv);'],[0,' this.minimizeDiv = null;'],[-1,' }'],[-1,''],[0,' this.map.events.un({'],[-1,' buttonclick: this.onButtonClick,'],[-1,' moveend: this.update,'],[-1,' changebaselayer: this.baseLayerDraw,'],[-1,' scope: this'],[-1,' });'],[-1,''],[0,' OpenLayers.Control.prototype.destroy.apply(this, arguments); '],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: draw'],[-1,' * Render the control in the browser.'],[-1,' *\/ '],[-1,' draw: function() {'],[0,' OpenLayers.Control.prototype.draw.apply(this, arguments);'],[0,' if (this.layers.length === 0) {'],[0,' if (this.map.baseLayer) {'],[0,' var layer = this.map.baseLayer.clone();'],[0,' this.layers = [layer];'],[-1,' } else {'],[0,' this.map.events.register(\"changebaselayer\", this, this.baseLayerDraw);'],[0,' return this.div;'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ create overview map DOM elements'],[0,' this.element = document.createElement(\'div\');'],[0,' this.element.className = this.displayClass + \'Element\';'],[0,' this.element.style.display = \'none\';'],[-1,''],[0,' this.mapDiv = document.createElement(\'div\');'],[0,' this.mapDiv.style.width = this.size.w + \'px\';'],[0,' this.mapDiv.style.height = this.size.h + \'px\';'],[0,' this.mapDiv.style.position = \'relative\';'],[0,' this.mapDiv.style.overflow = \'hidden\';'],[0,' this.mapDiv.id = OpenLayers.Util.createUniqueID(\'overviewMap\');'],[-1,' '],[0,' this.extentRectangle = document.createElement(\'div\');'],[0,' this.extentRectangle.style.position = \'absolute\';'],[0,' this.extentRectangle.style.zIndex = 1000; \/\/HACK'],[0,' this.extentRectangle.className = this.displayClass+\'ExtentRectangle\';'],[-1,''],[0,' this.element.appendChild(this.mapDiv); '],[-1,''],[0,' this.div.appendChild(this.element);'],[-1,''],[-1,' \/\/ Optionally add min\/max buttons if the control will go in the'],[-1,' \/\/ map viewport.'],[0,' if(!this.outsideViewport) {'],[0,' this.div.className += \" \" + this.displayClass + \'Container\';'],[-1,' \/\/ maximize button div'],[0,' var img = OpenLayers.Util.getImageLocation(\'layer-switcher-maximize.png\');'],[0,' this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv('],[-1,' this.displayClass + \'MaximizeButton\', '],[-1,' null, '],[-1,' null, '],[-1,' img, '],[-1,' \'absolute\');'],[0,' this.maximizeDiv.style.display = \'none\';'],[0,' this.maximizeDiv.className = this.displayClass + \'MaximizeButton olButton\';'],[0,' if (this.maximizeTitle) {'],[0,' this.maximizeDiv.title = this.maximizeTitle;'],[-1,' }'],[0,' this.div.appendChild(this.maximizeDiv);'],[-1,' '],[-1,' \/\/ minimize button div'],[0,' var img = OpenLayers.Util.getImageLocation(\'layer-switcher-minimize.png\');'],[0,' this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv('],[-1,' \'OpenLayers_Control_minimizeDiv\', '],[-1,' null, '],[-1,' null, '],[-1,' img, '],[-1,' \'absolute\');'],[0,' this.minimizeDiv.style.display = \'none\';'],[0,' this.minimizeDiv.className = this.displayClass + \'MinimizeButton olButton\';'],[0,' if (this.minimizeTitle) {'],[0,' this.minimizeDiv.title = this.minimizeTitle;'],[-1,' }'],[0,' this.div.appendChild(this.minimizeDiv); '],[0,' this.minimizeControl();'],[-1,' } else {'],[-1,' \/\/ show the overview map'],[0,' this.element.style.display = \'\';'],[-1,' }'],[0,' if(this.map.getExtent()) {'],[0,' this.update();'],[-1,' }'],[-1,' '],[0,' this.map.events.on({'],[-1,' buttonclick: this.onButtonClick,'],[-1,' moveend: this.update,'],[-1,' scope: this'],[-1,' });'],[-1,' '],[0,' if (this.maximized) {'],[0,' this.maximizeControl();'],[-1,' }'],[0,' return this.div;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: baseLayerDraw'],[-1,' * Draw the base layer - called if unable to complete in the initial draw'],[-1,' *\/'],[-1,' baseLayerDraw: function() {'],[0,' this.draw();'],[0,' this.map.events.unregister(\"changebaselayer\", this, this.baseLayerDraw);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: rectDrag'],[-1,' * Handle extent rectangle drag'],[-1,' *'],[-1,' * Parameters:'],[-1,' * px - {<OpenLayers.Pixel>} The pixel location of the drag.'],[-1,' *\/'],[-1,' rectDrag: function(px) {'],[0,' var deltaX = this.handlers.drag.last.x - px.x;'],[0,' var deltaY = this.handlers.drag.last.y - px.y;'],[0,' if(deltaX != 0 || deltaY != 0) {'],[0,' var rectTop = this.rectPxBounds.top;'],[0,' var rectLeft = this.rectPxBounds.left;'],[0,' var rectHeight = Math.abs(this.rectPxBounds.getHeight());'],[0,' var rectWidth = this.rectPxBounds.getWidth();'],[-1,' \/\/ don\'t allow dragging off of parent element'],[0,' var newTop = Math.max(0, (rectTop - deltaY));'],[0,' newTop = Math.min(newTop,'],[-1,' this.ovmap.size.h - this.hComp - rectHeight);'],[0,' var newLeft = Math.max(0, (rectLeft - deltaX));'],[0,' newLeft = Math.min(newLeft,'],[-1,' this.ovmap.size.w - this.wComp - rectWidth);'],[0,' this.setRectPxBounds(new OpenLayers.Bounds(newLeft,'],[-1,' newTop + rectHeight,'],[-1,' newLeft + rectWidth,'],[-1,' newTop));'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: mapDivClick'],[-1,' * Handle browser events'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {<OpenLayers.Event>} evt'],[-1,' *\/'],[-1,' mapDivClick: function(evt) {'],[0,' var pxCenter = this.rectPxBounds.getCenterPixel();'],[0,' var deltaX = evt.xy.x - pxCenter.x;'],[0,' var deltaY = evt.xy.y - pxCenter.y;'],[0,' var top = this.rectPxBounds.top;'],[0,' var left = this.rectPxBounds.left;'],[0,' var height = Math.abs(this.rectPxBounds.getHeight());'],[0,' var width = this.rectPxBounds.getWidth();'],[0,' var newTop = Math.max(0, (top + deltaY));'],[0,' newTop = Math.min(newTop, this.ovmap.size.h - height);'],[0,' var newLeft = Math.max(0, (left + deltaX));'],[0,' newLeft = Math.min(newLeft, this.ovmap.size.w - width);'],[0,' this.setRectPxBounds(new OpenLayers.Bounds(newLeft,'],[-1,' newTop + height,'],[-1,' newLeft + width,'],[-1,' newTop));'],[0,' this.updateMapToRect();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: onButtonClick'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event}'],[-1,' *\/'],[-1,' onButtonClick: function(evt) {'],[0,' if (evt.buttonElement === this.minimizeDiv) {'],[0,' this.minimizeControl();'],[0,' } else if (evt.buttonElement === this.maximizeDiv) {'],[0,' this.maximizeControl();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: maximizeControl'],[-1,' * Unhide the control. Called when the control is in the map viewport.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * e - {<OpenLayers.Event>}'],[-1,' *\/'],[-1,' maximizeControl: function(e) {'],[0,' this.element.style.display = \'\';'],[0,' this.showToggle(false);'],[0,' if (e != null) {'],[0,' OpenLayers.Event.stop(e); '],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: minimizeControl'],[-1,' * Hide all the contents of the control, shrink the size, '],[-1,' * add the maximize icon'],[-1,' * '],[-1,' * Parameters:'],[-1,' * e - {<OpenLayers.Event>}'],[-1,' *\/'],[-1,' minimizeControl: function(e) {'],[0,' this.element.style.display = \'none\';'],[0,' this.showToggle(true);'],[0,' if (e != null) {'],[0,' OpenLayers.Event.stop(e); '],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: showToggle'],[-1,' * Hide\/Show the toggle depending on whether the control is minimized'],[-1,' *'],[-1,' * Parameters:'],[-1,' * minimize - {Boolean} '],[-1,' *\/'],[-1,' showToggle: function(minimize) {'],[0,' if (this.maximizeDiv) {'],[0,' this.maximizeDiv.style.display = minimize ? \'\' : \'none\';'],[-1,' }'],[0,' if (this.minimizeDiv) {'],[0,' this.minimizeDiv.style.display = minimize ? \'none\' : \'\';'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: update'],[-1,' * Update the overview map after layers move.'],[-1,' *\/'],[-1,' update: function() {'],[0,' if(this.ovmap == null) {'],[0,' this.createMap();'],[-1,' }'],[-1,' '],[0,' if(this.autoPan || !this.isSuitableOverview()) {'],[0,' this.updateOverview();'],[-1,' }'],[-1,' '],[-1,' \/\/ update extent rectangle'],[0,' this.updateRectToMap();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: isSuitableOverview'],[-1,' * Determines if the overview map is suitable given the extent and'],[-1,' * resolution of the main map.'],[-1,' *\/'],[-1,' isSuitableOverview: function() {'],[0,' var mapExtent = this.map.getExtent();'],[0,' var maxExtent = this.map.getMaxExtent();'],[0,' var testExtent = new OpenLayers.Bounds('],[-1,' Math.max(mapExtent.left, maxExtent.left),'],[-1,' Math.max(mapExtent.bottom, maxExtent.bottom),'],[-1,' Math.min(mapExtent.right, maxExtent.right),'],[-1,' Math.min(mapExtent.top, maxExtent.top)); '],[-1,''],[0,' if (this.ovmap.getProjection() != this.map.getProjection()) {'],[0,' testExtent = testExtent.transform('],[-1,' this.map.getProjectionObject(),'],[-1,' this.ovmap.getProjectionObject() );'],[-1,' }'],[-1,''],[0,' var resRatio = this.ovmap.getResolution() \/ this.map.getResolution();'],[0,' return ((resRatio > this.minRatio) &&'],[-1,' (resRatio <= this.maxRatio) &&'],[-1,' (this.ovmap.getExtent().containsBounds(testExtent)));'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method updateOverview'],[-1,' * Called by <update> if <isSuitableOverview> returns true'],[-1,' *\/'],[-1,' updateOverview: function() {'],[0,' var mapRes = this.map.getResolution();'],[0,' var targetRes = this.ovmap.getResolution();'],[0,' var resRatio = targetRes \/ mapRes;'],[0,' if(resRatio > this.maxRatio) {'],[-1,' \/\/ zoom in overview map'],[0,' targetRes = this.minRatio * mapRes; '],[0,' } else if(resRatio <= this.minRatio) {'],[-1,' \/\/ zoom out overview map'],[0,' targetRes = this.maxRatio * mapRes;'],[-1,' }'],[0,' var center;'],[0,' if (this.ovmap.getProjection() != this.map.getProjection()) {'],[0,' center = this.map.center.clone();'],[0,' center.transform(this.map.getProjectionObject(),'],[-1,' this.ovmap.getProjectionObject() );'],[-1,' } else {'],[0,' center = this.map.center;'],[-1,' }'],[0,' this.ovmap.setCenter(center, this.ovmap.getZoomForResolution('],[-1,' targetRes * this.resolutionFactor));'],[0,' this.updateRectToMap();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: createMap'],[-1,' * Construct the map that this control contains'],[-1,' *\/'],[-1,' createMap: function() {'],[-1,' \/\/ create the overview map'],[0,' var options = OpenLayers.Util.extend('],[-1,' {controls: [], maxResolution: \'auto\', '],[-1,' fallThrough: false}, this.mapOptions);'],[0,' this.ovmap = new OpenLayers.Map(this.mapDiv, options);'],[0,' this.ovmap.viewPortDiv.appendChild(this.extentRectangle);'],[-1,' '],[-1,' \/\/ prevent ovmap from being destroyed when the page unloads, because'],[-1,' \/\/ the OverviewMap control has to do this (and does it).'],[0,' OpenLayers.Event.stopObserving(window, \'unload\', this.ovmap.unloadDestroy);'],[-1,' '],[0,' this.ovmap.addLayers(this.layers);'],[0,' this.ovmap.zoomToMaxExtent();'],[-1,' \/\/ check extent rectangle border width'],[0,' this.wComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'],[-1,' \'border-left-width\')) +'],[-1,' parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'],[-1,' \'border-right-width\'));'],[0,' this.wComp = (this.wComp) ? this.wComp : 2;'],[0,' this.hComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'],[-1,' \'border-top-width\')) +'],[-1,' parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'],[-1,' \'border-bottom-width\'));'],[0,' this.hComp = (this.hComp) ? this.hComp : 2;'],[-1,''],[0,' this.handlers.drag = new OpenLayers.Handler.Drag('],[-1,' this, {move: this.rectDrag, done: this.updateMapToRect},'],[-1,' {map: this.ovmap}'],[-1,' );'],[0,' this.handlers.click = new OpenLayers.Handler.Click('],[-1,' this, {'],[-1,' \"click\": this.mapDivClick'],[-1,' },{'],[-1,' \"single\": true, \"double\": false,'],[-1,' \"stopSingle\": true, \"stopDouble\": true,'],[-1,' \"pixelTolerance\": 1,'],[-1,' map: this.ovmap'],[-1,' }'],[-1,' );'],[0,' this.handlers.click.activate();'],[-1,' '],[0,' this.rectEvents = new OpenLayers.Events(this, this.extentRectangle,'],[-1,' null, true);'],[0,' this.rectEvents.register(\"mouseover\", this, function(e) {'],[0,' if(!this.handlers.drag.active && !this.map.dragging) {'],[0,' this.handlers.drag.activate();'],[-1,' }'],[-1,' });'],[0,' this.rectEvents.register(\"mouseout\", this, function(e) {'],[0,' if(!this.handlers.drag.dragging) {'],[0,' this.handlers.drag.deactivate();'],[-1,' }'],[-1,' });'],[-1,''],[0,' if (this.ovmap.getProjection() != this.map.getProjection()) {'],[0,' var sourceUnits = this.map.getProjectionObject().getUnits() ||'],[-1,' this.map.units || this.map.baseLayer.units;'],[0,' var targetUnits = this.ovmap.getProjectionObject().getUnits() ||'],[-1,' this.ovmap.units || this.ovmap.baseLayer.units;'],[0,' this.resolutionFactor = sourceUnits && targetUnits ?'],[-1,' OpenLayers.INCHES_PER_UNIT[sourceUnits] \/'],[-1,' OpenLayers.INCHES_PER_UNIT[targetUnits] : 1;'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: updateRectToMap'],[-1,' * Updates the extent rectangle position and size to match the map extent'],[-1,' *\/'],[-1,' updateRectToMap: function() {'],[-1,' \/\/ If the projections differ we need to reproject'],[0,' var bounds;'],[0,' if (this.ovmap.getProjection() != this.map.getProjection()) {'],[0,' bounds = this.map.getExtent().transform('],[-1,' this.map.getProjectionObject(), '],[-1,' this.ovmap.getProjectionObject() );'],[-1,' } else {'],[0,' bounds = this.map.getExtent();'],[-1,' }'],[0,' var pxBounds = this.getRectBoundsFromMapBounds(bounds);'],[0,' if (pxBounds) {'],[0,' this.setRectPxBounds(pxBounds);'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: updateMapToRect'],[-1,' * Updates the map extent to match the extent rectangle position and size'],[-1,' *\/'],[-1,' updateMapToRect: function() {'],[0,' var lonLatBounds = this.getMapBoundsFromRectBounds(this.rectPxBounds);'],[0,' if (this.ovmap.getProjection() != this.map.getProjection()) {'],[0,' lonLatBounds = lonLatBounds.transform('],[-1,' this.ovmap.getProjectionObject(),'],[-1,' this.map.getProjectionObject() );'],[-1,' }'],[0,' this.map.panTo(lonLatBounds.getCenterLonLat());'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: setRectPxBounds'],[-1,' * Set extent rectangle pixel bounds.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * pxBounds - {<OpenLayers.Bounds>}'],[-1,' *\/'],[-1,' setRectPxBounds: function(pxBounds) {'],[0,' var top = Math.max(pxBounds.top, 0);'],[0,' var left = Math.max(pxBounds.left, 0);'],[0,' var bottom = Math.min(pxBounds.top + Math.abs(pxBounds.getHeight()),'],[-1,' this.ovmap.size.h - this.hComp);'],[0,' var right = Math.min(pxBounds.left + pxBounds.getWidth(),'],[-1,' this.ovmap.size.w - this.wComp);'],[0,' var width = Math.max(right - left, 0);'],[0,' var height = Math.max(bottom - top, 0);'],[0,' if(width < this.minRectSize || height < this.minRectSize) {'],[0,' this.extentRectangle.className = this.displayClass +'],[-1,' this.minRectDisplayClass;'],[0,' var rLeft = left + (width \/ 2) - (this.minRectSize \/ 2);'],[0,' var rTop = top + (height \/ 2) - (this.minRectSize \/ 2);'],[0,' this.extentRectangle.style.top = Math.round(rTop) + \'px\';'],[0,' this.extentRectangle.style.left = Math.round(rLeft) + \'px\';'],[0,' this.extentRectangle.style.height = this.minRectSize + \'px\';'],[0,' this.extentRectangle.style.width = this.minRectSize + \'px\';'],[-1,' } else {'],[0,' this.extentRectangle.className = this.displayClass +'],[-1,' \'ExtentRectangle\';'],[0,' this.extentRectangle.style.top = Math.round(top) + \'px\';'],[0,' this.extentRectangle.style.left = Math.round(left) + \'px\';'],[0,' this.extentRectangle.style.height = Math.round(height) + \'px\';'],[0,' this.extentRectangle.style.width = Math.round(width) + \'px\';'],[-1,' }'],[0,' this.rectPxBounds = new OpenLayers.Bounds('],[-1,' Math.round(left), Math.round(bottom),'],[-1,' Math.round(right), Math.round(top)'],[-1,' );'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getRectBoundsFromMapBounds'],[-1,' * Get the rect bounds from the map bounds.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * lonLatBounds - {<OpenLayers.Bounds>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>}A bounds which is the passed-in map lon\/lat extent'],[-1,' * translated into pixel bounds for the overview map'],[-1,' *\/'],[-1,' getRectBoundsFromMapBounds: function(lonLatBounds) {'],[0,' var leftBottomPx = this.getOverviewPxFromLonLat({'],[-1,' lon: lonLatBounds.left,'],[-1,' lat: lonLatBounds.bottom'],[-1,' });'],[0,' var rightTopPx = this.getOverviewPxFromLonLat({'],[-1,' lon: lonLatBounds.right,'],[-1,' lat: lonLatBounds.top'],[-1,' });'],[0,' var bounds = null;'],[0,' if (leftBottomPx && rightTopPx) {'],[0,' bounds = new OpenLayers.Bounds(leftBottomPx.x, leftBottomPx.y,'],[-1,' rightTopPx.x, rightTopPx.y);'],[-1,' }'],[0,' return bounds;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getMapBoundsFromRectBounds'],[-1,' * Get the map bounds from the rect bounds.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * pxBounds - {<OpenLayers.Bounds>}'],[-1,' *'],[-1,' * Returns:'],[-1,' * {<OpenLayers.Bounds>} Bounds which is the passed-in overview rect bounds'],[-1,' * translated into lon\/lat bounds for the overview map'],[-1,' *\/'],[-1,' getMapBoundsFromRectBounds: function(pxBounds) {'],[0,' var leftBottomLonLat = this.getLonLatFromOverviewPx({'],[-1,' x: pxBounds.left,'],[-1,' y: pxBounds.bottom'],[-1,' });'],[0,' var rightTopLonLat = this.getLonLatFromOverviewPx({'],[-1,' x: pxBounds.right,'],[-1,' y: pxBounds.top'],[-1,' });'],[0,' return new OpenLayers.Bounds(leftBottomLonLat.lon, leftBottomLonLat.lat,'],[-1,' rightTopLonLat.lon, rightTopLonLat.lat);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getLonLatFromOverviewPx'],[-1,' * Get a map location from a pixel location'],[-1,' *'],[-1,' * Parameters:'],[-1,' * overviewMapPx - {<OpenLayers.Pixel>|Object} OpenLayers.Pixel or'],[-1,' * an object with a'],[-1,' * \'x\' and \'y\' properties.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} Location which is the passed-in overview map'],[-1,' * OpenLayers.Pixel, translated into lon\/lat by the overview'],[-1,' * map. An object with a \'lon\' and \'lat\' properties.'],[-1,' *\/'],[-1,' getLonLatFromOverviewPx: function(overviewMapPx) {'],[0,' var size = this.ovmap.size;'],[0,' var res = this.ovmap.getResolution();'],[0,' var center = this.ovmap.getExtent().getCenterLonLat();'],[-1,' '],[0,' var deltaX = overviewMapPx.x - (size.w \/ 2);'],[0,' var deltaY = overviewMapPx.y - (size.h \/ 2);'],[-1,''],[0,' return {'],[-1,' lon: center.lon + deltaX * res,'],[-1,' lat: center.lat - deltaY * res'],[-1,' };'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getOverviewPxFromLonLat'],[-1,' * Get a pixel location from a map location'],[-1,' *'],[-1,' * Parameters:'],[-1,' * lonlat - {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an'],[-1,' * object with a \'lon\' and \'lat\' properties.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} Location which is the passed-in OpenLayers.LonLat, '],[-1,' * translated into overview map pixels'],[-1,' *\/'],[-1,' getOverviewPxFromLonLat: function(lonlat) {'],[0,' var res = this.ovmap.getResolution();'],[0,' var extent = this.ovmap.getExtent();'],[0,' if (extent) {'],[0,' return {'],[-1,' x: Math.round(1\/res * (lonlat.lon - extent.left)),'],[-1,' y: Math.round(1\/res * (extent.top - lonlat.lat))'],[-1,' };'],[-1,' } '],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \'OpenLayers.Control.OverviewMap\''],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control\/Zoom.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Control.js'],[-1,' * @requires OpenLayers\/Events\/buttonclick.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control.Zoom'],[-1,' * The Zoom control is a pair of +\/- links for zooming in and out.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Control>'],[-1,' *\/'],[1,'OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, {'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: zoomInText'],[-1,' * {String}'],[-1,' * Text for zoom-in link. Default is \"+\".'],[-1,' *\/'],[-1,' zoomInText: \"+\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: zoomInId'],[-1,' * {String}'],[-1,' * Instead of having the control create a zoom in link, you can provide '],[-1,' * the identifier for an anchor element already added to the document.'],[-1,' * By default, an element with id \"olZoomInLink\" will be searched for'],[-1,' * and used if it exists.'],[-1,' *\/'],[-1,' zoomInId: \"olZoomInLink\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: zoomOutText'],[-1,' * {String}'],[-1,' * Text for zoom-out link. Default is \"\\u2212\".'],[-1,' *\/'],[-1,' zoomOutText: \"\\u2212\",'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: zoomOutId'],[-1,' * {String}'],[-1,' * Instead of having the control create a zoom out link, you can provide '],[-1,' * the identifier for an anchor element already added to the document.'],[-1,' * By default, an element with id \"olZoomOutLink\" will be searched for'],[-1,' * and used if it exists.'],[-1,' *\/'],[-1,' zoomOutId: \"olZoomOutLink\",'],[-1,''],[-1,' \/**'],[-1,' * Method: draw'],[-1,' *'],[-1,' * Returns:'],[-1,' * {DOMElement} A reference to the DOMElement containing the zoom links.'],[-1,' *\/'],[-1,' draw: function() {'],[0,' var div = OpenLayers.Control.prototype.draw.apply(this),'],[-1,' links = this.getOrCreateLinks(div),'],[-1,' zoomIn = links.zoomIn,'],[-1,' zoomOut = links.zoomOut,'],[-1,' eventsInstance = this.map.events;'],[-1,' '],[0,' if (zoomOut.parentNode !== div) {'],[0,' eventsInstance = this.events;'],[0,' eventsInstance.attachToElement(zoomOut.parentNode);'],[-1,' }'],[0,' eventsInstance.register(\"buttonclick\", this, this.onZoomClick);'],[-1,' '],[0,' this.zoomInLink = zoomIn;'],[0,' this.zoomOutLink = zoomOut;'],[0,' return div;'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getOrCreateLinks'],[-1,' * '],[-1,' * Parameters:'],[-1,' * el - {DOMElement}'],[-1,' *'],[-1,' * Return: '],[-1,' * {Object} Object with zoomIn and zoomOut properties referencing links.'],[-1,' *\/'],[-1,' getOrCreateLinks: function(el) {'],[0,' var zoomIn = document.getElementById(this.zoomInId),'],[-1,' zoomOut = document.getElementById(this.zoomOutId);'],[0,' if (!zoomIn) {'],[0,' zoomIn = document.createElement(\"a\");'],[0,' zoomIn.href = \"#zoomIn\";'],[0,' zoomIn.appendChild(document.createTextNode(this.zoomInText));'],[0,' zoomIn.className = \"olControlZoomIn\";'],[0,' el.appendChild(zoomIn);'],[-1,' }'],[0,' OpenLayers.Element.addClass(zoomIn, \"olButton\");'],[0,' if (!zoomOut) {'],[0,' zoomOut = document.createElement(\"a\");'],[0,' zoomOut.href = \"#zoomOut\";'],[0,' zoomOut.appendChild(document.createTextNode(this.zoomOutText));'],[0,' zoomOut.className = \"olControlZoomOut\";'],[0,' el.appendChild(zoomOut);'],[-1,' }'],[0,' OpenLayers.Element.addClass(zoomOut, \"olButton\");'],[0,' return {'],[-1,' zoomIn: zoomIn, zoomOut: zoomOut'],[-1,' };'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: onZoomClick'],[-1,' * Called when zoomin\/out link is clicked.'],[-1,' *\/'],[-1,' onZoomClick: function(evt) {'],[0,' var button = evt.buttonElement;'],[0,' if (button === this.zoomInLink) {'],[0,' this.map.zoomIn();'],[0,' } else if (button === this.zoomOutLink) {'],[0,' this.map.zoomOut();'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/** '],[-1,' * Method: destroy'],[-1,' * Clean up.'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' if (this.map) {'],[0,' this.map.events.unregister(\"buttonclick\", this, this.onZoomClick);'],[-1,' }'],[0,' delete this.zoomInLink;'],[0,' delete this.zoomOutLink;'],[0,' OpenLayers.Control.prototype.destroy.apply(this);'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Control.Zoom\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Lang\/en.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Lang.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Namespace: OpenLayers.Lang[\"en\"]'],[-1,' * Dictionary for English. Keys for entries are used in calls to'],[-1,' * <OpenLayers.Lang.translate>. Entry bodies are normal strings or'],[-1,' * strings formatted for use with <OpenLayers.String.format> calls.'],[-1,' *\/'],[1,'OpenLayers.Lang.en = {'],[-1,''],[-1,' \'unhandledRequest\': \"Unhandled request return ${statusText}\",'],[-1,''],[-1,' \'Permalink\': \"Permalink\",'],[-1,''],[-1,' \'Overlays\': \"Overlays\",'],[-1,''],[-1,' \'Base Layer\': \"Base Layer\",'],[-1,''],[-1,' \'noFID\': \"Can\'t update a feature for which there is no FID.\",'],[-1,''],[-1,' \'browserNotSupported\':'],[-1,' \"Your browser does not support vector rendering. Currently supported renderers are:\\n${renderers}\",'],[-1,''],[-1,' \/\/ console message'],[-1,' \'minZoomLevelError\':'],[-1,' \"The minZoomLevel property is only intended for use \" +'],[-1,' \"with the FixedZoomLevels-descendent layers. That this \" +'],[-1,' \"wfs layer checks for minZoomLevel is a relic of the\" +'],[-1,' \"past. We cannot, however, remove it without possibly \" +'],[-1,' \"breaking OL based applications that may depend on it.\" +'],[-1,' \" Therefore we are deprecating it -- the minZoomLevel \" +'],[-1,' \"check below will be removed at 3.0. Please instead \" +'],[-1,' \"use min\/max resolution setting as described here: \" +'],[-1,' \"http:\/\/trac.openlayers.org\/wiki\/SettingZoomLevels\",'],[-1,''],[-1,' \'commitSuccess\': \"WFS Transaction: SUCCESS ${response}\",'],[-1,''],[-1,' \'commitFailed\': \"WFS Transaction: FAILED ${response}\",'],[-1,''],[-1,' \'googleWarning\':'],[-1,' \"The Google Layer was unable to load correctly.<br><br>\" +'],[-1,' \"To get rid of this message, select a new BaseLayer \" +'],[-1,' \"in the layer switcher in the upper-right corner.<br><br>\" +'],[-1,' \"Most likely, this is because the Google Maps library \" +'],[-1,' \"script was either not included, or does not contain the \" +'],[-1,' \"correct API key for your site.<br><br>\" +'],[-1,' \"Developers: For help getting this working correctly, \" +'],[-1,' \"<a href=\'http:\/\/trac.openlayers.org\/wiki\/Google\' \" +'],[-1,' \"target=\'_blank\'>click here<\/a>\",'],[-1,''],[-1,' \'getLayerWarning\':'],[-1,' \"The ${layerType} Layer was unable to load correctly.<br><br>\" +'],[-1,' \"To get rid of this message, select a new BaseLayer \" +'],[-1,' \"in the layer switcher in the upper-right corner.<br><br>\" +'],[-1,' \"Most likely, this is because the ${layerLib} library \" +'],[-1,' \"script was not correctly included.<br><br>\" +'],[-1,' \"Developers: For help getting this working correctly, \" +'],[-1,' \"<a href=\'http:\/\/trac.openlayers.org\/wiki\/${layerLib}\' \" +'],[-1,' \"target=\'_blank\'>click here<\/a>\",'],[-1,''],[-1,' \'Scale = 1 : ${scaleDenom}\': \"Scale = 1 : ${scaleDenom}\",'],[-1,' '],[-1,' \/\/labels for the graticule control'],[-1,' \'W\': \'W\','],[-1,' \'E\': \'E\','],[-1,' \'N\': \'N\','],[-1,' \'S\': \'S\','],[-1,' \'Graticule\': \'Graticule\','],[-1,''],[-1,' \/\/ console message'],[-1,' \'reprojectDeprecated\':'],[-1,' \"You are using the \'reproject\' option \" +'],[-1,' \"on the ${layerName} layer. This option is deprecated: \" +'],[-1,' \"its use was designed to support displaying data over commercial \" + '],[-1,' \"basemaps, but that functionality should now be achieved by using \" +'],[-1,' \"Spherical Mercator support. More information is available from \" +'],[-1,' \"http:\/\/trac.openlayers.org\/wiki\/SphericalMercator.\",'],[-1,''],[-1,' \/\/ console message'],[-1,' \'methodDeprecated\':'],[-1,' \"This method has been deprecated and will be removed in 3.0. \" +'],[-1,' \"Please use ${newMethod} instead.\",'],[-1,''],[-1,' \/\/ **** end ****'],[-1,' \'end\': \'\''],[-1,' '],[-1,'};'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Handler\/Keyboard.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Handler.js'],[-1,' * @requires OpenLayers\/Events.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.handler.Keyboard'],[-1,' * A handler for keyboard events. Create a new instance with the'],[-1,' * <OpenLayers.Handler.Keyboard> constructor.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Handler> '],[-1,' *\/'],[1,'OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, {'],[-1,''],[-1,' \/* http:\/\/www.quirksmode.org\/js\/keys.html explains key x-browser'],[-1,' key handling quirks in pretty nice detail *\/'],[-1,''],[-1,' \/** '],[-1,' * Constant: KEY_EVENTS'],[-1,' * keydown, keypress, keyup'],[-1,' *\/'],[-1,' KEY_EVENTS: [\"keydown\", \"keyup\"],'],[-1,''],[-1,' \/** '],[-1,' * Property: eventListener'],[-1,' * {Function}'],[-1,' *\/'],[-1,' eventListener: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: observeElement'],[-1,' * {DOMElement|String} The DOM element on which we listen for'],[-1,' * key events. Default to the document.'],[-1,' *\/'],[-1,' observeElement: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Handler.Keyboard'],[-1,' * Returns a new keyboard handler.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * control - {<OpenLayers.Control>} The control that is making use of'],[-1,' * this handler. If a handler is being used without a control, the'],[-1,' * handlers setMap method must be overridden to deal properly with'],[-1,' * the map.'],[-1,' * callbacks - {Object} An object containing a single function to be'],[-1,' * called when the drag operation is finished. The callback should'],[-1,' * expect to receive a single argument, the pixel location of the event.'],[-1,' * Callbacks for \'keydown\', \'keypress\', and \'keyup\' are supported.'],[-1,' * options - {Object} Optional object whose properties will be set on the'],[-1,' * handler.'],[-1,' *\/'],[-1,' initialize: function(control, callbacks, options) {'],[0,' OpenLayers.Handler.prototype.initialize.apply(this, arguments);'],[-1,' \/\/ cache the bound event listener method so it can be unobserved later'],[0,' this.eventListener = OpenLayers.Function.bindAsEventListener('],[-1,' this.handleKeyEvent, this'],[-1,' );'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: destroy'],[-1,' *\/'],[-1,' destroy: function() {'],[0,' this.deactivate();'],[0,' this.eventListener = null;'],[0,' OpenLayers.Handler.prototype.destroy.apply(this, arguments);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: activate'],[-1,' *\/'],[-1,' activate: function() {'],[0,' if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) {'],[0,' this.observeElement = this.observeElement || document;'],[0,' for (var i=0, len=this.KEY_EVENTS.length; i<len; i++) {'],[0,' OpenLayers.Event.observe('],[-1,' this.observeElement, this.KEY_EVENTS[i], this.eventListener);'],[-1,' }'],[0,' return true;'],[-1,' } else {'],[0,' return false;'],[-1,' }'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: deactivate'],[-1,' *\/'],[-1,' deactivate: function() {'],[0,' var deactivated = false;'],[0,' if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {'],[0,' for (var i=0, len=this.KEY_EVENTS.length; i<len; i++) {'],[0,' OpenLayers.Event.stopObserving('],[-1,' this.observeElement, this.KEY_EVENTS[i], this.eventListener);'],[-1,' }'],[0,' deactivated = true;'],[-1,' }'],[0,' return deactivated;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: handleKeyEvent '],[-1,' *\/'],[-1,' handleKeyEvent: function (evt) {'],[0,' if (this.checkModifiers(evt)) {'],[0,' this.callback(evt.type, [evt]);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Handler.Keyboard\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Control\/KeyboardDefaults.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Control.js'],[-1,' * @requires OpenLayers\/Handler\/Keyboard.js'],[-1,' * @requires OpenLayers\/Events.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Control.KeyboardDefaults'],[-1,' * The KeyboardDefaults control adds panning and zooming functions, controlled'],[-1,' * with the keyboard. By default arrow keys pan, +\/- keys zoom & Page Up\/Page'],[-1,' * Down\/Home\/End scroll by three quarters of a page.'],[-1,' * '],[-1,' * This control has no visible appearance.'],[-1,' *'],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Control>'],[-1,' *\/'],[1,'OpenLayers.Control.KeyboardDefaults = OpenLayers.Class(OpenLayers.Control, {'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: autoActivate'],[-1,' * {Boolean} Activate the control when it is added to a map. Default is'],[-1,' * true.'],[-1,' *\/'],[-1,' autoActivate: true,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: slideFactor'],[-1,' * Pixels to slide by.'],[-1,' *\/'],[-1,' slideFactor: 75,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: observeElement'],[-1,' * {DOMelement|String} The DOM element to handle keys for. You'],[-1,' * can use the map div here, to have the navigation keys'],[-1,' * work when the map div has the focus. If undefined the'],[-1,' * document is used.'],[-1,' *\/'],[-1,' observeElement: null,'],[-1,''],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Control.KeyboardDefaults'],[-1,' *\/'],[-1,' '],[-1,' \/**'],[-1,' * Method: draw'],[-1,' * Create handler.'],[-1,' *\/'],[-1,' draw: function() {'],[0,' var observeElement = this.observeElement || document;'],[0,' this.handler = new OpenLayers.Handler.Keyboard( this,'],[-1,' {\"keydown\": this.defaultKeyPress},'],[-1,' {observeElement: observeElement}'],[-1,' );'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: defaultKeyPress'],[-1,' * When handling the key event, we only use evt.keyCode. This holds '],[-1,' * some drawbacks, though we get around them below. When interpretting'],[-1,' * the keycodes below (including the comments associated with them),'],[-1,' * consult the URL below. For instance, the Safari browser returns'],[-1,' * \"IE keycodes\", and so is supported by any keycode labeled \"IE\".'],[-1,' * '],[-1,' * Very informative URL:'],[-1,' * http:\/\/unixpapa.com\/js\/key.html'],[-1,' *'],[-1,' * Parameters:'],[-1,' * evt - {Event} '],[-1,' *\/'],[-1,' defaultKeyPress: function (evt) {'],[0,' var size, handled = true;'],[-1,''],[0,' var target = OpenLayers.Event.element(evt);'],[0,' if (target &&'],[-1,' (target.tagName == \'INPUT\' ||'],[-1,' target.tagName == \'TEXTAREA\' ||'],[-1,' target.tagName == \'SELECT\')) {'],[0,' return;'],[-1,' }'],[-1,''],[0,' switch (evt.keyCode) {'],[-1,' case OpenLayers.Event.KEY_LEFT:'],[0,' this.map.pan(-this.slideFactor, 0);'],[0,' break;'],[-1,' case OpenLayers.Event.KEY_RIGHT: '],[0,' this.map.pan(this.slideFactor, 0);'],[0,' break;'],[-1,' case OpenLayers.Event.KEY_UP:'],[0,' this.map.pan(0, -this.slideFactor);'],[0,' break;'],[-1,' case OpenLayers.Event.KEY_DOWN:'],[0,' this.map.pan(0, this.slideFactor);'],[0,' break;'],[-1,' '],[-1,' case 33: \/\/ Page Up. Same in all browsers.'],[0,' size = this.map.getSize();'],[0,' this.map.pan(0, -0.75*size.h);'],[0,' break;'],[-1,' case 34: \/\/ Page Down. Same in all browsers.'],[0,' size = this.map.getSize();'],[0,' this.map.pan(0, 0.75*size.h);'],[0,' break; '],[-1,' case 35: \/\/ End. Same in all browsers.'],[0,' size = this.map.getSize();'],[0,' this.map.pan(0.75*size.w, 0);'],[0,' break; '],[-1,' case 36: \/\/ Home. Same in all browsers.'],[0,' size = this.map.getSize();'],[0,' this.map.pan(-0.75*size.w, 0);'],[0,' break; '],[-1,''],[-1,' case 43: \/\/ +\/= (ASCII), keypad + (ASCII, Opera)'],[-1,' case 61: \/\/ +\/= (Mozilla, Opera, some ASCII)'],[-1,' case 187: \/\/ +\/= (IE)'],[-1,' case 107: \/\/ keypad + (IE, Mozilla)'],[0,' this.map.zoomIn();'],[0,' break; '],[-1,' case 45: \/\/ -\/_ (ASCII, Opera), keypad - (ASCII, Opera)'],[-1,' case 109: \/\/ -\/_ (Mozilla), keypad - (Mozilla, IE)'],[-1,' case 189: \/\/ -\/_ (IE)'],[-1,' case 95: \/\/ -\/_ (some ASCII)'],[0,' this.map.zoomOut();'],[0,' break; '],[-1,' default:'],[0,' handled = false;'],[-1,' }'],[0,' if (handled) {'],[-1,' \/\/ prevent browser default not to move the page'],[-1,' \/\/ when moving the page with the keyboard'],[0,' OpenLayers.Event.stop(evt);'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Control.KeyboardDefaults\"'],[-1,'});'],[-1,'\/* ======================================================================'],[-1,' OpenLayers\/Layer\/WMTS.js'],[-1,' ====================================================================== *\/'],[-1,''],[-1,'\/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for'],[-1,' * full list of contributors). Published under the 2-clause BSD license.'],[-1,' * See license.txt in the OpenLayers distribution or repository for the'],[-1,' * full text of the license. *\/'],[-1,''],[-1,'\/**'],[-1,' * @requires OpenLayers\/Layer\/Grid.js'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Class: OpenLayers.Layer.WMTS'],[-1,' * Instances of the WMTS class allow viewing of tiles from a service that '],[-1,' * implements the OGC WMTS specification version 1.0.0.'],[-1,' * '],[-1,' * Inherits from:'],[-1,' * - <OpenLayers.Layer.Grid>'],[-1,' *\/'],[1,'OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, {'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: isBaseLayer'],[-1,' * {Boolean} The layer will be considered a base layer. Default is true.'],[-1,' *\/'],[-1,' isBaseLayer: true,'],[-1,''],[-1,' \/**'],[-1,' * Property: version'],[-1,' * {String} WMTS version. Default is \"1.0.0\".'],[-1,' *\/'],[-1,' version: \"1.0.0\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: requestEncoding'],[-1,' * {String} Request encoding. Can be \"REST\" or \"KVP\". Default is \"KVP\".'],[-1,' *\/'],[-1,' requestEncoding: \"KVP\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: url'],[-1,' * {String|Array(String)} The base URL or request URL template for the WMTS'],[-1,' * service. Must be provided. Array is only supported for base URLs, not'],[-1,' * for request URL templates. URL templates are only supported for'],[-1,' * REST <requestEncoding>.'],[-1,' *\/'],[-1,' url: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: layer'],[-1,' * {String} The layer identifier advertised by the WMTS service. Must be '],[-1,' * provided.'],[-1,' *\/'],[-1,' layer: null,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: matrixSet'],[-1,' * {String} One of the advertised matrix set identifiers. Must be provided.'],[-1,' *\/'],[-1,' matrixSet: null,'],[-1,''],[-1,' \/** '],[-1,' * APIProperty: style'],[-1,' * {String} One of the advertised layer styles. Must be provided.'],[-1,' *\/'],[-1,' style: null,'],[-1,' '],[-1,' \/** '],[-1,' * APIProperty: format'],[-1,' * {String} The image MIME type. Default is \"image\/jpeg\".'],[-1,' *\/'],[-1,' format: \"image\/jpeg\",'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: tileOrigin'],[-1,' * {<OpenLayers.LonLat>} The top-left corner of the tile matrix in map '],[-1,' * units. If the tile origin for each matrix in a set is different,'],[-1,' * the <matrixIds> should include a topLeftCorner property. If'],[-1,' * not provided, the tile origin will default to the top left corner'],[-1,' * of the layer <maxExtent>.'],[-1,' *\/'],[-1,' tileOrigin: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: tileFullExtent'],[-1,' * {<OpenLayers.Bounds>} The full extent of the tile set. If not supplied,'],[-1,' * the layer\'s <maxExtent> property will be used.'],[-1,' *\/'],[-1,' tileFullExtent: null,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: formatSuffix'],[-1,' * {String} For REST request encoding, an image format suffix must be '],[-1,' * included in the request. If not provided, the suffix will be derived'],[-1,' * from the <format> property.'],[-1,' *\/'],[-1,' formatSuffix: null, '],[-1,''],[-1,' \/**'],[-1,' * APIProperty: matrixIds'],[-1,' * {Array} A list of tile matrix identifiers. If not provided, the matrix'],[-1,' * identifiers will be assumed to be integers corresponding to the '],[-1,' * map zoom level. If a list of strings is provided, each item should'],[-1,' * be the matrix identifier that corresponds to the map zoom level.'],[-1,' * Additionally, a list of objects can be provided. Each object should'],[-1,' * describe the matrix as presented in the WMTS capabilities. These'],[-1,' * objects should have the properties shown below.'],[-1,' * '],[-1,' * Matrix properties:'],[-1,' * identifier - {String} The matrix identifier (required).'],[-1,' * scaleDenominator - {Number} The matrix scale denominator.'],[-1,' * topLeftCorner - {<OpenLayers.LonLat>} The top left corner of the '],[-1,' * matrix. Must be provided if different than the layer <tileOrigin>.'],[-1,' * tileWidth - {Number} The tile width for the matrix. Must be provided '],[-1,' * if different than the width given in the layer <tileSize>.'],[-1,' * tileHeight - {Number} The tile height for the matrix. Must be provided '],[-1,' * if different than the height given in the layer <tileSize>.'],[-1,' *\/'],[-1,' matrixIds: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: dimensions'],[-1,' * {Array} For RESTful request encoding, extra dimensions may be specified.'],[-1,' * Items in this list should be property names in the <params> object.'],[-1,' * Values of extra dimensions will be determined from the corresponding'],[-1,' * values in the <params> object.'],[-1,' *\/'],[-1,' dimensions: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: params'],[-1,' * {Object} Extra parameters to include in tile requests. For KVP '],[-1,' * <requestEncoding>, these properties will be encoded in the request '],[-1,' * query string. For REST <requestEncoding>, these properties will'],[-1,' * become part of the request path, with order determined by the '],[-1,' * <dimensions> list.'],[-1,' *\/'],[-1,' params: null,'],[-1,' '],[-1,' \/**'],[-1,' * APIProperty: zoomOffset'],[-1,' * {Number} If your cache has more levels than you want to provide'],[-1,' * access to with this layer, supply a zoomOffset. This zoom offset'],[-1,' * is added to the current map zoom level to determine the level'],[-1,' * for a requested tile. For example, if you supply a zoomOffset'],[-1,' * of 3, when the map is at the zoom 0, tiles will be requested from'],[-1,' * level 3 of your cache. Default is 0 (assumes cache level and map'],[-1,' * zoom are equivalent). Additionally, if this layer is to be used'],[-1,' * as an overlay and the cache has fewer zoom levels than the base'],[-1,' * layer, you can supply a negative zoomOffset. For example, if a'],[-1,' * map zoom level of 1 corresponds to your cache level zero, you would'],[-1,' * supply a -1 zoomOffset (and set the maxResolution of the layer'],[-1,' * appropriately). The zoomOffset value has no effect if complete'],[-1,' * matrix definitions (including scaleDenominator) are supplied in'],[-1,' * the <matrixIds> property. Defaults to 0 (no zoom offset).'],[-1,' *\/'],[-1,' zoomOffset: 0,'],[-1,''],[-1,' \/**'],[-1,' * APIProperty: serverResolutions'],[-1,' * {Array} A list of all resolutions available on the server. Only set this'],[-1,' * property if the map resolutions differ from the server. This'],[-1,' * property serves two purposes. (a) <serverResolutions> can include'],[-1,' * resolutions that the server supports and that you don\'t want to'],[-1,' * provide with this layer; you can also look at <zoomOffset>, which is'],[-1,' * an alternative to <serverResolutions> for that specific purpose.'],[-1,' * (b) The map can work with resolutions that aren\'t supported by'],[-1,' * the server, i.e. that aren\'t in <serverResolutions>. When the'],[-1,' * map is displayed in such a resolution data for the closest'],[-1,' * server-supported resolution is loaded and the layer div is'],[-1,' * stretched as necessary.'],[-1,' *\/'],[-1,' serverResolutions: null,'],[-1,''],[-1,' \/**'],[-1,' * Property: formatSuffixMap'],[-1,' * {Object} a map between WMTS \'format\' request parameter and tile image file suffix'],[-1,' *\/'],[-1,' formatSuffixMap: {'],[-1,' \"image\/png\": \"png\",'],[-1,' \"image\/png8\": \"png\",'],[-1,' \"image\/png24\": \"png\",'],[-1,' \"image\/png32\": \"png\",'],[-1,' \"png\": \"png\",'],[-1,' \"image\/jpeg\": \"jpg\",'],[-1,' \"image\/jpg\": \"jpg\",'],[-1,' \"jpeg\": \"jpg\",'],[-1,' \"jpg\": \"jpg\"'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Property: matrix'],[-1,' * {Object} Matrix definition for the current map resolution. Updated by'],[-1,' * the <updateMatrixProperties> method.'],[-1,' *\/'],[-1,' matrix: null,'],[-1,' '],[-1,' \/**'],[-1,' * Constructor: OpenLayers.Layer.WMTS'],[-1,' * Create a new WMTS layer.'],[-1,' *'],[-1,' * Example:'],[-1,' * (code)'],[-1,' * var wmts = new OpenLayers.Layer.WMTS({'],[-1,' * name: \"My WMTS Layer\",'],[-1,' * url: \"http:\/\/example.com\/wmts\", '],[-1,' * layer: \"layer_id\",'],[-1,' * style: \"default\",'],[-1,' * matrixSet: \"matrix_id\"'],[-1,' * });'],[-1,' * (end)'],[-1,' *'],[-1,' * Parameters:'],[-1,' * config - {Object} Configuration properties for the layer.'],[-1,' *'],[-1,' * Required configuration properties:'],[-1,' * url - {String} The base url for the service. See the <url> property.'],[-1,' * layer - {String} The layer identifier. See the <layer> property.'],[-1,' * style - {String} The layer style identifier. See the <style> property.'],[-1,' * matrixSet - {String} The tile matrix set identifier. See the <matrixSet>'],[-1,' * property.'],[-1,' *'],[-1,' * Any other documented layer properties can be provided in the config object.'],[-1,' *\/'],[-1,' initialize: function(config) {'],[-1,''],[-1,' \/\/ confirm required properties are supplied'],[0,' var required = {'],[-1,' url: true,'],[-1,' layer: true,'],[-1,' style: true,'],[-1,' matrixSet: true'],[-1,' };'],[0,' for (var prop in required) {'],[0,' if (!(prop in config)) {'],[0,' throw new Error(\"Missing property \'\" + prop + \"\' in layer configuration.\");'],[-1,' }'],[-1,' }'],[-1,''],[0,' config.params = OpenLayers.Util.upperCaseObject(config.params);'],[0,' var args = [config.name, config.url, config.params, config];'],[0,' OpenLayers.Layer.Grid.prototype.initialize.apply(this, args);'],[-1,' '],[-1,''],[-1,' \/\/ determine format suffix (for REST)'],[0,' if (!this.formatSuffix) {'],[0,' this.formatSuffix = this.formatSuffixMap[this.format] || this.format.split(\"\/\").pop(); '],[-1,' }'],[-1,''],[-1,' \/\/ expand matrixIds (may be array of string or array of object)'],[0,' if (this.matrixIds) {'],[0,' var len = this.matrixIds.length;'],[0,' if (len && typeof this.matrixIds[0] === \"string\") {'],[0,' var ids = this.matrixIds;'],[0,' this.matrixIds = new Array(len);'],[0,' for (var i=0; i<len; ++i) {'],[0,' this.matrixIds[i] = {identifier: ids[i]};'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: setMap'],[-1,' *\/'],[-1,' setMap: function() {'],[0,' OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: updateMatrixProperties'],[-1,' * Called when map resolution changes to update matrix related properties.'],[-1,' *\/'],[-1,' updateMatrixProperties: function() {'],[0,' this.matrix = this.getMatrix();'],[0,' if (this.matrix) {'],[0,' if (this.matrix.topLeftCorner) {'],[0,' this.tileOrigin = this.matrix.topLeftCorner;'],[-1,' }'],[0,' if (this.matrix.tileWidth && this.matrix.tileHeight) {'],[0,' this.tileSize = new OpenLayers.Size('],[-1,' this.matrix.tileWidth, this.matrix.tileHeight'],[-1,' );'],[-1,' }'],[0,' if (!this.tileOrigin) { '],[0,' this.tileOrigin = new OpenLayers.LonLat('],[-1,' this.maxExtent.left, this.maxExtent.top'],[-1,' );'],[-1,' } '],[0,' if (!this.tileFullExtent) { '],[0,' this.tileFullExtent = this.maxExtent;'],[-1,' }'],[-1,' }'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: moveTo'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to'],[-1,' * do some init work in that case.'],[-1,' * dragging - {Boolean}'],[-1,' *\/'],[-1,' moveTo:function(bounds, zoomChanged, dragging) {'],[0,' if (zoomChanged || !this.matrix) {'],[0,' this.updateMatrixProperties();'],[-1,' }'],[0,' return OpenLayers.Layer.Grid.prototype.moveTo.apply(this, arguments);'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * APIMethod: clone'],[-1,' * '],[-1,' * Parameters:'],[-1,' * obj - {Object}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {<OpenLayers.Layer.WMTS>} An exact clone of this <OpenLayers.Layer.WMTS>'],[-1,' *\/'],[-1,' clone: function(obj) {'],[0,' if (obj == null) {'],[0,' obj = new OpenLayers.Layer.WMTS(this.options);'],[-1,' }'],[-1,' \/\/get all additions from superclasses'],[0,' obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]);'],[-1,' \/\/ copy\/set any non-init, non-simple values here'],[0,' return obj;'],[-1,' },'],[-1,''],[-1,' \/**'],[-1,' * Method: getIdentifier'],[-1,' * Get the current index in the matrixIds array.'],[-1,' *\/'],[-1,' getIdentifier: function() {'],[0,' return this.getServerZoom();'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getMatrix'],[-1,' * Get the appropriate matrix definition for the current map resolution.'],[-1,' *\/'],[-1,' getMatrix: function() {'],[0,' var matrix;'],[0,' if (!this.matrixIds || this.matrixIds.length === 0) {'],[0,' matrix = {identifier: this.getIdentifier()};'],[-1,' } else {'],[-1,' \/\/ get appropriate matrix given the map scale if possible'],[0,' if (\"scaleDenominator\" in this.matrixIds[0]) {'],[-1,' \/\/ scale denominator calculation based on WMTS spec'],[0,' var denom = '],[-1,' OpenLayers.METERS_PER_INCH * '],[-1,' OpenLayers.INCHES_PER_UNIT[this.units] * '],[-1,' this.getServerResolution() \/ 0.28E-3;'],[0,' var diff = Number.POSITIVE_INFINITY;'],[0,' var delta;'],[0,' for (var i=0, ii=this.matrixIds.length; i<ii; ++i) {'],[0,' delta = Math.abs(1 - (this.matrixIds[i].scaleDenominator \/ denom));'],[0,' if (delta < diff) {'],[0,' diff = delta;'],[0,' matrix = this.matrixIds[i];'],[-1,' }'],[-1,' }'],[-1,' } else {'],[-1,' \/\/ fall back on zoom as index'],[0,' matrix = this.matrixIds[this.getIdentifier()];'],[-1,' }'],[-1,' }'],[0,' return matrix;'],[-1,' },'],[-1,' '],[-1,' \/** '],[-1,' * Method: getTileInfo'],[-1,' * Get tile information for a given location at the current map resolution.'],[-1,' *'],[-1,' * Parameters:'],[-1,' * loc - {<OpenLayers.LonLat} A location in map coordinates.'],[-1,' *'],[-1,' * Returns:'],[-1,' * {Object} An object with \"col\", \"row\", \"i\", and \"j\" properties. The col'],[-1,' * and row values are zero based tile indexes from the top left. The'],[-1,' * i and j values are the number of pixels to the left and top '],[-1,' * (respectively) of the given location within the target tile.'],[-1,' *\/'],[-1,' getTileInfo: function(loc) {'],[0,' var res = this.getServerResolution();'],[-1,' '],[0,' var fx = (loc.lon - this.tileOrigin.lon) \/ (res * this.tileSize.w);'],[0,' var fy = (this.tileOrigin.lat - loc.lat) \/ (res * this.tileSize.h);'],[-1,''],[0,' var col = Math.floor(fx);'],[0,' var row = Math.floor(fy);'],[-1,' '],[0,' return {'],[-1,' col: col, '],[-1,' row: row,'],[-1,' i: Math.floor((fx - col) * this.tileSize.w),'],[-1,' j: Math.floor((fy - row) * this.tileSize.h)'],[-1,' };'],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * Method: getURL'],[-1,' * '],[-1,' * Parameters:'],[-1,' * bounds - {<OpenLayers.Bounds>}'],[-1,' * '],[-1,' * Returns:'],[-1,' * {String} A URL for the tile corresponding to the given bounds.'],[-1,' *\/'],[-1,' getURL: function(bounds) {'],[0,' bounds = this.adjustBounds(bounds);'],[0,' var url = \"\";'],[0,' if (!this.tileFullExtent || this.tileFullExtent.intersectsBounds(bounds)) { '],[-1,''],[0,' var center = bounds.getCenterLonLat(); '],[0,' var info = this.getTileInfo(center);'],[0,' var matrixId = this.matrix.identifier;'],[0,' var dimensions = this.dimensions, params;'],[-1,''],[0,' if (OpenLayers.Util.isArray(this.url)) {'],[0,' url = this.selectUrl(['],[-1,' this.version, this.style, this.matrixSet,'],[-1,' this.matrix.identifier, info.row, info.col'],[-1,' ].join(\",\"), this.url);'],[-1,' } else {'],[0,' url = this.url;'],[-1,' }'],[-1,''],[0,' if (this.requestEncoding.toUpperCase() === \"REST\") {'],[0,' params = this.params;'],[0,' if (url.indexOf(\"{\") !== -1) {'],[0,' var template = url.replace(\/\\{\/g, \"${\");'],[0,' var context = {'],[-1,' \/\/ spec does not make clear if capital S or not'],[-1,' style: this.style, Style: this.style,'],[-1,' TileMatrixSet: this.matrixSet,'],[-1,' TileMatrix: this.matrix.identifier,'],[-1,' TileRow: info.row,'],[-1,' TileCol: info.col'],[-1,' };'],[0,' if (dimensions) {'],[0,' var dimension, i;'],[0,' for (i=dimensions.length-1; i>=0; --i) {'],[0,' dimension = dimensions[i];'],[0,' context[dimension] = params[dimension.toUpperCase()];'],[-1,' }'],[-1,' }'],[0,' url = OpenLayers.String.format(template, context);'],[-1,' } else {'],[-1,' \/\/ include \'version\', \'layer\' and \'style\' in tile resource url'],[0,' var path = this.version + \"\/\" + this.layer + \"\/\" + this.style + \"\/\";'],[-1,''],[-1,' \/\/ append optional dimension path elements'],[0,' if (dimensions) {'],[0,' for (var i=0; i<dimensions.length; i++) {'],[0,' if (params[dimensions[i]]) {'],[0,' path = path + params[dimensions[i]] + \"\/\";'],[-1,' }'],[-1,' }'],[-1,' }'],[-1,''],[-1,' \/\/ append other required path elements'],[0,' path = path + this.matrixSet + \"\/\" + this.matrix.identifier + '],[-1,' \"\/\" + info.row + \"\/\" + info.col + \".\" + this.formatSuffix;'],[-1,''],[0,' if (!url.match(\/\\\/$\/)) {'],[0,' url = url + \"\/\";'],[-1,' }'],[0,' url = url + path;'],[-1,' }'],[0,' } else if (this.requestEncoding.toUpperCase() === \"KVP\") {'],[-1,''],[-1,' \/\/ assemble all required parameters'],[0,' params = {'],[-1,' SERVICE: \"WMTS\",'],[-1,' REQUEST: \"GetTile\",'],[-1,' VERSION: this.version,'],[-1,' LAYER: this.layer,'],[-1,' STYLE: this.style,'],[-1,' TILEMATRIXSET: this.matrixSet,'],[-1,' TILEMATRIX: this.matrix.identifier,'],[-1,' TILEROW: info.row,'],[-1,' TILECOL: info.col,'],[-1,' FORMAT: this.format'],[-1,' };'],[0,' url = OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this, [params]);'],[-1,''],[-1,' }'],[-1,' }'],[0,' return url; '],[-1,' },'],[-1,' '],[-1,' \/**'],[-1,' * APIMethod: mergeNewParams'],[-1,' * Extend the existing layer <params> with new properties. Tiles will be'],[-1,' * reloaded with updated params in the request.'],[-1,' * '],[-1,' * Parameters:'],[-1,' * newParams - {Object} Properties to extend to existing <params>.'],[-1,' *\/'],[-1,' mergeNewParams: function(newParams) {'],[0,' if (this.requestEncoding.toUpperCase() === \"KVP\") {'],[0,' return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply('],[-1,' this, [OpenLayers.Util.upperCaseObject(newParams)]'],[-1,' );'],[-1,' }'],[-1,' },'],[-1,''],[-1,' CLASS_NAME: \"OpenLayers.Layer.WMTS\"'],[-1,'});']] |
||||
src/Viewer.js | 161 | 27 | 16 % |
|
[[-1,'\/*'],[-1,' * Copyright (c) 2012-2014, Dienst Landelijk Gebied - Ministerie van Economische Zaken'],[-1,' * '],[-1,' * Gepubliceerd onder de BSD 2-clause licentie, '],[-1,' * zie https:\/\/github.com\/MinELenI\/CBSviewer\/blob\/master\/LICENSE.md voor de volledige licentie. '],[-1,' *\/'],[-1,'\/**'],[-1,' * Viewer.'],[-1,' * '],[-1,' * @author mprins'],[-1,' * @return {Viewer} Viewer object'],[-1,' * @class Viewer, de viewer component.'],[-1,' *\/'],[1,'var Viewer = function() {'],[-1,'\t\/**'],[-1,'\t * Map object, initially null.'],[-1,'\t * '],[-1,'\t * @private'],[-1,'\t * @type {OpenLayers.Map}'],[-1,'\t *\/'],[1,'\tvar _map = null;'],[-1,''],[-1,'\t\/**'],[-1,'\t * Toggle vlag voor fullsize functie.'],[-1,'\t * '],[-1,'\t * @type {Boolean}'],[-1,'\t * @private'],[-1,'\t *\/'],[1,'\tvar _fullSize = false;'],[-1,'\t\/**'],[-1,'\t * Window resize timout flag.'],[-1,'\t * '],[-1,'\t * @type {Boolean}'],[-1,'\t * @private'],[-1,'\t *\/'],[1,'\tvar _resizeTimeOut = false;'],[-1,''],[-1,'\t\/**'],[-1,'\t * Opacity van de voorgrond (WMS) laag.'],[-1,'\t * '],[-1,'\t * @type {Number}'],[-1,'\t * @private'],[-1,'\t *\/'],[1,'\tvar _opacity = 0.8;'],[-1,''],[-1,'\t\/**'],[-1,'\t * update het informatie element met feature info.'],[-1,'\t * '],[-1,'\t * @param {OpenLayers.Event}'],[-1,'\t * evt Het featureinfo event'],[-1,'\t * @private'],[-1,'\t *\/'],[1,'\tfunction _showInfo(evt) {'],[0,'\t\tif (evt.text !== undefined) {'],[0,'\t\t\tjQuery(\'#\' + config.featureInfoDiv).html(evt.text);'],[0,'\t\t\tjQuery(\'#\' + config.featureInfoDiv).change();'],[-1,'\t\t}'],[-1,'\t}'],[-1,''],[-1,'\t\/**'],[-1,'\t * zorgt voor correct afhandelen van viewport resize.'],[-1,'\t * '],[-1,'\t * @private'],[-1,'\t *\/'],[1,'\tfunction _resize() {'],[0,'\t\tif (_fullSize) {'],[0,'\t\t\tvar borderW = parseInt(jQuery(\'#\' + this.config.mapDiv).css(\'borderLeftWidth\'), 10)'],[-1,'\t\t\t\t\t+ parseInt(jQuery(\'#\' + this.config.mapDiv).css(\'borderRightWidth\'), 10);'],[0,'\t\t\tvar borderH = parseInt(jQuery(\'#\' + this.config.mapDiv).css(\'borderTopWidth\'), 10)'],[-1,'\t\t\t\t\t+ parseInt(jQuery(\'#\' + this.config.mapDiv).css(\'borderBottomWidth\'), 10);'],[-1,'\t\t\t\/\/ inhoud padding set in css'],[0,'\t\t\tvar headerH = parseInt(jQuery(\'#\' + this.config.mapDiv).parent().parent().css(\'padding-top\'), 10);'],[0,'\t\t\tvar footerH = parseInt(jQuery(\'#\' + this.config.mapDiv).parent().parent().css(\'padding-bottom\'), 10);'],[-1,''],[0,'\t\t\tvar w = jQuery(\'#\' + this.config.mapDiv).parent().width() - borderW;'],[0,'\t\t\tvar h = jQuery(window).height() - headerH - footerH - borderH;'],[-1,''],[0,'\t\t\tjQuery(\'#\' + this.config.mapDiv).width(w).height(h);'],[-1,'\t\t\t\/\/ TODO compute height and remove from here'],[0,'\t\t\tjQuery(\'#legenda\').css(\'max-height\', jQuery(window).height() - 500);'],[-1,''],[0,'\t\t\t_map.updateSize();'],[0,'\t\t\tvar vectors = _map.getLayersByClass(\"OpenLayers.Layer.Vector\");'],[0,'\t\t\tif (vectors.length > 0) {'],[-1,'\t\t\t\t\/\/ in dit geval is er een kaartlaag met een featureinfo lokatie'],[-1,'\t\t\t\t\/\/ verschuif naar die lokatie'],[0,'\t\t\t\tvar bounds = vectors[0].getDataExtent();'],[0,'\t\t\t\t_map.panTo(bounds.getCenterLonLat());'],[-1,'\t\t\t}'],[-1,'\t\t}'],[-1,'\t}'],[-1,''],[-1,'\t\/**'],[-1,'\t * Stelt de doorzichtigheid van de voorgrond kaart in.'],[-1,'\t * '],[-1,'\t * @param alpha'],[-1,'\t * float waarde tussen 0 1n 1'],[-1,'\t * @private'],[-1,'\t *\/'],[1,'\tfunction _setOpacity(alpha) {'],[0,'\t\talpha = parseFloat(alpha);'],[0,'\t\tif (0.09 < alpha && alpha < 0.91) {'],[0,'\t\t\t_opacity = alpha;'],[0,'\t\t\tvar lyrs = _map.getLayersByClass(\'OpenLayers.Layer.WMS\');'],[0,'\t\t\tfor (var lyr = 0; lyr < lyrs.length; lyr++) {'],[0,'\t\t\t\tif (!lyrs[lyr].isBaseLayer) {'],[0,'\t\t\t\t\tlyrs[lyr].setOpacity(_opacity);'],[-1,'\t\t\t\t}'],[-1,'\t\t\t}'],[-1,'\t\t}'],[-1,'\t}'],[-1,''],[-1,'\t\/**'],[-1,'\t * event handler voor na de zoomTo functie van deze viewer.'],[-1,'\t * '],[-1,'\t * @param lonlat'],[-1,'\t * {OpenLayers.LonLat} de zoomlokatie'],[-1,'\t * '],[-1,'\t * @private'],[-1,'\t *\/'],[1,'\tfunction _afterZoomTo(lonlat) {'],[0,'\t\t_map.getControlsByClass(\'ClickDrawControl\')[0].trigger({'],[-1,'\t\t\txy : _map.getPixelFromLonLat(lonlat)'],[-1,'\t\t});'],[-1,''],[0,'\t\t_map.getControlsByClass(\'WMSGetFeatureInfo\')[0].deactivate();'],[0,'\t\t_map.getControlsByClass(\'WMSGetFeatureInfo\')[0].activate();'],[0,'\t\t_map.events.triggerEvent(\'click\', {'],[-1,'\t\t\txy : _map.getPixelFromLonLat(lonlat)'],[-1,'\t\t});'],[-1,''],[0,'\t\t_map.events.unregister(\'zoomend\', _map, _afterZoomTo);'],[-1,'\t}'],[-1,''],[-1,'\t\/**'],[-1,'\t * Update position cookies.'],[-1,'\t * '],[-1,'\t * @private'],[-1,'\t *\/'],[1,'\tfunction _updateCookies() {'],[0,'\t\tvar _ext = _map.getExtent();'],[0,'\t\tsetCookie(COOKIE.X, Math.floor(_ext.getCenterLonLat().lon));'],[0,'\t\tsetCookie(COOKIE.Y, Math.floor(_ext.getCenterLonLat().lat));'],[0,'\t\tsetCookie(COOKIE.S, Math.floor(_ext.getWidth()));'],[-1,'\t}'],[-1,''],[-1,'\t\/**'],[-1,'\t * Publieke interface van deze klasse.'],[-1,'\t * '],[-1,'\t * @return {Viewer} publieke methodes'],[-1,'\t *\/'],[1,'\treturn {'],[-1,'\t\t\/**'],[-1,'\t\t * Constructor, attach to the DOM.'],[-1,'\t\t * '],[-1,'\t\t * @param {object}'],[-1,'\t\t * config Configratie object'],[-1,'\t\t * @constructor'],[-1,'\t\t *\/'],[-1,'\t\tinit : function(config) {'],[11,'\t\t\tthis.config = config;'],[11,'\t\t\tOpenLayers.ImgPath = config.imgPath;'],[11,'\t\t\tOpenLayers.IMAGE_RELOAD_ATTEMPTS = 2;'],[11,'\t\t\tOpenLayers.Number.decimalSeparator = \",\";'],[-1,''],[-1,'\t\t\t\/\/ merge any controls met default'],[11,'\t\t\tjQuery.extend(true, this.config, {'],[-1,'\t\t\t\tmap : {'],[-1,'\t\t\t\t\tcontrols : [],'],[-1,'\t\t\t\t\ttheme : null'],[-1,'\t\t\t\t}'],[-1,'\t\t\t});'],[11,'\t\t\tjQuery(window).unload(function() {'],[0,'\t\t\t\tViewer.destroy();'],[-1,'\t\t\t});'],[-1,''],[11,'\t\t\tjQuery(\'#\' + this.config.mapDiv).width(this.config.map.width).height(this.config.map.height);'],[-1,''],[0,'\t\t\t_map = new OpenLayers.Map(this.config.mapDiv, this.config.map);'],[0,'\t\t\tthis.addBaseMap();'],[0,'\t\t\tthis.addControls();'],[0,'\t\t\t_map.zoomTo(this.config.map.initialZoom);'],[-1,''],[0,'\t\t\t_map.events.register(\'moveend\', _map, _updateCookies);'],[-1,''],[-1,'\t\t\t\/\/ toggle knop voor omschakelen basemap'],[0,'\t\t\tvar aToggle = \'<a class=\"lufo hasTooltip\" href=\"#\" id=\"toggleBaseMap\" onclick=\"Viewer.toggleBaseMap();\">\''],[-1,'\t\t\t\t\t+ \'<span role=\"tooltip\">\' + OpenLayers.i18n(\'KEY_TOGGLE_BASEMAP_TITLE\') + \'<\/span>\';'],[0,'\t\t\taToggle += _map.baseLayer.name === \'topografie\' ? OpenLayers.i18n(\'KEY_TOGGLE_BASEMAP_LUFO\') : OpenLayers'],[-1,'\t\t\t\t\t.i18n(\'KEY_TOGGLE_BASEMAP_TOPO\');'],[0,'\t\t\taToggle += \'<\/a>\';'],[0,'\t\t\tjQuery(\'#\' + config.mapDiv).prepend(aToggle);'],[-1,''],[0,'\t\t\tif (this.config.toggleSize) {'],[-1,'\t\t\t\t\/\/ toggle knop voor vergroten\/verkleinen van de kaart'],[0,'\t\t\t\tvar aToggleMapSize = \'<a class=\"max hasTooltip\" href=\"#\" id=\"toggleSize\" onclick=\"Viewer.toggleFullSize();\">\''],[-1,'\t\t\t\t\t\t+ \'<span role=\"tooltip\">\' + OpenLayers.i18n(\'KEY_TOGGLE_SIZE\') + \'<\/span><\/a>\';'],[0,'\t\t\t\tjQuery(\'#\' + config.mapDiv).prepend(aToggleMapSize);'],[-1,'\t\t\t}'],[0,'\t\t\tif (this.config.fullSize) {'],[0,'\t\t\t\tthis.toggleFullSize();'],[-1,'\t\t\t}'],[0,'\t\t\tjQuery(window).resize(function() {'],[-1,'\t\t\t\t\/\/ aanhaken bij window resize'],[0,'\t\t\t\tif (_resizeTimeOut) {'],[0,'\t\t\t\t\tclearTimeout(_resizeTimeOut);'],[-1,'\t\t\t\t}'],[0,'\t\t\t\t_resizeTimeOut = setTimeout(_resize, 200 \/* milliseconds *\/);'],[-1,'\t\t\t});'],[-1,''],[0,'\t\t\tif (this.config.fgAlphaSlider) {'],[0,'\t\t\t\tvar aSlider = jQuery(\'<div id=\"transparantie\" class=\"transparantieslider\"><\/div>\').prependTo('],[-1,'\t\t\t\t\t\tjQuery(\'#\' + config.mapDiv)).slider({'],[-1,'\t\t\t\t\tvalue : _opacity * 100,'],[-1,'\t\t\t\t\trange : \'min\','],[-1,'\t\t\t\t\tmin : 10,'],[-1,'\t\t\t\t\tmax : 90,'],[-1,'\t\t\t\t\tstep : 10,'],[-1,'\t\t\t\t\tanimate : \'slow\','],[-1,'\t\t\t\t\tslide : function(event, ui) {'],[0,'\t\t\t\t\t\t_setOpacity(ui.value \/ 100);'],[0,'\t\t\t\t\t\tjQuery(this).find(\'a:first\').text(ui.value);'],[0,'\t\t\t\t\t\tjQuery(this).find(\'a:first\').append(\'<span>\' + OpenLayers.i18n(\'KEY_TRANSP_SLIDER_LABEL\', {'],[-1,'\t\t\t\t\t\t\t\'0\' : (100 - ui.value)'],[-1,'\t\t\t\t\t\t}) + \'<\/span>\');'],[0,'\t\t\t\t\t\tjQuery(this).find(\'a:first\').addClass(\'hasTooltip\');'],[-1,'\t\t\t\t\t}'],[-1,'\t\t\t\t});'],[-1,'\t\t\t\t\/\/ instellen initiele waarde voor slider GUI'],[0,'\t\t\t\tjQuery(\'#transparantie\').find(\'a:first\').addClass(\'hasTooltip\');'],[0,'\t\t\t\tjQuery(\'#transparantie\').find(\'a:first\').text((_opacity * 100));'],[0,'\t\t\t\tjQuery(\'#transparantie\').find(\'a:first\').append('],[-1,'\t\t\t\t\t\t\'<span role=\"tooltip\">\' + OpenLayers.i18n(\'KEY_TRANSP_SLIDER_LABEL\', {'],[-1,'\t\t\t\t\t\t\t\'0\' : (100 - (_opacity * 100))'],[-1,'\t\t\t\t\t\t}) + \'<\/span>\');'],[-1,'\t\t\t}'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * Accessor voor de kaart.'],[-1,'\t\t * '],[-1,'\t\t * @return {OpenLayers.Map} object van deze Viewer of null als het'],[-1,'\t\t * object niet is geinitialiseerd'],[-1,'\t\t * @deprecated probeer deze niet te gebruiken'],[-1,'\t\t *\/'],[-1,'\t\tgetMap : function() {'],[4,'\t\t\t(window.console && console.warn(\'Deprecated method called: Viewer::getMap().\'));'],[4,'\t\t\treturn _map;'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * verplaats en zoom de kaart naar de gevraagde locatie.'],[-1,'\t\t * '],[-1,'\t\t * @param {number}'],[-1,'\t\t * x de x coordinaat'],[-1,'\t\t * @param {number}'],[-1,'\t\t * y de y coordinaat'],[-1,'\t\t * @param {number}'],[-1,'\t\t * radius straal van het gebied'],[-1,'\t\t * @param {boolean}'],[-1,'\t\t * withFeatureInfo voert een featureInfo request uit na'],[-1,'\t\t * uitvoeren van de zoom en pan actie.'],[-1,'\t\t *\/'],[-1,'\t\tzoomTo : function(x, y, radius, withFeatureInfo) {'],[0,'\t\t\tvar b = new OpenLayers.Bounds(x - radius, y - radius, x + radius, y + radius);'],[0,'\t\t\t_map.zoomToExtent(b, true);'],[-1,''],[0,'\t\t\tif (withFeatureInfo) {'],[-1,'\t\t\t\t\/\/ met een zoomend werkt het soms raar, maar met wachten op'],[-1,'\t\t\t\t\/\/ loadend van het eerste wms thema gaat het vaker mis'],[0,'\t\t\t\t_map.events.register(\'zoomend\', _map, _afterZoomTo(new OpenLayers.LonLat(x, y)));'],[-1,'\t\t\t}'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * Controls aan de kaart hangen.'],[-1,'\t\t * '],[-1,'\t\t * @private'],[-1,'\t\t *\/'],[-1,'\t\taddControls : function() {'],[0,'\t\t\t_map.addControl(new UpdateLegendControl({'],[-1,'\t\t\t\tdiv : jQuery(\'#\' + this.config.legendDiv)[0]'],[-1,'\t\t\t}));'],[0,'\t\t\t_map.addControl(new OpenLayers.Control.KeyboardDefaults('],[-1,'\t\t\t\/* alleen actief als de kaart focus heeft *\/'],[-1,'\t\t\t\/\/ { observeElement : this.config.mapDiv }'],[-1,'\t\t\t));'],[0,'\t\t\t_map.addControl(new ZoomControl());'],[0,'\t\t\t_map.addControl(new OpenLayers.Control.Navigation());'],[0,'\t\t\t_map.addControl(new OpenLayers.Control.KeyboardClick('],[-1,'\t\t\t\/* alleen actief als de kaart focus heeft *\/'],[-1,'\t\t\t\/\/ { observeElement : this.config.mapDiv }'],[-1,'\t\t\t));'],[0,'\t\t\t_map.addControl(new WMSGetFeatureInfo({'],[-1,'\t\t\t\teventListeners : {'],[-1,'\t\t\t\t\tgetfeatureinfo : _showInfo'],[-1,'\t\t\t\t}'],[-1,'\t\t\t}));'],[0,'\t\t\t_map.addControl(new ClickDrawControl());'],[0,'\t\t\t_map.addControl(new OpenLayers.Control.ScaleLine({'],[-1,'\t\t\t\tmaxWidth : 200,'],[-1,'\t\t\t\tbottomOutUnits : \'\' \/\/ geen mi\/ft'],[-1,'\t\t\t}));'],[0,'\t\t\t_map.addControl(new OverviewMap({'],[-1,'\t\t\t\tmapOptions : {'],[-1,'\t\t\t\t\tmaxExtent : this.config.map.restrictedExtent,'],[-1,'\t\t\t\t\tresolutions : this.config.map.resolutions,'],[-1,'\t\t\t\t\tprojection : this.config.map.projection,'],[-1,'\t\t\t\t\ttheme : null'],[-1,'\t\t\t\t}'],[-1,'\t\t\t}));'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * cleanup. Moet aangeroepen voor dat een eventueel DOM element van de'],[-1,'\t\t * pagina wordt verwijderd. Wordt automatische aangeroepen bij verlaten'],[-1,'\t\t * van de pagina.'],[-1,'\t\t *\/'],[-1,'\t\tdestroy : function() {'],[12,'\t\t\tif (_map !== null) {'],[0,'\t\t\t\t_map.destroy();'],[0,'\t\t\t\t_map = null;'],[-1,'\t\t\t}'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * Stelt de doorzichtigheid van de voorgrond kaart in.'],[-1,'\t\t * '],[-1,'\t\t * @param opacity'],[-1,'\t\t * float waarde tussen 0 1n 1'],[-1,'\t\t *\/'],[-1,'\t\tsetOpacity : function(opacity) {'],[0,'\t\t\t_setOpacity(opacity);'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * Voeg WMS toe aan de kaart. Uitgangspunt is dat de WMS transparante'],[-1,'\t\t * PNG ondersteund. eerder geladen WMS lagen worden verwijderd'],[-1,'\t\t * '],[-1,'\t\t * @param {object}'],[-1,'\t\t * wmsConfig Een object met WMS parameters. <code>'],[-1,'\t\t * {'],[-1,'\t\t * \'id\' : \'cbs_inwoners_2010_per_hectare\','],[-1,'\t\t * \'name\': \'Inwoners 2010 per hectare\''],[-1,'\t\t * \'url\' : \'http:\/\/geodata.nationaalgeoregister.nl\/cbsvierkanten100m2010\/ows\','],[-1,'\t\t * \'layers\' : \'cbsvierkanten100m2010:cbs_inwoners_2000_per_hectare\','],[-1,'\t\t * \'styles\' : \'cbsvierkant100m_inwoners_2000\''],[-1,'\t\t * }'],[-1,'\t\t * <\/code>'],[-1,'\t\t *\/'],[-1,'\t\tloadWMS : function(wmsConfig) {'],[4,'\t\t\tthis.removeOverlays();'],[0,'\t\t\tvar layer = new OpenLayers.Layer.WMS(wmsConfig.name, wmsConfig.url, {'],[-1,'\t\t\t\tlayers : wmsConfig.layers,'],[-1,'\t\t\t\tstyles : wmsConfig.styles,'],[-1,'\t\t\t\tversion : \'1.3.0\','],[-1,'\t\t\t\tformat : \'image\/png\','],[-1,'\t\t\t\ttransparent : true'],[-1,'\t\t\t}, {'],[-1,'\t\t\t\tisBaseLayer : false,'],[-1,'\t\t\t\tvisibility : true,'],[-1,'\t\t\t\tsingleTile : false,'],[-1,'\t\t\t\topacity : _opacity'],[-1,'\t\t\t});'],[-1,''],[0,'\t\t\tif (wmsConfig.hasOwnProperty(\'zoom\')) {'],[0,'\t\t\t\tif (_map.getZoom() < parseInt(wmsConfig.zoom))'],[0,'\t\t\t\t\t_map.zoomTo(wmsConfig.zoom);'],[-1,'\t\t\t}'],[-1,''],[0,'\t\t\tsetCookie(COOKIE.mapid, wmsConfig.id);'],[0,'\t\t\t_map.addLayer(layer);'],[-1,''],[0,'\t\t\tvar fInfoControl = _map.getControlsByClass(\'WMSGetFeatureInfo\');'],[0,'\t\t\tfInfoControl[0].url = wmsConfig.url;'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * verwijder de WMS uit de kaart (behalve als het een base layer is).'],[-1,'\t\t * '],[-1,'\t\t * @param {string}'],[-1,'\t\t * wmsLyrName naam van de WMS service'],[-1,'\t\t *\/'],[-1,'\t\tremoveWMS : function(wmsLyrName) {'],[0,'\t\t\tvar lyrs = _map.getLayersByName(wmsLyrName);'],[0,'\t\t\tfor (var lyr = 0; lyr < lyrs.length; lyr++) {'],[0,'\t\t\t\tif (!lyrs[lyr].isBaseLayer) {'],[0,'\t\t\t\t\t_map.removeLayer(lyrs[lyr]);'],[0,'\t\t\t\t\tlyrs[lyr].destroy();'],[-1,'\t\t\t\t}'],[-1,'\t\t\t}'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * verwijder alle overlays. Voorlopig alleen type {OpenLayers.Layer.WMS}'],[-1,'\t\t *\/'],[-1,'\t\tremoveOverlays : function() {'],[-1,'\t\t\t\/\/ reset featureinfo text'],[4,'\t\t\tjQuery(\'#\' + config.featureInfoDiv).html(OpenLayers.i18n(\'KEY_INFO_GEEN_FEATURES\'));'],[-1,'\t\t\t\/\/ verwijder ikoontjes die de controls tekenen'],[0,'\t\t\tvar lyrs = _map.getLayersByName(\'ClickDrawControl\'), lyr;'],[0,'\t\t\tfor (lyr = 0; lyr < lyrs.length; lyr++) {'],[0,'\t\t\t\tlyrs[lyr].removeAllFeatures();'],[-1,'\t\t\t}'],[0,'\t\t\tlyrs = _map.getLayersByName(\'OpenLayers.Handler.KeyboardPoint\');'],[0,'\t\t\tfor (lyr = 0; lyr < lyrs.length; lyr++) {'],[0,'\t\t\t\tlyrs[lyr].removeAllFeatures();'],[-1,'\t\t\t}'],[-1,''],[-1,'\t\t\t\/\/ verwijder WMS lagen'],[0,'\t\t\tlyrs = _map.getLayersByClass(\'OpenLayers.Layer.WMS\');'],[0,'\t\t\tfor (lyr = 0; lyr < lyrs.length; lyr++) {'],[0,'\t\t\t\tif (!lyrs[lyr].isBaseLayer) {'],[0,'\t\t\t\t\t_map.removeLayer(lyrs[lyr]);'],[0,'\t\t\t\t\tlyrs[lyr].destroy();'],[-1,'\t\t\t\t}'],[-1,'\t\t\t}'],[-1,''],[0,'\t\t\teraseCookie(COOKIE.mapid);'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * Afmeting van de kaart aanpassen aan schermbreedte.'],[-1,'\t\t * '],[-1,'\t\t * @todo hoogte instellen werkt niet omdat de parent hoogte de afmeting'],[-1,'\t\t * van de child heeft.'],[-1,'\t\t *\/'],[-1,'\t\ttoggleFullSize : function() {'],[1,'\t\t\tif (_fullSize) {'],[-1,'\t\t\t\t\/\/ terugzetten'],[0,'\t\t\t\tjQuery(\'#\' + this.config.mapDiv).width(this.config.map.width).height(this.config.map.height);'],[0,'\t\t\t\tjQuery(\'#toggleSize\').toggleClass(\'restore max\');'],[0,'\t\t\t\t_fullSize = false;'],[0,'\t\t\t\t_map.updateSize();'],[-1,''],[0,'\t\t\t\tvar vectors = _map.getLayersByClass(\"OpenLayers.Layer.Vector\");'],[0,'\t\t\t\tif (vectors.length > 0) {'],[-1,'\t\t\t\t\t\/\/ in dit geval is er een kaartlaag met een featureinfo'],[-1,'\t\t\t\t\t\/\/ lokatie verschuif naar die lokatie'],[0,'\t\t\t\t\tvar bounds = vectors[0].getDataExtent();'],[0,'\t\t\t\t\t_map.panTo(bounds.getCenterLonLat());'],[-1,'\t\t\t\t}'],[-1,'\t\t\t} else {'],[-1,'\t\t\t\t\/\/ vergroten'],[1,'\t\t\t\tvar borderW = parseInt(jQuery(\'#\' + this.config.mapDiv).css(\'borderLeftWidth\'), 10)'],[-1,'\t\t\t\t\t\t+ parseInt(jQuery(\'#\' + this.config.mapDiv).css(\'borderRightWidth\'), 10);'],[0,'\t\t\t\tvar borderH = parseInt(jQuery(\'#\' + this.config.mapDiv).css(\'borderTopWidth\'), 10)'],[-1,'\t\t\t\t\t\t+ parseInt(jQuery(\'#\' + this.config.mapDiv).css(\'borderBottomWidth\'), 10);'],[-1,'\t\t\t\t\/\/ inhoud padding set in css'],[0,'\t\t\t\tvar headerH = parseInt(jQuery(\'#\' + this.config.mapDiv).parent().parent().css(\'padding-top\'), 10);'],[0,'\t\t\t\tvar footerH = parseInt(jQuery(\'#\' + this.config.mapDiv).parent().parent().css(\'padding-bottom\'), 10);'],[-1,''],[0,'\t\t\t\tvar w = jQuery(\'#\' + this.config.mapDiv).parent().width() - borderW;'],[0,'\t\t\t\tvar h = jQuery(window).height() - headerH - footerH - borderH;'],[-1,''],[0,'\t\t\t\tjQuery(\'#\' + this.config.mapDiv).width(w).height(h);'],[0,'\t\t\t\tjQuery(\'#toggleSize\').toggleClass(\'restore max\');'],[0,'\t\t\t\t_fullSize = true;'],[0,'\t\t\t\t_map.updateSize();'],[-1,'\t\t\t}'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * Stel de kaart in voor afdrukken.'],[-1,'\t\t *\/'],[-1,'\t\tprintPrepare : function() {'],[1,'\t\t\tif (_fullSize) {'],[0,'\t\t\t\tthis.toggleFullSize();'],[-1,'\t\t\t}'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * Toggle basemap.'],[-1,'\t\t *\/'],[-1,'\t\ttoggleBaseMap : function() {'],[2,'\t\t\tvar topo = _map.getLayersByName(\'topografie\')[0];'],[0,'\t\t\tvar lufo = _map.getLayersByName(\'luchtfoto\')[0];'],[0,'\t\t\tif (topo.getVisibility()) {'],[0,'\t\t\t\t_map.setBaseLayer(lufo);'],[0,'\t\t\t\tjQuery(\'#toggleBaseMap\').text(OpenLayers.i18n(\'KEY_TOGGLE_BASEMAP_TOPO\'));'],[0,'\t\t\t\tsetCookie(COOKIE.baselyr, \'luchtfoto\');'],[-1,'\t\t\t} else {'],[0,'\t\t\t\t_map.setBaseLayer(topo);'],[0,'\t\t\t\tjQuery(\'#toggleBaseMap\').text(OpenLayers.i18n(\'KEY_TOGGLE_BASEMAP_LUFO\'));'],[0,'\t\t\t\tsetCookie(COOKIE.baselyr, \'topografie\');'],[-1,'\t\t\t}'],[0,'\t\t\tjQuery(\'#toggleBaseMap\').append(\'<span>\' + OpenLayers.i18n(\'KEY_TOGGLE_BASEMAP_TITLE\') + \'<\/span>\');'],[0,'\t\t\tjQuery(\'#toggleBaseMap\').toggleClass(\'lufo topo\');'],[-1,'\t\t},'],[-1,''],[-1,'\t\t\/**'],[-1,'\t\t * set up basemaps.'],[-1,'\t\t * '],[-1,'\t\t * @private'],[-1,'\t\t *\/'],[-1,'\t\taddBaseMap : function() {'],[-1,'\t\t\t\/\/ topo'],[0,'\t\t\t_map.addLayer(new OpenLayers.Layer.WMTS(jQuery.extend(true, this.config.map.topoWMTS, {'],[-1,'\t\t\t\tname : \'topografie\''],[-1,'\t\t\t})));'],[-1,'\t\t\t\/\/ luchtfoto'],[0,'\t\t\t_map.addLayer(new OpenLayers.Layer.WMTS(jQuery.extend(true, this.config.map.aerialWMTS, {'],[-1,'\t\t\t\tname : \'luchtfoto\''],[-1,'\t\t\t})));'],[-1,''],[0,'\t\t\tif (getCookie(COOKIE.baselyr)) {'],[0,'\t\t\t\t_map.setBaseLayer(_map.getLayersByName(getCookie(COOKIE.baselyr))[0]);'],[-1,'\t\t\t}'],[-1,'\t\t}'],[-1,'\t};'],[-1,'}();']] |
||||
src/WMSGetFeatureInfo.js | 4 | 1 | 25 % |
|
[[-1,'\/*'],[-1,' * Copyright (c) 2012, Dienst Landelijk Gebied - Ministerie van Economische Zaken'],[-1,' * '],[-1,' * Gepubliceerd onder de BSD 2-clause licentie, '],[-1,' * zie https:\/\/github.com\/MinELenI\/CBSviewer\/blob\/master\/LICENSE.md voor de volledige licentie. '],[-1,' *\/'],[-1,'\/**'],[-1,' * Custom WMSGetFeatureInfo control.'],[-1,' * '],[-1,' * @author mprins'],[-1,' * @class {WMSGetFeatureInfo}'],[-1,' * @extends {OpenLayers.Control.WMSGetFeatureInfo}'],[-1,' *\/'],[1,'WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control.WMSGetFeatureInfo, {'],[-1,''],[-1,'\t\/** @override *\/'],[-1,'\tqueryVisible : true,'],[-1,'\t\/** @override *\/'],[-1,'\tmaxFeatures : 20,'],[-1,'\t\/** @override *\/'],[-1,'\tinfoFormat : \'text\/html\','],[-1,'\t\/** @override *\/'],[-1,'\tautoActivate : true,'],[-1,''],[-1,'\t\/** @constructor *\/'],[-1,'\tinitialize : function(options) {'],[0,'\t\toptions = options || {};'],[0,'\t\toptions.handlerOptions = options.handlerOptions || {};'],[0,'\t\tOpenLayers.Control.WMSGetFeatureInfo.prototype.initialize.apply(this, [ options ]);'],[-1,'\t},'],[-1,''],[-1,'\tCLASS_NAME : \'WMSGetFeatureInfo\''],[-1,'});']] |
||||
src/CookieUtil.js | 15 | 15 | 100 % |
|
[[-1,'\/*'],[-1,' * Copyright (c) 2014, Dienst Landelijk Gebied - Ministerie van Economische Zaken'],[-1,' * '],[-1,' * Gepubliceerd onder de BSD 2-clause licentie, '],[-1,' * zie https:\/\/github.com\/MinELenI\/CBSviewer\/blob\/master\/LICENSE.md voor de volledige licentie. '],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Cookie utilities.'],[-1,' * @author mprins'],[-1,' *\/'],[-1,''],[-1,'\/**'],[-1,' * Sla een waarde op in een cookie met een verval tijd van 90 dagen.'],[-1,' * '],[-1,' * @param key'],[-1,' * sleutel voor de cookie'],[-1,' * @param value'],[-1,' * waarde voor de cookie'],[-1,' *\/'],[1,'function setCookie(key, value) {'],[2,'\tvar expires = new Date();'],[2,'\texpires.setTime(expires.getTime() + (90 * 24 * 60 * 60 * 1000));'],[2,'\tdocument.cookie = key + \'=\' + encodeURIComponent(value) + \';path=\/;expires=\' + expires.toUTCString();'],[-1,'}'],[-1,''],[-1,'\/**'],[-1,' * Lees een waarde uit een cookie.'],[-1,' * '],[-1,' * @param key'],[-1,' * zoeksleutel'],[-1,' * @returns de waarde of null indien de cookie geen waarde heeft of niet'],[-1,' * bestaat.'],[-1,' *\/'],[1,'function getCookie(key) {'],[6,'\tvar value = document.cookie.match(\'(^|;) ?\' + key + \'=([^;]*)(;|$)\');'],[6,'\treturn value ? decodeURIComponent(value[2]) : null;'],[-1,'}'],[-1,''],[-1,'\/**'],[-1,' * wis de gevraagde cookie.'],[-1,' * '],[-1,' * @param key'],[-1,' * te wissen cookie'],[-1,' *\/'],[1,'function eraseCookie(key) {'],[61,'\tdate = new Date();'],[61,'\tdate.setDate(date.getDate() - 1);'],[61,'\tdocument.cookie = key + \'=;path=\/;expires=\' + date.toUTCString();'],[-1,'}'],[-1,''],[-1,'\/**'],[-1,' * Alle cookies die we kennen wissen.'],[-1,' *\/'],[1,'function eraseCookies() {'],[12,'\tfor ( var key in COOKIE) {'],[60,'\t\tif (COOKIE.hasOwnProperty(key)) {'],[60,'\t\t\teraseCookie(key);'],[-1,'\t\t}'],[-1,'\t}'],[-1,'}']] |
||||
src\main\webapp\lib/jquery-1.11.1.min.js | 3 | 3 | 100 % |
|
[[-1,'\/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org\/license *\/'],[2210,'!function(a,b){\"object\"==typeof module&&\"object\"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error(\"jQuery requires a window with a document\");return b(a)}:b(a)}(\"undefined\"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=\"1.11.1\",m=function(a,b){return new m.fn.init(a,b)},n=\/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$\/g,o=\/^-ms-\/,p=\/-([\\da-z])\/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:\"\",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for(\"boolean\"==typeof g&&(j=g,g=arguments[h]||{},h++),\"object\"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:\"jQuery\"+(l+Math.random()).replace(\/\\D\/g,\"\"),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return\"function\"===m.type(a)},isArray:Array.isArray||function(a){return\"array\"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||\"object\"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,\"constructor\")&&!j.call(a.constructor.prototype,\"isPrototypeOf\"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+\"\":\"object\"==typeof a||\"function\"==typeof a?h[i.call(a)]||\"object\":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,\"ms-\").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?\"\":(a+\"\").replace(n,\"\")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,\"string\"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return\"string\"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"),function(a,b){h[\"[object \"+b+\"]\"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return\"function\"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:\"array\"===c||0===b||\"number\"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=\"sizzle\"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C=\"undefined\",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L=\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",M=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",N=\"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",O=N.replace(\"w\",\"w#\"),P=\"\\\\[\"+M+\"*(\"+N+\")(?:\"+M+\"*([*^$|!~]?=)\"+M+\"*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\"+O+\"))|)\"+M+\"*\\\\]\",Q=\":(\"+N+\")(?:\\\\(((\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\"+P+\")*)|.*)\\\\)|)\",R=new RegExp(\"^\"+M+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+M+\"+$\",\"g\"),S=new RegExp(\"^\"+M+\"*,\"+M+\"*\"),T=new RegExp(\"^\"+M+\"*([>+~]|\"+M+\")\"+M+\"*\"),U=new RegExp(\"=\"+M+\"*([^\\\\]\'\\\"]*?)\"+M+\"*\\\\]\",\"g\"),V=new RegExp(Q),W=new RegExp(\"^\"+O+\"$\"),X={ID:new RegExp(\"^#(\"+N+\")\"),CLASS:new RegExp(\"^\\\\.(\"+N+\")\"),TAG:new RegExp(\"^(\"+N.replace(\"w\",\"w*\")+\")\"),ATTR:new RegExp(\"^\"+P),PSEUDO:new RegExp(\"^\"+Q),CHILD:new RegExp(\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\"+M+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+M+\"*(?:([+-]|)\"+M+\"*(\\\\d+)|))\"+M+\"*\\\\)|)\",\"i\"),bool:new RegExp(\"^(?:\"+L+\")$\",\"i\"),needsContext:new RegExp(\"^\"+M+\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+M+\"*((?:-\\\\d)?\\\\d*)\"+M+\"*\\\\)|)(?=[^-]|$)\",\"i\")},Y=\/^(?:input|select|textarea|button)$\/i,Z=\/^h\\d$\/i,$=\/^[^{]+\\{\\s*\\[native \\w\/,_=\/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$\/,ab=\/[+~]\/,bb=\/\'|\\\\\/g,cb=new RegExp(\"\\\\\\\\([\\\\da-f]{1,6}\"+M+\"?|(\"+M+\")|.)\",\"ig\"),db=function(a,b,c){var d=\"0x\"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||\"string\"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&\"object\"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute(\"id\"))?s=r.replace(bb,\"\\\\$&\"):b.setAttribute(\"id\",s),s=\"[id=\'\"+s+\"\'] \",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(\",\")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute(\"id\")}}}return i(a.replace(R,\"$1\"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+\" \")>d.cacheLength&&delete b[a.shift()],b[c+\" \"]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement(\"div\");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split(\"|\"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return\"input\"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return(\"input\"===c||\"button\"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?\"HTML\"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener(\"unload\",function(){m()},!1):g.attachEvent&&g.attachEvent(\"onunload\",function(){m()})),c.attributes=ib(function(a){return a.className=\"i\",!a.getAttribute(\"className\")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment(\"\")),!a.getElementsByTagName(\"*\").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML=\"<div class=\'a\'><\/div><div class=\'a i\'><\/div>\",a.firstChild.className=\"i\",2===a.getElementsByClassName(\"i\").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute(\"id\")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode(\"id\");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(\"*\"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML=\"<select msallowclip=\'\'><option selected=\'\'><\/option><\/select>\",a.querySelectorAll(\"[msallowclip^=\'\']\").length&&q.push(\"[*^$]=\"+M+\"*(?:\'\'|\\\"\\\")\"),a.querySelectorAll(\"[selected]\").length||q.push(\"\\\\[\"+M+\"*(?:value|\"+L+\")\"),a.querySelectorAll(\":checked\").length||q.push(\":checked\")}),ib(function(a){var b=e.createElement(\"input\");b.setAttribute(\"type\",\"hidden\"),a.appendChild(b).setAttribute(\"name\",\"D\"),a.querySelectorAll(\"[name=d]\").length&&q.push(\"name\"+M+\"*[*^$|!~]?=\"),a.querySelectorAll(\":enabled\").length||q.push(\":enabled\",\":disabled\"),a.querySelectorAll(\"*,:x\"),q.push(\",.*:\")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,\"div\"),s.call(a,\"[s!=\'\']:x\"),r.push(\"!=\",Q)}),q=q.length&&new RegExp(q.join(\"|\")),r=r.length&&new RegExp(r.join(\"|\")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,\"=\'$1\']\"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error(\"Syntax error, unrecognized expression: \"+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c=\"\",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if(\"string\"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||\"\").replace(cb,db),\"~=\"===a[2]&&(a[3]=\" \"+a[3]+\" \"),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),\"nth\"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*(\"even\"===a[3]||\"odd\"===a[3])),a[5]=+(a[7]+a[8]||\"odd\"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||\"\":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(\")\",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return\"*\"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+\" \"];return b||(b=new RegExp(\"(^|\"+M+\")\"+a+\"(\"+M+\"|$)\"))&&y(a,function(a){return b.test(\"string\"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute(\"class\")||\"\")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?\"!=\"===b:b?(e+=\"\",\"=\"===b?e===c:\"!=\"===b?e!==c:\"^=\"===b?c&&0===e.indexOf(c):\"*=\"===b?c&&e.indexOf(c)>-1:\"$=\"===b?c&&e.slice(-c.length)===c:\"~=\"===b?(\" \"+e+\" \").indexOf(c)>-1:\"|=\"===b?e===c||e.slice(0,c.length+1)===c+\"-\":!1):!0}},CHILD:function(a,b,c,d,e){var f=\"nth\"!==a.slice(0,3),g=\"last\"!==a.slice(-4),h=\"of-type\"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?\"nextSibling\":\"previousSibling\",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p=\"only\"===a&&!o&&\"nextSibling\"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m\/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error(\"unsupported pseudo: \"+a);return e[u]?e(b):e.length>1?(c=[a,a,\"\",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,\"$1\"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||\"\")||fb.error(\"unsupported lang: \"+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute(\"xml:lang\")||b.getAttribute(\"lang\"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+\"-\");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&!!a.checked||\"option\"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&\"button\"===a.type||\"button\"===b},text:function(a){var b;return\"input\"===a.nodeName.toLowerCase()&&\"text\"===a.type&&(null==(b=a.getAttribute(\"type\"))||\"text\"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+\" \"];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R,\" \")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d=\"\";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&\"parentNode\"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||\"*\",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[\" \"],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:\" \"===a[i-2].type?\"*\":\"\"})).replace(R,\"$1\"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q=\"0\",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG(\"*\",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+\" \"];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n=\"function\"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&\"ID\"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split(\"\").sort(B).join(\"\")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement(\"div\"))}),ib(function(a){return a.innerHTML=\"<a href=\'#\'><\/a>\",\"#\"===a.firstChild.getAttribute(\"href\")})||jb(\"type|href|height|width\",function(a,b,c){return c?void 0:a.getAttribute(b,\"type\"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML=\"<input\/>\",a.firstChild.setAttribute(\"value\",\"\"),\"\"===a.firstChild.getAttribute(\"value\")})||jb(\"value\",function(a,b,c){return c||\"input\"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute(\"disabled\")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[\":\"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=\/^<(\\w+)\\s*\\\/?>(?:<\\\/\\1>|)$\/,v=\/^.[^:#\\[\\.,]*$\/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if(\"string\"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=\":not(\"+a+\")\"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if(\"string\"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+\" \"+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,\"string\"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=\/^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$\/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if(\"string\"==typeof a){if(c=\"<\"===a.charAt(0)&&\">\"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?\"undefined\"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=\/^(?:parents|prev(?:Until|All))\/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||\"string\"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?\"string\"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,\"parentNode\")},parentsUntil:function(a,b,c){return m.dir(a,\"parentNode\",c)},next:function(a){return D(a,\"nextSibling\")},prev:function(a){return D(a,\"previousSibling\")},nextAll:function(a){return m.dir(a,\"nextSibling\")},prevAll:function(a){return m.dir(a,\"previousSibling\")},nextUntil:function(a,b,c){return m.dir(a,\"nextSibling\",c)},prevUntil:function(a,b,c){return m.dir(a,\"previousSibling\",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,\"iframe\")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return\"Until\"!==a.slice(-5)&&(d=c),d&&\"string\"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=\/\\S+\/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a=\"string\"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);\"function\"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&\"string\"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[[\"resolve\",\"done\",m.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",m.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",m.Callbacks(\"memory\")]],c=\"pending\",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+\"With\"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+\"With\"](this===e?d:this,arguments),this},e[f[0]+\"With\"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler(\"ready\"),m(y).off(\"ready\")))}}});function I(){y.addEventListener?(y.removeEventListener(\"DOMContentLoaded\",J,!1),a.removeEventListener(\"load\",J,!1)):(y.detachEvent(\"onreadystatechange\",J),a.detachEvent(\"onload\",J))}function J(){(y.addEventListener||\"load\"===event.type||\"complete\"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),\"complete\"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener(\"DOMContentLoaded\",J,!1),a.addEventListener(\"load\",J,!1);else{y.attachEvent(\"onreadystatechange\",J),a.attachEvent(\"onload\",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll(\"left\")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K=\"undefined\",L;for(L in m(k))break;k.ownLast=\"0\"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName(\"body\")[0],c&&c.style&&(b=y.createElement(\"div\"),d=y.createElement(\"div\"),d.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText=\"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement(\"div\");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+\" \").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute(\"classid\")===b};var M=\/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$\/,N=\/([A-Z])\/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d=\"data-\"+b.replace(N,\"-$1\").toLowerCase();if(c=a.getAttribute(d),\"string\"==typeof c){try{c=\"true\"===c?!0:\"false\"===c?!1:\"null\"===c?null:+c+\"\"===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if((\"data\"!==b||!m.isEmptyObject(a[b]))&&\"toJSON\"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;'],[397,'if(k&&j[k]&&(e||j[k].data)||void 0!==d||\"string\"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),(\"object\"==typeof b||\"function\"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),\"string\"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(\" \")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{\"applet \":!0,\"embed \":!0,\"object \":\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,\"parsedAttrs\"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf(\"data-\")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,\"parsedAttrs\",!0)}return e}return\"object\"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||\"fx\")+\"queue\",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||\"fx\";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};\"inprogress\"===e&&(e=c.shift(),d--),e&&(\"fx\"===b&&c.unshift(\"inprogress\"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+\"queueHooks\";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks(\"once memory\").add(function(){m._removeData(a,b+\"queue\"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return\"string\"!=typeof a&&(b=a,a=\"fx\",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),\"fx\"===a&&\"inprogress\"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||\"fx\",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};\"string\"!=typeof a&&(b=a,a=void 0),a=a||\"fx\";while(g--)c=m._data(f[g],a+\"queueHooks\"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=\/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)\/.source,T=[\"Top\",\"Right\",\"Bottom\",\"Left\"],U=function(a,b){return a=b||a,\"none\"===m.css(a,\"display\")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if(\"object\"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=\/^(?:checkbox|radio)$\/i;!function(){var a=y.createElement(\"input\"),b=y.createElement(\"div\"),c=y.createDocumentFragment();if(b.innerHTML=\" <link\/><table><\/table><a href=\'\/a\'>a<\/a><input type=\'checkbox\'\/>\",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName(\"tbody\").length,k.htmlSerialize=!!b.getElementsByTagName(\"link\").length,k.html5Clone=\"<:nav><\/:nav>\"!==y.createElement(\"nav\").cloneNode(!0).outerHTML,a.type=\"checkbox\",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML=\"<textarea>x<\/textarea>\",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML=\"<input type=\'radio\' checked=\'checked\' name=\'t\'\/>\",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent(\"onclick\",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement(\"div\");for(b in{submit:!0,change:!0,focusin:!0})c=\"on\"+b,(k[b+\"Bubbles\"]=c in a)||(d.setAttribute(c,\"t\"),k[b+\"Bubbles\"]=d.attributes[c].expando===!1);d=null}();var X=\/^(?:input|select|textarea)$\/i,Y=\/^key\/,Z=\/^(?:mouse|pointer|contextmenu)|click\/,$=\/^(?:focusinfocus|focusoutblur)$\/,_=\/^([^.]*)(?:\\.(.+)|)$\/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||\"\").match(E)||[\"\"],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||\"\").split(\".\").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(\".\")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent(\"on\"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||\"\").match(E)||[\"\"],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||\"\").split(\".\").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp(\"(^|\\\\.)\"+p.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&(\"**\"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,\"events\"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,\"type\")?b.type:b,q=j.call(b,\"namespace\")?b.namespace.split(\".\"):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(\".\")>=0&&(q=p.split(\".\"),p=q.shift(),q.sort()),g=p.indexOf(\":\")<0&&\"on\"+p,b=b[m.expando]?b:new m.Event(p,\"object\"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join(\".\"),b.namespace_re=b.namespace?new RegExp(\"(^|\\\\.)\"+q.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,\"events\")||{})[b.type]&&m._data(h,\"handle\"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,\"events\")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||\"click\"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||\"click\"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+\" \",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:\"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),fixHooks:{},keyHooks:{props:\"char charCode key keyCode\".split(\" \"),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:\"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:\"focusin\"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:\"focusout\"},click:{trigger:function(){return m.nodeName(this,\"input\")&&\"checkbox\"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,\"a\")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d=\"on\"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\",pointerenter:\"pointerover\",pointerleave:\"pointerout\"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,\"form\")?!1:void m.event.add(this,\"click._submit keypress._submit\",function(a){var b=a.target,c=m.nodeName(b,\"input\")||m.nodeName(b,\"button\")?b.form:void 0;c&&!m._data(c,\"submitBubbles\")&&(m.event.add(c,\"submit._submit\",function(a){a._submit_bubble=!0}),m._data(c,\"submitBubbles\",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate(\"submit\",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,\"form\")?!1:void m.event.remove(this,\"._submit\")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?((\"checkbox\"===this.type||\"radio\"===this.type)&&(m.event.add(this,\"propertychange._change\",function(a){\"checked\"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,\"click._change\",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate(\"change\",this,a,!0)})),!1):void m.event.add(this,\"beforeactivate._change\",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,\"changeBubbles\")&&(m.event.add(b,\"change._change\",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate(\"change\",this.parentNode,a,!0)}),m._data(b,\"changeBubbles\",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||\"radio\"!==b.type&&\"checkbox\"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,\"._change\"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:\"focusin\",blur:\"focusout\"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if(\"object\"==typeof a){\"string\"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&(\"string\"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+\".\"+d.namespace:d.origType,d.selector,d.handler),this;if(\"object\"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||\"function\"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split(\"|\"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb=\"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",fb=\/ jQuery\\d+=\"(?:null|\\d+)\"\/g,gb=new RegExp(\"<(?:\"+eb+\")[\\\\s\/>]\",\"i\"),hb=\/^\\s+\/,ib=\/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\\/>\/gi,jb=\/<([\\w:]+)\/,kb=\/<tbody\/i,lb=\/<|&#?\\w+;\/,mb=\/<(?:script|style|link)\/i,nb=\/checked\\s*(?:[^=]|=\\s*.checked.)\/i,ob=\/^$|\\\/(?:java|ecma)script\/i,pb=\/^true\\\/(.*)\/,qb=\/^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$\/g,rb={option:[1,\"<select multiple=\'multiple\'>\",\"<\/select>\"],legend:[1,\"<fieldset>\",\"<\/fieldset>\"],area:[1,\"<map>\",\"<\/map>\"],param:[1,\"<object>\",\"<\/object>\"],thead:[1,\"<table>\",\"<\/table>\"],tr:[2,\"<table><tbody>\",\"<\/tbody><\/table>\"],col:[2,\"<table><tbody><\/tbody><colgroup>\",\"<\/colgroup><\/table>\"],td:[3,\"<table><tbody><tr>\",\"<\/tr><\/tbody><\/table>\"],_default:k.htmlSerialize?[0,\"\",\"\"]:[1,\"X<div>\",\"<\/div>\"]},sb=db(y),tb=sb.appendChild(y.createElement(\"div\"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||\"*\"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||\"*\"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,\"table\")&&m.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}function xb(a){return a.type=(null!==m.find.attr(a,\"type\"))+\"\/\"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute(\"type\"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,\"globalEval\",!b||m._data(b[d],\"globalEval\"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}\"script\"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):\"object\"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):\"input\"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):\"option\"===c?b.defaultSelected=b.selected=a.defaultSelected:(\"input\"===c||\"textarea\"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test(\"<\"+a.nodeName+\">\")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,\"script\"),d.length>0&&zb(d,!i&&ub(a,\"script\")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if(\"object\"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement(\"div\")),i=(jb.exec(f)||[\"\",\"\"])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,\"<$1><\/$2>\")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f=\"table\"!==i||kb.test(f)?\"<table>\"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],\"tbody\")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent=\"\";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,\"input\"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),\"script\"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||\"\")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,\"script\")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,\"select\")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,\"\"):void 0;if(!(\"string\"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||[\"\",\"\"])[1].toLowerCase()])){a=a.replace(ib,\"<$1><\/$2>\");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&\"string\"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,\"script\"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,\"script\"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||\"\")&&!m._data(d,\"globalEval\")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||\"\").replace(qb,\"\")));i=c=null}return this}}),m.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],\"display\");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),\"none\"!==c&&c||(Cb=(Cb||m(\"<iframe frameborder=\'0\' width=\'0\' height=\'0\'\/>\")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName(\"body\")[0],c&&c.style?(b=y.createElement(\"div\"),d=y.createElement(\"div\"),d.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText=\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1\",b.appendChild(y.createElement(\"div\")).style.width=\"5px\",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=\/^margin\/,Hb=new RegExp(\"^(\"+S+\")(?!px)[a-z%]+$\",\"i\"),Ib,Jb,Kb=\/^(top|right|bottom|left)$\/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(\"\"!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+\"\"}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left=\"fontSize\"===b?\"1em\":g,g=h.pixelLeft+\"px\",h.left=d,f&&(e.left=f)),void 0===g?g:g+\"\"||\"auto\"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement(\"div\"),b.innerHTML=\" <link\/><table><\/table><a href=\'\/a\'>a<\/a><input type=\'checkbox\'\/>\",d=b.getElementsByTagName(\"a\")[0],c=d&&d.style){c.cssText=\"float:left;opacity:.5\",k.opacity=\"0.5\"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip=\"content-box\",b.cloneNode(!0).style.backgroundClip=\"\",k.clearCloneStyle=\"content-box\"===b.style.backgroundClip,k.boxSizing=\"\"===c.boxSizing||\"\"===c.MozBoxSizing||\"\"===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName(\"body\")[0],c&&c.style&&(b=y.createElement(\"div\"),d=y.createElement(\"div\"),d.style.cssText=\"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\",c.appendChild(d).appendChild(b),b.style.cssText=\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute\",e=f=!1,h=!0,a.getComputedStyle&&(e=\"1%\"!==(a.getComputedStyle(b,null)||{}).top,f=\"4px\"===(a.getComputedStyle(b,null)||{width:\"4px\"}).width,i=b.appendChild(y.createElement(\"div\")),i.style.cssText=b.style.cssText=\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0\",i.style.marginRight=i.style.width=\"0\",b.style.width=\"1px\",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML=\"<table><tr><td><\/td><td>t<\/td><\/tr><\/table>\",i=b.getElementsByTagName(\"td\"),i[0].style.cssText=\"margin:0;border:0;padding:0;display:none\",g=0===i[0].offsetHeight,g&&(i[0].style.display=\"\",i[1].style.display=\"none\",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=\/alpha\\([^)]*\\)\/i,Nb=\/opacity\\s*=\\s*([^)]*)\/,Ob=\/^(none|table(?!-c[ea]).+)\/,Pb=new RegExp(\"^(\"+S+\")(.*)$\",\"i\"),Qb=new RegExp(\"^([+-])=(\"+S+\")\",\"i\"),Rb={position:\"absolute\",visibility:\"hidden\",display:\"block\"},Sb={letterSpacing:\"0\",fontWeight:\"400\"},Tb=[\"Webkit\",\"O\",\"Moz\",\"ms\"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,\"olddisplay\"),c=d.style.display,b?(f[g]||\"none\"!==c||(d.style.display=\"\"),\"\"===d.style.display&&U(d)&&(f[g]=m._data(d,\"olddisplay\",Fb(d.nodeName)))):(e=U(d),(c&&\"none\"!==c||!e)&&m._data(d,\"olddisplay\",e?c:m.css(d,\"display\"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&\"none\"!==d.style.display&&\"\"!==d.style.display||(d.style.display=b?f[g]||\"\":\"none\"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||\"px\"):b}function Xb(a,b,c,d,e){for(var f=c===(d?\"border\":\"content\")?4:\"width\"===b?1:0,g=0;4>f;f+=2)\"margin\"===c&&(g+=m.css(a,c+T[f],!0,e)),d?(\"content\"===c&&(g-=m.css(a,\"padding\"+T[f],!0,e)),\"margin\"!==c&&(g-=m.css(a,\"border\"+T[f]+\"Width\",!0,e))):(g+=m.css(a,\"padding\"+T[f],!0,e),\"padding\"!==c&&(g+=m.css(a,\"border\"+T[f]+\"Width\",!0,e)));return g}function Yb(a,b,c){var d=!0,e=\"width\"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&\"border-box\"===m.css(a,\"boxSizing\",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?\"border\":\"content\"),d,f)+\"px\"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,\"opacity\");return\"\"===c?\"1\":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":k.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&\"get\"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,\"string\"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f=\"number\"),null!=c&&c===c&&(\"number\"!==f||m.cssNumber[h]||(c+=\"px\"),k.clearCloneStyle||\"\"!==c||0!==b.indexOf(\"background\")||(i[b]=\"inherit\"),!(g&&\"set\"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&\"get\"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),\"normal\"===f&&b in Sb&&(f=Sb[b]),\"\"===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each([\"height\",\"width\"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,\"display\"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&\"border-box\"===m.css(a,\"boxSizing\",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||\"\")?.01*parseFloat(RegExp.$1)+\"\":b?\"1\":\"\"},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?\"alpha(opacity=\"+100*b+\")\":\"\",f=d&&d.filter||c.filter||\"\";c.zoom=1,(b>=1||\"\"===b)&&\"\"===m.trim(f.replace(Mb,\"\"))&&c.removeAttribute&&(c.removeAttribute(\"filter\"),\"\"===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+\" \"+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:\"inline-block\"},Jb,[a,\"marginRight\"]):void 0}),m.each({margin:\"\",padding:\"\",border:\"Width\"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f=\"string\"==typeof c?c.split(\" \"):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return\"boolean\"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||\"swing\",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?\"\":\"px\")'],[266,'},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,\"\"),b&&\"auto\"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)\/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=\/^(?:toggle|show|hide)$\/,bc=new RegExp(\"^(?:([+-])=|)(\"+S+\")([a-z%]*)$\",\"i\"),cc=\/queueHooks$\/,dc=[ic],ec={\"*\":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?\"\":\"px\"),g=(m.cssNumber[a]||\"px\"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||\".5\",g\/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()\/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d[\"margin\"+c]=d[\"padding\"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec[\"*\"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,\"fxshow\");c.queue||(h=m._queueHooks(a,\"fx\"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,\"fx\").length||h.empty.fire()})})),1===a.nodeType&&(\"height\"in b||\"width\"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,\"display\"),l=\"none\"===j?m._data(a,\"olddisplay\")||Fb(a.nodeName):j,\"inline\"===l&&\"none\"===m.css(a,\"float\")&&(k.inlineBlockNeedsLayout&&\"inline\"!==Fb(a.nodeName)?p.zoom=1:p.display=\"inline-block\")),c.overflow&&(p.overflow=\"hidden\",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||\"toggle\"===e,e===(q?\"hide\":\"show\")){if(\"show\"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))\"inline\"===(\"none\"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?\"hidden\"in r&&(q=r.hidden):r=m._data(a,\"fxshow\",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,\"fxshow\");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start=\"width\"===d||\"height\"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&\"expand\"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c\/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=[\"*\"]):a=a.split(\" \");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&\"object\"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:\"number\"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue=\"fx\"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css(\"opacity\",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,\"finish\"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return\"string\"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||\"fx\",[]),this.each(function(){var b=!0,e=null!=a&&a+\"queueHooks\",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||\"fx\"),this.each(function(){var b,c=m._data(this),d=c[a+\"queue\"],e=c[a+\"queueHooks\"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each([\"toggle\",\"show\",\"hide\"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||\"boolean\"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc(\"show\"),slideUp:gc(\"hide\"),slideToggle:gc(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||\"fx\",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement(\"div\"),b.setAttribute(\"className\",\"t\"),b.innerHTML=\" <link\/><table><\/table><a href=\'\/a\'>a<\/a><input type=\'checkbox\'\/>\",d=b.getElementsByTagName(\"a\")[0],c=y.createElement(\"select\"),e=c.appendChild(y.createElement(\"option\")),a=b.getElementsByTagName(\"input\")[0],d.style.cssText=\"top:1px\",k.getSetAttribute=\"t\"!==b.className,k.style=\/top\/.test(d.getAttribute(\"style\")),k.hrefNormalized=\"\/a\"===d.getAttribute(\"href\"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement(\"form\").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement(\"input\"),a.setAttribute(\"value\",\"\"),k.input=\"\"===a.getAttribute(\"value\"),a.value=\"t\",a.setAttribute(\"type\",\"radio\"),k.radioValue=\"t\"===a.value}();var lc=\/\\r\/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e=\"\":\"number\"==typeof e?e+=\"\":m.isArray(e)&&(e=m.map(e,function(a){return null==a?\"\":a+\"\"})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&\"set\"in b&&void 0!==b.set(this,e,\"value\")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&\"get\"in b&&void 0!==(c=b.get(e,\"value\"))?c:(c=e.value,\"string\"==typeof c?c.replace(lc,\"\"):null==c?\"\":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,\"value\");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f=\"select-one\"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute(\"disabled\"))||c.parentNode.disabled&&m.nodeName(c.parentNode,\"optgroup\"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each([\"radio\",\"checkbox\"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute(\"value\")?\"on\":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=\/^(?:checked|selected)$\/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&\"get\"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&\"set\"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+\"\"),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase(\"default-\"+c)]=a[d]=!1:m.attr(a,c,\"\"),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&\"radio\"===b&&m.nodeName(a,\"input\")){var c=a.value;return a.setAttribute(\"type\",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase(\"default-\"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(\/\\w+\/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase(\"default-\"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,\"input\")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+=\"\",\"value\"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&\"\"!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,\"\"===b?!1:b,c)}},m.each([\"width\",\"height\"],function(a,b){m.attrHooks[b]={set:function(a,c){return\"\"===c?(a.setAttribute(b,\"auto\"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+\"\"}});var sc=\/^(?:input|select|textarea|button|object)$\/i,tc=\/^(?:a|area)$\/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{\"for\":\"htmlFor\",\"class\":\"className\"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&\"set\"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&\"get\"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,\"tabindex\");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each([\"href\",\"src\"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each([\"tabIndex\",\"readOnly\",\"maxLength\",\"cellSpacing\",\"cellPadding\",\"rowSpan\",\"colSpan\",\"useMap\",\"frameBorder\",\"contentEditable\"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype=\"encoding\");var uc=\/[\\t\\r\\n\\f]\/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=\"string\"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||\"\").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(\" \"+c.className+\" \").replace(uc,\" \"):\" \")){f=0;while(e=b[f++])d.indexOf(\" \"+e+\" \")<0&&(d+=e+\" \");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||\"string\"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||\"\").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(\" \"+c.className+\" \").replace(uc,\" \"):\"\")){f=0;while(e=b[f++])while(d.indexOf(\" \"+e+\" \")>=0)d=d.replace(\" \"+e+\" \",\" \");g=a?m.trim(d):\"\",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return\"boolean\"==typeof b&&\"string\"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if(\"string\"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||\"boolean\"===c)&&(this.className&&m._data(this,\"__className__\",this.className),this.className=this.className||a===!1?\"\":m._data(this,\"__className__\")||\"\")})},hasClass:function(a){for(var b=\" \"+a+\" \",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(\" \"+this[c].className+\" \").replace(uc,\" \").indexOf(b)>=0)return!0;return!1}}),m.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,\"**\"):this.off(b,a||\"**\",c)}});var vc=m.now(),wc=\/\\?\/,xc=\/(,)|(\\[|{)|(}|])|\"(?:[^\"\\\\\\r\\n]|\\\\[\"\\\\\\\/bfnrt]|\\\\u[\\da-fA-F]{4})*\"\\s*:?|true|false|null|-?(?!0\\d)\\d+(?:\\.\\d+|)(?:[eE][+-]?\\d+|)\/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+\"\");var c,d=null,e=m.trim(b+\"\");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,\"\")}))?Function(\"return \"+e)():m.error(\"Invalid JSON: \"+b)},m.parseXML=function(b){var c,d;if(!b||\"string\"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,\"text\/xml\")):(c=new ActiveXObject(\"Microsoft.XMLDOM\"),c.async=\"false\",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName(\"parsererror\").length||m.error(\"Invalid XML: \"+b),c};var yc,zc,Ac=\/#.*$\/,Bc=\/([?&])_=[^&]*\/,Cc=\/^(.*?):[ \\t]*([^\\r\\n]*)\\r?$\/gm,Dc=\/^(?:about|app|app-storage|.+-extension|file|res|widget):$\/,Ec=\/^(?:GET|HEAD)$\/,Fc=\/^\\\/\\\/\/,Gc=\/^([\\w.+-]+:)(?:\\\/\\\/(?:[^\\\/?#]*@|)([^\\\/?#:]*)(?::(\\d+)|)|)\/,Hc={},Ic={},Jc=\"*\/\".concat(\"*\");try{zc=location.href}catch(Kc){zc=y.createElement(\"a\"),zc.href=\"\",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){\"string\"!=typeof b&&(c=b,b=\"*\");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])\"+\"===d.charAt(0)?(d=d.slice(1)||\"*\",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return\"string\"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e[\"*\"]&&g(\"*\")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while(\"*\"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader(\"Content-Type\"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+\" \"+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if(\"*\"===f)f=i;else if(\"*\"!==i&&i!==f){if(g=j[i+\" \"+f]||j[\"* \"+f],!g)for(e in j)if(h=e.split(\" \"),h[1]===f&&(g=j[i+\" \"+h[0]]||j[\"* \"+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a[\"throws\"])b=g(b);else try{b=g(b)}catch(l){return{state:\"parsererror\",error:g?l:\"No conversion from \"+i+\" to \"+f}}}return{state:\"success\",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:\"GET\",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:\"application\/x-www-form-urlencoded; charset=UTF-8\",accepts:{\"*\":Jc,text:\"text\/plain\",html:\"text\/html\",xml:\"application\/xml, text\/xml\",json:\"application\/json, text\/javascript\"},contents:{xml:\/xml\/,html:\/html\/,json:\/json\/},responseFields:{xml:\"responseXML\",text:\"responseText\",json:\"responseJSON\"},converters:{\"* text\":String,\"text html\":!0,\"text json\":m.parseJSON,\"text xml\":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){\"object\"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks(\"once memory\"),q=k.statusCode||{},r={},s={},t=0,u=\"canceled\",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+\"\").replace(Ac,\"\").replace(Fc,yc[1]+\"\/\/\"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||\"*\").toLowerCase().match(E)||[\"\"],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||(\"http:\"===c[1]?\"80\":\"443\"))===(yc[3]||(\"http:\"===yc[1]?\"80\":\"443\")))),k.data&&k.processData&&\"string\"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger(\"ajaxStart\"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?\"&\":\"?\")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,\"$1_=\"+vc++):e+(wc.test(e)?\"&\":\"?\")+\"_=\"+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader(\"If-Modified-Since\",m.lastModified[e]),m.etag[e]&&v.setRequestHeader(\"If-None-Match\",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader(\"Content-Type\",k.contentType),v.setRequestHeader(\"Accept\",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+(\"*\"!==k.dataTypes[0]?\", \"+Jc+\"; q=0.01\":\"\"):k.accepts[\"*\"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u=\"abort\";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger(\"ajaxSend\",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort(\"timeout\")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,\"No Transport\");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||\"\",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader(\"Last-Modified\"),w&&(m.lastModified[e]=w),w=v.getResponseHeader(\"etag\"),w&&(m.etag[e]=w)),204===a||\"HEAD\"===k.type?x=\"nocontent\":304===a?x=\"notmodified\":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x=\"error\",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+\"\",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?\"ajaxSuccess\":\"ajaxError\",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger(\"ajaxComplete\",[v,k]),--m.active||m.event.trigger(\"ajaxStop\")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,\"json\")},getScript:function(a,b){return m.get(a,void 0,b,\"script\")}}),m.each([\"get\",\"post\"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each([\"ajaxStart\",\"ajaxStop\",\"ajaxComplete\",\"ajaxError\",\"ajaxSuccess\",\"ajaxSend\"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,\"body\")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&\"none\"===(a.style&&a.style.display||m.css(a,\"display\"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=\/%20\/g,Rc=\/\\[\\]$\/,Sc=\/\\r?\\n\/g,Tc=\/^(?:submit|button|image|reset|file)$\/i,Uc=\/^(?:input|select|textarea|keygen)\/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+\"[\"+(\"object\"==typeof e?b:\"\")+\"]\",e,c,d)});else if(c||\"object\"!==m.type(b))d(a,b);else for(e in b)Vc(a+\"[\"+e+\"]\",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?\"\":b,d[d.length]=encodeURIComponent(a)+\"=\"+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join(\"&\").replace(Qc,\"+\")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,\"elements\");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(\":disabled\")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,\"\\r\\n\")}}):{name:b.name,value:c.replace(Sc,\"\\r\\n\")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&\/^(get|post|head|put|delete|options)$\/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on(\"unload\",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&\"withCredentials\"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c[\"X-Requested-With\"]||(c[\"X-Requested-With\"]=\"XMLHttpRequest\");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+\"\");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,\"string\"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=\"\"}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(b){}}m.ajaxSetup({accepts:{script:\"text\/javascript, application\/javascript, application\/ecmascript, application\/x-ecmascript\"},contents:{script:\/(?:java|ecma)script\/},converters:{\"text script\":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter(\"script\",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type=\"GET\",a.global=!1)}),m.ajaxTransport(\"script\",function(a){if(a.crossDomain){var b,c=y.head||m(\"head\")[0]||y.documentElement;return{send:function(d,e){b=y.createElement(\"script\"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||\/loaded|complete\/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,\"success\"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=\/(=)\\?(?=&|$)|\\?\\?\/;m.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var a=_c.pop()||m.expando+\"_\"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter(\"json jsonp\",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?\"url\":\"string\"==typeof b.data&&!(b.contentType||\"\").indexOf(\"application\/x-www-form-urlencoded\")&&ad.test(b.data)&&\"data\");return h||\"jsonp\"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,\"$1\"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?\"&\":\"?\")+b.jsonp+\"=\"+e),b.converters[\"script json\"]=function(){return g||m.error(e+\" was not called\"),g[0]},b.dataTypes[0]=\"json\",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),\"script\"):void 0}),m.parseHTML=function(a,b,c){if(!a||\"string\"!=typeof a)return null;\"boolean\"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if(\"string\"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(\" \");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&\"object\"==typeof b&&(f=\"POST\"),g.length>0&&m.ajax({url:a,type:f,dataType:\"html\",data:b}).done(function(a){e=arguments,g.html(d?m(\"<div>\").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,\"position\"),l=m(a),n={};\"static\"===k&&(a.style.position=\"relative\"),h=l.offset(),f=m.css(a,\"top\"),i=m.css(a,\"left\"),j=(\"absolute\"===k||\"fixed\"===k)&&m.inArray(\"auto\",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),\"using\"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return\"fixed\"===m.css(d,\"position\")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],\"html\")||(c=a.offset()),c.top+=m.css(a[0],\"borderTopWidth\",!0),c.left+=m.css(a[0],\"borderLeftWidth\",!0)),{top:b.top-c.top-m.css(d,\"marginTop\",!0),left:b.left-c.left-m.css(d,\"marginLeft\",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,\"html\")&&\"static\"===m.css(a,\"position\"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(a,b){var c=\/Y\/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each([\"top\",\"left\"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+\"px\":c):void 0})}),m.each({Height:\"height\",Width:\"width\"},function(a,b){m.each({padding:\"inner\"+a,content:b,\"\":\"outer\"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||\"boolean\"!=typeof d),g=c||(d===!0||e===!0?\"margin\":\"border\");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement[\"client\"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body[\"scroll\"+a],e[\"scroll\"+a],b.body[\"offset\"+a],e[\"offset\"+a],e[\"client\"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,\"function\"==typeof define&&define.amd&&define(\"jquery\",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});']] |
||||
src\main\webapp\lib/jquery-ui-1.10.4.custom.min.js | 1 | 1 | 100 % |
|
[[-1,'\/*! jQuery UI - v1.10.4 - 2014-01-25'],[-1,'* http:\/\/jqueryui.com'],[-1,'* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.menu.js, jquery.ui.slider.js'],[-1,'* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT *\/'],[-1,''],[6,'(function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return\"area\"===r?(s=t.parentNode,a=s.name,t.href&&a&&\"map\"===s.nodeName.toLowerCase()?(o=e(\"img[usemap=#\"+a+\"]\")[0],!!o&&n(o)):!1):(\/input|select|textarea|button|object\/.test(r)?!t.disabled:\"a\"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return\"hidden\"===e.css(this,\"visibility\")}).length}var s=0,a=\/^ui-id-\\d+$\/;e.ui=e.ui||{},e.extend(e.ui,{version:\"1.10.4\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return\"number\"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&\/(static|relative)\/.test(this.css(\"position\"))||\/absolute\/.test(this.css(\"position\"))?this.parents().filter(function(){return\/(relative|absolute|fixed)\/.test(e.css(this,\"position\"))&&\/(auto|scroll)\/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0):this.parents().filter(function(){return\/(auto|scroll)\/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0),\/fixed\/.test(this.css(\"position\"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css(\"zIndex\",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css(\"position\"),(\"absolute\"===n||\"relative\"===n||\"fixed\"===n)&&(s=parseInt(a.css(\"zIndex\"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr(\"id\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,\"tabindex\")))},tabbable:function(t){var n=e.attr(t,\"tabindex\"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e(\"<a>\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,\"padding\"+this))||0,n&&(i-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),s&&(i-=parseFloat(e.css(t,\"margin\"+this))||0)}),i}var a=\"Width\"===n?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+n]=function(i){return i===t?r[\"inner\"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+\"px\")})},e.fn[\"outer\"+n]=function(t,i){return\"number\"!=typeof t?r[\"outer\"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+\"px\")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e(\"<a>\").data(\"a-b\",\"a\").removeData(\"a-b\").data(\"a-b\")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!\/msie [\\w.]+\/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart=\"onselectstart\"in document.createElement(\"div\"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if(\"hidden\"===e(t).css(\"overflow\"))return!1;var n=i&&\"left\"===i?\"scrollLeft\":\"scrollTop\",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler(\"remove\")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(\".\")[0];i=i.split(\".\")[1],o=c+\"-\"+i,n||(n=s,s=t.Widget),t.expr[\":\"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+\".\"+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r=\"string\"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&\"_\"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error(\"no such method \'\"+a+\"\' for \"+i+\" widget instance\"):t.error(\"cannot call methods on \"+i+\" prior to initialization; \"+\"attempted to call method \'\"+a+\"\'\")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:\"widget\",widgetEventPrefix:\"\",defaultElement:\"<div>\",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled \"+\"ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if(\"string\"==typeof i)if(r={},n=i.split(\".\"),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,\"disabled\"===t&&(this.widget().toggleClass(this.widgetFullName+\"-disabled ui-state-disabled\",!!e).attr(\"aria-disabled\",e),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")),this},enable:function(){return this._setOption(\"disabled\",!1)},disable:function(){return this._setOption(\"disabled\",!0)},_on:function(i,s,n){var o,a=this;\"boolean\"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass(\"ui-state-disabled\")?(\"string\"==typeof r?a[r]:r).apply(a,arguments):e}\"string\"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(\/^(\\w+)\\s*(.*)$\/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||\"\").split(\" \").join(this.eventNamespace+\" \")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return(\"string\"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass(\"ui-state-hover\")},mouseleave:function(e){t(e.currentTarget).removeClass(\"ui-state-hover\")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass(\"ui-state-focus\")},focusout:function(e){t(e.currentTarget).removeClass(\"ui-state-focus\")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:\"fadeIn\",hide:\"fadeOut\"},function(e,i){t.Widget.prototype[\"_\"+e]=function(s,n,o){\"string\"==typeof n&&(n={effect:n});var a,r=n?n===!0||\"number\"==typeof n?i:n.effect||i:e;n=n||{},\"number\"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget(\"ui.mouse\",{version:\"1.10.4\",options:{cancel:\"input,textarea,button,select,option\",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind(\"mousedown.\"+this.widgetName,function(t){return e._mouseDown(t)}).bind(\"click.\"+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+\".preventClickEvent\")?(t.removeData(i.target,e.widgetName+\".preventClickEvent\"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind(\".\"+this.widgetName),this._mouseMoveDelegate&&t(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a=\"string\"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+\".preventClickEvent\")&&t.removeData(i.target,this.widgetName+\".preventClickEvent\"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).bind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e\/100:1),parseFloat(t[1])*(p.test(t[1])?i\/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=\/left|center|right\/,c=\/top|center|bottom\/,u=\/[\\+\\-]\\d+(\\.[\\d]+)?%?\/,d=\/^\\w+\/,p=\/%$\/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t(\"<div style=\'display:block;position:absolute;width:50px;height:50px;overflow:hidden;\'><div style=\'height:100px;width:auto;\'><\/div><\/div>\"),o=n.children()[0];return t(\"body\").append(n),i=o.offsetWidth,n.css(\"overflow\",\"scroll\"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?\"\":e.element.css(\"overflow-x\"),s=e.isWindow||e.isDocument?\"\":e.element.css(\"overflow-y\"),n=\"scroll\"===i||\"auto\"===i&&e.width<e.element[0].scrollWidth,a=\"scroll\"===s||\"auto\"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),k=t.position.getScrollInfo(y),w=(e.collision||\"flip\").split(\" \"),D={};return _=n(b),b[0].preventDefault&&(e.at=\"left top\"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each([\"my\",\"at\"],function(){var t,i,s=(e[this]||\"\").split(\" \");1===s.length&&(s=h.test(s[0])?s.concat([\"center\"]):c.test(s[0])?[\"center\"].concat(s):[\"center\",\"center\"]),s[0]=h.test(s[0])?s[0]:\"center\",s[1]=c.test(s[1])?s[1]:\"center\",t=u.exec(s[0]),i=u.exec(s[1]),D[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===w.length&&(w[1]=w[0]),\"right\"===e.at[0]?v.left+=p:\"center\"===e.at[0]&&(v.left+=p\/2),\"bottom\"===e.at[1]?v.top+=g:\"center\"===e.at[1]&&(v.top+=g\/2),a=i(D.at,p,g),v.left+=a[0],v.top+=a[1],this.each(function(){var n,h,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,\"marginLeft\"),_=s(this,\"marginTop\"),x=u+f+s(this,\"marginRight\")+k.width,C=d+_+s(this,\"marginBottom\")+k.height,M=t.extend({},v),T=i(D.my,c.outerWidth(),c.outerHeight());\"right\"===e.my[0]?M.left-=u:\"center\"===e.my[0]&&(M.left-=u\/2),\"bottom\"===e.my[1]?M.top-=d:\"center\"===e.my[1]&&(M.top-=d\/2),M.left+=T[0],M.top+=T[1],t.support.offsetFractions||(M.left=l(M.left),M.top=l(M.top)),n={marginLeft:f,marginTop:_},t.each([\"left\",\"top\"],function(i,s){t.ui.position[w[i]]&&t.ui.position[w[i]][s](M,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:x,collisionHeight:C,offset:[a[0]+T[0],a[1]+T[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(h=function(t){var i=m.left-M.left,s=i+p-u,n=m.top-M.top,a=n+g-d,l={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:M.left,top:M.top,width:u,height:d},horizontal:0>s?\"left\":i>0?\"right\":\"center\",vertical:0>a?\"top\":n>0?\"bottom\":\"middle\"};u>p&&p>r(i+s)&&(l.horizontal=\"center\"),d>g&&g>r(n+a)&&(l.vertical=\"middle\"),l.important=o(r(i),r(s))>o(r(n),r(a))?\"horizontal\":\"vertical\",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d=\"left\"===e.my[0]?-e.elemWidth:\"right\"===e.my[0]?e.elemWidth:0,p=\"left\"===e.at[0]?e.targetWidth:\"right\"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d=\"top\"===e.my[1],p=d?-e.elemHeight:\"bottom\"===e.my[1]?e.elemHeight:0,f=\"top\"===e.at[1]?e.targetHeight:\"bottom\"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName(\"body\")[0],r=document.createElement(\"div\");e=document.createElement(o?\"div\":\"body\"),s={visibility:\"hidden\",width:0,height:0,border:0,margin:0,background:\"none\"},o&&t.extend(s,{position:\"absolute\",left:\"-1000px\",top:\"-1000px\"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText=\"position: absolute; left: 10.7432222px;\",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML=\"\",i.removeChild(e)}()})(jQuery);(function(e){e.widget(\"ui.autocomplete\",{version:\"1.10.4\",defaultElement:\"<input>\",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a=\"textarea\"===n,o=\"input\"===n;this.isMultiLine=a?!0:o?!1:this.element.prop(\"isContentEditable\"),this.valueMethod=this.element[a||o?\"val\":\"text\"],this.isNewMenu=!0,this.element.addClass(\"ui-autocomplete-input\").attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(n){if(this.element.prop(\"readOnly\"))return t=!0,s=!0,i=!0,undefined;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move(\"previousPage\",n);break;case a.PAGE_DOWN:t=!0,this._move(\"nextPage\",n);break;case a.UP:t=!0,this._keyEvent(\"previous\",n);break;case a.DOWN:t=!0,this._keyEvent(\"next\",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(\":visible\")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(\":visible\"))&&s.preventDefault(),undefined;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move(\"previousPage\",s);break;case n.PAGE_DOWN:this._move(\"nextPage\",s);break;case n.UP:this._keyEvent(\"previous\",s);break;case n.DOWN:this._keyEvent(\"next\",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e(\"<ul>\").addClass(\"ui-autocomplete ui-front\").appendTo(this._appendTo()).menu({role:null}).hide().data(\"ui-menu\"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(\".ui-menu-item\").length||this._delay(function(){var t=this;this.document.one(\"mousedown\",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&\/^mouse\/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one(\"mousemove\",function(){e(t.target).trigger(t.originalEvent)}),undefined;var s=i.item.data(\"ui-autocomplete-item\");!1!==this._trigger(\"focus\",t,{item:s})?t.originalEvent&&\/^key\/.test(t.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(e,t){var i=t.item.data(\"ui-autocomplete-item\"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger(\"select\",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e(\"<span>\",{role:\"status\",\"aria-live\":\"polite\"}).addClass(\"ui-helper-hidden-accessible\").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass(\"ui-autocomplete-input\").removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),\"source\"===e&&this._initSource(),\"appendTo\"===e&&this.menu.element.appendTo(this._appendTo()),\"disabled\"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(\".ui-front\")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):\"string\"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:\"json\",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger(\"search\",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass(\"ui-autocomplete-loading\"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass(\"ui-autocomplete-loading\")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger(\"response\",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger(\"open\")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(\":visible\")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger(\"close\",e))},_change:function(e){this.previous!==this._value()&&this._trigger(\"change\",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return\"string\"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width(\"\").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data(\"ui-autocomplete-item\",t)},_renderItem:function(t,i){return e(\"<li>\").append(e(\"<a>\").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(\":visible\")?this.menu.isFirstItem()&&\/^previous\/.test(e)||this.menu.isLastItem()&&\/^next\/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(\":visible\"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(\/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]\/g,\"\\\\$&\")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),\"i\");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget(\"ui.autocomplete\",e.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(e){return e+(e>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(t){t.widget(\"ui.menu\",{version:\"1.10.4\",defaultElement:\"<ul>\",delay:300,options:{icons:{submenu:\"ui-icon-carat-1-e\"},menus:\"ul\",position:{my:\"left top\",at:\"right top\"},role:\"menu\",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass(\"ui-menu ui-widget ui-widget-content ui-corner-all\").toggleClass(\"ui-menu-icons\",!!this.element.find(\".ui-icon\").length).attr({role:this.options.role,tabIndex:0}).bind(\"click\"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass(\"ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this._on({\"mousedown .ui-menu-item > a\":function(t){t.preventDefault()},\"click .ui-state-disabled > a\":function(t){t.preventDefault()},\"click .ui-menu-item:has(a)\":function(e){var i=t(e.target).closest(\".ui-menu-item\");!this.mouseHandled&&i.not(\".ui-state-disabled\").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(\".ui-menu\").length?this.expand(e):!this.element.is(\":focus\")&&t(this.document[0].activeElement).closest(\".ui-menu\").length&&(this.element.trigger(\"focus\",[!0]),this.active&&1===this.active.parents(\".ui-menu\").length&&clearTimeout(this.timer)))},\"mouseenter .ui-menu-item\":function(e){var i=t(e.currentTarget);i.siblings().children(\".ui-state-active\").removeClass(\"ui-state-active\"),this.focus(e,i)},mouseleave:\"collapseAll\",\"mouseleave .ui-menu\":\"collapseAll\",focus:function(t,e){var i=this.active||this.element.children(\".ui-menu-item\").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:\"_keydown\"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(\".ui-menu\").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr(\"aria-activedescendant\").find(\".ui-menu\").addBack().removeClass(\"ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons\").removeAttr(\"role\").removeAttr(\"tabIndex\").removeAttr(\"aria-labelledby\").removeAttr(\"aria-expanded\").removeAttr(\"aria-hidden\").removeAttr(\"aria-disabled\").removeUniqueId().show(),this.element.find(\".ui-menu-item\").removeClass(\"ui-menu-item\").removeAttr(\"role\").removeAttr(\"aria-disabled\").children(\"a\").removeUniqueId().removeClass(\"ui-corner-all ui-state-hover\").removeAttr(\"tabIndex\").removeAttr(\"role\").removeAttr(\"aria-haspopup\").children().each(function(){var e=t(this);e.data(\"ui-menu-submenu-carat\")&&e.remove()}),this.element.find(\".ui-menu-divider\").removeClass(\"ui-menu-divider ui-widget-content\")},_keydown:function(e){function i(t){return t.replace(\/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]\/g,\"\\\\$&\")}var s,n,a,o,r,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move(\"first\",\"first\",e);break;case t.ui.keyCode.END:this._move(\"last\",\"last\",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(\".ui-state-disabled\")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,n=this.previousFilter||\"\",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp(\"^\"+i(a),\"i\"),s=this.activeMenu.children(\".ui-menu-item\").filter(function(){return r.test(t(this).children(\"a\").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(\".ui-menu-item\"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp(\"^\"+i(a),\"i\"),s=this.activeMenu.children(\".ui-menu-item\").filter(function(){return r.test(t(this).children(\"a\").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(\".ui-state-disabled\")||(this.active.children(\"a[aria-haspopup=\'true\']\").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass(\"ui-menu-icons\",!!this.element.find(\".ui-icon\").length),s.filter(\":not(.ui-menu)\").addClass(\"ui-menu ui-widget ui-widget-content ui-corner-all\").hide().attr({role:this.options.role,\"aria-hidden\":\"true\",\"aria-expanded\":\"false\"}).each(function(){var e=t(this),s=e.prev(\"a\"),n=t(\"<span>\").addClass(\"ui-menu-icon ui-icon \"+i).data(\"ui-menu-submenu-carat\",!0);s.attr(\"aria-haspopup\",\"true\").prepend(n),e.attr(\"aria-labelledby\",s.attr(\"id\"))}),e=s.add(this.element),e.children(\":not(.ui-menu-item):has(a)\").addClass(\"ui-menu-item\").attr(\"role\",\"presentation\").children(\"a\").uniqueId().addClass(\"ui-corner-all\").attr({tabIndex:-1,role:this._itemRole()}),e.children(\":not(.ui-menu-item)\").each(function(){var e=t(this);\/[^\\-\\u2014\\u2013\\s]\/.test(e.text())||e.addClass(\"ui-widget-content ui-menu-divider\")}),e.children(\".ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:\"menuitem\",listbox:\"option\"}[this.options.role]},_setOption:function(t,e){\"icons\"===t&&this.element.find(\".ui-menu-icon\").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&\"focus\"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(\"a\").addClass(\"ui-state-focus\"),this.options.role&&this.element.attr(\"aria-activedescendant\",s.attr(\"id\")),this.active.parent().closest(\".ui-menu-item\").children(\"a:first\").addClass(\"ui-state-active\"),t&&\"keydown\"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(\".ui-menu\"),i.length&&t&&\/^mouse\/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger(\"focus\",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],\"borderTopWidth\"))||0,s=parseFloat(t.css(this.activeMenu[0],\"paddingTop\"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children(\"a\").removeClass(\"ui-state-focus\"),this.active=null,this._trigger(\"blur\",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),\"true\"===t.attr(\"aria-hidden\")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(\".ui-menu\").not(e.parents(\".ui-menu\")).hide().attr(\"aria-hidden\",\"true\"),e.show().removeAttr(\"aria-hidden\").attr(\"aria-expanded\",\"true\").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(\".ui-menu\"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(\".ui-menu\").hide().attr(\"aria-hidden\",\"true\").attr(\"aria-expanded\",\"false\").end().find(\"a.ui-state-active\").removeClass(\"ui-state-active\")},collapse:function(t){var e=this.active&&this.active.parent().closest(\".ui-menu-item\",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(\".ui-menu \").children(\".ui-menu-item\").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move(\"next\",\"first\",t)},previous:function(t){this._move(\"prev\",\"last\",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(\".ui-menu-item\").length},isLastItem:function(){return this.active&&!this.active.nextAll(\".ui-menu-item\").length},_move:function(t,e,i){var s;this.active&&(s=\"first\"===t||\"last\"===t?this.active[\"first\"===t?\"prevAll\":\"nextAll\"](\".ui-menu-item\").eq(-1):this.active[t+\"All\"](\".ui-menu-item\").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(\".ui-menu-item\")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(\".ui-menu-item\").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(\".ui-menu-item\")[this.active?\"last\":\"first\"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(\".ui-menu-item\").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(\".ui-menu-item\").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop(\"scrollHeight\")},select:function(e){this.active=this.active||t(e.target).closest(\".ui-menu-item\");var i={item:this.active};this.active.has(\".ui-menu\").length||this.collapseAll(e,!0),this._trigger(\"select\",e,i)}})})(jQuery);(function(t){var e=5;t.widget(\"ui.slider\",t.ui.mouse,{version:\"1.10.4\",widgetEventPrefix:\"slide\",options:{animate:!1,distance:0,max:100,min:0,orientation:\"horizontal\",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass(\"ui-slider ui-slider-\"+this.orientation+\" ui-widget\"+\" ui-widget-content\"+\" ui-corner-all\"),this._refresh(),this._setOption(\"disabled\",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(\".ui-slider-handle\").addClass(\"ui-state-default ui-corner-all\"),a=\"<a class=\'ui-slider-handle ui-state-default ui-corner-all\' href=\'#\'><\/a>\",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join(\"\")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data(\"ui-slider-handle-index\",e)})},_createRange:function(){var e=this.options,i=\"\";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass(\"ui-slider-range-min ui-slider-range-max\").css({left:\"\",bottom:\"\"}):(this.range=t(\"<div><\/div>\").appendTo(this.element),i=\"ui-slider-range ui-widget-header ui-corner-all\"),this.range.addClass(i+(\"min\"===e.range||\"max\"===e.range?\" ui-slider-range-\"+e.range:\"\"))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter(\"a\");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass(\"ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all\"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass(\"ui-state-active\").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(\".ui-slider-handle\"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()\/2,top:e.pageY-l.top-a.height()\/2-(parseInt(a.css(\"borderTopWidth\"),10)||0)-(parseInt(a.css(\"borderBottomWidth\"),10)||0)+(parseInt(a.css(\"marginTop\"),10)||0)},this.handles.hasClass(\"ui-state-hover\")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass(\"ui-state-active\"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=\"vertical\"===this.options.orientation?\"vertical\":\"horizontal\"},_normValueFromMouse:function(t){var e,i,s,n,a;return\"horizontal\"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i\/e,s>1&&(s=1),0>s&&(s=0),\"vertical\"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger(\"start\",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger(\"slide\",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger(\"slide\",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger(\"stop\",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger(\"change\",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch(\"range\"===e&&this.options.range===!0&&(\"min\"===i?(this.options.value=this._values(0),this.options.values=null):\"max\"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case\"orientation\":this._detectOrientation(),this.element.removeClass(\"ui-slider-horizontal ui-slider-vertical\").addClass(\"ui-slider-\"+this.orientation),this._refreshValue();break;case\"value\":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case\"values\":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case\"min\":case\"max\":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case\"range\":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())\/(l._valueMax()-l._valueMin())),u[\"horizontal\"===l.orientation?\"left\":\"bottom\"]=i+\"%\",t(this).stop(1,1)[h?\"animate\":\"css\"](u,r.animate),l.options.range===!0&&(\"horizontal\"===l.orientation?(0===s&&l.range.stop(1,1)[h?\"animate\":\"css\"]({left:i+\"%\"},r.animate),1===s&&l.range[h?\"animate\":\"css\"]({width:i-e+\"%\"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?\"animate\":\"css\"]({bottom:i+\"%\"},r.animate),1===s&&l.range[h?\"animate\":\"css\"]({height:i-e+\"%\"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)\/(a-n)):0,u[\"horizontal\"===this.orientation?\"left\":\"bottom\"]=i+\"%\",this.handle.stop(1,1)[h?\"animate\":\"css\"](u,r.animate),\"min\"===o&&\"horizontal\"===this.orientation&&this.range.stop(1,1)[h?\"animate\":\"css\"]({width:i+\"%\"},r.animate),\"max\"===o&&\"horizontal\"===this.orientation&&this.range[h?\"animate\":\"css\"]({width:100-i+\"%\"},{queue:!1,duration:r.animate}),\"min\"===o&&\"vertical\"===this.orientation&&this.range.stop(1,1)[h?\"animate\":\"css\"]({height:i+\"%\"},r.animate),\"max\"===o&&\"vertical\"===this.orientation&&this.range[h?\"animate\":\"css\"]({height:100-i+\"%\"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data(\"ui-slider-handle-index\");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass(\"ui-state-active\"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())\/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())\/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data(\"ui-slider-handle-index\");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass(\"ui-state-active\"))}}})})(jQuery);']] |
||||
src\test\js\lib/jasmin_util.js | 7 | 7 | 100 % |
|
[[1,'beforeEach(function() {'],[23,'\tthis.addMatchers({'],[-1,'\t\t\/**'],[-1,'\t\t * A matcher that tests for instanceof.'],[-1,'\t\t * '],[-1,'\t\t * @param type'],[-1,'\t\t * @returns {Boolean} true when actual is an instance of expected'],[-1,'\t\t *\/'],[-1,'\t\ttoBeInstanceOf : function(type) {'],[1,'\t\t\tvar actual = this.actual;'],[1,'\t\t\tvar notText = this.isNot ? \"not\" : \"\";'],[-1,''],[1,'\t\t\tthis.message = function() {'],[1,'\t\t\t\treturn \"Expected \" + actual + \" to \" + notText + \" be instance of \" + expected;'],[-1,'\t\t\t};'],[-1,''],[1,'\t\t\treturn this.actual instanceof type;'],[-1,'\t\t}'],[-1,'\t});'],[-1,'});']] |