UNPKG

endpointjs

Version:

Endpoint.js enables modules within a web application to discover and use each other, whether that be on the same web page, other browser windows and tabs, iframes, servers and web workers in a reactive way by providing robust discovery, execution and stre

2 lines 858 kB
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d=a("./util/appUtils"),e=a("./core/const"),f=a("./core/objectFactory"),g=a("./core/facade"),h=d.getGlobalObject();h.mapapi=g,h.mapapi.constant=e,h.mapapi.factory=f,h.mapapi.VERSION="0.9.12"},{"./core/const":4,"./core/facade":5,"./core/objectFactory":7,"./util/appUtils":20}],2:[function(a,b,c){"use strict";function d(){this._clickListeners={},this._hoverListeners={},this._mapMoveListeners={},this._zoomEndListeners={},this._outListeners={}}var e=a("lodash");d.prototype.registerClickListener=function(a,b){this._clickListeners[a]=b},d.prototype.unregisterClickListener=function(a){void 0!==this._clickListeners[a]&&(this._clickListeners[a]=void 0)},d.prototype.handleClickEvent=function(a){e.forOwn(this._clickListeners,function(b,c){void 0!==b&&b(a)})},d.prototype.registerHoverListener=function(a,b){this._hoverListeners[a]=b},d.prototype.unregisterHoverListener=function(a){void 0!==this._hoverListeners[a]&&(this._hoverListeners[a]=void 0)},d.prototype.handleHoverEvent=function(a){e.forOwn(this._hoverListeners,function(b,c){void 0!==b&&b(a)})},d.prototype.registerMapMoveListener=function(a,b){this._mapMoveListeners[a]=b},d.prototype.unregisterMapMoveListener=function(a){void 0!==this._mapMoveListeners[a]&&(this._mapMoveListeners[a]=void 0)},d.prototype.handleMapMoveEvent=function(a){e.forOwn(this._mapMoveListeners,function(b,c){void 0!==b&&b(a)})},d.prototype.registerZoomEndListener=function(a,b){this._zoomEndListeners[a]=b},d.prototype.unregisterZoomEndListener=function(a){void 0!==this._zoomEndListeners[a]&&(this._zoomEndListeners[a]=void 0)},d.prototype.handleZoomEndEvent=function(a){e.forOwn(this._zoomEndListeners,function(b,c){void 0!==b&&b(a)})},d.prototype.registerOutListener=function(a,b){this._outListeners[a]=b},d.prototype.unregisterOutListener=function(a){void 0!==this._outListeners[a]&&(this._outListeners[a]=void 0)},d.prototype.handleOutEvent=function(a){e.forOwn(this._outListeners,function(b,c){void 0!==b&&b(a)})},b.exports=d},{lodash:22}],3:[function(a,b,c){"use strict";var d={},e={registerAdapter:function(a,b){d[a]=b},getAdapter:function(a){return d[a]}};b.exports=e},{}],4:[function(a,b,c){"use strict";var d={mapType:{OPENLAYERS:"OpenLayers",LEAFLET:"Leaflet",OPENLAYERS3:"OpenLayers3"}};b.exports=d},{}],5:[function(a,b,c){"use strict";var d=a("lodash"),e=(a("./const"),a("./mapManager")),f=a("./objectValidator"),g=a("./adapterManager"),h={createMap:function(a,b,c,e){var h=arguments.length>=2&&arguments.length<=4&&d.isString(a)&&!d.isEmpty(a)&&d.isString(b)&&!d.isEmpty(b)&&(d.isUndefined(c)||d.isFunction(c))&&(d.isUndefined(e)||f.isArcGIS93RestLayer(e)||f.isArcGISCacheLayer(e)||f.isWmtsLayer(e)||f.isWmsLayer(e)||f.isKMLLayer(e)||f.isGeoJsonLayer(e));if(!h)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(b).createMapObject(a,c,e)},destroyMap:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");e.setActiveMap(a),g.getAdapter(e.getActiveMapType()).destroyMap(),e.unregisterMapInstance(a)},resetMap:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");var c=e.getMapType(a);this.destroyMap(a),this.createMap(a,c)},setActiveMap:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");e.setActiveMap(a)},updateSize:function(a){var b=0===arguments.length||1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");a&&e.setActiveMap(a),g.getAdapter(e.getActiveMapType()).updateSize()},clearAllFeatures:function(){g.getAdapter(e.getActiveMapType()).clearAllFeatures()},zoomIn:function(){g.getAdapter(e.getActiveMapType()).zoomIn()},zoomOut:function(){g.getAdapter(e.getActiveMapType()).zoomOut()},getZoom:function(){return g.getAdapter(e.getActiveMapType()).getZoom()},setZoom:function(a){var b=1==arguments.length&&d.isNumber(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).setZoom(a)},zoomToMaxExtent:function(){g.getAdapter(e.getActiveMapType()).zoomToMaxExtent()},zoomToData:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).zoomToData(a)},getCenter:function(){return g.getAdapter(e.getActiveMapType()).getCenter()},setCenter:function(a){var b=1==arguments.length&&f.isCoordinate(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).setCenter(a)},addPoint:function(a,b,c,h){var i=arguments.length>=3&&arguments.length<=4&&d.isString(a)&&!d.isEmpty(a)&&d.isString(b)&&!d.isEmpty(b)&&f.isCoordinate(c)&&(d.isUndefined(h)||f.isImage(h));if(!i)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addPoint(a,b,c,h)},removePoint:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).removePoint(a)},addPolygon:function(a,b,c){var h=3==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isString(b)&&!d.isEmpty(b)&&d.isArray(c),i=!0;if(d.forEach(c,function(a){f.isCoordinate(a)||(i=!1)}),!h||!i)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addPolygon(a,b,c)},removePolygon:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).removePolygon(a)},addLine:function(a,b,c){var h=3==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isString(b)&&!d.isEmpty(b)&&d.isArray(c),i=!0;if(d.forEach(c,function(a){f.isCoordinate(a)||(i=!1)}),!h||!i)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addLine(a,b,c)},removeLine:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).removeLine(a)},addMultipoint:function(a,b,c){var h=3==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isString(b)&&!d.isEmpty(b)&&d.isArray(c),i=!0;if(d.forEach(c,function(a){f.isCoordinate(a)||(i=!1)}),!h||!i)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addMultipoint(a,b,c)},removeMultipoint:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).removeMultipoint(a)},getFeatures:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");return g.getAdapter(e.getActiveMapType()).getFeatures(a)},registerClickListener:function(a,b){var c=2==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isFunction(b);if(!c)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).registerClickListener(a,b)},unregisterClickListener:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).unregisterClickListener(a)},registerHoverListener:function(a,b){var c=2==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isFunction(b);if(!c)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).registerHoverListener(a,b)},unregisterHoverListener:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).unregisterHoverListener(a)},registerMapMoveListener:function(a,b){var c=2==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isFunction(b);if(!c)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).registerMapMoveListener(a,b)},unregisterMapMoveListener:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).unregisterMapMoveListener(a)},registerZoomEndListener:function(a,b){var c=2==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isFunction(b);if(!c)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).registerZoomEndListener(a,b)},unregisterZoomEndListener:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).unregisterZoomEndListener(a)},registerOutListener:function(a,b){var c=2==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isFunction(b);if(!c)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).registerOutListener(a,b)},unregisterOutListener:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).unregisterOutListener(a)},setBaseLayer:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).setBaseLayer(a)},addWmsLayer:function(a){var b=1==arguments.length&&f.isWmsLayer(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addWmsLayer(a)},addWmtsLayer:function(a){var b=1==arguments.length&&f.isWmtsLayer(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addWmtsLayer(a)},removeLayer:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).removeLayer(a)},toggleLayer:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).toggleLayer(a)},getLayerOrder:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");return g.getAdapter(e.getActiveMapType()).getLayerOrder(a)},setLayerOrder:function(a,b){var c=2==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isNumber(b);if(!c)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).setLayerOrder(a,b)},getLayerOpacity:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");return g.getAdapter(e.getActiveMapType()).getLayerOpacity(a)},setLayerOpacity:function(a,b){var c=2==arguments.length&&d.isString(a)&&!d.isEmpty(a)&&d.isNumber(b);if(!c)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).setLayerOpacity(a,b)},getLayer:function(a){var b=1==arguments.length&&d.isString(a)&&!d.isEmpty(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");return g.getAdapter(e.getActiveMapType()).getLayer(a)},toggleZoomControl:function(){g.getAdapter(e.getActiveMapType()).toggleZoom()},toggleScaleControl:function(){g.getAdapter(e.getActiveMapType()).toggleScale()},toggleCoordinatesControl:function(){g.getAdapter(e.getActiveMapType()).toggleCoordinates()},toggleGraticuleControl:function(){g.getAdapter(e.getActiveMapType()).toggleGraticule()},getActiveMapObject:function(){return e.getActiveMapObject()},addKml:function(a){var b=1==arguments.length&&f.isKMLLayer(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addKml(a)},addGeoJson:function(a){var b=1==arguments.length&&f.isGeoJsonLayer(a);if(!b)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addGeoJson(a)},addVectorLayer:function(a,b){var c=arguments.length>=1&&arguments.length<=2&&d.isString(a)&&!d.isEmpty(a)&&(d.isUndefined(b)||d.isObject(b));if(!c)throw new Error("Invalid parameters: please reference API documentation for correct usage");g.getAdapter(e.getActiveMapType()).addVectorLayer(a,b)}};b.exports=h},{"./adapterManager":3,"./const":4,"./mapManager":6,"./objectValidator":8,lodash:22}],6:[function(a,b,c){"use strict";var d,e=(a("./const"),{}),f={registerMapInstance:function(a,b,c){if(void 0!==e[a])throw new Error('There is an existing map instance bound to "'+a+'" that must be destroyed prior to instantiating a new map with that ID.');e[a]={div:a,type:b,obj:c}},setActiveMap:function(a){if(void 0===e[a])throw new Error("There is no active map instance for divId="+a);d=e[a]},unregisterMapInstance:function(a){if(void 0!==e[a]){if(e[a]===d){d=void 0;for(var b in e)if(b!==a&&e.hasOwnProperty(b)&&void 0!==e[b]){d=e[b];break}}e[a]=void 0}},getActiveMapType:function(){if(void 0===d)throw new Error("There is no active map.");return d.type},getActiveMapObject:function(){if(void 0!==d&&void 0!==d.obj)return d.obj;throw new Error("There is no active map.")},getMapType:function(a){if(void 0!==e[a])return e[a].type;throw new Error("There is no active map with ID="+a)}};b.exports=f},{"./const":4}],7:[function(a,b,c){"use strict";var d=a("./object/Coordinate"),e=a("./object/Image"),f=a("./object/GeoJsonLayer"),g=a("./object/KMLLayer"),h=a("./object/WMSLayer"),i=a("./object/WMTSLayer"),j=a("./object/ArcGIS93RestLayer"),k=a("./object/ArcGISCacheLayer"),l={coordinate:function(a,b){return new d(a,b)},image:function(a,b,c){return new e(a,b,c)},geoJsonLayer:function(a,b){return new f(a,b)},kmlLayer:function(a,b){return new g(a,b)},wmsLayer:function(a,b,c){return new h(a,b,c)},wmtsLayer:function(a,b,c,d,e){return new i(a,b,c,d,e)},arcGIS93RestLayer:function(a){return new j(a)},arcGISCacheLayer:function(a){return new k(a)}};b.exports=l},{"./object/ArcGIS93RestLayer":9,"./object/ArcGISCacheLayer":10,"./object/Coordinate":11,"./object/GeoJsonLayer":12,"./object/Image":13,"./object/KMLLayer":14,"./object/WMSLayer":15,"./object/WMTSLayer":16}],8:[function(a,b,c){"use strict";var d=a("./object/Coordinate"),e=a("./object/Image"),f=a("./object/GeoJsonLayer"),g=a("./object/KMLLayer"),h=a("./object/WMSLayer"),i=a("./object/WMTSLayer"),j=a("./object/ArcGIS93RestLayer"),k=a("./object/ArcGISCacheLayer"),l={isCoordinate:function(a){return a instanceof d.prototype.constructor},isImage:function(a){return a instanceof e.prototype.constructor},isGeoJsonLayer:function(a){return a instanceof f.prototype.constructor},isKMLLayer:function(a){return a instanceof g.prototype.constructor},isWmsLayer:function(a){return a instanceof h.prototype.constructor},isWmtsLayer:function(a){return a instanceof i.prototype.constructor},isArcGIS93RestLayer:function(a){return a instanceof j.prototype.constructor},isArcGISCacheLayer:function(a){return a instanceof k.prototype.constructor}};b.exports=l},{"./object/ArcGIS93RestLayer":9,"./object/ArcGISCacheLayer":10,"./object/Coordinate":11,"./object/GeoJsonLayer":12,"./object/Image":13,"./object/KMLLayer":14,"./object/WMSLayer":15,"./object/WMTSLayer":16}],9:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))throw new TypeError("ArcGIS93RestLayer constructor cannot be called as a function.");if(!e.isString(a))throw new TypeError("Cannot construct ArcGIS93RestLayer due to incorrect parameter type(s). Please reference API documentation.");if(e.isEmpty(a)||!f.isURL(a))throw new Error("Cannot construct ArcGIS93RestLayer due to bad parameter value(s). Please reference API documentation.");this._url=a}var e=a("lodash"),f=a("../../../../node_modules/validator/validator.min");d.prototype.getUrl=function(){return this._url},d.prototype.getLayers=function(){return this._layers},d.prototype.setLayers=function(a){if(!e.isArray(a)||e.isEmpty(a))throw new Error("layers must be a non-empty Array");e.forEach(a,function(a){if(!e.isString(a)||e.isEmpty(a))throw new Error("each layer must be a non-empty string")}),this._layers=a},d.prototype.getNumZoomLevels=function(){return this.numZoomLevels},d.prototype.setNumZoomLevels=function(a){if(!e.isNumber(a))throw new Error("Cannot set numZoomLevels. Parameter must be a number.");this.numZoomLevels=a},b.exports=d},{"../../../../node_modules/validator/validator.min":23,lodash:22}],10:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))throw new TypeError("ArcGISCacheLayer constructor cannot be called as a function.");if(!e.isString(a))throw new TypeError("Cannot construct ArcGISCacheLayer due to incorrect parameter type(s). Please reference API documentation.");if(e.isEmpty(a)||!f.isURL(a))throw new Error("Cannot construct ArcGISCacheLayer due to bad parameter value(s). Please reference API documentation.");this._url=a}var e=a("lodash"),f=a("../../../../node_modules/validator/validator.min");d.prototype.getUrl=function(){return this._url},d.prototype.getLayers=function(){return this._layers},d.prototype.setLayers=function(a){if(!e.isArray(a)||e.isEmpty(a))throw new Error("layers must be a non-empty Array");e.forEach(a,function(a){if(!e.isString(a)||e.isEmpty(a))throw new Error("each layer must be a non-empty string")}),this._layers=a},d.prototype.getNumZoomLevels=function(){return this.numZoomLevels},d.prototype.setNumZoomLevels=function(a){if(!e.isNumber(a))throw new Error("Cannot set numZoomLevels. Parameter must be a number.");this.numZoomLevels=a},b.exports=d},{"../../../../node_modules/validator/validator.min":23,lodash:22}],11:[function(a,b,c){"use strict";function d(a,b){if(!(this instanceof d))throw new TypeError("Coordinate constructor cannot be called as a function.");if(!e.isNumber(a)||!e.isNumber(b))throw new TypeError("Cannot construct Coordinate due to incorrect parameter type(s). Please reference API documentation.");if(-90>a||a>90||-180>b||b>180)throw new RangeError("Cannot construct Coordinate object due to bad input values. Latitude ranges from -90 to 90 and Longitude ranges from -180 to 180!");this._lat=a,this._lng=b}var e=a("lodash");d.prototype.getLatitude=function(){return this._lat},d.prototype.getLongitude=function(){return this._lng},b.exports=d},{lodash:22}],12:[function(a,b,c){"use strict";function d(a,b){if(!(this instanceof d))throw new TypeError("GeoJsonlayer constructor cannot be called as a function.");if(!e.isString(a)||!e.isString(b))throw new TypeError("Cannot construct GeoJsonlayer due to incorrect parameter type(s). Please reference API documentation.");if(e.isEmpty(a)||e.isEmpty(b))throw new Error("Cannot construct GeoJsonlayer due to empty required parameter. Please reference API documentation.");this.id=a,this.path=b}var e=a("lodash");d.prototype.getId=function(){return this.id},d.prototype.getPath=function(){return this.path},b.exports=d},{lodash:22}],13:[function(a,b,c){"use strict";function d(a,b,c){if(!(this instanceof d))throw new TypeError("Image constructor cannot be called as a function.");if(!e.isString(a)||!e.isNumber(b)||!e.isNumber(c))throw new TypeError("Cannot construct Image due to incorrect parameter type(s). Please reference API documentation.");if(e.isEmpty(a)||0>=b||0>=c)throw new RangeError("Cannot construct Image due to bad parameter value(s). Please reference API documentation.");this._url=a,this._width=b,this._height=c}var e=a("lodash");d.prototype.getUrl=function(){return this._url},d.prototype.getWidth=function(){return this._width},d.prototype.getHeight=function(){return this._height},b.exports=d},{lodash:22}],14:[function(a,b,c){"use strict";function d(a,b){if(!(this instanceof d))throw new TypeError("KMLLayer constructor cannot be called as a function.");if(!e.isString(a)||!e.isString(b))throw new TypeError("Cannot construct KMLLayer due to incorrect parameter type(s). Please reference API documentation.");if(e.isEmpty(a)||e.isEmpty(b))throw new Error("Cannot construct KMLLayer due to empty required parameter. Please reference API documentation.");this.id=a,this.path=b}var e=a("lodash");d.prototype.getId=function(){return this.id},d.prototype.getPath=function(){return this.path},b.exports=d},{lodash:22}],15:[function(a,b,c){"use strict";function d(a,b,c){if(!(this instanceof d))throw new TypeError("WMSLayer constructor cannot be called as a function.");if(!e.isString(a)||!e.isString(b)||!e.isArray(c))throw new TypeError("Cannot construct WMSLayer due to incorrect parameter type(s). Please reference API documentation.");if(e.isEmpty(a)||e.isEmpty(b)||!f.isURL(b)||e.isEmpty(c))throw new Error("Cannot construct WMSLayer due to empty required parameter. Please reference API documentation.");e.forEach(c,function(a){if(!e.isString(a)||e.isEmpty(a))throw new Error("Cannot construct WMSLayer. Each layer must be a non-empty string.")}),this.id=a,this.url=b,this.layers=c,this.isTransparent=!0}var e=a("lodash"),f=a("../../../../node_modules/validator/validator.min");d.prototype.getId=function(){return this.id},d.prototype.getUrl=function(){return this.url},d.prototype.getLayers=function(){return this.layers},d.prototype.getIsTransparent=function(){return this.isTransparent},d.prototype.setIsTransparent=function(a){if(!e.isBoolean(a))throw new Error("Cannot set transparency. Parameter must be a boolean value.");this.isTransparent=a},d.prototype.getStyles=function(){return this.styles},d.prototype.setStyles=function(a){if(!e.isArray(a)||e.isEmpty(a))throw new Error("Cannot set styles. Parameter must be a non-empty array.");e.forEach(a,function(a){if(!e.isString(a)||e.isEmpty(a))throw new Error("Cannot set styles. Each style must be a non-empty string.")}),this.styles=a},d.prototype.getFormat=function(){return this.format},d.prototype.setFormat=function(a){if(!e.isString(a)||e.isEmpty(a))throw new Error("Cannot set format. Parameter must be a string value.");this.format=a},d.prototype.getNumZoomLevels=function(){return this.numZoomLevels},d.prototype.setNumZoomLevels=function(a){if(!e.isNumber(a))throw new Error("Cannot set numZoomLevels. Parameter must be a number.");this.numZoomLevels=a},b.exports=d},{"../../../../node_modules/validator/validator.min":23,lodash:22}],16:[function(a,b,c){"use strict";function d(a,b,c,g,h){if(!(this instanceof d))throw new TypeError("WMTSLayer constructor cannot be called as a function.");if(!(e.isString(a)&&e.isString(b)&&e.isString(c)&&e.isString(g)&&e.isString(h)))throw new TypeError("Cannot construct WMTSLayer due to incorrect parameter type(s). Please reference API documentation.");if(e.isEmpty(a)||e.isEmpty(b)||!f.isURL(b)||e.isEmpty(c)||e.isEmpty(g)||e.isEmpty(h))throw new Error("Cannot construct WMTSLayer due to empty required parameter. Please reference API documentation.");this.id=a,this.url=b,this.layer=c,this.matrixSet=g,this.style=h}var e=a("lodash"),f=a("../../../../node_modules/validator/validator.min");d.prototype.getId=function(){return this.id},d.prototype.getUrl=function(){return this.url},d.prototype.getLayer=function(){return this.layer},d.prototype.getMatrixSet=function(){return this.matrixSet},d.prototype.getStyle=function(){return this.style},d.prototype.getProjection=function(){return this.projection},d.prototype.setProjection=function(a){if(!e.isString(a)||e.isEmpty(a))throw new Error("Cannot set projection. Parameter must be a string value.");this.projection=a},d.prototype.getFormat=function(){return this.format},d.prototype.setFormat=function(a){if(!e.isString(a)||e.isEmpty(a))throw new Error("Cannot set format. Parameter must be a string value.");this.format=a},d.prototype.getNumZoomLevels=function(){return this.numZoomLevels},d.prototype.setNumZoomLevels=function(a){if(!e.isNumber(a))throw new Error("Cannot set numZoomLevels. Parameter must be a number.");this.numZoomLevels=a},d.prototype.getMaxResolution=function(){return this.maxResolution},d.prototype.setMaxResolution=function(a){if(!e.isNumber(a))throw new Error("Cannot set maxResolution. Parameter must be a number.");this.maxResolution=a},d.prototype.getMatrixIds=function(){return this.matrixIds},d.prototype.setMatrixIds=function(a){if(!e.isArray(a)||e.isEmpty(a))throw new Error("Cannot set matrixIds. Parameter must be a non-empty array.");this.matrixIds=a},b.exports=d},{"../../../../node_modules/validator/validator.min":23,lodash:22}],17:[function(a,b,c){"use strict";var d=a("lodash"),e=(a("../core/const"),a("../core/mapManager")),f=a("../core/objectFactory"),g=a("./olUtil"),h=a("../../assets/openLayers/2.13.1/OpenLayers"),i={createMapObject:function(a,b,c){g.createMap(a,b,c)},destroyMap:function(){e.getActiveMapObject().destroy()},updateSize:function(){e.getActiveMapObject().updateSize()},clearAllFeatures:function(){var a=e.getActiveMapObject().getLayersByClass("OpenLayers.Layer.Vector");d.forEach(a,function(a){a.removeAllFeatures()})},zoomIn:function(){e.getActiveMapObject().zoomIn()},zoomOut:function(){e.getActiveMapObject().zoomOut()},getZoom:function(){return e.getActiveMapObject().getZoom()},setZoom:function(a){e.getActiveMapObject().zoomTo(a)},zoomToMaxExtent:function(){e.getActiveMapObject().zoomToMaxExtent()},zoomToData:function(a){var b=g.calculateBounds(a);d.isUndefined(b)||e.getActiveMapObject().zoomToExtent(b)},getCenter:function(){var a=e.getActiveMapObject().getCenter();return a.transform(e.getActiveMapObject().getProjectionObject(),g.getDefaultProjection()),f.coordinate(a.lat,a.lon)},setCenter:function(a){var b=new h.LonLat(a.getLongitude(),a.getLatitude());b.transform(g.getDefaultProjection(),e.getActiveMapObject().getProjectionObject()),e.getActiveMapObject().panTo(b)},setBaseLayer:function(a){var b=e.getActiveMapObject().getLayersByName(a)[0];if(d.isUndefined(b))throw new Error("Cannot find layer with id: "+a);e.getActiveMapObject().setBaseLayer(b)},addWmsLayer:function(a){var b=g.createWmsObject(a,!1);e.getActiveMapObject().addLayer(b)},addWmtsLayer:function(a){var b=g.createWmtsObject(a,!1);e.getActiveMapObject().addLayer(b)},removeLayer:function(a){var b=e.getActiveMapObject().getLayersByName(a)[0];if(d.isUndefined(b))throw new Error("Cannot find layer with id: "+a);e.getActiveMapObject().removeLayer(b)},toggleLayer:function(a){var b=e.getActiveMapObject().getLayersByName(a)[0];if(d.isUndefined(b))throw new Error("Cannot find layer with id: "+a);b.setVisibility(!b.getVisibility())},getLayerOrder:function(a){var b=e.getActiveMapObject().getLayersByName(a)[0];if(d.isUndefined(b))throw new Error("Cannot find layer with id: "+a);return e.getActiveMapObject().getLayerIndex(b)},setLayerOrder:function(a,b){var c=e.getActiveMapObject().getLayersByName(a)[0];if(d.isUndefined(c))throw new Error("Cannot find layer with id: "+a);e.getActiveMapObject().setLayerIndex(c,b)},getLayerOpacity:function(a){var b=e.getActiveMapObject().getLayersByName(a)[0];if(d.isUndefined(b))throw new Error("Cannot find layer with id: "+a);return b.opacity},setLayerOpacity:function(a,b){var c=e.getActiveMapObject().getLayersByName(a)[0];if(d.isUndefined(c))throw new Error("Cannot find layer with id: "+a);c.setOpacity(b)},getLayer:function(a){return g.getLayer(a)},addPoint:function(a,b,c,e){var f=g.getLayer(b);if(!d.isUndefined(f)){var i={};i.featureId=a;var j;void 0!==e&&(j={externalGraphic:e.getUrl(),graphicWidth:e.getWidth(),graphicHeight:e.getHeight()}),f.addFeatures([new h.Feature.Vector(g.createPoint(c),i,j)])}},removePoint:function(a){g.removeFeature(a)},addPolygon:function(a,b,c){var e=g.getLayer(b);if(!d.isUndefined(e)){var f={};f.featureId=a;var i=[];d.forEach(c,function(a){i.push(g.createPoint(a))});var j=new h.Geometry.LinearRing(i),k=new h.Geometry.Polygon(j),l=new h.Feature.Vector(k,f);e.addFeatures([l])}},removePolygon:function(a){g.removeFeature(a)},addLine:function(a,b,c){var e=g.getLayer(b);if(!d.isUndefined(e)){var f={};f.featureId=a;var i=[];d.forEach(c,function(a){i.push(g.createPoint(a))});var j=new h.Geometry.LineString(i),k=new h.Feature.Vector(j,f);e.addFeatures([k])}},removeLine:function(a){g.removeFeature(a)},addMultipoint:function(a,b,c){var e=g.getLayer(b);if(!d.isUndefined(e)){var f={};f.featureId=a;var i=new h.Geometry.MultiPoint;d.forEach(c,function(a){i.addPoint(g.createPoint(a))});var j=new h.Feature.Vector(i,f);e.addFeatures([j])}},removeMultipoint:function(a){g.removeFeature(a)},getFeatures:function(a){var b=[],c=e.getActiveMapObject().getLayersByClass("OpenLayers.Layer.Vector");return d.forEach(c,function(c){var e=c.getFeaturesByAttribute("featureId",a);d.isArray(e)&&e.length>0&&b.push(e)}),d.flatten(b,!0)},registerClickListener:function(a,b){g.getEventManager().registerClickListener(a,b)},unregisterClickListener:function(a){g.getEventManager().unregisterClickListener(a)},registerHoverListener:function(a,b){g.getEventManager().registerHoverListener(a,b)},unregisterHoverListener:function(a){g.getEventManager().unregisterHoverListener(a)},registerMapMoveListener:function(a,b){g.getEventManager().registerMapMoveListener(a,b)},unregisterMapMoveListener:function(a){g.getEventManager().unregisterMapMoveListener(a)},registerZoomEndListener:function(a,b){g.getEventManager().registerZoomEndListener(a,b)},unregisterZoomEndListener:function(a){g.getEventManager().unregisterZoomEndListener(a)},registerOutListener:function(a,b){g.getEventManager().registerOutListener(a,b)},unregisterOutListener:function(a){g.getEventManager().unregisterOutListener(a)},toggleZoom:function(){g.toggleControl("OpenLayers.Control.Zoom",new h.Control.Zoom)},toggleScale:function(){g.toggleControl("OpenLayers.Control.ScaleLine",new h.Control.ScaleLine)},toggleCoordinates:function(){g.toggleControl("OpenLayers.Control.MousePosition",new h.Control.MousePosition)},toggleGraticule:function(){var a=e.getActiveMapObject(),b=a.getControlsByClass("OpenLayers.Control.Graticule");0===b.length?a.addControl(new h.Control.Graticule):b[0].destroy()},addKml:function(a){var b=g.createKmlLayer(a,!1);e.getActiveMapObject().addLayer(b)},addGeoJson:function(a){var b=g.createGeoJsonLayer(a,!1);e.getActiveMapObject().addLayer(b)},addVectorLayer:function(a,b){var c;if(d.isUndefined(b))c=new h.Layer.Vector(a);else{if(!(d.isUndefined(b.strategies)||d.isArray(b.strategies)&&b.strategies.length>0&&b.strategies[0]instanceof h.Strategy))throw new Error("options.strategies[0] must be an instance of OpenLayers.Strategy");if(!(d.isUndefined(b.styleMap)||b.styleMap instanceof h.StyleMap))throw new Error("options.styleMap must be an instance of OpenLayers.StyleMap"); c=new h.Layer.Vector(a,b)}c.events.register("featureclick",c,function(a){g.getEventManager().handleClickEvent(a)}),c.events.register("featureover",c,function(a){g.getEventManager().handleHoverEvent(a)}),c.events.register("featureout",c,function(a){g.getEventManager().handleOutEvent(a)}),e.getActiveMapObject().addLayer(c)}};b.exports=i},{"../../assets/openLayers/2.13.1/OpenLayers":21,"../core/const":4,"../core/mapManager":6,"../core/objectFactory":7,"./olUtil":19,lodash:22}],18:[function(a,b,c){"use strict";a("../api");var d=a("../core/adapterManager"),e=a("../core/const"),f=a("./olAdapter");d.registerAdapter(e.mapType.OPENLAYERS,f)},{"../api":1,"../core/adapterManager":3,"../core/const":4,"./olAdapter":17}],19:[function(a,b,c){"use strict";function d(a,b){var c=function(){a.events.unregister("loadend",a,c),b()};a.events.register("loadend",a,c)}function e(a,b,c){void 0!==b&&d(c,b);var e=new j.Map(a,{theme:null});e.addLayer(c),e.zoomToMaxExtent(),e.events.register("moveend",e,function(a){n.handleMapMoveEvent(a)}),e.events.register("zoomend",e,function(a){n.handleZoomEndEvent(a)}),h.registerMapInstance(a,g.mapType.OPENLAYERS,e),h.setActiveMap(a)}var f=a("lodash"),g=a("../core/const"),h=a("../core/mapManager"),i=a("../core/objectValidator"),j=(a("../util/appUtils"),a("../../assets/openLayers/2.13.1/OpenLayers")),k=a("../core/EventManager"),l="BASE",m=new j.Projection("EPSG:4326"),n=new k;a("../util/appUtils").getGlobalObject().OpenLayers=j;var o={createMap:function(a,b,c){var d;if(void 0===c)d=new j.Layer.OSM(l),d.projection=new j.Projection("EPSG:3857"),e(a,b,d);else if(i.isArcGIS93RestLayer(c))d=new j.Layer.ArcGIS93Rest(l,c.getUrl()),f.isUndefined(c.getNumZoomLevels())||d.addOptions({numZoomLevels:c.getNumZoomLevels()},!0),e(a,b,d);else if(i.isArcGISCacheLayer(c)){var g=new j.Protocol.Script;g.createRequest(c.getUrl(),{f:"json",pretty:"true"},function(g){var h={layerInfo:g};f.isUndefined(c.getNumZoomLevels())||(h.numZoomLevels=c.getNumZoomLevels()),d=new j.Layer.ArcGISCache(l,c.getUrl(),h),e(a,b,d)})}else if(i.isWmtsLayer(c))d=this.createWmtsObject(c,!0),e(a,b,d);else if(i.isWmsLayer(c))d=this.createWmsObject(c,!0),e(a,b,d);else if(i.isKMLLayer(c))d=this.createKmlLayer(c,!0),e(a,b,d);else{if(!i.isGeoJsonLayer(c))throw new TypeError("API does not support for the given base layer type.");d=this.createGeoJsonLayer(c,!0),e(a,b,d)}},createPoint:function(a){var b=new j.Geometry.Point(a.getLongitude(),a.getLatitude());return b.transform(m,h.getActiveMapObject().getProjectionObject()),b},removeFeature:function(a){var b=h.getActiveMapObject().getLayersByClass("OpenLayers.Layer.Vector");f.forEach(b,function(b){var c=b.getFeaturesByAttribute("featureId",a);b.removeFeatures(c)})},toggleControl:function(a,b){var c=h.getActiveMapObject(),d=c.getControlsByClass(a);0===d.length?c.addControl(b):c.removeControl(d[0])},getDefaultProjection:function(){return m},calculateBounds:function(a){var b=this.getLayer(a);return f.isUndefined(b)?void 0:b.getDataExtent()},getEventManager:function(){return n},createWmtsObject:function(a,b){var c={isBaseLayer:b,name:a.getId(),url:a.getUrl(),layer:a.getLayer(),matrixSet:a.getMatrixSet(),style:a.getStyle()};b||(c.projection=a.getProjection()||h.getActiveMapObject().getProjection(),c.numZoomLevels=a.getNumZoomLevels()||h.getActiveMapObject().getNumZoomLevels(),c.maxResolution=a.getMaxResolution()||h.getActiveMapObject().getMaxResolution()),void 0!==a.getFormat()&&(c.format=a.getFormat()),f.isUndefined(a.getMatrixIds())||(c.matrixIds=a.getMatrixIds());var d=new j.Layer.WMTS(c);return d},createWmsObject:function(a,b){var c=a.getId(),d=a.getUrl(),e={layers:a.getLayers().join(),transparent:a.getIsTransparent()};f.isUndefined(a.getStyles())||(e.styles=a.getStyles().join()),f.isUndefined(a.getFormat())||(e.format=a.getFormat());var g={isBaseLayer:b};f.isUndefined(a.getNumZoomLevels())||(g.numZoomLevels=a.getNumZoomLevels());var h=new j.Layer.WMS(c,d,e,g);return h},createKmlLayer:function(a,b){var c=new j.Layer.Vector(a.getId(),{strategies:[new j.Strategy.Fixed],protocol:new j.Protocol.HTTP({url:a.getPath(),format:new j.Format.KML({extractStyles:!0,extractAttributes:!0,maxDepth:2})}),isBaseLayer:b});return c},createGeoJsonLayer:function(a,b){var c=new j.Layer.Vector(a.getId(),{strategies:[new j.Strategy.Fixed],protocol:new j.Protocol.HTTP({url:a.getPath(),format:new j.Format.GeoJSON}),isBaseLayer:b});return c},getLayer:function(a){var b=h.getActiveMapObject().getLayersByName(a);return f.isArray(b)&&!f.isEmpty(b)?b[0]:void 0}};b.exports=o},{"../../assets/openLayers/2.13.1/OpenLayers":21,"../core/EventManager":2,"../core/const":4,"../core/mapManager":6,"../core/objectValidator":8,"../util/appUtils":20,lodash:22}],20:[function(a,b,c){"use strict";var d={getGlobalObject:function(){return function(a){return a("return this")()}(Function)}};b.exports=d},{}],21:[function(require,module,exports){(function(global){var __browserify_shim_require__=require;(function browserifyShim(module,exports,require,define,browserify_shim__define__module__export__){var OpenLayers={VERSION_NUMBER:"Release 2.13.1",singleFile:!0,_getScriptLocation:function(){for(var a,b=/(^|(.*?\/))(OpenLayers[^\/]*?\.js)(\?|$)/,c=document.getElementsByTagName("script"),d="",e=0,f=c.length;f>e;e++)if((a=c[e].getAttribute("src"))&&(a=a.match(b))){d=a[1];break}return function(){return d}}(),ImgPath:""};OpenLayers.Class=function(){var a=arguments.length,b=arguments[0],c=arguments[a-1],d="function"==typeof c.initialize?c.initialize:function(){b.prototype.initialize.apply(this,arguments)};return a>1?(a=[d,b].concat(Array.prototype.slice.call(arguments).slice(1,a-1),c),OpenLayers.inherit.apply(null,a)):d.prototype=c,d},OpenLayers.inherit=function(a,b){var c=function(){};c.prototype=b.prototype,a.prototype=new c;var d,e,c=2;for(d=arguments.length;d>c;c++)e=arguments[c],"function"==typeof e&&(e=e.prototype),OpenLayers.Util.extend(a.prototype,e)},OpenLayers.Util=OpenLayers.Util||{},OpenLayers.Util.extend=function(a,b){if(a=a||{},b){for(var c in b){var d=b[c];void 0!==d&&(a[c]=d)}"function"==typeof window.Event&&b instanceof window.Event||!b.hasOwnProperty||!b.hasOwnProperty("toString")||(a.toString=b.toString)}return a},OpenLayers.String={startsWith:function(a,b){return 0==a.indexOf(b)},contains:function(a,b){return-1!=a.indexOf(b)},trim:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(a){a=a.split("-");for(var b=a[0],c=1,d=a.length;d>c;c++)var e=a[c],b=b+(e.charAt(0).toUpperCase()+e.substring(1));return b},format:function(a,b,c){return b||(b=window),a.replace(OpenLayers.String.tokenRegEx,function(a,d){for(var e,f=d.split(/\.+/),g=0;g<f.length&&(0==g&&(e=b),void 0!==e);g++)e=e[f[g]];return"function"==typeof e&&(e=c?e.apply(null,c):e()),"undefined"==typeof e?"undefined":e})},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(a){return OpenLayers.String.numberRegEx.test(a)},numericIf:function(a,b){var c=a;return!0===b&&null!=a&&a.replace&&(a=a.replace(/^\s*|\s*$/g,"")),OpenLayers.String.isNumeric(a)?parseFloat(a):c}},OpenLayers.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(a,b){var c=0;return b>0&&(c=parseFloat(a.toPrecision(b))),c},format:function(a,b,c,d){b="undefined"!=typeof b?b:0,c="undefined"!=typeof c?c:OpenLayers.Number.thousandsSeparator,d="undefined"!=typeof d?d:OpenLayers.Number.decimalSeparator,null!=b&&(a=parseFloat(a.toFixed(b)));var e=a.toString().split(".");if(1==e.length&&null==b&&(b=0),a=e[0],c)for(var f=/(-?[0-9]+)([0-9]{3})/;f.test(a);)a=a.replace(f,"$1"+c+"$2");return 0==b?b=a:(c=1<e.length?e[1]:"0",null!=b&&(c+=Array(b-c.length+1).join("0")),b=a+d+c),b},zeroPad:function(a,b,c){for(a=a.toString(c||10);a.length<b;)a="0"+a;return a}},OpenLayers.Function={bind:function(a,b){var c=Array.prototype.slice.apply(arguments,[2]);return function(){var d=c.concat(Array.prototype.slice.apply(arguments,[0]));return a.apply(b,d)}},bindAsEventListener:function(a,b){return function(c){return a.call(b,c||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},OpenLayers.Array={filter:function(a,b,c){var d=[];if(Array.prototype.filter)d=a.filter(b,c);else{var e=a.length;if("function"!=typeof b)throw new TypeError;for(var f=0;e>f;f++)if(f in a){var g=a[f];b.call(c,g,f,a)&&d.push(g)}}return d}},OpenLayers.Bounds=OpenLayers.Class({left:null,bottom:null,right:null,top:null,centerLonLat:null,initialize:function(a,b,c,d){OpenLayers.Util.isArray(a)&&(d=a[3],c=a[2],b=a[1],a=a[0]),null!=a&&(this.left=OpenLayers.Util.toFloat(a)),null!=b&&(this.bottom=OpenLayers.Util.toFloat(b)),null!=c&&(this.right=OpenLayers.Util.toFloat(c)),null!=d&&(this.top=OpenLayers.Util.toFloat(d))},clone:function(){return new OpenLayers.Bounds(this.left,this.bottom,this.right,this.top)},equals:function(a){var b=!1;return null!=a&&(b=this.left==a.left&&this.right==a.right&&this.top==a.top&&this.bottom==a.bottom),b},toString:function(){return[this.left,this.bottom,this.right,this.top].join()},toArray:function(a){return!0===a?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]},toBBOX:function(a,b){null==a&&(a=6);var c=Math.pow(10,a),d=Math.round(this.left*c)/c,e=Math.round(this.bottom*c)/c,f=Math.round(this.right*c)/c,c=Math.round(this.top*c)/c;return!0===b?e+","+d+","+c+","+f:d+","+e+","+f+","+c},toGeometry:function(){return new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([new OpenLayers.Geometry.Point(this.left,this.bottom),new OpenLayers.Geometry.Point(this.right,this.bottom),new OpenLayers.Geometry.Point(this.right,this.top),new OpenLayers.Geometry.Point(this.left,this.top)])])},getWidth:function(){return this.right-this.left},getHeight:function(){return this.top-this.bottom},getSize:function(){return new OpenLayers.Size(this.getWidth(),this.getHeight())},getCenterPixel:function(){return new OpenLayers.Pixel((this.left+this.right)/2,(this.bottom+this.top)/2)},getCenterLonLat:function(){return this.centerLonLat||(this.centerLonLat=new OpenLayers.LonLat((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat},scale:function(a,b){null==b&&(b=this.getCenterLonLat());var c,d;return"OpenLayers.LonLat"==b.CLASS_NAME?(c=b.lon,d=b.lat):(c=b.x,d=b.y),new OpenLayers.Bounds((this.left-c)*a+c,(this.bottom-d)*a+d,(this.right-c)*a+c,(this.top-d)*a+d)},add:function(a,b){if(null==a||null==b)throw new TypeError("Bounds.add cannot receive null values");return new OpenLayers.Bounds(this.left+a,this.bottom+b,this.right+a,this.top+b)},extend:function(a){if(a)switch(a.CLASS_NAME){case"OpenLayers.LonLat":this.extendXY(a.lon,a.lat);break;case"OpenLayers.Geometry.Point":this.extendXY(a.x,a.y);break;case"OpenLayers.Bounds":this.centerLonLat=null,(null==this.left||a.left<this.left)&&(this.left=a.left),(null==this.bottom||a.bottom<this.bottom)&&(this.bottom=a.bottom),(null==this.right||a.right>this.right)&&(this.right=a.right),(null==this.top||a.top>this.top)&&(this.top=a.top)}},extendXY:function(a,b){this.centerLonLat=null,(null==this.left||a<this.left)&&(this.left=a),(null==this.bottom||b<this.bottom)&&(this.bottom=b),(null==this.right||a>this.right)&&(this.right=a),(null==this.top||b>this.top)&&(this.top=b)},containsLonLat:function(a,b){"boolean"==typeof b&&(b={inclusive:b}),b=b||{};var c=this.contains(a.lon,a.lat,b.inclusive),d=b.worldBounds;return d&&!c&&(c=d.getWidth(),d=Math.round((a.lon-(d.left+d.right)/2)/c),c=this.containsLonLat({lon:a.lon-d*c,lat:a.lat},{inclusive:b.inclusive})),c},containsPixel:function(a,b){return this.contains(a.x,a.y,b)},contains:function(a,b,c){if(null==c&&(c=!0),null==a||null==b)return!1;a=OpenLayers.Util.toFloat(a),b=OpenLayers.Util.toFloat(b);var d=!1;return d=c?a>=this.left&&a<=this.right&&b>=this.bottom&&b<=this.top:a>this.left&&a<this.right&&b>this.bottom&&b<this.top},intersectsBounds:function(a,b){if("boolean"==typeof b&&(b={inclusive:b}),b=b||{},b.worldBounds){var c=this.wrapDateLine(b.worldBounds);a=a.wrapDateLine(b.worldBounds)}else c=this;null==b.inclusive&&(b.inclusive=!0);var d=!1,e=c.left==a.right||c.right==a.left||c.top==a.bottom||c.bottom==a.top;if(b.inclusive||!e)var d=a.top>=c.bottom&&a.top<=c.top||c.top>a.bottom&&c.top<a.top,e=a.left>=c.left&&a.left<=c.right||c.left>=a.left&&c.left<=a.right,f=a.right>=c.left&&a.right<=c.right||c.right>=a.left&&c.right<=a.right,d=(a.bottom>=c.bottom&&a.bottom<=c.top||c.bottom>=a.bottom&&c.bottom<=a.top||d)&&(e||f);if(b.worldBounds&&!d){var g=b.worldBounds,e=g.getWidth(),f=!g.containsBounds(c),g=!g.containsBounds(a);f&&!g?(a=a.add(-e,0),d=c.intersectsBounds(a,{inclusive:b.inclusive})):g&&!f&&(c=c.add(-e,0),d=a.intersectsBounds(c,{inclusive:b.inclusive}))}return d},containsBounds:function(a,b,c){null==b&&(b=!1),null==c&&(c=!0);var d=this.contains(a.left,a.bottom,c),e=this.contains(a.right,a.bottom,c),f=this.contains(a.left,a.top,c);return a=this.contains(a.right,a.top,c),b?d||e||f||a:d&&e&&f&&a},determineQuadrant:function(a){var b="",c=this.getCenterLonLat(),b=b+(a.lat<c.lat?"b":"t");return b+=a.lon<c.lon?"l":"r"},transform:function(a,b){this.centerLonLat=null;var c=OpenLayers.Projection.transform({x:this.left,y:this.bottom},a,b),d=OpenLayers.Projection.transform({x:this.right,y:this.bottom},a,b),e=OpenLayers.Projection.transform({x:this.left,y:this.top},a,b),f=OpenLayers.Projection.transform({x:this.right,y:this.top},a,b);return this.left=Math.min(c.x,e.x),this.bottom=Math.min(c.y,d.y),this.right=Math.max(d.x,f.x),this.top=Math.max(e.y,f.y),this},wrapDateLine:function(a,b){b=b||{};var c=b.leftTolerance||0,d=b.rightTolerance||0,e=this.clone();if(a){for(var f=a.getWidth();e.left<a.left&&e.right-d<=a.left;)e=e.add(f,0);for(;e.left+c>=a.right&&e.right>a.right;)e=e.add(-f,0);c=e.left+c,c<a.right&&c>a.left&&e.right-d>a.right&&(e=e.add(-f,0))}return e},CLASS_NAME:"OpenLayers.Bounds"}),OpenLayers.Bounds.fromString=function(a,b){var c=a.split(",");return OpenLayers.Bounds.fromArray(c,b)},OpenLayers.Bounds.fromArray=function(a,b){return!0===b?new OpenLayers.Bounds(a[1],a[0],a[3],a[2]):new OpenLayers.Bounds(a[0],a[1],a[2],a[3])},OpenLayers.Bounds.fromSize=function(a){return new OpenLayers.Bounds(0,a.h,a.w,0)},OpenLayers.Bounds.oppositeQuadrant=function(a){var b;return b=""+("t"==a.charAt(0)?"b":"t"),b+="l"==a.charAt(1)?"r":"l"},OpenLayers.Element={visible:function(a){return"none"!=OpenLayers.Util.getElement(a).style.display},toggle:function(){for(var a=0,b=arguments.length;b>a;a++){var c=OpenLayers.Util.getElement(arguments[a]),d=OpenLayers.Element.visible(c)?"none":"";c.style.display=d}},remove:function(a){a=OpenLayers.Util.getElement(a),a.parentNode.removeChild(a)},getHeight:function(a){return a=OpenLayers.Util.getElement(a),a.offsetHeight},hasClass:function(a,b){var c=a.className;return!!c&&RegExp("(^|\\s)"+b+"(\\s|$)").test(c)},addClass:function(a,b){return OpenLayers.Element.hasClass(a,b)||(a.className+=(a.className?" ":"")+b),a},removeClass:function(a,b){var c=a.className;return c&&(a.className=OpenLayers.String.trim(c.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))),a},toggleClass:function(a,b){return OpenLayers.Element.hasClass(a,b)?OpenLayers.Element.removeClass(a,b):OpenLayers.Element.addClass(a,b),a},getStyle:function(a,b){a=OpenLayers.Util.getElement(a);var c=null;if(a&&a.style){c=a.style[OpenLayers.String.camelize(b)],c||(document.defaultView&&document.defaultView.getComputedStyle?c=(c=document.defaultView.getComputedStyle(a,null))?c.getPropertyValue(b):null:a.currentStyle&&(c=a.currentStyle[OpenLayers.String.camelize(b)]));var d=["left","top","right","bottom"];window.opera&&-1!=OpenLayers.Util.indexOf(d,b)&&"static"==OpenLayers.Element.getStyle(a,"position")&&(c="auto")}return"auto"==c?null:c}},OpenLayers.LonLat=OpenLayers.Class({lon:0,lat:0,initialize:function(a,b){OpenLayers.Util.isArray(a)&&(b=a[1],a=a[0]),this.lon=OpenLayers.Util.toFloat(a),this.lat=OpenLayers.Util.toFloat(b)},toString:function(){return"lon="+this.lon+",lat="+this.lat},toShortString:function(){return this.lon+", "+this.lat},clone:function(){return new OpenLayers.LonLat(this.lon,this.lat)},add:function(a,b){if(null==a||null==b)throw new TypeError("LonLat.add cannot receive null values");return new OpenLayers.LonLat(this.lon+OpenLayers.Util.toFloat(a),this.lat+OpenLayers.Util.toFloat(b))},equals:function(a){var b=!1;return null!=a&&(b=this.lon==a.lon&&this.lat==a.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(a.lon)&&isNaN(a.lat)),b},transform:function(a,b){var c=OpenLayers.Projection.transform({x:this.lon,y:this.lat},a,b);return this.lon=c.x,this.lat=c.y,this},wrapDateLine:function(a){var b=this.clone();if(a){for(;b.lon<a.left;)b.lon+=a.getWidth();for(;b.lon>a.right;)b.lon-=a.getWidth()}return b},CLASS_NAME:"OpenLayers.LonLat"}),OpenLayers.LonLat.fromString=function(a){return a=a.split(","),new OpenLayers.LonLat(a[0],a[1])},OpenLayers.LonLat.fromArray=function(a){var b=OpenLayers.Util.isArray(a);return new OpenLayers.LonLat(b&&a[0],b&&a[1])},OpenLayers.Pixel=OpenLayers.Class({x:0,y:0,initialize:function(a,b){this.x=parseFloat(a),this.y=parseFloat(b)},toString:function(){return"x="+this.x+",y="+this.y},clone:function(){return new OpenLayers.Pixel(this.x,this.y)},equals:function(a){var b=!1;return null!=a&&(b=this.x==a.x&&this.y==a.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(a.x)&&isNaN(a.y)),b},distanceTo:function(a){return Math.sqrt(Math.pow(this.x-a.x,2)+Math.pow(this.y-a.y,2))},add:function(a,b){if(null==a||null==b)throw new TypeError("Pixel.add cannot receive null values");return new OpenLayers.Pixel(this.x+a,this.y+b)},offset:function(a){var b=this.clone();return a&&(b=this.add(a.x,a.y)),b},CLASS_NAME:"OpenLayers.Pixel"}),OpenLayers.Size=OpenLayers.Class({w:0,h:0,initialize:function(a,b){this.w=parseFloat(a),this.h=parseFloat(b)},toString:function(){return"w="+this.w+",h="+this.h},clone:function(){return new OpenLayers.Size(this.w,this.h)},equals:function(a){var b=!1;return null