/* * Copyright (c) 2008-2010 Institut Geographique National France, released under the * BSD license. */ (function() { /** * Before creating the Geoportal namespace, check to see if * Geoportal.singleFile is true. This occurs if the * Geoportail/SingleFile.js script is included before this one - as is the * case with single file builds. * */ var singleFile = (typeof(Geoportal)=="object" && Geoportal.singleFile); /** * Namespace: Geoportal * The Geoportal standard API based on OpenLayers 2.9.1. * The Geoportal object provides a namespace for all things Geoportal */ window.Geoportal = { /** * Property: _scriptName * {String} Relative path of this script. */ _scriptName: (!singleFile) ? "lib/GeoportalStandard.js" : "Geoportal.js", /** * Property: _scriptLocation * {String} Path of this script. */ _scriptLocation: null, /** * Function: _getScriptLocation * Return the path to this script. * * Returns: * {String} Path to this script */ _getScriptLocation: function () { if(Geoportal._scriptLocation) { return Geoportal._scriptLocation; } var scriptName= Geoportal._scriptName; var scriptNameLen= scriptName.length; // From GeoExt : // If we load other scripts right before Geoportal using the same // mechanism to add script resources dynamically (e.g. OpenLayers), // document.getElementsByTagName will not find the GeoExt script tag // in FF2. Using document.documentElement.getElementsByTagName instead // works around this issue. var scripts= document.documentElement.getElementsByTagName('script'); for (var i= 0; i < scripts.length; i++) { var src= scripts[i].getAttribute('src'); if (src) { var index= src.lastIndexOf(scriptName); // set path length for src up to a query string var pathLength= src.lastIndexOf('?'); if (pathLength < 0) { pathLength= src.length; } // is it found, at the end of the URL? if ((index > -1) && (index + scriptNameLen == pathLength)) { Geoportal._scriptLocation= src.slice(0, -scriptNameLen); break; } } } return Geoportal._scriptLocation||""; } }; /** * Geoportal.singleFile is a flag indicating this file is being included * in a Single File Library build of the Geoportal Library. * * When we are *not* part of a SFL build we dynamically include the * Geoportal library code. * * When we *are* part of a SFL build we do not dynamically include the * Geoportal library code as it will be appended at the end of this file. */ if(!singleFile) { var jsfiles = [ // OPENLAYERS: "../../openlayers/lib/OpenLayers/SingleFile.js",//make OpenLayers believes it is compacted! "../../openlayers/lib/OpenLayers.js", "../../openlayers/lib/OpenLayers/BaseTypes.js", "../../openlayers/lib/OpenLayers/BaseTypes/Class.js", "../../openlayers/lib/OpenLayers/Util.js", "../../openlayers/lib/OpenLayers/BaseTypes/Element.js", "../../openlayers/lib/OpenLayers/BaseTypes/Size.js", "../../openlayers/lib/OpenLayers/Console.js", "../../openlayers/lib/OpenLayers/Icon.js", "../../openlayers/lib/OpenLayers/Popup.js", "../../openlayers/lib/OpenLayers/Renderer.js", "../../openlayers/lib/OpenLayers/Strategy.js", "../../openlayers/lib/OpenLayers/Tween.js", "../../openlayers/lib/OpenLayers/BaseTypes/Bounds.js", "../../openlayers/lib/OpenLayers/BaseTypes/LonLat.js", "../../openlayers/lib/OpenLayers/BaseTypes/Pixel.js", "../../openlayers/lib/OpenLayers/Control.js", "../../openlayers/lib/OpenLayers/Lang.js", "../../openlayers/lib/OpenLayers/Popup/Anchored.js", "../../openlayers/lib/OpenLayers/Renderer/Canvas.js", "../../openlayers/lib/OpenLayers/Renderer/Elements.js", "../../openlayers/lib/OpenLayers/Strategy/Cluster.js", "../../openlayers/lib/OpenLayers/Strategy/Fixed.js", "../../openlayers/lib/OpenLayers/Strategy/Paging.js", "../../openlayers/lib/OpenLayers/Strategy/Refresh.js", "../../openlayers/lib/OpenLayers/Strategy/Save.js", "../../openlayers/lib/OpenLayers/Control/ArgParser.js", "../../openlayers/lib/OpenLayers/Control/Attribution.js", "../../openlayers/lib/OpenLayers/Control/Graticule.js", "../../openlayers/lib/OpenLayers/Control/MousePosition.js", "../../openlayers/lib/OpenLayers/Control/PanZoom.js", "../../openlayers/lib/OpenLayers/Control/Panel.js", "../../openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js", "../../openlayers/lib/OpenLayers/Events.js", "../../openlayers/lib/OpenLayers/Format.js", "../../openlayers/lib/OpenLayers/Lang/de.js", "../../openlayers/lib/OpenLayers/Lang/en.js", "../../openlayers/lib/OpenLayers/Lang/es.js", "../../openlayers/lib/OpenLayers/Lang/fr.js", "../../openlayers/lib/OpenLayers/Lang/it.js", "../../openlayers/lib/OpenLayers/Popup/AnchoredBubble.js", "../../openlayers/lib/OpenLayers/Popup/Framed.js", "../../openlayers/lib/OpenLayers/Projection.js", "../../openlayers/lib/OpenLayers/Renderer/SVG.js", "../../openlayers/lib/OpenLayers/Renderer/VML.js", "../../openlayers/lib/OpenLayers/Tile.js", "../../openlayers/lib/OpenLayers/Format/CSWGetDomain.js", "../../openlayers/lib/OpenLayers/Format/CSWGetRecords.js", "../../openlayers/lib/OpenLayers/Format/JSON.js", "../../openlayers/lib/OpenLayers/Format/XML.js", "../../openlayers/lib/OpenLayers/Handler.js", "../../openlayers/lib/OpenLayers/Map.js", "../../openlayers/lib/OpenLayers/Marker.js", "../../openlayers/lib/OpenLayers/Popup/FramedCloud.js", "../../openlayers/lib/OpenLayers/Request.js", "../../openlayers/lib/OpenLayers/Tile/Image.js", "../../openlayers/lib/OpenLayers/Control/OverviewMap.js", "../../openlayers/lib/OpenLayers/Feature.js", "../../openlayers/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js", "../../openlayers/lib/OpenLayers/Format/OWSCommon/v1_1_0.js", "../../openlayers/lib/OpenLayers/Format/WMSCapabilities.js", "../../openlayers/lib/OpenLayers/Format/WMSDescribeLayer.js", "../../openlayers/lib/OpenLayers/Format/WMSGetFeatureInfo.js", "../../openlayers/lib/OpenLayers/Handler/Click.js", "../../openlayers/lib/OpenLayers/Handler/Drag.js", "../../openlayers/lib/OpenLayers/Handler/Feature.js", "../../openlayers/lib/OpenLayers/Handler/Hover.js", "../../openlayers/lib/OpenLayers/Handler/Keyboard.js", "../../openlayers/lib/OpenLayers/Handler/MouseWheel.js", "../../openlayers/lib/OpenLayers/Layer.js", "../../openlayers/lib/OpenLayers/Request/XMLHttpRequest.js", "../../openlayers/lib/OpenLayers/Tile/Image/IFrame.js", "../../openlayers/lib/OpenLayers/Ajax.js", "../../openlayers/lib/OpenLayers/Control/DragFeature.js", "../../openlayers/lib/OpenLayers/Control/DragPan.js", "../../openlayers/lib/OpenLayers/Control/KeyboardDefaults.js", "../../openlayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js", "../../openlayers/lib/OpenLayers/Feature/Vector.js", "../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1.js", "../../openlayers/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js", "../../openlayers/lib/OpenLayers/Handler/Box.js", "../../openlayers/lib/OpenLayers/Layer/HTTPRequest.js", "../../openlayers/lib/OpenLayers/Control/DrawFeature.js", "../../openlayers/lib/OpenLayers/Control/ZoomBox.js", "../../openlayers/lib/OpenLayers/Format/WKT.js", "../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1.js", "../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_3.js", "../../openlayers/lib/OpenLayers/Layer/Grid.js", "../../openlayers/lib/OpenLayers/Style.js", "../../openlayers/lib/OpenLayers/Control/Navigation.js", "../../openlayers/lib/OpenLayers/Filter.js", "../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js", "../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js", "../../openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js", "../../openlayers/lib/OpenLayers/Geometry.js", "../../openlayers/lib/OpenLayers/Layer/WMS.js", "../../openlayers/lib/OpenLayers/Layer/Zoomify.js", "../../openlayers/lib/OpenLayers/Rule.js", "../../openlayers/lib/OpenLayers/StyleMap.js", "../../openlayers/lib/OpenLayers/Filter/Comparison.js", "../../openlayers/lib/OpenLayers/Filter/FeatureId.js", "../../openlayers/lib/OpenLayers/Filter/Logical.js", "../../openlayers/lib/OpenLayers/Filter/Spatial.js", "../../openlayers/lib/OpenLayers/Geometry/Collection.js", "../../openlayers/lib/OpenLayers/Geometry/Point.js", "../../openlayers/lib/OpenLayers/Layer/Vector.js", "../../openlayers/lib/OpenLayers/Layer/WMS/Post.js", "../../openlayers/lib/OpenLayers/Layer/WMS/Untiled.js", "../../openlayers/lib/OpenLayers/Format/Filter.js", "../../openlayers/lib/OpenLayers/Geometry/MultiPoint.js", "../../openlayers/lib/OpenLayers/Layer/GML.js", "../../openlayers/lib/OpenLayers/Layer/Vector/RootContainer.js", "../../openlayers/lib/OpenLayers/Strategy/BBOX.js", "../../openlayers/lib/OpenLayers/Control/SelectFeature.js", "../../openlayers/lib/OpenLayers/Format/Filter/v1.js", "../../openlayers/lib/OpenLayers/Geometry/Curve.js", "../../openlayers/lib/OpenLayers/Control/ModifyFeature.js", "../../openlayers/lib/OpenLayers/Geometry/LineString.js", "../../openlayers/lib/OpenLayers/Control/TransformFeature.js", "../../openlayers/lib/OpenLayers/Geometry/LinearRing.js", "../../openlayers/lib/OpenLayers/Geometry/MultiLineString.js", "../../openlayers/lib/OpenLayers/Geometry/Polygon.js", "../../openlayers/lib/OpenLayers/Format/KML.js", "../../openlayers/lib/OpenLayers/Format/OSM.js", "../../openlayers/lib/OpenLayers/Geometry/MultiPolygon.js", "../../openlayers/lib/OpenLayers/Format/GML.js", "../../openlayers/lib/OpenLayers/Format/GML/Base.js", "../../openlayers/lib/OpenLayers/Format/GML/v2.js", "../../openlayers/lib/OpenLayers/Format/GML/v3.js", "../../openlayers/lib/OpenLayers/Format/Filter/v1_0_0.js", "../../openlayers/lib/OpenLayers/Format/Filter/v1_1_0.js", "../../openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js", // PROJ4JS: "../../proj4js/lib/proj4js.js", "../../proj4js/lib/OverloadedProj4js.js", // GEOPORTAL: "OpenLayers/OverloadedOpenLayersMinimum.js", "OpenLayers/OverloadedOpenLayersStandard.js", "Geoportal/Lang.js", "Geoportal/Lang/en.js", "Geoportal/Lang/fr.js", "Geoportal/Lang/de.js", "Geoportal/Lang/es.js", "Geoportal/Lang/it.js", "Geoportal/Control.js", "Geoportal/Format.js", "Geoportal/Layer.js", "Geoportal/Layer/Aggregate.js", "Geoportal/OLS.js", "Geoportal/Popup.js", "Geoportal/Tile.js", "Geoportal/Util.js", "Geoportal/Control/Copyright.js", "Geoportal/Control/Floating.js", "Geoportal/Control/GraphicScale.js", "Geoportal/Control/Loading.js", "Geoportal/Control/Logo.js", "Geoportal/Control/Panel.js", "Geoportal/Control/PermanentLogo.js", "Geoportal/Control/PrintMap.js", "Geoportal/Control/Projections.js", "Geoportal/Control/RemoveLayer.js", "Geoportal/Control/SliderBase.js", "Geoportal/Control/TermsOfService.js", "Geoportal/Control/ToolBox.js", "Geoportal/Control/ZoomToLayerMaxExtent.js", "Geoportal/Format/GPX.js", "Geoportal/Format/GPX/v1.js", "Geoportal/Format/Geoconcept.js", "Geoportal/Format/XLS.js", "Geoportal/GeoRMHandler.js", "Geoportal/Layer/Grid.js", "Geoportal/Layer/WMS.js", "Geoportal/Layer/WMSC.js", "Geoportal/OLS/AbstractBody.js", "Geoportal/OLS/AbstractHeader.js", "Geoportal/OLS/AbstractLocation.js", "Geoportal/OLS/AbstractRequestParameters.js", "Geoportal/OLS/AbstractResponseParameters.js", "Geoportal/OLS/AbstractStreetLocator.js", "Geoportal/OLS/Error.js", "Geoportal/OLS/GeocodeMatchCode.js", "Geoportal/OLS/LUS.js", "Geoportal/OLS/Place.js", "Geoportal/OLS/PostalCode.js", "Geoportal/OLS/Street.js", "Geoportal/OLS/UOM.js", "Geoportal/OLS/XLS.js", "Geoportal/Popup/Anchored.js", "Geoportal/Tile/Image.js", "Geoportal/Control/Form.js", "Geoportal/Control/LayerOpacitySlider.js", "Geoportal/Control/NavToolbar.js", "Geoportal/Control/PanelToggle.js", "Geoportal/Control/ZoomSlider.js", "Geoportal/Format/GPX/v1_0.js", "Geoportal/Layer/GXT.js", "Geoportal/OLS/AbstractAddress.js", "Geoportal/OLS/AbstractPosition.js", "Geoportal/OLS/Building.js", "Geoportal/OLS/ErrorList.js", "Geoportal/OLS/LUS/ReverseGeocodePreference.js", "Geoportal/OLS/StreetAddress.js", "Geoportal/OLS/UOM/AbstractMeasure.js", "Geoportal/OLS/UOM/TimeStamp.js", "Geoportal/Control/LayerOpacity.js", "Geoportal/Control/MousePosition.js", "Geoportal/Control/ZoomBar.js", "Geoportal/OLS/Address.js", "Geoportal/OLS/Request.js", "Geoportal/OLS/RequestHeader.js", "Geoportal/OLS/Response.js", "Geoportal/OLS/ResponseHeader.js", "Geoportal/OLS/UOM/Angle.js", "Geoportal/OLS/UOM/Distance.js", "Geoportal/OLS/UOM/Speed.js", "Geoportal/OLS/UOM/Time.js", "Geoportal/Control/BasicLayerToolbar.js", "Geoportal/Control/Information.js", "Geoportal/Format/XLS/v1_1.js", "Geoportal/OLS/HorizontalAcc.js", "Geoportal/OLS/LUS/GeocodeRequest.js", "Geoportal/OLS/LUS/GeocodedAddress.js", "Geoportal/OLS/LUS/SearchCentreDistance.js", "Geoportal/OLS/UOM/Distance/Altitude.js", "Geoportal/OLS/VerticalAcc.js", "Geoportal/Control/LayerSwitcher.js", "Geoportal/Format/XLS/v1_0.js", "Geoportal/OLS/LUS/GeocodeResponseList.js", "Geoportal/OLS/LUS/ReverseGeocodedLocation.js", "Geoportal/OLS/QualityOfPosition.js", "Geoportal/OLS/LUS/GeocodeResponse.js", "Geoportal/OLS/LUS/ReverseGeocodeResponse.js", "Geoportal/OLS/Position.js", "Geoportal/OLS/LUS/ReverseGeocodeRequest.js", "Geoportal/Format/XLS/v1_1/LocationUtilityService.js", "Geoportal/Format/XLS/v1_0/LocationUtilityService.js", "Geoportal/Layer/OpenLS.js", "Geoportal/Layer/OpenLS/Core.js", "Geoportal/Layer/OpenLS/Core/LocationUtilityService.js", "Geoportal/Control/LocationUtilityService.js", "Geoportal/Control/LocationUtilityService/GeoNames.js", "Geoportal/Control/LocationUtilityService/Geocode.js", "Geoportal/Control/LocationUtilityService/ReverseGeocode.js", "Geoportal/Control/SearchToolbar.js", "Geoportal/Catalogue.js", "Geoportal/Map.js", "Geoportal/Viewer.js", "Geoportal/Viewer/Default.js", "Geoportal/Viewer/Standard.js" ]; // etc. var agent= navigator.userAgent; var docWrite= (agent.match("MSIE") || agent.match("Safari")); if(docWrite) { var allScriptTags= new Array(jsfiles.length); } else { var h= document.getElementsByTagName("head").length ? document.getElementsByTagName("head")[0] : document.body; if (!h) { alert('no head and body to include the JavaScript API.'); return; } } var host= Geoportal._getScriptLocation() + "lib/"; for (var i= 0, len= jsfiles.length; i < len; i++) { if(docWrite) { allScriptTags[i]= ""; } else { if(h) { var s= document.createElement("script"); s.src= host + jsfiles[i]; s.charset= "UTF-8"; s.type= "text/javascript"; h.appendChild(s); } } } if(docWrite) { document.write(allScriptTags.join("")); } } })(); /** * Constant: VERSION_NUMBER * {String} *"1.1 ; publicationDate=2010-08-02"* */ Geoportal.VERSION_NUMBER="1.1 ; publicationDate=2010-08-02";