diff --git a/openlayers/apidoc_config/Languages.txt b/openlayers/apidoc_config/Languages.txt new file mode 100644 index 0000000000..42b197c21b --- /dev/null +++ b/openlayers/apidoc_config/Languages.txt @@ -0,0 +1,113 @@ +Format: 1.52 + +# This is the Natural Docs languages file for this project. If you change +# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change +# something for all your projects, edit the Languages.txt in Natural Docs' +# Config directory instead. + + +# You can prevent certain file extensions from being scanned like this: +# Ignore Extensions: [extension] [extension] ... + + +#------------------------------------------------------------------------------- +# SYNTAX: +# +# Unlike other Natural Docs configuration files, in this file all comments +# MUST be alone on a line. Some languages deal with the # character, so you +# cannot put comments on the same line as content. +# +# Also, all lists are separated with spaces, not commas, again because some +# languages may need to use them. +# +# Language: [name] +# Alter Language: [name] +# Defines a new language or alters an existing one. Its name can use any +# characters. If any of the properties below have an add/replace form, you +# must use that when using Alter Language. +# +# The language Shebang Script is special. It's entry is only used for +# extensions, and files with those extensions have their shebang (#!) lines +# read to determine the real language of the file. Extensionless files are +# always treated this way. +# +# The language Text File is also special. It's treated as one big comment +# so you can put Natural Docs content in them without special symbols. Also, +# if you don't specify a package separator, ignored prefixes, or enum value +# behavior, it will copy those settings from the language that is used most +# in the source tree. +# +# Extensions: [extension] [extension] ... +# [Add/Replace] Extensions: [extension] [extension] ... +# Defines the file extensions of the language's source files. You can +# redefine extensions found in the main languages file. You can use * to +# mean any undefined extension. +# +# Shebang Strings: [string] [string] ... +# [Add/Replace] Shebang Strings: [string] [string] ... +# Defines a list of strings that can appear in the shebang (#!) line to +# designate that it's part of the language. You can redefine strings found +# in the main languages file. +# +# Ignore Prefixes in Index: [prefix] [prefix] ... +# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ... +# +# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ... +# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ... +# Specifies prefixes that should be ignored when sorting symbols in an +# index. Can be specified in general or for a specific topic type. +# +#------------------------------------------------------------------------------ +# For basic language support only: +# +# Line Comments: [symbol] [symbol] ... +# Defines a space-separated list of symbols that are used for line comments, +# if any. +# +# Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ... +# Defines a space-separated list of symbol pairs that are used for block +# comments, if any. +# +# Package Separator: [symbol] +# Defines the default package separator symbol. The default is a dot. +# +# [Topic Type] Prototype Enders: [symbol] [symbol] ... +# When defined, Natural Docs will attempt to get a prototype from the code +# immediately following the topic type. It stops when it reaches one of +# these symbols. Use \n for line breaks. +# +# Line Extender: [symbol] +# Defines the symbol that allows a prototype to span multiple lines if +# normally a line break would end it. +# +# Enum Values: [global|under type|under parent] +# Defines how enum values are referenced. The default is global. +# global - Values are always global, referenced as 'value'. +# under type - Values are under the enum type, referenced as +# 'package.enum.value'. +# under parent - Values are under the enum's parent, referenced as +# 'package.value'. +# +# Perl Package: [perl package] +# Specifies the Perl package used to fine-tune the language behavior in ways +# too complex to do in this file. +# +#------------------------------------------------------------------------------ +# For full language support only: +# +# Full Language Support: [perl package] +# Specifies the Perl package that has the parsing routines necessary for full +# language support. +# +#------------------------------------------------------------------------------- + +# The following languages are defined in the main file, if you'd like to alter +# them: +# +# Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python, +# PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile, +# ActionScript, ColdFusion, R, Fortran + +# If you add a language that you think would be useful to other developers +# and should be included in Natural Docs by default, please e-mail it to +# languages [at] naturaldocs [dot] org. diff --git a/openlayers/apidoc_config/Menu.txt b/openlayers/apidoc_config/Menu.txt new file mode 100644 index 0000000000..9d17464b31 --- /dev/null +++ b/openlayers/apidoc_config/Menu.txt @@ -0,0 +1,498 @@ +Format: 1.52 + + +Title: OpenLayers +SubTitle: JavaScript Mapping Library + +# You can add a footer to your documentation like this: +# Footer: [text] +# If you want to add a copyright notice, this would be the place to do it. + +# You can add a timestamp to your documentation like one of these: +# Timestamp: Generated on month day, year +# Timestamp: Updated mm/dd/yyyy +# Timestamp: Last updated mon day +# +# m - One or two digit month. January is "1" +# mm - Always two digit month. January is "01" +# mon - Short month word. January is "Jan" +# month - Long month word. January is "January" +# d - One or two digit day. 1 is "1" +# dd - Always two digit day. 1 is "01" +# day - Day with letter extension. 1 is "1st" +# yy - Two digit year. 2006 is "06" +# yyyy - Four digit year. 2006 is "2006" +# year - Four digit year. 2006 is "2006" + + +# -------------------------------------------------------------------------- +# +# Cut and paste the lines below to change the order in which your files +# appear on the menu. Don't worry about adding or removing files, Natural +# Docs will take care of that. +# +# You can further organize the menu by grouping the entries. Add a +# "Group: [name] {" line to start a group, and add a "}" to end it. +# +# You can add text and web links to the menu by adding "Text: [text]" and +# "Link: [name] ([URL])" lines, respectively. +# +# The formatting and comments are auto-generated, so don't worry about +# neatness when editing the file. Natural Docs will clean it up the next +# time it is run. When working with groups, just deal with the braces and +# forget about the indentation and comments. +# +# -------------------------------------------------------------------------- + + +Group: OpenLayers { + + File: OpenLayers (no auto-title, OpenLayers.js) + File: Ajax (no auto-title, OpenLayers/Ajax.js) + + Group: BaseTypes { + + File: Base Types (no auto-title, OpenLayers/BaseTypes.js) + File: Bounds (no auto-title, OpenLayers/BaseTypes/Bounds.js) + File: Class (no auto-title, OpenLayers/BaseTypes/Class.js) + File: Date (no auto-title, OpenLayers/BaseTypes/Date.js) + File: Element (no auto-title, OpenLayers/BaseTypes/Element.js) + File: LonLat (no auto-title, OpenLayers/BaseTypes/LonLat.js) + File: Pixel (no auto-title, OpenLayers/BaseTypes/Pixel.js) + File: Size (no auto-title, OpenLayers/BaseTypes/Size.js) + } # Group: BaseTypes + + File: Console (no auto-title, OpenLayers/Console.js) + + Group: Control { + + File: Control (no auto-title, OpenLayers/Control.js) + File: ArgParser (no auto-title, OpenLayers/Control/ArgParser.js) + File: Attribution (no auto-title, OpenLayers/Control/Attribution.js) + File: Button (no auto-title, OpenLayers/Control/Button.js) + File: DragFeature (no auto-title, OpenLayers/Control/DragFeature.js) + File: DragPan (no auto-title, OpenLayers/Control/DragPan.js) + File: DrawFeature (no auto-title, OpenLayers/Control/DrawFeature.js) + File: EditingToolbar (no auto-title, OpenLayers/Control/EditingToolbar.js) + File: Geolocate (no auto-title, OpenLayers/Control/Geolocate.js) + File: GetFeature (no auto-title, OpenLayers/Control/GetFeature.js) + File: Graticule (no auto-title, OpenLayers/Control/Graticule.js) + File: KeyboardDefaults (no auto-title, OpenLayers/Control/KeyboardDefaults.js) + File: LayerSwitcher (no auto-title, OpenLayers/Control/LayerSwitcher.js) + File: Measure (no auto-title, OpenLayers/Control/Measure.js) + File: ModifyFeature (no auto-title, OpenLayers/Control/ModifyFeature.js) + File: MouseDefaults (no auto-title, OpenLayers/Control/MouseDefaults.js) + File: MousePosition (no auto-title, OpenLayers/Control/MousePosition.js) + File: MouseToolbar (no auto-title, OpenLayers/Control/MouseToolbar.js) + File: Navigation (no auto-title, OpenLayers/Control/Navigation.js) + File: NavigationHistory (no auto-title, OpenLayers/Control/NavigationHistory.js) + File: NavToolbar (no auto-title, OpenLayers/Control/NavToolbar.js) + File: OverviewMap (no auto-title, OpenLayers/Control/OverviewMap.js) + File: Pan (no auto-title, OpenLayers/Control/Pan.js) + File: Panel (no auto-title, OpenLayers/Control/Panel.js) + File: PanPanel (no auto-title, OpenLayers/Control/PanPanel.js) + File: PanZoom (no auto-title, OpenLayers/Control/PanZoom.js) + File: PanZoomBar (no auto-title, OpenLayers/Control/PanZoomBar.js) + File: Permalink (no auto-title, OpenLayers/Control/Permalink.js) + File: PinchZoom (no auto-title, OpenLayers/Control/PinchZoom.js) + File: Scale (no auto-title, OpenLayers/Control/Scale.js) + File: ScaleLine (no auto-title, OpenLayers/Control/ScaleLine.js) + File: SelectFeature (no auto-title, OpenLayers/Control/SelectFeature.js) + File: SLDSelect (no auto-title, OpenLayers/Control/SLDSelect.js) + File: Snapping (no auto-title, OpenLayers/Control/Snapping.js) + File: Split (no auto-title, OpenLayers/Control/Split.js) + File: TouchNavigation (no auto-title, OpenLayers/Control/TouchNavigation.js) + File: TransformFeature (no auto-title, OpenLayers/Control/TransformFeature.js) + File: WMSGetFeatureInfo (no auto-title, OpenLayers/Control/WMSGetFeatureInfo.js) + File: WMTSGetFeatureInfo (no auto-title, OpenLayers/Control/WMTSGetFeatureInfo.js) + File: ZoomBox (no auto-title, OpenLayers/Control/ZoomBox.js) + File: ZoomIn (no auto-title, OpenLayers/Control/ZoomIn.js) + File: ZoomOut (no auto-title, OpenLayers/Control/ZoomOut.js) + File: ZoomPanel (no auto-title, OpenLayers/Control/ZoomPanel.js) + File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js) + } # Group: Control + + File: Events (no auto-title, OpenLayers/Events.js) + + Group: Feature { + + File: Feature (no auto-title, OpenLayers/Feature.js) + File: Vector (no auto-title, OpenLayers/Feature/Vector.js) + File: WFS (no auto-title, OpenLayers/Feature/WFS.js) + } # Group: Feature + + Group: Filter { + + File: Filter (no auto-title, OpenLayers/Filter.js) + File: Comparison (no auto-title, OpenLayers/Filter/Comparison.js) + File: FeatureId (no auto-title, OpenLayers/Filter/FeatureId.js) + File: Function (no auto-title, OpenLayers/Filter/Function.js) + File: Logical (no auto-title, OpenLayers/Filter/Logical.js) + File: Spatial (no auto-title, OpenLayers/Filter/Spatial.js) + } # Group: Filter + + Group: Format { + + File: Format (no auto-title, OpenLayers/Format.js) + File: ArcXML (no auto-title, OpenLayers/Format/ArcXML.js) + File: ArcXML.Features (no auto-title, OpenLayers/Format/ArcXML/Features.js) + File: Atom (no auto-title, OpenLayers/Format/Atom.js) + File: Context (no auto-title, OpenLayers/Format/Context.js) + File: CQL (no auto-title, OpenLayers/Format/CQL.js) + File: CSWGetDomain (no auto-title, OpenLayers/Format/CSWGetDomain.js) + File: CSWGetDomain.v2_0_2 (no auto-title, OpenLayers/Format/CSWGetDomain/v2_0_2.js) + File: CSWGetRecords (no auto-title, OpenLayers/Format/CSWGetRecords.js) + File: CSWGetRecords.v2_0_2 (no auto-title, OpenLayers/Format/CSWGetRecords/v2_0_2.js) + + Group: Filter { + + File: Filter (no auto-title, OpenLayers/Format/Filter.js) + File: v1 (no auto-title, OpenLayers/Format/Filter/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/Filter/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/Filter/v1_1_0.js) + } # Group: Filter + + File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js) + File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js) + + Group: GML { + + File: GML (no auto-title, OpenLayers/Format/GML.js) + File: Base (no auto-title, OpenLayers/Format/GML/Base.js) + File: v2 (no auto-title, OpenLayers/Format/GML/v2.js) + File: v3 (no auto-title, OpenLayers/Format/GML/v3.js) + } # Group: GML + + File: GPX (no auto-title, OpenLayers/Format/GPX.js) + File: JSON (no auto-title, OpenLayers/Format/JSON.js) + File: KML (no auto-title, OpenLayers/Format/KML.js) + File: OGCExceptionReport (no auto-title, OpenLayers/Format/OGCExceptionReport.js) + File: OSM (no auto-title, OpenLayers/Format/OSM.js) + File: OWSCommon (no auto-title, OpenLayers/Format/OWSCommon.js) + + Group: OWSCommon { + + File: v1 (no auto-title, OpenLayers/Format/OWSCommon/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_1_0.js) + } # Group: OWSCommon + + File: OWSContext (no auto-title, OpenLayers/Format/OWSContext.js) + File: OWSContext.v0_3_1 (no auto-title, OpenLayers/Format/OWSContext/v0_3_1.js) + File: QueryStringFilter (no auto-title, OpenLayers/Format/QueryStringFilter.js) + + Group: SLD { + + File: SLD (no auto-title, OpenLayers/Format/SLD.js) + File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js) + } # Group: SLD + + File: SOSCapabilities (no auto-title, OpenLayers/Format/SOSCapabilities.js) + File: SOSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/SOSCapabilities/v1_0_0.js) + File: SOSGetFeatureOfInterest (no auto-title, OpenLayers/Format/SOSGetFeatureOfInterest.js) + File: SOSGetObservation (no auto-title, OpenLayers/Format/SOSGetObservation.js) + File: Text (no auto-title, OpenLayers/Format/Text.js) + File: WCSGetCoverage version 1.1.0 (no auto-title, OpenLayers/Format/WCSGetCoverage.js) + File: WFS (no auto-title, OpenLayers/Format/WFS.js) + + Group: WFSCapabilities { + + File: WFSCapabilities (no auto-title, OpenLayers/Format/WFSCapabilities.js) + File: v1 (no auto-title, OpenLayers/Format/WFSCapabilities/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_1_0.js) + } # Group: WFSCapabilities + + File: WFSDescribeFeatureType (no auto-title, OpenLayers/Format/WFSDescribeFeatureType.js) + + Group: WFST { + + File: WFST (no auto-title, OpenLayers/Format/WFST.js) + File: v1 (no auto-title, OpenLayers/Format/WFST/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/WFST/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/WFST/v1_1_0.js) + } # Group: WFST + + File: WKT (no auto-title, OpenLayers/Format/WKT.js) + + Group: WMC { + + File: WMC (no auto-title, OpenLayers/Format/WMC.js) + File: v1 (no auto-title, OpenLayers/Format/WMC/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/WMC/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/WMC/v1_1_0.js) + } # Group: WMC + + Group: WMSCapabilities { + + File: WMSCapabilities (no auto-title, OpenLayers/Format/WMSCapabilities.js) + File: v1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1.js) + File: v1_1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_0.js) + File: v1_1_1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_1.js) + File: v1_3 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_3.js) + File: v1_3_0 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_3_0.js) + File: WMSCapabilities/v1_1_1_WMSC (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js) + } # Group: WMSCapabilities + + Group: WMSDescribeLayer { + + File: WMSDescribeLayer (no auto-title, OpenLayers/Format/WMSDescribeLayer.js) + File: v1_1 (no auto-title, OpenLayers/Format/WMSDescribeLayer/v1_1.js) + } # Group: WMSDescribeLayer + + File: WMSGetFeatureInfo (no auto-title, OpenLayers/Format/WMSGetFeatureInfo.js) + File: WMTSCapabilities (no auto-title, OpenLayers/Format/WMTSCapabilities.js) + File: WMTSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WMTSCapabilities/v1_0_0.js) + File: WPSCapabilities (no auto-title, OpenLayers/Format/WPSCapabilities.js) + File: WPSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WPSCapabilities/v1_0_0.js) + File: WPSDescribeProcess (no auto-title, OpenLayers/Format/WPSDescribeProcess.js) + File: WPSExecute version 1.0.0 (no auto-title, OpenLayers/Format/WPSExecute.js) + File: XLS (no auto-title, OpenLayers/Format/XLS.js) + File: XLS.v1 (no auto-title, OpenLayers/Format/XLS/v1.js) + File: XLS.v1_1_0 (no auto-title, OpenLayers/Format/XLS/v1_1_0.js) + File: XML (no auto-title, OpenLayers/Format/XML.js) + } # Group: Format + + Group: Geometry { + + File: Geometry (no auto-title, OpenLayers/Geometry.js) + File: Collection (no auto-title, OpenLayers/Geometry/Collection.js) + File: Curve (no auto-title, OpenLayers/Geometry/Curve.js) + File: LinearRing (no auto-title, OpenLayers/Geometry/LinearRing.js) + File: LineString (no auto-title, OpenLayers/Geometry/LineString.js) + File: MultiLineString (no auto-title, OpenLayers/Geometry/MultiLineString.js) + File: MultiPoint (no auto-title, OpenLayers/Geometry/MultiPoint.js) + File: MultiPolygon (no auto-title, OpenLayers/Geometry/MultiPolygon.js) + File: Point (no auto-title, OpenLayers/Geometry/Point.js) + File: Polygon (no auto-title, OpenLayers/Geometry/Polygon.js) + File: Rectangle (no auto-title, OpenLayers/Geometry/Rectangle.js) + } # Group: Geometry + + Group: Handler { + + File: Handler (no auto-title, OpenLayers/Handler.js) + File: Box (no auto-title, OpenLayers/Handler/Box.js) + File: Click (no auto-title, OpenLayers/Handler/Click.js) + File: Drag (no auto-title, OpenLayers/Handler/Drag.js) + File: Feature (no auto-title, OpenLayers/Handler/Feature.js) + File: Hover (no auto-title, OpenLayers/Handler/Hover.js) + File: Keyboard (no auto-title, OpenLayers/Handler/Keyboard.js) + File: MouseWheel (no auto-title, OpenLayers/Handler/MouseWheel.js) + File: Path (no auto-title, OpenLayers/Handler/Path.js) + File: Pinch (no auto-title, OpenLayers/Handler/Pinch.js) + File: Point (no auto-title, OpenLayers/Handler/Point.js) + File: Polygon (no auto-title, OpenLayers/Handler/Polygon.js) + File: RegularPolygon (no auto-title, OpenLayers/Handler/RegularPolygon.js) + } # Group: Handler + + File: Icon (no auto-title, OpenLayers/Icon.js) + File: Kinetic (no auto-title, OpenLayers/Kinetic.js) + + Group: Lang { + + File: Lang (no auto-title, OpenLayers/Lang.js) + File: ar (no auto-title, OpenLayers/Lang/ar.js) + File: be-tarask (no auto-title, OpenLayers/Lang/be-tarask.js) + File: bg (no auto-title, OpenLayers/Lang/bg.js) + File: br (no auto-title, OpenLayers/Lang/br.js) + File: ca (no auto-title, OpenLayers/Lang/ca.js) + File: cs-CZ (no auto-title, OpenLayers/Lang/cs-CZ.js) + File: da-DK (no auto-title, OpenLayers/Lang/da-DK.js) + File: de (no auto-title, OpenLayers/Lang/de.js) + File: en (no auto-title, OpenLayers/Lang/en.js) + File: en-CA (no auto-title, OpenLayers/Lang/en-CA.js) + File: es (no auto-title, OpenLayers/Lang/es.js) + File: el (no auto-title, OpenLayers/Lang/el.js) + File: fi (no auto-title, OpenLayers/Lang/fi.js) + File: fr (no auto-title, OpenLayers/Lang/fr.js) + File: fur (no auto-title, OpenLayers/Lang/fur.js) + File: gl (no auto-title, OpenLayers/Lang/gl.js) + File: gsw (no auto-title, OpenLayers/Lang/gsw.js) + File: hr (no auto-title, OpenLayers/Lang/hr.js) + File: hsb (no auto-title, OpenLayers/Lang/hsb.js) + File: hu (no auto-title, OpenLayers/Lang/hu.js) + File: ia (no auto-title, OpenLayers/Lang/ia.js) + File: id (no auto-title, OpenLayers/Lang/id.js) + File: io (no auto-title, OpenLayers/Lang/io.js) + File: is (no auto-title, OpenLayers/Lang/is.js) + File: it (no auto-title, OpenLayers/Lang/it.js) + File: ja (no auto-title, OpenLayers/Lang/ja.js) + File: km (no auto-title, OpenLayers/Lang/km.js) + File: ksh (no auto-title, OpenLayers/Lang/ksh.js) + File: lt (no auto-title, OpenLayers/Lang/lt.js) + File: nds (no auto-title, OpenLayers/Lang/nds.js) + File: nb (no auto-title, OpenLayers/Lang/nb.js) + File: nl (no auto-title, OpenLayers/Lang/nl.js) + File: nn (no auto-title, OpenLayers/Lang/nn.js) + File: oc (no auto-title, OpenLayers/Lang/oc.js) + File: pt (no auto-title, OpenLayers/Lang/pt.js) + File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js) + File: ru (no auto-title, OpenLayers/Lang/ru.js) + File: sk (no auto-title, OpenLayers/Lang/sk.js) + File: sv-SE (no auto-title, OpenLayers/Lang/sv-SE.js) + File: te (no auto-title, OpenLayers/Lang/te.js) + File: vi (no auto-title, OpenLayers/Lang/vi.js) + File: zh-CN (no auto-title, OpenLayers/Lang/zh-CN.js) + File: zh-TW (no auto-title, OpenLayers/Lang/zh-TW.js) + } # Group: Lang + + Group: Layer { + + File: Layer (no auto-title, OpenLayers/Layer.js) + File: ArcGISCache.js (no auto-title, OpenLayers/Layer/ArcGISCache.js) + File: ArcGIS93Rest (no auto-title, OpenLayers/Layer/ArcGIS93Rest.js) + File: ArcIMS (no auto-title, OpenLayers/Layer/ArcIMS.js) + File: Bing (no auto-title, OpenLayers/Layer/Bing.js) + File: Boxes (no auto-title, OpenLayers/Layer/Boxes.js) + File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js) + File: FixedZoomLevels (no auto-title, OpenLayers/Layer/FixedZoomLevels.js) + File: GeoRSS (no auto-title, OpenLayers/Layer/GeoRSS.js) + File: GML (no auto-title, OpenLayers/Layer/GML.js) + File: Google (no auto-title, OpenLayers/Layer/Google.js) + File: Google.v3 (no auto-title, OpenLayers/Layer/Google/v3.js) + File: GoogleNG (no auto-title, OpenLayers/Layer/GoogleNG.js) + File: Grid (no auto-title, OpenLayers/Layer/Grid.js) + File: HTTPRequest (no auto-title, OpenLayers/Layer/HTTPRequest.js) + File: Image (no auto-title, OpenLayers/Layer/Image.js) + File: KaMap (no auto-title, OpenLayers/Layer/KaMap.js) + File: KaMapCache (no auto-title, OpenLayers/Layer/KaMapCache.js) + File: MapGuide (no auto-title, OpenLayers/Layer/MapGuide.js) + File: MapServer (no auto-title, OpenLayers/Layer/MapServer.js) + File: MapServer.Untiled (no auto-title, OpenLayers/Layer/MapServer/Untiled.js) + File: Markers (no auto-title, OpenLayers/Layer/Markers.js) + File: MultiMap (no auto-title, OpenLayers/Layer/MultiMap.js) + File: PointGrid (no auto-title, OpenLayers/Layer/PointGrid.js) + File: PointTrack (no auto-title, OpenLayers/Layer/PointTrack.js) + File: SphericalMercator (no auto-title, OpenLayers/Layer/SphericalMercator.js) + File: Text (no auto-title, OpenLayers/Layer/Text.js) + File: TileCache (no auto-title, OpenLayers/Layer/TileCache.js) + File: TMS (no auto-title, OpenLayers/Layer/TMS.js) + File: Vector (no auto-title, OpenLayers/Layer/Vector.js) + File: Vector.RootContainer (no auto-title, OpenLayers/Layer/Vector/RootContainer.js) + File: VirtualEarth (no auto-title, OpenLayers/Layer/VirtualEarth.js) + File: WFS (no auto-title, OpenLayers/Layer/WFS.js) + File: WMS (no auto-title, OpenLayers/Layer/WMS.js) + File: WMS.Untiled (no auto-title, OpenLayers/Layer/WMS/Untiled.js) + File: WMS.Post (no auto-title, OpenLayers/Layer/WMS/Post.js) + File: WMTS (no auto-title, OpenLayers/Layer/WMTS.js) + File: WorldWind (no auto-title, OpenLayers/Layer/WorldWind.js) + File: XYZ (no auto-title, OpenLayers/Layer/XYZ.js) + File: Yahoo (no auto-title, OpenLayers/Layer/Yahoo.js) + File: Zoomify (no auto-title, OpenLayers/Layer/Zoomify.js) + } # Group: Layer + + File: Map (no auto-title, OpenLayers/Map.js) + + Group: Marker { + + File: Marker (no auto-title, OpenLayers/Marker.js) + File: Box (no auto-title, OpenLayers/Marker/Box.js) + } # Group: Marker + + Group: Popup { + + File: Popup (no auto-title, OpenLayers/Popup.js) + File: Anchored (no auto-title, OpenLayers/Popup/Anchored.js) + File: AnchoredBubble (no auto-title, OpenLayers/Popup/AnchoredBubble.js) + File: Framed (no auto-title, OpenLayers/Popup/Framed.js) + File: FramedCloud (no auto-title, OpenLayers/Popup/FramedCloud.js) + } # Group: Popup + + File: Projection (no auto-title, OpenLayers/Projection.js) + + Group: Protocol { + + File: Protocol (no auto-title, OpenLayers/Protocol.js) + File: HTTP (no auto-title, OpenLayers/Protocol/HTTP.js) + + Group: SQL { + + File: SQL (no auto-title, OpenLayers/Protocol/SQL.js) + File: Gears (no auto-title, OpenLayers/Protocol/SQL/Gears.js) + } # Group: SQL + + Group: WFS { + + File: WFS (no auto-title, OpenLayers/Protocol/WFS.js) + File: v1 (no auto-title, OpenLayers/Protocol/WFS/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Protocol/WFS/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Protocol/WFS/v1_1_0.js) + } # Group: WFS + + File: Script (no auto-title, OpenLayers/Protocol/Script.js) + File: SOS.DEFAULTS (no auto-title, OpenLayers/Protocol/SOS.js) + File: SOS.v1_0_0 (no auto-title, OpenLayers/Protocol/SOS/v1_0_0.js) + } # Group: Protocol + + Group: Renderer { + + File: Renderer (no auto-title, OpenLayers/Renderer.js) + File: Canvas (no auto-title, OpenLayers/Renderer/Canvas.js) + File: ElementsIndexer (no auto-title, OpenLayers/Renderer/Elements.js) + File: NG (no auto-title, OpenLayers/Renderer/NG.js) + File: SVG (no auto-title, OpenLayers/Renderer/SVG.js) + File: SVG2 (no auto-title, OpenLayers/Renderer/SVG2.js) + File: VML (no auto-title, OpenLayers/Renderer/VML.js) + } # Group: Renderer + + Group: Request { + + File: Request (no auto-title, OpenLayers/Request.js) + File: XMLHttpRequest (no auto-title, OpenLayers/Request/XMLHttpRequest.js) + } # Group: Request + + File: SingleFile.js (no auto-title, OpenLayers/SingleFile.js) + File: Rule (no auto-title, OpenLayers/Rule.js) + + Group: Strategy { + + File: Strategy (no auto-title, OpenLayers/Strategy.js) + File: BBOX (no auto-title, OpenLayers/Strategy/BBOX.js) + File: Cluster (no auto-title, OpenLayers/Strategy/Cluster.js) + File: Filter (no auto-title, OpenLayers/Strategy/Filter.js) + File: Fixed (no auto-title, OpenLayers/Strategy/Fixed.js) + File: Paging (no auto-title, OpenLayers/Strategy/Paging.js) + File: Refresh (no auto-title, OpenLayers/Strategy/Refresh.js) + File: Save (no auto-title, OpenLayers/Strategy/Save.js) + } # Group: Strategy + + File: Style (no auto-title, OpenLayers/Style.js) + File: Style2 (no auto-title, OpenLayers/Style2.js) + File: StyleMap (no auto-title, OpenLayers/StyleMap.js) + + Group: Symbolizer { + + File: Symbolizer (no auto-title, OpenLayers/Symbolizer.js) + File: Line (no auto-title, OpenLayers/Symbolizer/Line.js) + File: Point (no auto-title, OpenLayers/Symbolizer/Point.js) + File: Polygon (no auto-title, OpenLayers/Symbolizer/Polygon.js) + File: Raster (no auto-title, OpenLayers/Symbolizer/Raster.js) + File: Text (no auto-title, OpenLayers/Symbolizer/Text.js) + } # Group: Symbolizer + + Group: Tile { + + File: Tile (no auto-title, OpenLayers/Tile.js) + File: Google (no auto-title, OpenLayers/Tile/Google.js) + File: Image (no auto-title, OpenLayers/Tile/Image.js) + File: Image.IFrame (no auto-title, OpenLayers/Tile/Image/IFrame.js) + File: WFS (no auto-title, OpenLayers/Tile/WFS.js) + } # Group: Tile + + File: Tween (no auto-title, OpenLayers/Tween.js) + File: Util (no auto-title, OpenLayers/Util.js) + } # Group: OpenLayers + +Group: Index { + + Index: Everything + Class Index: Classes + Constant Index: Constants + Function Index: Functions + Property Index: Properties + File Index: Files + Constructor Index: Constructor + } # Group: Index + diff --git a/openlayers/apidoc_config/OL.css b/openlayers/apidoc_config/OL.css new file mode 100644 index 0000000000..a397119822 --- /dev/null +++ b/openlayers/apidoc_config/OL.css @@ -0,0 +1,20 @@ +p { + text-indent: 0; margin-bottom: 1em; +} + +.MGroup { + font-variant: normal; + margin: 0.4em 0 0em 10px +} + +.MTitle { + font-variant: normal; +} + +.CGroup .CTitle { + font-variant: normal; +} + +.SGroup .SEntry { + font-variant: normal; +} \ No newline at end of file diff --git a/openlayers/apidoc_config/Topics.txt b/openlayers/apidoc_config/Topics.txt new file mode 100644 index 0000000000..125abab726 --- /dev/null +++ b/openlayers/apidoc_config/Topics.txt @@ -0,0 +1,105 @@ +Format: 1.52 + +# This is the Natural Docs topics file for this project. If you change anything +# here, it will apply to THIS PROJECT ONLY. If you'd like to change something +# for all your projects, edit the Topics.txt in Natural Docs' Config directory +# instead. + + +Ignore Keywords: + function, functions + func, funcs + procedure, procedures + proc, procs + routine, routines + subroutine, subroutines + sub, subs + method, methods + callback, callbacks + property, properties + prop, props + + +#------------------------------------------------------------------------------- +# SYNTAX: +# +# Topic Type: [name] +# Alter Topic Type: [name] +# Creates a new topic type or alters one from the main file. Each type gets +# its own index and behavior settings. Its name can have letters, numbers, +# spaces, and these charaters: - / . ' +# +# Plural: [name] +# Sets the plural name of the topic type, if different. +# +# Keywords: +# [keyword] +# [keyword], [plural keyword] +# ... +# Defines or adds to the list of keywords for the topic type. They may only +# contain letters, numbers, and spaces and are not case sensitive. Plural +# keywords are used for list topics. You can redefine keywords found in the +# main topics file. +# +# Index: [yes|no] +# Whether the topics get their own index. Defaults to yes. Everything is +# included in the general index regardless of this setting. +# +# Scope: [normal|start|end|always global] +# How the topics affects scope. Defaults to normal. +# normal - Topics stay within the current scope. +# start - Topics start a new scope for all the topics beneath it, +# like class topics. +# end - Topics reset the scope back to global for all the topics +# beneath it. +# always global - Topics are defined as global, but do not change the scope +# for any other topics. +# +# Class Hierarchy: [yes|no] +# Whether the topics are part of the class hierarchy. Defaults to no. +# +# Page Title If First: [yes|no] +# Whether the topic's title becomes the page title if it's the first one in +# a file. Defaults to no. +# +# Break Lists: [yes|no] +# Whether list topics should be broken into individual topics in the output. +# Defaults to no. +# +# Can Group With: [type], [type], ... +# Defines a list of topic types that this one can possibly be grouped with. +# Defaults to none. +#------------------------------------------------------------------------------- + +# The following topics are defined in the main file, if you'd like to alter +# their behavior or add keywords: +# +# Generic, Class, Interface, Section, File, Group, Function, Variable, +# Property, Type, Constant, Enumeration, Event, Delegate, Macro, +# Database, Database Table, Database View, Database Index, Database +# Cursor, Database Trigger, Cookie, Build Target + +# If you add something that you think would be useful to other developers +# and should be included in Natural Docs by default, please e-mail it to +# topics [at] naturaldocs [dot] org. + + +Topic Type: Constructor + + Class Hierarchy: Yes + Keywords: + constructor + initialize + + +Alter Topic Type: Function + + Add Keywords: + apimethod + apifunction + + +Alter Topic Type: Property + + Add Keywords: + apiproperty diff --git a/openlayers/art/arrows.svg b/openlayers/art/arrows.svg new file mode 100644 index 0000000000..d40712d1a7 --- /dev/null +++ b/openlayers/art/arrows.svg @@ -0,0 +1,127 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/openlayers/art/layer-switcher-maximize.svg b/openlayers/art/layer-switcher-maximize.svg new file mode 100644 index 0000000000..6b9f0d39b8 --- /dev/null +++ b/openlayers/art/layer-switcher-maximize.svg @@ -0,0 +1,128 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/openlayers/art/layer-switcher-minimize.svg b/openlayers/art/layer-switcher-minimize.svg new file mode 100644 index 0000000000..70fcb8cbae --- /dev/null +++ b/openlayers/art/layer-switcher-minimize.svg @@ -0,0 +1,142 @@ + + + + + + + + + image/svg+xml + + + + + + + + + - + + + + + + diff --git a/openlayers/art/marker.svg b/openlayers/art/marker.svg new file mode 100644 index 0000000000..9f0d8dc49a --- /dev/null +++ b/openlayers/art/marker.svg @@ -0,0 +1,25 @@ + + + + +]> + + + + + + + + + + + + + + + + + diff --git a/openlayers/art/measuring-stick-off.svg b/openlayers/art/measuring-stick-off.svg new file mode 100644 index 0000000000..2e47a2fbc5 --- /dev/null +++ b/openlayers/art/measuring-stick-off.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + diff --git a/openlayers/art/measuring-stick-on.svg b/openlayers/art/measuring-stick-on.svg new file mode 100644 index 0000000000..ca0c18c751 --- /dev/null +++ b/openlayers/art/measuring-stick-on.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + diff --git a/openlayers/art/panning-hand-off.svg b/openlayers/art/panning-hand-off.svg new file mode 100644 index 0000000000..bf2e40b102 --- /dev/null +++ b/openlayers/art/panning-hand-off.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + diff --git a/openlayers/art/panning-hand-on.svg b/openlayers/art/panning-hand-on.svg new file mode 100644 index 0000000000..139ce97218 --- /dev/null +++ b/openlayers/art/panning-hand-on.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + diff --git a/openlayers/art/slider.svg b/openlayers/art/slider.svg new file mode 100644 index 0000000000..9fa435d421 --- /dev/null +++ b/openlayers/art/slider.svg @@ -0,0 +1,71 @@ + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/openlayers/art/zoom-world.svg b/openlayers/art/zoom-world.svg new file mode 100644 index 0000000000..749e7c70c9 --- /dev/null +++ b/openlayers/art/zoom-world.svg @@ -0,0 +1,193 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openlayers/art/zoombar.svg b/openlayers/art/zoombar.svg new file mode 100644 index 0000000000..a88ff36a91 --- /dev/null +++ b/openlayers/art/zoombar.svg @@ -0,0 +1,73 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/openlayers/build/README.txt b/openlayers/build/README.txt new file mode 100644 index 0000000000..ca8402c718 --- /dev/null +++ b/openlayers/build/README.txt @@ -0,0 +1,43 @@ +The OpenLayers build tool supports several different +forms of compressing your javascript code, and a method +of describing build profiles to create customized +OpenLayers builds with only the components you need. + +When building a file, you can choose to build with several +different compression options to the Python-based build.py +script. The following is an example script: + +python build.py -c closure full OpenLayers-closure.js + +This script selects the 'closure' compression mechanism, +uses a config file called 'full.cfg', and writes the output +to OpenLayers-closure.js. + +The options available for compression are: + + * closure + This requires you to have a closure-compiler.jar in your + tools directory. You can do this by fetching the compiler + from: + + http://closure-compiler.googlecode.com/files/compiler-latest.zip + + Then unzipping that file, and placing compiler.jar into tools + and renaming it closure-compiler.jar. + + * closure_ws + This uses the closure compiler webservice. This will only work + for files source Javascript files which are under 1MB. (Note that + the default OpenLayers full build is not under 1MB.) + + * jsmin + jsmin is the default compiler, and uses the Python-based + jsmin script to compress the Javascript. + + * minimize + This is a simple whitespace removing Python script, designed + to fill in when other tools are unavailable. + + * none + None will leave the Javascript uncompressed. + diff --git a/openlayers/build/build.py b/openlayers/build/build.py new file mode 100755 index 0000000000..d91878146f --- /dev/null +++ b/openlayers/build/build.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +import sys +sys.path.append("../tools") +import mergejs +import optparse + +def build(config_file = None, output_file = None, options = None): + have_compressor = [] + try: + import jsmin + have_compressor.append("jsmin") + except ImportError: + print "No jsmin" + try: + import closure + have_compressor.append("closure") + except Exception, E: + print "No closure (%s)" % E + try: + import closure_ws + have_compressor.append("closure_ws") + except ImportError: + print "No closure_ws" + + try: + import minimize + have_compressor.append("minimize") + except ImportError: + print "No minimize" + + use_compressor = None + if options.compressor and options.compressor in have_compressor: + use_compressor = options.compressor + + sourceDirectory = "../lib" + configFilename = "full.cfg" + outputFilename = "OpenLayers.js" + + if config_file: + configFilename = config_file + extension = configFilename[-4:] + + if extension != ".cfg": + configFilename = config_file + ".cfg" + + if output_file: + outputFilename = output_file + + print "Merging libraries." + merged = mergejs.run(sourceDirectory, None, configFilename) + print "Compressing using %s" % use_compressor + if use_compressor == "jsmin": + minimized = jsmin.jsmin(merged) + elif use_compressor == "minimize": + minimized = minimize.minimize(merged) + elif use_compressor == "closure_ws": + minimized = closure_ws.minimize(merged) + elif use_compressor == "closure": + minimized = closure.minimize(merged) + else: # fallback + minimized = merged + print "Adding license file." + minimized = file("license.txt").read() + minimized + + print "Writing to %s." % outputFilename + file(outputFilename, "w").write(minimized) + + print "Done." + +if __name__ == '__main__': + opt = optparse.OptionParser(usage="%s [options] [config_file] [output_file]\n Default config_file is 'full.cfg', Default output_file is 'OpenLayers.js'") + opt.add_option("-c", "--compressor", dest="compressor", help="compression method: one of 'jsmin', 'minimize', 'closure_ws', 'closure', or 'none'", default="jsmin") + (options, args) = opt.parse_args() + if not len(args): + build(options=options) + elif len(args) == 1: + build(args[0], options=options) + elif len(args) == 2: + build(args[0], args[1], options=options) + else: + print "Wrong number of arguments" diff --git a/openlayers/build/buildUncompressed.py b/openlayers/build/buildUncompressed.py new file mode 100755 index 0000000000..fd38aa74cd --- /dev/null +++ b/openlayers/build/buildUncompressed.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +import sys +sys.path.append("../tools") + +import jsmin, mergejs + +sourceDirectory = "../lib" +configFilename = "full.cfg" +outputFilename = "OpenLayers.js" + +if len(sys.argv) > 1: + configFilename = sys.argv[1] + ".cfg" +if len(sys.argv) > 2: + outputFilename = sys.argv[2] + +print "Merging libraries." +merged = mergejs.run(sourceDirectory, None, configFilename) +print "Adding license file." +merged = file("license.txt").read() + merged + +print "Writing to %s." % outputFilename +file(outputFilename, "w").write(merged) + +print "Done." diff --git a/openlayers/build/full.cfg b/openlayers/build/full.cfg new file mode 100644 index 0000000000..5ed2b7b71c --- /dev/null +++ b/openlayers/build/full.cfg @@ -0,0 +1,13 @@ +# This is the full build with all files: this includes the vector-related files +# like Renderers and Formats. + +[first] + +[last] + +[include] + +[exclude] +Firebug +OpenLayers.js +OpenLayers/Lang diff --git a/openlayers/build/library.cfg b/openlayers/build/library.cfg new file mode 100644 index 0000000000..572cd5873c --- /dev/null +++ b/openlayers/build/library.cfg @@ -0,0 +1,48 @@ +# This file includes the OpenLayers code to create a build for everything that +# does not require vector support. + +[first] + +[last] + +[include] + +[exclude] +Firebug +OpenLayers.js +OpenLayers/Format/GeoRSS.js +OpenLayers/Format/GML.js +OpenLayers/Format/WKT.js +OpenLayers/Format/KML.js +OpenLayers/Format/WFS.js +OpenLayers/Format.js +OpenLayers/Handler/Path.js +OpenLayers/Handler/Point.js +OpenLayers/Handler/Polygon.js +OpenLayers/Handler/Select.js +OpenLayers/Geometry/Collection.js +OpenLayers/Geometry/Curve.js +OpenLayers/Geometry/LinearRing.js +OpenLayers/Geometry/LineString.js +OpenLayers/Geometry/MultiLineString.js +OpenLayers/Geometry/MultiPoint.js +OpenLayers/Geometry/MultiPolygon.js +OpenLayers/Geometry/Point.js +OpenLayers/Geometry/Polygon.js +OpenLayers/Geometry/Rectangle.js +OpenLayers/Geometry/Surface.js +OpenLayers/Geometry.js +OpenLayers/Layer/GML.js +OpenLayers/Layer/Vector.js +OpenLayers/Control/DrawFeature.js +OpenLayers/Control/EditingToolbar.js +OpenLayers/Control/SelectFeature.js +OpenLayers/Feature/Vector.js +OpenLayers/Renderer +OpenLayers/Renderer/Elements.js +OpenLayers/Renderer/SVG.js +OpenLayers/Renderer/VML.js +OpenLayers/Renderer.js +OpenLayers/Lang + + diff --git a/openlayers/build/license.txt b/openlayers/build/license.txt new file mode 100644 index 0000000000..ffb1fe13e6 --- /dev/null +++ b/openlayers/build/license.txt @@ -0,0 +1,125 @@ +/* + + OpenLayers.js -- OpenLayers Map Viewer Library + + Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD + license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt + for the full text of the license. + + Includes compressed code under the following licenses: + + (For uncompressed versions of the code used please see the + OpenLayers SVN repository: ) + +*/ + +/* Contains portions of Prototype.js: + * + * Prototype JavaScript framework, version 1.4.0 + * (c) 2005 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://prototype.conio.net/ + * + *--------------------------------------------------------------------------*/ + +/** +* +* Contains portions of Rico +* +* Copyright 2005 Sabre Airline Solutions +* +* Licensed under the Apache License, Version 2.0 (the "License"); you +* may not use this file except in compliance with the License. You +* may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +* implied. See the License for the specific language governing +* permissions and limitations under the License. +* +**/ + +/** + * Contains XMLHttpRequest.js + * Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +/** + * Contains portions of Gears + * + * Copyright 2007, Google Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of Google Inc. nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Sets up google.gears.*, which is *the only* supported way to access Gears. + * + * Circumvent this file at your own risk! + * + * In the future, Gears may automatically define google.gears.* without this + * file. Gears may use these objects to transparently fix bugs and compatibility + * issues. Applications that use the code below will continue to work seamlessly + * when that happens. + */ + +/** + * OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is + * Copyright (c) 2006, Yahoo! Inc. + * All rights reserved. + * + * Redistribution and use of this software in source and binary forms, with or + * without modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of Yahoo! Inc. nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission of Yahoo! Inc. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ \ No newline at end of file diff --git a/openlayers/build/lite.cfg b/openlayers/build/lite.cfg new file mode 100644 index 0000000000..d274e272c4 --- /dev/null +++ b/openlayers/build/lite.cfg @@ -0,0 +1,17 @@ +# This file includes a small subset of OpenLayers code, designed to be +# integrated into another application. It includes only the Layer types +# neccesary to create tiled or untiled WMS, and does not include any Controls. +# This is the result of what was at the time called "Webmap.js" at the FOSS4G +# Web Mapping BOF. + +[first] + +[last] + +[include] +OpenLayers/Map.js +OpenLayers/Layer/WMS.js + +[exclude] + + diff --git a/openlayers/build/mobile.cfg b/openlayers/build/mobile.cfg new file mode 100644 index 0000000000..7bf6afaf62 --- /dev/null +++ b/openlayers/build/mobile.cfg @@ -0,0 +1,36 @@ +[first] + +[last] + +[include] +OpenLayers/Map.js +OpenLayers/Kinetic.js +OpenLayers/Projection.js +OpenLayers/Layer/SphericalMercator.js +OpenLayers/Layer/XYZ.js +OpenLayers/Layer/Bing.js +OpenLayers/Layer/WMS.js +OpenLayers/Control/TouchNavigation.js +OpenLayers/Control/Geolocate.js +OpenLayers/Control/ZoomPanel.js +OpenLayers/Control/Attribution.js +OpenLayers/Control/SelectFeature.js +OpenLayers/Control/DrawFeature.js +OpenLayers/Control/ModifyFeature.js +OpenLayers/Control/Panel.js +OpenLayers/Handler/Point.js +OpenLayers/Handler/Path.js +OpenLayers/Handler/Polygon.js +OpenLayers/Layer/Vector.js +OpenLayers/Renderer/SVG.js +OpenLayers/Renderer/Canvas.js +OpenLayers/Format/GeoJSON.js +OpenLayers/Format/KML.js +OpenLayers/Protocol/HTTP.js +OpenLayers/Protocol/WFS.js +OpenLayers/Protocol/WFS/v1_0_0.js +OpenLayers/Strategy/Fixed.js + +[exclude] + + diff --git a/openlayers/build/tests.cfg b/openlayers/build/tests.cfg new file mode 100644 index 0000000000..9e2237f7b1 --- /dev/null +++ b/openlayers/build/tests.cfg @@ -0,0 +1,10 @@ +# This build config is supposed to be used for the units tests with "mode=build" + +[first] + +[last] + +[include] + +[exclude] +OpenLayers.js diff --git a/openlayers/doc/authors.txt b/openlayers/doc/authors.txt new file mode 100644 index 0000000000..dfcd9ff2fd --- /dev/null +++ b/openlayers/doc/authors.txt @@ -0,0 +1,56 @@ +OpenLayers contributors: + +Antoine Abt +Mike Adair +Jeff Adams +Seb Benthall +Bruno Binet +Stéphane Brunner +Howard Butler +Bertil Chaupis +John Cole +Tim Coulter +Robert Coup +Jeff Dege +Roald de Wit +Schuyler Erle +Christian López Espínola +John Frank +Sean Gilles +Pierre Giraud +Ivan Grcic +Andreas Hocevar +Marc Jansen +Ian Johnson +Frédéric Junod +Eric Lemoine +Philip Lindsay +Martijn van Oosterhout +David Overstrom +Corey Puffault +Peter William Robins +Gregers Rygg +Tim Schaub +Christopher Schmidt +Cameron Shorter +Pedro Simonetti +Paul Spencer +Paul Smith +Glen Stampoultzis +James Stembridge +Erik Uzureau +Bart van den Eijnden +Ivan Willig +Thomas Wood +Bill Woodall +Steve Woodbridge +David Zwarg + +Some portions of OpenLayers are used under the Apache 2.0 license, available +in doc/licenses/APACHE-2.0.txt. + +Some portions of OpenLayers are used under the MIT license, availabie in +doc/licenses/MIT-LICENSE.txt. + +Some portions of OpenLayers are Copyright 2001 Robert Penner, and are used +under the BSD license, available in doc/licenses/BSD-LICENSE.txt diff --git a/openlayers/doc/customization b/openlayers/doc/customization new file mode 100644 index 0000000000..f4b5b98aa9 --- /dev/null +++ b/openlayers/doc/customization @@ -0,0 +1,49 @@ +Customizing OpenLayers +====================== + +OpenLayers is designed to fit many needs -- fitting in alongside all kinds of +various applications which are currently in use. + +Currently, OpenLayers supports a 'theme' option when creating a map. This +theme option allows you to specify the location of a CSS theme which should +be included. + +A default theme is available as an example in the theme/ directory: the setup +is: + + * theme/ + * theme/default/ + * theme/default/style.css + * theme/default/img/ + +Currently, the OpenLayers code does not support class names, and therefore, +it is not possible to control many aspects of OpenLayers code with CSS +classes. However, with this framework in place, we expect to invest time +to make existing features and new features use the CSS theming framework +where apropriate. + + +Class Naming +============ +Elements should have class names which are descriptive of the Javascript +class from which they come. For example, the main layer switcher element +in the OpenLayers.Control.LayerSwitcher would be classed: + + olControlLayerSwitcher + +This would allow users to add to their style.css class in their theme, +changing, for example: + +:: + + .olControlLayerSwitcher input { + width:10px; + } + +Sub elements of a particular control can add to the class name: + +:: + + .olControlLayerSwitcherBaseLabel { + color: red; + } diff --git a/openlayers/doc/licenses/APACHE-2.0.txt b/openlayers/doc/licenses/APACHE-2.0.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/openlayers/doc/licenses/APACHE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/openlayers/doc/licenses/BSD-LICENSE.txt b/openlayers/doc/licenses/BSD-LICENSE.txt new file mode 100644 index 0000000000..aa321e6749 --- /dev/null +++ b/openlayers/doc/licenses/BSD-LICENSE.txt @@ -0,0 +1,28 @@ +Redistribution and use of this software in source and binary forms, with or +without modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of Yahoo! Inc. nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission of Yahoo! Inc. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/openlayers/doc/licenses/MIT-LICENSE.txt b/openlayers/doc/licenses/MIT-LICENSE.txt new file mode 100644 index 0000000000..c9b44cb8aa --- /dev/null +++ b/openlayers/doc/licenses/MIT-LICENSE.txt @@ -0,0 +1,18 @@ +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/openlayers/doc/readme.txt b/openlayers/doc/readme.txt new file mode 100644 index 0000000000..d02540af67 --- /dev/null +++ b/openlayers/doc/readme.txt @@ -0,0 +1,7 @@ +Automatically generated OpenLayers API documentation is online: + + http://dev.openlayers.org/apidocs + +More information on documentation is available from: + + http://trac.openlayers.org/wiki/Documentation diff --git a/openlayers/doc/walkthru.html b/openlayers/doc/walkthru.html new file mode 100644 index 0000000000..b135e63523 --- /dev/null +++ b/openlayers/doc/walkthru.html @@ -0,0 +1,96 @@ + + +OpenLayers examples walkthrough + + + + +

<ol>

+

API documentation: http://dev.openlayers.org/docs/

+

Examples: http://openlayers.org/dev/examples/

+

Maps

+
    +
  1. Basic example
  2. +
  3. Layer switcher (aka legend)
  4. +
  5. Base layers versus overlays
  6. +
  7. Multiple WMS mirrors
  8. +
  9. Full screen map
  10. +
  11. Wrapping the date line
  12. +
  13. Other cartographic projections
  14. +
  15. Translucent overlays
  16. +
+ +

Raster Layers

+
    +
  1. Untiled WMS layer
  2. +
  3. Ka-Map layer
  4. +
  5. MapServer layer
  6. +
  7. Worldwind layer
  8. +
  9. TMS layer
  10. +
  11. Image layer
  12. +
  13. Google layer
  14. +
  15. VirtualEarth layer
  16. +
  17. Spherical Mercator ("EPSG:900913")
  18. +
  19. TileCache
  20. +
+ +

Marker Layers

+
    +
  1. Markers
  2. +
  3. Changing marker properties dynamically
  4. +
  5. Popups
  6. +
  7. GeoRSS (example data)
  8. +
  9. GeoRSS with custom markers
  10. +
  11. Point layer from WFS
  12. +
  13. WFS GetFeatureInfo example
  14. +
+ +

Events and Controls

+
    +
  1. Navigation tools on the map
  2. +
  3. Navigation toolbar off the map
  4. +
  5. Tracking the mouse position
  6. +
  7. Overview map
  8. +
  9. Layer attribution
  10. +
  11. Full range of controls
  12. +
  13. Custom controls #1
  14. +
  15. Custom controls #2
  16. +
  17. Custom control styles
  18. +
  19. Trapping click events
  20. +
  21. Tracking map events
  22. +
+ +

Vector Layers

+
    +
  1. Generating features in JavaScript
  2. +
  3. Loading features from GML
  4. +
  5. Loading features from KML
  6. +
  7. Serializing features to GML
  8. +
  9. Serializing to other formats
  10. +
  11. Selecting features
  12. +
  13. Attaching popups to features
  14. +
+ +

Editing Tools

+
    +
  1. Drawing features
  2. +
  3. Editing toolbar (outside the map)
  4. +
  5. Creating regular polygons
  6. +
  7. Modifying features
  8. +
  9. Resizing features
  10. +
  11. Rotating features
  12. +
  13. Transactional WFS example
  14. +
  15. FeatureServer
  16. +
+ +

Testing

+
    +
  1. Test.AnotherWay suite
  2. +
+ +

</ol>

+ + diff --git a/openlayers/doc_config/Languages.txt b/openlayers/doc_config/Languages.txt new file mode 100644 index 0000000000..42b197c21b --- /dev/null +++ b/openlayers/doc_config/Languages.txt @@ -0,0 +1,113 @@ +Format: 1.52 + +# This is the Natural Docs languages file for this project. If you change +# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change +# something for all your projects, edit the Languages.txt in Natural Docs' +# Config directory instead. + + +# You can prevent certain file extensions from being scanned like this: +# Ignore Extensions: [extension] [extension] ... + + +#------------------------------------------------------------------------------- +# SYNTAX: +# +# Unlike other Natural Docs configuration files, in this file all comments +# MUST be alone on a line. Some languages deal with the # character, so you +# cannot put comments on the same line as content. +# +# Also, all lists are separated with spaces, not commas, again because some +# languages may need to use them. +# +# Language: [name] +# Alter Language: [name] +# Defines a new language or alters an existing one. Its name can use any +# characters. If any of the properties below have an add/replace form, you +# must use that when using Alter Language. +# +# The language Shebang Script is special. It's entry is only used for +# extensions, and files with those extensions have their shebang (#!) lines +# read to determine the real language of the file. Extensionless files are +# always treated this way. +# +# The language Text File is also special. It's treated as one big comment +# so you can put Natural Docs content in them without special symbols. Also, +# if you don't specify a package separator, ignored prefixes, or enum value +# behavior, it will copy those settings from the language that is used most +# in the source tree. +# +# Extensions: [extension] [extension] ... +# [Add/Replace] Extensions: [extension] [extension] ... +# Defines the file extensions of the language's source files. You can +# redefine extensions found in the main languages file. You can use * to +# mean any undefined extension. +# +# Shebang Strings: [string] [string] ... +# [Add/Replace] Shebang Strings: [string] [string] ... +# Defines a list of strings that can appear in the shebang (#!) line to +# designate that it's part of the language. You can redefine strings found +# in the main languages file. +# +# Ignore Prefixes in Index: [prefix] [prefix] ... +# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ... +# +# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ... +# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ... +# Specifies prefixes that should be ignored when sorting symbols in an +# index. Can be specified in general or for a specific topic type. +# +#------------------------------------------------------------------------------ +# For basic language support only: +# +# Line Comments: [symbol] [symbol] ... +# Defines a space-separated list of symbols that are used for line comments, +# if any. +# +# Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ... +# Defines a space-separated list of symbol pairs that are used for block +# comments, if any. +# +# Package Separator: [symbol] +# Defines the default package separator symbol. The default is a dot. +# +# [Topic Type] Prototype Enders: [symbol] [symbol] ... +# When defined, Natural Docs will attempt to get a prototype from the code +# immediately following the topic type. It stops when it reaches one of +# these symbols. Use \n for line breaks. +# +# Line Extender: [symbol] +# Defines the symbol that allows a prototype to span multiple lines if +# normally a line break would end it. +# +# Enum Values: [global|under type|under parent] +# Defines how enum values are referenced. The default is global. +# global - Values are always global, referenced as 'value'. +# under type - Values are under the enum type, referenced as +# 'package.enum.value'. +# under parent - Values are under the enum's parent, referenced as +# 'package.value'. +# +# Perl Package: [perl package] +# Specifies the Perl package used to fine-tune the language behavior in ways +# too complex to do in this file. +# +#------------------------------------------------------------------------------ +# For full language support only: +# +# Full Language Support: [perl package] +# Specifies the Perl package that has the parsing routines necessary for full +# language support. +# +#------------------------------------------------------------------------------- + +# The following languages are defined in the main file, if you'd like to alter +# them: +# +# Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python, +# PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile, +# ActionScript, ColdFusion, R, Fortran + +# If you add a language that you think would be useful to other developers +# and should be included in Natural Docs by default, please e-mail it to +# languages [at] naturaldocs [dot] org. diff --git a/openlayers/doc_config/Menu.txt b/openlayers/doc_config/Menu.txt new file mode 100644 index 0000000000..9d17464b31 --- /dev/null +++ b/openlayers/doc_config/Menu.txt @@ -0,0 +1,498 @@ +Format: 1.52 + + +Title: OpenLayers +SubTitle: JavaScript Mapping Library + +# You can add a footer to your documentation like this: +# Footer: [text] +# If you want to add a copyright notice, this would be the place to do it. + +# You can add a timestamp to your documentation like one of these: +# Timestamp: Generated on month day, year +# Timestamp: Updated mm/dd/yyyy +# Timestamp: Last updated mon day +# +# m - One or two digit month. January is "1" +# mm - Always two digit month. January is "01" +# mon - Short month word. January is "Jan" +# month - Long month word. January is "January" +# d - One or two digit day. 1 is "1" +# dd - Always two digit day. 1 is "01" +# day - Day with letter extension. 1 is "1st" +# yy - Two digit year. 2006 is "06" +# yyyy - Four digit year. 2006 is "2006" +# year - Four digit year. 2006 is "2006" + + +# -------------------------------------------------------------------------- +# +# Cut and paste the lines below to change the order in which your files +# appear on the menu. Don't worry about adding or removing files, Natural +# Docs will take care of that. +# +# You can further organize the menu by grouping the entries. Add a +# "Group: [name] {" line to start a group, and add a "}" to end it. +# +# You can add text and web links to the menu by adding "Text: [text]" and +# "Link: [name] ([URL])" lines, respectively. +# +# The formatting and comments are auto-generated, so don't worry about +# neatness when editing the file. Natural Docs will clean it up the next +# time it is run. When working with groups, just deal with the braces and +# forget about the indentation and comments. +# +# -------------------------------------------------------------------------- + + +Group: OpenLayers { + + File: OpenLayers (no auto-title, OpenLayers.js) + File: Ajax (no auto-title, OpenLayers/Ajax.js) + + Group: BaseTypes { + + File: Base Types (no auto-title, OpenLayers/BaseTypes.js) + File: Bounds (no auto-title, OpenLayers/BaseTypes/Bounds.js) + File: Class (no auto-title, OpenLayers/BaseTypes/Class.js) + File: Date (no auto-title, OpenLayers/BaseTypes/Date.js) + File: Element (no auto-title, OpenLayers/BaseTypes/Element.js) + File: LonLat (no auto-title, OpenLayers/BaseTypes/LonLat.js) + File: Pixel (no auto-title, OpenLayers/BaseTypes/Pixel.js) + File: Size (no auto-title, OpenLayers/BaseTypes/Size.js) + } # Group: BaseTypes + + File: Console (no auto-title, OpenLayers/Console.js) + + Group: Control { + + File: Control (no auto-title, OpenLayers/Control.js) + File: ArgParser (no auto-title, OpenLayers/Control/ArgParser.js) + File: Attribution (no auto-title, OpenLayers/Control/Attribution.js) + File: Button (no auto-title, OpenLayers/Control/Button.js) + File: DragFeature (no auto-title, OpenLayers/Control/DragFeature.js) + File: DragPan (no auto-title, OpenLayers/Control/DragPan.js) + File: DrawFeature (no auto-title, OpenLayers/Control/DrawFeature.js) + File: EditingToolbar (no auto-title, OpenLayers/Control/EditingToolbar.js) + File: Geolocate (no auto-title, OpenLayers/Control/Geolocate.js) + File: GetFeature (no auto-title, OpenLayers/Control/GetFeature.js) + File: Graticule (no auto-title, OpenLayers/Control/Graticule.js) + File: KeyboardDefaults (no auto-title, OpenLayers/Control/KeyboardDefaults.js) + File: LayerSwitcher (no auto-title, OpenLayers/Control/LayerSwitcher.js) + File: Measure (no auto-title, OpenLayers/Control/Measure.js) + File: ModifyFeature (no auto-title, OpenLayers/Control/ModifyFeature.js) + File: MouseDefaults (no auto-title, OpenLayers/Control/MouseDefaults.js) + File: MousePosition (no auto-title, OpenLayers/Control/MousePosition.js) + File: MouseToolbar (no auto-title, OpenLayers/Control/MouseToolbar.js) + File: Navigation (no auto-title, OpenLayers/Control/Navigation.js) + File: NavigationHistory (no auto-title, OpenLayers/Control/NavigationHistory.js) + File: NavToolbar (no auto-title, OpenLayers/Control/NavToolbar.js) + File: OverviewMap (no auto-title, OpenLayers/Control/OverviewMap.js) + File: Pan (no auto-title, OpenLayers/Control/Pan.js) + File: Panel (no auto-title, OpenLayers/Control/Panel.js) + File: PanPanel (no auto-title, OpenLayers/Control/PanPanel.js) + File: PanZoom (no auto-title, OpenLayers/Control/PanZoom.js) + File: PanZoomBar (no auto-title, OpenLayers/Control/PanZoomBar.js) + File: Permalink (no auto-title, OpenLayers/Control/Permalink.js) + File: PinchZoom (no auto-title, OpenLayers/Control/PinchZoom.js) + File: Scale (no auto-title, OpenLayers/Control/Scale.js) + File: ScaleLine (no auto-title, OpenLayers/Control/ScaleLine.js) + File: SelectFeature (no auto-title, OpenLayers/Control/SelectFeature.js) + File: SLDSelect (no auto-title, OpenLayers/Control/SLDSelect.js) + File: Snapping (no auto-title, OpenLayers/Control/Snapping.js) + File: Split (no auto-title, OpenLayers/Control/Split.js) + File: TouchNavigation (no auto-title, OpenLayers/Control/TouchNavigation.js) + File: TransformFeature (no auto-title, OpenLayers/Control/TransformFeature.js) + File: WMSGetFeatureInfo (no auto-title, OpenLayers/Control/WMSGetFeatureInfo.js) + File: WMTSGetFeatureInfo (no auto-title, OpenLayers/Control/WMTSGetFeatureInfo.js) + File: ZoomBox (no auto-title, OpenLayers/Control/ZoomBox.js) + File: ZoomIn (no auto-title, OpenLayers/Control/ZoomIn.js) + File: ZoomOut (no auto-title, OpenLayers/Control/ZoomOut.js) + File: ZoomPanel (no auto-title, OpenLayers/Control/ZoomPanel.js) + File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js) + } # Group: Control + + File: Events (no auto-title, OpenLayers/Events.js) + + Group: Feature { + + File: Feature (no auto-title, OpenLayers/Feature.js) + File: Vector (no auto-title, OpenLayers/Feature/Vector.js) + File: WFS (no auto-title, OpenLayers/Feature/WFS.js) + } # Group: Feature + + Group: Filter { + + File: Filter (no auto-title, OpenLayers/Filter.js) + File: Comparison (no auto-title, OpenLayers/Filter/Comparison.js) + File: FeatureId (no auto-title, OpenLayers/Filter/FeatureId.js) + File: Function (no auto-title, OpenLayers/Filter/Function.js) + File: Logical (no auto-title, OpenLayers/Filter/Logical.js) + File: Spatial (no auto-title, OpenLayers/Filter/Spatial.js) + } # Group: Filter + + Group: Format { + + File: Format (no auto-title, OpenLayers/Format.js) + File: ArcXML (no auto-title, OpenLayers/Format/ArcXML.js) + File: ArcXML.Features (no auto-title, OpenLayers/Format/ArcXML/Features.js) + File: Atom (no auto-title, OpenLayers/Format/Atom.js) + File: Context (no auto-title, OpenLayers/Format/Context.js) + File: CQL (no auto-title, OpenLayers/Format/CQL.js) + File: CSWGetDomain (no auto-title, OpenLayers/Format/CSWGetDomain.js) + File: CSWGetDomain.v2_0_2 (no auto-title, OpenLayers/Format/CSWGetDomain/v2_0_2.js) + File: CSWGetRecords (no auto-title, OpenLayers/Format/CSWGetRecords.js) + File: CSWGetRecords.v2_0_2 (no auto-title, OpenLayers/Format/CSWGetRecords/v2_0_2.js) + + Group: Filter { + + File: Filter (no auto-title, OpenLayers/Format/Filter.js) + File: v1 (no auto-title, OpenLayers/Format/Filter/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/Filter/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/Filter/v1_1_0.js) + } # Group: Filter + + File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js) + File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js) + + Group: GML { + + File: GML (no auto-title, OpenLayers/Format/GML.js) + File: Base (no auto-title, OpenLayers/Format/GML/Base.js) + File: v2 (no auto-title, OpenLayers/Format/GML/v2.js) + File: v3 (no auto-title, OpenLayers/Format/GML/v3.js) + } # Group: GML + + File: GPX (no auto-title, OpenLayers/Format/GPX.js) + File: JSON (no auto-title, OpenLayers/Format/JSON.js) + File: KML (no auto-title, OpenLayers/Format/KML.js) + File: OGCExceptionReport (no auto-title, OpenLayers/Format/OGCExceptionReport.js) + File: OSM (no auto-title, OpenLayers/Format/OSM.js) + File: OWSCommon (no auto-title, OpenLayers/Format/OWSCommon.js) + + Group: OWSCommon { + + File: v1 (no auto-title, OpenLayers/Format/OWSCommon/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_1_0.js) + } # Group: OWSCommon + + File: OWSContext (no auto-title, OpenLayers/Format/OWSContext.js) + File: OWSContext.v0_3_1 (no auto-title, OpenLayers/Format/OWSContext/v0_3_1.js) + File: QueryStringFilter (no auto-title, OpenLayers/Format/QueryStringFilter.js) + + Group: SLD { + + File: SLD (no auto-title, OpenLayers/Format/SLD.js) + File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js) + } # Group: SLD + + File: SOSCapabilities (no auto-title, OpenLayers/Format/SOSCapabilities.js) + File: SOSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/SOSCapabilities/v1_0_0.js) + File: SOSGetFeatureOfInterest (no auto-title, OpenLayers/Format/SOSGetFeatureOfInterest.js) + File: SOSGetObservation (no auto-title, OpenLayers/Format/SOSGetObservation.js) + File: Text (no auto-title, OpenLayers/Format/Text.js) + File: WCSGetCoverage version 1.1.0 (no auto-title, OpenLayers/Format/WCSGetCoverage.js) + File: WFS (no auto-title, OpenLayers/Format/WFS.js) + + Group: WFSCapabilities { + + File: WFSCapabilities (no auto-title, OpenLayers/Format/WFSCapabilities.js) + File: v1 (no auto-title, OpenLayers/Format/WFSCapabilities/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_1_0.js) + } # Group: WFSCapabilities + + File: WFSDescribeFeatureType (no auto-title, OpenLayers/Format/WFSDescribeFeatureType.js) + + Group: WFST { + + File: WFST (no auto-title, OpenLayers/Format/WFST.js) + File: v1 (no auto-title, OpenLayers/Format/WFST/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/WFST/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/WFST/v1_1_0.js) + } # Group: WFST + + File: WKT (no auto-title, OpenLayers/Format/WKT.js) + + Group: WMC { + + File: WMC (no auto-title, OpenLayers/Format/WMC.js) + File: v1 (no auto-title, OpenLayers/Format/WMC/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/WMC/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/WMC/v1_1_0.js) + } # Group: WMC + + Group: WMSCapabilities { + + File: WMSCapabilities (no auto-title, OpenLayers/Format/WMSCapabilities.js) + File: v1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1.js) + File: v1_1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1.js) + File: v1_1_0 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_0.js) + File: v1_1_1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_1.js) + File: v1_3 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_3.js) + File: v1_3_0 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_3_0.js) + File: WMSCapabilities/v1_1_1_WMSC (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js) + } # Group: WMSCapabilities + + Group: WMSDescribeLayer { + + File: WMSDescribeLayer (no auto-title, OpenLayers/Format/WMSDescribeLayer.js) + File: v1_1 (no auto-title, OpenLayers/Format/WMSDescribeLayer/v1_1.js) + } # Group: WMSDescribeLayer + + File: WMSGetFeatureInfo (no auto-title, OpenLayers/Format/WMSGetFeatureInfo.js) + File: WMTSCapabilities (no auto-title, OpenLayers/Format/WMTSCapabilities.js) + File: WMTSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WMTSCapabilities/v1_0_0.js) + File: WPSCapabilities (no auto-title, OpenLayers/Format/WPSCapabilities.js) + File: WPSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WPSCapabilities/v1_0_0.js) + File: WPSDescribeProcess (no auto-title, OpenLayers/Format/WPSDescribeProcess.js) + File: WPSExecute version 1.0.0 (no auto-title, OpenLayers/Format/WPSExecute.js) + File: XLS (no auto-title, OpenLayers/Format/XLS.js) + File: XLS.v1 (no auto-title, OpenLayers/Format/XLS/v1.js) + File: XLS.v1_1_0 (no auto-title, OpenLayers/Format/XLS/v1_1_0.js) + File: XML (no auto-title, OpenLayers/Format/XML.js) + } # Group: Format + + Group: Geometry { + + File: Geometry (no auto-title, OpenLayers/Geometry.js) + File: Collection (no auto-title, OpenLayers/Geometry/Collection.js) + File: Curve (no auto-title, OpenLayers/Geometry/Curve.js) + File: LinearRing (no auto-title, OpenLayers/Geometry/LinearRing.js) + File: LineString (no auto-title, OpenLayers/Geometry/LineString.js) + File: MultiLineString (no auto-title, OpenLayers/Geometry/MultiLineString.js) + File: MultiPoint (no auto-title, OpenLayers/Geometry/MultiPoint.js) + File: MultiPolygon (no auto-title, OpenLayers/Geometry/MultiPolygon.js) + File: Point (no auto-title, OpenLayers/Geometry/Point.js) + File: Polygon (no auto-title, OpenLayers/Geometry/Polygon.js) + File: Rectangle (no auto-title, OpenLayers/Geometry/Rectangle.js) + } # Group: Geometry + + Group: Handler { + + File: Handler (no auto-title, OpenLayers/Handler.js) + File: Box (no auto-title, OpenLayers/Handler/Box.js) + File: Click (no auto-title, OpenLayers/Handler/Click.js) + File: Drag (no auto-title, OpenLayers/Handler/Drag.js) + File: Feature (no auto-title, OpenLayers/Handler/Feature.js) + File: Hover (no auto-title, OpenLayers/Handler/Hover.js) + File: Keyboard (no auto-title, OpenLayers/Handler/Keyboard.js) + File: MouseWheel (no auto-title, OpenLayers/Handler/MouseWheel.js) + File: Path (no auto-title, OpenLayers/Handler/Path.js) + File: Pinch (no auto-title, OpenLayers/Handler/Pinch.js) + File: Point (no auto-title, OpenLayers/Handler/Point.js) + File: Polygon (no auto-title, OpenLayers/Handler/Polygon.js) + File: RegularPolygon (no auto-title, OpenLayers/Handler/RegularPolygon.js) + } # Group: Handler + + File: Icon (no auto-title, OpenLayers/Icon.js) + File: Kinetic (no auto-title, OpenLayers/Kinetic.js) + + Group: Lang { + + File: Lang (no auto-title, OpenLayers/Lang.js) + File: ar (no auto-title, OpenLayers/Lang/ar.js) + File: be-tarask (no auto-title, OpenLayers/Lang/be-tarask.js) + File: bg (no auto-title, OpenLayers/Lang/bg.js) + File: br (no auto-title, OpenLayers/Lang/br.js) + File: ca (no auto-title, OpenLayers/Lang/ca.js) + File: cs-CZ (no auto-title, OpenLayers/Lang/cs-CZ.js) + File: da-DK (no auto-title, OpenLayers/Lang/da-DK.js) + File: de (no auto-title, OpenLayers/Lang/de.js) + File: en (no auto-title, OpenLayers/Lang/en.js) + File: en-CA (no auto-title, OpenLayers/Lang/en-CA.js) + File: es (no auto-title, OpenLayers/Lang/es.js) + File: el (no auto-title, OpenLayers/Lang/el.js) + File: fi (no auto-title, OpenLayers/Lang/fi.js) + File: fr (no auto-title, OpenLayers/Lang/fr.js) + File: fur (no auto-title, OpenLayers/Lang/fur.js) + File: gl (no auto-title, OpenLayers/Lang/gl.js) + File: gsw (no auto-title, OpenLayers/Lang/gsw.js) + File: hr (no auto-title, OpenLayers/Lang/hr.js) + File: hsb (no auto-title, OpenLayers/Lang/hsb.js) + File: hu (no auto-title, OpenLayers/Lang/hu.js) + File: ia (no auto-title, OpenLayers/Lang/ia.js) + File: id (no auto-title, OpenLayers/Lang/id.js) + File: io (no auto-title, OpenLayers/Lang/io.js) + File: is (no auto-title, OpenLayers/Lang/is.js) + File: it (no auto-title, OpenLayers/Lang/it.js) + File: ja (no auto-title, OpenLayers/Lang/ja.js) + File: km (no auto-title, OpenLayers/Lang/km.js) + File: ksh (no auto-title, OpenLayers/Lang/ksh.js) + File: lt (no auto-title, OpenLayers/Lang/lt.js) + File: nds (no auto-title, OpenLayers/Lang/nds.js) + File: nb (no auto-title, OpenLayers/Lang/nb.js) + File: nl (no auto-title, OpenLayers/Lang/nl.js) + File: nn (no auto-title, OpenLayers/Lang/nn.js) + File: oc (no auto-title, OpenLayers/Lang/oc.js) + File: pt (no auto-title, OpenLayers/Lang/pt.js) + File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js) + File: ru (no auto-title, OpenLayers/Lang/ru.js) + File: sk (no auto-title, OpenLayers/Lang/sk.js) + File: sv-SE (no auto-title, OpenLayers/Lang/sv-SE.js) + File: te (no auto-title, OpenLayers/Lang/te.js) + File: vi (no auto-title, OpenLayers/Lang/vi.js) + File: zh-CN (no auto-title, OpenLayers/Lang/zh-CN.js) + File: zh-TW (no auto-title, OpenLayers/Lang/zh-TW.js) + } # Group: Lang + + Group: Layer { + + File: Layer (no auto-title, OpenLayers/Layer.js) + File: ArcGISCache.js (no auto-title, OpenLayers/Layer/ArcGISCache.js) + File: ArcGIS93Rest (no auto-title, OpenLayers/Layer/ArcGIS93Rest.js) + File: ArcIMS (no auto-title, OpenLayers/Layer/ArcIMS.js) + File: Bing (no auto-title, OpenLayers/Layer/Bing.js) + File: Boxes (no auto-title, OpenLayers/Layer/Boxes.js) + File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js) + File: FixedZoomLevels (no auto-title, OpenLayers/Layer/FixedZoomLevels.js) + File: GeoRSS (no auto-title, OpenLayers/Layer/GeoRSS.js) + File: GML (no auto-title, OpenLayers/Layer/GML.js) + File: Google (no auto-title, OpenLayers/Layer/Google.js) + File: Google.v3 (no auto-title, OpenLayers/Layer/Google/v3.js) + File: GoogleNG (no auto-title, OpenLayers/Layer/GoogleNG.js) + File: Grid (no auto-title, OpenLayers/Layer/Grid.js) + File: HTTPRequest (no auto-title, OpenLayers/Layer/HTTPRequest.js) + File: Image (no auto-title, OpenLayers/Layer/Image.js) + File: KaMap (no auto-title, OpenLayers/Layer/KaMap.js) + File: KaMapCache (no auto-title, OpenLayers/Layer/KaMapCache.js) + File: MapGuide (no auto-title, OpenLayers/Layer/MapGuide.js) + File: MapServer (no auto-title, OpenLayers/Layer/MapServer.js) + File: MapServer.Untiled (no auto-title, OpenLayers/Layer/MapServer/Untiled.js) + File: Markers (no auto-title, OpenLayers/Layer/Markers.js) + File: MultiMap (no auto-title, OpenLayers/Layer/MultiMap.js) + File: PointGrid (no auto-title, OpenLayers/Layer/PointGrid.js) + File: PointTrack (no auto-title, OpenLayers/Layer/PointTrack.js) + File: SphericalMercator (no auto-title, OpenLayers/Layer/SphericalMercator.js) + File: Text (no auto-title, OpenLayers/Layer/Text.js) + File: TileCache (no auto-title, OpenLayers/Layer/TileCache.js) + File: TMS (no auto-title, OpenLayers/Layer/TMS.js) + File: Vector (no auto-title, OpenLayers/Layer/Vector.js) + File: Vector.RootContainer (no auto-title, OpenLayers/Layer/Vector/RootContainer.js) + File: VirtualEarth (no auto-title, OpenLayers/Layer/VirtualEarth.js) + File: WFS (no auto-title, OpenLayers/Layer/WFS.js) + File: WMS (no auto-title, OpenLayers/Layer/WMS.js) + File: WMS.Untiled (no auto-title, OpenLayers/Layer/WMS/Untiled.js) + File: WMS.Post (no auto-title, OpenLayers/Layer/WMS/Post.js) + File: WMTS (no auto-title, OpenLayers/Layer/WMTS.js) + File: WorldWind (no auto-title, OpenLayers/Layer/WorldWind.js) + File: XYZ (no auto-title, OpenLayers/Layer/XYZ.js) + File: Yahoo (no auto-title, OpenLayers/Layer/Yahoo.js) + File: Zoomify (no auto-title, OpenLayers/Layer/Zoomify.js) + } # Group: Layer + + File: Map (no auto-title, OpenLayers/Map.js) + + Group: Marker { + + File: Marker (no auto-title, OpenLayers/Marker.js) + File: Box (no auto-title, OpenLayers/Marker/Box.js) + } # Group: Marker + + Group: Popup { + + File: Popup (no auto-title, OpenLayers/Popup.js) + File: Anchored (no auto-title, OpenLayers/Popup/Anchored.js) + File: AnchoredBubble (no auto-title, OpenLayers/Popup/AnchoredBubble.js) + File: Framed (no auto-title, OpenLayers/Popup/Framed.js) + File: FramedCloud (no auto-title, OpenLayers/Popup/FramedCloud.js) + } # Group: Popup + + File: Projection (no auto-title, OpenLayers/Projection.js) + + Group: Protocol { + + File: Protocol (no auto-title, OpenLayers/Protocol.js) + File: HTTP (no auto-title, OpenLayers/Protocol/HTTP.js) + + Group: SQL { + + File: SQL (no auto-title, OpenLayers/Protocol/SQL.js) + File: Gears (no auto-title, OpenLayers/Protocol/SQL/Gears.js) + } # Group: SQL + + Group: WFS { + + File: WFS (no auto-title, OpenLayers/Protocol/WFS.js) + File: v1 (no auto-title, OpenLayers/Protocol/WFS/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Protocol/WFS/v1_0_0.js) + File: v1_1_0 (no auto-title, OpenLayers/Protocol/WFS/v1_1_0.js) + } # Group: WFS + + File: Script (no auto-title, OpenLayers/Protocol/Script.js) + File: SOS.DEFAULTS (no auto-title, OpenLayers/Protocol/SOS.js) + File: SOS.v1_0_0 (no auto-title, OpenLayers/Protocol/SOS/v1_0_0.js) + } # Group: Protocol + + Group: Renderer { + + File: Renderer (no auto-title, OpenLayers/Renderer.js) + File: Canvas (no auto-title, OpenLayers/Renderer/Canvas.js) + File: ElementsIndexer (no auto-title, OpenLayers/Renderer/Elements.js) + File: NG (no auto-title, OpenLayers/Renderer/NG.js) + File: SVG (no auto-title, OpenLayers/Renderer/SVG.js) + File: SVG2 (no auto-title, OpenLayers/Renderer/SVG2.js) + File: VML (no auto-title, OpenLayers/Renderer/VML.js) + } # Group: Renderer + + Group: Request { + + File: Request (no auto-title, OpenLayers/Request.js) + File: XMLHttpRequest (no auto-title, OpenLayers/Request/XMLHttpRequest.js) + } # Group: Request + + File: SingleFile.js (no auto-title, OpenLayers/SingleFile.js) + File: Rule (no auto-title, OpenLayers/Rule.js) + + Group: Strategy { + + File: Strategy (no auto-title, OpenLayers/Strategy.js) + File: BBOX (no auto-title, OpenLayers/Strategy/BBOX.js) + File: Cluster (no auto-title, OpenLayers/Strategy/Cluster.js) + File: Filter (no auto-title, OpenLayers/Strategy/Filter.js) + File: Fixed (no auto-title, OpenLayers/Strategy/Fixed.js) + File: Paging (no auto-title, OpenLayers/Strategy/Paging.js) + File: Refresh (no auto-title, OpenLayers/Strategy/Refresh.js) + File: Save (no auto-title, OpenLayers/Strategy/Save.js) + } # Group: Strategy + + File: Style (no auto-title, OpenLayers/Style.js) + File: Style2 (no auto-title, OpenLayers/Style2.js) + File: StyleMap (no auto-title, OpenLayers/StyleMap.js) + + Group: Symbolizer { + + File: Symbolizer (no auto-title, OpenLayers/Symbolizer.js) + File: Line (no auto-title, OpenLayers/Symbolizer/Line.js) + File: Point (no auto-title, OpenLayers/Symbolizer/Point.js) + File: Polygon (no auto-title, OpenLayers/Symbolizer/Polygon.js) + File: Raster (no auto-title, OpenLayers/Symbolizer/Raster.js) + File: Text (no auto-title, OpenLayers/Symbolizer/Text.js) + } # Group: Symbolizer + + Group: Tile { + + File: Tile (no auto-title, OpenLayers/Tile.js) + File: Google (no auto-title, OpenLayers/Tile/Google.js) + File: Image (no auto-title, OpenLayers/Tile/Image.js) + File: Image.IFrame (no auto-title, OpenLayers/Tile/Image/IFrame.js) + File: WFS (no auto-title, OpenLayers/Tile/WFS.js) + } # Group: Tile + + File: Tween (no auto-title, OpenLayers/Tween.js) + File: Util (no auto-title, OpenLayers/Util.js) + } # Group: OpenLayers + +Group: Index { + + Index: Everything + Class Index: Classes + Constant Index: Constants + Function Index: Functions + Property Index: Properties + File Index: Files + Constructor Index: Constructor + } # Group: Index + diff --git a/openlayers/doc_config/OL.css b/openlayers/doc_config/OL.css new file mode 100644 index 0000000000..a397119822 --- /dev/null +++ b/openlayers/doc_config/OL.css @@ -0,0 +1,20 @@ +p { + text-indent: 0; margin-bottom: 1em; +} + +.MGroup { + font-variant: normal; + margin: 0.4em 0 0em 10px +} + +.MTitle { + font-variant: normal; +} + +.CGroup .CTitle { + font-variant: normal; +} + +.SGroup .SEntry { + font-variant: normal; +} \ No newline at end of file diff --git a/openlayers/doc_config/Topics.txt b/openlayers/doc_config/Topics.txt new file mode 100644 index 0000000000..087d348542 --- /dev/null +++ b/openlayers/doc_config/Topics.txt @@ -0,0 +1,102 @@ +Format: 1.52 + +# This is the Natural Docs topics file for this project. If you change anything +# here, it will apply to THIS PROJECT ONLY. If you'd like to change something +# for all your projects, edit the Topics.txt in Natural Docs' Config directory +# instead. + + +# If you'd like to prevent keywords from being recognized by Natural Docs, you +# can do it like this: +# Ignore Keywords: [keyword], [keyword], ... +# +# Or you can use the list syntax like how they are defined: +# Ignore Keywords: +# [keyword] +# [keyword], [plural keyword] +# ... + + +#------------------------------------------------------------------------------- +# SYNTAX: +# +# Topic Type: [name] +# Alter Topic Type: [name] +# Creates a new topic type or alters one from the main file. Each type gets +# its own index and behavior settings. Its name can have letters, numbers, +# spaces, and these charaters: - / . ' +# +# Plural: [name] +# Sets the plural name of the topic type, if different. +# +# Keywords: +# [keyword] +# [keyword], [plural keyword] +# ... +# Defines or adds to the list of keywords for the topic type. They may only +# contain letters, numbers, and spaces and are not case sensitive. Plural +# keywords are used for list topics. You can redefine keywords found in the +# main topics file. +# +# Index: [yes|no] +# Whether the topics get their own index. Defaults to yes. Everything is +# included in the general index regardless of this setting. +# +# Scope: [normal|start|end|always global] +# How the topics affects scope. Defaults to normal. +# normal - Topics stay within the current scope. +# start - Topics start a new scope for all the topics beneath it, +# like class topics. +# end - Topics reset the scope back to global for all the topics +# beneath it. +# always global - Topics are defined as global, but do not change the scope +# for any other topics. +# +# Class Hierarchy: [yes|no] +# Whether the topics are part of the class hierarchy. Defaults to no. +# +# Page Title If First: [yes|no] +# Whether the topic's title becomes the page title if it's the first one in +# a file. Defaults to no. +# +# Break Lists: [yes|no] +# Whether list topics should be broken into individual topics in the output. +# Defaults to no. +# +# Can Group With: [type], [type], ... +# Defines a list of topic types that this one can possibly be grouped with. +# Defaults to none. +#------------------------------------------------------------------------------- + +# The following topics are defined in the main file, if you'd like to alter +# their behavior or add keywords: +# +# Generic, Class, Interface, Section, File, Group, Function, Variable, +# Property, Type, Constant, Enumeration, Event, Delegate, Macro, +# Database, Database Table, Database View, Database Index, Database +# Cursor, Database Trigger, Cookie, Build Target + +# If you add something that you think would be useful to other developers +# and should be included in Natural Docs by default, please e-mail it to +# topics [at] naturaldocs [dot] org. + + +Topic Type: Constructor + + Class Hierarchy: Yes + Keywords: + constructor + initialize + + +Alter Topic Type: Function + + Add Keywords: + apimethod + apifunction + + +Alter Topic Type: Property + + Add Keywords: + apiproperty diff --git a/openlayers/examples/Jugl.js b/openlayers/examples/Jugl.js new file mode 100644 index 0000000000..4f81a275cb --- /dev/null +++ b/openlayers/examples/Jugl.js @@ -0,0 +1,8 @@ +/* + * Jugl.js -- JavaScript Template Library + * + * Copyright 2007-2010 Tim Schaub + * Released under the MIT license. Please see + * http://github.com/tschaub/jugl/blob/master/license.txt for the full license. + */ +(function(){var f={prefix:"jugl",namespaceURI:null,loadTemplate:function(h){var i=function(l){var m,k,n=!l.status||(l.status>=200&&l.status<300);if(n){try{m=l.responseXML;k=new e(m.documentElement)}catch(j){m=document.createElement("div");m.innerHTML=l.responseText;k=new e(m.firstChild)}if(h.callback){h.callback.call(h.scope,k)}}else{if(h.failure){h.failure.call(h.scope,l)}}};d(h.url,i)}};var g=function(h,j){h=h||{};j=j||{};for(var i in j){h[i]=j[i]}return h};var a=function(l,o){var m,n,k,j,h;if(typeof(l)==="string"){m=document.getElementById(l);if(!m){throw Error("Element id not found: "+l)}l=m}if(typeof(o)==="string"){m=document.getElementById(o);if(!m){throw Error("Element id not found: "+o)}o=m}if(o.namespaceURI&&o.xml){n=document.createElement("div");n.innerHTML=o.xml;k=n.childNodes;for(j=0,h=k.length;j + + + + + + OpenLayers KML Parser Example + + + + + +

KML Parser Example

+ +
+ KML, parsing, format +
+ +

+ Demonstrate the operation of the KML parser. +

+ +
+ +
+

This script reads data from a KML file and parses out the + coordinates, appending them to a HTML string with markup tags. + This markup is dumped to an element in the page.

+
+ + diff --git a/openlayers/examples/SLDSelect.html b/openlayers/examples/SLDSelect.html new file mode 100644 index 0000000000..ff07e319d1 --- /dev/null +++ b/openlayers/examples/SLDSelect.html @@ -0,0 +1,202 @@ + + + + + + + OpenLayers SLD based selection control + + + + + + + +

SLD based selection on WMS layers

+ +
+ sld, sldselect, styling, style +
+ +
Using Styled Layer Descriptors to make a selection on WMS layers
+ +
+ +
+ This example uses the OpenLayers.Control.SLDSelect to select features in a WMS + layer. The features are highlighted using Styled Layer Descriptors (SLD). The + control supports point, box, line and polygon selection modes by configuring the + appriopriate handler. +
+ +
+
    Map Controls +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+
+
    Selection layer +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+ + + diff --git a/openlayers/examples/WMSDescribeLayerParser.html b/openlayers/examples/WMSDescribeLayerParser.html new file mode 100644 index 0000000000..0e62465e85 --- /dev/null +++ b/openlayers/examples/WMSDescribeLayerParser.html @@ -0,0 +1,51 @@ + + + + + + + OpenLayers WMSDescribeLayer Parser Example + + + + + +

WMSDescribeLayer Parser Example

+ +
+ wmsdescribelayer, parser, cleanup +
+ +

+ Demonstrate the operation of the WMSDescribeLayer parser. +

+ +
+ +
+

This script reads data from a file and parses out the coordinates, + appending them to a HTML string with markup tags. This markup is + dumped to an element in the page.

+
+ + diff --git a/openlayers/examples/accelerometer.html b/openlayers/examples/accelerometer.html new file mode 100644 index 0000000000..07215192ca --- /dev/null +++ b/openlayers/examples/accelerometer.html @@ -0,0 +1,100 @@ + + + + + + + OpenLayers Accelerometer Usage + + + + + + + + +

Accelerometer

+ +

+ The goal of this script is to demonstrate the usage of accelerometer. +

+

+ The orientation specification can be found here. +

+ +
+ browser, vendor, mobile, orientation +
+ +

Device motion

+ +
+ +
+

Device orientation

+ +
+ +
+

MOZ orientation

+ +
+ +
+ + diff --git a/openlayers/examples/accessible.html b/openlayers/examples/accessible.html new file mode 100644 index 0000000000..d9b8a777b3 --- /dev/null +++ b/openlayers/examples/accessible.html @@ -0,0 +1,144 @@ + + + + + + + OpenLayers Accessible Example + + + + + + + +

Accessible Example

+ +
+ keyboard, pan, panning, zoom, zooming, accesskey +
+ +

+ Demonstrate how to use the KeyboardDefaults option parameter for layer types. +

+ + + + + + + + + + + + + + + + + + + +
+ + zoom out + + + + pan north + + + + zoom in + +
+ + pan west + + + + pan east + +
  + + pan south + +  
+ +
+

Navigate the map in one of three ways:

+
    +
  • Click on the named links to zoom and pan
  • +
  • Use following keys to pan and zoom: +
      +
    • + (zoom in)
    • +
    • - (zoom out)
    • +
    • up-arrow (pan north)
    • +
    • down-arrow (pan south)
    • +
    • left-arrow (pan east)
    • +
    • right-arrow (pan west)
    • +
    +
  • +
  • If access keys work for links in your browser, use: +
      +
    • i (zoom in)
    • +
    • o (zoom out)
    • +
    • n (pan north)
    • +
    • s (pan south)
    • +
    • e (pan east)
    • +
    • w (pan west)
    • +
    +
  • +
+

+ + This is an example of using alternate methods to control panning and zooming. This approach uses map.pan() and map.zoom(). You'll note that to pan, additional math is necessary along with map.size() in order to set the distance to pan. +

+ + diff --git a/openlayers/examples/all-overlays-google.html b/openlayers/examples/all-overlays-google.html new file mode 100644 index 0000000000..55fa828acf --- /dev/null +++ b/openlayers/examples/all-overlays-google.html @@ -0,0 +1,35 @@ + + + + + + + OpenLayers All Overlays with Google and OSM + + + + + + + + +

All Overlays with Google and OSM

+
+ overlay, baselayer, google, osm, openstreetmap +
+

+ Using the Google and OSM layers as overlays. +

+
+
+

+ Using the allOverlays property on the map, the first layer added + must initially be visible. This example demonstrates the use of + a Google layer and an OSM layer treated as overlays. +

+ See the + all-overlays-google.js source to see how this is done. +

+
+ + diff --git a/openlayers/examples/all-overlays-google.js b/openlayers/examples/all-overlays-google.js new file mode 100644 index 0000000000..f26d3fc80e --- /dev/null +++ b/openlayers/examples/all-overlays-google.js @@ -0,0 +1,19 @@ +var map; + +function init() { + + map = new OpenLayers.Map({ + div: "map", + allOverlays: true + }); + + var osm = new OpenLayers.Layer.OSM(); + var gmap = new OpenLayers.Layer.Google("Google Streets", {visibility: false}); + + // note that first layer must be visible + map.addLayers([osm, gmap]); + + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.zoomToMaxExtent(); + +} diff --git a/openlayers/examples/all-overlays.html b/openlayers/examples/all-overlays.html new file mode 100644 index 0000000000..cecda0e79c --- /dev/null +++ b/openlayers/examples/all-overlays.html @@ -0,0 +1,76 @@ + + + + + + + All Overlays Example + + + + + + + +

OpenLayers Overlays Only Example

+
+ overlay, baselayer +
+

+ Demonstrates a map with overlays only. +

+
+
+ To create a map that allows any draw order with all layer types + and lets you set the visibility of any layer independently, set + the allOverlays property on the map to true. +
+ + diff --git a/openlayers/examples/anchor-permalink.html b/openlayers/examples/anchor-permalink.html new file mode 100644 index 0000000000..3905207aab --- /dev/null +++ b/openlayers/examples/anchor-permalink.html @@ -0,0 +1,29 @@ + + + + + + + + + AnchorPermalink Example + + + + +

AnchorPermalink Example

+
+ anchor, permalink +
+

+ Place a permalink in the anchor of the url. +

+
+
+

+ See the anchor-permalink.js + source to see how this is done. +

+
+ + diff --git a/openlayers/examples/anchor-permalink.js b/openlayers/examples/anchor-permalink.js new file mode 100644 index 0000000000..1ad29392ac --- /dev/null +++ b/openlayers/examples/anchor-permalink.js @@ -0,0 +1,13 @@ +function init() { + var map = new OpenLayers.Map({ + div: "map", + projection: new OpenLayers.Projection("EPSG:900913"), + displayProjection: new OpenLayers.Projection("EPSG:4326"), + layers: [ + new OpenLayers.Layer.OSM() + ] + }); + if (!map.getCenter()) map.zoomToMaxExtent(); + + map.addControl(new OpenLayers.Control.Permalink({anchor: true})); +} diff --git a/openlayers/examples/animated_panning.html b/openlayers/examples/animated_panning.html new file mode 100644 index 0000000000..a07017cc8e --- /dev/null +++ b/openlayers/examples/animated_panning.html @@ -0,0 +1,98 @@ + + + + + + + Animated Panning of the Map via map.panTo + + + + + + +

map.panTo Example

+
+ panning, animation, effect, smooth, panMethod +
+
Show animated panning effects in the map
+
+
+

This is an example of transition effects. If the new random center is in the current extent, the map will pan smoothly.
+ The random selection will continue until you press it again. Additionally, you can single click in the map to pan smoothly + to that area, or use the pan control to pan smoothly. +

+
+ +
+
+

To turn off Animated Panning, create a map with an panMethod set to + null.

+
+ + diff --git a/openlayers/examples/animator.js b/openlayers/examples/animator.js new file mode 100644 index 0000000000..abe540377b --- /dev/null +++ b/openlayers/examples/animator.js @@ -0,0 +1,670 @@ +/* + Animator.js 1.1.9 + + This library is released under the BSD license: + + Copyright (c) 2006, Bernard Sumption. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions and + the following disclaimer in the documentation and/or other materials + provided with the distribution. Neither the name BernieCode nor + the names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + +*/ + + +// Applies a sequence of numbers between 0 and 1 to a number of subjects +// construct - see setOptions for parameters +function Animator(options) { + this.setOptions(options); + var _this = this; + this.timerDelegate = function(){_this.onTimerEvent()}; + this.subjects = []; + this.target = 0; + this.state = 0; + this.lastTime = null; +}; +Animator.prototype = { + // apply defaults + setOptions: function(options) { + this.options = Animator.applyDefaults({ + interval: 20, // time between animation frames + duration: 400, // length of animation + onComplete: function(){}, + onStep: function(){}, + transition: Animator.tx.easeInOut + }, options); + }, + // animate from the current state to provided value + seekTo: function(to) { + this.seekFromTo(this.state, to); + }, + // animate from the current state to provided value + seekFromTo: function(from, to) { + this.target = Math.max(0, Math.min(1, to)); + this.state = Math.max(0, Math.min(1, from)); + this.lastTime = new Date().getTime(); + if (!this.intervalId) { + this.intervalId = window.setInterval(this.timerDelegate, this.options.interval); + } + }, + // animate from the current state to provided value + jumpTo: function(to) { + this.target = this.state = Math.max(0, Math.min(1, to)); + this.propagate(); + }, + // seek to the opposite of the current target + toggle: function() { + this.seekTo(1 - this.target); + }, + // add a function or an object with a method setState(state) that will be called with a number + // between 0 and 1 on each frame of the animation + addSubject: function(subject) { + this.subjects[this.subjects.length] = subject; + return this; + }, + // remove all subjects + clearSubjects: function() { + this.subjects = []; + }, + // forward the current state to the animation subjects + propagate: function() { + var value = this.options.transition(this.state); + for (var i=0; i= Math.abs(this.state - this.target)) { + this.state = this.target; + } else { + this.state += movement; + } + + try { + this.propagate(); + } finally { + this.options.onStep.call(this); + if (this.target == this.state) { + window.clearInterval(this.intervalId); + this.intervalId = null; + this.options.onComplete.call(this); + } + } + }, + // shortcuts + play: function() {this.seekFromTo(0, 1)}, + reverse: function() {this.seekFromTo(1, 0)}, + // return a string describing this Animator, for debugging + inspect: function() { + var str = "# 20) return; + } + }, + getStyle: function(state) { + state = this.from + ((this.to - this.from) * state); + if (this.property == 'filter') return "alpha(opacity=" + Math.round(state*100) + ")"; + if (this.property == 'opacity') return state; + return Math.round(state) + this.units; + }, + inspect: function() { + return "\t" + this.property + "(" + this.from + this.units + " to " + this.to + this.units + ")\n"; + } +} + +// animates a colour based style property between two hex values +function ColorStyleSubject(els, property, from, to) { + this.els = Animator.makeArray(els); + this.property = Animator.camelize(property); + this.to = this.expandColor(to); + this.from = this.expandColor(from); + this.origFrom = from; + this.origTo = to; +} + +ColorStyleSubject.prototype = { + // parse "#FFFF00" to [256, 256, 0] + expandColor: function(color) { + var hexColor, red, green, blue; + hexColor = ColorStyleSubject.parseColor(color); + if (hexColor) { + red = parseInt(hexColor.slice(1, 3), 16); + green = parseInt(hexColor.slice(3, 5), 16); + blue = parseInt(hexColor.slice(5, 7), 16); + return [red,green,blue] + } + if (window.DEBUG) { + alert("Invalid colour: '" + color + "'"); + } + }, + getValueForState: function(color, state) { + return Math.round(this.from[color] + ((this.to[color] - this.from[color]) * state)); + }, + setState: function(state) { + var color = '#' + + ColorStyleSubject.toColorPart(this.getValueForState(0, state)) + + ColorStyleSubject.toColorPart(this.getValueForState(1, state)) + + ColorStyleSubject.toColorPart(this.getValueForState(2, state)); + for (var i=0; i 255) number = 255; + var digits = number.toString(16); + if (number < 16) return '0' + digits; + return digits; +} +ColorStyleSubject.parseColor.rgbRe = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i; +ColorStyleSubject.parseColor.hexRe = /^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/; + +// Animates discrete styles, i.e. ones that do not scale but have discrete values +// that can't be interpolated +function DiscreteStyleSubject(els, property, from, to, threshold) { + this.els = Animator.makeArray(els); + this.property = Animator.camelize(property); + this.from = from; + this.to = to; + this.threshold = threshold || 0.5; +} + +DiscreteStyleSubject.prototype = { + setState: function(state) { + var j=0; + for (var i=0; i section ? 1 : 0); + } + if (this.options.rememberance) { + document.location.hash = this.rememberanceTexts[section]; + } + } +} diff --git a/openlayers/examples/arcgis93rest.html b/openlayers/examples/arcgis93rest.html new file mode 100644 index 0000000000..67a96da3fe --- /dev/null +++ b/openlayers/examples/arcgis93rest.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + +

ArcGIS Server 9.3 Rest API Example

+ +
+ ESRI, ArcGIS, REST, filter +
+

+ Shows the basic use of openlayers using an ArcGIS Server 9.3 Rest API layer +

+ +
+ +
+ This is an example of how to add an ArcGIS Server 9.3 Rest API layer to the OpenLayers window. +
+ + + +
+ (Filter is case sensitive.) + + + + + + diff --git a/openlayers/examples/arcgiscache_ags.html b/openlayers/examples/arcgiscache_ags.html new file mode 100644 index 0000000000..2b929543b4 --- /dev/null +++ b/openlayers/examples/arcgiscache_ags.html @@ -0,0 +1,221 @@ + + + + OpenLayers ArcGIS Cache Example (MapServer Access) + + + + + + + + + +

OpenLayers ArcGIS Cache Example (MapServer Access)

+ +
+ arcgis, arcgiscache, cache, tms +
+ +

+ Demonstrates the basic initialization of the ArcGIS Cache layer using a prebuilt configuration, and standard tile access. +

+ +
+ +
+

This example demonstrates using the ArcGISCache layer for + accessing ESRI's ArcGIS Server (AGS) Map Cache tiles through + an AGS MapServer. Toggle the visibility of the AGS layer to + demonstrate how the two maps are lined up correctly.

+ +

Notes on this layer

+

A few attempts have been made at this kind of layer before. See + here and + here. + A problem the users encounter is that the tiles seem to "jump around". + This is due to the fact that the max extent for the cached layer actually + changes at each zoom level due to the way these caches are constructed. + We have attempted to use the resolutions, tile size, and tile origin + from the cache meta data to make the appropriate changes to the max extent + of the tile to compensate for this behavior.

+ You will need to know: +
    +
  • Max Extent: The max extent of the layer
  • +
  • Resolutions: An array of resolutions, one for each zoom level
  • +
  • Tile Origin: The location of the tile origin for the cache in the upper left.
  • +
  • Tile Size: The size of each tile in the cache. Commonly 256 x 256
  • +
+

It's important that you set the correct values in your layer, and these + values will differ from layer to layer. You can find these values for your + layer in a metadata page in ArcGIS Server. + (ie. http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer)

+
    +
  • Max Extent: Full Extent
  • +
  • Resolutions: Tile Info -> Levels of Detail -> Resolution
  • +
  • Tile Origin: Origin -> X,Y
  • +
  • Tile Size: Tile Info -> Height,Width
  • +
+ +

Other Examples

+

This is one of three examples for this layer. You can also configure this + layer to use prebuilt tiles in a file store + (not a live server). It is also possible to let this + layer 'auto-configure' itself using the + capabilities json object from the server itself when using a live ArcGIS server. +

+
+ + diff --git a/openlayers/examples/arcgiscache_direct.html b/openlayers/examples/arcgiscache_direct.html new file mode 100644 index 0000000000..472a48014a --- /dev/null +++ b/openlayers/examples/arcgiscache_direct.html @@ -0,0 +1,108 @@ + + + + ArcGIS Server Map Cache Example (Direct Access) + + + + + + + + +

ArcGIS Server Map Cache Example (Direct Access)

+ +
+
+ +

+ Demonstrates the basic initialization of the ArcGIS Cache layer using a prebuilt configuration, and direct tile access from a file store. +

+ +
+ +
+

This example demonstrates using the ArcGISCache layer for + accessing ESRI's ArcGIS Server (AGS) Map Cache tiles directly + via the folder structure and HTTP. Toggle the visibility of the AGS layer to + demonstrate how the two maps are lined up correctly.

+ +

Notes on this Layer

+

It's important that you set the correct values in your layer, and these + values will differ between tile sets. You can find these values for your + layer in conf.xml at the root of your cache. + (ie. http://serverx.esri.com/arcgiscache/dgaerials/Layers/conf.xml)

+ +

For fused map caches this is often http:ServerName/arcgiscache/MapServiceName/Layers
+ For individual layer caches this is often http:ServerName/arcgiscache/LayerName/Layers

+ +

Other Examples

+

This is one of three examples for this layer. You can also configure this + layer to use prebuilt tiles from a live server. It is also + possible to let this layer 'auto-configure' itself using the capabilities json object from the server itself when using a live ArcGIS server. +

+
+ + diff --git a/openlayers/examples/arcgiscache_jsonp.html b/openlayers/examples/arcgiscache_jsonp.html new file mode 100644 index 0000000000..282d63692b --- /dev/null +++ b/openlayers/examples/arcgiscache_jsonp.html @@ -0,0 +1,110 @@ + + + + OpenLayers ArcGIS Cache Example (Autoconfigure with JSONP) + + + + + + + + + + + + + +

OpenLayers ArcGIS Cache Example (Autoconfigure with JSONP)

+ +
+ arcgis, arcgiscache, cache, tms, jsonp +
+ +

+ Demonstrates the basic initialization of the ArcGIS Cache layer by using the server capabilities object. +

+ +
+ +
+

This example demonstrates using the ArcGISCache layer for + accessing ESRI's ArcGIS Server (AGS) Map Cache tiles normally through + a live AGS MapServer. Toggle the visibility of the overlay to + demonstrate how the two layers are lined up correctly.

+ +

Notes on this Layer

+

+ This method automatically configures the layer using the capabilities object + generated by the server itself. This page shows how to construct the url for the server capabilities object, + retrieve it using JSONP (and jQuery), and pass it in during construction. Note that in this case, + the layer is constructed before the map. This approach greatly simplifies the + configuration of your map, and works best when all your tiles / overlays are similarly laid out. + If you are using a live AGS map server for your layer, it can be helpful to check your + server configuration using this technique before trying one of the other examples for this layer. +

+ +

Other Examples

+

This is one of three examples for this layer. You can also configure this + layer to use prebuilt tiles in a file store (not a live server). + As well a retrieve tiles from a live server. +

+
+ + diff --git a/openlayers/examples/arcims-thematic.html b/openlayers/examples/arcims-thematic.html new file mode 100644 index 0000000000..7f21d13a35 --- /dev/null +++ b/openlayers/examples/arcims-thematic.html @@ -0,0 +1,82 @@ + + + + + + + ArcIMS Thematic Example + + + + + + +

ArcIMS Thematic Example

+ +
+ ESRI, ArcIMS, ArcXML, style, thematic, chloropleth, representation +
+

+ Shows the advanced use of OpenLayers using a thematic ArcIMS layer +

+ +
+ +
+

This is an example of how to add an ArcIMS layer to an OpenLayers map.

+ +

Following the ArcXML convention to create a thematic (or chloropleth) map, + a layer definition is created with a query and a renderer to select portions + of the map data, and change their representation in the generated map tiles.

+
+ + + diff --git a/openlayers/examples/arcims.html b/openlayers/examples/arcims.html new file mode 100644 index 0000000000..060a674cc0 --- /dev/null +++ b/openlayers/examples/arcims.html @@ -0,0 +1,57 @@ + + + + + + + ArcIMS Example + + + + + + +

ArcIMS Example

+ +
+ ESRI, ArcIMS +
+

+ Shows the basic use of OpenLayers using an ArcIMS layer +

+ +
+ +
+ This is an example of how to add an ArcIMS layer to the OpenLayers window. +
+ + + + + + + diff --git a/openlayers/examples/attribution.html b/openlayers/examples/attribution.html new file mode 100644 index 0000000000..328f3427c8 --- /dev/null +++ b/openlayers/examples/attribution.html @@ -0,0 +1,60 @@ + + + + + + + OpenLayers Attribution Example + + + + + + + +

Attribution Example

+ +
+ copyright, watermark, logo, attribution +
+ +

+ Shows the use of the attribution layer option on a number of layer types. +

+ +
+ +
+

This is an example of how to add an attribution block to the OpenLayers window. In order to use an + attribution block, an attribution parameter must be set in each layer that requires attribution. In + addition, an attribution control must be added to the map, though one is added to all OpenLayers Maps by default. + Be aware that this is a layer option: the options hash goes in + different places depending on the layer type you are using.

+
+ + diff --git a/openlayers/examples/behavior-fixed-http-gml.html b/openlayers/examples/behavior-fixed-http-gml.html new file mode 100644 index 0000000000..c1a11c3a59 --- /dev/null +++ b/openlayers/examples/behavior-fixed-http-gml.html @@ -0,0 +1,56 @@ + + + + + + + OpenLayers Vector Behavior Example + + + + + + +

Vector Behavior Example (Fixed/HTTP/GML)

+
+ vector, strategy, strategies, protocoll, advanced, gml, http, fixed +
+

+ Vector layer with a Fixed strategy, HTTP protocol, and GML format. +

+
+
+

The vector layer shown uses the Fixed strategy, the HTTP protocol, + and the GML format. + The Fixed strategy is a simple strategy that fetches features once + and never re-requests new data. + The HTTP protocol makes requests using HTTP verbs. It should be + constructed with a url that corresponds to a collection of features + (a resource on some server). + The GML format is used to serialize features.

+
+ + diff --git a/openlayers/examples/bing-tiles-restrictedzoom.html b/openlayers/examples/bing-tiles-restrictedzoom.html new file mode 100644 index 0000000000..992bd143ab --- /dev/null +++ b/openlayers/examples/bing-tiles-restrictedzoom.html @@ -0,0 +1,43 @@ + + + + + + + Basic Bing Tiles with a Subset of Resolutions Example + + + + + +

Bing Tiles with a Subset of Resolutions Example

+ +
+ bing tiles restrictedMinZoom numZoomLevels +
+ +
Use Bing with direct tile access
+ +
+ +
+

+ This example shows how to use the maxResolution and + numZoomLevels layer properties to restrict + the number of zoom levels displayed on the Bing layer. +

+ See bing-tiles-restrictedzoom.js + for the source code. +

+
+ + + + diff --git a/openlayers/examples/bing-tiles-restrictedzoom.js b/openlayers/examples/bing-tiles-restrictedzoom.js new file mode 100644 index 0000000000..45c226fba6 --- /dev/null +++ b/openlayers/examples/bing-tiles-restrictedzoom.js @@ -0,0 +1,37 @@ +// API key for http://openlayers.org. Please get your own at +// http://bingmapsportal.com/ and use that instead. +var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf"; + +var map = new OpenLayers.Map('map', { + controls: [ + new OpenLayers.Control.Attribution(), + new OpenLayers.Control.Navigation(), + new OpenLayers.Control.PanZoomBar(), + new OpenLayers.Control.LayerSwitcher() + ] +}); + +var road3 = new OpenLayers.Layer.Bing({ + name: "Road tiles with 3 zoom levels", + type: "Road", + key: apiKey, + maxResolution: 76.43702827453613, + numZoomLevels: 3 +}); +var road5 = new OpenLayers.Layer.Bing({ + name: "Road tiles with 5 zoom levels", + type: "Road", + key: apiKey, + numZoomLevels: 5 +}); +var road = new OpenLayers.Layer.Bing({ + name: "Road tiles with all zoom levels", + type: "Road", + key: apiKey +}); + +map.addLayers([road3, road5, road]); +map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() +), 1); diff --git a/openlayers/examples/bing-tiles.html b/openlayers/examples/bing-tiles.html new file mode 100644 index 0000000000..dbc55d8314 --- /dev/null +++ b/openlayers/examples/bing-tiles.html @@ -0,0 +1,39 @@ + + + + + + + OpenLayers Bing Tiles Example + + + + + +

Basic Bing Tiles Example

+ +
+ bing tiles +
+ +
Use Bing with direct tile access
+ +
+ +
+

This example shows a very simple map with Bing layers that use + direct tile access through Bing Maps REST Services.

See + bing-tiles.js for the + source code.

+
+ + + + diff --git a/openlayers/examples/bing-tiles.js b/openlayers/examples/bing-tiles.js new file mode 100644 index 0000000000..0d4546bd09 --- /dev/null +++ b/openlayers/examples/bing-tiles.js @@ -0,0 +1,29 @@ +// API key for http://openlayers.org. Please get your own at +// http://bingmapsportal.com/ and use that instead. +var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf"; + +var map = new OpenLayers.Map( 'map'); + +var road = new OpenLayers.Layer.Bing({ + key: apiKey, + type: "Road", + // custom metadata parameter to request the new map style - only useful + // before May 1st, 2011 + metadataParams: {mapVersion: "v1"} +}); +var aerial = new OpenLayers.Layer.Bing({ + key: apiKey, + type: "Aerial" +}); +var hybrid = new OpenLayers.Layer.Bing({ + key: apiKey, + type: "AerialWithLabels", + name: "Bing Aerial With Labels" +}); + +map.addLayers([road, aerial, hybrid]); +map.addControl(new OpenLayers.Control.LayerSwitcher()); +map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() +), 11); diff --git a/openlayers/examples/bing.html b/openlayers/examples/bing.html new file mode 100644 index 0000000000..53ae68f8ce --- /dev/null +++ b/openlayers/examples/bing.html @@ -0,0 +1,62 @@ + + + + + + + OpenLayers Bing Example + + + + + + + + +

Bing Example

+ +
+ Bing, Microsoft, Virtual Earth +
+ +

+ Demonstrates the use of Bing layers. +

+ +
+

This example demonstrates the ability to create layers + using tiles from Bing maps.

+ + + + diff --git a/openlayers/examples/boxes-vector.html b/openlayers/examples/boxes-vector.html new file mode 100644 index 0000000000..f3b5f01972 --- /dev/null +++ b/openlayers/examples/boxes-vector.html @@ -0,0 +1,59 @@ + + + + + + + OpenLayers Boxes Vector Example + + + + + + +

Boxes Example Vector

+ +
+ box, vector, annotation +
+ +

+ Demonstrate marker and box type annotations on a map. +

+ +
+ +
+ + diff --git a/openlayers/examples/boxes.html b/openlayers/examples/boxes.html new file mode 100644 index 0000000000..d2d9ccf7e4 --- /dev/null +++ b/openlayers/examples/boxes.html @@ -0,0 +1,58 @@ + + + + + + + OpenLayers Boxes Example + + + + + + +

Boxes Example

+ +
+ box, annotation +
+ +

+ Demonstrate marker and box type annotations on a map. +

+ +
+ +
+ + diff --git a/openlayers/examples/browser.html b/openlayers/examples/browser.html new file mode 100644 index 0000000000..195f7d4b21 --- /dev/null +++ b/openlayers/examples/browser.html @@ -0,0 +1,152 @@ + + + + + + + OpenLayers Browser Detection + + + + + + + +

Browser detection

+ +
+ browser, vendor, mobile, events, HTML5, gesture, touch +
+ +

+ The goal of this script is to inform about the capacity of the browser used by the user. +

+ +
+

+ See the + browser.js source to see how this is done. +

+
+ +

Your browser information

+ +
+
+ +

Click or touch the red square to get information about the selected events

+ +
+
+ click
+ dblclick
+ mousedown
+ mouseup
+ mouseover
+ mousemove
+ mouseout
+ touchstart
+ touchend
+ touchmove
+ touchcancel
+ gesturestart
+ gesturechange
+ gestureend
+
+ +
+
+
+
+ +
+
+ + + + diff --git a/openlayers/examples/browser.js b/openlayers/examples/browser.js new file mode 100644 index 0000000000..a593ca64ab --- /dev/null +++ b/openlayers/examples/browser.js @@ -0,0 +1,241 @@ +var isEventSupported = (function(undef) { + + var TAGNAMES = { + 'select':'input', + 'change':'input', + 'submit':'form', + 'reset':'form', + 'error':'img', + 'load':'img', + 'abort':'img' + }; + + function isEventSupported(eventName, element) { + element = element || document.createElement(TAGNAMES[eventName] || 'div'); + eventName = 'on' + eventName; + + var isSupported = (eventName in element); + + if (!isSupported) { + // if it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element + if (!element.setAttribute) { + element = document.createElement('div'); + } + if (element.setAttribute && element.removeAttribute) { + element.setAttribute(eventName, ''); + isSupported = typeof element[eventName] == 'function'; + + // if property was created, "remove it" (by setting value to `undefined`) + if (typeof element[eventName] != 'undefined') { + element[eventName] = undef; + } + element.removeAttribute(eventName); + } + } + + element = null; + return isSupported; + } + + return isEventSupported; +})(); + +function divResult(category, name, element, div) { + div.innerHTML = div.innerHTML + category + " " + name + ": "; + div.innerHTML = div.innerHTML + ( + isEventSupported(name, element) + ? 'true' + : 'false' + ); + div.innerHTML = div.innerHTML + "
"; +} +var counter = 1; + +function log(title, detail) { + var logDiv = document.getElementById("log"); + idString = "'id" + counter + "'"; + var newlink = document.createElement('a'); + newlink.setAttribute('href', "javascript:toggle_visibility(" + idString + ")"); + newlink.innerHTML = counter + ". " + title; + var br1 = document.createElement('br'); + logDiv.appendChild(newlink); + logDiv.appendChild(br1); + + var childDiv = document.createElement('div'); + childDiv.setAttribute("id", idString.replace("'", "").replace("'", "")); + childDiv.setAttribute("style", 'display: none; margin-left : 5px;'); + childDiv.innerHTML = detail; + var br2 = document.createElement('br'); + logDiv.appendChild(childDiv); + + counter = counter + 1; +} + +function inspect(obj) { + if (typeof obj === "undefined") { + return "undefined"; + } + var _props = []; + + for (var i in obj) { + _props.push(i + " : " + obj[i]); + } + return " {" + _props.join(",
") + "} "; +} + +function click(e) { + if (document.getElementById("clickID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function dblclick(e) { + if (document.getElementById("dblclickID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function mousedown(e) { + if (document.getElementById("mousedownID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function mouseup(e) { + if (document.getElementById("mouseupID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function mouseover(e) { + if (document.getElementById("mouseoverID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function mousemove(e) { + if (document.getElementById("mousemoveID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function mouseout(e) { + if (document.getElementById("mouseoutID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function touchstart(e) { + if (document.getElementById("touchstartID").checked) { + var box = document.getElementById("box"); + var result = inspect(e); + for (var i = 0; i < e.touches.length; i++) { + result = result + "
Touches nr." + i + "
" + inspect(e.touches[i]); + } + log(e.type, result); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function touchend(e) { + if (document.getElementById("touchendID").checked) { + var box = document.getElementById("box"); + var result = inspect(e); + for (var i = 0; i < e.touches.length; i++) { + result = result + "
Touches nr." + i + "
" + inspect(e.touches[i]); + } + log(e.type, result); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function touchmove(e) { + if (document.getElementById("touchmoveID").checked) { + var targetEvent = e.touches.item(0); + var box = document.getElementById("box"); + box.style.left = targetEvent.clientX + "px"; + box.style.top = targetEvent.clientY + "px"; + var result = inspect(e); + for (var i = 0; i < e.touches.length; i++) { + result = result + "
Touches nr." + i + "
" + inspect(e.touches[i]); + } + log(e.type, result); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function touchcancel(e) { + if (document.getElementById("touchcancelID").checked) { + var box = document.getElementById("box"); + var result = inspect(e); + for (var i = 0; i < e.touches.length; i++) { + result = result + "
Touches nr." + i + "
" + inspect(e.touches[i]); + } + log(e.type, result); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function gesturestart(e) { + if (document.getElementById("gesturestartID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function gesturechange(e) { + if (document.getElementById("gesturechangeID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function gestureend(e) { + if (document.getElementById("gestureendID").checked) { + var box = document.getElementById("box"); + log(e.type, inspect(e)); + if (e.preventDefault) e.preventDefault(); + } + return false; +} + +function toggle_visibility(id) { + var e = document.getElementById(id); + if (e.style.display == 'block') { + e.style.display = 'none'; + } else { + e.style.display = 'block'; + } +} + + + diff --git a/openlayers/examples/buffer.html b/openlayers/examples/buffer.html new file mode 100644 index 0000000000..03beb123e7 --- /dev/null +++ b/openlayers/examples/buffer.html @@ -0,0 +1,54 @@ + + + + + + + OpenLayers Buffer Example + + + + + + +

Buffer Example

+ +
+ buffer, performance, tile +
+ +

+ This example shows the use of the buffer layer option for any layer that inherits from OpenLayers.Layer.Grid. +

+ +
+ +
+ Use the buffer property to control how many tiles are included + outside the visible map area. Default is 2. +
+ + diff --git a/openlayers/examples/canvas-hit-detection.html b/openlayers/examples/canvas-hit-detection.html new file mode 100644 index 0000000000..5148b70633 --- /dev/null +++ b/openlayers/examples/canvas-hit-detection.html @@ -0,0 +1,31 @@ + + + + OpenLayers Canvas Hit Detection Example + + + + + + + + +

Feature Hit Detection with Canvas

+

+ Demonstrates detection of feature hits with the canvas renderer. +

+
+
+

+ Click on the features above to see them selected. This example + uses the Canvas renderer so it only works on browsers where + canvas is supported. +

+

+ View the canvas-hit-detection.js + source to see how this is done. +

+
+ + + diff --git a/openlayers/examples/canvas-hit-detection.js b/openlayers/examples/canvas-hit-detection.js new file mode 100644 index 0000000000..abc6897381 --- /dev/null +++ b/openlayers/examples/canvas-hit-detection.js @@ -0,0 +1,88 @@ + +// create some sample features +var Feature = OpenLayers.Feature.Vector; +var Geometry = OpenLayers.Geometry; +var features = [ + new Feature(new Geometry.Point(-90, 45)), + new Feature( + new Geometry.Point(0, 45), + {cls: "one"} + ), + new Feature( + new Geometry.Point(90, 45), + {cls: "two"} + ), + new Feature( + Geometry.fromWKT("LINESTRING(-110 -60, -80 -40, -50 -60, -20 -40)") + ), + new Feature( + Geometry.fromWKT("POLYGON((20 -20, 110 -20, 110 -80, 20 -80, 20 -20), (40 -40, 90 -40, 90 -60, 40 -60, 40 -40))") + ) +]; + +// create rule based styles +var Rule = OpenLayers.Rule; +var Filter = OpenLayers.Filter; +var style = new OpenLayers.Style({ + pointRadius: 10, + strokeWidth: 3, + strokeOpacity: 0.7, + strokeColor: "navy", + fillColor: "#ffcc66", + fillOpacity: 1 +}, { + rules: [ + new Rule({ + filter: new Filter.Comparison({ + type: "==", + property: "cls", + value: "one" + }), + symbolizer: { + externalGraphic: "../img/marker-blue.png" + } + }), + new Rule({ + filter: new Filter.Comparison({ + type: "==", + property: "cls", + value: "two" + }), + symbolizer: { + externalGraphic: "../img/marker-green.png" + } + }), + new Rule({ + elseFilter: true, + symbolizer: { + graphicName: "circle" + } + }) + ] +}); + +var layer = new OpenLayers.Layer.Vector(null, { + styleMap: new OpenLayers.StyleMap({ + "default": style, + select: { + fillColor: "red", + pointRadius: 13, + strokeColor: "yellow", + strokeWidth: 3 + } + }), + isBaseLayer: true, + renderers: ["Canvas"] +}); +layer.addFeatures(features); + +var map = new OpenLayers.Map({ + div: "map", + layers: [layer], + center: new OpenLayers.LonLat(0, 0), + zoom: 0 +}); + +var select = new OpenLayers.Control.SelectFeature(layer); +map.addControl(select); +select.activate(); diff --git a/openlayers/examples/canvas-inspector.html b/openlayers/examples/canvas-inspector.html new file mode 100644 index 0000000000..8f2d8bc061 --- /dev/null +++ b/openlayers/examples/canvas-inspector.html @@ -0,0 +1,53 @@ + + + + OpenLayers Canvas Inspector + + + + + + + + + +

Canvas Inspector

+

+ Displays pixel values for canvas context. +

+
+
+

+ View the canvas-inspector.js + source to see how this is done. +

+
+
+
+ + + + +
+   +
+ + + diff --git a/openlayers/examples/canvas-inspector.js b/openlayers/examples/canvas-inspector.js new file mode 100644 index 0000000000..064b4d5b56 --- /dev/null +++ b/openlayers/examples/canvas-inspector.js @@ -0,0 +1,91 @@ + +var features = [ + + new OpenLayers.Feature.Vector( + OpenLayers.Geometry.fromWKT( + "LINESTRING(-90 90, 90 -90)" + ), + {color: "#0f0000"} + ), + + new OpenLayers.Feature.Vector( + OpenLayers.Geometry.fromWKT( + "LINESTRING(100 50, -100 -50)" + ), + {color: "#00ff00"} + ) + +]; + +var layer = new OpenLayers.Layer.Vector(null, { + styleMap: new OpenLayers.StyleMap({ + strokeWidth: 3, + strokeColor: "${color}" + }), + isBaseLayer: true, + renderers: ["Canvas"], + rendererOptions: {hitDetection: true} +}); +layer.addFeatures(features); + +var map = new OpenLayers.Map({ + div: "map", + layers: [layer], + center: new OpenLayers.LonLat(0, 0), + zoom: 0 +}); + +var xOff = 2, yOff = 2; + +var rows = 1 + (2 * yOff); +var cols = 1 + (2 * xOff); + +var template = new jugl.Template("template"); +template.process({ + clone: true, + parent: "inspector", + context: { + rows: rows, + cols: cols + } +}); + +function isDark(r, g, b, a) { + a = a / 255; + var da = 1 - a; + // convert color values to decimal (assume white background) + r = (a * r / 255) + da; + g = (a * g / 255) + da; + b = (a * b / 255) + da; + // use w3C brightness measure + var brightness = (r * 0.299) + (g * 0.587) + (b * 0.144); + return brightness < 0.5; +} + +var context = layer.renderer.canvas; //layer.renderer.hitContext; +var size = map.getSize(); +map.events.on({ + mousemove: function(event) { + var x = event.xy.x - 1; // TODO: fix this elsewhere + var y = event.xy.y; + if ((x >= xOff) && (x < size.w - xOff) && (y >= yOff) && (y < size.h - yOff)) { + var data = context.getImageData(x - xOff, y - yOff, rows, cols).data; + var offset, red, green, blue, alpha, cell; + for (var i=0; iG: " + green + "
B: " + blue + "
A: " + alpha; + cell.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + (alpha / 255) + ")"; + cell.style.color = isDark(red, green, blue, alpha) ? "#ffffff" : "#000000"; + } + } + } + } +}); + + diff --git a/openlayers/examples/canvas.html b/openlayers/examples/canvas.html new file mode 100644 index 0000000000..06beef8d25 --- /dev/null +++ b/openlayers/examples/canvas.html @@ -0,0 +1,35 @@ + + + + + + + Canvas Renderer Example + + + + + + + +

Canvas Renderer Example

+
+ canvas, renderer, advanced, +
+

+ Demonstrates the use of the canvas renderer with a vector layer. +

+
+
+

+ This example shows a vector layer that uses the Canvas renderer + where available. The order of the renderers given in the layer + options is used to locate the first available renderer. +

+

+ See the canvas.js source + to see how this is done. +

+
+ + diff --git a/openlayers/examples/canvas.js b/openlayers/examples/canvas.js new file mode 100644 index 0000000000..6440c39a11 --- /dev/null +++ b/openlayers/examples/canvas.js @@ -0,0 +1,62 @@ +var map, layer, styleMap; +OpenLayers.ProxyHost = "proxy.cgi?url="; + +function init() { + map = new OpenLayers.Map({ + div: "map", + projection: new OpenLayers.Projection("EPSG:900913"), + displayProjection: new OpenLayers.Projection("EPSG:4326"), + units: "m", + maxResolution: 156543.0339, + maxExtent: new OpenLayers.Bounds( + -20037508, -20037508, 20037508, 20037508 + ) + }); + + var g = new OpenLayers.Layer.Google("Google Layer", { + sphericalMercator: true + }); + map.addLayers([g]); + + // prepare to style the data + styleMap = new OpenLayers.StyleMap({ + strokeColor: "black", + strokeWidth: 2, + strokeOpacity: 0.5, + fillOpacity: 0.2 + }); + + // create a color table for state FIPS code + var colors = ["red", "orange", "yellow", "green", "blue", "purple"]; + var code, fips = {}; + for(var i=1; i<=66; ++i) { + code = "0" + i; + code = code.substring(code.length - 2); + fips[code] = {fillColor: colors[i % colors.length]}; + } + // add unique value rules with your color lookup + styleMap.addUniqueValueRules("default", "STATE_FIPS", fips); + + // create a vector layer using the canvas renderer (where available) + var wfs = new OpenLayers.Layer.Vector("States", { + strategies: [new OpenLayers.Strategy.BBOX()], + protocol: new OpenLayers.Protocol.WFS({ + version: "1.1.0", + srsName: "EPSG:900913", + url: "http://v2.suite.opengeo.org/geoserver/wfs", + featureType: "states", + featureNS: "http://usa.opengeo.org" + }), + styleMap: styleMap, + renderers: ["Canvas", "SVG", "VML"] + }); + map.addLayer(wfs); + + // if you want to use Geographic coords, transform to ESPG:900913 + var ddBounds = new OpenLayers.Bounds( + -73.839111,40.287907,-68.214111,44.441624 + ); + map.zoomToExtent( + ddBounds.transform(map.displayProjection, map.getProjectionObject()) + ); +} diff --git a/openlayers/examples/click-handler.html b/openlayers/examples/click-handler.html new file mode 100644 index 0000000000..d0bd9d444c --- /dev/null +++ b/openlayers/examples/click-handler.html @@ -0,0 +1,232 @@ + + + + + + + OpenLayers Click Handler Example + + + + + + + + + +

Click Handler Example

+
+ +
+ event, events, propagation, advanced +
+ +

+ This example shows the use of the click handler. +

+ +
+

+ The click handler can be used to gain more flexibility over handling + click events. The handler can be constructed with options to handle + only single click events, to handle single and double-click events, + to ignore clicks that include a drag, and to stop propagation of + single and/or double-click events. A single click is a click that + is not followed by another click for more than 300ms. This delay + is configured with the delay property. +

+

+ The options to stop single and double clicks have to do with + stopping event propagation on the map events listener queue + (not stopping events from cascading to other elements). The + ability to stop an event from propagating has to do with the + order in which listeners are registered. With stopSingle or + stopDouble true, a click handler will stop propagation to all + listeners that were registered (or all handlers that were + activated) before the click handler was activated. So, for + example, activating a click handler with stopDouble true after + the navigation control is active will stop double-clicks from + zooming in. +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Controls with click handlers (toggle on/off to clear output)
single only
double only
both
single with drag
single with stop
double with stop
+
+ + diff --git a/openlayers/examples/click.html b/openlayers/examples/click.html new file mode 100644 index 0000000000..98945c33b3 --- /dev/null +++ b/openlayers/examples/click.html @@ -0,0 +1,91 @@ + + + + + + + OpenLayers Click Event Example + + + + + + + +

Click Event Example

+ +
+ click control, double, doubleclick, double-click, event, events, + propagation +
+ +

+ This example shows the use of the click handler and + getLonLatFromViewPortPx functions to trigger events on mouse click. +

+ +
+ +
+

Using the Click handler allows you to (for example) catch clicks + without catching double clicks, something that standard browser + events don't do for you. (Try double clicking: you'll zoom in, + whereas using the browser click event, you would just get two + alerts.) This example click control shows you how to use it.

+
+ + diff --git a/openlayers/examples/controls.html b/openlayers/examples/controls.html new file mode 100644 index 0000000000..33169e0fd2 --- /dev/null +++ b/openlayers/examples/controls.html @@ -0,0 +1,76 @@ + + + + + + + OpenLayers Map Controls Example + + + + + + + +

Map Controls Example

+ +
+ control, basic +
+ +

+ Attach zooming, panning, layer switcher, overview map, and permalink map controls to an OpenLayers window. +

+ +
+ + +
+ + diff --git a/openlayers/examples/cql-format.html b/openlayers/examples/cql-format.html new file mode 100644 index 0000000000..7a00509a3b --- /dev/null +++ b/openlayers/examples/cql-format.html @@ -0,0 +1,54 @@ + + + + + + + + OpenLayers CQL Example + + + + + + + +

CQL Filter Example

+
+ CQL, filter +
+

+ Demonstrate use the CQL filter. +

+
+
+

+ Enter text for a CQL filter to update the features displayed. +
+

+ + + + +
+ +

+ View the cql-format.js source + to see how this is done. +

+
+ + + + diff --git a/openlayers/examples/cql-format.js b/openlayers/examples/cql-format.js new file mode 100644 index 0000000000..2119b1aaa2 --- /dev/null +++ b/openlayers/examples/cql-format.js @@ -0,0 +1,61 @@ + +// use a CQL parser for easy filter creation +var format = new OpenLayers.Format.CQL(); + +// this rule will get a filter from the CQL text in the form +var rule = new OpenLayers.Rule({ + // We could also set a filter here. E.g. + // filter: format.read("STATE_ABBR >= 'B' AND STATE_ABBR <= 'O'"), + symbolizer: { + fillColor: "#ff0000", + strokeColor: "#ffcccc", + fillOpacity: "0.5" + } +}); + +var states = new OpenLayers.Layer.Vector("States", { + styleMap: new OpenLayers.StyleMap({ + "default": new OpenLayers.Style(null, {rules: [rule]}) + }) +}); + +var map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.WMS( + "OpenLayers WMS", + "http://maps.opengeo.org/geowebcache/service/wms", + {layers: "openstreetmap", format: "image/png"} + ), + states + ], + center: new OpenLayers.LonLat(-101, 39), + zoom: 3 +}); + +// called when features are fetched +function loadFeatures(data) { + var features = new OpenLayers.Format.GeoJSON().read(data); + states.addFeatures(features); +}; + +// update filter and redraw when form is submitted +var cql = document.getElementById("cql"); +var output = document.getElementById("output"); +function updateFilter() { + var filter; + try { + filter = format.read(cql.value); + } catch (err) { + output.value = err.message; + } + if (filter) { + output.value = ""; + rule.filter = filter; + states.redraw(); + } + return false; +} +updateFilter(); +var form = document.getElementById("cql_form"); +form.onsubmit = updateFilter; diff --git a/openlayers/examples/cross-origin.html b/openlayers/examples/cross-origin.html new file mode 100644 index 0000000000..246047ad4b --- /dev/null +++ b/openlayers/examples/cross-origin.html @@ -0,0 +1,36 @@ + + + + OpenLayers Script Protocol Example + + + + + + + + +

Script Protocol

+
+ protocol, script, cross origin, advanced +
+

+ Demonstrates the use of a script protocol for making feature requests + cross origin. +

+
+
+

+ In cases where a service returns serialized features and accepts + a named callback (e.g. http://example.com/features.json?callback=foo), + the script protocol can be used to read features without being + restricted by the same origin policy. +

+

+ View the cross-origin.js + source to see how this is done +

+
+ + + diff --git a/openlayers/examples/cross-origin.js b/openlayers/examples/cross-origin.js new file mode 100644 index 0000000000..6cf39ec575 --- /dev/null +++ b/openlayers/examples/cross-origin.js @@ -0,0 +1,39 @@ +var map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.WMS( + "World Map", + "http://maps.opengeo.org/geowebcache/service/wms", + {layers: "bluemarble"} + ), + new OpenLayers.Layer.Vector("States", { + strategies: [new OpenLayers.Strategy.BBOX()], + protocol: new OpenLayers.Protocol.Script({ + url: "http://suite.opengeo.org/geoserver/wfs", + callbackKey: "format_options", + callbackPrefix: "callback:", + params: { + service: "WFS", + version: "1.1.0", + srsName: "EPSG:4326", + request: "GetFeature", + typeName: "world:cities", + outputFormat: "json" + }, + filterToParams: function(filter, params) { + // example to demonstrate BBOX serialization + if (filter.type === OpenLayers.Filter.Spatial.BBOX) { + params.bbox = filter.value.toArray(); + if (filter.projection) { + params.bbox.push(filter.projection.getCode()); + } + } + return params; + } + }) + }) + ], + center: new OpenLayers.LonLat(0, 0), + zoom: 1 +}); + diff --git a/openlayers/examples/custom-control.html b/openlayers/examples/custom-control.html new file mode 100644 index 0000000000..16b9e50bd2 --- /dev/null +++ b/openlayers/examples/custom-control.html @@ -0,0 +1,68 @@ + + + + + + + Custom Control Example + + + + + + +

Custom Control Example

+ +
+ control, panel, rectangle +
+ +

+ Demonstrate the addition of a rectangle to the OpenLayers window. +

+ +
+ +
+

The control allows you to draw a rectangle, that reports its coordinates + after creation. Hold down the shift key on your keyboard and draw a + rectangle with the mouse.

+
+ + diff --git a/openlayers/examples/custom-style.html b/openlayers/examples/custom-style.html new file mode 100644 index 0000000000..7b1f369b2f --- /dev/null +++ b/openlayers/examples/custom-style.html @@ -0,0 +1,66 @@ + + + + + + + Custom Style Example + + + + + + + + +

Custom Style Example

+ +
+ styling, css, stylesheet, theming, theme +
+ +

+ Demonstrate changing CSS styles on controls in the OpenLayers window. +

+ +
+ +
+

If you care to modify the style of any OpenLayers element, include + the default stylesheet as a link and declare any style modifications + below that link. These style declarations can be in other linked + stylesheets or in style tags. In addition, construct your map with + options that include {theme: null}. This will disable the default + method of loading the stylesheet and allow you to declare style rules + in your own linked stylesheets or style tags.

+

This example shows how to declare the font family, size, and color + for the mouse position. Note that only the style keys that you want to + modify (change from the default) need to be specified.

+
+ + diff --git a/openlayers/examples/data/line.json b/openlayers/examples/data/line.json new file mode 100644 index 0000000000..942a92009a --- /dev/null +++ b/openlayers/examples/data/line.json @@ -0,0 +1,10 @@ +{ + "type": "FeatureCollection", + "features": [ + {"type":"Feature", "id":"OpenLayers.Feature.Vector_458", "properties":{}, "geometry":{"type":"LineString", "coordinates":[[-121.640625, 24.2578125], [-78.046875, 27.7734375], [-45.703125, 24.9609375], [-13.359375, 16.5234375], [12.65625, 6.6796875], [39.375, 1.0546875], [76.640625, 1.0546875], [108.28125, 1.7578125], [156.09375, 15.8203125]]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}, + {"type":"Feature", "id":"OpenLayers.Feature.Vector_1111", "properties":{}, "geometry":{"type":"LineString", "coordinates":[[-122.34375, -35.5078125], [-48.515625, -33.3984375], [-5.625, -37.6171875], [20.390625, -32.6953125], [69.609375, -34.1015625], [121.640625, -38.3203125], [150.46875, -33.3984375]]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}, + {"type":"Feature", "id":"OpenLayers.Feature.Vector_634", "properties":{}, "geometry":{"type":"LineString", "coordinates":[[-54.84375, 69.9609375], [-56.953125, 31.9921875], [-56.953125, 5.2734375], [-65.390625, -34.8046875], [-66.09375, -61.5234375]]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}, + {"type":"Feature", "id":"OpenLayers.Feature.Vector_820", "properties":{}, "geometry":{"type":"LineString", "coordinates":[[39.375, 58.0078125], [42.890625, 25.6640625], [42.1875, -1.0546875], [37.96875, -50.2734375], [37.265625, -64.3359375]]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}, + {"type":"Feature", "id":"OpenLayers.Feature.Vector_1280", "properties":{}, "geometry":{"type":"LineString", "coordinates":[[101.25, 42.5390625], [106.875, 13.7109375], [106.171875, -17.9296875], [104.765625, -49.5703125], [102.65625, -67.1484375]]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}} + ] +} \ No newline at end of file diff --git a/openlayers/examples/data/point.json b/openlayers/examples/data/point.json new file mode 100644 index 0000000000..96b934e0a2 --- /dev/null +++ b/openlayers/examples/data/point.json @@ -0,0 +1,8 @@ +{ + "type": "FeatureCollection", + "features": [ + {"type":"Feature", "id":"OpenLayers.Feature.Vector_1721", "properties":{}, "geometry":{"type":"Point", "coordinates":[-89.296875, -14.4140625]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}, + {"type":"Feature", "id":"OpenLayers.Feature.Vector_1715", "properties":{}, "geometry":{"type":"Point", "coordinates":[-25.3125, -54.4921875]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}, + {"type":"Feature", "id":"OpenLayers.Feature.Vector_1709", "properties":{}, "geometry":{"type":"Point", "coordinates":[73.828125, -23.5546875]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}} + ] +} \ No newline at end of file diff --git a/openlayers/examples/data/poly.json b/openlayers/examples/data/poly.json new file mode 100644 index 0000000000..f15c0e9602 --- /dev/null +++ b/openlayers/examples/data/poly.json @@ -0,0 +1,9 @@ +{ + "type": "FeatureCollection", + "features": [ + {"type":"Feature", "id":"OpenLayers.Feature.Vector_1489", "properties":{}, "geometry":{"type":"Polygon", "coordinates":[[[-109.6875, 63.6328125], [-112.5, 35.5078125], [-85.078125, 34.8046875], [-68.90625, 39.7265625], [-68.203125, 67.1484375], [-109.6875, 63.6328125]]]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}, + {"type":"Feature", "id":"OpenLayers.Feature.Vector_1668", "properties":{}, "geometry":{"type":"Polygon", "coordinates":[[[-40.78125, 65.0390625], [-40.078125, 34.8046875], [-12.65625, 25.6640625], [21.09375, 17.2265625], [22.5, 58.0078125], [-40.78125, 65.0390625]]]}, "crs":{"type":"OGC", "properties":{"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}} + ] +} + + diff --git a/openlayers/examples/data/roads.json b/openlayers/examples/data/roads.json new file mode 100644 index 0000000000..c6d486689f --- /dev/null +++ b/openlayers/examples/data/roads.json @@ -0,0 +1,349 @@ +{ +"type": "FeatureCollection", +"features": [ +{ "type": "Feature", "properties": { "LINK_ID": 30760460.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "KVARNGATAN", "L_REFADDR": "24", "L_NREFADDR": "22", "R_REFADDR": "27", "R_NREFADDR": "23", "SPEED_CAT": "6", "ZIPCODE": "59333", "SHAPE_LEN": 41.871700 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549555.330250, 6403958.170400 ], [ 1549594.439950, 6403973.130400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730499.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 2, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 46.382600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549497.669850, 6403707.960000 ], [ 1549491.100000, 6403710.100000 ], [ 1549488.039950, 6403716.750400 ], [ 1549488.540100, 6403724.550400 ], [ 1549494.379850, 6403733.540000 ], [ 1549499.679900, 6403738.050400 ], [ 1549506.220000, 6403739.250400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760556.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BRUNNSGATAN", "L_REFADDR": "24", "L_NREFADDR": "16", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 70.310600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549754.276900, 6403854.802400 ], [ 1549728.459850, 6403920.200000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760712.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "9", "R_NREFADDR": "9", "SPEED_CAT": "6", "ZIPCODE": "59332", "SHAPE_LEN": 40.068900 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549571.899950, 6403675.450400 ], [ 1549592.674200, 6403684.530400 ], [ 1549608.619850, 6403691.500000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30837043.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BREDGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 78.203400 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549741.089950, 6403765.520000 ], [ 1549730.790150, 6403779.880000 ], [ 1549703.919950, 6403834.130400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80545558.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "NORRA VARVSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 20.687400 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549909.400050, 6403973.670400 ], [ 1549900.829950, 6403992.491200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760549.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STRMSGATAN", "L_REFADDR": "38", "L_NREFADDR": "36", "R_REFADDR": "33", "R_NREFADDR": "31", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 32.788800 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549878.029900, 6403861.890400 ], [ 1549867.520100, 6403892.960000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547479.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BREDGATAN", "L_REFADDR": "18", "L_NREFADDR": "14", "R_REFADDR": "15", "R_NREFADDR": "13", "SPEED_CAT": "8", "ZIPCODE": "59330", "SHAPE_LEN": 15.654700 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549645.069900, 6403971.520000 ], [ 1549638.940000, 6403985.930400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760575.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BREDGATAN", "L_REFADDR": "24", "L_NREFADDR": "14", "R_REFADDR": "19", "R_NREFADDR": "13", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 118.385000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549703.919950, 6403834.130400 ], [ 1549656.739950, 6403942.710400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760608.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "32", "L_NREFADDR": "32", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 74.462800 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549566.450100, 6403780.090400 ], [ 1549635.170150, 6403808.780000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547481.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "KVARNGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 13.834500 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549625.900050, 6403981.310400 ], [ 1549638.940000, 6403985.930400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730495.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 63.537000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549535.370100, 6403692.830400 ], [ 1549549.530050, 6403703.030400 ], [ 1549570.300100, 6403708.850400 ], [ 1549570.600050, 6403733.360000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80545560.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 20.545100 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549927.119850, 6403985.020000 ], [ 1549944.182350, 6403996.455200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760664.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "3", "R_NREFADDR": "1", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 59.030600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549679.130150, 6403720.210400 ], [ 1549717.099900, 6403730.700000 ], [ 1549726.590150, 6403734.160000 ], [ 1549734.260050, 6403739.820000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547480.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "KVARNGATAN", "L_REFADDR": "20", "L_NREFADDR": "20", "R_REFADDR": "21", "R_NREFADDR": "21", "SPEED_CAT": "6", "ZIPCODE": "59333", "SHAPE_LEN": 12.375300 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549614.030150, 6403977.820000 ], [ 1549621.149850, 6403980.140000 ], [ 1549625.900050, 6403981.310400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760739.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "13", "R_NREFADDR": "11", "SPEED_CAT": "6", "ZIPCODE": "59332", "SHAPE_LEN": 57.793000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549522.250000, 6403645.880000 ], [ 1549571.899950, 6403675.450400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80545557.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "NORRA VARVSGATAN", "L_REFADDR": "26", "L_NREFADDR": "20", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 62.216100 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549929.770050, 6403914.890400 ], [ 1549909.400050, 6403973.670400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760610.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "SLOTTSHOLMSVGEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 60.324700 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549921.910100, 6403780.010400 ], [ 1549931.136800, 6403785.640000 ], [ 1549946.150050, 6403794.800000 ], [ 1549960.880150, 6403807.230400 ], [ 1549962.209450, 6403808.998400 ], [ 1549968.489850, 6403817.350400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760475.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "SPTORGET", "L_REFADDR": "9", "L_NREFADDR": "1", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "8", "ZIPCODE": "59330", "SHAPE_LEN": 70.301600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549656.739950, 6403942.710400 ], [ 1549631.800000, 6403936.830400 ], [ 1549614.030150, 6403977.820000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547460.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "KVARNGATAN", "L_REFADDR": "30", "L_NREFADDR": "26", "R_REFADDR": "31", "R_NREFADDR": "29", "SPEED_CAT": "6", "ZIPCODE": "59333", "SHAPE_LEN": 62.288000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549496.649950, 6403937.400000 ], [ 1549525.699950, 6403946.670400 ], [ 1549555.330250, 6403958.170400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547482.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 22.019100 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549645.069900, 6403971.520000 ], [ 1549637.249850, 6403978.110400 ], [ 1549633.070150, 6403979.170400 ], [ 1549625.900050, 6403981.310400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730502.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 2, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 26.440100 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549535.370100, 6403692.830400 ], [ 1549528.510100, 6403718.360000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730491.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "48", "L_NREFADDR": "48", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 53.485400 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549608.619850, 6403691.500000 ], [ 1549600.079850, 6403708.100000 ], [ 1549584.219950, 6403739.090400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760461.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 2, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "RDHUSGATAN", "L_REFADDR": "52", "L_NREFADDR": "50", "R_REFADDR": "43", "R_NREFADDR": "41", "SPEED_CAT": "6", "ZIPCODE": "59333", "SHAPE_LEN": 62.397200 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549555.330250, 6403958.170400 ], [ 1549531.400050, 6404015.800000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760674.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 13.834500 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549666.080050, 6403715.590400 ], [ 1549679.130150, 6403720.210400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80545555.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "SLOTTSHOLMSVGEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 185.679000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549968.489850, 6403817.350400 ], [ 1549977.779900, 6403836.400000 ], [ 1549983.460050, 6403858.740000 ], [ 1549982.539900, 6403884.350400 ], [ 1549978.140050, 6403903.230400 ], [ 1549947.139850, 6403954.090400 ], [ 1549927.119850, 6403985.020000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760515.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "NORRA VARVSGATAN", "L_REFADDR": "30", "L_NREFADDR": "28", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 22.968600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549938.960000, 6403893.840000 ], [ 1549929.770050, 6403914.890400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760497.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "KVARNGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59333", "SHAPE_LEN": 24.829800 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549488.599950, 6403913.910400 ], [ 1549496.649950, 6403937.400000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30837044.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 146.769000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549776.080150, 6403777.100000 ], [ 1549785.590000, 6403778.330400 ], [ 1549886.280100, 6403772.890400 ], [ 1549908.484450, 6403777.327200 ], [ 1549921.910100, 6403780.010400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760477.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BRUNNSGATAN", "L_REFADDR": "14", "L_NREFADDR": "12", "R_REFADDR": "19", "R_NREFADDR": "11", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 78.700300 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549723.519950, 6403934.620000 ], [ 1549697.600000, 6404008.930400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760542.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "22", "L_NREFADDR": "18", "R_REFADDR": "29", "R_NREFADDR": "21", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 34.587000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549798.179850, 6403867.590400 ], [ 1549830.790050, 6403879.130400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760457.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "NYGATAN", "L_REFADDR": "8", "L_NREFADDR": "6", "R_REFADDR": "15", "R_NREFADDR": "7", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 45.468000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549796.459950, 6403958.910400 ], [ 1549839.739900, 6403972.810400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573703846.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 8.208130 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549734.260050, 6403739.820000 ], [ 1549738.939900, 6403746.560000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760631.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 46.824600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549741.290150, 6403748.820000 ], [ 1549753.539450, 6403766.201600 ], [ 1549754.750100, 6403767.920000 ], [ 1549761.249950, 6403772.460000 ], [ 1549776.080150, 6403777.100000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760491.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BRUNNSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 15.240700 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549728.459850, 6403920.200000 ], [ 1549723.519950, 6403934.620000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760566.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "NORRA VARVSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 54.648300 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549960.410100, 6403843.980000 ], [ 1549959.139950, 6403850.640000 ], [ 1549952.470000, 6403860.580000 ], [ 1549938.960000, 6403893.840000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547447.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 13.369300 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549927.421200, 6403767.822400 ], [ 1549921.910100, 6403780.010400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730503.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 44.681900 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549528.510100, 6403718.360000 ], [ 1549570.600050, 6403733.360000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80545559.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 21.047100 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549909.400050, 6403973.670400 ], [ 1549927.119850, 6403985.020000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547444.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 46.504800 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549967.599100, 6403744.932000 ], [ 1549943.650000, 6403755.770400 ], [ 1549927.421200, 6403767.822400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730492.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 44.681800 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549584.219950, 6403739.090400 ], [ 1549566.450100, 6403780.090400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760700.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "7", "R_NREFADDR": "5", "SPEED_CAT": "6", "ZIPCODE": "59332", "SHAPE_LEN": 62.310700 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549608.619850, 6403691.500000 ], [ 1549666.080050, 6403715.590400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760611.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 51.110800 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549921.910100, 6403780.010400 ], [ 1549913.480000, 6403787.710400 ], [ 1549891.640000, 6403820.850400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547478.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BREDGATAN", "L_REFADDR": "24", "L_NREFADDR": "20", "R_REFADDR": "19", "R_NREFADDR": "17", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 31.088600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549656.739950, 6403942.710400 ], [ 1549645.069900, 6403971.520000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760451.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "KVARNGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59333", "SHAPE_LEN": 20.146600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549594.439950, 6403973.130400 ], [ 1549614.030150, 6403977.820000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760525.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "16", "L_NREFADDR": "14", "R_REFADDR": "19", "R_NREFADDR": "15", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 39.254300 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549830.790050, 6403879.130400 ], [ 1549867.520100, 6403892.960000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760497.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59333", "SHAPE_LEN": 24.829800 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549488.599950, 6403913.910400 ], [ 1549496.649950, 6403937.400000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573703847.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 3.259030 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549738.939900, 6403746.560000 ], [ 1549741.290150, 6403748.820000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730500.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 31.544900 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549528.510100, 6403718.360000 ], [ 1549511.590050, 6403738.200000 ], [ 1549506.220000, 6403739.250400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730504.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 32.542600 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549497.669850, 6403707.960000 ], [ 1549528.510100, 6403718.360000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760589.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "", "CHANGED": "", "USERID": "", "ST_NAME": "BRUNNSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "23", "R_NREFADDR": "21", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 47.569300 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549771.489900, 6403810.460000 ], [ 1549754.276900, 6403854.802400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270836", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 34.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549967.599100, 6403744.932000 ], [ 1549999.352500, 6403730.830400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270839", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 9.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549967.599100, 6403744.932000 ], [ 1549975.575600, 6403750.824800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270840", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 18.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549975.575600, 6403750.824800 ], [ 1549992.301750, 6403743.152800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 22, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270840", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 16.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1550001.325450, 6403756.464000 ], [ 1549992.301750, 6403743.152800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270842", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 12.300000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549927.421200, 6403767.822400 ], [ 1549936.717550, 6403775.876000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270842", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 46.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549936.717550, 6403775.876000 ], [ 1549958.789600, 6403758.524000 ], [ 1549975.575600, 6403750.824800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547691.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 2, "LOGKOD": "R", "CHANGED": "0808270844", "USERID": "LO-JKP", "ST_NAME": "NORRA BANGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 209.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549937.660100, 6403662.140000 ], [ 1549881.800100, 6403701.550400 ], [ 1549764.730000, 6403731.290400 ], [ 1549745.501350, 6403736.423200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547691.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 2, "LOGKOD": "R", "CHANGED": "0808270844", "USERID": "LO-JKP", "ST_NAME": "NORRA BANGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 11.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549745.501350, 6403736.423200 ], [ 1549734.260050, 6403739.820000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270847", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 32.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549927.421200, 6403767.822400 ], [ 1549930.803600, 6403753.404000 ], [ 1549928.832400, 6403735.662400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270847", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 53.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549928.832400, 6403735.662400 ], [ 1549962.732350, 6403727.381600 ], [ 1549967.599100, 6403744.932000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270848", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 44.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549928.832400, 6403735.662400 ], [ 1549886.025300, 6403747.621600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270848", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 11.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549886.025300, 6403747.621600 ], [ 1549875.211350, 6403750.643200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270848", "USERID": "LO-JKP", "ST_NAME": "STATIONSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 19.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549888.409150, 6403767.056000 ], [ 1549886.025300, 6403747.621600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270922", "USERID": "LO-JKP", "ST_NAME": "HALLSTRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 20.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549745.501350, 6403736.423200 ], [ 1549760.669300, 6403722.331200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270923", "USERID": "LO-JKP", "ST_NAME": "HALLSTRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 126.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549760.669300, 6403722.331200 ], [ 1549771.919700, 6403716.340800 ], [ 1549815.248650, 6403610.940000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547535.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 1, "LOGKOD": "R", "CHANGED": "0808270933", "USERID": "LO-JKP", "ST_NAME": "ESPLANADEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "5", "R_NREFADDR": "1", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 5.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549681.045700, 6403715.598400 ], [ 1549679.130150, 6403720.210400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270933", "USERID": "LO-JKP", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 68.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549745.501350, 6403736.423200 ], [ 1549740.387150, 6403731.321600 ], [ 1549681.045700, 6403715.598400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760732.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 2, "LOGKOD": "R", "CHANGED": "0808270934", "USERID": "LO-JKP", "ST_NAME": "ESPLANADEN", "L_REFADDR": "2", "L_NREFADDR": "2", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59332", "SHAPE_LEN": 56.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549683.510050, 6403654.550400 ], [ 1549667.935400, 6403709.100000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760732.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 2, "LOGKOD": "R", "CHANGED": "0808270934", "USERID": "LO-JKP", "ST_NAME": "ESPLANADEN", "L_REFADDR": "2", "L_NREFADDR": "2", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59332", "SHAPE_LEN": 6.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549667.935400, 6403709.100000 ], [ 1549666.080050, 6403715.590400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270934", "USERID": "LO-JKP", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 14.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549681.045700, 6403715.598400 ], [ 1549667.935400, 6403709.100000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270935", "USERID": "LO-JKP", "ST_NAME": "HALLSTRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 40.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549763.755600, 6403714.004800 ], [ 1549738.019750, 6403704.509600 ], [ 1549731.660600, 6403715.640800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547428.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270936", "USERID": "LO-JKP", "ST_NAME": "HALLSTRMSGATAN", "L_REFADDR": "10", "L_NREFADDR": "2", "R_REFADDR": "1", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59331", "SHAPE_LEN": 15.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549766.018350, 6403708.067200 ], [ 1549763.755600, 6403714.004800 ], [ 1549760.669300, 6403722.331200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270936", "USERID": "LO-JKP", "ST_NAME": "HALLSTRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 48.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549766.018350, 6403708.067200 ], [ 1549736.048550, 6403696.628800 ], [ 1549743.183300, 6403681.558400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547428.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270936", "USERID": "LO-JKP", "ST_NAME": "HALLSTRMSGATAN", "L_REFADDR": "10", "L_NREFADDR": "2", "R_REFADDR": "1", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59331", "SHAPE_LEN": 22.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549774.118750, 6403686.709600 ], [ 1549766.018350, 6403708.067200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270936", "USERID": "LO-JKP", "ST_NAME": "HALLSTRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 36.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549774.118750, 6403686.709600 ], [ 1549747.876450, 6403676.916800 ], [ 1549751.868550, 6403670.136800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547428.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808270937", "USERID": "LO-JKP", "ST_NAME": "HALLSTRMSGATAN", "L_REFADDR": "10", "L_NREFADDR": "2", "R_REFADDR": "1", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59331", "SHAPE_LEN": 25.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549783.651700, 6403662.588800 ], [ 1549778.530150, 6403674.660000 ], [ 1549774.118750, 6403686.709600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547535.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 1, "LOGKOD": "R", "CHANGED": "0808270938", "USERID": "LO-JKP", "ST_NAME": "ESPLANADEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "5", "R_NREFADDR": "1", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 18.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549703.060000, 6403662.590400 ], [ 1549695.854900, 6403679.940000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547535.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 1, "LOGKOD": "R", "CHANGED": "0808270938", "USERID": "LO-JKP", "ST_NAME": "ESPLANADEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "5", "R_NREFADDR": "1", "SPEED_CAT": "6", "ZIPCODE": "59331", "SHAPE_LEN": 38.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549695.854900, 6403679.940000 ], [ 1549681.045700, 6403715.598400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270938", "USERID": "LO-JKP", "ST_NAME": "ESPLANADEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 27.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549695.854900, 6403679.940000 ], [ 1549710.817400, 6403684.797600 ], [ 1549716.384850, 6403674.867200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808270939", "USERID": "LO-JKP", "ST_NAME": "ESPLANADEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 18.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549704.982200, 6403658.172000 ], [ 1549717.515000, 6403662.725600 ], [ 1549719.527500, 6403657.506400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271124", "USERID": "LO-JKP", "ST_NAME": "FNGELSETORGET", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 192.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549908.200950, 6403637.271200 ], [ 1549910.100750, 6403648.924800 ], [ 1549887.237000, 6403693.868800 ], [ 1549878.956000, 6403699.779200 ], [ 1549807.205300, 6403714.370400 ], [ 1549760.669300, 6403722.331200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 1900112527.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 2, "LOGKOD": "R", "CHANGED": "0808271126", "USERID": "LO-JKP", "ST_NAME": "FNGELSETORGET", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 100.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549809.770450, 6403695.048800 ], [ 1549792.424450, 6403687.958400 ], [ 1549824.218800, 6403612.351200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271126", "USERID": "LO-JKP", "ST_NAME": "FNGELSETOGET", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 17.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549817.102950, 6403710.910400 ], [ 1549809.770450, 6403695.048800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547449.000000, "RP_TYPE": 10, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271128", "USERID": "LO-JKP", "ST_NAME": "SDRA VARVSGATAN", "L_REFADDR": "40", "L_NREFADDR": "32", "R_REFADDR": "21", "R_NREFADDR": "15", "SPEED_CAT": "6", "ZIPCODE": "59350", "SHAPE_LEN": 23.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549989.554600, 6403806.848000 ], [ 1549976.880050, 6403812.990400 ], [ 1549968.489850, 6403817.350400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730501.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271500", "USERID": "LO-JKP", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 9.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549570.600050, 6403733.360000 ], [ 1549579.722100, 6403737.201600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730501.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271500", "USERID": "LO-JKP", "ST_NAME": "", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 4.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549579.722100, 6403737.201600 ], [ 1549584.219950, 6403739.090400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 573730505.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271504", "USERID": "LO-JKP", "ST_NAME": "LROVERKSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59333", "SHAPE_LEN": 79.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549471.922100, 6403800.288000 ], [ 1549539.838900, 6403825.187200 ], [ 1549546.809850, 6403827.740000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271508", "USERID": "LO-JKP", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59332", "SHAPE_LEN": 23.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549574.529850, 6403669.305600 ], [ 1549580.125650, 6403672.576800 ], [ 1549595.345750, 6403678.918400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271508", "USERID": "LO-JKP", "ST_NAME": "SDRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59332", "SHAPE_LEN": 80.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549595.345750, 6403678.918400 ], [ 1549617.976400, 6403688.348000 ], [ 1549648.329450, 6403702.939200 ], [ 1549654.639250, 6403704.509600 ], [ 1549660.157350, 6403703.329600 ], [ 1549667.935400, 6403709.100000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271508", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59333", "SHAPE_LEN": 68.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549579.722100, 6403737.201600 ], [ 1549586.633550, 6403729.352000 ], [ 1549598.065250, 6403704.509600 ], [ 1549595.698200, 6403698.599200 ], [ 1549588.604750, 6403693.078400 ], [ 1549592.674200, 6403684.530400 ], [ 1549595.345750, 6403678.918400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271508", "USERID": "LO-JKP", "ST_NAME": "KVARNGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59333", "SHAPE_LEN": 185.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549495.671350, 6403901.486400 ], [ 1549498.716350, 6403900.056000 ], [ 1549509.356700, 6403886.655200 ], [ 1549520.005100, 6403865.753600 ], [ 1549533.012150, 6403839.740800 ], [ 1549539.838900, 6403825.187200 ], [ 1549547.990750, 6403807.808000 ], [ 1549557.459650, 6403786.516800 ], [ 1549566.128450, 6403765.624800 ], [ 1549574.805650, 6403746.692800 ], [ 1549579.722100, 6403737.201600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547462.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271508", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "44", "L_NREFADDR": "38", "R_REFADDR": "61", "R_NREFADDR": "53", "SPEED_CAT": "7", "ZIPCODE": "59333", "SHAPE_LEN": 14.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549501.325600, 6403908.552800 ], [ 1549497.550150, 6403911.790400 ], [ 1549488.599950, 6403913.910400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271508", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59333", "SHAPE_LEN": 9.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549495.671350, 6403901.486400 ], [ 1549501.325600, 6403908.552800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271509", "USERID": "LO-JKP", "ST_NAME": "SLOTTHOLMSLEDEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 29.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549745.501350, 6403736.423200 ], [ 1549760.487650, 6403761.674400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271509", "USERID": "LO-JKP", "ST_NAME": "SLOTTHOLMSLEDEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 130.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549760.487650, 6403761.674400 ], [ 1549773.107600, 6403768.775200 ], [ 1549794.000150, 6403771.925600 ], [ 1549806.223900, 6403771.925600 ], [ 1549847.621200, 6403768.775200 ], [ 1549874.427700, 6403767.595200 ], [ 1549888.409150, 6403767.056000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760574.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271509", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "26", "L_NREFADDR": "24", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 5.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549703.919950, 6403834.130400 ], [ 1549709.114300, 6403836.262400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760574.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271509", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "26", "L_NREFADDR": "24", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 48.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549709.114300, 6403836.262400 ], [ 1549754.276900, 6403854.802400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760590.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271510", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "30", "L_NREFADDR": "28", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 37.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549635.170150, 6403808.780000 ], [ 1549670.099800, 6403821.660000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271510", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 45.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549670.099800, 6403821.660000 ], [ 1549661.138750, 6403843.681600 ], [ 1549652.074100, 6403839.340800 ], [ 1549647.702600, 6403850.082400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760590.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271511", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "30", "L_NREFADDR": "28", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 4.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549670.099800, 6403821.660000 ], [ 1549674.526600, 6403823.292000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760590.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271511", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "30", "L_NREFADDR": "28", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 31.300000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549674.526600, 6403823.292000 ], [ 1549703.919950, 6403834.130400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271511", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 23.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549674.526600, 6403823.292000 ], [ 1549664.644350, 6403844.952000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271512", "USERID": "LO-JKP", "ST_NAME": "BREDGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 47.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549760.487650, 6403761.674400 ], [ 1549753.539450, 6403766.201600 ], [ 1549734.473200, 6403778.625600 ], [ 1549728.022350, 6403793.287200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271513", "USERID": "LO-JKP", "ST_NAME": "BREDGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 9.300000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549728.022350, 6403793.287200 ], [ 1549724.270700, 6403801.813600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271513", "USERID": "LO-JKP", "ST_NAME": "BREDGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 37.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549724.270700, 6403801.813600 ], [ 1549709.114300, 6403836.262400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271514", "USERID": "LO-JKP", "ST_NAME": "BREDGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 51.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549754.276900, 6403854.802400 ], [ 1549737.228050, 6403806.618400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271514", "USERID": "LO-JKP", "ST_NAME": "BREDGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 13.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549737.228050, 6403806.618400 ], [ 1549724.270700, 6403801.813600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547503.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271514", "USERID": "LO-JKP", "ST_NAME": "BRUNNSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "25", "R_NREFADDR": "25", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 17.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549774.889100, 6403793.607200 ], [ 1549771.489900, 6403810.460000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271514", "USERID": "LO-JKP", "ST_NAME": "BRUNNSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 40.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549737.228050, 6403806.618400 ], [ 1549769.560700, 6403793.607200 ], [ 1549774.889100, 6403793.607200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547503.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271515", "USERID": "LO-JKP", "ST_NAME": "BRUNNSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "25", "R_NREFADDR": "25", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 14.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549776.080150, 6403777.100000 ], [ 1549775.301400, 6403791.567200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547503.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271515", "USERID": "LO-JKP", "ST_NAME": "BRUNNSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "25", "R_NREFADDR": "25", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 2.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549775.301400, 6403791.567200 ], [ 1549774.889100, 6403793.607200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271516", "USERID": "LO-JKP", "ST_NAME": "SLOTTHOLMSLEDEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 23.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549888.409150, 6403767.056000 ], [ 1549894.924400, 6403766.804800 ], [ 1549911.882600, 6403767.984800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271516", "USERID": "LO-JKP", "ST_NAME": "SLOTTHOLMSLEDEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 15.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549911.882600, 6403767.984800 ], [ 1549927.421200, 6403767.822400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760596.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271516", "USERID": "LO-JKP", "ST_NAME": "NORRA JRNVGSGATAN", "L_REFADDR": "12", "L_NREFADDR": "6", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 68.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549818.068600, 6403799.888800 ], [ 1549884.091550, 6403818.700000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760596.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271516", "USERID": "LO-JKP", "ST_NAME": "NORRA JRNVGSGATAN", "L_REFADDR": "12", "L_NREFADDR": "6", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 7.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549884.091550, 6403818.700000 ], [ 1549891.640000, 6403820.850400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271516", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 58.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549911.882600, 6403767.984800 ], [ 1549908.484450, 6403777.327200 ], [ 1549905.284050, 6403786.126400 ], [ 1549884.091550, 6403818.700000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760579.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271517", "USERID": "LO-JKP", "ST_NAME": "NORRA JRNVGSGATAN", "L_REFADDR": "4", "L_NREFADDR": "2", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 6.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549891.640000, 6403820.850400 ], [ 1549897.839200, 6403822.604000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271517", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 61.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549936.717550, 6403775.876000 ], [ 1549931.136800, 6403785.640000 ], [ 1549927.257050, 6403792.427200 ], [ 1549897.839200, 6403822.604000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271517", "USERID": "LO-JKP", "ST_NAME": "SLOTTSHOLMSLEDEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 7.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549982.841250, 6403805.048000 ], [ 1549989.554600, 6403806.848000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271518", "USERID": "LO-JKP", "ST_NAME": "SLOTTSHOLMSLEDEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 14.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549775.301400, 6403791.567200 ], [ 1549789.273750, 6403792.036800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808271518", "USERID": "LO-JKP", "ST_NAME": "SLOTTSHOLMSLEDEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 116.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549789.273750, 6403792.036800 ], [ 1549820.418850, 6403786.116800 ], [ 1549862.599800, 6403784.936000 ], [ 1549905.284050, 6403786.126400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 16, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808271518", "USERID": "LO-JKP", "ST_NAME": "NORRA JRNVGSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 29.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549818.068600, 6403799.888800 ], [ 1549789.273750, 6403792.036800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547461.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280759", "USERID": "LO-JKP", "ST_NAME": "VRDTRDSPLAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "7", "R_NREFADDR": "3", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 93.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549635.170150, 6403808.780000 ], [ 1549633.900000, 6403814.330400 ], [ 1549618.609900, 6403847.560000 ], [ 1549614.980050, 6403851.970400 ], [ 1549605.460050, 6403851.850400 ], [ 1549590.180100, 6403883.960800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547461.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280759", "USERID": "LO-JKP", "ST_NAME": "VRDTRDSPLAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "7", "R_NREFADDR": "3", "SPEED_CAT": "6", "ZIPCODE": "59330", "SHAPE_LEN": 51.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549590.180100, 6403883.960800 ], [ 1549568.259950, 6403874.780000 ], [ 1549542.790100, 6403864.450400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280759", "USERID": "LO-JKP", "ST_NAME": "VRDTRDSPLAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 99.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549555.330250, 6403958.170400 ], [ 1549562.119900, 6403948.800800 ], [ 1549569.040100, 6403929.018400 ], [ 1549576.364550, 6403927.638400 ], [ 1549583.482500, 6403925.468800 ], [ 1549590.600800, 6403917.357600 ], [ 1549593.767950, 6403909.047200 ], [ 1549596.737350, 6403902.126400 ], [ 1549585.857950, 6403894.605600 ], [ 1549590.180100, 6403883.960800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760476.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280801", "USERID": "LO-JKP", "ST_NAME": "NYGATAN", "L_REFADDR": "12", "L_NREFADDR": "10", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 62.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549723.519950, 6403934.620000 ], [ 1549782.972000, 6403954.418400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760476.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280801", "USERID": "LO-JKP", "ST_NAME": "NYGATAN", "L_REFADDR": "12", "L_NREFADDR": "10", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 14.200000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549782.972000, 6403954.418400 ], [ 1549796.459950, 6403958.910400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760555.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280803", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "33", "R_NREFADDR": "31", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 37.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549754.276900, 6403854.802400 ], [ 1549789.877500, 6403865.172000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760555.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280803", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "33", "R_NREFADDR": "31", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 8.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549789.877500, 6403865.172000 ], [ 1549798.179850, 6403867.590400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280803", "USERID": "LO-JKP", "ST_NAME": "GSTA BERNARDS GATA", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 44.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549763.127350, 6403899.236800 ], [ 1549769.602000, 6403885.904800 ], [ 1549772.571400, 6403880.964800 ], [ 1549789.877500, 6403865.172000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280805", "USERID": "LO-JKP", "ST_NAME": "GRNA GRND", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 42.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549782.972000, 6403954.418400 ], [ 1549793.934000, 6403923.878400 ], [ 1549786.164350, 6403917.663200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280805", "USERID": "LO-JKP", "ST_NAME": "GRNA GRND", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 29.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549786.164350, 6403917.663200 ], [ 1549763.127350, 6403899.236800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760512.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 2, "LOGKOD": "R", "CHANGED": "0808280806", "USERID": "LO-JKP", "ST_NAME": "TRDGRDSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "3", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 16.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549763.127350, 6403899.236800 ], [ 1549754.840050, 6403906.050400 ], [ 1549749.691200, 6403908.812000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760512.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 2, "LOGKOD": "R", "CHANGED": "0808280806", "USERID": "LO-JKP", "ST_NAME": "TRDGRDSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "3", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 24.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549749.691200, 6403908.812000 ], [ 1549728.459850, 6403920.200000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280806", "USERID": "LO-JKP", "ST_NAME": "GSTA BERNARDS GATA", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 49.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549786.477600, 6403917.288000 ], [ 1549786.164350, 6403917.663200 ], [ 1549781.471200, 6403923.288000 ], [ 1549778.501800, 6403931.988800 ], [ 1549753.386150, 6403924.078400 ], [ 1549757.605750, 6403919.492000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280806", "USERID": "LO-JKP", "ST_NAME": "GSTA BERNARDS GATA", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 7.300000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549757.605750, 6403919.492000 ], [ 1549762.549850, 6403914.117600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280806", "USERID": "LO-JKP", "ST_NAME": "GSTA BERNARDS GATA", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 13.300000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549749.691200, 6403908.812000 ], [ 1549757.605750, 6403919.492000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760580.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280807", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "42", "L_NREFADDR": "40", "R_REFADDR": "37", "R_NREFADDR": "35", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 25.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549891.640000, 6403820.850400 ], [ 1549883.651250, 6403844.940000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760580.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280807", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "42", "L_NREFADDR": "40", "R_REFADDR": "37", "R_NREFADDR": "35", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 17.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549883.651250, 6403844.940000 ], [ 1549878.029900, 6403861.890400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280807", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 19.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549883.651250, 6403844.940000 ], [ 1549902.215600, 6403851.322400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760588.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "R", "CHANGED": "0808280808", "USERID": "LO-JKP", "ST_NAME": "TERVNDSGATAN", "L_REFADDR": "24", "L_NREFADDR": "14", "R_REFADDR": "23", "R_NREFADDR": "15", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 85.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549771.489900, 6403810.460000 ], [ 1549848.872800, 6403847.815200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760588.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "R", "CHANGED": "0808280808", "USERID": "LO-JKP", "ST_NAME": "TERVNDSGATAN", "L_REFADDR": "24", "L_NREFADDR": "14", "R_REFADDR": "23", "R_NREFADDR": "15", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 32.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549848.872800, 6403847.815200 ], [ 1549878.029900, 6403861.890400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280808", "USERID": "LO-JKP", "ST_NAME": "TERVNDSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 16.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549848.872800, 6403847.815200 ], [ 1549858.013750, 6403836.851200 ], [ 1549859.956250, 6403835.057600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280808", "USERID": "LO-JKP", "ST_NAME": "TERVNDSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 8.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549859.956250, 6403835.057600 ], [ 1549865.800200, 6403829.660800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280808", "USERID": "LO-JKP", "ST_NAME": "TERVNDSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 7.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549859.956250, 6403835.057600 ], [ 1549866.996150, 6403838.471200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760516.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280809", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "12", "L_NREFADDR": "2", "R_REFADDR": "13", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 39.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549867.520100, 6403892.960000 ], [ 1549904.353050, 6403905.936000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760516.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280809", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "12", "L_NREFADDR": "2", "R_REFADDR": "13", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 26.900000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549904.353050, 6403905.936000 ], [ 1549929.770050, 6403914.890400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760548.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280809", "USERID": "LO-JKP", "ST_NAME": "TERVNDSGATAN", "L_REFADDR": "12", "L_NREFADDR": "2", "R_REFADDR": "13", "R_NREFADDR": "13", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 43.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549878.029900, 6403861.890400 ], [ 1549916.095200, 6403881.850400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760548.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280809", "USERID": "LO-JKP", "ST_NAME": "TERVNDSGATAN", "L_REFADDR": "12", "L_NREFADDR": "2", "R_REFADDR": "13", "R_NREFADDR": "13", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 25.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549916.095200, 6403881.850400 ], [ 1549938.960000, 6403893.840000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280809", "USERID": "LO-JKP", "ST_NAME": "BTSMANSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 26.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549904.353050, 6403905.936000 ], [ 1549912.608150, 6403888.475200 ], [ 1549916.095200, 6403881.850400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760517.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280811", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "34", "L_NREFADDR": "24", "R_REFADDR": "29", "R_NREFADDR": "19", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 23.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549848.114000, 6403950.774400 ], [ 1549839.739900, 6403972.810400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280811", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 30.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549848.114000, 6403950.774400 ], [ 1549869.289000, 6403957.700800 ], [ 1549866.484800, 6403965.702400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760517.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280812", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "34", "L_NREFADDR": "24", "R_REFADDR": "29", "R_NREFADDR": "19", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 36.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549867.520100, 6403892.960000 ], [ 1549856.605700, 6403927.937600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760517.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280812", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "34", "L_NREFADDR": "24", "R_REFADDR": "29", "R_NREFADDR": "19", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 24.400000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549856.605700, 6403927.937600 ], [ 1549855.749950, 6403930.680000 ], [ 1549848.114000, 6403950.774400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280812", "USERID": "LO-JKP", "ST_NAME": "STRMSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 22.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549856.605700, 6403927.937600 ], [ 1549842.391850, 6403922.888000 ], [ 1549839.991550, 6403930.109600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760453.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280813", "USERID": "LO-JKP", "ST_NAME": "NYGATAN", "L_REFADDR": "4", "L_NREFADDR": "2", "R_REFADDR": "5", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 44.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549839.739900, 6403972.810400 ], [ 1549882.122450, 6403986.464000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760453.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280814", "USERID": "LO-JKP", "ST_NAME": "NYGATAN", "L_REFADDR": "4", "L_NREFADDR": "2", "R_REFADDR": "5", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 4.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549882.122450, 6403986.464000 ], [ 1549885.859750, 6403988.054400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760453.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808280814", "USERID": "LO-JKP", "ST_NAME": "NYGATAN", "L_REFADDR": "4", "L_NREFADDR": "2", "R_REFADDR": "5", "R_NREFADDR": "1", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 15.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549885.859750, 6403988.054400 ], [ 1549900.829950, 6403992.491200 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808280814", "USERID": "LO-JKP", "ST_NAME": "NYGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 30.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549885.859750, 6403988.054400 ], [ 1549892.433450, 6403972.732800 ], [ 1549900.598950, 6403962.172000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808281227", "USERID": "LO-JKP", "ST_NAME": "SDRA VARVSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 43.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549936.717550, 6403775.876000 ], [ 1549969.438000, 6403803.858400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808281227", "USERID": "LO-JKP", "ST_NAME": "SDRA VARVSGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59331", "SHAPE_LEN": 13.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549969.438000, 6403803.858400 ], [ 1549982.841250, 6403805.048000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760579.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808281227", "USERID": "LO-JKP", "ST_NAME": "NORRA JRNVGSGATAN", "L_REFADDR": "4", "L_NREFADDR": "2", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 37.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549897.839200, 6403822.604000 ], [ 1549934.253900, 6403832.906400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760579.000000, "RP_TYPE": 14, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808281227", "USERID": "LO-JKP", "ST_NAME": "NORRA JRNVGSGATAN", "L_REFADDR": "4", "L_NREFADDR": "2", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "7", "ZIPCODE": "59330", "SHAPE_LEN": 29.500000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549934.253900, 6403832.906400 ], [ 1549957.490050, 6403839.480000 ], [ 1549960.410100, 6403843.980000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 19, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808281227", "USERID": "LO-JKP", "ST_NAME": "SLOTTSHOLMSLEDEN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59330", "SHAPE_LEN": 45.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549969.438000, 6403803.858400 ], [ 1549962.209450, 6403808.998400 ], [ 1549954.459400, 6403814.508800 ], [ 1549934.253900, 6403832.906400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547462.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808290805", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "44", "L_NREFADDR": "38", "R_REFADDR": "61", "R_NREFADDR": "53", "SPEED_CAT": "7", "ZIPCODE": "59333", "SHAPE_LEN": 23.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549546.809850, 6403827.740000 ], [ 1549537.632500, 6403849.605600 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 80547462.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808290805", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "44", "L_NREFADDR": "38", "R_REFADDR": "61", "R_NREFADDR": "53", "SPEED_CAT": "7", "ZIPCODE": "59333", "SHAPE_LEN": 70.100000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549537.632500, 6403849.605600 ], [ 1549533.320150, 6403859.880000 ], [ 1549518.660050, 6403889.780000 ], [ 1549507.790100, 6403903.010400 ], [ 1549501.325600, 6403908.552800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808290805", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59333", "SHAPE_LEN": 46.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549537.632500, 6403849.605600 ], [ 1549561.402400, 6403858.662400 ], [ 1549569.328850, 6403839.652000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760609.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808290829", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "46", "L_NREFADDR": "46", "R_REFADDR": "65", "R_NREFADDR": "63", "SPEED_CAT": "7", "ZIPCODE": "59333", "SHAPE_LEN": 26.800000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549566.450100, 6403780.090400 ], [ 1549555.974950, 6403804.818400 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760609.000000, "RP_TYPE": 12, "RP_FUNC": 1, "DIRECTION": 0, "LOGKOD": "R", "CHANGED": "0808290829", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "46", "L_NREFADDR": "46", "R_REFADDR": "65", "R_NREFADDR": "63", "SPEED_CAT": "7", "ZIPCODE": "59333", "SHAPE_LEN": 24.700000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549555.974950, 6403804.818400 ], [ 1549546.809850, 6403827.740000 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 0.000000, "RP_TYPE": 18, "RP_FUNC": 0, "DIRECTION": 0, "LOGKOD": "D", "CHANGED": "0808290829", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "", "L_NREFADDR": "", "R_REFADDR": "", "R_NREFADDR": "", "SPEED_CAT": "", "ZIPCODE": "59333", "SHAPE_LEN": 37.600000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549555.974950, 6403804.818400 ], [ 1549577.560500, 6403813.319200 ], [ 1549572.603450, 6403826.820800 ] ] } } +, +{ "type": "Feature", "properties": { "LINK_ID": 30760474.000000, "RP_TYPE": 12, "RP_FUNC": 0, "DIRECTION": 1, "LOGKOD": "R", "CHANGED": "0808290830", "USERID": "LO-JKP", "ST_NAME": "STRA KYRKOGATAN", "L_REFADDR": "36", "L_NREFADDR": "32", "R_REFADDR": "51", "R_NREFADDR": "49", "SPEED_CAT": "6", "ZIPCODE": "59333", "SHAPE_LEN": 58.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 1549496.649950, 6403937.400000 ], [ 1549483.100050, 6403973.990400 ], [ 1549475.242550, 6403991.259200 ] ] } } + +] +} diff --git a/openlayers/examples/debug.html b/openlayers/examples/debug.html new file mode 100644 index 0000000000..95a909b524 --- /dev/null +++ b/openlayers/examples/debug.html @@ -0,0 +1,77 @@ + + + + + + + OpenLayers Debug Example + + + + + + +

Debug Example

+ +
+ debugging, error, fix, fixing, console, firebug, developers, advanced +
+ +

+ Demonstrate console calls to a Firebug console. Requires Firefox. Mostly for developers. +

+ +
+

To run OpenLayers in debug mode, include the following script + tag before the tag that loads OpenLayers:

+ +
    <script src="../lib/Firebug/firebug.js"></script>
+ +

The path to firebug.js must be relative to your + html file. With this script included calls to OpenLayers.Console + will be displayed in the Firebug console. For browsers without + the Firebug extension, the script creates a Firebug Lite console. + This console can be opened by hitting F12 or Ctrl+Shift+L + (Command+Shift+L on a Mac). If you want the Firebug Lite console + to be open when the page loads, add debug="true" to the opening + html tag of your page. Open the console and click on the links below + to see console calls.

+ +

The Firebug website has a complete list of + console calls. + Note that not all are supported with Firebug Lite.

+
+ + diff --git a/openlayers/examples/document-drag.html b/openlayers/examples/document-drag.html new file mode 100644 index 0000000000..7f64b2b58a --- /dev/null +++ b/openlayers/examples/document-drag.html @@ -0,0 +1,43 @@ + + + + + + + OpenLayers Document Drag Example + + + + + + +

OpenLayers Document Drag Example

+ +
+ drag +
+ +
Keep on dragging even when the mouse cursor moves outside of the map
+ +
+ +
+

This example shows how to make a map draggable outside of the map itself.

+
+ + diff --git a/openlayers/examples/donut.html b/openlayers/examples/donut.html new file mode 100644 index 0000000000..4142b75d53 --- /dev/null +++ b/openlayers/examples/donut.html @@ -0,0 +1,62 @@ + + + + + + + OpenLayers Polygon Hole Digitizing + + + + + +

Drawing Holes in Polygons

+
+ draw polygon hole +
+

+ The DrawFeature control can be used to digitize donut polygons. +

+ +
+
    +
  • + + +
  • +
  • + + +
  • +
+
+
+

+ To digitize holes in polygons, hold down the Alt + key and draw over an existing polygon. By default, the + Shift key triggers freehand drawing. Use a + combination of the Shift and Alt keys + to digitize holes in freehand mode. +

+

+ See the + donut.js source for details on how this is done. +

+
+ + + + diff --git a/openlayers/examples/donut.js b/openlayers/examples/donut.js new file mode 100644 index 0000000000..01ae57d2cb --- /dev/null +++ b/openlayers/examples/donut.js @@ -0,0 +1,44 @@ +// allow testing of specific renderers via "?renderer=Canvas", etc +var renderer = OpenLayers.Util.getParameters(window.location.href).renderer; +renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers; + +var map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.OSM(), + new OpenLayers.Layer.Vector("Vector Layer", { + renderers: renderer + }) + ], + center: new OpenLayers.LonLat(0, 0), + zoom: 1 +}); + +var draw = new OpenLayers.Control.DrawFeature( + map.layers[1], + OpenLayers.Handler.Polygon, + {handlerOptions: {holeModifier: "altKey"}} +); +map.addControl(draw); + +// optionally listen for sketch events on the layer +var output = document.getElementById("output"); +function updateOutput(event) { + window.setTimeout(function() { + output.innerHTML = event.type + " " + event.feature.id; + }, 100); +} +map.layers[1].events.on({ + sketchmodified: updateOutput, + sketchcomplete: updateOutput +}) + +// add behavior to UI elements +function toggleControl(element) { + if (element.value === "polygon" && element.checked) { + draw.activate(); + } else { + draw.deactivate(); + } +} +document.getElementById("noneToggle").checked = true; diff --git a/openlayers/examples/doubleSetCenter.html b/openlayers/examples/doubleSetCenter.html new file mode 100644 index 0000000000..eb7ffa0fe7 --- /dev/null +++ b/openlayers/examples/doubleSetCenter.html @@ -0,0 +1,38 @@ + + + + + + + OpenLayers Double Set Center Example + + + + + + +

Double Set Center Example

+ +
+ center, centering, cleanup +
+ +

+ Demonstrate the behavior of two calls to set the center after instantiating the layer object. +

+ +
+ + + +
+ + + diff --git a/openlayers/examples/drag-feature.html b/openlayers/examples/drag-feature.html new file mode 100644 index 0000000000..1b2f649bbb --- /dev/null +++ b/openlayers/examples/drag-feature.html @@ -0,0 +1,114 @@ + + + + + + + Drag Feature Example + + + + + + + + +

Drag Feature Example

+ +
+ point, line, linestring, polygon, digitizing, geometry, draw, drag +
+ +

+ Demonstrates point, line and polygon creation and editing. +

+ +
+ +
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+
+ +
+ + diff --git a/openlayers/examples/draw-feature.html b/openlayers/examples/draw-feature.html new file mode 100644 index 0000000000..d292794f63 --- /dev/null +++ b/openlayers/examples/draw-feature.html @@ -0,0 +1,128 @@ + + + + + + + Draw Feature Example + + + + + + + + +

OpenLayers Draw Feature Example

+ +
+ point, line, linestring, polygon, digitizing, geometry, draw, drag +
+ +

+ Demonstrate on-screen digitizing tools for point, line, and polygon creation. +

+ +
+ +
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+ +
+

With the point drawing control active, click on the map to add a point.

+

With the line drawing control active, click on the map to add the points that make up your line. + Double-click to finish drawing.

+

With the polygon drawing control active, click on the map to add the points that make up your + polygon. Double-click to finish drawing.

+

With any drawing control active, paning the map can still be achieved. Drag the map as + usual for that.

+

Hold down the shift key while drawing to activate freehand mode. While drawing lines or polygons + in freehand mode, hold the mouse down and a point will be added with every mouse movement.

+

+ + diff --git a/openlayers/examples/draw-undo-redo.html b/openlayers/examples/draw-undo-redo.html new file mode 100644 index 0000000000..40ad3e2995 --- /dev/null +++ b/openlayers/examples/draw-undo-redo.html @@ -0,0 +1,38 @@ + + + + OpenLayers Undo/Redo Drawing Methods + + + + + + + + +

Undo/Redo Drawing

+

+ Demonstrates the use of undo & redo methods while drawing. +

+
+ +
+

+ Use Ctrl-Z or ⌘-Z to undo while drawing. + Use Ctrl-Y or ⌘-Y to redo what you have + undone. Use Esc to cancel the current sketch. +

+ The control.undo method works on the current + sketch, removing the most recently added point. + The control.redo method adds back items that were + removed from an undo. To fully erase a sketch, call the + control.cancel method. +

+ View the draw-undo-redo.js + source to see how this is done. +

+
+ + + + diff --git a/openlayers/examples/draw-undo-redo.js b/openlayers/examples/draw-undo-redo.js new file mode 100644 index 0000000000..73900ab6a7 --- /dev/null +++ b/openlayers/examples/draw-undo-redo.js @@ -0,0 +1,45 @@ +var map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.WMS( + "Global Imagery", + "http://maps.opengeo.org/geowebcache/service/wms", + {layers: "bluemarble"}, + {tileOrigin: new OpenLayers.LonLat(-180, -90)} + ), + new OpenLayers.Layer.Vector() + ], + center: new OpenLayers.LonLat(0, 0), + zoom: 1 +}); + +var draw = new OpenLayers.Control.DrawFeature( + map.layers[1], OpenLayers.Handler.Path +); +map.addControl(draw); +draw.activate(); + +OpenLayers.Event.observe(document, "keydown", function(evt) { + var handled = false; + switch (evt.keyCode) { + case 90: // z + if (evt.metaKey || evt.ctrlKey) { + draw.undo(); + handled = true; + } + break; + case 89: // y + if (evt.metaKey || evt.ctrlKey) { + draw.redo(); + handled = true; + } + break; + case 27: // esc + draw.cancel(); + handled = true; + break; + } + if (handled) { + OpenLayers.Event.stop(evt); + } +}); \ No newline at end of file diff --git a/openlayers/examples/dynamic-text-layer.html b/openlayers/examples/dynamic-text-layer.html new file mode 100644 index 0000000000..a361b735d1 --- /dev/null +++ b/openlayers/examples/dynamic-text-layer.html @@ -0,0 +1,101 @@ + + + + + + + OpenLayers Vector Behavior Example + + + + + + +

Dynamic POIs via a Text Layer

+
+ poi, dynamic data, text, format, strategy, popup, select, selection +
+

+ Loading dynamic data from a text file. +

+
+
+

The vector layer shown uses the BBOX strategy, the HTTP protocol, + and the Text format. + This setup appends "?bbox=west,south,east,north" to every + request. This allows you to configure the location as something + like 'textfile.php', and take the '?bbox=' parameter to select + data from a database or the like.

+

There is nothing about this example that limits it to text files; + you can do the same thing with KML, GeoJSON, etc.

+

This is an alternative to something like the OpenStreetMap "Dynamic POI" example. The Layer is a standard vector layer, and interaction can be + configured via the SelectFeature control, as you can see in the + latter half of the code, which allows you to open a popup when + a feature is selected.

+
+ + diff --git a/openlayers/examples/editing-methods.html b/openlayers/examples/editing-methods.html new file mode 100644 index 0000000000..eeab9166de --- /dev/null +++ b/openlayers/examples/editing-methods.html @@ -0,0 +1,58 @@ + + + + OpenLayers Editing Methods + + + + + + + + +

Editing Methods

+

+ Demonstrates the use of editing methods for manipulating geometries + while drawing. +

+
+ + +
+

+ The control.insertXY method inserts a point at the given + map coordinates (x, y) immediately prior to the most recent point + (under the mouse). + The control.insertDeltaXY method inserts a point at + the given offset values (dx, dy) from the previously added point. + The control.insertDirectionLength method inserts a + point at offset direction and length from the previously added point. + Direction is measured counter-clockwise from the positive x-axis. + The control.insertDeflectionLength method inserts a + point at offset deflection and length from the previously added point. + Deflection is measured counter-clockwise from the previous line + segment. + The control.finishSketch method completes the current + sketch without adding the point under the user's mouse. This + allows a sketch to be finished without a double-click. + The control.cancel method discards the current + sketch and leaves the control active. + The control.insertXY method may be called before + any points are digitized manually. The other methods have no + effect until at least one point has been added to the sketch. +

+ View the editing-methods.js + source to see how this is done. +

+
+ + + + diff --git a/openlayers/examples/editing-methods.js b/openlayers/examples/editing-methods.js new file mode 100644 index 0000000000..6986a9944e --- /dev/null +++ b/openlayers/examples/editing-methods.js @@ -0,0 +1,83 @@ +var map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.WMS( + "Global Imagery", + "http://maps.opengeo.org/geowebcache/service/wms", + {layers: "bluemarble"}, + {tileOrigin: new OpenLayers.LonLat(-180, -90)} + ), + new OpenLayers.Layer.Vector() + ], + center: new OpenLayers.LonLat(0, 0), + zoom: 1 +}); + +var draw = new OpenLayers.Control.DrawFeature( + map.layers[1], OpenLayers.Handler.Path +); +map.addControl(draw); +draw.activate(); + +// handle clicks on method links +$("insertXY").onclick = function() { + var values = parseInput( + window.prompt( + "Enter map coordinates for new point (e.g. '-111, 46')", "x, y" + ) + ); + if (values != null) { + draw.insertXY(values[0], values[1]); + } +} +$("insertDeltaXY").onclick = function() { + var values = parseInput( + window.prompt( + "Enter offset values for new point (e.g. '15, -10')", "dx, dy" + ) + ); + if (values != null) { + draw.insertDeltaXY(values[0], values[1]); + } +} +$("insertDirectionLength").onclick = function() { + var values = parseInput( + window.prompt( + "Enter direction and length offset values for new point (e.g. '-45, 10')", "direction, length" + ) + ); + if (values != null) { + draw.insertDirectionLength(values[0], values[1]); + } +} +$("insertDeflectionLength").onclick = function() { + var values = parseInput( + window.prompt( + "Enter deflection and length offset values for new point (e.g. '15, 20')", "deflection, length" + ) + ); + if (values != null) { + draw.insertDeflectionLength(values[0], values[1]); + } +} +$("cancel").onclick = function() { + draw.cancel(); +} +$("finishSketch").onclick = function() { + draw.finishSketch(); +} + +function parseInput(text) { + var values = text.split(","); + if (values.length !== 2) { + values = null; + } else { + values[0] = parseFloat(values[0]); + values[1] = parseFloat(values[1]); + if (isNaN(values[0]) || isNaN(values[1])) { + window.alert("The two values must be numeric."); + values = null; + } + } + return values; +} \ No newline at end of file diff --git a/openlayers/examples/editingtoolbar-outside.html b/openlayers/examples/editingtoolbar-outside.html new file mode 100644 index 0000000000..5acc625e3a --- /dev/null +++ b/openlayers/examples/editingtoolbar-outside.html @@ -0,0 +1,56 @@ + + + + + + + OpenLayers: Custom Editing Toolbar + + + + + + + + +

OpenLayers EditingToolbar Outside Viewport

+
+ digitizing, point, line, linestring, polygon, editing, positioning, style +
+

+ Display an editing toolbar panel outside the map viewport. +

+
+
+ + diff --git a/openlayers/examples/editingtoolbar.html b/openlayers/examples/editingtoolbar.html new file mode 100644 index 0000000000..d3171839c2 --- /dev/null +++ b/openlayers/examples/editingtoolbar.html @@ -0,0 +1,55 @@ + + + + + + + OpenLayers Editing Toolbar Example + + + + + + + + + +

Editing Toolbar Example

+ +
+ digitizing, point, line, linestring, polygon, editing +
+ +

+ Demonstrate polygon, polyline and point creation and editing tools. +

+ +
+
+ +
+ + diff --git a/openlayers/examples/events.html b/openlayers/examples/events.html new file mode 100644 index 0000000000..652dda0d76 --- /dev/null +++ b/openlayers/examples/events.html @@ -0,0 +1,155 @@ + + + + + + + OpenLayers Event Handling + + + + + + +

Event Handling

+ +
+ event, events, handler, listener, cleanup +
+ +

+ Demonstrating various styles of event handling in OpenLayers. +

+ +
+
+ +
+ + diff --git a/openlayers/examples/example-list.html b/openlayers/examples/example-list.html new file mode 100644 index 0000000000..2d3530fff9 --- /dev/null +++ b/openlayers/examples/example-list.html @@ -0,0 +1,302 @@ + + + + + + + + OpenLayers Examples + + + + + + + + +
+
+ +

+ + + show all +

+
+
+
+ + + diff --git a/openlayers/examples/example.html b/openlayers/examples/example.html new file mode 100644 index 0000000000..84a0bc35a5 --- /dev/null +++ b/openlayers/examples/example.html @@ -0,0 +1,25 @@ + + + + + + + OpenLayers Example + + + + +

OpenLayers Example

+
simple, basic
+

+ Demonstrate a simple map with an overlay that includes layer switching controls. +

+
+
+

This is a basic example demonstrating the use of a map with two layers and a few controls.

+

View the example.js source to see how this is done.

+
+ + + + diff --git a/openlayers/examples/example.js b/openlayers/examples/example.js new file mode 100644 index 0000000000..d02e530b45 --- /dev/null +++ b/openlayers/examples/example.js @@ -0,0 +1,23 @@ +var map = new OpenLayers.Map("map"); + +var ol_wms = new OpenLayers.Layer.WMS( + "OpenLayers WMS", + "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: "basic"} +); + +var dm_wms = new OpenLayers.Layer.WMS( + "Canadian Data", + "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap", + { + layers: "bathymetry,land_fn,park,drain_fn,drainage," + + "prov_bound,fedlimit,rail,road,popplace", + transparent: "true", + format: "image/png" + }, + {isBaseLayer: false, visibility: false} +); + +map.addLayers([ol_wms, dm_wms]); +map.addControl(new OpenLayers.Control.LayerSwitcher()); +map.zoomToMaxExtent(); diff --git a/openlayers/examples/filter-strategy.html b/openlayers/examples/filter-strategy.html new file mode 100644 index 0000000000..c9eafa0cdb --- /dev/null +++ b/openlayers/examples/filter-strategy.html @@ -0,0 +1,54 @@ + + + + + + + OpenLayers Filter Strategy Example + + + + + + + + +

Filter Strategy

+
+ filter, strategy, strategies, kml, advanced +
+

+ Demonstrates the filter strategy for limiting features passed to the layer. +

+
+ + + +

+
+

+ This example uses a filter strategy to limit the features that are passed + to a layer. Features bound for this layer have a when attribute + with date values. A filter strategy is constructed with a between filter + that limits the span of dates shown. A simple animation cycles through + the domain of the when values, calling setFilter + on the strategy with an updated filter. +

+ View the filter-strategy.js + source to see how this is done +

+
+ + + diff --git a/openlayers/examples/filter-strategy.js b/openlayers/examples/filter-strategy.js new file mode 100644 index 0000000000..9f8d3942d9 --- /dev/null +++ b/openlayers/examples/filter-strategy.js @@ -0,0 +1,84 @@ +var map, filter, filterStrategy; +var animationTimer; +var currentDate; +var startDate = new Date(1272736800000); // lower bound of when values +var endDate = new Date(1272737100000); // upper value of when values +var step = 8; // sencods to advance each interval +var interval = 0.125; // seconds between each step in the animation + +function startAnimation() { + if (animationTimer) { + stopAnimation(true); + } + if (!currentDate) { + currentDate = startDate; + } + var spanEl = document.getElementById("span"); + var next = function() { + var span = parseInt(spanEl.value, 10); + if (currentDate < endDate) { + filter.lowerBoundary = currentDate; + filter.upperBoundary = new Date(currentDate.getTime() + (span * 1000)); + filterStrategy.setFilter(filter); + currentDate = new Date(currentDate.getTime() + (step * 1000)) + } else { + stopAnimation(true); + } + } + animationTimer = window.setInterval(next, interval * 1000); +} + +function stopAnimation(reset) { + window.clearInterval(animationTimer); + animationTimer = null; + if (reset === true) { + currentDate = null; + } +} + +// add behavior to elements +document.getElementById("start").onclick = startAnimation; +document.getElementById("stop").onclick = stopAnimation; +var spanEl = document.getElementById("span"); + +var mercator = new OpenLayers.Projection("EPSG:900913"); +var geographic = new OpenLayers.Projection("EPSG:4326"); +map = new OpenLayers.Map("map"); + +var osm = new OpenLayers.Layer.OSM(); + +filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.BETWEEN, + property: "when", + lowerBoundary: startDate, + upperBoundary: new Date(startDate.getTime() + (parseInt(spanEl.value, 10) * 1000)) +}); + +filterStrategy = new OpenLayers.Strategy.Filter({filter: filter}); + +var flights = new OpenLayers.Layer.Vector("Aircraft Locations", { + projection: geographic, + strategies: [new OpenLayers.Strategy.Fixed(), filterStrategy], + protocol: new OpenLayers.Protocol.HTTP({ + url: "kml-track.kml", + format: new OpenLayers.Format.KML({ + extractTracks: true + //,extractStyles: true // use style from KML instead of styleMap below + }) + }), + styleMap: new OpenLayers.StyleMap({ + "default": new OpenLayers.Style({ + graphicName: "circle", + pointRadius: 3, + fillOpacity: 0.25, + fillColor: "#ffcc66", + strokeColor: "#ff9933", + strokeWidth: 1 + }) + }), + renderers: ["Canvas", "SVG", "VML"] +}); + +map.addLayers([osm, flights]); +map.setCenter(new OpenLayers.LonLat(-93.2735, 44.8349).transform(geographic, mercator), 8); + diff --git a/openlayers/examples/filter.html b/openlayers/examples/filter.html new file mode 100644 index 0000000000..866495f6f0 --- /dev/null +++ b/openlayers/examples/filter.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + +

Filter Encoding

+
+ filter, format, comparison, filter encoding, fe, logical, attribute, + attributive, spatial, advanced +
+

+ Using the filter format write out filter objects. +

+ +
+ Filter Encoding 1.0 +
+ Filter Encoding 1.1 +
+

+

+ + diff --git a/openlayers/examples/fractional-zoom.html b/openlayers/examples/fractional-zoom.html new file mode 100644 index 0000000000..b01c2d6611 --- /dev/null +++ b/openlayers/examples/fractional-zoom.html @@ -0,0 +1,72 @@ + + + + + + + + + + + + +

Fractional Zoom Example

+ +
+ zoomlevel, unlimited zoom, scale +
+

+ Shows the use of a map with fractional (or non-discrete) zoom levels. +

+ +
+ + + (zoom: ) +

+
+

+ Setting the map.fractionalZoom property to true allows zooming to + an arbitrary level (between the min and max resolutions). This + can be demonstrated by shift-dragging a box to zoom to an arbitrary + extent. +

+
+ + + + + + diff --git a/openlayers/examples/fullScreen.html b/openlayers/examples/fullScreen.html new file mode 100644 index 0000000000..7a92debd56 --- /dev/null +++ b/openlayers/examples/fullScreen.html @@ -0,0 +1,53 @@ + + + + + + + Full Screen Example + + + + + + + +
+ +
+

Full Screen Example

+ +
+ css, style, fullscreen, window, margin, padding, scrollbar +
+ +

+ Demonstrate a map that fill the entire browser window. +

+ +
+

This example uses CSS to define the dimensions of the map element in order to fill the screen. + When the user resizes the window, the map size changes correspondingly. No scroll bars!

+

See the + fullScreen.js source + to see how this is done.

+
+
+ + diff --git a/openlayers/examples/fullScreen.js b/openlayers/examples/fullScreen.js new file mode 100644 index 0000000000..93ed57a027 --- /dev/null +++ b/openlayers/examples/fullScreen.js @@ -0,0 +1,15 @@ +var map; +function init(){ + map = new OpenLayers.Map('map'); + + var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", + "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: 'basic'} ); + var ol_wms_nobuffer = new OpenLayers.Layer.WMS( "OpenLayers WMS (no tile buffer)", + "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: 'basic'}, {buffer: 0}); + + map.addLayers([ol_wms, ol_wms_nobuffer]); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(0, 0), 6); +} diff --git a/openlayers/examples/game-accel-ball.html b/openlayers/examples/game-accel-ball.html new file mode 100644 index 0000000000..75aa1460e7 --- /dev/null +++ b/openlayers/examples/game-accel-ball.html @@ -0,0 +1,82 @@ + + + + + + + OpenLayers Game: Bounce Ball + + + + + + + + +

Accelerometer Example

+
+ mobile, game +
+
Simple acceleration demo; roll a vector feature around + on a map. (Only tested on iOS 4.)
+ +
+
+

Demo works best when device is locked in portrait mode.

+
+ + diff --git a/openlayers/examples/geojson.html b/openlayers/examples/geojson.html new file mode 100644 index 0000000000..528dd3ccd4 --- /dev/null +++ b/openlayers/examples/geojson.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + +

GeoJSON Example

+ +
+ JSON, GeoJSON +
+ +

+ Demonstrate the use of the GeoJSON format. +

+
+
+

This example uses the GeoJSON format.

+
+ + diff --git a/openlayers/examples/geolocation.html b/openlayers/examples/geolocation.html new file mode 100644 index 0000000000..673e08674a --- /dev/null +++ b/openlayers/examples/geolocation.html @@ -0,0 +1,41 @@ + + + + + + + OpenLayers Geolocation + + + + + + +

Geolocation Example

+ +
+ geolocation, geolocate, mobile +
+ +

+ Track current position and display it with its accuracy. +

+ +
+ + + +
+

+ View the geolocation.js source + to see how this is done. +

+
+ + + + diff --git a/openlayers/examples/geolocation.js b/openlayers/examples/geolocation.js new file mode 100644 index 0000000000..1afc12d997 --- /dev/null +++ b/openlayers/examples/geolocation.js @@ -0,0 +1,113 @@ +var style = { + fillColor: '#000', + fillOpacity: 0.1, + strokeWidth: 0 +}; + +var map = new OpenLayers.Map('map'); +var layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); +var vector = new OpenLayers.Layer.Vector('vector'); +map.addLayers([layer, vector]); + +map.setCenter( + new OpenLayers.LonLat(-71.147, 42.472).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() + ), 12 +); + +var pulsate = function(feature) { + var point = feature.geometry.getCentroid(), + bounds = feature.geometry.getBounds(), + radius = Math.abs((bounds.right - bounds.left)/2), + count = 0, + grow = 'up'; + + var resize = function(){ + if (count>16) { + clearInterval(window.resizeInterval); + } + var interval = radius * 0.03; + var ratio = interval/radius; + switch(count) { + case 4: + case 12: + grow = 'down'; break; + case 8: + grow = 'up'; break; + } + if (grow!=='up') { + ratio = - Math.abs(ratio); + } + feature.geometry.resize(1+ratio, point); + vector.drawFeature(feature); + count++; + }; + window.resizeInterval = window.setInterval(resize, 50, point, radius); +}; + +var geolocate = new OpenLayers.Control.Geolocate({ + bind: false, + geolocationOptions: { + enableHighAccuracy: false, + maximumAge: 0, + timeout: 7000 + } +}); +map.addControl(geolocate); +var firstGeolocation = true; +geolocate.events.register("locationupdated",geolocate,function(e) { + vector.removeAllFeatures(); + var circle = new OpenLayers.Feature.Vector( + OpenLayers.Geometry.Polygon.createRegularPolygon( + new OpenLayers.Geometry.Point(e.point.x, e.point.y), + e.position.coords.accuracy/2, + 40, + 0 + ), + {}, + style + ); + vector.addFeatures([ + new OpenLayers.Feature.Vector( + e.point, + {}, + { + graphicName: 'cross', + strokeColor: '#f00', + strokeWidth: 2, + fillOpacity: 0, + pointRadius: 10 + } + ), + circle + ]); + if (firstGeolocation) { + map.zoomToExtent(vector.getDataExtent()); + pulsate(circle); + firstGeolocation = false; + this.bind = true; + } +}); +geolocate.events.register("locationfailed",this,function() { + OpenLayers.Console.log('Location detection failed'); +}); + +$('locate').onclick = function() { + vector.removeAllFeatures(); + geolocate.deactivate(); + $('track').checked = false; + geolocate.watch = false; + firstGeolocation = true; + geolocate.activate(); +}; +$('track').onclick = function() { + vector.removeAllFeatures(); + geolocate.deactivate(); + if (this.checked) { + geolocate.watch = true; + firstGeolocation = true; + geolocate.activate(); + } +}; +$('track').checked = false; diff --git a/openlayers/examples/georss-flickr.html b/openlayers/examples/georss-flickr.html new file mode 100644 index 0000000000..94da9949f8 --- /dev/null +++ b/openlayers/examples/georss-flickr.html @@ -0,0 +1,120 @@ + + + + + + + + + + + + + +

GeoRSS from Flickr in OpenLayers

+
+ georss, style, styling, marker, flickr, thumbnail, image, rule +
+ +

+ Display a flickr-feed on top of the map +

+ +
+
+

The displayed GeoRSS feed has a <media:thumbnail/> + property for each item. An extended createFeatureFromItem() + function is used to add this attribute to the attributes hash of each + feature read in by OpenLayers.Format.GeoRSS. The example is + configured with a style to render each item with its thumbnail image. + Also, to show how rules work, we defined a rule that if the title of an + rss item contains "powder", it will be rendered larger than the others.

+
+ + diff --git a/openlayers/examples/georss-markers.html b/openlayers/examples/georss-markers.html new file mode 100644 index 0000000000..3800100490 --- /dev/null +++ b/openlayers/examples/georss-markers.html @@ -0,0 +1,45 @@ + + + + + + + OpenLayers GeoRSS Marker Example + + + + + + +

GeoRSS Marker Example

+ +
+ georss, style, styling, marker, flickr, image +
+ +

+ Demonstrate loading a GeoRSS feed using the GeoRSS parser. +

+ +
+ +
+ + diff --git a/openlayers/examples/georss.html b/openlayers/examples/georss.html new file mode 100644 index 0000000000..816fcf66a6 --- /dev/null +++ b/openlayers/examples/georss.html @@ -0,0 +1,63 @@ + + + + + + + OpenLayers GeoRSS Example + + + + + + +

GeoRSS Example

+ +
+ georss, style, styling, marker +
+ +

+ Display a couple of locally cached georss feeds on an a basemap. +

+ +
+ +
+

This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are + currently supported. The OpenLayers GeoRSS parser will automatically connect an information bubble to the map + markers, similar to Google maps. In addition, the parser can use custom PNG icons for markers. A sample GeoRSS + file (georss.xml) is included.

+ +
+ GeoRSS URL: + +
+ +

The above input box allows the input of a URL to a GeoRSS feed. This feed can be local to the HTML page — + for example, entering 'georss.xml' will work by default, because there is a local file in the directory called + georss.xml — or, with a properly set up ProxyHost variable (as is used here), it will be able to load any + HTTP URL which contains GeoRSS and display it. Anything else will simply have no effect.

+
+ + diff --git a/openlayers/examples/georss.xml b/openlayers/examples/georss.xml new file mode 100644 index 0000000000..fecf77aeac --- /dev/null +++ b/openlayers/examples/georss.xml @@ -0,0 +1,378 @@ + + + +This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: http://platial.typepad.com/news/2006/04/really_simple_t.html for more info. +http://platial.com +Crschmidt's Places At Platial + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://platial.com/place/90306 +Knitting Room +Address: 2 lake St, Arlington, MA
Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

Map this on Platial
Grab this on Platial ]]>
+42.405696 -71.142197 +crschmidt +2006-06-08T17:35:01.942452+00:00 +
+ +http://platial.com/place/67230 +Knitting Room +Address: 2 lake St, Arlington, MA
Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

Map this on Platial
Grab this on Platial ]]>
+42.405524 -71.142273 +crschmidt +2006-04-24T11:35:26.733857+00:00 +
+ +http://platial.com/place/65645 +†¢¢™£ˆøœ +Address: 151 Erie St., Cambridge, MA
Tags: platial graffiti

Map this on Platial
Grab this on Platial ]]>
+42.352455 -71.110210 +crschmidt +2006-04-20T08:56:12.696224+00:00 +
+ +http://platial.com/place/62200 +Allen Hall +Address: 1301 W Gregory Dr, Urbana, IL
Tags: dorm, uiuc, college



Map this on Platial
Grab this on Platial ]]>
+40.104172 -88.220623 +crschmidt +2006-04-14T08:01:01.872873+00:00 +
+ +http://platial.com/place/28232 +Bagby Hot Springs, OR +Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria

Map this on Platial
Grab this on Platial ]]>
+44.936000 -122.173000 +crschmidt +2006-01-03T23:10:18.553063+00:00 +
+ +http://platial.com/place/43666 +Shooting Location for "The Field of Dreams" Film +Address: Dyersville, Iowa
Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location

Map this on Platial
Grab this on Platial ]]>
+42.481213 -91.111679 +echinodermata +2006-03-23T11:40:17.654061+00:00 +
+ +http://platial.com/place/28394 +Moffetts (Bonneville) Hot Springs, WA +Tags: soak, hot springs, relax, nature

Map this on Platial
Grab this on Platial ]]>
+45.658000 -121.962000 +crschmidt +2006-01-03T23:16:27.329816+00:00 +
+ +http://platial.com/place/28251 +Austin Hot Springs, OR +Tags: soak, hot springs, relax, nature, popular, crowded

Map this on Platial
Grab this on Platial ]]>
+45.021000 -122.009000 +crschmidt +2006-01-03T23:11:04.489886+00:00 +
+ +http://platial.com/place/28392 +Rock Creek Hot Springs, WA +Tags: soak, hot springs, relax, nature

Map this on Platial
Grab this on Platial ]]>
+45.723000 -121.927000 +crschmidt +2006-01-03T23:16:22.636855+00:00 +
+ +http://platial.com/place/28391 +St. Martins (Wind River) Hot Springs, WA +Tags: hot springs, soak, relax, nature, wonderful

Map this on Platial
Grab this on Platial ]]>
+45.728000 -121.800000 +crschmidt +2006-01-03T23:16:20.383244+00:00 +
+ +http://platial.com/place/28231 +Breitenbush Hot Springs, OR +Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking

Map this on Platial
Grab this on Platial ]]>
+44.782000 -121.975000 +crschmidt +2006-01-03T23:10:16.529195+00:00 +
+ +http://platial.com/place/28393 +Collins Hot Springs, WA +Tags: portland, nice, hot springs, soak

Map this on Platial
Grab this on Platial ]]>
+45.701000 -121.728000 +crschmidt +2006-01-03T23:16:24.648745+00:00 +
+ +http://platial.com/place/31685 +Darwin's Ltd. +Address: 148 Mount Auburn St, Cambridge, MA
Tags: coffee, beer, sandwiches, freewifi



Map this on Platial
Grab this on Platial ]]>
+42.373974 -71.125053 +crschmidt +2006-01-10T09:24:08.152985+00:00 +
+ +http://platial.com/place/28596 +Huckleberry Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.115000 -110.684000 +crschmidt +2006-01-03T23:24:32.283094+00:00 +
+ +http://platial.com/place/28595 +South Entrance Hot Springs, WY +


Map this on Platial
Grab this on Platial ]]>
+44.142000 -110.656000 +crschmidt +2006-01-03T23:24:30.279497+00:00 +
+ +http://platial.com/place/28594 +Crawfish Creek Hot Springs, WY +


Map this on Platial
Grab this on Platial ]]>
+44.157000 -110.699000 +crschmidt +2006-01-03T23:24:28.280271+00:00 +
+ +http://platial.com/place/28593 +Crawfish Creek Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.165000 -110.723000 +crschmidt +2006-01-03T23:24:20.364077+00:00 +
+ +http://platial.com/place/28592 +Snake Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.169000 -110.583000 +crschmidt +2006-01-03T23:24:12.234974+00:00 +
+ +http://platial.com/place/28591 +Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.187000 -110.726000 +crschmidt +2006-01-03T23:24:10.027857+00:00 +
+ +http://platial.com/place/28590 +Hot Springs on Upper Snake River, WY +
Map this on Platial
Grab this on Platial ]]>
+44.204000 -110.486000 +crschmidt +2006-01-03T23:24:07.79658+00:00 +
+ +http://platial.com/place/28589 +Hot Springs on lewis Lake, WY +
Map this on Platial
Grab this on Platial ]]>
+44.276000 -110.636000 +crschmidt +2006-01-03T23:24:05.683418+00:00 +
+ +http://platial.com/place/28588 +Rustic Geyser, WY +
Map this on Platial
Grab this on Platial ]]>
+44.282000 -110.506000 +crschmidt +2006-01-03T23:24:03.66329+00:00 +
+ +http://platial.com/place/28587 +Bechler River Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.285000 -110.900000 +crschmidt +2006-01-03T23:24:01.611442+00:00 +
+ +http://platial.com/place/28586 +Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.290000 -110.504000 +crschmidt +2006-01-03T23:23:59.658699+00:00 +
+ +http://platial.com/place/28585 +Heart Lake Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.299000 -110.517000 +crschmidt +2006-01-03T23:23:57.181801+00:00 +
+ +http://platial.com/place/28584 +Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.307000 -110.526000 +crschmidt +2006-01-03T23:23:55.240485+00:00 +
+ +http://platial.com/place/28583 +Hot Springs on lewis Lake, WY +
Map this on Platial
Grab this on Platial ]]>
+44.309000 -110.654000 +crschmidt +2006-01-03T23:23:53.22295+00:00 +
+ +http://platial.com/place/28582 +Shoshone Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.354000 -110.800000 +crschmidt +2006-01-03T23:23:51.179049+00:00 +
+ +http://platial.com/place/28581 +Hot Springs on Continental Divide, WY +
Map this on Platial
Grab this on Platial ]]>
+44.401000 -110.936000 +crschmidt +2006-01-03T23:23:49.077176+00:00 +
+ +http://platial.com/place/28580 +Hot Springs on Upper Firehole River, WY +
Map this on Platial
Grab this on Platial ]]>
+44.404000 -110.824000 +crschmidt +2006-01-03T23:23:47.054664+00:00 +
+ +http://platial.com/place/28579 +Summit Lake Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.410000 -110.953000 +crschmidt +2006-01-03T23:23:45.039394+00:00 +
+ +http://platial.com/place/28578 +Lone Star Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.414000 -110.817000 +crschmidt +2006-01-03T23:23:42.938808+00:00 +
+ +http://platial.com/place/28577 +West. Thumb Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.417000 -110.570000 +crschmidt +2006-01-03T23:23:40.90238+00:00 +
+ +http://platial.com/place/28576 +Lone Star Geyser, WY +
Map this on Platial
Grab this on Platial ]]>
+44.418000 -110.805000 +crschmidt +2006-01-03T23:23:38.844625+00:00 +
+ +http://platial.com/place/28575 +Smoke Jumper Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.421000 -110.952000 +crschmidt +2006-01-03T23:23:36.818513+00:00 +
+ +http://platial.com/place/28574 +West. Thumb Geyser Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.422000 -110.574000 +crschmidt +2006-01-03T23:23:34.767729+00:00 +
+ +http://platial.com/place/28573 +Potts Hot Spring Basin, WY +
Map this on Platial
Grab this on Platial ]]>
+44.433000 -110.581000 +crschmidt +2006-01-03T23:23:32.749915+00:00 +
+ +http://platial.com/place/28572 +Hot Springs, WY +
Map this on Platial
Grab this on Platial ]]>
+44.433000 -110.813000 +crschmidt +2006-01-03T23:23:30.829745+00:00 +
+ +http://platial.com/place/28571 +Hot Springs on Continental Divide, WY +
Map this on Platial
Grab this on Platial ]]>
+44.438000 -110.977000 +crschmidt +2006-01-03T23:23:28.730401+00:00 +
+ +http://platial.com/place/28570 +SouthEastern Group, WY +
Map this on Platial
Grab this on Platial ]]>
+44.459000 -110.817000 +crschmidt +2006-01-03T23:23:26.706763+00:00 +
+
diff --git a/openlayers/examples/getfeature-wfs.html b/openlayers/examples/getfeature-wfs.html new file mode 100644 index 0000000000..0f2096ffa2 --- /dev/null +++ b/openlayers/examples/getfeature-wfs.html @@ -0,0 +1,84 @@ + + + + + + + + + WFS: GetFeature Example (GeoServer) + + + + +

WFS GetFeature Example (GeoServer)

+ +
+WFS, GetFeature +
+ +

+ Shows how to use the GetFeature control to select features from a WMS layer. +

+ +
+ +
+

+ Click or drag a box to select features, use the Shift key to add + features to the selection, use the Ctrl key to toggle a feature's + selected status. Note that this control also has a hover option, which + is enabled in this example. This gives you a visual feedback by loading + the feature underneath the mouse pointer from the WFS, but causes a lot + of GetFeature requests to be issued. +

+
+ + \ No newline at end of file diff --git a/openlayers/examples/getfeatureinfo-control.html b/openlayers/examples/getfeatureinfo-control.html new file mode 100644 index 0000000000..96993ff326 --- /dev/null +++ b/openlayers/examples/getfeatureinfo-control.html @@ -0,0 +1,222 @@ + + + + + + + OpenLayers WMS Feature Info Example (GeoServer) + + + + + + + +

Feature Info Example

+ +
+ WMS, GetFeatureInfo +
+ +

+ Demonstrates the WMSGetFeatureInfo control for fetching information about a position from WMS (via GetFeatureInfo request). +

+ +
+

Tasmania

+

Click on the map to get feature info.

+
+
+
+
+ +
+
+
    +
  • + + +
  • +
  • + + +
  • +
+
    +
  • + + +
  • +
  • + + +
  • +
+
    +
  • + + +
  • +
  • + + +
  • +
+ + diff --git a/openlayers/examples/getfeatureinfo-popup.html b/openlayers/examples/getfeatureinfo-popup.html new file mode 100644 index 0000000000..cecdebe9ac --- /dev/null +++ b/openlayers/examples/getfeatureinfo-popup.html @@ -0,0 +1,96 @@ + + + + + + + GetFeatureInfo Popup + + + + + + +

Feature Info in Popup

+ +
+ WMS, GetFeatureInfo, popup +
+ +

+ Demonstrates the WMSGetFeatureInfo control for fetching information + about a position from WMS (via GetFeatureInfo request). Results + are displayed in a popup. +

+ +
+ +
+ + diff --git a/openlayers/examples/gml-layer.html b/openlayers/examples/gml-layer.html new file mode 100644 index 0000000000..eea465dcec --- /dev/null +++ b/openlayers/examples/gml-layer.html @@ -0,0 +1,42 @@ + + + + + + + OpenLayers GML Layer Example + + + + + + +

GML Layer Example

+ +
+ GML +
+ +

+ Loads locally stored GML vector data on a basemap. Includes GML example file. +

+ +
+ +
+ + diff --git a/openlayers/examples/gml/line.xml b/openlayers/examples/gml/line.xml new file mode 100644 index 0000000000..4f42499770 --- /dev/null +++ b/openlayers/examples/gml/line.xml @@ -0,0 +1,42 @@ + + + + + -3.924027,46.037889 2.193186,47.897181 + + + + + + + -0.631235,46.037889 2.193186,46.704963 + + + + + -0.631235,46.307557 -0.262215,46.577225 0.106805,46.477874 0.220349,46.293364 0.475824,46.406909 0.887424,46.350136 1.029354,46.563032 1.213864,46.648191 1.526112,46.421102 1.795780,46.066275 2.108028,46.037889 2.178993,46.250785 2.193186,46.492067 2.193186,46.492067 2.051255,46.704963 2.051255,46.704963 + + + 1 + + 0 + + + + + + + -3.924027,46.279171 -1.127992,47.897181 + + + + + -1.127992,46.279171 -1.369275,46.364329 -1.624750,46.406909 -1.866032,46.492067 -1.993770,46.704963 -2.178280,46.846894 -1.979577,47.059790 -2.164087,47.144948 -2.135700,47.215914 -2.093121,47.357844 -2.277631,47.258493 -2.391176,47.301072 -2.490527,47.315265 -2.476334,47.443003 -2.575686,47.599127 -2.703423,47.542354 -2.873740,47.471389 -3.285339,47.670092 -3.597587,47.769443 -3.824676,47.840409 -3.924027,47.897181 + + + 2 + + 0 + + + \ No newline at end of file diff --git a/openlayers/examples/gml/multipoint.xml b/openlayers/examples/gml/multipoint.xml new file mode 100644 index 0000000000..803fd47a81 --- /dev/null +++ b/openlayers/examples/gml/multipoint.xml @@ -0,0 +1,70 @@ + + + + + 0.490018,45.001795 3.016384,45.839186 + + + + + + + 0.930003,45.001795 3.016384,45.541131 + + + + + + + 2.079641,45.001795 + + + + + 2.718330,45.541131 + + + + + 3.016384,45.143725 + + + + + 0.930003,45.001795 + + + + + 1 + 4 points + 1 + + + + + + + 0.490018,45.654676 1.157092,45.839186 + + + + + + + 0.490018,45.654676 + + + + + 1.157092,45.839186 + + + + + 2 + 2 points + 2 + + + \ No newline at end of file diff --git a/openlayers/examples/gml/multipolygon.xml b/openlayers/examples/gml/multipolygon.xml new file mode 100644 index 0000000000..bcdb39e657 --- /dev/null +++ b/openlayers/examples/gml/multipolygon.xml @@ -0,0 +1,106 @@ + + + + + -1.738295,46.307557 3.754424,47.244300 + + + + + + + -1.738295,46.605612 1.767394,47.244300 + + + + + + + + + 1.313216,46.690770 1.000968,46.861087 0.887424,47.059790 1.142899,47.244300 1.355795,47.244300 1.554498,47.017211 1.710622,47.059790 1.767394,46.747542 1.313216,46.690770 1.313216,46.690770 + + + + + + + + + 0.731300,46.605612 -0.191250,46.704963 -0.191250,46.846894 0.177770,46.988824 0.447438,46.960438 0.589369,46.804315 0.688721,46.832701 0.731300,46.605612 0.731300,46.605612 + + + + + + + + + -1.610557,46.733349 -1.184765,46.704963 -1.198958,46.704963 -0.943483,46.619805 -0.915096,46.818508 -0.659621,46.775928 -0.688007,47.017211 -0.943483,47.003018 -1.127992,47.088176 -1.397661,47.102369 -1.624750,47.073983 -1.738295,46.917859 -1.610557,46.733349 + + + + + + + 1 + My first Multipolygon + 0 + + + + + + + 2.789295,46.392716 3.754424,46.903666 + + + + + + + 2.959612,46.392716 2.789295,46.775928 3.172508,46.903666 3.498949,46.903666 3.498949,46.662384 3.754424,46.563032 2.959612,46.392716 + + + + + 2 + My second Multipolygon + 0 + + + + + + + 2.207379,46.307557 2.803488,47.045597 + + + + + + + + + 2.292538,46.804315 2.207379,47.017211 2.391889,47.045597 2.562206,46.832701 2.292538,46.804315 + + + + + + + + + 2.789295,46.307557 2.789295,46.307557 2.803488,46.506260 2.618978,46.676577 2.349310,46.633998 2.448661,46.392716 2.789295,46.307557 + + + + + + + 3 + My third Multipolygon + 0 + + + \ No newline at end of file diff --git a/openlayers/examples/gml/owls.xml b/openlayers/examples/gml/owls.xml new file mode 100644 index 0000000000..4a001eca26 --- /dev/null +++ b/openlayers/examples/gml/owls.xml @@ -0,0 +1,156 @@ + + + + + -89.817223,45.005555 -74.755001,51.701388 + + + + + + -79.771668,45.891110 -79.771668,45.891110 + + + + + -79.771668,45.891110 + + + + + + + + + -83.755834,46.365277 -83.755834,46.365277 + + + owl + + + -83.755834,46.365277 + + + + + + + + + -83.808612,46.175277 -83.808612,46.175277 + + + + + -83.808612,46.175277 + + + + + + + + + -84.111112,46.309166 -84.111112,46.309166 + + + + + -84.111112,46.309166 + + + + + + + + + -83.678612,46.821110 -83.678612,46.821110 + + + + + -83.678612,46.821110 + + + + + + + + + -83.664445,46.518888 -83.664445,46.518888 + + + + + -83.664445,46.518888 + + + + + + + + + -80.613334,46.730277 -80.613334,46.730277 + + + + + -80.613334,46.730277 + + + + + + + + + -79.676946,45.428054 -79.676946,45.428054 + + + + + -79.676946,45.428054 + + + + + + + + + -83.853056,46.236944 -83.853056,46.236944 + + + + + -83.853056,46.236944 + + + + + + + + + -82.289167,45.896388 -82.289167,45.896388 + + + + + -82.289167,45.896388 + + + + + + diff --git a/openlayers/examples/gml/point.xml b/openlayers/examples/gml/point.xml new file mode 100644 index 0000000000..10a4820cdb --- /dev/null +++ b/openlayers/examples/gml/point.xml @@ -0,0 +1,42 @@ + + + + + -0.608315,44.857522 -0.021418,45.477577 + + + + + + + -0.608315,44.857522 -0.608315,44.857522 + + + + + -0.608315,44.857522 + + + 1 + Bordeaux + 124 + + + + + + + -0.021418,45.477577 -0.021418,45.477577 + + + + + -0.021418,45.477577 + + + 2 + Barbezieux + 0 + + + \ No newline at end of file diff --git a/openlayers/examples/gml/polygon.xml b/openlayers/examples/gml/polygon.xml new file mode 100644 index 0000000000..e4f6903dcd --- /dev/null +++ b/openlayers/examples/gml/polygon.xml @@ -0,0 +1,89 @@ + + + + + -0.768746,47.003018 3.002191,47.925567 + + + + + + + -0.768746,47.003018 0.532597,47.925567 + + + + + + + + + -0.318987,47.003018 -0.768746,47.358268 -0.574463,47.684285 -0.347374,47.854602 -0.006740,47.925567 0.135191,47.726864 0.149384,47.599127 0.419052,47.670092 0.532597,47.428810 0.305508,47.443003 0.475824,47.144948 0.064225,47.201721 -0.318987,47.003018 + + + + + -0.035126,47.485582 -0.035126,47.485582 -0.049319,47.641706 -0.233829,47.655899 -0.375760,47.457196 -0.276408,47.286879 -0.035126,47.485582 + + + + + + + 1 + My Polygon with hole + 0 + + + + + + + 1.511919,47.088176 3.002191,47.882988 + + + + + + + 1.625463,47.357844 1.511919,47.741057 1.880938,47.882988 2.420275,47.797830 2.789295,47.485582 3.002191,47.457196 2.874453,47.088176 2.178993,47.343651 1.625463,47.357844 + + + + + 2 + My simple Polygon + 0 + + + + + + + 0.000000,45.000000 2.000000,47.000000 + + + + + + + + + 0.000000,45.000000 2.000000,45.000000 2.000000,47.000000 0.000000,47.000000 0.000000,45.000000 + + + + + 0.500000,45.500000 1.500000,45.500000 1.500000,46.500000 0.500000,46.500000 0.500000,45.500000 + + + + + + + 3 + my polygon with hole + 3 + + + \ No newline at end of file diff --git a/openlayers/examples/google-ng.html b/openlayers/examples/google-ng.html new file mode 100644 index 0000000000..4322763b8e --- /dev/null +++ b/openlayers/examples/google-ng.html @@ -0,0 +1,45 @@ + + + + + + + OpenLayers Google NG Layer Example + + + + + + + + + +

Google NG Layer Example

+
+ Google, api key, apikey +
+

+ Demonstrate use of tiles from the Google Maps v3 API. +

+
+
+

+ If you use OpenLayers.Layer.GoogleNG, the getTile method of the + GMaps v3 API's MapType is used to load tiles. This allows for + better integration than interacting with a whole map generated + by a google.maps.Map instance, as done with + OpenLayers.Layer.Google. See the + google-ng.js source + to see how this is done. +

+
+ + diff --git a/openlayers/examples/google-ng.js b/openlayers/examples/google-ng.js new file mode 100644 index 0000000000..fa2ba35b25 --- /dev/null +++ b/openlayers/examples/google-ng.js @@ -0,0 +1,28 @@ +var map; + +function init() { + map = new OpenLayers.Map('map'); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + + var gphy = new OpenLayers.Layer.GoogleNG( + {type: google.maps.MapTypeId.TERRAIN} + ); + var gmap = new OpenLayers.Layer.GoogleNG( + // ROADMAP, the default + ); + var ghyb = new OpenLayers.Layer.GoogleNG( + {type: google.maps.MapTypeId.HYBRID} + ); + var gsat = new OpenLayers.Layer.GoogleNG( + {type: google.maps.MapTypeId.SATELLITE} + ); + + map.addLayers([gphy, gmap, ghyb, gsat]); + + // GoogleNG uses EPSG:900913 as projection, so we have to + // transform our coordinates + map.setCenter(new OpenLayers.LonLat(10.2, 48.9).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() + ), 5); +} diff --git a/openlayers/examples/google-reproject.html b/openlayers/examples/google-reproject.html new file mode 100644 index 0000000000..1606e6e0ef --- /dev/null +++ b/openlayers/examples/google-reproject.html @@ -0,0 +1,63 @@ + + + + + + + OpenLayers Google with Overlay Example + + + + + + + + +

Google with Overlay Example

+ +
+ Google, overlay, mercator, reproject, cleanup +
+ +

+ Demonstrate a Google basemap used with boundary overlay layer. +

+ +
+ +
+

An overlay in a Geographic projection can be stretched to somewhat + line up with Google tiles (in a Mercator projection). Results get + worse farther from the equator. Use the "reproject" option on a + layer to get this behavior. Use the sphericalMercator option on + a Google layer to get proper overlays (with other layers in + Spherical Mercator).

+
+ + diff --git a/openlayers/examples/google-v3-alloverlays.html b/openlayers/examples/google-v3-alloverlays.html new file mode 100644 index 0000000000..10dcde4364 --- /dev/null +++ b/openlayers/examples/google-v3-alloverlays.html @@ -0,0 +1,34 @@ + + + + + + + OpenLayers Google (v3) Layer Example + + + + + + + + +

Google (v3) allOverlays Layer Example

+
+ Google, overlay +
+

+ Demonstrate use the Google Maps v3 API with allOverlays set to true on the map. +

+
+
+

+ You can also use Google layers as overlays, e.g. in a map with + allOverlays set to true. Note some of the layers disappear as + you zoom in to levels that are not supported by all layers. See the + google-v3-alloverlays.js source + to see how this is done. +

+
+ + diff --git a/openlayers/examples/google-v3-alloverlays.js b/openlayers/examples/google-v3-alloverlays.js new file mode 100644 index 0000000000..e2e4da43a3 --- /dev/null +++ b/openlayers/examples/google-v3-alloverlays.js @@ -0,0 +1,35 @@ +var map; + +function init() { + map = new OpenLayers.Map('map', {allOverlays: true}); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + + // the SATELLITE layer has all 22 zoom level, so we add it first to + // become the internal base layer that determines the zoom levels of the + // map. + var gsat = new OpenLayers.Layer.Google( + "Google Satellite", + {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} + ); + var gphy = new OpenLayers.Layer.Google( + "Google Physical", + {type: google.maps.MapTypeId.TERRAIN, visibility: false} + ); + var gmap = new OpenLayers.Layer.Google( + "Google Streets", // the default + {numZoomLevels: 20, visibility: false} + ); + var ghyb = new OpenLayers.Layer.Google( + "Google Hybrid", + {type: google.maps.MapTypeId.HYBRID, numZoomLevels: 22, visibility: false} + ); + + map.addLayers([gsat, gphy, gmap, ghyb]); + + // Google.v3 uses EPSG:900913 as projection, so we have to + // transform our coordinates + map.setCenter(new OpenLayers.LonLat(10.2, 48.9).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() + ), 5); +} diff --git a/openlayers/examples/google-v3.html b/openlayers/examples/google-v3.html new file mode 100644 index 0000000000..c074bb62f5 --- /dev/null +++ b/openlayers/examples/google-v3.html @@ -0,0 +1,40 @@ + + + + + + + OpenLayers Google (v3) Layer Example + + + + + + + + +

Google (v3) Layer Example

+
+ Google, api key, apikey +
+

+ Demonstrate use the Google Maps v3 API. +

+
+
+

Animated + zoom (if supported by GMaps on your device)

+

+ If you use the Google Maps v3 API with a Google layer, you don't + need to include an API key. This layer only works in the + spherical mercator projection. See the + google-v3.js source + to see how this is done. +

+ In order to position the Google attribution div in the default + location, you must include the extra theme/default/google.css + stylesheet. +

+
+ + diff --git a/openlayers/examples/google-v3.js b/openlayers/examples/google-v3.js new file mode 100644 index 0000000000..4d4cd205df --- /dev/null +++ b/openlayers/examples/google-v3.js @@ -0,0 +1,40 @@ +var map; + +function init() { + map = new OpenLayers.Map('map'); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + + var gphy = new OpenLayers.Layer.Google( + "Google Physical", + {type: google.maps.MapTypeId.TERRAIN} + ); + var gmap = new OpenLayers.Layer.Google( + "Google Streets", // the default + {numZoomLevels: 20} + ); + var ghyb = new OpenLayers.Layer.Google( + "Google Hybrid", + {type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20} + ); + var gsat = new OpenLayers.Layer.Google( + "Google Satellite", + {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} + ); + + map.addLayers([gphy, gmap, ghyb, gsat]); + + // Google.v3 uses EPSG:900913 as projection, so we have to + // transform our coordinates + map.setCenter(new OpenLayers.LonLat(10.2, 48.9).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() + ), 5); + + // add behavior to html + var animate = document.getElementById("animate"); + animate.onclick = function() { + for (var i=map.layers.length-1; i>=0; --i) { + map.layers[i].animationEnabled = this.checked; + } + }; +} diff --git a/openlayers/examples/google.html b/openlayers/examples/google.html new file mode 100644 index 0000000000..e6e20b26eb --- /dev/null +++ b/openlayers/examples/google.html @@ -0,0 +1,69 @@ + + + + + + + OpenLayers Google Layer Example + + + + + + + + + +

Google Layer Example

+ +
+ Google +
+ +

+ Demonstrate use of the various types of Google layers. +

+ +
+ +
+

+ For best performance, you must be using a version of the Google Maps + API which is v2.93 or higher. In order to use this version of the API, + it is best to simply set your application to use the string "v=2" in + the request, rather than tying your application to an explicit version.

+

+ In order to position the Google attribution div in the default location, + you must include the extra theme/default/google.css stylesheet.

+
+ + diff --git a/openlayers/examples/graphic-name.html b/openlayers/examples/graphic-name.html new file mode 100644 index 0000000000..033f71af1d --- /dev/null +++ b/openlayers/examples/graphic-name.html @@ -0,0 +1,42 @@ + + + + + + + + OpenLayers Graphic Names + + + + + + +

Named Graphics Example

+
+ vector, named graphic, star, cross, x, square, triangle, circle, style +
+

+ Shows how to use well-known graphic names. +

+
+
+
+

+ OpenLayers supports well-known names for a few graphics. You + can use the names "star", "cross", + "x", "square", "triangle", and + "circle" as value for the graphicName property of a + symbolizer. +

+

+ The named symbols "lightning", "rectangle" + and "church" are user defined. +

+

+ See graphic-name.js + for the source code of this example. +

+
+ + diff --git a/openlayers/examples/graphic-name.js b/openlayers/examples/graphic-name.js new file mode 100644 index 0000000000..9349ed28b6 --- /dev/null +++ b/openlayers/examples/graphic-name.js @@ -0,0 +1,62 @@ +// user custom graphicname +OpenLayers.Renderer.symbol.lightning = [0, 0, 4, 2, 6, 0, 10, 5, 6, 3, 4, 5, 0, 0]; +OpenLayers.Renderer.symbol.rectangle = [0, 0, 4, 0, 4, 10, 0, 10, 0, 0]; +OpenLayers.Renderer.symbol.church = [4, 0, 6, 0, 6, 4, 10, 4, 10, 6, 6, 6, 6, 14, 4, 14, 4, 6, 0, 6, 0, 4, 4, 4, 4, 0]; +var map; + +function init(){ + map = new OpenLayers.Map('map', { + controls: [] + }); + + // list of well-known graphic names + var graphics = ["star", "cross", "x", "square", "triangle", "circle", "lightning", "rectangle", "church"]; + + // Create one feature for each well known graphic. + // Give features a type attribute with the graphic name. + var num = graphics.length; + var slot = map.maxExtent.getWidth() / num; + var features = Array(num); + for (var i = 0; i < graphics.length; ++i) { + lon = map.maxExtent.left + (i * slot) + (slot / 2); + features[i] = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(map.maxExtent.left + (i * slot) + (slot / 2), 0), { + type: graphics[i] + }); + } + + // Create a style map for painting the features. + // The graphicName property of the symbolizer is evaluated using + // the type attribute on each feature (set above). + var styles = new OpenLayers.StyleMap({ + "default": { + graphicName: "${type}", + pointRadius: 10, + strokeColor: "fuchsia", + strokeWidth: 2, + fillColor: "lime", + fillOpacity: 0.6 + }, + "select": { + pointRadius: 20, + fillOpacity: 1, + rotation: 45 + } + }); + + // Create a vector layer and give it your style map. + var layer = new OpenLayers.Layer.Vector("Graphics", { + styleMap: styles, + isBaseLayer: true + }); + layer.addFeatures(features); + map.addLayer(layer); + + // Create a select feature control and add it to the map. + var select = new OpenLayers.Control.SelectFeature(layer, { + hover: true + }); + map.addControl(select); + select.activate(); + + map.zoomToMaxExtent(); +} diff --git a/openlayers/examples/graticule.html b/openlayers/examples/graticule.html new file mode 100644 index 0000000000..6f993ac9e7 --- /dev/null +++ b/openlayers/examples/graticule.html @@ -0,0 +1,116 @@ + + + + + + + OpenLayers Graticule Example + + + + + + + + + +

Graticule Example

+ +
+ graticule, grid +
+ +

+ Adds a Graticule control to the map to display a grid of + latitude and longitude. +

+ +
+
+ +
+
+ + + diff --git a/openlayers/examples/gutter.html b/openlayers/examples/gutter.html new file mode 100644 index 0000000000..ea538546ce --- /dev/null +++ b/openlayers/examples/gutter.html @@ -0,0 +1,60 @@ + + + + + + + OpenLayers Gutter Example + + + + + + + +

Gutter Example

+ +
+ gutter, quality, tile +
+ +

+ Demonstrates map tiling artifacts, and OpenLayer's facility for correcting this distortion. +

+ +
+ +
+

+ When you render tiles with certain types of symbols, there are artifacts + at tile edges that make symbology not look continuous. In the center of + the above map (when it first loads), the large orange road is split + vertically by a tile. Open the layer switcher and change to the layer + with a 15 pixel gutter to see how the symbology looks nicer. +

+
+ + diff --git a/openlayers/examples/highlight-feature.html b/openlayers/examples/highlight-feature.html new file mode 100644 index 0000000000..73cae24e0f --- /dev/null +++ b/openlayers/examples/highlight-feature.html @@ -0,0 +1,90 @@ + + + + + + + SelectFeature Control for Select and Highlight + + + + + + + + + +

OpenLayers Select and Highlight Feature Example

+
+ select, highlight, hover, onmouseover, click, vector +
+

+ Select features on click, highlight features on hover. +

+
+

Select features by clicking on them. Just highlight features by hovering over + them.

+ + diff --git a/openlayers/examples/hover-handler.html b/openlayers/examples/hover-handler.html new file mode 100644 index 0000000000..84d7f1cb9a --- /dev/null +++ b/openlayers/examples/hover-handler.html @@ -0,0 +1,216 @@ + + + + + + + OpenLayers Hover Handler Example + + + + + + + + +

Hover Handler Example

+
+ +
+ hover, onmouseover, handler, listener, event, events +
+ +

+ This example shows the use of the hover handler. +

+ +
+

+ The hover handler is to be used to emulate mouseovers on + objects on the map that aren't DOM elements. For example + one can use the hover hander to send WMS/GetFeatureInfo + requests as the user moves the mouse over the map. +

+

+ The "delay" option specifies the number of milliseconds + before the event is considered a hover. Default is 500 + milliseconds. +

+

+ The "pixelTolerance" option specifies the maximum number + of pixels between mousemoves for an event to be + considered a hover. Default is null, which means no + pixel tolerance. +

+

+ The "stopMove" option specifies whether other mousemove + listeners registered before the hover handler listener must + be notified on mousemoves or not. Default is false (meaning + that the other mousemove listeners will be notified on + mousemove). +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Controls with hover handlers (toggle on/off to clear output)
long delay (2 sec)
short delay (100 msec)
tolerant (6 pixels)
untolerant (1 pixel)
stop propagation
+
+ + diff --git a/openlayers/examples/image-layer.html b/openlayers/examples/image-layer.html new file mode 100644 index 0000000000..3d9bbf2aa0 --- /dev/null +++ b/openlayers/examples/image-layer.html @@ -0,0 +1,75 @@ + + + + + + + OpenLayers Image Layer Example + + + + + + + + +

Image Layer Example

+ +
+ image, imagelayer +
+ +

+ Demonstrate a single non-tiled image as a selectable base layer. +

+ +
+ +
+

+ The "City Lights" layer above is created from a single web accessible + image. If you construct it without any resolution related options, + the layer will be given a single resolution based on the extent/size. + Otherwise, it behaves much like a regular layer. This is primarily + intended to be used in an overview map - where another layer type + might not make a good overview. +

+
+ + diff --git a/openlayers/examples/img/check-round-green.png b/openlayers/examples/img/check-round-green.png new file mode 100644 index 0000000000..176fed1161 Binary files /dev/null and b/openlayers/examples/img/check-round-green.png differ diff --git a/openlayers/examples/img/check-round-grey.png b/openlayers/examples/img/check-round-grey.png new file mode 100644 index 0000000000..dc90efb998 Binary files /dev/null and b/openlayers/examples/img/check-round-grey.png differ diff --git a/openlayers/examples/img/list.png b/openlayers/examples/img/list.png new file mode 100644 index 0000000000..f214206829 Binary files /dev/null and b/openlayers/examples/img/list.png differ diff --git a/openlayers/examples/img/locate.png b/openlayers/examples/img/locate.png new file mode 100644 index 0000000000..c61b499c95 Binary files /dev/null and b/openlayers/examples/img/locate.png differ diff --git a/openlayers/examples/img/marker_shadow.png b/openlayers/examples/img/marker_shadow.png new file mode 100644 index 0000000000..a5afa6edd9 Binary files /dev/null and b/openlayers/examples/img/marker_shadow.png differ diff --git a/openlayers/examples/img/minus1.png b/openlayers/examples/img/minus1.png new file mode 100644 index 0000000000..df446c7932 Binary files /dev/null and b/openlayers/examples/img/minus1.png differ diff --git a/openlayers/examples/img/mobile-layers.png b/openlayers/examples/img/mobile-layers.png new file mode 100644 index 0000000000..c4a6335983 Binary files /dev/null and b/openlayers/examples/img/mobile-layers.png differ diff --git a/openlayers/examples/img/mobile-loc.png b/openlayers/examples/img/mobile-loc.png new file mode 100644 index 0000000000..c2d89a74ea Binary files /dev/null and b/openlayers/examples/img/mobile-loc.png differ diff --git a/openlayers/examples/img/mobile-zoombar.png b/openlayers/examples/img/mobile-zoombar.png new file mode 100644 index 0000000000..ff8e0490c7 Binary files /dev/null and b/openlayers/examples/img/mobile-zoombar.png differ diff --git a/openlayers/examples/img/openlayers.png b/openlayers/examples/img/openlayers.png new file mode 100644 index 0000000000..f7800febf0 Binary files /dev/null and b/openlayers/examples/img/openlayers.png differ diff --git a/openlayers/examples/img/popupMatrix.jpg b/openlayers/examples/img/popupMatrix.jpg new file mode 100644 index 0000000000..fb09bc0717 Binary files /dev/null and b/openlayers/examples/img/popupMatrix.jpg differ diff --git a/openlayers/examples/img/small.jpg b/openlayers/examples/img/small.jpg new file mode 100644 index 0000000000..1ba22e6006 Binary files /dev/null and b/openlayers/examples/img/small.jpg differ diff --git a/openlayers/examples/img/thinlong.jpg b/openlayers/examples/img/thinlong.jpg new file mode 100644 index 0000000000..a063ab453d Binary files /dev/null and b/openlayers/examples/img/thinlong.jpg differ diff --git a/openlayers/examples/img/widelong.jpg b/openlayers/examples/img/widelong.jpg new file mode 100644 index 0000000000..7ed1c5e73c Binary files /dev/null and b/openlayers/examples/img/widelong.jpg differ diff --git a/openlayers/examples/img/wideshort.jpg b/openlayers/examples/img/wideshort.jpg new file mode 100644 index 0000000000..9839b82f0f Binary files /dev/null and b/openlayers/examples/img/wideshort.jpg differ diff --git a/openlayers/examples/intersects.html b/openlayers/examples/intersects.html new file mode 100644 index 0000000000..31bdee0f7c --- /dev/null +++ b/openlayers/examples/intersects.html @@ -0,0 +1,193 @@ + + + + + + + Geometry Intersections + + + + + + + + + +
+

OpenLayers Geometry Intersection Example

+
+ intersection, geometry +
+

+ Use of geometry.intersects method for testing geometry intersections. +

+
+
+ + + +
+
+
+

Features

+
+ +

Intersections

+
+ +
+ + diff --git a/openlayers/examples/kamap.html b/openlayers/examples/kamap.html new file mode 100644 index 0000000000..9219375271 --- /dev/null +++ b/openlayers/examples/kamap.html @@ -0,0 +1,45 @@ + + + + + + + OpenLayers KaMap Example + + + + + + +

KaMap Example

+ +
+ KaMap +
+ +

+ Demonstrate a tiled kamap layer as the base map, which can be pre-cached for higher performance. +

+ +
+ +
+ + diff --git a/openlayers/examples/kamap.txt b/openlayers/examples/kamap.txt new file mode 100644 index 0000000000..50fa4e0d35 --- /dev/null +++ b/openlayers/examples/kamap.txt @@ -0,0 +1,508 @@ +value pair. + * + * The key is the name to be used by the tile caching system to store cached + * tiles within the base cache directory. This key should be a single word + * that uniquely identifies the map. + * + * The value associated with each key is an array of three values. The first + * value is a human-readable name to be presented to the user (should the + * application choose to do so) and the second value is the path to the map + * file. It is assumed that the map file is fully configured for use with + * MapServer/MapScript as no error checking or setting of values is done. The + * third value is an array of scale values for zooming. + */ + +$aszMapFiles = array( + "world" => array( "World", "/path/to/your/mapfile", + array( 10000 ), # in openlayers, the scale array doesn't matter. + "PNG24") + +/* Add more elements to this array to offer multiple mapfiles */ + +); + +/****************************************************************************** + * figure out which map file to use and set up the necessary variables for + * the rest of the code to use. This does need to be done on every page load + * unfortunately. + * + * szMap should be set to the default map file to use but can change if + * this script is called with map=. + */ +$szMap = 'world'; + +/****************************************************************************** + * kaMap! caching + * + * this is the directory within which kaMap! will create its tile cache. The + * directory does NOT have to be web-accessible, but it must be writable by the + * web-server-user and allow creation of both directories AND files. + * + * the tile caching system will create a separate subdirectory within the base + * cache directory for each map file. Within the cache directory for each map + * file, directories will be created for each group of layers. Within the group + * directories, directories will be created at each of the configured scales + * for the application (see mapfile configuration above.) + */ +$szBaseCacheDir = "/var/cache/kamap/"; + +/***** END OF CONFIGURABLE STUFF - unless you know what you are doing *****/ +/***** *****/ +/***** *****/ +/***** *****/ +/***** END OF CONFIGURABLE STUFF - unless you know what you are doing *****/ + +if (isset($_REQUEST['map']) && isset($aszMapFiles[$_REQUEST['map']])) +{ + $szMap = $_REQUEST['map']; +} + +$szMapCacheDir = $szBaseCacheDir.$szMap."/"; +$szMapName = $aszMapFiles[$szMap][0]; +$szMapFile = $aszMapFiles[$szMap][1]; +$anScales = $aszMapFiles[$szMap][2]; +setOutputFormat($aszMapFiles[$szMap][3]); +/****************************************************************************** + * output format of the map and resulting tiles + * + * The output format used with MapServer can greatly affect appearance and + * performance. It is recommended to use an 8 bit format such as PNG + * + * NOTE: the tile caching code in tile.php is not configurable here. It + * currently assumes that it is outputting 8bit PNG files. If you change to + * PNG24 here then you will need to update tile.php to use the gd function + * imagecreatetruecolor. If you change the output format to jpeg then + * you would need to change imagepng() to imagejpeg(). A nice enhancement + * would be to make that fully configurable from here. + */ +function setOutputFormat($szFormat) +{ + switch($szFormat) { + case "PNG24": + $GLOBALS['szMapImageFormat'] = 'PNG24'; //mapscript format name + $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; // appropriate GD function + $GLOBALS['szImageExtension'] = '.png'; //file extension + $GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor"; //or imagecreatetruecolor if PNG24 ... + $GLOBALS['szImageOutputFunction'] = "imagepng"; //or imagegif, imagejpeg ... + $GLOBALS['szImageHeader'] = 'image/png'; //the content-type of the image + break; + case "GIF": + $GLOBALS['szMapImageFormat'] = 'GIF'; //mapscript format name + $GLOBALS['szMapImageCreateFunction'] = "imagecreatefromgif"; // appropriate GD function + $GLOBALS['szImageExtension'] = '.gif'; //file extension + $GLOBALS['szImageCreateFunction'] = "imagecreate"; //or imagecreatetruecolor if PNG24 ... + $GLOBALS['szImageOutputFunction'] = "imagegif"; //or imagegif, imagejpeg ... + $GLOBALS['szImageHeader'] = 'image/gif'; //the content-type of the image + break; + case "JPEG": + $GLOBALS['szMapImageFormat'] = 'JPEG'; //mapscript format name + $GLOBALS['szMapImageCreateFunction'] = "imagecreatefromjpeg"; // appropriate GD function + $GLOBALS['szImageExtension'] = '.jpg'; //file extension + $GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor"; //or imagecreatetruecolor if PNG24 ... + $GLOBALS['szImageOutputFunction'] = "imagejpeg"; //or imagegif, imagejpeg ... + $GLOBALS['szImageHeader'] = 'image/jpeg'; //the content-type of the image + break; + case "PNG": + $GLOBALS['szMapImageFormat'] = 'PNG'; //mapscript format name + $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; // appropriate GD function + $GLOBALS['szImageExtension'] = '.png'; //file extension + $GLOBALS['szImageCreateFunction'] = "imagecreate"; //or imagecreatetruecolor if PNG24 ... + $GLOBALS['szImageOutputFunction'] = "imagepng"; //or imagegif, imagejpeg ... + $GLOBALS['szImageHeader'] = 'image/png'; //the content-type of the image + break; + case "DITHERED": + case "PNG8": + $GLOBALS['szMapImageFormat'] = 'dithered'; + $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; + $GLOBALS['szImageExtension'] = '.png'; + $GLOBALS['szImageCreateFunction'] = "imagecreate"; + $GLOBALS['szImageOutputFunction'] = "imagepng"; + $GLOBALS['szImageHeader'] = 'image/png'; + break; + } +} + +/** + * create all directories in a directory tree - found on the php web site + * under the mkdir function ... + */ +function makeDirs($strPath, $mode = 0775) +{ + return is_dir($strPath) or ( makeDirs(dirname($strPath), $mode) and mkdir($strPath, $mode) ); +} + +/** + * This function replaces all special characters in the given string. + * + * @param szString string - The string to convert. + * + * @return string converted + */ +function normalizeString($szString) +{ + // Normalize string by replacing all special characters + // e.g. "http://my.host.com/cgi-bin/mywms?" + // becomes "http___my_host_com_cgi_bin_mywms_" + return preg_replace("/(\W)/", "_", $szString); +} + +/* bug 1253 - root permissions required to delete cached files */ +$orig_umask = umask(0); + +/* create the main cache directory if necessary */ +if (!@is_dir($szMapCacheDir)) + makeDirs($szMapCacheDir); + +/* get the various request parameters + * also need to make sure inputs are clean, especially those used to + * build paths and filenames + */ + /* + * the tile renderer accepts several parameters and returns a tile image from + * the cache, creating the tile only if necessary. + * + * all requests include the pixel location of the request at a certain scale + * and this script figures out the geographic location of the tile from the + * scale assuming that 0,0 in pixels is 0,0 in geographic units + * + * Request parameters are: + * + * map: the name of the map to use. This is handled by config.php. + * + * t: top pixel position + * l: left pixel position + * s: scale + * g: (optional) comma-delimited list of group names to draw + * layers: (optional) comma-delimited list of layers to draw + * force: optional. If set, force redraw of the meta tile. This was added to + * help with invalid images sometimes being generated. + * tileid: (optional) can be used instead of t+l to specify the tile coord., + * useful in regenerating the cache + */ + +$top = isset( $_REQUEST['t'] ) ? intval($_REQUEST['t']) : 0; +$left = isset( $_REQUEST['l'] ) ? intval($_REQUEST['l']) : 0; +$scale = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : $anScales[0]; +$bForce = isset($_REQUEST['force'])? true : false; +$groups = isset( $_REQUEST['g'] ) ? $_REQUEST['g'] : ""; +$layers = isset( $_REQUEST['layers'] ) ? $_REQUEST['layers'] : ""; + +// dynamic imageformat ---------------------------------------------- +//use the function in config.php to set the output format +if (isset($_REQUEST['i'])) + setOutputFormat( $_REQUEST['i'] ); +//---------------------------------------------------------------- + +/* tileid=t#####l#### can be used instead of t+l parameters. Useful in + * regenerating the cache for instance. + */ +if (isset( $_REQUEST['tileid']) && + preg_match("/t(-?\d+)l(-?\d+)/", $_REQUEST['tileid'], $aMatch) ) +{ + $top = intval($aMatch[1]); + $left = intval($aMatch[2]); +} + +/* Calculate the metatile's top-left corner coordinates. + * Include the $metaBuffer around the metatile to account for various + * rendering issues happening around the edge of a map + */ +$metaLeft = floor( ($left)/($tileWidth*$metaWidth) ) * $tileWidth * $metaWidth; +$metaTop = floor( ($top)/($tileHeight*$metaHeight) ) * $tileHeight *$metaHeight; +$szMetaTileId = "t".$metaTop."l".$metaLeft; +$metaLeft -= $metaBuffer; +$metaTop -= $metaBuffer; + +/* caching is done by scale value, then groups and layers and finally metatile + * and tile id. Create a new directory if necessary + */ +$szGroupDir = $groups != "" ? normalizeString($groups) : "def"; +$szLayerDir = $layers != "" ? normalizeString($layers) : "def"; + +$szCacheDir = $szMapCacheDir."/".$scale."/".$szGroupDir."/".$szLayerDir."/".$szMetaTileId; +if (!@is_dir($szCacheDir)) + makeDirs($szCacheDir); + +/* resolve cache hit - clear the os stat cache if necessary */ +$szTileId = "t".$top."l".$left; +$szCacheFile = $szCacheDir."/".$szTileId.$szImageExtension; +clearstatcache(); + +$szMetaDir = $szCacheDir."/meta"; +if (!@is_Dir($szMetaDir)) + makeDirs($szMetaDir); + +/* simple locking in case there are several requests for the same meta + tile at the same time - only draw it once to help with performance */ +$szLockFile = $szMetaDir."/lock_".$metaTop."_".$metaLeft; +$fpLockFile = fopen($szLockFile, "a+"); +clearstatcache(); +if (!file_exists($szCacheFile) || $bForce) +{ + flock($fpLockFile, LOCK_EX); + fwrite($fpLockFile, "."); + + //check once more to see if the cache file was created while waiting for + //the lock + clearstatcache(); + if (!file_exists($szCacheFile) || $bForce) + { + if (!extension_loaded('MapScript')) + { + dl( $szPHPMapScriptModule ); + } + if (!extension_loaded('gd')) + { + dl( $szPHPGDModule); + } + + if (!@is_Dir($szMetaDir)) + makeDirs($szMetaDir); + + $oMap = ms_newMapObj($szMapFile); + + /* Metatile width/height include 2x the metaBuffer value */ + $oMap->set('width', $tileWidth * $metaWidth + 2*$metaBuffer); + $oMap->set('height', $tileHeight * $metaHeight + 2*$metaBuffer); + + /* Tell MapServer to not render labels inside the metaBuffer area + * (new in 4.6) + * TODO: Until MapServer bugs 1353/1355 are resolved, we need to + * pass a negative value for "labelcache_map_edge_buffer" + */ + $oMap->setMetadata("labelcache_map_edge_buffer", -$metaBuffer); + + $inchesPerUnit = array(1, 12, 63360.0, 39.3701, 39370.1, 4374754); + $geoWidth = $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]); + $geoHeight = $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]); + + /* draw the metatile */ + $minx = $metaLeft * $geoWidth; + $maxx = $minx + $geoWidth * $oMap->width; + $maxy = -1 * $metaTop * $geoHeight; + $miny = $maxy - $geoHeight * $oMap->height; + + $nLayers = $oMap->numlayers; + $oMap->setExtent($minx,$miny,$maxx,$maxy); + $oMap->selectOutputFormat( $szMapImageFormat ); + $aszLayers = array(); + if ($groups || $layers) + { + /* Draw only specified layers instead of default from mapfile*/ + if ($layers) + { + $aszLayers = explode(",", $layers); + } + + if ($groups) + { + $aszGroups = explode(",", $groups); + } + + for($i=0;$i<$nLayers;$i++) + { + $oLayer = $oMap->getLayer($i); + if (($aszGroups && in_array($oLayer->group,$aszGroups)) || + ($aszLayers && in_array($oLayer->name,$aszLayers)) || + ($aszGroups && $oLayer->group == '' && + in_array( "__base__", $aszGroups))) + { + $oLayer->set("status", MS_ON ); + } + else + { + $oLayer->set("status", MS_OFF ); + } + } + //need transparency if groups or layers are used + $oMap->outputformat->set("transparent", MS_ON ); + } + else + { + $oMap->outputformat->set("transparent", MS_OFF ); + } + + + $szMetaImg = $szMetaDir."/t".$metaTop."l".$metaLeft.$szImageExtension; + $oImg = $oMap->draw(); + $oImg->saveImage($szMetaImg); + $oImg->free(); + eval("\$oGDImg = ".$szMapImageCreateFunction."('".$szMetaImg."');"); + if ($bDebug) + { + $blue = imagecolorallocate($oGDImg, 0, 0, 255); + imagerectangle($oGDImg, 0, 0, $tileWidth * $metaWidth - 1, $tileHeight * $metaHeight - 1, $blue ); + } + for($i=0;$i<$metaWidth;$i++) + { + for ($j=0;$j<$metaHeight;$j++) + { + eval("\$oTile = ".$szImageCreateFunction."( ".$tileWidth.",".$tileHeight." );"); + // Allocate BG color for the tile (in case the metatile has transparent BG) + $nTransparent = imagecolorallocate($oTile, $oMap->imagecolor->red, $oMap->imagecolor->green, $oMap->imagecolor->blue); + //if ($oMap->outputformat->transparent == MS_ON) + //{ + imagecolortransparent( $oTile,$nTransparent); + //} + $tileTop = $j*$tileHeight + $metaBuffer; + $tileLeft = $i*$tileWidth + $metaBuffer; + imagecopy( $oTile, $oGDImg, 0, 0, $tileLeft, $tileTop, $tileWidth, $tileHeight ); + /* debugging stuff */ + if ($bDebug) + { + $black = imagecolorallocate($oTile, 1, 1, 1); + $green = imagecolorallocate($oTile, 0, 128, 0 ); + $red = imagecolorallocate($oTile, 255, 0, 0); + imagerectangle( $oTile, 1, 1, $tileWidth-2, $tileHeight-2, $green ); + imageline( $oTile, 0, $tileHeight/2, $tileWidth-1, $tileHeight/2, $red); + imageline( $oTile, $tileWidth/2, 0, $tileWidth/2, $tileHeight-1, $red); + imagestring ( $oTile, 3, 10, 10, ($metaLeft+$tileLeft)." x ".($metaTop+$tileTop), $black ); + imagestring ( $oTile, 3, 10, 30, ($minx+$i*$geoWidth)." x ".($maxy - $j*$geoHeight), $black ); + } + $szTileImg = $szCacheDir."/t".($metaTop+$tileTop)."l".($metaLeft+$tileLeft).$szImageExtension; + eval("$szImageOutputFunction( \$oTile, '".$szTileImg."' );"); + imagedestroy($oTile); + $oTile = null; + } + } + if ($oGDImg != null) + { + imagedestroy($oGDImg); + $oGDImg = null; + } + if (!$bDebug) + { + unlink( $szMetaImg ); + } + } + //release the exclusive lock + flock($fpLockFile, LOCK_UN ); +} + +//acquire shared lock for reading to prevent a problem that could occur +//if a tile exists but is only partially generated. +flock($fpLockFile, LOCK_SH); + +$h = fopen($szCacheFile, "r"); +header("Content-Type: ".$szImageHeader); +header("Content-Length: " . filesize($szCacheFile)); +header("Expires: " . date( "D, d M Y H:i:s GMT", time() + 31536000 )); +header("Cache-Control: max-age=31536000, must-revalidate" ); +fpassthru($h); +fclose($h); + +//release lock +fclose($fpLockFile); + +/* bug 1253 - root permissions required to delete cached files */ +umask($orig_umask); + +exit; +?> diff --git a/openlayers/examples/kinetic.html b/openlayers/examples/kinetic.html new file mode 100644 index 0000000000..19919ae22e --- /dev/null +++ b/openlayers/examples/kinetic.html @@ -0,0 +1,44 @@ + + + + OpenLayers Kinetic Dragging Example + + + + + + + +

Kinetic Dragging Example

+ +
+ kinetic, dragging +
+ +

+ Demonstrates Kinetic Dragging. +

+ +
+ +
+

+ OpenLayers Kinetic Dragging inspired from Tile5, and + kineticscrolling for Google Maps API V3. +

+ As shown in this example Kinetic Dragging is enabled by setting + enableKinetic to true in the config object provided to the + Control.DragPan constructor. When using + Control.Navigation or Control.TouchNavigation + providing options to the underlying Control.DragPan + instance is done through the dragPanOptions config + property. +

+ View the kinetic.js source + to see how this is done. +

+
+ + + + diff --git a/openlayers/examples/kinetic.js b/openlayers/examples/kinetic.js new file mode 100644 index 0000000000..b61faa2513 --- /dev/null +++ b/openlayers/examples/kinetic.js @@ -0,0 +1,28 @@ +var map = new OpenLayers.Map({ + div: "map", + resolutions: [0.087890625, 0.0439453125, 0.02197265625, 0.010986328125], + panDuration: 100, + controls: [ + new OpenLayers.Control.Navigation( + {dragPanOptions: {enableKinetic: true}} + ) + ] +}); +var layer = new OpenLayers.Layer.TileCache("TileCache Layer", + ["http://c0.tilecache.osgeo.org/wms-c/cache/", + "http://c1.tilecache.osgeo.org/wms-c/cache/", + "http://c2.tilecache.osgeo.org/wms-c/cache/", + "http://c3.tilecache.osgeo.org/wms-c/cache/", + "http://c4.tilecache.osgeo.org/wms-c/cache/"], + "basic", + { + serverResolutions: [0.703125, 0.3515625, 0.17578125, 0.087890625, + 0.0439453125, 0.02197265625, 0.010986328125, + 0.0054931640625, 0.00274658203125, 0.001373291015625, + 0.0006866455078125, 0.00034332275390625, 0.000171661376953125, + 0.0000858306884765625, 0.00004291534423828125, 0.000021457672119140625], + buffer: 4 + } +); +map.addLayer(layer); +map.setCenter(new OpenLayers.LonLat(0, 0), 0); \ No newline at end of file diff --git a/openlayers/examples/kml-layer.html b/openlayers/examples/kml-layer.html new file mode 100644 index 0000000000..5ae07da3ff --- /dev/null +++ b/openlayers/examples/kml-layer.html @@ -0,0 +1,36 @@ + + + + + + + + + + +

KML Layer Example

+ +
KML
+ +

+ Demonstrates loading and displaying a KML file on top of a basemap. +

+ +
+ +
+

+ A vector layer can be populated with features from a KML document + by configuring the layer with an HTTP protocol that points to the + KML document and is configured with a KML format for parsing features. + The fixed strategy is used to load all features at once. +

+

+ View the kml-layer.js + source to see how this is done. +

+
+ + + + diff --git a/openlayers/examples/kml-layer.js b/openlayers/examples/kml-layer.js new file mode 100644 index 0000000000..1b0e85efd3 --- /dev/null +++ b/openlayers/examples/kml-layer.js @@ -0,0 +1,22 @@ +var map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.WMS( + "WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: "basic"} + ), + new OpenLayers.Layer.Vector("KML", { + strategies: [new OpenLayers.Strategy.Fixed()], + protocol: new OpenLayers.Protocol.HTTP({ + url: "kml/lines.kml", + format: new OpenLayers.Format.KML({ + extractStyles: true, + extractAttributes: true, + maxDepth: 2 + }) + }) + }) + ], + center: new OpenLayers.LonLat(-112.169, 36.099), + zoom: 11 +}); diff --git a/openlayers/examples/kml-pointtrack.html b/openlayers/examples/kml-pointtrack.html new file mode 100644 index 0000000000..a3bad5a3d2 --- /dev/null +++ b/openlayers/examples/kml-pointtrack.html @@ -0,0 +1,40 @@ + + + + + + + OpenLayers KML Track in a PointTrack Layer Example + + + + + + + + +

Parsing gx:Track in KML

+

+ Demonstrates populating a PointTrack layer with gx:Track elements from KML. +

+
+
+

+ If a KML document contains <gx:Track> + elements and the extractTracks property is set true on the + parser, features will be created that represent track points. + These track points can easily be visualized as track lines with + a PointTrack layer, preserving the KML's original + styles. +

+

+ View the kml-pointtrack.js + source to see how this is done. +

+
+ + diff --git a/openlayers/examples/kml-pointtrack.js b/openlayers/examples/kml-pointtrack.js new file mode 100644 index 0000000000..47836f25fd --- /dev/null +++ b/openlayers/examples/kml-pointtrack.js @@ -0,0 +1,51 @@ +var map; + +function init() { + + var mercator = new OpenLayers.Projection("EPSG:900913"); + var geographic = new OpenLayers.Projection("EPSG:4326"); + + map = new OpenLayers.Map({ + div: "map", + projection: mercator, + layers: [ + new OpenLayers.Layer.OSM(), + new OpenLayers.Layer.PointTrack("Aircraft Tracks", { + projection: geographic, + strategies: [new OpenLayers.Strategy.Fixed()], + protocol: new OpenLayers.Protocol.HTTP({ + url: "kml-track.kml", + format: new OpenLayers.Format.KML({ + extractTracks: true, + extractStyles: true + }) + }), + dataFrom: OpenLayers.Layer.PointTrack.TARGET_NODE, + styleFrom: OpenLayers.Layer.PointTrack.TARGET_NODE, + eventListeners: { + "beforefeaturesadded": function(e) { + // group the tracks by fid and create one track for + // every fid + var fid, points = [], feature; + for (var i=0, len=e.features.length; i + + + + + + OpenLayers KLM Track Parsing Example + + + + + + + + +

Parsing gx:Track in KML

+

+ Demonstrates parsing of gx:Track elements from KML. +

+
+ KML, parser, parsing, tracks +
+
+
+

+ If a KML document contains <gx:Track> + elements and the extractTracks property is set true on the + parer, features will be created that represent track points. + Each feature will have a when attribute that contains the + value of the relevant <when> element from + the track. +

+

+ View the kml-track.js + source to see how this is done. +

+ + diff --git a/openlayers/examples/kml-track.js b/openlayers/examples/kml-track.js new file mode 100644 index 0000000000..1c6a809c8f --- /dev/null +++ b/openlayers/examples/kml-track.js @@ -0,0 +1,40 @@ +var map; + +function init() { + + var mercator = new OpenLayers.Projection("EPSG:900913"); + var geographic = new OpenLayers.Projection("EPSG:4326"); + + map = new OpenLayers.Map({ + div: "map", + projection: mercator, + layers: [ + new OpenLayers.Layer.OSM(), + new OpenLayers.Layer.Vector("Aircraft Locations", { + projection: geographic, + strategies: [new OpenLayers.Strategy.Fixed()], + protocol: new OpenLayers.Protocol.HTTP({ + url: "kml-track.kml", + format: new OpenLayers.Format.KML({ + extractTracks: true, + trackAttributes: ["speed"] + }) + }), + styleMap: new OpenLayers.StyleMap({ + "default": new OpenLayers.Style({ + graphicName: "circle", + pointRadius: 2, + fillOpacity: 0.5, + fillColor: "#ffcc66", + strokeColor: "#666633", + strokeWidth: 1 + }) + }) + }) + ], + center: new OpenLayers.LonLat(-93.2735, 44.8349).transform(geographic, mercator), + zoom: 8 + }); + +}; + diff --git a/openlayers/examples/kml-track.kml b/openlayers/examples/kml-track.kml new file mode 100644 index 0000000000..2ab90aedfb --- /dev/null +++ b/openlayers/examples/kml-track.kml @@ -0,0 +1,3359 @@ + + + + + + 2010-05-01T13:00:00-05:00 + + -93.2207 + 44.882 + 50000 + 0 + 0 + + + + + + +Flight Tracks + + Arrivals + + B752 + A + DAL2973 + #arrival + + + E170 + A + TCF7521 + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:04-05 + 2010-05-01T13:00:09-05 + 2010-05-01T13:00:13-05 + 2010-05-01T13:00:18-05 + 2010-05-01T13:00:23-05 + 2010-05-01T13:00:27-05 + 2010-05-01T13:00:32-05 + 2010-05-01T13:00:37-05 + 2010-05-01T13:00:41-05 + 2010-05-01T13:00:46-05 + 2010-05-01T13:00:51-05 + 2010-05-01T13:00:55-05 + 2010-05-01T13:01:00-05 + 2010-05-01T13:01:05-05 + 2010-05-01T13:01:09-05 + 2010-05-01T13:01:14-05 + 2010-05-01T13:01:19-05 + 2010-05-01T13:01:23-05 + 2010-05-01T13:01:28-05 + 2010-05-01T13:01:33-05 + 2010-05-01T13:01:37-05 + 2010-05-01T13:01:42-05 + 2010-05-01T13:01:47-05 + 2010-05-01T13:01:51-05 + 2010-05-01T13:01:56-05 + 2010-05-01T13:02:00-05 + 2010-05-01T13:02:05-05 + 2010-05-01T13:02:10-05 + 2010-05-01T13:02:14-05 + 2010-05-01T13:02:19-05 + 2010-05-01T13:02:24-05 + 2010-05-01T13:02:28-05 + 2010-05-01T13:02:33-05 + 2010-05-01T13:02:38-05 + 2010-05-01T13:02:42-05 + 2010-05-01T13:02:47-05 + 2010-05-01T13:02:52-05 + 2010-05-01T13:02:56-05 + 2010-05-01T13:03:01-05 + 2010-05-01T13:03:06-05 + 2010-05-01T13:03:10-05 + 2010-05-01T13:03:15-05 + 2010-05-01T13:03:20-05 + 2010-05-01T13:03:24-05 + 2010-05-01T13:03:29-05 + 2010-05-01T13:03:33-05 + 2010-05-01T13:03:38-05 + 2010-05-01T13:03:43-05 + 2010-05-01T13:03:47-05 + 2010-05-01T13:03:52-05 + 2010-05-01T13:03:57-05 + 2010-05-01T13:04:01-05 + 2010-05-01T13:04:06-05 + 2010-05-01T13:04:11-05 + 2010-05-01T13:04:15-05 + 2010-05-01T13:04:20-05 + 2010-05-01T13:04:24-05 + 2010-05-01T13:04:29-05 + 2010-05-01T13:04:34-05 + 2010-05-01T13:04:38-05 + 2010-05-01T13:04:43-05 + 2010-05-01T13:04:48-05 + 2010-05-01T13:04:52-05 + 2010-05-01T13:04:57-05 + 2010-05-01T13:05:00-05 + -93.3806146339391 44.8823651507134 2743 + -93.3773041814209 44.887531728655 2743 + -93.3742856469083 44.8942041806778 2743 + -93.3722375106026 44.9009231720158 2743 + -93.3711934089417 44.9077495987718 2712 + -93.3707288919852 44.9145219645156 2712 + -93.3703882714439 44.921240089024 2682 + -93.3700882719793 44.9278850664392 2682 + -93.369810041597 44.934389356737 2651 + -93.3696836566166 44.9408553642446 2651 + -93.3695425129226 44.9473561165969 2621 + -93.3693185423471 44.9537360442564 2621 + -93.3693194298816 44.9599975904123 2590 + -93.3694031671108 44.9661411653607 2590 + -93.3693840701674 44.9721433662718 2560 + -93.3692180132117 44.9781295444861 2530 + -93.3691451194519 44.9840448037796 2530 + -93.3691016671806 44.9899713582099 2499 + -93.3689494749454 44.9958413836039 2469 + -93.3687664425911 45.0015898503441 2469 + -93.3686331392066 45.0072067405394 2438 + -93.368599726987 45.0127741072778 2438 + -93.3686335399802 45.0181909829245 2408 + -93.3686494842522 45.0234209328517 2377 + -93.3684675008434 45.0286421277802 2377 + -93.3683004008135 45.0337736830037 2347 + -93.3682154531592 45.0388787100883 2347 + -93.3683732351584 45.0439463933312 2316 + -93.3684142261585 45.0490625635571 2286 + -93.368143196103 45.0541794203461 2286 + -93.367535632513 45.0592327492686 2255 + -93.3659957839062 45.0642802941983 2225 + -93.3633687278349 45.0690971409498 2194 + -93.3595471289752 45.0735562314314 2164 + -93.354507806741 45.0775832626329 2133 + -93.3485772854268 45.0808293296313 2103 + -93.3421088995911 45.0832469498159 2072 + -93.3351951799649 45.0848109253641 2042 + -93.3280418232705 45.0854246893649 2011 + -93.3209037884868 45.085161376704 1981 + -93.3144723535558 45.0839515303103 1920 + -93.3088086501455 45.0819151336509 1859 + -93.3036917357871 45.0792511074707 1828 + -93.2993102013018 45.0761649196153 1798 + -93.2958637974439 45.0728030913231 1768 + -93.2932247031583 45.0693710694135 1737 + -93.2910486937635 45.0659261208859 1707 + -93.2888955993508 45.0625213360315 1646 + -93.2867217490801 45.0591551785287 1615 + -93.2847336413534 45.0557231883841 1554 + -93.28312407167 45.0523278244803 1493 + -93.2820244198825 45.0489932635616 1463 + -93.280973634799 45.045699024227 1432 + -93.2799787649067 45.0423671615142 1402 + -93.2791066054659 45.0390946347227 1341 + -93.2784127726862 45.0358634874951 1310 + -93.2779112647802 45.0326008999249 1249 + -93.2774525889269 45.029330264578 1219 + -93.2770784201422 45.0260213245381 1188 + -93.2766188240203 45.0227403501287 1158 + -93.275816823547 45.0195461585342 1127 + -93.2748914840222 45.0163603671711 1066 + -93.2740540575136 45.0131542183389 1036 + -93.2733145981662 45.010040506328 1006 + -93.2724700860766 45.0070495365802 975 + -93.2720166974715 45.0052389419128 957 + 20 0 0 + 20 0 0 + 20 0 0 + 10 0 0 + 10 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 10 0 0 + 20 0 0 + 30 0 0 + 40 0 0 + 50 0 0 + 60 0 0 + 70 0 0 + 80 0 0 + 90 0 0 + 100 0 0 + 110 0 0 + 120 0 0 + 130 0 0 + 140 0 0 + 150 0 0 + 150 0 0 + 150 0 0 + 160 0 0 + 160 0 0 + 160 0 0 + 160 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 376 + 367 + 361 + 371 + 367 + 363 + 359 + 356 + 352 + 347 + 343 + 339 + 334 + 329 + 326 + 321 + 318 + 315 + 311 + 307 + 301 + 294 + 289 + 295 + 280 + 277 + 287 + 275 + 275 + 276 + 277 + 279 + 281 + 282 + 282 + 281 + 280 + 274 + 266 + 260 + 254 + 244 + 235 + 235 + 219 + 212 + 214 + 201 + 197 + 193 + 190 + 187 + 183 + 180 + 186 + 178 + 177 + 183 + 177 + 176 + 175 + 173 + 171 + 165 + 166 + 167 + + + BE33 + A + N38175 + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:02-05 + 2010-05-01T13:00:07-05 + 2010-05-01T13:00:12-05 + 2010-05-01T13:00:16-05 + 2010-05-01T13:00:21-05 + 2010-05-01T13:00:25-05 + 2010-05-01T13:00:30-05 + 2010-05-01T13:00:35-05 + 2010-05-01T13:00:39-05 + 2010-05-01T13:00:44-05 + 2010-05-01T13:00:49-05 + 2010-05-01T13:00:53-05 + 2010-05-01T13:00:58-05 + 2010-05-01T13:01:03-05 + 2010-05-01T13:01:07-05 + 2010-05-01T13:01:12-05 + 2010-05-01T13:01:16-05 + 2010-05-01T13:01:21-05 + 2010-05-01T13:01:26-05 + 2010-05-01T13:01:30-05 + 2010-05-01T13:01:35-05 + 2010-05-01T13:01:40-05 + 2010-05-01T13:01:44-05 + 2010-05-01T13:01:49-05 + 2010-05-01T13:01:54-05 + 2010-05-01T13:01:58-05 + 2010-05-01T13:02:03-05 + 2010-05-01T13:02:08-05 + 2010-05-01T13:02:12-05 + 2010-05-01T13:02:17-05 + 2010-05-01T13:02:21-05 + 2010-05-01T13:02:26-05 + 2010-05-01T13:02:31-05 + 2010-05-01T13:02:35-05 + 2010-05-01T13:02:40-05 + 2010-05-01T13:02:45-05 + 2010-05-01T13:02:49-05 + 2010-05-01T13:02:54-05 + 2010-05-01T13:02:59-05 + 2010-05-01T13:03:03-05 + 2010-05-01T13:03:08-05 + 2010-05-01T13:03:13-05 + 2010-05-01T13:03:17-05 + 2010-05-01T13:03:22-05 + 2010-05-01T13:03:27-05 + 2010-05-01T13:03:31-05 + 2010-05-01T13:03:36-05 + 2010-05-01T13:03:40-05 + 2010-05-01T13:03:45-05 + 2010-05-01T13:03:50-05 + 2010-05-01T13:03:54-05 + 2010-05-01T13:03:59-05 + 2010-05-01T13:04:04-05 + 2010-05-01T13:04:08-05 + 2010-05-01T13:04:13-05 + 2010-05-01T13:04:18-05 + 2010-05-01T13:04:22-05 + 2010-05-01T13:04:27-05 + 2010-05-01T13:04:32-05 + 2010-05-01T13:04:36-05 + 2010-05-01T13:04:41-05 + 2010-05-01T13:04:46-05 + 2010-05-01T13:04:50-05 + 2010-05-01T13:04:55-05 + 2010-05-01T13:04:59-05 + 2010-05-01T13:05:00-05 + -93.0144637208028 44.6541474764804 1006 + -93.0162681345228 44.6547274296664 1006 + -93.0196734868835 44.6559915702004 975 + -93.0231899415297 44.657188463998 945 + -93.0267619421777 44.6582849847887 945 + -93.0302021384369 44.6594728216183 914 + -93.0338776768471 44.6606515995762 914 + -93.0375866343814 44.6618806707998 884 + -93.0411146687035 44.6632657982455 884 + -93.0447829038862 44.6646495821585 884 + -93.0486933143218 44.6659856209571 914 + -93.0525604964428 44.6672664774449 884 + -93.0559892061682 44.6686325276705 884 + -93.0595122787868 44.6700360197293 884 + -93.0633002358996 44.6714677760105 884 + -93.0669378047758 44.6729112967405 884 + -93.0703945562928 44.6742924439153 884 + -93.0739155391788 44.675662416586 853 + -93.0775155708379 44.677089176175 853 + -93.0809933799389 44.6786451836444 884 + -93.0844890660754 44.6803751966183 884 + -93.0880299182291 44.6822044360867 884 + -93.0915094168569 44.6840756286875 884 + -93.0948937737562 44.6859682015167 853 + -93.0981262632978 44.6879373605934 853 + -93.101454986707 44.6899364101225 792 + -93.1050116792292 44.6917700662615 823 + -93.1086488406447 44.6935571270851 792 + -93.1123714592033 44.6950844029867 792 + -93.1160669441025 44.6961547755501 792 + -93.1198701422529 44.6969844340505 823 + -93.1236851662824 44.6978291490322 823 + -93.1274225659796 44.6986718065416 823 + -93.1311942704264 44.6993984412966 853 + -93.1349381107515 44.6999999769729 823 + -93.1389399866831 44.7004676966664 823 + -93.1429353283304 44.7008467726719 792 + -93.1467319575358 44.7012413854652 792 + -93.1499628617348 44.701745671311 256 + -93.153336892791 44.7021601177798 823 + -93.1573155649233 44.7025431241565 823 + -93.1612285414011 44.7030631821633 853 + -93.1650893906409 44.7036343060226 823 + -93.168735434804 44.7041440584898 823 + -93.1724202011042 44.7046128372079 823 + -93.1761398862948 44.7051091435166 792 + -93.1796630936383 44.7055777394683 792 + -93.1832380178971 44.7060406072565 823 + -93.1866638342882 44.7066093849988 823 + -93.1899087146892 44.7071801343989 823 + -93.193359587537 44.7076743817907 823 + -93.1967000778824 44.7081822996347 823 + -93.1999669003743 44.7087817760063 823 + -93.2034706963438 44.7093224014614 823 + -93.2071875434321 44.7097715459537 823 + -93.2107765241539 44.7103153755538 823 + -93.2143295791529 44.7108254548145 823 + -93.2178486234666 44.7112392078782 792 + -93.2211867867256 44.7116696952986 823 + -93.2243580018062 44.7121483598855 823 + -93.2273334445383 44.712639974576 823 + -93.230487243959 44.7131510651587 823 + -93.233844667064 44.7137558527546 823 + -93.2369967848442 44.714497155781 823 + -93.2401184808953 44.7154113173173 823 + -93.2431805770012 44.7167484248595 792 + -93.2437334091088 44.7170975413723 792 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 290 0 0 + 290 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 300 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 300 0 0 + 300 0 0 + 290 0 0 + 290 0 0 + 290 0 0 + 290 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 290 0 0 + 290 0 0 + 300 0 0 + 300 0 0 + 310 0 0 + 150 + 156 + 152 + 156 + 151 + 152 + 160 + 157 + 159 + 158 + 158 + 160 + 160 + 158 + 162 + 157 + 158 + 164 + 159 + 161 + 163 + 164 + 166 + 167 + 167 + 166 + 164 + 163 + 166 + 157 + 154 + 157 + 152 + 152 + 151 + 147 + 144 + 146 + 145 + 145 + 144 + 146 + 148 + 145 + 143 + 146 + 138 + 137 + 140 + 133 + 133 + 135 + 137 + 137 + 138 + 138 + 136 + 131 + 129 + 128 + 126 + 126 + 133 + 132 + 136 + 139 + 136 + + + A319 + A + DAL1588 + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:04-05 + 2010-05-01T13:00:08-05 + 2010-05-01T13:00:13-05 + 2010-05-01T13:00:18-05 + 2010-05-01T13:00:22-05 + 2010-05-01T13:00:27-05 + 2010-05-01T13:00:31-05 + 2010-05-01T13:00:36-05 + 2010-05-01T13:00:41-05 + 2010-05-01T13:00:45-05 + 2010-05-01T13:00:50-05 + 2010-05-01T13:00:55-05 + 2010-05-01T13:00:59-05 + 2010-05-01T13:01:04-05 + 2010-05-01T13:01:09-05 + 2010-05-01T13:01:13-05 + 2010-05-01T13:01:18-05 + 2010-05-01T13:01:22-05 + 2010-05-01T13:01:27-05 + 2010-05-01T13:01:32-05 + 2010-05-01T13:01:36-05 + 2010-05-01T13:01:41-05 + 2010-05-01T13:01:46-05 + 2010-05-01T13:01:50-05 + 2010-05-01T13:01:55-05 + 2010-05-01T13:02:00-05 + 2010-05-01T13:02:04-05 + 2010-05-01T13:02:09-05 + 2010-05-01T13:02:13-05 + 2010-05-01T13:02:18-05 + 2010-05-01T13:02:23-05 + 2010-05-01T13:02:27-05 + 2010-05-01T13:02:32-05 + 2010-05-01T13:02:37-05 + 2010-05-01T13:02:41-05 + 2010-05-01T13:02:46-05 + 2010-05-01T13:02:51-05 + 2010-05-01T13:02:55-05 + 2010-05-01T13:03:00-05 + 2010-05-01T13:03:05-05 + 2010-05-01T13:03:09-05 + 2010-05-01T13:03:14-05 + 2010-05-01T13:03:19-05 + 2010-05-01T13:03:23-05 + 2010-05-01T13:03:28-05 + 2010-05-01T13:03:33-05 + 2010-05-01T13:03:37-05 + 2010-05-01T13:03:42-05 + 2010-05-01T13:03:47-05 + 2010-05-01T13:03:51-05 + 2010-05-01T13:03:56-05 + 2010-05-01T13:04:01-05 + 2010-05-01T13:04:05-05 + 2010-05-01T13:04:10-05 + 2010-05-01T13:04:15-05 + 2010-05-01T13:04:19-05 + 2010-05-01T13:04:24-05 + 2010-05-01T13:04:29-05 + 2010-05-01T13:04:33-05 + 2010-05-01T13:04:38-05 + 2010-05-01T13:04:42-05 + 2010-05-01T13:04:47-05 + 2010-05-01T13:04:52-05 + 2010-05-01T13:04:56-05 + 2010-05-01T13:05:00-05 + -93.6927825194056 44.7952011849485 3011 + -93.6850156681578 44.7968042586582 2987 + -93.6752785488692 44.7990458605003 2956 + -93.6657083011645 44.8014897663497 2926 + -93.6560029615388 44.803768841381 2865 + -93.6462045264035 44.8058749817725 2834 + -93.6365671200126 44.8080848199989 2804 + -93.6269933807039 44.8102767000109 2773 + -93.6175405757462 44.8123960709083 2743 + -93.6082528975965 44.8146455509748 2743 + -93.599077315807 44.816765612372 2743 + -93.5899428762254 44.8186933623744 2743 + -93.5809104439923 44.8205403457841 2743 + -93.5720785209701 44.8224608846058 2743 + -93.5634871751281 44.8245259755976 2743 + -93.5549873819943 44.8264288380043 2743 + -93.5465301417765 44.828146963076 2743 + -93.5382602633868 44.8299225976982 2743 + -93.5299909540853 44.8317218299661 2743 + -93.5217290971281 44.8335486849228 2743 + -93.5135254319341 44.8354478299135 2743 + -93.5052463800971 44.8374557781543 2743 + -93.4970241378696 44.8393862625467 2743 + -93.4888916549316 44.8410628089589 2743 + -93.48064759949 44.8427813728647 2743 + -93.4722750572418 44.8445241451071 2712 + -93.4639262889443 44.8463688032483 2743 + -93.4556378890352 44.8482208160082 2743 + -93.447407568623 44.8500947691895 2743 + -93.4393642055014 44.8523517774191 2743 + -93.4316071047585 44.8551246076581 2743 + -93.4244028068218 44.8584705613027 2743 + -93.4178621631751 44.8625068369064 2743 + -93.412146307774 44.867174139387 2743 + -93.4075995385136 44.8722931076546 2743 + -93.4039820359465 44.8777375352403 2743 + -93.4016072978871 44.8833117162528 2743 + -93.4005924913122 44.8890542850171 2743 + -93.4005563275156 44.8948199828389 2712 + -93.401452844832 44.9002595243996 2682 + -93.4032713926758 44.905357711587 2651 + -93.4058979070097 44.9101654056189 2621 + -93.4092802306306 44.9145600538157 2590 + -93.4134192058116 44.9185233235535 2530 + -93.4181155067703 44.9222086893794 2499 + -93.4230280156053 44.9256003980833 2469 + -93.4278299295206 44.9290448932076 2469 + -93.4322535173586 44.9329315139411 2438 + -93.4361102418566 44.9372336672133 2438 + -93.4389664177141 44.9421107629499 2438 + -93.4407103051748 44.9473646343685 2438 + -93.4416032158439 44.9527430754122 2408 + -93.4419308994101 44.9581538029148 2408 + -93.4419313717103 44.9636029026039 2377 + -93.4417378352424 44.9690628839115 2347 + -93.4415990458805 44.9744028948354 2347 + -93.4414478519305 44.9796663959001 2316 + -93.4413557290344 44.9848518867987 2316 + -93.4412896011133 44.9899566690879 2316 + -93.4411625354696 44.9949926823698 2286 + -93.4411216122071 45.000018474264 2225 + -93.4409537301264 45.0051267594771 2194 + -93.4408143120176 45.0101358999996 2133 + -93.4405516208864 45.0150761969136 2103 + -93.4397025278204 45.0199965135021 2042 + -93.4384243921567 45.02391596133 1993.2 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 70 0 0 + 60 0 0 + 50 0 0 + 50 0 0 + 40 0 0 + 30 0 0 + 20 0 0 + 10 0 0 + 0 0 0 + 360 0 0 + 350 0 0 + 340 0 0 + 340 0 0 + 330 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 330 0 0 + 330 0 0 + 340 0 0 + 350 0 0 + 350 0 0 + 360 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 10 0 0 + 10 0 0 + 10 0 0 + 390 + 383 + 397 + 390 + 405 + 388 + 386 + 397 + 377 + 373 + 367 + 362 + 357 + 350 + 345 + 353 + 336 + 334 + 346 + 332 + 331 + 330 + 331 + 332 + 331 + 331 + 345 + 333 + 332 + 344 + 331 + 331 + 329 + 326 + 324 + 320 + 314 + 307 + 298 + 291 + 284 + 276 + 271 + 268 + 266 + 267 + 270 + 274 + 279 + 283 + 288 + 291 + 292 + 290 + 288 + 286 + 281 + 278 + 286 + 273 + 271 + 280 + 270 + 274 + 263 + 268 + + + E145 + A + CHQ1453 + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:01-05 + 2010-05-01T13:00:06-05 + 2010-05-01T13:00:11-05 + 2010-05-01T13:00:15-05 + 2010-05-01T13:00:20-05 + 2010-05-01T13:00:24-05 + 2010-05-01T13:00:29-05 + 2010-05-01T13:00:34-05 + 2010-05-01T13:00:38-05 + 2010-05-01T13:00:43-05 + 2010-05-01T13:00:48-05 + 2010-05-01T13:00:52-05 + 2010-05-01T13:00:57-05 + 2010-05-01T13:01:02-05 + 2010-05-01T13:01:06-05 + 2010-05-01T13:01:11-05 + 2010-05-01T13:01:15-05 + 2010-05-01T13:01:20-05 + 2010-05-01T13:01:25-05 + 2010-05-01T13:01:29-05 + 2010-05-01T13:01:34-05 + 2010-05-01T13:01:39-05 + 2010-05-01T13:01:43-05 + 2010-05-01T13:01:48-05 + 2010-05-01T13:01:52-05 + 2010-05-01T13:01:57-05 + 2010-05-01T13:02:02-05 + 2010-05-01T13:02:06-05 + 2010-05-01T13:02:11-05 + 2010-05-01T13:02:16-05 + 2010-05-01T13:02:20-05 + 2010-05-01T13:02:25-05 + 2010-05-01T13:02:29-05 + 2010-05-01T13:02:34-05 + 2010-05-01T13:02:39-05 + 2010-05-01T13:02:43-05 + 2010-05-01T13:02:48-05 + 2010-05-01T13:02:53-05 + 2010-05-01T13:02:57-05 + 2010-05-01T13:03:02-05 + 2010-05-01T13:03:07-05 + 2010-05-01T13:03:11-05 + 2010-05-01T13:03:16-05 + 2010-05-01T13:03:21-05 + 2010-05-01T13:03:25-05 + 2010-05-01T13:03:30-05 + 2010-05-01T13:03:34-05 + 2010-05-01T13:03:39-05 + 2010-05-01T13:03:44-05 + 2010-05-01T13:03:48-05 + 2010-05-01T13:03:53-05 + 2010-05-01T13:03:58-05 + 2010-05-01T13:04:02-05 + 2010-05-01T13:04:07-05 + 2010-05-01T13:04:11-05 + 2010-05-01T13:04:16-05 + 2010-05-01T13:04:21-05 + 2010-05-01T13:04:25-05 + 2010-05-01T13:04:30-05 + 2010-05-01T13:04:35-05 + 2010-05-01T13:04:39-05 + 2010-05-01T13:04:44-05 + 2010-05-01T13:04:49-05 + 2010-05-01T13:04:53-05 + 2010-05-01T13:04:58-05 + 2010-05-01T13:05:00-05 + -92.5727580977974 45.0236058844647 2530 + -92.5742776202954 45.0237913896498 2530 + -92.5803397933112 45.0241784662561 2499 + -92.5865075192046 45.0247891381303 2469 + -92.5926877928765 45.0257073410966 2469 + -92.5986546763805 45.0261844476041 2438 + -92.6046737535477 45.0267206733977 2438 + -92.6106885874739 45.0275061986719 2438 + -92.616359210337 45.027935793162 2438 + -92.6220735719954 45.028379077688 2438 + -92.6280403097635 45.0290552550566 2438 + -92.6341725652711 45.029824064212 2438 + -92.640279209769 45.0304963952702 2438 + -92.6463747377703 45.0311129317319 2438 + -92.6524891739589 45.0317396965059 2438 + -92.6587083612282 45.0325526597288 2438 + -92.6649573988971 45.0334560566121 2438 + -92.6712436344147 45.0343516389227 2438 + -92.6777900587447 45.0353199754833 2438 + -92.6842020644974 45.0361081217423 2438 + -92.6904510353584 45.0368379981793 2438 + -92.6968618406938 45.0376828531019 2438 + -92.7033318031208 45.0383078021685 2438 + -92.709766951172 45.0386241893014 2438 + -92.7161769864286 45.0390317903939 2438 + -92.7225665589756 45.0396570251316 2408 + -92.7288886541216 45.0403373286575 2438 + -92.7352120601109 45.0409943934305 2438 + -92.7414745561156 45.0416276553236 2438 + -92.7477923122779 45.0424046535325 2438 + -92.7541218465412 45.0434006217761 2438 + -92.7601214481636 45.0440713086474 2438 + -92.7660333478225 45.0444426749968 2438 + -92.772102853148 45.0448779180664 2438 + -92.7780236703859 45.0449122731228 2408 + -92.7839974197715 45.0449532357526 2408 + -92.7902562936361 45.0450709796934 2377 + -92.7962688995386 45.0448540267375 2347 + -92.8024120242439 45.0448640459334 2316 + -92.8087530574681 45.0449050506622 2316 + -92.814709697375 45.0446514037676 2286 + -92.8205575663732 45.0444101119805 2255 + -92.8266048584444 45.0442428819735 2225 + -92.8327618067112 45.0440942522516 2194 + -92.83872651911 45.0438644076684 2164 + -92.8446994303267 45.043730942658 2133 + -92.8506627055935 45.0435520713609 2103 + -92.8563938230908 45.0431897062426 2072 + -92.8622525737075 45.0428768437665 2042 + -92.8680590561999 45.0424504399663 2011 + -92.8739470985612 45.0422191353343 1981 + -92.879905503922 45.0421676833604 1950 + -92.8859780438424 45.0420919545536 1920 + -92.8920993846605 45.0419574098772 1889 + -92.8980850189767 45.041613347859 1859 + -92.9042733870782 45.041256341571 1828 + -92.9105676382912 45.0409944306292 1798 + -92.9169019856279 45.0406669834687 1768 + -92.9233572619921 45.0402533884047 1737 + -92.9301295670095 45.0401453351324 1707 + -92.9368012064813 45.0400078656145 1676 + -92.943436221178 45.0397167044808 1646 + -92.9503058450392 45.0396542676205 1615 + -92.9570389363135 45.0394266771585 1585 + -92.9637736326563 45.0390859598898 1554 + -92.9705134597343 45.0387846980464 1524 + -92.973755360354 45.0384258824988 1508.5 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 260 0 0 + 260 0 0 + 235 + 246 + 239 + 244 + 234 + 232 + 238 + 227 + 228 + 229 + 229 + 232 + 236 + 238 + 249 + 243 + 245 + 255 + 247 + 248 + 248 + 247 + 256 + 247 + 246 + 254 + 244 + 245 + 242 + 239 + 246 + 235 + 232 + 240 + 231 + 232 + 234 + 234 + 233 + 232 + 233 + 232 + 229 + 229 + 237 + 227 + 225 + 233 + 224 + 225 + 228 + 228 + 240 + 233 + 236 + 248 + 243 + 246 + 250 + 253 + 255 + 257 + 257 + 266 + 261 + 265 + 275 + + + E170 + A + CPZ5695 + #arrival + + absolute + 1 + 2010-05-01T13:00:11-05 + 2010-05-01T13:00:15-05 + 2010-05-01T13:00:20-05 + 2010-05-01T13:00:25-05 + 2010-05-01T13:00:29-05 + 2010-05-01T13:00:34-05 + 2010-05-01T13:00:38-05 + 2010-05-01T13:00:43-05 + 2010-05-01T13:00:48-05 + 2010-05-01T13:00:52-05 + 2010-05-01T13:00:57-05 + 2010-05-01T13:01:02-05 + 2010-05-01T13:01:06-05 + 2010-05-01T13:01:11-05 + 2010-05-01T13:01:16-05 + 2010-05-01T13:01:20-05 + 2010-05-01T13:01:25-05 + 2010-05-01T13:01:29-05 + 2010-05-01T13:01:34-05 + 2010-05-01T13:01:39-05 + 2010-05-01T13:01:43-05 + 2010-05-01T13:01:48-05 + 2010-05-01T13:01:53-05 + 2010-05-01T13:01:57-05 + 2010-05-01T13:02:02-05 + 2010-05-01T13:02:06-05 + 2010-05-01T13:02:11-05 + 2010-05-01T13:02:16-05 + 2010-05-01T13:02:20-05 + 2010-05-01T13:02:25-05 + 2010-05-01T13:02:30-05 + 2010-05-01T13:02:34-05 + 2010-05-01T13:02:39-05 + 2010-05-01T13:02:44-05 + 2010-05-01T13:02:48-05 + 2010-05-01T13:02:53-05 + 2010-05-01T13:02:58-05 + 2010-05-01T13:03:02-05 + 2010-05-01T13:03:07-05 + 2010-05-01T13:03:11-05 + 2010-05-01T13:03:16-05 + 2010-05-01T13:03:21-05 + 2010-05-01T13:03:25-05 + 2010-05-01T13:03:30-05 + 2010-05-01T13:03:35-05 + 2010-05-01T13:03:39-05 + 2010-05-01T13:03:44-05 + 2010-05-01T13:03:48-05 + 2010-05-01T13:03:53-05 + 2010-05-01T13:03:58-05 + 2010-05-01T13:04:02-05 + 2010-05-01T13:04:07-05 + 2010-05-01T13:04:12-05 + 2010-05-01T13:04:16-05 + 2010-05-01T13:04:21-05 + 2010-05-01T13:04:25-05 + 2010-05-01T13:04:30-05 + 2010-05-01T13:04:35-05 + 2010-05-01T13:04:39-05 + 2010-05-01T13:04:44-05 + 2010-05-01T13:04:49-05 + 2010-05-01T13:04:53-05 + 2010-05-01T13:04:58-05 + 2010-05-01T13:05:00-05 + -92.3689380245182 45.0389467469425 2804 + -92.3759530819834 45.0380951007958 2773 + -92.3831159633175 45.0369957486846 2712 + -92.3901362714549 45.0355238496347 2651 + -92.3970814910858 45.0339385808083 2621 + -92.4043121546626 45.032585906621 2560 + -92.4118367565321 45.0319048652958 2499 + -92.419078934653 45.030875157485 2469 + -92.4262095560369 45.0291153314744 2438 + -92.4335237384463 45.0273941113051 2438 + -92.4408178608932 45.0260076351757 2438 + -92.4480506692593 45.0250407396261 2438 + -92.4553504288427 45.0241919539362 2438 + -92.4628196268122 45.0233514202756 2438 + -92.4702544151504 45.0225228770055 2438 + -92.47749082249 45.0211454469826 2438 + -92.4849952170224 45.020108381381 2438 + -92.4924975545976 45.0191930140492 2438 + -92.4998773018653 45.018051767506 2438 + -92.507186344501 45.0168407571941 2438 + -92.5143825240876 45.0156216694574 2438 + -92.5215706342598 45.0143945866018 2438 + -92.5287558465591 45.0131646175633 2408 + -92.535858877656 45.0118804989009 2438 + -92.5428413996463 45.0103972607613 2438 + -92.5499799537839 45.0091469907013 2438 + -92.5571487214372 45.0079107943641 2438 + -92.5643503087637 45.0069312146329 2438 + -92.5715906639656 45.0060256188488 2438 + -92.5787232800865 45.0051593960756 2438 + -92.5859075456731 45.0042853983707 2438 + -92.5932558590921 45.0033774426771 2438 + -92.6008071462461 45.003154553905 2438 + -92.6083537686074 45.0033879703399 2438 + -92.6158581079963 45.0039900406543 2438 + -92.6233760961899 45.0046768119547 2438 + -92.6308149850999 45.0051419435105 2438 + -92.6382172211892 45.0057401438498 2438 + -92.6454696132537 45.005920412465 2438 + -92.6528385211424 45.0061349890872 2438 + -92.6604262143734 45.0071927884136 2438 + -92.6679454156809 45.0082888895876 2438 + -92.6753888547959 45.008928558351 2438 + -92.6828869677601 45.0095857895273 2438 + -92.6904366005728 45.0101503984089 2438 + -92.6979032678841 45.0107232636276 2438 + -92.7052708180676 45.0115414340457 2438 + -92.7127263858549 45.0123186978698 2438 + -92.7203010090271 45.0129672732945 2438 + -92.7279385048165 45.0135255760157 2438 + -92.7356653752599 45.0142972080147 2438 + -92.7433569853567 45.0149059605824 2438 + -92.7510393079923 45.0155634422272 2438 + -92.7586012608679 45.0164147107502 2438 + -92.7660563085583 45.0171035403725 2438 + -92.7735654020359 45.0178109394289 2408 + -92.7808966683949 45.0181973511467 2347 + -92.7882227912656 45.0186079478789 2316 + -92.7955583985804 45.0193002290468 2255 + -92.802877137723 45.0198997944223 2194 + -92.810330496953 45.0205558578153 2164 + -92.8178805010647 45.0213805814075 2103 + -92.8253364059255 45.0220160857506 2072 + -92.8282952283228 45.0222965993536 2047.6 + 260 0 0 + 260 0 0 + 260 0 0 + 250 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 250 0 0 + 250 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 270 0 0 + 270 0 0 + 280 0 0 + 280 0 0 + 270 0 0 + 270 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 277 + 288 + 283 + 291 + 283 + 284 + 298 + 288 + 288 + 286 + 287 + 287 + 286 + 286 + 299 + 289 + 289 + 299 + 287 + 286 + 284 + 282 + 292 + 281 + 281 + 291 + 280 + 280 + 281 + 282 + 283 + 284 + 286 + 287 + 287 + 286 + 295 + 285 + 286 + 297 + 287 + 289 + 290 + 288 + 298 + 288 + 289 + 302 + 292 + 294 + 294 + 294 + 304 + 290 + 288 + 297 + 284 + 284 + 284 + 285 + 286 + 278 + 282 + 288 + + + DC95 + A + DAL2858 + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:03-05 + 2010-05-01T13:00:07-05 + 2010-05-01T13:00:12-05 + 2010-05-01T13:00:17-05 + 2010-05-01T13:00:21-05 + 2010-05-01T13:00:26-05 + 2010-05-01T13:00:30-05 + 2010-05-01T13:00:35-05 + 2010-05-01T13:00:40-05 + 2010-05-01T13:00:44-05 + 2010-05-01T13:00:49-05 + 2010-05-01T13:00:54-05 + 2010-05-01T13:00:58-05 + 2010-05-01T13:01:03-05 + 2010-05-01T13:01:07-05 + 2010-05-01T13:01:12-05 + 2010-05-01T13:01:17-05 + 2010-05-01T13:01:21-05 + 2010-05-01T13:01:26-05 + 2010-05-01T13:01:31-05 + 2010-05-01T13:01:35-05 + 2010-05-01T13:01:40-05 + 2010-05-01T13:01:45-05 + 2010-05-01T13:01:49-05 + 2010-05-01T13:01:54-05 + 2010-05-01T13:01:58-05 + 2010-05-01T13:02:03-05 + 2010-05-01T13:02:08-05 + 2010-05-01T13:02:12-05 + 2010-05-01T13:02:17-05 + 2010-05-01T13:02:22-05 + 2010-05-01T13:02:26-05 + 2010-05-01T13:02:31-05 + 2010-05-01T13:02:35-05 + 2010-05-01T13:02:40-05 + 2010-05-01T13:02:45-05 + 2010-05-01T13:02:49-05 + 2010-05-01T13:02:54-05 + 2010-05-01T13:02:59-05 + 2010-05-01T13:03:03-05 + 2010-05-01T13:03:08-05 + 2010-05-01T13:03:12-05 + 2010-05-01T13:03:17-05 + 2010-05-01T13:03:22-05 + 2010-05-01T13:03:26-05 + 2010-05-01T13:03:31-05 + 2010-05-01T13:03:36-05 + 2010-05-01T13:03:40-05 + 2010-05-01T13:03:45-05 + 2010-05-01T13:03:49-05 + 2010-05-01T13:03:54-05 + 2010-05-01T13:03:59-05 + 2010-05-01T13:04:03-05 + 2010-05-01T13:04:08-05 + 2010-05-01T13:04:12-05 + 2010-05-01T13:04:17-05 + 2010-05-01T13:04:22-05 + 2010-05-01T13:04:26-05 + 2010-05-01T13:04:31-05 + 2010-05-01T13:04:35-05 + 2010-05-01T13:04:40-05 + 2010-05-01T13:04:45-05 + 2010-05-01T13:04:50-05 + 2010-05-01T13:04:54-05 + 2010-05-01T13:04:58-05 + 2010-05-01T13:05:00-05 + -93.1962465696187 44.4584257162471 3078 + -93.1954858158128 44.462643897726 3078 + -93.1945524569257 44.4696206853623 3048 + -93.1935347734104 44.4765680167011 3048 + -93.1921548885013 44.4834366892852 3048 + -93.1912787899895 44.4902740201102 3048 + -93.190869393024 44.496999598511 3048 + -93.190355669541 44.503701889363 3048 + -93.1899042890233 44.510392533924 3048 + -93.1894352972433 44.5171043633827 3048 + -93.1887272976791 44.523838031578 3017 + -93.1882343860587 44.5305421014878 2987 + -93.1878483537445 44.5373007218153 2987 + -93.187206305476 44.5440099500882 2956 + -93.1868272718258 44.5507044137326 2956 + -93.1868012917709 44.5573772972405 2926 + -93.1866210269778 44.5640837167977 2895 + -93.1864907616916 44.5708828364002 2865 + -93.1863883659992 44.5775823065512 2865 + -93.1863783383684 44.5842436541366 2834 + -93.1864309457268 44.5909344741626 2804 + -93.1861870344 44.5974636699094 2804 + -93.1859399656477 44.6039556552385 2804 + -93.1853781106637 44.6104625660741 2773 + -93.1842558921345 44.6168860904061 2743 + -93.1824878787618 44.6232658876223 2712 + -93.1803879773166 44.6294813300019 2743 + -93.1780367881352 44.6355848757922 2743 + -93.1752316985335 44.6415358145216 2743 + -93.1723853204738 44.6473610477966 2743 + -93.1695650439908 44.6531642714264 2743 + -93.1665274417428 44.6589294401132 2743 + -93.163312582578 44.6647085135481 2743 + -93.160128277284 44.6704265732562 2743 + -93.1572001510497 44.6760520191633 2743 + -93.1543945309268 44.6816953047965 2743 + -93.1513717350775 44.6874085817504 2743 + -93.148373004873 44.693058643812 2743 + -93.1453860883093 44.6986645847547 2743 + -93.1421804531017 44.7042897996493 2743 + -93.1388918899721 44.7099624804852 2743 + -93.1358117624936 44.7156532681924 2743 + -93.1330575833882 44.7212682920708 2743 + -93.1302162164891 44.7268585149398 2743 + -93.1271891227658 44.7324687008066 2743 + -93.1242151781308 44.7380337584283 2743 + -93.1211166531293 44.7436002967353 2743 + -93.1178719942563 44.7492107287761 2743 + -93.1146752953943 44.7548599499827 2743 + -93.1117422413574 44.7605559725452 2743 + -93.1091424380409 44.7663214899376 2743 + -93.1066566399229 44.7720715320148 2743 + -93.1040152138285 44.7778692510771 2743 + -93.1012154435684 44.7836013270224 2743 + -93.0982479017436 44.7892173348525 2743 + -93.0950640890821 44.7947430846626 2743 + -93.0915034480367 44.800094039287 2743 + -93.0873387008124 44.8052382540424 2743 + -93.0825976468131 44.8101709774442 2743 + -93.0776830792116 44.815032321238 2773 + -93.0728317182526 44.8197880022073 2773 + -93.0680578728105 44.8244689148117 2773 + -93.0633853777291 44.829181080911 2743 + -93.0589797309512 44.8338258031244 2743 + -93.0546552480593 44.8384413086509 2743 + -93.0501805533684 44.8430463359799 2743 + -93.0484252769533 44.8448678241347 2743 + 10 0 0 + 10 0 0 + 10 0 0 + 10 0 0 + 10 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 10 0 0 + 10 0 0 + 10 0 0 + 10 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 20 0 0 + 30 0 0 + 30 0 0 + 30 0 0 + 40 0 0 + 40 0 0 + 40 0 0 + 30 0 0 + 30 0 0 + 30 0 0 + 30 0 0 + 30 0 0 + 378 + 370 + 381 + 373 + 384 + 367 + 365 + 377 + 362 + 362 + 362 + 362 + 376 + 361 + 362 + 375 + 361 + 361 + 359 + 358 + 355 + 353 + 352 + 362 + 347 + 346 + 355 + 339 + 336 + 335 + 333 + 343 + 329 + 329 + 340 + 325 + 325 + 326 + 327 + 338 + 325 + 325 + 336 + 322 + 322 + 324 + 325 + 338 + 326 + 327 + 339 + 326 + 337 + 324 + 323 + 334 + 321 + 332 + 318 + 317 + 314 + 310 + 318 + 303 + 306 + 311 + 322 + + + B737 + A + SWA1488 + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:01-05 + 2010-05-01T13:00:06-05 + 2010-05-01T13:00:11-05 + 2010-05-01T13:00:15-05 + 2010-05-01T13:00:20-05 + 2010-05-01T13:00:24-05 + 2010-05-01T13:00:29-05 + 2010-05-01T13:00:34-05 + 2010-05-01T13:00:38-05 + 2010-05-01T13:00:43-05 + 2010-05-01T13:00:48-05 + 2010-05-01T13:00:52-05 + 2010-05-01T13:00:57-05 + 2010-05-01T13:01:01-05 + 2010-05-01T13:01:06-05 + 2010-05-01T13:01:11-05 + 2010-05-01T13:01:15-05 + 2010-05-01T13:01:20-05 + 2010-05-01T13:01:25-05 + 2010-05-01T13:01:29-05 + 2010-05-01T13:01:34-05 + 2010-05-01T13:01:38-05 + 2010-05-01T13:01:43-05 + 2010-05-01T13:01:48-05 + 2010-05-01T13:01:52-05 + 2010-05-01T13:01:57-05 + 2010-05-01T13:02:02-05 + 2010-05-01T13:02:06-05 + 2010-05-01T13:02:11-05 + 2010-05-01T13:02:15-05 + 2010-05-01T13:02:20-05 + 2010-05-01T13:02:25-05 + 2010-05-01T13:02:29-05 + 2010-05-01T13:02:34-05 + 2010-05-01T13:02:39-05 + 2010-05-01T13:02:43-05 + 2010-05-01T13:02:48-05 + 2010-05-01T13:02:53-05 + 2010-05-01T13:02:57-05 + 2010-05-01T13:03:02-05 + 2010-05-01T13:03:06-05 + 2010-05-01T13:03:11-05 + 2010-05-01T13:03:16-05 + 2010-05-01T13:03:20-05 + 2010-05-01T13:03:25-05 + 2010-05-01T13:03:30-05 + 2010-05-01T13:03:34-05 + 2010-05-01T13:03:39-05 + 2010-05-01T13:03:44-05 + 2010-05-01T13:03:48-05 + 2010-05-01T13:03:53-05 + 2010-05-01T13:03:57-05 + 2010-05-01T13:04:02-05 + 2010-05-01T13:04:07-05 + 2010-05-01T13:04:11-05 + 2010-05-01T13:04:16-05 + 2010-05-01T13:04:21-05 + 2010-05-01T13:04:25-05 + 2010-05-01T13:04:30-05 + 2010-05-01T13:04:35-05 + 2010-05-01T13:04:39-05 + 2010-05-01T13:04:44-05 + 2010-05-01T13:04:49-05 + 2010-05-01T13:04:53-05 + 2010-05-01T13:04:58-05 + 2010-05-01T13:05:00-05 + -92.7436038977339 45.0176449723009 2438 + -92.745419752639 45.0178405701636 2438 + -92.7525586927583 45.0181852080204 2438 + -92.7599978682742 45.0189437491361 2438 + -92.7673964649616 45.0200176804669 2438 + -92.7743047878147 45.0206512321095 2438 + -92.7812211106102 45.0212438545962 2438 + -92.7880905786106 45.0219352711124 2438 + -92.7948110303679 45.0225135550872 2438 + -92.8016256231407 45.0231539091809 2377 + -92.808436321378 45.0237782407713 2316 + -92.8153060032773 45.0245123996427 2255 + -92.8220950756464 45.0250388052127 2194 + -92.8289929014999 45.0256725515916 2164 + -92.8360303531199 45.0266058986232 2103 + -92.8429329578141 45.0273764305379 2072 + -92.8498901242601 45.0280031718838 2011 + -92.8570769257727 45.0288350738651 1981 + -92.8642468830706 45.0297437485852 1920 + -92.87096733955 45.0302316004222 1859 + -92.8776991433842 45.0308036595577 1828 + -92.8848051869188 45.0317355139572 1768 + -92.891849836226 45.032372254553 1737 + -92.8988806858275 45.0330472653869 1676 + -92.9059183042329 45.0336591058208 1646 + -92.9127864875957 45.0340529790218 1554 + -92.9198394657117 45.0347605723218 1554 + -92.9271188759936 45.0355320490291 1493 + -92.9342496165443 45.0361866089878 1463 + -92.9413321497396 45.0366031935849 1402 + -92.9482307097935 45.0364375819171 1371 + -92.9549267830033 45.0357359075476 1341 + -92.9616308114574 45.0349106615543 1310 + -92.9680840982828 45.0340026299843 1280 + -92.9744518648424 45.0330474137801 1280 + -92.9808447078198 45.0322448064613 1249 + -92.9869393112267 45.0312693675023 1219 + -92.9930579883147 45.0303271096009 1219 + -92.9991883691893 45.0295800716662 1219 + -93.0050223477826 45.028724083281 1219 + -93.010614076045 45.0278629900138 1219 + -93.0160206405037 45.0268346460011 1219 + -93.0211552000865 45.0253145800507 1219 + -93.0258637412524 45.0233023458284 1219 + -93.0300671724338 45.0208133465794 1219 + -93.0339928023023 45.0180815293661 1219 + -93.0378123650471 45.015386905955 1219 + -93.0413573567597 45.0126147468646 1219 + -93.0448863339261 45.0099395682965 1219 + -93.0485234513263 45.0073532174657 1219 + -93.0521310871894 45.0048422081768 1219 + -93.0555350014272 45.0023982293894 1219 + -93.0589786824276 45.0000288885742 1188 + -93.0623077105646 44.9977133640953 1188 + -93.065360230814 44.995356896404 1158 + -93.0685763415021 44.9931569267686 1158 + -93.0718407580212 44.9911674357548 1097 + -93.0748577258473 44.9891037291536 1066 + -93.0778092168993 44.9869633801591 1036 + -93.0808539061589 44.9848563483924 1006 + -93.0836846650629 44.9827278139486 975 + -93.0863847135489 44.9806419407598 945 + -93.0891432094711 44.978586338985 945 + -93.0918882385755 44.9764807737863 945 + -93.0946313764692 44.9743266948072 914 + -93.0974123770403 44.9722534220515 914 + -93.0987847859357 44.9712598545857 899 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 280 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 250 0 0 + 250 0 0 + 240 0 0 + 240 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 280 + 293 + 284 + 288 + 274 + 272 + 279 + 263 + 263 + 262 + 262 + 275 + 266 + 267 + 279 + 272 + 271 + 268 + 269 + 280 + 269 + 267 + 278 + 270 + 271 + 272 + 272 + 281 + 270 + 268 + 273 + 259 + 255 + 250 + 247 + 244 + 239 + 235 + 238 + 224 + 220 + 224 + 212 + 210 + 208 + 206 + 204 + 200 + 197 + 200 + 189 + 185 + 188 + 176 + 172 + 168 + 165 + 163 + 159 + 158 + 157 + 156 + 155 + 159 + 156 + 160 + 165 + + + CRJ2 + A + MES3237 + #arrival + + absolute + 1 + 2010-05-01T13:02:11-05 + 2010-05-01T13:02:16-05 + 2010-05-01T13:02:20-05 + 2010-05-01T13:02:25-05 + 2010-05-01T13:02:30-05 + 2010-05-01T13:02:34-05 + 2010-05-01T13:02:39-05 + 2010-05-01T13:02:44-05 + 2010-05-01T13:02:48-05 + 2010-05-01T13:02:53-05 + 2010-05-01T13:02:58-05 + 2010-05-01T13:03:02-05 + 2010-05-01T13:03:07-05 + 2010-05-01T13:03:11-05 + 2010-05-01T13:03:16-05 + 2010-05-01T13:03:21-05 + 2010-05-01T13:03:25-05 + 2010-05-01T13:03:30-05 + 2010-05-01T13:03:35-05 + 2010-05-01T13:03:39-05 + 2010-05-01T13:03:44-05 + 2010-05-01T13:03:49-05 + 2010-05-01T13:03:53-05 + 2010-05-01T13:03:58-05 + 2010-05-01T13:04:02-05 + 2010-05-01T13:04:07-05 + 2010-05-01T13:04:12-05 + 2010-05-01T13:04:16-05 + 2010-05-01T13:04:21-05 + 2010-05-01T13:04:26-05 + 2010-05-01T13:04:30-05 + 2010-05-01T13:04:35-05 + 2010-05-01T13:04:39-05 + 2010-05-01T13:04:44-05 + 2010-05-01T13:04:49-05 + 2010-05-01T13:04:53-05 + 2010-05-01T13:04:58-05 + 2010-05-01T13:05:00-05 + -92.3654525809466 45.0395326832503 2865 + -92.3722148453194 45.0383957360594 2804 + -92.3789968405533 45.0372550297716 2743 + -92.3857717937338 45.035790850493 2712 + -92.3928268643983 45.0344988210948 2651 + -92.4001469312933 45.033871851974 2560 + -92.4074037761026 45.0334790794383 2530 + -92.4143764863149 45.0325702739764 2469 + -92.4212444848282 45.0311814951256 2438 + -92.4279010170141 45.0296690432212 2438 + -92.4345565361906 45.0284146419212 2438 + -92.4413302267182 45.0272251811423 2438 + -92.4480836488953 45.0260669070124 2438 + -92.4551038107528 45.0251701649012 2438 + -92.4620867595928 45.0240801934066 2469 + -92.4688445943801 45.0226696219111 2438 + -92.475770828578 45.0214068742927 2438 + -92.4828770275976 45.0207461539528 2438 + -92.4898573176066 45.0197355515252 2438 + -92.4967644710332 45.0183323474054 2438 + -92.5037089663701 45.0170733409348 2438 + -92.5107248421742 45.0161283120616 2438 + -92.5176434168212 45.0153021033734 2438 + -92.5246160799064 45.014766408047 2438 + -92.5318394590384 45.0148138551787 2438 + -92.5390862704917 45.0145094336569 2438 + -92.5463963852328 45.0143318745824 2438 + -92.5536631015454 45.0147147936455 2438 + -92.5607664550331 45.014765244052 2438 + -92.5679894227165 45.0149152572076 2438 + -92.5752195833593 45.0150827900687 2438 + -92.582448917158 45.015235432103 2438 + -92.5897932283758 45.0155897891663 2438 + -92.5970842773637 45.0160017913126 2438 + -92.6042355431238 45.0161855996339 2438 + -92.6114545174405 45.0162505274554 2438 + -92.6187520939916 45.0164837409472 2438 + -92.6216565981247 45.0165937676212 2438 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 250 0 0 + 250 0 0 + 250 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 267 + 265 + 277 + 273 + 274 + 275 + 275 + 272 + 270 + 268 + 278 + 268 + 268 + 280 + 271 + 272 + 273 + 273 + 273 + 272 + 271 + 283 + 273 + 273 + 285 + 275 + 276 + 276 + 276 + 287 + 277 + 277 + 288 + 278 + 278 + 268 + 271 + 277 + + + A318 + A + FFT106 + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:05-05 + 2010-05-01T13:00:09-05 + 2010-05-01T13:00:14-05 + 2010-05-01T13:00:19-05 + 2010-05-01T13:00:23-05 + 2010-05-01T13:00:28-05 + 2010-05-01T13:00:33-05 + 2010-05-01T13:00:37-05 + 2010-05-01T13:00:42-05 + 2010-05-01T13:00:47-05 + 2010-05-01T13:00:51-05 + 2010-05-01T13:00:56-05 + 2010-05-01T13:01:00-05 + 2010-05-01T13:01:05-05 + 2010-05-01T13:01:10-05 + 2010-05-01T13:01:14-05 + 2010-05-01T13:01:19-05 + 2010-05-01T13:01:24-05 + 2010-05-01T13:01:28-05 + 2010-05-01T13:01:33-05 + 2010-05-01T13:01:37-05 + 2010-05-01T13:01:42-05 + 2010-05-01T13:01:47-05 + 2010-05-01T13:01:51-05 + 2010-05-01T13:01:56-05 + 2010-05-01T13:02:01-05 + 2010-05-01T13:02:05-05 + 2010-05-01T13:02:10-05 + 2010-05-01T13:02:15-05 + 2010-05-01T13:02:19-05 + 2010-05-01T13:02:24-05 + 2010-05-01T13:02:28-05 + 2010-05-01T13:02:33-05 + 2010-05-01T13:02:38-05 + 2010-05-01T13:02:42-05 + 2010-05-01T13:02:47-05 + 2010-05-01T13:02:52-05 + 2010-05-01T13:02:56-05 + 2010-05-01T13:03:01-05 + 2010-05-01T13:03:06-05 + 2010-05-01T13:03:10-05 + 2010-05-01T13:03:15-05 + 2010-05-01T13:03:19-05 + 2010-05-01T13:03:24-05 + 2010-05-01T13:03:29-05 + 2010-05-01T13:03:33-05 + 2010-05-01T13:03:38-05 + 2010-05-01T13:03:43-05 + 2010-05-01T13:03:47-05 + 2010-05-01T13:03:52-05 + 2010-05-01T13:03:56-05 + 2010-05-01T13:04:01-05 + 2010-05-01T13:04:05-05 + 2010-05-01T13:04:10-05 + 2010-05-01T13:04:14-05 + 2010-05-01T13:04:18-05 + 2010-05-01T13:04:23-05 + 2010-05-01T13:04:27-05 + 2010-05-01T13:04:32-05 + 2010-05-01T13:04:37-05 + 2010-05-01T13:04:41-05 + 2010-05-01T13:04:46-05 + 2010-05-01T13:04:50-05 + 2010-05-01T13:04:55-05 + 2010-05-01T13:04:59-05 + 2010-05-01T13:05:00-05 + -93.2974568508014 45.0687622602847 1432 + -93.2934457905393 45.0660257042941 1371 + -93.2902010482642 45.0627382200457 1341 + -93.2880735868205 45.0592062737728 1280 + -93.2866251180089 45.0556538417996 1280 + -93.2855706436895 45.0521555770546 1249 + -93.2848929213344 45.0486326683558 1249 + -93.284149302237 45.0450445279501 1219 + -93.2832681542582 45.0414770478452 1219 + -93.2822163760078 45.0378266141909 1219 + -93.2810695206555 45.0339762188888 1249 + -93.2800852709943 45.0300242656845 1249 + -93.2789451826991 45.026165428423 1249 + -93.2776553627852 45.0222881273358 1219 + -93.2762849051262 45.0183879412865 1219 + -93.2750227859231 45.01452278975 1188 + -93.2739788608525 45.0107480537055 1188 + -93.27273416536 45.0071654180353 1158 + -93.271440533456 45.0036211770402 1127 + -93.2702510339155 45.0000676438878 1066 + -93.2689856900965 44.9965088916327 1036 + -93.2677450407515 44.9930289132183 1006 + -93.2665628070763 44.9897678001495 975 + -93.2654695900875 44.9865668331562 945 + -93.2643275310433 44.9833330918205 914 + -93.2631023843797 44.9801905024626 823 + -93.2621060751847 44.9769860428905 823 + -93.2613793333571 44.9737243608145 762 + -93.2609358268711 44.970517162552 762 + -93.260628015146 44.9674064044388 762 + -93.2602996952247 44.9643597216492 731 + -93.2599595576737 44.9613320303757 731 + -93.2594994071955 44.9582185681901 701 + -93.2589507888497 44.9549930481613 670 + -93.2583578824759 44.9518211731838 670 + -93.2577038531017 44.9485831657195 640 + -93.2570809594468 44.9453063523228 609 + -93.2563271653062 44.942138873467 609 + -93.2554358149374 44.9390293085691 579 + -93.2546255139468 44.9359025243045 579 + -93.2538265267143 44.9327450699088 548 + -93.2530252021259 44.9297128380021 548 + -93.2522809727351 44.9267689034144 518 + -93.2515035867768 44.9237188014152 487 + -93.2506543465894 44.9207369723461 487 + -93.2498548488919 44.9178124047958 457 + -93.2489961276719 44.9148538675761 426 + -93.2481063345252 44.9118432075909 426 + -93.2475702164253 44.9090871778968 396 + -93.2468054019883 44.9062896891392 365 + -93.2459138821779 44.9031220636101 365 + -93.2451839956313 44.9003646144392 335 + -93.2442620734973 44.8974631820496 335 + -93.2437934615496 44.8946084310426 335 + -93.2430623256379 44.8915836945618 365 + -93.2424772474959 44.8888394893853 426 + -93.2417795129824 44.8858318116166 487 + -93.2411065382114 44.882678391429 518 + -93.2402313646157 44.879530182788 579 + -93.2392009410817 44.8759747599643 609 + -93.2377852820119 44.872769339825 670 + -93.2363530715176 44.8696281486003 731 + -93.23475664131 44.866270773938 762 + -93.2331575993176 44.8629492601519 823 + -93.2317272590921 44.8596791368118 853 + -93.2301662617953 44.8564215369107 884 + -93.2298549002314 44.8557795687872 884 + 140 0 0 + 150 0 0 + 150 0 0 + 160 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 180 0 0 + 180 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 160 0 0 + 160 0 0 + 160 0 0 + 160 0 0 + 160 0 0 + 160 0 0 + 160 0 0 + 212 + 205 + 208 + 203 + 201 + 196 + 196 + 197 + 202 + 205 + 216 + 212 + 214 + 221 + 210 + 208 + 205 + 202 + 206 + 194 + 191 + 195 + 184 + 181 + 178 + 177 + 175 + 173 + 171 + 176 + 169 + 168 + 176 + 172 + 174 + 174 + 174 + 174 + 172 + 169 + 175 + 167 + 165 + 170 + 164 + 162 + 159 + 161 + 165 + 158 + 163 + 165 + 164 + 169 + 167 + 175 + 175 + 178 + 183 + 181 + 191 + 186 + 192 + 192 + 189 + 193 + 184 + + + BE35 + A + N46JJ + #arrival + + absolute + 1 + 2010-05-01T13:01:21-05 + 2010-05-01T13:01:26-05 + 2010-05-01T13:01:31-05 + 2010-05-01T13:01:35-05 + 2010-05-01T13:01:40-05 + 2010-05-01T13:01:44-05 + 2010-05-01T13:01:49-05 + 2010-05-01T13:01:54-05 + 2010-05-01T13:01:58-05 + 2010-05-01T13:02:03-05 + 2010-05-01T13:02:08-05 + 2010-05-01T13:02:12-05 + 2010-05-01T13:02:17-05 + 2010-05-01T13:02:22-05 + 2010-05-01T13:02:26-05 + 2010-05-01T13:02:31-05 + 2010-05-01T13:02:35-05 + 2010-05-01T13:02:40-05 + 2010-05-01T13:02:45-05 + 2010-05-01T13:02:49-05 + 2010-05-01T13:02:54-05 + 2010-05-01T13:02:59-05 + 2010-05-01T13:03:03-05 + 2010-05-01T13:03:08-05 + 2010-05-01T13:03:13-05 + 2010-05-01T13:03:17-05 + 2010-05-01T13:03:22-05 + 2010-05-01T13:03:26-05 + 2010-05-01T13:03:31-05 + 2010-05-01T13:03:36-05 + 2010-05-01T13:03:40-05 + 2010-05-01T13:03:45-05 + 2010-05-01T13:03:50-05 + 2010-05-01T13:03:54-05 + 2010-05-01T13:03:59-05 + 2010-05-01T13:04:04-05 + 2010-05-01T13:04:08-05 + 2010-05-01T13:04:13-05 + 2010-05-01T13:04:17-05 + 2010-05-01T13:04:22-05 + 2010-05-01T13:04:27-05 + 2010-05-01T13:04:31-05 + 2010-05-01T13:04:36-05 + 2010-05-01T13:04:41-05 + 2010-05-01T13:04:45-05 + 2010-05-01T13:04:50-05 + 2010-05-01T13:04:55-05 + 2010-05-01T13:04:59-05 + 2010-05-01T13:05:00-05 + -92.9339221048924 44.2950315742565 1524 + -92.9350064014678 44.2979570591066 1524 + -92.937652997869 44.3004478107577 1524 + -92.9407116824041 44.302846514598 1524 + -92.9430921358657 44.3054902041603 1524 + -92.9452136372834 44.308154578993 1524 + -92.9479783757094 44.310667507076 1524 + -92.9505645579644 44.3132980584321 1524 + -92.953176931421 44.3159244553921 1524 + -92.955790238918 44.3185524033008 1524 + -92.9581111706922 44.3212990950149 1524 + -92.9605941160522 44.3239309610271 1524 + -92.9634150903891 44.3264339577567 1524 + -92.9661669042714 44.3290084280208 1524 + -92.9689057275993 44.3316511959644 1524 + -92.9719191039836 44.3342289723207 1524 + -92.9745609220571 44.3367593382531 1524 + -92.9767073261514 44.3394303305052 1524 + -92.9791044580601 44.34211951331 1524 + -92.9818312662522 44.3446672608847 1524 + -92.98437591379 44.3472600312903 1524 + -92.9873161522272 44.3497184463263 1524 + -92.9898453395122 44.3523721849065 1524 + -92.992276996923 44.3551963485207 1524 + -92.9947092219658 44.3579338326741 1524 + -92.9972281517299 44.3606240814545 1524 + -92.9993151368602 44.3634480822621 1524 + -93.0016285033253 44.3662342282271 1524 + -93.0048280633172 44.3687843972879 1524 + -93.0078776508536 44.371448246948 1524 + -93.0107556818704 44.3741327819505 1524 + -93.0132474745541 44.3767834196569 1524 + -93.015638082508 44.3795081186135 1524 + -93.0183495942011 44.3821828750482 1524 + -93.0215077436058 44.3847489346551 1524 + -93.024007943771 44.3874959321693 1524 + -93.0264526837138 44.3902468927735 1524 + -93.0287728968074 44.3929994156644 1524 + -93.0313252807714 44.3957423196104 1524 + -93.0340309029643 44.3984682572521 1554 + -93.0367834033903 44.4012140197658 1554 + -93.039886374743 44.4039013532069 1524 + -93.0431213002073 44.4066598090273 1524 + -93.0456886621799 44.4095616223744 1524 + -93.0477227123297 44.4124371862128 1524 + -93.0506396295538 44.4152339455378 1524 + -93.0533566431572 44.4181925397398 1524 + -93.0556214357794 44.421167115874 1524 + -93.0562077996189 44.4217279400145 1524 + 330 0 0 + 330 0 0 + 330 0 0 + 320 0 0 + 320 0 0 + 330 0 0 + 330 0 0 + 320 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 330 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 320 0 0 + 320 0 0 + 320 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 330 0 0 + 169 + 166 + 171 + 169 + 171 + 178 + 171 + 172 + 173 + 173 + 173 + 174 + 175 + 181 + 174 + 174 + 180 + 172 + 171 + 172 + 174 + 174 + 174 + 175 + 181 + 176 + 177 + 186 + 179 + 179 + 179 + 179 + 178 + 177 + 177 + 184 + 178 + 177 + 186 + 182 + 184 + 184 + 185 + 186 + 185 + 184 + 187 + 184 + 187 + + + + A + + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:05-05 + 2010-05-01T13:00:10-05 + 2010-05-01T13:00:14-05 + 2010-05-01T13:00:24-05 + 2010-05-01T13:00:33-05 + 2010-05-01T13:00:37-05 + 2010-05-01T13:00:42-05 + 2010-05-01T13:00:47-05 + 2010-05-01T13:00:51-05 + 2010-05-01T13:00:56-05 + 2010-05-01T13:01:00-05 + 2010-05-01T13:01:05-05 + 2010-05-01T13:01:10-05 + 2010-05-01T13:01:14-05 + 2010-05-01T13:01:19-05 + 2010-05-01T13:01:24-05 + 2010-05-01T13:01:28-05 + 2010-05-01T13:01:33-05 + 2010-05-01T13:01:38-05 + 2010-05-01T13:01:43-05 + 2010-05-01T13:01:47-05 + 2010-05-01T13:01:51-05 + 2010-05-01T13:01:56-05 + 2010-05-01T13:02:01-05 + 2010-05-01T13:02:05-05 + 2010-05-01T13:02:10-05 + 2010-05-01T13:02:15-05 + 2010-05-01T13:02:19-05 + 2010-05-01T13:02:24-05 + 2010-05-01T13:02:28-05 + 2010-05-01T13:02:33-05 + 2010-05-01T13:02:38-05 + 2010-05-01T13:02:42-05 + 2010-05-01T13:02:47-05 + 2010-05-01T13:02:52-05 + 2010-05-01T13:02:56-05 + 2010-05-01T13:03:01-05 + 2010-05-01T13:03:06-05 + 2010-05-01T13:03:10-05 + 2010-05-01T13:03:15-05 + 2010-05-01T13:03:20-05 + 2010-05-01T13:03:24-05 + 2010-05-01T13:03:29-05 + 2010-05-01T13:03:33-05 + 2010-05-01T13:03:38-05 + 2010-05-01T13:03:43-05 + 2010-05-01T13:03:47-05 + 2010-05-01T13:03:52-05 + 2010-05-01T13:03:57-05 + 2010-05-01T13:04:01-05 + 2010-05-01T13:04:06-05 + 2010-05-01T13:04:11-05 + 2010-05-01T13:04:15-05 + 2010-05-01T13:04:20-05 + 2010-05-01T13:04:24-05 + 2010-05-01T13:04:29-05 + 2010-05-01T13:04:34-05 + 2010-05-01T13:04:38-05 + 2010-05-01T13:04:43-05 + 2010-05-01T13:04:48-05 + 2010-05-01T13:04:52-05 + 2010-05-01T13:04:57-05 + 2010-05-01T13:05:00-05 + -93.5287325331323 45.3502794027397 731 + -93.5305174337715 45.3463816209029 731 + -93.532323089283 45.3433065196778 731 + -93.5344374505075 45.3397938806867 731 + -93.5365879669744 45.3355152994798 731 + -93.538455345577 45.3317693717468 731 + -93.5402440337749 45.3288175816964 731 + -93.5420054353005 45.3261482119682 701 + -93.5437972875724 45.3236486426325 701 + -93.5449025453586 45.3213557809437 670 + -93.5460939368394 45.3190373998605 670 + -93.5479457332637 45.3165177805485 670 + -93.5493974388824 45.3141793458801 670 + -93.5513867211372 45.311763387862 640 + -93.5535208279901 45.3092989037314 640 + -93.5553972702218 45.3069522366272 609 + -93.5571429777693 45.3046054644141 609 + -93.5579199353617 45.3025960765579 640 + -93.5593045947048 45.3003990165413 640 + -93.5616831509882 45.2976828740205 640 + -93.5637771433208 45.2950299257309 640 + -93.5655282859852 45.2925928168771 640 + -93.5670151031996 45.2901828629185 640 + -93.5687097888584 45.2875722909995 609 + -93.5700169391262 45.2851834796592 670 + -93.5710302700083 45.2828077246619 640 + -93.5718507391893 45.2803449539575 670 + -93.5725921190677 45.2778546051997 670 + -93.5735869984384 45.2752499819516 670 + -93.5746474214783 45.2726078789038 670 + -93.5759690717845 45.2698099999195 670 + -93.5773880658931 45.2669964536541 701 + -93.5786320195651 45.2643944197042 701 + -93.5801045228797 45.2617721181735 731 + -93.5812823080336 45.2592837181772 762 + -93.5824999029929 45.2568982323771 792 + -93.584184493492 45.2545288880291 792 + -93.5856799945281 45.2523235684068 792 + -93.5867865417154 45.2502484182149 792 + -93.5877350378085 45.2481996073608 792 + -93.5890621470214 45.2458286959404 762 + -93.5904952245442 45.2433496248092 762 + -93.5917459859832 45.2410175205115 762 + -93.592940308901 45.2387518649986 792 + -93.5943516581034 45.2363760400415 792 + -93.595835737429 45.2339795097202 792 + -93.5970428000944 45.2316738651172 792 + -93.598068247895 45.2293303072495 792 + -93.5992987604295 45.2268750160339 762 + -93.6008769052334 45.2242985661919 762 + -93.6025298777898 45.2216628823159 762 + -93.6039679259902 45.2191586079975 762 + -93.6055530853699 45.2165615203343 762 + -93.6071850685486 45.213948758836 792 + -93.6085800541819 45.2114666338841 792 + -93.6099900017953 45.2087907684969 762 + -93.6111813373289 45.2058856405005 762 + -93.6116978316508 45.2030015871681 762 + -93.6118935129054 45.2001474423799 762 + -93.6120686576365 45.1971548169968 731 + -93.6120488607103 45.1942250308012 731 + -93.6121619193052 45.1911822627783 731 + -93.6123153707665 45.188122812492 731 + -93.6121210225109 45.1864342009565 731 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 210 0 0 + 210 0 0 + 210 0 0 + 210 0 0 + 210 0 0 + 200 0 0 + 210 0 0 + 210 0 0 + 210 0 0 + 210 0 0 + 210 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 190 0 0 + 190 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 200 0 0 + 190 0 0 + 190 0 0 + 180 0 0 + 180 0 0 + 180 0 0 + 180 0 0 + 180 0 0 + 180 0 0 + 202 + 180 + 166 + 171 + 162 + 157 + 143 + 145 + 156 + 144 + 142 + 149 + 146 + 148 + 140 + 139 + 142 + 137 + 143 + 149 + 151 + 152 + 151 + 147 + 140 + 141 + 140 + 149 + 148 + 150 + 158 + 152 + 150 + 147 + 142 + 138 + 131 + 131 + 132 + 130 + 130 + 138 + 138 + 137 + 140 + 136 + 139 + 142 + 143 + 146 + 150 + 151 + 157 + 152 + 154 + 160 + 155 + 157 + 159 + 160 + 159 + 155 + 157 + 161 + + + B752 + A + DAL2731 + #arrival + + absolute + 1 + 2010-05-01T13:04:40-05 + 2010-05-01T13:04:44-05 + 2010-05-01T13:04:49-05 + 2010-05-01T13:04:53-05 + 2010-05-01T13:04:58-05 + 2010-05-01T13:05:00-05 + -92.3671504733075 45.0392472395977 2743 + -92.3742258682339 45.0377289236059 2712 + -92.3813215867021 45.0364293844267 2682 + -92.3883643499875 45.0352118386382 2651 + -92.3954606917206 45.0343296776778 2621 + -92.3983011205325 45.0338926726637 2608.6 + 250 0 0 + 250 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 260 0 0 + 301 + 289 + 283 + 283 + 272 + 276 + + + CRJ2 + A + SKW4805 + #arrival + + + CRJ2 + A + FLG4092 + #arrival + + + E170 + A + CPZ5667 + #arrival + + absolute + 1 + 2010-05-01T13:00:00-05 + 2010-05-01T13:00:01-05 + 2010-05-01T13:00:06-05 + 2010-05-01T13:00:10-05 + 2010-05-01T13:00:15-05 + 2010-05-01T13:00:20-05 + 2010-05-01T13:00:24-05 + 2010-05-01T13:00:29-05 + 2010-05-01T13:00:34-05 + 2010-05-01T13:00:38-05 + 2010-05-01T13:00:43-05 + 2010-05-01T13:00:47-05 + 2010-05-01T13:00:52-05 + 2010-05-01T13:00:57-05 + 2010-05-01T13:01:01-05 + 2010-05-01T13:01:06-05 + 2010-05-01T13:01:11-05 + 2010-05-01T13:01:15-05 + 2010-05-01T13:01:20-05 + 2010-05-01T13:01:24-05 + 2010-05-01T13:01:29-05 + 2010-05-01T13:01:34-05 + 2010-05-01T13:01:38-05 + 2010-05-01T13:01:43-05 + 2010-05-01T13:01:48-05 + 2010-05-01T13:01:52-05 + 2010-05-01T13:01:57-05 + 2010-05-01T13:02:02-05 + 2010-05-01T13:02:06-05 + 2010-05-01T13:02:11-05 + 2010-05-01T13:02:15-05 + 2010-05-01T13:02:20-05 + 2010-05-01T13:02:25-05 + 2010-05-01T13:02:29-05 + 2010-05-01T13:02:34-05 + 2010-05-01T13:02:39-05 + 2010-05-01T13:02:43-05 + 2010-05-01T13:02:48-05 + 2010-05-01T13:02:53-05 + 2010-05-01T13:02:57-05 + 2010-05-01T13:03:02-05 + 2010-05-01T13:03:06-05 + 2010-05-01T13:03:11-05 + 2010-05-01T13:03:16-05 + 2010-05-01T13:03:20-05 + 2010-05-01T13:03:25-05 + 2010-05-01T13:03:30-05 + 2010-05-01T13:03:34-05 + 2010-05-01T13:03:39-05 + 2010-05-01T13:03:44-05 + 2010-05-01T13:03:48-05 + 2010-05-01T13:03:53-05 + 2010-05-01T13:03:57-05 + 2010-05-01T13:04:02-05 + 2010-05-01T13:04:07-05 + 2010-05-01T13:04:11-05 + 2010-05-01T13:04:16-05 + 2010-05-01T13:04:21-05 + 2010-05-01T13:04:25-05 + 2010-05-01T13:04:30-05 + 2010-05-01T13:04:35-05 + 2010-05-01T13:04:39-05 + 2010-05-01T13:04:44-05 + 2010-05-01T13:04:49-05 + 2010-05-01T13:04:53-05 + 2010-05-01T13:04:58-05 + 2010-05-01T13:05:00-05 + -92.9496238812799 45.0117549407746 1438.2 + -92.9507065768732 45.0116702587604 1432 + -92.9563739191926 45.0116271226204 1432 + -92.9620225732021 45.0115639668496 1432 + -92.9673675587699 45.0113432900049 1402 + -92.9725115032188 45.0111442254373 1402 + -92.9778810091229 45.0112050922639 1371 + -92.9832227114571 45.0112143826731 1371 + -92.9884546803523 45.0110418166788 1341 + -92.9938268606229 45.0109652220709 1341 + -92.9991151069756 45.010802144845 1310 + -93.0041467584036 45.0105516668541 1310 + -93.0090742909164 45.0105233046799 1280 + -93.0139435770527 45.0106265340001 1280 + -93.0186698179379 45.010634924101 1249 + -93.0233769482656 45.0105798571028 1219 + -93.027863445495 45.0103319372353 1219 + -93.0321355024912 45.009785470284 1188 + -93.0364774006258 45.0090804055343 1188 + -93.0406972054631 45.008159893417 1158 + -93.044688438093 45.0070424610069 1158 + -93.048236193366 45.0055626328365 1127 + -93.0515060655523 45.0038918034748 1097 + -93.0547412568513 45.002203639943 1097 + -93.057960971331 45.0002785469345 1066 + -93.061163597597 44.9982000732934 1036 + -93.0642340616386 44.9961004469539 1036 + -93.0673288162316 44.9939827866134 1036 + -93.0705257535347 44.9919340234479 1006 + -93.0737651809484 44.9898497469776 1006 + -93.0766698334355 44.9874752633062 975 + -93.0795448300029 44.9851003293423 945 + -93.0826513591394 44.982853369523 914 + -93.0857494236443 44.9806128435883 914 + -93.0889594989987 44.9783354445401 884 + -93.0921516080765 44.9761326356492 853 + -93.0951593343498 44.9739412329465 823 + -93.098173526634 44.9718087345519 792 + -93.1011828507638 44.9697896030084 792 + -93.1041138105741 44.9676784537011 762 + -93.1070716804749 44.9654796588945 762 + -93.1101959375488 44.9632479940121 731 + -93.1134259541861 44.9611142324701 731 + -93.1164777263599 44.9590021654861 701 + -93.119453084479 44.9567137200248 701 + -93.1225749783361 44.9543749518252 670 + -93.1257330391052 44.9521434289046 640 + -93.1288583838247 44.9499086265813 640 + -93.1320823896043 44.947732382611 609 + -93.1352777130563 44.9456935460161 609 + -93.1382372228923 44.9435026223594 579 + -93.1412308158626 44.9413228585563 548 + -93.1440834422772 44.9393578781327 548 + -93.1468380987104 44.937418270883 548 + -93.1496706928566 44.9354098449433 548 + -93.1524193130388 44.9334175710809 548 + -93.1552204975698 44.931467153437 548 + -93.1580221467789 44.9294054329873 548 + -93.1608324983225 44.9273103160518 548 + -93.163576735833 44.9252792086421 518 + -93.1662777029414 44.923281165701 518 + -93.1691629183162 44.9213004519466 518 + -93.1721326207182 44.9193080290794 487 + -93.1750564756636 44.9172689130085 487 + -93.1778338144972 44.915261757476 457 + -93.1805696776089 44.9132626732327 457 + -93.1819903937475 44.9122233325116 441.5 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 270 0 0 + 260 0 0 + 260 0 0 + 250 0 0 + 250 0 0 + 240 0 0 + 240 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 230 0 0 + 220 0 0 + 220 0 0 + 220 0 0 + 214 + 207 + 202 + 208 + 207 + 205 + 203 + 202 + 209 + 199 + 196 + 200 + 188 + 183 + 178 + 175 + 179 + 170 + 166 + 169 + 161 + 160 + 159 + 159 + 160 + 162 + 164 + 172 + 166 + 167 + 174 + 169 + 170 + 169 + 168 + 166 + 165 + 163 + 169 + 164 + 164 + 172 + 168 + 169 + 169 + 169 + 169 + 168 + 167 + 170 + 160 + 158 + 161 + 153 + 151 + 152 + 153 + 152 + 153 + 154 + 154 + 153 + 153 + 160 + 156 + 160 + 164 + + + + Departures + + TEX2 + D + HOOK67 + #departure + + absolute + 1 + 2010-05-01T13:02:46-05 + 2010-05-01T13:02:50-05 + 2010-05-01T13:02:54-05 + 2010-05-01T13:02:59-05 + 2010-05-01T13:03:04-05 + 2010-05-01T13:03:08-05 + 2010-05-01T13:03:13-05 + 2010-05-01T13:03:18-05 + 2010-05-01T13:03:22-05 + 2010-05-01T13:03:27-05 + 2010-05-01T13:03:31-05 + 2010-05-01T13:03:36-05 + 2010-05-01T13:03:41-05 + 2010-05-01T13:03:45-05 + 2010-05-01T13:03:50-05 + 2010-05-01T13:03:55-05 + 2010-05-01T13:03:59-05 + 2010-05-01T13:04:04-05 + 2010-05-01T13:04:09-05 + 2010-05-01T13:04:13-05 + 2010-05-01T13:04:18-05 + 2010-05-01T13:04:23-05 + 2010-05-01T13:04:28-05 + 2010-05-01T13:04:32-05 + 2010-05-01T13:04:37-05 + 2010-05-01T13:04:42-05 + 2010-05-01T13:04:46-05 + 2010-05-01T13:04:51-05 + 2010-05-01T13:04:56-05 + 2010-05-01T13:05:00-05 + -93.2379571205595 44.872806349747 365 + -93.2370660925484 44.870006118743 396 + -93.236355767523 44.8669752777211 426 + -93.2354887209031 44.863712193489 487 + -93.2347087148419 44.8604536579846 548 + -93.2338531241111 44.8572464977323 609 + -93.2329069833652 44.8540674818656 670 + -93.2321075679892 44.8508271074111 731 + -93.2318979317232 44.8475791496379 792 + -93.2324245825346 44.8444239832126 884 + -93.2337414411031 44.8414077607553 945 + -93.2358704572033 44.8386783246771 1006 + -93.2388663703645 44.836365445841 1066 + -93.2426861295915 44.8345537010783 1127 + -93.2472528925157 44.8333824186694 1158 + -93.252467378877 44.8329692039001 1188 + -93.25805239674 44.8333893976675 1219 + -93.2638450577518 44.8346083411457 1219 + -93.2696754993405 44.83650914188 1219 + -93.2753673121587 44.8390951418887 1219 + -93.2808543977574 44.8421681587795 1219 + -93.2861853262416 44.8454128516506 1249 + -93.29145969331 44.8487370983379 1219 + -93.2967095159 44.8520389729185 1219 + -93.3019214165294 44.8553364257712 1219 + -93.3070477220233 44.8587223340278 1219 + -93.3121286565238 44.8620050415952 1219 + -93.3171626530446 44.8652559523285 1219 + -93.3221179929219 44.868582313462 1219 + -93.3270963865766 44.8718050975636 1219 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 170 0 0 + 180 0 0 + 180 0 0 + 190 0 0 + 200 0 0 + 220 0 0 + 230 0 0 + 240 0 0 + 260 0 0 + 270 0 0 + 280 0 0 + 290 0 0 + 300 0 0 + 300 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 310 0 0 + 178 + 175 + 180 + 177 + 175 + 177 + 175 + 181 + 173 + 172 + 178 + 173 + 178 + 187 + 196 + 208 + 224 + 237 + 247 + 247 + 263 + 266 + 258 + 267 + 266 + 265 + 263 + 266 + 270 + 260 + + + + Overflights + + + diff --git a/openlayers/examples/kml/lines.kml b/openlayers/examples/kml/lines.kml new file mode 100644 index 0000000000..5999aaa131 --- /dev/null +++ b/openlayers/examples/kml/lines.kml @@ -0,0 +1,275 @@ + + + + KML Samples + 1 + Unleash your creativity with the help of these examples! + + + + + + + + + + + + + + Paths + 0 + Examples of paths. Note that the tessellate tag is by default + set to 0. If you want to create tessellated lines, they must be authored + (or edited) directly in KML. + + Tessellated + 0 + tag has a value of 1, the line will contour to the underlying terrain]]> + + -112.0822680013139 + 36.09825589333556 + 0 + 2889.145007690472 + 62.04855796276328 + 103.8120432044965 + + + 1 + -112.0814237830345,36.10677870477137,0 + -112.0870267752693,36.0905099328766,0 + + + + Untessellated + 0 + tag has a value of 0, the line follow a simple straight-line path from point to point]]> + + -112.0822680013139 + 36.09825589333556 + 0 + 2889.145007690472 + 62.04855796276328 + 103.8120432044965 + + + 0 + -112.080622229595,36.10673460007995,0 + -112.085242575315,36.09049598612422,0 + + + + Absolute + 0 + Transparent purple line + + -112.2719329043177 + 36.08890633450894 + 0 + 2569.386744398339 + 44.60763714063257 + -106.8161545998597 + + #transPurpleLineGreenPoly + + 1 + absolute + -112.265654928602,36.09447672602546,2357 + -112.2660384528238,36.09342608838671,2357 + -112.2668139013453,36.09251058776881,2357 + -112.2677826834445,36.09189827357996,2357 + -112.2688557510952,36.0913137941187,2357 + -112.2694810717219,36.0903677207521,2357 + -112.2695268555611,36.08932171487285,2357 + -112.2690144567276,36.08850916060472,2357 + -112.2681528815339,36.08753813597956,2357 + -112.2670588176031,36.08682685262568,2357 + -112.2657374587321,36.08646312301303,2357 + + + + Absolute Extruded + 0 + Transparent green wall with yellow outlines + + -112.2643334742529 + 36.08563154742419 + 0 + 4451.842204068102 + 44.61038665812578 + -125.7518698668815 + + #yellowLineGreenPoly + + 1 + 1 + absolute + -112.2550785337791,36.07954952145647,2357 + -112.2549277039738,36.08117083492122,2357 + -112.2552505069063,36.08260761307279,2357 + -112.2564540158376,36.08395660588506,2357 + -112.2580238976449,36.08511401044813,2357 + -112.2595218489022,36.08584355239394,2357 + -112.2608216347552,36.08612634548589,2357 + -112.262073428656,36.08626019085147,2357 + -112.2633204928495,36.08621519860091,2357 + -112.2644963846444,36.08627897945274,2357 + -112.2656969554589,36.08649599090644,2357 + + + + Relative + 0 + Black line (10 pixels wide), height tracks terrain + + -112.2580438551384 + 36.1072674824385 + 0 + 2927.61105910266 + 44.61324882043339 + 4.947421249553717 + + #thickBlackLine + + 1 + relativeToGround + -112.2532845153347,36.09886943729116,645 + -112.2540466121145,36.09919570465255,645 + -112.254734666947,36.09984998366178,645 + -112.255493345654,36.10051310621746,645 + -112.2563157098468,36.10108441943419,645 + -112.2568033076439,36.10159722088088,645 + -112.257494011321,36.10204323542867,645 + -112.2584106072308,36.10229131995655,645 + -112.2596588987972,36.10240001286358,645 + -112.2610581199487,36.10213176873407,645 + -112.2626285262793,36.10157011437219,645 + + + + Relative Extruded + 0 + Opaque blue walls with red outline, height tracks terrain + + -112.2683594333433 + 36.09884362144909 + 0 + 2184.193522571467 + 44.60855445139561 + -72.24271551768405 + + #redLineBluePoly + + 1 + 1 + relativeToGround + -112.2656634181359,36.09445214722695,630 + -112.2652238941097,36.09520916122063,630 + -112.2645079986395,36.09580763864907,630 + -112.2638827428817,36.09628572284063,630 + -112.2635746835406,36.09679275951239,630 + -112.2635711822407,36.09740038871899,630 + -112.2640296531825,36.09804913435539,630 + -112.264327720538,36.09880337400301,630 + -112.2642436562271,36.09963644790288,630 + -112.2639148687042,36.10055381117246,630 + -112.2626894973474,36.10149062823369,630 + + + + Blue Icon + Just another blue icon. + kml/styles.kml#blueIcons + + -112.292238941097,36.09520916122063,630 + + + + + diff --git a/openlayers/examples/kml/styles.kml b/openlayers/examples/kml/styles.kml new file mode 100644 index 0000000000..24350ade44 --- /dev/null +++ b/openlayers/examples/kml/styles.kml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/openlayers/examples/kml/sundials.kml b/openlayers/examples/kml/sundials.kml new file mode 100644 index 0000000000..8a68305d1c --- /dev/null +++ b/openlayers/examples/kml/sundials.kml @@ -0,0 +1,2273 @@ + + + + Sundial Collection.kmz + + + normal + #sn_sunny_copy69 + + + highlight + #sh_sunny_copy70 + + + + + + + + + normal + #sn_sunny_copy68 + + + highlight + #sh_sunny_copy69 + + + + Sundial Collection + 1 + + -56.6884384968692 + 47.91963617483238 + 0 + 9958750.824018393 + 1.303827428939919e-015 + -16.31426621668193 + + + + High Resolution + + Sundial, Madestein, Den Haag +

]]>
+ + 4.213227700645635 + 52.04260288332888 + 0 + 24.63686803544318 + 0 + 1.387289180270979e-005 + + #msn_sunny_copy69 + + 4.213209970684247,52.04268354765237,0 + +
+ + Sundial, Den Haag - Loosduinen + Thanks to A30

+ +A sundial made of wooden blocks. +The highest block in the middle is the style and casts its shadow each hour on one of the other blocks. + +

+Image source:www.dse.nl]]>
+ + 4.236038669148795 + 52.0499434967447 + 0 + 18.37312193280116 + 2.202011190893535e-011 + -0.3988978466888938 + + #msn_sunny_copy69 + + 4.236026636181407,52.049986562365,0 + +
+ + Sundial with light conductors - Paris, Les Halles +

+ +The sunlight falls on one of the three windows in the column (east, south, west) and over light conductors on the wall is indicated. + +

+ +The clock shows 16,40 o'clock. + +

+ +Quelle:http://www.home.uni-osnabrueck.de/ahaenel/sonnuhr/paris_halles.htm + +http://perso.orange.fr/cadrans.solaires/cadrans/cadran-halles-paris.html]]>
+ + 2.344185113917775 + 48.86294270160059 + 0 + 39.52787486507292 + 0 + -0.003533584730563007 + + #msn_sunny_copy69 + + 2.344143312335305,48.86302323987447,0 + +
+ + Sundial, Plymouth, Devon, UK + The gnonom is 27 foot high, the pool has 21 feet diameter. It was designed by architect Carole Vincent from Boscastle in Cornwall and was unvieled by Her Majesty the Queen on Friday July 22nd 1988 for a cost of cost £70,000 . The sundial runs one hour and seventeen minutes behind local clocks.

+

+

Image source:

+Image source:www.sundials.co.uk]]>
+ + -1.117890647596098 + 50.79319978711329 + 0 + 79.08348690288113 + 0 + 0.02100880488328328 + + #msn_sunny_copy69 + + -1.117887915142518,50.79336425684474,0 + +
+ + Sundial, Britzer Garten, Berlin + See photos on this page: +http://home.arcor.de/ruth.kirsch/sonnenuhr/berlin_1xxxx/berlin_1xxxx.htm + + 13.42078373972489 + 52.4366841172644 + 0 + 102.2086892967038 + 0 + -0.004885703167479627 + + #msn_sunny_copy69 + + 13.4207448482471,52.43682055829985,0 + + + + Sundial, Falkenplatz, Berlin + The original reasoning event for the construction of the sundial was the UNO climate conference 1995 in Berlin. The base stone of the wall spiral was layed at a festivity at the equinox of March 1995. Until June 1995 the main construction was completed, and at another festivity at the summer solstice the gnonom and the totem ("Lebensbaum") was installed by Berlin fire fighters.

+

+

The nearly spiral sundial was planned as a "living sundial" and initiated by the groups of the "Netzwerk Klimagipfel 95", mainly by the journalist T. Römer with the "Verein zur Rettung des Regenwaldes und Naturschutzgebietes La Macarena", and the "Netzwerk Spiel/Kultur" at the Prenzlauer Berg. + + +The covering clay stones were made out of three metric tons of white and brown clay, formed by children of about 50 institutions like school classes and kindergardens of the closer region. The stones were burned and installed in the summer of 1995. Partly they are constructed out of different materials, partly especially formed or ornamented. Six detail images are showing some examples: (White near Red - MC?, Smiley with Heart Eyes, Sun-Moon-Star, Red Broken and Patterned, Rain pits and Stone Hearts in Clay, Red near White - Clay Fish and Sunshine over the Sea). + +In September 1995 the sundial was completed. It was called "living sundial" because it was planned to replace the clay stones regulary when they are destroyed and to add some green to the outside wall of the clock. In December 1995 the clock got a special price of the local environmental administration.

+

.

+ + +

In September 1995 the sundial was completed. It was called "living sundial" because it was planned to replace the clay stones regulary when they are destroyed and to add some green to the outside wall of the clock. In December 1995 the clock got a special price of the local environmental administration.

+

+ +

This sundial was deconstructed at the end of 2002 or at the beginning of 2003:

+

+ +

Image source and infos:www.surveyor.in-berlin.de

]]>
+ + 13.40239121468946 + 52.54640622802566 + 0 + 55.75497205265645 + 1.489511345854323e-009 + 2.6367660621925e-005 + + #msn_sunny_copy69 + + 13.40233774797299,52.54645010247089,0 + +
+ + Sundial, Halde Schwerin, Castrop-Rauxel, Germany + Thanks to htd42

+

+ +http://www.ruhrgebiet.de/freizeit/sehenswuerdigkeiten/cr_halde_schwerin.shtml?print]]>
+ + 7.337404407947669 + 51.54597716006042 + 0 + 51.28632275218226 + 2.512805793870883e-009 + -6.529566789930303e-005 + + #msn_sunny_copy69 + + 7.337359256982781,51.54610609965799,0 + +
+ + Sundial, Lloydminster, Canada +

+

Image source and infos:www.mts.net

]]>
+ + -110.0353754682919 + 53.26386357821667 + 0 + 155.9861269181855 + 0 + -0.01432903343453666 + + #msn_sunny_copy69 + + -110.0355256583979,53.26413794825379,0 + +
+ + Giant Lady's Leg Sundial, Roselawn, Indiana, USA + The Sun Aura Nudist Resort opened in 1933. Back then it was called Club Zoro and its founder was Alois Knapp, a Chicago lawyer, German Nacktkulturist, editor of Sunshine and Health magazine, and "the father of nudism in America."

+ +

+ +

The club eventually passed into the hands of Dale and Mary Drost. Their son, Dick, had big ideas: he renamed the place Naked City, made it the home of the Ms. Nude Teeny Bopper Contest and the "Erin Go Bra-less" Dance on St. Patrick's Day, and had built the giant lady's leg sundial, 63 feet long and properly positioned to tell time -- a useful feature for wristwatchless nudists.

+ +

Naked City closed in 1986 when Dick was run out of Indiana on child molestation charges, but the leg remains and so does the resort, now under new management. The circular main building with the mirror gold windows is a combination office-sauna-restaurant.

+ +

The guy who paints the leg told us that Sun Aura is a "clothing optional" camp -- in other words, you don't have to get nude to take a picture of the big lady's leg. But for those who do choose to get into the spirit of things, a helpful sign on the exit road reads, "Stop. You Must Be Dressed Beyond This Point."

+ +

Roadside America

]]>
+ + -87.32599841452155 + 41.14248697221019 + 0 + 40.06529731982877 + 0 + -108.7495178792767 + + #msn_sunny_copy69 + + -87.32608203713804,41.14242622349031,0 + +
+ + Sundial, Ingleside, San Francisco, USA + Thanks to CostaPacific

+ +Most people in San Francsco have no idea that their city is host to the world's second largest sundial. It was built in 1913 as a gimic to attract people to a new housing development that was built arround the configuration of the old Ingleside Race Track. + +

+

Image source:]]> + + -122.4687521474299 + 37.72475779376939 + 0 + 104.1096478961583 + 0 + -6.694029629862418e-005 + relativeToGround + + #msn_sunny_copy69 + + -122.4687727980979,37.72497790751523,59.97947112427937 + + + + Sundial Bridge + Located in Redding, CA. Opened in 2004 this bridge actually acts as a sundial. The time can be read in a garden on the North side of the bridge. + +http://www.turtlebay.org/sundial/sundial.shtml + + -122.3775376532067 + 40.59329504591046 + 0 + 160.1654912126178 + 7.884938307004504e-010 + 0.008470312235033726 + + #msn_sunny_copy69 + + -122.3777030796087,40.59376952663914,0 + + + + Sundial, Jaipur,India + Villaman + +

+ + + + +

Jaipur Observatory Sundial


+
+

Walk through these doors and up the stairs to begin your journey along a line from Jaipur, India toward the North Celestial Pole. Such cosmic alignments abound in marvelous Indian observatories where the architecture itself allows astronomical measurements. The structures were built in Jaipur and other cities in the eighteenth century by the Maharaja Jai Singh II (1686-1743). Rising about 90 feet high, this stairway actually forms a shadow caster or gnomon, part of what is still perhaps the largest sundial on planet Earth. Testaments to Jai Singh II's passion for astronomy, the design and large scale of his observatories' structures still provide impressively accurate measurements of shadows and sightings of celestial angles. +

Jaipur Observatory Sundial

+

More here. + +

+]]> + + 75.82482649881683 + 26.924766672173 + 0 + 164.397137416247 + 0 + -0.02454798212483729 + relativeToGround + + #msn_sunny_copy69 + + 75.82474437483685,26.92504292845888,0 + + + + Sundial, Schothorstpark, Amersfoort, Netherlands + A large sundial in the Schothorstpark in Amersfoort. +Thanks to Acadvice]]> + + 5.385083481782106 + 52.17868238866643 + 0 + 49.70911801163624 + 5.249316070079438e-010 + 6.699999294207586e-006 + relativeToGround + + #msn_sunny_copy69 + + 5.385063337537176,52.17873082332495,0 + + + + Sundial, Jardin de Reuilly, Paris +

+ +

+Image source:http://perso.orange.fr

]]>
+ + 2.387204592843604 + 48.84242901629369 + 0 + 50.11592463998582 + 8.113900329668256e-010 + -0.001210217218456717 + relativeToGround + + #msn_sunny_copy69 + + 2.38716774037826,48.84252766103683,0 + +
+ + Sundial, Stockgrove, Soulbury, Buckinghamshire, UK + thanks to houdinia

+Sundial with analemmatic clock face. +

]]>
+ + -0.666503881371199 + 51.95548351688392 + 0 + 55.27920580004575 + 6.264058771241075e-010 + 0.06911766261471311 + relativeToGround + + #msn_sunny_copy69 + + -0.6665014664411046,51.95551857959676,0 + +
+ + Sundial, Halde Hoheward, Germany + The Obelisk – The Sundial

+ +

The seeming movement of the sun in the sky, resulting in the discrimination between day and night, was one of the earliest observations of nature performed by men. It enables us to experience the phenomenon “time” with our own senses. The first examples for telling the time with the help of the sun or its shadow date back to the Ancient World. The are numerous archetypes for sundials built inmany different styles, using different techniques.

+ +

The archetype for the horizontal sundial on top of the slagheap Hoheward is the sundial of the Roman Emperor Augustus on the Campus Martius in Rome.

+(It is unknown, whether this ancient obelisk was part of a complete sun dial with hour and declination lines on the morning and afternoon side or whether only a meridian line existed to measure the elevation of the sun in upper culmination. The today's scientific knowledge indicates the existence of a meridian.) The observation of the Obelisk's shadow on the sundial enables the observer to easily determine date and time. Apart from “time” one can also experience the laws of celestial mechanics. Men encounter themselves in relation to the cosmos.

+ +

Representing the first step in the realisation of the Astronomical Theme Park the Obelisk was opened on May 17th, 2005. It is located on the already completed south-eastern plateau of the slagheap at a height of 140 m above sea level. The shadowed area is 62 m in diameter.

+ + + +

+This picture shows the Obelisk after the end of the assembly on the day of the opening. Shortly before it was put on top of the readily prepared pedestal by a helicopter and then bolted. + +

+ +

http://www.horizontastronomie.de

+ + + +

http://de.wikipedia.org/wiki/Halde_Hoheward#Sonnenuhr_mit_Obelisk

+ +

http://www.horizontastronomie.de/animationen.htm

]]>
+ + 7.170033145228383 + 51.56646738931531 + 0 + 96.7791497847863 + 4.155528307086707e-010 + 0.006376147752644328 + relativeToGround + + #msn_sunny_copy69 + + 7.169892708740022,51.56683509795316,0 + +
+ + Sundial, Fachhochschule (FH) Bielefeld +

+http://www.fh-bielefeld.de/article/fh/4412/1/505?NavItemID=0&NavCatID=162]]>
+ + 8.555263115842216 + 52.02672953436973 + 0 + 50.10364671714684 + 0 + 0.001255164290936946 + relativeToGround + + #msn_sunny_copy69 + + 8.555215193531964,52.02681111856448,0 + +
+ + Sundial, Sun City, Arizona +

+ +

]]>
+ + -112.2739996808105 + 33.61902729376313 + 0 + 44.66059102278575 + 0 + 0.0001994953180518285 + relativeToGround + + #msn_sunny_copy69 + + -112.2740228273864,33.61913038777643,0 + +
+ + Sundial, Georgina Blach Intermediate School, Los Altos, CA +

]]>
+ + -122.083063541274 + 37.36394994353518 + 0 + 99.46493929648614 + 0 + -6.524992683547596e-005 + relativeToGround + + #msn_sunny_copy69 + + -122.0831077334675,37.3641379192763,0 + +
+ + Sundial, Hilltop Park, San Francisco +

]]>
+ + -122.3837414260284 + 37.73308769461563 + 0 + 76.96447255875415 + 0 + -0.0001251047167258125 + relativeToGround + + #msn_sunny_copy69 + + -122.3837885185873,37.73313852750733,0 + +
+ + Sundial, Berlin-Weißensee +

+ +http://www.be.schule.de/schulen/wfs/pages/sundials/Weissensee.html]]>
+ + 13.46637059089964 + 52.55408525446345 + 0 + 35.24186259647233 + 0 + -0.002133411261797274 + relativeToGround + + #msn_sunny_copy69 + + 13.46637589519183,52.55412143657096,0 + +
+ + Sundial, Olbers-Planetarium, Bremen +

]]>
+ + 8.806980778676786 + 53.06988134466393 + 0 + 24.09705977000565 + 0 + -0.001876272046377585 + relativeToGround + + #msn_sunny_copy69 + + 8.806963468445417,53.0698959991562,0 + +
+ + Sundial, Westbroekpark, Denn Haag +

]]>
+ + 4.290891177932192 + 52.10450647693549 + 0 + 20.57779559985518 + 0 + -0.8669355345663358 + relativeToGround + + #msn_sunny_copy69 + + 4.290865552422943,52.10453275113748,0 + +
+ + Sundial, Amersfoort, Netherlands +

]]>
+ + 5.374167244217593 + 52.15310253836927 + 0 + 31.45592479376158 + 1.426589610824431e-009 + -0.01164696084898205 + relativeToGround + + #msn_sunny_copy69 + + 5.374145665653813,52.15310809583514,0 + +
+ + Sundial, Botanical Gardens, Sydney, Australia +

+ +

]]>
+ + 151.2154952669206 + -33.86399908828604 + 0 + 16.43666728184123 + 8.675342058213797e-007 + -0.002067228419448193 + relativeToGround + + #msn_sunny_copy69 + + 151.2154882763944,-33.86398565287625,0 + +
+ + Team Disney Sundial, Walt Disney World, Florida + Oftencold + +

+ +http://www.de-zonnewijzerkring.nl/zw-arch/eng-home-zw-07-02.htm]]>
+ + -81.52113085122878 + 28.36541360352638 + 0 + 167.7307771712135 + 1.015026730473625e-011 + -0.006287852151169638 + relativeToGround + + #msn_sunny_copy69 + + -81.52134276012195,28.36559634883421,0 + +
+ + Sundial, Janskerkhof, Utrecht, Netherlands +

+ +

]]>
+ + 5.121095723583527 + 52.09338586502101 + 0 + 24.25734051739648 + 5.490226183683639e-010 + -0.0007122606404517594 + relativeToGround + + #msn_sunny_copy69 + + 5.121088800707085,52.09341776135472,0 + +
+ + Sundial, San Jose Rep Theater, San Jose, CA +

+ +

Image credit:www.groundspeak.com

]]>
+ + -121.8860266085782 + 37.33361545835343 + 0 + 32.31958319185324 + 0 + 1.418565866412994e-005 + relativeToGround + + #msn_sunny_copy69 + + -121.886064353331,37.33364018615777,0 + +
+ + Millennium Sundial, Greenwich Park, London +

+ +

Image credit:www.groundspeak.com

]]>
+ + -0.001522539653513039 + 51.48136176862654 + 0 + 61.96314954770909 + 2.850197260451716e-009 + -0.002911073287638733 + relativeToGround + + #msn_sunny_copy69 + + -0.00156808979284051,51.48142700407306,0 + +
+ + Sundial, Veterans Park, Waukesha, WI +

+ +

Image credit:www.groundspeak.com

]]>
+ + -88.2367572684424 + 43.00995357504599 + 0 + 49.0879478099675 + 0 + -2.769547716555237e-005 + relativeToGround + + #msn_sunny_copy69 + + -88.23678272979073,43.01004377682637,0 + +
+ + Underground Sundial, Munich, Germany +

+ +

Image credit:www.groundspeak.com

]]>
+ + 11.70480163926041 + 48.13338615699044 + 0 + 49.09160069235252 + 7.359413992305611e-011 + 1.363313751616389e-005 + relativeToGround + + #msn_sunny_copy69 + + 11.70474103166116,48.13350333174798,0 + +
+ + Sundial, Crown Hill cemetery, Indianapolis, Indiana, USA +

+ +

Image credit:www.groundspeak.com

]]>
+ + -86.17300915391851 + 39.82668935299838 + 0 + 35.63730089613371 + 0 + 2.616180723282867e-005 + relativeToGround + + #msn_sunny_copy69 + + -86.17304253331795,39.82668119645058,0 + +
+ + Sundial, Coppell, TX +

+ +

Image credit:www.groundspeak.com

]]>
+ + -97.02194975520763 + 32.95633568822581 + 0 + 61.19896168864369 + 0 + 1.826645706530163e-005 + relativeToGround + + #msn_sunny_copy69 + + -97.02199840401494,32.95643533824669,0 + +
+
+ + Low Resolution + + Sundial, Kota Baru Parahyangan + voorburger. +

]]>
+ + 107.4940550739811 + -6.852038750176605 + 0 + 296.7282563680993 + 2.08633946131246e-011 + 0.5509822616366601 + relativeToGround + + #msn_sunny_copy70 + + 107.4939718861608,-6.851748821808833,0 + +
+ + Sundial, Pajala, Sweden + The world's biggest sundial today is in the Torne Valley, north of the Arctic Circle. The Guinness Book of Records has put Pajala, northern Sweden, on the map, and its sundial - formed as a "round square".

+

+

The sundial in Pajala, 38.33 m. in diameter, holds the world record, according to the Guinness Book of Records. The previous record was held by Disney World in Orlando, Florida, with 37.18 m.

+ +

The sundial was inaugurated by the Swedish Minister of Labour Margareta Winberg in July 1996. Pajala is situated at 23.28 ° East, 67.21 ° North, which is 70 km north of the Arctic Circle, making a circular sundial possible. This is due to the fact that the Midnight Sun describes a complete circle over the horizon. + +

Its masts of dried fir form a unique spatiality around a circular "square". The site is especially used for local functions such as Pajala Fair, Romp Week and the Northern Lights Festival.

+ +

The central square in Pajala, through its size and latitude, offered conditions for a sundial dedicated to the Midnight Sun. Architect Mats Winsa took his inspiration from the square in Siena, and for the sculptures in the park - astronomical instruments in India dating back to the 18th century. Naturally, it was a challenge to compete with the previous record from 1991 by the world-famous Japanese architect, Arata Isozaki.

+ +

The sundial captures the sun's movement by allowing the shadow of the central gnomon to fall across the hour divisions of the surrounding posts. The gnomon, like the Earth's axis, points toward the Pole Star, which according to Finnish-Ugrian mythology (the region has Finnish roots) holds up the firmament. The "sun wheel" embedded in the ground here (forming a cross in the circle) is in fact a calendar. Water bubbles up from four sources corresponding to the four principal points of the compass. The water gathers in the central pond, which was designed with children in mind.

+ +

For their survival, humans have followed the rhythm of the sun. The need to observe the changing seasons and days led to the early development of the sundial. Our lives today are characterised by obedience to mechanical and national time - inventions separate from true solar time. The sundial displays true solar time, which in Pajala is half-an-hour ahead of national time.

+ +

The sundial in Pajala celebrates light, and acts as a reminder of its significance for all life by functioning as a biological clock in a world fettered by artificial time. The hormone rush in spring reminds us of our direct dependence on sunlight as living beings.

+ +

Info and image source:www.pajala.se

+ +

+

Image source:http://holmers.com

]]>
+ + 23.36723004664742 + 67.21282676944374 + 0 + 124.9604027877409 + 3.010594647959025e-010 + -1.130925335798896 + relativeToGround + + #msn_sunny_copy70 + + 23.36716252896882,67.21299216873888,0 + +
+ + Sundial, Tenerife, Spain +

+ +

+ +

+ +

+

Image source:http://members.aon.at

+ +

Interactice picture

]]>
+ + -16.56926659562192 + 28.08256590461729 + 0 + 88.29371157400612 + 0 + 8.633540737161729e-005 + relativeToGround + + #msn_sunny_copy70 + + -16.5693071701084,28.08261960124695,0 + +
+ + Sundial, Perranporth, UK +

]]>
+ + -5.157517535037663 + 50.34723421976403 + 0 + 65.69642310338585 + 0 + -0.01795551609583625 + relativeToGround + + #msn_sunny_copy70 + + -5.157537433789316,50.34733238709538,0 + +
+ + Sundial, Council Bluffs, Iowa, USA +

+

+

]]>
+ + -95.84953495410247 + 41.25887711431908 + 0 + 196.5752069699831 + 2.583166383376495e-010 + 0.0002124063872384501 + + #msn_sunny_copy70 + + -95.84981881431206,41.25888611306795,294.4878429401121 + +
+ + Sundial. Meckhofen, Leverkusen, Germany +

+

Image source:www.leverkusen.de

+ +

+ +

+

Image source:www.lev2000.de

]]>
+ + 7.083354426150351 + 51.04845387008112 + 0 + 66.17616066250443 + 9.735256695418331e-010 + 0.0006924896867520876 + relativeToGround + + #msn_sunny_copy70 + + 7.083321386023442,51.04852440832129,0 + +
+ + Sundial, Adler Planetarium, Chicago, USA +

]]>
+ + -87.60711153340705 + 41.86674796371171 + 0 + 27.37440941953917 + 0 + 0.008419825260544345 + + #msn_sunny_copy70 + + -87.60710764637246,41.86681374132155,0 + +
+ + Rose Garden Sundial, Christchurch, New Zealand + Thanks to NormB

+Rose Garden History + +

+Photo - NormB 11th April 2006
+Image Hosted by ImageShack.us

+Photo - NormB 11th April 2006
+Image Hosted by ImageShack.us]]> + + 172.621331272394 + -43.53038034442864 + 0 + 86.04933199573917 + 0 + 1.801092527765711 + + #msn_sunny_copy70 + + 172.6213650004974,-43.53035465311722,0 + + + + Sundial, Natchez Park + Thanks to caroling

+ +In Seaside, NW FL, USA on the Emerald Coast. Panoramic images and movies of a sundial and visions of Xtals (energy crystals) on the March equinox, 2006. See http://www.wholeo.net/Trips/Art/Web/TripsArt/Travel/Florida/borders/flBorders.htm]]>
+ + -86.14177717779702 + 30.32184243688109 + 0 + 46.50596341362312 + 9.523139707563741e-010 + 0.0925379903960088 + + #msn_sunny_copy70 + + relativeToGround + -86.14183223138707,30.32193188899003,3 + +
+ + Sundial, Charlotte, North Carolina, USA + Thanks to BrettHo

+On the roof of the International Trade Center is this gigantic sundial.]]>
+ + -80.84002590296151 + 35.22682691631484 + 0 + 73.21919569418378 + 0 + 12.34188537748346 + + #msn_sunny_copy70 + + -80.84002447413604,35.22696160522812,0 + +
+ + KTPalmerSundial, Carefree, Arizona, USA + seer
. +

+http://www.bigwaste.com/photos/az/sundial/]]> + + -111.9217799027029 + 33.8245907883639 + 0 + 119.8165563905356 + 2.774426682549449e-010 + -1.574999619300427e-005 + + #msn_sunny_copy70 + + -111.9218327194278,33.82468559440962,0 + + + + Sundial, University of Science and Technology, Hong Kong +

+ +

Image source:http://perso.orange.fr

]]>
+ + 114.2630116779084 + 22.33749401387006 + 0 + 111.6162130745504 + 0 + 0.0003913059632004609 + relativeToGround + + #msn_sunny_copy70 + + 114.2629690669868,22.33764072332584,0 + +
+ + Sundial, Pekin, Illinois +

+

Image source:www.pekin.net

+ +

]]>
+ + -89.63076522889526 + 40.56267466732153 + 0 + 161.1716772997438 + 0 + 0.009112399365723663 + relativeToGround + + #msn_sunny_copy70 + + -89.63089561079578,40.56281064339486,0 + +
+ + Sundial, Edinburg, Hidalgo, USA +

+ +

<7p>]]> + + -98.17095602857175 + 26.30618568257091 + 0 + 122.1950947751469 + 0 + -0.005400653570135644 + relativeToGround + + #msn_sunny_copy70 + + -98.17104492887813,26.30639237212602,0 + + + + Sundial, Keppel Henge, +

+

http://www.steveirvine.com/sundial.html

+ + +http://www.mts.net/~sabanski/sundial/sotw_canada_keppel.htm]]>
+ + -80.94374423682251 + 44.79038599160477 + 0 + 164.0454159373261 + 0 + -0.007334046679263517 + relativeToGround + + #msn_sunny_copy70 + + -80.94383190841853,44.79038705635566,0 + +
+ + Sundial at Science North, Sudbury, Ontario +

+ +

+ +

+ +http://www.mts.net/~sabanski/sundial/sotw_canada_sn.htm]]>
+ + -80.99582033913947 + 46.46976830028441 + 0 + 85.82915438648354 + 0 + 0.0003317215281456315 + relativeToGround + + #msn_sunny_copy70 + + -80.99588716181201,46.46988111501548,0 + +
+ + Sundial, Amble, UK +

+http://ourworld.compuserve.com/homepages/Patrick_Powers/amble.htm]]>
+ + -1.581634687429885 + 55.33514811404725 + 0 + 62.55005662709024 + 8.224100904372228e-010 + -0.008198736253532122 + relativeToGround + + #msn_sunny_copy70 + + -1.581720999552488,55.3352025087941,0 + +
+ + Sundial, University of Maryland, College Park +

+http://www.mts.net/~sabanski/sundial/sotw_usa_mland.htm]]>
+ + -76.94256839624576 + 38.98603731470438 + 0 + 69.47353847793947 + 0 + -0.00947513273561203 + relativeToGround + + #msn_sunny_copy70 + + -76.94253686137193,38.98616316295006,0 + +
+ + Sundial, Fort San Felipe del Morro, Puerto Rico +

]]>
+ + -66.11899284422442 + 18.46786530709565 + 0 + 122.9114928009769 + 0 + 0.001639161983653822 + relativeToGround + + #msn_sunny_copy70 + + -66.11900470518663,18.4679529172629,0 + +
+ + Sundial, Rose Garden, Phoenix +

]]>
+ + -112.0911976535298 + 33.47007786030556 + 0 + 26.72933602203598 + 4.053298886062559e-011 + 0.0001093808645832187 + relativeToGround + + #msn_sunny_copy70 + + -112.0912131593616,33.4701136927338,0 + +
+ + Sundial, Tucson, Arizona +

]]>
+ + -110.9748374101104 + 32.21591986778585 + 0 + 42.12321141209996 + 0 + -0.0002919115031976927 + relativeToGround + + #msn_sunny_copy70 + + -110.9748562940359,32.21593667064053,0 + +
+ + Sundial, Flandrau Planetarium, Tucson +

]]>
+ + -110.9477979774635 + 32.23224398378896 + 0 + 33.29181342845133 + 3.6608792363658e-017 + 0.0001605580448802178 + relativeToGround + + #msn_sunny_copy70 + + -110.9478231994691,32.23228861367718,0 + +
+ + Sundial, Vietnam Veterans Memorial, Kentucky +

+ +http://www.vietvet.org/kymem.htm]]>
+ + -84.8640348419774 + 38.17725413584271 + 0 + 136.9757698325458 + 1.322889725758878e-010 + -0.0003615314930558497 + relativeToGround + + #msn_sunny_copy70 + + -84.86405079639164,38.17749508752453,0 + +
+ + Sundial, Claremont, California +

+ +

]]>
+ + -117.7288129576152 + 34.0992297660836 + 0 + 60.73786036422235 + 1.321942869740197e-009 + -0.002677989156069468 + relativeToGround + + #msn_sunny_copy70 + + -117.7288254316814,34.09928418001653,0 + +
+ + Sundial, Hoogezand, Netherlands +

+ +http://www.hoogezand-sappemeer.nl/index.php?simaction=content&mediumid=10&pagid=335&fontsize=10&stukid=2597]]>
+ + 6.73589462010654 + 53.15594584104552 + 0 + 139.6528910743265 + 1.45482979338997e-010 + 0.002950231733866508 + relativeToGround + + #msn_sunny_copy70 + + 6.73578802230557,53.15607461082266,0 + +
+ + Sundial, Hoogeveen, Netherlands +

]]>
+ + 6.469908327982116 + 52.72012840714818 + 0 + 73.67703044709106 + 4.200981642085038e-012 + -0.0001367978398152192 + relativeToGround + + #msn_sunny_copy70 + + 6.469803362243752,52.72017851542101,0 + +
+ + Sundial, Bicentennial Park, Homebush, Australia +

]]>
+ + 151.0785472180646 + -33.84641177017981 + 0 + 163.2808310648841 + 1.201655085829064e-011 + 4.265000695512084e-006 + relativeToGround + + #msn_sunny_copy70 + + 151.0784520824468,-33.84631674048389,0 + +
+ + Sundial, Heerenveen, Netherlands +

]]>
+ + 5.948360581453846 + 52.95021342348947 + 0 + 125.5263208537314 + 3.779142327674902e-010 + 2.174750871196e-005 + relativeToGround + + #msn_sunny_copy70 + + 5.94828156186523,52.95041125062435,0 + +
+ + Sundial, Zoetermeer, Netherlands +

+ +http://www.chabot.demon.nl/sundials/index3.htm]]>
+ + 4.48801136665803 + 52.03630549285332 + 0 + 64.63218166015471 + 0 + -0.0001443420778625332 + relativeToGround + + #msn_sunny_copy70 + + 4.48796065586356,52.03633054351467,0 + +
+ + Sundial, Lancaster, Lancashire, UK +

+ +

+ +

]]>
+ + -2.781711751106886 + 54.04618182827939 + 0 + 59.27999100628823 + 0 + 2.19677695423205e-005 + relativeToGround + + #msn_sunny_copy70 + + -2.781728090880108,54.0462693701831,0 + +
+ + Sundial, Nida, Lithuania +

]]>
+ + 20.99037235133227 + 55.29501544197078 + 0 + 177.9373429950499 + 4.620370977113893e-011 + 0.0005344762650417512 + relativeToGround + + #msn_sunny_copy70 + + 20.99033020665709,55.29525661423606,0 + +
+ + Sundial, Tavel, France +

+ +http://www.de-zonnewijzerkring.nl/zw-arch/eng-home-zw-07-03.htm]]>
+ + 4.700355808916944 + 44.00154771856498 + 0 + 254.0752666918187 + 2.46623000787332e-010 + -0.0002391009248289202 + relativeToGround + + #msn_sunny_copy70 + + 4.700351044280055,44.00172761202828,0 + +
+ + Sundial, St. Michielsgestel, Netherlands +

+ +

]]>
+ + 5.346086124850936 + 51.64327189620946 + 0 + 111.9437734662239 + 6.47253437341193e-010 + 0.002375287388397793 + relativeToGround + + #msn_sunny_copy70 + + 5.346049636943462,51.64334209867396,0 + +
+ + Sundial, Halle Saale, Germany +

+ +More photos:http://home.arcor.de/peter.lindner/sonnenuhr/h/halle_saale_061xx/halle_saale_061xx.htm]]>
+ + 11.94846541701928 + 51.49449346439673 + 0 + 51.14591828296211 + 0 + 0.0003207363265956715 + relativeToGround + + #msn_sunny_copy70 + + 11.9484244247504,51.49452140024068,0 + +
+ + Sundial, Abano Terme, Italy +

+ +http://members.aon.at/sundials/bild43_d.htm]]>
+ + 11.7902588657866 + 45.36024293920432 + 0 + 88.27261765894279 + 5.645767845941023e-011 + 0.0006214879519801648 + relativeToGround + + #msn_sunny_copy70 + + 11.79017178556217,45.36037512888652,0 + +
+ + Sundial, Gasworks Park, Seattle, USA +

]]>
+ + -122.3362979085422 + 47.64532276753428 + 0 + 144.9142629968483 + 1.398328526418574e-010 + -0.002257590778485548 + relativeToGround + + #msn_sunny_copy70 + + -122.3363617333393,47.64542146106401,0 + +
+ + Sundial, Biarritz, France +

]]>
+ + -1.554172472866423 + 43.49326953476108 + 0 + 25.2767811064234 + 1.050991544755056e-009 + 0.004580769709390601 + relativeToGround + + #msn_sunny_copy70 + + -1.554180928484328,43.49329288628002,0 + +
+ + Sundial, Biarritz, France +

]]>
+ + -1.566562523529829 + 43.48379630381277 + 0 + 21.65084680450158 + 3.134801309486055e-010 + -0.003938809314781338 + relativeToGround + + #msn_sunny_copy70 + + -1.566563732160418,43.48381046528652,0 + +
+ + Sundial, Gardens of Easton Lodge, UK +

+ +

+ +http://www.sundials.co.uk/newdials.htm]]>
+ + 0.3149818536825662 + 51.89078052542742 + 0 + 55.96449646091584 + 4.648925194094304e-010 + 0.00100690081475908 + relativeToGround + + #msn_sunny_copy70 + + 0.3149732952370528,51.89085713320831,0 + +
+ + Sundial, Drake University, Des Moines, Iowa, USA +

]]>
+ + -93.65212284615454 + 41.60195541103381 + 0 + 78.72982107342352 + 1.765081595632672e-010 + 0.001286572559733559 + relativeToGround + + #msn_sunny_copy70 + + -93.65218647671061,41.60204463077999,0 + +
+ + Sundial, River State Park, Indianapolis, USA +

]]>
+ + -86.17152524772823 + 39.76773209074677 + 0 + 54.39844455317644 + 0 + 0.002275213067656348 + relativeToGround + + #msn_sunny_copy70 + + -86.17158357583082,39.76772499391254,0 + +
+ + Sundial, Lawrence Hall of Science, Berkeley, CA, USA +

]]>
+ + -122.2467934369336 + 37.87843955912407 + 0 + 75.73772829567238 + 0 + -0.0005027058674008065 + relativeToGround + + #msn_sunny_copy70 + + -122.2468395686324,37.87850249930867,0 + +
+ + Sundial, Riverwalk, Augusta, Georgia, USA +

]]>
+ + -81.96495913544699 + 33.47855115889769 + 0 + 24.10683016246917 + 0 + -0.004039593559848222 + relativeToGround + + #msn_sunny_copy70 + + -81.96497422223469,33.47856125757188,0 + +
+ + Sundial, Reggio nell'Emilia, Italy +

+

Image source:http://perso.orange.fr

]]>
+ + 10.64303919389926 + 44.71779646338597 + 0 + 189.7095730357674 + 0 + 0.0003188808607201916 + relativeToGround + + #msn_sunny_copy70 + + 10.64294491831197,44.71794161105381,0 + +
+ + Sundial, Rennes, France +

+ +

Image source:http://perso.orange.fr

]]>
+ + -1.701676278457902 + 48.13126501865703 + 0 + 61.61200771227915 + 0 + -7.297875936612596e-006 + relativeToGround + + #msn_sunny_copy70 + + -1.701699217745187,48.13129604209563,0 + +
+ + Sundial, Schneverdingen, Germany +

]]>
+ + 9.790867938787324 + 53.12943797238091 + 0 + 106.7617213575405 + 4.722006958129564e-010 + 0.00116683463628678 + relativeToGround + + #msn_sunny_copy70 + + 9.790707601654233,53.12958381093443,0 + +
+ + Sundial Obelisk, Charleston, South Carolina +

+ +

Image credit:www.groundspeak.com

]]>
+ + -79.93166502066842 + 32.76970334074068 + 0 + 75.62015855417492 + 4.052617221081382e-011 + 1.8933011389851e-005 + relativeToGround + + #msn_sunny_copy70 + + -79.93172500691688,32.76973746165206,0 + +
+ + Sundial, Morehead Planetarium, Chapel Hill, North Carolina +

+ +

Image credit:www.groundspeak.com

]]>
+ + -79.050938325099 + 35.91448691988588 + 0 + 64.77863580575449 + 0 + 1.662447442472179e-005 + relativeToGround + + #msn_sunny_copy70 + + -79.05097493816135,35.91457037097104,0 + +
+ + Sundial, Berkeley, +California +

+ +

Image credit:www.groundspeak.com

]]>
+ + -122.3174670551103 + 37.86291969151575 + 0 + 46.45520126730318 + 1.288314315217904e-009 + 2.022127862982459e-005 + relativeToGround + + #msn_sunny_copy70 + + -122.317517078111,37.86295037394118,0 + +
+ + Forest Lawn Cemetery Sundial, Buffalo, NY +

+ +

Image credit:www.groundspeak.com

]]>
+ + -78.85654999999994 + 42.92531666666667 + 0 + 76.25216432595194 + 0 + 1.305178628551349e-014 + relativeToGround + + #msn_sunny_copy70 + + -78.85660856395873,42.92539096384056,0 + +
+ + Ruston Way Sundial ,Tacoma, Washington +

+ +

Image credit:www.groundspeak.com

]]>
+ + -122.4622812282256 + 47.27566486193976 + 0 + 62.22457114364932 + 0 + 0.0001239840172672445 + relativeToGround + + #msn_sunny_copy70 + + -122.4623519976878,47.27567991760397,0 + +
+ + Sundial ,Science Central, Fort Wayne, Indiana +

+ +

Image credit:www.groundspeak.com

]]>
+ + -85.1392719076301 + 41.09135262868964 + 0 + 39.45104173043256 + 0 + -1.439899387224993e-005 + relativeToGround + + #msn_sunny_copy70 + + -85.13931366905783,41.09136114213859,0 + +
+ + Berkswich Millennium Sundial, Broc Hill, Staffordshire, UK +

+ +

Image credit:www.groundspeak.com

]]>
+ + -2.038136129920761 + 52.77711389120437 + 0 + 29.50351061813827 + 0 + 3.758749562499077e-005 + relativeToGround + + #msn_sunny_copy70 + + -2.038162283146562,52.77714418176907,0 + +
+ + Sundial, Tazacorte Beach ,La Palma island +

+ +

Image credit:www.groundspeak.com

]]>
+ + -17.9461489138289 + 28.65121498294262 + 0 + 64.36805201552387 + 0 + 4.047704004228316e-005 + relativeToGround + + #msn_sunny_copy70 + + -17.94620263531645,28.65124065936443,0 + +
+ + Sundial, Rochester, NY +

+ +

Image credit:www.groundspeak.com

]]>
+ + -77.66915367541856 + 43.0844306339545 + 0 + 61.69080872372956 + 0 + 9.994948692290747e-005 + relativeToGround + + #msn_sunny_copy70 + + -77.66917908415978,43.08440844604031,0 + +
+ + Sundial, Center of the World, Felicity, CA +

+ +

+The 15 foot Sundial at Felicity is a three-dimensional bronze of Michelangelo's Arm of God painted on the Sistine Chapel ceiling. The arm was sculpted and cast in bronze in New England. The rock is local but the installation required the assistance of a mining engineer and a special drill. The bronze Roman numerals give the time. A sundial is precisely accurate once a year and this was set at noon on Christmas Day. The arm points to the Hill of Prayer, site of the Church on the Hill at Felicity. +At the entrance to The Center of the World campus is a 25 ft. high section of the original stairway of the Eiffel Tower. In 1983, the Government of France removed approximately 500 ft. of the original stairway. Built with the technology of the 1860's, the weight of approximately 54,000 lbs. was causing sway at the top of the then 94 year old tower. The 6,600 lb. section serves no practical purpose, but is part of the spirit of Felicity. +The idea of making Felicity the Center of the World came to Jacques-André when he'd been mayor only a few months. Somehow he convinced Imperial County, CA, to recognize his claim. Soon he had convinced the Institut Geographique National of France, General Dynamics Corporation, and The People's Republic of China to recognize it as well. "I knew I had to build something, but I didn't know what. My wife said, 'It's a desert; why not a pyramid?' So Jacques-André had built a 21-foot-tall pink marble pyramid, its interior lined with mirrors, a plaque embedded in the floor, marking the exact spot. For a dollar, tourists can now stand on the official Center Of The World and take a picture themselves at the official "Center Of The World". +The Felicity Post Office was dedicated on 5 December 1987 at a time when thousands of small post offices were being eliminated as an economy measure. The town, whose population numbered two, saw over 2,300 letters mailed that day. The dedication ceremony was highlighted by a speech in Chinese by Consul Zhou of the People’s Republic of China who traveled 600 miles for the occasion. It is operated by the town at a cost to the Federal Government of one dollar per year. Twenty uncashed one dollar checks are on file.

+ +

Image and info credit:www.groundspeak.com

]]>
+ + -114.7654750861393 + 32.74988921016088 + 0 + 72.95555856498569 + 0 + 3.146266385893141e-005 + relativeToGround + + #msn_sunny_copy70 + + -114.7655284077745,32.74992976207647,0 + +
+ + University of São Paulo Sundial, Sao Paulo, Brazi +

+ +

Image credit:www.groundspeak.com

]]>
+ + -46.7204986760494 + -23.56120553413547 + 0 + 122.7188487961642 + 0 + 2.610051397350573e-005 + relativeToGround + + #msn_sunny_copy70 + + -46.7205459522717,-23.56115337159118,0 + +
+ + Slate bowl Sundial, Holker, UK +

+ +

Image credit:www.groundspeak.com

]]>
+ + -2.987191130383048 + 54.188865359179 + 0 + 98.16442365143851 + 2.595660029656298e-010 + 0.000142350860720713 + relativeToGround + + #msn_sunny_copy70 + + -2.987342530279506,54.18895843924356,0 + +
+ + Sundial, Jardin des Doms, Avignon +

+ +

Image credit:www.groundspeak.com

]]>
+ + 4.807697613943427 + 43.95301885165002 + 0 + 32.75914708134153 + 1.205283678723288e-009 + 2.147953504845766e-005 + relativeToGround + + #msn_sunny_copy70 + + 4.807672022945837,43.95303620373285,0 + +
+ + Rillito Riverpark Sundial, Tucson, AZ +

+ +

Image credit:www.groundspeak.com

]]>
+ + -111.0075277787534 + 32.30113621710221 + 0 + 94.15682746212195 + 0 + 2.968664599173171e-005 + relativeToGround + + #msn_sunny_copy70 + + -111.0075933392788,32.30113929573149,0 + +
+ + Helium Monument Sundial, Amarillo, TX +

+ +

Image credit:www.groundspeak.com

]]>
+ + -101.9132978901728 + 35.19956726276647 + 0 + 60.53404995378031 + 5.162016480480558e-011 + 3.00374135059527e-005 + relativeToGround + + #msn_sunny_copy70 + + -101.9133182362553,35.19966266329223,0 + +
+ + Sundial, Hershey, Pennsylvania +

+ +

Image credit:www.groundspeak.com

]]>
+ + -76.62980321024054 + 40.27170452963257 + 0 + 72.41553799015709 + 2.798231534250927e-010 + 6.256605840320539e-005 + relativeToGround + + #msn_sunny_copy70 + + -76.6298565862236,40.2718754812139,0 + +
+ + King Neptune Sundial, Hilton Head Island, South Carolina +

+ +

Image credit:www.groundspeak.com

]]>
+ + -80.72801698168738 + 32.18076491029077 + 0 + 86.36647046692004 + 2.346233297172379e-010 + 8.72178085589082e-006 + relativeToGround + + #msn_sunny_copy70 + + -80.72806102317654,32.18084680335104,0 + +
+ + Jane Larue Memorial Sundial - Ann Arbor, Michigan +

+ +

Image credit:www.groundspeak.com

]]>
+ + -83.66222470201295 + 42.30114702626376 + 0 + 26.29476256996721 + 0 + 0.0001291940559531826 + relativeToGround + + #msn_sunny_copy70 + + -83.66224748552365,42.30117333470928,0 + +
+
+ + Schoolyard Sundials + + Sundial, Julius-Brecht-Allee, Bremen + + 8.8674012861685 + 53.07651505713779 + 0 + 20.6687721420542 + 9.001122528249614e-011 + -0.00437506724289509 + relativeToGround + + #msn_sunny_copy69 + + 8.867391721405184,53.07654483342672,0 + + + + Sundial, Drebberstraße, Bremen +

]]>
+ + 8.898052233187912 + 53.0400952944841 + 0 + 14.44345748598086 + 0 + -0.001637659480767247 + relativeToGround + + #msn_sunny_copy69 + + 8.898047664850367,53.04011230005033,0 + +
+ + Sundial, Butjadingersrasse, Bremen +

]]>
+ + 8.759747956980032 + 53.08143879125452 + 0 + 37.83897098076405 + 0 + -0.002629545926081431 + relativeToGround + + #msn_sunny_copy69 + + 8.759712018733111,53.08151322706201,0 + +
+
+ + In Progress + + Sundial, Greenwich, USA +

]]>
+ + -73.61498302559443 + 41.02226092221508 + 0 + 149.2259168633856 + 1.357926888487057e-010 + -0.001539166856947675 + relativeToGround + + #msn_sunny_copy69 + + -73.61504279924034,41.022311140554,0 + +
+ + Sonnenuhr? + + 11.05508326700377 + 49.45922489288633 + 0 + 50.88443884213967 + 8.335955203191607e-009 + 0.0196675278275586 + relativeToGround + + #msn_sunny_copy69 + + 11.0551380716084,49.45927364486676,0 + + + + Sundial, Edgewood Park, New Haven, USA +

+ +

]]> + + -72.95215163561284 + 41.31399188322968 + 0 + 154.2904142456261 + 0 + 0.002187256502984029 + relativeToGround + + #msn_sunny_copy69 + + -72.95224192688632,41.31401837758977,0 + + + + Sundial, Pearl City, Oahu, USA +

]]>
+ + -157.975920511215 + 21.39370171784438 + 0 + 93.82906502148613 + 0 + -0.001426474135915891 + relativeToGround + + #msn_sunny_copy69 + + -157.9759385077734,21.39376422631041,0 + +
+ + Sundial + http://maget.maget.free.fr/SiteMont/index.html + + -1.511135684750573 + 48.63640399624012 + 0 + 623.6899626138724 + 0 + -1.851737885201182e-005 + relativeToGround + + #msn_sunny_copy69 + + -1.511518347366319,48.63786003229999,0 + + + + Mont-Saint-Michel + http://maget.maget.free.fr/SiteMont/MSpage4.htm + + http://maget.maget.free.fr/SiteMont/images/le_Mont_Solaire-Land%20Art.jpg + 0.75 + + + 48.63770978435333 + 48.6344604605756 + -1.5070705975067 + -1.514375149320612 + -11.46597601725745 + + + + Sundial Park, Ludiver park + http://perso.orange.fr/cadrans.solaires/cadrans/cadran-parc-ludiver.html + + -1.727863357864637 + 49.63119498354116 + 0 + 473.1060190443535 + 3.883358970183465e-011 + 0.0005701632901766135 + relativeToGround + + #msn_sunny_copy69 + + -1.728331456927833,49.63191584214422,0 + + + + Sonnenuhr? + + 7.68545763101957 + 51.53642499090419 + 0 + 23.70363190324798 + 4.475657800962137e-010 + -0.1674345977313924 + relativeToGround + + #msn_sunny_copy69 + + 7.685416995069303,51.53648149450991,0 + + + + Sundial at Tower of London + ]]> + + -0.07656780337525181 + 51.50981727675416 + 0 + 61.73369699893549 + 9.251491983355112e-010 + 0.009688876514144714 + + #msn_sunny_copy69 + + -0.07656780337525181,51.50981727675417,0 + + + + War Veterans' Memorial Park Sundial, Florida, United States + + -82.77333790901622 + 27.8036881517592 + 0 + 96.43655563554265 + 4.405141995417006e-010 + 9.892674215924156e-005 + relativeToGround + + #msn_sunny_copy69 + + -82.77341348054247,27.80374932310448,0 + + +
+
+
+
diff --git a/openlayers/examples/label-scale.html b/openlayers/examples/label-scale.html new file mode 100644 index 0000000000..d6d32ed764 --- /dev/null +++ b/openlayers/examples/label-scale.html @@ -0,0 +1,34 @@ + + + + + + + OpenLayers Scale Dependent Labels + + + + + +

Scale Dependent Labels Example

+
+ label, scale, stylemap +
+

+ Demonstrates how to use a StyleMap for displaying scale dependent labels. +

+
+
+

+ This example uses rule based styling to change the how features are + labeled at different scales. An OpenLayers.Rule object + can have minScaleDenominator and + maxScaleDenominator properties to control when the + provided symbolizer should be used. +

+ View the source to see how this is done. +

+
+ + + diff --git a/openlayers/examples/label-scale.js b/openlayers/examples/label-scale.js new file mode 100644 index 0000000000..a46fe4b71c --- /dev/null +++ b/openlayers/examples/label-scale.js @@ -0,0 +1,72 @@ +// Create 50 random features, and give them a "type" attribute that +// will be used for the label text. +var features = new Array(50); +for (var i=0; i + + + + + + OpenLayers Late Rendering Example + + + + + + +

Late Rendering

+ +
+ creation, render, div +
+ +

+ Demonstrates how a map can be rendered to an empty container after + construction by calling the render method. +

+
+
+

In cases where you need to create a map first and render it to some + container later, call the map constructor without a "div" argument. + In this case, you can provide the options object as the first argument. + To render your map to some container after construction, call the map's + render method with the container id.

+
+ + diff --git a/openlayers/examples/layer-opacity.html b/openlayers/examples/layer-opacity.html new file mode 100644 index 0000000000..5fc76a80a9 --- /dev/null +++ b/openlayers/examples/layer-opacity.html @@ -0,0 +1,95 @@ + + + + + + + OpenLayers Layer Opacity Example + + + + + + + +

Layer Opacity Example

+ +
+ opacity, transparent, transparency +
+ +

+ Demonstrate a change in the opacity for an overlay layer. +

+ +
+ +
+

+ Note that if you also have the setOpacity method defined on the Layer + class, you can tweak the layer opacity after it has been added to the map. +

+

Opacity: + << + + >> +

+

IE users: Wait until the shade layer has finished loading to try this.

+
+ + diff --git a/openlayers/examples/layerLoadMonitoring.html b/openlayers/examples/layerLoadMonitoring.html new file mode 100644 index 0000000000..a8a17685c3 --- /dev/null +++ b/openlayers/examples/layerLoadMonitoring.html @@ -0,0 +1,135 @@ + + + + + + + OpenLayers Layer Load Monitoring Example + + + + + + + + +

Layer Load Monitoring Example

+ +
+ monitor, loading +
+ +

+ Demonstrate a method for monitoring tile loading performance. +

+ +
+ +
+
+ Events Log: +
+ + +
+ +
+
+ + diff --git a/openlayers/examples/layerswitcher.html b/openlayers/examples/layerswitcher.html new file mode 100644 index 0000000000..5e3f6b552f --- /dev/null +++ b/openlayers/examples/layerswitcher.html @@ -0,0 +1,60 @@ + + + + + + + OpenLayers Layer Switcher Example + + + + + + +

Layer Switcher Example

+ +
+ tree, layerswitcher, reposition +
+ +

+ Demonstrates the use of the LayerSwitcher outside of the OpenLayers window. +

+ +
+
+
+

This demonstrates use of the LayerSwitcher outside the map div. It also shows use + of the displayInLayerSwitcher option on the Layer to cause it to not display in the + LayerSwitcher.

+
+ + diff --git a/openlayers/examples/lite.html b/openlayers/examples/lite.html new file mode 100644 index 0000000000..d4ae7e0013 --- /dev/null +++ b/openlayers/examples/lite.html @@ -0,0 +1,39 @@ + + + + + + + OpenLayers Basic Single WMS Example + + + + + + +

Basic Single WMS Example

+ +
+ basic, simple, minimal, cleanup +
+ +
Show a Simple Map
+ +
+ +
+

This example shows a very simple layout with minimal controls. + This example uses a single WMS base layer.

+
+ + diff --git a/openlayers/examples/mapguide.html b/openlayers/examples/mapguide.html new file mode 100644 index 0000000000..5ecc8b2913 --- /dev/null +++ b/openlayers/examples/mapguide.html @@ -0,0 +1,155 @@ + + + + + + + OpenLayers MapGuide Layer Example + + + + + + + +

MapGuide Layer Example

+ +
+ MapGuide, basic +
+ +

+ Demonstrates how to create MapGuide tiled and untiled layers. +

+ +

If prompted for a password, username is Anonymous and an empty password

+ +
+
+
+ + diff --git a/openlayers/examples/mapserver.html b/openlayers/examples/mapserver.html new file mode 100644 index 0000000000..39e76de1c9 --- /dev/null +++ b/openlayers/examples/mapserver.html @@ -0,0 +1,41 @@ + + + + + + + MapServer Layer + + + + + + +

MapServer Layer

+
UMN Mapserver, tile, tiled
+
Shows MapServer Layer
+
+
+

This is an example of using a MapServer Layer with a gutter + parameter. The gutter parameter is used to try to limit the edge + effects between tiles.

+
+ + diff --git a/openlayers/examples/mapserver_untiled.html b/openlayers/examples/mapserver_untiled.html new file mode 100644 index 0000000000..d416532c10 --- /dev/null +++ b/openlayers/examples/mapserver_untiled.html @@ -0,0 +1,43 @@ + + + + + + + MapServer Single Tile Mode + + + + + + + +

MapServer Single Tile Mode

+
+ UMN Mapserver, basic, singleTile +
+
Shows single tile MapServer Layer
+
+
+

This shows an example of using a MapServer Layer in single tile + mode. Single tile mode can be useful when pulling data from dynamic + sources.

+
+ + diff --git a/openlayers/examples/marker-shadow.html b/openlayers/examples/marker-shadow.html new file mode 100644 index 0000000000..70482555de --- /dev/null +++ b/openlayers/examples/marker-shadow.html @@ -0,0 +1,152 @@ + + + + + + + OpenLayers: Vector Graphics with Shadows + + + + + + + +

Marker Shadows using Background Graphics/Z-Indexes

+ +
+ markers, shadow, style +
+ +

+ This example shows off marker shadows using background graphics and z-indexes. Move the features around to show the shadows' interaction. +

+ +
+ + + + + + + + + +
+
+
+
+ The features in this map were generated at random. Each of these features have a backgroundGraphic property set in the style map to add a shadow image. Note that the background graphics are not duplicated features with a different style. +

+ The shadows were set to have a different z-index than the markers themselves, using the backgroundGraphicZIndex property. This makes sure all shadows stay behind the markers, keeping a clean look. The shadows were also placed nicely relative to the external graphic using the backgroundXOffset and backgroundYOffset property. +

+ Y-ordering on the layer is enabled. See the ordering example. +
+
+ +
+ + + + diff --git a/openlayers/examples/markerResize.html b/openlayers/examples/markerResize.html new file mode 100644 index 0000000000..cb59bcf852 --- /dev/null +++ b/openlayers/examples/markerResize.html @@ -0,0 +1,60 @@ + + + + + + + Resize a Marker + + + + + + +

Resize a Marker

+
+ animation, resizing, style, size +
+
Dynamically resize a marker
+
+
+

This example shows how to create a OpenLayers.Layer.Markers layer, + add an icon, put it into a marker, and add the marker to the layer. + Once the marker has been added it is possible to use setSize() on the + icon in order to resize the marker.

+
+
click to resize marker
+ + diff --git a/openlayers/examples/markers.html b/openlayers/examples/markers.html new file mode 100644 index 0000000000..7d9552f83c --- /dev/null +++ b/openlayers/examples/markers.html @@ -0,0 +1,59 @@ + + + + + + + Markers Layer Example + + + + + + +

Markers Layer Example

+
Marker, event, mousedown, popup, inco
+
Show markers layer with different markers
+
+
+

This is an example of an OpenLayers.Layers.Markers layer that shows + some examples of adding markers. Also demonstrated is registering a + mousedown effect on a marker.

+
+ + diff --git a/openlayers/examples/markersTextLayer.html b/openlayers/examples/markersTextLayer.html new file mode 100644 index 0000000000..b8e1acbc94 --- /dev/null +++ b/openlayers/examples/markersTextLayer.html @@ -0,0 +1,41 @@ + + + + + + + Using a Layer.Text to display markers + + + + + + +

Using a Layer.Text to display markers

+
+ textlayer, csv, tsv, basic, popup +
+

+ The Layer.Text class reads a Tab seperated values file and displays it as markers on + the map. +

+
+ + diff --git a/openlayers/examples/measure.html b/openlayers/examples/measure.html new file mode 100644 index 0000000000..ed3ea9747f --- /dev/null +++ b/openlayers/examples/measure.html @@ -0,0 +1,193 @@ + + + + + + + + + + + + + +

OpenLayers Measure Example

+
+ measuring, geodesic, area, length, distance +
+

+ Demonstrates the measure control to measure distances and areas. +

+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+

Note that the geometries drawn are planar geometries and the + metrics returned by the measure control are planar measures by + default. If your map is in a geographic projection or you have the + appropriate projection definitions to transform your geometries into + geographic coordinates, you can set the "geodesic" property of the control + to true to calculate geodesic measures instead of planar measures. + Also you have the possibility to set the "immediate" property to true + to get a new calculated value once the mouse has been mooved.

+
+ + diff --git a/openlayers/examples/mm.html b/openlayers/examples/mm.html new file mode 100644 index 0000000000..2fd524dbbe --- /dev/null +++ b/openlayers/examples/mm.html @@ -0,0 +1,68 @@ + + + + + + + MultiMap + + + + + + + + + + + + + +

MultiMap Example

+
+ MultiMap, basic, cleanup +
+

+ An example of using the Layer.MultiMap class. +

+
+
click to add the marker to the map
+
click to remove the marker from the map
+ + diff --git a/openlayers/examples/mobile-base.js b/openlayers/examples/mobile-base.js new file mode 100644 index 0000000000..f320581787 --- /dev/null +++ b/openlayers/examples/mobile-base.js @@ -0,0 +1,172 @@ +// API key for http://openlayers.org. Please get your own at +// http://bingmapsportal.com/ and use that instead. +var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf"; + +// initialize map when page ready +var map; +var gg = new OpenLayers.Projection("EPSG:4326"); +var sm = new OpenLayers.Projection("EPSG:900913"); + +var init = function (onSelectFeatureFunction) { + + var vector = new OpenLayers.Layer.Vector("Vector Layer", {}); + + var sprintersLayer = new OpenLayers.Layer.Vector("Sprinters", { + styleMap: new OpenLayers.StyleMap({ + externalGraphic: "img/mobile-loc.png", + graphicOpacity: 1.0, + graphicWith: 16, + graphicHeight: 26, + graphicYOffset: -26 + }) + }); + + var sprinters = getFeatures(); + sprintersLayer.addFeatures(sprinters); + + var selectControl = new OpenLayers.Control.SelectFeature(sprintersLayer, { + autoActivate:true, + onSelect: onSelectFeatureFunction}); + + var geolocate = new OpenLayers.Control.Geolocate({ + id: 'locate-control', + geolocationOptions: { + enableHighAccuracy: false, + maximumAge: 0, + timeout: 7000 + } + }); + // create map + map = new OpenLayers.Map({ + div: "map", + theme: null, + projection: sm, + units: "m", + numZoomLevels: 18, + maxResolution: 156543.0339, + maxExtent: new OpenLayers.Bounds( + -20037508.34, -20037508.34, 20037508.34, 20037508.34 + ), + controls: [ + new OpenLayers.Control.Attribution(), + new OpenLayers.Control.TouchNavigation({ + dragPanOptions: { + enableKinetic: true + } + }), + geolocate, + selectControl + ], + layers: [ + new OpenLayers.Layer.OSM("OpenStreetMap", null, { + transitionEffect: 'resize' + }), + new OpenLayers.Layer.Bing({ + key: apiKey, + type: "Road", + // custom metadata parameter to request the new map style - only useful + // before May 1st, 2011 + metadataParams: { + mapVersion: "v1" + }, + name: "Bing Road", + transitionEffect: 'resize' + }), + new OpenLayers.Layer.Bing({ + key: apiKey, + type: "Aerial", + name: "Bing Aerial", + transitionEffect: 'resize' + }), + new OpenLayers.Layer.Bing({ + key: apiKey, + type: "AerialWithLabels", + name: "Bing Aerial + Labels", + transitionEffect: 'resize' + }), + vector, + sprintersLayer + ], + center: new OpenLayers.LonLat(0, 0), + zoom: 1 + }); + + var style = { + fillOpacity: 0.1, + fillColor: '#000', + strokeColor: '#f00', + strokeOpacity: 0.6 + }; + geolocate.events.register("locationupdated", this, function(e) { + vector.removeAllFeatures(); + vector.addFeatures([ + new OpenLayers.Feature.Vector( + e.point, + {}, + { + graphicName: 'cross', + strokeColor: '#f00', + strokeWidth: 2, + fillOpacity: 0, + pointRadius: 10 + } + ), + new OpenLayers.Feature.Vector( + OpenLayers.Geometry.Polygon.createRegularPolygon( + new OpenLayers.Geometry.Point(e.point.x, e.point.y), + e.position.coords.accuracy / 2, + 50, + 0 + ), + {}, + style + ) + ]); + map.zoomToExtent(vector.getDataExtent()); + }); + + function getFeatures() { + var features = { + "type": "FeatureCollection", + "features": [ + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [1332700, 7906300]}, + "properties": {"Name": "Igor Tihonov", "Country":"Sweden", "City":"Gothenburg"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [790300, 6573900]}, + "properties": {"Name": "Marc Jansen", "Country":"Germany", "City":"Bonn"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [568600, 6817300]}, + "properties": {"Name": "Bart van den Eijnden", "Country":"Netherlands", "City":"Utrecht"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-7909900, 5215100]}, + "properties": {"Name": "Christopher Schmidt", "Country":"United States of America", "City":"Boston"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-937400, 5093200]}, + "properties": {"Name": "Jorge Gustavo Rocha", "Country":"Portugal", "City":"Braga"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-355300, 7547800]}, + "properties": {"Name": "Jennie Fletcher ", "Country":"Scotland", "City":"Edinburgh"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [657068.53608487, 5712321.2472725]}, + "properties": {"Name": "Bruno Binet ", "Country":"France", "City":"Chambéry"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [667250.8958124, 5668048.6072737]}, + "properties": {"Name": "Eric Lemoine", "Country":"France", "City":"Theys"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [653518.03606319, 5721118.5122914]}, + "properties": {"Name": "Antoine Abt", "Country":"France", "City":"La Motte Servolex"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [657985.78042416, 5711862.6251028]}, + "properties": {"Name": "Pierre Giraud", "Country":"France", "City":"Chambéry"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [742941.93818208, 5861818.9477535]}, + "properties": {"Name": "Stéphane Brunner", "Country":"Switzerland", "City":"Paudex"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [736082.61064069, 5908165.4649505]}, + "properties": {"Name": "Frédéric Junod", "Country":"Switzerland", "City":"Montagny-près-Yverdon"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [771595.97057525, 5912284.7041793]}, + "properties": {"Name": "Cédric Moullet", "Country":"Switzerland", "City":"Payerne"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [744205.23922364, 5861277.319748]}, + "properties": {"Name": "Benoit Quartier", "Country":"Switzerland", "City":"Lutry"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [1717430.147101, 5954568.7127565]}, + "properties": {"Name": "Andreas Hocevar", "Country":"Austria", "City":"Graz"}}, + { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-12362007.067301,5729082.2365672]}, + "properties": {"Name": "Tim Schaub", "Country":"United States of America", "City":"Bozeman"}} + ] + }; + + var reader = new OpenLayers.Format.GeoJSON(); + + return reader.read(features); + } + +}; diff --git a/openlayers/examples/mobile-drawing.html b/openlayers/examples/mobile-drawing.html new file mode 100644 index 0000000000..18db95f4f0 --- /dev/null +++ b/openlayers/examples/mobile-drawing.html @@ -0,0 +1,82 @@ + + + + OpenLayers Mobile Drawing + + + + + + + + + + +

Mobile Drawing Example

+
+ mobile, drawing +
+

+ A full-screen map with drawing tools for mobile devices. +

+
+ + + diff --git a/openlayers/examples/mobile-drawing.js b/openlayers/examples/mobile-drawing.js new file mode 100644 index 0000000000..3de462b380 --- /dev/null +++ b/openlayers/examples/mobile-drawing.js @@ -0,0 +1,64 @@ +function init() { + + // create a vector layer for drawing + var vector = new OpenLayers.Layer.Vector('Vector Layer', { + styleMap: new OpenLayers.StyleMap({ + temporary: OpenLayers.Util.applyDefaults({ + pointRadius: 16 + }, OpenLayers.Feature.Vector.style.temporary) + }) + }); + + // OpenLayers' EditingToolbar internally creates a Navigation control, we + // want a TouchNavigation control here so we create our own editing toolbar + var toolbar = new OpenLayers.Control.Panel({ + displayClass: 'olControlEditingToolbar' + }); + toolbar.addControls([ + // this control is just there to be able to deactivate the drawing + // tools + new OpenLayers.Control({ + displayClass: 'olControlNavigation' + }), + new OpenLayers.Control.ModifyFeature(vector, { + vertexRenderIntent: 'temporary', + displayClass: 'olControlModifyFeature' + }), + new OpenLayers.Control.DrawFeature(vector, OpenLayers.Handler.Point, { + displayClass: 'olControlDrawFeaturePoint' + }), + new OpenLayers.Control.DrawFeature(vector, OpenLayers.Handler.Path, { + displayClass: 'olControlDrawFeaturePath' + }), + new OpenLayers.Control.DrawFeature(vector, OpenLayers.Handler.Polygon, { + displayClass: 'olControlDrawFeaturePolygon' + }) + ]); + + var osm = new OpenLayers.Layer.OSM(); + osm.wrapDateLine = false; + + map = new OpenLayers.Map({ + div: 'map', + projection: 'EPSG:900913', + units: 'm', + numZoomLevels: 18, + maxResolution: 156543.0339, + maxExtent: new OpenLayers.Bounds( + -20037508.34, -20037508.34, 20037508.34, 20037508.34 + ), + controls: [ + new OpenLayers.Control.TouchNavigation(), + new OpenLayers.Control.ZoomPanel(), + toolbar + ], + layers: [osm, vector], + center: new OpenLayers.LonLat(0, 0), + zoom: 1, + theme: null + }); + + // activate the first control to render the "navigation icon" + // as active + toolbar.controls[0].activate(); +} diff --git a/openlayers/examples/mobile-jq.html b/openlayers/examples/mobile-jq.html new file mode 100644 index 0000000000..040dbbacdc --- /dev/null +++ b/openlayers/examples/mobile-jq.html @@ -0,0 +1,76 @@ + + + + + OpenLayers with jQuery Mobile + + + + + + + + + + + + +

OpenLayers with jQuery Mobile

+
+ mobile, jquery +
+

+ Using jQuery Mobile to display an OpenLayers map. +

+ +
+
+
+
+ +
+ Search + Locate + Layers +
+ +
+ +
+
+

Search

+
+
+ +
+
    +
    + +
    +
    +

    Layers

    +
    +
    +
      +
    +
    +
    + + + + diff --git a/openlayers/examples/mobile-jq.js b/openlayers/examples/mobile-jq.js new file mode 100644 index 0000000000..a7ef681b92 --- /dev/null +++ b/openlayers/examples/mobile-jq.js @@ -0,0 +1,152 @@ +// Start with the map page +window.location.replace(window.location.href.split("#")[0] + "#mappage"); + +var selectedFeature = null; + +$(document).ready(function() { + + // fix height of content + function fixContentHeight() { + var footer = $("div[data-role='footer']:visible"), + content = $("div[data-role='content']:visible:visible"), + viewHeight = $(window).height(), + contentHeight = viewHeight - footer.outerHeight(); + + if ((content.outerHeight() + footer.outerHeight()) !== viewHeight) { + contentHeight -= (content.outerHeight() - content.height() + 1); + content.height(contentHeight); + } + + if (window.map) { + map.updateSize(); + } else { + // initialize map + init(function(feature) { + selectedFeature = feature; + $.mobile.changePage("#popup", "pop"); + }); + initLayerList(); + } + } + $(window).bind("orientationchange resize pageshow", fixContentHeight); + document.body.onload = fixContentHeight; + + // Map zoom + $("#plus").click(function(){ + map.zoomIn(); + }); + $("#minus").click(function(){ + map.zoomOut(); + }); + $("#locate").click(function(){ + var control = map.getControlsBy("id", "locate-control")[0]; + if (control.active) { + control.getCurrentLocation(); + } else { + control.activate(); + } + }); + + $('#popup').live('pageshow',function(event, ui){ + var li = ""; + for(var attr in selectedFeature.attributes){ + li += "
  • " + attr + "
    " + + selectedFeature.attributes[attr] + "
  • "; + } + $("ul#details-list").empty().append(li).listview("refresh"); + }); + + $('#searchpage').live('pageshow',function(event, ui){ + $('#query').bind('change', function(e){ + $('#search_results').empty(); + if ($('#query')[0].value === '') { + return; + } + $.mobile.pageLoading(); + + // Prevent form send + e.preventDefault(); + + var searchUrl = 'http://ws.geonames.org/searchJSON?featureClass=P&maxRows=10'; + searchUrl += '&name_startsWith=' + $('#query')[0].value; + $.getJSON(searchUrl, function(data) { + $.each(data.geonames, function() { + var place = this; + $('
  • ') + .hide() + .append($('

    ', { + text: place.name + })) + .append($('

    ', { + html: '' + place.countryName + ' ' + place.fcodeName + })) + .appendTo('#search_results') + .click(function() { + $.mobile.changePage('#mappage'); + var lonlat = new OpenLayers.LonLat(place.lng, place.lat); + map.setCenter(lonlat.transform(gg, sm), 10); + }) + .show(); + }); + $('#search_results').listview('refresh'); + $.mobile.pageLoading(true); + }); + }); + // only listen to the first event triggered + $('#searchpage').die('pageshow', arguments.callee); + }); + +}); + +function initLayerList() { + $('#layerspage').page(); + $('

  • ', { + "data-role": "list-divider", + text: "Base Layers" + }) + .appendTo('#layerslist'); + var baseLayers = map.getLayersBy("isBaseLayer", true); + $.each(baseLayers, function() { + addLayerToList(this); + }); + + $('
  • ', { + "data-role": "list-divider", + text: "Overlay Layers" + }) + .appendTo('#layerslist'); + var overlayLayers = map.getLayersBy("isBaseLayer", false); + $.each(overlayLayers, function() { + addLayerToList(this); + }); + $('#layerslist').listview('refresh'); + + map.events.register("addlayer", this, function(e) { + addLayerToList(e.layer); + }); +} + +function addLayerToList(layer) { + var item = $('
  • ', { + "data-icon": "check", + "class": layer.visibility ? "checked" : "" + }) + .append($('', { + text: layer.name + }) + .click(function() { + $.mobile.changePage('#mappage'); + if (layer.isBaseLayer) { + layer.map.setBaseLayer(layer); + } else { + layer.setVisibility(!layer.getVisibility()); + } + }) + ) + .appendTo('#layerslist'); + layer.events.on({ + 'visibilitychanged': function() { + $(item).toggleClass('checked'); + } + }); +} diff --git a/openlayers/examples/mobile-layers.html b/openlayers/examples/mobile-layers.html new file mode 100644 index 0000000000..130f2a9738 --- /dev/null +++ b/openlayers/examples/mobile-layers.html @@ -0,0 +1,98 @@ + + + + OpenLayers Mobile Layers + + + + + + + + + +

    Mobile example with various layer types

    + +
    + mobile, WMS, WFS, KML +
    +

    + A mobile example displaying various layer types: WMS, WFS, KML. +

    + +
    + + + diff --git a/openlayers/examples/mobile-layers.js b/openlayers/examples/mobile-layers.js new file mode 100644 index 0000000000..05e1f03399 --- /dev/null +++ b/openlayers/examples/mobile-layers.js @@ -0,0 +1,71 @@ +// initialize map when page ready +var map; + +// Get rid of address bar on iphone/ipod +var fixSize = function() { + window.scrollTo(0, 0); + document.body.style.height = '100%'; + if (!(/(iphone|ipod)/.test(navigator.userAgent.toLowerCase()))) { + if (document.body.parentNode) { + document.body.parentNode.style.height = '100%'; + } + } +}; +setTimeout(fixSize, 700); +setTimeout(fixSize, 1500); + +// allow testing of specific renderers via "?renderer=Canvas", etc +var renderer = OpenLayers.Util.getParameters(window.location.href).renderer; +renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers; + +OpenLayers.ProxyHost = "proxy.cgi?url="; + +function init() { + + map = new OpenLayers.Map({ + div: "map", + theme: null, + controls: [ + new OpenLayers.Control.Attribution(), + new OpenLayers.Control.TouchNavigation({ + dragPanOptions: { + enableKinetic: true + } + }), + new OpenLayers.Control.ZoomPanel() + ] + }); + + var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", + "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: 'basic'}, + {isBaseLayer: true, transitionEffect: 'resize'} + ) + + var kml = new OpenLayers.Layer.Vector("KML", { + projection: map.displayProjection, + strategies: [new OpenLayers.Strategy.Fixed()], + protocol: new OpenLayers.Protocol.HTTP({ + url: "kml/sundials.kml", + format: new OpenLayers.Format.KML({ + extractStyles: true, + extractAttributes: true + }) + }), + renderers: renderer + }); + + var wfs = new OpenLayers.Layer.Vector("States", { + strategies: [new OpenLayers.Strategy.Fixed()], + protocol: new OpenLayers.Protocol.WFS({ + url: "http://demo.opengeo.org/geoserver/wfs", + featureType: "states", + featureNS: "http://www.openplans.org/topp" + }), + renderers: renderer + }); + + map.addLayers([wms, wfs, kml]); + + map.setCenter(new OpenLayers.LonLat(-104, 42), 3); +}; diff --git a/openlayers/examples/mobile-navigation.html b/openlayers/examples/mobile-navigation.html new file mode 100644 index 0000000000..3d2ba593d1 --- /dev/null +++ b/openlayers/examples/mobile-navigation.html @@ -0,0 +1,52 @@ + + + + + + + Mobile Navigation Example + + + + + + + +

    Mobile Navigation

    + +
    + mobile, touch, drag, move, zoom, navigate +
    + +
    Demonstrate map navigation on mobile
    + +
    +
    + + diff --git a/openlayers/examples/mobile-navigation.js b/openlayers/examples/mobile-navigation.js new file mode 100644 index 0000000000..ce08b498e6 --- /dev/null +++ b/openlayers/examples/mobile-navigation.js @@ -0,0 +1,29 @@ +var map; + +function init() { + map = new OpenLayers.Map({ + div: "map", + theme: null, + projection: new OpenLayers.Projection("EPSG:900913"), + units: "m", + numZoomLevels: 18, + maxResolution: 156543.0339, + maxExtent: new OpenLayers.Bounds( + -20037508.34, -20037508.34, 20037508.34, 20037508.34 + ), + controls: [ + new OpenLayers.Control.TouchNavigation({ + dragPanOptions: { + enableKinetic: true + } + }), + new OpenLayers.Control.ZoomPanel() + ], + layers: [ + new OpenLayers.Layer.OSM("OpenStreetMap", null, { + transitionEffect: 'resize' + }) + ] + }); + map.setCenter(new OpenLayers.LonLat(0, 0), 3); +} diff --git a/openlayers/examples/mobile-sencha.html b/openlayers/examples/mobile-sencha.html new file mode 100644 index 0000000000..f08efc48d6 --- /dev/null +++ b/openlayers/examples/mobile-sencha.html @@ -0,0 +1,184 @@ + + + + + + + OpenLayers with Sencha Touch + + + + + + + + + + +

    OpenLayers with Sencha Touch

    + +
    + mobile, sencha touch +
    +

    + Using Sencha Touch to display an OpenLayers map. +

    + + diff --git a/openlayers/examples/mobile-sencha.js b/openlayers/examples/mobile-sencha.js new file mode 100644 index 0000000000..1b794559b5 --- /dev/null +++ b/openlayers/examples/mobile-sencha.js @@ -0,0 +1,198 @@ +Ext.ns('App'); + +/** + * The model for the geonames records used in the search + */ +Ext.regModel('Geonames', { + fields: ['countryName', 'toponymName', 'name', 'lat', 'lng'] +}); + +/** + * Custom class for the Search + */ +App.SearchFormPopupPanel = Ext.extend(Ext.Panel, { + map: null, + floating: true, + modal: true, + centered: true, + hideOnMaskTap: true, + width: Ext.is.Phone ? undefined : 400, + height: Ext.is.Phone ? undefined : 400, + scroll: false, + layout: 'fit', + fullscreen: Ext.is.Phone ? true : undefined, + url: 'http://ws.geonames.org/searchJSON?', + errorText: 'Sorry, we had problems communicating with geonames.org. Please try again.', + errorTitle: 'Communication error', + maxResults: 6, + featureClass: "P", + + createStore: function(){ + this.store = new Ext.data.Store({ + model: 'Geonames', + proxy: { + type: 'scripttag', + timeout: 5000, + listeners: { + exception: function(){ + this.hide(); + Ext.Msg.alert(this.errorTitle, this.errorText, Ext.emptyFn); + }, + scope: this + }, + url: this.url, + reader: { + type: 'json', + root: 'geonames' + } + } + }); + }, + + doSearch: function(searchfield, evt){ + var q = searchfield.getValue(); + this.store.load({ + params: { + featureClass: this.featureClass, + maxRows: this.maxResults, + name_startsWith: encodeURIComponent(q) + } + }); + }, + + onItemTap: function(dataView, index, item, event){ + var record = this.store.getAt(index); + var lon = record.get('lng'); + var lat = record.get('lat'); + var lonlat = new OpenLayers.LonLat(lon, lat); + map.setCenter(lonlat.transform(gg, sm), 12); + this.hide("pop"); + }, + + initComponent: function(){ + this.createStore(); + this.resultList = new Ext.List({ + scroll: 'vertical', + cls: 'searchList', + loadingText: "Searching ...", + store: this.store, + itemTpl: '
    {name} ({countryName})
    ', + listeners: { + itemtap: this.onItemTap, + scope: this + } + }); + this.formContainer = new Ext.form.FormPanel({ + scroll: false, + items: [{ + xtype: 'button', + cls: 'close-btn', + ui: 'decline-small', + text: 'Close', + handler: function(){ + this.hide(); + }, + scope: this + }, { + xtype: 'fieldset', + scroll: false, + title: 'Search for a place', + items: [{ + xtype: 'searchfield', + label: 'Search', + placeHolder: 'placename', + listeners: { + action: this.doSearch, + scope: this + } + }, + this.resultList + ] + }] + }); + this.items = [{ + xtype: 'panel', + layout: 'fit', + items: [this.formContainer] + }]; + App.SearchFormPopupPanel.superclass.initComponent.call(this); + } +}); + +App.LayerList = Ext.extend(Ext.List, { + + map: null, + + createStore: function(){ + Ext.regModel('Layer', { + fields: ['id', 'name', 'visibility', 'zindex'] + }); + var data = []; + Ext.each(this.map.layers, function(layer){ + if (layer.displayInLayerSwitcher === true) { + var visibility = layer.isBaseLayer ? (this.map.baseLayer == layer) : layer.getVisibility(); + data.push({ + id: layer.id, + name: layer.name, + visibility: visibility, + zindex: layer.getZIndex() + }); + } + }); + return new Ext.data.Store({ + model: 'Layer', + sorters: 'zindex', + data: data + }); + }, + + initComponent: function(){ + this.store = this.createStore(); + this.itemTpl = new Ext.XTemplate( + '', + '', + '', + '', + '', + '', + '{name}' + ); + this.listeners = { + itemtap: function(dataview, index, item, e){ + var record = dataview.getStore().getAt(index); + var layer = this.map.getLayersBy("id", record.get("id"))[0]; + if (layer.isBaseLayer) { + this.map.setBaseLayer(layer); + } + else { + layer.setVisibility(!layer.getVisibility()); + } + record.set("visibility", layer.getVisibility()); + } + }; + this.map.events.on({ + "changelayer": this.onChangeLayer, + scope: this + }); + App.LayerList.superclass.initComponent.call(this); + }, + + findLayerRecord: function(layer){ + var found; + this.store.each(function(record){ + if (record.get("id") === layer.id) { + found = record; + } + }, this); + return found; + }, + + onChangeLayer: function(evt){ + if (evt.property == "visibility") { + var record = this.findLayerRecord(evt.layer); + record.set("visibility", evt.layer.getVisibility()); + } + } + +}); +Ext.reg('app_layerlist', App.LayerList); diff --git a/openlayers/examples/mobile.html b/openlayers/examples/mobile.html new file mode 100644 index 0000000000..708eb8b68b --- /dev/null +++ b/openlayers/examples/mobile.html @@ -0,0 +1,86 @@ + + + + OpenLayers Mobile + + + + + + + + + +

    Basic Mobile Example

    +
    + mobile +
    +

    + A basic full-screen map for mobile devices. +

    +
    + + + diff --git a/openlayers/examples/mobile.js b/openlayers/examples/mobile.js new file mode 100644 index 0000000000..094647a69e --- /dev/null +++ b/openlayers/examples/mobile.js @@ -0,0 +1,39 @@ +// initialize map when page ready +var map; + +// Get rid of address bar on iphone/ipod +var fixSize = function() { + window.scrollTo(0,0); + document.body.style.height = '100%'; + if (!(/(iphone|ipod)/.test(navigator.userAgent.toLowerCase()))) { + if (document.body.parentNode) { + document.body.parentNode.style.height = '100%'; + } + } +}; +setTimeout(fixSize, 700); +setTimeout(fixSize, 1500); + +var init = function () { + // create map + map = new OpenLayers.Map({ + div: "map", + theme: null, + controls: [ + new OpenLayers.Control.Attribution(), + new OpenLayers.Control.TouchNavigation({ + dragPanOptions: { + enableKinetic: true + } + }), + new OpenLayers.Control.ZoomPanel() + ], + layers: [ + new OpenLayers.Layer.OSM("OpenStreetMap", null, { + transitionEffect: 'resize' + }) + ], + center: new OpenLayers.LonLat(742000, 5861000), + zoom: 3 + }); +}; diff --git a/openlayers/examples/modify-feature.html b/openlayers/examples/modify-feature.html new file mode 100644 index 0000000000..8cec2306af --- /dev/null +++ b/openlayers/examples/modify-feature.html @@ -0,0 +1,187 @@ + + + + + + + Modify Feature + + + + + + + +

    OpenLayers Modify Feature Example

    +
    + vertices, digitizing, draw, drawing +
    +
    A demonstration of the ModifyFeature control for editing vector features.
    +
    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + + + +
        +
      • + + +
      • +
      +
    • +
    • + + +
        +
      • + + +
      • +
      • + + + ( + ) +
      • +
      • + + +
      • +
      +
    • +
    +
    + + diff --git a/openlayers/examples/mouse-position.html b/openlayers/examples/mouse-position.html new file mode 100644 index 0000000000..4e78e9b135 --- /dev/null +++ b/openlayers/examples/mouse-position.html @@ -0,0 +1,47 @@ + + + + + + + MousePosition Control + + + + + + +

    MousePosition Control

    +
    + coordinate +
    +

    + Use the MousePosition Control to display the coordinates of the cursor + inside or outside the map div. +

    +
    +
    +

    Moving your mouse to the upper left corner of this map should return + 'x=0,y=0' -- in the past, it didn't in IE. If it returns 2,2, consider it a + bug, and report it.

    + + diff --git a/openlayers/examples/mousewheel-interval.html b/openlayers/examples/mousewheel-interval.html new file mode 100644 index 0000000000..ce8d6a60ae --- /dev/null +++ b/openlayers/examples/mousewheel-interval.html @@ -0,0 +1,63 @@ + + + + + + + OpenLayers Mousewheel Interval Example + + + + + + +

    OpenLayers Mousewheel Interval Example

    + +
    + performance, zoom by wheel +
    + +
    Let OpenLayers send less tile requests to the server when wheel-zooming.
    + +
    + +
    +

    This example shows how to configure the Navigation control to use + the mousewheel in a less server resource consuming way: as long as you + spin the mousewheel, no request will be sent to the server. Instead, + the zoomlevel delta will be recorded. After a delay (in this example + 100ms), a zoom action with the cumulated delta will be performed.

    +
    + + +
    + +
    + + diff --git a/openlayers/examples/multimap-mercator.html b/openlayers/examples/multimap-mercator.html new file mode 100644 index 0000000000..48b2dd9ec2 --- /dev/null +++ b/openlayers/examples/multimap-mercator.html @@ -0,0 +1,74 @@ + + + + + + + MultiMap SphericalMercator + + + + + + + + + + + + + +

    MultiMap Mercator Example

    +
    + MultiMap, basic, cleanup +
    +

    + This sphericalMercator example using multimap demonstrates that the + multimap layer does not fully support the sphericalMercator projection at + this time. +

    +
    + + diff --git a/openlayers/examples/multiserver.html b/openlayers/examples/multiserver.html new file mode 100644 index 0000000000..4b7654c0d3 --- /dev/null +++ b/openlayers/examples/multiserver.html @@ -0,0 +1,52 @@ + + + + + + + OpenLayers: Tiles from Multiple Servers + + + + + + +

    Multiple Server URLS

    + +
    + performance, multiple urls, request +
    +

    + Load your tiles faster by pointing to the same server, but with different urls +

    + +
    +
    +

    Browsers typically limit the number of concurrent requests to the same + server, based on hostname. In order to ake tiles load more quickly, it + often makes sense to distribute requests over multiple hostnames to achieve + more concurrency. Typically, browsers perform best with 3 different + hostnames -- your performance may vary. (For example, if your server can't + handle more than 2 requests simultaneously, then additional hostnames will + not help you.)

    +
    + + + diff --git a/openlayers/examples/multitouch.html b/openlayers/examples/multitouch.html new file mode 100644 index 0000000000..442b24ac44 --- /dev/null +++ b/openlayers/examples/multitouch.html @@ -0,0 +1,28 @@ + + + + + Multitouch Test + + +
    +
    + Touch inside the box. On a touch enabled browser, you will get the number + of detected touch events. If the box is red, your browser does not support + touch events. + + + diff --git a/openlayers/examples/mvs.html b/openlayers/examples/mvs.html new file mode 100644 index 0000000000..e26b0125f0 --- /dev/null +++ b/openlayers/examples/mvs.html @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + +
    + + diff --git a/openlayers/examples/navigation-control.html b/openlayers/examples/navigation-control.html new file mode 100644 index 0000000000..661c42cddb --- /dev/null +++ b/openlayers/examples/navigation-control.html @@ -0,0 +1,44 @@ + + + + + + + OpenLayers Navigation Control + + + + + + +

    Navigation Control

    + +
    + drag, move, zoom, navigate +
    + +
    Demonstrate Navigation Control features
    + +
    + Turn on Wheel Zoom | Turn off Wheel Zoom +
    +

    This example demonstrates a couple features of the Navigation + control. The Navigation control controls most map dragging, movement, + zooming, etc. In this case, we have a demonstration of how to create a + navigation control with no zoom wheel action, which can then be enabled + or disabled by the user.

    +
    + + diff --git a/openlayers/examples/navigation-history.html b/openlayers/examples/navigation-history.html new file mode 100644 index 0000000000..e93007dd9e --- /dev/null +++ b/openlayers/examples/navigation-history.html @@ -0,0 +1,62 @@ + + + + + + + OpenLayers Navigation History Example + + + + + + +

    Map Navigation History Example

    + +
    + history, basic +
    + +

    + A control for zooming to previous and next map extents. +

    + +
    + Map navigation history controls
    +
    + + diff --git a/openlayers/examples/navtoolbar-alwaysZoom.html b/openlayers/examples/navtoolbar-alwaysZoom.html new file mode 100644 index 0000000000..7976918aa8 --- /dev/null +++ b/openlayers/examples/navtoolbar-alwaysZoom.html @@ -0,0 +1,85 @@ + + + + + + + A navToolbar with an alwaysZoom ZoomBox + + + + + + + + +

    A navToolbar with an alwaysZoom ZoomBox

    +
    + navigation toolbar +
    +

    + Demo of a custom NavToolbar which uses a zoomBox tool that always zoom in even when the zoom box is too big. +

    +
    + + diff --git a/openlayers/examples/navtoolbar-outsidemap.html b/openlayers/examples/navtoolbar-outsidemap.html new file mode 100644 index 0000000000..f41142b1f7 --- /dev/null +++ b/openlayers/examples/navtoolbar-outsidemap.html @@ -0,0 +1,47 @@ + + + + + + + OpenLayers: Custom Navigation Toolbar + + + + + + +

    Navigation Toolbar: Outside the Map

    +
    + navigation toolbar, style, position, div +
    +
    +
    +
    +

    To place the Naviation Toolbar outside the map:

    +
      +
    • Load the default stylesheet into the page.
    • +
    • Override the location of the Navigation toolbar in your CSS by setting #yourElementId div to have a top of 0px
    • +
    • Specify the HTML element as a 'div' option in your NavToolbar constructor
    • +
    • Add the olControlNavToolbar class to your div.
    • +
    +
    + + + diff --git a/openlayers/examples/navtoolbar.html b/openlayers/examples/navtoolbar.html new file mode 100644 index 0000000000..e4de88f7f2 --- /dev/null +++ b/openlayers/examples/navtoolbar.html @@ -0,0 +1,46 @@ + + + + + + + + + NavToolbar Demo + + + + + +

    NavToolbar Demo

    +
    + navigation toolbar, basic +
    +

    + Demo the NavToolbar, a subclass of Control.Panel which shows icons for + navigation. +

    +
    + + diff --git a/openlayers/examples/openls.html b/openlayers/examples/openls.html new file mode 100644 index 0000000000..257ef618c8 --- /dev/null +++ b/openlayers/examples/openls.html @@ -0,0 +1,88 @@ + + + + + + + + + OpenLS: Geocoding Example + + + + +

    OpenLS Geocoding Example

    + +
    + OpenLS, XLS, Geocoding +
    + +

    + Show how to use an OpenLS service. +

    + +
    + + +
    + +
    + +
    + + +
    +

    + Geocoding example using the http://www.openrouteservice.org/ OpenLS service. Recenter to the first item of the results. +

    +
    + + diff --git a/openlayers/examples/ordering.html b/openlayers/examples/ordering.html new file mode 100644 index 0000000000..7cb3f2b584 --- /dev/null +++ b/openlayers/examples/ordering.html @@ -0,0 +1,221 @@ + + + + + + + OpenLayers: Z-Ordering and Y-Ordering of Vector Features + + + + + + + +

    Z-Index/Y-Order Example

    + +
    + stack, stacking, zindex, ordering +
    + +

    + This example shows the use of z-indexing and y-ordering of external graphics. Zoom in and out to see this behavior. +

    + +

    Z-Index (with Y-Ordering enabled)

    + + + + + +
    +
    +
    +
    + In this map, the gold features all have the same z-index, and the red features have alternating z-indeces. The gold features' z-index is greater than the red features' z-indeces, which is why gold features look to be drawn on top of the red features. Since each gold feature has the same z-index, gold features succomb to y-ordering: this is where features that seem closest to the viewer (lower lattitude) show up above those that seem farther away (higher lattitude). +

    + You can enable y-ordering by passing the parameter yOrdering: true in the vector layer's options hash. For all configurations (with yOrdering or zIndexing set to true), if features have the same z-index -- and if y-ordering is enabled: the same latitude -- those features will succomb to drawing order, where the last feature to be drawn will appear above the rest. +
    +
    +
    +

    Z-Index and Drawing Order (Z-Indexes set, and Y-Ordering disabled)

    + + + + + +
    +
    +
    +
    + In this map, zIndexing is set to true. All features are given the same z-index (0), except for the first feature which has a z-index of 1. The layer's yOrdering parameter is set to the default (false). This configuration makes features succomb to z-index and drawing order (for the features with the same z-index), instead of y-order. +

    + The features in this map were drawn from left to right and bottom to top, diagonally, to show that y-ordering is not enabled. Only the lower-left corner feature is drawn on top of the others, because it has a higher z-index (1 instead of 0). +
    +
    + + + + diff --git a/openlayers/examples/osm-google.html b/openlayers/examples/osm-google.html new file mode 100644 index 0000000000..3578246ccb --- /dev/null +++ b/openlayers/examples/osm-google.html @@ -0,0 +1,33 @@ + + + + + + + OpenLayers OSM and Google Example + + + + + + + + +

    OSM and Google Together

    +

    + Demonstrate use of an OSM layer and a Google layer as base layers. +

    +
    + openstreetmap google +
    +
    +
    +

    + The Google(v3) layer and the OSM are both in the same projection + - spherical mercator - and can be used on a map together. + See the + osm-google.js source to see how this is done. +

    +
    + + diff --git a/openlayers/examples/osm-google.js b/openlayers/examples/osm-google.js new file mode 100644 index 0000000000..77d96d82f4 --- /dev/null +++ b/openlayers/examples/osm-google.js @@ -0,0 +1,28 @@ +var map; + +function init() { + map = new OpenLayers.Map({ + div: "map", + projection: new OpenLayers.Projection("EPSG:900913"), + units: "m", + maxResolution: 156543.0339, + maxExtent: new OpenLayers.Bounds( + -20037508, -20037508, 20037508, 20037508.34 + ) + }); + + var osm = new OpenLayers.Layer.OSM(); + var gmap = new OpenLayers.Layer.Google("Google Streets"); + + map.addLayers([osm, gmap]); + + map.addControl(new OpenLayers.Control.LayerSwitcher()); + + map.setCenter( + new OpenLayers.LonLat(10.2, 48.9).transform( + new OpenLayers.Projection("EPSG:4326"), + map.getProjectionObject() + ), + 5 + ); +} diff --git a/openlayers/examples/osm-layer.html b/openlayers/examples/osm-layer.html new file mode 100644 index 0000000000..58f8158eec --- /dev/null +++ b/openlayers/examples/osm-layer.html @@ -0,0 +1,126 @@ + + + + + + + OpenLayers: OSM Layer + + + + + + + +

    Advanced OSM Layer

    +
    + openstreetmap advanced +
    +
    + + + + + diff --git a/openlayers/examples/osm.html b/openlayers/examples/osm.html new file mode 100644 index 0000000000..519c396ba7 --- /dev/null +++ b/openlayers/examples/osm.html @@ -0,0 +1,41 @@ + + + + + + + OpenLayers Basic Single WMS Example + + + + + + +

    Basic OSM Example

    + +
    + openstreetmap basic +
    + +
    Show a Simple OSM Map
    + +
    + +
    +

    This example shows a very simple OSM layout with minimal controls.

    +
    + + diff --git a/openlayers/examples/osm/sutton_coldfield.osm b/openlayers/examples/osm/sutton_coldfield.osm new file mode 100644 index 0000000000..db77309a55 --- /dev/null +++ b/openlayers/examples/osm/sutton_coldfield.osm @@ -0,0 +1,662 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openlayers/examples/outOfRangeMarkers.html b/openlayers/examples/outOfRangeMarkers.html new file mode 100644 index 0000000000..7e64237edd --- /dev/null +++ b/openlayers/examples/outOfRangeMarkers.html @@ -0,0 +1,68 @@ + + + + + + + Using maxResolution to control overlays + + + + + + + + + + + + + + +

    Using maxResolution to control overlays

    +
    + cleanup +
    +

    + See how to control the maximum resolution for a markers layer, + causing it to not be displayed beyond a certain point. +

    +
    + + + diff --git a/openlayers/examples/outOfRangeMarkers.txt b/openlayers/examples/outOfRangeMarkers.txt new file mode 100644 index 0000000000..6d8897760f --- /dev/null +++ b/openlayers/examples/outOfRangeMarkers.txt @@ -0,0 +1,3 @@ +point title description icon +-4.14,37.90 Kilimanjaro Beskrivning http://www.villageografica.com/Africa-Webmap/img/marker-blue.png +-3.24,34.35 Shinyanga Beskrivning http://www.villageografica.com/Africa-Webmap/img/marker-blue.png diff --git a/openlayers/examples/overviewmap.html b/openlayers/examples/overviewmap.html new file mode 100644 index 0000000000..7ae1ee86c2 --- /dev/null +++ b/openlayers/examples/overviewmap.html @@ -0,0 +1,119 @@ + + + + + + Overview Map Example + + + + + + +

    Overview Map

    + +
    + overview, mapOptions, basic +
    +

    + Enable a small Overview Map that moves/interacts with your main map. +

    +
    +

    The above map has an overview map control that is created with + the default options. Much like a regular map, the map contained by + the overview map control defaults to a geographic projection.

    +
    +

    The second map has an overview map control that is created with + non-default options. In this case, the mapOptions property of the + control has been set to use non-default projection related properties, + and the layers property has been set to use a layer different from the main + map. In addition, any other properties of the overview map control can be + set in this way.

    + + + diff --git a/openlayers/examples/pan-zoom-panels.html b/openlayers/examples/pan-zoom-panels.html new file mode 100644 index 0000000000..0c48498353 --- /dev/null +++ b/openlayers/examples/pan-zoom-panels.html @@ -0,0 +1,97 @@ + + + + + + Pan and Zoom Panels + + + + + + + + + + + + +

    Pan and Zoom Panels

    +
    + panning, zooming, panel, CSS, style +
    +

    + Customizable pan and zoom panels +

    +
    +

    + The pan and zoom panels allow you to use CSS styling to change the + look and feel of the panels, including changing their position + and their icons without needing to change any code. +

    + + diff --git a/openlayers/examples/panel.html b/openlayers/examples/panel.html new file mode 100644 index 0000000000..685bdacf37 --- /dev/null +++ b/openlayers/examples/panel.html @@ -0,0 +1,109 @@ + + + + + + + OpenLayers: Control Panel + + + + + + + + +

    Custom Control.Panel

    +
    + panels, CSS, style, basic +
    +

    + Create a custom control.panel, styled entirely with + CSS, and add your own controls to it. +

    +
    +
    + + diff --git a/openlayers/examples/point-grid.html b/openlayers/examples/point-grid.html new file mode 100644 index 0000000000..4cff89d85b --- /dev/null +++ b/openlayers/examples/point-grid.html @@ -0,0 +1,75 @@ + + + + + + OpenLayers Point Grid Example + + + + + +

    Point Grid Example

    + +
    + point grid +
    + +
    Use a PointGrid layer to display a grid of regularly spaced points
    + +
    + + Grid rotation: + + +   + Grid spacing: + x + + +   + Max points: + + +
    +

    + This example demonstrates a OpenLayers.Layer.PointGrid + layer to render a regularly spaced grid of point features. +

    + See the + point-grid.js source to see how this is done. +

    +
    + + + + diff --git a/openlayers/examples/point-grid.js b/openlayers/examples/point-grid.js new file mode 100644 index 0000000000..e3a29e89ca --- /dev/null +++ b/openlayers/examples/point-grid.js @@ -0,0 +1,33 @@ +var points = new OpenLayers.Layer.PointGrid({ + isBaseLayer: true, dx: 15, dy: 15 +}); + +var map = new OpenLayers.Map({ + div: "map", + layers: [points], + center: new OpenLayers.LonLat(0, 0), + zoom: 2 +}); + +var rotation = document.getElementById("rotation"); +rotation.value = String(points.rotation); +rotation.onchange = function() { + points.setRotation(Number(rotation.value)); +} + +var dx = document.getElementById("dx"); +var dy = document.getElementById("dy"); +dx.value = String(points.dx); +dy.value = String(points.dy); +dx.onchange = function() { + points.setSpacing(Number(dx.value), Number(dy.value)); +} +dy.onchange = function() { + points.setSpacing(Number(dx.value), Number(dy.value)); +} + +var max = document.getElementById("max"); +max.value = String(points.maxFeatures); +max.onchange = function() { + points.setMaxFeatures(Number(max.value)); +} diff --git a/openlayers/examples/point-track-markers.html b/openlayers/examples/point-track-markers.html new file mode 100644 index 0000000000..0cb2c5d5ad --- /dev/null +++ b/openlayers/examples/point-track-markers.html @@ -0,0 +1,72 @@ + + + + + + + OpenLayers: Point Track Markers + + + + + + +

    GeoRSS PointTrack in OpenLayers

    +
    + GeoRSS, PointTrack +
    +

    This demo uses OpenLayers.Layer.GeoRSS and OpenLayers.Layer.PointTrack.

    +

    The track is created by connecting the points of the GeoRSS feed.

    +
    + GeoRSS URL: +
    +

    The above input box allows the input of a URL to a GeoRSS feed. This feed can be local to the HTML page -- for example, entering 'xml/track1.xml' will work by default.

    +

    The example shows a track, displayed as a line connecting the points of the feed. It also shows markers at positions that have a title tag in the rss item. If clicked, a popup will show title and description.

    +
    + + diff --git a/openlayers/examples/popupMatrix.html b/openlayers/examples/popupMatrix.html new file mode 100644 index 0000000000..4a2280ef1d --- /dev/null +++ b/openlayers/examples/popupMatrix.html @@ -0,0 +1,909 @@ + + + + + + + OpenLayers: Popup Mayhem + + + + + + + + + +

    Popup Matrix

    + +
    + popup, popups +
    +

    + All kinds of different popup configurations. +

    + +
    + + + + + + +

    All of the images in this file a pre-cached, meaning they are + loaded immediately when you load the page (they are just placed + far offscreen, that's why you don't see them). +

    +
    +

    The only image that is *not* preloaded is img/small.jpg, the brazilian + flag. We do this in order to test out to make sure that our auto-sizing + code does in fact activate itself as the images load. To verify + this, clear your cache and reload this example page. Click on + any of the markers in the 'AutoSize' row. If the popup autosizes + to correctly contain the entire flag: golden. If the popup is + tiny and you can only see a corner of it, then this code is broken. +

    + +
    + + + + + diff --git a/openlayers/examples/popups.html b/openlayers/examples/popups.html new file mode 100644 index 0000000000..36200438f0 --- /dev/null +++ b/openlayers/examples/popups.html @@ -0,0 +1,134 @@ + + + + + + + + + + + + + +

    Popup Mayhem

    + +
    + popup, popups +
    +

    + All kinds of ways to create and interact with Popups. +

    + +
    +

    If you open an anchoredbubble and switch to google, it shouldn't crash. If it does, don't release OpenLayers.

    +
    click to add Popup to map
    +
    click to add a Marker with an AnchoredBubble popup
    +
    click to modify popup's attributes
    +
    click to remove the popup from map
    +
    click to remove the markers layer
    +
    marker.onscreen()?
    +
    click to destroy the popup from map
    +
    + Detailed description of this example needs to be written. +
    + + diff --git a/openlayers/examples/projected-map.html b/openlayers/examples/projected-map.html new file mode 100644 index 0000000000..0e9c87c408 --- /dev/null +++ b/openlayers/examples/projected-map.html @@ -0,0 +1,72 @@ + + + + + + + OpenLayers: Non-Geographic Projection + + + + + + + + + +

    Layer Projections

    + +
    + projection, reprojection, epsg, basic +
    +

    + Use different (not default) projections with your map +

    +
    +

    When using alternative projections, you still use OpenLayers.LonLat objects, even though + the properties are actually X/Y values at that point.

    + + diff --git a/openlayers/examples/protocol-gears.html b/openlayers/examples/protocol-gears.html new file mode 100644 index 0000000000..23799ec83c --- /dev/null +++ b/openlayers/examples/protocol-gears.html @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + +

    Gears Protocol Example

    + +
    + Google, Gears +
    +

    + Shows the usage of the Gears protocol. +

    + +
    +
    +
    + +
    + Sync +

    The Sync link destroys the features currently in the layer, reads + features from the Gears database, and adds them to the layer. + Uncommitted features will be lost.

    + + Commit +

    The Commit link commits to the Gears database the features that are + marked as INSERT, UPDATE or DELETE.

    + + Delete +

    The Delete link marks the selected feature as DELETE. To select a feature + click choose the navigation control in the editing toolbar.

    +
    + +
    +

    Status:

    +

    Result:

    +
    + +
    +

    This example demonstrates the usage of OpenLayers Gears protocol to + read/create/update/delete features from/to the Gears database. + Gears must obviously be installed + in your browser for this example to work.

    +
    + + diff --git a/openlayers/examples/proxy.cgi b/openlayers/examples/proxy.cgi new file mode 100755 index 0000000000..c668218c48 --- /dev/null +++ b/openlayers/examples/proxy.cgi @@ -0,0 +1,80 @@ +#!/usr/bin/env python + + +"""This is a blind proxy that we use to get around browser +restrictions that prevent the Javascript from loading pages not on the +same server as the Javascript. This has several problems: it's less +efficient, it might break some sites, and it's a security risk because +people can use this proxy to browse the web and possibly do bad stuff +with it. It only loads pages via http and https, but it can load any +content type. It supports GET and POST requests.""" + +import urllib2 +import cgi +import sys, os + +# Designed to prevent Open Proxy type stuff. + +allowedHosts = ['www.openlayers.org', 'openlayers.org', + 'labs.metacarta.com', 'world.freemap.in', + 'prototype.openmnnd.org', 'geo.openplans.org', + 'sigma.openplans.org', 'demo.opengeo.org', + 'www.openstreetmap.org', 'sample.azavea.com', + 'v2.suite.opengeo.org', 'v-swe.uni-muenster.de:8080', + 'vmap0.tiles.osgeo.org', 'www.openrouteservice.org'] + +method = os.environ["REQUEST_METHOD"] + +if method == "POST": + qs = os.environ["QUERY_STRING"] + d = cgi.parse_qs(qs) + if d.has_key("url"): + url = d["url"][0] + else: + url = "http://www.openlayers.org" +else: + fs = cgi.FieldStorage() + url = fs.getvalue('url', "http://www.openlayers.org") + +try: + host = url.split("/")[2] + if allowedHosts and not host in allowedHosts: + print "Status: 502 Bad Gateway" + print "Content-Type: text/plain" + print + print "This proxy does not allow you to access that location (%s)." % (host,) + print + print os.environ + + elif url.startswith("http://") or url.startswith("https://"): + + if method == "POST": + length = int(os.environ["CONTENT_LENGTH"]) + headers = {"Content-Type": os.environ["CONTENT_TYPE"]} + body = sys.stdin.read(length) + r = urllib2.Request(url, body, headers) + y = urllib2.urlopen(r) + else: + y = urllib2.urlopen(url) + + # print content type header + i = y.info() + if i.has_key("Content-Type"): + print "Content-Type: %s" % (i["Content-Type"]) + else: + print "Content-Type: text/plain" + print + + print y.read() + + y.close() + else: + print "Content-Type: text/plain" + print + print "Illegal request." + +except Exception, E: + print "Status: 500 Unexpected Error" + print "Content-Type: text/plain" + print + print "Some unexpected error occurred. Error text was:", E diff --git a/openlayers/examples/regular-polygons.html b/openlayers/examples/regular-polygons.html new file mode 100644 index 0000000000..f2725dd2f8 --- /dev/null +++ b/openlayers/examples/regular-polygons.html @@ -0,0 +1,177 @@ + + + + + + + OpenLayers Regular Polygon Example + + + + + + + +

    OpenLayers Regular Polygon Example

    +
    + vector, feature, regularpolygon, drawing, draw, advanced +
    +

    + Shows how to use the RegularPolygon handler to draw features with + different numbers of sides. +

    +
    +
    + +
      Map Controls +
    • + + +
    • +
    • + + +
    • +
    + + + + + + + + + + + + + + + + + + + + + + + +
    Draw OptionValue
    + shape + + +
    + snap angle + + +
    + size + + +
    + irregular + + +
    +
    +

    + Regular polygons can be drawn by pointing a DrawFeature control to the + RegularPolygon handler class. The options above demonstrate how the + handler can be configured. Note if you are in angle snapping mode (if + the snap angle is non-null) and you hold down the Shift key, you + will toggle to non-snapping mode. +

    +

    + The irregular option allows drawing of irregular polygons. With this option, the fixed radius option is ignored. + + diff --git a/openlayers/examples/resize-features.html b/openlayers/examples/resize-features.html new file mode 100644 index 0000000000..521d501e24 --- /dev/null +++ b/openlayers/examples/resize-features.html @@ -0,0 +1,101 @@ + + + + + + + OpenLayers Resize Features Example + + + + + + + +

    Resize Features Programatically

    +
    + vector, feature, resizing, resize +
    +

    + Demonstration of how to use the geometry resize methods to + change feature sizes programatically. +

    +
    +

    This example demonstrates how features can be resized. There is not yet + a control built that provides a tool for resizing, but the geometry.resize + method can be accessed to resize programmatically.

    +

    Make the features bigger + or smaller. + + diff --git a/openlayers/examples/restricted-extent.html b/openlayers/examples/restricted-extent.html new file mode 100644 index 0000000000..5117453758 --- /dev/null +++ b/openlayers/examples/restricted-extent.html @@ -0,0 +1,77 @@ + + + + + + + OpenLayers Restricted Extent Example + + + + + + + +

    OpenLayers Restricted Extent Example

    +
    + map, restrict, restrictedextent, extent +
    +

    + Don't let users drag outside the map extent: instead, limit dragging such + that the extent of the layer is the maximum viewable area. +

    +
    +

    + Map navigation is limited by a combination of map and layer properties. + The base layer resolutions array controls the resolutions (or zoom + levels) available. The resolutions can be limited by setting a + maxResolution property or by explicitly specifying a resolutions + array. +

    +

    + Navigation limited by the maxExtent property. A map cannot be panned + so that the center of the viewport is outside of the bounds specified + in maxExtent. If you wish to further restrict panning, use the + restrictedExtent property. With restrictedExtent set, the map cannot + be panned beyond the given bounds. If the maxResolution allows the + map to be zoomed to a resolution that displays an area bigger than + the restrictedExtent, the viewport will remain centered on the + restrictedExtent. +

    +

    + + + + + \ No newline at end of file diff --git a/openlayers/examples/rotate-features.html b/openlayers/examples/rotate-features.html new file mode 100644 index 0000000000..8a8eb0285b --- /dev/null +++ b/openlayers/examples/rotate-features.html @@ -0,0 +1,113 @@ + + + + + + + OpenLayers Rotate Features Example + + + + + + + +

    Rotate vector features

    + +
    + vector, feature, rotating, rotation, rotate, advanced +
    +

    + Details on how to create and rotate vector features programmatically +

    + +
    +
    This example shows a few features rotating. There is not yet a control + built that provides a tool for rotating, but the geometry.rotate method + can be accessed to rotate programmatically.
    + + diff --git a/openlayers/examples/select-feature-multilayer.html b/openlayers/examples/select-feature-multilayer.html new file mode 100644 index 0000000000..58c1adef10 --- /dev/null +++ b/openlayers/examples/select-feature-multilayer.html @@ -0,0 +1,123 @@ + + + + + + + SelectFeature Control on multiple vector layers + + + + + + + +

    OpenLayers Select Feature on Multiple Layers Example

    +
    + vector, feature, selecting, selection, advanced +
    +

    + Select a feature on click with the Control.SelectFeature on multiple + vector layers. +

    +
    +
    + + diff --git a/openlayers/examples/select-feature-openpopup.html b/openlayers/examples/select-feature-openpopup.html new file mode 100644 index 0000000000..cdd0e417fc --- /dev/null +++ b/openlayers/examples/select-feature-openpopup.html @@ -0,0 +1,106 @@ + + + + + + + Open Popup on Layer.Vector + + + + + + + +

    Open Popup on Layer.Vector

    +
    + vector, feature, selecting, selection, popup +
    +

    + Using a Control.SelectFeature, open a popup on click. +

    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    +

    It is possible to use the onSelect/onUnselect hooks on the SelectFeature + to do fun things -- like open a popup. +

    + + diff --git a/openlayers/examples/select-feature.html b/openlayers/examples/select-feature.html new file mode 100644 index 0000000000..00325a4d7c --- /dev/null +++ b/openlayers/examples/select-feature.html @@ -0,0 +1,169 @@ + + + + + + + SelectFeature Control on Layer.Vector + + + + + + + +

    OpenLayers Select Feature Example

    +
    + vector, feature, selecting, selection, advanced +
    +

    + Select a feature on hover or click with the Control.SelectFeature on a + vector layer. +

    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
        +
      • + + +
      • +
      • + + +
      • +
      +
    • +
    +

    Use the shift key to select multiple features. Use the ctrl key to + toggle selection on features one at a time. Note: the "clickout" option has no + effect when "hover" is selected.

    + + diff --git a/openlayers/examples/setextent.html b/openlayers/examples/setextent.html new file mode 100644 index 0000000000..5cf56858fb --- /dev/null +++ b/openlayers/examples/setextent.html @@ -0,0 +1,39 @@ + + + + +Setting a visual Extent + + + + + +

    Setting a Visual Extent

    +
    + boxes, box, marker +
    +

    + Use a boxes layer to visually display the area of interest indicated by a user. +

    +

    + Because the ability to set the map to a given extent is limited by the + current resolutions available, zoomToExtent will not always set the map to + exactly the right extent. In order to visually annotate the actual extent, + this example, will use the Boxes layer to visually describe the desired + extent as well as setting the map extent. +

    +
    + + + diff --git a/openlayers/examples/simplify-linestring.html b/openlayers/examples/simplify-linestring.html new file mode 100644 index 0000000000..15160a0cf7 --- /dev/null +++ b/openlayers/examples/simplify-linestring.html @@ -0,0 +1,103 @@ + + + + + + + + Simplify a LineString geometry + + + + + +

    Simplify a LineString geometry

    +
    + Douglas-Peucker, Douglas, Peucker, Peuker, tolerance +
    +

    + Shows the usage of the method "simplify" that implements + the Douglas-Peucker algorithm to remove "insignificant" + vertices from LineString geometries. +

    +
    + + + + +
    +
    +
    +
    +
    +
    +
    +
    +

    + Instances of OpenLayers.Geometry.LineString have a method simplify, + that can be used to simplify linestring geometries. + Simplification sometimes is useful to enhance the perfomance of + vector rendering or to reduce complexity of geometries. This + might be especially handy when viewing geometries a small + scales. +

    +

    + OpenLayers.Geometry.LineString::simplify is a recursive + implementation of the famous Douglas-Peucker algorithm. It is + controlled by a tolerance factor that defines the threshold for + vertices to be considered "insignificant" for the + general structure of the geometry. +

    +

    + The LineString on the left map can be simplified according to + the tolerance value one enters in the form-field above the maps. + Use a value between 0 and 1 for best results. If you navigate + the left map, the right map will show the same location to make + it easier to spot the differeces between the LineStrings. +

    +

    + You can also use the button "Start animation" to get + results for increasing tolerance-factors from 0.02 to 1.0. The + animation can be paused by clicking on the button "Stop + animation". +

    +

    + The LineString represents a part of the coastline of + this + place southeast of Novosibirsk in Russia — found via + an + example implementation of the algorithm in python. +

    +

    + For a detailled explanation of the algorithm see + the + Wikipedia article or the original publication: David Douglas + & Thomas Peucker, "Algorithms for the reduction of the + number of points required to represent a digitized line or its + caricature", The Canadian Cartographer 10(2), 112-122 (1973) + (DOI: + 10.3138/FM57-6770-U75U-7727). +

    +

    See simplify-linestring.js + for the source code of this example.

    +
    + + + + diff --git a/openlayers/examples/simplify-linestring.js b/openlayers/examples/simplify-linestring.js new file mode 100644 index 0000000000..3f4c6f6375 --- /dev/null +++ b/openlayers/examples/simplify-linestring.js @@ -0,0 +1,599 @@ +// global variables +var map, map2; + +// wrap the instanciation code in an anonymous function that gets executed +// immedeately +(function(){ + // style the vectorlayer + var styleMap = new OpenLayers.StyleMap({ + 'default': new OpenLayers.Style({ + strokeColor: "#333333", + strokeWidth: 1.2, + strokeOpacity: 1 + }) + }); + + // the vectorlayer + var vectorlayer = new OpenLayers.Layer.Vector('Vectorlayer', { + isBaseLayer: true, + styleMap: styleMap + }); + + var original = OpenLayers.Geometry.fromWKT("LINESTRING(" + + "6.247872 11.316756," + + "6.338566 11.316756," + + "6.633323 11.205644," + + "6.724018 11.205644," + + "6.792039 11.205644," + + "7.154817 11.372311," + + "7.313532 11.400089," + + "7.381553 11.344533," + + "7.336206 11.288978," + + "7.200164 11.288978," + + "7.154817 11.261200," + + "7.132143 11.233422," + + "7.154817 11.150089," + + "7.268185 11.177867," + + "7.313532 11.122311," + + "7.404227 11.150089," + + "7.472248 11.094533," + + "7.767005 10.900089," + + "7.758951 10.864989," + + "7.752684 10.837656," + + "7.426900 10.927867," + + "6.519955 10.927867," + + "6.429261 10.900089," + + "6.315893 10.955644," + + "6.270545 10.955644," + + "6.247872 10.927867," + + "6.111830 11.011200," + + "6.066483 11.066756," + + "5.862420 11.038978," + + "5.817073 10.955644," + + "5.771726 10.900089," + + "5.862420 10.761200," + + "5.975788 10.733422," + + "6.157177 10.566756," + + "6.247872 10.511200," + + "6.293219 10.427867," + + "6.315893 10.233422," + + "6.315893 10.177867," + + "6.542629 9.844533," + + "6.587976 9.761200," + + "6.610650 9.288978," + + "6.542629 9.066756," + + "6.565303 8.900089," + + "6.519955 8.816756," + + "6.542629 8.761200," + + "6.565303 8.733422," + + "6.429261 8.427867," + + "6.474608 8.316756," + + "6.724018 8.288978," + + "6.882733 8.538978," + + "6.973428 8.594533," + + "6.996101 8.622311," + + "7.200164 8.650089," + + "7.290859 8.650089," + + "7.426900 8.483422," + + "7.404227 8.455644," + + "7.245511 8.511200," + + "6.996101 8.427867," + + "7.041449 8.372311," + + "7.154817 8.455644," + + "7.200164 8.455644," + + "7.245511 8.455644," + + "7.381553 8.316756," + + "7.381553 8.261200," + + "7.404227 8.233422," + + "7.494921 8.205644," + + "7.767005 8.288978," + + "7.948394 8.233422," + + "8.016415 8.261200," + + "8.197804 8.094533," + + "8.084435 7.816756," + + "8.152456 7.733422," + + "8.175130 7.650089," + + "8.175130 7.511200," + + "8.311172 7.427867," + + "8.311172 7.372311," + + "8.651276 7.372311," + + "8.923360 7.316756," + + "8.900686 7.261200," + + "8.809991 7.261200," + + "8.472735 7.171122," + + "8.333845 7.038978," + + "8.282022 6.981100," + + "8.254778 6.848911," + + "8.265824 6.816756," + + "8.239206 6.711211," + + "8.219743 6.612067," + + "8.130227 6.433044," + + "8.084435 6.316756," + + "8.107109 6.288978," + + "7.948394 6.177867," + + "7.925720 5.983422," + + "7.857699 5.816756," + + "7.835026 5.788978," + + "7.857699 5.511200," + + "7.812352 5.400089," + + "7.812352 5.344533," + + "7.812352 5.177867," + + "8.084435 4.733422," + + "8.107109 4.622311," + + "7.857699 4.344533," + + "7.630963 4.261200," + + "7.540268 4.177867," + + "7.494921 4.150089," + + "7.449574 4.150089," + + "7.404227 4.150089," + + "7.336206 4.094533," + + "7.313532 4.066756," + + "7.041449 4.011200," + + "6.905407 3.955644," + + "6.950754 3.900089," + + "7.200164 3.927867," + + "7.630963 3.872311," + + "7.721657 3.872311," + + "7.948394 3.788978," + + "7.993741 3.705644," + + "7.971067 3.677867," + + "7.925720 3.622311," + + "8.175130 3.705644," + + "8.401866 3.650089," + + "8.492561 3.650089," + + "8.605929 3.538978," + + "8.651276 3.566756," + + "8.855339 3.372311," + + "8.900686 3.316756," + + "8.900686 3.150089," + + "8.787318 2.900089," + + "8.787318 2.844533," + + "8.946033 2.816756," + + "8.991380 2.788978," + + "9.014054 2.705644," + + "8.886928 2.524989," + + "8.832665 2.538978," + + "8.809991 2.455644," + + "8.923360 2.538978," + + "9.014054 2.400089," + + "9.308811 2.288978," + + "9.399506 2.261200," + + "9.512874 2.122311," + + "9.535548 1.983422," + + "9.512874 1.955644," + + "9.467527 1.816756," + + "9.036728 1.816756," + + "8.991380 1.927867," + + "8.946033 1.955644," + + "8.900686 1.983422," + + "8.946033 2.122311," + + "8.968707 2.150089," + + "9.195443 1.927867," + + "9.354158 1.955644," + + "9.376832 2.038978," + + "9.376832 2.094533," + + "9.240790 2.205644," + + "9.195443 2.205644," + + "9.263464 2.150089," + + "9.240790 2.122311," + + "9.195443 2.122311," + + "9.104749 2.122311," + + "8.900686 2.316756," + + "8.787318 2.344533," + + "8.696623 2.372311," + + "8.651276 2.427867," + + "8.719297 2.455644," + + "8.787318 2.650089," + + "8.832665 2.705644," + + "8.605929 2.677867," + + "8.537908 2.788978," + + "8.333845 2.788978," + + "7.925720 2.316756," + + "7.925720 2.261200," + + "7.903046 2.233422," + + "7.857699 2.233422," + + "7.857699 2.177867," + + "7.789678 1.983422," + + "7.812352 1.788978," + + "7.948394 1.538978," + + "7.971067 1.511200," + + "8.129783 1.511200," + + "8.243151 1.594533," + + "8.333845 1.594533," + + "8.424540 1.622311," + + "8.515234 1.566756," + + "8.673950 1.400089," + + "8.771174 1.291756," + + "8.828938 1.119878," + + "8.762504 0.972544," + + "9.238614 0.759633," + + "9.492323 0.627022," + + "9.820891 0.644711," + + "10.376567 0.800622," + + "10.651961 1.085978," + + "10.762173 1.132022," + + "10.943045 1.095989," + + "11.256739 0.999878," + + "11.576074 0.761611," + + "11.768247 0.425211," + + "11.960165 0.074778," + + "11.953907 0.000000," + + "11.629411 0.258767," + + "11.229920 0.582278," + + "11.001633 0.564300," + + "10.868476 0.447478," + + "10.633849 0.541833," + + "10.513370 0.672133," + + "11.188700 0.820078," + + "11.194014 0.859656," + + "11.118212 0.905822," + + "10.874860 0.930311," + + "10.427319 0.716522," + + "10.023620 0.374211," + + "9.434614 0.360144," + + "8.455131 0.859544," + + "8.180481 0.920500," + + "7.902529 1.115078," + + "7.823108 1.269800," + + "7.830482 1.403778," + + "7.791937 1.496744," + + "7.767005 1.538978," + + "7.676310 1.622311," + + "7.653637 1.650089," + + "7.585616 1.955644," + + "7.562942 1.983422," + + "7.562942 2.233422," + + "7.608289 2.400089," + + "7.630963 2.427867," + + "7.608289 2.538978," + + "7.585616 2.566756," + + "7.653637 2.705644," + + "7.630963 2.816756," + + "7.336206 3.011200," + + "7.290859 3.011200," + + "7.245511 3.011200," + + "7.041449 2.955644," + + "6.928081 2.816756," + + "6.928081 2.733422," + + "6.905407 2.622311," + + "6.860060 2.677867," + + "6.814712 2.677867," + + "6.678671 2.677867," + + "6.678671 2.733422," + + "6.769365 2.733422," + + "6.814712 2.733422," + + "6.792039 2.788978," + + "6.293219 3.066756," + + "6.225198 3.122311," + + "6.202525 3.233422," + + "6.134504 3.344533," + + "5.907767 3.261200," + + "5.862420 3.288978," + + "6.043809 3.427867," + + "6.021136 3.483422," + + "5.975788 3.483422," + + "5.930441 3.511200," + + "5.953115 3.566756," + + "5.975788 3.594533," + + "5.749052 3.788978," + + "5.703705 3.788978," + + "5.635684 3.788978," + + "5.703705 3.844533," + + "5.703705 4.011200," + + "5.499642 4.011200," + + "5.862420 4.372311," + + "5.975788 4.427867," + + "6.021136 4.427867," + + "6.089156 4.538978," + + "6.111830 4.566756," + + "6.089156 4.650089," + + "5.998462 4.650089," + + "5.817073 4.788978," + + "5.771726 4.816756," + + "5.681031 4.816756," + + "5.749052 4.927867," + + "5.749052 5.038978," + + "5.839747 5.177867," + + "5.998462 5.233422," + + "6.225198 5.233422," + + "6.270545 5.233422," + + "6.383914 5.288978," + + "6.406587 5.372311," + + "6.429261 5.400089," + + "6.587976 5.483422," + + "6.670626 5.490000," + + "6.700845 5.564100," + + "6.860060 5.927867," + + "6.860060 6.038978," + + "6.950754 6.205644," + + "6.973428 6.316756," + + "7.041449 6.344533," + + "7.064122 6.455644," + + "7.116072 6.541989," + + "7.114313 6.603667," + + "7.025305 6.741422," + + "6.736924 6.701367," + + "6.641658 6.741467," + + "6.500574 6.761389," + + "6.435410 6.733422," + + "6.224291 6.728556," + + "6.191759 6.738989," + + "6.099124 6.755000," + + "6.041805 6.749733," + + "6.001672 6.742967," + + "5.905382 6.718300," + + "5.817073 6.677867," + + "5.611713 6.686622," + + "5.401366 6.864333," + + "5.386274 6.927867," + + "5.356608 6.981811," + + "5.404095 7.111822," + + "5.561958 7.216133," + + "5.660643 7.244722," + + "5.366149 7.489478," + + "5.340927 7.511200," + + "5.114998 7.592867," + + "4.870667 7.692033," + + "4.746560 7.781856," + + "4.708060 7.760867," + + "4.692225 7.802500," + + "4.607090 7.849044," + + "4.481324 7.879711," + + "4.340031 8.093378," + + "4.181171 8.158044," + + "4.116415 8.200800," + + "4.081135 8.195278," + + "4.090912 8.272500," + + "4.032232 8.378311," + + "3.779566 8.791278," + + "3.769654 8.849022," + + "3.598177 8.955178," + + "3.576828 9.059633," + + "3.527037 9.066756," + + "3.498069 9.082022," + + "3.541865 9.174211," + + "3.542409 9.234411," + + "3.576275 9.262711," + + "3.582279 9.287744," + + "3.390995 9.316756," + + "3.209606 9.344533," + + "3.100836 9.367511," + + "2.957466 9.370756," + + "2.870844 9.366222," + + "2.777211 9.285222," + + "2.744851 9.285900," + + "2.775397 9.294867," + + "2.832661 9.341156," + + "2.868114 9.373300," + + "2.869502 9.400089," + + "2.794434 9.420178," + + "2.714423 9.440078," + + "2.641124 9.441944," + + "2.572096 9.428378," + + "2.548379 9.418600," + + "2.573130 9.388211," + + "2.563126 9.333567," + + "2.535855 9.320067," + + "2.517670 9.282778," + + "2.479488 9.260278," + + "2.483125 9.239067," + + "2.464034 9.224278," + + "2.468586 9.180556," + + "2.443129 9.168989," + + "2.439084 9.147456," + + "2.448389 9.129344," + + "2.444897 9.109600," + + "2.450720 9.097256," + + "2.444897 9.080389," + + "2.447808 9.045822," + + "2.424536 9.024011," + + "2.415811 9.000133," + + "2.442457 8.957422," + + "2.429887 8.946567," + + "2.455028 8.894556," + + "2.435936 8.879078," + + "2.413136 8.853411," + + "2.410805 8.836944," + + "2.412202 8.822133," + + "2.387533 8.789544," + + "2.386608 8.776044," + + "2.398706 8.757278," + + "2.373103 8.739511," + + "2.387070 8.769467," + + "2.375434 8.784611," + + "2.358674 8.785922," + + "2.337270 8.793167," + + "2.365195 8.790533," + + "2.399169 8.821478," + + "2.396376 8.837933," + + "2.408946 8.879078," + + "2.432218 8.894878," + + "2.414995 8.963022," + + "2.390961 8.983722," + + "2.340091 8.969389," + + "2.332091 8.946244," + + "2.340091 8.927722," + + "2.332091 8.912289," + + "2.316093 8.904067," + + "2.311730 8.874744," + + "2.288975 8.861244," + + "2.247727 8.856233," + + "2.233180 8.861889," + + "2.209436 8.859233," + + "2.231003 8.871144," + + "2.265911 8.873200," + + "2.277548 8.869600," + + "2.290635 8.873711," + + "2.299360 8.904578," + + "2.268088 8.909622," + + "2.247727 8.925256," + + "2.225734 8.920756," + + "2.208747 8.909622," + + "2.203768 8.921811," + + "2.214352 8.931822," + + "2.197138 8.933811," + + "2.148725 8.907478," + + "2.134577 8.904844," + + "2.113354 8.917222," + + "2.095107 8.918800," + + "2.079961 8.912944," + + "2.060761 8.913356," + + "2.034577 8.902656," + + "1.983589 8.895400," + + "2.033997 8.913356," + + "2.062502 8.918700," + + "2.092758 8.929811," + + "2.148090 8.928756," + + "2.168397 8.937878," + + "2.146421 8.965533," + + "2.182173 8.943933," + + "2.201537 8.951311," + + "2.239138 8.938400," + + "2.267063 8.944989," + + "2.284939 8.925767," + + "2.306887 8.926022," + + "2.311086 8.936356," + + "2.296312 8.952489," + + "2.317254 8.981122," + + "2.334939 9.003844," + + "2.374500 9.014044," + + "2.386136 9.034778," + + "2.401962 9.044656," + + "2.418723 9.044889," + + "2.426287 9.054878," + + "2.411739 9.063522," + + "2.426867 9.099311," + + "2.398362 9.125233," + + "2.373339 9.121944," + + "2.403595 9.134289," + + "2.417680 9.165778," + + "2.425860 9.192778," + + "2.423783 9.231400," + + "2.400330 9.237022," + + "2.419494 9.243567," + + "2.429815 9.246711," + + "2.449495 9.245489," + + "2.457676 9.289856," + + "2.481311 9.298211," + + "2.488585 9.334211," + + "2.520255 9.353822," + + "2.520400 9.369944," + + "2.494960 9.432511," + + "2.463671 9.469200," + + "2.406950 9.500578," + + "2.240907 9.536433," + + "2.129969 9.569467," + + "2.031530 9.607422," + + "1.932328 9.658044," + + "1.835167 9.695656," + + "1.746196 9.760744," + + "1.667446 9.789667," + + "1.575400 9.797622," + + "1.562104 9.828722," + + "1.531422 9.846800," + + "1.415859 9.888744," + + "1.315206 9.942167," + + "1.175573 10.083667," + + "1.147394 10.090267," + + "1.118064 10.086567," + + "0.990883 9.998400," + + "0.778930 9.990856," + + "0.592924 10.033144," + + "0.507490 10.125422," + + "0.419562 10.320811," + + "0.375403 10.344533," + + "0.276464 10.431189," + + "0.220170 10.534911," + + "0.181271 10.571000," + + "0.153745 10.620156," + + "0.114973 10.653889," + + "0.103274 10.707756," + + "0.097914 10.761511," + + "0.076256 10.811522," + + "0.061935 10.867833," + + "0.000000 10.960167)" + ); + vectorlayer.addFeatures([new OpenLayers.Feature.Vector(original)]); + var maxExtent = vectorlayer.getDataExtent(); + // instanciate the map + map = new OpenLayers.Map("map", { + fractionalZoom: true, + maxExtent: maxExtent, + layers: [vectorlayer] + }); + map.zoomToMaxExtent(); + map.events.register('moveend', map, function(){ + map2.setCenter(map.getCenter(), map.getZoom()); + }); + + + var vectorlayer2 = new OpenLayers.Layer.Vector('Vectorlayer simplified', { + isBaseLayer: true, + styleMap: styleMap + }); + + map2 = new OpenLayers.Map("map-simplify", { + fractionalZoom: true, + maxExtent: maxExtent, + controls: [], + layers: [vectorlayer2] + }); + map2.zoomToExtent(maxExtent); + + // Control behaviour + var lastValue = 0.1; + var simplify = function() { + var min = 0; + var max = 1; + var givenVal= parseFloat(document.getElementById('tolerance').value); + var useVal = lastValue; + if (!isNaN(givenVal)) { + if (givenVal >= min && givenVal <= max) { + useVal = givenVal; + } else { + useVal = (givenVal < min) ? min : max; + } + } + document.getElementById('tolerance').value = useVal; + vectorlayer2.removeFeatures(vectorlayer2.features); + var newLineString = original.simplify(useVal); + vectorlayer2.addFeatures([new OpenLayers.Feature.Vector(newLineString)]); + var originalVerticesCnt = original.getVertices().length; + var simplifiedVerticesCnt = newLineString.getVertices().length; + var infotxt = '
    • Original LineString: '; + infotxt += originalVerticesCnt + ' vertices
    • '; + infotxt += '
    • Simplified geometry: ' + simplifiedVerticesCnt + ' vertices
    • '; + infotxt += '
    • Decreased by ' + (((originalVerticesCnt-simplifiedVerticesCnt)/originalVerticesCnt)*100).toFixed(2) + ' per cent
    '; + document.getElementById('info').innerHTML = infotxt; + lastValue = useVal; + }; + document.getElementById('tolerance').value = lastValue; + document.getElementById('simplify').onclick = simplify; + simplify(); + + var animationInterval; + var animationHandler = function(){ + if (this.value === 'Start animation') { + document.getElementById('simplify').disabled = true; + document.getElementById('animation').value = "Stop animation"; + animationInterval = window.setInterval(function(){ + var tolerance = parseFloat(document.getElementById('tolerance').value); + if (tolerance < 1) { + tolerance+=0.02; + } else { + tolerance = 0.02; + } + document.getElementById('tolerance').value = tolerance.toFixed(2); + simplify(); + }, 500); + simplify(); + } else { + if (animationInterval) { + window.clearInterval(animationInterval); + } + document.getElementById('simplify').disabled = false; + document.getElementById('animation').value = "Start animation"; + } + }; + document.getElementById('animation').onclick = animationHandler; +})(); diff --git a/openlayers/examples/single-tile.html b/openlayers/examples/single-tile.html new file mode 100644 index 0000000000..1a6d869373 --- /dev/null +++ b/openlayers/examples/single-tile.html @@ -0,0 +1,33 @@ + + + + + + + OpenLayers: Single Tile + + + + +

    Single Tile Example

    +
    tile, ratio, singleTile, performance
    +

    + Use the singleTile option on gridded layers to request a single tile. +

    +
    +
    +

    + This map demonstrates the use of the singleTile property as an + alternative to the default tiled behavior of layers. The first + layer in the map is a WMS layer with the singleTile option set + true. The second layer is a WMS layer with the default options. +

    +

    + View the single-tile.js + source to see how this is done. +

    +
    + + + + diff --git a/openlayers/examples/single-tile.js b/openlayers/examples/single-tile.js new file mode 100644 index 0000000000..26d94f0555 --- /dev/null +++ b/openlayers/examples/single-tile.js @@ -0,0 +1,20 @@ +var map = new OpenLayers.Map({ + div: "mapDiv", + layers: [ + new OpenLayers.Layer.WMS( + "Single Tile", + "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: "basic"}, + {singleTile: true, ratio: 1} + ), + new OpenLayers.Layer.WMS( + "Multiple Tiles", + "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: "basic"} + ) + ], + center: new OpenLayers.LonLat(6.5, 40.5), + zoom: 4 +}); + +map.addControl(new OpenLayers.Control.LayerSwitcher()); diff --git a/openlayers/examples/sld-parser.html b/openlayers/examples/sld-parser.html new file mode 100644 index 0000000000..14f87eac11 --- /dev/null +++ b/openlayers/examples/sld-parser.html @@ -0,0 +1,70 @@ + + + + + + + OpenLayers SLD Parser + + + + + + +

    SLD Parser

    +
    + sld, sldselect, styling, style, parser, cleanup +
    +
    Parsing Styled Layer Descriptor (SLD) documents with the SLD format.
    + +
    +
    +
    + + +
    + This example uses the SLD format to parse SLD documents pasted into the textarea above. + A rough representation of the parsed style is shown in the textarea below. +
    + + + + + + + diff --git a/openlayers/examples/sld.html b/openlayers/examples/sld.html new file mode 100644 index 0000000000..4667ba34b5 --- /dev/null +++ b/openlayers/examples/sld.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + +

    Styled Layer Descriptor (SLD) Example

    +
    + vector, feature, sld, styling, style +
    +

    + Parsing SLD and applying styles to a vector layer. +

    +
    +

    This example uses a SLD + file to style the vector features. To construct layers that use styles + from SLD, create a StyleMap for the layer that uses one of the userStyles in the + namedLayers object of the return from format.read(). Look at the sld.js source + to see how this is done.

    +

    Select a new style for the WaterBodies layer below:

    +
      +
    + + diff --git a/openlayers/examples/sld.js b/openlayers/examples/sld.js new file mode 100644 index 0000000000..888a9c6d27 --- /dev/null +++ b/openlayers/examples/sld.js @@ -0,0 +1,102 @@ +var map, sld, waterBodies; +var format = new OpenLayers.Format.SLD(); +function init() { + + map = new OpenLayers.Map('map', {allOverlays: true}); + var layers = createLayers(); + map.addLayers(layers); + + waterBodies = layers[2]; + map.addControl(new OpenLayers.Control.SelectFeature( + waterBodies, {hover: true, autoActivate: true} + )); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + + OpenLayers.Request.GET({ + url: "tasmania/sld-tasmania.xml", + success: complete + }); +} + +// handler for the OpenLayers.Request.GET function in the init method +function complete(req) { + sld = format.read(req.responseXML || req.responseText); + buildStyleChooser(); + setLayerStyles(); + + map.zoomToExtent(new OpenLayers.Bounds(143,-39,150,-45)); +} + +function createLayers() { + // the name of each layer matches a NamedLayer name in the SLD document + var layerData = [{ + name: "Land", + url: "tasmania/TasmaniaStateBoundaries.xml" + }, { + name: "Roads", + url: "tasmania/TasmaniaRoads.xml" + }, { + name: "WaterBodies", + url: "tasmania/TasmaniaWaterBodies.xml" + }, { + name: "Cities", + url: "tasmania/TasmaniaCities.xml" + }]; + + var layers = []; + for (var i=0,ii=layerData.length; i + + + + + OpenLayers Snap Grid Example + + + + + +

    Snap Grid Example

    + +
    + snap grid +
    + +
    Use a PointGrid layer and a Snapping control to snap to a grid of regularly spaced points
    + +
    + + Grid rotation: + + +   + Grid spacing: + + +   + Max points: + + +
    +

    + This example demonstrates feature editing with snapping to a regular + grid. The map is configured with a OpenLayers.Layer.PointGrid + layer and a OpenLayers.Control.Snapping agent. For the + best performance, the point grid layer should not made visible. + Snapping still works with layers that are not visible. +

    + See the + snap-grid.js source to see how this is done. +

    +
    + + + + + diff --git a/openlayers/examples/snap-grid.js b/openlayers/examples/snap-grid.js new file mode 100644 index 0000000000..81a72dab11 --- /dev/null +++ b/openlayers/examples/snap-grid.js @@ -0,0 +1,81 @@ +var points = new OpenLayers.Layer.PointGrid({ + name: "Snap Grid", + dx: 600, dy: 600, + styleMap: new OpenLayers.StyleMap({ + pointRadius: 1, + strokeColor: "#3333ff", + strokeWidth: 1, + fillOpacity: 1, + fillColor: "#ffffff", + graphicName: "square" + }) +}); + +var lines = new OpenLayers.Layer.Vector("Lines", { + styleMap: new OpenLayers.StyleMap({ + pointRadius: 3, + strokeColor: "#ff3300", + strokeWidth: 3, + fillOpacity: 0 + }) +}); + +var map = new OpenLayers.Map({ + div: "map", + layers: [new OpenLayers.Layer.OSM(), points, lines], + controls: [ + new OpenLayers.Control.Navigation(), + new OpenLayers.Control.LayerSwitcher(), + new OpenLayers.Control.Attribution() + ], + restrictedExtent: new OpenLayers.Bounds( + 1035374, 7448940, 1074510, 7468508 + ), + center: new OpenLayers.LonLat(1054942, 7458724), + zoom: 13 +}); + +// configure the snapping agent +var snap = new OpenLayers.Control.Snapping({ + layer: lines, + targets: [{ + layer: points, + tolerance: 15 + }] +}); +snap.activate(); + +// add some editing tools to a panel +var panel = new OpenLayers.Control.Panel({ + displayClass: "olControlEditingToolbar" +}); +var draw = new OpenLayers.Control.DrawFeature( + lines, OpenLayers.Handler.Path, + {displayClass: "olControlDrawFeaturePath", title: "Draw Features"} +); +modify = new OpenLayers.Control.ModifyFeature( + lines, {displayClass: "olControlModifyFeature", title: "Modify Features"} +); +panel.addControls([ + new OpenLayers.Control.Navigation({title: "Navigate"}), + modify, draw +]); +map.addControl(panel); + +var rotation = document.getElementById("rotation"); +rotation.value = String(points.rotation); +rotation.onchange = function() { + points.setRotation(Number(rotation.value)); +} + +var spacing = document.getElementById("spacing"); +spacing.value = String(points.dx); +spacing.onchange = function() { + points.setSpacing(Number(spacing.value)); +} + +var max = document.getElementById("max"); +max.value = String(points.maxFeatures); +max.onchange = function() { + points.setMaxFeatures(Number(max.value)); +} diff --git a/openlayers/examples/snap-split.html b/openlayers/examples/snap-split.html new file mode 100644 index 0000000000..95b9fa38d6 --- /dev/null +++ b/openlayers/examples/snap-split.html @@ -0,0 +1,282 @@ + + + + + + + Snapping & Splitting + + + + + + + + + +

    Snapping & Splitting Example

    +
    + vector, feature, splitting, snapping, stylemap, advanced +
    +
    A demonstration snapping and splitting while editing vector features.
    +
    +
    + + + + + + + + + + + + + + +
    targetnodevertexedge
    roads
    +
    + + + + + + + + + +
    +
    + Clear all features. + + diff --git a/openlayers/examples/snapping.html b/openlayers/examples/snapping.html new file mode 100644 index 0000000000..6747e899f6 --- /dev/null +++ b/openlayers/examples/snapping.html @@ -0,0 +1,324 @@ + + + + + + + Snapping + + + + + + + + + +

    Snapping Example

    +
    + vector, feature, snapping, stylemap, advanced +
    +
    A demonstration snapping while editing vector features.
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    targetsnodevertexedge
    points
    lines
    polygons
    +

    Though all snapping types are shown here for all target layers, not all are sensible. + Points don't have edges, for example.

    + + diff --git a/openlayers/examples/sos.html b/openlayers/examples/sos.html new file mode 100644 index 0000000000..096d19d532 --- /dev/null +++ b/openlayers/examples/sos.html @@ -0,0 +1,189 @@ + + + + + + + SOS Client Example + + + + + + + +

    SOS client example

    + +
    + sos, sensor, observation, popup, advanced +
    +

    + Shows how to connect OpenLayers to a Sensor Observation Service (SOS) +

    +
    +
    +

    This example uses a vector layer with a Protocol.SOS and a fixed Strategy. +

    When clicking on a point feature (the weather stations offered by the SOS), the + latest values for all offerings are displayed in a popup.

    +
    + + diff --git a/openlayers/examples/spherical-mercator.html b/openlayers/examples/spherical-mercator.html new file mode 100644 index 0000000000..099ad03ece --- /dev/null +++ b/openlayers/examples/spherical-mercator.html @@ -0,0 +1,158 @@ + + + + + + + OpenLayers: Spherical Mercator + + + + + + + + + + + + + +

    OpenLayers Spherical Mercator Example

    + +
    + spherical, mercator, osm, xyz, google, virtual earth, yahoo, tms, tile +
    +

    + Shows the use of the Spherical Mercator Layers, for overlaying + Google, Yahoo, Microsoft, and other layers with WMS and TMS tiles. +

    +
    + +
    +
    + + + + + diff --git a/openlayers/examples/split-feature.html b/openlayers/examples/split-feature.html new file mode 100644 index 0000000000..7a434ea618 --- /dev/null +++ b/openlayers/examples/split-feature.html @@ -0,0 +1,116 @@ + + + + + + + Split Feature Example + + + + + + + + +

    OpenLayers Split Feature Example

    +
    + vector, feature, splitting, split, stylemap +
    +

    + Demonstrates splitting of line features. +

    +
    +
    +

    The split control can be configured to listen for edits on any vector layer + or it can allow for creation of temporary sketch features. Modified or + newly drawn features will be used to split existing features on any target + layer. This example shows the split control configured to use temporary + sketches for the split.

    +
    + + diff --git a/openlayers/examples/strategy-bbox.html b/openlayers/examples/strategy-bbox.html new file mode 100644 index 0000000000..3b53c778da --- /dev/null +++ b/openlayers/examples/strategy-bbox.html @@ -0,0 +1,72 @@ + + + + + + + OpenLayers BBOX Strategy Example + + + + + + +

    BBOX Strategy Example

    +
    + vector, feature, stylemap, wfs, bbox, strategy, cleanup +
    +

    + Uses a BBOX strategy to request features within a bounding box. +

    +
    +
    +

    The BBOX strategy requests data within a bounding box. When the + previously requested data bounds are invalidated (by browsing to + some area not covered by those bounds), another request for data + is issued.

    +
    + + diff --git a/openlayers/examples/strategy-cluster-extended.html b/openlayers/examples/strategy-cluster-extended.html new file mode 100644 index 0000000000..51d3e8786d --- /dev/null +++ b/openlayers/examples/strategy-cluster-extended.html @@ -0,0 +1,125 @@ + + + + + + + Extended clustering example + + + + + +

    Extended clustering

    +
    + cluster, advanced +
    +

    + Shows the usage of custom classes for a fine grained control about + the clustering behaviour. +

    +
    +
    +
    +
    +

    + Select the desired clustering strategy: +

    + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +

    + The vectorlayer in this example contains random data with an + attribute "clazz" that can take the values 1, 2, 3 and 4. The + features with clazz = 4 are considered more important than the + others. +

    +

    + The radiobuttons on the right of the map control the + cluster strategy to be applied to the features. +

    +
      +
    • + No strategy + means that all features are + rendered, no clustering shall be applied +
    • +
    • + Simple cluster-strategy + applies the cluster + strategy with default options to the layer. You should notice + that many of the important features with clazz = 4 are getting + lost, since clustering happens regardless of feature attributes +
    • +
    • + Attributive cluster-strategy + uses a + customized cluster strategy. This strategy is configured to + cluster features of the same clazz only. You should be able to see all + red points (clazz = 4) even though the data is clustered. A + cluster now contains only features of the same clazz. +
    • +
    • + Rulebased cluster-strategy + uses another + customized cluster strategy. This strategy is configured to + cluster features that follow a certain rule only. In this case only + features with a clazz different from 4 are considered as + candidates for clustering. That means that usually you have fewer + clusters on the map, yet all with clazz = 4 are easily + distinguishable +
    • +
    +

    + Hover over the features to get a short infomation about the + feature or cluster of features. +

    +
    +

    + View the strategy-cluster-extended.js + source to see how this is done. +

    + + + + diff --git a/openlayers/examples/strategy-cluster-extended.js b/openlayers/examples/strategy-cluster-extended.js new file mode 100644 index 0000000000..70928c4492 --- /dev/null +++ b/openlayers/examples/strategy-cluster-extended.js @@ -0,0 +1,247 @@ +/** + * Class: OpenLayers.Strategy.AttributeCluster + * Strategy for vector feature clustering based on feature attributes. + * + * Inherits from: + * - + */ +OpenLayers.Strategy.AttributeCluster = OpenLayers.Class(OpenLayers.Strategy.Cluster, { + /** + * the attribute to use for comparison + */ + attribute: null, + /** + * Method: shouldCluster + * Determine whether to include a feature in a given cluster. + * + * Parameters: + * cluster - {} A cluster. + * feature - {} A feature. + * + * Returns: + * {Boolean} The feature should be included in the cluster. + */ + shouldCluster: function(cluster, feature) { + var cc_attrval = cluster.cluster[0].attributes[this.attribute]; + var fc_attrval = feature.attributes[this.attribute]; + var superProto = OpenLayers.Strategy.Cluster.prototype; + return cc_attrval === fc_attrval && + superProto.shouldCluster.apply(this, arguments); + }, + CLASS_NAME: "OpenLayers.Strategy.AttributeCluster" +}); + +/** + * Class: OpenLayers.Strategy.RuleCluster + * Strategy for vector feature clustering according to a given rule. + * + * Inherits from: + * - + */ +OpenLayers.Strategy.RuleCluster = OpenLayers.Class(OpenLayers.Strategy.Cluster, { + /** + * the rule to use for comparison + */ + rule: null, + /** + * Method: shouldCluster + * Determine whether to include a feature in a given cluster. + * + * Parameters: + * cluster - {} A cluster. + * feature - {} A feature. + * + * Returns: + * {Boolean} The feature should be included in the cluster. + */ + shouldCluster: function(cluster, feature) { + var superProto = OpenLayers.Strategy.Cluster.prototype; + return this.rule.evaluate(cluster.cluster[0]) && + this.rule.evaluate(feature) && + superProto.shouldCluster.apply(this, arguments); + }, + CLASS_NAME: "OpenLayers.Strategy.RuleCluster" +}); + + +// global variables +var map, vectorlayer, features, stylemap, select; + +// wrap the instanciation code in an anonymous function that gets executed +// immeadeately +(function(){ + + // The function that gets called on feature selection: shows information + // about the feature/cluser in a div on the page + var showInformation = function(evt){ + var feature = evt.feature; + var info = 'Last hovered feature:
    '; + if (feature.cluster) { + info += '  Cluster of ' + feature.attributes.count + ' features:'; + var clazzes = { + '1': 0, + '2': 0, + '3': 0, + '4': 0 + }; + for (var i = 0; i < feature.attributes.count; i++) { + var feat = feature.cluster[i]; + clazzes[feat.attributes.clazz]++; + } + for (var j=1; j<=4; j++) { + var plural_s = (clazzes[j] !== 1) ? 's' : ''; + info += '
        • clazz ' + j + ': ' + clazzes[j] + ' feature' + plural_s; + } + } else { + info += '  Single feature of clazz = ' + feature.attributes.clazz; + } + $('info').innerHTML = info; + }; + + // The function that gets called on feature selection. Shows information + // about the number of "points" on the map. + var updateGeneralInformation = function() { + var info = 'Currently ' + vectorlayer.features.length + ' points are shown on the map.'; + $('generalinfo').innerHTML = info; + }; + + // instanciate the map + map = new OpenLayers.Map("map"); + + // background WMS + var ol_wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", { + layers: "basic" + }); + + // context to style the vectorlayer + var context = { + getColor: function(feature){ + var color = '#aaaaaa'; + if (feature.attributes.clazz && feature.attributes.clazz === 4) { + color = '#ee0000'; + } else if(feature.cluster) { + var onlyFour = true; + for (var i = 0; i < feature.cluster.length; i++) { + if (onlyFour && feature.cluster[i].attributes.clazz !== 4) { + onlyFour = false; + } + } + if (onlyFour === true) { + color = '#ee0000'; + } + } + return color; + } + }; + + // style the vectorlayer + stylemap = new OpenLayers.StyleMap({ + 'default': new OpenLayers.Style({ + pointRadius: 5, + fillColor: "${getColor}", + fillOpacity: 0.7, + strokeColor: "#666666", + strokeWidth: 1, + strokeOpacity: 1, + graphicZIndex: 1 + }, { + context: context + }), + 'select' : new OpenLayers.Style({ + pointRadius: 5, + fillColor: "#ffff00", + fillOpacity: 1, + strokeColor: "#666666", + strokeWidth: 1, + strokeOpacity: 1, + graphicZIndex: 2 + }) + }); + + // the vectorlayer + vectorlayer = new OpenLayers.Layer.Vector('Vectorlayer', {styleMap: stylemap, strategies: []}); + + // the select control + select = new OpenLayers.Control.SelectFeature( + vectorlayer, {hover: true} + ); + map.addControl(select); + select.activate(); + vectorlayer.events.on({"featureselected": showInformation}); + + map.addLayers([ol_wms, vectorlayer]); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.zoomToMaxExtent(); + + features = []; + // adding lots of features: + for (var i = 0; i < 700; i++) { + var r1 = Math.random(); + var r2 = Math.random(); + var r3 = Math.random(); + var r4 = Math.random(); + var px = r1 * 180 * ((r2 < 0.5) ? -1 : 1); + var py = r3 * 90 * ((r4 < 0.5) ? -1 : 1); + var p = new OpenLayers.Geometry.Point(px, py); + var clazz = (i % 10 === 0) ? 4 : Math.ceil(r4 * 3); + var f = new OpenLayers.Feature.Vector(p, {clazz: clazz}); + features.push(f); + } + vectorlayer.addFeatures(features); + updateGeneralInformation(); + + // the behaviour and methods for the radioboxes + var changeStrategy = function() { + var strategies = []; + // this is the checkbox + switch(this.value) { + case 'cluster': + // standard clustering + strategies.push(new OpenLayers.Strategy.Cluster()); + break; + case 'attribute-cluster': + // use the custom class: only cluster features of the same clazz + strategies.push(new OpenLayers.Strategy.AttributeCluster({ + attribute:'clazz' + })); + break; + case 'rule-cluster': + // use the custom class: only cluster features that have a + // clazz smaller than 4 + strategies.push(new OpenLayers.Strategy.RuleCluster({ + rule: new OpenLayers.Rule({ + filter: new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.LESS_THAN, + property: "clazz", + value: 4 + }) + }) + })); + break; + } + // remove layer and control + map.removeLayer(vectorlayer); + map.removeControl(select); + // rebuild layer + vectorlayer = new OpenLayers.Layer.Vector('Vectorlayer', {styleMap: stylemap, strategies: strategies}); + map.addLayer( vectorlayer ); + vectorlayer.addFeatures(features); + // rebuild select control + select = new OpenLayers.Control.SelectFeature( + vectorlayer, {hover: true} + ); + map.addControl(select); + select.activate(); + vectorlayer.events.on({"featureselected": showInformation}); + // update meta information + updateGeneralInformation(); + }; + // bind the behviour to the radios + var inputs = document.getElementsByTagName('input'); + for( var cnt = 0; cnt < inputs.length; cnt++) { + var input = inputs[cnt]; + if (input.name === 'strategy') { + input.onclick = changeStrategy; + } + } +})(); diff --git a/openlayers/examples/strategy-cluster-threshold.html b/openlayers/examples/strategy-cluster-threshold.html new file mode 100644 index 0000000000..31c79ce776 --- /dev/null +++ b/openlayers/examples/strategy-cluster-threshold.html @@ -0,0 +1,152 @@ + + + + + + + OpenLayers Cluster Strategy Threshold + + + + + + + +

    Cluster Strategy Threshold

    +
    + vector, feature, stylemap, wfs, cluster, strategy, cleanup +
    +

    + Demonstrates the use of the cluster strategy threshold property. +

    +
    +
    +

    The Cluster strategy lets you display points representing clusters + of features within some pixel distance. You can control the behavior + of the cluster strategy by setting its distance and threshold properties. + The distance determines the search radius (in pixels) for features to + cluster. The threshold determines the minimum number of features to + be considered a cluster.

    +
    +
    +

    Cluster details: hover over a feature to see details.

    +
      +
    • + + +
    • +
    • + + +
    • +
    + + + diff --git a/openlayers/examples/strategy-cluster.html b/openlayers/examples/strategy-cluster.html new file mode 100644 index 0000000000..49344230ab --- /dev/null +++ b/openlayers/examples/strategy-cluster.html @@ -0,0 +1,208 @@ + + + + + + + OpenLayers Cluster Strategy Example + + + + + + + + + +

    Cluster Strategy Example

    +
    + vector, feature, stylemap, wfs, cluster, strategy, cleanup +
    +

    + Uses a cluster strategy to render points representing clusters of features. +

    +
    +
    +

    The Cluster strategy lets you display points representing clusters + of features within some pixel distance.

    +
    +
    +

    Hover over a cluster on the map to see the photos it includes.

    +
    +
    +
    <<
    +
    + +
    +
    >>
    +
    +
    + + diff --git a/openlayers/examples/strategy-paging.html b/openlayers/examples/strategy-paging.html new file mode 100644 index 0000000000..c51518a2ee --- /dev/null +++ b/openlayers/examples/strategy-paging.html @@ -0,0 +1,86 @@ + + + + + + + OpenLayers Paging Strategy Example + + + + + + +

    Paging Strategy Example

    +
    + vector, feature, stylemap, wfs, paging, strategy, cleanup +
    +

    + Uses a paging strategy to cache large batches of features and render a page at a time. +

    +
    + Displaying page 0 of ... + + +

    +
    +

    The Paging strategy lets you apply client side paging for protocols + that do not support paging on the server. In this case, the protocol requests a + batch of 100 features, the strategy caches those and supplies a single + page at a time to the layer.

    +
    + + diff --git a/openlayers/examples/style-rules.html b/openlayers/examples/style-rules.html new file mode 100644 index 0000000000..987b01e8f7 --- /dev/null +++ b/openlayers/examples/style-rules.html @@ -0,0 +1,49 @@ + + + + + + + OpenLayers Rule Based Style + + + + + + +

    Rule Based Style

    +
    + vector, feature, stylemap, filter, comparison +
    +

    + Use rule based styling to use different symbolizers for different + feature groups. +

    + +
    + +
    +

    + This example uses four rules to render features. Rules are + based on a feature attribute and determine which symbolizer + is applied when rendering a feature. The rules in this example + change which marker is used by providing an externalGraphic + property in the symbolizer. +

    + The features are labeled with the same attribute that determines + the symbolizer used. You should be able to confirm that the + graphic color corresponds to the range of numbers given below. +

    +
      +
    • 0 <= blue < 25 +
    • 25 <= green < 50 +
    • 50 <= gold <= 75 +
    • 75 < red <= 100 +
    +

    + See the + style-rules.js source to see how this is done. +

    +
    + + diff --git a/openlayers/examples/style-rules.js b/openlayers/examples/style-rules.js new file mode 100644 index 0000000000..42d3f00a8b --- /dev/null +++ b/openlayers/examples/style-rules.js @@ -0,0 +1,99 @@ +var map; + +function init() { + map = new OpenLayers.Map("map"); + + var wms = new OpenLayers.Layer.WMS( + "OpenLayers WMS", + "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: "basic"} + ); + + /** + * Create 50 vector features. Your features would typically be fetched + * from the server. These are created here to demonstrate a rule based + * style. The features are given an attribute named "foo". The value + * of this attribute is an integer that ranges from 0 to 100. + */ + var features = new Array(25); + for (var i=0; i + + + + + + OpenLayers StyleMap + + + + + + +

    StyleMap Example

    + +
    + vector, feature, stylemap +
    + +

    + Shows how to use a StyleMap to style features with rule based styling. + A style map references on or more OpenLayers.Style objects. These + OpenLayers.Style objects are collections of OpenLayers.Rule objects + that determine how features are styled. An OpenLayers.Rule object + combines an OpenLayers.Filter object with a symbolizer. A filter is used + to determine whether a rule applies for a given feature, and a symbolizer + is used to draw the feature if the rule applies. +

    + +
    + +
    +

    A style map is used with vector layers to define styles for various + rendering intents. The style map used here has styles defined for the + "default" and "select" rendering intents. This map also has an active + select feature control. When you hover over features, they are selected + and drawn with the style corresponding the the "select" render intent. +

    +
    + + diff --git a/openlayers/examples/styles-context.html b/openlayers/examples/styles-context.html new file mode 100644 index 0000000000..e9e35bc335 --- /dev/null +++ b/openlayers/examples/styles-context.html @@ -0,0 +1,117 @@ + + + + + + + OpenLayers Vector Styles + + + + + + +

    Feature Styles Example

    + +
    + vector, feature, stylemap +
    + +

    + To style features with a custom function that evaluates each feature, use + the context option of an OpenLayers.Style object. If the context object + contains a function and this function is referenced in a symbolizer, the + function will be called with the feature as an argument.. +

    + +
    + +
    +

    Features in the northern hemisphere are styled according to their + "type" attribute. This is accomplished with a simple template that + is evaluated with the feature attributes as context.

    +

    Features in the sourthern hemisphere are styled according to a + combination of their attributes and non-attribute properties. This + is accomplished using an advanced template that calls functions + on the context object passed to the Style constructor.

    +
    + + diff --git a/openlayers/examples/styles-rotation.html b/openlayers/examples/styles-rotation.html new file mode 100644 index 0000000000..ed2144838b --- /dev/null +++ b/openlayers/examples/styles-rotation.html @@ -0,0 +1,93 @@ + + + + + + + OpenLayers Styles Rotation Example + + + + + + +

    Rotation Style Example

    +
    + vector, feature, stylemap, rotation, cleanup +
    +

    + Use the rotation property of a point symbolizer to rotate + point symbolizers. +

    +
    +
    + To style point features with rotation, use the rotation property of the + symbolizer. The center of the rotation is the point of the image + specified by graphicXOffset and graphicYOffset. The rotation is + specified in degrees clockwise. +
    + + diff --git a/openlayers/examples/styles-unique.html b/openlayers/examples/styles-unique.html new file mode 100644 index 0000000000..0d2e1ec500 --- /dev/null +++ b/openlayers/examples/styles-unique.html @@ -0,0 +1,109 @@ + + + + + + + OpenLayers Styles Unique Value Styles Example + + + + + + +

    Unique Value Styles Example

    + +
    + vector, feature, stylemap, uniquevalue, cleanup +
    + +

    + Shows how to create a style based on unique feature attribute values (markers) + and feature state values (circles). +

    + +
    + +
    + + diff --git a/openlayers/examples/sundials-spherical-mercator.html b/openlayers/examples/sundials-spherical-mercator.html new file mode 100644 index 0000000000..38f7b9321f --- /dev/null +++ b/openlayers/examples/sundials-spherical-mercator.html @@ -0,0 +1,115 @@ + + + + + + + OpenLayers: Sundials on a Spherical Mercator Map + + + + + + + + + +

    OSM + Google Maps + KML Reprojection

    + +
    + osm, kml, spherical, mercator, reprojection, feature, popup, advanced +
    + +

    + Demonstrates loading and displaying a KML file on top of OpenStreetMap (OSM) and Google Maps data. Loads data from a KML file of sundials. +

    + +
    + +
    + + diff --git a/openlayers/examples/sundials.html b/openlayers/examples/sundials.html new file mode 100644 index 0000000000..b718755171 --- /dev/null +++ b/openlayers/examples/sundials.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + +

    KML Layer Example

    + +
    + kml, popup, feature +
    + +

    + Demonstrates loading and displaying a KML file on top of a basemap. +

    + +
    + +
    + + diff --git a/openlayers/examples/symbolizers-fill-stroke-graphic.html b/openlayers/examples/symbolizers-fill-stroke-graphic.html new file mode 100644 index 0000000000..f28c8c2e67 --- /dev/null +++ b/openlayers/examples/symbolizers-fill-stroke-graphic.html @@ -0,0 +1,141 @@ + + + + + + + OpenLayers Fill, Stroke, and Graphic Example + + + + + + +

    OpenLayers Example

    +
    + vector, feature, symbolizer, filter, comparison, labeling +
    +

    + Demonstrate fill, stroke, and graphic property of symbolizers. +

    +
    +
    + This example shows how to use symbolizers with defaults for stroke, fill, and graphic. + This also allows to create labels for a feature without the feature rendered. Click on + the label in the middle to see selection of features with labelSelect set to true. +
    + + diff --git a/openlayers/examples/tasmania/TasmaniaCities.xml b/openlayers/examples/tasmania/TasmaniaCities.xml new file mode 100644 index 0000000000..11f5bd7c03 --- /dev/null +++ b/openlayers/examples/tasmania/TasmaniaCities.xml @@ -0,0 +1,40 @@ + + + + + 147.29100045,-42.85100182 147.29100045,-42.85100182 + + + + + + + + + 147.29100045,-42.85100182 + + + + + Hobart + Tasmania + Australia + Provincial capital + 100,000 to 250,000 + + + + + + + + + 147,-41.1 + + + + + Australia + + + diff --git a/openlayers/examples/tasmania/TasmaniaRoads.xml b/openlayers/examples/tasmania/TasmaniaRoads.xml new file mode 100644 index 0000000000..f01b56d3dc --- /dev/null +++ b/openlayers/examples/tasmania/TasmaniaRoads.xml @@ -0,0 +1,204 @@ + + + + + 145.19754,-43.423512 148.27298,-40.852802 + + + + + + + + + 146.468582,-41.241478 146.574768,-41.251186 146.640411,-41.255154 146.766129,-41.332348 146.794189,-41.34417 146.822174,-41.362988 146.863434,-41.380234 146.899521,-41.379452 146.929504,-41.378227 147.008041,-41.356079 147.098343,-41.362919 + + + + + alley + + + + + + + + + 147.098343,-41.362919 147.17305,-41.452778 147.213867,-41.503773 147.234894,-41.546661 147.251129,-41.573826 147.264664,-41.602474 147.284485,-41.617554 147.300583,-41.637878 + + + + + highway + + + + + + + + + 147.300583,-41.637878 147.225815,-41.626938 147.183319,-41.619236 147.082367,-41.577755 147.031326,-41.565205 146.961487,-41.564186 146.924545,-41.568565 146.876328,-41.569614 146.783722,-41.56073 146.684937,-41.536232 146.614258,-41.478153 146.619995,-41.423958 146.582581,-41.365482 146.52478,-41.29541 146.477493,-41.277622 146.468582,-41.241478 + + + + + lane + + + + + + + + + 147.522247,-41.859921 147.551865,-41.927834 147.597321,-42.017418 147.578644,-42.113216 147.541656,-42.217743 147.468674,-42.22662 + + + + + highway + + + + + + + + + 146.103699,-41.171677 146.303619,-41.237202 146.362228,-41.236279 146.39418,-41.245384 146.443726,-41.244308 146.468582,-41.241478 + + + + + gravel + + + + + + + + + 145.856018,-41.08007 145.944839,-41.119896 146.037994,-41.150059 146.103699,-41.171677 + + + + + road + + + + + + + + + 147.468674,-42.22662 147.474945,-42.292259 147.467697,-42.301292 147.451828,-42.341656 147.424545,-42.378723 147.366013,-42.412552 147.345779,-42.432449 147.289322,-42.476475 147.264511,-42.503899 147.259918,-42.547539 147.249405,-42.614006 147.278351,-42.693249 147.284271,-42.757759 147.256744,-42.778393 + + + + + highway + + + + + + + + + 148.249252,-41.860851 148.234436,-41.901783 148.192123,-41.93721 148.155762,-41.953667 148.127731,-41.994537 148.053131,-42.100563 + + + + + road + + + + + + + + + 145.19754,-40.878323 145.246674,-40.86021 145.293289,-40.852802 145.465225,-40.897865 145.538498,-40.936264 145.554062,-40.939201 145.602112,-40.962936 145.646362,-40.98243 145.683838,-40.989883 145.710587,-40.996201 145.744293,-41.007545 145.801956,-41.041782 145.856018,-41.08007 + + + + + logging + + + + + + + + + 147.360001,-42.91993 147.348816,-42.93726 147.285049,-42.979027 147.220886,-42.995876 147.164429,-43.027004 147.068237,-43.06319 146.96463,-43.116447 146.949554,-43.17004 146.95369,-43.209591 146.964127,-43.224545 146.975723,-43.250484 146.980759,-43.2701 146.982605,-43.287716 146.970871,-43.31691 146.940521,-43.33812 146.943054,-43.362263 146.952194,-43.39278 146.955429,-43.423512 + + + + + road + + + + + + + + + 147.300583,-41.637878 147.372009,-41.695503 147.402588,-41.725574 147.444061,-41.749676 147.490433,-41.782482 147.506866,-41.795624 147.522919,-41.835609 147.522247,-41.859921 + + + + + highway + + + + + + + + + 148.053131,-42.100563 148.028229,-42.188286 148.002258,-42.2295 147.969955,-42.254417 147.960297,-42.284897 147.942719,-42.398819 147.926407,-42.486034 147.875092,-42.538582 147.832001,-42.587299 147.744217,-42.631607 147.693298,-42.656067 147.618195,-42.691135 147.575317,-42.743092 147.578293,-42.769539 147.547852,-42.814312 147.506699,-42.842907 147.488312,-42.877041 147.449692,-42.901054 147.416809,-42.902828 + + + + + road + + + + + + + + + 147.098343,-41.362919 147.065445,-41.311977 147.024078,-41.257534 146.981445,-41.211391 146.948227,-41.181595 146.926773,-41.172501 146.905029,-41.147144 146.940765,-41.085857 146.962662,-41.075096 147.021088,-41.080925 147.099228,-41.123959 147.187607,-41.150597 147.282028,-41.104244 147.295715,-41.075798 147.306595,-41.062832 147.325745,-41.053524 147.362991,-41.080441 147.419022,-41.081764 147.465881,-41.06089 147.519302,-41.092793 147.528595,-41.137089 147.552521,-41.193565 147.594223,-41.233875 147.734406,-41.239891 147.829376,-41.196636 147.882614,-41.163197 147.91127,-41.163109 147.985168,-41.226128 148.022156,-41.292599 148.075119,-41.313915 148.200104,-41.323097 148.236191,-41.339245 148.27298,-41.383488 148.25,-41.45713 148.254395,-41.53941 148.262436,-41.585217 148.249252,-41.860851 + + + + + road + + + + + + + + + 147.256744,-42.778393 147.220184,-42.824776 147.179596,-42.82143 147.111328,-42.795731 147.057098,-42.741581 147.003479,-42.704803 146.919098,-42.622734 146.910538,-42.610928 146.889984,-42.585396 146.83844,-42.572792 146.78569,-42.539352 146.724335,-42.485966 146.695023,-42.469582 146.649872,-42.450371 146.604965,-42.432274 146.578781,-42.408531 146.539307,-42.364208 146.525055,-42.30883 146.558044,-42.275948 146.576248,-42.23777 146.581467,-42.203426 146.490005,-42.180222 146.3797,-42.146332 146.334061,-42.138741 146.270966,-42.165703 146.197296,-42.224072 146.167908,-42.244835 146.164932,-42.245171 146.111023,-42.265202 146.037476,-42.239738 145.981628,-42.187851 145.853912,-42.133492 145.819611,-42.129154 145.72052,-42.104084 145.618576,-42.056023 145.541718,-42.027241 145.486282,-41.983326 145.452744,-41.926544 145.494034,-41.896477 145.591736,-41.860214 145.64212,-41.838398 145.669449,-41.830734 145.680923,-41.795753 145.682968,-41.743221 145.675156,-41.710377 145.680115,-41.688908 145.701065,-41.648228 145.714798,-41.609509 145.629196,-41.462051 145.648895,-41.470337 145.633423,-41.420902 145.631866,-41.36528 145.640854,-41.301533 145.700424,-41.242611 145.77243,-41.193897 145.802338,-41.161488 145.856018,-41.08007 + + + + + road + + + diff --git a/openlayers/examples/tasmania/TasmaniaStateBoundaries.xml b/openlayers/examples/tasmania/TasmaniaStateBoundaries.xml new file mode 100644 index 0000000000..5edb4d7a3f --- /dev/null +++ b/openlayers/examples/tasmania/TasmaniaStateBoundaries.xml @@ -0,0 +1,92 @@ + + + + + 143.834824,-43.648056 148.479141,-39.573891 + + + + + + + + + + + 148.01416,-42.753059 148.009979,-42.73111 148.011108,-42.652222 148.012634,-42.628613 148.018738,-42.61972 148.076492,-42.586945 148.128006,-42.590275 148.172897,-42.655277 148.168167,-42.665554 148.154984,-42.668888 148.097748,-42.666107 148.041656,-42.732216 148.01416,-42.753059 + + + + + + + + + 147.361633,-43.263062 147.29303,-43.157082 147.329132,-43.102638 147.357178,-43.075005 147.396515,-43.11972 147.431641,-43.213886 147.432739,-43.241943 147.429688,-43.253616 147.361633,-43.263062 + + + + + + + + + 148.128845,-40.274445 148.115234,-40.271667 148.101074,-40.26722 148.064423,-40.253891 148.049133,-40.245552 148.038589,-40.236248 148.013184,-40.161388 148.018311,-40.140209 147.90387,-39.975555 147.809616,-39.913815 147.773865,-39.894722 147.760742,-39.877983 147.783875,-39.850281 147.881897,-39.754173 147.925812,-39.737503 147.967743,-39.725555 147.971069,-39.736389 147.978302,-39.74472 148.069427,-39.83889 148.165527,-39.929443 148.174408,-39.936111 148.186783,-39.944443 148.202759,-39.950279 148.243851,-39.962082 148.279419,-39.965836 148.288025,-39.99472 148.335236,-40.192223 148.33136,-40.219166 148.32135,-40.231941 148.303314,-40.239025 148.17746,-40.25695 148.128845,-40.274445 + + + + + + + + + 148.339142,-40.503334 148.339691,-40.466942 148.33609,-40.45472 148.329971,-40.442917 148.318298,-40.435272 148.292206,-40.434441 148.129944,-40.44722 148.114685,-40.448883 148.103851,-40.454445 148.086639,-40.458057 148.068573,-40.45472 147.99704,-40.428196 147.993561,-40.417084 147.995514,-40.40139 147.998566,-40.389725 148.008041,-40.379162 148.065247,-40.348194 148.083588,-40.344719 148.099121,-40.34333 148.116913,-40.343613 148.133026,-40.345001 148.148315,-40.347221 148.187744,-40.362503 148.202606,-40.361252 148.288025,-40.324722 148.308868,-40.314163 148.329132,-40.305138 148.343018,-40.306664 148.354675,-40.315552 148.479141,-40.430695 148.477188,-40.441387 148.463226,-40.442081 148.407608,-40.461945 148.358307,-40.490555 148.339142,-40.503334 + + + + + + + + + 147.302765,-43.513336 147.239136,-43.491669 147.175537,-43.501671 147.123016,-43.421944 147.190247,-43.354446 147.289566,-43.26403 147.300262,-43.262779 147.307739,-43.270279 147.362457,-43.374168 147.36496,-43.385834 147.362732,-43.398056 147.320663,-43.502918 147.310516,-43.511948 147.302765,-43.513336 + + + + + + + + + 144.888885,-40.729439 144.878571,-40.726246 144.870941,-40.71944 144.865936,-40.671116 144.926224,-40.617222 144.993286,-40.666664 145.016083,-40.695549 144.926361,-40.722496 144.888885,-40.729439 + + + + + + + + + 146.916702,-43.617844 146.863281,-43.636391 146.833588,-43.648056 146.81517,-43.617912 146.770401,-43.610695 146.686371,-43.603333 146.599548,-43.55611 146.514435,-43.542778 146.296082,-43.534729 146.275177,-43.52375 146.260269,-43.49514 146.231476,-43.488888 146.110367,-43.515423 146.0383,-43.498055 145.932678,-43.376316 145.991913,-43.345833 146.1026,-43.357918 146.156647,-43.379723 146.232529,-43.390972 146.234543,-43.325142 146.163239,-43.28236 146.139709,-43.31472 146.12468,-43.333332 145.858856,-43.30875 145.836914,-43.297226 145.758881,-43.184441 145.726898,-43.133331 145.595245,-42.979164 145.573776,-42.963818 145.54747,-42.961391 145.511581,-42.965656 145.459686,-42.904442 145.423157,-42.846664 145.397766,-42.775558 145.353851,-42.658535 145.310516,-42.623611 145.259979,-42.612431 145.231354,-42.45639 145.197617,-42.313473 145.205231,-42.25695 145.223846,-42.239166 145.250107,-42.27486 145.323029,-42.32 145.378021,-42.349167 145.426361,-42.37458 145.439758,-42.398746 145.445663,-42.457359 145.459061,-42.505627 145.469421,-42.523056 145.47525,-42.520279 145.552048,-42.351109 145.49968,-42.323475 145.458313,-42.326393 145.280273,-42.181114 145.260681,-42.139999 145.265121,-42.111389 145.262772,-42.080002 145.247879,-42.034863 145.184555,-41.938332 145.054962,-41.846664 144.954956,-41.713333 144.858582,-41.544449 144.781647,-41.390556 144.731628,-41.306107 144.685791,-41.216595 144.695389,-41.18111 144.667755,-41.075211 144.653595,-41.046951 144.637207,-41.031944 144.618713,-40.93111 144.648865,-40.901245 144.680664,-40.896114 144.699692,-40.875484 144.708588,-40.825562 144.701355,-40.759171 144.762207,-40.72805 144.985992,-40.74868 145.036102,-40.779167 145.080383,-40.810276 145.116348,-40.822365 145.274994,-40.80278 145.335663,-40.842079 145.539154,-40.892776 145.751373,-40.987778 145.872192,-41.042778 146.169434,-41.149994 146.193176,-41.15694 146.229126,-41.160553 146.36969,-41.170837 146.405411,-41.171669 146.450378,-41.16486 146.499146,-41.150139 146.564697,-41.175278 146.58609,-41.186661 146.581909,-41.151527 146.660385,-41.088749 146.731491,-41.069725 146.76416,-41.073059 146.784409,-41.082291 146.801086,-41.107506 146.806458,-41.148365 146.859131,-41.168335 146.94281,-41.166874 146.912964,-41.134789 146.879837,-41.126804 146.843018,-41.123055 146.823013,-41.108124 146.818726,-41.059792 146.86377,-41.028404 147.017059,-40.976109 147.08609,-40.991943 147.105804,-40.99778 147.124664,-41.005005 147.147354,-41.008892 147.171783,-41.008892 147.199127,-41.002228 147.356079,-40.976387 147.416504,-41.017776 147.461914,-41.001396 147.488373,-40.984997 147.517487,-40.953331 147.541656,-40.924171 147.573166,-40.879028 147.589127,-40.853058 147.611618,-40.842358 147.674835,-40.830837 147.698792,-40.857361 147.803162,-40.89278 147.838165,-40.891251 147.876083,-40.878746 147.901779,-40.863194 147.921631,-40.840836 147.933594,-40.822086 147.944138,-40.795277 147.951157,-40.761322 147.971832,-40.744789 148.01416,-40.745972 148.079407,-40.76889 148.221069,-40.84903 148.273315,-40.901108 148.307419,-40.957478 148.318863,-40.972359 148.328308,-40.995419 148.302185,-41.075562 148.290253,-41.10778 148.279846,-41.130833 148.264343,-41.167221 148.272003,-41.218468 148.313568,-41.259308 148.316925,-41.334724 148.287476,-41.423889 148.273804,-41.454166 148.280396,-41.539234 148.296356,-41.565834 148.312195,-41.591248 148.314285,-41.612919 148.292206,-41.728882 148.270966,-41.782642 148.264709,-41.814587 148.298035,-42.035004 148.311493,-42.063473 148.333984,-42.087639 148.358719,-42.108681 148.363846,-42.222427 148.346619,-42.249168 148.324554,-42.270695 148.311096,-42.277779 148.302765,-42.27639 148.275269,-42.255562 148.270813,-42.231667 148.29776,-42.206249 148.309692,-42.140556 148.238846,-41.998196 148.195267,-41.94545 148.079117,-42.117218 148.004013,-42.522499 147.958725,-42.556389 147.943848,-42.613892 147.955521,-42.666527 147.954956,-42.717499 147.924835,-42.741108 147.898865,-42.756535 147.883179,-42.772221 147.84288,-42.872917 147.856415,-42.888889 147.899796,-42.886631 147.881836,-42.857224 147.910873,-42.840832 147.974197,-42.869511 147.999695,-42.907078 148.004776,-42.976868 147.96701,-42.995449 147.951492,-43.082291 147.979126,-43.126663 148.0047,-43.170837 147.995529,-43.227589 147.970795,-43.229092 147.899414,-43.183434 147.827179,-43.206108 147.789703,-43.246948 147.697205,-43.163612 147.631622,-43.065552 147.618973,-43.017708 147.67392,-42.945133 147.706497,-42.938328 147.730789,-42.95472 147.735794,-42.978886 147.719894,-43.002499 147.759979,-43.039864 147.781784,-43.051109 147.808868,-43.054722 147.867874,-43.046528 147.899414,-43.026875 147.825806,-42.931946 147.591629,-42.826736 147.557465,-42.830559 147.502121,-42.860764 147.521362,-42.928886 147.53595,-42.949024 147.55275,-42.978954 147.525604,-43.018333 147.476624,-43.034172 147.427124,-43.04174 147.403732,-43.000072 147.423019,-42.991112 147.40802,-42.889725 147.351624,-42.861389 147.317474,-42.846664 147.348572,-42.904716 147.34079,-42.951111 147.32608,-43.008614 147.292755,-43.028053 147.268188,-43.060432 147.241913,-43.133614 147.240311,-43.155487 147.262482,-43.203888 147.263321,-43.224861 147.247452,-43.269169 147.213287,-43.285625 147.178162,-43.282223 147.098297,-43.244446 147.041351,-43.199722 147.025742,-43.181873 147.022766,-43.138332 147.01207,-43.118752 146.991287,-43.112431 146.970093,-43.137085 146.964417,-43.164162 146.964142,-43.184307 146.969269,-43.204304 146.993988,-43.223747 147.01944,-43.237778 147.061096,-43.258339 147.095337,-43.288715 147.054962,-43.362503 147.002213,-43.422638 146.952179,-43.528053 146.937469,-43.600624 146.916702,-43.617844 + + + + + + + + + 143.921631,-40.136391 143.913879,-40.134727 143.886307,-40.116734 143.873566,-40.065002 143.892349,-40.054302 143.891937,-39.984722 143.885544,-39.970139 143.870514,-39.956947 143.851624,-39.945274 143.840378,-39.936802 143.834824,-39.927502 143.837738,-39.873055 143.85524,-39.711945 143.871063,-39.700279 143.899719,-39.688606 143.916656,-39.680557 143.925812,-39.674171 143.933594,-39.666946 143.941635,-39.655693 143.945526,-39.640839 143.943848,-39.628883 143.935516,-39.608612 143.931915,-39.598335 143.935455,-39.583054 143.977463,-39.573891 143.987732,-39.57695 144.066788,-39.616112 144.108582,-39.662498 144.112183,-39.673058 144.122192,-39.812218 144.122192,-39.825005 144.146454,-39.92944 144.136917,-39.984306 144.106064,-40.036392 144.008881,-40.087776 143.957733,-40.110001 143.921631,-40.136391 + + + + + + + Tasmania + Australia + Australia Dollar + AUD + + + diff --git a/openlayers/examples/tasmania/TasmaniaWaterBodies.xml b/openlayers/examples/tasmania/TasmaniaWaterBodies.xml new file mode 100644 index 0000000000..ba96e138e2 --- /dev/null +++ b/openlayers/examples/tasmania/TasmaniaWaterBodies.xml @@ -0,0 +1,162 @@ + + + + + 145.971619,-43.031944 147.219696,-41.775558 + + + + + + + + + + + 146.232727,-42.157501 146.238007,-42.16111 146.24411,-42.169724 146.257202,-42.193329 146.272217,-42.209442 146.274689,-42.214165 146.27832,-42.21833 146.282471,-42.228882 146.282745,-42.241943 146.291351,-42.255836 146.290253,-42.261948 146.288025,-42.267502 146.282471,-42.269997 146.274994,-42.271111 146.266663,-42.270279 146.251373,-42.262505 146.246918,-42.258057 146.241333,-42.256111 146.23468,-42.257782 146.221344,-42.269165 146.210785,-42.274445 146.20163,-42.27417 146.196075,-42.271385 146.186646,-42.258057 146.188568,-42.252785 146.193298,-42.249443 146.200806,-42.248055 146.209137,-42.249168 146.217468,-42.248611 146.222473,-42.245277 146.22525,-42.240555 146.224121,-42.22805 146.224396,-42.221382 146.228302,-42.217216 146.231354,-42.212502 146.231628,-42.205559 146.219421,-42.186943 146.21637,-42.17028 146.216644,-42.16333 146.219696,-42.158607 146.225525,-42.156105 146.232727,-42.157501 + + + + + + + 1064866676 + 1071221047 + Lake + Australia + Australia + + + + + + + + + + + 146.284424,-43.031944 146.265808,-43.029442 146.257751,-43.021667 146.252197,-43.01889 146.243561,-43.017776 146.23053,-43.021667 146.21524,-43.02417 146.209686,-43.021942 146.209961,-43.015007 146.21579,-42.991112 146.21524,-42.985001 146.213593,-42.979439 146.21109,-42.974716 146.207458,-42.970276 146.193024,-42.959724 146.181915,-42.95472 146.166931,-42.951393 146.1586,-42.950554 146.123016,-42.951111 146.116364,-42.948883 146.112732,-42.944717 146.110229,-42.93972 146.101349,-42.932777 146.094971,-42.929726 146.084961,-42.922775 146.054138,-42.897781 146.041656,-42.886665 146.038025,-42.882217 146.035522,-42.877495 146.035248,-42.86528 146.036652,-42.852226 146.034424,-42.840279 146.030823,-42.836113 146.026367,-42.832504 146.018036,-42.831673 146.010529,-42.832779 146.003876,-42.834724 145.995514,-42.835274 145.990784,-42.831673 145.990234,-42.825562 145.996338,-42.815277 146.000549,-42.805275 145.997192,-42.800278 145.984406,-42.789726 145.981079,-42.785561 145.976898,-42.775002 145.97995,-42.770279 145.985504,-42.767776 145.994965,-42.768059 146.002472,-42.769447 146.008881,-42.772499 146.025818,-42.786667 146.032196,-42.788895 146.040802,-42.788338 146.061646,-42.783333 146.068848,-42.785004 146.074402,-42.787781 146.086914,-42.799995 146.109131,-42.825279 146.117188,-42.832222 146.122742,-42.834442 146.131073,-42.835274 146.139709,-42.834999 146.147217,-42.833061 146.163025,-42.83139 146.170532,-42.833611 146.174988,-42.837219 146.176636,-42.841942 146.17746,-42.848053 146.173309,-42.852226 146.165802,-42.853333 146.155243,-42.859169 146.141937,-42.86306 146.12912,-42.858612 146.118011,-42.852783 146.110779,-42.851395 146.102173,-42.852501 146.098297,-42.855003 146.097198,-42.861389 146.102173,-42.871666 146.111359,-42.878883 146.121338,-42.884445 146.132446,-42.889442 146.146942,-42.899445 146.154968,-42.907219 146.164978,-42.914444 146.174988,-42.92028 146.181366,-42.923058 146.195251,-42.926109 146.204681,-42.926392 146.220795,-42.924721 146.227448,-42.922775 146.233032,-42.92028 146.241913,-42.913612 146.247742,-42.904167 146.260529,-42.891945 146.265533,-42.888611 146.272217,-42.886948 146.281372,-42.886948 146.289703,-42.888054 146.300812,-42.893616 146.308014,-42.902779 146.308594,-42.908333 146.302185,-42.925278 146.301086,-42.931389 146.301636,-42.9375 146.303314,-42.943054 146.307739,-42.946663 146.320801,-42.951111 146.330261,-42.951393 146.352753,-42.947777 146.360229,-42.949165 146.361908,-42.95472 146.358002,-42.959442 146.347473,-42.965553 146.335785,-42.969994 146.331085,-42.973328 146.328033,-42.97805 146.329681,-42.983612 146.33609,-42.985832 146.36496,-42.9925 146.371338,-42.99472 146.383331,-43.000557 146.389984,-43.002785 146.39444,-43.006393 146.391357,-43.011116 146.383881,-43.012222 146.368561,-43.020836 146.355225,-43.024719 146.339142,-43.02639 146.332458,-43.028336 146.323853,-43.02861 146.313019,-43.023056 146.306366,-43.020836 146.298859,-43.022774 146.290253,-43.029442 146.284424,-43.031944 + + + + + + + 1067509088 + 1073140989 + Lake + Australia + Australia + + + + + + + + + + + 146.191925,-42.116112 146.184692,-42.114449 146.174988,-42.107506 146.171356,-42.103333 146.167755,-42.101944 146.167206,-42.095001 146.170532,-42.077225 146.169128,-42.071671 146.163879,-42.061943 146.159698,-42.057777 146.140808,-42.044167 146.09024,-42.014168 146.08609,-42.010559 146.083313,-42.005005 146.084686,-41.999443 146.089417,-41.996109 146.097748,-41.99778 146.109406,-42.002228 146.129395,-42.008057 146.146637,-42.016113 146.153046,-42.018333 146.169128,-42.026947 146.179138,-42.033615 146.182739,-42.036949 146.203583,-42.062775 146.20636,-42.06778 146.207733,-42.073334 146.206635,-42.079445 146.207184,-42.085556 146.208862,-42.09111 146.214417,-42.094162 146.21579,-42.099724 146.209961,-42.109169 146.205231,-42.11306 146.200256,-42.115555 146.191925,-42.116112 + + + + + + + 1064598241 + 1071187492 + Lake + Australia + Australia + + + + + + + + + + + 146.697205,-41.988892 146.688873,-41.988052 146.682465,-41.985832 146.67746,-41.976105 146.673859,-41.973328 146.674133,-41.966393 146.673309,-41.960281 146.674408,-41.95417 146.680817,-41.937218 146.696625,-41.907219 146.69693,-41.900551 146.694122,-41.895554 146.693573,-41.889442 146.695526,-41.883888 146.702179,-41.875275 146.703583,-41.869164 146.700256,-41.858055 146.697754,-41.853058 146.684418,-41.834999 146.680817,-41.83139 146.675812,-41.821671 146.674988,-41.815552 146.680267,-41.797783 146.683319,-41.792503 146.684418,-41.786949 146.691071,-41.778336 146.69693,-41.775558 146.704132,-41.776947 146.708588,-41.781387 146.714691,-41.789726 146.722748,-41.797226 146.728027,-41.800835 146.733582,-41.803055 146.75,-41.804718 146.761658,-41.816666 146.766663,-41.826393 146.772217,-41.828613 146.780548,-41.828613 146.808319,-41.821671 146.815796,-41.820557 146.823029,-41.822777 146.825531,-41.833061 146.824677,-41.853615 146.822754,-41.858894 146.816925,-41.868607 146.80304,-41.871666 146.786377,-41.872772 146.777191,-41.872498 146.764984,-41.876389 146.761108,-41.880554 146.759979,-41.886665 146.762207,-41.898338 146.767487,-41.908607 146.774414,-41.917221 146.779694,-41.927498 146.777771,-41.93222 146.765259,-41.943611 146.754425,-41.963333 146.749695,-41.96666 146.732727,-41.974716 146.728027,-41.97805 146.703857,-41.987778 146.697205,-41.988892 + + + + + + + 1066494066 + 1071999090 + Lake + Australia + Australia + + + + + + + + + + + 146.899719,-42.032776 146.892487,-42.030556 146.886932,-42.027779 146.882446,-42.02417 146.87912,-42.018608 146.878571,-42.006111 146.876892,-42 146.871338,-41.99778 146.864136,-41.996391 146.859406,-41.993614 146.855225,-41.983055 146.856354,-41.976944 146.866913,-41.963615 146.871613,-41.959999 146.883881,-41.955559 146.88858,-41.951668 146.891663,-41.947495 146.893585,-41.941383 146.88858,-41.92556 146.887756,-41.919167 146.888031,-41.912498 146.891937,-41.907776 146.896637,-41.904999 146.90387,-41.906387 146.907471,-41.910828 146.911652,-41.922501 146.914429,-41.926666 146.919708,-41.929443 146.926361,-41.931671 146.953033,-41.931389 146.961365,-41.93222 146.968567,-41.933884 146.973846,-41.936661 146.983032,-41.943611 146.985504,-41.948334 146.987183,-41.953888 146.982178,-41.965004 146.972748,-41.978333 146.971619,-41.983887 146.966644,-41.99472 146.963593,-41.999443 146.958862,-42.003616 146.956085,-42.007782 146.946625,-42.015007 146.940796,-42.016945 146.932739,-42.016113 146.926086,-42.018059 146.921356,-42.022224 146.914703,-42.030281 146.90802,-42.032219 146.899719,-42.032776 + + + + + + + 1065512599 + 1071304933 + Lake + Australia + Australia + + + + + + + + + + + 147.149719,-42.203056 147.142212,-42.201668 147.131348,-42.195831 147.127747,-42.191666 147.125244,-42.186111 147.12439,-42.180832 147.126343,-42.175278 147.132172,-42.165833 147.136108,-42.16111 147.137207,-42.155556 147.135529,-42.149994 147.12912,-42.14167 147.126617,-42.136948 147.128845,-42.124443 147.12912,-42.117775 147.122742,-42.115555 147.11441,-42.116112 147.101349,-42.120552 147.093842,-42.119164 147.092194,-42.114449 147.093292,-42.108337 147.097198,-42.097221 147.103302,-42.080833 147.108307,-42.07 147.112183,-42.066666 147.117737,-42.063889 147.124115,-42.061943 147.131622,-42.060829 147.138031,-42.063614 147.140808,-42.06778 147.145264,-42.071945 147.150818,-42.074173 147.159973,-42.074173 147.16748,-42.073059 147.180542,-42.069725 147.188873,-42.069168 147.19693,-42.07 147.209686,-42.075005 147.216919,-42.082779 147.219696,-42.087502 147.219421,-42.094444 147.216644,-42.099167 147.211914,-42.103333 147.190521,-42.106949 147.185791,-42.110283 147.182739,-42.115005 147.180542,-42.127495 147.180267,-42.134445 147.18219,-42.140556 147.182739,-42.146111 147.187744,-42.16861 147.188568,-42.175003 147.187195,-42.187775 147.184143,-42.192772 147.180542,-42.196663 147.169128,-42.201942 147.149719,-42.203056 + + + + + + + 1065646817 + 1071606923 + Lake + Australia + Australia + + + + + + + + + + + 146.240784,-42.851112 146.231628,-42.850838 146.228027,-42.846664 146.218842,-42.83889 146.214691,-42.831116 146.206635,-42.823334 146.195801,-42.810829 146.173859,-42.77861 146.171356,-42.773888 146.169708,-42.768333 146.166382,-42.762779 146.160522,-42.748886 146.155243,-42.739166 146.151642,-42.735001 146.142761,-42.727776 146.127747,-42.725555 146.118561,-42.72583 146.111908,-42.726944 146.096344,-42.736389 146.09079,-42.738892 146.082184,-42.739998 146.077759,-42.737221 146.074127,-42.733055 146.060791,-42.722221 146.053314,-42.720833 146.041077,-42.725273 146.031372,-42.731941 146.01886,-42.736946 146.011383,-42.738335 145.994415,-42.739166 145.979675,-42.736115 145.974121,-42.733055 145.971619,-42.728333 145.973022,-42.721382 145.976074,-42.71666 145.985504,-42.709999 146.001923,-42.701668 146.011658,-42.695 146.01944,-42.686943 146.022491,-42.681671 146.02359,-42.676109 146.023041,-42.669724 146.01886,-42.65889 146.018311,-42.653328 146.014984,-42.642227 146.014435,-42.636116 146.016937,-42.623611 146.020813,-42.61972 146.025543,-42.616394 146.032196,-42.614449 146.03775,-42.6175 146.041351,-42.621666 146.043854,-42.626389 146.046936,-42.637505 146.048309,-42.649994 146.048035,-42.656662 146.049133,-42.669167 146.05246,-42.680832 146.054962,-42.684998 146.060516,-42.688049 146.068848,-42.6875 146.073853,-42.683609 146.075806,-42.678886 146.078308,-42.666389 146.079407,-42.645836 146.084412,-42.61528 146.088867,-42.604172 146.095795,-42.595001 146.099701,-42.590836 146.104401,-42.587502 146.111908,-42.589165 146.115234,-42.59333 146.116058,-42.599442 146.113586,-42.612503 146.113281,-42.619446 146.113861,-42.626106 146.113281,-42.639168 146.11441,-42.652222 146.116058,-42.657219 146.11969,-42.661385 146.126068,-42.664162 146.13443,-42.665276 146.161377,-42.665276 146.16803,-42.662498 146.171082,-42.658607 146.172211,-42.652496 146.173035,-42.638611 146.172211,-42.6325 146.173309,-42.611946 146.17746,-42.600281 146.183594,-42.590836 146.195801,-42.586388 146.203308,-42.585274 146.210785,-42.586662 146.21524,-42.590279 146.221344,-42.599998 146.221893,-42.60556 146.2258,-42.622223 146.228577,-42.626945 146.235779,-42.628609 146.247192,-42.623329 146.253876,-42.621384 146.261383,-42.623055 146.265808,-42.62722 146.267487,-42.631943 146.268036,-42.638893 146.264435,-42.656662 146.261658,-42.661385 146.254974,-42.66333 146.246613,-42.662498 146.240784,-42.665001 146.236084,-42.668335 146.233032,-42.673058 146.232727,-42.68 146.236084,-42.684723 146.241638,-42.686943 146.257477,-42.688889 146.265808,-42.688889 146.279694,-42.692772 146.283325,-42.696945 146.288574,-42.706665 146.291931,-42.710831 146.296356,-42.714447 146.307465,-42.720833 146.311096,-42.724442 146.308868,-42.730553 146.304962,-42.734444 146.293579,-42.739166 146.293304,-42.745834 146.29776,-42.749443 146.303314,-42.752502 146.306915,-42.756393 146.309418,-42.761391 146.315521,-42.769722 146.323578,-42.777496 146.334412,-42.790001 146.338867,-42.793617 146.346069,-42.801941 146.348572,-42.806946 146.349121,-42.813057 146.345245,-42.817223 146.340515,-42.820557 146.333862,-42.822227 146.324402,-42.822227 146.3172,-42.820557 146.306091,-42.815002 146.295532,-42.802223 146.28775,-42.787781 146.282196,-42.784729 146.273865,-42.785278 146.268036,-42.787781 146.263306,-42.791115 146.256378,-42.799995 146.254974,-42.806664 146.25415,-42.826668 146.251648,-42.83889 146.249695,-42.844444 146.246613,-42.849167 146.240784,-42.851112 + + + + + + + 1067743969 + 1073212293 + Lake + Australia + Australia + + + diff --git a/openlayers/examples/tasmania/sld-tasmania.xml b/openlayers/examples/tasmania/sld-tasmania.xml new file mode 100644 index 0000000000..1c41225354 --- /dev/null +++ b/openlayers/examples/tasmania/sld-tasmania.xml @@ -0,0 +1,594 @@ + + + + WaterBodies + + Default Styler + Default Styler (zoom in to see more objects) + + 1 + + testStyleName + title + abstract + Feature + generic:geometry + + testRuleName + title + Abstract + + + + + 3000000 + + + blue + + 1.0 + + + + + #C0C0C0 + + + butt + + + miter + + + 1 + + + 1 + + + 0 + + + + + + testRuleNameElse + title + Abstract + + + + #aaaaff + + 0.5 + + + + + #C0C0C0 + + + 1 + + + 1 + + + + + + + + + Hover Styler + Hover Styler + + + testStyleHover + title + abstract + Feature + generic:geometry + + testRuleNameHover + title + Abstract + + + + + PERIMETER + 1071304933 + + + AREA + 1065512599 + + + + + + + + black + + + 0.5 + + + + + green + + + butt + + + miter + + + 0.5 + + + 5 + + + 0 + + + + + + testRuleNameHoverElse + title + Abstract + + + + + black + + + 0.5 + + + + + fuchsia + + + 0.5 + + + 5 + + + 0 + + + + + + + + + Attribute Filter Styler + Attribute Filter Styler + + attribute filter type + attribute filter type + Feature + generic:geometry + + + rulePropertyIsEqualTo + rulePropertyIsEqualTo + rulePropertyIsEqualTo + + + name + My simple Polygon + + + + + + #000033 + + + + + + + + + Styler Test PropertyIsEqualTo + Styler Test PropertyIsEqualTo + + attribute filter type + attribute filter type + Feature + generic:geometry + + + rulePropertyIsEqualTo + rulePropertyIsEqualTo + rulePropertyIsEqualTo + + + AREA + 1067743969 + + + + + + red + + + + + + + + + Styler Test WATER_TYPE + Styler Test WATER_TYPE + + attribute filter type + attribute filter type + Feature + generic:geometry + + + rulePropertyIsEqualTo + rulePropertyIsEqualTo + rulePropertyIsEqualTo + + + WATER_TYPE + Lake + + + + + + red + + + + + + + + + Styler Test PropertyIsGreaterThanOrEqualTo + Styler Test PropertyIsGreaterThanOrEqualTo + + attribute filter type + attribute filter type + Feature + generic:geometry + + + PropertyIsGreaterThanOrEqualTo + PropertyIsGreaterThanOrEqualTo + PropertyIsGreaterThanOrEqualTo + + + + WATER_TYPE + Lake + + + AREA + 1067509088 + + + + + + + yellow + + + + + + + + + + Styler Test PropertyIsLessThanOrEqualTo + Styler Test PropertyIsLessThanOrEqualTo + + attribute filter type + attribute filter type + Feature + generic:geometry + + + PropertyIsLessThanOrEqualTo + PropertyIsLessThanOrEqualTo + PropertyIsLessThanOrEqualTo + + + + WATER_TYPE + Lake + + + AREA + 1067509088 + + + + + + + yellow + + + + + + + + + + + Styler Test PropertyIsGreaterThan + Styler Test PropertyIsGreaterThan + + attribute filter type + attribute filter type + Feature + generic:geometry + + + PropertyIsGreaterThan + PropertyIsGreaterThan + PropertyIsGreaterThan + + + + WATER_TYPE + Lake + + + AREA + 1067000000 + + + + + + + yellow + + + + + + + + + Styler Test PropertyIsLessThan + Styler Test PropertyIsLessThan + + attribute filter type + attribute filter type + Feature + generic:geometry + + + PropertyIsLessThan + PropertyIsLessThan + PropertyIsLessThan + + + + WATER_TYPE + Lake + + + AREA + 1067000000 + + + + + + + yellow + + + + + + + + + Styler Test PropertyIsLike + Styler Test PropertyIsLike + + attribute filter type + attribute filter type + Feature + generic:geometry + + + PropertyIsLike + PropertyIsLike + PropertyIsLike + + + AREA + 106774* + + + + + + green + + + + + + + + + Styler Test PropertyIsBetween + Styler Test PropertyIsBetween + + attribute filter type + attribute filter type + Feature + generic:geometry + + + PropertyIsBetween + PropertyIsBetween + PropertyIsBetween + + + AREA + + 1064866676 + + + 1065512599 + + + + + + + blue + + + + + + + + + FeatureId + Styler Test FeatureId + + + + + + + + blue + + + + + + + + + + Roads + + RoadsDefault + 1 + + + justAStyler + + + + red + + + 2 + + + + + + + + + + Cities + + DefaultCities + 1 + + + + + + + + + + image/png + + 0.7 + 14 + + + + + + + + + cross + + 10 + + + + + + + + + Land + + Land Style + 1 + + + + + #ccffaa + + 0.5 + + + + + #C0C0C0 + + + 1 + + + 1 + + + 3 5 1 5 + + + + + + + + + diff --git a/openlayers/examples/teleportation.html b/openlayers/examples/teleportation.html new file mode 100644 index 0000000000..3154c56b72 --- /dev/null +++ b/openlayers/examples/teleportation.html @@ -0,0 +1,76 @@ + + + + + + + OpenLayers Teleporter Example + + + + + + + + + +

    Map "Teleportation" and Rendering

    + +
    + map, rendering +
    + +

    Call the map's render method to change its container.

    + +
    +
    +
    +
    + + + +
    +

    This example demonstrates how a map can be rendered initially in one + container and then moved to a new container. At any point after map + construction, the map's render method can be called with the id of + an empty container, moving the map to the new container.

    +
    + + diff --git a/openlayers/examples/textfile.txt b/openlayers/examples/textfile.txt new file mode 100644 index 0000000000..f7678c4552 --- /dev/null +++ b/openlayers/examples/textfile.txt @@ -0,0 +1,4 @@ +point title description icon +10,20 my orange title my orange description +2,4 my aqua title my aqua description +42,-71 my purple title my purple description
    is great. http://www.openlayers.org/api/img/zoom-world-mini.png diff --git a/openlayers/examples/tile-origin.html b/openlayers/examples/tile-origin.html new file mode 100644 index 0000000000..78339d4c19 --- /dev/null +++ b/openlayers/examples/tile-origin.html @@ -0,0 +1,38 @@ + + + + + + + OpenLayers Tile Origin Example + + + + +

    Tile Origin

    +
    + grid, tileOrigin +
    +

    + Demonstrates the use of the tileExtent property to differentiate + between the maximum extent and the tile extent for a layer. +

    +
    +
    +

    + This example uses a layer that requests map tiles from a WMS + that only generates image responses for requests that align with + a particular tile lattice. In this case, the layer's + maxExtent does not align with that tile lattice. + To configure the layer with a tile extent that conforms to the + tile origin configured on the server, use the layer's + tileOrigin property. +

    + View the tile-origin.js + source to see how this is done +

    +
    + + + + diff --git a/openlayers/examples/tile-origin.js b/openlayers/examples/tile-origin.js new file mode 100644 index 0000000000..61c5b8ea3e --- /dev/null +++ b/openlayers/examples/tile-origin.js @@ -0,0 +1,16 @@ +var map = new OpenLayers.Map({ + div: "map", + maxExtent: new OpenLayers.Bounds(-130, 30, -80, 55), + maxResolution: 360 / 256 / Math.pow(2, 4), + numZoomLevels: 12, + layers: [ + new OpenLayers.Layer.WMS( + "Global Imagery", + "http://maps.opengeo.org/geowebcache/service/wms", + {layers: "bluemarble"}, + {tileOrigin: new OpenLayers.LonLat(-180, -90)} + ) + ], + center: new OpenLayers.LonLat(-110, 45), + zoom: 0 +}); diff --git a/openlayers/examples/tilecache.html b/openlayers/examples/tilecache.html new file mode 100644 index 0000000000..dc3202d5eb --- /dev/null +++ b/openlayers/examples/tilecache.html @@ -0,0 +1,69 @@ + + + + + + + OpenLayers TileCache Example + + + + + + +

    TileCache Example

    + +
    + tile, cache, tilecache, wmsc, wms-c +
    + +

    + Demonstrates a TileCache layer that loads tiles from from a web + accessible disk-based cache only. +

    + +
    + +
    +

    This layer should be used for web accessible disk-based caches only. + It is not used to request new tiles from TileCache. Note that you + should specify resolutions explicitly on this layer so that they match + your TileCache configuration.

    +
    + + diff --git a/openlayers/examples/tms.html b/openlayers/examples/tms.html new file mode 100644 index 0000000000..ef4bf8c4f6 --- /dev/null +++ b/openlayers/examples/tms.html @@ -0,0 +1,62 @@ + + + + + + + OpenLayers Tiled Map Service Example + + + + + + +

    Tiled Map Service Example

    + +
    + tile, cache, tms +
    + +

    + Demonstrate the initialization and modification of a Tiled Map Service layer. +

    + +
    + +
    + URL of TMS (Should end in /): layer_name
    +

    + Example: http://tilecache.osgeo.org/wms-c/Basic.py/, basic, jpg
    + The first input must be an HTTP URL pointing to a TMS instance. The second + input must be a layer name available from that instance, and the third must + be the output format used by that layer. (Any other behavior will result in + broken images being displayed.) +

    +
    + + diff --git a/openlayers/examples/transform-feature.html b/openlayers/examples/transform-feature.html new file mode 100644 index 0000000000..6c562f0e67 --- /dev/null +++ b/openlayers/examples/transform-feature.html @@ -0,0 +1,110 @@ + + + + + + + OpenLayers: Transformation Box + + + + + + +

    Vector Feature Transformation Box Example

    + +
    + vector, feature, transformation, stylemap +
    +

    + Shows the use of the TransformFeature control. +

    +
    +
    +
    +
    +

    This example shows transformation of vector features with a + tranformation box. Grab one of the handles to resize the feature. + Holding the SHIFT key will preserve the aspect ratio. Position the + mouse right outside one of the corner handles to rotate the feature, + and hold the SHIFT key to only rotate in 45° increments.

    +

    In this example, the transformation box has been set on the left + feature, with a rotation preset of 45°. Clicking on the right feature + will set it for transformation, starting with an unrotated box. + Dragging a feature or the box edges will move it around.

    +
    + + + + diff --git a/openlayers/examples/transition.html b/openlayers/examples/transition.html new file mode 100644 index 0000000000..6404c4ca1e --- /dev/null +++ b/openlayers/examples/transition.html @@ -0,0 +1,70 @@ + + + + + + + OpenLayers Transitions Example + + + + + +

    Transition Example

    +
    + transition, resize, tile, singletile +
    +

    + Demonstrates the use of transition effects in tiled and untiled layers. +

    +
    +
    + There are two transitions that are currently implemented: null (the + default) and 'resize'. The default transition effect is used when no + transition is specified and is implemented as no transition effect except + for panning singleTile layers. The 'resize' effect resamples the current + tile and displays it stretched or compressed until the new tile is available. +
      +
    • The first layer is an untiled WMS layer with no transition effect.
    • +
    • The second layer is an untiled WMS layer with a 'resize' effect.
    • +
    • The third layer is a tiled WMS layer with no transition effect.
    • +
    • The fourth layer is a tiled WMS layer with a 'resize' effect.
    • +
    +
    + + + diff --git a/openlayers/examples/urban.html b/openlayers/examples/urban.html new file mode 100644 index 0000000000..8c9f247368 --- /dev/null +++ b/openlayers/examples/urban.html @@ -0,0 +1,51 @@ + + + + + + + OpenLayers WorldWind Example + + + + + + +

    WorldWind Example

    + +
    + worldwind, cleanup +
    + +

    + Demonstrate the use of a NASA WorldWind base layer. +

    + +
    + +
    +

    + Add the Nasa WorldWind "Urban" layer to your map. The "Urban" layer contains aerial imagery for urban areas only. +

    +

    + You can do it with a ... +

    + +
    + + diff --git a/openlayers/examples/ve-novibrate.html b/openlayers/examples/ve-novibrate.html new file mode 100644 index 0000000000..6be2943b16 --- /dev/null +++ b/openlayers/examples/ve-novibrate.html @@ -0,0 +1,68 @@ + + + + + + + OpenLayers Virtual Earth Example + + + + + + + + +

    Virtual Earth Example

    + +
    + panning, virtual earth, panzoom, panmethod, panduration +
    + +

    + When using the PanZoom buttons with VirtualEarth, some 'drift' is + possible in markers. This page demonstrates how to use the + panMethod and panDuration properties to change the OpenLayers + settings to match VirtualEarth. +

    + +
    + + + + diff --git a/openlayers/examples/ve.html b/openlayers/examples/ve.html new file mode 100644 index 0000000000..7b9bad8105 --- /dev/null +++ b/openlayers/examples/ve.html @@ -0,0 +1,74 @@ + + + + + + + OpenLayers Virtual Earth Example + + + + + + + + +

    Virtual Earth Example

    + +
    + virtual earth, marker +
    + +

    + Demonstrates the use of a Virtual Earth base layer. +

    + +
    + + +
    This example demonstrates the ability to add VirtualEarth and the and remove markers.
    + + + + diff --git a/openlayers/examples/vector-features-with-text.html b/openlayers/examples/vector-features-with-text.html new file mode 100644 index 0000000000..cbdba665ab --- /dev/null +++ b/openlayers/examples/vector-features-with-text.html @@ -0,0 +1,136 @@ + + + + + + OpenLayers Labeled Features Example + + + + + + +

    OpenLayers Labeled features example

    +
    + vector, feature, labeling, symbolizer +
    +

    + Label vector features with a text symbolizer. +

    +
    +
    +

    This example shows drawing simple vector features with a label.

    +
    + + diff --git a/openlayers/examples/vector-features.html b/openlayers/examples/vector-features.html new file mode 100644 index 0000000000..0a48a3071c --- /dev/null +++ b/openlayers/examples/vector-features.html @@ -0,0 +1,148 @@ + + + + + + + OpenLayers: Vector Features + + + + + + +

    Drawing Simple Vector Features Example

    + +
    + vector, feature +
    +

    + Shows the use of the shows drawing simple vector features, in different styles. +

    +
    +
    +

    This example shows drawing simple vector features -- point, line, polygon + in different styles, created 'manually', by constructing the entire style + object, via 'copy', extending the default style object, and by + inheriting the default style from the layer.

    +

    It also shows how to use external graphic files for point features + and how to set their size: If either graphicWidth or graphicHeight is set, + the aspect ratio of the image will be respected. If both graphicWidth and + graphicHeight are set, it will be ignored. Alternatively, if graphicWidth + and graphicHeight are omitted, pointRadius will be used to set the size + of the image, which will then be twice the value of pointRadius with the + original aspect ratio.

    +
    + + + + diff --git a/openlayers/examples/vector-formats.html b/openlayers/examples/vector-formats.html new file mode 100644 index 0000000000..7848cf3d9e --- /dev/null +++ b/openlayers/examples/vector-formats.html @@ -0,0 +1,234 @@ + + + + + + + Vector Formats + + + + + + + + + +
    +

    Vector Formats Example

    + +
    + vector, geojson, atom, kml, georss, gml, wkt, advanced, spherical, mercator +
    +

    + Shows the wide variety of vector formats that open layers supports. +

    + +
    +
    +

    Use the drop-down below to select the input/output format + for vector features. New features can be added by using the drawing + tools above or by pasting their text representation below.

    + + +   + + +
    + Input Projection:
    + Output Projection: +
    + +
    + +
    + +
    +
    + +
    +
    +

    Use the tools to the left to draw new polygons, lines, and points. + After drawing some new features, hover over a feature to see the + serialized version below.

    + +
    + + + diff --git a/openlayers/examples/web-mercator.html b/openlayers/examples/web-mercator.html new file mode 100644 index 0000000000..cfa307f6c5 --- /dev/null +++ b/openlayers/examples/web-mercator.html @@ -0,0 +1,50 @@ + + + + + + + OpenLayers: Web Mercator + + + + + + + + +

    OpenLayers Spherical Mercator Example

    + +
    + sperical, mercator, epsg, projection +
    +

    + Shows the use of layers in spherical or web mercator using different + EPSG codes to indicate the same projection. +

    +
    +
    +

    + A number of mapping services support the spherical or web + mercator but use different EPSG codes to identify it. ArcGIS + server version 9.3 uses EPSG:102113 to represent the same SRS + that OpenLayers typically refers to by EPSG:900913. +

    + To configure a map with a WMS layer overlaid on a Google layer + where the WMS uses EPSG:102113 to refer to the web mercator + projection, the Google layer must be constructed with this + projection code in its options (it is not sufficient to + construct the map with this projection). +

    + If your application needs to transform coordinates to and from + EPSG:102113, you must add custom transforms as well. +

    + See the web-mercator.js + source for details. +

    +
    + + + + + diff --git a/openlayers/examples/web-mercator.js b/openlayers/examples/web-mercator.js new file mode 100644 index 0000000000..ed14d940b7 --- /dev/null +++ b/openlayers/examples/web-mercator.js @@ -0,0 +1,45 @@ +// make map available for easy debugging +var map; + +// if your application transforms coordinates to and from EPSG:102113 then +// you must uncomment the lines below + +// OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:102113", +// OpenLayers.Layer.SphericalMercator.projectForward); +// OpenLayers.Projection.addTransform("EPSG:102113", "EPSG:4326", +// OpenLayers.Layer.SphericalMercator.projectInverse); + +function init() { + + var options = { + projection: new OpenLayers.Projection("EPSG:102113"), + units: "m", + numZoomLevels: 18, + maxResolution: 156543.0339, + maxExtent: new OpenLayers.Bounds(-20037508, -20037508, + 20037508, 20037508.34) + }; + map = new OpenLayers.Map('map', options); + + // create Google layer with EPSG:102113 code + var gsat = new OpenLayers.Layer.Google("Google Imagery", { + type: G_SATELLITE_MAP, + sphericalMercator: true, + projection: "EPSG:102113" + }); + + // create WMS layer + var wms = new OpenLayers.Layer.WMS( + "Highways", + "http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer", + {layers: "2", format: "image/gif", transparent: "true"}, + { + isBaseLayer: false, + wrapDateLine: true + } + ); + + map.addLayers([gsat, wms]); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(-10723197, 4500612), 3); +} diff --git a/openlayers/examples/wfs-filter.html b/openlayers/examples/wfs-filter.html new file mode 100644 index 0000000000..be256c0ac3 --- /dev/null +++ b/openlayers/examples/wfs-filter.html @@ -0,0 +1,35 @@ + + + + + + + OpenLayers WFS Protocol with Filter + + + + + + + +

    WFS Protocol and Filter

    +
    + filter, wfs, comparison +
    +

    + Demonstrates the use of a filter in making GetFeature requests using the WFS protocol. +

    +
    +
    +

    + If a vector layer has a filter and the protocol supports server-side filtering, + the filter will be serialized in requests for features. The WFS protocol can be + used with a vector layer to serialize a filter using OGC Filter Encoding. This + example requests all features that are TYPE "highway" or "road". +

    + See the wfs-filter source + for details on how this is done. +

    +
    + + diff --git a/openlayers/examples/wfs-filter.js b/openlayers/examples/wfs-filter.js new file mode 100644 index 0000000000..18d517cb35 --- /dev/null +++ b/openlayers/examples/wfs-filter.js @@ -0,0 +1,48 @@ +var map; + +// use proxy if requesting features cross-domain +OpenLayers.ProxyHost= "proxy.cgi?url="; + +function init() { + + map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.WMS( + "Natural Earth", + "http://demo.opengeo.org/geoserver/wms", + {layers: "topp:naturalearth"} + ), + new OpenLayers.Layer.Vector("WFS", { + strategies: [new OpenLayers.Strategy.BBOX()], + protocol: new OpenLayers.Protocol.WFS({ + url: "http://demo.opengeo.org/geoserver/wfs", + featureType: "tasmania_roads", + featureNS: "http://www.openplans.org/topp" + }), + styleMap: new OpenLayers.StyleMap({ + strokeWidth: 3, + strokeColor: "#333333" + }), + filter: new OpenLayers.Filter.Logical({ + type: OpenLayers.Filter.Logical.OR, + filters: [ + new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.EQUAL_TO, + property: "TYPE", + value: "highway" + }), + new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.EQUAL_TO, + property: "TYPE", + value: "road" + }) + ] + }) + }) + ], + center: new OpenLayers.LonLat(146.7, -41.8), + zoom: 6 + }); + +} diff --git a/openlayers/examples/wfs-protocol-transactions.html b/openlayers/examples/wfs-protocol-transactions.html new file mode 100644 index 0000000000..390c62ab5e --- /dev/null +++ b/openlayers/examples/wfs-protocol-transactions.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + +

    WFS Transaction Example

    +
    + wfs, wfst, wfs-t, advanced +
    +

    + Shows the use of the WFS Transactions (WFS-T). +

    +
    +
    +

    + The WFS protocol allows for creation of new features and + reading, updating, or deleting of existing features. +

    +

    + Use the tools to create, modify, and delete (in order from left + to right) features. Use the save tool (picture of a disk) to + save your changes. +

    +

    + To deactivate "drawing" or "modifying" depress the + corresponding button. +

    +

    + See the + wfs-protocol-transactions.js source to see how this is done. +

    +
    + + + + diff --git a/openlayers/examples/wfs-protocol-transactions.js b/openlayers/examples/wfs-protocol-transactions.js new file mode 100644 index 0000000000..1f61958fe2 --- /dev/null +++ b/openlayers/examples/wfs-protocol-transactions.js @@ -0,0 +1,109 @@ +var map, wfs; +OpenLayers.ProxyHost = "proxy.cgi?url="; + +var DeleteFeature = OpenLayers.Class(OpenLayers.Control, { + initialize: function(layer, options) { + OpenLayers.Control.prototype.initialize.apply(this, [options]); + this.layer = layer; + this.handler = new OpenLayers.Handler.Feature( + this, layer, {click: this.clickFeature} + ); + }, + clickFeature: function(feature) { + // if feature doesn't have a fid, destroy it + if(feature.fid == undefined) { + this.layer.destroyFeatures([feature]); + } else { + feature.state = OpenLayers.State.DELETE; + this.layer.events.triggerEvent("afterfeaturemodified", + {feature: feature}); + feature.renderIntent = "select"; + this.layer.drawFeature(feature); + } + }, + setMap: function(map) { + this.handler.setMap(map); + OpenLayers.Control.prototype.setMap.apply(this, arguments); + }, + CLASS_NAME: "OpenLayers.Control.DeleteFeature" +}); + +function init() { + + var extent = new OpenLayers.Bounds( + -11593508, 5509847, -11505759, 5557774 + ); + + + map = new OpenLayers.Map('map', { + projection: new OpenLayers.Projection("EPSG:900913"), + displayProjection: new OpenLayers.Projection("EPSG:4326"), + units: "m", + maxResolution: 20037508.34 / 128, + maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508), + restrictedExtent: extent, + controls: [ + new OpenLayers.Control.PanZoom(), + new OpenLayers.Control.Navigation() + ] + }); + var gphy = new OpenLayers.Layer.Google( + "Google Physical", + {type: G_PHYSICAL_MAP, sphericalMercator: true} + ); + + var saveStrategy = new OpenLayers.Strategy.Save(); + + wfs = new OpenLayers.Layer.Vector("Editable Features", { + strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy], + projection: new OpenLayers.Projection("EPSG:4326"), + protocol: new OpenLayers.Protocol.WFS({ + version: "1.1.0", + srsName: "EPSG:4326", + url: "http://demo.opengeo.org/geoserver/wfs", + featureNS : "http://opengeo.org", + featureType: "restricted", + geometryName: "the_geom", + schema: "http://demo.opengeo.org/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=og:restricted" + }) + }); + + map.addLayers([gphy, wfs]); + + var panel = new OpenLayers.Control.Panel({ + displayClass: 'customEditingToolbar', + allowDepress: true + }); + + var draw = new OpenLayers.Control.DrawFeature( + wfs, OpenLayers.Handler.Polygon, + { + title: "Draw Feature", + displayClass: "olControlDrawFeaturePolygon", + multi: true + } + ); + + var edit = new OpenLayers.Control.ModifyFeature(wfs, { + title: "Modify Feature", + displayClass: "olControlModifyFeature" + }); + + var del = new DeleteFeature(wfs, {title: "Delete Feature"}); + + var save = new OpenLayers.Control.Button({ + title: "Save Changes", + trigger: function() { + if(edit.feature) { + edit.selectControl.unselectAll(); + } + saveStrategy.save(); + }, + displayClass: "olControlSaveFeatures" + }); + + panel.addControls([save, del, edit, draw]); + map.addControl(panel); + map.zoomToExtent(extent, true); +} + diff --git a/openlayers/examples/wfs-protocol.html b/openlayers/examples/wfs-protocol.html new file mode 100644 index 0000000000..97752a5f30 --- /dev/null +++ b/openlayers/examples/wfs-protocol.html @@ -0,0 +1,55 @@ + + + + + + + OpenLayers Vector Behavior Example + + + + + + + +

    Vector Behavior Example

    +
    + wfs, vector +
    +

    + Uses a BBOX strategy, WFS protocol, and GML format. +

    +
    +
    +

    The vector layer shown uses the BBOX strategy, the WFS protocol, + and the GML format. The BBOX strategy fetches features within a + bounding box. When the map bounds invalidate the data bounds, + another request is triggered. The WFS protocol gets features + through a WFS request. The GML format is used to serialize + features.

    +
    + + diff --git a/openlayers/examples/wfs-reprojection.html b/openlayers/examples/wfs-reprojection.html new file mode 100644 index 0000000000..ceae053324 --- /dev/null +++ b/openlayers/examples/wfs-reprojection.html @@ -0,0 +1,42 @@ + + + + + + + WFS Reprojection Example + + + + + + + +

    WFS Reprojection Example

    +
    + reprojection, styling, stylemap, wfs, vector, advanced +
    +

    + Shows the use of the client side reprojection support. +

    +
    +
    +

    + This example shows client side reprojection. In the case where + the projection of a vector layer differs from the projection of + the map, features are requested in the layer projection and + transformed during parsing. It is assumed that the layer + projection is "native" projection of the data (the coordinate + reference system of the data on the server). +

    +

    + Also shown is styleMap for the layer with unique value rules. + Colors are assigned based on the STATE_FIPS attribute. +

    +

    + See the + wfs-reprojection.js source to see how this is done. +

    +
    + + diff --git a/openlayers/examples/wfs-reprojection.js b/openlayers/examples/wfs-reprojection.js new file mode 100644 index 0000000000..d789b929b8 --- /dev/null +++ b/openlayers/examples/wfs-reprojection.js @@ -0,0 +1,65 @@ +var map, layer, styleMap; +OpenLayers.ProxyHost = "proxy.cgi?url="; + +function init() { + + var geographic = new OpenLayers.Projection("EPSG:4326"); + var mercator = new OpenLayers.Projection("EPSG:900913"); + + map = new OpenLayers.Map('map', { + projection: mercator, + units: "m", + maxResolution: 156543.0339, + maxExtent: new OpenLayers.Bounds( + -20037508, -20037508, 20037508, 20037508 + ) + }); + + var g = new OpenLayers.Layer.Google("Google Layer", { + sphericalMercator: true + }); + map.addLayers([g]); + + // prepare to style the data + styleMap = new OpenLayers.StyleMap({ + strokeColor: "black", + strokeWidth: 2, + strokeOpacity: 0.5, + fillOpacity: 0.2 + }); + // create a color table for state FIPS code + var colors = ["red", "orange", "yellow", "green", "blue", "purple"]; + var code, fips = {}; + for(var i=1; i<=66; ++i) { + code = "0" + i; + code = code.substring(code.length - 2); + fips[code] = {fillColor: colors[i % colors.length]}; + } + // add unique value rules with your color lookup + styleMap.addUniqueValueRules("default", "STATE_FIPS", fips); + + // This server supports server-side reprojection, but we're using WFS 1.0 + // here (which doesn't support reprojection) to illustrate client-side + // reprojection. + var wfs = new OpenLayers.Layer.Vector("States", { + strategies: [new OpenLayers.Strategy.BBOX()], + protocol: new OpenLayers.Protocol.WFS({ + version: "1.0.0", + srsName: "EPSG:4326", // this is the default + url: "http://demo.opengeo.org/geoserver/wfs", + featureType: "states", + featureNS: "http://www.openplans.org/topp" + }), + projection: geographic, // specified because it is different than the map + styleMap: styleMap + }); + map.addLayer(wfs); + + // if you want to use Geographic coords, transform to ESPG:900913 + var ddBounds = new OpenLayers.Bounds( + -73.839111,40.287907,-68.214111,44.441624 + ); + map.zoomToExtent( + ddBounds.transform(geographic, mercator) + ); +} diff --git a/openlayers/examples/wfs-snap-split.html b/openlayers/examples/wfs-snap-split.html new file mode 100644 index 0000000000..0b71da021d --- /dev/null +++ b/openlayers/examples/wfs-snap-split.html @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + +

    Snap/Split and Persist via WFS

    + +
    + snapping, splitting, wfs, wfst, wfs-t, advanced +
    +

    + Shows snapping, splitting, and use of the WFS Transactions (WFS-T). +

    + +
    + +
    +

    The WFS protocol allows for creation of new features and reading, + updating, or deleting of existing features.

    +

    Use the tools to create, modify, and delete (in order from left + to right) features. Use the save tool (picture of a disk) to + save your changes.

    +

    To deactivate "drawing" or "modifying" depress the corresponding + button.

    +
    + + + + + diff --git a/openlayers/examples/wfs-spatial-filter.html b/openlayers/examples/wfs-spatial-filter.html new file mode 100644 index 0000000000..d6acead436 --- /dev/null +++ b/openlayers/examples/wfs-spatial-filter.html @@ -0,0 +1,37 @@ + + + + + + + OpenLayers WFS Protocol with Filter + + + + + +

    WFS Protocol and Filter

    +
    + filter, wfs, spatial +
    +

    + Demonstrates the use of a spatial filter in making GetFeature requests using the WFS protocol. +

    +
    +
    +

    + If a vector layer has a filter and the protocol supports server-side filtering, + the filter will be serialized in requests for features. The WFS protocol can be + used with a vector layer to serialize a filter using OGC Filter Encoding. +

    + This example has a draw control that is always active. When you draw a polygon + on the map, the filter for the main vector layer will be updated, and features + that intersect your drawn polygon will be requested. +

    + See the source + for details on how this is done. +

    +
    + + + diff --git a/openlayers/examples/wfs-spatial-filter.js b/openlayers/examples/wfs-spatial-filter.js new file mode 100644 index 0000000000..4ca9fd5624 --- /dev/null +++ b/openlayers/examples/wfs-spatial-filter.js @@ -0,0 +1,36 @@ +OpenLayers.ProxyHost= "proxy.cgi?url="; +var map = new OpenLayers.Map('map'); +var wms = new OpenLayers.Layer.WMS( + "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: "basic"} +); + +var layer = new OpenLayers.Layer.Vector("WFS", { + strategies: [new OpenLayers.Strategy.BBOX()], + protocol: new OpenLayers.Protocol.WFS({ + url: "http://demo.opengeo.org/geoserver/wfs", + featureType: "tasmania_roads", + featureNS: "http://www.openplans.org/topp" + }) +}); + +map.addLayers([wms, layer]); +map.setCenter(new OpenLayers.LonLat(146.7, -41.8), 6); + +var drawings = new OpenLayers.Layer.Vector(); +map.addLayer(drawings); +var draw = new OpenLayers.Control.DrawFeature(drawings, OpenLayers.Handler.Polygon); +map.addControl(draw); +draw.activate(); + +drawings.events.on({ + beforefeatureadded: function(event) { + var geometry = event.feature.geometry; + layer.filter = new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.INTERSECTS, + value: event.feature.geometry + }); + layer.refresh({force: true}); + return false; + } +}); diff --git a/openlayers/examples/wfs-states.html b/openlayers/examples/wfs-states.html new file mode 100644 index 0000000000..655acd4429 --- /dev/null +++ b/openlayers/examples/wfs-states.html @@ -0,0 +1,33 @@ + + + + + + + + + WFS: United States (GeoServer) + + + + +

    WFS United States (GeoServer) Example

    +
    + wfs, vector +
    +

    + Shows the use of the WFS United States (GeoServer). +

    +
    +
    +

    + This example shows the basic use of a vector layer with the + WFS protocol. +

    +

    + See the wfs-states.js + source to see how this is done. +

    +
    + + diff --git a/openlayers/examples/wfs-states.js b/openlayers/examples/wfs-states.js new file mode 100644 index 0000000000..7f31513a33 --- /dev/null +++ b/openlayers/examples/wfs-states.js @@ -0,0 +1,29 @@ +var map; +OpenLayers.ProxyHost = "proxy.cgi?url="; + +function init() { + map = new OpenLayers.Map("map"); + + var base = new OpenLayers.Layer.WMS("OpenLayers WMS", + "http://tilecache.osgeo.org/wms-c/Basic.py", + {layers: "basic"} + ); + map.addLayer(base); + + // allow testing of specific renderers via "?renderer=Canvas", etc + var renderer = OpenLayers.Util.getParameters(window.location.href).renderer; + renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers; + + var wfs = new OpenLayers.Layer.Vector("States", { + strategies: [new OpenLayers.Strategy.BBOX()], + protocol: new OpenLayers.Protocol.WFS({ + url: "http://demo.opengeo.org/geoserver/wfs", + featureType: "states", + featureNS: "http://www.openplans.org/topp" + }), + renderers: renderer + }); + map.addLayer(wfs); + + map.zoomToExtent(new OpenLayers.Bounds(-140.4, 25.1, -44.4, 50.5)); +} diff --git a/openlayers/examples/wmc.html b/openlayers/examples/wmc.html new file mode 100644 index 0000000000..a8c1fdaf6b --- /dev/null +++ b/openlayers/examples/wmc.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + +

    WMC Example

    + +
    + wmc, parser, advanced, cleanup +
    +

    + Shows parsing of Web Map Context documents. +

    +
    +
    + with the following extra map options :
    +
    +
    + +
    +

    This is an example of parsing WMC documents.
    + The format class has a layerOptions property, which can be used + to control the default options of the layer when it is created + by the parser.

    +
    + + + + + + diff --git a/openlayers/examples/wms-long-url.html b/openlayers/examples/wms-long-url.html new file mode 100644 index 0000000000..023345be37 --- /dev/null +++ b/openlayers/examples/wms-long-url.html @@ -0,0 +1,44 @@ + + + + + + + WMS with POST Requests to Avoid Long URLs + + + + +

    WMS with POST Requests to Avoid Long URLs

    + +
    + sld, sld_body, post, iframe, advanced +
    + +
    Render tiles in IMG or IFRAME elements, depending on + the complexity of the GetMap request
    + +
    + +
    +

    The maxGetUrlLength property of the layer's + tileOptions option causes tiles to be requested using + HTTP POST when the length of the GET url would exceed the specified + length (2048 characters is recommended). In real life applications, + this happens often when using the SLD_BODY request parameter for + inline styling. +

    + + Long URL - POST requests +
    + + Short URL - GET requests +

    + View the wms-long-url.js + source to see how this is done. +

    +
    + + + + diff --git a/openlayers/examples/wms-long-url.js b/openlayers/examples/wms-long-url.js new file mode 100644 index 0000000000..ecbda39312 --- /dev/null +++ b/openlayers/examples/wms-long-url.js @@ -0,0 +1,26 @@ +// a long text that we set as dummy param (makeTheUrlLong) to make the url long +var longText = new Array(205).join("1234567890"); + +var map = new OpenLayers.Map( 'map' ); +var base = new OpenLayers.Layer.WMS( "OpenLayers WMS", + "http://vmap0.tiles.osgeo.org/wms/vmap0", + {layers: 'basic', makeTheUrlLong: longText}, + {tileOptions: {maxGetUrlLength: 2048}} +); +var overlay = new OpenLayers.Layer.WMS("Overlay", + "http://suite.opengeo.org/geoserver/wms", + {layers: "usa:states", transparent: true, makeTheUrlLong: longText}, + {ratio: 1, singleTile: true, tileOptions: {maxGetUrlLength: 2048}} +); +map.addLayers([base, overlay]); +map.zoomToMaxExtent(); + +// add behavior to dom elements +document.getElementById("longurl").onclick = function() { + base.mergeNewParams({makeTheUrlLong: longText}); + overlay.mergeNewParams({makeTheUrlLong: longText}); +}; +document.getElementById("shorturl").onclick = function() { + base.mergeNewParams({makeTheUrlLong: null}); + overlay.mergeNewParams({makeTheUrlLong: null}); +}; diff --git a/openlayers/examples/wms-untiled.html b/openlayers/examples/wms-untiled.html new file mode 100644 index 0000000000..1d3c4dc4a1 --- /dev/null +++ b/openlayers/examples/wms-untiled.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + +

    WMS Untiled Example

    + +
    + singletile, tile +
    +

    + Shows an example of an "untiled" WMS layer, which requests a single + image for the entire map view. +

    +
    +
    + An untiled layer will only request a single image at a time. + This is equivalent to using the deprecated + OpenLayers.Layer.WMS.Untiled class, which will be removed at 3.0. +
    + + + + diff --git a/openlayers/examples/wms-v13.html b/openlayers/examples/wms-v13.html new file mode 100644 index 0000000000..b917e75f2b --- /dev/null +++ b/openlayers/examples/wms-v13.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + +

    WMS version 1.3 (axis order) Example

    + +
    + axis order, wms 1.3 +
    +

    + Shows an example of the influence of axis order on WMS 1.3 GetMap requests. +

    +
    +
    +
    +

    WMS version 1.3 introduced the axis order sequence, so that for e.g. EPSG:4326 the bbox coordinate + values need to be flipped (LatLon instead of LonLat). The first map uses the incorrect (WMS 1.1) axis + order against a WMS 1.3 service, resulting in corrupted maps. The second map shows how to correctly + request a map in EPSG:4326 against a WMS 1.3 service.

    +
    + + diff --git a/openlayers/examples/wms.html b/openlayers/examples/wms.html new file mode 100644 index 0000000000..1f0668f253 --- /dev/null +++ b/openlayers/examples/wms.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + +

    WMS Example

    + +
    + wms, layer, singletile +
    +

    + Shows the basic use of openlayers using a WMS layer +

    + +
    + +
    +

    This is an example of how to add an WMS layer to the OpenLayers + window. The images are tiled in this instance. If you wanted to not use + a tiled WMS, "singleTile" option to true like shown in this example.

    +
    + + + + + + diff --git a/openlayers/examples/wmst.html b/openlayers/examples/wmst.html new file mode 100644 index 0000000000..8d1e891717 --- /dev/null +++ b/openlayers/examples/wmst.html @@ -0,0 +1,63 @@ + + + + + + + OpenLayers: WMS + Time + + + + + + +

    WMS Time Example

    +
    + wmst, wms-t +
    +

    + Shows the use of the layer WMS-T (time) layer +

    + --T::00 +
    +
    +

    WMS-T example: update the times, and the radar image will change. + Uses Layer.mergeNewParams to update the date element with the strings + from the input fields every time one of them is changed. The inputs + above describe a timestamp: The minute increments can only be updated + in units of 5.

    +
    + + + + + diff --git a/openlayers/examples/wmts-capabilities.html b/openlayers/examples/wmts-capabilities.html new file mode 100644 index 0000000000..21b3cae0c7 --- /dev/null +++ b/openlayers/examples/wmts-capabilities.html @@ -0,0 +1,43 @@ + + + + + + + OpenLayers WMTS Capabilities Example + + + + + + + + +

    Web Map Tile Service (WMTS) Capabilities Parsing

    +
    + wmts, capabilities, getcapabilities +
    +

    + The WMTS Capabilities format allows for parsing of capabilities + documents from OGC Web Map Tile Service (WMTS) version 1.0.0 + implementations. +

    + +
    + +
    +

    + This example creates an OpenLayers.Layer.WMTS layer to based + on the results of parsing a capabilities doc with the + OpenLayers.Format.WMTSCapabilities parser. +

    + See the + wmts-capabilities.js source to see how this is done. +

    +
    + + diff --git a/openlayers/examples/wmts-capabilities.js b/openlayers/examples/wmts-capabilities.js new file mode 100644 index 0000000000..7f138b4d1a --- /dev/null +++ b/openlayers/examples/wmts-capabilities.js @@ -0,0 +1,64 @@ +OpenLayers.ProxyHost = "/proxy/?url="; + +var map, format; + +function init() { + + format = new OpenLayers.Format.WMTSCapabilities({ + /** + * This particular service is not in compliance with the WMTS spec and + * is providing coordinates in y, x order regardless of the CRS. To + * work around this, we can provide the format a table of CRS URN that + * should be considered y, x order. These will extend the defaults on + * the format. + */ + yx: { + "urn:ogc:def:crs:EPSG::900913": true + } + }); + + OpenLayers.Request.GET({ + url: "http://v2.suite.opengeo.org/geoserver/gwc/service/wmts", + params: { + SERVICE: "WMTS", + VERSION: "1.0.0", + REQUEST: "GetCapabilities" + }, + success: function(request) { + var doc = request.responseXML; + if (!doc || !doc.documentElement) { + doc = request.responseText; + } + var capabilities = format.read(doc); + var layer = format.createLayer(capabilities, { + layer: "medford:buildings", + matrixSet: "EPSG:900913", + format: "image/png", + opacity: 0.7, + isBaseLayer: false + }); + map.addLayer(layer); + }, + failure: function() { + alert("Trouble getting capabilities doc"); + OpenLayers.Console.error.apply(OpenLayers.Console, arguments); + } + }) + + map = new OpenLayers.Map({ + div: "map", + projection: "EPSG:900913", + units: "m", + maxExtent: new OpenLayers.Bounds( + -20037508.34, -20037508.34, 20037508.34, 20037508.34 + ), + maxResolution: 156543.0339 + }); + + var osm = new OpenLayers.Layer.OSM(); + + map.addLayer(osm); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(-13677832, 5213272), 13); + +} diff --git a/openlayers/examples/wmts-getfeatureinfo.html b/openlayers/examples/wmts-getfeatureinfo.html new file mode 100644 index 0000000000..453eb5f127 --- /dev/null +++ b/openlayers/examples/wmts-getfeatureinfo.html @@ -0,0 +1,74 @@ + + + + + + + OpenLayers WMTS GetFeatureInfo Example + + + + + + + + +

    WMTS GetFeatureInfo Control

    +
    + wmts, tile, cache, getfeatureinfo +
    +

    + The WMTSGetFeatureInfo control allows retrieval of information about + features displayed in a WMTS layer. +

    + +
    + + +
    +

    + This example uses an OpenLayers.Control.WMTSGetFeatureInfo + control layer to access information from WMTS layers. The + control is activated and configured to request feature + information when you click on the map. If the control's + drillDown property is set to true, multiple layers can be + queried. +

    + See the + wmts-getfeatureinfo.js source to see how this is done. +

    +
    + + diff --git a/openlayers/examples/wmts-getfeatureinfo.js b/openlayers/examples/wmts-getfeatureinfo.js new file mode 100644 index 0000000000..6882c44ec8 --- /dev/null +++ b/openlayers/examples/wmts-getfeatureinfo.js @@ -0,0 +1,99 @@ +OpenLayers.ProxyHost = "/proxy/?url="; +var map, control, popups = {}; + +function init() { + + map = new OpenLayers.Map({ + div: "map", + projection: "EPSG:900913", + units: "m", + maxExtent: new OpenLayers.Bounds( + -20037508.34, -20037508.34, 20037508.34, 20037508.34 + ), + maxResolution: 156543.0339 + }); + + var osm = new OpenLayers.Layer.OSM(); + + // If tile matrix identifiers differ from zoom levels (0, 1, 2, ...) + // then they must be explicitly provided. + var matrixIds = new Array(26); + for (var i=0; i<26; ++i) { + matrixIds[i] = "EPSG:900913:" + i; + } + + var zoning = new OpenLayers.Layer.WMTS({ + name: "zoning", + url: "http://v2.suite.opengeo.org/geoserver/gwc/service/wmts/", + layer: "medford:zoning", + matrixSet: "EPSG:900913", + matrixIds: matrixIds, + format: "image/png", + style: "_null", + opacity: 0.7, + isBaseLayer: false + }); + var buildings = new OpenLayers.Layer.WMTS({ + name: "building", + url: "http://v2.suite.opengeo.org/geoserver/gwc/service/wmts/", + layer: "medford:buildings", + matrixSet: "EPSG:900913", + matrixIds: matrixIds, + format: "image/png", + style: "_null", + isBaseLayer: false + }); + + map.addLayers([osm, zoning, buildings]); + + // create WMTS GetFeatureInfo control + control = new OpenLayers.Control.WMTSGetFeatureInfo({ + drillDown: true, + queryVisible: true, + eventListeners: { + getfeatureinfo: function(evt) { + var text; + var match = evt.text.match(/]*>([\s\S]*)<\/body>/); + if (match && !match[1].match(/^\s*$/)) { + text = match[1]; + } else { + text = "No " + evt.layer.name + " features in that area.
    "; + } + var popupId = evt.xy.x + "," + evt.xy.y; + var popup = popups[popupId]; + if (!popup || !popup.map) { + popup = new OpenLayers.Popup.FramedCloud( + popupId, + map.getLonLatFromPixel(evt.xy), + null, + " ", + null, + true, + function(evt) { + delete popups[this.id]; + this.hide(); + OpenLayers.Event.stop(evt); + } + ); + popups[popupId] = popup; + map.addPopup(popup, true); + } + popup.setContentHTML(popup.contentHTML + text); + popup.show(); + } + } + }); + map.addControl(control); + control.activate(); + + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(-13678519, 5212803), 15); + + var drill = document.getElementById("drill"); + drill.checked = true; + drill.onchange = function() { + control.drillDown = drill.checked; + }; +} + +OpenLayers.Popup.FramedCloud.prototype.maxSize = new OpenLayers.Size(350, 200); diff --git a/openlayers/examples/wmts.html b/openlayers/examples/wmts.html new file mode 100644 index 0000000000..922df8c940 --- /dev/null +++ b/openlayers/examples/wmts.html @@ -0,0 +1,41 @@ + + + + + + + OpenLayers WMTS Example + + + + + + + + +

    Web Map Tile Service (WMTS) Layer

    +
    + wmts +
    +

    + The WMTS layer allows viewing of tiles from a server implementing + the OGC Web Map Tile Service (WMTS) standard version 1.0.0. +

    + +
    + +
    +

    + This example uses an OpenLayers.Layer.WMTS layer to display + cached tiles over an OSM layer in spherical mercator coordinates. +

    + See the + wmts.js source to see how this is done. +

    +
    + + diff --git a/openlayers/examples/wmts.js b/openlayers/examples/wmts.js new file mode 100644 index 0000000000..784e596b53 --- /dev/null +++ b/openlayers/examples/wmts.js @@ -0,0 +1,40 @@ +var map; + +function init() { + + map = new OpenLayers.Map({ + div: "map", + projection: "EPSG:900913", + units: "m", + maxExtent: new OpenLayers.Bounds( + -20037508.34, -20037508.34, 20037508.34, 20037508.34 + ), + maxResolution: 156543.0339 + }); + + var osm = new OpenLayers.Layer.OSM(); + + // If tile matrix identifiers differ from zoom levels (0, 1, 2, ...) + // then they must be explicitly provided. + var matrixIds = new Array(26); + for (var i=0; i<26; ++i) { + matrixIds[i] = "EPSG:900913:" + i; + } + + var wmts = new OpenLayers.Layer.WMTS({ + name: "Medford Buildings", + url: "http://v2.suite.opengeo.org/geoserver/gwc/service/wmts/", + layer: "medford:buildings", + matrixSet: "EPSG:900913", + matrixIds: matrixIds, + format: "image/png", + style: "_null", + opacity: 0.7, + isBaseLayer: false + }); + + map.addLayers([osm, wmts]); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(-13677832, 5213272), 13); + +} diff --git a/openlayers/examples/worldwind.html b/openlayers/examples/worldwind.html new file mode 100644 index 0000000000..3038c5b36f --- /dev/null +++ b/openlayers/examples/worldwind.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + +

    WorldWind layers Example

    + +
    + worldwind, tile +
    +

    + Shows the use of the Tiled WorldWind layers. +

    + +
    + +
    +

    This is a demonstration of using Tiled WorldWind layers. + WorldWind requires you to define a "LZTD" -- the 3rd param of the + constructor -- and the number of zoom levels it supports. When a + worldwind layer is not visible at a given tile level, and empty + tile is placed there instead. Note that the maxResolution of the + map times 512px, must be a multiple of a power of two different + from the LZTD -- in this case, .28125 * 512 is 144, which is 36*4, + and 2.25*64. This example has a 'Bathy' layer, visible as you zoom + out, and a 'landsat' layer, visible as you zoom in, both visible at + zoom level 6.

    +
    + + + + diff --git a/openlayers/examples/wrapDateLine.html b/openlayers/examples/wrapDateLine.html new file mode 100644 index 0000000000..52a39a6134 --- /dev/null +++ b/openlayers/examples/wrapDateLine.html @@ -0,0 +1,73 @@ + + + + + + + OpenLayers: Wrap Date Line + + + + + + +

    Wrapping the Date Line

    +
    + WMS, + MapServer, + wrapDateLine +
    + +

    Shows how to work around dateline issues, by wrapping the dateline on a number of layer types.

    +
    +
    +

    + This is an example that shows wrapping the date line. Wrapping the + date line is an option on the layer. +

    +

    + You can do it with a 'Layer.WMS' or a 'Layer.MapServer' layer. +

    +
    +    var mapserv = new OpenLayers.Layer.MapServer( "OpenLayers Basic",
    +                "http://vmap0.tiles.osgeo.org/wms/vmap0",
    +                {layers: 'basic'},
    +                {wrapDateLine: true} );
    +    
    +
    + + diff --git a/openlayers/examples/xhtml.html b/openlayers/examples/xhtml.html new file mode 100644 index 0000000000..b4decfb87d --- /dev/null +++ b/openlayers/examples/xhtml.html @@ -0,0 +1,42 @@ + + + + + + +XHTML Example + + + + + +

    XHTML Example

    + +
    + xhtml +
    +

    + Shows openlayers running in a XHTML 1.0 Strict Doctype +

    + +
    + +
    This example shows openlayers using a XHTML 1.0 Strict Doctype click on the below image to validate. +

    + Valid XHTML 1.0! +

    +
    + + + + + diff --git a/openlayers/examples/xml.html b/openlayers/examples/xml.html new file mode 100644 index 0000000000..696229bde7 --- /dev/null +++ b/openlayers/examples/xml.html @@ -0,0 +1,161 @@ + + + + + + + XML Parsing Example + + + + + + + + +

    XML Format Example

    + +
    + xml +
    + +

    + Shows the use of the OpenLayers XML format class +

    + +
    +

    OpenLayers has a very simple XML format class (OpenLayers.Format.XML) + that can be used to read/write XML docs. The methods available on the + XML format (or parser if you like) allow for reading and writing of the + various XML flavors used by the library - in particular the vector data + formats. It is by no means intended to be a full-fledged XML toolset. + Additional methods will be added only as needed elsewhere in the + library.

    +

    This page loads an XML document and demonstrates a few of the methods + available in the parser.

    +

    Status: XML document loading...

    +

    After the XML document loads, see the result of a few of the methods + below. Assume that you start with the following code: +
    + + var format = new OpenLayers.Format.XML(); + +

    + Sample methods + + Output: +
     
    +
    + + + + diff --git a/openlayers/examples/xml/features.xml b/openlayers/examples/xml/features.xml new file mode 100644 index 0000000000..b213ce5dd3 --- /dev/null +++ b/openlayers/examples/xml/features.xml @@ -0,0 +1,2 @@ + +-107.7912454726602 43.649560413854424-107.75539905577847 43.6677494686189260430N0910W27Aw2sw;WYB 0016999ABUREAU OF LAND MGMT0.0614.3Authorized310781O&g renewal lease - pdOil & gas06/5/1926Rlty rate - 5%HBPORGAS VENTURES LLC100.00.00.00.06/1/2006-107.75540341813374 43.65318043604783 -107.75540766903033 43.649560413854424 -107.76039213131902 43.64957232716459 -107.76537647481773 43.649584044882054 -107.76600694778301 43.649585553307226 -107.76600544447962 43.65320449790224 -107.76600393275089 43.65682260581091 -107.77035309969853 43.6568319555119 -107.77533746205971 43.65684246461631 -107.77533369030677 43.66046005010295 -107.78032119967183 43.66047517767307 -107.78114989067903 43.660477553258325 -107.7811491411714 43.66409732386495 -107.78530636850998 43.66411137468226 -107.78619730956676 43.664114220754314 -107.79029430779957 43.6641274142625 -107.7912454726602 43.66413046978637 -107.79124472581245 43.66774946861892 -107.79029254907311 43.667746432392896 -107.78530411910795 43.66773049422058 -107.7803154837038 43.66771429284182 -107.77532694645721 43.66769786251535 -107.77034201441859 43.66768723301139 -107.76599111151326 43.667677746482155 -107.76599928176243 43.66406177993355 -107.76600204937104 43.66044527933786 -107.76536482605789 43.660441720601554 -107.76095267723535 43.66043320984291 -107.76037976752744 43.6604312952967 -107.76038385503145 43.656811633534815 -107.75539905577847 43.65680054792165 -107.75540341813374 43.65318043604783-107.76038385503497 43.65314461898675-107.74044949722713 43.6604312953016360430N0910W34Anene;WYB 0017060ABUREAU OF LAND MGMT0.0190.0Authorized310781O&g renewal lease - pdOil & gas08/14/1929Rlty rate - 5%HBPORTEXACO EXPL & PROD INC100.00.00.00.06/1/2006-107.74605488318316 43.65994411135142 -107.74543221894442 43.659942507723265 -107.74543182097408 43.66039495347534 -107.74044949722713 43.66038434024628 -107.74045205662398 43.65676451042827 -107.74045468122058 43.65314461898675 -107.74543785843247 43.65315677493463 -107.74543483251206 43.656775865277204 -107.74792589467117 43.656782141688055 -107.7504169506792 43.65678836105594 -107.75290800688019 43.65679449548188 -107.75539905578172 43.65680054791882 -107.76038385503497 43.6568116335444 -107.76037976752876 43.66043129530163 -107.75590467181928 43.66042401057107 -107.75539470030401 43.66042058014666 -107.75539522492454 43.65996803160492 -107.75477258519014 43.65996648396323 -107.75414984843758 43.659964934969224 -107.75352723875065 43.65996338002915 -107.7529045032101 43.65996182230788 -107.7522817671415 43.65996026343829 -107.75165902657075 43.65995861118674 -107.75103641630865 43.65995704018709 -107.75041368089654 43.65995547101946 -107.74979106335141 43.659953806253434 -107.74916845036381 43.659952225696536 -107.74854571394238 43.659950645819315 -107.74792297797997 43.659949063070066 -107.74730023769644 43.65994738546058 -107.74667762361214 43.6599457929788 -107.74605488318316 43.65994411135142 \ No newline at end of file diff --git a/openlayers/examples/xml/georss-flickr.xml b/openlayers/examples/xml/georss-flickr.xml new file mode 100644 index 0000000000..23ec199bfe --- /dev/null +++ b/openlayers/examples/xml/georss-flickr.xml @@ -0,0 +1,730 @@ + + + + Photos from everyone tagged snowboard and powder, with geodata + http://www.flickr.com/photos/ + + Sat, 24 Nov 2007 16:25:03 -0800 + Sat, 24 Nov 2007 16:25:03 -0800 + + http://www.flickr.com/ + + http://www.flickr.com/images/buddyicon.jpg + Photos from everyone tagged snowboard and powder, with geodata + http://www.flickr.com/photos/ + + + + hofü07_5259 + http://www.flickr.com/photos/-mo-/2061136492/ + I - mo - I posted a photo:

    + +

    hofü07_5259

    + + ]]>
    + Sat, 24 Nov 2007 16:25:03 -0800 + 2007-11-17T12:01:18-08:00 + nobody@flickr.com (I - mo - I) + tag:flickr.com,2004:/photo/2061136492 + 47.25162 11.754426 + + + 47.25162 + 11.754426 + + + hofü07_5259 + I - mo - I posted a photo:

    + +

    hofü07_5259

    + + ]]>
    + + I - mo - I + sun snow fall fun austria yeah powder snowboard tyrol 2007 hochfügen powderahyeahturn + +
    + + First tracks + + http://www.flickr.com/photos/ruthanddave/2046899659/ + Ruth and Dave posted a photo:

    + +

    First tracks

    + +

    Not mine, alas.

    + ]]>
    + Mon, 19 Nov 2007 08:20:11 -0800 + 2007-11-18T11:19:50-08:00 + nobody@flickr.com (Ruth and Dave) + tag:flickr.com,2004:/photo/2046899659 + + 50.107423 -122.899847 + + 50.107423 + -122.899847 + + + First tracks + Ruth and Dave posted a photo:

    + +

    First tracks

    + +

    Not mine, alas.

    + ]]>
    + + Ruth and Dave + november lines whistler snowboarding tracks peak powder snowboard turns freshies + +
    + + + Powder turns + http://www.flickr.com/photos/ruthanddave/2047707124/ + Ruth and Dave posted a photo:

    + +

    Powder turns

    + + ]]>
    + Mon, 19 Nov 2007 08:26:04 -0800 + 2007-11-18T11:19:57-08:00 + nobody@flickr.com (Ruth and Dave) + tag:flickr.com,2004:/photo/2047707124 + 50.107423 -122.899847 + + + 50.107423 + -122.899847 + + + Powder turns + Ruth and Dave posted a photo:

    + +

    Powder turns

    + + ]]>
    + + Ruth and Dave + november face lines whistler snowboarding tracks first peak powder fresh snowboard turns + +
    + + Splitboard + + http://www.flickr.com/photos/hamsgod/1330385819/ + @nt!x posted a photo:

    + +

    Splitboard

    + + ]]>
    + Wed, 5 Sep 2007 09:00:56 -0800 + 2007-03-04T04:40:12-08:00 + nobody@flickr.com (@nt!x) + tag:flickr.com,2004:/photo/1330385819 + 41.931831 -111.646049 + + + 41.931831 + -111.646049 + + + Splitboard + @nt!x posted a photo:

    + +

    Splitboard

    + + ]]>
    + + @nt!x + snow mountains snowboarding utah powder yurt snowboard splitboard supershot + +
    + + Fresh powder + + http://www.flickr.com/photos/oliver80/1266854486/ + Oliver Astrologo posted a photo:

    + +

    Fresh powder

    + + ]]>
    + Wed, 29 Aug 2007 05:19:36 -0800 + 2007-08-24T10:05:48-08:00 + nobody@flickr.com (Oliver Astrologo) + tag:flickr.com,2004:/photo/1266854486 + 46.528236 10.449789 + + + 46.528236 + 10.449789 + + + Fresh powder + Oliver Astrologo posted a photo:

    + +

    Fresh powder

    + + ]]>
    + + Oliver Astrologo + sky people italy panorama mountain snow alps landscape powder snowboard rider snowboarder passo ghiacciaio stelvio + +
    + + Sawatch Range From Vail Pano + + http://www.flickr.com/photos/dman861/498747983/ + dman861 posted a photo:

    + +

    Sawatch Range From Vail Pano

    + +

    View near the Eagle's Nest at the top of Eagle Bahn Gondola. Mount of the Holy Cross mountain is visible in this picture but you can't make out the cross shape. I have no idea who the lady is. Handheld panorama, stitch of 5 + photos.

    + ]]>
    + Mon, 14 May 2007 17:05:11 -0800 + 2007-05-14T15:00:27-08:00 + nobody@flickr.com (dman861) + tag:flickr.com,2004:/photo/498747983 + + 39.617598 -106.386773 + + 39.617598 + -106.386773 + + + Sawatch Range From Vail Pano + dman861 posted a photo:

    + +

    Sawatch Range From Vail Pano

    + +

    View near the Eagle's Nest at the top of Eagle Bahn Gondola. Mount of the Holy Cross mountain is visible in this picture but you can't make out the cross shape. I have no idea who the lady is. Handheld panorama, stitch of 5 + photos.

    + ]]>
    + + dman861 + + trees sky panorama mountain snow ski mountains sport pinetree person photo colorado peak wideangle panoramic powder resort panasonic trail vail snowboard gondola beavercreek range avon mountainrange mountoftheholycross sawatch dmctz3 tz3 + + +
    + + + Flash Powder + http://www.flickr.com/photos/eckan/488776800/ + Erik Eckerström posted a photo:

    + +

    Flash Powder

    + +

    Some late night powder in Åre

    + ]]>
    + Mon, 7 May 2007 13:17:48 -0800 + 2007-01-18T15:37:17-08:00 + nobody@flickr.com (Erik Eckerström) + tag:flickr.com,2004:/photo/488776800 + + 63.409238 13.079953 + + 63.409238 + 13.079953 + + + Flash Powder + Erik Eckerström posted a photo:

    + +

    Flash Powder

    + +

    Some late night powder in Åre

    + ]]>
    + + Erik Eckerström + snow forest canon eos board flash powder snowboard portfolio Åre 30d canon30d canoneos30d are + +
    + + + Hannes and Reini + http://www.flickr.com/photos/moschitz/483974969/ + martinom posted a photo:

    + +

    Hannes and Reini

    + + ]]>
    + Fri, 4 May 2007 08:56:02 -0800 + 2007-03-26T12:17:53-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483974969 + 47.252086 14.365139 + + + 47.252086 + 14.365139 + + + Hannes and Reini + martinom posted a photo:

    + +

    Hannes and Reini

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + Zehnerkar, Obertauern + + http://www.flickr.com/photos/moschitz/483975805/ + martinom posted a photo:

    + +

    Zehnerkar, Obertauern

    + + ]]>
    + Fri, 4 May 2007 08:56:46 -0800 + 2007-03-21T15:56:56-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483975805 + 47.249698 13.557643 + + + 47.249698 + 13.557643 + + + Zehnerkar, Obertauern + martinom posted a photo:

    + +

    Zehnerkar, Obertauern

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + Uhh, thats high + + http://www.flickr.com/photos/moschitz/483941044/ + martinom posted a photo:

    + +

    Uhh, thats high

    + + ]]>
    + Fri, 4 May 2007 08:55:25 -0800 + 2007-03-23T11:38:54-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483941044 + 47.258669 14.359989 + + + 47.258669 + 14.359989 + + + Uhh, thats high + martinom posted a photo:

    + +

    Uhh, thats high

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + Powder days + + http://www.flickr.com/photos/moschitz/483973863/ + martinom posted a photo:

    + +

    Powder days

    + + ]]>
    + Fri, 4 May 2007 08:55:02 -0800 + 2007-03-26T11:25:01-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483973863 + 47.258669 14.359989 + + + 47.258669 + 14.359989 + + + Powder days + martinom posted a photo:

    + +

    Powder days

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + Getting ready + + http://www.flickr.com/photos/moschitz/483940792/ + martinom posted a photo:

    + +

    Getting ready

    + + ]]>
    + Fri, 4 May 2007 08:55:14 -0800 + 2007-03-23T11:38:53-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483940792 + 47.258669 14.359989 + + + 47.258669 + 14.359989 + + + Getting ready + martinom posted a photo:

    + +

    Getting ready

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + Going up and getting ready for the descent + + http://www.flickr.com/photos/moschitz/483941528/ + martinom posted a photo:

    + +

    Going up and getting ready for the descent

    + + ]]>
    + Fri, 4 May 2007 08:55:50 -0800 + 2007-03-26T12:17:17-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483941528 + 47.258669 14.359989 + + + 47.258669 + 14.359989 + + + Going up and getting ready for the descent + martinom posted a photo:

    + +

    Going up and getting ready for the descent

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + I made it! + + http://www.flickr.com/photos/moschitz/483941314/ + martinom posted a photo:

    + +

    I made it!

    + + ]]>
    + Fri, 4 May 2007 08:55:39 -0800 + 2007-03-23T11:38:54-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483941314 + 47.258669 14.359989 + + + 47.258669 + 14.359989 + + + I made it! + martinom posted a photo:

    + +

    I made it!

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + Reini and me + + http://www.flickr.com/photos/moschitz/483942166/ + martinom posted a photo:

    + +

    Reini and me

    + + ]]>
    + Fri, 4 May 2007 08:56:24 -0800 + 2007-03-21T15:45:38-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483942166 + 47.249698 13.557643 + + + 47.249698 + 13.557643 + + + Reini and me + martinom posted a photo:

    + +

    Reini and me

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + Obertauern + + http://www.flickr.com/photos/moschitz/483976145/ + martinom posted a photo:

    + +

    Obertauern

    + + ]]>
    + Fri, 4 May 2007 08:57:04 -0800 + 2007-03-21T15:48:01-08:00 + nobody@flickr.com (martinom) + tag:flickr.com,2004:/photo/483976145 + 47.249698 13.557643 + + + 47.249698 + 13.557643 + + + Obertauern + martinom posted a photo:

    + +

    Obertauern

    + + ]]>
    + + martinom + powder snowboard autoupload obertauern lachtal + +
    + + Ross Fall Line 2 + + http://www.flickr.com/photos/pwadsworth/480290173/ + phwadsworth posted a photo:

    + +

    Ross Fall Line 2

    + + ]]>
    + Tue, 1 May 2007 12:02:23 -0800 + 2007-05-01T15:02:23-08:00 + nobody@flickr.com (phwadsworth) + tag:flickr.com,2004:/photo/480290173 + 44.196728 -72.926688 + + + 44.196728 + -72.926688 + + + Ross Fall Line 2 + phwadsworth posted a photo:

    + +

    Ross Fall Line 2

    + + ]]>
    + + phwadsworth + ski river geotagged powder glen snowboard mad vt mrg vemont + +
    + + Ross Fall Line 1 + + http://www.flickr.com/photos/pwadsworth/480290169/ + phwadsworth posted a photo:

    + +

    Ross Fall Line 1

    + + ]]>
    + Tue, 1 May 2007 12:02:23 -0800 + 2007-05-01T15:02:23-08:00 + nobody@flickr.com (phwadsworth) + tag:flickr.com,2004:/photo/480290169 + 44.196728 -72.926688 + + + 44.196728 + -72.926688 + + + Ross Fall Line 1 + phwadsworth posted a photo:

    + +

    Ross Fall Line 1

    + + ]]>
    + + phwadsworth + ski river geotagged powder glen snowboard mad vt mrg vemont + +
    + + IMGP0575 + + http://www.flickr.com/photos/beppoegeppa/471446918/ + beppovox posted a photo:

    + +

    IMGP0575

    + + ]]>
    + Tue, 24 Apr 2007 10:32:41 -0800 + 2003-12-29T11:07:29-08:00 + nobody@flickr.com (beppovox) + tag:flickr.com,2004:/photo/471446918 + 45.082308 6.761913 + + + 45.082308 + 6.761913 + + + IMGP0575 + beppovox posted a photo:

    + +

    IMGP0575

    + + ]]>
    + + beppovox + geotagged free powder snowboard freeride jafferau + +
    + + Slopes + + http://www.flickr.com/photos/blupic/469735045/ + blupic.com posted a photo:

    + +

    Slopes

    + +

    One day...

    + ]]>
    + Mon, 23 Apr 2007 02:48:17 -0800 + 2007-03-31T17:31:13-08:00 + nobody@flickr.com (blupic.com) + tag:flickr.com,2004:/photo/469735045 + + 50.111882 -122.939436 + + 50.111882 + -122.939436 + + + Slopes + blupic.com posted a photo:

    + +

    Slopes

    + +

    One day...

    + ]]>
    + + blupic.com + blue winter sky mountain snow canada ski nature vancouver whistler nikon skiing d70 peak columbia powder 1870mmf3545g snowboard british blackcomb mogul + +
    + +
    +
    \ No newline at end of file diff --git a/openlayers/examples/xml/track1.xml b/openlayers/examples/xml/track1.xml new file mode 100644 index 0000000000..69036a4cef --- /dev/null +++ b/openlayers/examples/xml/track1.xml @@ -0,0 +1,98 @@ + + + +Title for First trial track +Description for first track +Nelson +1995-12-12T05:00:00Z22.1862861120.30211944Phase ChangeStart Phase A +1995-12-12T05:05:00Z22.1862194420.28514722 +1995-12-12T05:10:00Z22.1860972220.266425 +1995-12-12T05:15:00Z22.1827972220.24935 +1995-12-12T05:16:00Z22.1815388920.24605556Course Change220 degs 4kts +1995-12-12T05:20:00Z22.176420.23299444 +1995-12-12T05:25:00Z22.1699611120.21654167 +1995-12-12T05:30:00Z22.1635194420.20017222 +1995-12-12T05:35:00Z22.1571055620.18375278 +1995-12-12T05:40:00Z22.1506277820.16738889 +1995-12-12T05:42:00Z22.1480333320.16077222CommentXO has bridge +1995-12-12T05:45:00Z22.1441638920.15091944 +1995-12-12T05:50:00Z22.1375777820.13483333 +1995-12-12T05:55:00Z22.1254166720.134125 +1995-12-12T06:00:00Z22.1125055620.13402778 +1995-12-12T06:05:00Z22.0996027820.13395 +1995-12-12T06:10:00Z22.0881222220.14054722Comment +1995-12-12T06:13:00Z22.0814138920.14618333Course Change220 degs 4kts +1995-12-12T06:15:00Z22.0769527820.14992778 +1995-12-12T06:20:00Z22.0658416720.15931111 +1995-12-12T06:25:00Z22.0546027820.16871944 +1995-12-12T06:30:00Z22.0431583320.16791667 +1995-12-12T06:35:00Z22.0311861120.16143056 +1995-12-12T06:40:00Z22.0191222220.15486389 +1995-12-12T06:45:00Z22.0070833320.14833056 +1995-12-12T06:50:00Z21.9950444420.14181111 +1995-12-12T06:55:00Z21.9842388920.14733611 +1995-12-12T07:00:00Z21.9736722220.15803333 +1995-12-12T07:05:00Z21.9630611120.16874444 +1995-12-12T07:10:00Z21.9540722220.17233611 +1995-12-12T07:15:00Z21.9588555620.15766944 +1995-12-12T07:20:00Z21.9663083320.16956944 +1995-12-12T07:25:00Z21.9745055620.18388056 +1995-12-12T07:30:00Z21.9827638920.19838333 +1995-12-12T07:32:00Z21.9860527820.20413056CommentSuspect opponent to North, slowing down +1995-12-12T07:33:00Z21.9869166720.20727778CommentVIP visitors due. Helo retrieved. +1995-12-12T07:34:00Z21.9856694420.20985556CommentWind picked up. Switching off sensor Delta +1995-12-12T07:35:00Z21.984220.21243611CommentHeavenly dusk +1995-12-12T07:40:00Z21.9760944420.226425 +1995-12-12T07:45:00Z21.9678611120.240725 +1995-12-12T07:50:00Z21.959520.25507778 +1995-12-12T07:55:00Z21.9511805620.26941389 +1995-12-12T08:00:00Z21.9486277820.28483056 +1995-12-12T08:05:00Z21.9529520.30239444 +1995-12-12T08:10:00Z21.95732520.32020278 +1995-12-12T08:15:00Z21.9617222220.33795278 +1995-12-12T08:20:00Z21.9661611120.35568611 +1995-12-12T08:25:00Z21.9635555620.371925 +1995-12-12T08:30:00Z21.9587777820.38858333 +1995-12-12T08:35:00Z21.9598888920.40708333 +1995-12-12T08:40:00Z21.9636194420.41884722 +1995-12-12T08:45:00Z21.9694555620.40425278Course Change220 degs 4kts +1995-12-12T08:50:00Z21.975920.38807778 +1995-12-12T08:55:00Z21.9823722220.37183889 +1995-12-12T09:00:00Z21.9888027820.35546667 +1995-12-12T09:05:00Z21.9996861120.34794722 +1995-12-12T09:10:00Z22.0117916720.34156389 +1995-12-12T09:15:00Z22.0216861120.34614444 +1995-12-12T09:20:00Z22.0281111120.36220833 +1995-12-12T09:25:00Z22.0345611120.37856389Phase ChangeEnd Phase A +1995-12-12T09:30:00Z22.0414520.36952222 +1995-12-12T09:35:00Z22.0478222220.35348611 +1995-12-12T09:40:00Z22.0542638920.33713056 +1995-12-12T09:45:00Z22.0606944420.32085 +1995-12-12T09:46:00Z22.0619861120.31761111Phase ChangeStart Phase B +1995-12-12T09:50:00Z22.0647194420.30389444 +1995-12-12T09:55:00Z22.0758666720.29758333 +1995-12-12T10:00:00Z22.0879388920.29113889 +1995-12-12T10:05:00Z22.1000333320.2848 +1995-12-12T10:10:00Z22.1121972220.27842222 +1995-12-12T10:15:00Z22.1153055620.26194167 +1995-12-12T10:20:00Z22.1175694420.24336667 +1995-12-12T10:25:00Z22.1198611120.22466944 +1995-12-12T10:30:00Z22.1223833320.20620833 +1995-12-12T10:35:00Z22.1289027820.216475 +1995-12-12T10:40:00Z22.1235194420.22643333 +1995-12-12T10:45:00Z22.1209972220.23426667 +1995-12-12T10:50:00Z22.1219416720.23018333 +1995-12-12T10:55:00Z22.1187277820.23548056 +1995-12-12T11:00:00Z22.1199416720.23541111 +1995-12-12T11:05:00Z22.1199277820.23948056 +1995-12-12T11:10:00Z22.1180222220.24473889 +1995-12-12T11:15:00Z22.1176444420.24835278 +1995-12-12T11:20:00Z22.1221555620.24788889 +1995-12-12T11:25:00Z22.1172527820.25047778 +1995-12-12T11:30:00Z22.1225972220.24290278 +1995-12-12T11:35:00Z22.1292194420.24653889 +1995-12-12T11:40:00Z22.1397083320.25221389 +1995-12-12T11:41:00Z22.1417388920.25330556Phase ChangeEnd Phase B + + + diff --git a/openlayers/examples/xml/wmsdescribelayer.xml b/openlayers/examples/xml/wmsdescribelayer.xml new file mode 100644 index 0000000000..d9bb8113c8 --- /dev/null +++ b/openlayers/examples/xml/wmsdescribelayer.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/openlayers/examples/xyz-esri.html b/openlayers/examples/xyz-esri.html new file mode 100644 index 0000000000..7bcef7f90c --- /dev/null +++ b/openlayers/examples/xyz-esri.html @@ -0,0 +1,41 @@ + + + + + + + OpenLayers Basic ESRI Map Cache Example + + + + + + +

    Basic ESRI Map Cache Example

    + +
    + XYZ, layer, tile +
    + +
    Show a Simple ESRI map using the layer from ESRI's server.
    + +
    + +
    +

    Show the use of the XYZ layer to access a map cache provided in + spherical mercator by ESRI.

    +
    + + diff --git a/openlayers/examples/xyz-offset.html b/openlayers/examples/xyz-offset.html new file mode 100644 index 0000000000..b751fa50fe --- /dev/null +++ b/openlayers/examples/xyz-offset.html @@ -0,0 +1,38 @@ + + + + + + + OpenLayers XYZ with Offset + + + + + + +

    XYZ Layer with Offset

    +
    + XYZ, layer, tile +
    +
    Using a limited set of levels from an XYZ layer with zoomOffset.
    + +
    + +
    +

    + The XYZ layer allows a zoomOffset to be set if you want to have + a maximum resolution for the map that differs from the maxiumum + resolution of the cached tiles. This example uses only 6 of the + levels in the cache, starting with the ninth level (index of 8) + in the cache. To do this, the layer is constructed with a + zoomOffset of 8. When the map zoom level is zero, the level + with index 8 will be requested from the cache. +

    +

    + See the + xyz-offset.js source to see how this is done. +

    +
    + + diff --git a/openlayers/examples/xyz-offset.js b/openlayers/examples/xyz-offset.js new file mode 100644 index 0000000000..6e7fa94745 --- /dev/null +++ b/openlayers/examples/xyz-offset.js @@ -0,0 +1,37 @@ +var map, layer; + +// if tiles are not available, hide images +//OpenLayers.Util.onImageLoadError = function() { +// this.style.display = "none"; +//} + +// called on body load +function init() { + + var extent = new OpenLayers.Bounds( + -13758743.4295939, 5591455.28887228, -13531302.3472101 , 5757360.4178881 + ); + + map = new OpenLayers.Map({ + div: "map", + maxExtent: new OpenLayers.Bounds( + -128 * 156543.0339, -128 * 156543.0339, + 128 * 156543.0339, 128 * 156543.0339 + ), + restrictedExtent: extent, + maxResolution: 611.496226171875, // corresponds to level 8 in the cache + numZoomLevels: 6, + projection: new OpenLayers.Projection("EPSG:900913"), + units: "m", + layers: [ + new OpenLayers.Layer.XYZ( + "ESRI", + "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_LandBase_WebMercator/MapServer/tile/${z}/${y}/${x}", + {zoomOffset: 8} // since our map maxResolution differs from cache max resolution + ) + ] + }); + + map.zoomToExtent(extent); + +} diff --git a/openlayers/examples/yahoo.html b/openlayers/examples/yahoo.html new file mode 100644 index 0000000000..6a584c7b41 --- /dev/null +++ b/openlayers/examples/yahoo.html @@ -0,0 +1,52 @@ + + + + + + + OpenLayers: Yahoo Layer + + + + + + + +

    Yahoo Base Layer Example

    + +
    + yahoo, layer +
    + +

    + Shows how you would add a yahoo layer and add the LayerSwitcher control +

    + +
    + +
    +

    This is an example of how to add a yahoo layer to the OpenLayers + window. In order to enable a yahoo layer, also shown in this + example is the LayerSwitcher() control for toggling between both + the yahoo layer and the OSGeo WMS. +

    + + + diff --git a/openlayers/examples/yelp-georss.xml b/openlayers/examples/yelp-georss.xml new file mode 100644 index 0000000000..3981069809 --- /dev/null +++ b/openlayers/examples/yelp-georss.xml @@ -0,0 +1,147 @@ + + + + Copyright 2007 Yelp, Inc. All rights reserved. + Yelp - Recent Reviews Near Ann Arbor, MI + + 2007-05-29T22:58:24-08:00 + + Recent Reviews Near Ann Arbor, MI + + + + Sam S.'s Review Of State Theatre - Ann Arbor (4/5) + + http://www.yelp.com/biz/r-dZCCNtld2ik0QRoTwuUQ?hrid=pve0e49KrVsvgX_wXpZHYA + 2007-05-29T22:58:24-08:00 + I gotta give this place props for hosting independent movies. Man, I really tire of that Hollywood bullshit; I actually feel retarded afterwards.<br /><br />My main gripe is that the seats are not ergonomic at&#8230; + -83.7406005859 + 42.2790985107 + + + Sean M.'s Review Of Maize N Blue Deli - Ann Arbor (5/5) + + http://www.yelp.com/biz/GqqBWV8ysYB48_jLPMl2bA?hrid=ZZIVErEJIo-FMsxOBVX1GQ + 2007-05-29T16:04:19-08:00 + Maize N Blue is synonymous with huge sandwiches (lunch+dinner sized) and good but not showy ingredients. It's a much better value than certain other Ann Arbor delis, and eschews the boutique feel that&#8230; + -83.7255020142 + 42.266998291 + + + Coco C.'s Review Of Tom Thompson Flowers - Ann Arbor (5/5) + + http://www.yelp.com/biz/B_lu4c0HgyHlxOjdKxTW7w?hrid=KNa-bOGA0xltz6bHEu3-AQ + 2007-05-29T10:49:06-08:00 + This place isn't much to look at - you go in and there are buckets upon buckets of loose flowers laying around, and there isn't much room to walk around. However, they make kick-ass arrangements! And&#8230; + -83.7490005493 + 42.2747993469 + + + Sam S.'s Review Of Mitch's Place - Ann Arbor (3/5) + + http://www.yelp.com/biz/zlJ37GVxuy-9wfvWqpPm1Q?hrid=qK6d7BOgLoK3gLf2u2OXAQ + 2007-05-28T21:28:33-08:00 + Another generic sports bar with the generic stripe-o crowd. Cheap pitchers, but constant covers.<br /><br />This is where I met Dave, a.k.a. Future Guy. He's skinny, has tall, straggly hair, and wears these&#8230; + -83.7329025269 + 42.275100708 + + + Jane S.'s Review Of Special Moments Photography - Plymouth (1/5) + + http://www.yelp.com/biz/IEsTnmfhN7vFfzt724qojw?hrid=ZvALNYOlSodoOciFsmeLZA + 2007-05-28T10:18:35-08:00 + I was very unsatisfied for several reasons. First, the photographer did not have the lighting for family portraits right at all! Two faces are almost completely obscured by shadows. Also, the backdrop&#8230; + -83.4609985352 + 42.3588981628 + + + Jacqueline D.'s Review Of Embassy Hotel - Ann Arbor (4/5) + + http://www.yelp.com/biz/Vz0hW6UhF6w4JuvgsqDmMQ?hrid=eMKcIyREDk-pFGdH0EC6jg + 2007-05-27T09:23:06-08:00 + The Embassy Hotel does what it does well: It is VERY cheap ($40-50/night) and located in the heart of downtown. It is relatively clean. What to expect: Your bed won't be made, your sheets won't be&#8230; + -83.7469024658 + 42.2812004089 + + + Tony C.'s Review Of Cafe Zola - Ann Arbor (5/5) + + http://www.yelp.com/biz/BlUEgCOGzDwpOWnkQn3odw?hrid=X3rR29JnKIqAjEzo9nC2VQ + 2007-05-26T07:48:01-08:00 + Zola...this is easily one of the best experiences to be had in Ann Arbor. I'll get the negatives for this place right out in the open. It's popular, really popular. It's expensive, but not break&#8230; + -83.7489013672 + 42.2806015015 + + + Tony C.'s Review Of Melange - Ann Arbor (4/5) + + http://www.yelp.com/biz/aPdz29vOWj4fBlLlCBM7UQ?hrid=ETs0aMnHTjSLy1VTsGxCBg + 2007-05-26T07:30:59-08:00 + Melange has an excellent menu. I've tried the scallops, the perch, and the seabass. All were excellent. The two dishes I'd steer clear of are the rock beef thing and the squid appetizers.<br /><br />The rock&#8230; + -83.7481918335 + 42.283493042 + + + Tony C.'s Review Of Bennett Optometry - Ann Arbor (4/5) + + http://www.yelp.com/biz/Oa5c1Zzr6RlkGjx-0KYr1A?hrid=vUiuwPLri6D5LTPrC76UlA + 2007-05-26T07:09:43-08:00 + I just got my eyes checked out here about two months ago and overall, I was satisfied with my experience. The optometrist I got was young, but very knowledgeable and didn't seem to be in a hurry to&#8230; + -83.6924972534 + 42.3031005859 + + + Nedra B.'s Review Of Star's Cafe - Ann Arbor (4/5) + + http://www.yelp.com/biz/aNeaXyQWZ0LGH3FoNnYzmA?hrid=XUd-5ehybDuujOTinekhWA + 2007-05-26T02:53:51-08:00 + As you walk in, you hear arabic music playing the background, and about 4 or 5 tables in front of the main window. You walk up to the menu, choose from many middle eastern foods, give your order, and&#8230; + -83.782539 + 42.281079 + + + Nedra B.'s Review Of Vinology - Ann Arbor (3/5) + + http://www.yelp.com/biz/qkw4xWWgTufvBs1NcxsFnw?hrid=lFMHzQ0GwJ93Ns0kCoPWPQ + 2007-05-26T02:45:15-08:00 + I knew to expect a pricey "high class" restaurant... but in my opinion they went over the top. I went with my sister and some friends, and she ordered the little "mini burgers" and I ordered the only&#8230; + -83.7487030029 + 42.2812004089 + + + Coco C.'s Review Of Eastern Accents - Ann Arbor (4/5) + + http://www.yelp.com/biz/AztY39QdGAkoKrLy9Di2yw?hrid=HL2_XnWdZP1FO95e1q-Xjw + 2007-05-25T15:43:30-08:00 + Oooh baby, this is my dream food come to life - sweet buns with tasty meat inside of them. I'm already a big fan of WowBao in Chicago, so to find this place in Ann Arbor makes me living here a&#8230; + -83.7472991943 + 42.2803001404 + + + Liam C.'s Review Of The Dartmoor - Plymouth (1/5) + + http://www.yelp.com/biz/Q32V2uxVKKv8_fp-hGxyZQ?hrid=7zFDEW0THJGYTUPPHLZucQ + 2007-05-24T14:36:00-08:00 + Okay, so here is how fawked up it is in Plymouth.<br /><br />This place was a hotel, back in the day. Dude converts it to offices and retail, and leases the bar and restaurant out to someone else.<br /><br />the tenant gets&#8230; + -83.4705963135 + 42.3686981201 + + + Liam C.'s Review Of Omelette & Waffle Cafe - Plymouth (2/5) + + http://www.yelp.com/biz/a09i0TiPG4_yhl-fnzPzDA?hrid=I4ENTNhbAK8pLP_qJmivTQ + 2007-05-24T14:32:05-08:00 + Who does this guy pay off? Every year, he wins the Chii cook off but when you order the chili here in the restaurant, it's Hormel right out of a can!<br /><br />tired and uninspired boring diner egg dishes,&#8230; + -83.4709014893 + 42.3681983948 + + + Liam C.'s Review Of Zack's of Plymouth - Plymouth (2/5) + + http://www.yelp.com/biz/F0iuCrXUd_fEJ-LZh8wMFw?hrid=2VLIUcC_oI8b_aLTMjYx8w + 2007-05-24T14:30:12-08:00 + If you like greasy diners with vaguely ethnic workers yelling in orgy-borgy talk back int he kitchen... you're gonna love this place.<br /><br />It's cleaner than it's competitors....gotta give them props on&#8230; + -83.4692993164 + 42.3581008911 + + diff --git a/openlayers/examples/zoomLevels.html b/openlayers/examples/zoomLevels.html new file mode 100644 index 0000000000..d4eb1b1e2c --- /dev/null +++ b/openlayers/examples/zoomLevels.html @@ -0,0 +1,81 @@ + + + + + + + + + + + + +

    Zoom Level

    + +
    + zoom, zoomlevel, resolution, scale, cleanup +
    + +

    + This example shows the use of the resolutions layer option on a number of layer types. +

    + +
    + +
    +

    + Set the extent of the viewable map using preset levels of scale available + to the user via the zoom slider bar. You can set the minimum, maximum + scales or resolutions, the number of levels in between and the minimum + and maximum geographic extents in your map's units. +

    +

    + Default units for Scale are in inches. Resolution is specified in map units + per pixel where the default map units are decimal degrees(dd).
    + scale = resolution * OpenLayers.INCHES_PER_UNIT[units] * + OpenLayers.DOTS_PER_INCH
    + You can either set the scale or the resolution, there is no need to set both. +

    +

    + You can do it with a ... +

    +
    + + + diff --git a/openlayers/examples/zoomify.html b/openlayers/examples/zoomify.html new file mode 100644 index 0000000000..3bec55bb9f --- /dev/null +++ b/openlayers/examples/zoomify.html @@ -0,0 +1,76 @@ + + + + + + + OpenLayers Zoomify Example + + + + + + +

    Zoomify Layer Example

    + +
    + zoomify, layer +
    + +

    + Demo of a layer with Zoomify tiles. +

    + +
    + +
    +

    + Demonstration of the Zoomify layer in OpenLayers.
    + You can have a look at Zoomify viewer for this picture, which is using the same tiles. +

    +

    + For change to our own image you have to specify 'url' (zoomifyImagePath in Zoomify terminology) and 'size' ('width' and 'height' from ImageProperty.xml file).
    + Custom tiles can be easily generated with original Zoomify software like with freely available ZoomifyerEZ or with Adobe PhotoShop CS3 (it has built in support for export into Zoomify tiles).
    + There is also a ZoomifyImage SourceForge Project, a tile cutter available under GPL license.
    + Zoomify tiles can be also served dynamically on the server side from JPEG2000 masters using J2KTileRender with available integration for DSpace and soon for Fedora Digital Repository.
    + IIPImage server can serve Zoomify tiles dynamically from TIFF files. +

    +

    + Development of the Zoomify support for OpenLayers was supported from the grant Old Maps Online. +

    +
    + + diff --git a/openlayers/img/blank.gif b/openlayers/img/blank.gif new file mode 100644 index 0000000000..4bcc753a12 Binary files /dev/null and b/openlayers/img/blank.gif differ diff --git a/openlayers/img/cloud-popup-relative.png b/openlayers/img/cloud-popup-relative.png new file mode 100755 index 0000000000..c9fd4c411c Binary files /dev/null and b/openlayers/img/cloud-popup-relative.png differ diff --git a/openlayers/img/drag-rectangle-off.png b/openlayers/img/drag-rectangle-off.png new file mode 100644 index 0000000000..382a81d9a1 Binary files /dev/null and b/openlayers/img/drag-rectangle-off.png differ diff --git a/openlayers/img/drag-rectangle-on.png b/openlayers/img/drag-rectangle-on.png new file mode 100644 index 0000000000..2ed2d5b088 Binary files /dev/null and b/openlayers/img/drag-rectangle-on.png differ diff --git a/openlayers/img/east-mini.png b/openlayers/img/east-mini.png new file mode 100644 index 0000000000..ecedc5ef9f Binary files /dev/null and b/openlayers/img/east-mini.png differ diff --git a/openlayers/img/layer-switcher-maximize.png b/openlayers/img/layer-switcher-maximize.png new file mode 100644 index 0000000000..f346086b38 Binary files /dev/null and b/openlayers/img/layer-switcher-maximize.png differ diff --git a/openlayers/img/layer-switcher-minimize.png b/openlayers/img/layer-switcher-minimize.png new file mode 100644 index 0000000000..b4aab0bf78 Binary files /dev/null and b/openlayers/img/layer-switcher-minimize.png differ diff --git a/openlayers/img/marker-blue.png b/openlayers/img/marker-blue.png new file mode 100644 index 0000000000..f5b4efcfe1 Binary files /dev/null and b/openlayers/img/marker-blue.png differ diff --git a/openlayers/img/marker-gold.png b/openlayers/img/marker-gold.png new file mode 100644 index 0000000000..0b62f9618a Binary files /dev/null and b/openlayers/img/marker-gold.png differ diff --git a/openlayers/img/marker-green.png b/openlayers/img/marker-green.png new file mode 100644 index 0000000000..c36b164b55 Binary files /dev/null and b/openlayers/img/marker-green.png differ diff --git a/openlayers/img/marker.png b/openlayers/img/marker.png new file mode 100644 index 0000000000..ea3e59a560 Binary files /dev/null and b/openlayers/img/marker.png differ diff --git a/openlayers/img/measuring-stick-off.png b/openlayers/img/measuring-stick-off.png new file mode 100644 index 0000000000..efbf63fb30 Binary files /dev/null and b/openlayers/img/measuring-stick-off.png differ diff --git a/openlayers/img/measuring-stick-on.png b/openlayers/img/measuring-stick-on.png new file mode 100644 index 0000000000..2d41c84e81 Binary files /dev/null and b/openlayers/img/measuring-stick-on.png differ diff --git a/openlayers/img/north-mini.png b/openlayers/img/north-mini.png new file mode 100644 index 0000000000..dfd7211ffc Binary files /dev/null and b/openlayers/img/north-mini.png differ diff --git a/openlayers/img/panning-hand-off.png b/openlayers/img/panning-hand-off.png new file mode 100644 index 0000000000..d1c593e1df Binary files /dev/null and b/openlayers/img/panning-hand-off.png differ diff --git a/openlayers/img/panning-hand-on.png b/openlayers/img/panning-hand-on.png new file mode 100644 index 0000000000..9b7e0646d7 Binary files /dev/null and b/openlayers/img/panning-hand-on.png differ diff --git a/openlayers/img/slider.png b/openlayers/img/slider.png new file mode 100644 index 0000000000..433536422e Binary files /dev/null and b/openlayers/img/slider.png differ diff --git a/openlayers/img/south-mini.png b/openlayers/img/south-mini.png new file mode 100644 index 0000000000..2970875c4c Binary files /dev/null and b/openlayers/img/south-mini.png differ diff --git a/openlayers/img/west-mini.png b/openlayers/img/west-mini.png new file mode 100644 index 0000000000..363cd3d7b2 Binary files /dev/null and b/openlayers/img/west-mini.png differ diff --git a/openlayers/img/zoom-minus-mini.png b/openlayers/img/zoom-minus-mini.png new file mode 100644 index 0000000000..8f0d77fff1 Binary files /dev/null and b/openlayers/img/zoom-minus-mini.png differ diff --git a/openlayers/img/zoom-plus-mini.png b/openlayers/img/zoom-plus-mini.png new file mode 100644 index 0000000000..a73ab4e951 Binary files /dev/null and b/openlayers/img/zoom-plus-mini.png differ diff --git a/openlayers/img/zoom-world-mini.png b/openlayers/img/zoom-world-mini.png new file mode 100644 index 0000000000..aebf22d95e Binary files /dev/null and b/openlayers/img/zoom-world-mini.png differ diff --git a/openlayers/img/zoombar.png b/openlayers/img/zoombar.png new file mode 100644 index 0000000000..47110ab3e5 Binary files /dev/null and b/openlayers/img/zoombar.png differ diff --git a/openlayers/lib/Firebug/errorIcon.png b/openlayers/lib/Firebug/errorIcon.png new file mode 100644 index 0000000000..2d75261bb6 Binary files /dev/null and b/openlayers/lib/Firebug/errorIcon.png differ diff --git a/openlayers/lib/Firebug/firebug.css b/openlayers/lib/Firebug/firebug.css new file mode 100644 index 0000000000..1f041c4da9 --- /dev/null +++ b/openlayers/lib/Firebug/firebug.css @@ -0,0 +1,209 @@ + +html, body { + margin: 0; + background: #FFFFFF; + font-family: Lucida Grande, Tahoma, sans-serif; + font-size: 11px; + overflow: hidden; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.toolbar { + height: 14px; + border-top: 1px solid ThreeDHighlight; + border-bottom: 1px solid ThreeDShadow; + padding: 2px 6px; + background: ThreeDFace; +} + +.toolbarRight { + position: absolute; + top: 4px; + right: 6px; +} + +#log { + overflow: auto; + position: absolute; + left: 0; + width: 100%; +} + +#commandLine { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 18px; + border: none; + border-top: 1px solid ThreeDShadow; +} + +/************************************************************************************************/ + +.logRow { + position: relative; + border-bottom: 1px solid #D7D7D7; + padding: 2px 4px 1px 6px; + background-color: #FFFFFF; +} + +.logRow-command { + font-family: Monaco, monospace; + color: blue; +} + +.objectBox-null { + padding: 0 2px; + border: 1px solid #666666; + background-color: #888888; + color: #FFFFFF; +} + +.objectBox-string { + font-family: Monaco, monospace; + color: red; + white-space: pre; +} + +.objectBox-number { + color: #000088; +} + +.objectBox-function { + font-family: Monaco, monospace; + color: DarkGreen; +} + +.objectBox-object { + color: DarkGreen; + font-weight: bold; +} + +/************************************************************************************************/ + +.logRow-info, +.logRow-error, +.logRow-warning { + background: #FFFFFF no-repeat 2px 2px; + padding-left: 20px; + padding-bottom: 3px; +} + +.logRow-info { + background-image: url(infoIcon.png); +} + +.logRow-warning { + background-color: cyan; + background-image: url(warningIcon.png); +} + +.logRow-error { + background-color: LightYellow; + background-image: url(errorIcon.png); +} + +.errorMessage { + vertical-align: top; + color: #FF0000; +} + +.objectBox-sourceLink { + position: absolute; + right: 4px; + top: 2px; + padding-left: 8px; + font-family: Lucida Grande, sans-serif; + font-weight: bold; + color: #0000FF; +} + +/************************************************************************************************/ + +.logRow-group { + background: #EEEEEE; + border-bottom: none; +} + +.logGroup { + background: #EEEEEE; +} + +.logGroupBox { + margin-left: 24px; + border-top: 1px solid #D7D7D7; + border-left: 1px solid #D7D7D7; +} + +/************************************************************************************************/ + +.selectorTag, +.selectorId, +.selectorClass { + font-family: Monaco, monospace; + font-weight: normal; +} + +.selectorTag { + color: #0000FF; +} + +.selectorId { + color: DarkBlue; +} + +.selectorClass { + color: red; +} + +/************************************************************************************************/ + +.objectBox-element { + font-family: Monaco, monospace; + color: #000088; +} + +.nodeChildren { + margin-left: 16px; +} + +.nodeTag { + color: blue; +} + +.nodeValue { + color: #FF0000; + font-weight: normal; +} + +.nodeText, +.nodeComment { + margin: 0 2px; + vertical-align: top; +} + +.nodeText { + color: #333333; +} + +.nodeComment { + color: DarkGreen; +} + +/************************************************************************************************/ + +.propertyNameCell { + vertical-align: top; +} + +.propertyName { + font-weight: bold; +} diff --git a/openlayers/lib/Firebug/firebug.html b/openlayers/lib/Firebug/firebug.html new file mode 100644 index 0000000000..861e639326 --- /dev/null +++ b/openlayers/lib/Firebug/firebug.html @@ -0,0 +1,23 @@ + + + + + + Firebug + + + + +
    + Clear + + Close + +
    +
    + + + + + diff --git a/openlayers/lib/Firebug/firebug.js b/openlayers/lib/Firebug/firebug.js new file mode 100644 index 0000000000..a6242c3bc5 --- /dev/null +++ b/openlayers/lib/Firebug/firebug.js @@ -0,0 +1,674 @@ + +if (!window.console || !console.firebug) { (function() +{ + window.console = + { + log: function() + { + logFormatted(arguments, ""); + }, + + debug: function() + { + logFormatted(arguments, "debug"); + }, + + info: function() + { + logFormatted(arguments, "info"); + }, + + warn: function() + { + logFormatted(arguments, "warning"); + }, + + error: function() + { + logFormatted(arguments, "error"); + }, + + assert: function(truth, message) + { + if (!truth) + { + var args = []; + for (var i = 1; i < arguments.length; ++i) + args.push(arguments[i]); + + logFormatted(args.length ? args : ["Assertion Failure"], "error"); + throw message ? message : "Assertion Failure"; + } + }, + + dir: function(object) + { + var html = []; + + var pairs = []; + for (var name in object) + { + try + { + pairs.push([name, object[name]]); + } + catch (exc) + { + } + } + + pairs.sort(function(a, b) { return a[0] < b[0] ? -1 : 1; }); + + html.push(''); + for (var i = 0; i < pairs.length; ++i) + { + var name = pairs[i][0], value = pairs[i][1]; + + html.push('', + '', ''); + } + html.push('
    ', + escapeHTML(name), ''); + appendObject(value, html); + html.push('
    '); + + logRow(html, "dir"); + }, + + dirxml: function(node) + { + var html = []; + + appendNode(node, html); + logRow(html, "dirxml"); + }, + + group: function() + { + logRow(arguments, "group", pushGroup); + }, + + groupEnd: function() + { + logRow(arguments, "", popGroup); + }, + + time: function(name) + { + timeMap[name] = (new Date()).getTime(); + }, + + timeEnd: function(name) + { + if (name in timeMap) + { + var delta = (new Date()).getTime() - timeMap[name]; + logFormatted([name+ ":", delta+"ms"]); + delete timeMap[name]; + } + }, + + count: function() + { + this.warn(["count() not supported."]); + }, + + trace: function() + { + this.warn(["trace() not supported."]); + }, + + profile: function() + { + this.warn(["profile() not supported."]); + }, + + profileEnd: function() + { + }, + + clear: function() + { + consoleBody.innerHTML = ""; + }, + + open: function() + { + toggleConsole(true); + }, + + close: function() + { + if (frameVisible) + toggleConsole(); + } + }; + + // ******************************************************************************************** + + var consoleFrame = null; + var consoleBody = null; + var commandLine = null; + + var frameVisible = false; + var messageQueue = []; + var groupStack = []; + var timeMap = {}; + + var clPrefix = ">>> "; + + var isFirefox = navigator.userAgent.indexOf("Firefox") != -1; + var isIE = navigator.userAgent.indexOf("MSIE") != -1; + var isOpera = navigator.userAgent.indexOf("Opera") != -1; + var isSafari = navigator.userAgent.indexOf("AppleWebKit") != -1; + + // ******************************************************************************************** + + function toggleConsole(forceOpen) + { + frameVisible = forceOpen || !frameVisible; + if (consoleFrame) + consoleFrame.style.visibility = frameVisible ? "visible" : "hidden"; + else + waitForBody(); + } + + function focusCommandLine() + { + toggleConsole(true); + if (commandLine) + commandLine.focus(); + } + + function waitForBody() + { + if (document.body) + createFrame(); + else + setTimeout(waitForBody, 200); + } + + function createFrame() + { + if (consoleFrame) + return; + + window.onFirebugReady = function(doc) + { + window.onFirebugReady = null; + + var toolbar = doc.getElementById("toolbar"); + toolbar.onmousedown = onSplitterMouseDown; + + commandLine = doc.getElementById("commandLine"); + addEvent(commandLine, "keydown", onCommandLineKeyDown); + + addEvent(doc, isIE || isSafari ? "keydown" : "keypress", onKeyDown); + + consoleBody = doc.getElementById("log"); + layout(); + flush(); + } + + var baseURL = getFirebugURL(); + + consoleFrame = document.createElement("iframe"); + consoleFrame.setAttribute("src", baseURL+"/firebug.html"); + consoleFrame.setAttribute("frameBorder", "0"); + consoleFrame.style.visibility = (frameVisible ? "visible" : "hidden"); + consoleFrame.style.zIndex = "2147483583"; + consoleFrame.style.position = document.all ? "absolute" : "fixed"; + consoleFrame.style.width = "100%"; + consoleFrame.style.left = "0"; + consoleFrame.style.bottom = "0"; + consoleFrame.style.height = "200px"; + document.body.appendChild(consoleFrame); + } + + function getFirebugURL() + { + var scripts = document.getElementsByTagName("script"); + for (var i = 0; i < scripts.length; ++i) + { + if (scripts[i].src.indexOf("firebug.js") != -1) + { + var lastSlash = scripts[i].src.lastIndexOf("/"); + return scripts[i].src.substr(0, lastSlash); + } + } + } + + function evalCommandLine() + { + var text = commandLine.value; + commandLine.value = ""; + + logRow([clPrefix, text], "command"); + + var value; + try + { + value = eval(text); + } + catch (exc) + { + } + + console.log(value); + } + + function layout() + { + var toolbar = consoleBody.ownerDocument.getElementById("toolbar"); + var height = consoleFrame.offsetHeight - (toolbar.offsetHeight + commandLine.offsetHeight); + height = Math.max(height, 0); + consoleBody.style.top = toolbar.offsetHeight + "px"; + consoleBody.style.height = height + "px"; + + commandLine.style.top = (consoleFrame.offsetHeight - commandLine.offsetHeight) + "px"; + } + + function logRow(message, className, handler) + { + if (consoleBody) + writeMessage(message, className, handler); + else + { + messageQueue.push([message, className, handler]); + waitForBody(); + } + } + + function flush() + { + var queue = messageQueue; + messageQueue = []; + + for (var i = 0; i < queue.length; ++i) + writeMessage(queue[i][0], queue[i][1], queue[i][2]); + } + + function writeMessage(message, className, handler) + { + var isScrolledToBottom = + consoleBody.scrollTop + consoleBody.offsetHeight >= consoleBody.scrollHeight; + + if (!handler) + handler = writeRow; + + handler(message, className); + + if (isScrolledToBottom) + consoleBody.scrollTop = consoleBody.scrollHeight - consoleBody.offsetHeight; + } + + function appendRow(row) + { + var container = groupStack.length ? groupStack[groupStack.length-1] : consoleBody; + container.appendChild(row); + } + + function writeRow(message, className) + { + var row = consoleBody.ownerDocument.createElement("div"); + row.className = "logRow" + (className ? " logRow-"+className : ""); + row.innerHTML = message.join(""); + appendRow(row); + } + + function pushGroup(message, className) + { + logFormatted(message, className); + + var groupRow = consoleBody.ownerDocument.createElement("div"); + groupRow.className = "logGroup"; + var groupRowBox = consoleBody.ownerDocument.createElement("div"); + groupRowBox.className = "logGroupBox"; + groupRow.appendChild(groupRowBox); + appendRow(groupRowBox); + groupStack.push(groupRowBox); + } + + function popGroup() + { + groupStack.pop(); + } + + // ******************************************************************************************** + + function logFormatted(objects, className) + { + var html = []; + + var format = objects[0]; + var objIndex = 0; + + if (typeof(format) != "string") + { + format = ""; + objIndex = -1; + } + + var parts = parseFormat(format); + for (var i = 0; i < parts.length; ++i) + { + var part = parts[i]; + if (part && typeof(part) == "object") + { + var object = objects[++objIndex]; + part.appender(object, html); + } + else + appendText(part, html); + } + + for (var i = objIndex+1; i < objects.length; ++i) + { + appendText(" ", html); + + var object = objects[i]; + if (typeof(object) == "string") + appendText(object, html); + else + appendObject(object, html); + } + + logRow(html, className); + } + + function parseFormat(format) + { + var parts = []; + + var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/; + var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat}; + + for (var m = reg.exec(format); m; m = reg.exec(format)) + { + var type = m[8] ? m[8] : m[5]; + var appender = type in appenderMap ? appenderMap[type] : appendObject; + var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0); + + parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1)); + parts.push({appender: appender, precision: precision}); + + format = format.substr(m.index+m[0].length); + } + + parts.push(format); + + return parts; + } + + function escapeHTML(value) + { + function replaceChars(ch) + { + switch (ch) + { + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + case "'": + return "'"; + case '"': + return """; + } + return "?"; + }; + return String(value).replace(/[<>&"']/g, replaceChars); + } + + function objectToString(object) + { + try + { + return object+""; + } + catch (exc) + { + return null; + } + } + + // ******************************************************************************************** + + function appendText(object, html) + { + html.push(escapeHTML(objectToString(object))); + } + + function appendNull(object, html) + { + html.push('', escapeHTML(objectToString(object)), ''); + } + + function appendString(object, html) + { + html.push('"', escapeHTML(objectToString(object)), + '"'); + } + + function appendInteger(object, html) + { + html.push('', escapeHTML(objectToString(object)), ''); + } + + function appendFloat(object, html) + { + html.push('', escapeHTML(objectToString(object)), ''); + } + + function appendFunction(object, html) + { + var reName = /function ?(.*?)\(/; + var m = reName.exec(objectToString(object)); + var name = m ? m[1] : "function"; + html.push('', escapeHTML(name), '()'); + } + + function appendObject(object, html) + { + try + { + if (object == undefined) + appendNull("undefined", html); + else if (object == null) + appendNull("null", html); + else if (typeof object == "string") + appendString(object, html); + else if (typeof object == "number") + appendInteger(object, html); + else if (typeof object == "function") + appendFunction(object, html); + else if (object.nodeType == 1) + appendSelector(object, html); + else if (typeof object == "object") + appendObjectFormatted(object, html); + else + appendText(object, html); + } + catch (exc) + { + } + } + + function appendObjectFormatted(object, html) + { + var text = objectToString(object); + var reObject = /\[object (.*?)\]/; + + var m = reObject.exec(text); + html.push('', m ? m[1] : text, '') + } + + function appendSelector(object, html) + { + html.push(''); + + html.push('', escapeHTML(object.nodeName.toLowerCase()), ''); + if (object.id) + html.push('#', escapeHTML(object.id), ''); + if (object.className) + html.push('.', escapeHTML(object.className), ''); + + html.push(''); + } + + function appendNode(node, html) + { + if (node.nodeType == 1) + { + html.push( + '
    ', + '<', node.nodeName.toLowerCase(), ''); + + for (var i = 0; i < node.attributes.length; ++i) + { + var attr = node.attributes[i]; + if (!attr.specified) + continue; + + html.push(' ', attr.nodeName.toLowerCase(), + '="', escapeHTML(attr.nodeValue), + '"') + } + + if (node.firstChild) + { + html.push('>
    '); + + for (var child = node.firstChild; child; child = child.nextSibling) + appendNode(child, html); + + html.push('
    </', + node.nodeName.toLowerCase(), '>
    '); + } + else + html.push('/>'); + } + else if (node.nodeType == 3) + { + html.push('
    ', escapeHTML(node.nodeValue), + '
    '); + } + } + + // ******************************************************************************************** + + function addEvent(object, name, handler) + { + if (document.all) + object.attachEvent("on"+name, handler); + else + object.addEventListener(name, handler, false); + } + + function removeEvent(object, name, handler) + { + if (document.all) + object.detachEvent("on"+name, handler); + else + object.removeEventListener(name, handler, false); + } + + function cancelEvent(event) + { + if (document.all) + event.cancelBubble = true; + else + event.stopPropagation(); + } + + function onError(msg, href, lineNo) + { + var html = []; + + var lastSlash = href.lastIndexOf("/"); + var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1); + + html.push( + '', msg, '', + '' + ); + + logRow(html, "error"); + }; + + function onKeyDown(event) + { + if (event.keyCode == 123) + toggleConsole(); + else if ((event.keyCode == 108 || event.keyCode == 76) && event.shiftKey + && (event.metaKey || event.ctrlKey)) + focusCommandLine(); + else + return; + + cancelEvent(event); + } + + function onSplitterMouseDown(event) + { + if (isSafari || isOpera) + return; + + addEvent(document, "mousemove", onSplitterMouseMove); + addEvent(document, "mouseup", onSplitterMouseUp); + + for (var i = 0; i < frames.length; ++i) + { + addEvent(frames[i].document, "mousemove", onSplitterMouseMove); + addEvent(frames[i].document, "mouseup", onSplitterMouseUp); + } + } + + function onSplitterMouseMove(event) + { + var win = document.all + ? event.srcElement.ownerDocument.parentWindow + : event.target.ownerDocument.defaultView; + + var clientY = event.clientY; + if (win != win.parent) + clientY += win.frameElement ? win.frameElement.offsetTop : 0; + + var height = consoleFrame.offsetTop + consoleFrame.clientHeight; + var toolbar = consoleBody.ownerDocument.getElementById("toolbar"); + var y = Math.max(height - clientY, + toolbar.offsetHeight + commandLine.offsetHeight); + + consoleFrame.style.height = y + "px"; + layout(); + } + + function onSplitterMouseUp(event) + { + removeEvent(document, "mousemove", onSplitterMouseMove); + removeEvent(document, "mouseup", onSplitterMouseUp); + + for (var i = 0; i < frames.length; ++i) + { + removeEvent(frames[i].document, "mousemove", onSplitterMouseMove); + removeEvent(frames[i].document, "mouseup", onSplitterMouseUp); + } + } + + function onCommandLineKeyDown(event) + { + if (event.keyCode == 13) + evalCommandLine(); + else if (event.keyCode == 27) + commandLine.value = ""; + } + + window.onerror = onError; + addEvent(document, isIE || isSafari ? "keydown" : "keypress", onKeyDown); + + if (document.documentElement.getAttribute("debug") == "true") + toggleConsole(true); +})(); +} diff --git a/openlayers/lib/Firebug/firebugx.js b/openlayers/lib/Firebug/firebugx.js new file mode 100644 index 0000000000..f0a34df81b --- /dev/null +++ b/openlayers/lib/Firebug/firebugx.js @@ -0,0 +1,10 @@ +(function() { + if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", + "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; + + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {} + } +})(); diff --git a/openlayers/lib/Firebug/infoIcon.png b/openlayers/lib/Firebug/infoIcon.png new file mode 100644 index 0000000000..da1e5334c1 Binary files /dev/null and b/openlayers/lib/Firebug/infoIcon.png differ diff --git a/openlayers/lib/Firebug/license.txt b/openlayers/lib/Firebug/license.txt new file mode 100644 index 0000000000..ba43b7514b --- /dev/null +++ b/openlayers/lib/Firebug/license.txt @@ -0,0 +1,30 @@ +Software License Agreement (BSD License) + +Copyright (c) 2007, Parakey Inc. +All rights reserved. + +Redistribution and use of this software in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of Parakey Inc. nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission of Parakey Inc. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/openlayers/lib/Firebug/readme.txt b/openlayers/lib/Firebug/readme.txt new file mode 100644 index 0000000000..1edebf5654 --- /dev/null +++ b/openlayers/lib/Firebug/readme.txt @@ -0,0 +1,13 @@ +This directory contains the source for Firebug Lite +(http://www.getfirebug.com/lite.html). This code is distributed with a +BSD License, Copyright (c) 2007, Parakey Inc. See the included license.txt +for the full text of the license. + +This is a patched version of the trunk from +http://fbug.googlecode.com/svn/trunk. + +Revision 36 was patched to resolve the issue described here +http://code.google.com/p/fbug/issues/detail?id=85 + +When this issue is resolved, Firebug Lite can be used directly - no further +modifications are needed for OpenLayers. \ No newline at end of file diff --git a/openlayers/lib/Firebug/warningIcon.png b/openlayers/lib/Firebug/warningIcon.png new file mode 100644 index 0000000000..de51084e84 Binary files /dev/null and b/openlayers/lib/Firebug/warningIcon.png differ diff --git a/openlayers/lib/Gears/gears_init.js b/openlayers/lib/Gears/gears_init.js new file mode 100644 index 0000000000..d531a3f5bb --- /dev/null +++ b/openlayers/lib/Gears/gears_init.js @@ -0,0 +1,88 @@ +/* + * Copyright 2007, Google Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of Google Inc. nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Sets up google.gears.*, which is *the only* supported way to access Gears. + * + * Circumvent this file at your own risk! + * + * In the future, Gears may automatically define google.gears.* without this + * file. Gears may use these objects to transparently fix bugs and compatibility + * issues. Applications that use the code below will continue to work seamlessly + * when that happens. + */ + +(function() { + // We are already defined. Hooray! + if (window.google && google.gears) { + return; + } + + var factory = null; + + // Firefox + if (typeof GearsFactory != 'undefined') { + factory = new GearsFactory(); + } else { + // IE + try { + factory = new ActiveXObject('Gears.Factory'); + // privateSetGlobalObject is only required and supported on WinCE. + if (factory.getBuildInfo().indexOf('ie_mobile') != -1) { + factory.privateSetGlobalObject(this); + } + } catch (e) { + // Safari + if ((typeof navigator.mimeTypes != 'undefined') + && navigator.mimeTypes["application/x-googlegears"]) { + factory = document.createElement("object"); + factory.style.display = "none"; + factory.width = 0; + factory.height = 0; + factory.type = "application/x-googlegears"; + document.documentElement.appendChild(factory); + } + } + } + + // *Do not* define any objects if Gears is not installed. This mimics the + // behavior of Gears defining the objects in the future. + if (!factory) { + return; + } + + // Now set up the objects, being careful not to overwrite anything. + // + // Note: In Internet Explorer for Windows Mobile, you can't add properties to + // the window object. However, global objects are automatically added as + // properties of the window object in all browsers. + if (!window.google) { + google = {}; + } + + if (!google.gears) { + google.gears = {factory: factory}; + } +})(); diff --git a/openlayers/lib/OpenLayers.js b/openlayers/lib/OpenLayers.js new file mode 100644 index 0000000000..0d7bb3aca7 --- /dev/null +++ b/openlayers/lib/OpenLayers.js @@ -0,0 +1,386 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/* + * @requires OpenLayers/BaseTypes.js + * @requires OpenLayers/Lang/en.js + * @requires OpenLayers/Console.js + */ + +/* + * TODO: In 3.0, we will stop supporting build profiles that include + * OpenLayers.js. This means we will not need the singleFile and scriptFile + * variables, because we don't have to handle the singleFile case any more. + */ + +(function() { + /** + * Before creating the OpenLayers namespace, check to see if + * OpenLayers.singleFile is true. This occurs if the + * OpenLayers/SingleFile.js script is included before this one - as is the + * case with old single file build profiles that included both + * OpenLayers.js and OpenLayers/SingleFile.js. + */ + var singleFile = (typeof OpenLayers == "object" && OpenLayers.singleFile); + + /** + * Relative path of this script. + */ + var scriptName = (!singleFile) ? "lib/OpenLayers.js" : "OpenLayers.js"; + + /* + * If window.OpenLayers isn't set when this script (OpenLayers.js) is + * evaluated (and if singleFile is false) then this script will load + * *all* OpenLayers scripts. If window.OpenLayers is set to an array + * then this script will attempt to load scripts for each string of + * the array, using the string as the src of the script. + * + * Example: + * (code) + * + * + * (end) + * In this example OpenLayers.js will load Util.js and BaseTypes.js only. + */ + var jsFiles = window.OpenLayers; + + /** + * Namespace: OpenLayers + * The OpenLayers object provides a namespace for all things OpenLayers + */ + window.OpenLayers = { + /** + * Method: _getScriptLocation + * Return the path to this script. This is also implemented in + * OpenLayers/SingleFile.js + * + * Returns: + * {String} Path to this script + */ + _getScriptLocation: (function() { + var r = new RegExp("(^|(.*?\\/))(" + scriptName + ")(\\?|$)"), + s = document.getElementsByTagName('script'), + src, m, l = ""; + for(var i=0, len=s.length; i"; + } + if (scriptTags.length > 0) { + document.write(scriptTags.join("")); + } + } +})(); + +/** + * Constant: VERSION_NUMBER + */ +OpenLayers.VERSION_NUMBER="$Revision$"; diff --git a/openlayers/lib/OpenLayers/Ajax.js b/openlayers/lib/OpenLayers/Ajax.js new file mode 100644 index 0000000000..92235025ae --- /dev/null +++ b/openlayers/lib/OpenLayers/Ajax.js @@ -0,0 +1,679 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Request/XMLHttpRequest.js + * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js + */ + +OpenLayers.ProxyHost = ""; +//OpenLayers.ProxyHost = "examples/proxy.cgi?url="; + +/** + * Ajax reader for OpenLayers + * + * @uri url to do remote XML http get + * @param {String} 'get' format params (x=y&a=b...) + * @who object to handle callbacks for this request + * @complete the function to be called on success + * @failure the function to be called on failure + * + * example usage from a caller: + * + * caps: function(request) { + * -blah- + * }, + * + * OpenLayers.loadURL(url,params,this,caps); + * + * Notice the above example does not provide an error handler; a default empty + * handler is provided which merely logs the error if a failure handler is not + * supplied + * + */ + + +/** + * Function: OpenLayers.nullHandler + * @param {} request + */ +OpenLayers.nullHandler = function(request) { + OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest", {'statusText':request.statusText})); +}; + +/** + * APIFunction: OpenLayers.loadURL + * Background load a document. + * *Deprecated*. Use method instead. + * + * Parameters: + * uri - {String} URI of source doc + * params - {String} or {Object} GET params. Either a string in the form + * "?hello=world&foo=bar" (do not forget the leading question mark) + * or an object in the form {'hello': 'world', 'foo': 'bar} + * caller - {Object} object which gets callbacks + * onComplete - {Function} Optional callback for success. The callback + * will be called with this set to caller and will receive the request + * object as an argument. Note that if you do not specify an onComplete + * function, will be called (which pops up a + * user friendly error message dialog). + * onFailure - {Function} Optional callback for failure. In the event of + * a failure, the callback will be called with this set to caller and will + * receive the request object as an argument. Note that if you do not + * specify an onComplete function, will be called + * (which pops up a user friendly error message dialog). + * + * Returns: + * {} The request object. To abort loading, + * call request.abort(). + */ +OpenLayers.loadURL = function(uri, params, caller, + onComplete, onFailure) { + + if(typeof params == 'string') { + params = OpenLayers.Util.getParameters(params); + } + var success = (onComplete) ? onComplete : OpenLayers.nullHandler; + var failure = (onFailure) ? onFailure : OpenLayers.nullHandler; + + return OpenLayers.Request.GET({ + url: uri, params: params, + success: success, failure: failure, scope: caller + }); +}; + +/** + * Function: OpenLayers.parseXMLString + * Parse XML into a doc structure + * + * Parameters: + * text - {String} + * + * Returns: + * {?} Parsed AJAX Responsev + */ +OpenLayers.parseXMLString = function(text) { + + //MS sucks, if the server is bad it dies + var index = text.indexOf('<'); + if (index > 0) { + text = text.substring(index); + } + + var ajaxResponse = OpenLayers.Util.Try( + function() { + var xmldom = new ActiveXObject('Microsoft.XMLDOM'); + xmldom.loadXML(text); + return xmldom; + }, + function() { + return new DOMParser().parseFromString(text, 'text/xml'); + }, + function() { + var req = new XMLHttpRequest(); + req.open("GET", "data:" + "text/xml" + + ";charset=utf-8," + encodeURIComponent(text), false); + if (req.overrideMimeType) { + req.overrideMimeType("text/xml"); + } + req.send(null); + return req.responseXML; + } + ); + + return ajaxResponse; +}; + + +/** + * Namespace: OpenLayers.Ajax + */ +OpenLayers.Ajax = { + + /** + * Method: emptyFunction + */ + emptyFunction: function () {}, + + /** + * Method: getTransport + * + * Returns: + * {Object} Transport mechanism for whichever browser we're in, or false if + * none available. + */ + getTransport: function() { + return OpenLayers.Util.Try( + function() {return new XMLHttpRequest();}, + function() {return new ActiveXObject('Msxml2.XMLHTTP');}, + function() {return new ActiveXObject('Microsoft.XMLHTTP');} + ) || false; + }, + + /** + * Property: activeRequestCount + * {Integer} + */ + activeRequestCount: 0 +}; + +/** + * Namespace: OpenLayers.Ajax.Responders + * {Object} + */ +OpenLayers.Ajax.Responders = { + + /** + * Property: responders + * {Array} + */ + responders: [], + + /** + * Method: register + * + * Parameters: + * responderToAdd - {?} + */ + register: function(responderToAdd) { + for (var i = 0; i < this.responders.length; i++){ + if (responderToAdd == this.responders[i]){ + return; + } + } + this.responders.push(responderToAdd); + }, + + /** + * Method: unregister + * + * Parameters: + * responderToRemove - {?} + */ + unregister: function(responderToRemove) { + OpenLayers.Util.removeItem(this.reponders, responderToRemove); + }, + + /** + * Method: dispatch + * + * Parameters: + * callback - {?} + * request - {?} + * transport - {?} + */ + dispatch: function(callback, request, transport) { + var responder; + for (var i = 0; i < this.responders.length; i++) { + responder = this.responders[i]; + + if (responder[callback] && + typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, + [request, transport]); + } catch (e) {} + } + } + } +}; + +OpenLayers.Ajax.Responders.register({ + /** + * Function: onCreate + */ + onCreate: function() { + OpenLayers.Ajax.activeRequestCount++; + }, + + /** + * Function: onComplete + */ + onComplete: function() { + OpenLayers.Ajax.activeRequestCount--; + } +}); + +/** + * Class: OpenLayers.Ajax.Base + */ +OpenLayers.Ajax.Base = OpenLayers.Class({ + + /** + * Constructor: OpenLayers.Ajax.Base + * + * Parameters: + * options - {Object} + */ + initialize: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/xml', + parameters: '' + }; + OpenLayers.Util.extend(this.options, options || {}); + + this.options.method = this.options.method.toLowerCase(); + + if (typeof this.options.parameters == 'string') { + this.options.parameters = + OpenLayers.Util.getParameters(this.options.parameters); + } + } +}); + +/** + * Class: OpenLayers.Ajax.Request + * *Deprecated*. Use method instead. + * + * Inherit: + * - + */ +OpenLayers.Ajax.Request = OpenLayers.Class(OpenLayers.Ajax.Base, { + + /** + * Property: _complete + * + * {Boolean} + */ + _complete: false, + + /** + * Constructor: OpenLayers.Ajax.Request + * + * Parameters: + * url - {String} + * options - {Object} + */ + initialize: function(url, options) { + OpenLayers.Ajax.Base.prototype.initialize.apply(this, [options]); + + if (OpenLayers.ProxyHost && OpenLayers.String.startsWith(url, "http")) { + url = OpenLayers.ProxyHost + encodeURIComponent(url); + } + + this.transport = OpenLayers.Ajax.getTransport(); + this.request(url); + }, + + /** + * Method: request + * + * Parameters: + * url - {String} + */ + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = OpenLayers.Util.extend({}, this.options.parameters); + + if (this.method != 'get' && this.method != 'post') { + // simulate other verbs over post + params['_method'] = this.method; + this.method = 'post'; + } + + this.parameters = params; + + if (params = OpenLayers.Util.getParameterString(params)) { + // when GET, append parameters to URL + if (this.method == 'get') { + this.url += ((this.url.indexOf('?') > -1) ? '&' : '?') + params; + } else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + params += '&_='; + } + } + try { + var response = new OpenLayers.Ajax.Response(this); + if (this.options.onCreate) { + this.options.onCreate(response); + } + + OpenLayers.Ajax.Responders.dispatch('onCreate', + this, + response); + + this.transport.open(this.method.toUpperCase(), + this.url, + this.options.asynchronous); + + if (this.options.asynchronous) { + window.setTimeout( + OpenLayers.Function.bind(this.respondToReadyState, this, 1), + 10); + } + + this.transport.onreadystatechange = + OpenLayers.Function.bind(this.onStateChange, this); + this.setRequestHeaders(); + + this.body = this.method == 'post' ? + (this.options.postBody || params) : null; + this.transport.send(this.body); + + // Force Firefox to handle ready state 4 for synchronous requests + if (!this.options.asynchronous && + this.transport.overrideMimeType) { + this.onStateChange(); + } + } catch (e) { + this.dispatchException(e); + } + }, + + /** + * Method: onStateChange + */ + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) { + this.respondToReadyState(this.transport.readyState); + } + }, + + /** + * Method: setRequestHeaders + */ + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*', + 'OpenLayers': true + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) { + headers['Connection'] = 'close'; + } + } + // user-defined headers + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (typeof extras.push == 'function') { + for (var i = 0, length = extras.length; i < length; i += 2) { + headers[extras[i]] = extras[i+1]; + } + } else { + for (var i in extras) { + headers[i] = extras[i]; + } + } + } + + for (var name in headers) { + this.transport.setRequestHeader(name, headers[name]); + } + }, + + /** + * Method: success + * + * Returns: + * {Boolean} - + */ + success: function() { + var status = this.getStatus(); + return !status || (status >=200 && status < 300); + }, + + /** + * Method: getStatus + * + * Returns: + * {Integer} - Status + */ + getStatus: function() { + try { + return this.transport.status || 0; + } catch (e) { + return 0; + } + }, + + /** + * Method: respondToReadyState + * + * Parameters: + * readyState - {?} + */ + respondToReadyState: function(readyState) { + var state = OpenLayers.Ajax.Request.Events[readyState]; + var response = new OpenLayers.Ajax.Response(this); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + response.status] || + this.options['on' + (this.success() ? 'Success' : 'Failure')] || + OpenLayers.Ajax.emptyFunction)(response); + } catch (e) { + this.dispatchException(e); + } + + var contentType = response.getHeader('Content-type'); + } + + try { + (this.options['on' + state] || + OpenLayers.Ajax.emptyFunction)(response); + OpenLayers.Ajax.Responders.dispatch('on' + state, + this, + response); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + // avoid memory leak in MSIE: clean up + this.transport.onreadystatechange = OpenLayers.Ajax.emptyFunction; + } + }, + + /** + * Method: getHeader + * + * Parameters: + * name - {String} Header name + * + * Returns: + * {?} - response header for the given name + */ + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) { + return null; + } + }, + + /** + * Method: dispatchException + * If the optional onException function is set, execute it + * and then dispatch the call to any other listener registered + * for onException. + * + * If no optional onException function is set, we suspect that + * the user may have also not used + * OpenLayers.Ajax.Responders.register to register a listener + * for the onException call. To make sure that something + * gets done with this exception, only dispatch the call if there + * are listeners. + * + * If you explicitly want to swallow exceptions, set + * request.options.onException to an empty function (function(){}) + * or register an empty function with + * for onException. + * + * Parameters: + * exception - {?} + */ + dispatchException: function(exception) { + var handler = this.options.onException; + if(handler) { + // call options.onException and alert any other listeners + handler(this, exception); + OpenLayers.Ajax.Responders.dispatch('onException', this, exception); + } else { + // check if there are any other listeners + var listener = false; + var responders = OpenLayers.Ajax.Responders.responders; + for (var i = 0; i < responders.length; i++) { + if(responders[i].onException) { + listener = true; + break; + } + } + if(listener) { + // call all listeners + OpenLayers.Ajax.Responders.dispatch('onException', this, exception); + } else { + // let the exception through + throw exception; + } + } + } +}); + +/** + * Property: Events + * {Array(String)} + */ +OpenLayers.Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +/** + * Class: OpenLayers.Ajax.Response + */ +OpenLayers.Ajax.Response = OpenLayers.Class({ + + /** + * Property: status + * + * {Integer} + */ + status: 0, + + + /** + * Property: statusText + * + * {String} + */ + statusText: '', + + /** + * Constructor: OpenLayers.Ajax.Response + * + * Parameters: + * request - {Object} + */ + initialize: function(request) { + this.request = request; + var transport = this.transport = request.transport, + readyState = this.readyState = transport.readyState; + + if ((readyState > 2 && + !(!!(window.attachEvent && !window.opera))) || + readyState == 4) { + this.status = this.getStatus(); + this.statusText = this.getStatusText(); + this.responseText = transport.responseText == null ? + '' : String(transport.responseText); + } + + if(readyState == 4) { + var xml = transport.responseXML; + this.responseXML = xml === undefined ? null : xml; + } + }, + + /** + * Method: getStatus + */ + getStatus: OpenLayers.Ajax.Request.prototype.getStatus, + + /** + * Method: getStatustext + * + * Returns: + * {String} - statusText + */ + getStatusText: function() { + try { + return this.transport.statusText || ''; + } catch (e) { + return ''; + } + }, + + /** + * Method: getHeader + */ + getHeader: OpenLayers.Ajax.Request.prototype.getHeader, + + /** + * Method: getResponseHeader + * + * Returns: + * {?} - response header for given name + */ + getResponseHeader: function(name) { + return this.transport.getResponseHeader(name); + } +}); + + +/** + * Function: getElementsByTagNameNS + * + * Parameters: + * parentnode - {?} + * nsuri - {?} + * nsprefix - {?} + * tagname - {?} + * + * Returns: + * {?} + */ +OpenLayers.Ajax.getElementsByTagNameNS = function(parentnode, nsuri, + nsprefix, tagname) { + var elem = null; + if (parentnode.getElementsByTagNameNS) { + elem = parentnode.getElementsByTagNameNS(nsuri, tagname); + } else { + elem = parentnode.getElementsByTagName(nsprefix + ':' + tagname); + } + return elem; +}; + + +/** + * Function: serializeXMLToString + * Wrapper function around XMLSerializer, which doesn't exist/work in + * IE/Safari. We need to come up with a way to serialize in those browser: + * for now, these browsers will just fail. #535, #536 + * + * Parameters: + * xmldom {XMLNode} xml dom to serialize + * + * Returns: + * {?} + */ +OpenLayers.Ajax.serializeXMLToString = function(xmldom) { + var serializer = new XMLSerializer(); + var data = serializer.serializeToString(xmldom); + return data; +}; diff --git a/openlayers/lib/OpenLayers/BaseTypes.js b/openlayers/lib/OpenLayers/BaseTypes.js new file mode 100644 index 0000000000..f1fdd2e630 --- /dev/null +++ b/openlayers/lib/OpenLayers/BaseTypes.js @@ -0,0 +1,566 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Lang.js + * @requires OpenLayers/Console.js + */ + +/** + * Header: OpenLayers Base Types + * OpenLayers custom string, number and function functions are described here. + */ + +/** + * Namespace: OpenLayers.String + * Contains convenience functions for string manipulation. + */ +OpenLayers.String = { + + /** + * APIFunction: startsWith + * Test whether a string starts with another string. + * + * Parameters: + * str - {String} The string to test. + * sub - {String} The substring to look for. + * + * Returns: + * {Boolean} The first string starts with the second. + */ + startsWith: function(str, sub) { + return (str.indexOf(sub) == 0); + }, + + /** + * APIFunction: contains + * Test whether a string contains another string. + * + * Parameters: + * str - {String} The string to test. + * sub - {String} The substring to look for. + * + * Returns: + * {Boolean} The first string contains the second. + */ + contains: function(str, sub) { + return (str.indexOf(sub) != -1); + }, + + /** + * APIFunction: trim + * Removes leading and trailing whitespace characters from a string. + * + * Parameters: + * str - {String} The (potentially) space padded string. This string is not + * modified. + * + * Returns: + * {String} A trimmed version of the string with all leading and + * trailing spaces removed. + */ + trim: function(str) { + return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + }, + + /** + * APIFunction: camelize + * Camel-case a hyphenated string. + * Ex. "chicken-head" becomes "chickenHead", and + * "-chicken-head" becomes "ChickenHead". + * + * Parameters: + * str - {String} The string to be camelized. The original is not modified. + * + * Returns: + * {String} The string, camelized + */ + camelize: function(str) { + var oStringList = str.split('-'); + var camelizedString = oStringList[0]; + for (var i=1, len=oStringList.length; i replacement = context[a]; + // 1 -> replacement = context[a][b]; + // 2 -> replacement = context[a][b][c]; + var subs = match.split(/\.+/); + for (var i=0; i< subs.length; i++) { + if (i == 0) { + replacement = context; + } + + replacement = replacement[subs[i]]; + } + + if(typeof replacement == "function") { + replacement = args ? + replacement.apply(null, args) : + replacement(); + } + + // If replacement is undefined, return the string 'undefined'. + // This is a workaround for a bugs in browsers not properly + // dealing with non-participating groups in regular expressions: + // http://blog.stevenlevithan.com/archives/npcg-javascript + if (typeof replacement == 'undefined') { + return 'undefined'; + } else { + return replacement; + } + }; + + return template.replace(OpenLayers.String.tokenRegEx, replacer); + }, + + /** + * Property: tokenRegEx + * Used to find tokens in a string. + * Examples: ${a}, ${a.b.c}, ${a-b}, ${5} + */ + tokenRegEx: /\$\{([\w.]+?)\}/g, + + /** + * Property: numberRegEx + * Used to test strings as numbers. + */ + numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/, + + /** + * APIFunction: isNumeric + * Determine whether a string contains only a numeric value. + * + * Examples: + * (code) + * OpenLayers.String.isNumeric("6.02e23") // true + * OpenLayers.String.isNumeric("12 dozen") // false + * OpenLayers.String.isNumeric("4") // true + * OpenLayers.String.isNumeric(" 4 ") // false + * (end) + * + * Returns: + * {Boolean} String contains only a number. + */ + isNumeric: function(value) { + return OpenLayers.String.numberRegEx.test(value); + }, + + /** + * APIFunction: numericIf + * Converts a string that appears to be a numeric value into a number. + * + * Returns + * {Number|String} a Number if the passed value is a number, a String + * otherwise. + */ + numericIf: function(value) { + return OpenLayers.String.isNumeric(value) ? parseFloat(value) : value; + } + +}; + +if (!String.prototype.startsWith) { + /** + * APIMethod: String.startsWith + * *Deprecated*. Whether or not a string starts with another string. + * + * Parameters: + * sStart - {String} The string we're testing for. + * + * Returns: + * {Boolean} Whether or not this string starts with the string passed in. + */ + String.prototype.startsWith = function(sStart) { + OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", + {'newMethod':'OpenLayers.String.startsWith'})); + return OpenLayers.String.startsWith(this, sStart); + }; +} + +if (!String.prototype.contains) { + /** + * APIMethod: String.contains + * *Deprecated*. Whether or not a string contains another string. + * + * Parameters: + * str - {String} The string that we're testing for. + * + * Returns: + * {Boolean} Whether or not this string contains with the string passed in. + */ + String.prototype.contains = function(str) { + OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", + {'newMethod':'OpenLayers.String.contains'})); + return OpenLayers.String.contains(this, str); + }; +} + +if (!String.prototype.trim) { + /** + * APIMethod: String.trim + * *Deprecated*. Removes leading and trailing whitespace characters from a string. + * + * Returns: + * {String} A trimmed version of the string - all leading and + * trailing spaces removed + */ + String.prototype.trim = function() { + OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", + {'newMethod':'OpenLayers.String.trim'})); + return OpenLayers.String.trim(this); + }; +} + +if (!String.prototype.camelize) { + /** + * APIMethod: String.camelize + * *Deprecated*. Camel-case a hyphenated string. + * Ex. "chicken-head" becomes "chickenHead", and + * "-chicken-head" becomes "ChickenHead". + * + * Returns: + * {String} The string, camelized + */ + String.prototype.camelize = function() { + OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", + {'newMethod':'OpenLayers.String.camelize'})); + return OpenLayers.String.camelize(this); + }; +} + +/** + * Namespace: OpenLayers.Number + * Contains convenience functions for manipulating numbers. + */ +OpenLayers.Number = { + + /** + * Property: decimalSeparator + * Decimal separator to use when formatting numbers. + */ + decimalSeparator: ".", + + /** + * Property: thousandsSeparator + * Thousands separator to use when formatting numbers. + */ + thousandsSeparator: ",", + + /** + * APIFunction: limitSigDigs + * Limit the number of significant digits on a float. + * + * Parameters: + * num - {Float} + * sig - {Integer} + * + * Returns: + * {Float} The number, rounded to the specified number of significant + * digits. + */ + limitSigDigs: function(num, sig) { + var fig = 0; + if (sig > 0) { + fig = parseFloat(num.toPrecision(sig)); + } + return fig; + }, + + /** + * APIFunction: format + * Formats a number for output. + * + * Parameters: + * num - {Float} + * dec - {Integer} Number of decimal places to round to. + * Defaults to 0. Set to null to leave decimal places unchanged. + * tsep - {String} Thousands separator. + * Default is ",". + * dsep - {String} Decimal separator. + * Default is ".". + * + * Returns: + * {String} A string representing the formatted number. + */ + format: function(num, dec, tsep, dsep) { + dec = (typeof dec != "undefined") ? dec : 0; + tsep = (typeof tsep != "undefined") ? tsep : + OpenLayers.Number.thousandsSeparator; + dsep = (typeof dsep != "undefined") ? dsep : + OpenLayers.Number.decimalSeparator; + + if (dec != null) { + num = parseFloat(num.toFixed(dec)); + } + + var parts = num.toString().split("."); + if (parts.length == 1 && dec == null) { + // integer where we do not want to touch the decimals + dec = 0; + } + + var integer = parts[0]; + if (tsep) { + var thousands = /(-?[0-9]+)([0-9]{3})/; + while(thousands.test(integer)) { + integer = integer.replace(thousands, "$1" + tsep + "$2"); + } + } + + var str; + if (dec == 0) { + str = integer; + } else { + var rem = parts.length > 1 ? parts[1] : "0"; + if (dec != null) { + rem = rem + new Array(dec - rem.length + 1).join("0"); + } + str = integer + dsep + rem; + } + return str; + } +}; + +if (!Number.prototype.limitSigDigs) { + /** + * APIMethod: Number.limitSigDigs + * *Deprecated*. Limit the number of significant digits on an integer. Does *not* + * work with floats! + * + * Parameters: + * sig - {Integer} + * + * Returns: + * {Integer} The number, rounded to the specified number of significant digits. + * If null, 0, or negative value passed in, returns 0 + */ + Number.prototype.limitSigDigs = function(sig) { + OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", + {'newMethod':'OpenLayers.Number.limitSigDigs'})); + return OpenLayers.Number.limitSigDigs(this, sig); + }; +} + +/** + * Namespace: OpenLayers.Function + * Contains convenience functions for function manipulation. + */ +OpenLayers.Function = { + /** + * APIFunction: bind + * Bind a function to an object. Method to easily create closures with + * 'this' altered. + * + * Parameters: + * func - {Function} Input function. + * object - {Object} The object to bind to the input function (as this). + * + * Returns: + * {Function} A closure with 'this' set to the passed in object. + */ + bind: function(func, object) { + // create a reference to all arguments past the second one + var args = Array.prototype.slice.apply(arguments, [2]); + return function() { + // Push on any additional arguments from the actual function call. + // These will come after those sent to the bind call. + var newArgs = args.concat( + Array.prototype.slice.apply(arguments, [0]) + ); + return func.apply(object, newArgs); + }; + }, + + /** + * APIFunction: bindAsEventListener + * Bind a function to an object, and configure it to receive the event + * object as first parameter when called. + * + * Parameters: + * func - {Function} Input function to serve as an event listener. + * object - {Object} A reference to this. + * + * Returns: + * {Function} + */ + bindAsEventListener: function(func, object) { + return function(event) { + return func.call(object, event || window.event); + }; + }, + + /** + * APIFunction: False + * A simple function to that just does "return false". We use this to + * avoid attaching anonymous functions to DOM event handlers, which + * causes "issues" on IE<8. + * + * Usage: + * document.onclick = OpenLayers.Function.False; + * + * Returns: + * {Boolean} + */ + False : function() { + return false; + }, + + /** + * APIFunction: True + * A simple function to that just does "return true". We use this to + * avoid attaching anonymous functions to DOM event handlers, which + * causes "issues" on IE<8. + * + * Usage: + * document.onclick = OpenLayers.Function.True; + * + * Returns: + * {Boolean} + */ + True : function() { + return true; + }, + + /** + * APIFunction: Void + * A reusable function that returns ``undefined``. + * + * Returns: + * {undefined} + */ + Void: function() {} + +}; + +if (!Function.prototype.bind) { + /** + * APIMethod: Function.bind + * *Deprecated*. Bind a function to an object. + * Method to easily create closures with 'this' altered. + * + * Parameters: + * object - {Object} the this parameter + * + * Returns: + * {Function} A closure with 'this' altered to the first + * argument. + */ + Function.prototype.bind = function() { + OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", + {'newMethod':'OpenLayers.Function.bind'})); + // new function takes the same arguments with this function up front + Array.prototype.unshift.apply(arguments, [this]); + return OpenLayers.Function.bind.apply(null, arguments); + }; +} + +if (!Function.prototype.bindAsEventListener) { + /** + * APIMethod: Function.bindAsEventListener + * *Deprecated*. Bind a function to an object, and configure it to receive the + * event object as first parameter when called. + * + * Parameters: + * object - {Object} A reference to this. + * + * Returns: + * {Function} + */ + Function.prototype.bindAsEventListener = function(object) { + OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", + {'newMethod':'OpenLayers.Function.bindAsEventListener'})); + return OpenLayers.Function.bindAsEventListener(this, object); + }; +} + +/** + * Namespace: OpenLayers.Array + * Contains convenience functions for array manipulation. + */ +OpenLayers.Array = { + + /** + * APIMethod: filter + * Filter an array. Provides the functionality of the + * Array.prototype.filter extension to the ECMA-262 standard. Where + * available, Array.prototype.filter will be used. + * + * Based on well known example from http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter + * + * Parameters: + * array - {Array} The array to be filtered. This array is not mutated. + * Elements added to this array by the callback will not be visited. + * callback - {Function} A function that is called for each element in + * the array. If this function returns true, the element will be + * included in the return. The function will be called with three + * arguments: the element in the array, the index of that element, and + * the array itself. If the optional caller parameter is specified + * the callback will be called with this set to caller. + * caller - {Object} Optional object to be set as this when the callback + * is called. + * + * Returns: + * {Array} An array of elements from the passed in array for which the + * callback returns true. + */ + filter: function(array, callback, caller) { + var selected = []; + if (Array.prototype.filter) { + selected = array.filter(callback, caller); + } else { + var len = array.length; + if (typeof callback != "function") { + throw new TypeError(); + } + for(var i=0; i} A cached center location. This should not be + * accessed directly. Use instead. + */ + centerLonLat: null, + + /** + * Constructor: OpenLayers.Bounds + * Construct a new bounds object. + * + * Parameters: + * left - {Number} The left bounds of the box. Note that for width + * calculations, this is assumed to be less than the right value. + * bottom - {Number} The bottom bounds of the box. Note that for height + * calculations, this is assumed to be more than the top value. + * right - {Number} The right bounds. + * top - {Number} The top bounds. + */ + initialize: function(left, bottom, right, top) { + if (left != null) { + this.left = OpenLayers.Util.toFloat(left); + } + if (bottom != null) { + this.bottom = OpenLayers.Util.toFloat(bottom); + } + if (right != null) { + this.right = OpenLayers.Util.toFloat(right); + } + if (top != null) { + this.top = OpenLayers.Util.toFloat(top); + } + }, + + /** + * Method: clone + * Create a cloned instance of this bounds. + * + * Returns: + * {} A fresh copy of the bounds + */ + clone:function() { + return new OpenLayers.Bounds(this.left, this.bottom, + this.right, this.top); + }, + + /** + * Method: equals + * Test a two bounds for equivalence. + * + * Parameters: + * bounds - {} + * + * Returns: + * {Boolean} The passed-in bounds object has the same left, + * right, top, bottom components as this. Note that if bounds + * passed in is null, returns false. + */ + equals:function(bounds) { + var equals = false; + if (bounds != null) { + equals = ((this.left == bounds.left) && + (this.right == bounds.right) && + (this.top == bounds.top) && + (this.bottom == bounds.bottom)); + } + return equals; + }, + + /** + * APIMethod: toString + * + * Returns: + * {String} String representation of bounds object. + */ + toString:function() { + return [this.left, this.bottom, this.right, this.top].join(","); + }, + + /** + * APIMethod: toArray + * + * Parameters: + * reverseAxisOrder - {Boolean} Should we reverse the axis order? + * + * Returns: + * {Array} array of left, bottom, right, top + */ + toArray: function(reverseAxisOrder) { + if (reverseAxisOrder === true) { + return [this.bottom, this.left, this.top, this.right]; + } else { + return [this.left, this.bottom, this.right, this.top]; + } + }, + + /** + * APIMethod: toBBOX + * + * Parameters: + * decimal - {Integer} How many significant digits in the bbox coords? + * Default is 6 + * reverseAxisOrder - {Boolean} Should we reverse the axis order? + * + * Returns: + * {String} Simple String representation of bounds object. + * (e.g. "5,42,10,45") + */ + toBBOX:function(decimal, reverseAxisOrder) { + if (decimal== null) { + decimal = 6; + } + var mult = Math.pow(10, decimal); + var xmin = Math.round(this.left * mult) / mult; + var ymin = Math.round(this.bottom * mult) / mult; + var xmax = Math.round(this.right * mult) / mult; + var ymax = Math.round(this.top * mult) / mult; + if (reverseAxisOrder === true) { + return ymin + "," + xmin + "," + ymax + "," + xmax; + } else { + return xmin + "," + ymin + "," + xmax + "," + ymax; + } + }, + + /** + * APIMethod: toGeometry + * Create a new polygon geometry based on this bounds. + * + * Returns: + * {} A new polygon with the coordinates + * of this bounds. + */ + 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) + ]) + ]); + }, + + /** + * APIMethod: getWidth + * + * Returns: + * {Float} The width of the bounds + */ + getWidth:function() { + return (this.right - this.left); + }, + + /** + * APIMethod: getHeight + * + * Returns: + * {Float} The height of the bounds (top minus bottom). + */ + getHeight:function() { + return (this.top - this.bottom); + }, + + /** + * APIMethod: getSize + * + * Returns: + * {} The size of the box. + */ + getSize:function() { + return new OpenLayers.Size(this.getWidth(), this.getHeight()); + }, + + /** + * APIMethod: getCenterPixel + * + * Returns: + * {} The center of the bounds in pixel space. + */ + getCenterPixel:function() { + return new OpenLayers.Pixel( (this.left + this.right) / 2, + (this.bottom + this.top) / 2); + }, + + /** + * APIMethod: getCenterLonLat + * + * Returns: + * {} The center of the bounds in map space. + */ + getCenterLonLat:function() { + if(!this.centerLonLat) { + this.centerLonLat = new OpenLayers.LonLat( + (this.left + this.right) / 2, (this.bottom + this.top) / 2 + ); + } + return this.centerLonLat; + }, + + /** + * APIMethod: scale + * Scales the bounds around a pixel or lonlat. Note that the new + * bounds may return non-integer properties, even if a pixel + * is passed. + * + * Parameters: + * ratio - {Float} + * origin - { or } + * Default is center. + * + * Returns: + * {} A new bounds that is scaled by ratio + * from origin. + */ + scale: function(ratio, origin){ + if(origin == null){ + origin = this.getCenterLonLat(); + } + + var origx,origy; + + // get origin coordinates + if(origin.CLASS_NAME == "OpenLayers.LonLat"){ + origx = origin.lon; + origy = origin.lat; + } else { + origx = origin.x; + origy = origin.y; + } + + var left = (this.left - origx) * ratio + origx; + var bottom = (this.bottom - origy) * ratio + origy; + var right = (this.right - origx) * ratio + origx; + var top = (this.top - origy) * ratio + origy; + + return new OpenLayers.Bounds(left, bottom, right, top); + }, + + /** + * APIMethod: add + * + * Parameters: + * x - {Float} + * y - {Float} + * + * Returns: + * {} A new bounds whose coordinates are the same as + * this, but shifted by the passed-in x and y values. + */ + add:function(x, y) { + if ( (x == null) || (y == null) ) { + var msg = OpenLayers.i18n("boundsAddError"); + OpenLayers.Console.error(msg); + return null; + } + return new OpenLayers.Bounds(this.left + x, this.bottom + y, + this.right + x, this.top + y); + }, + + /** + * APIMethod: extend + * Extend the bounds to include the point, lonlat, or bounds specified. + * Note, this function assumes that left < right and bottom < top. + * + * Parameters: + * object - {Object} Can be LonLat, Point, or Bounds + */ + extend:function(object) { + var bounds = null; + if (object) { + // clear cached center location + switch(object.CLASS_NAME) { + case "OpenLayers.LonLat": + bounds = new OpenLayers.Bounds(object.lon, object.lat, + object.lon, object.lat); + break; + case "OpenLayers.Geometry.Point": + bounds = new OpenLayers.Bounds(object.x, object.y, + object.x, object.y); + break; + + case "OpenLayers.Bounds": + bounds = object; + break; + } + + if (bounds) { + this.centerLonLat = null; + if ( (this.left == null) || (bounds.left < this.left)) { + this.left = bounds.left; + } + if ( (this.bottom == null) || (bounds.bottom < this.bottom) ) { + this.bottom = bounds.bottom; + } + if ( (this.right == null) || (bounds.right > this.right) ) { + this.right = bounds.right; + } + if ( (this.top == null) || (bounds.top > this.top) ) { + this.top = bounds.top; + } + } + } + }, + + /** + * APIMethod: containsLonLat + * + * Parameters: + * ll - {} + * inclusive - {Boolean} Whether or not to include the border. + * Default is true. + * + * Returns: + * {Boolean} The passed-in lonlat is within this bounds. + */ + containsLonLat:function(ll, inclusive) { + return this.contains(ll.lon, ll.lat, inclusive); + }, + + /** + * APIMethod: containsPixel + * + * Parameters: + * px - {} + * inclusive - {Boolean} Whether or not to include the border. Default is + * true. + * + * Returns: + * {Boolean} The passed-in pixel is within this bounds. + */ + containsPixel:function(px, inclusive) { + return this.contains(px.x, px.y, inclusive); + }, + + /** + * APIMethod: contains + * + * Parameters: + * x - {Float} + * y - {Float} + * inclusive - {Boolean} Whether or not to include the border. Default is + * true. + * + * Returns: + * {Boolean} Whether or not the passed-in coordinates are within this + * bounds. + */ + contains:function(x, y, inclusive) { + //set default + if (inclusive == null) { + inclusive = true; + } + + if (x == null || y == null) { + return false; + } + + x = OpenLayers.Util.toFloat(x); + y = OpenLayers.Util.toFloat(y); + + var contains = false; + if (inclusive) { + contains = ((x >= this.left) && (x <= this.right) && + (y >= this.bottom) && (y <= this.top)); + } else { + contains = ((x > this.left) && (x < this.right) && + (y > this.bottom) && (y < this.top)); + } + return contains; + }, + + /** + * APIMethod: intersectsBounds + * Determine whether the target bounds intersects this bounds. Bounds are + * considered intersecting if any of their edges intersect or if one + * bounds contains the other. + * + * Parameters: + * bounds - {} The target bounds. + * inclusive - {Boolean} Treat coincident borders as intersecting. Default + * is true. If false, bounds that do not overlap but only touch at the + * border will not be considered as intersecting. + * + * Returns: + * {Boolean} The passed-in bounds object intersects this bounds. + */ + intersectsBounds:function(bounds, inclusive) { + if (inclusive == null) { + inclusive = true; + } + var intersects = false; + var mightTouch = ( + this.left == bounds.right || + this.right == bounds.left || + this.top == bounds.bottom || + this.bottom == bounds.top + ); + + // if the two bounds only touch at an edge, and inclusive is false, + // then the bounds don't *really* intersect. + if (inclusive || !mightTouch) { + // otherwise, if one of the boundaries even partially contains another, + // inclusive of the edges, then they do intersect. + var inBottom = ( + ((bounds.bottom >= this.bottom) && (bounds.bottom <= this.top)) || + ((this.bottom >= bounds.bottom) && (this.bottom <= bounds.top)) + ); + var inTop = ( + ((bounds.top >= this.bottom) && (bounds.top <= this.top)) || + ((this.top > bounds.bottom) && (this.top < bounds.top)) + ); + var inLeft = ( + ((bounds.left >= this.left) && (bounds.left <= this.right)) || + ((this.left >= bounds.left) && (this.left <= bounds.right)) + ); + var inRight = ( + ((bounds.right >= this.left) && (bounds.right <= this.right)) || + ((this.right >= bounds.left) && (this.right <= bounds.right)) + ); + intersects = ((inBottom || inTop) && (inLeft || inRight)); + } + return intersects; + }, + + /** + * APIMethod: containsBounds + * Determine whether the target bounds is contained within this bounds. + * + * bounds - {} The target bounds. + * partial - {Boolean} If any of the target corners is within this bounds + * consider the bounds contained. Default is false. If false, the + * entire target bounds must be contained within this bounds. + * inclusive - {Boolean} Treat shared edges as contained. Default is + * true. + * + * Returns: + * {Boolean} The passed-in bounds object is contained within this bounds. + */ + containsBounds:function(bounds, partial, inclusive) { + if (partial == null) { + partial = false; + } + if (inclusive == null) { + inclusive = true; + } + var bottomLeft = this.contains(bounds.left, bounds.bottom, inclusive); + var bottomRight = this.contains(bounds.right, bounds.bottom, inclusive); + var topLeft = this.contains(bounds.left, bounds.top, inclusive); + var topRight = this.contains(bounds.right, bounds.top, inclusive); + + return (partial) ? (bottomLeft || bottomRight || topLeft || topRight) + : (bottomLeft && bottomRight && topLeft && topRight); + }, + + /** + * APIMethod: determineQuadrant + * + * Parameters: + * lonlat - {} + * + * Returns: + * {String} The quadrant ("br" "tr" "tl" "bl") of the bounds in which the + * coordinate lies. + */ + determineQuadrant: function(lonlat) { + + var quadrant = ""; + var center = this.getCenterLonLat(); + + quadrant += (lonlat.lat < center.lat) ? "b" : "t"; + quadrant += (lonlat.lon < center.lon) ? "l" : "r"; + + return quadrant; + }, + + /** + * APIMethod: transform + * Transform the Bounds object from source to dest. + * + * Parameters: + * source - {} Source projection. + * dest - {} Destination projection. + * + * Returns: + * {} Itself, for use in chaining operations. + */ + transform: function(source, dest) { + // clear cached center location + this.centerLonLat = null; + var ll = OpenLayers.Projection.transform( + {'x': this.left, 'y': this.bottom}, source, dest); + var lr = OpenLayers.Projection.transform( + {'x': this.right, 'y': this.bottom}, source, dest); + var ul = OpenLayers.Projection.transform( + {'x': this.left, 'y': this.top}, source, dest); + var ur = OpenLayers.Projection.transform( + {'x': this.right, 'y': this.top}, source, dest); + this.left = Math.min(ll.x, ul.x); + this.bottom = Math.min(ll.y, lr.y); + this.right = Math.max(lr.x, ur.x); + this.top = Math.max(ul.y, ur.y); + return this; + }, + + /** + * APIMethod: wrapDateLine + * + * Parameters: + * maxExtent - {} + * options - {Object} Some possible options are: + * + * Allowed Options: + * leftTolerance - {float} Allow for a margin of error + * with the 'left' value of this + * bound. + * Default is 0. + * rightTolerance - {float} Allow for a margin of error + * with the 'right' value of + * this bound. + * Default is 0. + * + * Returns: + * {} A copy of this bounds, but wrapped around the + * "dateline" (as specified by the borders of + * maxExtent). Note that this function only returns + * a different bounds value if this bounds is + * *entirely* outside of the maxExtent. If this + * bounds straddles the dateline (is part in/part + * out of maxExtent), the returned bounds will be + * merely a copy of this one. + */ + wrapDateLine: function(maxExtent, options) { + options = options || {}; + + var leftTolerance = options.leftTolerance || 0; + var rightTolerance = options.rightTolerance || 0; + + var newBounds = this.clone(); + + if (maxExtent) { + + //shift right? + while ( newBounds.left < maxExtent.left && + (newBounds.right - rightTolerance) <= maxExtent.left ) { + newBounds = newBounds.add(maxExtent.getWidth(), 0); + } + + //shift left? + while ( (newBounds.left + leftTolerance) >= maxExtent.right && + newBounds.right > maxExtent.right ) { + newBounds = newBounds.add(-maxExtent.getWidth(), 0); + } + } + + return newBounds; + }, + + CLASS_NAME: "OpenLayers.Bounds" +}); + +/** + * APIFunction: fromString + * Alternative constructor that builds a new OpenLayers.Bounds from a + * parameter string + * + * Parameters: + * str - {String}Comma-separated bounds string. (e.g. "5,42,10,45") + * reverseAxisOrder - {Boolean} Does the string use reverse axis order? + * + * Returns: + * {} New bounds object built from the + * passed-in String. + */ +OpenLayers.Bounds.fromString = function(str, reverseAxisOrder) { + var bounds = str.split(","); + return OpenLayers.Bounds.fromArray(bounds, reverseAxisOrder); +}; + +/** + * APIFunction: fromArray + * Alternative constructor that builds a new OpenLayers.Bounds + * from an array + * + * Parameters: + * bbox - {Array(Float)} Array of bounds values (e.g. [5,42,10,45]) + * reverseAxisOrder - {Boolean} Does the array use reverse axis order? + * + * Returns: + * {} New bounds object built from the passed-in Array. + */ +OpenLayers.Bounds.fromArray = function(bbox, reverseAxisOrder) { + return reverseAxisOrder === true ? + new OpenLayers.Bounds(parseFloat(bbox[1]), + parseFloat(bbox[0]), + parseFloat(bbox[3]), + parseFloat(bbox[2])) : + new OpenLayers.Bounds(parseFloat(bbox[0]), + parseFloat(bbox[1]), + parseFloat(bbox[2]), + parseFloat(bbox[3])); +}; + +/** + * APIFunction: fromSize + * Alternative constructor that builds a new OpenLayers.Bounds + * from a size + * + * Parameters: + * size - {} + * + * Returns: + * {} New bounds object built from the passed-in size. + */ +OpenLayers.Bounds.fromSize = function(size) { + return new OpenLayers.Bounds(0, + size.h, + size.w, + 0); +}; + +/** + * Function: oppositeQuadrant + * Get the opposite quadrant for a given quadrant string. + * + * Parameters: + * quadrant - {String} two character quadrant shortstring + * + * Returns: + * {String} The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if + * you pass in "bl" it returns "tr", if you pass in "br" it + * returns "tl", etc. + */ +OpenLayers.Bounds.oppositeQuadrant = function(quadrant) { + var opp = ""; + + opp += (quadrant.charAt(0) == 't') ? 'b' : 't'; + opp += (quadrant.charAt(1) == 'l') ? 'r' : 'l'; + + return opp; +}; diff --git a/openlayers/lib/OpenLayers/BaseTypes/Class.js b/openlayers/lib/OpenLayers/BaseTypes/Class.js new file mode 100644 index 0000000000..a1f3495b54 --- /dev/null +++ b/openlayers/lib/OpenLayers/BaseTypes/Class.js @@ -0,0 +1,163 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/SingleFile.js + */ + +/** + * Constructor: OpenLayers.Class + * Base class used to construct all other classes. Includes support for + * multiple inheritance. + * + * This constructor is new in OpenLayers 2.5. At OpenLayers 3.0, the old + * syntax for creating classes and dealing with inheritance + * will be removed. + * + * To create a new OpenLayers-style class, use the following syntax: + * (code) + * var MyClass = OpenLayers.Class(prototype); + * (end) + * + * To create a new OpenLayers-style class with multiple inheritance, use the + * following syntax: + * (code) + * var MyClass = OpenLayers.Class(Class1, Class2, prototype); + * (end) + * + * Note that instanceof reflection will only reveal Class1 as superclass. + * + */ +OpenLayers.Class = function() { + var len = arguments.length; + var P = arguments[0]; + var F = arguments[len-1]; + + var C = typeof F.initialize == "function" ? + F.initialize : + function(){ P.prototype.initialize.apply(this, arguments); }; + + if (len > 1) { + var newArgs = [C, P].concat( + Array.prototype.slice.call(arguments).slice(1, len-1), F); + OpenLayers.inherit.apply(null, newArgs); + } else { + C.prototype = F; + } + return C; +}; + +/** + * Property: isPrototype + * *Deprecated*. This is no longer needed and will be removed at 3.0. + */ +OpenLayers.Class.isPrototype = function () {}; + +/** + * APIFunction: OpenLayers.create + * *Deprecated*. Old method to create an OpenLayers style class. Use the + * constructor instead. + * + * Returns: + * An OpenLayers class + */ +OpenLayers.Class.create = function() { + return function() { + if (arguments && arguments[0] != OpenLayers.Class.isPrototype) { + this.initialize.apply(this, arguments); + } + }; +}; + +/** + * APIFunction: inherit + * *Deprecated*. Old method to inherit from one or more OpenLayers style + * classes. Use the constructor instead. + * + * Parameters: + * class - One or more classes can be provided as arguments + * + * Returns: + * An object prototype + */ +OpenLayers.Class.inherit = function (P) { + var C = function() { + P.call(this); + }; + var newArgs = [C].concat(Array.prototype.slice.call(arguments)); + OpenLayers.inherit.apply(null, newArgs); + return C.prototype; +}; + +/** + * Function: OpenLayers.inherit + * + * Parameters: + * C - {Object} the class that inherits + * P - {Object} the superclass to inherit from + * + * In addition to the mandatory C and P parameters, an arbitrary number of + * objects can be passed, which will extend C. + */ +OpenLayers.inherit = function(C, P) { + var F = function() {}; + F.prototype = P.prototype; + C.prototype = new F; + var i, l, o; + for(i=2, l=arguments.length; i"lon=5,lat=42") + */ + toString:function() { + return ("lon=" + this.lon + ",lat=" + this.lat); + }, + + /** + * APIMethod: toShortString + * + * Returns: + * {String} Shortened String representation of OpenLayers.LonLat object. + * (e.g. "5, 42") + */ + toShortString:function() { + return (this.lon + ", " + this.lat); + }, + + /** + * APIMethod: clone + * + * Returns: + * {} New OpenLayers.LonLat object with the same lon + * and lat values + */ + clone:function() { + return new OpenLayers.LonLat(this.lon, this.lat); + }, + + /** + * APIMethod: add + * + * Parameters: + * lon - {Float} + * lat - {Float} + * + * Returns: + * {} A new OpenLayers.LonLat object with the lon and + * lat passed-in added to this's. + */ + add:function(lon, lat) { + if ( (lon == null) || (lat == null) ) { + var msg = OpenLayers.i18n("lonlatAddError"); + OpenLayers.Console.error(msg); + return null; + } + return new OpenLayers.LonLat(this.lon + OpenLayers.Util.toFloat(lon), + this.lat + OpenLayers.Util.toFloat(lat)); + }, + + /** + * APIMethod: equals + * + * Parameters: + * ll - {} + * + * Returns: + * {Boolean} Boolean value indicating whether the passed-in + * object has the same lon and lat + * components as this. + * Note: if ll passed in is null, returns false + */ + equals:function(ll) { + var equals = false; + if (ll != null) { + equals = ((this.lon == ll.lon && this.lat == ll.lat) || + (isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat))); + } + return equals; + }, + + /** + * APIMethod: transform + * Transform the LonLat object from source to dest. This transformation is + * *in place*: if you want a *new* lonlat, use .clone() first. + * + * Parameters: + * source - {} Source projection. + * dest - {} Destination projection. + * + * Returns: + * {} Itself, for use in chaining operations. + */ + transform: function(source, dest) { + var point = OpenLayers.Projection.transform( + {'x': this.lon, 'y': this.lat}, source, dest); + this.lon = point.x; + this.lat = point.y; + return this; + }, + + /** + * APIMethod: wrapDateLine + * + * Parameters: + * maxExtent - {} + * + * Returns: + * {} A copy of this lonlat, but wrapped around the + * "dateline" (as specified by the borders of + * maxExtent) + */ + wrapDateLine: function(maxExtent) { + + var newLonLat = this.clone(); + + if (maxExtent) { + //shift right? + while (newLonLat.lon < maxExtent.left) { + newLonLat.lon += maxExtent.getWidth(); + } + + //shift left? + while (newLonLat.lon > maxExtent.right) { + newLonLat.lon -= maxExtent.getWidth(); + } + } + + return newLonLat; + }, + + CLASS_NAME: "OpenLayers.LonLat" +}); + +/** + * Function: fromString + * Alternative constructor that builds a new from a + * parameter string + * + * Parameters: + * str - {String} Comma-separated Lon,Lat coordinate string. + * (e.g. "5,40") + * + * Returns: + * {} New object built from the + * passed-in String. + */ +OpenLayers.LonLat.fromString = function(str) { + var pair = str.split(","); + return new OpenLayers.LonLat(pair[0], pair[1]); +}; + +/** + * Function: fromArray + * Alternative constructor that builds a new from an + * array of two numbers that represent lon- and lat-values. + * + * Parameters: + * arr - {Array(Float)} Array of lon/lat values (e.g. [5,-42]) + * + * Returns: + * {} New object built from the + * passed-in array. + */ +OpenLayers.LonLat.fromArray = function(arr) { + var gotArr = OpenLayers.Util.isArray(arr), + lon = gotArr && arr[0], + lat = gotArr && arr[1]; + return new OpenLayers.LonLat(lon, lat); +}; diff --git a/openlayers/lib/OpenLayers/BaseTypes/Pixel.js b/openlayers/lib/OpenLayers/BaseTypes/Pixel.js new file mode 100644 index 0000000000..5426bb8d4c --- /dev/null +++ b/openlayers/lib/OpenLayers/BaseTypes/Pixel.js @@ -0,0 +1,145 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/BaseTypes/Class.js + * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js + */ + +/** + * Class: OpenLayers.Pixel + * This class represents a screen coordinate, in x and y coordinates + */ +OpenLayers.Pixel = OpenLayers.Class({ + + /** + * APIProperty: x + * {Number} The x coordinate + */ + x: 0.0, + + /** + * APIProperty: y + * {Number} The y coordinate + */ + y: 0.0, + + /** + * Constructor: OpenLayers.Pixel + * Create a new OpenLayers.Pixel instance + * + * Parameters: + * x - {Number} The x coordinate + * y - {Number} The y coordinate + * + * Returns: + * An instance of OpenLayers.Pixel + */ + initialize: function(x, y) { + this.x = parseFloat(x); + this.y = parseFloat(y); + }, + + /** + * Method: toString + * Cast this object into a string + * + * Returns: + * {String} The string representation of Pixel. ex: "x=200.4,y=242.2" + */ + toString:function() { + return ("x=" + this.x + ",y=" + this.y); + }, + + /** + * APIMethod: clone + * Return a clone of this pixel object + * + * Returns: + * {} A clone pixel + */ + clone:function() { + return new OpenLayers.Pixel(this.x, this.y); + }, + + /** + * APIMethod: equals + * Determine whether one pixel is equivalent to another + * + * Parameters: + * px - {} + * + * Returns: + * {Boolean} The point passed in as parameter is equal to this. Note that + * if px passed in is null, returns false. + */ + equals:function(px) { + var equals = false; + if (px != null) { + equals = ((this.x == px.x && this.y == px.y) || + (isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y))); + } + return equals; + }, + + /** + * APIMethod: distanceTo + * Returns the distance to the pixel point passed in as a parameter. + * + * Parameters: + * px - {} + * + * Returns: + * {Float} The pixel point passed in as parameter to calculate the + * distance to. + */ + distanceTo:function(px) { + return Math.sqrt( + Math.pow(this.x - px.x, 2) + + Math.pow(this.y - px.y, 2) + ); + }, + + /** + * APIMethod: add + * + * Parameters: + * x - {Integer} + * y - {Integer} + * + * Returns: + * {} A new Pixel with this pixel's x&y augmented by the + * values passed in. + */ + add:function(x, y) { + if ( (x == null) || (y == null) ) { + var msg = OpenLayers.i18n("pixelAddError"); + OpenLayers.Console.error(msg); + return null; + } + return new OpenLayers.Pixel(this.x + x, this.y + y); + }, + + /** + * APIMethod: offset + * + * Parameters + * px - {} + * + * Returns: + * {} A new Pixel with this pixel's x&y augmented by the + * x&y values of the pixel passed in. + */ + offset:function(px) { + var newPx = this.clone(); + if (px) { + newPx = this.add(px.x, px.y); + } + return newPx; + }, + + CLASS_NAME: "OpenLayers.Pixel" +}); diff --git a/openlayers/lib/OpenLayers/BaseTypes/Size.js b/openlayers/lib/OpenLayers/BaseTypes/Size.js new file mode 100644 index 0000000000..4a0b1359ef --- /dev/null +++ b/openlayers/lib/OpenLayers/BaseTypes/Size.js @@ -0,0 +1,89 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/BaseTypes/Class.js + */ + +/** + * Class: OpenLayers.Size + * Instances of this class represent a width/height pair + */ +OpenLayers.Size = OpenLayers.Class({ + + /** + * APIProperty: w + * {Number} width + */ + w: 0.0, + + /** + * APIProperty: h + * {Number} height + */ + h: 0.0, + + + /** + * Constructor: OpenLayers.Size + * Create an instance of OpenLayers.Size + * + * Parameters: + * w - {Number} width + * h - {Number} height + */ + initialize: function(w, h) { + this.w = parseFloat(w); + this.h = parseFloat(h); + }, + + /** + * Method: toString + * Return the string representation of a size object + * + * Returns: + * {String} The string representation of OpenLayers.Size object. + * (e.g. "w=55,h=66") + */ + toString:function() { + return ("w=" + this.w + ",h=" + this.h); + }, + + /** + * APIMethod: clone + * Create a clone of this size object + * + * Returns: + * {} A new OpenLayers.Size object with the same w and h + * values + */ + clone:function() { + return new OpenLayers.Size(this.w, this.h); + }, + + /** + * + * APIMethod: equals + * Determine where this size is equal to another + * + * Parameters: + * sz - {} + * + * Returns: + * {Boolean} The passed in size has the same h and w properties as this one. + * Note that if sz passed in is null, returns false. + * + */ + equals:function(sz) { + var equals = false; + if (sz != null) { + equals = ((this.w == sz.w && this.h == sz.h) || + (isNaN(this.w) && isNaN(this.h) && isNaN(sz.w) && isNaN(sz.h))); + } + return equals; + }, + + CLASS_NAME: "OpenLayers.Size" +}); diff --git a/openlayers/lib/OpenLayers/Console.js b/openlayers/lib/OpenLayers/Console.js new file mode 100644 index 0000000000..9d62ac10af --- /dev/null +++ b/openlayers/lib/OpenLayers/Console.js @@ -0,0 +1,250 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/BaseTypes/Class.js + */ + +/** + * Namespace: OpenLayers.Console + * The OpenLayers.Console namespace is used for debugging and error logging. + * If the Firebug Lite (../Firebug/firebug.js) is included before this script, + * calls to OpenLayers.Console methods will get redirected to window.console. + * This makes use of the Firebug extension where available and allows for + * cross-browser debugging Firebug style. + * + * Note: + * Note that behavior will differ with the Firebug extention and Firebug Lite. + * Most notably, the Firebug Lite console does not currently allow for + * hyperlinks to code or for clicking on object to explore their properties. + * + */ +OpenLayers.Console = { + /** + * Create empty functions for all console methods. The real value of these + * properties will be set if Firebug Lite (../Firebug/firebug.js script) is + * included. We explicitly require the Firebug Lite script to trigger + * functionality of the OpenLayers.Console methods. + */ + + /** + * APIFunction: log + * Log an object in the console. The Firebug Lite console logs string + * representation of objects. Given multiple arguments, they will + * be cast to strings and logged with a space delimiter. If the first + * argument is a string with printf-like formatting, subsequent arguments + * will be used in string substitution. Any additional arguments (beyond + * the number substituted in a format string) will be appended in a space- + * delimited line. + * + * Parameters: + * object - {Object} + */ + log: function() {}, + + /** + * APIFunction: debug + * Writes a message to the console, including a hyperlink to the line + * where it was called. + * + * May be called with multiple arguments as with OpenLayers.Console.log(). + * + * Parameters: + * object - {Object} + */ + debug: function() {}, + + /** + * APIFunction: info + * Writes a message to the console with the visual "info" icon and color + * coding and a hyperlink to the line where it was called. + * + * May be called with multiple arguments as with OpenLayers.Console.log(). + * + * Parameters: + * object - {Object} + */ + info: function() {}, + + /** + * APIFunction: warn + * Writes a message to the console with the visual "warning" icon and + * color coding and a hyperlink to the line where it was called. + * + * May be called with multiple arguments as with OpenLayers.Console.log(). + * + * Parameters: + * object - {Object} + */ + warn: function() {}, + + /** + * APIFunction: error + * Writes a message to the console with the visual "error" icon and color + * coding and a hyperlink to the line where it was called. + * + * May be called with multiple arguments as with OpenLayers.Console.log(). + * + * Parameters: + * object - {Object} + */ + error: function() {}, + + /** + * APIFunction: userError + * A single interface for showing error messages to the user. The default + * behavior is a Javascript alert, though this can be overridden by + * reassigning OpenLayers.Console.userError to a different function. + * + * Expects a single error message + * + * Parameters: + * error - {Object} + */ + userError: function(error) { + alert(error); + }, + + /** + * APIFunction: assert + * Tests that an expression is true. If not, it will write a message to + * the console and throw an exception. + * + * May be called with multiple arguments as with OpenLayers.Console.log(). + * + * Parameters: + * object - {Object} + */ + assert: function() {}, + + /** + * APIFunction: dir + * Prints an interactive listing of all properties of the object. This + * looks identical to the view that you would see in the DOM tab. + * + * Parameters: + * object - {Object} + */ + dir: function() {}, + + /** + * APIFunction: dirxml + * Prints the XML source tree of an HTML or XML element. This looks + * identical to the view that you would see in the HTML tab. You can click + * on any node to inspect it in the HTML tab. + * + * Parameters: + * object - {Object} + */ + dirxml: function() {}, + + /** + * APIFunction: trace + * Prints an interactive stack trace of JavaScript execution at the point + * where it is called. The stack trace details the functions on the stack, + * as well as the values that were passed as arguments to each function. + * You can click each function to take you to its source in the Script tab, + * and click each argument value to inspect it in the DOM or HTML tabs. + * + */ + trace: function() {}, + + /** + * APIFunction: group + * Writes a message to the console and opens a nested block to indent all + * future messages sent to the console. Call OpenLayers.Console.groupEnd() + * to close the block. + * + * May be called with multiple arguments as with OpenLayers.Console.log(). + * + * Parameters: + * object - {Object} + */ + group: function() {}, + + /** + * APIFunction: groupEnd + * Closes the most recently opened block created by a call to + * OpenLayers.Console.group + */ + groupEnd: function() {}, + + /** + * APIFunction: time + * Creates a new timer under the given name. Call + * OpenLayers.Console.timeEnd(name) + * with the same name to stop the timer and print the time elapsed. + * + * Parameters: + * name - {String} + */ + time: function() {}, + + /** + * APIFunction: timeEnd + * Stops a timer created by a call to OpenLayers.Console.time(name) and + * writes the time elapsed. + * + * Parameters: + * name - {String} + */ + timeEnd: function() {}, + + /** + * APIFunction: profile + * Turns on the JavaScript profiler. The optional argument title would + * contain the text to be printed in the header of the profile report. + * + * This function is not currently implemented in Firebug Lite. + * + * Parameters: + * title - {String} Optional title for the profiler + */ + profile: function() {}, + + /** + * APIFunction: profileEnd + * Turns off the JavaScript profiler and prints its report. + * + * This function is not currently implemented in Firebug Lite. + */ + profileEnd: function() {}, + + /** + * APIFunction: count + * Writes the number of times that the line of code where count was called + * was executed. The optional argument title will print a message in + * addition to the number of the count. + * + * This function is not currently implemented in Firebug Lite. + * + * Parameters: + * title - {String} Optional title to be printed with count + */ + count: function() {}, + + CLASS_NAME: "OpenLayers.Console" +}; + +/** + * Execute an anonymous function to extend the OpenLayers.Console namespace + * if the firebug.js script is included. This closure is used so that the + * "scripts" and "i" variables don't pollute the global namespace. + */ +(function() { + /** + * If Firebug Lite is included (before this script), re-route all + * OpenLayers.Console calls to the console object. + */ + var scripts = document.getElementsByTagName("script"); + for(var i=0, len=scripts.length; i var map = new OpenLayers.Map('map', { controls: [] }); + * > + * > map.addControl(new OpenLayers.Control.PanZoomBar()); + * > map.addControl(new OpenLayers.Control.MouseToolbar()); + * > map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false})); + * > map.addControl(new OpenLayers.Control.Permalink()); + * > map.addControl(new OpenLayers.Control.Permalink('permalink')); + * > map.addControl(new OpenLayers.Control.MousePosition()); + * > map.addControl(new OpenLayers.Control.OverviewMap()); + * > map.addControl(new OpenLayers.Control.KeyboardDefaults()); + * + * The next code fragment is a quick example of how to intercept + * shift-mouse click to display the extent of the bounding box + * dragged out by the user. Usually controls are not created + * in exactly this manner. See the source for a more complete + * example: + * + * > var control = new OpenLayers.Control(); + * > OpenLayers.Util.extend(control, { + * > draw: function () { + * > // this Handler.Box will intercept the shift-mousedown + * > // before Control.MouseDefault gets to see it + * > this.box = new OpenLayers.Handler.Box( control, + * > {"done": this.notice}, + * > {keyMask: OpenLayers.Handler.MOD_SHIFT}); + * > this.box.activate(); + * > }, + * > + * > notice: function (bounds) { + * > OpenLayers.Console.userError(bounds); + * > } + * > }); + * > map.addControl(control); + * + */ +OpenLayers.Control = OpenLayers.Class({ + + /** + * Property: id + * {String} + */ + id: null, + + /** + * Property: map + * {} this gets set in the addControl() function in + * OpenLayers.Map + */ + map: null, + + /** + * APIProperty: div + * {DOMElement} The element that contains the control, if not present the + * control is placed inside the map. + */ + div: null, + + /** + * APIProperty: type + * {Number} Controls can have a 'type'. The type determines the type of + * interactions which are possible with them when they are placed in an + * . + */ + type: null, + + /** + * Property: allowSelection + * {Boolean} By deafault, controls do not allow selection, because + * it may interfere with map dragging. If this is true, OpenLayers + * will not prevent selection of the control. + * Default is false. + */ + allowSelection: false, + + /** + * Property: displayClass + * {string} This property is used for CSS related to the drawing of the + * Control. + */ + displayClass: "", + + /** + * APIProperty: title + * {string} This property is used for showing a tooltip over the + * Control. + */ + title: "", + + /** + * APIProperty: autoActivate + * {Boolean} Activate the control when it is added to a map. Default is + * false. + */ + autoActivate: false, + + /** + * APIProperty: active + * {Boolean} The control is active (read-only). Use and + * to change control state. + */ + active: null, + + /** + * Property: handler + * {} null + */ + handler: null, + + /** + * APIProperty: eventListeners + * {Object} If set as an option at construction, the eventListeners + * object will be registered with . Object + * structure must be a listeners object as shown in the example for + * the events.on method. + */ + eventListeners: null, + + /** + * APIProperty: events + * {} Events instance for listeners and triggering + * control specific events. + */ + events: null, + + /** + * Constant: EVENT_TYPES + * {Array(String)} Supported application event types. Register a listener + * for a particular event with the following syntax: + * (code) + * control.events.register(type, obj, listener); + * (end) + * + * Listeners will be called with a reference to an event object. The + * properties of this event depends on exactly what happened. + * + * All event objects have at least the following properties: + * object - {Object} A reference to control.events.object (a reference + * to the control). + * element - {DOMElement} A reference to control.events.element (which + * will be null unless documented otherwise). + * + * Supported map event types: + * activate - Triggered when activated. + * deactivate - Triggered when deactivated. + */ + EVENT_TYPES: ["activate", "deactivate"], + + /** + * Constructor: OpenLayers.Control + * Create an OpenLayers Control. The options passed as a parameter + * directly extend the control. For example passing the following: + * + * > var control = new OpenLayers.Control({div: myDiv}); + * + * Overrides the default div attribute value of null. + * + * Parameters: + * options - {Object} + */ + initialize: function (options) { + // We do this before the extend so that instances can override + // className in options. + this.displayClass = + this.CLASS_NAME.replace("OpenLayers.", "ol").replace(/\./g, ""); + + OpenLayers.Util.extend(this, options); + + this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES); + if(this.eventListeners instanceof Object) { + this.events.on(this.eventListeners); + } + if (this.id == null) { + this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); + } + }, + + /** + * Method: destroy + * The destroy method is used to perform any clean up before the control + * is dereferenced. Typically this is where event listeners are removed + * to prevent memory leaks. + */ + destroy: function () { + if(this.events) { + if(this.eventListeners) { + this.events.un(this.eventListeners); + } + this.events.destroy(); + this.events = null; + } + this.eventListeners = null; + + // eliminate circular references + if (this.handler) { + this.handler.destroy(); + this.handler = null; + } + if(this.handlers) { + for(var key in this.handlers) { + if(this.handlers.hasOwnProperty(key) && + typeof this.handlers[key].destroy == "function") { + this.handlers[key].destroy(); + } + } + this.handlers = null; + } + if (this.map) { + this.map.removeControl(this); + this.map = null; + } + this.div = null; + }, + + /** + * Method: setMap + * Set the map property for the control. This is done through an accessor + * so that subclasses can override this and take special action once + * they have their map variable set. + * + * Parameters: + * map - {} + */ + setMap: function(map) { + this.map = map; + if (this.handler) { + this.handler.setMap(map); + } + }, + + /** + * Method: draw + * The draw method is called when the control is ready to be displayed + * on the page. If a div has not been created one is created. Controls + * with a visual component will almost always want to override this method + * to customize the look of control. + * + * Parameters: + * px - {} The top-left pixel position of the control + * or null. + * + * Returns: + * {DOMElement} A reference to the DIV DOMElement containing the control + */ + draw: function (px) { + if (this.div == null) { + this.div = OpenLayers.Util.createDiv(this.id); + this.div.className = this.displayClass; + if (!this.allowSelection) { + this.div.className += " olControlNoSelect"; + this.div.setAttribute("unselectable", "on", 0); + this.div.onselectstart = OpenLayers.Function.False; + } + if (this.title != "") { + this.div.title = this.title; + } + } + if (px != null) { + this.position = px.clone(); + } + this.moveTo(this.position); + return this.div; + }, + + /** + * Method: moveTo + * Sets the left and top style attributes to the passed in pixel + * coordinates. + * + * Parameters: + * px - {} + */ + moveTo: function (px) { + if ((px != null) && (this.div != null)) { + this.div.style.left = px.x + "px"; + this.div.style.top = px.y + "px"; + } + }, + + /** + * APIMethod: activate + * Explicitly activates a control and it's associated + * handler if one has been set. Controls can be + * deactivated by calling the deactivate() method. + * + * Returns: + * {Boolean} True if the control was successfully activated or + * false if the control was already active. + */ + activate: function () { + if (this.active) { + return false; + } + if (this.handler) { + this.handler.activate(); + } + this.active = true; + if(this.map) { + OpenLayers.Element.addClass( + this.map.viewPortDiv, + this.displayClass.replace(/ /g, "") + "Active" + ); + } + this.events.triggerEvent("activate"); + return true; + }, + + /** + * APIMethod: deactivate + * Deactivates a control and it's associated handler if any. The exact + * effect of this depends on the control itself. + * + * Returns: + * {Boolean} True if the control was effectively deactivated or false + * if the control was already inactive. + */ + deactivate: function () { + if (this.active) { + if (this.handler) { + this.handler.deactivate(); + } + this.active = false; + if(this.map) { + OpenLayers.Element.removeClass( + this.map.viewPortDiv, + this.displayClass.replace(/ /g, "") + "Active" + ); + } + this.events.triggerEvent("deactivate"); + return true; + } + return false; + }, + + CLASS_NAME: "OpenLayers.Control" +}); + +/** + * Constant: OpenLayers.Control.TYPE_BUTTON + */ +OpenLayers.Control.TYPE_BUTTON = 1; + +/** + * Constant: OpenLayers.Control.TYPE_TOGGLE + */ +OpenLayers.Control.TYPE_TOGGLE = 2; + +/** + * Constant: OpenLayers.Control.TYPE_TOOL + */ +OpenLayers.Control.TYPE_TOOL = 3; diff --git a/openlayers/lib/OpenLayers/Control/ArgParser.js b/openlayers/lib/OpenLayers/Control/ArgParser.js new file mode 100644 index 0000000000..3ba0d49adb --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/ArgParser.js @@ -0,0 +1,182 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.ArgParser + * The ArgParser control adds location bar querystring parsing functionality + * to an OpenLayers Map. + * When added to a Map control, on a page load/refresh, the Map will + * automatically take the href string and parse it for lon, lat, zoom, and + * layers information. + * + * Inherits from: + * - + */ +OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { + + /** + * Parameter: center + * {} + */ + center: null, + + /** + * Parameter: zoom + * {int} + */ + zoom: null, + + /** + * Parameter: layers + * {Array()} + */ + layers: null, + + /** + * APIProperty: displayProjection + * {} Requires proj4js support. + * Projection used when reading the coordinates from the URL. This will + * + * reproject the map coordinates from the URL into the map's + * projection. + * + * If you are using this functionality, be aware that any permalink + * which is added to the map will determine the coordinate type which + * is read from the URL, which means you should not add permalinks with + * different displayProjections to the same map. + */ + displayProjection: null, + + /** + * Constructor: OpenLayers.Control.ArgParser + * + * Parameters: + * options - {Object} + */ + + /** + * Method: getParameters + */ + getParameters: function(url) { + url = url || window.location.href; + var parameters = OpenLayers.Util.getParameters(url); + + // If we have an chchor in the url use it to split the url + var index = url.indexOf('#'); + if (index > 0) { + // create an url to parce on the getParameters + url = '?' + url.substring(index + 1, url.length); + + OpenLayers.Util.extend(parameters, + OpenLayers.Util.getParameters(url)); + } + return parameters; + }, + + /** + * Method: setMap + * Set the map property for the control. + * + * Parameters: + * map - {} + */ + setMap: function(map) { + OpenLayers.Control.prototype.setMap.apply(this, arguments); + + //make sure we dont already have an arg parser attached + for(var i=0, len=this.map.controls.length; i + */ +OpenLayers.Control.Attribution = + OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: seperator + * {String} String used to seperate layers. + */ + separator: ", ", + + /** + * Constructor: OpenLayers.Control.Attribution + * + * Parameters: + * options - {Object} Options for control. + */ + + /** + * Method: destroy + * Destroy control. + */ + destroy: function() { + this.map.events.un({ + "removelayer": this.updateAttribution, + "addlayer": this.updateAttribution, + "changelayer": this.updateAttribution, + "changebaselayer": this.updateAttribution, + scope: this + }); + + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: draw + * Initialize control. + * + * Returns: + * {DOMElement} A reference to the DIV DOMElement containing the control + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + + this.map.events.on({ + 'changebaselayer': this.updateAttribution, + 'changelayer': this.updateAttribution, + 'addlayer': this.updateAttribution, + 'removelayer': this.updateAttribution, + scope: this + }); + this.updateAttribution(); + + return this.div; + }, + + /** + * Method: updateAttribution + * Update attribution string. + */ + updateAttribution: function() { + var attributions = []; + if (this.map && this.map.layers) { + for(var i=0, len=this.map.layers.length; i. + * When clicked, the function trigger() is executed. + * + * Inherits from: + * - + * + * Use: + * (code) + * var button = new OpenLayers.Control.Button({ + * displayClass: "MyButton", trigger: myFunction + * }); + * panel.addControls([button]); + * (end) + * + * Will create a button with CSS class MyButtonItemInactive, that + * will call the function MyFunction() when clicked. + */ +OpenLayers.Control.Button = OpenLayers.Class(OpenLayers.Control, { + /** + * Property: type + * {Integer} OpenLayers.Control.TYPE_BUTTON. + */ + type: OpenLayers.Control.TYPE_BUTTON, + + /** + * Method: trigger + * Called by a control panel when the button is clicked. + */ + trigger: function() {}, + + CLASS_NAME: "OpenLayers.Control.Button" +}); diff --git a/openlayers/lib/OpenLayers/Control/DragFeature.js b/openlayers/lib/OpenLayers/Control/DragFeature.js new file mode 100644 index 0000000000..012ac76142 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/DragFeature.js @@ -0,0 +1,366 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Handler/Drag.js + * @requires OpenLayers/Handler/Feature.js + */ + +/** + * Class: OpenLayers.Control.DragFeature + * The DragFeature control moves a feature with a drag of the mouse. Create a + * new control with the constructor. + * + * Inherits From: + * - + */ +OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: geometryTypes + * {Array(String)} To restrict dragging to a limited set of geometry types, + * send a list of strings corresponding to the geometry class names. + */ + geometryTypes: null, + + /** + * APIProperty: onStart + * {Function} Define this function if you want to know when a drag starts. + * The function should expect to receive two arguments: the feature + * that is about to be dragged and the pixel location of the mouse. + * + * Parameters: + * feature - {} The feature that is about to be + * dragged. + * pixel - {} The pixel location of the mouse. + */ + onStart: function(feature, pixel) {}, + + /** + * APIProperty: onDrag + * {Function} Define this function if you want to know about each move of a + * feature. The function should expect to receive two arguments: the + * feature that is being dragged and the pixel location of the mouse. + * + * Parameters: + * feature - {} The feature that was dragged. + * pixel - {} The pixel location of the mouse. + */ + onDrag: function(feature, pixel) {}, + + /** + * APIProperty: onComplete + * {Function} Define this function if you want to know when a feature is + * done dragging. The function should expect to receive two arguments: + * the feature that is being dragged and the pixel location of the + * mouse. + * + * Parameters: + * feature - {} The feature that was dragged. + * pixel - {} The pixel location of the mouse. + */ + onComplete: function(feature, pixel) {}, + + /** + * APIProperty: onEnter + * {Function} Define this function if you want to know when the mouse + * goes over a feature and thereby makes this feature a candidate + * for dragging. + * + * Parameters: + * feature - {} The feature that is ready + * to be dragged. + */ + onEnter: function(feature) {}, + + /** + * APIProperty: onLeave + * {Function} Define this function if you want to know when the mouse + * goes out of the feature that was dragged. + * + * Parameters: + * feature - {} The feature that was dragged. + */ + onLeave: function(feature) {}, + + /** + * APIProperty: documentDrag + * {Boolean} If set to true, mouse dragging will continue even if the + * mouse cursor leaves the map viewport. Default is false. + */ + documentDrag: false, + + /** + * Property: layer + * {} + */ + layer: null, + + /** + * Property: feature + * {} + */ + feature: null, + + /** + * Property: dragCallbacks + * {Object} The functions that are sent to the drag handler for callback. + */ + dragCallbacks: {}, + + /** + * Property: featureCallbacks + * {Object} The functions that are sent to the feature handler for callback. + */ + featureCallbacks: {}, + + /** + * Property: lastPixel + * {} + */ + lastPixel: null, + + /** + * Constructor: OpenLayers.Control.DragFeature + * Create a new control to drag features. + * + * Parameters: + * layer - {} The layer containing features to be + * dragged. + * options - {Object} Optional object whose properties will be set on the + * control. + */ + initialize: function(layer, options) { + OpenLayers.Control.prototype.initialize.apply(this, [options]); + this.layer = layer; + this.handlers = { + drag: new OpenLayers.Handler.Drag( + this, OpenLayers.Util.extend({ + down: this.downFeature, + move: this.moveFeature, + up: this.upFeature, + out: this.cancel, + done: this.doneDragging + }, this.dragCallbacks), { + documentDrag: this.documentDrag + } + ), + feature: new OpenLayers.Handler.Feature( + this, this.layer, OpenLayers.Util.extend({ + // 'click' and 'clickout' callback are for the mobile + // support: no 'over' or 'out' in touch based browsers. + click: this.clickFeature, + clickout: this.clickoutFeature, + over: this.overFeature, + out: this.outFeature + }, this.featureCallbacks), + {geometryTypes: this.geometryTypes} + ) + }; + }, + + /** + * Method: clickFeature + * Called when the feature handler detects a click-in on a feature. + * + * Parameters: + * feature - {} + */ + clickFeature: function(feature) { + if (this.handlers.feature.touch && !this.over && this.overFeature(feature)) { + this.handlers.drag.dragstart(this.handlers.feature.evt); + // to let the events propagate to the feature handler (click callback) + this.handlers.drag.stopDown = false; + } + }, + + /** + * Method: clickoutFeature + * Called when the feature handler detects a click-out on a feature. + * + * Parameters: + * feature - {} + */ + clickoutFeature: function(feature) { + if (this.handlers.feature.touch && this.over) { + this.outFeature(feature); + this.handlers.drag.stopDown = true; + } + }, + + /** + * APIMethod: destroy + * Take care of things that are not handled in superclass + */ + destroy: function() { + this.layer = null; + OpenLayers.Control.prototype.destroy.apply(this, []); + }, + + /** + * APIMethod: activate + * Activate the control and the feature handler. + * + * Returns: + * {Boolean} Successfully activated the control and feature handler. + */ + activate: function() { + return (this.handlers.feature.activate() && + OpenLayers.Control.prototype.activate.apply(this, arguments)); + }, + + /** + * APIMethod: deactivate + * Deactivate the control and all handlers. + * + * Returns: + * {Boolean} Successfully deactivated the control. + */ + deactivate: function() { + // the return from the handlers is unimportant in this case + this.handlers.drag.deactivate(); + this.handlers.feature.deactivate(); + this.feature = null; + this.dragging = false; + this.lastPixel = null; + OpenLayers.Element.removeClass( + this.map.viewPortDiv, this.displayClass + "Over" + ); + return OpenLayers.Control.prototype.deactivate.apply(this, arguments); + }, + + /** + * Method: overFeature + * Called when the feature handler detects a mouse-over on a feature. + * This activates the drag handler. + * + * Parameters: + * feature - {} The selected feature. + * + * Returns: + * {Boolean} Successfully activated the drag handler. + */ + overFeature: function(feature) { + var activated = false; + if(!this.handlers.drag.dragging) { + this.feature = feature; + this.handlers.drag.activate(); + activated = true; + this.over = true; + OpenLayers.Element.addClass(this.map.viewPortDiv, this.displayClass + "Over"); + this.onEnter(feature); + } else { + if(this.feature.id == feature.id) { + this.over = true; + } else { + this.over = false; + } + } + return activated; + }, + + /** + * Method: downFeature + * Called when the drag handler detects a mouse-down. + * + * Parameters: + * pixel - {} Location of the mouse event. + */ + downFeature: function(pixel) { + this.lastPixel = pixel; + this.onStart(this.feature, pixel); + }, + + /** + * Method: moveFeature + * Called when the drag handler detects a mouse-move. Also calls the + * optional onDrag method. + * + * Parameters: + * pixel - {} Location of the mouse event. + */ + moveFeature: function(pixel) { + var res = this.map.getResolution(); + this.feature.geometry.move(res * (pixel.x - this.lastPixel.x), + res * (this.lastPixel.y - pixel.y)); + this.layer.drawFeature(this.feature); + this.lastPixel = pixel; + this.onDrag(this.feature, pixel); + }, + + /** + * Method: upFeature + * Called when the drag handler detects a mouse-up. + * + * Parameters: + * pixel - {} Location of the mouse event. + */ + upFeature: function(pixel) { + if(!this.over) { + this.handlers.drag.deactivate(); + } + }, + + /** + * Method: doneDragging + * Called when the drag handler is done dragging. + * + * Parameters: + * pixel - {} The last event pixel location. If this event + * came from a mouseout, this may not be in the map viewport. + */ + doneDragging: function(pixel) { + this.onComplete(this.feature, pixel); + }, + + /** + * Method: outFeature + * Called when the feature handler detects a mouse-out on a feature. + * + * Parameters: + * feature - {} The feature that the mouse left. + */ + outFeature: function(feature) { + if(!this.handlers.drag.dragging) { + this.over = false; + this.handlers.drag.deactivate(); + OpenLayers.Element.removeClass( + this.map.viewPortDiv, this.displayClass + "Over" + ); + this.onLeave(feature); + this.feature = null; + } else { + if(this.feature.id == feature.id) { + this.over = false; + } + } + }, + + /** + * Method: cancel + * Called when the drag handler detects a mouse-out (from the map viewport). + */ + cancel: function() { + this.handlers.drag.deactivate(); + this.over = false; + }, + + /** + * Method: setMap + * Set the map property for the control and all handlers. + * + * Parameters: + * map - {} The control's map. + */ + setMap: function(map) { + this.handlers.drag.setMap(map); + this.handlers.feature.setMap(map); + OpenLayers.Control.prototype.setMap.apply(this, arguments); + }, + + CLASS_NAME: "OpenLayers.Control.DragFeature" +}); diff --git a/openlayers/lib/OpenLayers/Control/DragPan.js b/openlayers/lib/OpenLayers/Control/DragPan.js new file mode 100644 index 0000000000..b46c15e36a --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/DragPan.js @@ -0,0 +1,153 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Handler/Drag.js + */ + +/** + * Class: OpenLayers.Control.DragPan + * The DragPan control pans the map with a drag of the mouse. + * + * Inherits from: + * - + */ +OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: type + * {OpenLayers.Control.TYPES} + */ + type: OpenLayers.Control.TYPE_TOOL, + + /** + * Property: panned + * {Boolean} The map moved. + */ + panned: false, + + /** + * Property: interval + * {Integer} The number of milliseconds that should ellapse before + * panning the map again. Defaults to 1 millisecond. In most cases + * you won't want to change this value. For slow machines/devices + * larger values can be tried out. + */ + interval: 1, + + /** + * APIProperty: documentDrag + * {Boolean} If set to true, mouse dragging will continue even if the + * mouse cursor leaves the map viewport. Default is false. + */ + documentDrag: false, + + /** + * Property: kinetic + * {OpenLayers.Kinetic} The OpenLayers.Kinetic object. + */ + kinetic: null, + + /** + * APIProperty: enableKinetic + * {Boolean} Set this option to enable "kinetic dragging". Can be + * set to true or to an object. If set to an object this + * object will be passed to the {} + * constructor. Defaults to false. + */ + enableKinetic: false, + + /** + * APIProperty: kineticInterval + * {Integer} Interval in milliseconds between 2 steps in the "kinetic + * scrolling". Applies only if enableKinetic is set. Defaults + * to 10 milliseconds. + */ + kineticInterval: 10, + + + /** + * Method: draw + * Creates a Drag handler, using and + * as callbacks. + */ + draw: function() { + if(this.enableKinetic) { + var config = {interval: this.kineticInterval}; + if(typeof this.enableKinetic === "object") { + config = OpenLayers.Util.extend(config, this.enableKinetic); + } + this.kinetic = new OpenLayers.Kinetic(config); + } + this.handler = new OpenLayers.Handler.Drag(this, { + "move": this.panMap, + "done": this.panMapDone, + "down": this.panMapStart + }, { + interval: this.interval, + documentDrag: this.documentDrag + } + ); + }, + + /** + * Method: panMapStart + */ + panMapStart: function() { + if(this.kinetic) { + this.kinetic.begin(); + } + }, + + /** + * Method: panMap + * + * Parameters: + * xy - {} Pixel of the mouse position + */ + panMap: function(xy) { + if(this.kinetic) { + this.kinetic.update(xy); + } + this.panned = true; + this.map.pan( + this.handler.last.x - xy.x, + this.handler.last.y - xy.y, + {dragging: true, animate: false} + ); + }, + + /** + * Method: panMapDone + * Finish the panning operation. Only call setCenter (through ) + * if the map has actually been moved. + * + * Parameters: + * xy - {} Pixel of the mouse position + */ + panMapDone: function(xy) { + if(this.panned) { + var res = null; + if (this.kinetic) { + res = this.kinetic.end(xy); + } + this.map.pan( + this.handler.last.x - xy.x, + this.handler.last.y - xy.y, + {dragging: !!res, animate: false} + ); + if (res) { + var self = this; + this.kinetic.move(res, function(x, y, end) { + self.map.pan(x, y, {dragging: !end, animate: false}); + }); + } + this.panned = false; + } + }, + + CLASS_NAME: "OpenLayers.Control.DragPan" +}); diff --git a/openlayers/lib/OpenLayers/Control/DrawFeature.js b/openlayers/lib/OpenLayers/Control/DrawFeature.js new file mode 100644 index 0000000000..eb843293f5 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/DrawFeature.js @@ -0,0 +1,226 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Feature/Vector.js + */ + +/** + * Class: OpenLayers.Control.DrawFeature + * The DrawFeature control draws point, line or polygon features on a vector + * layer when active. + * + * Inherits from: + * - + */ +OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: layer + * {} + */ + layer: null, + + /** + * Property: callbacks + * {Object} The functions that are sent to the handler for callback + */ + callbacks: null, + + /** + * Constant: EVENT_TYPES + * + * Supported event types: + * featureadded - Triggered when a feature is added + */ + EVENT_TYPES: ["featureadded"], + + /** + * APIProperty: multi + * {Boolean} Cast features to multi-part geometries before passing to the + * layer. Default is false. + */ + multi: false, + + /** + * APIProperty: featureAdded + * {Function} Called after each feature is added + */ + featureAdded: function() {}, + + /** + * APIProperty: handlerOptions + * {Object} Used to set non-default properties on the control's handler + */ + handlerOptions: null, + + /** + * Constructor: OpenLayers.Control.DrawFeature + * + * Parameters: + * layer - {} + * handler - {} + * options - {Object} + */ + initialize: function(layer, handler, options) { + + // concatenate events specific to vector with those from the base + this.EVENT_TYPES = + OpenLayers.Control.DrawFeature.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + + OpenLayers.Control.prototype.initialize.apply(this, [options]); + this.callbacks = OpenLayers.Util.extend( + { + done: this.drawFeature, + modify: function(vertex, feature) { + this.layer.events.triggerEvent( + "sketchmodified", {vertex: vertex, feature: feature} + ); + }, + create: function(vertex, feature) { + this.layer.events.triggerEvent( + "sketchstarted", {vertex: vertex, feature: feature} + ); + } + }, + this.callbacks + ); + this.layer = layer; + this.handlerOptions = this.handlerOptions || {}; + if (!("multi" in this.handlerOptions)) { + this.handlerOptions.multi = this.multi; + } + var sketchStyle = this.layer.styleMap && this.layer.styleMap.styles.temporary; + if(sketchStyle) { + this.handlerOptions.layerOptions = OpenLayers.Util.applyDefaults( + this.handlerOptions.layerOptions, + {styleMap: new OpenLayers.StyleMap({"default": sketchStyle})} + ); + } + this.handler = new handler(this, this.callbacks, this.handlerOptions); + }, + + /** + * Method: drawFeature + */ + drawFeature: function(geometry) { + var feature = new OpenLayers.Feature.Vector(geometry); + var proceed = this.layer.events.triggerEvent( + "sketchcomplete", {feature: feature} + ); + if(proceed !== false) { + feature.state = OpenLayers.State.INSERT; + this.layer.addFeatures([feature]); + this.featureAdded(feature); + this.events.triggerEvent("featureadded",{feature : feature}); + } + }, + + /** + * APIMethod: insertXY + * Insert a point in the current sketch given x & y coordinates. + * + * Parameters: + * x - {Number} The x-coordinate of the point. + * y - {Number} The y-coordinate of the point. + */ + insertXY: function(x, y) { + if (this.handler && this.handler.line) { + this.handler.insertXY(x, y); + } + }, + + /** + * APIMethod: insertDeltaXY + * Insert a point given offsets from the previously inserted point. + * + * Parameters: + * dx - {Number} The x-coordinate offset of the point. + * dy - {Number} The y-coordinate offset of the point. + */ + insertDeltaXY: function(dx, dy) { + if (this.handler && this.handler.line) { + this.handler.insertDeltaXY(dx, dy); + } + }, + + /** + * APIMethod: insertDirectionLength + * Insert a point in the current sketch given a direction and a length. + * + * Parameters: + * direction - {Number} Degrees clockwise from the positive x-axis. + * length - {Number} Distance from the previously drawn point. + */ + insertDirectionLength: function(direction, length) { + if (this.handler && this.handler.line) { + this.handler.insertDirectionLength(direction, length); + } + }, + + /** + * APIMethod: insertDeflectionLength + * Insert a point in the current sketch given a deflection and a length. + * The deflection should be degrees clockwise from the previously + * digitized segment. + * + * Parameters: + * deflection - {Number} Degrees clockwise from the previous segment. + * length - {Number} Distance from the previously drawn point. + */ + insertDeflectionLength: function(deflection, length) { + if (this.handler && this.handler.line) { + this.handler.insertDeflectionLength(deflection, length); + } + }, + + /** + * APIMethod: undo + * Remove the most recently added point in the current sketch geometry. + * + * Returns: + * {Boolean} An edit was undone. + */ + undo: function() { + return this.handler.undo && this.handler.undo(); + }, + + /** + * APIMethod: redo + * Reinsert the most recently removed point resulting from an call. + * The undo stack is deleted whenever a point is added by other means. + * + * Returns: + * {Boolean} An edit was redone. + */ + redo: function() { + return this.handler.redo && this.handler.redo(); + }, + + /** + * APIMethod: finishSketch + * Finishes the sketch without including the currently drawn point. + * This method can be called to terminate drawing programmatically + * instead of waiting for the user to end the sketch. + */ + finishSketch: function() { + this.handler.finishGeometry(); + }, + + /** + * APIMethod: cancel + * Cancel the current sketch. This removes the current sketch and keeps + * the drawing control active. + */ + cancel: function() { + this.handler.cancel(); + }, + + CLASS_NAME: "OpenLayers.Control.DrawFeature" +}); diff --git a/openlayers/lib/OpenLayers/Control/EditingToolbar.js b/openlayers/lib/OpenLayers/Control/EditingToolbar.js new file mode 100644 index 0000000000..b56188b36b --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/EditingToolbar.js @@ -0,0 +1,65 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control/Panel.js + * @requires OpenLayers/Control/Navigation.js + * @requires OpenLayers/Control/DrawFeature.js + * @requires OpenLayers/Handler/Point.js + * @requires OpenLayers/Handler/Path.js + * @requires OpenLayers/Handler/Polygon.js + */ + +/** + * Class: OpenLayers.Control.EditingToolbar + * The EditingToolbar is a panel of 4 controls to draw polygons, lines, + * points, or to navigate the map by panning. By default it appears in the + * upper right corner of the map. + * + * Inherits from: + * - + */ +OpenLayers.Control.EditingToolbar = OpenLayers.Class( + OpenLayers.Control.Panel, { + + /** + * Constructor: OpenLayers.Control.EditingToolbar + * Create an editing toolbar for a given layer. + * + * Parameters: + * layer - {} + * options - {Object} + */ + initialize: function(layer, options) { + OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]); + + this.addControls( + [ new OpenLayers.Control.Navigation() ] + ); + var controls = [ + new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Point, {'displayClass': 'olControlDrawFeaturePoint'}), + new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Path, {'displayClass': 'olControlDrawFeaturePath'}), + new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Polygon, {'displayClass': 'olControlDrawFeaturePolygon'}) + ]; + this.addControls(controls); + }, + + /** + * Method: draw + * calls the default draw, and then activates mouse defaults. + * + * Returns: + * {DOMElement} + */ + draw: function() { + var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments); + if (this.defaultControl === null) { + this.defaultControl = this.controls[0]; + } + return div; + }, + + CLASS_NAME: "OpenLayers.Control.EditingToolbar" +}); diff --git a/openlayers/lib/OpenLayers/Control/Geolocate.js b/openlayers/lib/OpenLayers/Control/Geolocate.js new file mode 100644 index 0000000000..6745ab7595 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/Geolocate.js @@ -0,0 +1,180 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Projection.js + */ + +/** + * Class: OpenLayers.Control.Geolocate + * The Geolocate control wraps w3c geolocation API into control that can be + * bound to a map, and generate events on location update + * + * To use this control requires to load the proj4js library if the projection + * of the map is not EPSG:4326 or EPSG:900913. + * + * Inherits from: + * - + */ +OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, { + + /** + * Constant: EVENT_TYPES + * Supported event types: + * - *locationupdated* Triggered when browser return a new position + * - *locationfailed* Triggered when geolocation has failed + * - *locationuncapable* Triggered when control is activated on a browser + * which doesn't support geolocation + */ + EVENT_TYPES: ["locationupdated", "locationfailed", "locationuncapable"], + + /** + * Property: geolocation + * {Object} The geolocation engine, as a property to be possibly mocked. + */ + geolocation: navigator.geolocation, + + /** + * APIProperty: bind + * {Boolean} If true, map center will be set on location update. + */ + bind: true, + + /** + * APIProperty: watch + * {Boolean} If true, position will be update regularly. + */ + watch: false, + + /** + * APIProperty: geolocationOptions + * {Object} Options to pass to the navigator's geolocation API. See + * . No specific + * option is passed to the geolocation API by default. + */ + geolocationOptions: null, + + /** + * Constructor: OpenLayers.Control.Geolocate + * Create a new control to deal with browser geolocation API + * + */ + initialize: function(options) { + // concatenate events specific to this control with those from the base + this.EVENT_TYPES = + OpenLayers.Control.Geolocate.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + this.geolocationOptions = {}; + OpenLayers.Control.prototype.initialize.apply(this, [options]); + }, + + /** + * Method: destroy + */ + destroy: function() { + this.deactivate(); + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: activate + * Activates the control. + * + * Returns: + * {Boolean} The control was effectively activated. + */ + activate: function () { + if (!this.geolocation) { + this.events.triggerEvent("locationuncapable"); + return false; + } + if (OpenLayers.Control.prototype.activate.apply(this, arguments)) { + if (this.watch) { + this.watchId = this.geolocation.watchPosition( + OpenLayers.Function.bind(this.geolocate, this), + OpenLayers.Function.bind(this.failure, this), + this.geolocationOptions + ); + } else { + this.getCurrentLocation(); + } + return true; + } + return false; + }, + + /** + * Method: deactivate + * Deactivates the control. + * + * Returns: + * {Boolean} The control was effectively deactivated. + */ + deactivate: function () { + if (this.active && this.watchId !== null) { + this.geolocation.clearWatch(this.watchId); + } + return OpenLayers.Control.prototype.deactivate.apply( + this, arguments + ); + }, + + /** + * Method: geolocate + * Activates the control. + * + */ + geolocate: function (position) { + var center = new OpenLayers.LonLat( + position.coords.longitude, + position.coords.latitude + ).transform( + new OpenLayers.Projection("EPSG:4326"), + this.map.getProjectionObject() + ); + if (this.bind) { + this.map.setCenter(center); + } + this.events.triggerEvent("locationupdated", { + position: position, + point: new OpenLayers.Geometry.Point( + center.lon, center.lat + ) + }); + }, + + /** + * APIMethod: getCurrentLocation + * + * Returns: + * {Boolean} Returns true if a event will be fired (successfull + * registration) + */ + getCurrentLocation: function() { + if (!this.active || this.watch) { + return false; + } + this.geolocation.getCurrentPosition( + OpenLayers.Function.bind(this.geolocate, this), + OpenLayers.Function.bind(this.failure, this), + this.geolocationOptions + ); + return true; + }, + + /** + * Method: failure + * method called on browser's geolocation failure + * + */ + failure: function (error) { + this.events.triggerEvent("locationfailed", {error: error}); + }, + + CLASS_NAME: "OpenLayers.Control.Geolocate" +}); diff --git a/openlayers/lib/OpenLayers/Control/GetFeature.js b/openlayers/lib/OpenLayers/Control/GetFeature.js new file mode 100644 index 0000000000..ee2896db13 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/GetFeature.js @@ -0,0 +1,596 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Handler/Click.js + * @requires OpenLayers/Handler/Box.js + * @requires OpenLayers/Handler/Hover.js + * @requires OpenLayers/Filter/Spatial.js + */ + +/** + * Class: OpenLayers.Control.GetFeature + * Gets vector features for locations underneath the mouse cursor. Can be + * configured to act on click, hover or dragged boxes. Uses an + * that supports spatial filters to retrieve + * features from a server and fires events that notify applications of the + * selected features. + * + * Inherits from: + * - + */ +OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: protocol + * {} Required. The protocol used for fetching + * features. + */ + protocol: null, + + /** + * APIProperty: multipleKey + * {String} An event modifier ('altKey' or 'shiftKey') that temporarily sets + * the property to true. Default is null. + */ + multipleKey: null, + + /** + * APIProperty: toggleKey + * {String} An event modifier ('altKey' or 'shiftKey') that temporarily sets + * the property to true. Default is null. + */ + toggleKey: null, + + /** + * Property: modifiers + * {Object} The event modifiers to use, according to the current event + * being handled by this control's handlers + */ + modifiers: null, + + /** + * APIProperty: multiple + * {Boolean} Allow selection of multiple geometries. Default is false. + */ + multiple: false, + + /** + * APIProperty: click + * {Boolean} Use a click handler for selecting/unselecting features. If + * both and are set to true, the click handler takes + * precedence over the box handler if a box with zero extent was + * selected. Default is true. + */ + click: true, + + /** + * APIProperty: single + * {Boolean} Tells whether select by click should select a single + * feature. If set to false, all matching features are selected. + * If set to true, only the best matching feature is selected. + * This option has an effect only of the option is set + * to true. Default is true. + */ + single: true, + + /** + * APIProperty: clickout + * {Boolean} Unselect features when clicking outside any feature. + * Applies only if is true. Default is true. + */ + clickout: true, + + /** + * APIProperty: toggle + * {Boolean} Unselect a selected feature on click. Applies only if + * is true. Default is false. + */ + toggle: false, + + /** + * APIProperty: clickTolerance + * {Integer} Tolerance for the filter query in pixels. This has the + * same effect as the tolerance parameter on WMS GetFeatureInfo + * requests. Will be ignored for box selections. Applies only if + * or is true. Default is 5. Note that this not + * only affects requests on click, but also on hover. + */ + clickTolerance: 5, + + /** + * APIProperty: hover + * {Boolean} Send feature requests on mouse moves. Default is false. + */ + hover: false, + + /** + * APIProperty: box + * {Boolean} Allow feature selection by drawing a box. If set to + * true set to false to disable the click handler and + * rely on the box handler only, even for "zero extent" boxes. + * See the description of the option for additional + * information. Default is false. + */ + box: false, + + /** + * APIProperty: maxFeatures + * {Integer} Maximum number of features to return from a query in single mode + * if supported by the . This set of features is then used to + * determine the best match client-side. Default is 10. + */ + maxFeatures: 10, + + /** + * Property: features + * {Object} Hash of {}, keyed by fid, holding + * the currently selected features + */ + features: null, + + /** + * Proeprty: hoverFeature + * {} The feature currently selected by the + * hover handler + */ + hoverFeature: null, + + /** + * APIProperty: handlerOptions + * {Object} Additional options for the handlers used by this control. This + * is a hash with the keys "click", "box" and "hover". + */ + handlerOptions: null, + + /** + * Property: handlers + * {Object} Object with references to multiple + * instances. + */ + handlers: null, + + /** + * Property: hoverResponse + * {} The response object associated with + * the currently running hover request (if any). + */ + hoverResponse: null, + + /** + * Property: filterType + * {} The type of filter to use when sending off a request. + * Possible values: + * OpenLayers.Filter.Spatial. + * Defaults to: OpenLayers.Filter.Spatial.BBOX + */ + filterType: OpenLayers.Filter.Spatial.BBOX, + + /** + * Constant: EVENT_TYPES + * + * Supported event types: + * beforefeatureselected - Triggered when is true before a + * feature is selected. The event object has a feature property with + * the feature about to select + * featureselected - Triggered when is true and a feature is + * selected. The event object has a feature property with the + * selected feature + * beforefeaturesselected - Triggered when is true before a + * set of features is selected. The event object is an array of + * feature properties with the features about to be selected. + * Return false after receiving this event to discontinue processing + * of all featureselected events and the featuresselected event. + * featuresselected - Triggered when is true and a set of + * features is selected. The event object is an array of feature + * properties of the selected features + * featureunselected - Triggered when is true and a feature is + * unselected. The event object has a feature property with the + * unselected feature + * clickout - Triggered when when is true and no feature was + * selected. + * hoverfeature - Triggered when is true and the mouse has + * stopped over a feature + * outfeature - Triggered when is true and the mouse moves + * moved away from a hover-selected feature + */ + EVENT_TYPES: ["featureselected", "featuresselected", "featureunselected", + "clickout", "beforefeatureselected", "beforefeaturesselected", + "hoverfeature", "outfeature"], + + /** + * Constructor: OpenLayers.Control.GetFeature + * Create a new control for fetching remote features. + * + * Parameters: + * options - {Object} A configuration object which at least has to contain + * a property (if not, it has to be set before a request is + * made) + */ + initialize: function(options) { + // concatenate events specific to vector with those from the base + this.EVENT_TYPES = + OpenLayers.Control.GetFeature.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + + options.handlerOptions = options.handlerOptions || {}; + + OpenLayers.Control.prototype.initialize.apply(this, [options]); + + this.features = {}; + + this.handlers = {}; + + if(this.click) { + this.handlers.click = new OpenLayers.Handler.Click(this, + {click: this.selectClick}, this.handlerOptions.click || {}); + } + + if(this.box) { + this.handlers.box = new OpenLayers.Handler.Box( + this, {done: this.selectBox}, + OpenLayers.Util.extend(this.handlerOptions.box, { + boxDivClassName: "olHandlerBoxSelectFeature" + }) + ); + } + + if(this.hover) { + this.handlers.hover = new OpenLayers.Handler.Hover( + this, {'move': this.cancelHover, 'pause': this.selectHover}, + OpenLayers.Util.extend(this.handlerOptions.hover, { + 'delay': 250 + }) + ); + } + }, + + /** + * Method: activate + * Activates the control. + * + * Returns: + * {Boolean} The control was effectively activated. + */ + activate: function () { + if (!this.active) { + for(var i in this.handlers) { + this.handlers[i].activate(); + } + } + return OpenLayers.Control.prototype.activate.apply( + this, arguments + ); + }, + + /** + * Method: deactivate + * Deactivates the control. + * + * Returns: + * {Boolean} The control was effectively deactivated. + */ + deactivate: function () { + if (this.active) { + for(var i in this.handlers) { + this.handlers[i].deactivate(); + } + } + return OpenLayers.Control.prototype.deactivate.apply( + this, arguments + ); + }, + + /** + * Method: selectClick + * Called on click + * + * Parameters: + * evt - {} + */ + selectClick: function(evt) { + var bounds = this.pixelToBounds(evt.xy); + + this.setModifiers(evt); + this.request(bounds, {single: this.single}); + }, + + /** + * Method: selectBox + * Callback from the handlers.box set up when selection is on + * + * Parameters: + * position - {} + */ + selectBox: function(position) { + var bounds; + if (position instanceof OpenLayers.Bounds) { + var minXY = this.map.getLonLatFromPixel( + new OpenLayers.Pixel(position.left, position.bottom) + ); + var maxXY = this.map.getLonLatFromPixel( + new OpenLayers.Pixel(position.right, position.top) + ); + bounds = new OpenLayers.Bounds( + minXY.lon, minXY.lat, maxXY.lon, maxXY.lat + ); + + } else { + if(this.click) { + // box without extent - let the click handler take care of it + return; + } + bounds = this.pixelToBounds(position); + } + this.setModifiers(this.handlers.box.dragHandler.evt); + this.request(bounds); + }, + + /** + * Method selectHover + * Callback from the handlers.hover set up when selection is on + * + * Parameters: + * evt {Object} - event object with an xy property + */ + selectHover: function(evt) { + var bounds = this.pixelToBounds(evt.xy); + this.request(bounds, {single: true, hover: true}); + }, + + /** + * Method: cancelHover + * Callback from the handlers.hover set up when selection is on + */ + cancelHover: function() { + if (this.hoverResponse) { + this.protocol.abort(this.hoverResponse); + this.hoverResponse = null; + + OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait"); + } + }, + + /** + * Method: request + * Sends a GetFeature request to the WFS + * + * Parameters: + * bounds - {} bounds for the request's BBOX filter + * options - {Object} additional options for this method. + * + * Supported options include: + * single - {Boolean} A single feature should be returned. + * Note that this will be ignored if the protocol does not + * return the geometries of the features. + * hover - {Boolean} Do the request for the hover handler. + */ + request: function(bounds, options) { + options = options || {}; + var filter = new OpenLayers.Filter.Spatial({ + type: this.filterType, + value: bounds + }); + + // Set the cursor to "wait" to tell the user we're working. + OpenLayers.Element.addClass(this.map.viewPortDiv, "olCursorWait"); + + var response = this.protocol.read({ + maxFeatures: options.single == true ? this.maxFeatures : undefined, + filter: filter, + callback: function(result) { + if(result.success()) { + if(result.features.length) { + if(options.single == true) { + this.selectBestFeature(result.features, + bounds.getCenterLonLat(), options); + } else { + this.select(result.features); + } + } else if(options.hover) { + this.hoverSelect(); + } else { + this.events.triggerEvent("clickout"); + if(this.clickout) { + this.unselectAll(); + } + } + } + // Reset the cursor. + OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait"); + }, + scope: this + }); + if(options.hover == true) { + this.hoverResponse = response; + } + }, + + /** + * Method: selectBestFeature + * Selects the feature from an array of features that is the best match + * for the click position. + * + * Parameters: + * features - {Array()} + * clickPosition - {} + * options - {Object} additional options for this method + * + * Supported options include: + * hover - {Boolean} Do the selection for the hover handler. + */ + selectBestFeature: function(features, clickPosition, options) { + options = options || {}; + if(features.length) { + var point = new OpenLayers.Geometry.Point(clickPosition.lon, + clickPosition.lat); + var feature, resultFeature, dist; + var minDist = Number.MAX_VALUE; + for(var i=0; i} + */ + setModifiers: function(evt) { + this.modifiers = { + multiple: this.multiple || (this.multipleKey && evt[this.multipleKey]), + toggle: this.toggle || (this.toggleKey && evt[this.toggleKey]) + }; + }, + + /** + * Method: select + * Add feature to the hash of selected features and trigger the + * featureselected and featuresselected events. + * + * Parameters: + * features - {} or an array of features + */ + select: function(features) { + if(!this.modifiers.multiple && !this.modifiers.toggle) { + this.unselectAll(); + } + if(!(OpenLayers.Util.isArray(features))) { + features = [features]; + } + + var cont = this.events.triggerEvent("beforefeaturesselected", { + features: features + }); + if(cont !== false) { + var selectedFeatures = []; + var feature; + for(var i=0, len=features.length; i + * + * Parameters: + * feature - {} the feature to hover-select. + * If none is provided, the current will be nulled and + * the outfeature event will be triggered. + */ + hoverSelect: function(feature) { + var fid = feature ? feature.fid || feature.id : null; + var hfid = this.hoverFeature ? + this.hoverFeature.fid || this.hoverFeature.id : null; + + if(hfid && hfid != fid) { + this.events.triggerEvent("outfeature", + {feature: this.hoverFeature}); + this.hoverFeature = null; + } + if(fid && fid != hfid) { + this.events.triggerEvent("hoverfeature", {feature: feature}); + this.hoverFeature = feature; + } + }, + + /** + * Method: unselect + * Remove feature from the hash of selected features and trigger the + * featureunselected event. + * + * Parameters: + * feature - {} + */ + unselect: function(feature) { + delete this.features[feature.fid || feature.id]; + this.events.triggerEvent("featureunselected", {feature: feature}); + }, + + /** + * Method: unselectAll + * Unselect all selected features. + */ + unselectAll: function() { + // we'll want an option to supress notification here + for(var fid in this.features) { + this.unselect(this.features[fid]); + } + }, + + /** + * Method: setMap + * Set the map property for the control. + * + * Parameters: + * map - {} + */ + setMap: function(map) { + for(var i in this.handlers) { + this.handlers[i].setMap(map); + } + OpenLayers.Control.prototype.setMap.apply(this, arguments); + }, + + /** + * Method: pixelToBounds + * Takes a pixel as argument and creates bounds after adding the + * . + * + * Parameters: + * pixel - {} + */ + pixelToBounds: function(pixel) { + var llPx = pixel.add(-this.clickTolerance/2, this.clickTolerance/2); + var urPx = pixel.add(this.clickTolerance/2, -this.clickTolerance/2); + var ll = this.map.getLonLatFromPixel(llPx); + var ur = this.map.getLonLatFromPixel(urPx); + return new OpenLayers.Bounds(ll.lon, ll.lat, ur.lon, ur.lat); + }, + + CLASS_NAME: "OpenLayers.Control.GetFeature" +}); diff --git a/openlayers/lib/OpenLayers/Control/Graticule.js b/openlayers/lib/OpenLayers/Control/Graticule.js new file mode 100644 index 0000000000..a3af87ffec --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/Graticule.js @@ -0,0 +1,374 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Lang.js + */ + +/** + * Class: OpenLayers.Control.Graticule + * The Graticule displays a grid of latitude/longitude lines reprojected on + * the map. + * + * Inherits from: + * - + * + */ +OpenLayers.Control.Graticule = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: autoActivate + * {Boolean} Activate the control when it is added to a map. Default is + * true. + */ + autoActivate: true, + + /** + * APIProperty: intervals + * {Array(Float)} A list of possible graticule widths in degrees. + */ + intervals: [ 45, 30, 20, 10, 5, 2, 1, + 0.5, 0.2, 0.1, 0.05, 0.01, + 0.005, 0.002, 0.001 ], + + /** + * APIProperty: displayInLayerSwitcher + * {Boolean} Allows the Graticule control to be switched on and off by + * LayerSwitcher control. Defaults is true. + */ + displayInLayerSwitcher: true, + + /** + * APIProperty: visible + * {Boolean} should the graticule be initially visible (default=true) + */ + visible: true, + + /** + * APIProperty: numPoints + * {Integer} The number of points to use in each graticule line. Higher + * numbers result in a smoother curve for projected maps + */ + numPoints: 50, + + /** + * APIProperty: targetSize + * {Integer} The maximum size of the grid in pixels on the map + */ + targetSize: 200, + + /** + * APIProperty: layerName + * {String} The name to be displayed in the layer switcher, default is set + * by {}. + */ + layerName: null, + + /** + * APIProperty: labelled + * {Boolean} Should the graticule lines be labelled?. default=true + */ + labelled: true, + + /** + * APIProperty: labelFormat + * {String} the format of the labels, default = 'dm'. See + * for other options. + */ + labelFormat: 'dm', + + /** + * APIProperty: lineSymbolizer + * {symbolizer} the symbolizer used to render lines + */ + lineSymbolizer: { + strokeColor: "#333", + strokeWidth: 1, + strokeOpacity: 0.5 + }, + + /** + * APIProperty: labelSymbolizer + * {symbolizer} the symbolizer used to render labels + */ + labelSymbolizer: {}, + + /** + * Property: gratLayer + * {OpenLayers.Layer.Vector} vector layer used to draw the graticule on + */ + gratLayer: null, + + /** + * Constructor: OpenLayers.Control.Graticule + * Create a new graticule control to display a grid of latitude longitude + * lines. + * + * Parameters: + * options - {Object} An optional object whose properties will be used + * to extend the control. + */ + initialize: function(options) { + options = options || {}; + options.layerName = options.layerName || OpenLayers.i18n("Graticule"); + OpenLayers.Control.prototype.initialize.apply(this, [options]); + + this.labelSymbolizer.stroke = false; + this.labelSymbolizer.fill = false; + this.labelSymbolizer.label = "${label}"; + this.labelSymbolizer.labelAlign = "${labelAlign}"; + this.labelSymbolizer.labelXOffset = "${xOffset}"; + this.labelSymbolizer.labelYOffset = "${yOffset}"; + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + this.deactivate(); + OpenLayers.Control.prototype.destroy.apply(this, arguments); + if (this.gratLayer) { + this.gratLayer.destroy(); + this.gratLayer = null; + } + }, + + /** + * Method: draw + * + * initializes the graticule layer and does the initial update + * + * Returns: + * {DOMElement} + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + if (!this.gratLayer) { + var gratStyle = new OpenLayers.Style({},{ + rules: [new OpenLayers.Rule({'symbolizer': + {"Point":this.labelSymbolizer, + "Line":this.lineSymbolizer} + })] + }); + this.gratLayer = new OpenLayers.Layer.Vector(this.layerName, { + styleMap: new OpenLayers.StyleMap({'default':gratStyle}), + visibility: this.visible, + displayInLayerSwitcher: this.displayInLayerSwitcher + }); + } + return this.div; + }, + + /** + * APIMethod: activate + */ + activate: function() { + if (OpenLayers.Control.prototype.activate.apply(this, arguments)) { + this.map.addLayer(this.gratLayer); + this.map.events.register('moveend', this, this.update); + this.update(); + return true; + } else { + return false; + } + }, + + /** + * APIMethod: deactivate + */ + deactivate: function() { + if (OpenLayers.Control.prototype.deactivate.apply(this, arguments)) { + this.map.events.unregister('moveend', this, this.update); + this.map.removeLayer(this.gratLayer); + return true; + } else { + return false; + } + }, + /** + * Method: update + * + * calculates the grid to be displayed and actually draws it + * + * Returns: + * {DOMElement} + */ + update: function() { + //wait for the map to be initialized before proceeding + var mapBounds = this.map.getExtent(); + if (!mapBounds) { + return; + } + + //clear out the old grid + this.gratLayer.destroyFeatures(); + + //get the projection objects required + var llProj = new OpenLayers.Projection("EPSG:4326"); + var mapProj = this.map.getProjectionObject(); + var mapRes = this.map.getResolution(); + + //if the map is in lon/lat, then the lines are straight and only one + //point is required + if (mapProj.proj && mapProj.proj.projName == "longlat") { + this.numPoints = 1; + } + + //get the map center in EPSG:4326 + var mapCenter = this.map.getCenter(); //lon and lat here are really map x and y + var mapCenterLL = new OpenLayers.Pixel(mapCenter.lon, mapCenter.lat); + OpenLayers.Projection.transform(mapCenterLL, mapProj, llProj); + + /* This block of code determines the lon/lat interval to use for the + * grid by calculating the diagonal size of one grid cell at the map + * center. Iterates through the intervals array until the diagonal + * length is less than the targetSize option. + */ + //find lat/lon interval that results in a grid of less than the target size + var testSq = this.targetSize*mapRes; + testSq *= testSq; //compare squares rather than doing a square root to save time + var llInterval; + for (var i=0; i= mapBounds.bottom && !labelPoint) { + labelPoint = gridPoint; + } + } + if (this.labelled) { + //keep track of when this grid line crosses the map bounds to set + //the label position + //labels along the bottom, add 10 pixel offset up into the map + //TODO add option for labels on top + var labelPos = new OpenLayers.Geometry.Point(labelPoint.x,mapBounds.bottom); + var labelAttrs = { + value: lon, + label: this.labelled?OpenLayers.Util.getFormattedLonLat(lon, "lon", this.labelFormat):"", + labelAlign: "cb", + xOffset: 0, + yOffset: 2 + }; + this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(labelPos,labelAttrs)); + } + var geom = new OpenLayers.Geometry.LineString(pointList); + lines.push(new OpenLayers.Feature.Vector(geom)); + } + + //now draw the lines of constant latitude + for (var j=0; j < centerLonPoints.length; ++j) { + lat = centerLonPoints[j].y; + if (lat<-90 || lat>90) { //latitudes only valid between -90 and 90 + continue; + } + var pointList = []; + var lonStart = centerLatPoints[0].x; + var lonEnd = centerLatPoints[centerLatPoints.length - 1].x; + var lonDelta = (lonEnd - lonStart)/this.numPoints; + var lon = lonStart; + var labelPoint = null; + for(var i=0; i <= this.numPoints ; ++i) { + var gridPoint = new OpenLayers.Geometry.Point(lon,lat); + gridPoint.transform(llProj, mapProj); + pointList.push(gridPoint); + lon += lonDelta; + if (gridPoint.x < mapBounds.right) { + labelPoint = gridPoint; + } + } + if (this.labelled) { + //keep track of when this grid line crosses the map bounds to set + //the label position + //labels along the right, 30 pixel offset left into the map + //TODO add option for labels on left + var labelPos = new OpenLayers.Geometry.Point(mapBounds.right, labelPoint.y); + var labelAttrs = { + value: lat, + label: this.labelled?OpenLayers.Util.getFormattedLonLat(lat, "lat", this.labelFormat):"", + labelAlign: "rb", + xOffset: -2, + yOffset: 2 + }; + this.gratLayer.addFeatures(new OpenLayers.Feature.Vector(labelPos,labelAttrs)); + } + var geom = new OpenLayers.Geometry.LineString(pointList); + lines.push(new OpenLayers.Feature.Vector(geom)); + } + this.gratLayer.addFeatures(lines); + }, + + CLASS_NAME: "OpenLayers.Control.Graticule" +}); + diff --git a/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js b/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js new file mode 100644 index 0000000000..22d9033abe --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js @@ -0,0 +1,112 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Handler/Keyboard.js + */ + +/** + * Class: OpenLayers.Control.KeyboardDefaults + * The KeyboardDefaults control adds panning and zooming functions, controlled + * with the keyboard. By default arrow keys pan, +/- keys zoom & Page Up/Page + * Down/Home/End scroll by three quarters of a page. + * + * This control has no visible appearance. + * + * Inherits from: + * - + */ +OpenLayers.Control.KeyboardDefaults = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: autoActivate + * {Boolean} Activate the control when it is added to a map. Default is + * true. + */ + autoActivate: true, + + /** + * APIProperty: slideFactor + * Pixels to slide by. + */ + slideFactor: 75, + + /** + * Constructor: OpenLayers.Control.KeyboardDefaults + */ + + /** + * Method: draw + * Create handler. + */ + draw: function() { + this.handler = new OpenLayers.Handler.Keyboard( this, { + "keydown": this.defaultKeyPress }); + }, + + /** + * Method: defaultKeyPress + * When handling the key event, we only use evt.keyCode. This holds + * some drawbacks, though we get around them below. When interpretting + * the keycodes below (including the comments associated with them), + * consult the URL below. For instance, the Safari browser returns + * "IE keycodes", and so is supported by any keycode labeled "IE". + * + * Very informative URL: + * http://unixpapa.com/js/key.html + * + * Parameters: + * code - {Integer} + */ + defaultKeyPress: function (evt) { + switch(evt.keyCode) { + case OpenLayers.Event.KEY_LEFT: + this.map.pan(-this.slideFactor, 0); + break; + case OpenLayers.Event.KEY_RIGHT: + this.map.pan(this.slideFactor, 0); + break; + case OpenLayers.Event.KEY_UP: + this.map.pan(0, -this.slideFactor); + break; + case OpenLayers.Event.KEY_DOWN: + this.map.pan(0, this.slideFactor); + break; + + case 33: // Page Up. Same in all browsers. + var size = this.map.getSize(); + this.map.pan(0, -0.75*size.h); + break; + case 34: // Page Down. Same in all browsers. + var size = this.map.getSize(); + this.map.pan(0, 0.75*size.h); + break; + case 35: // End. Same in all browsers. + var size = this.map.getSize(); + this.map.pan(0.75*size.w, 0); + break; + case 36: // Home. Same in all browsers. + var size = this.map.getSize(); + this.map.pan(-0.75*size.w, 0); + break; + + case 43: // +/= (ASCII), keypad + (ASCII, Opera) + case 61: // +/= (Mozilla, Opera, some ASCII) + case 187: // +/= (IE) + case 107: // keypad + (IE, Mozilla) + this.map.zoomIn(); + break; + case 45: // -/_ (ASCII, Opera), keypad - (ASCII, Opera) + case 109: // -/_ (Mozilla), keypad - (Mozilla, IE) + case 189: // -/_ (IE) + case 95: // -/_ (some ASCII) + this.map.zoomOut(); + break; + } + }, + + CLASS_NAME: "OpenLayers.Control.KeyboardDefaults" +}); diff --git a/openlayers/lib/OpenLayers/Control/LayerSwitcher.js b/openlayers/lib/OpenLayers/Control/LayerSwitcher.js new file mode 100644 index 0000000000..4186445688 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/LayerSwitcher.js @@ -0,0 +1,622 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Lang.js + * @requires Rico/Corner.js + */ + +/** + * Class: OpenLayers.Control.LayerSwitcher + * The LayerSwitcher control displays a table of contents for the map. This + * allows the user interface to switch between BaseLasyers and to show or hide + * Overlays. By default the switcher is shown minimized on the right edge of + * the map, the user may expand it by clicking on the handle. + * + * To create the LayerSwitcher outside of the map, pass the Id of a html div + * as the first argument to the constructor. + * + * Inherits from: + * - + */ +OpenLayers.Control.LayerSwitcher = + OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: roundedCorner + * {Boolean} If true the Rico library is used for rounding the corners + * of the layer switcher div, defaults to true. + */ + roundedCorner: true, + + /** + * APIProperty: roundedCornerColor + * {String} The color of the rounded corners, only applies if roundedCorner + * is true, defaults to "darkblue". + */ + roundedCornerColor: "darkblue", + + /** + * Property: layerStates + * {Array(Object)} Basically a copy of the "state" of the map's layers + * the last time the control was drawn. We have this in order to avoid + * unnecessarily redrawing the control. + */ + layerStates: null, + + + // DOM Elements + + /** + * Property: layersDiv + * {DOMElement} + */ + layersDiv: null, + + /** + * Property: baseLayersDiv + * {DOMElement} + */ + baseLayersDiv: null, + + /** + * Property: baseLayers + * {Array()} + */ + baseLayers: null, + + + /** + * Property: dataLbl + * {DOMElement} + */ + dataLbl: null, + + /** + * Property: dataLayersDiv + * {DOMElement} + */ + dataLayersDiv: null, + + /** + * Property: dataLayers + * {Array()} + */ + dataLayers: null, + + + /** + * Property: minimizeDiv + * {DOMElement} + */ + minimizeDiv: null, + + /** + * Property: maximizeDiv + * {DOMElement} + */ + maximizeDiv: null, + + /** + * APIProperty: ascending + * {Boolean} + */ + ascending: true, + + /** + * Constructor: OpenLayers.Control.LayerSwitcher + * + * Parameters: + * options - {Object} + */ + initialize: function(options) { + OpenLayers.Control.prototype.initialize.apply(this, arguments); + this.layerStates = []; + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + + OpenLayers.Event.stopObservingElement(this.div); + + OpenLayers.Event.stopObservingElement(this.minimizeDiv); + OpenLayers.Event.stopObservingElement(this.maximizeDiv); + + //clear out layers info and unregister their events + this.clearLayersArray("base"); + this.clearLayersArray("data"); + + this.map.events.un({ + "addlayer": this.redraw, + "changelayer": this.redraw, + "removelayer": this.redraw, + "changebaselayer": this.redraw, + scope: this + }); + + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: setMap + * + * Properties: + * map - {} + */ + setMap: function(map) { + OpenLayers.Control.prototype.setMap.apply(this, arguments); + + this.map.events.on({ + "addlayer": this.redraw, + "changelayer": this.redraw, + "removelayer": this.redraw, + "changebaselayer": this.redraw, + scope: this + }); + }, + + /** + * Method: draw + * + * Returns: + * {DOMElement} A reference to the DIV DOMElement containing the + * switcher tabs. + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this); + + // create layout divs + this.loadContents(); + + // set mode to minimize + if(!this.outsideViewport) { + this.minimizeControl(); + } + + // populate div with current info + this.redraw(); + + return this.div; + }, + + /** + * Method: clearLayersArray + * User specifies either "base" or "data". we then clear all the + * corresponding listeners, the div, and reinitialize a new array. + * + * Parameters: + * layersType - {String} + */ + clearLayersArray: function(layersType) { + var layers = this[layersType + "Layers"]; + if (layers) { + for(var i=0, len=layers.length; i} layerSwitcher + * - {} layer + */ + + onInputClick: function(e) { + + if (!this.inputElem.disabled) { + if (this.inputElem.type == "radio") { + this.inputElem.checked = true; + this.layer.map.setBaseLayer(this.layer); + } else { + this.inputElem.checked = !this.inputElem.checked; + this.layerSwitcher.updateMap(); + } + } + OpenLayers.Event.stop(e); + }, + + /** + * Method: onLayerClick + * Need to update the map accordingly whenever user clicks in either of + * the layers. + * + * Parameters: + * e - {Event} + */ + onLayerClick: function(e) { + this.updateMap(); + }, + + + /** + * Method: updateMap + * Cycles through the loaded data and base layer input arrays and makes + * the necessary calls to the Map object such that that the map's + * visual state corresponds to what the user has selected in + * the control. + */ + updateMap: function() { + + // set the newly selected base layer + for(var i=0, len=this.baseLayers.length; i + */ +OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, { + + /** + * Constant: EVENT_TYPES + * {Array(String)} Supported application event types. Register a listener + * for a particular event with the following syntax: + * (code) + * control.events.register(type, obj, listener); + * (end) + * + * Listeners will be called with a reference to an event object. The + * properties of this event depends on exactly what happened. + * + * Supported control event types (in addition to those from ): + * measure - Triggered when a measurement sketch is complete. Listeners + * will receive an event with measure, units, order, and geometry + * properties. + * measurepartial - Triggered when a new point is added to the + * measurement sketch or if the property is true and the + * measurement sketch is modified. Listeners receive an event with measure, + * units, order, and geometry. + */ + EVENT_TYPES: ['measure', 'measurepartial'], + + /** + * APIProperty: handlerOptions + * {Object} Used to set non-default properties on the control's handler + */ + handlerOptions: null, + + /** + * Property: callbacks + * {Object} The functions that are sent to the handler for callback + */ + callbacks: null, + + /** + * Property: displaySystem + * {String} Display system for output measurements. Supported values + * are 'english', 'metric', and 'geographic'. Default is 'metric'. + */ + displaySystem: 'metric', + + /** + * Property: geodesic + * {Boolean} Calculate geodesic metrics instead of planar metrics. This + * requires that geometries can be transformed into Geographic/WGS84 + * (if that is not already the map projection). Default is false. + */ + geodesic: false, + + /** + * Property: displaySystemUnits + * {Object} Units for various measurement systems. Values are arrays + * of unit abbreviations (from OpenLayers.INCHES_PER_UNIT) in decreasing + * order of length. + */ + displaySystemUnits: { + geographic: ['dd'], + english: ['mi', 'ft', 'in'], + metric: ['km', 'm'] + }, + + /** + * Property: delay + * {Number} Number of milliseconds between clicks before the event is + * considered a double-click. The "measurepartial" event will not + * be triggered if the sketch is completed within this time. This + * is required for IE where creating a browser reflow (if a listener + * is modifying the DOM by displaying the measurement values) messes + * with the dblclick listener in the sketch handler. + */ + partialDelay: 300, + + /** + * Property: delayedTrigger + * {Number} Timeout id of trigger for measurepartial. + */ + delayedTrigger: null, + + /** + * APIProperty: persist + * {Boolean} Keep the temporary measurement sketch drawn after the + * measurement is complete. The geometry will persist until a new + * measurement is started, the control is deactivated, or is + * called. + */ + persist: false, + + /** + * APIProperty: immediate + * {Boolean} Activates the immediate measurement so that the "measurepartial" + * event is also fired once the measurement sketch is modified. + * Default is false. + */ + immediate : false, + + /** + * Constructor: OpenLayers.Control.Measure + * + * Parameters: + * handler - {} + * options - {Object} + */ + initialize: function(handler, options) { + // concatenate events specific to measure with those from the base + this.EVENT_TYPES = + OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + OpenLayers.Control.prototype.initialize.apply(this, [options]); + var callbacks = {done: this.measureComplete, + point: this.measurePartial}; + if (this.immediate){ + callbacks.modify = this.measureImmediate; + } + this.callbacks = OpenLayers.Util.extend(callbacks, this.callbacks); + + // let the handler options override, so old code that passes 'persist' + // directly to the handler does not need an update + this.handlerOptions = OpenLayers.Util.extend( + {persist: this.persist}, this.handlerOptions + ); + this.handler = new handler(this, this.callbacks, this.handlerOptions); + }, + + /** + * APIMethod: deactivate + */ + deactivate: function() { + this.cancelDelay(); + return OpenLayers.Control.prototype.deactivate.apply(this, arguments); + }, + + /** + * APIMethod: cancel + * Stop the control from measuring. If is true, the temporary + * sketch will be erased. + */ + cancel: function() { + this.cancelDelay(); + this.handler.cancel(); + }, + + /** + * APIMethod: setImmediate + * Sets the property. Changes the activity of immediate + * measurement. + */ + setImmediate: function(immediate) { + this.immediate = immediate; + if (this.immediate){ + this.callbacks.modify = this.measureImmediate; + } else { + delete this.callbacks.modify; + } + }, + + /** + * Method: updateHandler + * + * Parameters: + * handler - {Function} One of the sketch handler constructors. + * options - {Object} Options for the handler. + */ + updateHandler: function(handler, options) { + var active = this.active; + if(active) { + this.deactivate(); + } + this.handler = new handler(this, this.callbacks, options); + if(active) { + this.activate(); + } + }, + + /** + * Method: measureComplete + * Called when the measurement sketch is done. + * + * Parameters: + * geometry - {} + */ + measureComplete: function(geometry) { + this.cancelDelay(); + this.measure(geometry, "measure"); + }, + + /** + * Method: measurePartial + * Called each time a new point is added to the measurement sketch. + * + * Parameters: + * point - {} The last point added. + * geometry - {} The sketch geometry. + */ + measurePartial: function(point, geometry) { + this.cancelDelay(); + geometry = geometry.clone(); + // when we're wating for a dblclick, we have to trigger measurepartial + // after some delay to deal with reflow issues in IE + if (this.handler.freehandMode(this.handler.evt)) { + // no dblclick in freehand mode + this.measure(geometry, "measurepartial"); + } else { + this.delayedTrigger = window.setTimeout( + OpenLayers.Function.bind(function() { + this.delayedTrigger = null; + this.measure(geometry, "measurepartial"); + }, this), + this.partialDelay + ); + } + }, + + /** + * Method: measureImmediate + * Called each time the measurement sketch is modified. + * + * Parameters: point - {} The point at the + * mouseposition. feature - {} The sketch feature. + */ + measureImmediate : function(point, feature, drawing) { + if (drawing && this.delayedTrigger === null && + !this.handler.freehandMode(this.handler.evt)) { + this.measure(feature.geometry, "measurepartial"); + } + }, + + /** + * Method: cancelDelay + * Cancels the delay measurement that measurePartial began. + */ + cancelDelay: function() { + if (this.delayedTrigger !== null) { + window.clearTimeout(this.delayedTrigger); + this.delayedTrigger = null; + } + }, + + /** + * Method: measure + * + * Parameters: + * geometry - {} + * eventType - {String} + */ + measure: function(geometry, eventType) { + var stat, order; + if(geometry.CLASS_NAME.indexOf('LineString') > -1) { + stat = this.getBestLength(geometry); + order = 1; + } else { + stat = this.getBestArea(geometry); + order = 2; + } + this.events.triggerEvent(eventType, { + measure: stat[0], + units: stat[1], + order: order, + geometry: geometry + }); + }, + + /** + * Method: getBestArea + * Based on the returns the area of a geometry. + * + * Parameters: + * geometry - {} + * + * Returns: + * {Array([Float, String])} Returns a two item array containing the + * area and the units abbreviation. + */ + getBestArea: function(geometry) { + var units = this.displaySystemUnits[this.displaySystem]; + var unit, area; + for(var i=0, len=units.length; i 1) { + break; + } + } + return [area, unit]; + }, + + /** + * Method: getArea + * + * Parameters: + * geometry - {} + * units - {String} Unit abbreviation + * + * Returns: + * {Float} The geometry area in the given units. + */ + getArea: function(geometry, units) { + var area, geomUnits; + if(this.geodesic) { + area = geometry.getGeodesicArea(this.map.getProjectionObject()); + geomUnits = "m"; + } else { + area = geometry.getArea(); + geomUnits = this.map.getUnits(); + } + var inPerDisplayUnit = OpenLayers.INCHES_PER_UNIT[units]; + if(inPerDisplayUnit) { + var inPerMapUnit = OpenLayers.INCHES_PER_UNIT[geomUnits]; + area *= Math.pow((inPerMapUnit / inPerDisplayUnit), 2); + } + return area; + }, + + /** + * Method: getBestLength + * Based on the returns the length of a geometry. + * + * Parameters: + * geometry - {} + * + * Returns: + * {Array([Float, String])} Returns a two item array containing the + * length and the units abbreviation. + */ + getBestLength: function(geometry) { + var units = this.displaySystemUnits[this.displaySystem]; + var unit, length; + for(var i=0, len=units.length; i 1) { + break; + } + } + return [length, unit]; + }, + + /** + * Method: getLength + * + * Parameters: + * geometry - {} + * units - {String} Unit abbreviation + * + * Returns: + * {Float} The geometry length in the given units. + */ + getLength: function(geometry, units) { + var length, geomUnits; + if(this.geodesic) { + length = geometry.getGeodesicLength(this.map.getProjectionObject()); + geomUnits = "m"; + } else { + length = geometry.getLength(); + geomUnits = this.map.getUnits(); + } + var inPerDisplayUnit = OpenLayers.INCHES_PER_UNIT[units]; + if(inPerDisplayUnit) { + var inPerMapUnit = OpenLayers.INCHES_PER_UNIT[geomUnits]; + length *= (inPerMapUnit / inPerDisplayUnit); + } + return length; + }, + + CLASS_NAME: "OpenLayers.Control.Measure" +}); diff --git a/openlayers/lib/OpenLayers/Control/ModifyFeature.js b/openlayers/lib/OpenLayers/Control/ModifyFeature.js new file mode 100644 index 0000000000..31d968cbb5 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/ModifyFeature.js @@ -0,0 +1,813 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control/DragFeature.js + * @requires OpenLayers/Control/SelectFeature.js + * @requires OpenLayers/Handler/Keyboard.js + */ + +/** + * Class: OpenLayers.Control.ModifyFeature + * Control to modify features. When activated, a click renders the vertices + * of a feature - these vertices can then be dragged. By default, the + * delete key will delete the vertex under the mouse. New features are + * added by dragging "virtual vertices" between vertices. Create a new + * control with the constructor. + * + * Inherits From: + * - + */ +OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: geometryTypes + * {Array(String)} To restrict modification to a limited set of geometry + * types, send a list of strings corresponding to the geometry class + * names. + */ + geometryTypes: null, + + /** + * APIProperty: clickout + * {Boolean} Unselect features when clicking outside any feature. + * Default is true. + */ + clickout: true, + + /** + * APIProperty: toggle + * {Boolean} Unselect a selected feature on click. + * Default is true. + */ + toggle: true, + + /** + * APIProperty: standalone + * {Boolean} Set to true to create a control without SelectFeature + * capabilities. Default is false. If standalone is true, to modify + * a feature, call the method with the target feature. + * Note that you must call the method to finish + * feature modification in standalone mode (before starting to modify + * another feature). + */ + standalone: false, + + /** + * Property: layer + * {} + */ + layer: null, + + /** + * Property: feature + * {} Feature currently available for modification. + */ + feature: null, + + /** + * Property: vertices + * {Array()} Verticies currently available + * for dragging. + */ + vertices: null, + + /** + * Property: virtualVertices + * {Array()} Virtual vertices in the middle + * of each edge. + */ + virtualVertices: null, + + /** + * Property: selectControl + * {} + */ + selectControl: null, + + /** + * Property: dragControl + * {} + */ + dragControl: null, + + /** + * Property: handlers + * {Object} + */ + handlers: null, + + /** + * APIProperty: deleteCodes + * {Array(Integer)} Keycodes for deleting verticies. Set to null to disable + * vertex deltion by keypress. If non-null, keypresses with codes + * in this array will delete vertices under the mouse. Default + * is 46 and 68, the 'delete' and lowercase 'd' keys. + */ + deleteCodes: null, + + /** + * APIProperty: virtualStyle + * {Object} A symbolizer to be used for virtual vertices. + */ + virtualStyle: null, + + /** + * APIProperty: vertexRenderIntent + * {String} The renderIntent to use for vertices. If no is + * provided, this renderIntent will also be used for virtual vertices, with + * a fillOpacity and strokeOpacity of 0.3. Default is null, which means + * that the layer's default style will be used for vertices. + */ + vertexRenderIntent: null, + + /** + * APIProperty: mode + * {Integer} Bitfields specifying the modification mode. Defaults to + * OpenLayers.Control.ModifyFeature.RESHAPE. To set the mode to a + * combination of options, use the | operator. For example, to allow + * the control to both resize and rotate features, use the following + * syntax + * (code) + * control.mode = OpenLayers.Control.ModifyFeature.RESIZE | + * OpenLayers.Control.ModifyFeature.ROTATE; + * (end) + */ + mode: null, + + /** + * Property: modified + * {Boolean} The currently selected feature has been modified. + */ + modified: false, + + /** + * Property: radiusHandle + * {} A handle for rotating/resizing a feature. + */ + radiusHandle: null, + + /** + * Property: dragHandle + * {} A handle for dragging a feature. + */ + dragHandle: null, + + /** + * APIProperty: onModificationStart + * {Function} *Deprecated*. Register for "beforefeaturemodified" instead. + * The "beforefeaturemodified" event is triggered on the layer before + * any modification begins. + * + * Optional function to be called when a feature is selected + * to be modified. The function should expect to be called with a + * feature. This could be used for example to allow to lock the + * feature on server-side. + */ + onModificationStart: function() {}, + + /** + * APIProperty: onModification + * {Function} *Deprecated*. Register for "featuremodified" instead. + * The "featuremodified" event is triggered on the layer with each + * feature modification. + * + * Optional function to be called when a feature has been + * modified. The function should expect to be called with a feature. + */ + onModification: function() {}, + + /** + * APIProperty: onModificationEnd + * {Function} *Deprecated*. Register for "afterfeaturemodified" instead. + * The "afterfeaturemodified" event is triggered on the layer after + * a feature has been modified. + * + * Optional function to be called when a feature is finished + * being modified. The function should expect to be called with a + * feature. + */ + onModificationEnd: function() {}, + + /** + * Constructor: OpenLayers.Control.ModifyFeature + * Create a new modify feature control. + * + * Parameters: + * layer - {} Layer that contains features that + * will be modified. + * options - {Object} Optional object whose properties will be set on the + * control. + */ + initialize: function(layer, options) { + options = options || {}; + this.layer = layer; + this.vertices = []; + this.virtualVertices = []; + this.virtualStyle = OpenLayers.Util.extend({}, + this.layer.style || + this.layer.styleMap.createSymbolizer(null, options.vertexRenderIntent) + ); + this.virtualStyle.fillOpacity = 0.3; + this.virtualStyle.strokeOpacity = 0.3; + this.deleteCodes = [46, 68]; + this.mode = OpenLayers.Control.ModifyFeature.RESHAPE; + OpenLayers.Control.prototype.initialize.apply(this, [options]); + if(!(OpenLayers.Util.isArray(this.deleteCodes))) { + this.deleteCodes = [this.deleteCodes]; + } + var control = this; + + // configure the select control + var selectOptions = { + geometryTypes: this.geometryTypes, + clickout: this.clickout, + toggle: this.toggle, + onBeforeSelect: this.beforeSelectFeature, + onSelect: this.selectFeature, + onUnselect: this.unselectFeature, + scope: this + }; + if(this.standalone === false) { + this.selectControl = new OpenLayers.Control.SelectFeature( + layer, selectOptions + ); + } + + // configure the drag control + var dragOptions = { + geometryTypes: ["OpenLayers.Geometry.Point"], + snappingOptions: this.snappingOptions, + onStart: function(feature, pixel) { + control.dragStart.apply(control, [feature, pixel]); + }, + onDrag: function(feature, pixel) { + control.dragVertex.apply(control, [feature, pixel]); + }, + onComplete: function(feature) { + control.dragComplete.apply(control, [feature]); + }, + featureCallbacks: { + over: function(feature) { + /** + * In normal mode, the feature handler is set up to allow + * dragging of all points. In standalone mode, we only + * want to allow dragging of sketch vertices and virtual + * vertices - or, in the case of a modifiable point, the + * point itself. + */ + if(control.standalone !== true || feature._sketch || + control.feature === feature) { + control.dragControl.overFeature.apply( + control.dragControl, [feature]); + } + } + } + }; + this.dragControl = new OpenLayers.Control.DragFeature( + layer, dragOptions + ); + + // configure the keyboard handler + var keyboardOptions = { + keydown: this.handleKeypress + }; + this.handlers = { + keyboard: new OpenLayers.Handler.Keyboard(this, keyboardOptions) + }; + }, + + /** + * APIMethod: destroy + * Take care of things that are not handled in superclass. + */ + destroy: function() { + this.layer = null; + this.standalone || this.selectControl.destroy(); + this.dragControl.destroy(); + OpenLayers.Control.prototype.destroy.apply(this, []); + }, + + /** + * APIMethod: activate + * Activate the control. + * + * Returns: + * {Boolean} Successfully activated the control. + */ + activate: function() { + return ((this.standalone || this.selectControl.activate()) && + this.handlers.keyboard.activate() && + OpenLayers.Control.prototype.activate.apply(this, arguments)); + }, + + /** + * APIMethod: deactivate + * Deactivate the control. + * + * Returns: + * {Boolean} Successfully deactivated the control. + */ + deactivate: function() { + var deactivated = false; + // the return from the controls is unimportant in this case + if(OpenLayers.Control.prototype.deactivate.apply(this, arguments)) { + this.layer.removeFeatures(this.vertices, {silent: true}); + this.layer.removeFeatures(this.virtualVertices, {silent: true}); + this.vertices = []; + this.dragControl.deactivate(); + var feature = this.feature; + var valid = feature && feature.geometry && feature.layer; + if(this.standalone === false) { + if(valid) { + this.selectControl.unselect.apply(this.selectControl, + [feature]); + } + this.selectControl.deactivate(); + } else { + if(valid) { + this.unselectFeature(feature); + } + } + this.handlers.keyboard.deactivate(); + deactivated = true; + } + return deactivated; + }, + + /** + * Method: beforeSelectFeature + * Called before a feature is selected. + * + * Parameters: + * feature - {} The feature about to be selected. + */ + beforeSelectFeature: function(feature) { + return this.layer.events.triggerEvent( + "beforefeaturemodified", {feature: feature} + ); + }, + + /** + * APIMethod: selectFeature + * Select a feature for modification in standalone mode. In non-standalone + * mode, this method is called when the select feature control selects a + * feature. Register a listener to the beforefeaturemodified event and + * return false to prevent feature modification. + * + * Parameters: + * feature - {} the selected feature. + */ + selectFeature: function(feature) { + if (!this.standalone || this.beforeSelectFeature(feature) !== false) { + this.feature = feature; + this.modified = false; + this.resetVertices(); + this.dragControl.activate(); + this.onModificationStart(this.feature); + } + // keep track of geometry modifications + var modified = feature.modified; + if (feature.geometry && !(modified && modified.geometry)) { + this._originalGeometry = feature.geometry.clone(); + } + }, + + /** + * Method: unselectFeature + * Called when the select feature control unselects a feature. + * + * Parameters: + * feature - {} The unselected feature. + */ + unselectFeature: function(feature) { + this.layer.removeFeatures(this.vertices, {silent: true}); + this.vertices = []; + this.layer.destroyFeatures(this.virtualVertices, {silent: true}); + this.virtualVertices = []; + if(this.dragHandle) { + this.layer.destroyFeatures([this.dragHandle], {silent: true}); + delete this.dragHandle; + } + if(this.radiusHandle) { + this.layer.destroyFeatures([this.radiusHandle], {silent: true}); + delete this.radiusHandle; + } + this.feature = null; + this.dragControl.deactivate(); + this.onModificationEnd(feature); + this.layer.events.triggerEvent("afterfeaturemodified", { + feature: feature, + modified: this.modified + }); + this.modified = false; + }, + + /** + * Method: dragStart + * Called by the drag feature control with before a feature is dragged. + * This method is used to differentiate between points and vertices + * of higher order geometries. This respects the + * property and forces a select of points when the drag control is + * already active (and stops events from propagating to the select + * control). + * + * Parameters: + * feature - {} The point or vertex about to be + * dragged. + * pixel - {} Pixel location of the mouse event. + */ + dragStart: function(feature, pixel) { + // only change behavior if the feature is not in the vertices array + if(feature != this.feature && !feature.geometry.parent && + feature != this.dragHandle && feature != this.radiusHandle) { + if(this.standalone === false && this.feature) { + // unselect the currently selected feature + this.selectControl.clickFeature.apply(this.selectControl, + [this.feature]); + } + // check any constraints on the geometry type + if(this.geometryTypes == null || + OpenLayers.Util.indexOf(this.geometryTypes, + feature.geometry.CLASS_NAME) != -1) { + // select the point + this.standalone || this.selectControl.clickFeature.apply( + this.selectControl, [feature]); + /** + * TBD: These lines improve workflow by letting the user + * immediately start dragging after the mouse down. + * However, it is very ugly to be messing with controls + * and their handlers in this way. I'd like a better + * solution if the workflow change is necessary. + */ + // prepare the point for dragging + this.dragControl.overFeature.apply(this.dragControl, + [feature]); + this.dragControl.lastPixel = pixel; + this.dragControl.handlers.drag.started = true; + this.dragControl.handlers.drag.start = pixel; + this.dragControl.handlers.drag.last = pixel; + } + } + }, + + /** + * Method: dragVertex + * Called by the drag feature control with each drag move of a vertex. + * + * Parameters: + * vertex - {} The vertex being dragged. + * pixel - {} Pixel location of the mouse event. + */ + dragVertex: function(vertex, pixel) { + this.modified = true; + /** + * Five cases: + * 1) dragging a simple point + * 2) dragging a virtual vertex + * 3) dragging a drag handle + * 4) dragging a real vertex + * 5) dragging a radius handle + */ + if(this.feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") { + // dragging a simple point + if(this.feature != vertex) { + this.feature = vertex; + } + this.layer.events.triggerEvent("vertexmodified", { + vertex: vertex.geometry, + feature: this.feature, + pixel: pixel + }); + } else { + if(vertex._index) { + // dragging a virtual vertex + vertex.geometry.parent.addComponent(vertex.geometry, + vertex._index); + // move from virtual to real vertex + delete vertex._index; + OpenLayers.Util.removeItem(this.virtualVertices, vertex); + this.vertices.push(vertex); + } else if(vertex == this.dragHandle) { + // dragging a drag handle + this.layer.removeFeatures(this.vertices, {silent: true}); + this.vertices = []; + if(this.radiusHandle) { + this.layer.destroyFeatures([this.radiusHandle], {silent: true}); + this.radiusHandle = null; + } + } else if(vertex !== this.radiusHandle) { + // dragging a real vertex + this.layer.events.triggerEvent("vertexmodified", { + vertex: vertex.geometry, + feature: this.feature, + pixel: pixel + }); + } + // dragging a radius handle - no special treatment + if(this.virtualVertices.length > 0) { + this.layer.destroyFeatures(this.virtualVertices, {silent: true}); + this.virtualVertices = []; + } + this.layer.drawFeature(this.feature, this.standalone ? undefined : + this.selectControl.renderIntent); + } + // keep the vertex on top so it gets the mouseout after dragging + // this should be removed in favor of an option to draw under or + // maintain node z-index + this.layer.drawFeature(vertex); + }, + + /** + * Method: dragComplete + * Called by the drag feature control when the feature dragging is complete. + * + * Parameters: + * vertex - {} The vertex being dragged. + */ + dragComplete: function(vertex) { + this.resetVertices(); + this.setFeatureState(); + this.onModification(this.feature); + this.layer.events.triggerEvent("featuremodified", + {feature: this.feature}); + }, + + /** + * Method: setFeatureState + * Called when the feature is modified. If the current state is not + * INSERT or DELETE, the state is set to UPDATE. + */ + setFeatureState: function() { + if(this.feature.state != OpenLayers.State.INSERT && + this.feature.state != OpenLayers.State.DELETE) { + this.feature.state = OpenLayers.State.UPDATE; + if (this.modified && this._originalGeometry) { + var feature = this.feature; + feature.modified = OpenLayers.Util.extend(feature.modified, { + geometry: this._originalGeometry + }); + delete this._originalGeometry; + } + } + }, + + /** + * Method: resetVertices + */ + resetVertices: function() { + // if coming from a drag complete we're about to destroy the vertex + // that was just dragged. For that reason, the drag feature control + // will never detect a mouse-out on that vertex, meaning that the drag + // handler won't be deactivated. This can cause errors because the drag + // feature control still has a feature to drag but that feature is + // destroyed. To prevent this, we call outFeature on the drag feature + // control if the control actually has a feature to drag. + if(this.dragControl.feature) { + this.dragControl.outFeature(this.dragControl.feature); + } + if(this.vertices.length > 0) { + this.layer.removeFeatures(this.vertices, {silent: true}); + this.vertices = []; + } + if(this.virtualVertices.length > 0) { + this.layer.removeFeatures(this.virtualVertices, {silent: true}); + this.virtualVertices = []; + } + if(this.dragHandle) { + this.layer.destroyFeatures([this.dragHandle], {silent: true}); + this.dragHandle = null; + } + if(this.radiusHandle) { + this.layer.destroyFeatures([this.radiusHandle], {silent: true}); + this.radiusHandle = null; + } + if(this.feature && + this.feature.geometry.CLASS_NAME != "OpenLayers.Geometry.Point") { + if((this.mode & OpenLayers.Control.ModifyFeature.DRAG)) { + this.collectDragHandle(); + } + if((this.mode & (OpenLayers.Control.ModifyFeature.ROTATE | + OpenLayers.Control.ModifyFeature.RESIZE))) { + this.collectRadiusHandle(); + } + if(this.mode & OpenLayers.Control.ModifyFeature.RESHAPE){ + // Don't collect vertices when we're resizing + if (!(this.mode & OpenLayers.Control.ModifyFeature.RESIZE)){ + this.collectVertices(); + } + } + } + }, + + /** + * Method: handleKeypress + * Called by the feature handler on keypress. This is used to delete + * vertices. If the property is set, vertices will + * be deleted when a feature is selected for modification and + * the mouse is over a vertex. + * + * Parameters: + * {Integer} Key code corresponding to the keypress event. + */ + handleKeypress: function(evt) { + var code = evt.keyCode; + + // check for delete key + if(this.feature && + OpenLayers.Util.indexOf(this.deleteCodes, code) != -1) { + var vertex = this.dragControl.feature; + if(vertex && + OpenLayers.Util.indexOf(this.vertices, vertex) != -1 && + !this.dragControl.handlers.drag.dragging && + vertex.geometry.parent) { + // remove the vertex + vertex.geometry.parent.removeComponent(vertex.geometry); + this.layer.events.triggerEvent("vertexremoved", { + vertex: vertex.geometry, + feature: this.feature, + pixel: evt.xy + }); + this.layer.drawFeature(this.feature, this.standalone ? + undefined : + this.selectControl.renderIntent); + this.resetVertices(); + this.setFeatureState(); + this.onModification(this.feature); + this.layer.events.triggerEvent("featuremodified", + {feature: this.feature}); + } + } + }, + + /** + * Method: collectVertices + * Collect the vertices from the modifiable feature's geometry and push + * them on to the control's vertices array. + */ + collectVertices: function() { + this.vertices = []; + this.virtualVertices = []; + var control = this; + function collectComponentVertices(geometry) { + var i, vertex, component, len; + if(geometry.CLASS_NAME == "OpenLayers.Geometry.Point") { + vertex = new OpenLayers.Feature.Vector(geometry); + vertex._sketch = true; + vertex.renderIntent = control.vertexRenderIntent; + control.vertices.push(vertex); + } else { + var numVert = geometry.components.length; + if(geometry.CLASS_NAME == "OpenLayers.Geometry.LinearRing") { + numVert -= 1; + } + for(i=0; i} The control's map. + */ + setMap: function(map) { + this.standalone || this.selectControl.setMap(map); + this.dragControl.setMap(map); + OpenLayers.Control.prototype.setMap.apply(this, arguments); + }, + + CLASS_NAME: "OpenLayers.Control.ModifyFeature" +}); + +/** + * Constant: RESHAPE + * {Integer} Constant used to make the control work in reshape mode + */ +OpenLayers.Control.ModifyFeature.RESHAPE = 1; +/** + * Constant: RESIZE + * {Integer} Constant used to make the control work in resize mode + */ +OpenLayers.Control.ModifyFeature.RESIZE = 2; +/** + * Constant: ROTATE + * {Integer} Constant used to make the control work in rotate mode + */ +OpenLayers.Control.ModifyFeature.ROTATE = 4; +/** + * Constant: DRAG + * {Integer} Constant used to make the control work in drag mode + */ +OpenLayers.Control.ModifyFeature.DRAG = 8; diff --git a/openlayers/lib/OpenLayers/Control/MouseDefaults.js b/openlayers/lib/OpenLayers/Control/MouseDefaults.js new file mode 100644 index 0000000000..cc71164b4a --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/MouseDefaults.js @@ -0,0 +1,368 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.MouseDefaults + * This class is DEPRECATED in 2.4 and will be removed by 3.0. + * If you need this functionality, use + * instead!!! + * + * This class is DEPRECATED in 2.4 and will be removed by 3.0. + * If you need this functionality, use Control.Navigation instead!!! + * + * Inherits from: + * - + */ +OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, { + + /** WARNING WARNING WARNING!!! + This class is DEPRECATED in 2.4 and will be removed by 3.0. + If you need this functionality, use Control.Navigation instead!!! */ + + /** + * Property: performedDrag + * {Boolean} + */ + performedDrag: false, + + /** + * Property: wheelObserver + * {Function} + */ + wheelObserver: null, + + /** + * Constructor: OpenLayers.Control.MouseDefaults + */ + initialize: function() { + OpenLayers.Control.prototype.initialize.apply(this, arguments); + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + + if (this.handler) { + this.handler.destroy(); + } + this.handler = null; + + this.map.events.un({ + "click": this.defaultClick, + "dblclick": this.defaultDblClick, + "mousedown": this.defaultMouseDown, + "mouseup": this.defaultMouseUp, + "mousemove": this.defaultMouseMove, + "mouseout": this.defaultMouseOut, + scope: this + }); + + //unregister mousewheel events specifically on the window and document + OpenLayers.Event.stopObserving(window, "DOMMouseScroll", + this.wheelObserver); + OpenLayers.Event.stopObserving(window, "mousewheel", + this.wheelObserver); + OpenLayers.Event.stopObserving(document, "mousewheel", + this.wheelObserver); + this.wheelObserver = null; + + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: draw + */ + draw: function() { + this.map.events.on({ + "click": this.defaultClick, + "dblclick": this.defaultDblClick, + "mousedown": this.defaultMouseDown, + "mouseup": this.defaultMouseUp, + "mousemove": this.defaultMouseMove, + "mouseout": this.defaultMouseOut, + scope: this + }); + + this.registerWheelEvents(); + + }, + + /** + * Method: registerWheelEvents + */ + registerWheelEvents: function() { + + this.wheelObserver = OpenLayers.Function.bindAsEventListener( + this.onWheelEvent, this + ); + + //register mousewheel events specifically on the window and document + OpenLayers.Event.observe(window, "DOMMouseScroll", this.wheelObserver); + OpenLayers.Event.observe(window, "mousewheel", this.wheelObserver); + OpenLayers.Event.observe(document, "mousewheel", this.wheelObserver); + }, + + /** + * Method: defaultClick + * + * Parameters: + * evt - {Event} + * + * Returns: + * {Boolean} + */ + defaultClick: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + var notAfterDrag = !this.performedDrag; + this.performedDrag = false; + return notAfterDrag; + }, + + /** + * Method: defaultDblClick + * + * Parameters: + * evt - {Event} + */ + defaultDblClick: function (evt) { + var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); + this.map.setCenter(newCenter, this.map.zoom + 1); + OpenLayers.Event.stop(evt); + return false; + }, + + /** + * Method: defaultMouseDown + * + * Parameters: + * evt - {Event} + */ + defaultMouseDown: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + this.mouseDragStart = evt.xy.clone(); + this.performedDrag = false; + if (evt.shiftKey) { + this.map.div.style.cursor = "crosshair"; + this.zoomBox = OpenLayers.Util.createDiv('zoomBox', + this.mouseDragStart, + null, + null, + "absolute", + "2px solid red"); + this.zoomBox.style.backgroundColor = "white"; + this.zoomBox.style.filter = "alpha(opacity=50)"; // IE + this.zoomBox.style.opacity = "0.50"; + this.zoomBox.style.fontSize = "1px"; + this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.eventsDiv.appendChild(this.zoomBox); + } + document.onselectstart = OpenLayers.Function.False; + OpenLayers.Event.stop(evt); + }, + + /** + * Method: defaultMouseMove + * + * Parameters: + * evt - {Event} + */ + defaultMouseMove: function (evt) { + // record the mouse position, used in onWheelEvent + this.mousePosition = evt.xy.clone(); + + if (this.mouseDragStart != null) { + if (this.zoomBox) { + var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); + var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); + this.zoomBox.style.width = Math.max(1, deltaX) + "px"; + this.zoomBox.style.height = Math.max(1, deltaY) + "px"; + if (evt.xy.x < this.mouseDragStart.x) { + this.zoomBox.style.left = evt.xy.x+"px"; + } + if (evt.xy.y < this.mouseDragStart.y) { + this.zoomBox.style.top = evt.xy.y+"px"; + } + } else { + var deltaX = this.mouseDragStart.x - evt.xy.x; + var deltaY = this.mouseDragStart.y - evt.xy.y; + var size = this.map.getSize(); + var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, + size.h / 2 + deltaY); + var newCenter = this.map.getLonLatFromViewPortPx( newXY ); + this.map.setCenter(newCenter, null, true); + this.mouseDragStart = evt.xy.clone(); + this.map.div.style.cursor = "move"; + } + this.performedDrag = true; + } + }, + + /** + * Method: defaultMouseUp + * + * Parameters: + * evt - {} + */ + defaultMouseUp: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + if (this.zoomBox) { + this.zoomBoxEnd(evt); + } else { + if (this.performedDrag) { + this.map.setCenter(this.map.center); + } + } + document.onselectstart=null; + this.mouseDragStart = null; + this.map.div.style.cursor = ""; + }, + + /** + * Method: defaultMouseOut + * + * Parameters: + * evt - {Event} + */ + defaultMouseOut: function (evt) { + if (this.mouseDragStart != null && + OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) { + if (this.zoomBox) { + this.removeZoomBox(); + } + this.mouseDragStart = null; + } + }, + + + /** + * Method: defaultWheelUp + * User spun scroll wheel up + * + */ + defaultWheelUp: function(evt) { + if (this.map.getZoom() <= this.map.getNumZoomLevels()) { + this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), + this.map.getZoom() + 1); + } + }, + + /** + * Method: defaultWheelDown + * User spun scroll wheel down + */ + defaultWheelDown: function(evt) { + if (this.map.getZoom() > 0) { + this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), + this.map.getZoom() - 1); + } + }, + + /** + * Method: zoomBoxEnd + * Zoombox function. + */ + zoomBoxEnd: function(evt) { + if (this.mouseDragStart != null) { + if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || + Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) { + var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); + var end = this.map.getLonLatFromViewPortPx( evt.xy ); + var top = Math.max(start.lat, end.lat); + var bottom = Math.min(start.lat, end.lat); + var left = Math.min(start.lon, end.lon); + var right = Math.max(start.lon, end.lon); + var bounds = new OpenLayers.Bounds(left, bottom, right, top); + this.map.zoomToExtent(bounds); + } else { + var end = this.map.getLonLatFromViewPortPx( evt.xy ); + this.map.setCenter(new OpenLayers.LonLat( + (end.lon), + (end.lat) + ), this.map.getZoom() + 1); + } + this.removeZoomBox(); + } + }, + + /** + * Method: removeZoomBox + * Remove the zoombox from the screen and nullify our reference to it. + */ + removeZoomBox: function() { + this.map.eventsDiv.removeChild(this.zoomBox); + this.zoomBox = null; + }, + + +/** + * Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/ + */ + + + /** + * Method: onWheelEvent + * Catch the wheel event and handle it xbrowserly + * + * Parameters: + * e - {Event} + */ + onWheelEvent: function(e){ + + // first determine whether or not the wheeling was inside the map + var inMap = false; + var elem = OpenLayers.Event.element(e); + while(elem != null) { + if (this.map && elem == this.map.div) { + inMap = true; + break; + } + elem = elem.parentNode; + } + + if (inMap) { + + var delta = 0; + if (!e) { + e = window.event; + } + if (e.wheelDelta) { + delta = e.wheelDelta/120; + if (window.opera && window.opera.version() < 9.2) { + delta = -delta; + } + } else if (e.detail) { + delta = -e.detail / 3; + } + if (delta) { + // add the mouse position to the event because mozilla has a bug + // with clientX and clientY (see https://bugzilla.mozilla.org/show_bug.cgi?id=352179) + // getLonLatFromViewPortPx(e) returns wrong values + e.xy = this.mousePosition; + + if (delta < 0) { + this.defaultWheelDown(e); + } else { + this.defaultWheelUp(e); + } + } + + //only wheel the map, not the window + OpenLayers.Event.stop(e); + } + }, + + CLASS_NAME: "OpenLayers.Control.MouseDefaults" +}); diff --git a/openlayers/lib/OpenLayers/Control/MousePosition.js b/openlayers/lib/OpenLayers/Control/MousePosition.js new file mode 100644 index 0000000000..40314078ea --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/MousePosition.js @@ -0,0 +1,210 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.MousePosition + * The MousePosition control displays geographic coordinates of the mouse + * pointer, as it is moved about the map. + * + * Inherits from: + * - + */ +OpenLayers.Control.MousePosition = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: autoActivate + * {Boolean} Activate the control when it is added to a map. Default is + * true. + */ + autoActivate: true, + + /** + * Property: element + * {DOMElement} + */ + element: null, + + /** + * APIProperty: prefix + * {String} + */ + prefix: '', + + /** + * APIProperty: separator + * {String} + */ + separator: ', ', + + /** + * APIProperty: suffix + * {String} + */ + suffix: '', + + /** + * APIProperty: numDigits + * {Integer} + */ + numDigits: 5, + + /** + * APIProperty: granularity + * {Integer} + */ + granularity: 10, + + /** + * APIProperty: emptyString + * {String} Set this to some value to set when the mouse is outside the + * map. + */ + emptyString: null, + + /** + * Property: lastXy + * {} + */ + lastXy: null, + + /** + * APIProperty: displayProjection + * {} The projection in which the + * mouse position is displayed + */ + displayProjection: null, + + /** + * Constructor: OpenLayers.Control.MousePosition + * + * Parameters: + * options - {Object} Options for control. + */ + + /** + * Method: destroy + */ + destroy: function() { + this.deactivate(); + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * APIMethod: activate + */ + activate: function() { + if (OpenLayers.Control.prototype.activate.apply(this, arguments)) { + this.map.events.register('mousemove', this, this.redraw); + this.map.events.register('mouseout', this, this.reset); + this.redraw(); + return true; + } else { + return false; + } + }, + + /** + * APIMethod: deactivate + */ + deactivate: function() { + if (OpenLayers.Control.prototype.deactivate.apply(this, arguments)) { + this.map.events.unregister('mousemove', this, this.redraw); + this.map.events.unregister('mouseout', this, this.reset); + this.element.innerHTML = ""; + return true; + } else { + return false; + } + }, + + /** + * Method: draw + * {DOMElement} + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + + if (!this.element) { + this.div.left = ""; + this.div.top = ""; + this.element = this.div; + } + + return this.div; + }, + + /** + * Method: redraw + */ + redraw: function(evt) { + + var lonLat; + + if (evt == null) { + this.reset(); + return; + } else { + if (this.lastXy == null || + Math.abs(evt.xy.x - this.lastXy.x) > this.granularity || + Math.abs(evt.xy.y - this.lastXy.y) > this.granularity) + { + this.lastXy = evt.xy; + return; + } + + lonLat = this.map.getLonLatFromPixel(evt.xy); + if (!lonLat) { + // map has not yet been properly initialized + return; + } + if (this.displayProjection) { + lonLat.transform(this.map.getProjectionObject(), + this.displayProjection ); + } + this.lastXy = evt.xy; + + } + + var newHtml = this.formatOutput(lonLat); + + if (newHtml != this.element.innerHTML) { + this.element.innerHTML = newHtml; + } + }, + + /** + * Method: reset + */ + reset: function(evt) { + if (this.emptyString != null) { + this.element.innerHTML = this.emptyString; + } + }, + + /** + * Method: formatOutput + * Override to provide custom display output + * + * Parameters: + * lonLat - {} Location to display + */ + formatOutput: function(lonLat) { + var digits = parseInt(this.numDigits); + var newHtml = + this.prefix + + lonLat.lon.toFixed(digits) + + this.separator + + lonLat.lat.toFixed(digits) + + this.suffix; + return newHtml; + }, + + CLASS_NAME: "OpenLayers.Control.MousePosition" +}); diff --git a/openlayers/lib/OpenLayers/Control/MouseToolbar.js b/openlayers/lib/OpenLayers/Control/MouseToolbar.js new file mode 100644 index 0000000000..9400c1791a --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/MouseToolbar.js @@ -0,0 +1,406 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Control/MouseDefaults.js + */ + +/** + * Class: OpenLayers.Control.MouseToolbar + * This class is DEPRECATED in 2.4 and will be removed by 3.0. + * If you need this functionality, use + * instead!!! + */ +OpenLayers.Control.MouseToolbar = OpenLayers.Class( + OpenLayers.Control.MouseDefaults, { + + /** + * Property: mode + */ + mode: null, + /** + * Property: buttons + */ + buttons: null, + + /** + * APIProperty: direction + * {String} 'vertical' or 'horizontal' + */ + direction: "vertical", + + /** + * Property: buttonClicked + * {String} + */ + buttonClicked: null, + + /** + * Constructor: OpenLayers.Control.MouseToolbar + * + * Parameters: + * position - {} + * direction - {String} + */ + initialize: function(position, direction) { + OpenLayers.Control.prototype.initialize.apply(this, arguments); + this.position = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X, + OpenLayers.Control.MouseToolbar.Y); + if (position) { + this.position = position; + } + if (direction) { + this.direction = direction; + } + this.measureDivs = []; + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + for( var btnId in this.buttons) { + var btn = this.buttons[btnId]; + btn.map = null; + btn.events.destroy(); + } + OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this, + arguments); + }, + + /** + * Method: draw + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + OpenLayers.Control.MouseDefaults.prototype.draw.apply(this, arguments); + this.buttons = {}; + var sz = new OpenLayers.Size(28,28); + var centered = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0); + this._addButton("zoombox", "drag-rectangle-off.png", "drag-rectangle-on.png", centered, sz, "Shift->Drag to zoom to area"); + centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); + this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan."); + centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); + this.switchModeTo("pan"); + + return this.div; + }, + + /** + * Method: _addButton + */ + _addButton:function(id, img, activeImg, xy, sz, title) { + var imgLocation = OpenLayers.Util.getImagesLocation() + img; + var activeImgLocation = OpenLayers.Util.getImagesLocation() + activeImg; + // var btn = new ol.AlphaImage("_"+id, imgLocation, xy, sz); + var btn = OpenLayers.Util.createAlphaImageDiv( + "OpenLayers_Control_MouseToolbar_" + id, + xy, sz, imgLocation, "absolute"); + + //we want to add the outer div + this.div.appendChild(btn); + btn.imgLocation = imgLocation; + btn.activeImgLocation = activeImgLocation; + + btn.events = new OpenLayers.Events(this, btn, null, true); + btn.events.on({ + "mousedown": this.buttonDown, + "mouseup": this.buttonUp, + "dblclick": OpenLayers.Event.stop, + scope: this + }); + btn.action = id; + btn.title = title; + btn.alt = title; + btn.map = this.map; + + //we want to remember/reference the outer div + this.buttons[id] = btn; + return btn; + }, + + /** + * Method: buttonDown + * + * Parameters: + * evt - {Event} + */ + buttonDown: function(evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + this.buttonClicked = evt.element.action; + OpenLayers.Event.stop(evt); + }, + + /** + * Method: buttonUp + * + * Parameters: + * evt - {Event} + */ + buttonUp: function(evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + if (this.buttonClicked != null) { + if (this.buttonClicked == evt.element.action) { + this.switchModeTo(evt.element.action); + } + OpenLayers.Event.stop(evt); + this.buttonClicked = null; + } + }, + + /** + * Method: defaultDblClick + * + * Parameters: + * evt - {Event} + */ + defaultDblClick: function (evt) { + this.switchModeTo("pan"); + this.performedDrag = false; + var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); + this.map.setCenter(newCenter, this.map.zoom + 1); + OpenLayers.Event.stop(evt); + return false; + }, + + /** + * Method: defaultMouseDown + * + * Parameters: + * evt - {Event} + */ + defaultMouseDown: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + this.mouseDragStart = evt.xy.clone(); + this.performedDrag = false; + this.startViaKeyboard = false; + if (evt.shiftKey && this.mode !="zoombox") { + this.switchModeTo("zoombox"); + this.startViaKeyboard = true; + } else if (evt.altKey && this.mode !="measure") { + this.switchModeTo("measure"); + } else if (!this.mode) { + this.switchModeTo("pan"); + } + + switch (this.mode) { + case "zoombox": + this.map.div.style.cursor = "crosshair"; + this.zoomBox = OpenLayers.Util.createDiv('zoomBox', + this.mouseDragStart, + null, + null, + "absolute", + "2px solid red"); + this.zoomBox.style.backgroundColor = "white"; + this.zoomBox.style.filter = "alpha(opacity=50)"; // IE + this.zoomBox.style.opacity = "0.50"; + this.zoomBox.style.fontSize = "1px"; + this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.eventsDiv.appendChild(this.zoomBox); + this.performedDrag = true; + break; + case "measure": + var distance = ""; + if (this.measureStart) { + var measureEnd = this.map.getLonLatFromViewPortPx(this.mouseDragStart); + distance = OpenLayers.Util.distVincenty(this.measureStart, measureEnd); + distance = Math.round(distance * 100) / 100; + distance = distance + "km"; + this.measureStartBox = this.measureBox; + } + this.measureStart = this.map.getLonLatFromViewPortPx(this.mouseDragStart);; + this.measureBox = OpenLayers.Util.createDiv(null, + this.mouseDragStart.add( + -2-parseInt(this.map.layerContainerDiv.style.left), + -2-parseInt(this.map.layerContainerDiv.style.top)), + null, + null, + "absolute"); + this.measureBox.style.width="4px"; + this.measureBox.style.height="4px"; + this.measureBox.style.fontSize = "1px"; + this.measureBox.style.backgroundColor="red"; + this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.layerContainerDiv.appendChild(this.measureBox); + if (distance) { + this.measureBoxDistance = OpenLayers.Util.createDiv(null, + this.mouseDragStart.add( + -2-parseInt(this.map.layerContainerDiv.style.left), + 2-parseInt(this.map.layerContainerDiv.style.top)), + null, + null, + "absolute"); + + this.measureBoxDistance.innerHTML = distance; + this.measureBoxDistance.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.layerContainerDiv.appendChild(this.measureBoxDistance); + this.measureDivs.push(this.measureBoxDistance); + } + this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; + this.map.layerContainerDiv.appendChild(this.measureBox); + this.measureDivs.push(this.measureBox); + break; + default: + this.map.div.style.cursor = "move"; + break; + } + document.onselectstart = OpenLayers.Function.False; + OpenLayers.Event.stop(evt); + }, + + /** + * Method: switchModeTo + * + * Parameters: + * mode - {String} + */ + switchModeTo: function(mode) { + if (mode != this.mode) { + + + if (this.mode && this.buttons[this.mode]) { + OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation); + } + if (this.mode == "measure" && mode != "measure") { + for(var i=0, len=this.measureDivs.length; i + */ +OpenLayers.Control.NavToolbar = OpenLayers.Class(OpenLayers.Control.Panel, { + + /** + * Constructor: OpenLayers.Control.NavToolbar + * Add our two mousedefaults controls. + * + * Parameters: + * options - {Object} An optional object whose properties will be used + * to extend the control. + */ + initialize: function(options) { + OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]); + this.addControls([ + new OpenLayers.Control.Navigation(), + new OpenLayers.Control.ZoomBox() + ]); + }, + + /** + * Method: draw + * calls the default draw, and then activates mouse defaults. + */ + draw: function() { + var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments); + if (this.defaultControl === null) { + this.defaultControl = this.controls[0]; + } + return div; + }, + + CLASS_NAME: "OpenLayers.Control.NavToolbar" +}); diff --git a/openlayers/lib/OpenLayers/Control/Navigation.js b/openlayers/lib/OpenLayers/Control/Navigation.js new file mode 100644 index 0000000000..ae61145291 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/Navigation.js @@ -0,0 +1,345 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control/ZoomBox.js + * @requires OpenLayers/Control/DragPan.js + * @requires OpenLayers/Handler/MouseWheel.js + * @requires OpenLayers/Handler/Click.js + */ + +/** + * Class: OpenLayers.Control.Navigation + * The navigation control handles map browsing with mouse events (dragging, + * double-clicking, and scrolling the wheel). Create a new navigation + * control with the control. + * + * Note that this control is added to the map by default (if no controls + * array is sent in the options object to the + * constructor). + * + * Inherits: + * - + */ +OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: dragPan + * {} + */ + dragPan: null, + + /** + * APIProperty: dragPanOptions + * {Object} Options passed to the DragPan control. + */ + dragPanOptions: null, + + /** + * Property: pinchZoom + * {} + */ + pinchZoom: null, + + /** + * APIProperty: pinchZoomOptions + * {Object} Options passed to the PinchZoom control. + */ + pinchZoomOptions: null, + + /** + * APIProperty: documentDrag + * {Boolean} Allow panning of the map by dragging outside map viewport. + * Default is false. + */ + documentDrag: false, + + /** + * Property: zoomBox + * {} + */ + zoomBox: null, + + /** + * APIProperty: zoomBoxEnabled + * {Boolean} Whether the user can draw a box to zoom + */ + zoomBoxEnabled: true, + + /** + * APIProperty: zoomWheelEnabled + * {Boolean} Whether the mousewheel should zoom the map + */ + zoomWheelEnabled: true, + + /** + * Property: mouseWheelOptions + * {Object} Options passed to the MouseWheel control (only useful if + * is set to true) + */ + mouseWheelOptions: null, + + /** + * APIProperty: handleRightClicks + * {Boolean} Whether or not to handle right clicks. Default is false. + */ + handleRightClicks: false, + + /** + * APIProperty: zoomBoxKeyMask + * {Integer} key code of the key, which has to be + * pressed, while drawing the zoom box with the mouse on the screen. + * You should probably set handleRightClicks to true if you use this + * with MOD_CTRL, to disable the context menu for machines which use + * CTRL-Click as a right click. + * Default: and . Call the trigger method + * on the and controls to restore previous and next + * history states. The previous and next controls will become active + * when there are available states to restore and will become deactive + * when there are no states to restore. + * + * Inherits from: + * - + */ +OpenLayers.Control.NavigationHistory = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: type + * {String} Note that this control is not intended to be added directly + * to a control panel. Instead, add the sub-controls previous and + * next. These sub-controls are button type controls that activate + * and deactivate themselves. If this parent control is added to + * a panel, it will act as a toggle. + */ + type: OpenLayers.Control.TYPE_TOGGLE, + + /** + * APIProperty: previous + * {} A button type control whose trigger method restores + * the previous state managed by this control. + */ + previous: null, + + /** + * APIProperty: previousOptions + * {Object} Set this property on the options argument of the constructor + * to set optional properties on the control. + */ + previousOptions: null, + + /** + * APIProperty: next + * {} A button type control whose trigger method restores + * the next state managed by this control. + */ + next: null, + + /** + * APIProperty: nextOptions + * {Object} Set this property on the options argument of the constructor + * to set optional properties on the control. + */ + nextOptions: null, + + /** + * APIProperty: limit + * {Integer} Optional limit on the number of history items to retain. If + * null, there is no limit. Default is 50. + */ + limit: 50, + + /** + * APIProperty: autoActivate + * {Boolean} Activate the control when it is added to a map. Default is + * true. + */ + autoActivate: true, + + /** + * Property: clearOnDeactivate + * {Boolean} Clear the history when the control is deactivated. Default + * is false. + */ + clearOnDeactivate: false, + + /** + * Property: registry + * {Object} An object with keys corresponding to event types. Values + * are functions that return an object representing the current state. + */ + registry: null, + + /** + * Property: nextStack + * {Array} Array of items in the history. + */ + nextStack: null, + + /** + * Property: previousStack + * {Array} List of items in the history. First item represents the current + * state. + */ + previousStack: null, + + /** + * Property: listeners + * {Object} An object containing properties corresponding to event types. + * This object is used to configure the control and is modified on + * construction. + */ + listeners: null, + + /** + * Property: restoring + * {Boolean} Currently restoring a history state. This is set to true + * before calling restore and set to false after restore returns. + */ + restoring: false, + + /** + * Constructor: OpenLayers.Control.NavigationHistory + * + * Parameters: + * options - {Object} An optional object whose properties will be used + * to extend the control. + */ + initialize: function(options) { + OpenLayers.Control.prototype.initialize.apply(this, [options]); + + this.registry = OpenLayers.Util.extend({ + "moveend": this.getState + }, this.registry); + + var previousOptions = { + trigger: OpenLayers.Function.bind(this.previousTrigger, this), + displayClass: this.displayClass + " " + this.displayClass + "Previous" + }; + OpenLayers.Util.extend(previousOptions, this.previousOptions); + this.previous = new OpenLayers.Control.Button(previousOptions); + + var nextOptions = { + trigger: OpenLayers.Function.bind(this.nextTrigger, this), + displayClass: this.displayClass + " " + this.displayClass + "Next" + }; + OpenLayers.Util.extend(nextOptions, this.nextOptions); + this.next = new OpenLayers.Control.Button(nextOptions); + + this.clear(); + }, + + /** + * Method: onPreviousChange + * Called when the previous history stack changes. + * + * Parameters: + * state - {Object} An object representing the state to be restored + * if previous is triggered again or null if no previous states remain. + * length - {Integer} The number of remaining previous states that can + * be restored. + */ + onPreviousChange: function(state, length) { + if(state && !this.previous.active) { + this.previous.activate(); + } else if(!state && this.previous.active) { + this.previous.deactivate(); + } + }, + + /** + * Method: onNextChange + * Called when the next history stack changes. + * + * Parameters: + * state - {Object} An object representing the state to be restored + * if next is triggered again or null if no next states remain. + * length - {Integer} The number of remaining next states that can + * be restored. + */ + onNextChange: function(state, length) { + if(state && !this.next.active) { + this.next.activate(); + } else if(!state && this.next.active) { + this.next.deactivate(); + } + }, + + /** + * APIMethod: destroy + * Destroy the control. + */ + destroy: function() { + OpenLayers.Control.prototype.destroy.apply(this); + this.previous.destroy(); + this.next.destroy(); + this.deactivate(); + for(var prop in this) { + this[prop] = null; + } + }, + + /** + * Method: setMap + * Set the map property for the control and and child + * controls. + * + * Parameters: + * map - {} + */ + setMap: function(map) { + this.map = map; + this.next.setMap(map); + this.previous.setMap(map); + }, + + /** + * Method: draw + * Called when the control is added to the map. + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + this.next.draw(); + this.previous.draw(); + }, + + /** + * Method: previousTrigger + * Restore the previous state. If no items are in the previous history + * stack, this has no effect. + * + * Returns: + * {Object} Item representing state that was restored. Undefined if no + * items are in the previous history stack. + */ + previousTrigger: function() { + var current = this.previousStack.shift(); + var state = this.previousStack.shift(); + if(state != undefined) { + this.nextStack.unshift(current); + this.previousStack.unshift(state); + this.restoring = true; + this.restore(state); + this.restoring = false; + this.onNextChange(this.nextStack[0], this.nextStack.length); + this.onPreviousChange( + this.previousStack[1], this.previousStack.length - 1 + ); + } else { + this.previousStack.unshift(current); + } + return state; + }, + + /** + * APIMethod: nextTrigger + * Restore the next state. If no items are in the next history + * stack, this has no effect. The next history stack is populated + * as states are restored from the previous history stack. + * + * Returns: + * {Object} Item representing state that was restored. Undefined if no + * items are in the next history stack. + */ + nextTrigger: function() { + var state = this.nextStack.shift(); + if(state != undefined) { + this.previousStack.unshift(state); + this.restoring = true; + this.restore(state); + this.restoring = false; + this.onNextChange(this.nextStack[0], this.nextStack.length); + this.onPreviousChange( + this.previousStack[1], this.previousStack.length - 1 + ); + } + return state; + }, + + /** + * APIMethod: clear + * Clear history. + */ + clear: function() { + this.previousStack = []; + this.previous.deactivate(); + this.nextStack = []; + this.next.deactivate(); + }, + + /** + * Method: getState + * Get the current state and return it. + * + * Returns: + * {Object} An object representing the current state. + */ + getState: function() { + return { + center: this.map.getCenter(), + resolution: this.map.getResolution(), + projection: this.map.getProjectionObject(), + units: this.map.getProjectionObject().getUnits() || + this.map.units || this.map.baseLayer.units + }; + }, + + /** + * Method: restore + * Update the state with the given object. + * + * Parameters: + * state - {Object} An object representing the state to restore. + */ + restore: function(state) { + var center, zoom; + if (this.map.getProjectionObject() == state.projection) { + zoom = this.map.getZoomForResolution(state.resolution); + center = state.center; + } else { + center = state.center.clone(); + center.transform(state.projection, this.map.getProjectionObject()); + var sourceUnits = state.units; + var targetUnits = this.map.getProjectionObject().getUnits() || + this.map.units || this.map.baseLayer.units; + var resolutionFactor = sourceUnits && targetUnits ? + OpenLayers.INCHES_PER_UNIT[sourceUnits] / OpenLayers.INCHES_PER_UNIT[targetUnits] : 1; + zoom = this.map.getZoomForResolution(resolutionFactor*state.resolution); + } + this.map.setCenter(center, zoom); + }, + + /** + * Method: setListeners + * Sets functions to be registered in the listeners object. + */ + setListeners: function() { + this.listeners = {}; + for(var type in this.registry) { + this.listeners[type] = OpenLayers.Function.bind(function() { + if(!this.restoring) { + var state = this.registry[type].apply(this, arguments); + this.previousStack.unshift(state); + if(this.previousStack.length > 1) { + this.onPreviousChange( + this.previousStack[1], this.previousStack.length - 1 + ); + } + if(this.previousStack.length > (this.limit + 1)) { + this.previousStack.pop(); + } + if(this.nextStack.length > 0) { + this.nextStack = []; + this.onNextChange(null, 0); + } + } + return true; + }, this); + } + }, + + /** + * APIMethod: activate + * Activate the control. This registers any listeners. + * + * Returns: + * {Boolean} Control successfully activated. + */ + activate: function() { + var activated = false; + if(this.map) { + if(OpenLayers.Control.prototype.activate.apply(this)) { + if(this.listeners == null) { + this.setListeners(); + } + for(var type in this.listeners) { + this.map.events.register(type, this, this.listeners[type]); + } + activated = true; + if(this.previousStack.length == 0) { + this.initStack(); + } + } + } + return activated; + }, + + /** + * Method: initStack + * Called after the control is activated if the previous history stack is + * empty. + */ + initStack: function() { + if(this.map.getCenter()) { + this.listeners.moveend(); + } + }, + + /** + * APIMethod: deactivate + * Deactivate the control. This unregisters any listeners. + * + * Returns: + * {Boolean} Control successfully deactivated. + */ + deactivate: function() { + var deactivated = false; + if(this.map) { + if(OpenLayers.Control.prototype.deactivate.apply(this)) { + for(var type in this.listeners) { + this.map.events.unregister( + type, this, this.listeners[type] + ); + } + if(this.clearOnDeactivate) { + this.clear(); + } + deactivated = true; + } + } + return deactivated; + }, + + CLASS_NAME: "OpenLayers.Control.NavigationHistory" +}); + diff --git a/openlayers/lib/OpenLayers/Control/OverviewMap.js b/openlayers/lib/OpenLayers/Control/OverviewMap.js new file mode 100644 index 0000000000..c1b2ff7922 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/OverviewMap.js @@ -0,0 +1,720 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/BaseTypes.js + * @requires OpenLayers/Events.js + */ + +/** + * Class: OpenLayers.Control.OverviewMap + * The OverMap control creates a small overview map, useful to display the + * extent of a zoomed map and your main map and provide additional + * navigation options to the User. By default the overview map is drawn in + * the lower right corner of the main map. Create a new overview map with the + * constructor. + * + * Inerits from: + * - + */ +OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: element + * {DOMElement} The DOM element that contains the overview map + */ + element: null, + + /** + * APIProperty: ovmap + * {} A reference to the overview map itself. + */ + ovmap: null, + + /** + * APIProperty: size + * {} The overvew map size in pixels. Note that this is + * the size of the map itself - the element that contains the map (default + * class name olControlOverviewMapElement) may have padding or other style + * attributes added via CSS. + */ + size: new OpenLayers.Size(180, 90), + + /** + * APIProperty: layers + * {Array()} Ordered list of layers in the overview map. + * If none are sent at construction, the base layer for the main map is used. + */ + layers: null, + + /** + * APIProperty: minRectSize + * {Integer} The minimum width or height (in pixels) of the extent + * rectangle on the overview map. When the extent rectangle reaches + * this size, it will be replaced depending on the value of the + * property. Default is 15 pixels. + */ + minRectSize: 15, + + /** + * APIProperty: minRectDisplayClass + * {String} Replacement style class name for the extent rectangle when + * is reached. This string will be suffixed on to the + * displayClass. Default is "RectReplacement". + * + * Example CSS declaration: + * (code) + * .olControlOverviewMapRectReplacement { + * overflow: hidden; + * cursor: move; + * background-image: url("img/overview_replacement.gif"); + * background-repeat: no-repeat; + * background-position: center; + * } + * (end) + */ + minRectDisplayClass: "RectReplacement", + + /** + * APIProperty: minRatio + * {Float} The ratio of the overview map resolution to the main map + * resolution at which to zoom farther out on the overview map. + */ + minRatio: 8, + + /** + * APIProperty: maxRatio + * {Float} The ratio of the overview map resolution to the main map + * resolution at which to zoom farther in on the overview map. + */ + maxRatio: 32, + + /** + * APIProperty: mapOptions + * {Object} An object containing any non-default properties to be sent to + * the overview map's map constructor. These should include any + * non-default options that the main map was constructed with. + */ + mapOptions: null, + + /** + * APIProperty: autoPan + * {Boolean} Always pan the overview map, so the extent marker remains in + * the center. Default is false. If true, when you drag the extent + * marker, the overview map will update itself so the marker returns + * to the center. + */ + autoPan: false, + + /** + * Property: handlers + * {Object} + */ + handlers: null, + + /** + * Property: resolutionFactor + * {Object} + */ + resolutionFactor: 1, + + /** + * APIProperty: maximized + * {Boolean} Start as maximized (visible). Defaults to false. + */ + maximized: false, + + /** + * Constructor: OpenLayers.Control.OverviewMap + * Create a new overview map + * + * Parameters: + * object - {Object} Properties of this object will be set on the overview + * map object. Note, to set options on the map object contained in this + * control, set as one of the options properties. + */ + initialize: function(options) { + this.layers = []; + this.handlers = {}; + OpenLayers.Control.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: destroy + * Deconstruct the control + */ + destroy: function() { + if (!this.mapDiv) { // we've already been destroyed + return; + } + if (this.handlers.click) { + this.handlers.click.destroy(); + } + if (this.handlers.drag) { + this.handlers.drag.destroy(); + } + + this.ovmap && this.ovmap.eventsDiv.removeChild(this.extentRectangle); + this.extentRectangle = null; + + if (this.rectEvents) { + this.rectEvents.destroy(); + this.rectEvents = null; + } + + if (this.ovmap) { + this.ovmap.destroy(); + this.ovmap = null; + } + + this.element.removeChild(this.mapDiv); + this.mapDiv = null; + + this.div.removeChild(this.element); + this.element = null; + + if (this.maximizeDiv) { + OpenLayers.Event.stopObservingElement(this.maximizeDiv); + this.div.removeChild(this.maximizeDiv); + this.maximizeDiv = null; + } + + if (this.minimizeDiv) { + OpenLayers.Event.stopObservingElement(this.minimizeDiv); + this.div.removeChild(this.minimizeDiv); + this.minimizeDiv = null; + } + + this.map.events.un({ + "moveend": this.update, + "changebaselayer": this.baseLayerDraw, + scope: this + }); + + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: draw + * Render the control in the browser. + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + if(!(this.layers.length > 0)) { + if (this.map.baseLayer) { + var layer = this.map.baseLayer.clone(); + this.layers = [layer]; + } else { + this.map.events.register("changebaselayer", this, this.baseLayerDraw); + return this.div; + } + } + + // create overview map DOM elements + this.element = document.createElement('div'); + this.element.className = this.displayClass + 'Element'; + this.element.style.display = 'none'; + + this.mapDiv = document.createElement('div'); + this.mapDiv.style.width = this.size.w + 'px'; + this.mapDiv.style.height = this.size.h + 'px'; + this.mapDiv.style.position = 'relative'; + this.mapDiv.style.overflow = 'hidden'; + this.mapDiv.id = OpenLayers.Util.createUniqueID('overviewMap'); + + this.extentRectangle = document.createElement('div'); + this.extentRectangle.style.position = 'absolute'; + this.extentRectangle.style.zIndex = 1000; //HACK + this.extentRectangle.className = this.displayClass+'ExtentRectangle'; + + this.element.appendChild(this.mapDiv); + + this.div.appendChild(this.element); + + // Optionally add min/max buttons if the control will go in the + // map viewport. + if(!this.outsideViewport) { + this.div.className += " " + this.displayClass + 'Container'; + var imgLocation = OpenLayers.Util.getImagesLocation(); + // maximize button div + var img = imgLocation + 'layer-switcher-maximize.png'; + this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv( + this.displayClass + 'MaximizeButton', + null, + new OpenLayers.Size(18,18), + img, + 'absolute'); + this.maximizeDiv.style.display = 'none'; + this.maximizeDiv.className = this.displayClass + 'MaximizeButton'; + OpenLayers.Event.observe(this.maximizeDiv, 'click', + OpenLayers.Function.bindAsEventListener(this.maximizeControl, + this) + ); + this.div.appendChild(this.maximizeDiv); + + // minimize button div + var img = imgLocation + 'layer-switcher-minimize.png'; + this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv( + 'OpenLayers_Control_minimizeDiv', + null, + new OpenLayers.Size(18,18), + img, + 'absolute'); + this.minimizeDiv.style.display = 'none'; + this.minimizeDiv.className = this.displayClass + 'MinimizeButton'; + OpenLayers.Event.observe(this.minimizeDiv, 'click', + OpenLayers.Function.bindAsEventListener(this.minimizeControl, + this) + ); + this.div.appendChild(this.minimizeDiv); + + var eventsToStop = ['dblclick','mousedown']; + + for (var i=0, len=eventsToStop.length; i} The pixel location of the drag. + */ + rectDrag: function(px) { + var deltaX = this.handlers.drag.last.x - px.x; + var deltaY = this.handlers.drag.last.y - px.y; + if(deltaX != 0 || deltaY != 0) { + var rectTop = this.rectPxBounds.top; + var rectLeft = this.rectPxBounds.left; + var rectHeight = Math.abs(this.rectPxBounds.getHeight()); + var rectWidth = this.rectPxBounds.getWidth(); + // don't allow dragging off of parent element + var newTop = Math.max(0, (rectTop - deltaY)); + newTop = Math.min(newTop, + this.ovmap.size.h - this.hComp - rectHeight); + var newLeft = Math.max(0, (rectLeft - deltaX)); + newLeft = Math.min(newLeft, + this.ovmap.size.w - this.wComp - rectWidth); + this.setRectPxBounds(new OpenLayers.Bounds(newLeft, + newTop + rectHeight, + newLeft + rectWidth, + newTop)); + } + }, + + /** + * Method: mapDivClick + * Handle browser events + * + * Parameters: + * evt - {} evt + */ + mapDivClick: function(evt) { + var pxCenter = this.rectPxBounds.getCenterPixel(); + var deltaX = evt.xy.x - pxCenter.x; + var deltaY = evt.xy.y - pxCenter.y; + var top = this.rectPxBounds.top; + var left = this.rectPxBounds.left; + var height = Math.abs(this.rectPxBounds.getHeight()); + var width = this.rectPxBounds.getWidth(); + var newTop = Math.max(0, (top + deltaY)); + newTop = Math.min(newTop, this.ovmap.size.h - height); + var newLeft = Math.max(0, (left + deltaX)); + newLeft = Math.min(newLeft, this.ovmap.size.w - width); + this.setRectPxBounds(new OpenLayers.Bounds(newLeft, + newTop + height, + newLeft + width, + newTop)); + this.updateMapToRect(); + }, + + /** + * Method: maximizeControl + * Unhide the control. Called when the control is in the map viewport. + * + * Parameters: + * e - {} + */ + maximizeControl: function(e) { + this.element.style.display = ''; + this.showToggle(false); + if (e != null) { + OpenLayers.Event.stop(e); + } + }, + + /** + * Method: minimizeControl + * Hide all the contents of the control, shrink the size, + * add the maximize icon + * + * Parameters: + * e - {} + */ + minimizeControl: function(e) { + this.element.style.display = 'none'; + this.showToggle(true); + if (e != null) { + OpenLayers.Event.stop(e); + } + }, + + /** + * Method: showToggle + * Hide/Show the toggle depending on whether the control is minimized + * + * Parameters: + * minimize - {Boolean} + */ + showToggle: function(minimize) { + this.maximizeDiv.style.display = minimize ? '' : 'none'; + this.minimizeDiv.style.display = minimize ? 'none' : ''; + }, + + /** + * Method: update + * Update the overview map after layers move. + */ + update: function() { + if(this.ovmap == null) { + this.createMap(); + } + + if(this.autoPan || !this.isSuitableOverview()) { + this.updateOverview(); + } + + // update extent rectangle + this.updateRectToMap(); + }, + + /** + * Method: isSuitableOverview + * Determines if the overview map is suitable given the extent and + * resolution of the main map. + */ + isSuitableOverview: function() { + var mapExtent = this.map.getExtent(); + var maxExtent = this.map.maxExtent; + var testExtent = new OpenLayers.Bounds( + Math.max(mapExtent.left, maxExtent.left), + Math.max(mapExtent.bottom, maxExtent.bottom), + Math.min(mapExtent.right, maxExtent.right), + Math.min(mapExtent.top, maxExtent.top)); + + if (this.ovmap.getProjection() != this.map.getProjection()) { + testExtent = testExtent.transform( + this.map.getProjectionObject(), + this.ovmap.getProjectionObject() ); + } + + var resRatio = this.ovmap.getResolution() / this.map.getResolution(); + return ((resRatio > this.minRatio) && + (resRatio <= this.maxRatio) && + (this.ovmap.getExtent().containsBounds(testExtent))); + }, + + /** + * Method updateOverview + * Called by if returns true + */ + updateOverview: function() { + var mapRes = this.map.getResolution(); + var targetRes = this.ovmap.getResolution(); + var resRatio = targetRes / mapRes; + if(resRatio > this.maxRatio) { + // zoom in overview map + targetRes = this.minRatio * mapRes; + } else if(resRatio <= this.minRatio) { + // zoom out overview map + targetRes = this.maxRatio * mapRes; + } + var center; + if (this.ovmap.getProjection() != this.map.getProjection()) { + center = this.map.center.clone(); + center.transform(this.map.getProjectionObject(), + this.ovmap.getProjectionObject() ); + } else { + center = this.map.center; + } + this.ovmap.setCenter(center, this.ovmap.getZoomForResolution( + targetRes * this.resolutionFactor)); + this.updateRectToMap(); + }, + + /** + * Method: createMap + * Construct the map that this control contains + */ + createMap: function() { + // create the overview map + var options = OpenLayers.Util.extend( + {controls: [], maxResolution: 'auto', + fallThrough: false}, this.mapOptions); + this.ovmap = new OpenLayers.Map(this.mapDiv, options); + this.ovmap.eventsDiv.appendChild(this.extentRectangle); + + // prevent ovmap from being destroyed when the page unloads, because + // the OverviewMap control has to do this (and does it). + OpenLayers.Event.stopObserving(window, 'unload', this.ovmap.unloadDestroy); + + this.ovmap.addLayers(this.layers); + this.ovmap.zoomToMaxExtent(); + // check extent rectangle border width + this.wComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle, + 'border-left-width')) + + parseInt(OpenLayers.Element.getStyle(this.extentRectangle, + 'border-right-width')); + this.wComp = (this.wComp) ? this.wComp : 2; + this.hComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle, + 'border-top-width')) + + parseInt(OpenLayers.Element.getStyle(this.extentRectangle, + 'border-bottom-width')); + this.hComp = (this.hComp) ? this.hComp : 2; + + this.handlers.drag = new OpenLayers.Handler.Drag( + this, {move: this.rectDrag, done: this.updateMapToRect}, + {map: this.ovmap} + ); + this.handlers.click = new OpenLayers.Handler.Click( + this, { + "click": this.mapDivClick + },{ + "single": true, "double": false, + "stopSingle": true, "stopDouble": true, + "pixelTolerance": 1, + map: this.ovmap + } + ); + this.handlers.click.activate(); + + this.rectEvents = new OpenLayers.Events(this, this.extentRectangle, + null, true); + this.rectEvents.register("mouseover", this, function(e) { + if(!this.handlers.drag.active && !this.map.dragging) { + this.handlers.drag.activate(); + } + }); + this.rectEvents.register("mouseout", this, function(e) { + if(!this.handlers.drag.dragging) { + this.handlers.drag.deactivate(); + } + }); + + if (this.ovmap.getProjection() != this.map.getProjection()) { + var sourceUnits = this.map.getProjectionObject().getUnits() || + this.map.units || this.map.baseLayer.units; + var targetUnits = this.ovmap.getProjectionObject().getUnits() || + this.ovmap.units || this.ovmap.baseLayer.units; + this.resolutionFactor = sourceUnits && targetUnits ? + OpenLayers.INCHES_PER_UNIT[sourceUnits] / + OpenLayers.INCHES_PER_UNIT[targetUnits] : 1; + } + }, + + /** + * Method: updateRectToMap + * Updates the extent rectangle position and size to match the map extent + */ + updateRectToMap: function() { + // If the projections differ we need to reproject + var bounds; + if (this.ovmap.getProjection() != this.map.getProjection()) { + bounds = this.map.getExtent().transform( + this.map.getProjectionObject(), + this.ovmap.getProjectionObject() ); + } else { + bounds = this.map.getExtent(); + } + var pxBounds = this.getRectBoundsFromMapBounds(bounds); + if (pxBounds) { + this.setRectPxBounds(pxBounds); + } + }, + + /** + * Method: updateMapToRect + * Updates the map extent to match the extent rectangle position and size + */ + updateMapToRect: function() { + var lonLatBounds = this.getMapBoundsFromRectBounds(this.rectPxBounds); + if (this.ovmap.getProjection() != this.map.getProjection()) { + lonLatBounds = lonLatBounds.transform( + this.ovmap.getProjectionObject(), + this.map.getProjectionObject() ); + } + this.map.panTo(lonLatBounds.getCenterLonLat()); + }, + + /** + * Method: setRectPxBounds + * Set extent rectangle pixel bounds. + * + * Parameters: + * pxBounds - {} + */ + setRectPxBounds: function(pxBounds) { + var top = Math.max(pxBounds.top, 0); + var left = Math.max(pxBounds.left, 0); + var bottom = Math.min(pxBounds.top + Math.abs(pxBounds.getHeight()), + this.ovmap.size.h - this.hComp); + var right = Math.min(pxBounds.left + pxBounds.getWidth(), + this.ovmap.size.w - this.wComp); + var width = Math.max(right - left, 0); + var height = Math.max(bottom - top, 0); + if(width < this.minRectSize || height < this.minRectSize) { + this.extentRectangle.className = this.displayClass + + this.minRectDisplayClass; + var rLeft = left + (width / 2) - (this.minRectSize / 2); + var rTop = top + (height / 2) - (this.minRectSize / 2); + this.extentRectangle.style.top = Math.round(rTop) + 'px'; + this.extentRectangle.style.left = Math.round(rLeft) + 'px'; + this.extentRectangle.style.height = this.minRectSize + 'px'; + this.extentRectangle.style.width = this.minRectSize + 'px'; + } else { + this.extentRectangle.className = this.displayClass + + 'ExtentRectangle'; + this.extentRectangle.style.top = Math.round(top) + 'px'; + this.extentRectangle.style.left = Math.round(left) + 'px'; + this.extentRectangle.style.height = Math.round(height) + 'px'; + this.extentRectangle.style.width = Math.round(width) + 'px'; + } + this.rectPxBounds = new OpenLayers.Bounds( + Math.round(left), Math.round(bottom), + Math.round(right), Math.round(top) + ); + }, + + /** + * Method: getRectBoundsFromMapBounds + * Get the rect bounds from the map bounds. + * + * Parameters: + * lonLatBounds - {} + * + * Returns: + * {}A bounds which is the passed-in map lon/lat extent + * translated into pixel bounds for the overview map + */ + getRectBoundsFromMapBounds: function(lonLatBounds) { + var leftBottomLonLat = new OpenLayers.LonLat(lonLatBounds.left, + lonLatBounds.bottom); + var rightTopLonLat = new OpenLayers.LonLat(lonLatBounds.right, + lonLatBounds.top); + var leftBottomPx = this.getOverviewPxFromLonLat(leftBottomLonLat); + var rightTopPx = this.getOverviewPxFromLonLat(rightTopLonLat); + var bounds = null; + if (leftBottomPx && rightTopPx) { + bounds = new OpenLayers.Bounds(leftBottomPx.x, leftBottomPx.y, + rightTopPx.x, rightTopPx.y); + } + return bounds; + }, + + /** + * Method: getMapBoundsFromRectBounds + * Get the map bounds from the rect bounds. + * + * Parameters: + * pxBounds - {} + * + * Returns: + * {} Bounds which is the passed-in overview rect bounds + * translated into lon/lat bounds for the overview map + */ + getMapBoundsFromRectBounds: function(pxBounds) { + var leftBottomPx = new OpenLayers.Pixel(pxBounds.left, + pxBounds.bottom); + var rightTopPx = new OpenLayers.Pixel(pxBounds.right, + pxBounds.top); + var leftBottomLonLat = this.getLonLatFromOverviewPx(leftBottomPx); + var rightTopLonLat = this.getLonLatFromOverviewPx(rightTopPx); + return new OpenLayers.Bounds(leftBottomLonLat.lon, leftBottomLonLat.lat, + rightTopLonLat.lon, rightTopLonLat.lat); + }, + + /** + * Method: getLonLatFromOverviewPx + * Get a map location from a pixel location + * + * Parameters: + * overviewMapPx - {} + * + * Returns: + * {} Location which is the passed-in overview map + * OpenLayers.Pixel, translated into lon/lat by the overview map + */ + getLonLatFromOverviewPx: function(overviewMapPx) { + var size = this.ovmap.size; + var res = this.ovmap.getResolution(); + var center = this.ovmap.getExtent().getCenterLonLat(); + + var delta_x = overviewMapPx.x - (size.w / 2); + var delta_y = overviewMapPx.y - (size.h / 2); + + return new OpenLayers.LonLat(center.lon + delta_x * res , + center.lat - delta_y * res); + }, + + /** + * Method: getOverviewPxFromLonLat + * Get a pixel location from a map location + * + * Parameters: + * lonlat - {} + * + * Returns: + * {} Location which is the passed-in OpenLayers.LonLat, + * translated into overview map pixels + */ + getOverviewPxFromLonLat: function(lonlat) { + var res = this.ovmap.getResolution(); + var extent = this.ovmap.getExtent(); + var px = null; + if (extent) { + px = new OpenLayers.Pixel( + Math.round(1/res * (lonlat.lon - extent.left)), + Math.round(1/res * (extent.top - lonlat.lat))); + } + return px; + }, + + CLASS_NAME: 'OpenLayers.Control.OverviewMap' +}); diff --git a/openlayers/lib/OpenLayers/Control/Pan.js b/openlayers/lib/OpenLayers/Control/Pan.js new file mode 100644 index 0000000000..7056ad3066 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/Pan.js @@ -0,0 +1,102 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.Pan + * The Pan control is a single button to pan the map in one direction. For + * a more complete control see . + * + * Inherits from: + * - + */ +OpenLayers.Control.Pan = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: slideFactor + * {Integer} Number of pixels by which we'll pan the map in any direction + * on clicking the arrow buttons, defaults to 50. If you want to pan + * by some ratio of the map dimensions, use instead. + */ + slideFactor: 50, + + /** + * APIProperty: slideRatio + * {Number} The fraction of map width/height by which we'll pan the map + * on clicking the arrow buttons. Default is null. If set, will + * override . E.g. if slideRatio is .5, then Pan Up will + * pan up half the map height. + */ + slideRatio: null, + + /** + * Property: direction + * {String} in {'North', 'South', 'East', 'West'} + */ + direction: null, + + /** + * Property: type + * {String} The type of -- When added to a + * , 'type' is used by the panel to determine how to + * handle our events. + */ + type: OpenLayers.Control.TYPE_BUTTON, + + /** + * Constructor: OpenLayers.Control.Pan + * Control which handles the panning (in any of the cardinal directions) + * of the map by a set px distance. + * + * Parameters: + * direction - {String} The direction this button should pan. + * options - {Object} An optional object whose properties will be used + * to extend the control. + */ + initialize: function(direction, options) { + + this.direction = direction; + this.CLASS_NAME += this.direction; + + OpenLayers.Control.prototype.initialize.apply(this, [options]); + }, + + /** + * Method: trigger + */ + trigger: function(){ + + var getSlideFactor = OpenLayers.Function.bind(function (dim) { + return this.slideRatio ? + this.map.getSize()[dim] * this.slideRatio : + this.slideFactor; + }, this); + + switch (this.direction) { + case OpenLayers.Control.Pan.NORTH: + this.map.pan(0, -getSlideFactor("h")); + break; + case OpenLayers.Control.Pan.SOUTH: + this.map.pan(0, getSlideFactor("h")); + break; + case OpenLayers.Control.Pan.WEST: + this.map.pan(-getSlideFactor("w"), 0); + break; + case OpenLayers.Control.Pan.EAST: + this.map.pan(getSlideFactor("w"), 0); + break; + } + }, + + CLASS_NAME: "OpenLayers.Control.Pan" +}); + +OpenLayers.Control.Pan.NORTH = "North"; +OpenLayers.Control.Pan.SOUTH = "South"; +OpenLayers.Control.Pan.EAST = "East"; +OpenLayers.Control.Pan.WEST = "West"; diff --git a/openlayers/lib/OpenLayers/Control/PanPanel.js b/openlayers/lib/OpenLayers/Control/PanPanel.js new file mode 100644 index 0000000000..15c7615024 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/PanPanel.js @@ -0,0 +1,73 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control/Panel.js + * @requires OpenLayers/Control/Pan.js + */ + +/** + * Class: OpenLayers.Control.PanPanel + * The PanPanel is visible control for panning the map North, South, East or + * West in small steps. By default it is drawn in the top left corner of the + * map. + * + * Note: + * If you wish to use this class with the default images and you want + * it to look nice in ie6, you should add the following, conditionally + * added css stylesheet to your HTML file: + * + * (code) + * + * (end) + * + * Inherits from: + * - + */ +OpenLayers.Control.PanPanel = OpenLayers.Class(OpenLayers.Control.Panel, { + + /** + * APIProperty: slideFactor + * {Integer} Number of pixels by which we'll pan the map in any direction + * on clicking the arrow buttons, defaults to 50. If you want to pan + * by some ratio of the map dimensions, use instead. + */ + slideFactor: 50, + + /** + * APIProperty: slideRatio + * {Number} The fraction of map width/height by which we'll pan the map + * on clicking the arrow buttons. Default is null. If set, will + * override . E.g. if slideRatio is .5, then Pan Up will + * pan up half the map height. + */ + slideRatio: null, + + /** + * Constructor: OpenLayers.Control.PanPanel + * Add the four directional pan buttons. + * + * Parameters: + * options - {Object} An optional object whose properties will be used + * to extend the control. + */ + initialize: function(options) { + OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]); + var options = { + slideFactor: this.slideFactor, + slideRatio: this.slideRatio + }; + this.addControls([ + new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH, options), + new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH, options), + new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST, options), + new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST, options) + ]); + }, + + CLASS_NAME: "OpenLayers.Control.PanPanel" +}); diff --git a/openlayers/lib/OpenLayers/Control/PanZoom.js b/openlayers/lib/OpenLayers/Control/PanZoom.js new file mode 100644 index 0000000000..147c0c4b31 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/PanZoom.js @@ -0,0 +1,246 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.PanZoom + * The PanZoom is a visible control, composed of a + * and a . By + * default it is drawn in the upper left corner of the map. + * + * Inherits from: + * - + */ +OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: slideFactor + * {Integer} Number of pixels by which we'll pan the map in any direction + * on clicking the arrow buttons. If you want to pan by some ratio + * of the map dimensions, use instead. + */ + slideFactor: 50, + + /** + * APIProperty: slideRatio + * {Number} The fraction of map width/height by which we'll pan the map + * on clicking the arrow buttons. Default is null. If set, will + * override . E.g. if slideRatio is .5, then the Pan Up + * button will pan up half the map height. + */ + slideRatio: null, + + /** + * Property: buttons + * {Array(DOMElement)} Array of Button Divs + */ + buttons: null, + + /** + * Property: position + * {} + */ + position: null, + + /** + * Constructor: OpenLayers.Control.PanZoom + * + * Parameters: + * options - {Object} + */ + initialize: function(options) { + this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X, + OpenLayers.Control.PanZoom.Y); + OpenLayers.Control.prototype.initialize.apply(this, arguments); + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + this.removeButtons(); + this.buttons = null; + this.position = null; + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: draw + * + * Parameters: + * px - {} + * + * Returns: + * {DOMElement} A reference to the container div for the PanZoom control. + */ + draw: function(px) { + // initialize our internal div + OpenLayers.Control.prototype.draw.apply(this, arguments); + px = this.position; + + // place the controls + this.buttons = []; + + var sz = new OpenLayers.Size(18,18); + var centered = new OpenLayers.Pixel(px.x+sz.w/2, px.y); + + this._addButton("panup", "north-mini.png", centered, sz); + px.y = centered.y+sz.h; + this._addButton("panleft", "west-mini.png", px, sz); + this._addButton("panright", "east-mini.png", px.add(sz.w, 0), sz); + this._addButton("pandown", "south-mini.png", + centered.add(0, sz.h*2), sz); + this._addButton("zoomin", "zoom-plus-mini.png", + centered.add(0, sz.h*3+5), sz); + this._addButton("zoomworld", "zoom-world-mini.png", + centered.add(0, sz.h*4+5), sz); + this._addButton("zoomout", "zoom-minus-mini.png", + centered.add(0, sz.h*5+5), sz); + return this.div; + }, + + /** + * Method: _addButton + * + * Parameters: + * id - {String} + * img - {String} + * xy - {} + * sz - {} + * + * Returns: + * {DOMElement} A Div (an alphaImageDiv, to be precise) that contains the + * image of the button, and has all the proper event handlers set. + */ + _addButton:function(id, img, xy, sz) { + var imgLocation = OpenLayers.Util.getImagesLocation() + img; + var btn = OpenLayers.Util.createAlphaImageDiv( + this.id + "_" + id, + xy, sz, imgLocation, "absolute"); + btn.style.cursor = "pointer"; + //we want to add the outer div + this.div.appendChild(btn); + + OpenLayers.Event.observe(btn, "mousedown", + OpenLayers.Function.bindAsEventListener(this.buttonDown, btn)); + OpenLayers.Event.observe(btn, "dblclick", + OpenLayers.Function.bindAsEventListener(this.doubleClick, btn)); + OpenLayers.Event.observe(btn, "click", + OpenLayers.Function.bindAsEventListener(this.doubleClick, btn)); + btn.action = id; + btn.map = this.map; + + if(!this.slideRatio){ + var slideFactorPixels = this.slideFactor; + var getSlideFactor = function() { + return slideFactorPixels; + }; + } else { + var slideRatio = this.slideRatio; + var getSlideFactor = function(dim) { + return this.map.getSize()[dim] * slideRatio; + }; + } + + btn.getSlideFactor = getSlideFactor; + + //we want to remember/reference the outer div + this.buttons.push(btn); + return btn; + }, + + /** + * Method: _removeButton + * + * Parameters: + * btn - {Object} + */ + _removeButton: function(btn) { + OpenLayers.Event.stopObservingElement(btn); + btn.map = null; + btn.getSlideFactor = null; + this.div.removeChild(btn); + OpenLayers.Util.removeItem(this.buttons, btn); + }, + + /** + * Method: removeButtons + */ + removeButtons: function() { + for(var i=this.buttons.length-1; i>=0; --i) { + this._removeButton(this.buttons[i]); + } + }, + + /** + * Method: doubleClick + * + * Parameters: + * evt - {Event} + * + * Returns: + * {Boolean} + */ + doubleClick: function (evt) { + OpenLayers.Event.stop(evt); + return false; + }, + + /** + * Method: buttonDown + * + * Parameters: + * evt - {Event} + */ + buttonDown: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + + switch (this.action) { + case "panup": + this.map.pan(0, -this.getSlideFactor("h")); + break; + case "pandown": + this.map.pan(0, this.getSlideFactor("h")); + break; + case "panleft": + this.map.pan(-this.getSlideFactor("w"), 0); + break; + case "panright": + this.map.pan(this.getSlideFactor("w"), 0); + break; + case "zoomin": + this.map.zoomIn(); + break; + case "zoomout": + this.map.zoomOut(); + break; + case "zoomworld": + this.map.zoomToMaxExtent(); + break; + } + + OpenLayers.Event.stop(evt); + }, + + CLASS_NAME: "OpenLayers.Control.PanZoom" +}); + +/** + * Constant: X + * {Integer} + */ +OpenLayers.Control.PanZoom.X = 4; + +/** + * Constant: Y + * {Integer} + */ +OpenLayers.Control.PanZoom.Y = 4; diff --git a/openlayers/lib/OpenLayers/Control/PanZoomBar.js b/openlayers/lib/OpenLayers/Control/PanZoomBar.js new file mode 100644 index 0000000000..3f8ef3b300 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/PanZoomBar.js @@ -0,0 +1,428 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control/PanZoom.js + */ + +/** + * Class: OpenLayers.Control.PanZoomBar + * The PanZoomBar is a visible control composed of a + * and a . + * By default it is displayed in the upper left corner of the map as 4 + * directional arrows above a vertical slider. + * + * Inherits from: + * - + */ +OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { + + /** + * APIProperty: zoomStopWidth + */ + zoomStopWidth: 18, + + /** + * APIProperty: zoomStopHeight + */ + zoomStopHeight: 11, + + /** + * Property: slider + */ + slider: null, + + /** + * Property: sliderEvents + * {} + */ + sliderEvents: null, + + /** + * Property: zoombarDiv + * {DOMElement} + */ + zoombarDiv: null, + + /** + * Property: divEvents + * {} + */ + divEvents: null, + + /** + * APIProperty: zoomWorldIcon + * {Boolean} + */ + zoomWorldIcon: false, + + /** + * APIProperty: panIcons + * {Boolean} Set this property to false not to display the pan icons. If + * false the zoom world icon is placed under the zoom bar. Defaults to + * true. + */ + panIcons: true, + + /** + * APIProperty: forceFixedZoomLevel + * {Boolean} Force a fixed zoom level even though the map has + * fractionalZoom + */ + forceFixedZoomLevel: false, + + /** + * Property: mouseDragStart + * {} + */ + mouseDragStart: null, + + /** + * Property: deltaY + * {Number} The cumulative vertical pixel offset during a zoom bar drag. + */ + deltaY: null, + + /** + * Property: zoomStart + * {} + */ + zoomStart: null, + + /** + * Constructor: OpenLayers.Control.PanZoomBar + */ + + /** + * APIMethod: destroy + */ + destroy: function() { + + this._removeZoomBar(); + + this.map.events.un({ + "changebaselayer": this.redraw, + scope: this + }); + + OpenLayers.Control.PanZoom.prototype.destroy.apply(this, arguments); + + delete this.mouseDragStart; + delete this.zoomStart; + }, + + /** + * Method: setMap + * + * Parameters: + * map - {} + */ + setMap: function(map) { + OpenLayers.Control.PanZoom.prototype.setMap.apply(this, arguments); + this.map.events.register("changebaselayer", this, this.redraw); + }, + + /** + * Method: redraw + * clear the div and start over. + */ + redraw: function() { + if (this.div != null) { + this.removeButtons(); + this._removeZoomBar(); + } + this.draw(); + }, + + /** + * Method: draw + * + * Parameters: + * px - {} + */ + draw: function(px) { + // initialize our internal div + OpenLayers.Control.prototype.draw.apply(this, arguments); + px = this.position.clone(); + + // place the controls + this.buttons = []; + + var sz = new OpenLayers.Size(18,18); + if (this.panIcons) { + var centered = new OpenLayers.Pixel(px.x+sz.w/2, px.y); + var wposition = sz.w; + + if (this.zoomWorldIcon) { + centered = new OpenLayers.Pixel(px.x+sz.w, px.y); + } + + this._addButton("panup", "north-mini.png", centered, sz); + px.y = centered.y+sz.h; + this._addButton("panleft", "west-mini.png", px, sz); + if (this.zoomWorldIcon) { + this._addButton("zoomworld", "zoom-world-mini.png", px.add(sz.w, 0), sz); + + wposition *= 2; + } + this._addButton("panright", "east-mini.png", px.add(wposition, 0), sz); + this._addButton("pandown", "south-mini.png", centered.add(0, sz.h*2), sz); + this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, sz.h*3+5), sz); + centered = this._addZoomBar(centered.add(0, sz.h*4 + 5)); + this._addButton("zoomout", "zoom-minus-mini.png", centered, sz); + } + else { + this._addButton("zoomin", "zoom-plus-mini.png", px, sz); + centered = this._addZoomBar(px.add(0, sz.h)); + this._addButton("zoomout", "zoom-minus-mini.png", centered, sz); + if (this.zoomWorldIcon) { + centered = centered.add(0, sz.h+3); + this._addButton("zoomworld", "zoom-world-mini.png", centered, sz); + } + } + return this.div; + }, + + /** + * Method: _addZoomBar + * + * Parameters: + * location - {} where zoombar drawing is to start. + */ + _addZoomBar:function(centered) { + var imgLocation = OpenLayers.Util.getImagesLocation(); + + var id = this.id + "_" + this.map.id; + var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom(); + var slider = OpenLayers.Util.createAlphaImageDiv(id, + centered.add(-1, zoomsToEnd * this.zoomStopHeight), + new OpenLayers.Size(20,9), + imgLocation+"slider.png", + "absolute"); + slider.style.cursor = "move"; + this.slider = slider; + + this.sliderEvents = new OpenLayers.Events(this, slider, null, true, + {includeXY: true}); + this.sliderEvents.on({ + "touchstart": this.zoomBarDown, + "touchmove": this.zoomBarDrag, + "touchend": this.zoomBarUp, + "mousedown": this.zoomBarDown, + "mousemove": this.zoomBarDrag, + "mouseup": this.zoomBarUp, + "dblclick": this.doubleClick, + "click": this.doubleClick + }); + + var sz = new OpenLayers.Size(); + sz.h = this.zoomStopHeight * this.map.getNumZoomLevels(); + sz.w = this.zoomStopWidth; + var div = null; + + if (OpenLayers.Util.alphaHack()) { + var id = this.id + "_" + this.map.id; + div = OpenLayers.Util.createAlphaImageDiv(id, centered, + new OpenLayers.Size(sz.w, + this.zoomStopHeight), + imgLocation + "zoombar.png", + "absolute", null, "crop"); + div.style.height = sz.h + "px"; + } else { + div = OpenLayers.Util.createDiv( + 'OpenLayers_Control_PanZoomBar_Zoombar' + this.map.id, + centered, + sz, + imgLocation+"zoombar.png"); + } + div.style.cursor = "pointer"; + this.zoombarDiv = div; + + this.divEvents = new OpenLayers.Events(this, div, null, true, + {includeXY: true}); + this.divEvents.on({ + "touchmove": this.passEventToSlider, + "mousedown": this.divClick, + "mousemove": this.passEventToSlider, + "dblclick": this.doubleClick, + "click": this.doubleClick + }); + + this.div.appendChild(div); + + this.startTop = parseInt(div.style.top); + this.div.appendChild(slider); + + this.map.events.register("zoomend", this, this.moveZoomBar); + + centered = centered.add(0, + this.zoomStopHeight * this.map.getNumZoomLevels()); + return centered; + }, + + /** + * Method: _removeZoomBar + */ + _removeZoomBar: function() { + this.sliderEvents.un({ + "touchmove": this.zoomBarDrag, + "mousedown": this.zoomBarDown, + "mousemove": this.zoomBarDrag, + "mouseup": this.zoomBarUp, + "dblclick": this.doubleClick, + "click": this.doubleClick + }); + this.sliderEvents.destroy(); + + this.divEvents.un({ + "touchmove": this.passEventToSlider, + "mousedown": this.divClick, + "mousemove": this.passEventToSlider, + "dblclick": this.doubleClick, + "click": this.doubleClick + }); + this.divEvents.destroy(); + + this.div.removeChild(this.zoombarDiv); + this.zoombarDiv = null; + this.div.removeChild(this.slider); + this.slider = null; + + this.map.events.unregister("zoomend", this, this.moveZoomBar); + }, + + /** + * Method: passEventToSlider + * This function is used to pass events that happen on the div, or the map, + * through to the slider, which then does its moving thing. + * + * Parameters: + * evt - {} + */ + passEventToSlider:function(evt) { + this.sliderEvents.handleBrowserEvent(evt); + }, + + /** + * Method: divClick + * Picks up on clicks directly on the zoombar div + * and sets the zoom level appropriately. + */ + divClick: function (evt) { + if (!OpenLayers.Event.isLeftClick(evt)) { + return; + } + var levels = evt.xy.y / this.zoomStopHeight; + if(this.forceFixedZoomLevel || !this.map.fractionalZoom) { + levels = Math.floor(levels); + } + var zoom = (this.map.getNumZoomLevels() - 1) - levels; + zoom = Math.min(Math.max(zoom, 0), this.map.getNumZoomLevels() - 1); + this.map.zoomTo(zoom); + OpenLayers.Event.stop(evt); + }, + + /* + * Method: zoomBarDown + * event listener for clicks on the slider + * + * Parameters: + * evt - {} + */ + zoomBarDown:function(evt) { + if (!OpenLayers.Event.isLeftClick(evt) && !OpenLayers.Event.isSingleTouch(evt)) { + return; + } + this.map.events.on({ + "touchmove": this.passEventToSlider, + "mousemove": this.passEventToSlider, + "mouseup": this.passEventToSlider, + scope: this + }); + this.mouseDragStart = evt.xy.clone(); + this.zoomStart = evt.xy.clone(); + this.div.style.cursor = "move"; + // reset the div offsets just in case the div moved + this.zoombarDiv.offsets = null; + OpenLayers.Event.stop(evt); + }, + + /* + * Method: zoomBarDrag + * This is what happens when a click has occurred, and the client is + * dragging. Here we must ensure that the slider doesn't go beyond the + * bottom/top of the zoombar div, as well as moving the slider to its new + * visual location + * + * Parameters: + * evt - {} + */ + zoomBarDrag:function(evt) { + if (this.mouseDragStart != null) { + var deltaY = this.mouseDragStart.y - evt.xy.y; + var offsets = OpenLayers.Util.pagePosition(this.zoombarDiv); + if ((evt.clientY - offsets[1]) > 0 && + (evt.clientY - offsets[1]) < parseInt(this.zoombarDiv.style.height) - 2) { + var newTop = parseInt(this.slider.style.top) - deltaY; + this.slider.style.top = newTop+"px"; + this.mouseDragStart = evt.xy.clone(); + } + // set cumulative displacement + this.deltaY = this.zoomStart.y - evt.xy.y; + OpenLayers.Event.stop(evt); + } + }, + + /* + * Method: zoomBarUp + * Perform cleanup when a mouseup event is received -- discover new zoom + * level and switch to it. + * + * Parameters: + * evt - {} + */ + zoomBarUp:function(evt) { + if (!OpenLayers.Event.isLeftClick(evt) && evt.type !== "touchend") { + return; + } + if (this.mouseDragStart) { + this.div.style.cursor=""; + this.map.events.un({ + "touchmove": this.passEventToSlider, + "mouseup": this.passEventToSlider, + "mousemove": this.passEventToSlider, + scope: this + }); + var zoomLevel = this.map.zoom; + if (!this.forceFixedZoomLevel && this.map.fractionalZoom) { + zoomLevel += this.deltaY/this.zoomStopHeight; + zoomLevel = Math.min(Math.max(zoomLevel, 0), + this.map.getNumZoomLevels() - 1); + } else { + zoomLevel += this.deltaY/this.zoomStopHeight; + zoomLevel = Math.max(Math.round(zoomLevel), 0); + } + this.map.zoomTo(zoomLevel); + this.mouseDragStart = null; + this.zoomStart = null; + this.deltaY = 0; + OpenLayers.Event.stop(evt); + } + }, + + /* + * Method: moveZoomBar + * Change the location of the slider to match the current zoom level. + */ + moveZoomBar:function() { + var newTop = + ((this.map.getNumZoomLevels()-1) - this.map.getZoom()) * + this.zoomStopHeight + this.startTop + 1; + this.slider.style.top = newTop + "px"; + }, + + CLASS_NAME: "OpenLayers.Control.PanZoomBar" +}); diff --git a/openlayers/lib/OpenLayers/Control/Panel.js b/openlayers/lib/OpenLayers/Control/Panel.js new file mode 100644 index 0000000000..1129ef4e52 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/Panel.js @@ -0,0 +1,392 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.Panel + * The Panel control is a container for other controls. With it toolbars + * may be composed. + * + * Inherits from: + * - + */ +OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { + /** + * Property: controls + * {Array()} + */ + controls: null, + + /** + * APIProperty: autoActivate + * {Boolean} Activate the control when it is added to a map. Default is + * true. + */ + autoActivate: true, + + /** + * APIProperty: defaultControl + * {} The control which is activated when the control is + * activated (turned on), which also happens at instantiation. + * If is true, will be nullified after the + * first activation of the panel. + */ + defaultControl: null, + + /** + * APIProperty: saveState + * {Boolean} If set to true, the active state of this panel's controls will + * be stored on panel deactivation, and restored on reactivation. Default + * is false. + */ + saveState: false, + + /** + * APIProperty: allowDepress + * {Boolean} If is true the controls can + * be deactivated by clicking the icon that represents them. Default + * is false. + */ + allowDepress: false, + + /** + * Property: activeState + * {Object} stores the active state of this panel's controls. + */ + activeState: null, + + /** + * Constructor: OpenLayers.Control.Panel + * Create a new control panel. + * + * Each control in the panel is represented by an icon. When clicking + * on an icon, the method is called. + * + * Specific properties for controls on a panel: + * type - {Number} One of , + * , . + * If not provided, is assumed. + * title - {string} Text displayed when mouse is over the icon that + * represents the control. + * + * The of a control determines the behavior when + * clicking its icon: + * - The control is activated and other + * controls of this type in the same panel are deactivated. This is + * the default type. + * - The active state of the control is + * toggled. + * - The + * method of the control is called, + * but its active state is not changed. + * + * If a control is , it will be drawn with the + * olControl[Name]ItemActive class, otherwise with the + * olControl[Name]ItemInactive class. + * + * Parameters: + * options - {Object} An optional object whose properties will be used + * to extend the control. + */ + initialize: function(options) { + OpenLayers.Control.prototype.initialize.apply(this, [options]); + this.controls = []; + this.activeState = {}; + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + OpenLayers.Control.prototype.destroy.apply(this, arguments); + for (var ctl, i = this.controls.length - 1; i >= 0; i--) { + ctl = this.controls[i]; + if (ctl.events) { + ctl.events.un({ + activate: this.iconOn, + deactivate: this.iconOff + }); + } + OpenLayers.Event.stopObservingElement(ctl.panel_div); + ctl.panel_div = null; + } + this.activeState = null; + }, + + /** + * APIMethod: activate + */ + activate: function() { + if (OpenLayers.Control.prototype.activate.apply(this, arguments)) { + var control; + for (var i=0, len=this.controls.length; i=0; i--) { + this.div.removeChild(this.div.childNodes[i]); + } + this.div.innerHTML = ""; + if (this.active) { + for (var i=0, len=this.controls.length; i} + */ + activateControl: function (control) { + if (!this.active) { return false; } + if (control.type == OpenLayers.Control.TYPE_BUTTON) { + control.trigger(); + return; + } + if (control.type == OpenLayers.Control.TYPE_TOGGLE) { + if (control.active) { + control.deactivate(); + } else { + control.activate(); + } + return; + } + if (this.allowDepress && control.active) { + control.deactivate(); + } else { + var c; + for (var i=0, len=this.controls.length; i} Controls to add in the panel. + */ + addControls: function(controls) { + if (!(OpenLayers.Util.isArray(controls))) { + controls = [controls]; + } + this.controls = this.controls.concat(controls); + + // Give each control a panel_div which will be used later. + // Access to this div is via the panel_div attribute of the + // control added to the panel. + // Also, stop mousedowns and clicks, but don't stop mouseup, + // since they need to pass through. + for (var i=0, len=controls.length; i)} Controls to add into map. + */ + addControlsToMap: function (controls) { + var control; + for (var i=0, len=controls.length; i)} A list of controls matching the given criteria. + * An empty array is returned if no matches are found. + */ + getControlsBy: function(property, match) { + var test = (typeof match.test == "function"); + var found = OpenLayers.Array.filter(this.controls, function(item) { + return item[property] == match || (test && match.test(item[property])); + }); + return found; + }, + + /** + * APIMethod: getControlsByName + * Get a list of contorls with names matching the given name. + * + * Parameter: + * match - {String | Object} A control name. The name can also be a regular + * expression literal or object. In addition, it can be any object + * with a method named test. For reqular expressions or other, if + * name.test(control.name) evaluates to true, the control will be included + * in the list of controls returned. If no controls are found, an empty + * array is returned. + * + * Returns: + * {Array()} A list of controls matching the given name. + * An empty array is returned if no matches are found. + */ + getControlsByName: function(match) { + return this.getControlsBy("name", match); + }, + + /** + * APIMethod: getControlsByClass + * Get a list of controls of a given type (CLASS_NAME). + * + * Parameter: + * match - {String | Object} A control class name. The type can also be a + * regular expression literal or object. In addition, it can be any + * object with a method named test. For reqular expressions or other, + * if type.test(control.CLASS_NAME) evaluates to true, the control will + * be included in the list of controls returned. If no controls are + * found, an empty array is returned. + * + * Returns: + * {Array()} A list of controls matching the given type. + * An empty array is returned if no matches are found. + */ + getControlsByClass: function(match) { + return this.getControlsBy("CLASS_NAME", match); + }, + + CLASS_NAME: "OpenLayers.Control.Panel" +}); + diff --git a/openlayers/lib/OpenLayers/Control/Permalink.js b/openlayers/lib/OpenLayers/Control/Permalink.js new file mode 100644 index 0000000000..ed4f2488ef --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/Permalink.js @@ -0,0 +1,249 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Control/ArgParser.js + * @requires OpenLayers/Lang.js + */ + +/** + * Class: OpenLayers.Control.Permalink + * The Permalink control is hyperlink that will return the user to the + * current map view. By default it is drawn in the lower right corner of the + * map. The href is updated as the map is zoomed, panned and whilst layers + * are switched. + * ` + * Inherits from: + * - + */ +OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: argParserClass + * {Class} The ArgParser control class (not instance) to use with this + * control. + */ + argParserClass: OpenLayers.Control.ArgParser, + + /** + * Property: element + * {DOMElement} + */ + element: null, + + /** + * APIProperty: anchor + * {Boolean} This option changes 3 things: + * the character '#' is used in place of the character '?', + * the window.href is updated if no element is provided. + * When this option is set to true it's not recommend to provide + * a base without provide an element. + */ + anchor: false, + + /** + * APIProperty: base + * {String} + */ + base: '', + + /** + * APIProperty: displayProjection + * {} Requires proj4js support. Projection used + * when creating the coordinates in the link. This will reproject the + * map coordinates into display coordinates. If you are using this + * functionality, the permalink which is last added to the map will + * determine the coordinate type which is read from the URL, which + * means you should not add permalinks with different + * displayProjections to the same map. + */ + displayProjection: null, + + /** + * Constructor: OpenLayers.Control.Permalink + * + * Parameters: + * element - {DOMElement} + * base - {String} + * options - {Object} options to the control. + * + * Or for anchor: + * options - {Object} options to the control. + */ + initialize: function(element, base, options) { + if (element !== null && typeof element == 'object' && !OpenLayers.Util.isElement(element)) { + options = element; + this.base = document.location.href; + OpenLayers.Control.prototype.initialize.apply(this, [options]); + if (this.element != null) { + this.element = OpenLayers.Util.getElement(this.element); + } + } + else { + OpenLayers.Control.prototype.initialize.apply(this, [options]); + this.element = OpenLayers.Util.getElement(element); + this.base = base || document.location.href; + } + }, + + /** + * APIMethod: destroy + */ + destroy: function() { + if (this.element.parentNode == this.div) { + this.div.removeChild(this.element); + } + this.element = null; + + this.map.events.unregister('moveend', this, this.updateLink); + + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: setMap + * Set the map property for the control. + * + * Parameters: + * map - {} + */ + setMap: function(map) { + OpenLayers.Control.prototype.setMap.apply(this, arguments); + + //make sure we have an arg parser attached + for(var i=0, len=this.map.controls.length; i} center to encode in the permalink. + * Defaults to the current map center. + * zoom - {Integer} zoom level to encode in the permalink. Defaults to the + * current map zoom level. + * layers - {Array()} layers to encode in the permalink. + * Defaults to the current map layers. + * + * Returns: + * {Object} Hash of parameters that will be url-encoded into the + * permalink. + */ + createParams: function(center, zoom, layers) { + center = center || this.map.getCenter(); + + var params = OpenLayers.Util.getParameters(this.base); + + // If there's still no center, map is not initialized yet. + // Break out of this function, and simply return the params from the + // base link. + if (center) { + + //zoom + params.zoom = zoom || this.map.getZoom(); + + //lon,lat + var lat = center.lat; + var lon = center.lon; + + if (this.displayProjection) { + var mapPosition = OpenLayers.Projection.transform( + { x: lon, y: lat }, + this.map.getProjectionObject(), + this.displayProjection ); + lon = mapPosition.x; + lat = mapPosition.y; + } + params.lat = Math.round(lat*100000)/100000; + params.lon = Math.round(lon*100000)/100000; + + //layers + layers = layers || this.map.layers; + params.layers = ''; + for (var i=0, len=layers.length; i + */ +OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: type + * {OpenLayers.Control.TYPES} + */ + type: OpenLayers.Control.TYPE_TOOL, + + /** + * Property: containerOrigin + * {Object} Cached object representing the layer container origin (in pixels). + */ + containerOrigin: null, + + /** + * Property: pinchOrigin + * {Object} Cached object representing the pinch start (in pixels). + */ + pinchOrigin: null, + + /** + * Property: currentCenter + * {Object} Cached object representing the latest pinch center (in pixels). + */ + currentCenter: null, + + /** + * APIProperty: autoActivate + * {Boolean} Activate the control when it is added to a map. Default is + * true. + */ + autoActivate: true, + + /** + * Constructor: OpenLayers.Control.PinchZoom + * Create a control for zooming with pinch gestures. This works on devices + * with multi-touch support. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * the control + */ + initialize: function(options) { + OpenLayers.Control.prototype.initialize.apply(this, arguments); + this.handler = new OpenLayers.Handler.Pinch(this, { + start: this.pinchStart, + move: this.pinchMove, + done: this.pinchDone + }, this.handlerOptions); + }, + + /** + * APIMethod: activate + * Activate this control. Must be called after the control is added to a + * map. + * + * Returns: + * {Boolean} The control was successfully activated. + */ + activate: function() { + var activated = OpenLayers.Control.prototype.activate.apply(this,arguments); + if (activated) { + this.map.events.on({ + moveend: this.updateContainerOrigin, + scope: this + }); + this.updateContainerOrigin(); + } + return activated; + }, + + /** + * APIMethod: deactivate + * Deactivate this control. + * + * Returns: + * {Boolean} The control was successfully deactivated. + */ + deactivate: function() { + var deactivated = OpenLayers.Control.prototype.deactivate.apply(this,arguments); + if (this.map && this.map.events) { + this.map.events.un({ + moveend: this.updateContainerOrigin, + scope: this + }); + } + return deactivated; + }, + + /** + * Method: updateContainerOrigin + * Must be called each time the layer container origin changes. + */ + updateContainerOrigin: function() { + var container = this.map.layerContainerDiv; + this.containerOrigin = { + x: parseInt(container.style.left, 10), + y: parseInt(container.style.top, 10) + }; + }, + + /** + * Method: pinchStart + * + * Parameters: + * evt - {Event} + * pinchData - {Object} pinch data object related to the current touchmove + * of the pinch gesture. This give us the current scale of the pinch. + */ + pinchStart: function(evt, pinchData) { + this.pinchOrigin = evt.xy; + this.currentCenter = evt.xy; + }, + + /** + * Method: pinchMove + * + * Parameters: + * evt - {Event} + * pinchData - {Object} pinch data object related to the current touchmove + * of the pinch gesture. This give us the current scale of the pinch. + */ + pinchMove: function(evt, pinchData) { + var scale = pinchData.scale; + var containerOrigin = this.containerOrigin; + var pinchOrigin = this.pinchOrigin; + var current = evt.xy; + + var dx = Math.round((current.x - pinchOrigin.x) + (scale - 1) * (containerOrigin.x - pinchOrigin.x)); + var dy = Math.round((current.y - pinchOrigin.y) + (scale - 1) * (containerOrigin.y - pinchOrigin.y)); + + this.applyTransform( + "translate(" + dx + "px, " + dy + "px) scale(" + scale + ")" + ); + this.currentCenter = current; + }, + + /** + * Method: applyTransform + * Applies the given transform to layers. + */ + applyTransform: function(transform) { + var style = this.map.layerContainerDiv.style; + style['-webkit-transform'] = transform; + style['-moz-transform'] = transform; + }, + + /** + * Method: pinchDone + * + * Parameters: + * evt - {Event} + * start - {Object} pinch data object related to the touchstart event that + * started the pinch gesture. + * last - {Object} pinch data object related to the last touchmove event + * of the pinch gesture. This give us the final scale of the pinch. + */ + pinchDone: function(evt, start, last) { + this.applyTransform(""); + var zoom = this.map.getZoomForResolution(this.map.getResolution() / last.scale, true); + if (zoom !== this.map.getZoom() || !this.currentCenter.equals(this.pinchOrigin)) { + var resolution = this.map.getResolutionForZoom(zoom); + + var location = this.map.getLonLatFromPixel(this.pinchOrigin); + var zoomPixel = this.currentCenter; + var size = this.map.getSize(); + + location.lon += resolution * ((size.w / 2) - zoomPixel.x); + location.lat -= resolution * ((size.h / 2) - zoomPixel.y); + + this.map.setCenter(location, zoom); + } + }, + + CLASS_NAME: "OpenLayers.Control.PinchZoom" + +}); diff --git a/openlayers/lib/OpenLayers/Control/SLDSelect.js b/openlayers/lib/OpenLayers/Control/SLDSelect.js new file mode 100644 index 0000000000..7bb7574bf9 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/SLDSelect.js @@ -0,0 +1,572 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Layer/WMS.js + * @requires OpenLayers/Handler/RegularPolygon.js + * @requires OpenLayers/Handler/Polygon.js + * @requires OpenLayers/Handler/Path.js + * @requires OpenLayers/Handler/Click.js + * @requires OpenLayers/Filter/Spatial.js + * @requires OpenLayers/Format/SLD/v1_0_0.js + */ + +/** + * Class: OpenLayers.Control.SLDSelect + * Perform selections on WMS layers using Styled Layer Descriptor (SLD) + * + * Inherits from: + * - + */ +OpenLayers.Control.SLDSelect = OpenLayers.Class(OpenLayers.Control, { + + /** + * Constant: EVENT_TYPES + * {Array(String)} Supported application event types. Register a listener + * for a particular event with the following syntax: + * (code) + * control.events.register(type, obj, listener); + * (end) + * + * Listeners will be called with a reference to an event object. The + * properties of this event depends on exactly what happened. + * + * Supported control event types (in addition to those from + * ): + * selected - Triggered when a selection occurs. Listeners receive an + * event with *filters* and *layer* properties. Filters will be an + * array of OpenLayers.Filter objects created in order to perform + * the particular selection. + */ + EVENT_TYPES: ["selected"], + + /** + * APIProperty: clearOnDeactivate + * {Boolean} Should the selection be cleared when the control is + * deactivated. Default value is false. + */ + clearOnDeactivate: false, + + /** + * APIProperty: layers + * {Array()} The WMS layers this control will work + * on. + */ + layers: null, + + /** + * Property: callbacks + * {Object} The functions that are sent to the handler for callback + */ + callbacks: null, + + /** + * APIProperty: selectionSymbolizer + * {Object} Determines the styling of the selected objects. Default is + * a selection in red. + */ + selectionSymbolizer: { + 'Polygon': {fillColor: '#FF0000', stroke: false}, + 'Line': {strokeColor: '#FF0000', strokeWidth: 2}, + 'Point': {graphicName: 'square', fillColor: '#FF0000', pointRadius: 5} + }, + + /** + * APIProperty: layerOptions + * {Object} The options to apply to the selection layer, by default the + * selection layer will be kept out of the layer switcher. + */ + layerOptions: null, + + /** + * APIProperty: handlerOptions + * {Object} Used to set non-default properties on the control's handler + */ + handlerOptions: null, + + /** + * APIProperty: sketchStyle + * {|Object} Style or symbolizer to use for the sketch + * handler. The recommended way of styling the sketch layer, however, is + * to configure an in the layerOptions of the + * : + * + * (code) + * new OpenLayers.Control.SLDSelect(OpenLayers.Handler.Path, { + * handlerOptions: { + * layerOptions: { + * styleMap: new OpenLayers.StyleMap({ + * "default": {strokeColor: "yellow"} + * }); + * } + * } + * }); + * (end) + */ + sketchStyle: null, + + /** + * APIProperty: wfsCache + * {Object} Cache to use for storing parsed results from + * . If not provided, + * these will be cached on the prototype. + */ + wfsCache: {}, + + /** + * APIProperty: layerCache + * {Object} Cache to use for storing references to the selection layers. + * Normally each source layer will have exactly 1 selection layer of + * type OpenLayers.Layer.WMS. If not provided, layers will + * be cached on the prototype. Note that if is + * true, the layer will no longer be cached after deactivating the + * control. + */ + layerCache: {}, + + /** + * Constructor: OpenLayers.Control.SLDSelect + * Create a new control for selecting features in WMS layers using + * Styled Layer Descriptor (SLD). + * + * Parameters: + * handler - {} A sketch handler class. This determines + * the type of selection, e.g. box (), point + * (), path () or + * polygon () selection. To use circle + * type selection, use and pass + * the number of desired sides (e.g. 40) as "sides" property to the + * . + * options - {Object} An object containing all configuration properties for + * the control. + * + * Valid options: + * layers - Array({}) The layers to perform the + * selection on. + */ + initialize: function(handler, options) { + // concatenate events specific to this control with those from the base + this.EVENT_TYPES = + OpenLayers.Control.SLDSelect.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + OpenLayers.Control.prototype.initialize.apply(this, [options]); + + this.callbacks = OpenLayers.Util.extend({done: this.select, + click: this.select}, this.callbacks); + this.handlerOptions = this.handlerOptions || {}; + this.layerOptions = OpenLayers.Util.applyDefaults(this.layerOptions, { + displayInLayerSwitcher: false, + tileOptions: {maxGetUrlLength: 2048} + }); + if (this.sketchStyle) { + this.handlerOptions.layerOptions = OpenLayers.Util.applyDefaults( + this.handlerOptions.layerOptions, + {styleMap: new OpenLayers.StyleMap({"default": this.sketchStyle})} + ); + } + this.handler = new handler(this, this.callbacks, this.handlerOptions); + }, + + /** + * APIMethod: destroy + * Take care of things that are not handled in superclass. + */ + destroy: function() { + for (var key in this.layerCache) { + delete this.layerCache[key]; + } + for (var key in this.wfsCache) { + delete this.wfsCache[key]; + } + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: coupleLayerVisiblity + * Couple the selection layer and the source layer with respect to + * layer visibility. So if the source layer is turned off, the + * selection layer is also turned off. + * + * Parameters: + * evt - {Object} + */ + coupleLayerVisiblity: function(evt) { + this.setVisibility(evt.object.getVisibility()); + }, + + /** + * Method: createSelectionLayer + * Creates a "clone" from the source layer in which the selection can + * be drawn. This ensures both the source layer and the selection are + * visible and not only the selection. + * + * Parameters: + * source - {} The source layer on which the selection + * is performed. + * + * Returns: + * {} A WMS layer with maxGetUrlLength configured to 2048 + * since SLD selections can easily get quite long. + */ + createSelectionLayer: function(source) { + // check if we already have a selection layer for the source layer + var selectionLayer; + if (!this.layerCache[source.id]) { + selectionLayer = new OpenLayers.Layer.WMS(source.name, + source.url, source.params, + OpenLayers.Util.applyDefaults( + this.layerOptions, + source.getOptions()) + ); + this.layerCache[source.id] = selectionLayer; + // make sure the layers are coupled wrt visibility, but only + // if they are not displayed in the layer switcher, because in + // that case the user cannot control visibility. + if (this.layerOptions.displayInLayerSwitcher === false) { + source.events.on({ + "visibilitychanged": this.coupleLayerVisiblity, + scope: selectionLayer}); + } + this.map.addLayer(selectionLayer); + } else { + selectionLayer = this.layerCache[source.id]; + } + return selectionLayer; + }, + + /** + * Method: createSLD + * Create the SLD document for the layer using the supplied filters. + * + * Parameters: + * layer - {} + * filters - Array({}) The filters to be applied. + * geometryAttributes - Array({Object}) The geometry attributes of the + * layer. + * + * Returns: + * {String} The SLD document generated as a string. + */ + createSLD: function(layer, filters, geometryAttributes) { + var sld = {version: "1.0.0", namedLayers: {}}; + var layerNames = [layer.params.LAYERS].join(",").split(","); + for (var i=0, len=layerNames.length; i= 0) { + symbolizer = {Polygon: this.selectionSymbolizer['Polygon']}; + } else if (geometryAttribute.type.indexOf('LineString') >= 0) { + symbolizer = {Line: this.selectionSymbolizer['Line']}; + } else if (geometryAttribute.type.indexOf('Point') >= 0) { + symbolizer = {Point: this.selectionSymbolizer['Point']}; + } + var filter = filters[i]; + sld.namedLayers[name].userStyles.push({name: 'default', rules: [ + new OpenLayers.Rule({symbolizer: symbolizer, + filter: filter, + maxScaleDenominator: layer.options.minScale}) + ]}); + } + return new OpenLayers.Format.SLD({srsName: this.map.getProjection()}).write(sld); + }, + + /** + * Method: parseDescribeLayer + * Parse the SLD WMS DescribeLayer response and issue the corresponding + * WFS DescribeFeatureType request + * + * request - {XMLHttpRequest} The request object. + */ + parseDescribeLayer: function(request) { + var format = new OpenLayers.Format.WMSDescribeLayer(); + var doc = request.responseXML; + if(!doc || !doc.documentElement) { + doc = request.responseText; + } + var describeLayer = format.read(doc); + var typeNames = []; + var url = null; + for (var i=0, len=describeLayer.length; i} The layer for which to look up the + * geometry attributes. + * + * Returns: + * Array({Object}) Array of geometry attributes + */ + getGeometryAttributes: function(layer) { + var result = []; + var cache = this.wfsCache[layer.id]; + for (var i=0, len=cache.featureTypes.length; i= 0) || + (type.indexOf('GeometryAssociationType') >=0) || + (type.indexOf('GeometryPropertyType') >= 0) || + (type.indexOf('Point') >= 0) || + (type.indexOf('Polygon') >= 0) ) { + result.push(property); + } + } + } + return result; + }, + + /** + * APIMethod: activate + * Activate the control. Activating the control will perform a SLD WMS + * DescribeLayer request followed by a WFS DescribeFeatureType request + * so that the proper symbolizers can be chosen based on the geometry + * type. + */ + activate: function() { + var activated = OpenLayers.Control.prototype.activate.call(this); + if(activated) { + for (var i=0, len=this.layers.length; i)} The new set of layers on which + * the selection should be performed. + */ + setLayers: function(layers) { + if(this.active) { + this.deactivate(); + this.layers = layers; + this.activate(); + } else { + this.layers = layers; + } + }, + + /** + * Function: createFilter + * Create the filter to be used in the SLD. + * + * Parameters: + * geometryAttribute - {Object} Used to get the name of the geometry + * attribute which is needed for constructing the spatial filter. + * geometry - {} The geometry to use. + * + * Returns: + * {} The spatial filter created. + */ + createFilter: function(geometryAttribute, geometry) { + var filter = null; + if (this.handler instanceof OpenLayers.Handler.RegularPolygon) { + // box + if (this.handler.irregular === true) { + filter = new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.BBOX, + property: geometryAttribute.name, + value: geometry.getBounds()} + ); + } else { + filter = new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.INTERSECTS, + property: geometryAttribute.name, + value: geometry} + ); + } + } else if (this.handler instanceof OpenLayers.Handler.Polygon) { + filter = new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.INTERSECTS, + property: geometryAttribute.name, + value: geometry} + ); + } else if (this.handler instanceof OpenLayers.Handler.Path) { + // if source layer is point based, use DWITHIN instead + if (geometryAttribute.type.indexOf('Point') >= 0) { + filter = new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.DWITHIN, + property: geometryAttribute.name, + distance: this.map.getExtent().getWidth()*0.01 , + distanceUnits: this.map.getUnits(), + value: geometry} + ); + } else { + filter = new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.INTERSECTS, + property: geometryAttribute.name, + value: geometry} + ); + } + } else if (this.handler instanceof OpenLayers.Handler.Click) { + if (geometryAttribute.type.indexOf('Polygon') >= 0) { + filter = new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.INTERSECTS, + property: geometryAttribute.name, + value: geometry} + ); + } else { + filter = new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.DWITHIN, + property: geometryAttribute.name, + distance: this.map.getExtent().getWidth()*0.01 , + distanceUnits: this.map.getUnits(), + value: geometry} + ); + } + } + return filter; + }, + + /** + * Method: select + * When the handler is done, use SLD_BODY on the selection layer to + * display the selection in the map. + * + * Parameters: + * geometry - {Object} or {} + */ + select: function(geometry) { + this._queue = function() { + for (var i=0, len=this.layers.length; i + */ +OpenLayers.Control.Scale = OpenLayers.Class(OpenLayers.Control, { + + /** + * Parameter: element + * {DOMElement} + */ + element: null, + + /** + * APIProperty: geodesic + * {Boolean} Use geodesic measurement. Default is false. The recommended + * setting for maps in EPSG:4326 is false, and true EPSG:900913. If set to + * true, the scale will be calculated based on the horizontal size of the + * pixel in the center of the map viewport. + */ + geodesic: false, + + /** + * Constructor: OpenLayers.Control.Scale + * + * Parameters: + * element - {DOMElement} + * options - {Object} + */ + initialize: function(element, options) { + OpenLayers.Control.prototype.initialize.apply(this, [options]); + this.element = OpenLayers.Util.getElement(element); + }, + + /** + * Method: draw + * + * Returns: + * {DOMElement} + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + if (!this.element) { + this.element = document.createElement("div"); + this.div.appendChild(this.element); + } + this.map.events.register( 'moveend', this, this.updateScale); + this.updateScale(); + return this.div; + }, + + /** + * Method: updateScale + */ + updateScale: function() { + var scale; + if(this.geodesic === true) { + var units = this.map.getUnits(); + if(!units) { + return; + } + var inches = OpenLayers.INCHES_PER_UNIT; + scale = (this.map.getGeodesicPixelSize().w || 0.000001) * + inches["km"] * OpenLayers.DOTS_PER_INCH; + } else { + scale = this.map.getScale(); + } + + if (!scale) { + return; + } + + if (scale >= 9500 && scale <= 950000) { + scale = Math.round(scale / 1000) + "K"; + } else if (scale >= 950000) { + scale = Math.round(scale / 1000000) + "M"; + } else { + scale = Math.round(scale); + } + + this.element.innerHTML = OpenLayers.i18n("Scale = 1 : ${scaleDenom}", {'scaleDenom':scale}); + }, + + CLASS_NAME: "OpenLayers.Control.Scale" +}); + diff --git a/openlayers/lib/OpenLayers/Control/ScaleLine.js b/openlayers/lib/OpenLayers/Control/ScaleLine.js new file mode 100644 index 0000000000..cdb52a8144 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/ScaleLine.js @@ -0,0 +1,220 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.ScaleLine + * The ScaleLine displays a small line indicator representing the current + * map scale on the map. By default it is drawn in the lower left corner of + * the map. + * + * Inherits from: + * - + * + * Is a very close copy of: + * - + */ +OpenLayers.Control.ScaleLine = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: maxWidth + * {Integer} Maximum width of the scale line in pixels. Default is 100. + */ + maxWidth: 100, + + /** + * Property: topOutUnits + * {String} Units for zoomed out on top bar. Default is km. + */ + topOutUnits: "km", + + /** + * Property: topInUnits + * {String} Units for zoomed in on top bar. Default is m. + */ + topInUnits: "m", + + /** + * Property: bottomOutUnits + * {String} Units for zoomed out on bottom bar. Default is mi. + */ + bottomOutUnits: "mi", + + /** + * Property: bottomInUnits + * {String} Units for zoomed in on bottom bar. Default is ft. + */ + bottomInUnits: "ft", + + /** + * Property: eTop + * {DOMElement} + */ + eTop: null, + + /** + * Property: eBottom + * {DOMElement} + */ + eBottom:null, + + /** + * APIProperty: geodesic + * {Boolean} Use geodesic measurement. Default is false. The recommended + * setting for maps in EPSG:4326 is false, and true EPSG:900913. If set to + * true, the scale will be calculated based on the horizontal size of the + * pixel in the center of the map viewport. + */ + geodesic: false, + + /** + * Constructor: OpenLayers.Control.ScaleLine + * Create a new scale line control. + * + * Parameters: + * options - {Object} An optional object whose properties will be used + * to extend the control. + */ + + /** + * Method: draw + * + * Returns: + * {DOMElement} + */ + draw: function() { + OpenLayers.Control.prototype.draw.apply(this, arguments); + if (!this.eTop) { + // stick in the top bar + this.eTop = document.createElement("div"); + this.eTop.className = this.displayClass + "Top"; + var theLen = this.topInUnits.length; + this.div.appendChild(this.eTop); + if((this.topOutUnits == "") || (this.topInUnits == "")) { + this.eTop.style.visibility = "hidden"; + } else { + this.eTop.style.visibility = "visible"; + } + + // and the bottom bar + this.eBottom = document.createElement("div"); + this.eBottom.className = this.displayClass + "Bottom"; + this.div.appendChild(this.eBottom); + if((this.bottomOutUnits == "") || (this.bottomInUnits == "")) { + this.eBottom.style.visibility = "hidden"; + } else { + this.eBottom.style.visibility = "visible"; + } + } + this.map.events.register('moveend', this, this.update); + this.update(); + return this.div; + }, + + /** + * Method: getBarLen + * Given a number, round it down to the nearest 1,2,5 times a power of 10. + * That seems a fairly useful set of number groups to use. + * + * Parameters: + * maxLen - {float} the number we're rounding down from + * + * Returns: + * {Float} the rounded number (less than or equal to maxLen) + */ + getBarLen: function(maxLen) { + // nearest power of 10 lower than maxLen + var digits = parseInt(Math.log(maxLen) / Math.log(10)); + var pow10 = Math.pow(10, digits); + + // ok, find first character + var firstChar = parseInt(maxLen / pow10); + + // right, put it into the correct bracket + var barLen; + if(firstChar > 5) { + barLen = 5; + } else if(firstChar > 2) { + barLen = 2; + } else { + barLen = 1; + } + + // scale it up the correct power of 10 + return barLen * pow10; + }, + + /** + * Method: update + * Update the size of the bars, and the labels they contain. + */ + update: function() { + var res = this.map.getResolution(); + if (!res) { + return; + } + + var curMapUnits = this.map.getUnits(); + var inches = OpenLayers.INCHES_PER_UNIT; + + // convert maxWidth to map units + var maxSizeData = this.maxWidth * res * inches[curMapUnits]; + var geodesicRatio = 1; + if(this.geodesic === true) { + var maxSizeGeodesic = (this.map.getGeodesicPixelSize().w || + 0.000001) * this.maxWidth; + var maxSizeKilometers = maxSizeData / inches["km"]; + geodesicRatio = maxSizeGeodesic / maxSizeKilometers; + maxSizeData *= geodesicRatio; + } + + // decide whether to use large or small scale units + var topUnits; + var bottomUnits; + if(maxSizeData > 100000) { + topUnits = this.topOutUnits; + bottomUnits = this.bottomOutUnits; + } else { + topUnits = this.topInUnits; + bottomUnits = this.bottomInUnits; + } + + // and to map units units + var topMax = maxSizeData / inches[topUnits]; + var bottomMax = maxSizeData / inches[bottomUnits]; + + // now trim this down to useful block length + var topRounded = this.getBarLen(topMax); + var bottomRounded = this.getBarLen(bottomMax); + + // and back to display units + topMax = topRounded / inches[curMapUnits] * inches[topUnits]; + bottomMax = bottomRounded / inches[curMapUnits] * inches[bottomUnits]; + + // and to pixel units + var topPx = topMax / res / geodesicRatio; + var bottomPx = bottomMax / res / geodesicRatio; + + // now set the pixel widths + // and the values inside them + + if (this.eBottom.style.visibility == "visible"){ + this.eBottom.style.width = Math.round(bottomPx) + "px"; + this.eBottom.innerHTML = bottomRounded + " " + bottomUnits ; + } + + if (this.eTop.style.visibility == "visible"){ + this.eTop.style.width = Math.round(topPx) + "px"; + this.eTop.innerHTML = topRounded + " " + topUnits; + } + + }, + + CLASS_NAME: "OpenLayers.Control.ScaleLine" +}); + diff --git a/openlayers/lib/OpenLayers/Control/SelectFeature.js b/openlayers/lib/OpenLayers/Control/SelectFeature.js new file mode 100644 index 0000000000..5d2dc9319c --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/SelectFeature.js @@ -0,0 +1,628 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Handler/Feature.js + * @requires OpenLayers/Layer/Vector/RootContainer.js + */ + +/** + * Class: OpenLayers.Control.SelectFeature + * The SelectFeature control selects vector features from a given layer on + * click or hover. + * + * Inherits from: + * - + */ +OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, { + + /** + * Constant: EVENT_TYPES + * + * Supported event types: + * - *beforefeaturehighlighted* Triggered before a feature is highlighted + * - *featurehighlighted* Triggered when a feature is highlighted + * - *featureunhighlighted* Triggered when a feature is unhighlighted + */ + EVENT_TYPES: ["beforefeaturehighlighted", "featurehighlighted", "featureunhighlighted"], + + /** + * Property: multipleKey + * {String} An event modifier ('altKey' or 'shiftKey') that temporarily sets + * the property to true. Default is null. + */ + multipleKey: null, + + /** + * Property: toggleKey + * {String} An event modifier ('altKey' or 'shiftKey') that temporarily sets + * the property to true. Default is null. + */ + toggleKey: null, + + /** + * APIProperty: multiple + * {Boolean} Allow selection of multiple geometries. Default is false. + */ + multiple: false, + + /** + * APIProperty: clickout + * {Boolean} Unselect features when clicking outside any feature. + * Default is true. + */ + clickout: true, + + /** + * APIProperty: toggle + * {Boolean} Unselect a selected feature on click. Default is false. Only + * has meaning if hover is false. + */ + toggle: false, + + /** + * APIProperty: hover + * {Boolean} Select on mouse over and deselect on mouse out. If true, this + * ignores clicks and only listens to mouse moves. + */ + hover: false, + + /** + * APIProperty: highlightOnly + * {Boolean} If true do not actually select features (that is place them in + * the layer's selected features array), just highlight them. This property + * has no effect if hover is false. Defaults to false. + */ + highlightOnly: false, + + /** + * APIProperty: box + * {Boolean} Allow feature selection by drawing a box. + */ + box: false, + + /** + * Property: onBeforeSelect + * {Function} Optional function to be called before a feature is selected. + * The function should expect to be called with a feature. + */ + onBeforeSelect: function() {}, + + /** + * APIProperty: onSelect + * {Function} Optional function to be called when a feature is selected. + * The function should expect to be called with a feature. + */ + onSelect: function() {}, + + /** + * APIProperty: onUnselect + * {Function} Optional function to be called when a feature is unselected. + * The function should expect to be called with a feature. + */ + onUnselect: function() {}, + + /** + * Property: scope + * {Object} The scope to use with the onBeforeSelect, onSelect, onUnselect + * callbacks. If null the scope will be this control. + */ + scope: null, + + /** + * APIProperty: geometryTypes + * {Array(String)} To restrict selecting to a limited set of geometry types, + * send a list of strings corresponding to the geometry class names. + */ + geometryTypes: null, + + /** + * Property: layer + * {} The vector layer with a common renderer + * root for all layers this control is configured with (if an array of + * layers was passed to the constructor), or the vector layer the control + * was configured with (if a single layer was passed to the constructor). + */ + layer: null, + + /** + * Property: layers + * {Array()} The layers this control will work on, + * or null if the control was configured with a single layer + */ + layers: null, + + /** + * APIProperty: callbacks + * {Object} The functions that are sent to the handlers.feature for callback + */ + callbacks: null, + + /** + * APIProperty: selectStyle + * {Object} Hash of styles + */ + selectStyle: null, + + /** + * Property: renderIntent + * {String} key used to retrieve the select style from the layer's + * style map. + */ + renderIntent: "select", + + /** + * Property: handlers + * {Object} Object with references to multiple + * instances. + */ + handlers: null, + + /** + * Constructor: OpenLayers.Control.SelectFeature + * Create a new control for selecting features. + * + * Parameters: + * layers - {}, or an array of vector layers. The + * layer(s) this control will select features from. + * options - {Object} + */ + initialize: function(layers, options) { + // concatenate events specific to this control with those from the base + this.EVENT_TYPES = + OpenLayers.Control.SelectFeature.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + OpenLayers.Control.prototype.initialize.apply(this, [options]); + + if(this.scope === null) { + this.scope = this; + } + this.initLayer(layers); + var callbacks = { + click: this.clickFeature, + clickout: this.clickoutFeature + }; + if (this.hover) { + callbacks.over = this.overFeature; + callbacks.out = this.outFeature; + } + + this.callbacks = OpenLayers.Util.extend(callbacks, this.callbacks); + this.handlers = { + feature: new OpenLayers.Handler.Feature( + this, this.layer, this.callbacks, + {geometryTypes: this.geometryTypes} + ) + }; + + if (this.box) { + this.handlers.box = new OpenLayers.Handler.Box( + this, {done: this.selectBox}, + {boxDivClassName: "olHandlerBoxSelectFeature"} + ); + } + }, + + /** + * Method: initLayer + * Assign the layer property. If layers is an array, we need to use + * a RootContainer. + * + * Parameters: + * layers - {}, or an array of vector layers. + */ + initLayer: function(layers) { + if(OpenLayers.Util.isArray(layers)) { + this.layers = layers; + this.layer = new OpenLayers.Layer.Vector.RootContainer( + this.id + "_container", { + layers: layers + } + ); + } else { + this.layer = layers; + } + }, + + /** + * Method: destroy + */ + destroy: function() { + if(this.active && this.layers) { + this.map.removeLayer(this.layer); + } + OpenLayers.Control.prototype.destroy.apply(this, arguments); + if(this.layers) { + this.layer.destroy(); + } + }, + + /** + * Method: activate + * Activates the control. + * + * Returns: + * {Boolean} The control was effectively activated. + */ + activate: function () { + if (!this.active) { + if(this.layers) { + this.map.addLayer(this.layer); + } + this.handlers.feature.activate(); + if(this.box && this.handlers.box) { + this.handlers.box.activate(); + } + } + return OpenLayers.Control.prototype.activate.apply( + this, arguments + ); + }, + + /** + * Method: deactivate + * Deactivates the control. + * + * Returns: + * {Boolean} The control was effectively deactivated. + */ + deactivate: function () { + if (this.active) { + this.handlers.feature.deactivate(); + if(this.handlers.box) { + this.handlers.box.deactivate(); + } + if(this.layers) { + this.map.removeLayer(this.layer); + } + } + return OpenLayers.Control.prototype.deactivate.apply( + this, arguments + ); + }, + + /** + * Method: unselectAll + * Unselect all selected features. To unselect all except for a single + * feature, set the options.except property to the feature. + * + * Parameters: + * options - {Object} Optional configuration object. + */ + unselectAll: function(options) { + // we'll want an option to supress notification here + var layers = this.layers || [this.layer]; + var layer, feature; + for(var l=0; l=0; --i) { + feature = layer.selectedFeatures[i]; + if(!options || options.except != feature) { + this.unselect(feature); + } + } + } + }, + + /** + * Method: clickFeature + * Called on click in a feature + * Only responds if this.hover is false. + * + * Parameters: + * feature - {} + */ + clickFeature: function(feature) { + if(!this.hover) { + var selected = (OpenLayers.Util.indexOf( + feature.layer.selectedFeatures, feature) > -1); + if(selected) { + if(this.toggleSelect()) { + this.unselect(feature); + } else if(!this.multipleSelect()) { + this.unselectAll({except: feature}); + } + } else { + if(!this.multipleSelect()) { + this.unselectAll({except: feature}); + } + this.select(feature); + } + } + }, + + /** + * Method: multipleSelect + * Allow for multiple selected features based on property and + * event modifier. + * + * Returns: + * {Boolean} Allow for multiple selected features. + */ + multipleSelect: function() { + return this.multiple || (this.handlers.feature.evt && + this.handlers.feature.evt[this.multipleKey]); + }, + + /** + * Method: toggleSelect + * Event should toggle the selected state of a feature based on + * property and event modifier. + * + * Returns: + * {Boolean} Toggle the selected state of a feature. + */ + toggleSelect: function() { + return this.toggle || (this.handlers.feature.evt && + this.handlers.feature.evt[this.toggleKey]); + }, + + /** + * Method: clickoutFeature + * Called on click outside a previously clicked (selected) feature. + * Only responds if this.hover is false. + * + * Parameters: + * feature - {} + */ + clickoutFeature: function(feature) { + if(!this.hover && this.clickout) { + this.unselectAll(); + } + }, + + /** + * Method: overFeature + * Called on over a feature. + * Only responds if this.hover is true. + * + * Parameters: + * feature - {} + */ + overFeature: function(feature) { + var layer = feature.layer; + if(this.hover) { + if(this.highlightOnly) { + this.highlight(feature); + } else if(OpenLayers.Util.indexOf( + layer.selectedFeatures, feature) == -1) { + this.select(feature); + } + } + }, + + /** + * Method: outFeature + * Called on out of a selected feature. + * Only responds if this.hover is true. + * + * Parameters: + * feature - {} + */ + outFeature: function(feature) { + if(this.hover) { + if(this.highlightOnly) { + // we do nothing if we're not the last highlighter of the + // feature + if(feature._lastHighlighter == this.id) { + // if another select control had highlighted the feature before + // we did it ourself then we use that control to highlight the + // feature as it was before we highlighted it, else we just + // unhighlight it + if(feature._prevHighlighter && + feature._prevHighlighter != this.id) { + delete feature._lastHighlighter; + var control = this.map.getControl( + feature._prevHighlighter); + if(control) { + control.highlight(feature); + } + } else { + this.unhighlight(feature); + } + } + } else { + this.unselect(feature); + } + } + }, + + /** + * Method: highlight + * Redraw feature with the select style. + * + * Parameters: + * feature - {} + */ + highlight: function(feature) { + var layer = feature.layer; + var cont = this.events.triggerEvent("beforefeaturehighlighted", { + feature : feature + }); + if(cont !== false) { + feature._prevHighlighter = feature._lastHighlighter; + feature._lastHighlighter = this.id; + var style = this.selectStyle || this.renderIntent; + layer.drawFeature(feature, style); + this.events.triggerEvent("featurehighlighted", {feature : feature}); + } + }, + + /** + * Method: unhighlight + * Redraw feature with the "default" style + * + * Parameters: + * feature - {} + */ + unhighlight: function(feature) { + var layer = feature.layer; + // three cases: + // 1. there's no other highlighter, in that case _prev is undefined, + // and we just need to undef _last + // 2. another control highlighted the feature after we did it, in + // that case _last references this other control, and we just + // need to undef _prev + // 3. another control highlighted the feature before we did it, in + // that case _prev references this other control, and we need to + // set _last to _prev and undef _prev + if(feature._prevHighlighter == undefined) { + delete feature._lastHighlighter; + } else if(feature._prevHighlighter == this.id) { + delete feature._prevHighlighter; + } else { + feature._lastHighlighter = feature._prevHighlighter; + delete feature._prevHighlighter; + } + layer.drawFeature(feature, feature.style || feature.layer.style || + "default"); + this.events.triggerEvent("featureunhighlighted", {feature : feature}); + }, + + /** + * Method: select + * Add feature to the layer's selectedFeature array, render the feature as + * selected, and call the onSelect function. + * + * Parameters: + * feature - {} + */ + select: function(feature) { + var cont = this.onBeforeSelect.call(this.scope, feature); + var layer = feature.layer; + if(cont !== false) { + cont = layer.events.triggerEvent("beforefeatureselected", { + feature: feature + }); + if(cont !== false) { + layer.selectedFeatures.push(feature); + this.highlight(feature); + // if the feature handler isn't involved in the feature + // selection (because the box handler is used or the + // feature is selected programatically) we fake the + // feature handler to allow unselecting on click + if(!this.handlers.feature.lastFeature) { + this.handlers.feature.lastFeature = layer.selectedFeatures[0]; + } + layer.events.triggerEvent("featureselected", {feature: feature}); + this.onSelect.call(this.scope, feature); + } + } + }, + + /** + * Method: unselect + * Remove feature from the layer's selectedFeature array, render the feature as + * normal, and call the onUnselect function. + * + * Parameters: + * feature - {} + */ + unselect: function(feature) { + var layer = feature.layer; + // Store feature style for restoration later + this.unhighlight(feature); + OpenLayers.Util.removeItem(layer.selectedFeatures, feature); + layer.events.triggerEvent("featureunselected", {feature: feature}); + this.onUnselect.call(this.scope, feature); + }, + + /** + * Method: selectBox + * Callback from the handlers.box set up when selection is true + * on. + * + * Parameters: + * position - { || } + */ + selectBox: function(position) { + if (position instanceof OpenLayers.Bounds) { + var minXY = this.map.getLonLatFromPixel( + new OpenLayers.Pixel(position.left, position.bottom) + ); + var maxXY = this.map.getLonLatFromPixel( + new OpenLayers.Pixel(position.right, position.top) + ); + var bounds = new OpenLayers.Bounds( + minXY.lon, minXY.lat, maxXY.lon, maxXY.lat + ); + + // if multiple is false, first deselect currently selected features + if (!this.multipleSelect()) { + this.unselectAll(); + } + + // because we're using a box, we consider we want multiple selection + var prevMultiple = this.multiple; + this.multiple = true; + var layers = this.layers || [this.layer]; + var layer; + for(var l=0; l -1) { + if (bounds.toGeometry().intersects(feature.geometry)) { + if (OpenLayers.Util.indexOf(layer.selectedFeatures, feature) == -1) { + this.select(feature); + } + } + } + } + } + this.multiple = prevMultiple; + } + }, + + /** + * Method: setMap + * Set the map property for the control. + * + * Parameters: + * map - {} + */ + setMap: function(map) { + this.handlers.feature.setMap(map); + if (this.box) { + this.handlers.box.setMap(map); + } + OpenLayers.Control.prototype.setMap.apply(this, arguments); + }, + + /** + * APIMethod: setLayer + * Attach a new layer to the control, overriding any existing layers. + * + * Parameters: + * layers - Array of {} or a single + * {} + */ + setLayer: function(layers) { + var isActive = this.active; + this.unselectAll(); + this.deactivate(); + if(this.layers) { + this.layer.destroy(); + this.layers = null; + } + this.initLayer(layers); + this.handlers.feature.layer = this.layer; + if (isActive) { + this.activate(); + } + }, + + CLASS_NAME: "OpenLayers.Control.SelectFeature" +}); diff --git a/openlayers/lib/OpenLayers/Control/Snapping.js b/openlayers/lib/OpenLayers/Control/Snapping.js new file mode 100644 index 0000000000..ee58a9e725 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/Snapping.js @@ -0,0 +1,566 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Layer/Vector.js + */ + +/** + * Class: OpenLayers.Control.Snapping + * Acts as a snapping agent while editing vector features. + * + * Inherits from: + * - + */ +OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { + + /** + * Constant: EVENT_TYPES + * {Array(String)} Supported application event types. Register a listener + * for a particular event with the following syntax: + * (code) + * control.events.register(type, obj, listener); + * (end) + * + * Listeners will be called with a reference to an event object. The + * properties of this event depends on exactly what happened. + * + * Supported control event types (in addition to those from ): + * beforesnap - Triggered before a snap occurs. Listeners receive an + * event object with *point*, *x*, *y*, *distance*, *layer*, and + * *snapType* properties. The point property will be original point + * geometry considered for snapping. The x and y properties represent + * coordinates the point will receive. The distance is the distance + * of the snap. The layer is the target layer. The snapType property + * will be one of "node", "vertex", or "edge". Return false to stop + * snapping from occurring. + * snap - Triggered when a snap occurs. Listeners receive an event with + * *point*, *snapType*, *layer*, and *distance* properties. The point + * will be the location snapped to. The snapType will be one of "node", + * "vertex", or "edge". The layer will be the target layer. The + * distance will be the distance of the snap in map units. + * unsnap - Triggered when a vertex is unsnapped. Listeners receive an + * event with a *point* property. + */ + EVENT_TYPES: ["beforesnap", "snap", "unsnap"], + + /** + * CONSTANT: DEFAULTS + * Default target properties. + */ + DEFAULTS: { + tolerance: 10, + node: true, + edge: true, + vertex: true + }, + + /** + * Property: greedy + * {Boolean} Snap to closest feature in first layer with an eligible + * feature. Default is true. + */ + greedy: true, + + /** + * Property: precedence + * {Array} List representing precedence of different snapping types. + * Default is "node", "vertex", "edge". + */ + precedence: ["node", "vertex", "edge"], + + /** + * Property: resolution + * {Float} The map resolution for the previously considered snap. + */ + resolution: null, + + /** + * Property: geoToleranceCache + * {Object} A cache of geo-tolerances. Tolerance values (in map units) are + * calculated when the map resolution changes. + */ + geoToleranceCache: null, + + /** + * Property: layer + * {} The current editable layer. Set at + * construction or after construction with . + */ + layer: null, + + /** + * Property: feature + * {} The current editable feature. + */ + feature: null, + + /** + * Property: point + * {} The currently snapped vertex. + */ + point: null, + + /** + * Constructor: OpenLayers.Control.Snapping + * Creates a new snapping control. A control is constructed with an editable + * layer and a set of configuration objects for target layers. While the + * control is active, dragging vertices while drawing new features or + * modifying existing features on the editable layer will engage + * snapping to features on the target layers. Whether a vertex snaps to + * a feature on a target layer depends on the target layer configuration. + * + * Parameters: + * options - {Object} An object containing all configuration properties for + * the control. + * + * Valid options: + * layer - {OpenLayers.Layer.Vector} The editable layer. Features from this + * layer that are digitized or modified may have vertices snapped to + * features from any of the target layers. + * targets - {Array(Object | OpenLayers.Layer.Vector)} A list of objects for + * configuring target layers. See valid properties of the target + * objects below. If the items in the targets list are vector layers + * (instead of configuration objects), the defaults from the + * property will apply. The editable layer itself may be a target + * layer - allowing newly created or edited features to be snapped to + * existing features from the same layer. If no targets are provided + * the layer given in the constructor (as ) will become the + * initial target. + * defaults - {Object} An object with default properties to be applied + * to all target objects. + * greedy - {Boolean} Snap to closest feature in first target layer that + * applies. Default is true. If false, all features in all target + * layers will be checked and the closest feature in all target layers + * will be chosen. The greedy property determines if the order of the + * target layers is significant. By default, the order of the target + * layers is significant where layers earlier in the target layer list + * have precedence over layers later in the list. Within a single + * layer, the closest feature is always chosen for snapping. This + * property only determines whether the search for a closer feature + * continues after an eligible feature is found in a target layer. + * + * Valid target properties: + * layer - {OpenLayers.Layer.Vector} A target layer. Features from this + * layer will be eligible to act as snapping target for the editable + * layer. + * tolerance - {Float} The distance (in pixels) at which snapping may occur. + * Default is 10. + * node - {Boolean} Snap to nodes (first or last point in a geometry) in + * target layer. Default is true. + * nodeTolerance - {Float} Optional distance at which snapping may occur + * for nodes specifically. If none is provided, will be + * used. + * vertex - {Boolean} Snap to vertices in target layer. Default is true. + * vertexTolerance - {Float} Optional distance at which snapping may occur + * for vertices specifically. If none is provided, will be + * used. + * edge - {Boolean} Snap to edges in target layer. Default is true. + * edgeTolerance - {Float} Optional distance at which snapping may occur + * for edges specifically. If none is provided, will be + * used. + * filter - {OpenLayers.Filter} Optional filter to evaluate to determine if + * feature is eligible for snapping. If filter evaluates to true for a + * target feature a vertex may be snapped to the feature. + * minResolution - {Number} If a minResolution is provided, snapping to this + * target will only be considered if the map resolution is greater than + * or equal to this value (the minResolution is inclusive). Default is + * no minimum resolution limit. + * maxResolution - {Number} If a maxResolution is provided, snapping to this + * target will only be considered if the map resolution is strictly + * less than this value (the maxResolution is exclusive). Default is + * no maximum resolution limit. + */ + initialize: function(options) { + // concatenate events specific to measure with those from the base + Array.prototype.push.apply( + this.EVENT_TYPES, OpenLayers.Control.prototype.EVENT_TYPES + ); + OpenLayers.Control.prototype.initialize.apply(this, [options]); + this.options = options || {}; // TODO: this could be done by the super + + // set the editable layer if provided + if(this.options.layer) { + this.setLayer(this.options.layer); + } + // configure target layers + var defaults = OpenLayers.Util.extend({}, this.options.defaults); + this.defaults = OpenLayers.Util.applyDefaults(defaults, this.DEFAULTS); + this.setTargets(this.options.targets); + if(this.targets.length === 0 && this.layer) { + this.addTargetLayer(this.layer); + } + + this.geoToleranceCache = {}; + }, + + /** + * APIMethod: setLayer + * Set the editable layer. Call the setLayer method if the editable layer + * changes and the same control should be used on a new editable layer. + * If the control is already active, it will be active after the new + * layer is set. + * + * Parameters: + * layer - {OpenLayers.Layer.Vector} The new editable layer. + */ + setLayer: function(layer) { + if(this.active) { + this.deactivate(); + this.layer = layer; + this.activate(); + } else { + this.layer = layer; + } + }, + + /** + * Method: setTargets + * Set the targets for the snapping agent. + * + * Parameters: + * targets - {Array} An array of target configs or target layers. + */ + setTargets: function(targets) { + this.targets = []; + if(targets && targets.length) { + var target; + for(var i=0, len=targets.length; i} A target layer. + */ + addTargetLayer: function(layer) { + this.addTarget({layer: layer}); + }, + + /** + * Method: addTarget + * Add a configured target layer. + * + * Parameters: + * target - {Object} A target config. + */ + addTarget: function(target) { + target = OpenLayers.Util.applyDefaults(target, this.defaults); + target.nodeTolerance = target.nodeTolerance || target.tolerance; + target.vertexTolerance = target.vertexTolerance || target.tolerance; + target.edgeTolerance = target.edgeTolerance || target.tolerance; + this.targets.push(target); + }, + + /** + * Method: removeTargetLayer + * Remove a target layer. + * + * Parameters: + * layer - {} The target layer to remove. + */ + removeTargetLayer: function(layer) { + var target; + for(var i=this.targets.length-1; i>=0; --i) { + target = this.targets[i]; + if(target.layer === layer) { + this.removeTarget(target); + } + } + }, + + /** + * Method: removeTarget + * Remove a target. + * + * Parameters: + * target - {Object} A target config. + * + * Returns: + * {Array} The targets array. + */ + removeTarget: function(target) { + return OpenLayers.Util.removeItem(this.targets, target); + }, + + /** + * APIMethod: activate + * Activate the control. Activating the control registers listeners for + * editing related events so that during feature creation and + * modification, moving vertices will trigger snapping. + */ + activate: function() { + var activated = OpenLayers.Control.prototype.activate.call(this); + if(activated) { + if(this.layer && this.layer.events) { + this.layer.events.on({ + sketchstarted: this.onSketchModified, + sketchmodified: this.onSketchModified, + vertexmodified: this.onVertexModified, + scope: this + }); + } + } + return activated; + }, + + /** + * APIMethod: deactivate + * Deactivate the control. Deactivating the control unregisters listeners + * so feature editing may proceed without engaging the snapping agent. + */ + deactivate: function() { + var deactivated = OpenLayers.Control.prototype.deactivate.call(this); + if(deactivated) { + if(this.layer && this.layer.events) { + this.layer.events.un({ + sketchstarted: this.onSketchModified, + sketchmodified: this.onSketchModified, + vertexmodified: this.onVertexModified, + scope: this + }); + } + } + this.feature = null; + this.point = null; + return deactivated; + }, + + /** + * Method: onSketchModified + * Registered as a listener for the sketchmodified event on the editable + * layer. + * + * Parameters: + * event - {Object} The sketch modified event. + */ + onSketchModified: function(event) { + this.feature = event.feature; + this.considerSnapping(event.vertex, event.vertex); + }, + + /** + * Method: onVertexModified + * Registered as a listener for the vertexmodified event on the editable + * layer. + * + * Parameters: + * event - {Object} The vertex modified event. + */ + onVertexModified: function(event) { + this.feature = event.feature; + var loc = this.layer.map.getLonLatFromViewPortPx(event.pixel); + this.considerSnapping( + event.vertex, new OpenLayers.Geometry.Point(loc.lon, loc.lat) + ); + }, + + /** + * Method: considerSnapping + * + * Parameters: + * point - {} The vertex to be snapped (or + * unsnapped). + * loc - {} The location of the mouse in map + * coords. + */ + considerSnapping: function(point, loc) { + var best = { + rank: Number.POSITIVE_INFINITY, + dist: Number.POSITIVE_INFINITY, + x: null, y: null + }; + var snapped = false; + var result, target; + for(var i=0, len=this.targets.length; i} The location of the mouse in map + * coords. + * + * Returns: + * {Object} A result object with rank, dist, x, and y properties. + * Returns null if candidate is not eligible for snapping. + */ + testTarget: function(target, loc) { + var resolution = this.layer.map.getResolution(); + if ("minResolution" in target) { + if (resolution < target.minResolution) { + return null; + } + } + if ("maxResolution" in target) { + if (resolution >= target.maxResolution) { + return null; + } + } + var tolerance = { + node: this.getGeoTolerance(target.nodeTolerance, resolution), + vertex: this.getGeoTolerance(target.vertexTolerance, resolution), + edge: this.getGeoTolerance(target.edgeTolerance, resolution) + }; + // this could be cached if we don't support setting tolerance values directly + var maxTolerance = Math.max( + tolerance.node, tolerance.vertex, tolerance.edge + ); + var result = { + rank: Number.POSITIVE_INFINITY, dist: Number.POSITIVE_INFINITY + }; + var eligible = false; + var features = target.layer.features; + var feature, type, vertices, vertex, closest, dist, found; + var numTypes = this.precedence.length; + var ll = new OpenLayers.LonLat(loc.x, loc.y); + for(var i=0, len=features.length; i when the map resolution + * has not changed. + * + * Parameters: + * tolerance - {Number} A tolerance value in pixels. + * resolution - {Number} Map resolution. + * + * Returns: + * {Number} A tolerance value in map units. + */ + getGeoTolerance: function(tolerance, resolution) { + if(resolution !== this.resolution) { + this.resolution = resolution; + this.geoToleranceCache = {}; + } + var geoTolerance = this.geoToleranceCache[tolerance]; + if(geoTolerance === undefined) { + geoTolerance = tolerance * resolution; + this.geoToleranceCache[tolerance] = geoTolerance; + } + return geoTolerance; + }, + + /** + * Method: destroy + * Clean up the control. + */ + destroy: function() { + if(this.active) { + this.deactivate(); // TODO: this should be handled by the super + } + delete this.layer; + delete this.targets; + OpenLayers.Control.prototype.destroy.call(this); + }, + + CLASS_NAME: "OpenLayers.Control.Snapping" +}); diff --git a/openlayers/lib/OpenLayers/Control/Split.js b/openlayers/lib/OpenLayers/Control/Split.js new file mode 100644 index 0000000000..3dd823c1ba --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/Split.js @@ -0,0 +1,498 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Handler/Path.js + * @requires OpenLayers/Layer/Vector.js + */ + +/** + * Class: OpenLayers.Control.Split + * Acts as a split feature agent while editing vector features. + * + * Inherits from: + * - + */ +OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, { + + /** + * Constant: EVENT_TYPES + * {Array(String)} Supported application event types. Register a listener + * for a particular event with the following syntax: + * (code) + * control.events.register(type, obj, listener); + * (end) + * + * Listeners will be called with a reference to an event object. The + * properties of this event depends on exactly what happened. + * + * Supported control event types (in addition to those from ): + * beforesplit - Triggered before a split occurs. Listeners receive an + * event object with *source* and *target* properties. + * split - Triggered when a split occurs. Listeners receive an event with + * an *original* property and a *features* property. The original + * is a reference to the target feature that the sketch or modified + * feature intersects. The features property is a list of all features + * that result from this single split. This event is triggered before + * the resulting features are added to the layer (while the layer still + * has a reference to the original). + * aftersplit - Triggered after all splits resulting from a single sketch + * or feature modification have occurred. The original features + * have been destroyed and features that result from the split + * have already been added to the layer. Listeners receive an event + * with a *source* and *features* property. The source references the + * sketch or modified feature used as a splitter. The features + * property is a list of all resulting features. + */ + EVENT_TYPES: ["beforesplit", "split", "aftersplit"], + + /** + * APIProperty: layer + * {} The target layer with features to be split. + * Set at construction or after construction with . + */ + layer: null, + + /** + * Property: source + * {} Optional source layer. Any newly created + * or modified features from this layer will be used to split features + * on the target layer. If not provided, a temporary sketch layer will + * be created. + */ + source: null, + + /** + * Property: sourceOptions + * {Options} If a temporary sketch layer is created, these layer options + * will be applied. + */ + sourceOptions: null, + + /** + * APIProperty: tolerance + * {Number} Distance between the calculated intersection and a vertex on + * the source geometry below which the existing vertex will be used + * for the split. Default is null. + */ + tolerance: null, + + /** + * APIProperty: edge + * {Boolean} Allow splits given intersection of edges only. Default is + * true. If false, a vertex on the source must be within the + * distance of the calculated intersection for a split + * to occur. + */ + edge: true, + + /** + * APIProperty: deferDelete + * {Boolean} Instead of removing features from the layer, set feature + * states of split features to DELETE. This assumes a save strategy + * or other component is in charge of removing features from the + * layer. Default is false. If false, split features will be + * immediately deleted from the layer. + */ + deferDelete: false, + + /** + * APIProperty: mutual + * {Boolean} If source and target layers are the same, split source + * features and target features where they intersect. Default is + * true. If false, only target features will be split. + */ + mutual: true, + + /** + * APIProperty: targetFilter + * {OpenLayers.Filter} Optional filter that will be evaluated + * to determine if a feature from the target layer is eligible for + * splitting. + */ + targetFilter: null, + + /** + * APIProperty: sourceFilter + * {OpenLayers.Filter} Optional filter that will be evaluated + * to determine if a feature from the target layer is eligible for + * splitting. + */ + sourceFilter: null, + + /** + * Property: handler + * {} The temporary sketch handler created if + * no source layer is provided. + */ + handler: null, + + /** + * Constructor: OpenLayers.Control.Split + * Creates a new split control. A control is constructed with a target + * layer and an optional source layer. While the control is active, + * creating new features or modifying existing features on the source + * layer will result in splitting any eligible features on the target + * layer. If no source layer is provided, a temporary sketch layer will + * be created to create lines for splitting features on the target. + * + * Parameters: + * options - {Object} An object containing all configuration properties for + * the control. + * + * Valid options: + * layer - {OpenLayers.Layer.Vector} The target layer. Features from this + * layer will be split by new or modified features on the source layer + * or temporary sketch layer. + * source - {OpenLayers.Layer.Vector} Optional source layer. If provided + * newly created features or modified features will be used to split + * features on the target layer. If not provided, a temporary sketch + * layer will be created for drawing lines. + * tolerance - {Number} Optional value for the distance between a source + * vertex and the calculated intersection below which the split will + * occur at the vertex. + * edge - {Boolean} Allow splits given intersection of edges only. Default + * is true. If false, a vertex on the source must be within the + * distance of the calculated intersection for a split + * to occur. + * mutual - {Boolean} If source and target are the same, split source + * features and target features where they intersect. Default is + * true. If false, only target features will be split. + * targetFilter - {OpenLayers.Filter} Optional filter that will be evaluated + * to determine if a feature from the target layer is eligible for + * splitting. + * sourceFilter - {OpenLayers.Filter} Optional filter that will be evaluated + * to determine if a feature from the target layer is eligible for + * splitting. + */ + initialize: function(options) { + // concatenate events specific to measure with those from the base + Array.prototype.push.apply( + this.EVENT_TYPES, OpenLayers.Control.prototype.EVENT_TYPES + ); + OpenLayers.Control.prototype.initialize.apply(this, [options]); + this.options = options || {}; // TODO: this could be done by the super + + // set the source layer if provided + if(this.options.source) { + this.setSource(this.options.source); + } + }, + + /** + * APIMethod: setSource + * Set the source layer for edits layer. + * + * Parameters: + * layer - {OpenLayers.Layer.Vector} The new source layer layer. If + * null, a temporary sketch layer will be created. + */ + setSource: function(layer) { + if(this.active) { + this.deactivate(); + if(this.handler) { + this.handler.destroy(); + delete this.handler; + } + this.source = layer; + this.activate(); + } else { + this.source = layer; + } + }, + + /** + * APIMethod: activate + * Activate the control. Activating the control registers listeners for + * editing related events so that during feature creation and + * modification, features in the target will be considered for + * splitting. + */ + activate: function() { + var activated = OpenLayers.Control.prototype.activate.call(this); + if(activated) { + if(!this.source) { + if(!this.handler) { + this.handler = new OpenLayers.Handler.Path(this, + {done: function(geometry) { + this.onSketchComplete({ + feature: new OpenLayers.Feature.Vector(geometry) + }); + }}, + {layerOptions: this.sourceOptions} + ); + } + this.handler.activate(); + } else if(this.source.events) { + this.source.events.on({ + sketchcomplete: this.onSketchComplete, + afterfeaturemodified: this.afterFeatureModified, + scope: this + }); + } + } + return activated; + }, + + /** + * APIMethod: deactivate + * Deactivate the control. Deactivating the control unregisters listeners + * so feature editing may proceed without engaging the split agent. + */ + deactivate: function() { + var deactivated = OpenLayers.Control.prototype.deactivate.call(this); + if(deactivated) { + if(this.source && this.source.events) { + this.layer.events.un({ + sketchcomplete: this.onSketchComplete, + afterfeaturemodified: this.afterFeatureModified, + scope: this + }); + } + } + return deactivated; + }, + + /** + * Method: onSketchComplete + * Registered as a listener for the sketchcomplete event on the editable + * layer. + * + * Parameters: + * event - {Object} The sketch complete event. + * + * Returns: + * {Boolean} Stop the sketch from being added to the layer (it has been + * split). + */ + onSketchComplete: function(event) { + this.feature = null; + return !this.considerSplit(event.feature); + }, + + /** + * Method: afterFeatureModified + * Registered as a listener for the afterfeaturemodified event on the + * editable layer. + * + * Parameters: + * event - {Object} The after feature modified event. + */ + afterFeatureModified: function(event) { + if(event.modified) { + var feature = event.feature; + if(feature.geometry instanceof OpenLayers.Geometry.LineString || + feature.geometry instanceof OpenLayers.Geometry.MultiLineString) { + this.feature = event.feature; + this.considerSplit(event.feature); + } + } + }, + + /** + * Method: removeByGeometry + * Remove a feature from a list based on the given geometry. + * + * Parameters: + * features - {Array()} A list of features. + * geometry - {} A geometry. + */ + removeByGeometry: function(features, geometry) { + for(var i=0, len=features.length; i} The target feature. + * + * Returns: + * {Boolean} The target is eligible for splitting. + */ + isEligible: function(target) { + return ( + target.state !== OpenLayers.State.DELETE + ) && ( + target.geometry instanceof OpenLayers.Geometry.LineString || + target.geometry instanceof OpenLayers.Geometry.MultiLineString + ) && ( + this.feature !== target + ) && ( + !this.targetFilter || + this.targetFilter.evaluate(target.attributes) + ); + }, + + /** + * Method: considerSplit + * Decide whether or not to split target features with the supplied + * feature. If is true, both the source and target features + * will be split if eligible. + * + * Parameters: + * feature - {} The newly created or modified + * feature. + * + * Returns: + * {Boolean} The supplied feature was split (and destroyed). + */ + considerSplit: function(feature) { + var sourceSplit = false; + var targetSplit = false; + if(!this.sourceFilter || + this.sourceFilter.evaluate(feature.attributes)) { + var features = this.layer && this.layer.features || []; + var target, results, proceed; + var additions = [], removals = []; + var mutual = (this.layer === this.source) && this.mutual; + var options = { + edge: this.edge, + tolerance: this.tolerance, + mutual: mutual + }; + var sourceParts = [feature.geometry]; + var targetFeature, targetParts; + var source, parts; + for(var i=0, len=features.length; i 1) { + // splice in new source parts + parts.unshift(j, 1); // add args for splice below + Array.prototype.splice.apply(sourceParts, parts); + j += parts.length - 3; + } + results = results[1]; + } + // handle parts that result from target splitting + if(results.length > 1) { + // splice in new target parts + results.unshift(k, 1); // add args for splice below + Array.prototype.splice.apply(targetParts, results); + k += results.length - 3; + } + } + } + } + } + } + if(targetParts && targetParts.length > 1) { + this.geomsToFeatures(targetFeature, targetParts); + this.events.triggerEvent("split", { + original: targetFeature, + features: targetParts + }); + Array.prototype.push.apply(additions, targetParts); + removals.push(targetFeature); + targetSplit = true; + } + } + } + if(sourceParts && sourceParts.length > 1) { + this.geomsToFeatures(feature, sourceParts); + this.events.triggerEvent("split", { + original: feature, + features: sourceParts + }); + Array.prototype.push.apply(additions, sourceParts); + removals.push(feature); + sourceSplit = true; + } + if(sourceSplit || targetSplit) { + // remove and add feature events are suppressed + // listen for split event on this control instead + if(this.deferDelete) { + // Set state instead of removing. Take care to avoid + // setting delete for features that have not yet been + // inserted - those should be destroyed immediately. + var feat, destroys = []; + for(var i=0, len=removals.length; i} The feature to be cloned. + * geoms - {Array()} List of goemetries. This will + * become a list of new features. + */ + geomsToFeatures: function(feature, geoms) { + var clone = feature.clone(); + delete clone.geometry; + var newFeature; + for(var i=0, len=geoms.length; i constructor. + * + * If you’re only targeting touch enabled devices with your mapping application, + * you can create a map with only a TouchNavigation control. The + * control is mobile ready by default, but + * you can generate a smaller build of the library by only including this + * touch navigation control if you aren't concerned about mouse interaction. + * + * Inherits: + * - + */ +OpenLayers.Control.TouchNavigation = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: dragPan + * {} + */ + dragPan: null, + + /** + * APIProperty: dragPanOptions + * {Object} Options passed to the DragPan control. + */ + dragPanOptions: null, + + /** + * Property: pinchZoom + * {} + */ + pinchZoom: null, + + /** + * APIProperty: pinchZoomOptions + * {Object} Options passed to the PinchZoom control. + */ + pinchZoomOptions: null, + + /** + * APIProperty: clickHandlerOptions + * {Object} Options passed to the Click handler. + */ + clickHandlerOptions: null, + + /** + * APIProperty: documentDrag + * {Boolean} Allow panning of the map by dragging outside map viewport. + * Default is false. + */ + documentDrag: false, + + /** + * APIProperty: autoActivate + * {Boolean} Activate the control when it is added to a map. Default is + * true. + */ + autoActivate: true, + + /** + * Constructor: OpenLayers.Control.TouchNavigation + * Create a new navigation control + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * the control + */ + initialize: function(options) { + this.handlers = {}; + OpenLayers.Control.prototype.initialize.apply(this, arguments); + }, + + /** + * Method: destroy + * The destroy method is used to perform any clean up before the control + * is dereferenced. Typically this is where event listeners are removed + * to prevent memory leaks. + */ + destroy: function() { + this.deactivate(); + if(this.dragPan) { + this.dragPan.destroy(); + } + this.dragPan = null; + if (this.pinchZoom) { + this.pinchZoom.destroy(); + delete this.pinchZoom; + } + OpenLayers.Control.prototype.destroy.apply(this,arguments); + }, + + /** + * Method: activate + */ + activate: function() { + if(OpenLayers.Control.prototype.activate.apply(this,arguments)) { + this.dragPan.activate(); + this.handlers.click.activate(); + this.pinchZoom.activate(); + return true; + } + return false; + }, + + /** + * Method: deactivate + */ + deactivate: function() { + if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)) { + this.dragPan.deactivate(); + this.handlers.click.deactivate(); + this.pinchZoom.deactivate(); + return true; + } + return false; + }, + + /** + * Method: draw + */ + draw: function() { + var clickCallbacks = { + click: this.defaultClick, + dblclick: this.defaultDblClick + }; + var clickOptions = OpenLayers.Util.extend({ + "double": true, + stopDouble: true, + pixelTolerance: 2 + }, this.clickHandlerOptions); + this.handlers.click = new OpenLayers.Handler.Click( + this, clickCallbacks, clickOptions + ); + this.dragPan = new OpenLayers.Control.DragPan( + OpenLayers.Util.extend({ + map: this.map, + documentDrag: this.documentDrag + }, this.dragPanOptions) + ); + this.dragPan.draw(); + this.pinchZoom = new OpenLayers.Control.PinchZoom( + OpenLayers.Util.extend({map: this.map}, this.pinchZoomOptions) + ); + }, + + /** + * Method: defaultClick + * + * Parameters: + * evt - {Event} + */ + defaultClick: function (evt) { + if(evt.lastTouches && evt.lastTouches.length == 2) { + this.map.zoomOut(); + } + }, + + /** + * Method: defaultDblClick + * + * Parameters: + * evt - {Event} + */ + defaultDblClick: function (evt) { + var newCenter = this.map.getLonLatFromViewPortPx(evt.xy); + this.map.setCenter(newCenter, this.map.zoom + 1); + }, + + CLASS_NAME: "OpenLayers.Control.TouchNavigation" +}); diff --git a/openlayers/lib/OpenLayers/Control/TransformFeature.js b/openlayers/lib/OpenLayers/Control/TransformFeature.js new file mode 100644 index 0000000000..42faff7fea --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/TransformFeature.js @@ -0,0 +1,600 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Control/DragFeature.js + * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Geometry/Point.js + */ + +/** + * Class: OpenLayers.Control.TransformFeature + * Control to transform features with a standard transformation box. + * + * Inherits From: + * - + */ +OpenLayers.Control.TransformFeature = OpenLayers.Class(OpenLayers.Control, { + + /** + * Constant: EVENT_TYPES + * + * Supported event types: + * - *beforesetfeature* Triggered before a feature is set for + * tranformation. The feature will not be set if a listener returns + * false. Listeners receive a *feature* property, with the feature + * that will be set for transformation. Listeners are allowed to + * set the control's *scale*, *ratio* and *rotation* properties, + * which will set the initial scale, ratio and rotation of the + * feature, like the method's initialParams argument. + * - *setfeature* Triggered when a feature is set for tranformation. + * Listeners receive a *feature* property, with the feature that + * is now set for transformation. + * - *beforetransform* Triggered while dragging, before a feature is + * transformed. The feature will not be transformed if a listener + * returns false (but the box still will). Listeners receive one or + * more of *center*, *scale*, *ratio* and *rotation*. The *center* + * property is an object with the new + * center of the transformed feature, the others are Floats with the + * scale, ratio or rotation change since the last transformation. + * - *transform* Triggered while dragging, when a feature is transformed. + * Listeners receive an event object with one or more of *center*, + * *scale*, *ratio* and *rotation*. The *center* property is an + * object with the new center of the + * transformed feature, the others are Floats with the scale, ratio + * or rotation change of the feature since the last transformation. + * - *transformcomplete* Triggered after dragging. Listeners receive + * an event object with the transformed *feature*. + */ + EVENT_TYPES: ["beforesetfeature", "setfeature", "beforetransform", + "transform", "transformcomplete"], + + /** + * APIProperty: geometryTypes + * {Array(String)} To restrict transformation to a limited set of geometry + * types, send a list of strings corresponding to the geometry class + * names. + */ + geometryTypes: null, + + /** + * Property: layer + * {} + */ + layer: null, + + /** + * APIProperty: preserveAspectRatio + * {Boolean} set to true to not change the feature's aspect ratio. + */ + preserveAspectRatio: false, + + /** + * APIProperty: rotate + * {Boolean} set to false if rotation should be disabled. Default is true. + * To be passed with the constructor or set when the control is not + * active. + */ + rotate: true, + + /** + * APIProperty: feature + * {} Feature currently available for + * transformation. Read-only, use to set it manually. + */ + feature: null, + + /** + * APIProperty: renderIntent + * {String|Object} Render intent for the transformation box and + * handles. A symbolizer object can also be provided here. + */ + renderIntent: "temporary", + + /** + * APIProperty: rotationHandleSymbolizer + * {Object|String} Optional. A custom symbolizer for the rotation handles. + * A render intent can also be provided here. Defaults to + * (code) + * { + * stroke: false, + * pointRadius: 10, + * fillOpacity: 0, + * cursor: "pointer" + * } + * (end) + */ + rotationHandleSymbolizer: null, + + /** + * APIProperty: box + * {} The transformation box rectangle. + * Read-only. + */ + box: null, + + /** + * APIProperty: center + * {} The center of the feature bounds. + * Read-only. + */ + center: null, + + /** + * APIProperty: scale + * {Float} The scale of the feature, relative to the scale the time the + * feature was set. Read-only, except for *beforesetfeature* + * listeners. + */ + scale: 1, + + /** + * APIProperty: ratio + * {Float} The ratio of the feature relative to the ratio the time the + * feature was set. Read-only, except for *beforesetfeature* + * listeners. + */ + ratio: 1, + + /** + * Property: rotation + * {Integer} the current rotation angle of the box. Read-only, except for + * *beforesetfeature* listeners. + */ + rotation: 0, + + /** + * APIProperty: handles + * {Array()} The 8 handles currently available + * for scaling/resizing. Numbered counterclockwise, starting from the + * southwest corner. Read-only. + */ + handles: null, + + /** + * APIProperty: rotationHandles + * {Array()} The 4 rotation handles currently + * available for rotating. Numbered counterclockwise, starting from + * the southwest corner. Read-only. + */ + rotationHandles: null, + + /** + * Property: dragControl + * {} + */ + dragControl: null, + + /** + * Constructor: OpenLayers.Control.TransformFeature + * Create a new transform feature control. + * + * Parameters: + * layer - {} Layer that contains features that + * will be transformed. + * options - {Object} Optional object whose properties will be set on the + * control. + */ + initialize: function(layer, options) { + // concatenate events specific to this control with those from the base + this.EVENT_TYPES = + OpenLayers.Control.TransformFeature.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + OpenLayers.Control.prototype.initialize.apply(this, [options]); + + this.layer = layer; + + if(!this.rotationHandleSymbolizer) { + this.rotationHandleSymbolizer = { + stroke: false, + pointRadius: 10, + fillOpacity: 0, + cursor: "pointer" + }; + } + + this.createBox(); + this.createControl(); + }, + + /** + * APIMethod: activate + * Activates the control. + */ + activate: function() { + var activated = false; + if(OpenLayers.Control.prototype.activate.apply(this, arguments)) { + this.dragControl.activate(); + this.layer.addFeatures([this.box]); + this.rotate && this.layer.addFeatures(this.rotationHandles); + this.layer.addFeatures(this.handles); + activated = true; + } + return activated; + }, + + /** + * APIMethod: deactivate + * Deactivates the control. + */ + deactivate: function() { + var deactivated = false; + if(OpenLayers.Control.prototype.deactivate.apply(this, arguments)) { + this.layer.removeFeatures(this.handles); + this.rotate && this.layer.removeFeatures(this.rotationHandles); + this.layer.removeFeatures([this.box]); + this.dragControl.deactivate(); + deactivated = true; + } + if (deactivated) { + this.unsetFeature(); + } + return deactivated; + }, + + /** + * Method: setMap + * + * Parameters: + * map - {} + */ + setMap: function(map) { + this.dragControl.setMap(map); + OpenLayers.Control.prototype.setMap.apply(this, arguments); + }, + + /** + * APIMethod: setFeature + * Place the transformation box on a feature and start transforming it. + * If the control is not active, it will be activated. + * + * Parameters: + * feature - {} + * initialParams - {Object} Initial values for rotation, scale or ratio. + * Setting a rotation value here will cause the transformation box to + * start rotated. Setting a scale or ratio will not affect the + * transormation box, but applications may use this to keep track of + * scale and ratio of a feature across multiple transforms. + */ + setFeature: function(feature, initialParams) { + initialParams = OpenLayers.Util.applyDefaults(initialParams, { + rotation: 0, + scale: 1, + ratio: 1 + }); + + var oldRotation = this.rotation; + var oldCenter = this.center; + OpenLayers.Util.extend(this, initialParams); + + var cont = this.events.triggerEvent("beforesetfeature", + {feature: feature} + ); + if (cont === false) { + return; + } + + this.feature = feature; + this.activate(); + + this._setfeature = true; + + var featureBounds = this.feature.geometry.getBounds(); + this.box.move(featureBounds.getCenterLonLat()); + this.box.geometry.rotate(-oldRotation, oldCenter); + this._angle = 0; + + var ll; + if(this.rotation) { + var geom = feature.geometry.clone(); + geom.rotate(-this.rotation, this.center); + var box = new OpenLayers.Feature.Vector( + geom.getBounds().toGeometry()); + box.geometry.rotate(this.rotation, this.center); + this.box.geometry.rotate(this.rotation, this.center); + this.box.move(box.geometry.getBounds().getCenterLonLat()); + var llGeom = box.geometry.components[0].components[0]; + ll = llGeom.getBounds().getCenterLonLat(); + } else { + ll = new OpenLayers.LonLat(featureBounds.left, featureBounds.bottom); + } + this.handles[0].move(ll); + + delete this._setfeature; + + this.events.triggerEvent("setfeature", {feature: feature}); + }, + + /** + * APIMethod: unsetFeature + * Remove the transformation box off any feature. + * If the control is active, it will be deactivated first. + */ + unsetFeature: function() { + if (this.active) { + this.deactivate(); + } else { + this.feature = null; + this.rotation = 0; + this.scale = 1; + this.ratio = 1; + } + }, + + /** + * Method: createBox + * Creates the box with all handles and transformation handles. + */ + createBox: function() { + var control = this; + + this.center = new OpenLayers.Geometry.Point(0, 0); + var box = new OpenLayers.Feature.Vector( + new OpenLayers.Geometry.LineString([ + new OpenLayers.Geometry.Point(-1, -1), + new OpenLayers.Geometry.Point(0, -1), + new OpenLayers.Geometry.Point(1, -1), + new OpenLayers.Geometry.Point(1, 0), + new OpenLayers.Geometry.Point(1, 1), + new OpenLayers.Geometry.Point(0, 1), + new OpenLayers.Geometry.Point(-1, 1), + new OpenLayers.Geometry.Point(-1, 0), + new OpenLayers.Geometry.Point(-1, -1) + ]), null, + typeof this.renderIntent == "string" ? null : this.renderIntent + ); + + // Override for box move - make sure that the center gets updated + box.geometry.move = function(x, y) { + control._moving = true; + OpenLayers.Geometry.LineString.prototype.move.apply(this, arguments); + control.center.move(x, y); + delete control._moving; + }; + + // Overrides for vertex move, resize and rotate - make sure that + // handle and rotationHandle geometries are also moved, resized and + // rotated. + var vertexMoveFn = function(x, y) { + OpenLayers.Geometry.Point.prototype.move.apply(this, arguments); + this._rotationHandle && this._rotationHandle.geometry.move(x, y); + this._handle.geometry.move(x, y); + }; + var vertexResizeFn = function(scale, center, ratio) { + OpenLayers.Geometry.Point.prototype.resize.apply(this, arguments); + this._rotationHandle && this._rotationHandle.geometry.resize( + scale, center, ratio); + this._handle.geometry.resize(scale, center, ratio); + }; + var vertexRotateFn = function(angle, center) { + OpenLayers.Geometry.Point.prototype.rotate.apply(this, arguments); + this._rotationHandle && this._rotationHandle.geometry.rotate( + angle, center); + this._handle.geometry.rotate(angle, center); + }; + + // Override for handle move - make sure that the box and other handles + // are updated, and finally transform the feature. + var handleMoveFn = function(x, y) { + var oldX = this.x, oldY = this.y; + OpenLayers.Geometry.Point.prototype.move.call(this, x, y); + if(control._moving) { + return; + } + var evt = control.dragControl.handlers.drag.evt; + var preserveAspectRatio = !control._setfeature && + control.preserveAspectRatio; + var reshape = !preserveAspectRatio && !(evt && evt.shiftKey); + var oldGeom = new OpenLayers.Geometry.Point(oldX, oldY); + var centerGeometry = control.center; + this.rotate(-control.rotation, centerGeometry); + oldGeom.rotate(-control.rotation, centerGeometry); + var dx1 = this.x - centerGeometry.x; + var dy1 = this.y - centerGeometry.y; + var dx0 = dx1 - (this.x - oldGeom.x); + var dy0 = dy1 - (this.y - oldGeom.y); + this.x = oldX; + this.y = oldY; + var scale, ratio = 1; + if (reshape) { + scale = Math.abs(dy0) < 0.00001 ? 1 : dy1 / dy0; + ratio = (Math.abs(dx0) < 0.00001 ? 1 : (dx1 / dx0)) / scale; + } else { + var l0 = Math.sqrt((dx0 * dx0) + (dy0 * dy0)); + var l1 = Math.sqrt((dx1 * dx1) + (dy1 * dy1)); + scale = l1 / l0; + } + + // rotate the box to 0 before resizing - saves us some + // calculations and is inexpensive because we don't drawFeature. + control._moving = true; + control.box.geometry.rotate(-control.rotation, centerGeometry); + delete control._moving; + + control.box.geometry.resize(scale, centerGeometry, ratio); + control.box.geometry.rotate(control.rotation, centerGeometry); + control.transformFeature({scale: scale, ratio: ratio}); + }; + + // Override for rotation handle move - make sure that the box and + // other handles are updated, and finally transform the feature. + var rotationHandleMoveFn = function(x, y){ + var oldX = this.x, oldY = this.y; + OpenLayers.Geometry.Point.prototype.move.call(this, x, y); + if(control._moving) { + return; + } + var evt = control.dragControl.handlers.drag.evt; + var constrain = (evt && evt.shiftKey) ? 45 : 1; + var centerGeometry = control.center; + var dx1 = this.x - centerGeometry.x; + var dy1 = this.y - centerGeometry.y; + var dx0 = dx1 - x; + var dy0 = dy1 - y; + this.x = oldX; + this.y = oldY; + var a0 = Math.atan2(dy0, dx0); + var a1 = Math.atan2(dy1, dx1); + var angle = a1 - a0; + angle *= 180 / Math.PI; + control._angle = (control._angle + angle) % 360; + var diff = control.rotation % constrain; + if(Math.abs(control._angle) >= constrain || diff !== 0) { + angle = Math.round(control._angle / constrain) * constrain - + diff; + control._angle = 0; + control.box.geometry.rotate(angle, centerGeometry); + control.transformFeature({rotation: angle}); + } + }; + + var handles = new Array(8); + var rotationHandles = new Array(4); + var geom, handle, rotationHandle; + for(var i=0; i<8; ++i) { + geom = box.geometry.components[i]; + handle = new OpenLayers.Feature.Vector(geom.clone(), null, + typeof this.renderIntent == "string" ? null : + this.renderIntent); + if(i % 2 == 0) { + rotationHandle = new OpenLayers.Feature.Vector(geom.clone(), + null, typeof this.rotationHandleSymbolizer == "string" ? + null : this.rotationHandleSymbolizer); + rotationHandle.geometry.move = rotationHandleMoveFn; + geom._rotationHandle = rotationHandle; + rotationHandles[i/2] = rotationHandle; + } + geom.move = vertexMoveFn; + geom.resize = vertexResizeFn; + geom.rotate = vertexRotateFn; + handle.geometry.move = handleMoveFn; + geom._handle = handle; + handles[i] = handle; + } + + this.box = box; + this.rotationHandles = rotationHandles; + this.handles = handles; + }, + + /** + * Method: createControl + * Creates a DragFeature control for this control. + */ + createControl: function() { + var control = this; + this.dragControl = new OpenLayers.Control.DragFeature(this.layer, { + documentDrag: true, + // avoid moving the feature itself - move the box instead + moveFeature: function(pixel) { + if(this.feature === control.feature) { + this.feature = control.box; + } + OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this, + arguments); + }, + // transform while dragging + onDrag: function(feature, pixel) { + if(feature === control.box) { + control.transformFeature({center: control.center}); + control.drawHandles(); + } + }, + // set a new feature + onStart: function(feature, pixel) { + var eligible = !control.geometryTypes || + OpenLayers.Util.indexOf(control.geometryTypes, + feature.geometry.CLASS_NAME) !== -1; + var i = OpenLayers.Util.indexOf(control.handles, feature); + i += OpenLayers.Util.indexOf(control.rotationHandles, + feature); + if(feature !== control.feature && feature !== control.box && + i == -2 && eligible) { + control.setFeature(feature); + } + }, + onComplete: function(feature, pixel) { + control.events.triggerEvent("transformcomplete", + {feature: control.feature}); + } + }); + }, + + /** + * Method: drawHandles + * Draws the handles to match the box. + */ + drawHandles: function() { + var layer = this.layer; + for(var i=0; i<8; ++i) { + if(this.rotate && i % 2 === 0) { + layer.drawFeature(this.rotationHandles[i/2], + this.rotationHandleSymbolizer); + } + layer.drawFeature(this.handles[i], this.renderIntent); + } + }, + + /** + * Method: transformFeature + * Transforms the feature. + * + * Parameters: + * mods - {Object} An object with optional scale, ratio, rotation and + * center properties. + */ + transformFeature: function(mods) { + if(!this._setfeature) { + this.scale *= (mods.scale || 1); + this.ratio *= (mods.ratio || 1); + var oldRotation = this.rotation; + this.rotation = (this.rotation + (mods.rotation || 0)) % 360; + + if(this.events.triggerEvent("beforetransform", mods) !== false) { + var feature = this.feature; + var geom = feature.geometry; + var center = this.center; + geom.rotate(-oldRotation, center); + if(mods.scale || mods.ratio) { + geom.resize(mods.scale, center, mods.ratio); + } else if(mods.center) { + feature.move(mods.center.getBounds().getCenterLonLat()); + } + geom.rotate(this.rotation, center); + this.layer.drawFeature(feature); + feature.toState(OpenLayers.State.UPDATE); + this.events.triggerEvent("transform", mods); + } + } + this.layer.drawFeature(this.box, this.renderIntent); + this.drawHandles(); + }, + + /** + * APIMethod: destroy + * Take care of things that are not handled in superclass. + */ + destroy: function() { + var geom; + for(var i=0; i<8; ++i) { + geom = this.box.geometry.components[i]; + geom._handle.destroy(); + geom._handle = null; + geom._rotationHandle && geom._rotationHandle.destroy(); + geom._rotationHandle = null; + } + this.box.destroy(); + this.box = null; + this.layer = null; + this.dragControl.destroy(); + OpenLayers.Control.prototype.destroy.apply(this, arguments); + }, + + CLASS_NAME: "OpenLayers.Control.TransformFeature" +}); diff --git a/openlayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js b/openlayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js new file mode 100644 index 0000000000..f0a21883cd --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js @@ -0,0 +1,552 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Handler/Click.js + * @requires OpenLayers/Handler/Hover.js + * @requires OpenLayers/Request.js + */ + +/** + * Class: OpenLayers.Control.WMSGetFeatureInfo + * The WMSGetFeatureInfo control uses a WMS query to get information about a point on the map. The + * information may be in a display-friendly format such as HTML, or a machine-friendly format such + * as GML, depending on the server's capabilities and the client's configuration. This control + * handles click or hover events, attempts to parse the results using an OpenLayers.Format, and + * fires a 'getfeatureinfo' event with the click position, the raw body of the response, and an + * array of features if it successfully read the response. + * + * Inherits from: + * - + */ +OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: hover + * {Boolean} Send GetFeatureInfo requests when mouse stops moving. + * Default is false. + */ + hover: false, + + /** + * APIProperty: drillDown + * {Boolean} Drill down over all WMS layers in the map. When + * using drillDown mode, hover is not possible, and an infoFormat that + * returns parseable features is required. Default is false. + */ + drillDown: false, + + /** + * APIProperty: maxFeatures + * {Integer} Maximum number of features to return from a WMS query. This + * sets the feature_count parameter on WMS GetFeatureInfo + * requests. + */ + maxFeatures: 10, + + /** APIProperty: clickCallback + * {String} The click callback to register in the + * {} object created when the hover + * option is set to false. Default is "click". + */ + clickCallback: "click", + + /** APIProperty: output + * {String} Either "features" or "object". When triggering a + * getfeatureinfo request should we pass on an array of features + * or an object with with a "features" property and other properties + * (such as the url of the WMS). Default is "features". + */ + output: "features", + + /** + * Property: layers + * {Array()} The layers to query for feature info. + * If omitted, all map WMS layers with a url that matches this or + * will be considered. + */ + layers: null, + + /** + * Property: queryVisible + * {Boolean} If true, filter out hidden layers when searching the map for + * layers to query. Default is false. + */ + queryVisible: false, + + /** + * Property: url + * {String} The URL of the WMS service to use. If not provided, the url + * of the first eligible layer will be used. + */ + url: null, + + /** + * Property: layerUrls + * {Array(String)} Optional list of urls for layers that should be queried. + * This can be used when the layer url differs from the url used for + * making GetFeatureInfo requests (in the case of a layer using cached + * tiles). + */ + layerUrls: null, + + /** + * Property: infoFormat + * {String} The mimetype to request from the server. If you are using + * drillDown mode and have multiple servers that do not share a common + * infoFormat, you can override the control's infoFormat by providing an + * INFO_FORMAT parameter in your instance(s). + */ + infoFormat: 'text/html', + + /** + * Property: vendorParams + * {Object} Additional parameters that will be added to the request, for + * WMS implementations that support them. This could e.g. look like + * (start code) + * { + * radius: 5 + * } + * (end) + */ + vendorParams: {}, + + /** + * Property: format + * {} A format for parsing GetFeatureInfo responses. + * Default is . + */ + format: null, + + /** + * Property: formatOptions + * {Object} Optional properties to set on the format (if one is not provided + * in the property. + */ + formatOptions: null, + + /** + * APIProperty: handlerOptions + * {Object} Additional options for the handlers used by this control, e.g. + * (start code) + * { + * "click": {delay: 100}, + * "hover": {delay: 300} + * } + * (end) + */ + handlerOptions: null, + + /** + * Property: handler + * {Object} Reference to the for this control + */ + handler: null, + + /** + * Property: hoverRequest + * {} contains the currently running hover request + * (if any). + */ + hoverRequest: null, + + /** + * Constant: EVENT_TYPES + * + * Supported event types (in addition to those from ): + * beforegetfeatureinfo - Triggered before the request is sent. + * The event object has an *xy* property with the position of the + * mouse click or hover event that triggers the request. + * nogetfeatureinfo - no queryable layers were found. + * getfeatureinfo - Triggered when a GetFeatureInfo response is received. + * The event object has a *text* property with the body of the + * response (String), a *features* property with an array of the + * parsed features, an *xy* property with the position of the mouse + * click or hover event that triggered the request, and a *request* + * property with the request itself. If drillDown is set to true and + * multiple requests were issued to collect feature info from all + * layers, *text* and *request* will only contain the response body + * and request object of the last request. + */ + EVENT_TYPES: ["beforegetfeatureinfo", "nogetfeatureinfo", "getfeatureinfo"], + + /** + * Constructor: + * + * Parameters: + * options - {Object} + */ + initialize: function(options) { + // concatenate events specific to vector with those from the base + this.EVENT_TYPES = + OpenLayers.Control.WMSGetFeatureInfo.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + + options = options || {}; + options.handlerOptions = options.handlerOptions || {}; + + OpenLayers.Control.prototype.initialize.apply(this, [options]); + + if(!this.format) { + this.format = new OpenLayers.Format.WMSGetFeatureInfo( + options.formatOptions + ); + } + + if(this.drillDown === true) { + this.hover = false; + } + + if(this.hover) { + this.handler = new OpenLayers.Handler.Hover( + this, { + 'move': this.cancelHover, + 'pause': this.getInfoForHover + }, + OpenLayers.Util.extend(this.handlerOptions.hover || {}, { + 'delay': 250 + })); + } else { + var callbacks = {}; + callbacks[this.clickCallback] = this.getInfoForClick; + this.handler = new OpenLayers.Handler.Click( + this, callbacks, this.handlerOptions.click || {}); + } + }, + + /** + * Method: activate + * Activates the control. + * + * Returns: + * {Boolean} The control was effectively activated. + */ + activate: function () { + if (!this.active) { + this.handler.activate(); + } + return OpenLayers.Control.prototype.activate.apply( + this, arguments + ); + }, + + /** + * Method: deactivate + * Deactivates the control. + * + * Returns: + * {Boolean} The control was effectively deactivated. + */ + deactivate: function () { + return OpenLayers.Control.prototype.deactivate.apply( + this, arguments + ); + }, + + /** + * Method: getInfoForClick + * Called on click + * + * Parameters: + * evt - {} + */ + getInfoForClick: function(evt) { + this.events.triggerEvent("beforegetfeatureinfo", {xy: evt.xy}); + // Set the cursor to "wait" to tell the user we're working on their + // click. + OpenLayers.Element.addClass(this.map.viewPortDiv, "olCursorWait"); + this.request(evt.xy, {}); + }, + + /** + * Method: getInfoForHover + * Pause callback for the hover handler + * + * Parameters: + * evt - {Object} + */ + getInfoForHover: function(evt) { + this.events.triggerEvent("beforegetfeatureinfo", {xy: evt.xy}); + this.request(evt.xy, {hover: true}); + }, + + /** + * Method: cancelHover + * Cancel callback for the hover handler + */ + cancelHover: function() { + if (this.hoverRequest) { + this.hoverRequest.abort(); + this.hoverRequest = null; + } + }, + + /** + * Method: findLayers + * Internal method to get the layers, independent of whether we are + * inspecting the map or using a client-provided array + */ + findLayers: function() { + + var candidates = this.layers || this.map.layers; + var layers = []; + var layer, url; + for(var i=0, len=candidates.length; i or one + * of the . + * + * Parameters: + * url - {String} The url to test. + * + * Returns: + * {Boolean} The provided url matches the control or one of the + * . + */ + urlMatches: function(url) { + var matches = OpenLayers.Util.isEquivalentUrl(this.url, url); + if(!matches && this.layerUrls) { + for(var i=0, len=this.layerUrls.length; i} The position on the map where the mouse + * event occurred. + * format - {String} The format from the corresponding GetMap request + */ + buildWMSOptions: function(url, layers, clickPosition, format) { + var layerNames = [], styleNames = []; + for (var i = 0, len = layers.length; i < len; i++) { + layerNames = layerNames.concat(layers[i].params.LAYERS); + styleNames = styleNames.concat(this.getStyleNames(layers[i])); + } + var firstLayer = layers[0]; + // use the firstLayer's projection if it matches the map projection - + // this assumes that all layers will be available in this projection + var projection = this.map.getProjection(); + var layerProj = firstLayer.projection; + if (layerProj && layerProj.equals(this.map.getProjectionObject())) { + projection = layerProj.getCode(); + } + var params = OpenLayers.Util.extend({ + service: "WMS", + version: firstLayer.params.VERSION, + request: "GetFeatureInfo", + layers: layerNames, + query_layers: layerNames, + styles: styleNames, + bbox: this.map.getExtent().toBBOX(null, + firstLayer.reverseAxisOrder()), + feature_count: this.maxFeatures, + height: this.map.getSize().h, + width: this.map.getSize().w, + format: format, + info_format: firstLayer.params.INFO_FORMAT || this.infoFormat + }, (parseFloat(firstLayer.params.VERSION) >= 1.3) ? + { + crs: projection, + i: parseInt(clickPosition.x), + j: parseInt(clickPosition.y) + } : + { + srs: projection, + x: parseInt(clickPosition.x), + y: parseInt(clickPosition.y) + } + ); + OpenLayers.Util.applyDefaults(params, this.vendorParams); + return { + url: url, + params: OpenLayers.Util.upperCaseObject(params), + callback: function(request) { + this.handleResponse(clickPosition, request, url); + }, + scope: this + }; + }, + + /** + * Method: getStyleNames + * Gets the STYLES parameter for the layer. Make sure the STYLES parameter + * matches the LAYERS parameter + * + * Parameters: + * layer - {} + * + * Returns: + * {Array(String)} The STYLES parameter + */ + getStyleNames: function(layer) { + // in the event of a WMS layer bundling multiple layers but not + // specifying styles,we need the same number of commas to specify + // the default style for each of the layers. We can't just leave it + // blank as we may be including other layers that do specify styles. + var styleNames; + if (layer.params.STYLES) { + styleNames = layer.params.STYLES; + } else { + if (OpenLayers.Util.isArray(layer.params.LAYERS)) { + styleNames = new Array(layer.params.LAYERS.length); + } else { // Assume it's a String + styleNames = layer.params.LAYERS.replace(/[^,]/g, ""); + } + } + return styleNames; + }, + + /** + * Method: request + * Sends a GetFeatureInfo request to the WMS + * + * Parameters: + * clickPosition - {} The position on the map where the + * mouse event occurred. + * options - {Object} additional options for this method. + * + * Valid options: + * - *hover* {Boolean} true if we do the request for the hover handler + */ + request: function(clickPosition, options) { + var layers = this.findLayers(); + if(layers.length == 0) { + this.events.triggerEvent("nogetfeatureinfo"); + // Reset the cursor. + OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait"); + return; + } + + options = options || {}; + if(this.drillDown === false) { + var wmsOptions = this.buildWMSOptions(this.url, layers, + clickPosition, layers[0].params.FORMAT); + var request = OpenLayers.Request.GET(wmsOptions); + + if (options.hover === true) { + this.hoverRequest = request; + } + } else { + this._requestCount = 0; + this._numRequests = 0; + this.features = []; + // group according to service url to combine requests + var services = {}, url; + for(var i=0, len=layers.length; i} The position on the map where the + * mouse event occurred. + * features - {Array()} or + * {Array({Object}) when output is "object". The object has a url and a + * features property which contains an array of features. + */ + triggerGetFeatureInfo: function(request, xy, features) { + this.events.triggerEvent("getfeatureinfo", { + text: request.responseText, + features: features, + request: request, + xy: xy + }); + + // Reset the cursor. + OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait"); + }, + + /** + * Method: handleResponse + * Handler for the GetFeatureInfo response. + * + * Parameters: + * xy - {} The position on the map where the + * mouse event occurred. + * request - {XMLHttpRequest} The request object. + * url - {String} The url which was used for this request. + */ + handleResponse: function(xy, request, url) { + + var doc = request.responseXML; + if(!doc || !doc.documentElement) { + doc = request.responseText; + } + var features = this.format.read(doc); + if (this.drillDown === false) { + this.triggerGetFeatureInfo(request, xy, features); + } else { + this._requestCount++; + if (this.output === "object") { + this._features = (this._features || []).concat( + {url: url, features: features} + ); + } else { + this._features = (this._features || []).concat(features); + } + if (this._requestCount === this._numRequests) { + this.triggerGetFeatureInfo(request, xy, this._features.concat()); + delete this._features; + delete this._requestCount; + delete this._numRequests; + } + } + }, + + CLASS_NAME: "OpenLayers.Control.WMSGetFeatureInfo" +}); diff --git a/openlayers/lib/OpenLayers/Control/WMTSGetFeatureInfo.js b/openlayers/lib/OpenLayers/Control/WMTSGetFeatureInfo.js new file mode 100644 index 0000000000..ec62eeabff --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/WMTSGetFeatureInfo.js @@ -0,0 +1,401 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Handler/Click.js + * @requires OpenLayers/Handler/Hover.js + * @requires OpenLayers/Request.js + * @requires OpenLayers/Format/WMSGetFeatureInfo.js + */ + +/** + * Class: OpenLayers.Control.WMTSGetFeatureInfo + * The WMTSGetFeatureInfo control uses a WMTS query to get information about a + * point on the map. The information may be in a display-friendly format + * such as HTML, or a machine-friendly format such as GML, depending on the + * server's capabilities and the client's configuration. This control + * handles click or hover events, attempts to parse the results using an + * OpenLayers.Format, and fires a 'getfeatureinfo' event for each layer + * queried. + * + * Inherits from: + * - + */ +OpenLayers.Control.WMTSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: hover + * {Boolean} Send GetFeatureInfo requests when mouse stops moving. + * Default is false. + */ + hover: false, + + /** + * Property: requestEncoding + * {String} One of "KVP" or "REST". Only KVP encoding is supported at this + * time. + */ + requestEncoding: "KVP", + + /** + * APIProperty: drillDown + * {Boolean} Drill down over all WMTS layers in the map. When + * using drillDown mode, hover is not possible. A getfeatureinfo event + * will be fired for each layer queried. + */ + drillDown: false, + + /** + * APIProperty: maxFeatures + * {Integer} Maximum number of features to return from a WMTS query. This + * sets the feature_count parameter on WMTS GetFeatureInfo + * requests. + */ + maxFeatures: 10, + + /** APIProperty: clickCallback + * {String} The click callback to register in the + * {} object created when the hover + * option is set to false. Default is "click". + */ + clickCallback: "click", + + /** + * Property: layers + * {Array()} The layers to query for feature info. + * If omitted, all map WMTS layers will be considered. + */ + layers: null, + + /** + * APIProperty: queryVisible + * {Boolean} Filter out hidden layers when searching the map for layers to + * query. Default is true. + */ + queryVisible: true, + + /** + * Property: infoFormat + * {String} The mimetype to request from the server + */ + infoFormat: 'text/html', + + /** + * Property: vendorParams + * {Object} Additional parameters that will be added to the request, for + * WMTS implementations that support them. This could e.g. look like + * (start code) + * { + * radius: 5 + * } + * (end) + */ + vendorParams: {}, + + /** + * Property: format + * {} A format for parsing GetFeatureInfo responses. + * Default is . + */ + format: null, + + /** + * Property: formatOptions + * {Object} Optional properties to set on the format (if one is not provided + * in the property. + */ + formatOptions: null, + + /** + * APIProperty: handlerOptions + * {Object} Additional options for the handlers used by this control, e.g. + * (start code) + * { + * "click": {delay: 100}, + * "hover": {delay: 300} + * } + * (end) + */ + handlerOptions: null, + + /** + * Property: handler + * {Object} Reference to the for this control + */ + handler: null, + + /** + * Property: hoverRequest + * {} contains the currently running hover request + * (if any). + */ + hoverRequest: null, + + /** + * Constant: EVENT_TYPES + * + * Supported event types (in addition to those from ): + * beforegetfeatureinfo - Triggered before each request is sent. + * The event object has an *xy* property with the position of the + * mouse click or hover event that triggers the request and a *layer* + * property referencing the layer about to be queried. If a listener + * returns false, the request will not be issued. + * getfeatureinfo - Triggered when a GetFeatureInfo response is received. + * The event object has a *text* property with the body of the + * response (String), a *features* property with an array of the + * parsed features, an *xy* property with the position of the mouse + * click or hover event that triggered the request, a *layer* property + * referencing the layer queried and a *request* property with the + * request itself. If drillDown is set to true, one event will be fired + * for each layer queried. + * exception - Triggered when a GetFeatureInfo request fails (with a + * status other than 200) or whenparsing fails. Listeners will receive + * an event with *request*, *xy*, and *layer* properties. In the case + * of a parsing error, the event will also contain an *error* property. + */ + EVENT_TYPES: ["beforegetfeatureinfo", "getfeatureinfo", "exception"], + + /** + * Property: pending + * {Number} The number of pending requests. + */ + pending: 0, + + /** + * Constructor: + * + * Parameters: + * options - {Object} + */ + initialize: function(options) { + // concatenate events specific to vector with those from the base + this.EVENT_TYPES = + OpenLayers.Control.WMTSGetFeatureInfo.prototype.EVENT_TYPES.concat( + OpenLayers.Control.prototype.EVENT_TYPES + ); + + options = options || {}; + options.handlerOptions = options.handlerOptions || {}; + + OpenLayers.Control.prototype.initialize.apply(this, [options]); + + if (!this.format) { + this.format = new OpenLayers.Format.WMSGetFeatureInfo( + options.formatOptions + ); + } + + if (this.drillDown === true) { + this.hover = false; + } + + if (this.hover) { + this.handler = new OpenLayers.Handler.Hover( + this, { + move: this.cancelHover, + pause: this.getInfoForHover + }, + OpenLayers.Util.extend( + this.handlerOptions.hover || {}, {delay: 250} + ) + ); + } else { + var callbacks = {}; + callbacks[this.clickCallback] = this.getInfoForClick; + this.handler = new OpenLayers.Handler.Click( + this, callbacks, this.handlerOptions.click || {} + ); + } + }, + + /** + * Method: getInfoForClick + * Called on click + * + * Parameters: + * evt - {} + */ + getInfoForClick: function(evt) { + this.request(evt.xy, {}); + }, + + /** + * Method: getInfoForHover + * Pause callback for the hover handler + * + * Parameters: + * evt - {Object} + */ + getInfoForHover: function(evt) { + this.request(evt.xy, {hover: true}); + }, + + /** + * Method: cancelHover + * Cancel callback for the hover handler + */ + cancelHover: function() { + if (this.hoverRequest) { + --this.pending; + if (this.pending <= 0) { + OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait"); + this.pending = 0; + } + this.hoverRequest.abort(); + this.hoverRequest = null; + } + }, + + /** + * Method: findLayers + * Internal method to get the layers, independent of whether we are + * inspecting the map or using a client-provided array + */ + findLayers: function() { + var candidates = this.layers || this.map.layers; + var layers = []; + var layer; + for (var i=candidates.length-1; i>=0; --i) { + layer = candidates[i]; + if (layer instanceof OpenLayers.Layer.WMTS && + layer.requestEncoding === this.requestEncoding && + (!this.queryVisible || layer.getVisibility())) { + layers.push(layer); + if (!this.drillDown || this.hover) { + break; + } + } + } + return layers; + }, + + /** + * Method: buildRequestOptions + * Build an object with the relevant options for the GetFeatureInfo request. + * + * Parameters: + * layer - {} A WMTS layer. + * xy - {} The position on the map where the + * mouse event occurred. + */ + buildRequestOptions: function(layer, xy) { + var loc = this.map.getLonLatFromPixel(xy); + var getTileUrl = layer.getURL( + new OpenLayers.Bounds(loc.lon, loc.lat, loc.lon, loc.lat) + ); + var params = OpenLayers.Util.getParameters(getTileUrl); + var tileInfo = layer.getTileInfo(loc); + OpenLayers.Util.extend(params, { + service: "WMTS", + version: layer.version, + request: "GetFeatureInfo", + infoFormat: this.infoFormat, + i: tileInfo.i, + j: tileInfo.j + }); + OpenLayers.Util.applyDefaults(params, this.vendorParams); + return { + url: OpenLayers.Util.isArray(layer.url) ? layer.url[0] : layer.url, + params: OpenLayers.Util.upperCaseObject(params), + callback: function(request) { + this.handleResponse(xy, request, layer); + }, + scope: this + }; + }, + + /** + * Method: request + * Sends a GetFeatureInfo request to the WMTS + * + * Parameters: + * xy - {} The position on the map where the mouse event + * occurred. + * options - {Object} additional options for this method. + * + * Valid options: + * - *hover* {Boolean} true if we do the request for the hover handler + */ + request: function(xy, options) { + options = options || {}; + var layers = this.findLayers(); + if (layers.length > 0) { + var issue, layer; + for (var i=0, len=layers.length; i 0) { + OpenLayers.Element.addClass(this.map.viewPortDiv, "olCursorWait"); + } + } + }, + + /** + * Method: handleResponse + * Handler for the GetFeatureInfo response. + * + * Parameters: + * xy - {} The position on the map where the mouse event + * occurred. + * request - {XMLHttpRequest} The request object. + * layer - {} The queried layer. + */ + handleResponse: function(xy, request, layer) { + --this.pending; + if (this.pending <= 0) { + OpenLayers.Element.removeClass(this.map.viewPortDiv, "olCursorWait"); + this.pending = 0; + } + if (request.status && (request.status < 200 || request.status >= 300)) { + this.events.triggerEvent("exception", { + xy: xy, + request: request, + layer: layer + }); + } else { + var doc = request.responseXML; + if (!doc || !doc.documentElement) { + doc = request.responseText; + } + var features, except; + try { + features = this.format.read(doc); + } catch (error) { + except = true; + this.events.triggerEvent("exception", { + xy: xy, + request: request, + error: error, + layer: layer + }); + } + if (!except) { + this.events.triggerEvent("getfeatureinfo", { + text: request.responseText, + features: features, + request: request, + xy: xy, + layer: layer + }); + } + } + }, + + CLASS_NAME: "OpenLayers.Control.WMTSGetFeatureInfo" +}); diff --git a/openlayers/lib/OpenLayers/Control/ZoomBox.js b/openlayers/lib/OpenLayers/Control/ZoomBox.js new file mode 100644 index 0000000000..9cdee9180e --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/ZoomBox.js @@ -0,0 +1,95 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Handler/Box.js + */ + +/** + * Class: OpenLayers.Control.ZoomBox + * The ZoomBox control enables zooming directly to a given extent, by drawing + * a box on the map. The box is drawn by holding down shift, whilst dragging + * the mouse. + * + * Inherits from: + * - + */ +OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, { + /** + * Property: type + * {OpenLayers.Control.TYPE} + */ + type: OpenLayers.Control.TYPE_TOOL, + + /** + * Property: out + * {Boolean} Should the control be used for zooming out? + */ + out: false, + + /** + * Property: alwaysZoom + * {Boolean} Always zoom in/out, when box drawed + */ + alwaysZoom: false, + + /** + * Method: draw + */ + draw: function() { + this.handler = new OpenLayers.Handler.Box( this, + {done: this.zoomBox}, {keyMask: this.keyMask} ); + }, + + /** + * Method: zoomBox + * + * Parameters: + * position - {} or {} + */ + zoomBox: function (position) { + if (position instanceof OpenLayers.Bounds) { + var bounds; + if (!this.out) { + var minXY = this.map.getLonLatFromPixel( + new OpenLayers.Pixel(position.left, position.bottom)); + var maxXY = this.map.getLonLatFromPixel( + new OpenLayers.Pixel(position.right, position.top)); + bounds = new OpenLayers.Bounds(minXY.lon, minXY.lat, + maxXY.lon, maxXY.lat); + } else { + var pixWidth = Math.abs(position.right-position.left); + var pixHeight = Math.abs(position.top-position.bottom); + var zoomFactor = Math.min((this.map.size.h / pixHeight), + (this.map.size.w / pixWidth)); + var extent = this.map.getExtent(); + var center = this.map.getLonLatFromPixel( + position.getCenterPixel()); + var xmin = center.lon - (extent.getWidth()/2)*zoomFactor; + var xmax = center.lon + (extent.getWidth()/2)*zoomFactor; + var ymin = center.lat - (extent.getHeight()/2)*zoomFactor; + var ymax = center.lat + (extent.getHeight()/2)*zoomFactor; + bounds = new OpenLayers.Bounds(xmin, ymin, xmax, ymax); + } + // always zoom in/out + var lastZoom = this.map.getZoom(); + this.map.zoomToExtent(bounds); + if (lastZoom == this.map.getZoom() && this.alwaysZoom == true){ + this.map.zoomTo(lastZoom + (this.out ? -1 : 1)); + } + } else { // it's a pixel + if (!this.out) { + this.map.setCenter(this.map.getLonLatFromPixel(position), + this.map.getZoom() + 1); + } else { + this.map.setCenter(this.map.getLonLatFromPixel(position), + this.map.getZoom() - 1); + } + } + }, + + CLASS_NAME: "OpenLayers.Control.ZoomBox" +}); diff --git a/openlayers/lib/OpenLayers/Control/ZoomIn.js b/openlayers/lib/OpenLayers/Control/ZoomIn.js new file mode 100644 index 0000000000..0faaa7804b --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/ZoomIn.js @@ -0,0 +1,35 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.ZoomIn + * The ZoomIn control is a button to increase the zoom level of a map. + * + * Inherits from: + * - + */ +OpenLayers.Control.ZoomIn = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: type + * {String} The type of -- When added to a + * , 'type' is used by the panel to determine how to + * handle our events. + */ + type: OpenLayers.Control.TYPE_BUTTON, + + /** + * Method: trigger + */ + trigger: function(){ + this.map.zoomIn(); + }, + + CLASS_NAME: "OpenLayers.Control.ZoomIn" +}); diff --git a/openlayers/lib/OpenLayers/Control/ZoomOut.js b/openlayers/lib/OpenLayers/Control/ZoomOut.js new file mode 100644 index 0000000000..b4f93d0b5f --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/ZoomOut.js @@ -0,0 +1,35 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.ZoomOut + * The ZoomOut control is a button to decrease the zoom level of a map. + * + * Inherits from: + * - + */ +OpenLayers.Control.ZoomOut = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: type + * {String} The type of -- When added to a + * , 'type' is used by the panel to determine how to + * handle our events. + */ + type: OpenLayers.Control.TYPE_BUTTON, + + /** + * Method: trigger + */ + trigger: function(){ + this.map.zoomOut(); + }, + + CLASS_NAME: "OpenLayers.Control.ZoomOut" +}); diff --git a/openlayers/lib/OpenLayers/Control/ZoomPanel.js b/openlayers/lib/OpenLayers/Control/ZoomPanel.js new file mode 100644 index 0000000000..190564825d --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/ZoomPanel.js @@ -0,0 +1,54 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control/Panel.js + * @requires OpenLayers/Control/ZoomIn.js + * @requires OpenLayers/Control/ZoomOut.js + * @requires OpenLayers/Control/ZoomToMaxExtent.js + */ + +/** + * Class: OpenLayers.Control.ZoomPanel + * The ZoomPanel control is a compact collecton of 3 zoom controls: a + * , a , and a + * . By default it is drawn in the upper left + * corner of the map. + * + * Note: + * If you wish to use this class with the default images and you want + * it to look nice in ie6, you should add the following, conditionally + * added css stylesheet to your HTML file: + * + * (code) + * + * (end) + * + * Inherits from: + * - + */ +OpenLayers.Control.ZoomPanel = OpenLayers.Class(OpenLayers.Control.Panel, { + + /** + * Constructor: OpenLayers.Control.ZoomPanel + * Add the three zooming controls. + * + * Parameters: + * options - {Object} An optional object whose properties will be used + * to extend the control. + */ + initialize: function(options) { + OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]); + this.addControls([ + new OpenLayers.Control.ZoomIn(), + new OpenLayers.Control.ZoomToMaxExtent(), + new OpenLayers.Control.ZoomOut() + ]); + }, + + CLASS_NAME: "OpenLayers.Control.ZoomPanel" +}); diff --git a/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js b/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js new file mode 100644 index 0000000000..e43d4c44f2 --- /dev/null +++ b/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js @@ -0,0 +1,40 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + */ + +/** + * Class: OpenLayers.Control.ZoomToMaxExtent + * The ZoomToMaxExtent control is a button that zooms out to the maximum + * extent of the map. It is designed to be used with a + * . + * + * Inherits from: + * - + */ +OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control, { + + /** + * Property: type + * {String} The type of -- When added to a + * , 'type' is used by the panel to determine how to + * handle our events. + */ + type: OpenLayers.Control.TYPE_BUTTON, + + /* + * Method: trigger + * Do the zoom. + */ + trigger: function() { + if (this.map) { + this.map.zoomToMaxExtent(); + } + }, + + CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent" +}); diff --git a/openlayers/lib/OpenLayers/Events.js b/openlayers/lib/OpenLayers/Events.js new file mode 100644 index 0000000000..69769c3244 --- /dev/null +++ b/openlayers/lib/OpenLayers/Events.js @@ -0,0 +1,916 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Util.js + */ + +/** + * Namespace: OpenLayers.Event + * Utility functions for event handling. + */ +OpenLayers.Event = { + + /** + * Property: observers + * {Object} A hashtable cache of the event observers. Keyed by + * element._eventCacheID + */ + observers: false, + + /** + * Constant: KEY_BACKSPACE + * {int} + */ + KEY_BACKSPACE: 8, + + /** + * Constant: KEY_TAB + * {int} + */ + KEY_TAB: 9, + + /** + * Constant: KEY_RETURN + * {int} + */ + KEY_RETURN: 13, + + /** + * Constant: KEY_ESC + * {int} + */ + KEY_ESC: 27, + + /** + * Constant: KEY_LEFT + * {int} + */ + KEY_LEFT: 37, + + /** + * Constant: KEY_UP + * {int} + */ + KEY_UP: 38, + + /** + * Constant: KEY_RIGHT + * {int} + */ + KEY_RIGHT: 39, + + /** + * Constant: KEY_DOWN + * {int} + */ + KEY_DOWN: 40, + + /** + * Constant: KEY_DELETE + * {int} + */ + KEY_DELETE: 46, + + + /** + * Method: element + * Cross browser event element detection. + * + * Parameters: + * event - {Event} + * + * Returns: + * {DOMElement} The element that caused the event + */ + element: function(event) { + return event.target || event.srcElement; + }, + + /** + * Method: isSingleTouch + * Determine whether event was caused by a single touch + * + * Parameters: + * event - {Event} + * + * Returns: + * {Boolean} + */ + isSingleTouch: function(event) { + return event.touches && event.touches.length == 1; + }, + + /** + * Method: isMultiTouch + * Determine whether event was caused by a multi touch + * + * Parameters: + * event - {Event} + * + * Returns: + * {Boolean} + */ + isMultiTouch: function(event) { + return event.touches && event.touches.length > 1; + }, + + /** + * Method: isLeftClick + * Determine whether event was caused by a left click. + * + * Parameters: + * event - {Event} + * + * Returns: + * {Boolean} + */ + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + /** + * Method: isRightClick + * Determine whether event was caused by a right mouse click. + * + * Parameters: + * event - {Event} + * + * Returns: + * {Boolean} + */ + isRightClick: function(event) { + return (((event.which) && (event.which == 3)) || + ((event.button) && (event.button == 2))); + }, + + /** + * Method: stop + * Stops an event from propagating. + * + * Parameters: + * event - {Event} + * allowDefault - {Boolean} If true, we stop the event chain but + * still allow the default browser + * behaviour (text selection, radio-button + * clicking, etc) + * Default false + */ + stop: function(event, allowDefault) { + + if (!allowDefault) { + if (event.preventDefault) { + event.preventDefault(); + } else { + event.returnValue = false; + } + } + + if (event.stopPropagation) { + event.stopPropagation(); + } else { + event.cancelBubble = true; + } + }, + + /** + * Method: findElement + * + * Parameters: + * event - {Event} + * tagName - {String} + * + * Returns: + * {DOMElement} The first node with the given tagName, starting from the + * node the event was triggered on and traversing the DOM upwards + */ + findElement: function(event, tagName) { + var element = OpenLayers.Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))){ + element = element.parentNode; + } + return element; + }, + + /** + * Method: observe + * + * Parameters: + * elementParam - {DOMElement || String} + * name - {String} + * observer - {function} + * useCapture - {Boolean} + */ + observe: function(elementParam, name, observer, useCapture) { + var element = OpenLayers.Util.getElement(elementParam); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.attachEvent)) { + name = 'keydown'; + } + + //if observers cache has not yet been created, create it + if (!this.observers) { + this.observers = {}; + } + + //if not already assigned, make a new unique cache ID + if (!element._eventCacheID) { + var idPrefix = "eventCacheID_"; + if (element.id) { + idPrefix = element.id + "_" + idPrefix; + } + element._eventCacheID = OpenLayers.Util.createUniqueID(idPrefix); + } + + var cacheID = element._eventCacheID; + + //if there is not yet a hash entry for this element, add one + if (!this.observers[cacheID]) { + this.observers[cacheID] = []; + } + + //add a new observer to this element's list + this.observers[cacheID].push({ + 'element': element, + 'name': name, + 'observer': observer, + 'useCapture': useCapture + }); + + //add the actual browser event listener + if (element.addEventListener) { + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + element.attachEvent('on' + name, observer); + } + }, + + /** + * Method: stopObservingElement + * Given the id of an element to stop observing, cycle through the + * element's cached observers, calling stopObserving on each one, + * skipping those entries which can no longer be removed. + * + * parameters: + * elementParam - {DOMElement || String} + */ + stopObservingElement: function(elementParam) { + var element = OpenLayers.Util.getElement(elementParam); + var cacheID = element._eventCacheID; + + this._removeElementObservers(OpenLayers.Event.observers[cacheID]); + }, + + /** + * Method: _removeElementObservers + * + * Parameters: + * elementObservers - {Array(Object)} Array of (element, name, + * observer, usecapture) objects, + * taken directly from hashtable + */ + _removeElementObservers: function(elementObservers) { + if (elementObservers) { + for(var i = elementObservers.length-1; i >= 0; i--) { + var entry = elementObservers[i]; + var args = new Array(entry.element, + entry.name, + entry.observer, + entry.useCapture); + var removed = OpenLayers.Event.stopObserving.apply(this, args); + } + } + }, + + /** + * Method: stopObserving + * + * Parameters: + * elementParam - {DOMElement || String} + * name - {String} + * observer - {function} + * useCapture - {Boolean} + * + * Returns: + * {Boolean} Whether or not the event observer was removed + */ + stopObserving: function(elementParam, name, observer, useCapture) { + useCapture = useCapture || false; + + var element = OpenLayers.Util.getElement(elementParam); + var cacheID = element._eventCacheID; + + if (name == 'keypress') { + if ( navigator.appVersion.match(/Konqueror|Safari|KHTML/) || + element.detachEvent) { + name = 'keydown'; + } + } + + // find element's entry in this.observers cache and remove it + var foundEntry = false; + var elementObservers = OpenLayers.Event.observers[cacheID]; + if (elementObservers) { + + // find the specific event type in the element's list + var i=0; + while(!foundEntry && i < elementObservers.length) { + var cacheEntry = elementObservers[i]; + + if ((cacheEntry.name == name) && + (cacheEntry.observer == observer) && + (cacheEntry.useCapture == useCapture)) { + + elementObservers.splice(i, 1); + if (elementObservers.length == 0) { + delete OpenLayers.Event.observers[cacheID]; + } + foundEntry = true; + break; + } + i++; + } + } + + //actually remove the event listener from browser + if (foundEntry) { + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element && element.detachEvent) { + element.detachEvent('on' + name, observer); + } + } + return foundEntry; + }, + + /** + * Method: unloadCache + * Cycle through all the element entries in the events cache and call + * stopObservingElement on each. + */ + unloadCache: function() { + // check for OpenLayers.Event before checking for observers, because + // OpenLayers.Event may be undefined in IE if no map instance was + // created + if (OpenLayers.Event && OpenLayers.Event.observers) { + for (var cacheID in OpenLayers.Event.observers) { + var elementObservers = OpenLayers.Event.observers[cacheID]; + OpenLayers.Event._removeElementObservers.apply(this, + [elementObservers]); + } + OpenLayers.Event.observers = false; + } + }, + + CLASS_NAME: "OpenLayers.Event" +}; + +/* prevent memory leaks in IE */ +OpenLayers.Event.observe(window, 'unload', OpenLayers.Event.unloadCache, false); + +// FIXME: Remove this in 3.0. In 3.0, Event.stop will no longer be provided +// by OpenLayers. +if (window.Event) { + OpenLayers.Util.applyDefaults(window.Event, OpenLayers.Event); +} else { + var Event = OpenLayers.Event; +} + +/** + * Class: OpenLayers.Events + */ +OpenLayers.Events = OpenLayers.Class({ + + /** + * Constant: BROWSER_EVENTS + * {Array(String)} supported events + */ + BROWSER_EVENTS: [ + "mouseover", "mouseout", + "mousedown", "mouseup", "mousemove", + "click", "dblclick", "rightclick", "dblrightclick", + "resize", "focus", "blur", + "touchstart", "touchmove", "touchend" + ], + + /** + * Property: listeners + * {Object} Hashtable of Array(Function): events listener functions + */ + listeners: null, + + /** + * Property: object + * {Object} the code object issuing application events + */ + object: null, + + /** + * Property: element + * {DOMElement} the DOM element receiving browser events + */ + element: null, + + /** + * Property: eventTypes + * {Array(String)} list of support application events + */ + eventTypes: null, + + /** + * Property: eventHandler + * {Function} bound event handler attached to elements + */ + eventHandler: null, + + /** + * APIProperty: fallThrough + * {Boolean} + */ + fallThrough: null, + + /** + * APIProperty: includeXY + * {Boolean} Should the .xy property automatically be created for browser + * mouse events? In general, this should be false. If it is true, then + * mouse events will automatically generate a '.xy' property on the + * event object that is passed. (Prior to OpenLayers 2.7, this was true + * by default.) Otherwise, you can call the getMousePosition on the + * relevant events handler on the object available via the 'evt.object' + * property of the evt object. So, for most events, you can call: + * function named(evt) { + * this.xy = this.object.events.getMousePosition(evt) + * } + * + * This option typically defaults to false for performance reasons: + * when creating an events object whose primary purpose is to manage + * relatively positioned mouse events within a div, it may make + * sense to set it to true. + * + * This option is also used to control whether the events object caches + * offsets. If this is false, it will not: the reason for this is that + * it is only expected to be called many times if the includeXY property + * is set to true. If you set this to true, you are expected to clear + * the offset cache manually (using this.clearMouseCache()) if: + * the border of the element changes + * the location of the element in the page changes + */ + includeXY: false, + + /** + * Method: clearMouseListener + * A version of that is bound to this instance so that + * it can be used with and + * . + */ + clearMouseListener: null, + + /** + * Constructor: OpenLayers.Events + * Construct an OpenLayers.Events object. + * + * Parameters: + * object - {Object} The js object to which this Events object is being added + * element - {DOMElement} A dom element to respond to browser events + * eventTypes - {Array(String)} Array of custom application events + * fallThrough - {Boolean} Allow events to fall through after these have + * been handled? + * options - {Object} Options for the events object. + */ + initialize: function (object, element, eventTypes, fallThrough, options) { + OpenLayers.Util.extend(this, options); + this.object = object; + this.fallThrough = fallThrough; + this.listeners = {}; + + // keep a bound copy of handleBrowserEvent() so that we can + // pass the same function to both Event.observe() and .stopObserving() + this.eventHandler = OpenLayers.Function.bindAsEventListener( + this.handleBrowserEvent, this + ); + + // to be used with observe and stopObserving + this.clearMouseListener = OpenLayers.Function.bind( + this.clearMouseCache, this + ); + + // if eventTypes is specified, create a listeners list for each + // custom application event. + this.eventTypes = []; + if (eventTypes != null) { + for (var i=0, len=eventTypes.length; i as shown in the examples + * below. + * + * Example use: + * (code) + * // register a single listener for the "loadstart" event + * events.on({"loadstart": loadStartListener}); + * + * // this is equivalent to the following + * events.register("loadstart", undefined, loadStartListener); + * + * // register multiple listeners to be called with the same `this` object + * events.on({ + * "loadstart": loadStartListener, + * "loadend": loadEndListener, + * scope: object + * }); + * + * // this is equivalent to the following + * events.register("loadstart", object, loadStartListener); + * events.register("loadend", object, loadEndListener); + * (end) + * + * Parameters: + * object - {Object} + */ + on: function(object) { + for(var type in object) { + if(type != "scope") { + this.register(type, object.scope, object[type]); + } + } + }, + + /** + * APIMethod: register + * Register an event on the events object. + * + * When the event is triggered, the 'func' function will be called, in the + * context of 'obj'. Imagine we were to register an event, specifying an + * OpenLayers.Bounds Object as 'obj'. When the event is triggered, the + * context in the callback function will be our Bounds object. This means + * that within our callback function, we can access the properties and + * methods of the Bounds object through the "this" variable. So our + * callback could execute something like: + * : leftStr = "Left: " + this.left; + * + * or + * + * : centerStr = "Center: " + this.getCenterLonLat(); + * + * Parameters: + * type - {String} Name of the event to register + * obj - {Object} The object to bind the context to for the callback#. + * If no object is specified, default is the Events's + * 'object' property. + * func - {Function} The callback function. If no callback is + * specified, this function does nothing. + * + * + */ + register: function (type, obj, func) { + + if ( (func != null) && + (OpenLayers.Util.indexOf(this.eventTypes, type) != -1) ) { + + if (obj == null) { + obj = this.object; + } + var listeners = this.listeners[type]; + listeners.push( {obj: obj, func: func} ); + } + }, + + /** + * APIMethod: registerPriority + * Same as register() but adds the new listener to the *front* of the + * events queue instead of to the end. + * + * TODO: get rid of this in 3.0 - Decide whether listeners should be + * called in the order they were registered or in reverse order. + * + * + * Parameters: + * type - {String} Name of the event to register + * obj - {Object} The object to bind the context to for the callback#. + * If no object is specified, default is the Events's + * 'object' property. + * func - {Function} The callback function. If no callback is + * specified, this function does nothing. + */ + registerPriority: function (type, obj, func) { + + if (func != null) { + if (obj == null) { + obj = this.object; + } + var listeners = this.listeners[type]; + if (listeners != null) { + listeners.unshift( {obj: obj, func: func} ); + } + } + }, + + /** + * APIMethod: un + * Convenience method for unregistering listeners with a common scope. + * Internally, this method calls as shown in the examples + * below. + * + * Example use: + * (code) + * // unregister a single listener for the "loadstart" event + * events.un({"loadstart": loadStartListener}); + * + * // this is equivalent to the following + * events.unregister("loadstart", undefined, loadStartListener); + * + * // unregister multiple listeners with the same `this` object + * events.un({ + * "loadstart": loadStartListener, + * "loadend": loadEndListener, + * scope: object + * }); + * + * // this is equivalent to the following + * events.unregister("loadstart", object, loadStartListener); + * events.unregister("loadend", object, loadEndListener); + * (end) + */ + un: function(object) { + for(var type in object) { + if(type != "scope") { + this.unregister(type, object.scope, object[type]); + } + } + }, + + /** + * APIMethod: unregister + * + * Parameters: + * type - {String} + * obj - {Object} If none specified, defaults to this.object + * func - {Function} + */ + unregister: function (type, obj, func) { + if (obj == null) { + obj = this.object; + } + var listeners = this.listeners[type]; + if (listeners != null) { + for (var i=0, len=listeners.length; i} The current xy coordinate of the mouse, adjusted + * for offsets + */ + getMousePosition: function (evt) { + if (!this.includeXY) { + this.clearMouseCache(); + } else if (!this.element.hasScrollEvent) { + OpenLayers.Event.observe(window, "scroll", this.clearMouseListener); + this.element.hasScrollEvent = true; + } + + if (!this.element.scrolls) { + var viewportElement = OpenLayers.Util.getViewportElement(); + this.element.scrolls = [ + viewportElement.scrollLeft, + viewportElement.scrollTop + ]; + } + + if (!this.element.lefttop) { + this.element.lefttop = [ + (document.documentElement.clientLeft || 0), + (document.documentElement.clientTop || 0) + ]; + } + + if (!this.element.offsets) { + this.element.offsets = OpenLayers.Util.pagePosition(this.element); + } + + return new OpenLayers.Pixel( + (evt.clientX + this.element.scrolls[0]) - this.element.offsets[0] + - this.element.lefttop[0], + (evt.clientY + this.element.scrolls[1]) - this.element.offsets[1] + - this.element.lefttop[1] + ); + }, + + CLASS_NAME: "OpenLayers.Events" +}); diff --git a/openlayers/lib/OpenLayers/Feature.js b/openlayers/lib/OpenLayers/Feature.js new file mode 100644 index 0000000000..f921bc4325 --- /dev/null +++ b/openlayers/lib/OpenLayers/Feature.js @@ -0,0 +1,225 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/BaseTypes/Class.js + * @requires OpenLayers/Util.js + */ + +/** + * Class: OpenLayers.Feature + * Features are combinations of geography and attributes. The OpenLayers.Feature + * class specifically combines a marker and a lonlat. + */ +OpenLayers.Feature = OpenLayers.Class({ + + /** + * Property: layer + * {} + */ + layer: null, + + /** + * Property: id + * {String} + */ + id: null, + + /** + * Property: lonlat + * {} + */ + lonlat: null, + + /** + * Property: data + * {Object} + */ + data: null, + + /** + * Property: marker + * {} + */ + marker: null, + + /** + * APIProperty: popupClass + * {} The class which will be used to instantiate + * a new Popup. Default is . + */ + popupClass: null, + + /** + * Property: popup + * {} + */ + popup: null, + + /** + * Constructor: OpenLayers.Feature + * Constructor for features. + * + * Parameters: + * layer - {} + * lonlat - {} + * data - {Object} + * + * Returns: + * {} + */ + initialize: function(layer, lonlat, data) { + this.layer = layer; + this.lonlat = lonlat; + this.data = (data != null) ? data : {}; + this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); + }, + + /** + * Method: destroy + * nullify references to prevent circular references and memory leaks + */ + destroy: function() { + + //remove the popup from the map + if ((this.layer != null) && (this.layer.map != null)) { + if (this.popup != null) { + this.layer.map.removePopup(this.popup); + } + } + // remove the marker from the layer + if (this.layer != null && this.marker != null) { + this.layer.removeMarker(this.marker); + } + + this.layer = null; + this.id = null; + this.lonlat = null; + this.data = null; + if (this.marker != null) { + this.destroyMarker(this.marker); + this.marker = null; + } + if (this.popup != null) { + this.destroyPopup(this.popup); + this.popup = null; + } + }, + + /** + * Method: onScreen + * + * Returns: + * {Boolean} Whether or not the feature is currently visible on screen + * (based on its 'lonlat' property) + */ + onScreen:function() { + + var onScreen = false; + if ((this.layer != null) && (this.layer.map != null)) { + var screenBounds = this.layer.map.getExtent(); + onScreen = screenBounds.containsLonLat(this.lonlat); + } + return onScreen; + }, + + + /** + * Method: createMarker + * Based on the data associated with the Feature, create and return a marker object. + * + * Returns: + * {} A Marker Object created from the 'lonlat' and 'icon' properties + * set in this.data. If no 'lonlat' is set, returns null. If no + * 'icon' is set, OpenLayers.Marker() will load the default image. + * + * Note - this.marker is set to return value + * + */ + createMarker: function() { + + if (this.lonlat != null) { + this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon); + } + return this.marker; + }, + + /** + * Method: destroyMarker + * Destroys marker. + * If user overrides the createMarker() function, s/he should be able + * to also specify an alternative function for destroying it + */ + destroyMarker: function() { + this.marker.destroy(); + }, + + /** + * Method: createPopup + * Creates a popup object created from the 'lonlat', 'popupSize', + * and 'popupContentHTML' properties set in this.data. It uses + * this.marker.icon as default anchor. + * + * If no 'lonlat' is set, returns null. + * If no this.marker has been created, no anchor is sent. + * + * Note - the returned popup object is 'owned' by the feature, so you + * cannot use the popup's destroy method to discard the popup. + * Instead, you must use the feature's destroyPopup + * + * Note - this.popup is set to return value + * + * Parameters: + * closeBox - {Boolean} create popup with closebox or not + * + * Returns: + * {} Returns the created popup, which is also set + * as 'popup' property of this feature. Will be of whatever type + * specified by this feature's 'popupClass' property, but must be + * of type . + * + */ + createPopup: function(closeBox) { + + if (this.lonlat != null) { + if (!this.popup) { + var anchor = (this.marker) ? this.marker.icon : null; + var popupClass = this.popupClass ? + this.popupClass : OpenLayers.Popup.AnchoredBubble; + this.popup = new popupClass(this.id + "_popup", + this.lonlat, + this.data.popupSize, + this.data.popupContentHTML, + anchor, + closeBox); + } + if (this.data.overflow != null) { + this.popup.contentDiv.style.overflow = this.data.overflow; + } + + this.popup.feature = this; + } + return this.popup; + }, + + + /** + * Method: destroyPopup + * Destroys the popup created via createPopup. + * + * As with the marker, if user overrides the createPopup() function, s/he + * should also be able to override the destruction + */ + destroyPopup: function() { + if (this.popup) { + this.popup.feature = null; + this.popup.destroy(); + this.popup = null; + } + }, + + CLASS_NAME: "OpenLayers.Feature" +}); diff --git a/openlayers/lib/OpenLayers/Feature/Vector.js b/openlayers/lib/OpenLayers/Feature/Vector.js new file mode 100644 index 0000000000..4aec61de30 --- /dev/null +++ b/openlayers/lib/OpenLayers/Feature/Vector.js @@ -0,0 +1,491 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +// TRASH THIS +OpenLayers.State = { + /** states */ + UNKNOWN: 'Unknown', + INSERT: 'Insert', + UPDATE: 'Update', + DELETE: 'Delete' +}; + +/** + * @requires OpenLayers/Feature.js + * @requires OpenLayers/Util.js + */ + +/** + * Class: OpenLayers.Feature.Vector + * Vector features use the OpenLayers.Geometry classes as geometry description. + * They have an 'attributes' property, which is the data object, and a 'style' + * property, the default values of which are defined in the + * objects. + * + * Inherits from: + * - + */ +OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { + + /** + * Property: fid + * {String} + */ + fid: null, + + /** + * APIProperty: geometry + * {} + */ + geometry: null, + + /** + * APIProperty: attributes + * {Object} This object holds arbitrary, serializable properties that + * describe the feature. + */ + attributes: null, + + /** + * Property: bounds + * {} The box bounding that feature's geometry, that + * property can be set by an object when + * deserializing the feature, so in most cases it represents an + * information set by the server. + */ + bounds: null, + + /** + * Property: state + * {String} + */ + state: null, + + /** + * APIProperty: style + * {Object} + */ + style: null, + + /** + * APIProperty: url + * {String} If this property is set it will be taken into account by + * {} when upadting or deleting the feature. + */ + url: null, + + /** + * Property: renderIntent + * {String} rendering intent currently being used + */ + renderIntent: "default", + + /** + * APIProperty: modified + * {Object} An object with the originals of the geometry and attributes of + * the feature, if they were changed. Currently this property is only read + * by , and written by + * , which sets the geometry property. + * Applications can set the originals of modified attributes in the + * attributes property. Note that applications have to check if this + * object and the attributes property is already created before using it. + * After a change made with ModifyFeature, this object could look like + * + * (code) + * { + * geometry: >Object + * } + * (end) + * + * When an application has made changes to feature attributes, it could + * have set the attributes to something like this: + * + * (code) + * { + * attributes: { + * myAttribute: "original" + * } + * } + * (end) + * + * Note that only checks for truthy values in + * *modified.geometry* and the attribute names in *modified.attributes*, + * but it is recommended to set the original values (and not just true) as + * attribute value, so applications could use this information to undo + * changes. + */ + modified: null, + + /** + * Constructor: OpenLayers.Feature.Vector + * Create a vector feature. + * + * Parameters: + * geometry - {} The geometry that this feature + * represents. + * attributes - {Object} An optional object that will be mapped to the + * property. + * style - {Object} An optional style object. + */ + initialize: function(geometry, attributes, style) { + OpenLayers.Feature.prototype.initialize.apply(this, + [null, null, attributes]); + this.lonlat = null; + this.geometry = geometry ? geometry : null; + this.state = null; + this.attributes = {}; + if (attributes) { + this.attributes = OpenLayers.Util.extend(this.attributes, + attributes); + } + this.style = style ? style : null; + }, + + /** + * Method: destroy + * nullify references to prevent circular references and memory leaks + */ + destroy: function() { + if (this.layer) { + this.layer.removeFeatures(this); + this.layer = null; + } + + this.geometry = null; + this.modified = null; + OpenLayers.Feature.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: clone + * Create a clone of this vector feature. Does not set any non-standard + * properties. + * + * Returns: + * {} An exact clone of this vector feature. + */ + clone: function () { + return new OpenLayers.Feature.Vector( + this.geometry ? this.geometry.clone() : null, + this.attributes, + this.style); + }, + + /** + * Method: onScreen + * Determine whether the feature is within the map viewport. This method + * tests for an intersection between the geometry and the viewport + * bounds. If a more effecient but less precise geometry bounds + * intersection is desired, call the method with the boundsOnly + * parameter true. + * + * Parameters: + * boundsOnly - {Boolean} Only test whether a feature's bounds intersects + * the viewport bounds. Default is false. If false, the feature's + * geometry must intersect the viewport for onScreen to return true. + * + * Returns: + * {Boolean} The feature is currently visible on screen (optionally + * based on its bounds if boundsOnly is true). + */ + onScreen:function(boundsOnly) { + var onScreen = false; + if(this.layer && this.layer.map) { + var screenBounds = this.layer.map.getExtent(); + if(boundsOnly) { + var featureBounds = this.geometry.getBounds(); + onScreen = screenBounds.intersectsBounds(featureBounds); + } else { + var screenPoly = screenBounds.toGeometry(); + onScreen = screenPoly.intersects(this.geometry); + } + } + return onScreen; + }, + + /** + * Method: getVisibility + * Determine whether the feature is displayed or not. It may not displayed + * because: + * - its style display property is set to 'none', + * - it doesn't belong to any layer, + * - the styleMap creates a symbolizer with display property set to 'none' + * for it, + * - the layer which it belongs to is not visible. + * + * Returns: + * {Boolean} The feature is currently displayed. + */ + getVisibility: function() { + return !(this.style && this.style.display == 'none' || + !this.layer || + this.layer && this.layer.styleMap && + this.layer.styleMap.createSymbolizer(this, this.renderIntent).display == 'none' || + this.layer && !this.layer.getVisibility()); + }, + + /** + * Method: createMarker + * HACK - we need to decide if all vector features should be able to + * create markers + * + * Returns: + * {} For now just returns null + */ + createMarker: function() { + return null; + }, + + /** + * Method: destroyMarker + * HACK - we need to decide if all vector features should be able to + * delete markers + * + * If user overrides the createMarker() function, s/he should be able + * to also specify an alternative function for destroying it + */ + destroyMarker: function() { + // pass + }, + + /** + * Method: createPopup + * HACK - we need to decide if all vector features should be able to + * create popups + * + * Returns: + * {} For now just returns null + */ + createPopup: function() { + return null; + }, + + /** + * Method: atPoint + * Determins whether the feature intersects with the specified location. + * + * Parameters: + * lonlat - {} + * toleranceLon - {float} Optional tolerance in Geometric Coords + * toleranceLat - {float} Optional tolerance in Geographic Coords + * + * Returns: + * {Boolean} Whether or not the feature is at the specified location + */ + atPoint: function(lonlat, toleranceLon, toleranceLat) { + var atPoint = false; + if(this.geometry) { + atPoint = this.geometry.atPoint(lonlat, toleranceLon, + toleranceLat); + } + return atPoint; + }, + + /** + * Method: destroyPopup + * HACK - we need to decide if all vector features should be able to + * delete popups + */ + destroyPopup: function() { + // pass + }, + + /** + * Method: move + * Moves the feature and redraws it at its new location + * + * Parameters: + * state - {OpenLayers.LonLat or OpenLayers.Pixel} the + * location to which to move the feature. + */ + move: function(location) { + + if(!this.layer || !this.geometry.move){ + //do nothing if no layer or immoveable geometry + return undefined; + } + + var pixel; + if (location.CLASS_NAME == "OpenLayers.LonLat") { + pixel = this.layer.getViewPortPxFromLonLat(location); + } else { + pixel = location; + } + + var lastPixel = this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat()); + var res = this.layer.map.getResolution(); + this.geometry.move(res * (pixel.x - lastPixel.x), + res * (lastPixel.y - pixel.y)); + this.layer.drawFeature(this); + return lastPixel; + }, + + /** + * Method: toState + * Sets the new state + * + * Parameters: + * state - {String} + */ + toState: function(state) { + if (state == OpenLayers.State.UPDATE) { + switch (this.state) { + case OpenLayers.State.UNKNOWN: + case OpenLayers.State.DELETE: + this.state = state; + break; + case OpenLayers.State.UPDATE: + case OpenLayers.State.INSERT: + break; + } + } else if (state == OpenLayers.State.INSERT) { + switch (this.state) { + case OpenLayers.State.UNKNOWN: + break; + default: + this.state = state; + break; + } + } else if (state == OpenLayers.State.DELETE) { + switch (this.state) { + case OpenLayers.State.INSERT: + // the feature should be destroyed + break; + case OpenLayers.State.DELETE: + break; + case OpenLayers.State.UNKNOWN: + case OpenLayers.State.UPDATE: + this.state = state; + break; + } + } else if (state == OpenLayers.State.UNKNOWN) { + this.state = state; + } + }, + + CLASS_NAME: "OpenLayers.Feature.Vector" +}); + + +/** + * Constant: OpenLayers.Feature.Vector.style + * OpenLayers features can have a number of style attributes. The 'default' + * style will typically be used if no other style is specified. These + * styles correspond for the most part, to the styling properties defined + * by the SVG standard. + * Information on fill properties: http://www.w3.org/TR/SVG/painting.html#FillProperties + * Information on stroke properties: http://www.w3.org/TR/SVG/painting.html#StrokeProperties + * + * Symbolizer properties: + * fill - {Boolean} Set to false if no fill is desired. + * fillColor - {String} Hex fill color. Default is "#ee9900". + * fillOpacity - {Number} Fill opacity (0-1). Default is 0.4 + * stroke - {Boolean} Set to false if no stroke is desired. + * strokeColor - {String} Hex stroke color. Default is "#ee9900". + * strokeOpacity - {Number} Stroke opacity (0-1). Default is 1. + * strokeWidth - {Number} Pixel stroke width. Default is 1. + * strokeLinecap - {String} Stroke cap type. Default is "round". [butt | round | square] + * strokeDashstyle - {String} Stroke dash style. Default is "solid". [dot | dash | dashdot | longdash | longdashdot | solid] + * graphic - {Boolean} Set to false if no graphic is desired. + * pointRadius - {Number} Pixel point radius. Default is 6. + * pointerEvents - {String} Default is "visiblePainted". + * cursor - {String} Default is "". + * externalGraphic - {String} Url to an external graphic that will be used for rendering points. + * graphicWidth - {Number} Pixel width for sizing an external graphic. + * graphicHeight - {Number} Pixel height for sizing an external graphic. + * graphicOpacity - {Number} Opacity (0-1) for an external graphic. + * graphicXOffset - {Number} Pixel offset along the positive x axis for displacing an external graphic. + * graphicYOffset - {Number} Pixel offset along the positive y axis for displacing an external graphic. + * 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). + * graphicZIndex - {Number} The integer z-index value to use in rendering. + * graphicName - {String} Named graphic to use when rendering points. Supported values include "circle" (default), + * "square", "star", "x", "cross", "triangle". + * graphicTitle - {String} Tooltip for an external graphic. + * backgroundGraphic - {String} Url to a graphic to be used as the background under an externalGraphic. + * backgroundGraphicZIndex - {Number} The integer z-index value to use in rendering the background graphic. + * backgroundXOffset - {Number} The x offset (in pixels) for the background graphic. + * backgroundYOffset - {Number} The y offset (in pixels) for the background graphic. + * backgroundHeight - {Number} The height of the background graphic. If not provided, the graphicHeight will be used. + * backgroundWidth - {Number} The width of the background width. If not provided, the graphicWidth will be used. + * label - {String} The text for an optional label. For browsers that use the canvas renderer, this requires either + * fillText or mozDrawText to be available. + * labelAlign - {String} Label alignment. This specifies the insertion point relative to the text. It is a string + * composed of two characters. The first character is for the horizontal alignment, the second for the vertical + * alignment. Valid values for horizontal alignment: "l"=left, "c"=center, "r"=right. Valid values for vertical + * alignment: "t"=top, "m"=middle, "b"=bottom. Example values: "lt", "cm", "rb". + * labelXOffset - {Number} Pixel offset along the positive x axis for displacing the label. Not supported by the canvas renderer. + * labelYOffset - {Number} Pixel offset along the positive y axis for displacing the label. Not supported by the canvas renderer. + * labelSelect - {Boolean} If set to true, labels will be selectable using SelectFeature or similar controls. + * Default is false. + * fontColor - {String} The font color for the label, to be provided like CSS. + * fontOpacity - {Number} Opacity (0-1) for the label + * fontFamily - {String} The font family for the label, to be provided like in CSS. + * fontSize - {String} The font size for the label, to be provided like in CSS. + * fontStyle - {String} The font style for the label, to be provided like in CSS. + * fontWeight - {String} The font weight for the label, to be provided like in CSS. + * display - {String} Symbolizers will have no effect if display is set to "none". All other values have no effect. + */ +OpenLayers.Feature.Vector.style = { + 'default': { + fillColor: "#ee9900", + fillOpacity: 0.4, + hoverFillColor: "white", + hoverFillOpacity: 0.8, + strokeColor: "#ee9900", + strokeOpacity: 1, + strokeWidth: 1, + strokeLinecap: "round", + strokeDashstyle: "solid", + hoverStrokeColor: "red", + hoverStrokeOpacity: 1, + hoverStrokeWidth: 0.2, + pointRadius: 6, + hoverPointRadius: 1, + hoverPointUnit: "%", + pointerEvents: "visiblePainted", + cursor: "inherit" + }, + 'select': { + fillColor: "blue", + fillOpacity: 0.4, + hoverFillColor: "white", + hoverFillOpacity: 0.8, + strokeColor: "blue", + strokeOpacity: 1, + strokeWidth: 2, + strokeLinecap: "round", + strokeDashstyle: "solid", + hoverStrokeColor: "red", + hoverStrokeOpacity: 1, + hoverStrokeWidth: 0.2, + pointRadius: 6, + hoverPointRadius: 1, + hoverPointUnit: "%", + pointerEvents: "visiblePainted", + cursor: "pointer" + }, + 'temporary': { + fillColor: "#66cccc", + fillOpacity: 0.2, + hoverFillColor: "white", + hoverFillOpacity: 0.8, + strokeColor: "#66cccc", + strokeOpacity: 1, + strokeLinecap: "round", + strokeWidth: 2, + strokeDashstyle: "solid", + hoverStrokeColor: "red", + hoverStrokeOpacity: 1, + hoverStrokeWidth: 0.2, + pointRadius: 6, + hoverPointRadius: 1, + hoverPointUnit: "%", + pointerEvents: "visiblePainted", + cursor: "inherit" + }, + 'delete': { + display: "none" + } +}; diff --git a/openlayers/lib/OpenLayers/Feature/WFS.js b/openlayers/lib/OpenLayers/Feature/WFS.js new file mode 100644 index 0000000000..7234e4fd5a --- /dev/null +++ b/openlayers/lib/OpenLayers/Feature/WFS.js @@ -0,0 +1,80 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Feature.js + */ + +/** + * Class: OpenLayers.Feature.WFS + * WFS handling class, for use as a featureClass on the WFS layer for handling + * 'point' WFS types. Good for subclassing when creating a custom WFS like + * XML application. + * + * Inherits from: + * - + */ +OpenLayers.Feature.WFS = OpenLayers.Class(OpenLayers.Feature, { + + /** + * Constructor: OpenLayers.Feature.WFS + * Create a WFS feature. + * + * Parameters: + * layer - {} + * xmlNode - {XMLNode} + */ + initialize: function(layer, xmlNode) { + var newArguments = arguments; + var data = this.processXMLNode(xmlNode); + newArguments = new Array(layer, data.lonlat, data); + OpenLayers.Feature.prototype.initialize.apply(this, newArguments); + this.createMarker(); + this.layer.addMarker(this.marker); + }, + + /** + * Method: destroy + * nullify references to prevent circular references and memory leaks + */ + destroy: function() { + if (this.marker != null) { + this.layer.removeMarker(this.marker); + } + OpenLayers.Feature.prototype.destroy.apply(this, arguments); + }, + + /** + * Method: processXMLNode + * When passed an xmlNode, parses it for a GML point, and passes + * back an object describing that point. + * + * For subclasses of Feature.WFS, this is the feature to change. + * + * Parameters: + * xmlNode - {XMLNode} + * + * Returns: + * {Object} Data Object with 'id', 'lonlat', and private properties set + */ + processXMLNode: function(xmlNode) { + //this should be overridden by subclasses + // must return an Object with 'id' and 'lonlat' values set + var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, "http://www.opengis.net/gml", "gml", "Point"); + var text = OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(point[0], "http://www.opengis.net/gml","gml", "coordinates")[0]); + var floats = text.split(","); + return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]), + parseFloat(floats[1])), + id: null}; + + }, + + CLASS_NAME: "OpenLayers.Feature.WFS" +}); + + + + + diff --git a/openlayers/lib/OpenLayers/Filter.js b/openlayers/lib/OpenLayers/Filter.js new file mode 100644 index 0000000000..f222248544 --- /dev/null +++ b/openlayers/lib/OpenLayers/Filter.js @@ -0,0 +1,69 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/BaseTypes/Class.js + * @requires OpenLayers/Util.js + * @requires OpenLayers/Style.js + */ + +/** + * Class: OpenLayers.Filter + * This class represents an OGC Filter. + */ +OpenLayers.Filter = OpenLayers.Class({ + + /** + * Constructor: OpenLayers.Filter + * This class represents a generic filter. + * + * Parameters: + * options - {Object} Optional object whose properties will be set on the + * instance. + * + * Returns: + * {} + */ + initialize: function(options) { + OpenLayers.Util.extend(this, options); + }, + + /** + * APIMethod: destroy + * Remove reference to anything added. + */ + destroy: function() { + }, + + /** + * APIMethod: evaluate + * Evaluates this filter in a specific context. Instances or subclasses + * are supposed to override this method. + * + * Parameters: + * context - {Object} Context to use in evaluating the filter. If a vector + * feature is provided, the feature.attributes will be used as context. + * + * Returns: + * {Boolean} The filter applies. + */ + evaluate: function(context) { + return true; + }, + + /** + * APIMethod: clone + * Clones this filter. Should be implementted by subclasses. + * + * Returns: + * {} Clone of this filter. + */ + clone: function() { + return null; + }, + + CLASS_NAME: "OpenLayers.Filter" +}); diff --git a/openlayers/lib/OpenLayers/Filter/Comparison.js b/openlayers/lib/OpenLayers/Filter/Comparison.js new file mode 100644 index 0000000000..a707928f0f --- /dev/null +++ b/openlayers/lib/OpenLayers/Filter/Comparison.js @@ -0,0 +1,265 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Filter.js + * @requires OpenLayers/Console.js + */ + +/** + * Class: OpenLayers.Filter.Comparison + * This class represents a comparison filter. + * + * Inherits from + * - + */ +OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { + + /** + * APIProperty: type + * {String} type: type of the comparison. This is one of + * - OpenLayers.Filter.Comparison.EQUAL_TO = "=="; + * - OpenLayers.Filter.Comparison.NOT_EQUAL_TO = "!="; + * - OpenLayers.Filter.Comparison.LESS_THAN = "<"; + * - OpenLayers.Filter.Comparison.GREATER_THAN = ">"; + * - OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO = "<="; + * - OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO = ">="; + * - OpenLayers.Filter.Comparison.BETWEEN = ".."; + * - OpenLayers.Filter.Comparison.LIKE = "~"; + */ + type: null, + + /** + * APIProperty: property + * {String} + * name of the context property to compare + */ + property: null, + + /** + * APIProperty: value + * {Number} or {String} + * comparison value for binary comparisons. In the case of a String, this + * can be a combination of text and propertyNames in the form + * "literal ${propertyName}" + */ + value: null, + + /** + * Property: matchCase + * {Boolean} Force case sensitive searches for EQUAL_TO and NOT_EQUAL_TO + * comparisons. The Filter Encoding 1.1 specification added a matchCase + * attribute to ogc:PropertyIsEqualTo and ogc:PropertyIsNotEqualTo + * elements. This property will be serialized with those elements only + * if using the v1.1.0 filter format. However, when evaluating filters + * here, the matchCase property will always be respected (for EQUAL_TO + * and NOT_EQUAL_TO). Default is true. + */ + matchCase: true, + + /** + * APIProperty: lowerBoundary + * {Number} or {String} + * lower boundary for between comparisons. In the case of a String, this + * can be a combination of text and propertyNames in the form + * "literal ${propertyName}" + */ + lowerBoundary: null, + + /** + * APIProperty: upperBoundary + * {Number} or {String} + * upper boundary for between comparisons. In the case of a String, this + * can be a combination of text and propertyNames in the form + * "literal ${propertyName}" + */ + upperBoundary: null, + + /** + * Constructor: OpenLayers.Filter.Comparison + * Creates a comparison rule. + * + * Parameters: + * options - {Object} An optional object with properties to set on the + * rule + * + * Returns: + * {} + */ + initialize: function(options) { + OpenLayers.Filter.prototype.initialize.apply(this, [options]); + // since matchCase on PropertyIsLike is not schema compliant, we only + // want to use this if explicitly asked for + if (this.type === OpenLayers.Filter.Comparison.LIKE + && options.matchCase === undefined) { + this.matchCase = null; + } + }, + + /** + * APIMethod: evaluate + * Evaluates this filter in a specific context. + * + * Parameters: + * context - {Object} Context to use in evaluating the filter. If a vector + * feature is provided, the feature.attributes will be used as context. + * + * Returns: + * {Boolean} The filter applies. + */ + evaluate: function(context) { + if (context instanceof OpenLayers.Feature.Vector) { + context = context.attributes; + } + var result = false; + var got = context[this.property]; + var exp; + switch(this.type) { + case OpenLayers.Filter.Comparison.EQUAL_TO: + exp = this.value; + if(!this.matchCase && + typeof got == "string" && typeof exp == "string") { + result = (got.toUpperCase() == exp.toUpperCase()); + } else { + result = (got == exp); + } + break; + case OpenLayers.Filter.Comparison.NOT_EQUAL_TO: + exp = this.value; + if(!this.matchCase && + typeof got == "string" && typeof exp == "string") { + result = (got.toUpperCase() != exp.toUpperCase()); + } else { + result = (got != exp); + } + break; + case OpenLayers.Filter.Comparison.LESS_THAN: + result = got < this.value; + break; + case OpenLayers.Filter.Comparison.GREATER_THAN: + result = got > this.value; + break; + case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO: + result = got <= this.value; + break; + case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO: + result = got >= this.value; + break; + case OpenLayers.Filter.Comparison.BETWEEN: + result = (got >= this.lowerBoundary) && + (got <= this.upperBoundary); + break; + case OpenLayers.Filter.Comparison.LIKE: + var regexp = new RegExp(this.value, "gi"); + result = regexp.test(got); + break; + } + return result; + }, + + /** + * APIMethod: value2regex + * Converts the value of this rule into a regular expression string, + * according to the wildcard characters specified. This method has to + * be called after instantiation of this class, if the value is not a + * regular expression already. + * + * Parameters: + * wildCard - {} wildcard character in the above value, default + * is "*" + * singleChar - {) single-character wildcard in the above value + * default is "." + * escape - {) escape character in the above value, default is + * "!" + * + * Returns: + * {String} regular expression string + */ + value2regex: function(wildCard, singleChar, escapeChar) { + if (wildCard == ".") { + var msg = "'.' is an unsupported wildCard character for "+ + "OpenLayers.Filter.Comparison"; + OpenLayers.Console.error(msg); + return null; + } + + + // set UMN MapServer defaults for unspecified parameters + wildCard = wildCard ? wildCard : "*"; + singleChar = singleChar ? singleChar : "."; + escapeChar = escapeChar ? escapeChar : "!"; + + this.value = this.value.replace( + new RegExp("\\"+escapeChar+"(.|$)", "g"), "\\$1"); + this.value = this.value.replace( + new RegExp("\\"+singleChar, "g"), "."); + this.value = this.value.replace( + new RegExp("\\"+wildCard, "g"), ".*"); + this.value = this.value.replace( + new RegExp("\\\\.\\*", "g"), "\\"+wildCard); + this.value = this.value.replace( + new RegExp("\\\\\\.", "g"), "\\"+singleChar); + + return this.value; + }, + + /** + * Method: regex2value + * Convert the value of this rule from a regular expression string into an + * ogc literal string using a wildCard of *, a singleChar of ., and an + * escape of !. Leaves the property unmodified. + * + * Returns: + * {String} A string value. + */ + regex2value: function() { + + var value = this.value; + + // replace ! with !! + value = value.replace(/!/g, "!!"); + + // replace \. with !. (watching out for \\.) + value = value.replace(/(\\)?\\\./g, function($0, $1) { + return $1 ? $0 : "!."; + }); + + // replace \* with #* (watching out for \\*) + value = value.replace(/(\\)?\\\*/g, function($0, $1) { + return $1 ? $0 : "!*"; + }); + + // replace \\ with \ + value = value.replace(/\\\\/g, "\\"); + + // convert .* to * (the sequence #.* is not allowed) + value = value.replace(/\.\*/g, "*"); + + return value; + }, + + /** + * APIMethod: clone + * Clones this filter. + * + * Returns: + * {} Clone of this filter. + */ + clone: function() { + return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison(), this); + }, + + CLASS_NAME: "OpenLayers.Filter.Comparison" +}); + + +OpenLayers.Filter.Comparison.EQUAL_TO = "=="; +OpenLayers.Filter.Comparison.NOT_EQUAL_TO = "!="; +OpenLayers.Filter.Comparison.LESS_THAN = "<"; +OpenLayers.Filter.Comparison.GREATER_THAN = ">"; +OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO = "<="; +OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO = ">="; +OpenLayers.Filter.Comparison.BETWEEN = ".."; +OpenLayers.Filter.Comparison.LIKE = "~"; diff --git a/openlayers/lib/OpenLayers/Filter/FeatureId.js b/openlayers/lib/OpenLayers/Filter/FeatureId.js new file mode 100644 index 0000000000..3c755ef216 --- /dev/null +++ b/openlayers/lib/OpenLayers/Filter/FeatureId.js @@ -0,0 +1,87 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Filter.js + */ + +/** + * Class: OpenLayers.Filter.FeatureId + * This class represents a ogc:FeatureId Filter, as being used for rule-based SLD + * styling + * + * Inherits from + * - + */ +OpenLayers.Filter.FeatureId = OpenLayers.Class(OpenLayers.Filter, { + + /** + * APIProperty: fids + * {Array(String)} Feature Ids to evaluate this rule against. To be passed + * To be passed inside the params object. + */ + fids: null, + + /** + * Property: type + * {String} Type to identify this filter. + */ + type: "FID", + + /** + * Constructor: OpenLayers.Filter.FeatureId + * Creates an ogc:FeatureId rule. + * + * Parameters: + * options - {Object} An optional object with properties to set on the + * rule + * + * Returns: + * {} + */ + initialize: function(options) { + this.fids = []; + OpenLayers.Filter.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: evaluate + * evaluates this rule for a specific feature + * + * Parameters: + * feature - {} feature to apply the rule to. + * For vector features, the check is run against the fid, + * for plain features against the id. + * + * Returns: + * {Boolean} true if the rule applies, false if it does not + */ + evaluate: function(feature) { + for (var i=0, len=this.fids.length; i} Clone of this filter. + */ + clone: function() { + var filter = new OpenLayers.Filter.FeatureId(); + OpenLayers.Util.extend(filter, this); + filter.fids = this.fids.slice(); + return filter; + }, + + CLASS_NAME: "OpenLayers.Filter.FeatureId" +}); diff --git a/openlayers/lib/OpenLayers/Filter/Function.js b/openlayers/lib/OpenLayers/Filter/Function.js new file mode 100644 index 0000000000..34cbc7c173 --- /dev/null +++ b/openlayers/lib/OpenLayers/Filter/Function.js @@ -0,0 +1,52 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Filter.js + */ + +/** + * Class: OpenLayers.Filter.Function + * This class represents a filter function. + * We are using this class for creation of complex + * filters that can contain filter functions as values. + * Nesting function as other functions parameter is supported. + * + * Inherits from + * - + */ +OpenLayers.Filter.Function = OpenLayers.Class(OpenLayers.Filter, { + + /** + * APIProperty: name + * {String} Name of the function. + */ + name: null, + + /** + * APIProperty: params + * {Array( || String || Number)} Function parameters + * For now support only other Functions, String or Number + */ + params: null, + + /** + * Constructor: OpenLayers.Filter.Function + * Creates a filter function. + * + * Parameters: + * options - {Object} An optional object with properties to set on the + * function. + * + * Returns: + * {} + */ + initialize: function(options) { + OpenLayers.Filter.prototype.initialize.apply(this, [options]); + }, + + CLASS_NAME: "OpenLayers.Filter.Function" +}); + diff --git a/openlayers/lib/OpenLayers/Filter/Logical.js b/openlayers/lib/OpenLayers/Filter/Logical.js new file mode 100644 index 0000000000..85bc845b2d --- /dev/null +++ b/openlayers/lib/OpenLayers/Filter/Logical.js @@ -0,0 +1,121 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + + +/** + * @requires OpenLayers/Filter.js + */ + +/** + * Class: OpenLayers.Filter.Logical + * This class represents ogc:And, ogc:Or and ogc:Not rules. + * + * Inherits from + * - + */ +OpenLayers.Filter.Logical = OpenLayers.Class(OpenLayers.Filter, { + + /** + * APIProperty: filters + * {Array()} Child filters for this filter. + */ + filters: null, + + /** + * APIProperty: type + * {String} type of logical operator. Available types are: + * - OpenLayers.Filter.Logical.AND = "&&"; + * - OpenLayers.Filter.Logical.OR = "||"; + * - OpenLayers.Filter.Logical.NOT = "!"; + */ + type: null, + + /** + * Constructor: OpenLayers.Filter.Logical + * Creates a logical filter (And, Or, Not). + * + * Parameters: + * options - {Object} An optional object with properties to set on the + * filter. + * + * Returns: + * {} + */ + initialize: function(options) { + this.filters = []; + OpenLayers.Filter.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: destroy + * Remove reference to child filters. + */ + destroy: function() { + this.filters = null; + OpenLayers.Filter.prototype.destroy.apply(this); + }, + + /** + * APIMethod: evaluate + * Evaluates this filter in a specific context. + * + * Parameters: + * context - {Object} Context to use in evaluating the filter. A vector + * feature may also be provided to evaluate feature attributes in + * comparison filters or geometries in spatial filters. + * + * Returns: + * {Boolean} The filter applies. + */ + evaluate: function(context) { + var i, len; + switch(this.type) { + case OpenLayers.Filter.Logical.AND: + for (i=0, len=this.filters.length; i} Clone of this filter. + */ + clone: function() { + var filters = []; + for(var i=0, len=this.filters.length; i + */ +OpenLayers.Filter.Spatial = OpenLayers.Class(OpenLayers.Filter, { + + /** + * APIProperty: type + * {String} Type of spatial filter. + * + * The type should be one of: + * - OpenLayers.Filter.Spatial.BBOX + * - OpenLayers.Filter.Spatial.INTERSECTS + * - OpenLayers.Filter.Spatial.DWITHIN + * - OpenLayers.Filter.Spatial.WITHIN + * - OpenLayers.Filter.Spatial.CONTAINS + */ + type: null, + + /** + * APIProperty: property + * {String} Name of the context property to compare. + */ + property: null, + + /** + * APIProperty: value + * { || } The bounds or geometry + * to be used by the filter. Use bounds for BBOX filters and geometry + * for INTERSECTS or DWITHIN filters. + */ + value: null, + + /** + * APIProperty: distance + * {Number} The distance to use in a DWithin spatial filter. + */ + distance: null, + + /** + * APIProperty: distanceUnits + * {String} The units to use for the distance, e.g. 'm'. + */ + distanceUnits: null, + + /** + * Constructor: OpenLayers.Filter.Spatial + * Creates a spatial filter. + * + * Parameters: + * options - {Object} An optional object with properties to set on the + * filter. + * + * Returns: + * {} + */ + initialize: function(options) { + OpenLayers.Filter.prototype.initialize.apply(this, [options]); + }, + + /** + * Method: evaluate + * Evaluates this filter for a specific feature. + * + * Parameters: + * feature - {} feature to apply the filter to. + * + * Returns: + * {Boolean} The feature meets filter criteria. + */ + evaluate: function(feature) { + var intersect = false; + switch(this.type) { + case OpenLayers.Filter.Spatial.BBOX: + case OpenLayers.Filter.Spatial.INTERSECTS: + if(feature.geometry) { + var geom = this.value; + if(this.value.CLASS_NAME == "OpenLayers.Bounds") { + geom = this.value.toGeometry(); + } + if(feature.geometry.intersects(geom)) { + intersect = true; + } + } + break; + default: + OpenLayers.Console.error( + OpenLayers.i18n("filterEvaluateNotImplemented")); + break; + } + return intersect; + }, + + /** + * APIMethod: clone + * Clones this filter. + * + * Returns: + * {} Clone of this filter. + */ + clone: function() { + var options = OpenLayers.Util.applyDefaults({ + value: this.value && this.value.clone && this.value.clone() + }, this); + return new OpenLayers.Filter.Spatial(options); + }, + CLASS_NAME: "OpenLayers.Filter.Spatial" +}); + +OpenLayers.Filter.Spatial.BBOX = "BBOX"; +OpenLayers.Filter.Spatial.INTERSECTS = "INTERSECTS"; +OpenLayers.Filter.Spatial.DWITHIN = "DWITHIN"; +OpenLayers.Filter.Spatial.WITHIN = "WITHIN"; +OpenLayers.Filter.Spatial.CONTAINS = "CONTAINS"; diff --git a/openlayers/lib/OpenLayers/Format.js b/openlayers/lib/OpenLayers/Format.js new file mode 100644 index 0000000000..514e8dfba0 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format.js @@ -0,0 +1,125 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/BaseTypes/Class.js + * @requires OpenLayers/Util.js + * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js + */ + +/** + * Class: OpenLayers.Format + * Base class for format reading/writing a variety of formats. Subclasses + * of OpenLayers.Format are expected to have read and write methods. + */ +OpenLayers.Format = OpenLayers.Class({ + + /** + * Property: options + * {Object} A reference to options passed to the constructor. + */ + options: null, + + /** + * APIProperty: externalProjection + * {} When passed a externalProjection and + * internalProjection, the format will reproject the geometries it + * reads or writes. The externalProjection is the projection used by + * the content which is passed into read or which comes out of write. + * In order to reproject, a projection transformation function for the + * specified projections must be available. This support may be + * provided via proj4js or via a custom transformation function. See + * {} for more information on + * custom transformations. + */ + externalProjection: null, + + /** + * APIProperty: internalProjection + * {} When passed a externalProjection and + * internalProjection, the format will reproject the geometries it + * reads or writes. The internalProjection is the projection used by + * the geometries which are returned by read or which are passed into + * write. In order to reproject, a projection transformation function + * for the specified projections must be available. This support may be + * provided via proj4js or via a custom transformation function. See + * {} for more information on + * custom transformations. + */ + internalProjection: null, + + /** + * APIProperty: data + * {Object} When is true, this is the parsed string sent to + * . + */ + data: null, + + /** + * APIProperty: keepData + * {Object} Maintain a reference () to the most recently read data. + * Default is false. + */ + keepData: false, + + /** + * Constructor: OpenLayers.Format + * Instances of this class are not useful. See one of the subclasses. + * + * Parameters: + * options - {Object} An optional object with properties to set on the + * format + * + * Valid options: + * keepData - {Boolean} If true, upon , the data property will be + * set to the parsed object (e.g. the json or xml object). + * + * Returns: + * An instance of OpenLayers.Format + */ + initialize: function(options) { + OpenLayers.Util.extend(this, options); + this.options = options; + }, + + /** + * APIMethod: destroy + * Clean up. + */ + destroy: function() { + }, + + /** + * Method: read + * Read data from a string, and return an object whose type depends on the + * subclass. + * + * Parameters: + * data - {string} Data to read/parse. + * + * Returns: + * Depends on the subclass + */ + read: function(data) { + OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented")); + }, + + /** + * Method: write + * Accept an object, and return a string. + * + * Parameters: + * object - {Object} Object to be serialized + * + * Returns: + * {String} A string representation of the object. + */ + write: function(object) { + OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented")); + }, + + CLASS_NAME: "OpenLayers.Format" +}); diff --git a/openlayers/lib/OpenLayers/Format/ArcXML.js b/openlayers/lib/OpenLayers/Format/ArcXML.js new file mode 100644 index 0000000000..bd27eab284 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/ArcXML.js @@ -0,0 +1,1028 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Geometry/Polygon.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/MultiPolygon.js + * @requires OpenLayers/Geometry/LinearRing.js + */ + +/** + * Class: OpenLayers.Format.ArcXML + * Read/Wite ArcXML. Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * Property: fontStyleKeys + * {Array} List of keys used in font styling. + */ + fontStyleKeys: [ + 'antialiasing', 'blockout', 'font', 'fontcolor','fontsize', 'fontstyle', + 'glowing', 'interval', 'outline', 'printmode', 'shadow', 'transparency' + ], + + /** + * Property: request + * A get_image request destined for an ArcIMS server. + */ + request: null, + + /** + * Property: response + * A parsed response from an ArcIMS server. + */ + response: null, + + /** + * Constructor: OpenLayers.Format.ArcXML + * Create a new parser/writer for ArcXML. Create an instance of this class + * to begin authoring a request to an ArcIMS service. This is used + * primarily by the ArcIMS layer, but could be used to do other wild + * stuff, like geocoding. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + this.request = new OpenLayers.Format.ArcXML.Request(); + this.response = new OpenLayers.Format.ArcXML.Response(); + + if (options) { + if (options.requesttype == "feature") { + this.request.get_image = null; + + var qry = this.request.get_feature.query; + this.addCoordSys(qry.featurecoordsys, options.featureCoordSys); + this.addCoordSys(qry.filtercoordsys, options.filterCoordSys); + + if (options.polygon) { + qry.isspatial = true; + qry.spatialfilter.polygon = options.polygon; + } else if (options.envelope) { + qry.isspatial = true; + qry.spatialfilter.envelope = {minx:0, miny:0, maxx:0, maxy:0}; + this.parseEnvelope(qry.spatialfilter.envelope, options.envelope); + } + } else if (options.requesttype == "image") { + this.request.get_feature = null; + + var props = this.request.get_image.properties; + this.parseEnvelope(props.envelope, options.envelope); + + this.addLayers(props.layerlist, options.layers); + this.addImageSize(props.imagesize, options.tileSize); + this.addCoordSys(props.featurecoordsys, options.featureCoordSys); + this.addCoordSys(props.filtercoordsys, options.filterCoordSys); + } else { + // if an arcxml object is being created with no request type, it is + // probably going to consume a response, so do not throw an error if + // the requesttype is not defined + this.request = null; + } + } + + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + }, + + /** + * Method: parseEnvelope + * Parse an array of coordinates into an ArcXML envelope structure. + * + * Parameters: + * env - {Object} An envelope object that will contain the parsed coordinates. + * arr - {Array(double)} An array of coordinates in the order: [ minx, miny, maxx, maxy ] + */ + parseEnvelope: function(env, arr) { + if (arr && arr.length == 4) { + env.minx = arr[0]; + env.miny = arr[1]; + env.maxx = arr[2]; + env.maxy = arr[3]; + } + }, + + /** + * Method: addLayers + * Add a collection of layers to another collection of layers. Each layer in the list is tuple of + * { id, visible }. These layer collections represent the + * /ARCXML/REQUEST/get_image/PROPERTIES/LAYERLIST/LAYERDEF items in ArcXML + * + * TODO: Add support for dynamic layer rendering. + * + * Parameters: + * ll - {Array({id,visible})} A list of layer definitions. + * lyrs - {Array({id,visible})} A list of layer definitions. + */ + addLayers: function(ll, lyrs) { + for(var lind = 0, len=lyrs.length; lind < len; lind++) { + ll.push(lyrs[lind]); + } + }, + + /** + * Method: addImageSize + * Set the size of the requested image. + * + * Parameters: + * imsize - {Object} An ArcXML imagesize object. + * olsize - {OpenLayers.Size} The image size to set. + */ + addImageSize: function(imsize, olsize) { + if (olsize !== null) { + imsize.width = olsize.w; + imsize.height = olsize.h; + imsize.printwidth = olsize.w; + imsize.printheight = olsize.h; + } + }, + + /** + * Method: addCoordSys + * Add the coordinate system information to an object. The object may be + * + * Parameters: + * featOrFilt - {Object} A featurecoordsys or filtercoordsys ArcXML structure. + * fsys - {String} or {OpenLayers.Projection} or {filtercoordsys} or + * {featurecoordsys} A projection representation. If it's a {String}, + * the value is assumed to be the SRID. If it's a {OpenLayers.Projection} + * AND Proj4js is available, the projection number and name are extracted + * from there. If it's a filter or feature ArcXML structure, it is copied. + */ + addCoordSys: function(featOrFilt, fsys) { + if (typeof fsys == "string") { + featOrFilt.id = parseInt(fsys); + featOrFilt.string = fsys; + } + // is this a proj4js instance? + else if (typeof fsys == "object" && fsys.proj !== null){ + featOrFilt.id = fsys.proj.srsProjNumber; + featOrFilt.string = fsys.proj.srsCode; + } else { + featOrFilt = fsys; + } + }, + + /** + * APIMethod: iserror + * Check to see if the response from the server was an error. + * + * Parameters: + * data - {String} or {DOMElement} data to read/parse. If nothing is supplied, + * the current response is examined. + * + * Returns: + * {Boolean} true if the response was an error. + */ + iserror: function(data) { + var ret = null; + + if (!data) { + ret = (this.response.error !== ''); + } else { + data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); + var errorNodes = data.documentElement.getElementsByTagName("ERROR"); + ret = (errorNodes !== null && errorNodes.length > 0); + } + + return ret; + }, + + /** + * APIMethod: read + * Read data from a string, and return an response. + * + * Parameters: + * data - {String} or {DOMElement} data to read/parse. + * + * Returns: + * {OpenLayers.Format.ArcXML.Response} An ArcXML response. Note that this response + * data may change in the future. + */ + read: function(data) { + if(typeof data == "string") { + data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); + } + + var arcNode = null; + if (data && data.documentElement) { + if(data.documentElement.nodeName == "ARCXML") { + arcNode = data.documentElement; + } else { + arcNode = data.documentElement.getElementsByTagName("ARCXML")[0]; + } + } + + // in Safari, arcNode will be there but will have a child named + // parsererror + if (!arcNode || arcNode.firstChild.nodeName === 'parsererror') { + var error, source; + try { + error = data.firstChild.nodeValue; + source = data.firstChild.childNodes[1].firstChild.nodeValue; + } catch (err) { + // pass + } + throw { + message: "Error parsing the ArcXML request", + error: error, + source: source + }; + } + + var response = this.parseResponse(arcNode); + return response; + }, + + /** + * APIMethod: write + * Generate an ArcXml document string for sending to an ArcIMS server. + * + * Returns: + * {String} A string representing the ArcXML document request. + */ + write: function(request) { + if (!request) { + request = this.request; + } + var root = this.createElementNS("", "ARCXML"); + root.setAttribute("version","1.1"); + + var reqElem = this.createElementNS("", "REQUEST"); + + if (request.get_image != null) { + var getElem = this.createElementNS("", "GET_IMAGE"); + reqElem.appendChild(getElem); + + var propElem = this.createElementNS("", "PROPERTIES"); + getElem.appendChild(propElem); + + var props = request.get_image.properties; + if (props.featurecoordsys != null) { + var feat = this.createElementNS("", "FEATURECOORDSYS"); + propElem.appendChild(feat); + + if (props.featurecoordsys.id === 0) { + feat.setAttribute("string", props.featurecoordsys['string']); + } + else { + feat.setAttribute("id", props.featurecoordsys.id); + } + } + + if (props.filtercoordsys != null) { + var filt = this.createElementNS("", "FILTERCOORDSYS"); + propElem.appendChild(filt); + + if (props.filtercoordsys.id === 0) { + filt.setAttribute("string", props.filtercoordsys.string); + } + else { + filt.setAttribute("id", props.filtercoordsys.id); + } + } + + if (props.envelope != null) { + var env = this.createElementNS("", "ENVELOPE"); + propElem.appendChild(env); + + env.setAttribute("minx", props.envelope.minx); + env.setAttribute("miny", props.envelope.miny); + env.setAttribute("maxx", props.envelope.maxx); + env.setAttribute("maxy", props.envelope.maxy); + } + + var imagesz = this.createElementNS("", "IMAGESIZE"); + propElem.appendChild(imagesz); + + imagesz.setAttribute("height", props.imagesize.height); + imagesz.setAttribute("width", props.imagesize.width); + + if (props.imagesize.height != props.imagesize.printheight || + props.imagesize.width != props.imagesize.printwidth) { + imagesz.setAttribute("printheight", props.imagesize.printheight); + imagesz.setArrtibute("printwidth", props.imagesize.printwidth); + } + + if (props.background != null) { + var backgrnd = this.createElementNS("", "BACKGROUND"); + propElem.appendChild(backgrnd); + + backgrnd.setAttribute("color", + props.background.color.r + "," + + props.background.color.g + "," + + props.background.color.b); + + if (props.background.transcolor !== null) { + backgrnd.setAttribute("transcolor", + props.background.transcolor.r + "," + + props.background.transcolor.g + "," + + props.background.transcolor.b); + } + } + + if (props.layerlist != null && props.layerlist.length > 0) { + var layerlst = this.createElementNS("", "LAYERLIST"); + propElem.appendChild(layerlst); + + for (var ld = 0; ld < props.layerlist.length; ld++) { + var ldef = this.createElementNS("", "LAYERDEF"); + layerlst.appendChild(ldef); + + ldef.setAttribute("id", props.layerlist[ld].id); + ldef.setAttribute("visible", props.layerlist[ld].visible); + + if (typeof props.layerlist[ld].query == "object") { + var query = props.layerlist[ld].query; + + if (query.where.length < 0) { + continue; + } + + var queryElem = null; + if (typeof query.spatialfilter == "boolean" && query.spatialfilter) { + // handle spatial filter madness + queryElem = this.createElementNS("", "SPATIALQUERY"); + } + else { + queryElem = this.createElementNS("", "QUERY"); + } + + queryElem.setAttribute("where", query.where); + + if (typeof query.accuracy == "number" && query.accuracy > 0) { + queryElem.setAttribute("accuracy", query.accuracy); + } + if (typeof query.featurelimit == "number" && query.featurelimit < 2000) { + queryElem.setAttribute("featurelimit", query.featurelimit); + } + if (typeof query.subfields == "string" && query.subfields != "#ALL#") { + queryElem.setAttribute("subfields", query.subfields); + } + if (typeof query.joinexpression == "string" && query.joinexpression.length > 0) { + queryElem.setAttribute("joinexpression", query.joinexpression); + } + if (typeof query.jointables == "string" && query.jointables.length > 0) { + queryElem.setAttribute("jointables", query.jointables); + } + + ldef.appendChild(queryElem); + } + + if (typeof props.layerlist[ld].renderer == "object") { + this.addRenderer(ldef, props.layerlist[ld].renderer); + } + } + } + } else if (request.get_feature != null) { + var getElem = this.createElementNS("", "GET_FEATURES"); + getElem.setAttribute("outputmode", "newxml"); + getElem.setAttribute("checkesc", "true"); + + if (request.get_feature.geometry) { + getElem.setAttribute("geometry", request.get_feature.geometry); + } + else { + getElem.setAttribute("geometry", "false"); + } + + if (request.get_feature.compact) { + getElem.setAttribute("compact", request.get_feature.compact); + } + + if (request.get_feature.featurelimit == "number") { + getElem.setAttribute("featurelimit", request.get_feature.featurelimit); + } + + getElem.setAttribute("globalenvelope", "true"); + reqElem.appendChild(getElem); + + if (request.get_feature.layer != null && request.get_feature.layer.length > 0) { + var lyrElem = this.createElementNS("", "LAYER"); + lyrElem.setAttribute("id", request.get_feature.layer); + getElem.appendChild(lyrElem); + } + + var fquery = request.get_feature.query; + if (fquery != null) { + var qElem = null; + if (fquery.isspatial) { + qElem = this.createElementNS("", "SPATIALQUERY"); + } else { + qElem = this.createElementNS("", "QUERY"); + } + getElem.appendChild(qElem); + + if (typeof fquery.accuracy == "number") { + qElem.setAttribute("accuracy", fquery.accuracy); + } + //qElem.setAttribute("featurelimit", "5"); + + if (fquery.featurecoordsys != null) { + var fcsElem1 = this.createElementNS("", "FEATURECOORDSYS"); + + if (fquery.featurecoordsys.id == 0) { + fcsElem1.setAttribute("string", fquery.featurecoordsys.string); + } else { + fcsElem1.setAttribute("id", fquery.featurecoordsys.id); + } + qElem.appendChild(fcsElem1); + } + + if (fquery.filtercoordsys != null) { + var fcsElem2 = this.createElementNS("", "FILTERCOORDSYS"); + + if (fquery.filtercoordsys.id === 0) { + fcsElem2.setAttribute("string", fquery.filtercoordsys.string); + } else { + fcsElem2.setAttribute("id", fquery.filtercoordsys.id); + } + qElem.appendChild(fcsElem2); + } + + if (fquery.buffer > 0) { + var bufElem = this.createElementNS("", "BUFFER"); + bufElem.setAttribute("distance", fquery.buffer); + qElem.appendChild(bufElem); + } + + if (fquery.isspatial) { + var spfElem = this.createElementNS("", "SPATIALFILTER"); + spfElem.setAttribute("relation", fquery.spatialfilter.relation); + qElem.appendChild(spfElem); + + if (fquery.spatialfilter.envelope) { + var envElem = this.createElementNS("", "ENVELOPE"); + envElem.setAttribute("minx", fquery.spatialfilter.envelope.minx); + envElem.setAttribute("miny", fquery.spatialfilter.envelope.miny); + envElem.setAttribute("maxx", fquery.spatialfilter.envelope.maxx); + envElem.setAttribute("maxy", fquery.spatialfilter.envelope.maxy); + spfElem.appendChild(envElem); + } else if(typeof fquery.spatialfilter.polygon == "object") { + spfElem.appendChild(this.writePolygonGeometry(fquery.spatialfilter.polygon)); + } + } + + if (fquery.where != null && fquery.where.length > 0) { + qElem.setAttribute("where", fquery.where); + } + } + } + + root.appendChild(reqElem); + + return OpenLayers.Format.XML.prototype.write.apply(this, [root]); + }, + + + addGroupRenderer: function(ldef, toprenderer) { + var topRelem = this.createElementNS("", "GROUPRENDERER"); + ldef.appendChild(topRelem); + + for (var rind = 0; rind < toprenderer.length; rind++) { + var renderer = toprenderer[rind]; + this.addRenderer(topRelem, renderer); + } + }, + + + addRenderer: function(topRelem, renderer) { + if (OpenLayers.Util.isArray(renderer)) { + this.addGroupRenderer(topRelem, renderer); + } else { + var renderElem = this.createElementNS("", renderer.type.toUpperCase() + "RENDERER"); + topRelem.appendChild(renderElem); + + if (renderElem.tagName == "VALUEMAPRENDERER") { + this.addValueMapRenderer(renderElem, renderer); + } else if (renderElem.tagName == "VALUEMAPLABELRENDERER") { + this.addValueMapLabelRenderer(renderElem, renderer); + } else if (renderElem.tagName == "SIMPLELABELRENDERER") { + this.addSimpleLabelRenderer(renderElem, renderer); + } else if (renderElem.tagName == "SCALEDEPENDENTRENDERER") { + this.addScaleDependentRenderer(renderElem, renderer); + } + } + }, + + + addScaleDependentRenderer: function(renderElem, renderer) { + if (typeof renderer.lower == "string" || typeof renderer.lower == "number") { + renderElem.setAttribute("lower", renderer.lower); + } + if (typeof renderer.upper == "string" || typeof renderer.upper == "number") { + renderElem.setAttribute("upper", renderer.upper); + } + + this.addRenderer(renderElem, renderer.renderer); + }, + + + addValueMapLabelRenderer: function(renderElem, renderer) { + renderElem.setAttribute("lookupfield", renderer.lookupfield); + renderElem.setAttribute("labelfield", renderer.labelfield); + + if (typeof renderer.exacts == "object") { + for (var ext=0, extlen=renderer.exacts.length; ext 0) { + response.error = this.getChildValue(errorNode, "Unknown error."); + } else { + var responseNode = data.getElementsByTagName("RESPONSE"); + + if (responseNode == null || responseNode.length == 0) { + response.error = "No RESPONSE tag found in ArcXML response."; + return response; + } + + var rtype = responseNode[0].firstChild.nodeName; + if (rtype == "#text") { + rtype = responseNode[0].firstChild.nextSibling.nodeName; + } + + if (rtype == "IMAGE") { + var envelopeNode = data.getElementsByTagName("ENVELOPE"); + var outputNode = data.getElementsByTagName("OUTPUT"); + + if (envelopeNode == null || envelopeNode.length == 0) { + response.error = "No ENVELOPE tag found in ArcXML response."; + } else if (outputNode == null || outputNode.length == 0) { + response.error = "No OUTPUT tag found in ArcXML response."; + } else { + var envAttr = this.parseAttributes(envelopeNode[0]); + var outputAttr = this.parseAttributes(outputNode[0]); + + if (typeof outputAttr.type == "string") { + response.image = { + envelope: envAttr, + output: { + type: outputAttr.type, + data: this.getChildValue(outputNode[0]) + } + }; + } else { + response.image = { envelope: envAttr, output: outputAttr }; + } + } + } else if (rtype == "FEATURES") { + var features = responseNode[0].getElementsByTagName("FEATURES"); + + // get the feature count + var featureCount = features[0].getElementsByTagName("FEATURECOUNT"); + response.features.featurecount = featureCount[0].getAttribute("count"); + + if (response.features.featurecount > 0) { + // get the feature envelope + var envelope = features[0].getElementsByTagName("ENVELOPE"); + response.features.envelope = this.parseAttributes(envelope[0], typeof(0)); + + // get the field values per feature + var featureList = features[0].getElementsByTagName("FEATURE"); + for (var fn = 0; fn < featureList.length; fn++) { + var feature = new OpenLayers.Feature.Vector(); + var fields = featureList[fn].getElementsByTagName("FIELD"); + + for (var fdn = 0; fdn < fields.length; fdn++) { + var fieldName = fields[fdn].getAttribute("name"); + var fieldValue = fields[fdn].getAttribute("value"); + feature.attributes[ fieldName ] = fieldValue; + } + + var geom = featureList[fn].getElementsByTagName("POLYGON"); + + if (geom.length > 0) { + // if there is a polygon, create an openlayers polygon, and assign + // it to the .geometry property of the feature + var ring = geom[0].getElementsByTagName("RING"); + + var polys = []; + for (var rn = 0; rn < ring.length; rn++) { + var linearRings = []; + linearRings.push(this.parsePointGeometry(ring[rn])); + + var holes = ring[rn].getElementsByTagName("HOLE"); + for (var hn = 0; hn < holes.length; hn++) { + linearRings.push(this.parsePointGeometry(holes[hn])); + } + holes = null; + polys.push(new OpenLayers.Geometry.Polygon(linearRings)); + linearRings = null; + } + ring = null; + + if (polys.length == 1) { + feature.geometry = polys[0]; + } else + { + feature.geometry = new OpenLayers.Geometry.MultiPolygon(polys); + } + } + + response.features.feature.push(feature); + } + } + } else { + response.error = "Unidentified response type."; + } + } + return response; + }, + + + /** + * Method: parseAttributes + * + * Parameters: + * node - {} An element to parse attributes from. + * + * Returns: + * {Object} An attributes object, with properties set to attribute values. + */ + parseAttributes: function(node,type) { + var attributes = {}; + for(var attr = 0; attr < node.attributes.length; attr++) { + if (type == "number") { + attributes[node.attributes[attr].nodeName] = parseFloat(node.attributes[attr].nodeValue); + } else { + attributes[node.attributes[attr].nodeName] = node.attributes[attr].nodeValue; + } + } + return attributes; + }, + + + /** + * Method: parsePointGeometry + * + * Parameters: + * node - {} An element to parse or arcxml data from. + * + * Returns: + * {OpenLayers.Geometry.LinearRing} A linear ring represented by the node's points. + */ + parsePointGeometry: function(node) { + var ringPoints = []; + var coords = node.getElementsByTagName("COORDS"); + + if (coords.length > 0) { + // if coords is present, it's the only coords item + var coordArr = this.getChildValue(coords[0]); + coordArr = coordArr.split(/;/); + for (var cn = 0; cn < coordArr.length; cn++) { + var coordItems = coordArr[cn].split(/ /); + ringPoints.push(new OpenLayers.Geometry.Point(parseFloat(coordItems[0]), parseFloat(coordItems[1]))); + } + coords = null; + } else { + var point = node.getElementsByTagName("POINT"); + if (point.length > 0) { + for (var pn = 0; pn < point.length; pn++) { + ringPoints.push( + new OpenLayers.Geometry.Point( + parseFloat(point[pn].getAttribute("x")), + parseFloat(point[pn].getAttribute("y")) + ) + ); + } + } + point = null; + } + + return new OpenLayers.Geometry.LinearRing(ringPoints); + }, + + CLASS_NAME: "OpenLayers.Format.ArcXML" +}); + +OpenLayers.Format.ArcXML.Request = OpenLayers.Class({ + initialize: function(params) { + var defaults = { + get_image: { + properties: { + background: null, + /*{ + color: { r:255, g:255, b:255 }, + transcolor: null + },*/ + draw: true, + envelope: { + minx: 0, + miny: 0, + maxx: 0, + maxy: 0 + }, + featurecoordsys: { + id:0, + string:"", + datumtransformid:0, + datumtransformstring:"" + }, + filtercoordsys:{ + id:0, + string:"", + datumtransformid:0, + datumtransformstring:"" + }, + imagesize:{ + height:0, + width:0, + dpi:96, + printheight:0, + printwidth:0, + scalesymbols:false + }, + layerlist:[], + /* no support for legends */ + output:{ + baseurl:"", + legendbaseurl:"", + legendname:"", + legendpath:"", + legendurl:"", + name:"", + path:"", + type:"jpg", + url:"" + } + } + }, + + get_feature: { + layer: "", + query: { + isspatial: false, + featurecoordsys: { + id:0, + string:"", + datumtransformid:0, + datumtransformstring:"" + }, + filtercoordsys: { + id:0, + string:"", + datumtransformid:0, + datumtransformstring:"" + }, + buffer:0, + where:"", + spatialfilter: { + relation: "envelope_intersection", + envelope: null + } + } + }, + + environment: { + separators: { + cs:" ", + ts:";" + } + }, + + layer: [], + workspaces: [] + }; + + return OpenLayers.Util.extend(this, defaults); + }, + + CLASS_NAME: "OpenLayers.Format.ArcXML.Request" +}); + +OpenLayers.Format.ArcXML.Response = OpenLayers.Class({ + initialize: function(params) { + var defaults = { + image: { + envelope:null, + output:'' + }, + + features: { + featurecount: 0, + envelope: null, + feature: [] + }, + + error:'' + }; + + return OpenLayers.Util.extend(this, defaults); + }, + + CLASS_NAME: "OpenLayers.Format.ArcXML.Response" +}); diff --git a/openlayers/lib/OpenLayers/Format/ArcXML/Features.js b/openlayers/lib/OpenLayers/Format/ArcXML/Features.js new file mode 100644 index 0000000000..831b72e757 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/ArcXML/Features.js @@ -0,0 +1,49 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/ArcXML.js + */ + +/** + * Class: OpenLayers.Format.ArcXML.Features + * Read/Wite ArcXML features. Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.ArcXML.Features = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * Constructor: OpenLayers.Format.ArcXML.Features + * Create a new parser/writer for ArcXML Features. Create an instance of this class + * to get a set of features from an ArcXML response. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: read + * Read data from a string of ArcXML, and return a set of OpenLayers features. + * + * Parameters: + * data - {String} or {DOMElement} data to read/parse. + * + * Returns: + * {Array()} A collection of features. + */ + read: function(data) { + var axl = new OpenLayers.Format.ArcXML(); + var parsed = axl.read(data); + + return parsed.features.feature; + } +}); diff --git a/openlayers/lib/OpenLayers/Format/Atom.js b/openlayers/lib/OpenLayers/Format/Atom.js new file mode 100644 index 0000000000..9dec3036c3 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/Atom.js @@ -0,0 +1,724 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Format/GML/v3.js + * @requires OpenLayers/Feature/Vector.js + */ + +/** + * Class: OpenLayers.Format.Atom + * Read/write Atom feeds. Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * Property: namespaces + * {Object} Mapping of namespace aliases to namespace URIs. Properties + * of this object should not be set individually. Read-only. All + * XML subclasses should have their own namespaces object. Use + * to add or set a namespace alias after construction. + */ + namespaces: { + atom: "http://www.w3.org/2005/Atom", + georss: "http://www.georss.org/georss" + }, + + /** + * APIProperty: feedTitle + * {String} Atom feed elements require a title. Default is "untitled". + */ + feedTitle: "untitled", + + /** + * APIProperty: defaultEntryTitle + * {String} Atom entry elements require a title. In cases where one is + * not provided in the feature attributes, this will be used. Default + * is "untitled". + */ + defaultEntryTitle: "untitled", + + /** + * Property: gmlParse + * {Object} GML Format object for parsing features + * Non-API and only created if necessary + */ + gmlParser: null, + + /** + * APIProperty: xy + * {Boolean} Order of the GML coordinate: true:(x,y) or false:(y,x) + * For GeoRSS the default is (y,x), therefore: false + */ + xy: false, + + /** + * Constructor: OpenLayers.Format.AtomEntry + * Create a new parser for Atom. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + + /** + * APIMethod: read + * Return a list of features from an Atom feed or entry document. + + * Parameters: + * doc - {Element} or {String} + * + * Returns: + * An Array of s + */ + read: function(doc) { + if (typeof doc == "string") { + doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]); + } + return this.parseFeatures(doc); + }, + + /** + * APIMethod: write + * Serialize or more feature nodes to Atom documents. + * + * Parameters: + * features - a single {} or an + * Array({}). + * + * Returns: + * {String} an Atom entry document if passed one feature node, or a feed + * document if passed an array of feature nodes. + */ + write: function(features) { + var doc; + if (OpenLayers.Util.isArray(features)) { + doc = this.createElementNSPlus("atom:feed"); + doc.appendChild( + this.createElementNSPlus("atom:title", { + value: this.feedTitle + }) + ); + for (var i=0, ii=features.length; i} + * + * Returns: + * {DOMElement} an Atom entry node. + * + * These entries are geared for publication using AtomPub. + * + * TODO: support extension elements + */ + buildEntryNode: function(feature) { + var attrib = feature.attributes; + var atomAttrib = attrib.atom || {}; + var entryNode = this.createElementNSPlus("atom:entry"); + + // atom:author + if (atomAttrib.authors) { + var authors = OpenLayers.Util.isArray(atomAttrib.authors) ? + atomAttrib.authors : [atomAttrib.authors]; + for (var i=0, ii=authors.length; i} + * + * Returns: + * {DOMElement} A gml node. + */ + buildGeometryNode: function(geometry) { + if (!this.gmlParser) { + this.initGmlParser(); + } + var node = this.gmlParser.writeNode("feature:_geometry", geometry); + return node.firstChild; + }, + + /** + * Method: buildPersonConstructNode + * + * Parameters: + * name - {String} + * value - {Object} + * + * Returns: + * {DOMElement} an Atom person construct node. + * + * Example: + * >>> buildPersonConstructNode("author", {name: "John Smith"}) + * {John Smith} + * + * TODO: how to specify extension elements? Add to the oNames array? + */ + buildPersonConstructNode: function(name, value) { + var oNames = ["uri", "email"]; + var personNode = this.createElementNSPlus("atom:" + name); + personNode.appendChild( + this.createElementNSPlus("atom:name", { + value: value.name + }) + ); + for (var i=0, ii=oNames.length; i 0) { + value = this.getChildValue(nodes[0], def); + } else { + value = def; + } + return value; + }, + + /** + * Method: parseFeature + * Parse feature from an Atom entry node.. + * + * Parameters: + * node - {DOMElement} An Atom entry or feed node. + * + * Returns: + * An . + */ + parseFeature: function(node) { + var atomAttrib = {}; + var value = null; + var nodes = null; + var attval = null; + var atomns = this.namespaces.atom; + + // atomAuthor* + this.parsePersonConstructs(node, "author", atomAttrib); + + // atomCategory* + nodes = this.getElementsByTagNameNS(node, atomns, "category"); + if (nodes.length > 0) { + atomAttrib.categories = []; + } + for (var i=0, ii=nodes.length; i 0) { + value = {}; + attval = nodes[0].getAttribute("type"); + if (attval) { + value.type = attval; + } + attval = nodes[0].getAttribute("src"); + if (attval) { + value.src = attval; + } else { + if (value.type == "text" || + value.type == "html" || + value.type == null ) { + value.value = this.getFirstChildValue( + node, + atomns, + "content", + null + ); + } else if (value.type == "xhtml" || + value.type.match(/(\+|\/)xml$/)) { + value.value = this.getChildEl(nodes[0]); + } else { // MUST be base64 encoded + value.value = this.getFirstChildValue( + node, + atomns, + "content", + null + ); + } + atomAttrib.content = value; + } + } + + // atomContributor* + this.parsePersonConstructs(node, "contributor", atomAttrib); + + // atomId + atomAttrib.id = this.getFirstChildValue(node, atomns, "id", null); + + // atomLink* + nodes = this.getElementsByTagNameNS(node, atomns, "link"); + if (nodes.length > 0) { + atomAttrib.links = new Array(nodes.length); + } + var oAtts = ["rel", "type", "hreflang", "title", "length"]; + for (var i=0, ii=nodes.length; is. + */ + parseFeatures: function(node) { + var features = []; + var entries = this.getElementsByTagNameNS( + node, this.namespaces.atom, "entry" + ); + if (entries.length == 0) { + entries = [node]; + } + for (var i=0, ii=entries.length; is. + */ + parseLocations: function(node) { + var georssns = this.namespaces.georss; + + var locations = {components: []}; + var where = this.getElementsByTagNameNS(node, georssns, "where"); + if (where && where.length > 0) { + if (!this.gmlParser) { + this.initGmlParser(); + } + for (var i=0, ii=where.length; i 0) { + for (var i=0, ii=point.length; i 0) { + var coords; + var p; + var points; + for (var i=0, ii=line.length; i 0) { + var coords; + var p; + var points; + for (var i=0, ii=polygon.length; i 0) { + data[name + "s"] = persons; + } + }, + + CLASS_NAME: "OpenLayers.Format.Atom" +}); diff --git a/openlayers/lib/OpenLayers/Format/CQL.js b/openlayers/lib/OpenLayers/Format/CQL.js new file mode 100644 index 0000000000..e030eb496b --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/CQL.js @@ -0,0 +1,438 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/WKT.js + */ + +/** + * Class: OpenLayers.Format.CQL + * Read CQL strings to get objects. Write + * objects to get CQL strings. Create a new parser with + * the constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.CQL = (function() { + + var tokens = [ + "PROPERTY", "COMPARISON", "VALUE", "LOGICAL" + ], + + patterns = { + PROPERTY: /^[_a-zA-Z]\w*/, + COMPARISON: /^(=|<>|<=|<|>=|>|LIKE)/i, + COMMA: /^,/, + LOGICAL: /^(AND|OR)/i, + VALUE: /^('\w+'|\d+(\.\d*)?|\.\d+)/, + LPAREN: /^\(/, + RPAREN: /^\)/, + SPATIAL: /^(BBOX|INTERSECTS|DWITHIN|WITHIN|CONTAINS)/i, + NOT: /^NOT/i, + BETWEEN: /^BETWEEN/i, + GEOMETRY: function(text) { + var type = /^(POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)/.exec(text); + if (type) { + var len = text.length; + var idx = text.indexOf("(", type[0].length); + if (idx > -1) { + var depth = 1; + while (idx < len && depth > 0) { + idx++; + switch(text.charAt(idx)) { + case '(': + depth++; + break; + case ')': + depth--; + break; + default: + // in default case, do nothing + } + } + } + return [text.substr(0, idx+1)]; + } + }, + END: /^$/ + }, + + follows = { + LPAREN: ['GEOMETRY', 'SPATIAL', 'PROPERTY', 'VALUE', 'LPAREN'], + RPAREN: ['NOT', 'LOGICAL', 'END', 'RPAREN'], + PROPERTY: ['COMPARISON', 'BETWEEN', 'COMMA'], + BETWEEN: ['VALUE'], + COMPARISON: ['VALUE'], + COMMA: ['GEOMETRY', 'VALUE', 'PROPERTY'], + VALUE: ['LOGICAL', 'COMMA', 'RPAREN', 'END'], + SPATIAL: ['LPAREN'], + LOGICAL: ['NOT', 'VALUE', 'SPATIAL', 'PROPERTY', 'LPAREN'], + NOT: ['PROPERTY', 'LPAREN'], + GEOMETRY: ['COMMA', 'RPAREN'] + }, + + operators = { + '=': OpenLayers.Filter.Comparison.EQUAL_TO, + '<>': OpenLayers.Filter.Comparison.NOT_EQUAL_TO, + '<': OpenLayers.Filter.Comparison.LESS_THAN, + '<=': OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO, + '>': OpenLayers.Filter.Comparison.GREATER_THAN, + '>=': OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO, + 'LIKE': OpenLayers.Filter.Comparison.LIKE, + 'BETWEEN': OpenLayers.Filter.Comparison.BETWEEN + }, + + operatorReverse = {}, + + logicals = { + 'AND': OpenLayers.Filter.Logical.AND, + 'OR': OpenLayers.Filter.Logical.OR + }, + + logicalReverse = {}, + + precedence = { + 'RPAREN': 3, + 'LOGICAL': 2, + 'COMPARISON': 1 + }; + + var i; + for (i in operators) { + if (operators.hasOwnProperty(i)) { + operatorReverse[operators[i]] = i; + } + } + + for (i in logicals) { + if (logicals.hasOwnProperty(i)) { + logicalReverse[logicals[i]] = i; + } + } + + function tryToken(text, pattern) { + if (pattern instanceof RegExp) { + return pattern.exec(text); + } else { + return pattern(text); + } + } + + function nextToken(text, tokens) { + var i, token, len = tokens.length; + for (i=0; i 0 && + (precedence[operatorStack[operatorStack.length - 1].type] <= p) + ) { + postfix.push(operatorStack.pop()); + } + + operatorStack.push(tok); + break; + case "SPATIAL": + case "NOT": + case "LPAREN": + operatorStack.push(tok); + break; + case "RPAREN": + while (operatorStack.length > 0 && + (operatorStack[operatorStack.length - 1].type != "LPAREN") + ) { + postfix.push(operatorStack.pop()); + } + operatorStack.pop(); // toss out the LPAREN + + if (operatorStack.length > 0 && + operatorStack[operatorStack.length-1].type == "SPATIAL") { + postfix.push(operatorStack.pop()); + } + case "COMMA": + case "END": + break; + default: + throw new Error("Unknown token type " + tok.type); + } + } + + while (operatorStack.length > 0) { + postfix.push(operatorStack.pop()); + } + + function buildTree() { + var tok = postfix.pop(); + switch (tok.type) { + case "LOGICAL": + var rhs = buildTree(), + lhs = buildTree(); + return new OpenLayers.Filter.Logical({ + filters: [lhs, rhs], + type: logicals[tok.text.toUpperCase()] + }); + case "NOT": + var operand = buildTree(); + return new OpenLayers.Filter.Logical({ + filters: [operand], + type: OpenLayers.Filter.Logical.NOT + }); + case "BETWEEN": + var min, max, property; + postfix.pop(); // unneeded AND token here + max = buildTree(); + min = buildTree(); + property = buildTree(); + return new OpenLayers.Filter.Comparison({ + property: property, + lowerBoundary: min, + upperBoundary: max, + type: OpenLayers.Filter.Comparison.BETWEEN + }); + case "COMPARISON": + var value = buildTree(), + property = buildTree(); + return new OpenLayers.Filter.Comparison({ + property: property, + value: value, + type: operators[tok.text.toUpperCase()] + }); + case "VALUE": + if ((/^'.*'$/).test(tok.text)) { + return tok.text.substr(1, tok.text.length - 2); + } else { + return Number(tok.text); + } + case "SPATIAL": + switch(tok.text.toUpperCase()) { + case "BBOX": + var maxy = buildTree(), + maxx = buildTree(), + miny = buildTree(), + minx = buildTree(), + prop = buildTree(); + + return new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.BBOX, + property: prop, + value: OpenLayers.Bounds.fromArray( + [minx, miny, maxx, maxy] + ) + }); + case "INTERSECTS": + var value = buildTree(), + property = buildTree(); + return new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.INTERSECTS, + property: property, + value: value + }); + case "WITHIN": + var value = buildTree(), + property = buildTree(); + return new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.WITHIN, + property: property, + value: value + }); + case "CONTAINS": + var value = buildTree(), + property = buildTree(); + return new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.CONTAINS, + property: property, + value: value + }); + case "DWITHIN": + var distance = buildTree(), + value = buildTree(), + property = buildTree(); + return new OpenLayers.Filter.Spatial({ + type: OpenLayers.Filter.Spatial.DWITHIN, + value: value, + property: property, + distance: Number(distance) + }); + } + case "GEOMETRY": + return OpenLayers.Geometry.fromWKT(tok.text); + default: + return tok.text; + } + } + + var result = buildTree(); + if (postfix.length > 0) { + var msg = "Remaining tokens after building AST: \n"; + for (var i = postfix.length - 1; i >= 0; i--) { + msg += postfix[i].type + ": " + postfix[i].text + "\n"; + } + throw new Error(msg); + } + + return result; + } + + return OpenLayers.Class(OpenLayers.Format, { + /** + * APIMethod: read + * Generate a filter from a CQL string. + + * Parameters: + * text - {String} The CQL text. + * + * Returns: + * {} A filter based on the CQL text. + */ + read: function(text) { + var result = buildAst(tokenize(text)); + if (this.keepData) { + this.data = result; + }; + return result; + }, + + /** + * APIMethod: write + * Convert a filter into a CQL string. + + * Parameters: + * filter - {} The filter. + * + * Returns: + * {String} A CQL string based on the filter. + */ + write: function(filter) { + if (filter instanceof OpenLayers.Geometry) { + return filter.toString(); + } + switch (filter.CLASS_NAME) { + case "OpenLayers.Filter.Spatial": + switch(filter.type) { + case OpenLayers.Filter.Spatial.BBOX: + return "BBOX(" + + filter.property + "," + + filter.value.toBBOX() + + ")"; + case OpenLayers.Filter.Spatial.DWITHIN: + return "DWITHIN(" + + filter.property + ", " + + this.write(filter.value) + ", " + + filter.distance + ")"; + case OpenLayers.Filter.Spatial.WITHIN: + return "WITHIN(" + + filter.property + ", " + + this.write(filter.value) + ")"; + case OpenLayers.Filter.Spatial.INTERSECTS: + return "INTERSECTS(" + + filter.property + ", " + + this.write(filter.value) + ")"; + case OpenLayers.Filter.Spatial.CONTAINS: + return "CONTAINS(" + + filter.property + ", " + + this.write(filter.value) + ")"; + default: + throw new Error("Unknown spatial filter type: " + filter.type); + } + case "OpenLayers.Filter.Logical": + if (filter.type == OpenLayers.Filter.Logical.NOT) { + // TODO: deal with precedence of logical operators to + // avoid extra parentheses (not urgent) + return "NOT (" + this.write(filter.filters[0]) + ")"; + } else { + var res = "("; + var first = true; + for (var i = 0; i < filter.filters.length; i++) { + if (first) { + first = false; + } else { + res += ") " + logicalReverse[filter.type] + " ("; + } + res += this.write(filter.filters[i]); + } + return res + ")"; + } + case "OpenLayers.Filter.Comparison": + if (filter.type == OpenLayers.Filter.Comparison.BETWEEN) { + return filter.property + " BETWEEN " + + this.write(filter.lowerBoundary) + " AND " + + this.write(filter.upperBoundary); + } else { + + return filter.property + + " " + operatorReverse[filter.type] + " " + + this.write(filter.value); + } + case undefined: + if (typeof filter === "string") { + return "'" + filter + "'"; + } else if (typeof filter === "number") { + return String(filter); + } + default: + throw new Error("Can't encode: " + filter.CLASS_NAME + " " + filter); + } + }, + + CLASS_NAME: "OpenLayers.Format.CQL" + + }); +})(); + diff --git a/openlayers/lib/OpenLayers/Format/CSWGetDomain.js b/openlayers/lib/OpenLayers/Format/CSWGetDomain.js new file mode 100644 index 0000000000..9dee01eee8 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/CSWGetDomain.js @@ -0,0 +1,34 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format.js + */ + +/** + * Class: OpenLayers.Format.CSWGetDomain + * Default version is 2.0.2. + * + * Returns: + * {} A CSWGetDomain format of the given version. + */ +OpenLayers.Format.CSWGetDomain = function(options) { + options = OpenLayers.Util.applyDefaults( + options, OpenLayers.Format.CSWGetDomain.DEFAULTS + ); + var cls = OpenLayers.Format.CSWGetDomain["v"+options.version.replace(/\./g, "_")]; + if(!cls) { + throw "Unsupported CSWGetDomain version: " + options.version; + } + return new cls(options); +}; + +/** + * Constant: DEFAULTS + * {Object} Default properties for the CSWGetDomain format. + */ +OpenLayers.Format.CSWGetDomain.DEFAULTS = { + "version": "2.0.2" +}; diff --git a/openlayers/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js b/openlayers/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js new file mode 100644 index 0000000000..db936bfa39 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js @@ -0,0 +1,243 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Format/CSWGetDomain.js + */ + +/** + * Class: OpenLayers.Format.CSWGetDomain.v2_0_2 + * A format for creating CSWGetDomain v2.0.2 transactions. + * Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * Property: namespaces + * {Object} Mapping of namespace aliases to namespace URIs. + */ + namespaces: { + xlink: "http://www.w3.org/1999/xlink", + xsi: "http://www.w3.org/2001/XMLSchema-instance", + csw: "http://www.opengis.net/cat/csw/2.0.2" + }, + + /** + * Property: defaultPrefix + * {String} The default prefix (used by Format.XML). + */ + defaultPrefix: "csw", + + /** + * Property: version + * {String} CSW version number. + */ + version: "2.0.2", + + /** + * Property: schemaLocation + * {String} http://www.opengis.net/cat/csw/2.0.2 + * http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd + */ + schemaLocation: "http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd", + + /** + * APIProperty: PropertyName + * {String} Value of the csw:PropertyName element, used when + * writing a GetDomain document. + */ + PropertyName: null, + + /** + * APIProperty: ParameterName + * {String} Value of the csw:ParameterName element, used when + * writing a GetDomain document. + */ + ParameterName: null, + + /** + * Constructor: OpenLayers.Format.CSWGetDomain.v2_0_2 + * A class for parsing and generating CSWGetDomain v2.0.2 transactions. + * + * Parameters: + * options - {Object} Optional object whose properties will be set on the + * instance. + * + * Valid options properties: + * - PropertyName + * - ParameterName + */ + initialize: function(options) { + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: read + * Parse the response from a GetDomain request. + */ + read: function(data) { + if(typeof data == "string") { + data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); + } + if(data && data.nodeType == 9) { + data = data.documentElement; + } + var obj = {}; + this.readNode(data, obj); + return obj; + }, + + /** + * Property: readers + * Contains public functions, grouped by namespace prefix, that will + * be applied when a namespaced node is found matching the function + * name. The function will be applied in the scope of this parser + * with two arguments: the node being read and a context object passed + * from the parent. + */ + readers: { + "csw": { + "GetDomainResponse": function(node, obj) { + this.readChildNodes(node, obj); + }, + "DomainValues": function(node, obj) { + if (!(OpenLayers.Util.isArray(obj.DomainValues))) { + obj.DomainValues = []; + } + var attrs = node.attributes; + var domainValue = {}; + for(var i=0, len=attrs.length; i} A CSWGetRecords format of the given version. + */ +OpenLayers.Format.CSWGetRecords = function(options) { + options = OpenLayers.Util.applyDefaults( + options, OpenLayers.Format.CSWGetRecords.DEFAULTS + ); + var cls = OpenLayers.Format.CSWGetRecords["v"+options.version.replace(/\./g, "_")]; + if(!cls) { + throw "Unsupported CSWGetRecords version: " + options.version; + } + return new cls(options); +}; + +/** + * Constant: DEFAULTS + * {Object} Default properties for the CSWGetRecords format. + */ +OpenLayers.Format.CSWGetRecords.DEFAULTS = { + "version": "2.0.2" +}; diff --git a/openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js b/openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js new file mode 100644 index 0000000000..9182a4031b --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js @@ -0,0 +1,453 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Format/CSWGetRecords.js + * @requires OpenLayers/Format/Filter/v1_0_0.js + * @requires OpenLayers/Format/Filter/v1_1_0.js + * @requires OpenLayers/Format/OWSCommon/v1_0_0.js + */ + +/** + * Class: OpenLayers.Format.CSWGetRecords.v2_0_2 + * A format for creating CSWGetRecords v2.0.2 transactions. + * Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.CSWGetRecords.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * Property: namespaces + * {Object} Mapping of namespace aliases to namespace URIs. + */ + namespaces: { + csw: "http://www.opengis.net/cat/csw/2.0.2", + dc: "http://purl.org/dc/elements/1.1/", + dct: "http://purl.org/dc/terms/", + geonet: "http://www.fao.org/geonetwork", + ogc: "http://www.opengis.net/ogc", + ows: "http://www.opengis.net/ows", + xlink: "http://www.w3.org/1999/xlink", + xsi: "http://www.w3.org/2001/XMLSchema-instance" + }, + + /** + * Property: defaultPrefix + * {String} The default prefix (used by Format.XML). + */ + defaultPrefix: "csw", + + /** + * Property: version + * {String} CSW version number. + */ + version: "2.0.2", + + /** + * Property: schemaLocation + * {String} http://www.opengis.net/cat/csw/2.0.2 + * http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd + */ + schemaLocation: "http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd", + + /** + * APIProperty: requestId + * {String} Value of the requestId attribute of the GetRecords element. + */ + requestId: null, + + /** + * APIProperty: resultType + * {String} Value of the resultType attribute of the GetRecords element, + * specifies the result type in the GetRecords response, "hits" is + * the default. + */ + resultType: null, + + /** + * APIProperty: outputFormat + * {String} Value of the outputFormat attribute of the GetRecords element, + * specifies the format of the GetRecords response, + * "application/xml" is the default. + */ + outputFormat: null, + + /** + * APIProperty: outputSchema + * {String} Value of the outputSchema attribute of the GetRecords element, + * specifies the schema of the GetRecords response. + */ + outputSchema: null, + + /** + * APIProperty: startPosition + * {String} Value of the startPosition attribute of the GetRecords element, + * specifies the start position (offset+1) for the GetRecords response, + * 1 is the default. + */ + startPosition: null, + + /** + * APIProperty: maxRecords + * {String} Value of the maxRecords attribute of the GetRecords element, + * specifies the maximum number of records in the GetRecords response, + * 10 is the default. + */ + maxRecords: null, + + /** + * APIProperty: DistributedSearch + * {String} Value of the csw:DistributedSearch element, used when writing + * a csw:GetRecords document. + */ + DistributedSearch: null, + + /** + * APIProperty: ResponseHandler + * {Array({String})} Values of the csw:ResponseHandler elements, used when + * writting a csw:GetRecords document. + */ + ResponseHandler: null, + + /** + * APIProperty: Query + * {String} Value of the csw:Query element, used when writing a csw:GetRecords + * document. + */ + Query: null, + + /** + * Property: regExes + * Compiled regular expressions for manipulating strings. + */ + regExes: { + trimSpace: (/^\s*|\s*$/g), + removeSpace: (/\s*/g), + splitSpace: (/\s+/), + trimComma: (/\s*,\s*/g) + }, + + /** + * Constructor: OpenLayers.Format.CSWGetRecords.v2_0_2 + * A class for parsing and generating CSWGetRecords v2.0.2 transactions. + * + * Parameters: + * options - {Object} Optional object whose properties will be set on the + * instance. + * + * Valid options properties (documented as class properties): + * - requestId + * - resultType + * - outputFormat + * - outputSchema + * - startPosition + * - maxRecords + * - DistributedSearch + * - ResponseHandler + * - Query + */ + initialize: function(options) { + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: read + * Parse the response from a GetRecords request. + */ + read: function(data) { + if(typeof data == "string") { + data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); + } + if(data && data.nodeType == 9) { + data = data.documentElement; + } + var obj = {}; + this.readNode(data, obj); + return obj; + }, + + /** + * Property: readers + * Contains public functions, grouped by namespace prefix, that will + * be applied when a namespaced node is found matching the function + * name. The function will be applied in the scope of this parser + * with two arguments: the node being read and a context object passed + * from the parent. + */ + readers: { + "csw": { + "GetRecordsResponse": function(node, obj) { + obj.records = []; + this.readChildNodes(node, obj); + var version = this.getAttributeNS(node, "", 'version'); + if (version != "") { + obj.version = version; + } + }, + "RequestId": function(node, obj) { + obj.RequestId = this.getChildValue(node); + }, + "SearchStatus": function(node, obj) { + obj.SearchStatus = {}; + var timestamp = this.getAttributeNS(node, "", 'timestamp'); + if (timestamp != "") { + obj.SearchStatus.timestamp = timestamp; + } + }, + "SearchResults": function(node, obj) { + this.readChildNodes(node, obj); + var attrs = node.attributes; + var SearchResults = {}; + for(var i=0, len=attrs.length; i 0) { + // ResponseHandler must be a non-empty array + for(var i=0, len=ResponseHandler.length; i 0) { + // ElementName must be a non-empty array + for(var i=0, len=ElementName.length; i, the layers from the context document will be added + * to the map. + * + * Returns: + * {} A map based on the context. + */ + read: function(data, options) { + var context = OpenLayers.Format.XML.VersionedOGC.prototype.read.apply(this, + arguments); + var map; + if(options && options.map) { + this.context = context; + if(options.map instanceof OpenLayers.Map) { + map = this.mergeContextToMap(context, options.map); + } else { + var mapOptions = options.map; + if(OpenLayers.Util.isElement(mapOptions) || + typeof mapOptions == "string") { + // we assume mapOptions references a div + // element + mapOptions = {div: mapOptions}; + } + map = this.contextToMap(context, mapOptions); + } + } else { + // not documented as part of the API, provided as a non-API option + map = context; + } + return map; + }, + + /** + * Method: getLayerFromContext + * Create a WMS layer from a layerContext object. + * + * Parameters: + * layerContext - {Object} An object representing a WMS layer. + * + * Returns: + * {} A WMS layer. + */ + getLayerFromContext: function(layerContext) { + var i, len; + // fill initial options object from layerContext + var options = { + queryable: layerContext.queryable, //keep queryable for api compatibility + visibility: layerContext.visibility, + maxExtent: layerContext.maxExtent, + metadata: OpenLayers.Util.applyDefaults(layerContext.metadata, + {styles: layerContext.styles, + formats: layerContext.formats, + "abstract": layerContext["abstract"], + dataURL: layerContext.dataURL + }), + numZoomLevels: layerContext.numZoomLevels, + units: layerContext.units, + isBaseLayer: layerContext.isBaseLayer, + opacity: layerContext.opacity, + displayInLayerSwitcher: layerContext.displayInLayerSwitcher, + singleTile: layerContext.singleTile, + tileSize: (layerContext.tileSize) ? + new OpenLayers.Size( + layerContext.tileSize.width, + layerContext.tileSize.height + ) : undefined, + minScale: layerContext.minScale || layerContext.maxScaleDenominator, + maxScale: layerContext.maxScale || layerContext.minScaleDenominator, + srs: layerContext.srs, + dimensions: layerContext.dimensions, + metadataURL: layerContext.metadataURL + }; + if (this.layerOptions) { + OpenLayers.Util.applyDefaults(options, this.layerOptions); + } + + var params = { + layers: layerContext.name, + transparent: layerContext.transparent, + version: layerContext.version + }; + if (layerContext.formats && layerContext.formats.length>0) { + // set default value for params if current attribute is not positionned + params.format = layerContext.formats[0].value; + for (i=0, len=layerContext.formats.length; i0) { + for (i=0, len=layerContext.styles.length; i)} An array of layers. + */ + getLayersFromContext: function(layersContext) { + var layers = []; + for (var i=0, len=layersContext.length; i} A map based on the context object. + */ + contextToMap: function(context, options) { + options = OpenLayers.Util.applyDefaults({ + maxExtent: context.maxExtent, + projection: context.projection, + units: context.units + }, options); + + if (options.maxExtent) { + options.maxResolution = + options.maxExtent.getWidth() / OpenLayers.Map.TILE_WIDTH; + } + + var metadata = { + contactInformation: context.contactInformation, + "abstract": context["abstract"], + keywords: context.keywords, + logo: context.logo, + descriptionURL: context.descriptionURL + } + + options.metadata = metadata; + + var map = new OpenLayers.Map(options); + map.addLayers(this.getLayersFromContext(context.layersContext)); + map.setCenter( + context.bounds.getCenterLonLat(), + map.getZoomForExtent(context.bounds, true) + ); + return map; + }, + + /** + * Method: mergeContextToMap + * Add layers from a context object to a map. + * + * Parameters: + * context - {Object} The context object. + * map - {} The map. + * + * Returns: + * {} The same map with layers added. + */ + mergeContextToMap: function(context, map) { + map.addLayers(this.getLayersFromContext(context.layersContext)); + return map; + }, + + /** + * APIMethod: write + * Write a context document given a map. + * + * Parameters: + * obj - { | Object} A map or context object. + * options - {Object} Optional configuration object. + * + * Returns: + * {String} A context document string. + */ + write: function(obj, options) { + obj = this.toContext(obj); + return OpenLayers.Format.XML.VersionedOGC.prototype.write.apply(this, + arguments); + }, + + CLASS_NAME: "OpenLayers.Format.Context" +}); + +/** + * Constant: OpenLayers.Format.Context.serviceTypes + * Enumeration for service types + */ +OpenLayers.Format.Context.serviceTypes = { + "WMS": "urn:ogc:serviceType:WMS", + "WFS": "urn:ogc:serviceType:WFS", + "WCS": "urn:ogc:serviceType:WCS", + "GML": "urn:ogc:serviceType:GML", + "SLD": "urn:ogc:serviceType:SLD", + "FES": "urn:ogc:serviceType:FES", + "KML": "urn:ogc:serviceType:KML" +}; diff --git a/openlayers/lib/OpenLayers/Format/Filter.js b/openlayers/lib/OpenLayers/Format/Filter.js new file mode 100644 index 0000000000..4fa803e123 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/Filter.js @@ -0,0 +1,53 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/XML/VersionedOGC.js + * @requires OpenLayers/Filter/FeatureId.js + * @requires OpenLayers/Filter/Logical.js + * @requires OpenLayers/Filter/Comparison.js + */ + +/** + * Class: OpenLayers.Format.Filter + * Read/Wite ogc:Filter. Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.Filter = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { + + /** + * APIProperty: defaultVersion + * {String} Version number to assume if none found. Default is "1.0.0". + */ + defaultVersion: "1.0.0", + + /** + * APIMethod: write + * Write an ogc:Filter given a filter object. + * + * Parameters: + * filter - {} An filter. + * options - {Object} Optional configuration object. + * + * Returns: + * {Elment} An ogc:Filter element node. + */ + + /** + * APIMethod: read + * Read and Filter doc and return an object representing the Filter. + * + * Parameters: + * data - {String | DOMElement} Data to read. + * + * Returns: + * {} A filter object. + */ + + CLASS_NAME: "OpenLayers.Format.Filter" +}); diff --git a/openlayers/lib/OpenLayers/Format/Filter/v1.js b/openlayers/lib/OpenLayers/Format/Filter/v1.js new file mode 100644 index 0000000000..7fd9830451 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/Filter/v1.js @@ -0,0 +1,492 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ +/** + * @requires OpenLayers/Format/Filter.js + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Filter/Function.js + */ + +/** + * Class: OpenLayers.Format.Filter.v1 + * Superclass for Filter version 1 parsers. + * + * Inherits from: + * - + */ +OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * Property: namespaces + * {Object} Mapping of namespace aliases to namespace URIs. + */ + namespaces: { + ogc: "http://www.opengis.net/ogc", + gml: "http://www.opengis.net/gml", + xlink: "http://www.w3.org/1999/xlink", + xsi: "http://www.w3.org/2001/XMLSchema-instance" + }, + + /** + * Property: defaultPrefix + */ + defaultPrefix: "ogc", + + /** + * Property: schemaLocation + * {String} Schema location for a particular minor version. + */ + schemaLocation: null, + + /** + * Constructor: OpenLayers.Format.Filter.v1 + * Instances of this class are not created directly. Use the + * constructor instead. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + }, + + /** + * Method: read + * + * Parameters: + * data - {DOMElement} A Filter document element. + * + * Returns: + * {} A filter object. + */ + read: function(data) { + var obj = {}; + this.readers.ogc["Filter"].apply(this, [data, obj]); + return obj.filter; + }, + + /** + * Property: readers + * Contains public functions, grouped by namespace prefix, that will + * be applied when a namespaced node is found matching the function + * name. The function will be applied in the scope of this parser + * with two arguments: the node being read and a context object passed + * from the parent. + */ + readers: { + "ogc": { + "Filter": function(node, parent) { + // Filters correspond to subclasses of OpenLayers.Filter. + // Since they contain information we don't persist, we + // create a temporary object and then pass on the filter + // (ogc:Filter) to the parent obj. + var obj = { + fids: [], + filters: [] + }; + this.readChildNodes(node, obj); + if(obj.fids.length > 0) { + parent.filter = new OpenLayers.Filter.FeatureId({ + fids: obj.fids + }); + } else if(obj.filters.length > 0) { + parent.filter = obj.filters[0]; + } + }, + "FeatureId": function(node, obj) { + var fid = node.getAttribute("fid"); + if(fid) { + obj.fids.push(fid); + } + }, + "And": function(node, obj) { + var filter = new OpenLayers.Filter.Logical({ + type: OpenLayers.Filter.Logical.AND + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "Or": function(node, obj) { + var filter = new OpenLayers.Filter.Logical({ + type: OpenLayers.Filter.Logical.OR + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "Not": function(node, obj) { + var filter = new OpenLayers.Filter.Logical({ + type: OpenLayers.Filter.Logical.NOT + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsLessThan": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.LESS_THAN + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsGreaterThan": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.GREATER_THAN + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsLessThanOrEqualTo": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsGreaterThanOrEqualTo": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsBetween": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.BETWEEN + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "Literal": function(node, obj) { + obj.value = OpenLayers.String.numericIf( + this.getChildValue(node)); + }, + "PropertyName": function(node, filter) { + filter.property = this.getChildValue(node); + }, + "LowerBoundary": function(node, filter) { + filter.lowerBoundary = OpenLayers.String.numericIf( + this.readOgcExpression(node)); + }, + "UpperBoundary": function(node, filter) { + filter.upperBoundary = OpenLayers.String.numericIf( + this.readOgcExpression(node)); + }, + "Intersects": function(node, obj) { + this.readSpatial(node, obj, OpenLayers.Filter.Spatial.INTERSECTS); + }, + "Within": function(node, obj) { + this.readSpatial(node, obj, OpenLayers.Filter.Spatial.WITHIN); + }, + "Contains": function(node, obj) { + this.readSpatial(node, obj, OpenLayers.Filter.Spatial.CONTAINS); + }, + "DWithin": function(node, obj) { + this.readSpatial(node, obj, OpenLayers.Filter.Spatial.DWITHIN); + }, + "Distance": function(node, obj) { + obj.distance = parseInt(this.getChildValue(node)); + obj.distanceUnits = node.getAttribute("units"); + }, + "Function": function(node, obj) { + //TODO write decoder for it + return; + } + } + }, + + /** + * Method: readSpatial + * + * Read a {} filter. + * + * Parameters: + * node - {DOMElement} A DOM element that contains an ogc:expression. + * obj - {Object} The target object. + * type - {String} One of the OpenLayers.Filter.Spatial.* constants. + * + * Returns: + * {} The created filter. + */ + readSpatial: function(node, obj, type) { + var filter = new OpenLayers.Filter.Spatial({ + type: type + }); + this.readChildNodes(node, filter); + filter.value = filter.components[0]; + delete filter.components; + obj.filters.push(filter); + }, + + /** + * Method: readOgcExpression + * Limited support for OGC expressions. + * + * Parameters: + * node - {DOMElement} A DOM element that contains an ogc:expression. + * + * Returns: + * {String} A value to be used in a symbolizer. + */ + readOgcExpression: function(node) { + var obj = {}; + this.readChildNodes(node, obj); + var value = obj.value; + if(value === undefined) { + value = this.getChildValue(node); + } + return value; + }, + + /** + * Method: writeOgcExpression + * Limited support for writing OGC expressions. Currently it supports + * ( || String || Number) + * + * Parameters: + * value - ( || String || Number) + * node - {DOMElement} A parent DOM element + * + * Returns: + * {DOMElement} Updated node element. + */ + writeOgcExpression: function(value, node) { + if(value instanceof OpenLayers.Filter.Function){ + var child = this.writeNode("Function", value, node); + node.appendChild(child); + } else { + this.writeNode("Literal", value, node); + } + return node; + }, + + /** + * Method: write + * + * Parameters: + * filter - {} A filter object. + * + * Returns: + * {DOMElement} An ogc:Filter element. + */ + write: function(filter) { + return this.writers.ogc["Filter"].apply(this, [filter]); + }, + + /** + * Method: writeFeatureIdNodes + * + * Parameters: + * filter - {": "PropertyIsGreaterThan", + "<=": "PropertyIsLessThanOrEqualTo", + ">=": "PropertyIsGreaterThanOrEqualTo", + "..": "PropertyIsBetween", + "~": "PropertyIsLike", + "BBOX": "BBOX", + "DWITHIN": "DWITHIN", + "WITHIN": "WITHIN", + "CONTAINS": "CONTAINS", + "INTERSECTS": "INTERSECTS", + "FID": "FeatureId" + }, + + CLASS_NAME: "OpenLayers.Format.Filter.v1" + +}); diff --git a/openlayers/lib/OpenLayers/Format/Filter/v1_0_0.js b/openlayers/lib/OpenLayers/Format/Filter/v1_0_0.js new file mode 100644 index 0000000000..02e9aeaad6 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/Filter/v1_0_0.js @@ -0,0 +1,184 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/GML/v2.js + * @requires OpenLayers/Format/Filter/v1.js + */ + +/** + * Class: OpenLayers.Format.Filter.v1_0_0 + * Write ogc:Filter version 1.0.0. + * + * Inherits from: + * - + * - + */ +OpenLayers.Format.Filter.v1_0_0 = OpenLayers.Class( + OpenLayers.Format.GML.v2, OpenLayers.Format.Filter.v1, { + + /** + * Constant: VERSION + * {String} 1.0.0 + */ + VERSION: "1.0.0", + + /** + * Property: schemaLocation + * {String} http://www.opengis.net/ogc/filter/1.0.0/filter.xsd + */ + schemaLocation: "http://www.opengis.net/ogc/filter/1.0.0/filter.xsd", + + /** + * Constructor: OpenLayers.Format.Filter.v1_0_0 + * Instances of this class are not created directly. Use the + * constructor instead. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + OpenLayers.Format.GML.v2.prototype.initialize.apply( + this, [options] + ); + }, + + /** + * Property: readers + * Contains public functions, grouped by namespace prefix, that will + * be applied when a namespaced node is found matching the function + * name. The function will be applied in the scope of this parser + * with two arguments: the node being read and a context object passed + * from the parent. + */ + readers: { + "ogc": OpenLayers.Util.applyDefaults({ + "PropertyIsEqualTo": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.EQUAL_TO + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsNotEqualTo": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.NOT_EQUAL_TO + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsLike": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.LIKE + }); + this.readChildNodes(node, filter); + var wildCard = node.getAttribute("wildCard"); + var singleChar = node.getAttribute("singleChar"); + var esc = node.getAttribute("escape"); + filter.value2regex(wildCard, singleChar, esc); + obj.filters.push(filter); + } + }, OpenLayers.Format.Filter.v1.prototype.readers["ogc"]), + "gml": OpenLayers.Format.GML.v2.prototype.readers["gml"], + "feature": OpenLayers.Format.GML.v2.prototype.readers["feature"] + }, + + /** + * Property: writers + * As a compliment to the readers property, this structure contains public + * writing functions grouped by namespace alias and named like the + * node names they produce. + */ + writers: { + "ogc": OpenLayers.Util.applyDefaults({ + "PropertyIsEqualTo": function(filter) { + var node = this.createElementNSPlus("ogc:PropertyIsEqualTo"); + // no ogc:expression handling for PropertyName for now + this.writeNode("PropertyName", filter, node); + // handle Literals or Functions for now + this.writeOgcExpression(filter.value, node); + return node; + }, + "PropertyIsNotEqualTo": function(filter) { + var node = this.createElementNSPlus("ogc:PropertyIsNotEqualTo"); + // no ogc:expression handling for PropertyName for now + this.writeNode("PropertyName", filter, node); + // handle Literals or Functions for now + this.writeOgcExpression(filter.value, node); + return node; + }, + "PropertyIsLike": function(filter) { + var node = this.createElementNSPlus("ogc:PropertyIsLike", { + attributes: { + wildCard: "*", singleChar: ".", escape: "!" + } + }); + // no ogc:expression handling for now + this.writeNode("PropertyName", filter, node); + // convert regex string to ogc string + this.writeNode("Literal", filter.regex2value(), node); + return node; + }, + "BBOX": function(filter) { + var node = this.createElementNSPlus("ogc:BBOX"); + // PropertyName is mandatory in 1.0.0, but e.g. GeoServer also + // accepts filters without it. When this is used with + // OpenLayers.Protocol.WFS, OpenLayers.Format.WFST will set a + // missing filter.property to the geometryName that is + // configured with the protocol, which defaults to "the_geom". + // So the only way to omit this mandatory property is to not + // set the property on the filter and to set the geometryName + // on the WFS protocol to null. The latter also happens when + // the protocol is configured without a geometryName and a + // featureNS. + filter.property && this.writeNode("PropertyName", filter, node); + var box = this.writeNode("gml:Box", filter.value, node); + if(filter.projection) { + box.setAttribute("srsName", filter.projection); + } + return node; + } + }, OpenLayers.Format.Filter.v1.prototype.writers["ogc"]), + "gml": OpenLayers.Format.GML.v2.prototype.writers["gml"], + "feature": OpenLayers.Format.GML.v2.prototype.writers["feature"] + }, + + /** + * Method: writeSpatial + * + * Read a {} filter and converts it into XML. + * + * Parameters: + * filter - {} The filter. + * name - {String} Name of the generated XML element. + * + * Returns: + * {DOMElement} The created XML element. + */ + writeSpatial: function(filter, name) { + var node = this.createElementNSPlus("ogc:"+name); + this.writeNode("PropertyName", filter, node); + if(filter.value instanceof OpenLayers.Filter.Function) { + this.writeNode("Function", filter.value, node); + } else { + var child; + if(filter.value instanceof OpenLayers.Geometry) { + child = this.writeNode("feature:_geometry", filter.value).firstChild; + } else { + child = this.writeNode("gml:Box", filter.value); + } + if(filter.projection) { + child.setAttribute("srsName", filter.projection); + } + node.appendChild(child); + } + return node; + }, + + + CLASS_NAME: "OpenLayers.Format.Filter.v1_0_0" + +}); \ No newline at end of file diff --git a/openlayers/lib/OpenLayers/Format/Filter/v1_1_0.js b/openlayers/lib/OpenLayers/Format/Filter/v1_1_0.js new file mode 100644 index 0000000000..9c50b4395a --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/Filter/v1_1_0.js @@ -0,0 +1,221 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/Filter/v1.js + * @requires OpenLayers/Format/GML/v3.js + */ + +/** + * Class: OpenLayers.Format.Filter.v1_1_0 + * Write ogc:Filter version 1.1.0. + * + * Differences from the v1.0.0 parser: + * - uses GML v3 instead of GML v2 + * - reads matchCase attribute on ogc:PropertyIsEqual and + * ogc:PropertyIsNotEqual elements. + * - writes matchCase attribute from comparison filters of type EQUAL_TO, + * NOT_EQUAL_TO and LIKE. + * + * Inherits from: + * - + */ +OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( + OpenLayers.Format.GML.v3, OpenLayers.Format.Filter.v1, { + + /** + * Constant: VERSION + * {String} 1.1.0 + */ + VERSION: "1.1.0", + + /** + * Property: schemaLocation + * {String} http://www.opengis.net/ogc/filter/1.1.0/filter.xsd + */ + schemaLocation: "http://www.opengis.net/ogc/filter/1.1.0/filter.xsd", + + /** + * Constructor: OpenLayers.Format.Filter.v1_1_0 + * Instances of this class are not created directly. Use the + * constructor instead. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + OpenLayers.Format.GML.v3.prototype.initialize.apply( + this, [options] + ); + }, + + /** + * Property: readers + * Contains public functions, grouped by namespace prefix, that will + * be applied when a namespaced node is found matching the function + * name. The function will be applied in the scope of this parser + * with two arguments: the node being read and a context object passed + * from the parent. + */ + readers: { + "ogc": OpenLayers.Util.applyDefaults({ + "PropertyIsEqualTo": function(node, obj) { + var matchCase = node.getAttribute("matchCase"); + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.EQUAL_TO, + matchCase: !(matchCase === "false" || matchCase === "0") + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsNotEqualTo": function(node, obj) { + var matchCase = node.getAttribute("matchCase"); + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.NOT_EQUAL_TO, + matchCase: !(matchCase === "false" || matchCase === "0") + }); + this.readChildNodes(node, filter); + obj.filters.push(filter); + }, + "PropertyIsLike": function(node, obj) { + var filter = new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.LIKE + }); + this.readChildNodes(node, filter); + var wildCard = node.getAttribute("wildCard"); + var singleChar = node.getAttribute("singleChar"); + var esc = node.getAttribute("escapeChar"); + filter.value2regex(wildCard, singleChar, esc); + obj.filters.push(filter); + } + }, OpenLayers.Format.Filter.v1.prototype.readers["ogc"]), + "gml": OpenLayers.Format.GML.v3.prototype.readers["gml"], + "feature": OpenLayers.Format.GML.v3.prototype.readers["feature"] + }, + + /** + * Property: writers + * As a compliment to the readers property, this structure contains public + * writing functions grouped by namespace alias and named like the + * node names they produce. + */ + writers: { + "ogc": OpenLayers.Util.applyDefaults({ + "PropertyIsEqualTo": function(filter) { + var node = this.createElementNSPlus("ogc:PropertyIsEqualTo", { + attributes: {matchCase: filter.matchCase} + }); + // no ogc:expression handling for PropertyName for now + this.writeNode("PropertyName", filter, node); + // handle Literals or Functions for now + this.writeOgcExpression(filter.value, node); + return node; + }, + "PropertyIsNotEqualTo": function(filter) { + var node = this.createElementNSPlus("ogc:PropertyIsNotEqualTo", { + attributes: {matchCase: filter.matchCase} + }); + // no ogc:expression handling for PropertyName for now + this.writeNode("PropertyName", filter, node); + // handle Literals or Functions for now + this.writeOgcExpression(filter.value, node); + return node; + }, + "PropertyIsLike": function(filter) { + var node = this.createElementNSPlus("ogc:PropertyIsLike", { + attributes: { + matchCase: filter.matchCase, + wildCard: "*", singleChar: ".", escapeChar: "!" + } + }); + // no ogc:expression handling for now + this.writeNode("PropertyName", filter, node); + // convert regex string to ogc string + this.writeNode("Literal", filter.regex2value(), node); + return node; + }, + "BBOX": function(filter) { + var node = this.createElementNSPlus("ogc:BBOX"); + // PropertyName is optional in 1.1.0 + filter.property && this.writeNode("PropertyName", filter, node); + var box = this.writeNode("gml:Envelope", filter.value); + if(filter.projection) { + box.setAttribute("srsName", filter.projection); + } + node.appendChild(box); + return node; + }, + "SortBy": function(sortProperties) { + var node = this.createElementNSPlus("ogc:SortBy"); + for (var i=0,l=sortProperties.length;i} filter and converts it into XML. + * + * Parameters: + * filter - {} The filter. + * name - {String} Name of the generated XML element. + * + * Returns: + * {DOMElement} The created XML element. + */ + writeSpatial: function(filter, name) { + var node = this.createElementNSPlus("ogc:"+name); + this.writeNode("PropertyName", filter, node); + if(filter.value instanceof OpenLayers.Filter.Function) { + this.writeNode("Function", filter.value, node); + } else { + var child; + if(filter.value instanceof OpenLayers.Geometry) { + child = this.writeNode("feature:_geometry", filter.value).firstChild; + } else { + child = this.writeNode("gml:Envelope", filter.value); + } + if(filter.projection) { + child.setAttribute("srsName", filter.projection); + } + node.appendChild(child); + } + return node; + }, + + CLASS_NAME: "OpenLayers.Format.Filter.v1_1_0" + +}); diff --git a/openlayers/lib/OpenLayers/Format/GML.js b/openlayers/lib/OpenLayers/Format/GML.js new file mode 100644 index 0000000000..bdb3186d0e --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/GML.js @@ -0,0 +1,925 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/MultiPoint.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Geometry/MultiLineString.js + * @requires OpenLayers/Geometry/Polygon.js + * @requires OpenLayers/Geometry/MultiPolygon.js + * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js + */ + +/** + * Class: OpenLayers.Format.GML + * Read/Wite GML. Create a new instance with the + * constructor. Supports the GML simple features profile. + * + * Inherits from: + * - + */ +OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { + + /* + * APIProperty: featureNS + * {String} Namespace used for feature attributes. Default is + * "http://mapserver.gis.umn.edu/mapserver". + */ + featureNS: "http://mapserver.gis.umn.edu/mapserver", + + /** + * APIProperty: featurePrefix + * {String} Namespace alias (or prefix) for feature nodes. Default is + * "feature". + */ + featurePrefix: "feature", + + /* + * APIProperty: featureName + * {String} Element name for features. Default is "featureMember". + */ + featureName: "featureMember", + + /* + * APIProperty: layerName + * {String} Name of data layer. Default is "features". + */ + layerName: "features", + + /** + * APIProperty: geometryName + * {String} Name of geometry element. Defaults to "geometry". + */ + geometryName: "geometry", + + /** + * APIProperty: collectionName + * {String} Name of featureCollection element. + */ + collectionName: "FeatureCollection", + + /** + * APIProperty: gmlns + * {String} GML Namespace. + */ + gmlns: "http://www.opengis.net/gml", + + /** + * APIProperty: extractAttributes + * {Boolean} Extract attributes from GML. + */ + extractAttributes: true, + + /** + * APIProperty: xy + * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) + * Changing is not recommended, a new Format should be instantiated. + */ + xy: true, + + /** + * Constructor: OpenLayers.Format.GML + * Create a new parser for GML. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + // compile regular expressions once instead of every time they are used + this.regExes = { + trimSpace: (/^\s*|\s*$/g), + removeSpace: (/\s*/g), + splitSpace: (/\s+/), + trimComma: (/\s*,\s*/g) + }; + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: read + * Read data from a string, and return a list of features. + * + * Parameters: + * data - {String} or {DOMElement} data to read/parse. + * + * Returns: + * {Array()} An array of features. + */ + read: function(data) { + if(typeof data == "string") { + data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); + } + var featureNodes = this.getElementsByTagNameNS(data.documentElement, + this.gmlns, + this.featureName); + var features = []; + for(var i=0; i 0) { + // only deal with first geometry of this type + parser = this.parseGeometry[type.toLowerCase()]; + if(parser) { + geometry = parser.apply(this, [nodeList[0]]); + if (this.internalProjection && this.externalProjection) { + geometry.transform(this.externalProjection, + this.internalProjection); + } + } else { + OpenLayers.Console.error(OpenLayers.i18n( + "unsupportedGeometryType", {'geomType':type})); + } + // stop looking for different geometry types + break; + } + } + + var bounds; + var boxNodes = this.getElementsByTagNameNS(node, this.gmlns, "Box"); + for(i=0; i} A point geometry. + */ + point: function(node) { + /** + * Three coordinate variations to consider: + * 1) x y z + * 2) x, y, z + * 3) xy + */ + var nodeList, coordString; + var coords = []; + + // look for + var nodeList = this.getElementsByTagNameNS(node, this.gmlns, "pos"); + if(nodeList.length > 0) { + coordString = nodeList[0].firstChild.nodeValue; + coordString = coordString.replace(this.regExes.trimSpace, ""); + coords = coordString.split(this.regExes.splitSpace); + } + + // look for + if(coords.length == 0) { + nodeList = this.getElementsByTagNameNS(node, this.gmlns, + "coordinates"); + if(nodeList.length > 0) { + coordString = nodeList[0].firstChild.nodeValue; + coordString = coordString.replace(this.regExes.removeSpace, + ""); + coords = coordString.split(","); + } + } + + // look for + if(coords.length == 0) { + nodeList = this.getElementsByTagNameNS(node, this.gmlns, + "coord"); + if(nodeList.length > 0) { + var xList = this.getElementsByTagNameNS(nodeList[0], + this.gmlns, "X"); + var yList = this.getElementsByTagNameNS(nodeList[0], + this.gmlns, "Y"); + if(xList.length > 0 && yList.length > 0) { + coords = [xList[0].firstChild.nodeValue, + yList[0].firstChild.nodeValue]; + } + } + } + + // preserve third dimension + if(coords.length == 2) { + coords[2] = null; + } + + if (this.xy) { + return new OpenLayers.Geometry.Point(coords[0], coords[1], + coords[2]); + } + else{ + return new OpenLayers.Geometry.Point(coords[1], coords[0], + coords[2]); + } + }, + + /** + * Method: parseGeometry.multipoint + * Given a GML node representing a multipoint geometry, create an + * OpenLayers multipoint geometry. + * + * Parameters: + * node - {DOMElement} A GML node. + * + * Returns: + * {} A multipoint geometry. + */ + multipoint: function(node) { + var nodeList = this.getElementsByTagNameNS(node, this.gmlns, + "Point"); + var components = []; + if(nodeList.length > 0) { + var point; + for(var i=0; i} A linestring geometry. + */ + linestring: function(node, ring) { + /** + * Two coordinate variations to consider: + * 1) x0 y0 z0 x1 y1 z1 + * 2) x0, y0, z0 x1, y1, z1 + */ + var nodeList, coordString; + var coords = []; + var points = []; + + // look for + nodeList = this.getElementsByTagNameNS(node, this.gmlns, "posList"); + if(nodeList.length > 0) { + coordString = this.getChildValue(nodeList[0]); + coordString = coordString.replace(this.regExes.trimSpace, ""); + coords = coordString.split(this.regExes.splitSpace); + var dim = parseInt(nodeList[0].getAttribute("dimension")); + var j, x, y, z; + for(var i=0; i + if(coords.length == 0) { + nodeList = this.getElementsByTagNameNS(node, this.gmlns, + "coordinates"); + if(nodeList.length > 0) { + coordString = this.getChildValue(nodeList[0]); + coordString = coordString.replace(this.regExes.trimSpace, + ""); + coordString = coordString.replace(this.regExes.trimComma, + ","); + var pointList = coordString.split(this.regExes.splitSpace); + for(var i=0; i} A multilinestring geometry. + */ + multilinestring: function(node) { + var nodeList = this.getElementsByTagNameNS(node, this.gmlns, + "LineString"); + var components = []; + if(nodeList.length > 0) { + var line; + for(var i=0; i} A polygon geometry. + */ + polygon: function(node) { + var nodeList = this.getElementsByTagNameNS(node, this.gmlns, + "LinearRing"); + var components = []; + if(nodeList.length > 0) { + // this assumes exterior ring first, inner rings after + var ring; + for(var i=0; i} A multipolygon geometry. + */ + multipolygon: function(node) { + var nodeList = this.getElementsByTagNameNS(node, this.gmlns, + "Polygon"); + var components = []; + if(nodeList.length > 0) { + var polygon; + for(var i=0; i 0) { + var coords = []; + + if(lpoint.length > 0) { + coordString = lpoint[0].firstChild.nodeValue; + coordString = coordString.replace(this.regExes.trimSpace, ""); + coords = coordString.split(this.regExes.splitSpace); + } + + if(coords.length == 2) { + coords[2] = null; + } + if (this.xy) { + var lowerPoint = new OpenLayers.Geometry.Point(coords[0], coords[1],coords[2]); + } else { + var lowerPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]); + } + } + + var upoint = this.getElementsByTagNameNS(node, this.gmlns, "upperCorner"); + if (upoint.length > 0) { + var coords = []; + + if(upoint.length > 0) { + coordString = upoint[0].firstChild.nodeValue; + coordString = coordString.replace(this.regExes.trimSpace, ""); + coords = coordString.split(this.regExes.splitSpace); + } + + if(coords.length == 2) { + coords[2] = null; + } + if (this.xy) { + var upperPoint = new OpenLayers.Geometry.Point(coords[0], coords[1],coords[2]); + } else { + var upperPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]); + } + } + + if (lowerPoint && upperPoint) { + components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y)); + components.push(new OpenLayers.Geometry.Point(upperPoint.x, lowerPoint.y)); + components.push(new OpenLayers.Geometry.Point(upperPoint.x, upperPoint.y)); + components.push(new OpenLayers.Geometry.Point(lowerPoint.x, upperPoint.y)); + components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y)); + + var ring = new OpenLayers.Geometry.LinearRing(components); + envelope = new OpenLayers.Geometry.Polygon([ring]); + } + return envelope; + }, + + /** + * Method: parseGeometry.box + * Given a GML node representing a box geometry, create an + * OpenLayers.Bounds. + * + * Parameters: + * node - {DOMElement} A GML node. + * + * Returns: + * {} A bounds representing the box. + */ + box: function(node) { + var nodeList = this.getElementsByTagNameNS(node, this.gmlns, + "coordinates"); + var coordString; + var coords, beginPoint = null, endPoint = null; + if (nodeList.length > 0) { + coordString = nodeList[0].firstChild.nodeValue; + coords = coordString.split(" "); + if (coords.length == 2) { + beginPoint = coords[0].split(","); + endPoint = coords[1].split(","); + } + } + if (beginPoint !== null && endPoint !== null) { + return new OpenLayers.Bounds(parseFloat(beginPoint[0]), + parseFloat(beginPoint[1]), + parseFloat(endPoint[0]), + parseFloat(endPoint[1]) ); + } + } + + }, + + /** + * Method: parseAttributes + * + * Parameters: + * node - {DOMElement} + * + * Returns: + * {Object} An attributes object. + */ + parseAttributes: function(node) { + var attributes = {}; + // assume attributes are children of the first type 1 child + var childNode = node.firstChild; + var children, i, child, grandchildren, grandchild, name, value; + while(childNode) { + if(childNode.nodeType == 1) { + // attributes are type 1 children with one type 3 child + children = childNode.childNodes; + for(i=0; i becomes + // {fieldname: null} + attributes[child.nodeName.split(":").pop()] = null; + } + } + } + break; + } + childNode = childNode.nextSibling; + } + return attributes; + }, + + /** + * APIMethod: write + * Generate a GML document string given a list of features. + * + * Parameters: + * features - {Array()} List of features to + * serialize into a string. + * + * Returns: + * {String} A string representing the GML document. + */ + write: function(features) { + if(!(OpenLayers.Util.isArray(features))) { + features = [features]; + } + var gml = this.createElementNS("http://www.opengis.net/wfs", + "wfs:" + this.collectionName); + for(var i=0; i} The feature to be built as GML. + * + * Returns: + * {DOMElement} A node reprensting the feature in GML. + */ + createFeatureXML: function(feature) { + var geometry = feature.geometry; + var geometryNode = this.buildGeometryNode(geometry); + var geomContainer = this.createElementNS(this.featureNS, + this.featurePrefix + ":" + + this.geometryName); + geomContainer.appendChild(geometryNode); + var featureNode = this.createElementNS(this.gmlns, + "gml:" + this.featureName); + var featureContainer = this.createElementNS(this.featureNS, + this.featurePrefix + ":" + + this.layerName); + var fid = feature.fid || feature.id; + featureContainer.setAttribute("fid", fid); + featureContainer.appendChild(geomContainer); + for(var attr in feature.attributes) { + var attrText = this.createTextNode(feature.attributes[attr]); + var nodename = attr.substring(attr.lastIndexOf(":") + 1); + var attrContainer = this.createElementNS(this.featureNS, + this.featurePrefix + ":" + + nodename); + attrContainer.appendChild(attrText); + featureContainer.appendChild(attrContainer); + } + featureNode.appendChild(featureContainer); + return featureNode; + }, + + /** + * APIMethod: buildGeometryNode + */ + buildGeometryNode: function(geometry) { + if (this.externalProjection && this.internalProjection) { + geometry = geometry.clone(); + geometry.transform(this.internalProjection, + this.externalProjection); + } + var className = geometry.CLASS_NAME; + var type = className.substring(className.lastIndexOf(".") + 1); + var builder = this.buildGeometry[type.toLowerCase()]; + return builder.apply(this, [geometry]); + }, + + /** + * Property: buildGeometry + * Object containing methods to do the actual geometry node building + * based on geometry type. + */ + buildGeometry: { + // TBD retrieve the srs from layer + // srsName is non-standard, so not including it until it's right. + // gml.setAttribute("srsName", + // "http://www.opengis.net/gml/srs/epsg.xml#4326"); + + /** + * Method: buildGeometry.point + * Given an OpenLayers point geometry, create a GML point. + * + * Parameters: + * geometry - {} A point geometry. + * + * Returns: + * {DOMElement} A GML point node. + */ + point: function(geometry) { + var gml = this.createElementNS(this.gmlns, "gml:Point"); + gml.appendChild(this.buildCoordinatesNode(geometry)); + return gml; + }, + + /** + * Method: buildGeometry.multipoint + * Given an OpenLayers multipoint geometry, create a GML multipoint. + * + * Parameters: + * geometry - {} A multipoint geometry. + * + * Returns: + * {DOMElement} A GML multipoint node. + */ + multipoint: function(geometry) { + var gml = this.createElementNS(this.gmlns, "gml:MultiPoint"); + var points = geometry.components; + var pointMember, pointGeom; + for(var i=0; i} A linestring geometry. + * + * Returns: + * {DOMElement} A GML linestring node. + */ + linestring: function(geometry) { + var gml = this.createElementNS(this.gmlns, "gml:LineString"); + gml.appendChild(this.buildCoordinatesNode(geometry)); + return gml; + }, + + /** + * Method: buildGeometry.multilinestring + * Given an OpenLayers multilinestring geometry, create a GML + * multilinestring. + * + * Parameters: + * geometry - {} A multilinestring + * geometry. + * + * Returns: + * {DOMElement} A GML multilinestring node. + */ + multilinestring: function(geometry) { + var gml = this.createElementNS(this.gmlns, "gml:MultiLineString"); + var lines = geometry.components; + var lineMember, lineGeom; + for(var i=0; i} A linearring geometry. + * + * Returns: + * {DOMElement} A GML linearring node. + */ + linearring: function(geometry) { + var gml = this.createElementNS(this.gmlns, "gml:LinearRing"); + gml.appendChild(this.buildCoordinatesNode(geometry)); + return gml; + }, + + /** + * Method: buildGeometry.polygon + * Given an OpenLayers polygon geometry, create a GML polygon. + * + * Parameters: + * geometry - {} A polygon geometry. + * + * Returns: + * {DOMElement} A GML polygon node. + */ + polygon: function(geometry) { + var gml = this.createElementNS(this.gmlns, "gml:Polygon"); + var rings = geometry.components; + var ringMember, ringGeom, type; + for(var i=0; i} A multipolygon + * geometry. + * + * Returns: + * {DOMElement} A GML multipolygon node. + */ + multipolygon: function(geometry) { + var gml = this.createElementNS(this.gmlns, "gml:MultiPolygon"); + var polys = geometry.components; + var polyMember, polyGeom; + for(var i=0; i} A bounds object. + * + * Returns: + * {DOMElement} A GML box node. + */ + bounds: function(bounds) { + var gml = this.createElementNS(this.gmlns, "gml:Box"); + gml.appendChild(this.buildCoordinatesNode(bounds)); + return gml; + } + }, + + /** + * Method: buildCoordinates + * builds the coordinates XmlNode + * (code) + * ... + * (end) + * Parameters: + * geometry - {} + * + * Returns: + * {XmlNode} created xmlNode + */ + buildCoordinatesNode: function(geometry) { + var coordinatesNode = this.createElementNS(this.gmlns, + "gml:coordinates"); + coordinatesNode.setAttribute("decimal", "."); + coordinatesNode.setAttribute("cs", ","); + coordinatesNode.setAttribute("ts", " "); + + var parts = []; + + if(geometry instanceof OpenLayers.Bounds){ + parts.push(geometry.left + "," + geometry.bottom); + parts.push(geometry.right + "," + geometry.top); + } else { + var points = (geometry.components) ? geometry.components : [geometry]; + for(var i=0; i + */ +OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * Property: namespaces + * {Object} Mapping of namespace aliases to namespace URIs. + */ + namespaces: { + gml: "http://www.opengis.net/gml", + xlink: "http://www.w3.org/1999/xlink", + xsi: "http://www.w3.org/2001/XMLSchema-instance", + wfs: "http://www.opengis.net/wfs" // this is a convenience for reading wfs:FeatureCollection + }, + + /** + * Property: defaultPrefix + */ + defaultPrefix: "gml", + + /** + * Property: schemaLocation + * {String} Schema location for a particular minor version. + */ + schemaLocation: null, + + /** + * APIProperty: featureType + * {Array(String) or String} The local (without prefix) feature typeName(s). + */ + featureType: null, + + /** + * APIProperty: featureNS + * {String} The feature namespace. Must be set in the options at + * construction. + */ + featureNS: null, + + /** + * APIProperty: geometry + * {String} Name of geometry element. Defaults to "geometry". If null, it + * will be set on when the first geometry is parsed. + */ + geometryName: "geometry", + + /** + * APIProperty: extractAttributes + * {Boolean} Extract attributes from GML. Default is true. + */ + extractAttributes: true, + + /** + * APIProperty: srsName + * {String} URI for spatial reference system. This is optional for + * single part geometries and mandatory for collections and multis. + * If set, the srsName attribute will be written for all geometries. + * Default is null. + */ + srsName: null, + + /** + * APIProperty: xy + * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) + * Changing is not recommended, a new Format should be instantiated. + */ + xy: true, + + /** + * Property: geometryTypes + * {Object} Maps OpenLayers geometry class names to GML element names. + * Use before accessing this property. + */ + geometryTypes: null, + + /** + * Property: singleFeatureType + * {Boolean} True if there is only 1 featureType, and not an array + * of featuretypes. + */ + singleFeatureType: null, + + /** + * Property: autoConfig + * {Boolean} Indicates if the format was configured without a , + * but auto-configured and during read. + * Subclasses making use of auto-configuration should make + * the first call to the method (usually in the read method) + * with true as 3rd argument, so the auto-configured featureType can be + * reset and the format can be reused for subsequent reads with data from + * different featureTypes. Set to false after read if you want to keep the + * auto-configured values. + */ + + /** + * Property: regExes + * Compiled regular expressions for manipulating strings. + */ + regExes: { + trimSpace: (/^\s*|\s*$/g), + removeSpace: (/\s*/g), + splitSpace: (/\s+/), + trimComma: (/\s*,\s*/g), + featureMember: (/^(.*:)?featureMembers?$/) + }, + + /** + * Constructor: OpenLayers.Format.GML.Base + * Instances of this class are not created directly. Use the + * or constructor + * instead. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + * + * Valid options properties: + * featureType - {Array(String) or String} Local (without prefix) feature + * typeName(s) (required for write). + * featureNS - {String} Feature namespace (required for write). + * geometryName - {String} Geometry element name (required for write). + */ + initialize: function(options) { + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + this.setGeometryTypes(); + if(options && options.featureNS) { + this.setNamespace("feature", options.featureNS); + } + this.singleFeatureType = !options || (typeof options.featureType === "string"); + }, + + /** + * Method: read + * + * Parameters: + * data - {DOMElement} A gml:featureMember element, a gml:featureMembers + * element, or an element containing either of the above at any level. + * + * Returns: + * {Array()} An array of features. + */ + read: function(data) { + if(typeof data == "string") { + data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); + } + if(data && data.nodeType == 9) { + data = data.documentElement; + } + var features = []; + this.readNode(data, {features: features}, true); + if(features.length == 0) { + // look for gml:featureMember elements + var elements = this.getElementsByTagNameNS( + data, this.namespaces.gml, "featureMember" + ); + if(elements.length) { + for(var i=0, len=elements.length; i 0) { + obj.bounds = container.components[0]; + } + }, + "Point": function(node, container) { + var obj = {points: []}; + this.readChildNodes(node, obj); + if(!container.components) { + container.components = []; + } + container.components.push(obj.points[0]); + }, + "coordinates": function(node, obj) { + var str = this.getChildValue(node).replace( + this.regExes.trimSpace, "" + ); + str = str.replace(this.regExes.trimComma, ","); + var pointList = str.split(this.regExes.splitSpace); + var coords; + var numPoints = pointList.length; + var points = new Array(numPoints); + for(var i=0; i) | OpenLayers.Feature.Vector} + * An array of features or a single feature. + * + * Returns: + * {String} Given an array of features, a doc with a gml:featureMembers + * element will be returned. Given a single feature, a doc with a + * gml:featureMember element will be returned. + */ + write: function(features) { + var name; + if(OpenLayers.Util.isArray(features)) { + name = "featureMembers"; + } else { + name = "featureMember"; + } + var root = this.writeNode("gml:" + name, features); + this.setAttributeNS( + root, this.namespaces["xsi"], + "xsi:schemaLocation", this.schemaLocation + ); + + return OpenLayers.Format.XML.prototype.write.apply(this, [root]); + }, + + /** + * Property: writers + * As a compliment to the readers property, this structure contains public + * writing functions grouped by namespace alias and named like the + * node names they produce. + */ + writers: { + "gml": { + "featureMember": function(feature) { + var node = this.createElementNSPlus("gml:featureMember"); + this.writeNode("feature:_typeName", feature, node); + return node; + }, + "MultiPoint": function(geometry) { + var node = this.createElementNSPlus("gml:MultiPoint"); + var components = geometry.components || [geometry]; + for(var i=0, ii=components.length; i mapping. + */ + setGeometryTypes: function() { + this.geometryTypes = { + "OpenLayers.Geometry.Point": "Point", + "OpenLayers.Geometry.MultiPoint": "MultiPoint", + "OpenLayers.Geometry.LineString": "LineString", + "OpenLayers.Geometry.MultiLineString": "MultiLineString", + "OpenLayers.Geometry.Polygon": "Polygon", + "OpenLayers.Geometry.MultiPolygon": "MultiPolygon", + "OpenLayers.Geometry.Collection": "GeometryCollection" + }; + }, + + CLASS_NAME: "OpenLayers.Format.GML.Base" + +}); diff --git a/openlayers/lib/OpenLayers/Format/GML/v2.js b/openlayers/lib/OpenLayers/Format/GML/v2.js new file mode 100644 index 0000000000..d4a80be4f6 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/GML/v2.js @@ -0,0 +1,193 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/GML/Base.js + */ + +/** + * Class: OpenLayers.Format.GML.v2 + * Parses GML version 2. + * + * Inherits from: + * - + */ +OpenLayers.Format.GML.v2 = OpenLayers.Class(OpenLayers.Format.GML.Base, { + + /** + * Property: schemaLocation + * {String} Schema location for a particular minor version. + */ + schemaLocation: "http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd", + + /** + * Constructor: OpenLayers.Format.GML.v2 + * Create a parser for GML v2. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + * + * Valid options properties: + * featureType - {String} Local (without prefix) feature typeName (required). + * featureNS - {String} Feature namespace (required). + * geometryName - {String} Geometry element name. + */ + initialize: function(options) { + OpenLayers.Format.GML.Base.prototype.initialize.apply(this, [options]); + }, + + /** + * Property: readers + * Contains public functions, grouped by namespace prefix, that will + * be applied when a namespaced node is found matching the function + * name. The function will be applied in the scope of this parser + * with two arguments: the node being read and a context object passed + * from the parent. + */ + readers: { + "gml": OpenLayers.Util.applyDefaults({ + "outerBoundaryIs": function(node, container) { + var obj = {}; + this.readChildNodes(node, obj); + container.outer = obj.components[0]; + }, + "innerBoundaryIs": function(node, container) { + var obj = {}; + this.readChildNodes(node, obj); + container.inner.push(obj.components[0]); + }, + "Box": function(node, container) { + var obj = {}; + this.readChildNodes(node, obj); + if(!container.components) { + container.components = []; + } + var min = obj.points[0]; + var max = obj.points[1]; + container.components.push( + new OpenLayers.Bounds(min.x, min.y, max.x, max.y) + ); + } + }, OpenLayers.Format.GML.Base.prototype.readers["gml"]), + "feature": OpenLayers.Format.GML.Base.prototype.readers["feature"], + "wfs": OpenLayers.Format.GML.Base.prototype.readers["wfs"] + }, + + /** + * Method: write + * + * Parameters: + * features - {Array() | OpenLayers.Feature.Vector} + * An array of features or a single feature. + * + * Returns: + * {String} Given an array of features, a doc with a gml:featureMembers + * element will be returned. Given a single feature, a doc with a + * gml:featureMember element will be returned. + */ + write: function(features) { + var name; + if(OpenLayers.Util.isArray(features)) { + // GML2 only has abstract feature collections + // wfs provides a feature collection from a well-known schema + name = "wfs:FeatureCollection"; + } else { + name = "gml:featureMember"; + } + var root = this.writeNode(name, features); + this.setAttributeNS( + root, this.namespaces["xsi"], + "xsi:schemaLocation", this.schemaLocation + ); + + return OpenLayers.Format.XML.prototype.write.apply(this, [root]); + }, + + /** + * Property: writers + * As a compliment to the readers property, this structure contains public + * writing functions grouped by namespace alias and named like the + * node names they produce. + */ + writers: { + "gml": OpenLayers.Util.applyDefaults({ + "Point": function(geometry) { + var node = this.createElementNSPlus("gml:Point"); + this.writeNode("coordinates", [geometry], node); + return node; + }, + "coordinates": function(points) { + var numPoints = points.length; + var parts = new Array(numPoints); + var point; + for(var i=0; i + */ +OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { + + /** + * Property: schemaLocation + * {String} Schema location for a particular minor version. The writers + * conform with the Simple Features Profile for GML. + */ + schemaLocation: "http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd", + + /** + * Property: curve + * {Boolean} Write gml:Curve instead of gml:LineString elements. This also + * affects the elements in multi-part geometries. Default is false. + * To write gml:Curve elements instead of gml:LineString, set curve + * to true in the options to the contstructor (cannot be changed after + * instantiation). + */ + curve: false, + + /** + * Property: multiCurve + * {Boolean} Write gml:MultiCurve instead of gml:MultiLineString. Since + * the latter is deprecated in GML 3, the default is true. To write + * gml:MultiLineString instead of gml:MultiCurve, set multiCurve to + * false in the options to the constructor (cannot be changed after + * instantiation). + */ + multiCurve: true, + + /** + * Property: surface + * {Boolean} Write gml:Surface instead of gml:Polygon elements. This also + * affects the elements in multi-part geometries. Default is false. + * To write gml:Surface elements instead of gml:Polygon, set surface + * to true in the options to the contstructor (cannot be changed after + * instantiation). + */ + surface: false, + + /** + * Property: multiSurface + * {Boolean} Write gml:multiSurface instead of gml:MultiPolygon. Since + * the latter is deprecated in GML 3, the default is true. To write + * gml:MultiPolygon instead of gml:multiSurface, set multiSurface to + * false in the options to the constructor (cannot be changed after + * instantiation). + */ + multiSurface: true, + + /** + * Constructor: OpenLayers.Format.GML.v3 + * Create a parser for GML v3. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + * + * Valid options properties: + * featureType - {String} Local (without prefix) feature typeName (required). + * featureNS - {String} Feature namespace (required). + * geometryName - {String} Geometry element name. + */ + initialize: function(options) { + OpenLayers.Format.GML.Base.prototype.initialize.apply(this, [options]); + }, + + /** + * Property: readers + * Contains public functions, grouped by namespace prefix, that will + * be applied when a namespaced node is found matching the function + * name. The function will be applied in the scope of this parser + * with two arguments: the node being read and a context object passed + * from the parent. + */ + readers: { + "gml": OpenLayers.Util.applyDefaults({ + "featureMembers": function(node, obj) { + this.readChildNodes(node, obj); + }, + "Curve": function(node, container) { + var obj = {points: []}; + this.readChildNodes(node, obj); + if(!container.components) { + container.components = []; + } + container.components.push( + new OpenLayers.Geometry.LineString(obj.points) + ); + }, + "segments": function(node, obj) { + this.readChildNodes(node, obj); + }, + "LineStringSegment": function(node, container) { + var obj = {}; + this.readChildNodes(node, obj); + if(obj.points) { + Array.prototype.push.apply(container.points, obj.points); + } + }, + "pos": function(node, obj) { + var str = this.getChildValue(node).replace( + this.regExes.trimSpace, "" + ); + var coords = str.split(this.regExes.splitSpace); + var point; + if(this.xy) { + point = new OpenLayers.Geometry.Point( + coords[0], coords[1], coords[2] + ); + } else { + point = new OpenLayers.Geometry.Point( + coords[1], coords[0], coords[2] + ); + } + obj.points = [point]; + }, + "posList": function(node, obj) { + var str = this.getChildValue(node).replace( + this.regExes.trimSpace, "" + ); + var coords = str.split(this.regExes.splitSpace); + var dim = parseInt(node.getAttribute("dimension")) || 2; + var j, x, y, z; + var numPoints = coords.length / dim; + var points = new Array(numPoints); + for(var i=0, len=coords.length; i 0) { + container.components = [ + new OpenLayers.Geometry.MultiLineString(obj.components) + ]; + } + }, + "curveMember": function(node, obj) { + this.readChildNodes(node, obj); + }, + "MultiSurface": function(node, container) { + var obj = {components: []}; + this.readChildNodes(node, obj); + if(obj.components.length > 0) { + container.components = [ + new OpenLayers.Geometry.MultiPolygon(obj.components) + ]; + } + }, + "surfaceMember": function(node, obj) { + this.readChildNodes(node, obj); + }, + "surfaceMembers": function(node, obj) { + this.readChildNodes(node, obj); + }, + "pointMembers": function(node, obj) { + this.readChildNodes(node, obj); + }, + "lineStringMembers": function(node, obj) { + this.readChildNodes(node, obj); + }, + "polygonMembers": function(node, obj) { + this.readChildNodes(node, obj); + }, + "geometryMembers": function(node, obj) { + this.readChildNodes(node, obj); + }, + "Envelope": function(node, container) { + var obj = {points: new Array(2)}; + this.readChildNodes(node, obj); + if(!container.components) { + container.components = []; + } + var min = obj.points[0]; + var max = obj.points[1]; + container.components.push( + new OpenLayers.Bounds(min.x, min.y, max.x, max.y) + ); + }, + "lowerCorner": function(node, container) { + var obj = {}; + this.readers.gml.pos.apply(this, [node, obj]); + container.points[0] = obj.points[0]; + }, + "upperCorner": function(node, container) { + var obj = {}; + this.readers.gml.pos.apply(this, [node, obj]); + container.points[1] = obj.points[0]; + } + }, OpenLayers.Format.GML.Base.prototype.readers["gml"]), + "feature": OpenLayers.Format.GML.Base.prototype.readers["feature"], + "wfs": OpenLayers.Format.GML.Base.prototype.readers["wfs"] + }, + + /** + * Method: write + * + * Parameters: + * features - {Array() | OpenLayers.Feature.Vector} + * An array of features or a single feature. + * + * Returns: + * {String} Given an array of features, a doc with a gml:featureMembers + * element will be returned. Given a single feature, a doc with a + * gml:featureMember element will be returned. + */ + write: function(features) { + var name; + if(OpenLayers.Util.isArray(features)) { + name = "featureMembers"; + } else { + name = "featureMember"; + } + var root = this.writeNode("gml:" + name, features); + this.setAttributeNS( + root, this.namespaces["xsi"], + "xsi:schemaLocation", this.schemaLocation + ); + + return OpenLayers.Format.XML.prototype.write.apply(this, [root]); + }, + + /** + * Property: writers + * As a compliment to the readers property, this structure contains public + * writing functions grouped by namespace alias and named like the + * node names they produce. + */ + writers: { + "gml": OpenLayers.Util.applyDefaults({ + "featureMembers": function(features) { + var node = this.createElementNSPlus("gml:featureMembers"); + for(var i=0, len=features.length; i mapping. + */ + setGeometryTypes: function() { + this.geometryTypes = { + "OpenLayers.Geometry.Point": "Point", + "OpenLayers.Geometry.MultiPoint": "MultiPoint", + "OpenLayers.Geometry.LineString": (this.curve === true) ? "Curve": "LineString", + "OpenLayers.Geometry.MultiLineString": (this.multiCurve === false) ? "MultiLineString" : "MultiCurve", + "OpenLayers.Geometry.Polygon": (this.surface === true) ? "Surface" : "Polygon", + "OpenLayers.Geometry.MultiPolygon": (this.multiSurface === false) ? "MultiPolygon" : "MultiSurface", + "OpenLayers.Geometry.Collection": "GeometryCollection" + }; + }, + + CLASS_NAME: "OpenLayers.Format.GML.v3" + +}); diff --git a/openlayers/lib/OpenLayers/Format/GPX.js b/openlayers/lib/OpenLayers/Format/GPX.js new file mode 100644 index 0000000000..63170feea3 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/GPX.js @@ -0,0 +1,184 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Projection.js + */ + +/** + * Class: OpenLayers.Format.GPX + * Read/write GPX parser. Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { + /** + * APIProperty: extractWaypoints + * {Boolean} Extract waypoints from GPX. (default: true) + */ + extractWaypoints: true, + + /** + * APIProperty: extractTracks + * {Boolean} Extract tracks from GPX. (default: true) + */ + extractTracks: true, + + /** + * APIProperty: extractRoutes + * {Boolean} Extract routes from GPX. (default: true) + */ + extractRoutes: true, + + /** + * APIProperty: extractAttributes + * {Boolean} Extract feature attributes from GPX. (default: true) + * NOTE: Attributes as part of extensions to the GPX standard may not + * be extracted. + */ + extractAttributes: true, + + /** + * Constructor: OpenLayers.Format.GPX + * Create a new parser for GPX. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + // GPX coordinates are always in longlat WGS84 + this.externalProjection = new OpenLayers.Projection("EPSG:4326"); + + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: read + * Return a list of features from a GPX doc + * + * Parameters: + * doc - {Element} + * + * Returns: + * An Array of s + */ + read: function(doc) { + if (typeof doc == "string") { + doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]); + } + var features = []; + + if(this.extractTracks) { + var tracks = doc.getElementsByTagName("trk"); + for (var i=0, len=tracks.length; i} A linestring geometry + */ + extractSegment: function(segment, segmentType) { + var points = this.getElementsByTagNameNS(segment, segment.namespaceURI, segmentType); + var point_features = []; + for (var i = 0, len = points.length; i < len; i++) { + point_features.push(new OpenLayers.Geometry.Point(points[i].getAttribute("lon"), points[i].getAttribute("lat"))); + } + return new OpenLayers.Geometry.LineString(point_features); + }, + + /** + * Method: parseAttributes + * + * Parameters: + * node - {} + * + * Returns: + * {Object} An attributes object. + */ + parseAttributes: function(node) { + // node is either a wpt, trk or rte + // attributes are children of the form value + var attributes = {}; + var attrNode = node.firstChild, value, name; + while(attrNode) { + if(attrNode.nodeType == 1) { + value = attrNode.firstChild; + if(value.nodeType == 3 || value.nodeType == 4) { + name = (attrNode.prefix) ? + attrNode.nodeName.split(":")[1] : + attrNode.nodeName; + if(name != "trkseg" && name != "rtept") { + attributes[name] = value.nodeValue; + } + } + } + attrNode = attrNode.nextSibling; + } + return attributes; + }, + + CLASS_NAME: "OpenLayers.Format.GPX" +}); diff --git a/openlayers/lib/OpenLayers/Format/GeoJSON.js b/openlayers/lib/OpenLayers/Format/GeoJSON.js new file mode 100644 index 0000000000..8e9f49a855 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/GeoJSON.js @@ -0,0 +1,716 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Format/JSON.js + * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/MultiPoint.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Geometry/MultiLineString.js + * @requires OpenLayers/Geometry/Polygon.js + * @requires OpenLayers/Geometry/MultiPolygon.js + * @requires OpenLayers/Console.js + */ + +/** + * Class: OpenLayers.Format.GeoJSON + * Read and write GeoJSON. Create a new parser with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { + + /** + * APIProperty: ignoreExtraDims + * {Boolean} Ignore dimensions higher than 2 when reading geometry + * coordinates. + */ + ignoreExtraDims: false, + + /** + * Constructor: OpenLayers.Format.GeoJSON + * Create a new parser for GeoJSON. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + + /** + * APIMethod: read + * Deserialize a GeoJSON string. + * + * Parameters: + * json - {String} A GeoJSON string + * type - {String} Optional string that determines the structure of + * the output. Supported values are "Geometry", "Feature", and + * "FeatureCollection". If absent or null, a default of + * "FeatureCollection" is assumed. + * filter - {Function} A function which will be called for every key and + * value at every level of the final result. Each value will be + * replaced by the result of the filter function. This can be used to + * reform generic objects into instances of classes, or to transform + * date strings into Date objects. + * + * Returns: + * {Object} The return depends on the value of the type argument. If type + * is "FeatureCollection" (the default), the return will be an array + * of . If type is "Geometry", the input json + * must represent a single geometry, and the return will be an + * . If type is "Feature", the input json must + * represent a single feature, and the return will be an + * . + */ + read: function(json, type, filter) { + type = (type) ? type : "FeatureCollection"; + var results = null; + var obj = null; + if (typeof json == "string") { + obj = OpenLayers.Format.JSON.prototype.read.apply(this, + [json, filter]); + } else { + obj = json; + } + if(!obj) { + OpenLayers.Console.error("Bad JSON: " + json); + } else if(typeof(obj.type) != "string") { + OpenLayers.Console.error("Bad GeoJSON - no type: " + json); + } else if(this.isValidType(obj, type)) { + switch(type) { + case "Geometry": + try { + results = this.parseGeometry(obj); + } catch(err) { + OpenLayers.Console.error(err); + } + break; + case "Feature": + try { + results = this.parseFeature(obj); + results.type = "Feature"; + } catch(err) { + OpenLayers.Console.error(err); + } + break; + case "FeatureCollection": + // for type FeatureCollection, we allow input to be any type + results = []; + switch(obj.type) { + case "Feature": + try { + results.push(this.parseFeature(obj)); + } catch(err) { + results = null; + OpenLayers.Console.error(err); + } + break; + case "FeatureCollection": + for(var i=0, len=obj.features.length; i. + * + * Parameters: + * obj - {Object} An object created from a GeoJSON object + * + * Returns: + * {} A feature. + */ + parseFeature: function(obj) { + var feature, geometry, attributes, bbox; + attributes = (obj.properties) ? obj.properties : {}; + bbox = (obj.geometry && obj.geometry.bbox) || obj.bbox; + try { + geometry = this.parseGeometry(obj.geometry); + } catch(err) { + // deal with bad geometries + throw err; + } + feature = new OpenLayers.Feature.Vector(geometry, attributes); + if(bbox) { + feature.bounds = OpenLayers.Bounds.fromArray(bbox); + } + if(obj.id) { + feature.fid = obj.id; + } + return feature; + }, + + /** + * Method: parseGeometry + * Convert a geometry object from GeoJSON into an . + * + * Parameters: + * obj - {Object} An object created from a GeoJSON object + * + * Returns: + * {} A geometry. + */ + parseGeometry: function(obj) { + if (obj == null) { + return null; + } + var geometry, collection = false; + if(obj.type == "GeometryCollection") { + if(!(OpenLayers.Util.isArray(obj.geometries))) { + throw "GeometryCollection must have geometries array: " + obj; + } + var numGeom = obj.geometries.length; + var components = new Array(numGeom); + for(var i=0; i. + * + * Parameters: + * array - {Object} The coordinates array from the GeoJSON fragment. + * + * Returns: + * {} A geometry. + */ + "point": function(array) { + if (this.ignoreExtraDims == false && + array.length != 2) { + throw "Only 2D points are supported: " + array; + } + return new OpenLayers.Geometry.Point(array[0], array[1]); + }, + + /** + * Method: parseCoords.multipoint + * Convert a coordinate array from GeoJSON into an + * . + * + * Parameters: + * array {Object} The coordinates array from the GeoJSON fragment. + * + * Returns: + * {} A geometry. + */ + "multipoint": function(array) { + var points = []; + var p = null; + for(var i=0, len=array.length; i. + * + * Parameters: + * array - {Object} The coordinates array from the GeoJSON fragment. + * + * Returns: + * {} A geometry. + */ + "linestring": function(array) { + var points = []; + var p = null; + for(var i=0, len=array.length; i. + * + * Parameters: + * array - {Object} The coordinates array from the GeoJSON fragment. + * + * Returns: + * {} A geometry. + */ + "multilinestring": function(array) { + var lines = []; + var l = null; + for(var i=0, len=array.length; i. + * + * Returns: + * {} A geometry. + */ + "polygon": function(array) { + var rings = []; + var r, l; + for(var i=0, len=array.length; i. + * + * Parameters: + * array - {Object} The coordinates array from the GeoJSON fragment. + * + * Returns: + * {} A geometry. + */ + "multipolygon": function(array) { + var polys = []; + var p = null; + for(var i=0, len=array.length; i. + * + * Parameters: + * array - {Object} The coordinates array from the GeoJSON fragment. + * + * Returns: + * {} A geometry. + */ + "box": function(array) { + if(array.length != 2) { + throw "GeoJSON box coordinates must have 2 elements"; + } + return new OpenLayers.Geometry.Polygon([ + new OpenLayers.Geometry.LinearRing([ + new OpenLayers.Geometry.Point(array[0][0], array[0][1]), + new OpenLayers.Geometry.Point(array[1][0], array[0][1]), + new OpenLayers.Geometry.Point(array[1][0], array[1][1]), + new OpenLayers.Geometry.Point(array[0][0], array[1][1]), + new OpenLayers.Geometry.Point(array[0][0], array[0][1]) + ]) + ]); + } + + }, + + /** + * APIMethod: write + * Serialize a feature, geometry, array of features into a GeoJSON string. + * + * Parameters: + * obj - {Object} An , , + * or an array of features. + * pretty - {Boolean} Structure the output with newlines and indentation. + * Default is false. + * + * Returns: + * {String} The GeoJSON string representation of the input geometry, + * features, or array of features. + */ + write: function(obj, pretty) { + var geojson = { + "type": null + }; + if(OpenLayers.Util.isArray(obj)) { + geojson.type = "FeatureCollection"; + var numFeatures = obj.length; + geojson.features = new Array(numFeatures); + for(var i=0; i} + * + * Returns: + * {Object} An object which can be assigned to the crs property + * of a GeoJSON object. + */ + createCRSObject: function(object) { + var proj = object.layer.projection.toString(); + var crs = {}; + if (proj.match(/epsg:/i)) { + var code = parseInt(proj.substring(proj.indexOf(":") + 1)); + if (code == 4326) { + crs = { + "type": "name", + "properties": { + "name": "urn:ogc:def:crs:OGC:1.3:CRS84" + } + }; + } else { + crs = { + "type": "name", + "properties": { + "name": "EPSG:" + code + } + }; + } + } + return crs; + }, + + /** + * Property: extract + * Object with properties corresponding to the GeoJSON types. + * Property values are functions that do the actual value extraction. + */ + extract: { + /** + * Method: extract.feature + * Return a partial GeoJSON object representing a single feature. + * + * Parameters: + * feature - {} + * + * Returns: + * {Object} An object representing the point. + */ + 'feature': function(feature) { + var geom = this.extract.geometry.apply(this, [feature.geometry]); + var json = { + "type": "Feature", + "properties": feature.attributes, + "geometry": geom + }; + if (feature.fid != null) { + json.id = feature.fid; + } + return json; + }, + + /** + * Method: extract.geometry + * Return a GeoJSON object representing a single geometry. + * + * Parameters: + * geometry - {} + * + * Returns: + * {Object} An object representing the geometry. + */ + 'geometry': function(geometry) { + if (geometry == null) { + return null; + } + if (this.internalProjection && this.externalProjection) { + geometry = geometry.clone(); + geometry.transform(this.internalProjection, + this.externalProjection); + } + var geometryType = geometry.CLASS_NAME.split('.')[2]; + var data = this.extract[geometryType.toLowerCase()].apply(this, [geometry]); + var json; + if(geometryType == "Collection") { + json = { + "type": "GeometryCollection", + "geometries": data + }; + } else { + json = { + "type": geometryType, + "coordinates": data + }; + } + + return json; + }, + + /** + * Method: extract.point + * Return an array of coordinates from a point. + * + * Parameters: + * point - {} + * + * Returns: + * {Array} An array of coordinates representing the point. + */ + 'point': function(point) { + return [point.x, point.y]; + }, + + /** + * Method: extract.multipoint + * Return an array of point coordinates from a multipoint. + * + * Parameters: + * multipoint - {} + * + * Returns: + * {Array} An array of point coordinate arrays representing + * the multipoint. + */ + 'multipoint': function(multipoint) { + var array = []; + for(var i=0, len=multipoint.components.length; i} + * + * Returns: + * {Array} An array of coordinate arrays representing + * the linestring. + */ + 'linestring': function(linestring) { + var array = []; + for(var i=0, len=linestring.components.length; i} + * + * Returns: + * {Array} An array of linestring arrays representing + * the multilinestring. + */ + 'multilinestring': function(multilinestring) { + var array = []; + for(var i=0, len=multilinestring.components.length; i} + * + * Returns: + * {Array} An array of linear ring arrays representing the polygon. + */ + 'polygon': function(polygon) { + var array = []; + for(var i=0, len=polygon.components.length; i} + * + * Returns: + * {Array} An array of polygon arrays representing + * the multipolygon + */ + 'multipolygon': function(multipolygon) { + var array = []; + for(var i=0, len=multipolygon.components.length; i} + * + * Returns: + * {Array} An array of geometry objects representing the geometry + * collection. + */ + 'collection': function(collection) { + var len = collection.components.length; + var array = new Array(len); + for(var i=0; i constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * APIProperty: rssns + * {String} RSS namespace to use. Defaults to + * "http://backend.userland.com/rss2" + */ + rssns: "http://backend.userland.com/rss2", + + /** + * APIProperty: featurens + * {String} Feature Attributes namespace. Defaults to + * "http://mapserver.gis.umn.edu/mapserver" + */ + featureNS: "http://mapserver.gis.umn.edu/mapserver", + + /** + * APIProperty: georssns + * {String} GeoRSS namespace to use. Defaults to + * "http://www.georss.org/georss" + */ + georssns: "http://www.georss.org/georss", + + /** + * APIProperty: geons + * {String} W3C Geo namespace to use. Defaults to + * "http://www.w3.org/2003/01/geo/wgs84_pos#" + */ + geons: "http://www.w3.org/2003/01/geo/wgs84_pos#", + + /** + * APIProperty: featureTitle + * {String} Default title for features. Defaults to "Untitled" + */ + featureTitle: "Untitled", + + /** + * APIProperty: featureDescription + * {String} Default description for features. Defaults to "No Description" + */ + featureDescription: "No Description", + + /** + * Property: gmlParse + * {Object} GML Format object for parsing features + * Non-API and only created if necessary + */ + gmlParser: null, + + /** + * APIProperty: xy + * {Boolean} Order of the GML coordinate: true:(x,y) or false:(y,x) + * For GeoRSS the default is (y,x), therefore: false + */ + xy: false, + + /** + * Constructor: OpenLayers.Format.GeoRSS + * Create a new parser for GeoRSS. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + + /** + * Method: createGeometryFromItem + * Return a geometry from a GeoRSS Item. + * + * Parameters: + * item - {DOMElement} A GeoRSS item node. + * + * Returns: + * {} A geometry representing the node. + */ + createGeometryFromItem: function(item) { + var point = this.getElementsByTagNameNS(item, this.georssns, "point"); + var lat = this.getElementsByTagNameNS(item, this.geons, 'lat'); + var lon = this.getElementsByTagNameNS(item, this.geons, 'long'); + + var line = this.getElementsByTagNameNS(item, + this.georssns, + "line"); + var polygon = this.getElementsByTagNameNS(item, + this.georssns, + "polygon"); + var where = this.getElementsByTagNameNS(item, + this.georssns, + "where"); + var box = this.getElementsByTagNameNS(item, + this.georssns, + "box"); + + if (point.length > 0 || (lat.length > 0 && lon.length > 0)) { + var location; + if (point.length > 0) { + location = OpenLayers.String.trim( + point[0].firstChild.nodeValue).split(/\s+/); + if (location.length !=2) { + location = OpenLayers.String.trim( + point[0].firstChild.nodeValue).split(/\s*,\s*/); + } + } else { + location = [parseFloat(lat[0].firstChild.nodeValue), + parseFloat(lon[0].firstChild.nodeValue)]; + } + + var geometry = new OpenLayers.Geometry.Point(parseFloat(location[1]), + parseFloat(location[0])); + + } else if (line.length > 0) { + var coords = OpenLayers.String.trim(this.concatChildValues(line[0])).split(/\s+/); + var components = []; + var point; + for (var i=0, len=coords.length; i 0) { + var coords = OpenLayers.String.trim(this.concatChildValues(polygon[0])).split(/\s+/); + var components = []; + var point; + for (var i=0, len=coords.length; i 0) { + if (!this.gmlParser) { + this.gmlParser = new OpenLayers.Format.GML({'xy': this.xy}); + } + var feature = this.gmlParser.parseFeature(where[0]); + geometry = feature.geometry; + } else if (box.length > 0) { + var coords = OpenLayers.String.trim(box[0].firstChild.nodeValue).split(/\s+/); + var components = []; + var point; + if (coords.length > 3) { + point = new OpenLayers.Geometry.Point(parseFloat(coords[1]), + parseFloat(coords[0])); + components.push(point); + point = new OpenLayers.Geometry.Point(parseFloat(coords[1]), + parseFloat(coords[2])); + components.push(point); + point = new OpenLayers.Geometry.Point(parseFloat(coords[3]), + parseFloat(coords[2])); + components.push(point); + point = new OpenLayers.Geometry.Point(parseFloat(coords[3]), + parseFloat(coords[0])); + components.push(point); + point = new OpenLayers.Geometry.Point(parseFloat(coords[1]), + parseFloat(coords[0])); + components.push(point); + } + geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]); + } + + if (geometry && this.internalProjection && this.externalProjection) { + geometry.transform(this.externalProjection, + this.internalProjection); + } + + return geometry; + }, + + /** + * Method: createFeatureFromItem + * Return a feature from a GeoRSS Item. + * + * Parameters: + * item - {DOMElement} A GeoRSS item node. + * + * Returns: + * {} A feature representing the item. + */ + createFeatureFromItem: function(item) { + var geometry = this.createGeometryFromItem(item); + + /* Provide defaults for title and description */ + var title = this.getChildValue(item, "*", "title", this.featureTitle); + + /* First try RSS descriptions, then Atom summaries */ + var description = this.getChildValue( + item, "*", "description", + this.getChildValue(item, "*", "content", + this.getChildValue(item, "*", "summary", this.featureDescription))); + + /* If no link URL is found in the first child node, try the + href attribute */ + var link = this.getChildValue(item, "*", "link"); + if(!link) { + try { + link = this.getElementsByTagNameNS(item, "*", "link")[0].getAttribute("href"); + } catch(e) { + link = null; + } + } + + var id = this.getChildValue(item, "*", "id", null); + + var data = { + "title": title, + "description": description, + "link": link + }; + var feature = new OpenLayers.Feature.Vector(geometry, data); + feature.fid = id; + return feature; + }, + + /** + * Method: getChildValue + * + * Parameters: + * node - {DOMElement} + * nsuri - {String} Child node namespace uri ("*" for any). + * name - {String} Child node name. + * def - {String} Optional string default to return if no child found. + * + * Returns: + * {String} The value of the first child with the given tag name. Returns + * default value or empty string if none found. + */ + getChildValue: function(node, nsuri, name, def) { + var value; + var eles = this.getElementsByTagNameNS(node, nsuri, name); + if(eles && eles[0] && eles[0].firstChild + && eles[0].firstChild.nodeValue) { + value = OpenLayers.Format.XML.prototype.getChildValue(eles[0]); + } else { + value = (def == undefined) ? "" : def; + } + return value; + }, + + /** + * APIMethod: read + * Return a list of features from a GeoRSS doc + * + * Parameters: + * doc - {Element} + * + * Returns: + * {Array()} + */ + read: function(doc) { + if (typeof doc == "string") { + doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]); + } + + /* Try RSS items first, then Atom entries */ + var itemlist = null; + itemlist = this.getElementsByTagNameNS(doc, '*', 'item'); + if (itemlist.length == 0) { + itemlist = this.getElementsByTagNameNS(doc, '*', 'entry'); + } + + var numItems = itemlist.length; + var features = new Array(numItems); + for(var i=0; i)} List of features to serialize into a string. + */ + write: function(features) { + var georss; + if(OpenLayers.Util.isArray(features)) { + georss = this.createElementNS(this.rssns, "rss"); + for(var i=0, len=features.length; i, and build a geometry for it. + * + * Parameters: + * feature - {} + * + * Returns: + * {DOMElement} + */ + createFeatureXML: function(feature) { + var geometryNode = this.buildGeometryNode(feature.geometry); + var featureNode = this.createElementNS(this.rssns, "item"); + var titleNode = this.createElementNS(this.rssns, "title"); + titleNode.appendChild(this.createTextNode(feature.attributes.title ? feature.attributes.title : "")); + var descNode = this.createElementNS(this.rssns, "description"); + descNode.appendChild(this.createTextNode(feature.attributes.description ? feature.attributes.description : "")); + featureNode.appendChild(titleNode); + featureNode.appendChild(descNode); + if (feature.attributes.link) { + var linkNode = this.createElementNS(this.rssns, "link"); + linkNode.appendChild(this.createTextNode(feature.attributes.link)); + featureNode.appendChild(linkNode); + } + for(var attr in feature.attributes) { + if (attr == "link" || attr == "title" || attr == "description") { continue; } + var attrText = this.createTextNode(feature.attributes[attr]); + var nodename = attr; + if (attr.search(":") != -1) { + nodename = attr.split(":")[1]; + } + var attrContainer = this.createElementNS(this.featureNS, "feature:"+nodename); + attrContainer.appendChild(attrText); + featureNode.appendChild(attrContainer); + } + featureNode.appendChild(geometryNode); + return featureNode; + }, + + /** + * Method: buildGeometryNode + * builds a GeoRSS node with a given geometry + * + * Parameters: + * geometry - {} + * + * Returns: + * {DOMElement} A gml node. + */ + buildGeometryNode: function(geometry) { + if (this.internalProjection && this.externalProjection) { + geometry = geometry.clone(); + geometry.transform(this.internalProjection, + this.externalProjection); + } + var node; + // match Polygon + if (geometry.CLASS_NAME == "OpenLayers.Geometry.Polygon") { + node = this.createElementNS(this.georssns, 'georss:polygon'); + + node.appendChild(this.buildCoordinatesNode(geometry.components[0])); + } + // match LineString + else if (geometry.CLASS_NAME == "OpenLayers.Geometry.LineString") { + node = this.createElementNS(this.georssns, 'georss:line'); + + node.appendChild(this.buildCoordinatesNode(geometry)); + } + // match Point + else if (geometry.CLASS_NAME == "OpenLayers.Geometry.Point") { + node = this.createElementNS(this.georssns, 'georss:point'); + node.appendChild(this.buildCoordinatesNode(geometry)); + } else { + throw "Couldn't parse " + geometry.CLASS_NAME; + } + return node; + }, + + /** + * Method: buildCoordinatesNode + * + * Parameters: + * geometry - {} + */ + buildCoordinatesNode: function(geometry) { + var points = null; + + if (geometry.components) { + points = geometry.components; + } + + var path; + if (points) { + var numPoints = points.length; + var parts = new Array(numPoints); + for (var i = 0; i < numPoints; i++) { + parts[i] = points[i].y + " " + points[i].x; + } + path = parts.join(" "); + } else { + path = geometry.y + " " + geometry.x; + } + return this.createTextNode(path); + }, + + CLASS_NAME: "OpenLayers.Format.GeoRSS" +}); diff --git a/openlayers/lib/OpenLayers/Format/JSON.js b/openlayers/lib/OpenLayers/Format/JSON.js new file mode 100644 index 0000000000..10dee03656 --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/JSON.js @@ -0,0 +1,398 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * Note: + * This work draws heavily from the public domain JSON serializer/deserializer + * at http://www.json.org/json.js. Rewritten so that it doesn't modify + * basic data prototypes. + */ + +/** + * @requires OpenLayers/Format.js + */ + +/** + * Class: OpenLayers.Format.JSON + * A parser to read/write JSON safely. Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { + + /** + * APIProperty: indent + * {String} For "pretty" printing, the indent string will be used once for + * each indentation level. + */ + indent: " ", + + /** + * APIProperty: space + * {String} For "pretty" printing, the space string will be used after + * the ":" separating a name/value pair. + */ + space: " ", + + /** + * APIProperty: newline + * {String} For "pretty" printing, the newline string will be used at the + * end of each name/value pair or array item. + */ + newline: "\n", + + /** + * Property: level + * {Integer} For "pretty" printing, this is incremented/decremented during + * serialization. + */ + level: 0, + + /** + * Property: pretty + * {Boolean} Serialize with extra whitespace for structure. This is set + * by the method. + */ + pretty: false, + + /** + * Property: nativeJSON + * {Boolean} Does the browser support native json? + */ + nativeJSON: (function() { + return !!(window.JSON && typeof JSON.parse == "function" && typeof JSON.stringify == "function"); + })(), + + /** + * Constructor: OpenLayers.Format.JSON + * Create a new parser for JSON. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + + /** + * APIMethod: read + * Deserialize a json string. + * + * Parameters: + * json - {String} A JSON string + * filter - {Function} A function which will be called for every key and + * value at every level of the final result. Each value will be + * replaced by the result of the filter function. This can be used to + * reform generic objects into instances of classes, or to transform + * date strings into Date objects. + * + * Returns: + * {Object} An object, array, string, or number . + */ + read: function(json, filter) { + var object; + if (this.nativeJSON) { + object = JSON.parse(json, filter); + } else try { + /** + * Parsing happens in three stages. In the first stage, we run the + * text against a regular expression which looks for non-JSON + * characters. We are especially concerned with '()' and 'new' + * because they can cause invocation, and '=' because it can + * cause mutation. But just to be safe, we will reject all + * unexpected characters. + */ + if (/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g, '@'). + replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']'). + replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { + + /** + * In the second stage we use the eval function to compile the + * text into a JavaScript structure. The '{' operator is + * subject to a syntactic ambiguity in JavaScript - it can + * begin a block or an object literal. We wrap the text in + * parens to eliminate the ambiguity. + */ + object = eval('(' + json + ')'); + + /** + * In the optional third stage, we recursively walk the new + * structure, passing each name/value pair to a filter + * function for possible transformation. + */ + if(typeof filter === 'function') { + function walk(k, v) { + if(v && typeof v === 'object') { + for(var i in v) { + if(v.hasOwnProperty(i)) { + v[i] = walk(i, v[i]); + } + } + } + return filter(k, v); + } + object = walk('', object); + } + } + } catch(e) { + // Fall through if the regexp test fails. + } + + if(this.keepData) { + this.data = object; + } + + return object; + }, + + /** + * APIMethod: write + * Serialize an object into a JSON string. + * + * Parameters: + * value - {String} The object, array, string, number, boolean or date + * to be serialized. + * pretty - {Boolean} Structure the output with newlines and indentation. + * Default is false. + * + * Returns: + * {String} The JSON string representation of the input value. + */ + write: function(value, pretty) { + this.pretty = !!pretty; + var json = null; + var type = typeof value; + if(this.serialize[type]) { + try { + json = (!this.pretty && this.nativeJSON) ? + JSON.stringify(value) : + this.serialize[type].apply(this, [value]); + } catch(err) { + OpenLayers.Console.error("Trouble serializing: " + err); + } + } + return json; + }, + + /** + * Method: writeIndent + * Output an indentation string depending on the indentation level. + * + * Returns: + * {String} An appropriate indentation string. + */ + writeIndent: function() { + var pieces = []; + if(this.pretty) { + for(var i=0; i 0) { + pieces.push(','); + } + pieces.push(this.writeNewline(), this.writeIndent(), json); + } + } + + this.level -= 1; + pieces.push(this.writeNewline(), this.writeIndent(), ']'); + return pieces.join(''); + }, + + /** + * Method: serialize.string + * Transform a string into a JSON string. + * + * Parameters: + * string - {String} The string to be serialized + * + * Returns: + * {String} A JSON string representing the string. + */ + 'string': function(string) { + // If the string contains no control characters, no quote characters, and no + // backslash characters, then we can simply slap some quotes around it. + // Otherwise we must also replace the offending characters with safe + // sequences. + var m = { + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }; + if(/["\\\x00-\x1f]/.test(string)) { + return '"' + string.replace(/([\x00-\x1f\\"])/g, function(a, b) { + var c = m[b]; + if(c) { + return c; + } + c = b.charCodeAt(); + return '\\u00' + + Math.floor(c / 16).toString(16) + + (c % 16).toString(16); + }) + '"'; + } + return '"' + string + '"'; + }, + + /** + * Method: serialize.number + * Transform a number into a JSON string. + * + * Parameters: + * number - {Number} The number to be serialized. + * + * Returns: + * {String} A JSON string representing the number. + */ + 'number': function(number) { + return isFinite(number) ? String(number) : "null"; + }, + + /** + * Method: serialize.boolean + * Transform a boolean into a JSON string. + * + * Parameters: + * bool - {Boolean} The boolean to be serialized. + * + * Returns: + * {String} A JSON string representing the boolean. + */ + 'boolean': function(bool) { + return String(bool); + }, + + /** + * Method: serialize.object + * Transform a date into a JSON string. + * + * Parameters: + * date - {Date} The date to be serialized. + * + * Returns: + * {String} A JSON string representing the date. + */ + 'date': function(date) { + function format(number) { + // Format integers to have at least two digits. + return (number < 10) ? '0' + number : number; + } + return '"' + date.getFullYear() + '-' + + format(date.getMonth() + 1) + '-' + + format(date.getDate()) + 'T' + + format(date.getHours()) + ':' + + format(date.getMinutes()) + ':' + + format(date.getSeconds()) + '"'; + } + }, + + CLASS_NAME: "OpenLayers.Format.JSON" + +}); diff --git a/openlayers/lib/OpenLayers/Format/KML.js b/openlayers/lib/OpenLayers/Format/KML.js new file mode 100644 index 0000000000..5457cd0a0c --- /dev/null +++ b/openlayers/lib/OpenLayers/Format/KML.js @@ -0,0 +1,1443 @@ +/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/BaseTypes/Date.js + * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Geometry/Polygon.js + * @requires OpenLayers/Geometry/Collection.js + * @requires OpenLayers/Request/XMLHttpRequest.js + * @requires OpenLayers/Console.js + * @requires OpenLayers/Lang.js + * @requires OpenLayers/Projection.js + */ + +/** + * Class: OpenLayers.Format.KML + * Read/Write KML. Create a new instance with the + * constructor. + * + * Inherits from: + * - + */ +OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { + + /** + * Property: namespaces + * {Object} Mapping of namespace aliases to namespace URIs. + */ + namespaces: { + kml: "http://www.opengis.net/kml/2.2", + gx: "http://www.google.com/kml/ext/2.2" + }, + + /** + * APIProperty: kmlns + * {String} KML Namespace to use. Defaults to 2.0 namespace. + */ + kmlns: "http://earth.google.com/kml/2.0", + + /** + * APIProperty: placemarksDesc + * {String} Name of the placemarks. Default is "No description available". + */ + placemarksDesc: "No description available", + + /** + * APIProperty: foldersName + * {String} Name of the folders. Default is "OpenLayers export". + * If set to null, no name element will be created. + */ + foldersName: "OpenLayers export", + + /** + * APIProperty: foldersDesc + * {String} Description of the folders. Default is "Exported on [date]." + * If set to null, no description element will be created. + */ + foldersDesc: "Exported on " + new Date(), + + /** + * APIProperty: extractAttributes + * {Boolean} Extract attributes from KML. Default is true. + * Extracting styleUrls requires this to be set to true + */ + extractAttributes: true, + + /** + * Property: extractStyles + * {Boolean} Extract styles from KML. Default is false. + * Extracting styleUrls also requires extractAttributes to be + * set to true + */ + extractStyles: false, + + /** + * APIProperty: extractTracks + * {Boolean} Extract gx:Track elements from Placemark elements. Default + * is false. If true, features will be generated for all points in + * all gx:Track elements. Features will have a when (Date) attribute + * based on when elements in the track. If tracks include angle + * elements, features will have heading, tilt, and roll attributes. + * If track point coordinates have three values, features will have + * an altitude attribute with the third coordinate value. + */ + extractTracks: false, + + /** + * APIProperty: trackAttributes + * {Array} If is true, points within gx:Track elements will + * be parsed as features with when, heading, tilt, and roll attributes. + * Any additional attribute names can be provided in . + */ + trackAttributes: null, + + /** + * Property: internalns + * {String} KML Namespace to use -- defaults to the namespace of the + * Placemark node being parsed, but falls back to kmlns. + */ + internalns: null, + + /** + * Property: features + * {Array} Array of features + * + */ + features: null, + + /** + * Property: styles + * {Object} Storage of style objects + * + */ + styles: null, + + /** + * Property: styleBaseUrl + * {String} + */ + styleBaseUrl: "", + + /** + * Property: fetched + * {Object} Storage of KML URLs that have been fetched before + * in order to prevent reloading them. + */ + fetched: null, + + /** + * APIProperty: maxDepth + * {Integer} Maximum depth for recursive loading external KML URLs + * Defaults to 0: do no external fetching + */ + maxDepth: 0, + + /** + * Constructor: OpenLayers.Format.KML + * Create a new parser for KML. + * + * Parameters: + * options - {Object} An optional object whose properties will be set on + * this instance. + */ + initialize: function(options) { + // compile regular expressions once instead of every time they are used + this.regExes = { + trimSpace: (/^\s*|\s*$/g), + removeSpace: (/\s*/g), + splitSpace: (/\s+/), + trimComma: (/\s*,\s*/g), + kmlColor: (/(\w{2})(\w{2})(\w{2})(\w{2})/), + kmlIconPalette: (/root:\/\/icons\/palette-(\d+)(\.\w+)/), + straightBracket: (/\$\[(.*?)\]/g) + }; + // KML coordinates are always in longlat WGS84 + this.externalProjection = new OpenLayers.Projection("EPSG:4326"); + + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); + }, + + /** + * APIMethod: read + * Read data from a string, and return a list of features. + * + * Parameters: + * data - {String} or {DOMElement} data to read/parse. + * + * Returns: + * {Array()} List of features. + */ + read: function(data) { + this.features = []; + this.styles = {}; + this.fetched = {}; + + // Set default options + var options = { + depth: 0, + styleBaseUrl: this.styleBaseUrl + }; + + return this.parseData(data, options); + }, + + /** + * Method: parseData + * Read data from a string, and return a list of features. + * + * Parameters: + * data - {String} or {DOMElement} data to read/parse. + * options - {Object} Hash of options + * + * Returns: + * {Array()} List of features. + */ + parseData: function(data, options) { + if(typeof data == "string") { + data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); + } + + // Loop throught the following node types in this order and + // process the nodes found + var types = ["Link", "NetworkLink", "Style", "StyleMap", "Placemark"]; + for(var i=0, len=types.length; i and + // Don't do anything if we have reached our maximum depth for recursion + if (options.depth >= this.maxDepth) { + return false; + } + + // increase depth + var newOptions = OpenLayers.Util.extend({}, options); + newOptions.depth++; + + for(var i=0, len=nodes.length; i nodes in the data and parses them + * Also parses nodes, but only uses the 'normal' key + * + * Parameters: + * nodes - {Array} of {DOMElement} data to read/parse. + * options - {Object} Hash of options + * + */ + parseStyles: function(nodes, options) { + for(var i=0, len=nodes.length; i node and builds the style hash + * accordingly + * + * Parameters: + * node - {DOMElement} -112,36 -113,37 '; + var test_style_fill = ' -112,36 -113,37 -112,36 -113,37 '; + var test_style_outline = ' -112,36 -113,37 '; + var test_style_font = ' -112,36 -113,37 '; + var test_nl = ' http://maker.geocommons.com/maps/1717/overlays/0 '; + function test_Format_KML_constructor(t) { + t.plan(5); + + var options = {'foo': 'bar'}; + var format = new OpenLayers.Format.KML(options); + t.ok(format instanceof OpenLayers.Format.KML, + "new OpenLayers.Format.KML returns object" ); + t.eq(format.foo, "bar", "constructor sets options correctly"); + t.eq(typeof format.read, "function", "format has a read function"); + t.eq(typeof format.write, "function", "format has a write function"); + t.eq(format.externalProjection.getCode(), "EPSG:4326", + "default external projection is EPSG:4326"); + } + function test_Format_KML_multipoint(t) { + t.plan(1); + var f = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint([ + new OpenLayers.Geometry.Point(15555162, 4247484)])); + var format = new OpenLayers.Format.KML({ + extractStyles: true, + extractAttributes: true, + internalProjection: new OpenLayers.Projection("EPSG:900913"), + externalProjection: new OpenLayers.Projection("EPSG:4326") + }); + var data = format.write(f); + var found = (data.search('139.734') != -1); + t.ok(found, "Found 139.734 (correct reprojection) in data output."); + } + function test_Format_KML_read(t) { + t.plan(5); + var features = (new OpenLayers.Format.KML()).read(this.test_content); + t.eq(features.length, 4, "Number of features read is correct"); + t.ok(features[0].geometry.toString() == "POLYGON((5.001370157823406 49.26855713824488,8.214706453896161 49.630662409673505,8.397385910100951 48.45172350357396,5.001370157823406 49.26855713824488))", "polygon feature geometry correctly created"); + t.ok(features[1].geometry.toString() == "LINESTRING(5.838523393080493 49.74814616928052,5.787079558782349 48.410795432216574,8.91427702008381 49.28932499608202)", "linestring feature geometry correctly created"); + t.ok(features[2].geometry.toString() == "POINT(6.985073041685488 49.8682250149058)", "point feature geometry correctly created"); + t.ok(features[3].geometry.CLASS_NAME == "OpenLayers.Geometry.Collection", + "read geometry collection"); + } + + + function test_Format_KML_readCdataAttributes_20(t) { + t.plan(2); + var cdata = ' #rel1.0 17.266666, 48.283333'; + var features = (new OpenLayers.Format.KML()).read(cdata); + t.eq(features[0].attributes.description, "Full of text.", "Description attribute in cdata read correctly"); + t.eq(features[0].attributes.name, "Pezinok", "title attribute in cdata read correctly"); + + } + + function test_Format_KML_networklink(t) { + t.plan(1); + var f = new OpenLayers.Format.KML({'maxDepth':1}); + f.fetchLink = function(url) { + t.eq(url, "http://maker.geocommons.com/maps/1717/overlays/0", "network link fetched a link correctly."); + return ''; + } + f.read(test_nl); + } + function test_Format_KML_readCdataAttributes_21(t) { + t.plan(2); + var cdata = '#rel1.0 17.266666, 48.283333'; + var features = (new OpenLayers.Format.KML()).read(cdata); + t.eq(features[0].attributes.description, "Full of text.", "Description attribute in cdata read correctly"); + t.eq(features[0].attributes.name, "Pezinok", "title attribute in cdata read correctly"); + + } + + function test_Format_KML_write(t) { + // make sure id, name, and description are preserved + t.plan(1); + var kmlExpected = this.test_content; + var options = { + foldersName: "OpenLayers export", + foldersDesc: "Vector geometries from OpenLayers" + }; + + var format = new OpenLayers.Format.KML(options); + var features = format.read(kmlExpected); + var kmlOut = format.write(features); + var kmlOut = kmlOut.replace(/<\?[^>]*\?>/, ''); // Remove XML Prolog + t.eq(kmlOut, kmlExpected, "correctly writes an KML doc string"); + } + + function test_Format_KML_write_noNameDesc(t) { + t.plan(1); + var format = new OpenLayers.Format.KML({ + foldersName: null, + foldersDesc: null + }); + var geom = new OpenLayers.Geometry.Point(0, 0) + var feature = new OpenLayers.Feature.Vector(geom); + feature.id = 42; + var kmlOut = format.write(feature); + var expected = '42No description available0,0' + t.eq(kmlOut, expected, "null foldersName or foldersDesc don't create elements"); + } + + function test_Format_KML_write_multis(t) { + /** + * KML doesn't have a representation for multi geometries of a + * specific type. KML MultiGeometry maps to OL Geometry.Collection. + * Because of this, multi-geometries in OL can't make a round trip + * through KML (an OL MultiPoint maps to a KML MultiGeometry + * containing points, which maps back to an OL Collection containing + * points). So we need to acceptance tests for the writing of + * multi-geometries specifically instead of relying on the round-trip + * write test above. + */ + t.plan(3); + var format = new OpenLayers.Format.KML({foldersDesc: "test output"}); + var multi, feature, output, expected; + + // test multipoint + var multi = new OpenLayers.Geometry.MultiPoint([ + new OpenLayers.Geometry.Point(0, 1) + ]); + feature = new OpenLayers.Feature.Vector(multi, {name: "test name"}); + output = format.write(feature); + expected = 'OpenLayers exporttest outputtest nameNo description available0,1'; + var output = output.replace(/<\?[^>]*\?>/, ''); // Remove XML Prolog + t.eq(output, expected, "multipoint correctly written"); + + // test multilinestring + var multi = new OpenLayers.Geometry.MultiLineString([ + new OpenLayers.Geometry.LineString([ + new OpenLayers.Geometry.Point(1, 0), + new OpenLayers.Geometry.Point(0, 1) + ]) + ]); + feature = new OpenLayers.Feature.Vector(multi, {name: "test name"}); + output = format.write(feature); + expected = 'OpenLayers exporttest outputtest nameNo description available1,0 0,1'; + var output = output.replace(/<\?[^>]*\?>/, ''); // Remove XML Prolog + t.eq(output, expected, "multilinestring correctly written"); + + // test multipolygon + var multi = new OpenLayers.Geometry.MultiPolygon([ + new OpenLayers.Geometry.Polygon([ + new OpenLayers.Geometry.LinearRing([ + new OpenLayers.Geometry.Point(0, 0), + new OpenLayers.Geometry.Point(1, 0), + new OpenLayers.Geometry.Point(0, 1) + ]) + ]) + ]); + feature = new OpenLayers.Feature.Vector(multi, {name: "test name"}); + output = format.write(feature); + expected = 'OpenLayers exporttest outputtest nameNo description available0,0 1,0 0,1 0,0'; + var output = output.replace(/<\?[^>]*\?>/, ''); // Remove XML Prolog + t.eq(output, expected, "multilinestring correctly written"); + + } + function test_Format_KML_extractStyle(t) { + t.plan(1); + var f = new OpenLayers.Format.KML(); + var features = f.read(test_style); + t.ok(features[0].style == undefined, "KML Feature has no style with extractStyle false"); + } + function test_Format_KML_extractStyleFill(t) { + t.plan(2); + var f = new OpenLayers.Format.KML({extractStyles: true}); + var features = f.read(test_style_fill); + t.eq(features[0].style.fillColor, "#ff0000", "default fill is set"); + t.eq(features[1].style.fillColor, "none", "KML Feature has none fill"); + } + function test_Format_KML_extractStyleOutline(t) { + t.plan(2); + var f = new OpenLayers.Format.KML({extractStyles: true}); + var features = f.read(test_style); + t.eq(features[0].style.strokeWidth, "10", "default stroke is set"); + var features = f.read(test_style_outline); + t.eq(features[0].style.strokeWidth, "0", "KML Feature has no outline"); + } + function test_Format_KML_extractStyleFont(t) { + t.plan(2); + var f = new OpenLayers.Format.KML({extractStyles: true}); + var features = f.read(test_style_font); + t.eq(features[0].style.fontColor, "#ff0000", "font color is set"); + t.eq(features[0].style.fontOpacity, parseInt('87', 16) / 255, "font opacity is set"); + } + function test_Format_KML_getStyle(t) { + t.plan(1); + var style = {t: true}; + var f = new OpenLayers.Format.KML(); + f.styles = {test: style}; + var gotStyle = f.getStyle('test'); + gotStyle.t = false; + t.ok(style.t, "getStyle returns copy of style rather than reference"); + } + function test_Format_KML_extendedData(t) { + t.plan(2); + var f = new OpenLayers.Format.KML(); + var features = f.read(OpenLayers.Util.getElement("kml_extendeddata").value); + t.eq(features[0].attributes.all_bridges.value, "3030", "read value from extendeddata correctly."); + t.eq(features[0].attributes.all_bridges.displayName, "all bridges", "read displayName from extendeddata correctly."); + } + + function test_Format_KML_extendedData_SchemaData(t) { + t.plan(4); + var f = new OpenLayers.Format.KML(); + var features = f.read(OpenLayers.Util.getElement("kml_extendeddata2").value); + t.eq(features[0].attributes.TrailHeadName.value, "Pi in the sky", "read value from extendeddata (schema data) correctly."); + t.eq(features[0].attributes.TrailHeadName.displayName, "TrailHeadName", "read displayName from extendeddata correctly"); + t.eq(features[0].attributes.ElevationGain.value, "10", "read value from extendeddata (schema data) correctly."); + t.eq(features[0].attributes.ElevationGain.displayName, "ElevationGain", "read displayName from extendeddata correctly"); + } + + function test_Format_KML_placemarkName(t) { + t.plan(3); + + var feature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(0,0)); + var f = new OpenLayers.Format.KML(); + + t.eq(f.read(f.write(feature))[0].attributes.name, feature.id, "placemark name from feature.id"); + + feature.attributes.name = "placemark name from attributes.name"; + t.eq(f.read(f.write(feature))[0].attributes.name, feature.attributes.name, "placemark name from attributes.name"); + feature.style = { + label: "placemark name from style.label" + }; + t.eq(f.read(f.write(feature))[0].attributes.name, feature.style.label, "placemark name from style.label"); + } + function test_Format_KML_linestring_projected(t) { + t.plan(1); + var f = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([ + new OpenLayers.Geometry.Point(15555162, 4247484), new OpenLayers.Geometry.Point(15555163, 4247485)])); + var format = new OpenLayers.Format.KML({ + internalProjection: new OpenLayers.Projection("EPSG:900913"), + externalProjection: new OpenLayers.Projection("EPSG:4326") + }); + var data = format.write(f); + var found = (data.search('139.734') != -1); + t.ok(found, "Found 139.734 (correct reprojection) in data output."); + } + + function test_extractTracks(t) { + + t.plan(12); + + var xml = new OpenLayers.Format.XML(); + var doc = xml.read(document.getElementById("macnoise.kml").firstChild.nodeValue); + + var format = new OpenLayers.Format.KML({ + extractTracks: true, + trackAttributes: ["speed"] // additional custom attributes + }); + + var features = format.read(doc.documentElement); + t.eq(features.length, 170, "got 170 features"); + + var attr = features[4].attributes; + + // standard track point attributes + t.ok(attr.when instanceof Date, "features have when attribute"); + t.eq(attr.when.getTime(), 1272736815000, "correct time for fifth feature"); + t.eq(attr.altitude, 1006, "altitude parsed"); + t.eq(attr.heading, 230, "heading parsed"); + t.eq(attr.tilt, 0, "tilt parsed"); + t.eq(attr.roll, 0, "roll parsed"); + + // custom track attributes (all features acquire from the placemark) + t.eq(attr.name, "B752", "correct name"); + t.eq(attr.adflag, "A", "correct adflag"); + t.eq(attr.flightid, "DAL2973", "correct flightid"); + + // additional per point attributes (determined by trackAttributes property) + t.eq(attr.speed, "166", "correct speed"); + + var exp = new OpenLayers.Geometry.Point(-93.0753620391713, 44.9879724110872); + exp.z = 1006; + t.geom_eq(features[4].geometry, exp, "correct geometry"); + + } + + + + + + + + +
    + + + diff --git a/openlayers/tests/Format/OGCExceptionReport.html b/openlayers/tests/Format/OGCExceptionReport.html new file mode 100644 index 0000000000..7846f94290 --- /dev/null +++ b/openlayers/tests/Format/OGCExceptionReport.html @@ -0,0 +1,100 @@ + + + + + + + + diff --git a/openlayers/tests/Format/OSM.html b/openlayers/tests/Format/OSM.html new file mode 100644 index 0000000000..6ceb316e42 --- /dev/null +++ b/openlayers/tests/Format/OSM.html @@ -0,0 +1,115 @@ + + + + + + + + + diff --git a/openlayers/tests/Format/OWSCommon/v1_0_0.html b/openlayers/tests/Format/OWSCommon/v1_0_0.html new file mode 100644 index 0000000000..9d255b2252 --- /dev/null +++ b/openlayers/tests/Format/OWSCommon/v1_0_0.html @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/openlayers/tests/Format/OWSCommon/v1_1_0.html b/openlayers/tests/Format/OWSCommon/v1_1_0.html new file mode 100644 index 0000000000..e899ea8486 --- /dev/null +++ b/openlayers/tests/Format/OWSCommon/v1_1_0.html @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/openlayers/tests/Format/OWSContext/v0_3_1.html b/openlayers/tests/Format/OWSContext/v0_3_1.html new file mode 100644 index 0000000000..938fee27d1 --- /dev/null +++ b/openlayers/tests/Format/OWSContext/v0_3_1.html @@ -0,0 +1,241 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Format/QueryStringFilter.html b/openlayers/tests/Format/QueryStringFilter.html new file mode 100644 index 0000000000..b38d1e406f --- /dev/null +++ b/openlayers/tests/Format/QueryStringFilter.html @@ -0,0 +1,306 @@ + + + + + + + + diff --git a/openlayers/tests/Format/SLD.html b/openlayers/tests/Format/SLD.html new file mode 100644 index 0000000000..bc4bd822a8 --- /dev/null +++ b/openlayers/tests/Format/SLD.html @@ -0,0 +1,36 @@ + + + + + + + + diff --git a/openlayers/tests/Format/SLD/v1_0_0.html b/openlayers/tests/Format/SLD/v1_0_0.html new file mode 100644 index 0000000000..8e2c0a238a --- /dev/null +++ b/openlayers/tests/Format/SLD/v1_0_0.html @@ -0,0 +1,864 @@ + + + + + + +
    +
    +
    +
    +
    +
    + + diff --git a/openlayers/tests/Format/SOSCapabilities/v1_0_0.html b/openlayers/tests/Format/SOSCapabilities/v1_0_0.html new file mode 100644 index 0000000000..ed7f25eb65 --- /dev/null +++ b/openlayers/tests/Format/SOSCapabilities/v1_0_0.html @@ -0,0 +1,80 @@ + + + + + + + + + diff --git a/openlayers/tests/Format/SOSCapabilities/v1_0_0.js b/openlayers/tests/Format/SOSCapabilities/v1_0_0.js new file mode 100644 index 0000000000..78556f5b23 --- /dev/null +++ b/openlayers/tests/Format/SOSCapabilities/v1_0_0.js @@ -0,0 +1,484 @@ +var doc = new OpenLayers.Format.XML().read( +'' + +'' + + '' + + 'IFGI WeatherSOS (stable)' + + 'WeatherSOS (stable) at IfGI, Muenster, Germany. For more info: http://ifgipedia.uni-muenster.de/kms/documentation/swsl/sos/' + + '' + + 'rain gauge, radiation, pressure, windspeed, winddirection, temperature' + + '' + + 'OGC:SOS' + + '1.0.0' + + 'NONE' + + 'NONE' + + '' + + '' + + 'Institute for Geoinformatics, University of Muenster' + + '' + + '' + + 'Eike Hinderk Juerrens' + + 'Student Associate' + + '' + + '' + + '+49-251-83-30088' + + '' + + '' + + 'Weselerstrasse 253' + + 'Muenster' + + 'NRW' + + '48149' + + 'Germany' + + 'ehjuerrens@uni-muenster.de' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'SOS' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '1.0.0' + + '' + + '' + + '' + + '' + + 'ServiceIdentification' + + 'ServiceProvider' + + 'OperationsMetadata' + + 'Contents' + + 'All' + + 'Filter_Capabilities' + + '' + + '' + + '' + + '' + + 'text/xml' + + 'application/zip' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '1.0.0' + + '' + + '' + + '' + + '' + + 'SOS' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'ATMOSPHERIC_TEMPERATURE' + + 'RAIN_GAUGE' + + 'WIND_DIRECTION' + + 'WIND_SPEED' + + 'HUMIDITY' + + 'LUMINANCE' + + 'ATMOSPHERIC_PRESSURE' + + '' + + '' + + '' + + '' + + '' + + '2008-02-14T11:03:02+01' + + '2009-11-04T14:45:00+01' + + '' + + '' + + '' + + '' + + '' + + 'urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111' + + 'urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93' + + '' + + '' + + '' + + '' + + 'urn:x-ogc:def:property:OGC::Temperature' + + 'urn:x-ogc:def:property:OGC::Precipitation1Hour' + + 'urn:x-ogc:def:property:OGC::WindDirection' + + 'urn:x-ogc:def:property:OGC::WindSpeed' + + 'urn:x-ogc:def:property:OGC::RelativeHumidity' + + 'urn:x-ogc:def:property:OGC::Luminance' + + 'urn:x-ogc:def:property:OGC::BarometricPressure' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="OM/1.0.0"' + + 'application/zip' + + '' + + '' + + '' + + '' + + 'om:Observation' + + 'om:CategoryObservation' + + 'om:Measurement' + + '' + + '' + + '' + + '' + + 'resultTemplate' + + 'inline' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '1.0.0' + + '' + + '' + + '' + + '' + + 'SOS' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="OM/1.0.0"' + + 'application/zip' + + '' + + '' + + '' + + '' + + 'om:Observation' + + 'om:CategoryObservation' + + 'om:Measurement' + + '' + + '' + + '' + + '' + + 'inline' + + 'resultTemplate' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '1.0.0' + + '' + + '' + + '' + + '' + + 'SOS' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="sensorML/1.0.1"' + + '' + + '' + + '' + + '' + + 'urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111' + + 'urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'SOS' + + '' + + '' + + '' + + '' + + '1.0.0' + + '' + + '' + + '' + + '' + + 'urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93' + + 'urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'gml:Envelope' + + 'gml:Polygon' + + 'gml:Point' + + 'gml:LineString' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'gml:TimeInstant' + + 'gml:TimePeriod' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'Between' + + 'EqualTo' + + 'NotEqualTo' + + 'LessThan' + + 'LessThanEqualTo' + + 'GreaterThan' + + 'GreaterThanEqualTo' + + 'Like' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'Temperature of the atmosphere' + + '' + + '' + + '46.611644 7.6103' + + '51.9412 13.883498' + + '' + + '' + + '' + + '' + + '2008-11-20T15:20:22+01:00' + + '2009-11-04T14:45:00+01:00' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="om/1.0.0"' + + 'application/zip' + + 'ns:Measurement' + + 'ns:Observation' + + 'inline' + + 'resultTemplate' + + '' + + '' + + 'Rain' + + '' + + '' + + '46.611644 7.6103' + + '51.9412 13.883498' + + '' + + '' + + '' + + '' + + '2008-11-20T15:35:22+01:00' + + '2009-11-04T14:45:00+01:00' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="om/1.0.0"' + + 'application/zip' + + 'ns:Measurement' + + 'ns:Observation' + + 'inline' + + 'resultTemplate' + + '' + + '' + + 'Direction of the wind' + + '' + + '' + + '46.611644 7.6103' + + '51.9412 13.883498' + + '' + + '' + + '' + + '' + + '2008-11-20T15:20:22+01:00' + + '2009-11-04T14:45:00+01:00' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="om/1.0.0"' + + 'application/zip' + + 'ns:Measurement' + + 'ns:Observation' + + 'inline' + + 'resultTemplate' + + '' + + '' + + 'Speed of the wind' + + '' + + '' + + '46.611644 7.6103' + + '51.9412 13.883498' + + '' + + '' + + '' + + '' + + '2008-11-20T15:20:22+01:00' + + '2009-11-04T14:45:00+01:00' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="om/1.0.0"' + + 'application/zip' + + 'ns:Measurement' + + 'ns:Observation' + + 'inline' + + 'resultTemplate' + + '' + + '' + + 'Humidity of the atmosphere' + + '' + + '' + + '46.611644 7.6103' + + '51.9412 13.883498' + + '' + + '' + + '' + + '' + + '2008-02-14T11:03:02+01:00' + + '2009-11-04T14:45:00+01:00' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="om/1.0.0"' + + 'application/zip' + + 'ns:Measurement' + + 'ns:Observation' + + 'inline' + + 'resultTemplate' + + '' + + '' + + 'Luminance' + + '' + + '' + + '46.611644 7.6103' + + '51.9412 13.883498' + + '' + + '' + + '' + + '' + + '2008-11-20T15:20:22+01:00' + + '2009-11-04T14:45:00+01:00' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="om/1.0.0"' + + 'application/zip' + + 'ns:Measurement' + + 'ns:Observation' + + 'inline' + + 'resultTemplate' + + '' + + '' + + 'Pressure of the atmosphere' + + '' + + '' + + '46.611644 7.6103' + + '51.9412 13.883498' + + '' + + '' + + '' + + '' + + '2008-12-20T02:29:27+01:00' + + '2009-11-04T14:45:00+01:00' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + 'text/xml;subtype="om/1.0.0"' + + 'application/zip' + + 'ns:Measurement' + + 'ns:Observation' + + 'inline' + + 'resultTemplate' + + '' + + '' + + '' + +'' +); \ No newline at end of file diff --git a/openlayers/tests/Format/SOSGetFeatureOfInterest.html b/openlayers/tests/Format/SOSGetFeatureOfInterest.html new file mode 100644 index 0000000000..c80078f2d1 --- /dev/null +++ b/openlayers/tests/Format/SOSGetFeatureOfInterest.html @@ -0,0 +1,80 @@ + + + + + + + + diff --git a/openlayers/tests/Format/SOSGetObservation.html b/openlayers/tests/Format/SOSGetObservation.html new file mode 100644 index 0000000000..3256d5a52f --- /dev/null +++ b/openlayers/tests/Format/SOSGetObservation.html @@ -0,0 +1,183 @@ + + + + + + + + diff --git a/openlayers/tests/Format/Text.html b/openlayers/tests/Format/Text.html new file mode 100644 index 0000000000..9b18bb5a78 --- /dev/null +++ b/openlayers/tests/Format/Text.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + diff --git a/openlayers/tests/Format/WCSGetCoverage.html b/openlayers/tests/Format/WCSGetCoverage.html new file mode 100644 index 0000000000..6379b2bfcd --- /dev/null +++ b/openlayers/tests/Format/WCSGetCoverage.html @@ -0,0 +1,80 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WFS.html b/openlayers/tests/Format/WFS.html new file mode 100644 index 0000000000..7b3b737dbf --- /dev/null +++ b/openlayers/tests/Format/WFS.html @@ -0,0 +1,81 @@ + + + + + + +
    +
    + + diff --git a/openlayers/tests/Format/WFSCapabilities.html b/openlayers/tests/Format/WFSCapabilities.html new file mode 100644 index 0000000000..4e6545e160 --- /dev/null +++ b/openlayers/tests/Format/WFSCapabilities.html @@ -0,0 +1,43 @@ + + + + + + + + \ No newline at end of file diff --git a/openlayers/tests/Format/WFSCapabilities/v1.html b/openlayers/tests/Format/WFSCapabilities/v1.html new file mode 100644 index 0000000000..d7132701dc --- /dev/null +++ b/openlayers/tests/Format/WFSCapabilities/v1.html @@ -0,0 +1,173 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WFSDescribeFeatureType.html b/openlayers/tests/Format/WFSDescribeFeatureType.html new file mode 100644 index 0000000000..53faa5d584 --- /dev/null +++ b/openlayers/tests/Format/WFSDescribeFeatureType.html @@ -0,0 +1,381 @@ + + + + + + + + \ No newline at end of file diff --git a/openlayers/tests/Format/WFST.html b/openlayers/tests/Format/WFST.html new file mode 100644 index 0000000000..9623b05737 --- /dev/null +++ b/openlayers/tests/Format/WFST.html @@ -0,0 +1,23 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Format/WFST/v1.html b/openlayers/tests/Format/WFST/v1.html new file mode 100644 index 0000000000..04142b60e0 --- /dev/null +++ b/openlayers/tests/Format/WFST/v1.html @@ -0,0 +1,433 @@ + + + + + + +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/openlayers/tests/Format/WFST/v1_0_0.html b/openlayers/tests/Format/WFST/v1_0_0.html new file mode 100644 index 0000000000..89d810e85e --- /dev/null +++ b/openlayers/tests/Format/WFST/v1_0_0.html @@ -0,0 +1,133 @@ + + + + + + +
    +
    +
    +
    + + diff --git a/openlayers/tests/Format/WFST/v1_1_0.html b/openlayers/tests/Format/WFST/v1_1_0.html new file mode 100644 index 0000000000..6fd024a669 --- /dev/null +++ b/openlayers/tests/Format/WFST/v1_1_0.html @@ -0,0 +1,232 @@ + + + + + + +
    +
    +
    +
    +
    +
    +
    + + diff --git a/openlayers/tests/Format/WKT.html b/openlayers/tests/Format/WKT.html new file mode 100644 index 0000000000..15d2b2cf62 --- /dev/null +++ b/openlayers/tests/Format/WKT.html @@ -0,0 +1,278 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WMC.html b/openlayers/tests/Format/WMC.html new file mode 100644 index 0000000000..fbaec815a8 --- /dev/null +++ b/openlayers/tests/Format/WMC.html @@ -0,0 +1,315 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Format/WMC/v1.html b/openlayers/tests/Format/WMC/v1.html new file mode 100644 index 0000000000..05e60785fe --- /dev/null +++ b/openlayers/tests/Format/WMC/v1.html @@ -0,0 +1,266 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WMC/v1_1_0.html b/openlayers/tests/Format/WMC/v1_1_0.html new file mode 100644 index 0000000000..815d3bf40e --- /dev/null +++ b/openlayers/tests/Format/WMC/v1_1_0.html @@ -0,0 +1,86 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Format/WMSCapabilities.html b/openlayers/tests/Format/WMSCapabilities.html new file mode 100644 index 0000000000..a447bddcd4 --- /dev/null +++ b/openlayers/tests/Format/WMSCapabilities.html @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WMSCapabilities/v1_1_1.html b/openlayers/tests/Format/WMSCapabilities/v1_1_1.html new file mode 100644 index 0000000000..929634d267 --- /dev/null +++ b/openlayers/tests/Format/WMSCapabilities/v1_1_1.html @@ -0,0 +1,5208 @@ + + + + + + + + +
    +
    + +
    + + + diff --git a/openlayers/tests/Format/WMSCapabilities/v1_1_1_WMSC.html b/openlayers/tests/Format/WMSCapabilities/v1_1_1_WMSC.html new file mode 100644 index 0000000000..10bcfb1923 --- /dev/null +++ b/openlayers/tests/Format/WMSCapabilities/v1_1_1_WMSC.html @@ -0,0 +1,212 @@ + + + + + + + +
    + + diff --git a/openlayers/tests/Format/WMSCapabilities/v1_3_0.html b/openlayers/tests/Format/WMSCapabilities/v1_3_0.html new file mode 100644 index 0000000000..9d7eecdac5 --- /dev/null +++ b/openlayers/tests/Format/WMSCapabilities/v1_3_0.html @@ -0,0 +1,614 @@ + + + + + + + +
    + + +
    + + + diff --git a/openlayers/tests/Format/WMSDescribeLayer.html b/openlayers/tests/Format/WMSDescribeLayer.html new file mode 100644 index 0000000000..f564da350e --- /dev/null +++ b/openlayers/tests/Format/WMSDescribeLayer.html @@ -0,0 +1,41 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WMSGetFeatureInfo.html b/openlayers/tests/Format/WMSGetFeatureInfo.html new file mode 100644 index 0000000000..1301b65668 --- /dev/null +++ b/openlayers/tests/Format/WMSGetFeatureInfo.html @@ -0,0 +1,319 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WMTSCapabilities.html b/openlayers/tests/Format/WMTSCapabilities.html new file mode 100644 index 0000000000..e7a51a35ee --- /dev/null +++ b/openlayers/tests/Format/WMTSCapabilities.html @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WMTSCapabilities/v1_0_0.html b/openlayers/tests/Format/WMTSCapabilities/v1_0_0.html new file mode 100644 index 0000000000..af01d7c0b4 --- /dev/null +++ b/openlayers/tests/Format/WMTSCapabilities/v1_0_0.html @@ -0,0 +1,334 @@ + + + + + + + + +
    + + diff --git a/openlayers/tests/Format/WPSCapabilities/v1_0_0.html b/openlayers/tests/Format/WPSCapabilities/v1_0_0.html new file mode 100644 index 0000000000..191f29f917 --- /dev/null +++ b/openlayers/tests/Format/WPSCapabilities/v1_0_0.html @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/openlayers/tests/Format/WPSCapabilities/v1_0_0.js b/openlayers/tests/Format/WPSCapabilities/v1_0_0.js new file mode 100644 index 0000000000..19d12f2208 --- /dev/null +++ b/openlayers/tests/Format/WPSCapabilities/v1_0_0.js @@ -0,0 +1,112 @@ +var doc = new OpenLayers.Format.XML().read( +'' + +'' + +' ' + +' Prototype GeoServer WPS' + +' ' + +' WPS' + +' 1.0.0' + +' ' + +' ' + +' The ancient geographes INC' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' gt:Intersect' + +' Intersection' + +' Intersection between two literal geometry' + +' ' + +' ' + +' JTS:length' + +' Returns the geometry perimeters, computed using cartesian geometry' + +' expressions in the same unit of measure as the geometry (will not return a valid' + +' perimeter for geometries expressed geographic coordinates' + +' Returns the geometry perimeters, computed using cartesian geometry' + +' expressions in the same unit of measure as the geometry (will not return a valid' + +' perimeter for geometries expressed geographic coordinates' + +' ' + +' ' + +' JTS:isEmpty' + +' Checks if the provided geometry is empty' + +' Checks if the provided geometry is empty' + +' ' + +' ' + +' JTS:contains' + +' Checks if a contains b' + +' Checks if a contains b' + +' ' + +' ' + +' JTS:disjoint' + +' Returns true if the two geometries have no points in common' + +' Returns true if the two geometries have no points in common' + +' ' + +' ' + +' JTS:intersects' + +' Returns true if the two geometries intersect, false otherwise' + +' Returns true if the two geometries intersect, false' + +' otherwise' + +' ' + +' ' + +' JTS:isClosed' + +' Returns true if the line is closed' + +' Returns true if the line is closed' + +' ' + +' ' + +' JTS:isValid' + +' Returns true if the geometry is topologically valid, false' + +' otherwise' + +' Returns true if the geometry is topologically valid, false' + +' otherwise' + +' ' + +' ' + +' JTS:buffer' + +' Buffers a geometry using a certain distance' + +' Buffers a geometry using a certain distance' + +' ' + +' ' + +' JTS:getY' + +' Returns the Y ordinate of the point' + +' Returns the Y ordinate of the point' + +' ' + +' ' + +' ' + +' ' + +' en-US' + +' ' + +' ' + +' en-US' + +' ' + +' ' + +'' +); diff --git a/openlayers/tests/Format/WPSDescribeProcess.html b/openlayers/tests/Format/WPSDescribeProcess.html new file mode 100644 index 0000000000..c411f6267b --- /dev/null +++ b/openlayers/tests/Format/WPSDescribeProcess.html @@ -0,0 +1,196 @@ + + + + + + + + diff --git a/openlayers/tests/Format/WPSExecute.html b/openlayers/tests/Format/WPSExecute.html new file mode 100644 index 0000000000..124bd9722f --- /dev/null +++ b/openlayers/tests/Format/WPSExecute.html @@ -0,0 +1,465 @@ + + + + + + + + diff --git a/openlayers/tests/Format/XLS/v1_1_0.html b/openlayers/tests/Format/XLS/v1_1_0.html new file mode 100644 index 0000000000..8a744f9d5c --- /dev/null +++ b/openlayers/tests/Format/XLS/v1_1_0.html @@ -0,0 +1,98 @@ + + + + + + + + diff --git a/openlayers/tests/Format/XML.html b/openlayers/tests/Format/XML.html new file mode 100644 index 0000000000..8da8fbf1e3 --- /dev/null +++ b/openlayers/tests/Format/XML.html @@ -0,0 +1,871 @@ + + + + + + + + diff --git a/openlayers/tests/Format/XML/VersionedOGC.html b/openlayers/tests/Format/XML/VersionedOGC.html new file mode 100644 index 0000000000..ca96d6322e --- /dev/null +++ b/openlayers/tests/Format/XML/VersionedOGC.html @@ -0,0 +1,51 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry.html b/openlayers/tests/Geometry.html new file mode 100644 index 0000000000..f2d801ddfe --- /dev/null +++ b/openlayers/tests/Geometry.html @@ -0,0 +1,344 @@ + + + + + + + +
    + + diff --git a/openlayers/tests/Geometry/Collection.html b/openlayers/tests/Geometry/Collection.html new file mode 100644 index 0000000000..7c9fd62e05 --- /dev/null +++ b/openlayers/tests/Geometry/Collection.html @@ -0,0 +1,431 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/Curve.html b/openlayers/tests/Geometry/Curve.html new file mode 100644 index 0000000000..5afebdf5a0 --- /dev/null +++ b/openlayers/tests/Geometry/Curve.html @@ -0,0 +1,157 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/LineString.html b/openlayers/tests/Geometry/LineString.html new file mode 100644 index 0000000000..4b2ec0e65f --- /dev/null +++ b/openlayers/tests/Geometry/LineString.html @@ -0,0 +1,443 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/LinearRing.html b/openlayers/tests/Geometry/LinearRing.html new file mode 100644 index 0000000000..5cacd89eb7 --- /dev/null +++ b/openlayers/tests/Geometry/LinearRing.html @@ -0,0 +1,258 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/MultiLineString.html b/openlayers/tests/Geometry/MultiLineString.html new file mode 100644 index 0000000000..34a6e651be --- /dev/null +++ b/openlayers/tests/Geometry/MultiLineString.html @@ -0,0 +1,267 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/MultiPoint.html b/openlayers/tests/Geometry/MultiPoint.html new file mode 100644 index 0000000000..47ce430bda --- /dev/null +++ b/openlayers/tests/Geometry/MultiPoint.html @@ -0,0 +1,130 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/MultiPolygon.html b/openlayers/tests/Geometry/MultiPolygon.html new file mode 100644 index 0000000000..f44de93f20 --- /dev/null +++ b/openlayers/tests/Geometry/MultiPolygon.html @@ -0,0 +1,34 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/Point.html b/openlayers/tests/Geometry/Point.html new file mode 100644 index 0000000000..9baaf5c72b --- /dev/null +++ b/openlayers/tests/Geometry/Point.html @@ -0,0 +1,214 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/Polygon.html b/openlayers/tests/Geometry/Polygon.html new file mode 100644 index 0000000000..598b68800e --- /dev/null +++ b/openlayers/tests/Geometry/Polygon.html @@ -0,0 +1,381 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/Rectangle.html b/openlayers/tests/Geometry/Rectangle.html new file mode 100644 index 0000000000..41dc95a010 --- /dev/null +++ b/openlayers/tests/Geometry/Rectangle.html @@ -0,0 +1,76 @@ + + + + + + + + diff --git a/openlayers/tests/Geometry/Surface.html b/openlayers/tests/Geometry/Surface.html new file mode 100644 index 0000000000..5efc5c238e --- /dev/null +++ b/openlayers/tests/Geometry/Surface.html @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/openlayers/tests/Handler.html b/openlayers/tests/Handler.html new file mode 100644 index 0000000000..a20ffbb657 --- /dev/null +++ b/openlayers/tests/Handler.html @@ -0,0 +1,261 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Box.html b/openlayers/tests/Handler/Box.html new file mode 100644 index 0000000000..edb20d053d --- /dev/null +++ b/openlayers/tests/Handler/Box.html @@ -0,0 +1,106 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Click.html b/openlayers/tests/Handler/Click.html new file mode 100644 index 0000000000..41172cd896 --- /dev/null +++ b/openlayers/tests/Handler/Click.html @@ -0,0 +1,677 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Drag.html b/openlayers/tests/Handler/Drag.html new file mode 100644 index 0000000000..533e1bb647 --- /dev/null +++ b/openlayers/tests/Handler/Drag.html @@ -0,0 +1,604 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Feature.html b/openlayers/tests/Handler/Feature.html new file mode 100644 index 0000000000..7c768e1a69 --- /dev/null +++ b/openlayers/tests/Handler/Feature.html @@ -0,0 +1,668 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Hover.html b/openlayers/tests/Handler/Hover.html new file mode 100644 index 0000000000..150218a2c3 --- /dev/null +++ b/openlayers/tests/Handler/Hover.html @@ -0,0 +1,136 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Keyboard.html b/openlayers/tests/Handler/Keyboard.html new file mode 100644 index 0000000000..947cd99b09 --- /dev/null +++ b/openlayers/tests/Handler/Keyboard.html @@ -0,0 +1,106 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/MouseWheel.html b/openlayers/tests/Handler/MouseWheel.html new file mode 100644 index 0000000000..d41c2cd18c --- /dev/null +++ b/openlayers/tests/Handler/MouseWheel.html @@ -0,0 +1,182 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Path.html b/openlayers/tests/Handler/Path.html new file mode 100644 index 0000000000..3f3ea03fdf --- /dev/null +++ b/openlayers/tests/Handler/Path.html @@ -0,0 +1,1309 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Pinch.html b/openlayers/tests/Handler/Pinch.html new file mode 100644 index 0000000000..2924e229f2 --- /dev/null +++ b/openlayers/tests/Handler/Pinch.html @@ -0,0 +1,264 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Point.html b/openlayers/tests/Handler/Point.html new file mode 100644 index 0000000000..4214478634 --- /dev/null +++ b/openlayers/tests/Handler/Point.html @@ -0,0 +1,599 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/Polygon.html b/openlayers/tests/Handler/Polygon.html new file mode 100644 index 0000000000..94e8febc5c --- /dev/null +++ b/openlayers/tests/Handler/Polygon.html @@ -0,0 +1,1136 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Handler/RegularPolygon.html b/openlayers/tests/Handler/RegularPolygon.html new file mode 100644 index 0000000000..3ce9e78089 --- /dev/null +++ b/openlayers/tests/Handler/RegularPolygon.html @@ -0,0 +1,228 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Icon.html b/openlayers/tests/Icon.html new file mode 100644 index 0000000000..ac542d24d5 --- /dev/null +++ b/openlayers/tests/Icon.html @@ -0,0 +1,68 @@ + + + + + + + + diff --git a/openlayers/tests/Kinetic.html b/openlayers/tests/Kinetic.html new file mode 100644 index 0000000000..6ef01ceea3 --- /dev/null +++ b/openlayers/tests/Kinetic.html @@ -0,0 +1,130 @@ + + + + + + +
    +
    + + diff --git a/openlayers/tests/Lang.html b/openlayers/tests/Lang.html new file mode 100644 index 0000000000..9f4fa9b36d --- /dev/null +++ b/openlayers/tests/Lang.html @@ -0,0 +1,106 @@ + + + + + + + + + + diff --git a/openlayers/tests/Layer.html b/openlayers/tests/Layer.html new file mode 100644 index 0000000000..ed72772b25 --- /dev/null +++ b/openlayers/tests/Layer.html @@ -0,0 +1,875 @@ + + + + + + +
    +
    + + diff --git a/openlayers/tests/Layer/ArcGIS93Rest.html b/openlayers/tests/Layer/ArcGIS93Rest.html new file mode 100644 index 0000000000..66efc344f0 --- /dev/null +++ b/openlayers/tests/Layer/ArcGIS93Rest.html @@ -0,0 +1,338 @@ + + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/ArcGISCache.html b/openlayers/tests/Layer/ArcGISCache.html new file mode 100644 index 0000000000..b6fb2d9904 --- /dev/null +++ b/openlayers/tests/Layer/ArcGISCache.html @@ -0,0 +1,227 @@ + + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/ArcGISCache.json b/openlayers/tests/Layer/ArcGISCache.json new file mode 100644 index 0000000000..79dffa8b89 --- /dev/null +++ b/openlayers/tests/Layer/ArcGISCache.json @@ -0,0 +1,334 @@ +var capabilitiesObject = { + "currentVersion" : 10.01, + "serviceDescription" : "This map is designed to be used as a base map by GIS professionals and as a reference map by anyone. The base map includes administrative boundaries, cities, water features, physiographic features, parks, landmarks, highways, roads, railways, airports, and buildings overlaid on land cover and shaded relief imagery for added context. The map was compiled from a variety of best available sources from several data providers, including the U.S. Geological Survey, Food and Agriculture Organization of the United Nations, National Park Service, Tele Atlas, AND, and ESRI. The base map currently provides coverage for the world down to a scale of ~1:1m and coverage for the continental United States and Hawaii to a scale of ~1:20k. The base map also includes detailed maps for selected cities in the United States including Portland, Oregon and Philadephia, Pennsylvania. The base map was designed and developed by ESRI based on the topographic map templates that are available through the ArcGIS Resource Centers. For more information on this map, visit us \u003ca href=\"http://goto.arcgisonline.com/maps/World_Topo_Map \" target=\"_new\"\u003eonline\u003c/a\u003e.", + "mapName" : "Layers", + "description" : "This map is designed to be used as a base map by GIS professionals and as a reference map by anyone. The base map includes administrative boundaries, cities, water features, physiographic features, parks, landmarks, highways, roads, railways, airports, and buildings overlaid on land cover and shaded relief imagery for added context. The map was compiled from a variety of best available sources from several data providers, including the U.S. Geological Survey, Food and Agriculture Organization of the United Nations, National Park Service, Tele Atlas, AND, and ESRI. The base map currently provides coverage for the world down to a scale of ~1:1m and coverage for the continental United States and Hawaii to a scale of ~1:20k. The base map also includes detailed maps for selected cities in the United States including Portland, Oregon and Philadephia, Pennsylvania. The base map was designed and developed by ESRI based on the topographic map templates that are available through the ArcGIS Resource Centers. For more information on this map, visit us online at http://goto.arcgisonline.com/maps/World_Topo_Map", + "copyrightText" : "Sources: USGS, FAO, NPS, EPA, ESRI, DeLorme, TANA, other suppliers", + "layers" : [ + { + "id" : 0, + "name" : "Topographic Info", + "parentLayerId" : -1, + "defaultVisibility" : true, + "subLayerIds" : [1, 2, 3, 4], + "minScale" : 0, + "maxScale" : 0 + }, + { + "id" : 1, + "name" : "Elevation (m)", + "parentLayerId" : 0, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 0, + "maxScale" : 0 + }, + { + "id" : 2, + "name" : "Elevation (ft)", + "parentLayerId" : 0, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 0, + "maxScale" : 0 + }, + { + "id" : 3, + "name" : "Slope", + "parentLayerId" : 0, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 0, + "maxScale" : 0 + }, + { + "id" : 4, + "name" : "Aspect", + "parentLayerId" : 0, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 0, + "maxScale" : 0 + }, + { + "id" : 5, + "name" : "Places Info", + "parentLayerId" : -1, + "defaultVisibility" : true, + "subLayerIds" : [6, 7, 8, 9], + "minScale" : 0, + "maxScale" : 0 + }, + { + "id" : 6, + "name" : "Place Names (Country Level)", + "parentLayerId" : 5, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 0, + "maxScale" : 80000000 + }, + { + "id" : 7, + "name" : "Place Names (State Level)", + "parentLayerId" : 5, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 80000001, + "maxScale" : 1500000 + }, + { + "id" : 8, + "name" : "Place Names (County Level)", + "parentLayerId" : 5, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 1500001, + "maxScale" : 400000 + }, + { + "id" : 9, + "name" : "Place Names (City Level)", + "parentLayerId" : 5, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 399999, + "maxScale" : 0 + }, + { + "id" : 10, + "name" : "Scale Descriptions", + "parentLayerId" : -1, + "defaultVisibility" : true, + "subLayerIds" : [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], + "minScale" : 0, + "maxScale" : 0 + }, + { + "id" : 11, + "name" : "Level 15 ~1:18K", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 25000, + "maxScale" : 15001 + }, + { + "id" : 12, + "name" : "Level 14 ~1:36K", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 50000, + "maxScale" : 25001 + }, + { + "id" : 13, + "name" : "Level 13 ~1:72K", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 100000, + "maxScale" : 50001 + }, + { + "id" : 14, + "name" : "Level 12 ~1:144K", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 288000, + "maxScale" : 100000 + }, + { + "id" : 15, + "name" : "Level 11 ~1:288K", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 575000, + "maxScale" : 288000 + }, + { + "id" : 16, + "name" : "Level 10 ~1:577K", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 1150000, + "maxScale" : 575000 + }, + { + "id" : 17, + "name" : "Level 9 ~1:1.15M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 2200000, + "maxScale" : 1150000 + }, + { + "id" : 18, + "name" : "Level 8 ~1:2.3M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 4500000, + "maxScale" : 2200000 + }, + { + "id" : 19, + "name" : "Level 7 ~1:4.5M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 9000000, + "maxScale" : 4500000 + }, + { + "id" : 20, + "name" : "Level 6 ~1:9.2M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 18000000, + "maxScale" : 9000000 + }, + { + "id" : 21, + "name" : "Level 5 ~1:18M ", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 36000000, + "maxScale" : 18000000 + }, + { + "id" : 22, + "name" : "Level 4 ~1:36M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 72000000, + "maxScale" : 36000000 + }, + { + "id" : 23, + "name" : "Level 3 ~1:72M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 75500000, + "maxScale" : 70000000 + }, + { + "id" : 24, + "name" : "Level 2 ~1:147M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 290000000, + "maxScale" : 147000000 + }, + { + "id" : 25, + "name" : "Level 1 ~1:292M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 295000000, + "maxScale" : 150000000 + }, + { + "id" : 26, + "name" : "Level 0 ~1:584M", + "parentLayerId" : 10, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 0, + "maxScale" : 295000000 + }, + { + "id" : 27, + "name" : "Citations", + "parentLayerId" : -1, + "defaultVisibility" : true, + "subLayerIds" : null, + "minScale" : 0, + "maxScale" : 0 + } + ], + "tables" : [ + + ], + "spatialReference" : { + "wkid" : 102100 + }, + "singleFusedMapCache" : true, + "tileInfo" : { + "rows" : 256, + "cols" : 256, + "dpi" : 96, + "format" : "JPEG", + "compressionQuality" : 90, + "origin" : { + "x" : -20037508.342787, + "y" : 20037508.342787 + }, + "spatialReference" : { + "wkid" : 102100 + }, + "lods" : [ + {"level" : 0, "resolution" : 156543.033928, "scale" : 591657527.591555}, + {"level" : 1, "resolution" : 78271.5169639999, "scale" : 295828763.795777}, + {"level" : 2, "resolution" : 39135.7584820001, "scale" : 147914381.897889}, + {"level" : 3, "resolution" : 19567.8792409999, "scale" : 73957190.948944}, + {"level" : 4, "resolution" : 9783.93962049996, "scale" : 36978595.474472}, + {"level" : 5, "resolution" : 4891.96981024998, "scale" : 18489297.737236}, + {"level" : 6, "resolution" : 2445.98490512499, "scale" : 9244648.868618}, + {"level" : 7, "resolution" : 1222.99245256249, "scale" : 4622324.434309}, + {"level" : 8, "resolution" : 611.49622628138, "scale" : 2311162.217155}, + {"level" : 9, "resolution" : 305.748113140558, "scale" : 1155581.108577}, + {"level" : 10, "resolution" : 152.874056570411, "scale" : 577790.554289}, + {"level" : 11, "resolution" : 76.4370282850732, "scale" : 288895.277144}, + {"level" : 12, "resolution" : 38.2185141425366, "scale" : 144447.638572}, + {"level" : 13, "resolution" : 19.1092570712683, "scale" : 72223.819286}, + {"level" : 14, "resolution" : 9.55462853563415, "scale" : 36111.909643}, + {"level" : 15, "resolution" : 4.77731426794937, "scale" : 18055.954822}, + {"level" : 16, "resolution" : 2.38865713397468, "scale" : 9027.977411}, + {"level" : 17, "resolution" : 1.19432856685505, "scale" : 4513.988705}, + {"level" : 18, "resolution" : 0.597164283559817, "scale" : 2256.994353}, + {"level" : 19, "resolution" : 0.298582141647617, "scale" : 1128.497176} + ] + }, + "initialExtent" : { + "xmin" : -45223792.233066, + "ymin" : -22882589.2065154, + "xmax" : 45223792.233066, + "ymax" : 22882589.2065155, + "spatialReference" : { + "wkid" : 102100 + } + }, + "fullExtent" : { + "xmin" : -20037507.0671618, + "ymin" : -19971868.8804086, + "xmax" : 20037507.0671618, + "ymax" : 19971868.8804086, + "spatialReference" : { + "wkid" : 102100 + } + }, + "units" : "esriMeters", + "supportedImageFormatTypes" : "PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP", + "documentInfo" : { + "Title" : "World Topo Map", + "Author" : "ESRI", + "Comments" : "", + "Subject" : "", + "Category" : "", + "Keywords" : "", + "Credits" : "" + }, + "capabilities" : "Map,Query,Data" +}; \ No newline at end of file diff --git a/openlayers/tests/Layer/ArcIMS.html b/openlayers/tests/Layer/ArcIMS.html new file mode 100644 index 0000000000..4f86227be2 --- /dev/null +++ b/openlayers/tests/Layer/ArcIMS.html @@ -0,0 +1,123 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Bing.html b/openlayers/tests/Layer/Bing.html new file mode 100644 index 0000000000..5e616f58f2 --- /dev/null +++ b/openlayers/tests/Layer/Bing.html @@ -0,0 +1,117 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/EventPane.html b/openlayers/tests/Layer/EventPane.html new file mode 100644 index 0000000000..f846614a2b --- /dev/null +++ b/openlayers/tests/Layer/EventPane.html @@ -0,0 +1,172 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/FixedZoomLevels.html b/openlayers/tests/Layer/FixedZoomLevels.html new file mode 100644 index 0000000000..133571bcb8 --- /dev/null +++ b/openlayers/tests/Layer/FixedZoomLevels.html @@ -0,0 +1,137 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/GML.html b/openlayers/tests/Layer/GML.html new file mode 100644 index 0000000000..3a4b2d90d7 --- /dev/null +++ b/openlayers/tests/Layer/GML.html @@ -0,0 +1,60 @@ + + + + + + +
    + + + diff --git a/openlayers/tests/Layer/GeoRSS.html b/openlayers/tests/Layer/GeoRSS.html new file mode 100644 index 0000000000..a942e83fe0 --- /dev/null +++ b/openlayers/tests/Layer/GeoRSS.html @@ -0,0 +1,210 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Google.html b/openlayers/tests/Layer/Google.html new file mode 100644 index 0000000000..c826ef481f --- /dev/null +++ b/openlayers/tests/Layer/Google.html @@ -0,0 +1,360 @@ + + + + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Google/v3.html b/openlayers/tests/Layer/Google/v3.html new file mode 100644 index 0000000000..f2dcbe352a --- /dev/null +++ b/openlayers/tests/Layer/Google/v3.html @@ -0,0 +1,382 @@ + + + + + + + +
    + + \ No newline at end of file diff --git a/openlayers/tests/Layer/GoogleNG.html b/openlayers/tests/Layer/GoogleNG.html new file mode 100644 index 0000000000..6a864d4f90 --- /dev/null +++ b/openlayers/tests/Layer/GoogleNG.html @@ -0,0 +1,104 @@ + + + + + + + +
    +
    + + diff --git a/openlayers/tests/Layer/Grid.html b/openlayers/tests/Layer/Grid.html new file mode 100644 index 0000000000..a4dbcee53f --- /dev/null +++ b/openlayers/tests/Layer/Grid.html @@ -0,0 +1,642 @@ + + + + + + + + + + + diff --git a/openlayers/tests/Layer/HTTPRequest.html b/openlayers/tests/Layer/HTTPRequest.html new file mode 100644 index 0000000000..02311564f1 --- /dev/null +++ b/openlayers/tests/Layer/HTTPRequest.html @@ -0,0 +1,226 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Image.html b/openlayers/tests/Layer/Image.html new file mode 100644 index 0000000000..f0a3484dd6 --- /dev/null +++ b/openlayers/tests/Layer/Image.html @@ -0,0 +1,164 @@ + + + + + + +
    +
    + + diff --git a/openlayers/tests/Layer/KaMap.html b/openlayers/tests/Layer/KaMap.html new file mode 100644 index 0000000000..af2003a1d2 --- /dev/null +++ b/openlayers/tests/Layer/KaMap.html @@ -0,0 +1,287 @@ + + + + + + + + + + + diff --git a/openlayers/tests/Layer/MapGuide.html b/openlayers/tests/Layer/MapGuide.html new file mode 100644 index 0000000000..b1eb386c27 --- /dev/null +++ b/openlayers/tests/Layer/MapGuide.html @@ -0,0 +1,177 @@ + + + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/MapServer.html b/openlayers/tests/Layer/MapServer.html new file mode 100644 index 0000000000..338a5460e2 --- /dev/null +++ b/openlayers/tests/Layer/MapServer.html @@ -0,0 +1,426 @@ + + + + + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Markers.html b/openlayers/tests/Layer/Markers.html new file mode 100644 index 0000000000..929e1e2c9b --- /dev/null +++ b/openlayers/tests/Layer/Markers.html @@ -0,0 +1,129 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/MultiMap.html b/openlayers/tests/Layer/MultiMap.html new file mode 100644 index 0000000000..8ae07d2adc --- /dev/null +++ b/openlayers/tests/Layer/MultiMap.html @@ -0,0 +1,121 @@ + + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/PointGrid.html b/openlayers/tests/Layer/PointGrid.html new file mode 100644 index 0000000000..22d85c7dea --- /dev/null +++ b/openlayers/tests/Layer/PointGrid.html @@ -0,0 +1,231 @@ + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/PointTrack.html b/openlayers/tests/Layer/PointTrack.html new file mode 100644 index 0000000000..d889db27f3 --- /dev/null +++ b/openlayers/tests/Layer/PointTrack.html @@ -0,0 +1,79 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/SphericalMercator.html b/openlayers/tests/Layer/SphericalMercator.html new file mode 100644 index 0000000000..c2bbdfc632 --- /dev/null +++ b/openlayers/tests/Layer/SphericalMercator.html @@ -0,0 +1,137 @@ + + + + + + + + diff --git a/openlayers/tests/Layer/TMS.html b/openlayers/tests/Layer/TMS.html new file mode 100644 index 0000000000..c55d02bda7 --- /dev/null +++ b/openlayers/tests/Layer/TMS.html @@ -0,0 +1,268 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Text.html b/openlayers/tests/Layer/Text.html new file mode 100644 index 0000000000..0cf6dcf580 --- /dev/null +++ b/openlayers/tests/Layer/Text.html @@ -0,0 +1,211 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/TileCache.html b/openlayers/tests/Layer/TileCache.html new file mode 100644 index 0000000000..6ae2bc1c86 --- /dev/null +++ b/openlayers/tests/Layer/TileCache.html @@ -0,0 +1,203 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Vector.html b/openlayers/tests/Layer/Vector.html new file mode 100644 index 0000000000..cc8c3fcf43 --- /dev/null +++ b/openlayers/tests/Layer/Vector.html @@ -0,0 +1,921 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Vector/RootContainer.html b/openlayers/tests/Layer/Vector/RootContainer.html new file mode 100644 index 0000000000..aa92923412 --- /dev/null +++ b/openlayers/tests/Layer/Vector/RootContainer.html @@ -0,0 +1,63 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/WFS.html b/openlayers/tests/Layer/WFS.html new file mode 100644 index 0000000000..b9f85182d2 --- /dev/null +++ b/openlayers/tests/Layer/WFS.html @@ -0,0 +1,161 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/WMS.html b/openlayers/tests/Layer/WMS.html new file mode 100644 index 0000000000..557395df30 --- /dev/null +++ b/openlayers/tests/Layer/WMS.html @@ -0,0 +1,547 @@ + + + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/WMS/Post.html b/openlayers/tests/Layer/WMS/Post.html new file mode 100644 index 0000000000..90ff0b89df --- /dev/null +++ b/openlayers/tests/Layer/WMS/Post.html @@ -0,0 +1,87 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/WMTS.html b/openlayers/tests/Layer/WMTS.html new file mode 100644 index 0000000000..aa1bed4033 --- /dev/null +++ b/openlayers/tests/Layer/WMTS.html @@ -0,0 +1,1424 @@ + + + + + + +
    +
    +
    + + diff --git a/openlayers/tests/Layer/WrapDateLine.html b/openlayers/tests/Layer/WrapDateLine.html new file mode 100644 index 0000000000..2f3430e099 --- /dev/null +++ b/openlayers/tests/Layer/WrapDateLine.html @@ -0,0 +1,182 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/XYZ.html b/openlayers/tests/Layer/XYZ.html new file mode 100644 index 0000000000..a13ee845c3 --- /dev/null +++ b/openlayers/tests/Layer/XYZ.html @@ -0,0 +1,272 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Layer/Yahoo.html b/openlayers/tests/Layer/Yahoo.html new file mode 100755 index 0000000000..b3b8372f9c --- /dev/null +++ b/openlayers/tests/Layer/Yahoo.html @@ -0,0 +1,120 @@ + + + + + + + +
    + + diff --git a/openlayers/tests/Layer/atom-1.0.xml b/openlayers/tests/Layer/atom-1.0.xml new file mode 100644 index 0000000000..f0d5d6fce2 --- /dev/null +++ b/openlayers/tests/Layer/atom-1.0.xml @@ -0,0 +1,34 @@ + + + + tumulus + + + + http://pleiades.stoa.org/places/tumulus + + + Unnamed Tumulus + + http://pleiades.stoa.org/places/638896 + + An ancient tumulus, attested during the Classical period (modern location: Karaburun). Its ancient name is not known. + 36.7702 29.9805 + + + Unnamed Tumulus + + http://pleiades.stoa.org/places/638924 + + An ancient tumulus, attested during the Classical period (modern location: Kızılbel). Its ancient name is not known. + 36.7263 29.8619 + + + + diff --git a/openlayers/tests/Layer/data_Layer_Text_textfile.txt b/openlayers/tests/Layer/data_Layer_Text_textfile.txt new file mode 100644 index 0000000000..8250988d49 --- /dev/null +++ b/openlayers/tests/Layer/data_Layer_Text_textfile.txt @@ -0,0 +1,3 @@ +point image +10,20 http://boston.openguides.org/markers/ORANGE.png +15,25 http://boston.openguides.org/markers/ORANGE.png diff --git a/openlayers/tests/Layer/data_Layer_Text_textfile_2.txt b/openlayers/tests/Layer/data_Layer_Text_textfile_2.txt new file mode 100644 index 0000000000..91a8093bda --- /dev/null +++ b/openlayers/tests/Layer/data_Layer_Text_textfile_2.txt @@ -0,0 +1,3 @@ +point title description image +10,20 a b http://boston.openguides.org/markers/ORANGE.png +15,25 c d http://boston.openguides.org/markers/ORANGE.png diff --git a/openlayers/tests/Layer/data_Layer_Text_textfile_overflow.txt b/openlayers/tests/Layer/data_Layer_Text_textfile_overflow.txt new file mode 100644 index 0000000000..bb4768ec51 --- /dev/null +++ b/openlayers/tests/Layer/data_Layer_Text_textfile_overflow.txt @@ -0,0 +1,3 @@ +overflow point title description image +auto 10,20 a b http://boston.openguides.org/markers/ORANGE.png +hidden 15,25 c d http://boston.openguides.org/markers/ORANGE.png diff --git a/openlayers/tests/Layer/georss.txt b/openlayers/tests/Layer/georss.txt new file mode 100644 index 0000000000..053749b943 --- /dev/null +++ b/openlayers/tests/Layer/georss.txt @@ -0,0 +1,378 @@ + + + +This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: http://platial.typepad.com/news/2006/04/really_simple_t.html for more info. +http://platial.com +Crschmidt's Places At Platial + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://platial.com/place/90306 +Knitting Room +Address: 2 lake St, Arlington, MA
    Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

    Map this on Platial
    Grab this on Platial ]]>
    +42.405696 -71.142197 +crschmidt +2006-06-08T17:35:01.942452+00:00 +
    + +http://platial.com/place/67230 +Knitting Room +Address: 2 lake St, Arlington, MA
    Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

    Map this on Platial
    Grab this on Platial ]]>
    +42.405524 -71.142273 +crschmidt +2006-04-24T11:35:26.733857+00:00 +
    + +http://platial.com/place/65645 +†¢¢™£ˆøœ +Address: 151 Erie St., Cambridge, MA
    Tags: platial graffiti

    Map this on Platial
    Grab this on Platial ]]>
    +42.352455 -71.110210 +crschmidt +2006-04-20T08:56:12.696224+00:00 +
    + +http://platial.com/place/62200 +Allen Hall +Address: 1301 W Gregory Dr, Urbana, IL
    Tags: dorm, uiuc, college



    Map this on Platial
    Grab this on Platial ]]>
    +40.104172 -88.220623 +crschmidt +2006-04-14T08:01:01.872873+00:00 +
    + +http://platial.com/place/28232 +Bagby Hot Springs, OR +Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria

    Map this on Platial
    Grab this on Platial ]]>
    +44.936000 -122.173000 +crschmidt +2006-01-03T23:10:18.553063+00:00 +
    + +http://platial.com/place/43666 +Shooting Location for "The Field of Dreams" Film +Address: Dyersville, Iowa
    Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location

    Map this on Platial
    Grab this on Platial ]]>
    +42.481213 -91.111679 +echinodermata +2006-03-23T11:40:17.654061+00:00 +
    + +http://platial.com/place/28394 +Moffetts (Bonneville) Hot Springs, WA +Tags: soak, hot springs, relax, nature

    Map this on Platial
    Grab this on Platial ]]>
    +45.658000 -121.962000 +crschmidt +2006-01-03T23:16:27.329816+00:00 +
    + +http://platial.com/place/28251 +Austin Hot Springs, OR +Tags: soak, hot springs, relax, nature, popular, crowded

    Map this on Platial
    Grab this on Platial ]]>
    +45.021000 -122.009000 +crschmidt +2006-01-03T23:11:04.489886+00:00 +
    + +http://platial.com/place/28392 +Rock Creek Hot Springs, WA +Tags: soak, hot springs, relax, nature

    Map this on Platial
    Grab this on Platial ]]>
    +45.723000 -121.927000 +crschmidt +2006-01-03T23:16:22.636855+00:00 +
    + +http://platial.com/place/28391 +St. Martins (Wind River) Hot Springs, WA +Tags: hot springs, soak, relax, nature, wonderful

    Map this on Platial
    Grab this on Platial ]]>
    +45.728000 -121.800000 +crschmidt +2006-01-03T23:16:20.383244+00:00 +
    + +http://platial.com/place/28231 +Breitenbush Hot Springs, OR +Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking

    Map this on Platial
    Grab this on Platial ]]>
    +44.782000 -121.975000 +crschmidt +2006-01-03T23:10:16.529195+00:00 +
    + +http://platial.com/place/28393 +Collins Hot Springs, WA +Tags: portland, nice, hot springs, soak

    Map this on Platial
    Grab this on Platial ]]>
    +45.701000 -121.728000 +crschmidt +2006-01-03T23:16:24.648745+00:00 +
    + +http://platial.com/place/31685 +Darwin's Ltd. +Address: 148 Mount Auburn St, Cambridge, MA
    Tags: coffee, beer, sandwiches, freewifi



    Map this on Platial
    Grab this on Platial ]]>
    +42.373974 -71.125053 +crschmidt +2006-01-10T09:24:08.152985+00:00 +
    + +http://platial.com/place/28596 +Huckleberry Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.115000 -110.684000 +crschmidt +2006-01-03T23:24:32.283094+00:00 +
    + +http://platial.com/place/28595 +South Entrance Hot Springs, WY +


    Map this on Platial
    Grab this on Platial ]]>
    +44.142000 -110.656000 +crschmidt +2006-01-03T23:24:30.279497+00:00 +
    + +http://platial.com/place/28594 +Crawfish Creek Hot Springs, WY +


    Map this on Platial
    Grab this on Platial ]]>
    +44.157000 -110.699000 +crschmidt +2006-01-03T23:24:28.280271+00:00 +
    + +http://platial.com/place/28593 +Crawfish Creek Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.165000 -110.723000 +crschmidt +2006-01-03T23:24:20.364077+00:00 +
    + +http://platial.com/place/28592 +Snake Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.169000 -110.583000 +crschmidt +2006-01-03T23:24:12.234974+00:00 +
    + +http://platial.com/place/28591 +Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.187000 -110.726000 +crschmidt +2006-01-03T23:24:10.027857+00:00 +
    + +http://platial.com/place/28590 +Hot Springs on Upper Snake River, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.204000 -110.486000 +crschmidt +2006-01-03T23:24:07.79658+00:00 +
    + +http://platial.com/place/28589 +Hot Springs on lewis Lake, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.276000 -110.636000 +crschmidt +2006-01-03T23:24:05.683418+00:00 +
    + +http://platial.com/place/28588 +Rustic Geyser, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.282000 -110.506000 +crschmidt +2006-01-03T23:24:03.66329+00:00 +
    + +http://platial.com/place/28587 +Bechler River Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.285000 -110.900000 +crschmidt +2006-01-03T23:24:01.611442+00:00 +
    + +http://platial.com/place/28586 +Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.290000 -110.504000 +crschmidt +2006-01-03T23:23:59.658699+00:00 +
    + +http://platial.com/place/28585 +Heart Lake Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.299000 -110.517000 +crschmidt +2006-01-03T23:23:57.181801+00:00 +
    + +http://platial.com/place/28584 +Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.307000 -110.526000 +crschmidt +2006-01-03T23:23:55.240485+00:00 +
    + +http://platial.com/place/28583 +Hot Springs on lewis Lake, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.309000 -110.654000 +crschmidt +2006-01-03T23:23:53.22295+00:00 +
    + +http://platial.com/place/28582 +Shoshone Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.354000 -110.800000 +crschmidt +2006-01-03T23:23:51.179049+00:00 +
    + +http://platial.com/place/28581 +Hot Springs on Continental Divide, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.401000 -110.936000 +crschmidt +2006-01-03T23:23:49.077176+00:00 +
    + +http://platial.com/place/28580 +Hot Springs on Upper Firehole River, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.404000 -110.824000 +crschmidt +2006-01-03T23:23:47.054664+00:00 +
    + +http://platial.com/place/28579 +Summit Lake Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.410000 -110.953000 +crschmidt +2006-01-03T23:23:45.039394+00:00 +
    + +http://platial.com/place/28578 +Lone Star Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.414000 -110.817000 +crschmidt +2006-01-03T23:23:42.938808+00:00 +
    + +http://platial.com/place/28577 +West. Thumb Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.417000 -110.570000 +crschmidt +2006-01-03T23:23:40.90238+00:00 +
    + +http://platial.com/place/28576 +Lone Star Geyser, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.418000 -110.805000 +crschmidt +2006-01-03T23:23:38.844625+00:00 +
    + +http://platial.com/place/28575 +Smoke Jumper Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.421000 -110.952000 +crschmidt +2006-01-03T23:23:36.818513+00:00 +
    + +http://platial.com/place/28574 +West. Thumb Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.422000 -110.574000 +crschmidt +2006-01-03T23:23:34.767729+00:00 +
    + +http://platial.com/place/28573 +Potts Hot Spring Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.433000 -110.581000 +crschmidt +2006-01-03T23:23:32.749915+00:00 +
    + +http://platial.com/place/28572 +Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.433000 -110.813000 +crschmidt +2006-01-03T23:23:30.829745+00:00 +
    + +http://platial.com/place/28571 +Hot Springs on Continental Divide, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.438000 -110.977000 +crschmidt +2006-01-03T23:23:28.730401+00:00 +
    + +http://platial.com/place/28570 +SouthEastern Group, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.459000 -110.817000 +crschmidt +2006-01-03T23:23:26.706763+00:00 +
    +
    \ No newline at end of file diff --git a/openlayers/tests/Layer/mice.xml b/openlayers/tests/Layer/mice.xml new file mode 100644 index 0000000000..4a001eca26 --- /dev/null +++ b/openlayers/tests/Layer/mice.xml @@ -0,0 +1,156 @@ + + + + + -89.817223,45.005555 -74.755001,51.701388 + + + + + + -79.771668,45.891110 -79.771668,45.891110 + + + + + -79.771668,45.891110 + + + + + + + + + -83.755834,46.365277 -83.755834,46.365277 + + + owl + + + -83.755834,46.365277 + + + + + + + + + -83.808612,46.175277 -83.808612,46.175277 + + + + + -83.808612,46.175277 + + + + + + + + + -84.111112,46.309166 -84.111112,46.309166 + + + + + -84.111112,46.309166 + + + + + + + + + -83.678612,46.821110 -83.678612,46.821110 + + + + + -83.678612,46.821110 + + + + + + + + + -83.664445,46.518888 -83.664445,46.518888 + + + + + -83.664445,46.518888 + + + + + + + + + -80.613334,46.730277 -80.613334,46.730277 + + + + + -80.613334,46.730277 + + + + + + + + + -79.676946,45.428054 -79.676946,45.428054 + + + + + -79.676946,45.428054 + + + + + + + + + -83.853056,46.236944 -83.853056,46.236944 + + + + + -83.853056,46.236944 + + + + + + + + + -82.289167,45.896388 -82.289167,45.896388 + + + + + -82.289167,45.896388 + + + + + + diff --git a/openlayers/tests/Layer/owls.xml b/openlayers/tests/Layer/owls.xml new file mode 100644 index 0000000000..4a001eca26 --- /dev/null +++ b/openlayers/tests/Layer/owls.xml @@ -0,0 +1,156 @@ + + + + + -89.817223,45.005555 -74.755001,51.701388 + + + + + + -79.771668,45.891110 -79.771668,45.891110 + + + + + -79.771668,45.891110 + + + + + + + + + -83.755834,46.365277 -83.755834,46.365277 + + + owl + + + -83.755834,46.365277 + + + + + + + + + -83.808612,46.175277 -83.808612,46.175277 + + + + + -83.808612,46.175277 + + + + + + + + + -84.111112,46.309166 -84.111112,46.309166 + + + + + -84.111112,46.309166 + + + + + + + + + -83.678612,46.821110 -83.678612,46.821110 + + + + + -83.678612,46.821110 + + + + + + + + + -83.664445,46.518888 -83.664445,46.518888 + + + + + -83.664445,46.518888 + + + + + + + + + -80.613334,46.730277 -80.613334,46.730277 + + + + + -80.613334,46.730277 + + + + + + + + + -79.676946,45.428054 -79.676946,45.428054 + + + + + -79.676946,45.428054 + + + + + + + + + -83.853056,46.236944 -83.853056,46.236944 + + + + + -83.853056,46.236944 + + + + + + + + + -82.289167,45.896388 -82.289167,45.896388 + + + + + -82.289167,45.896388 + + + + + + diff --git a/openlayers/tests/Map.html b/openlayers/tests/Map.html new file mode 100644 index 0000000000..356331225e --- /dev/null +++ b/openlayers/tests/Map.html @@ -0,0 +1,1853 @@ + + + + + + +
    +
    + + diff --git a/openlayers/tests/Marker.html b/openlayers/tests/Marker.html new file mode 100644 index 0000000000..77abc31285 --- /dev/null +++ b/openlayers/tests/Marker.html @@ -0,0 +1,163 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Marker/Box.html b/openlayers/tests/Marker/Box.html new file mode 100644 index 0000000000..806336e7f6 --- /dev/null +++ b/openlayers/tests/Marker/Box.html @@ -0,0 +1,183 @@ + + + + + + +
    + + \ No newline at end of file diff --git a/openlayers/tests/OLLoader.js b/openlayers/tests/OLLoader.js new file mode 100644 index 0000000000..a2311c7e2f --- /dev/null +++ b/openlayers/tests/OLLoader.js @@ -0,0 +1,26 @@ +// Adding a mode parameter with "build" as value in the run-tests.html will +// make usage of the build version of the library. +// get the OLLoader.js script location +(function() { + var r = new RegExp("(^|(.*?\\/))(" + "OLLoader.js" + ")(\\?|$)"), + s = document.getElementsByTagName('script'), + src, m, l = ""; + for(var i=0, len=s.length; i"; + document.write(scriptTag); +})(); diff --git a/openlayers/tests/OpenLayers1.html b/openlayers/tests/OpenLayers1.html new file mode 100644 index 0000000000..ea574efa61 --- /dev/null +++ b/openlayers/tests/OpenLayers1.html @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/openlayers/tests/OpenLayers2.html b/openlayers/tests/OpenLayers2.html new file mode 100644 index 0000000000..fbdb043ffd --- /dev/null +++ b/openlayers/tests/OpenLayers2.html @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/openlayers/tests/OpenLayers3.html b/openlayers/tests/OpenLayers3.html new file mode 100644 index 0000000000..c4cbb804c1 --- /dev/null +++ b/openlayers/tests/OpenLayers3.html @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/openlayers/tests/OpenLayers4.html b/openlayers/tests/OpenLayers4.html new file mode 100644 index 0000000000..7c9012c641 --- /dev/null +++ b/openlayers/tests/OpenLayers4.html @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/openlayers/tests/OpenLayersJsFiles.html b/openlayers/tests/OpenLayersJsFiles.html new file mode 100644 index 0000000000..8dff0ec592 --- /dev/null +++ b/openlayers/tests/OpenLayersJsFiles.html @@ -0,0 +1,27 @@ + + + + + + + + + diff --git a/openlayers/tests/Popup.html b/openlayers/tests/Popup.html new file mode 100644 index 0000000000..10245a0199 --- /dev/null +++ b/openlayers/tests/Popup.html @@ -0,0 +1,219 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Popup/Anchored.html b/openlayers/tests/Popup/Anchored.html new file mode 100644 index 0000000000..f53546b0c0 --- /dev/null +++ b/openlayers/tests/Popup/Anchored.html @@ -0,0 +1,37 @@ + + + + + + + + diff --git a/openlayers/tests/Popup/AnchoredBubble.html b/openlayers/tests/Popup/AnchoredBubble.html new file mode 100644 index 0000000000..bd2d8123b2 --- /dev/null +++ b/openlayers/tests/Popup/AnchoredBubble.html @@ -0,0 +1,59 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Popup/FramedCloud.html b/openlayers/tests/Popup/FramedCloud.html new file mode 100644 index 0000000000..7da86e36ea --- /dev/null +++ b/openlayers/tests/Popup/FramedCloud.html @@ -0,0 +1,18 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Projection.html b/openlayers/tests/Projection.html new file mode 100644 index 0000000000..6ef317dde2 --- /dev/null +++ b/openlayers/tests/Projection.html @@ -0,0 +1,70 @@ + + + + + + + + diff --git a/openlayers/tests/Protocol.html b/openlayers/tests/Protocol.html new file mode 100644 index 0000000000..7432b86ea6 --- /dev/null +++ b/openlayers/tests/Protocol.html @@ -0,0 +1,63 @@ + + + + + + + + diff --git a/openlayers/tests/Protocol/HTTP.html b/openlayers/tests/Protocol/HTTP.html new file mode 100644 index 0000000000..fac460b547 --- /dev/null +++ b/openlayers/tests/Protocol/HTTP.html @@ -0,0 +1,842 @@ + + + + + + + + diff --git a/openlayers/tests/Protocol/SOS.html b/openlayers/tests/Protocol/SOS.html new file mode 100644 index 0000000000..58e66070db --- /dev/null +++ b/openlayers/tests/Protocol/SOS.html @@ -0,0 +1,57 @@ + + + + + + + + diff --git a/openlayers/tests/Protocol/SQL.html b/openlayers/tests/Protocol/SQL.html new file mode 100644 index 0000000000..f02a5e855d --- /dev/null +++ b/openlayers/tests/Protocol/SQL.html @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/openlayers/tests/Protocol/SQL/Gears.html b/openlayers/tests/Protocol/SQL/Gears.html new file mode 100644 index 0000000000..c206e5aa84 --- /dev/null +++ b/openlayers/tests/Protocol/SQL/Gears.html @@ -0,0 +1,473 @@ + + + + + + + + diff --git a/openlayers/tests/Protocol/Script.html b/openlayers/tests/Protocol/Script.html new file mode 100644 index 0000000000..8eaa6e803a --- /dev/null +++ b/openlayers/tests/Protocol/Script.html @@ -0,0 +1,271 @@ + + + + + + + + diff --git a/openlayers/tests/Protocol/WFS.html b/openlayers/tests/Protocol/WFS.html new file mode 100644 index 0000000000..cc56e459bc --- /dev/null +++ b/openlayers/tests/Protocol/WFS.html @@ -0,0 +1,471 @@ + + + + + + +
    +
    +
    +
    +
    +
    + + diff --git a/openlayers/tests/README.txt b/openlayers/tests/README.txt new file mode 100644 index 0000000000..dc1f192622 --- /dev/null +++ b/openlayers/tests/README.txt @@ -0,0 +1,16 @@ +This directory contains unit tests for the OpenLayers library. + +Tests use the Test.AnotherWay library from . The test +runner is 'run-tests.html' and new test files need to be added to +'list-tests.html'. + +The following file naming conventions are used: + + * A filename that starts with `test_` and has an `.html` extension + contains tests. These should contain tests for a specific class. + + * A filename starting with `page_` and has an `.html` extension is a + supporting HTML file used in one or more tests. + + * A filename starting with 'data_` is a supporting data file used in one + or more tests. diff --git a/openlayers/tests/Renderer.html b/openlayers/tests/Renderer.html new file mode 100644 index 0000000000..a149d63746 --- /dev/null +++ b/openlayers/tests/Renderer.html @@ -0,0 +1,80 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Renderer/Canvas.html b/openlayers/tests/Renderer/Canvas.html new file mode 100644 index 0000000000..c4bef1259a --- /dev/null +++ b/openlayers/tests/Renderer/Canvas.html @@ -0,0 +1,469 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Renderer/Elements.html b/openlayers/tests/Renderer/Elements.html new file mode 100644 index 0000000000..48db70adf0 --- /dev/null +++ b/openlayers/tests/Renderer/Elements.html @@ -0,0 +1,626 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Renderer/SVG.html b/openlayers/tests/Renderer/SVG.html new file mode 100644 index 0000000000..fd82093d5e --- /dev/null +++ b/openlayers/tests/Renderer/SVG.html @@ -0,0 +1,473 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Renderer/SVG2.html b/openlayers/tests/Renderer/SVG2.html new file mode 100644 index 0000000000..8e92a719f8 --- /dev/null +++ b/openlayers/tests/Renderer/SVG2.html @@ -0,0 +1,426 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Renderer/VML.html b/openlayers/tests/Renderer/VML.html new file mode 100644 index 0000000000..f383848cf4 --- /dev/null +++ b/openlayers/tests/Renderer/VML.html @@ -0,0 +1,454 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Request.html b/openlayers/tests/Request.html new file mode 100644 index 0000000000..52643e450d --- /dev/null +++ b/openlayers/tests/Request.html @@ -0,0 +1,451 @@ + + + + + + + + diff --git a/openlayers/tests/Request/XMLHttpRequest.html b/openlayers/tests/Request/XMLHttpRequest.html new file mode 100644 index 0000000000..fa628077cb --- /dev/null +++ b/openlayers/tests/Request/XMLHttpRequest.html @@ -0,0 +1,59 @@ + + + + + + + + diff --git a/openlayers/tests/Rule.html b/openlayers/tests/Rule.html new file mode 100644 index 0000000000..56e3483eed --- /dev/null +++ b/openlayers/tests/Rule.html @@ -0,0 +1,123 @@ + + + + + + + + diff --git a/openlayers/tests/Strategy.html b/openlayers/tests/Strategy.html new file mode 100644 index 0000000000..5ecdef67fc --- /dev/null +++ b/openlayers/tests/Strategy.html @@ -0,0 +1,94 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Strategy/BBOX.html b/openlayers/tests/Strategy/BBOX.html new file mode 100644 index 0000000000..026a13d474 --- /dev/null +++ b/openlayers/tests/Strategy/BBOX.html @@ -0,0 +1,327 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Strategy/Cluster.html b/openlayers/tests/Strategy/Cluster.html new file mode 100644 index 0000000000..38cc116ba7 --- /dev/null +++ b/openlayers/tests/Strategy/Cluster.html @@ -0,0 +1,130 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Strategy/Filter.html b/openlayers/tests/Strategy/Filter.html new file mode 100644 index 0000000000..7889d1ee48 --- /dev/null +++ b/openlayers/tests/Strategy/Filter.html @@ -0,0 +1,135 @@ + + + + + + +
    + + \ No newline at end of file diff --git a/openlayers/tests/Strategy/Fixed.html b/openlayers/tests/Strategy/Fixed.html new file mode 100644 index 0000000000..209d8daab6 --- /dev/null +++ b/openlayers/tests/Strategy/Fixed.html @@ -0,0 +1,243 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Strategy/Paging.html b/openlayers/tests/Strategy/Paging.html new file mode 100644 index 0000000000..a85167eaa6 --- /dev/null +++ b/openlayers/tests/Strategy/Paging.html @@ -0,0 +1,113 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Strategy/Refresh.html b/openlayers/tests/Strategy/Refresh.html new file mode 100644 index 0000000000..f8fb451c76 --- /dev/null +++ b/openlayers/tests/Strategy/Refresh.html @@ -0,0 +1,162 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Strategy/Save.html b/openlayers/tests/Strategy/Save.html new file mode 100644 index 0000000000..12904854b7 --- /dev/null +++ b/openlayers/tests/Strategy/Save.html @@ -0,0 +1,127 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Style.html b/openlayers/tests/Style.html new file mode 100644 index 0000000000..2c3a18b176 --- /dev/null +++ b/openlayers/tests/Style.html @@ -0,0 +1,426 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Style2.html b/openlayers/tests/Style2.html new file mode 100644 index 0000000000..87ab584480 --- /dev/null +++ b/openlayers/tests/Style2.html @@ -0,0 +1,56 @@ + + + + + + + diff --git a/openlayers/tests/StyleMap.html b/openlayers/tests/StyleMap.html new file mode 100644 index 0000000000..6c633c3d8d --- /dev/null +++ b/openlayers/tests/StyleMap.html @@ -0,0 +1,44 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Symbolizer.html b/openlayers/tests/Symbolizer.html new file mode 100644 index 0000000000..be24e9c7b8 --- /dev/null +++ b/openlayers/tests/Symbolizer.html @@ -0,0 +1,31 @@ + + + + + + + diff --git a/openlayers/tests/Symbolizer/Line.html b/openlayers/tests/Symbolizer/Line.html new file mode 100644 index 0000000000..5396f3bdf1 --- /dev/null +++ b/openlayers/tests/Symbolizer/Line.html @@ -0,0 +1,42 @@ + + + + + + + diff --git a/openlayers/tests/Symbolizer/Point.html b/openlayers/tests/Symbolizer/Point.html new file mode 100644 index 0000000000..b1311c07f9 --- /dev/null +++ b/openlayers/tests/Symbolizer/Point.html @@ -0,0 +1,52 @@ + + + + + + + diff --git a/openlayers/tests/Symbolizer/Polygon.html b/openlayers/tests/Symbolizer/Polygon.html new file mode 100644 index 0000000000..ebea5eaff3 --- /dev/null +++ b/openlayers/tests/Symbolizer/Polygon.html @@ -0,0 +1,44 @@ + + + + + + + diff --git a/openlayers/tests/Symbolizer/Raster.html b/openlayers/tests/Symbolizer/Raster.html new file mode 100644 index 0000000000..8dd9cb9a59 --- /dev/null +++ b/openlayers/tests/Symbolizer/Raster.html @@ -0,0 +1,32 @@ + + + + + + + diff --git a/openlayers/tests/Symbolizer/Text.html b/openlayers/tests/Symbolizer/Text.html new file mode 100644 index 0000000000..a849f20c1b --- /dev/null +++ b/openlayers/tests/Symbolizer/Text.html @@ -0,0 +1,42 @@ + + + + + + + diff --git a/openlayers/tests/Tile.html b/openlayers/tests/Tile.html new file mode 100644 index 0000000000..b199f03f3d --- /dev/null +++ b/openlayers/tests/Tile.html @@ -0,0 +1,95 @@ + + + + + + + + + diff --git a/openlayers/tests/Tile/Google.html b/openlayers/tests/Tile/Google.html new file mode 100644 index 0000000000..e1710847ba --- /dev/null +++ b/openlayers/tests/Tile/Google.html @@ -0,0 +1,74 @@ + + + + + + + +
    + + \ No newline at end of file diff --git a/openlayers/tests/Tile/Image.html b/openlayers/tests/Tile/Image.html new file mode 100644 index 0000000000..f12bb19fd8 --- /dev/null +++ b/openlayers/tests/Tile/Image.html @@ -0,0 +1,325 @@ + + + + + + +
    + + + diff --git a/openlayers/tests/Tile/Image/IFrame.html b/openlayers/tests/Tile/Image/IFrame.html new file mode 100644 index 0000000000..e1fa5498c9 --- /dev/null +++ b/openlayers/tests/Tile/Image/IFrame.html @@ -0,0 +1,200 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Tile/WFS.html b/openlayers/tests/Tile/WFS.html new file mode 100644 index 0000000000..ae996ceb5c --- /dev/null +++ b/openlayers/tests/Tile/WFS.html @@ -0,0 +1,173 @@ + + + + + + + + + diff --git a/openlayers/tests/Tween.html b/openlayers/tests/Tween.html new file mode 100644 index 0000000000..f185bee97f --- /dev/null +++ b/openlayers/tests/Tween.html @@ -0,0 +1,68 @@ + + + + + + +
    + + diff --git a/openlayers/tests/Util.html b/openlayers/tests/Util.html new file mode 100644 index 0000000000..f70cbb9ddf --- /dev/null +++ b/openlayers/tests/Util.html @@ -0,0 +1,1170 @@ + + + + + + + + + +
    + + diff --git a/openlayers/tests/atom-1.0.xml b/openlayers/tests/atom-1.0.xml new file mode 100644 index 0000000000..f0d5d6fce2 --- /dev/null +++ b/openlayers/tests/atom-1.0.xml @@ -0,0 +1,34 @@ + + + + tumulus + + + + http://pleiades.stoa.org/places/tumulus + + + Unnamed Tumulus + + http://pleiades.stoa.org/places/638896 + + An ancient tumulus, attested during the Classical period (modern location: Karaburun). Its ancient name is not known. + 36.7702 29.9805 + + + Unnamed Tumulus + + http://pleiades.stoa.org/places/638924 + + An ancient tumulus, attested during the Classical period (modern location: Kızılbel). Its ancient name is not known. + 36.7263 29.8619 + + + + diff --git a/openlayers/tests/auto-tests.html b/openlayers/tests/auto-tests.html new file mode 100644 index 0000000000..f467e41900 --- /dev/null +++ b/openlayers/tests/auto-tests.html @@ -0,0 +1,2447 @@ + + + + Run the testsuite + + + + + + + + +
    +
    Test pages:
    +
    + +
    +
    +
    + + + + +
    + do not close windows opened by tests +
    +
    + +

    Record mouse input for the page:

    +

    +

    or enter page url:

    +

    +
    +
    + +
    +
    +Results: + + +
    +
    +
    +
    +
    +
    + + + + + + +-
    + +

    +  + +

    + +
     
    +

    +cursor is over +

    + +

    + keyboard control: press + ctrl - + shift - +

    + +

    +s +to start recording + +

    + +

    +h +to hide/show this window +

    + +

    +m +to record mousemove + +

    + +

    +p +to pause recording + +

    + +

    +c +to add checkpoint +

    + +

    +checkpoints: +

    +
    +
    +
    + +
    + diff --git a/openlayers/tests/data/geos_wkt_intersects.js b/openlayers/tests/data/geos_wkt_intersects.js new file mode 100644 index 0000000000..e0a355b3db --- /dev/null +++ b/openlayers/tests/data/geos_wkt_intersects.js @@ -0,0 +1,495 @@ +var geos_test_data = [ +{'wkt1':'POLYGON ((100 100,100 200,200 200,200 100,100 100))', 'wkt2':'POLYGON ((100 100,1000000000000000.0 110.0,1000000000000000.0 100.0,100 100))', result:true}, +{'wkt1':'POLYGON ((120 100,120 200,200 200,200 100,120 100))', 'wkt2':'POLYGON ((100 100,1000000000000000.0 110.0,1000000000000000.0 100.0,100 100))', result:true}, +{'wkt1':'POLYGON ((20 20,20 100,120 100,140 20,20 20))', 'wkt2':'POLYGON ((20 20,20 100,120 100,140 20,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 100,120 100,140 20,20 20))', 'wkt2':'POLYGON ((20 20,140 20,120 100,20 100,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 100,120 100,140 20,20 20))', 'wkt2':'POLYGON ((120 100,140 20,20 20,20 100,120 100))', result:true}, +{'wkt1':'POLYGON ((20 20,20 100,120 100,140 20,20 20))', 'wkt2':'POLYGON ((20 100,60 100,120 100,140 20,80 20,20 20,20 100))', result:true}, +{'wkt1':'POLYGON ((0 0,80 0,80 80,0 80,0 0))', 'wkt2':'POLYGON ((100 200,100 140,180 140,180 200,100 200))', result:false}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((140 120,140 200,240 200,240 120,140 120))', result:true}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((80 180,140 260,260 200,200 60,80 180))', result:true}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((240 80,140 120,180 240,280 200,240 80))', result:true}, +{'wkt1':'POLYGON ((140 160,20 20,270 20,150 160,230 40,60 40,140 160))', 'wkt2':'POLYGON ((140 40,180 80,120 100,140 40))', result:true}, +{'wkt1':'POLYGON ((140 160,20 20,270 20,150 160,230 40,60 40,140 160))', 'wkt2':'POLYGON ((120 100,180 80,130 40,120 100))', result:true}, +{'wkt1':'POLYGON ((20 20,180 20,140 140,20 140,20 20))', 'wkt2':'POLYGON ((180 100,80 200,180 280,260 200,180 100))', result:true}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((140 140,20 120,0 220,120 240,140 140))', result:true}, +{'wkt1':'POLYGON ((160 200,210 70,120 70,160 200))', 'wkt2':'POLYGON ((160 200,260 40,70 40,160 200,20 20,310 20,160 200))', result:true}, +{'wkt1':'POLYGON ((110 140,200 70,200 160,110 140))', 'wkt2':'POLYGON ((110 140,110 50,60 50,60 90,160 190,20 110,20 20,200 20,110 140))', result:true}, +{'wkt1':'POLYGON ((20 120,20 20,260 20,260 120,200 40,140 120,80 40,20 120))', 'wkt2':'POLYGON ((20 120,20 240,260 240,260 120,200 200,140 120,80 200,20 120))', result:true}, +{'wkt1':'POLYGON ((20 120,20 20,260 20,260 120,180 40,140 120,100 40,20 120))', 'wkt2':'POLYGON ((20 120,300 120,140 240,20 120))', result:true}, +{'wkt1':'POLYGON ((20 20,20 300,280 300,280 260,220 260,60 100,60 60,280 60,280 20,20 20))', 'wkt2':'POLYGON ((100 140,160 80,280 180,200 240,220 160,160 200,180 120,100 140))', result:true}, +{'wkt1':'POLYGON ((20 20,20 300,280 300,280 260,220 260,60 100,60 60,280 60,280 20,20 20))', 'wkt2':'POLYGON ((260 200,180 80,120 160,200 160,180 220,260 200))', result:true}, +{'wkt1':'POLYGON ((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))', 'wkt2':'POLYGON ((0 140,300 140,140 240,0 140))', result:true}, +{'wkt1':'POLYGON ((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))', 'wkt2':'POLYGON ((20 240,20 140,320 140,180 240,20 240))', result:true}, +{'wkt1':'POLYGON ((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))', 'wkt2':'POLYGON ((20 240,20 140,80 180,140 140,220 180,280 140,280 240,20 240))', result:true}, +{'wkt1':'POLYGON ((120 120,180 60,20 20,20 120,120 120))', 'wkt2':'POLYGON ((120 120,220 20,280 20,240 160,120 120))', result:true}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((140 120,160 20,260 120,220 200,140 120))', result:true}, +{'wkt1':'POLYGON ((20 140,120 40,20 40,20 140))', 'wkt2':'POLYGON ((190 140,190 20,140 20,20 140,190 140))', result:true}, +{'wkt1':'POLYGON ((120 120,180 60,20 20,20 120,120 120))', 'wkt2':'POLYGON ((300 20,220 20,120 120,260 160,300 20))', result:true}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((140 120,240 160,280 60,160 20,140 120))', result:true}, +{'wkt1':'POLYGON ((120 120,180 60,20 20,20 120,120 120))', 'wkt2':'POLYGON ((280 60,180 60,120 120,260 180,280 60))', result:true}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((120 200,120 120,40 120,40 200,120 200))', result:true}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((160 220,140 120,60 120,40 220,160 220))', result:true}, +{'wkt1':'POLYGON ((140 120,160 20,20 20,20 120,140 120))', 'wkt2':'POLYGON ((140 120,20 120,20 220,140 220,140 120))', result:true}, +{'wkt1':'POLYGON ((120 120,180 60,20 20,20 120,120 120))', 'wkt2':'POLYGON ((320 20,220 20,80 160,240 140,320 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((60 40,60 140,180 140,180 40,60 40))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,80 140,160 60,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((160 60,20 20,100 140,160 60))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 100,140 160,160 40,20 100))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((160 40,20 100,160 160,160 40))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 180,180 120,80 40,20 180))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((180 120,100 40,20 180,180 120))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,140 40,140 120,20 160,80 80,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,140 40,140 140,20 180,80 100,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((40 180,60 100,180 100,200 180,120 120,40 180))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 180,60 80,180 80,220 180,120 120,20 180))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((40 60,20 180,100 100,140 180,160 120,220 100,140 40,40 60))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((60 100,180 100,220 180,120 140,20 180,60 100))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,20 140,120 120,120 40,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,20 180,140 140,140 60,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,120 40,120 120,20 140,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((120 40,20 20,20 140,120 120,120 40))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,140 60,140 140,20 180,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((140 60,20 20,20 180,140 140,140 60))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,60 120,140 120,180 20,20 20))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 40,120 40,120 120,20 140,20 40))', result:true}, +{'wkt1':'POLYGON ((20 20,20 180,220 180,220 20,20 20))', 'wkt2':'POLYGON ((20 20,20 180,60 120,100 180,140 120,220 180,200 120,140 60,20 20))', result:true}, +{'wkt1':'POLYGON ((150 150,330 150,250 70,70 70,150 150))', 'wkt2':'POLYGON ((150 150,270 150,140 20,20 20,150 150))', result:true}, +{'wkt1':'POLYGON ((150 150,270 150,330 150,250 70,190 70,70 70,150 150))', 'wkt2':'POLYGON ((150 150,270 150,190 70,140 20,20 20,70 70,150 150))', result:true}, +{'wkt1':'POLYGON ((20 20,60 50,20 40,60 70,20 60,60 90,20 90,70 110,20 130,80 130,20 150,80 160,20 170,80 180,20 200,80 200,30 240,80 220,50 260,100 220,100 260,120 220,130 260,140 220,150 280,150 190,160 280,170 190,180 280,190 190,200 280,210 190,220 280,230 190,240 260,250 230,260 260,260 220,290 270,290 220,330 260,300 210,340 240,290 180,340 210,290 170,350 170,240 150,350 150,240 140,350 130,240 120,350 120,240 110,350 110,240 100,350 100,240 90,350 90,240 80,350 80,300 70,340 60,290 60,340 40,300 50,340 20,270 60,310 20,250 60,270 20,230 60,240 20,210 60,210 20,190 70,190 20,180 90,170 20,160 90,150 20,140 90,130 20,120 90,110 20,100 90,100 20,90 60,80 20,70 40,20 20))', 'wkt2':'POLYGON ((190 140,140 130,200 160,130 150,210 170,130 170,210 180,120 190,220 200,120 200,250 210,120 210,250 220,120 220,250 230,120 240,230 240,120 250,240 260,120 260,240 270,120 270,270 290,120 290,230 300,150 310,250 310,180 320,250 320,200 360,260 330,240 360,280 320,290 370,290 320,320 360,310 320,360 360,310 310,380 340,310 290,390 330,310 280,410 310,310 270,420 280,310 260,430 250,300 250,440 240,300 240,450 230,280 220,440 220,280 210,440 210,300 200,430 190,300 190,440 180,330 180,430 150,320 180,420 130,300 180,410 120,280 180,400 110,280 170,390 90,280 160,400 70,270 160,450 30,260 160,420 30,250 160,390 30,240 160,370 30,230 160,360 30,230 150,330 50,240 130,330 30,230 130,310 30,220 130,280 30,230 100,270 40,220 110,250 30,210 130,240 30,210 100,220 40,200 90,200 20,190 100,180 30,20 20,180 40,20 30,180 50,20 50,180 60,30 60,180 70,20 70,170 80,80 80,170 90,20 80,180 100,40 100,200 110,60 110,200 120,120 120,190 140))', result:true}, +{'wkt1':'POLYGON ((70 150,20 160,110 160,20 180,100 200,20 200,190 210,20 210,160 220,20 220,150 230,60 240,180 250,20 260,170 260,60 270,160 270,100 310,170 280,200 260,180 230,210 260,130 330,230 250,210 290,240 250,230 210,260 300,250 230,270 300,270 240,300 340,280 250,320 330,290 250,340 350,290 240,350 360,270 190,350 340,290 200,350 330,300 190,360 320,310 190,360 300,320 200,360 280,330 200,360 260,340 200,370 260,340 180,390 290,340 170,400 260,350 170,400 250,350 160,410 240,350 150,400 170,350 140,310 170,340 140,270 180,330 140,260 170,310 140,240 170,290 140,200 190,270 140,180 190,260 140,170 190,260 130,170 180,250 130,170 170,240 120,170 160,210 120,170 150,210 110,340 130,230 110,420 140,220 100,410 130,220 90,400 120,220 80,390 110,220 70,420 110,240 70,420 100,260 70,420 90,280 70,430 80,230 60,430 60,270 50,450 40,210 50,370 40,260 40,460 30,160 40,210 60,200 110,190 60,190 120,170 50,180 130,150 30,170 130,140 20,160 120,130 20,160 150,120 20,160 170,110 20,160 190,100 20,150 190,90 20,140 180,80 20,120 140,70 20,120 150,60 20,110 150,50 20,100 140,50 30,90 130,40 30,80 120,30 30,80 130,30 40,80 140,20 40,70 140,40 90,60 130,20 90,60 140,20 130,70 150))', 'wkt2':'POLYGON ((190 140,140 130,200 160,130 150,210 170,130 170,210 180,120 190,220 200,120 200,250 210,120 210,250 220,120 220,250 230,120 240,230 240,120 250,240 260,120 260,240 270,120 270,270 290,120 290,230 300,150 310,250 310,180 320,250 320,200 360,260 330,240 360,280 320,290 370,290 320,320 360,310 320,360 360,310 310,380 340,310 290,390 330,310 280,410 310,310 270,420 280,310 260,430 250,300 250,440 240,300 240,450 230,280 220,440 220,280 210,440 210,300 200,430 190,300 190,440 180,330 180,430 150,320 180,420 130,300 180,410 120,280 180,400 110,280 170,390 90,280 160,400 70,270 160,450 30,260 160,420 30,250 160,390 30,240 160,370 30,230 160,360 30,230 150,330 50,240 130,330 30,230 130,310 30,220 130,280 30,230 100,270 40,220 110,250 30,210 130,240 30,210 100,220 40,200 90,200 20,190 100,180 30,20 20,180 40,20 30,180 50,20 50,180 60,30 60,180 70,20 70,170 80,80 80,170 90,20 80,180 100,40 100,200 110,60 110,200 120,120 120,190 140))', result:true}, +{'wkt1':'POLYGON ((60 160,220 160,220 20,60 20,60 160))', 'wkt2':'POLYGON ((60 160,20 200,260 200,220 160,140 80,60 160))', result:true}, +{'wkt1':'POLYGON ((60 160,220 160,220 20,60 20,60 160))', 'wkt2':'POLYGON ((60 160,20 200,260 200,140 80,60 160))', result:true}, +{'wkt1':'POLYGON ((60 160,220 160,220 20,60 20,60 160))', 'wkt2':'POLYGON ((20 200,140 80,260 200,20 200))', result:true}, +{'wkt1':'POLYGON ((60 160,220 160,220 20,60 20,60 160))', 'wkt2':'POLYGON ((20 200,60 160,140 80,220 160,260 200,20 200))', result:true}, +{'wkt1':'POLYGON ((60 160,220 160,220 20,60 20,60 160))', 'wkt2':'POLYGON ((20 200,60 160,140 80,260 200,20 200))', result:true}, +{'wkt1':'POLYGON ((0 0,0 200,200 200,200 0,0 0))', 'wkt2':'POLYGON ((100 100,1000000 110,10000000 100,100 100))', result:true}, +{'wkt1':'POLYGON ((100 0,100 200,200 200,200 0,100 0))', 'wkt2':'POLYGON ((100 100,1000000 110,10000000 100,100 100))', result:true}, +{'wkt1':'POLYGON ((120 0,120 200,200 200,200 0,120 0))', 'wkt2':'POLYGON ((100 100,1000000 110,10000000 100,100 100))', result:true}, +{'wkt1':'POLYGON ((0 0,0 200,110 200,110 0,0 0))', 'wkt2':'POLYGON ((100 100,1000000 110,10000000 100,100 100))', result:true}, +{'wkt1':'POLYGON ((100 100,100 200,200 200,200 100,100 100))', 'wkt2':'POLYGON ((100 100,2100 110,2100 100,100 100))', result:true}, +{'wkt1':'POLYGON ((100 100,100 200,200 200,200 100,100 100))', 'wkt2':'POLYGON ((100 100,2101 110,2101 100,100 100))', result:true}, +{'wkt1':'POLYGON ((100 100,200 200,200 100,100 100))', 'wkt2':'POLYGON ((100 100,2101 110,2101 100,100 100))', result:true}, +{'wkt1':'POLYGON ((100 100,100 200,200 200,200 100,100 100))', 'wkt2':'POLYGON ((100 100,1000000 110,1000000 100,100 100))', result:true}, +{'wkt1':'POLYGON ((120 100,120 200,200 200,200 100,120 100))', 'wkt2':'POLYGON ((100 100,500 110,500 100,100 100))', result:true}, +{'wkt1':'POLYGON ((120 100,120 200,200 200,200 100,120 100))', 'wkt2':'POLYGON ((100 100,501 110,501 100,100 100))', result:true}, +{'wkt1':'POLYGON ((120 100,130 200,200 200,200 100,120 100))', 'wkt2':'POLYGON ((100 100,501 110,501 100,100 100))', result:true}, +{'wkt1':'POLYGON ((120 100,17 200,200 200,200 100,120 100))', 'wkt2':'POLYGON ((100 100,501 110,501 100,100 100))', result:true}, +{'wkt1':'POLYGON ((120 100,120 200,200 200,200 100,120 100))', 'wkt2':'POLYGON ((100 100,1000000 110,1000000 100,100 100))', result:true}, +{'wkt1':'POLYGON ((101 99,101 1000000,102 1000000,101 99))', 'wkt2':'POLYGON ((100 100,1000000 110,1000000 100,100 100))', result:true}, +{'wkt1':'POLYGON ((100 100,200 101,200 100,100 100))', 'wkt2':'POLYGON ((100 100,2101 110,2101 100,100 100))', result:true}, +{'wkt1':'POLYGON ((16 319,150 39,25 302,160 20,265 20,127 317,16 319))', 'wkt2':'POLYGON ((10 307,22 307,153 34,22 34,10 307))', result:true}, +{'wkt1':'POLYGON ((160 200,210 70,120 70,160 200))', 'wkt2':'POLYGON ((160 200,310 20,20 20,160 200),(160 200,260 40,70 40,160 200))', result:true}, +{'wkt1':'POLYGON ((170 120,240 100,260 50,190 70,170 120))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((270 90,200 50,150 80,210 120,270 90))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((170 120,260 100,240 60,150 80,170 120))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((220 120,270 80,200 60,160 100,220 120))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((260 50,180 70,180 110,260 90,260 50))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((230 110,290 80,190 60,140 90,230 110))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((170 120,330 120,260 50,100 50,170 120))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((170 120,330 120,280 70,120 70,170 120))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((170 120,300 120,250 70,120 70,170 120))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((190 100,310 100,260 50,140 50,190 100))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((280 130,360 130,270 40,190 40,280 130))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((220 80,180 40,80 40,170 130,270 130,230 90,300 90,250 30,280 30,390 140,150 140,40 30,230 30,280 80,220 80))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((260 130,360 130,280 40,170 40,260 130))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((240 110,340 110,290 60,190 60,240 110))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((250 120,350 120,280 50,180 50,250 120))', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))', result:true}, +{'wkt1':'POLYGON ((230 210,230 20,20 20,20 210,230 210),(120 180,50 50,200 50,120 180))', 'wkt2':'POLYGON ((230 210,230 20,20 20,20 210,230 210),(120 180,50 50,200 50,120 180))', result:true}, +{'wkt1':'POLYGON ((230 210,230 20,20 20,20 210,230 210),(140 40,40 40,40 170,140 40),(110 190,210 190,210 50,110 190))', 'wkt2':'POLYGON ((230 210,230 20,20 20,20 210,230 210),(140 40,40 40,40 170,140 40),(110 190,210 190,210 50,110 190))', result:true}, +{'wkt1':'POLYGON ((280 190,330 150,200 110,150 150,280 190))', 'wkt2':'MULTIPOLYGON (((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))', result:true}, +{'wkt1':'POLYGON ((80 190,220 190,140 110,0 110,80 190))', 'wkt2':'MULTIPOLYGON (((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))', result:true}, +{'wkt1':'POLYGON ((330 150,200 110,150 150,280 190,330 150))', 'wkt2':'MULTIPOLYGON (((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))', result:true}, +{'wkt1':'POLYGON ((290 190,340 150,220 120,170 170,290 190))', 'wkt2':'MULTIPOLYGON (((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))', result:true}, +{'wkt1':'POLYGON ((220 190,340 190,260 110,140 110,220 190))', 'wkt2':'MULTIPOLYGON (((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))', result:true}, +{'wkt1':'POLYGON ((140 190,220 190,100 70,20 70,140 190))', 'wkt2':'MULTIPOLYGON (((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))', result:true}, +{'wkt1':'POLYGON ((140 220,60 140,140 60,220 140,140 220))', 'wkt2':'MULTIPOLYGON (((100 20,180 20,180 100,100 100,100 20)),((20 100,100 100,100 180,20 180,20 100)),((100 180,180 180,180 260,100 260,100 180)),((180 100,260 100,260 180,180 180,180 100)))', result:true}, +{'wkt1':'MULTIPOLYGON (((110 110,70 200,150 200,110 110)),((110 110,150 20,70 20,110 110)))', 'wkt2':'MULTIPOLYGON (((110 110,160 160,210 110,160 60,110 110)),((110 110,60 60,10 110,60 160,110 110)))', result:true}, +{'wkt1':'MULTIPOLYGON (((110 110,70 200,150 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,150 20,70 20,110 110),(110 110,120 40,100 40,110 110)))', 'wkt2':'MULTIPOLYGON (((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))', result:true}, +{'wkt1':'MULTIPOLYGON (((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))', 'wkt2':'MULTIPOLYGON (((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))', result:true}, +{'wkt1':'MULTIPOLYGON (((110 110,20 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,20 20,110 110),(110 110,120 40,100 40,110 110)))', 'wkt2':'MULTIPOLYGON (((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))', result:true}, +{'wkt1':'MULTIPOLYGON (((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))', 'wkt2':'MULTIPOLYGON (((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))', result:true}, +{'wkt1':'MULTIPOLYGON (((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))', 'wkt2':'MULTIPOLYGON (((110 110,70 200,210 110,70 20,110 110),(110 110,110 140,150 110,110 80,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))', result:true}, +{'wkt1':'POLYGON ((100 60,140 100,100 140,60 100,100 60))', 'wkt2':'MULTIPOLYGON (((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))', result:true}, +{'wkt1':'LINESTRING (150 150,40 230)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (40 40,50 130,130 130)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (40 230,150 150)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (210 150,330 150)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (200 150,310 150,360 220)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (180 150,250 150,230 250,370 250,410 150)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (210 210,220 150,320 150,370 210)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (20 60,150 60)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (60 90,310 180)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (90 210,210 90)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (290 10,130 170)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (30 100,100 100,180 100)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (20 100,100 100,360 100,410 100)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (90 210,150 150,210 90)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (180 90,280 120)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (70 70,80 20)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (130 20,150 60)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (70 70,80 20,140 20,150 60)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (170 50,170 20,240 20,260 60)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150))', result:true}, +{'wkt1':'LINESTRING (50 100,140 190,280 190)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:false}, +{'wkt1':'LINESTRING (140 60,180 100,290 100)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:false}, +{'wkt1':'LINESTRING (170 120,210 80,270 80)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'LINESTRING (170 120,260 50)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'LINESTRING (190 90,190 270)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(190 190,280 50,100 50,190 190))', result:true}, +{'wkt1':'LINESTRING (60 160,150 70)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))', result:true}, +{'wkt1':'LINESTRING (60 160,150 70)', 'wkt2':'POLYGON ((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))', result:true}, +{'wkt1':'LINESTRING (60 160,150 70)', 'wkt2':'POLYGON ((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))', result:true}, +{'wkt1':'LINESTRING (190 90,190 190,190 270)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(190 190,280 50,100 50,190 190))', result:true}, +{'wkt1':'LINESTRING (60 160,110 110,150 70)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))', result:true}, +{'wkt1':'LINESTRING (60 160,110 110,150 70)', 'wkt2':'POLYGON ((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))', result:true}, +{'wkt1':'LINESTRING (60 160,110 110,150 70)', 'wkt2':'POLYGON ((190 190,110 110,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))', result:true}, +{'wkt1':'LINESTRING (130 110,180 110,190 60)', 'wkt2':'POLYGON ((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))', result:true}, +{'wkt1':'LINESTRING (80 110,180 110)', 'wkt2':'POLYGON ((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))', result:true}, +{'wkt1':'LINESTRING (80 110,180 110)', 'wkt2':'POLYGON ((20 200,20 20,240 20,240 200,20 200),(60 180,130 110,60 40,60 180),(130 110,200 40,200 180,130 110))', result:true}, +{'wkt1':'LINESTRING (80 110,170 110)', 'wkt2':'POLYGON ((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))', result:true}, +{'wkt1':'LINESTRING (80 110,130 110,170 110)', 'wkt2':'POLYGON ((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))', result:true}, +{'wkt1':'LINESTRING (80 110,130 110,180 110)', 'wkt2':'POLYGON ((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))', result:true}, +{'wkt1':'LINESTRING (80 110,130 110,180 110)', 'wkt2':'POLYGON ((20 200,20 20,240 20,240 200,20 200),(60 180,130 110,60 40,60 180),(130 110,200 40,200 180,130 110))', result:true}, +{'wkt1':'LINESTRING (80 110,130 110,170 110)', 'wkt2':'POLYGON ((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))', result:true}, +{'wkt1':'LINESTRING (160 70,320 230)', 'wkt2':'MULTIPOLYGON (((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))', result:true}, +{'wkt1':'LINESTRING (160 70,200 110,280 190,320 230)', 'wkt2':'MULTIPOLYGON (((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))', result:true}, +{'wkt1':'LINESTRING (70 50,70 150)', 'wkt2':'MULTIPOLYGON (((0 0,0 100,140 100,140 0,0 0)),((20 170,70 100,130 170,20 170)))', result:true}, +{'wkt1':'LINESTRING (110 110,20 200,200 200,110 110)', 'wkt2':'POLYGON ((20 20,200 20,110 110,20 20))', result:true}, +{'wkt1':'LINESTRING (150 70,160 110,200 60,150 70)', 'wkt2':'POLYGON ((20 20,200 20,110 110,20 20))', result:true}, +{'wkt1':'LINESTRING (80 60,120 40,120 70,80 60)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))', result:true}, +{'wkt1':'LINESTRING (20 20,200 20,110 110,20 20)', 'wkt2':'POLYGON ((20 20,200 20,110 110,20 20))', result:true}, +{'wkt1':'LINESTRING (110 90,170 30,50 30,110 90)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))', result:true}, +{'wkt1':'LINESTRING (110 110,170 50,170 110,110 110)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))', result:true}, +{'wkt1':'LINESTRING (110 90,70 50,130 50,110 90)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))', result:true}, +{'wkt1':'LINESTRING (110 60,20 150,200 150,110 60)', 'wkt2':'POLYGON ((20 20,200 20,110 110,20 20))', result:true}, +{'wkt1':'LINESTRING (110 130,110 70,200 100,110 130)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))', result:true}, +{'wkt1':'LINESTRING (110 90,160 40,60 40,110 90)', 'wkt2':'POLYGON ((20 20,200 20,110 110,20 20))', result:true}, +{'wkt1':'LINESTRING (110 100,40 30,180 30,110 100)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))', result:true}, +{'wkt1':'LINESTRING (110 110,180 30,40 30,110 110)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))', result:true}, +{'wkt1':'LINESTRING (110 90,180 30,40 30,110 90)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))', result:true}, +{'wkt1':'LINESTRING (110 90,50 30,180 30,110 90)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))', result:true}, +{'wkt1':'LINESTRING (110 110,200 200,200 110,110 200)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'LINESTRING (110 110,200 200,110 110,20 200,20 110,200 110)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'LINESTRING (110 110,20 110,200 110,50 110,110 170)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'LINESTRING (110 110,20 200,110 200,110 110,200 200)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'LINESTRING (110 110,170 50,20 200,20 110,200 110)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'LINESTRING (110 110,180 40,110 40,110 180)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'LINESTRING (110 60,50 30,170 30,90 70)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'LINESTRING (110 110,180 40,110 40,110 110,70 40)', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'LINESTRING (230 70,170 120,190 60,140 60,170 120,270 90)', 'wkt2':'POLYGON ((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110),(200 200,110 110,20 210,110 110))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110),(60 180,60 110,160 110,110 110))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110),(200 200,110 110,20 200,110 200,110 110))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110),(110 50,110 170,110 70,110 150,200 150))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110),(50 110,170 110,110 170,110 50,110 170,110 50))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110),(110 60,110 160,200 160))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110),(110 60,110 160,200 160))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((110 100,40 30,180 30),(170 30,110 90,50 30))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((110 110,60 40,70 20,150 20,170 40),(180 30,40 30,110 80))', 'wkt2':'POLYGON ((110 110,200 20,20 20,110 110))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110,200 160),(110 110,200 110,200 70,20 150))', 'wkt2':'MULTIPOLYGON (((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))', result:true}, +{'wkt1':'MULTILINESTRING ((20 160,70 110,150 110,200 160),(110 110,20 110,50 80,70 110,200 110))', 'wkt2':'MULTIPOLYGON (((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))', result:true}, +{'wkt1':'MULTILINESTRING ((20 110,200 110),(110 110,20 170,20 130,200 90))', 'wkt2':'MULTIPOLYGON (((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))', result:true}, +{'wkt1':'LINESTRING (0 0,0 50,50 50,50 0,0 0)', 'wkt2':'MULTILINESTRING ((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))', result:true}, +{'wkt1':'LINESTRING (40 180,140 180)', 'wkt2':'MULTIPOLYGON (((20 320,180 320,180 180,20 180,20 320)),((20 180,20 80,180 80,180 180,20 180)))', result:true}, +{'wkt1':'LINESTRING (40 180,140 180)', 'wkt2':'MULTIPOLYGON (((20 320,180 320,180 180,20 180,20 320)),((60 180,60 80,180 80,180 180,60 180)))', result:true}, +{'wkt1':'LINESTRING (0 0,60 0,60 60,60 0,120 0)', 'wkt2':'MULTILINESTRING ((0 0,60 0),(60 0,120 0),(60 0,60 60))', result:true}, +{'wkt1':'LINESTRING (40 40,120 120)', 'wkt2':'LINESTRING (40 40,60 120)', result:true}, +{'wkt1':'LINESTRING (40 40,120 120)', 'wkt2':'LINESTRING (60 240,40 40)', result:true}, +{'wkt1':'LINESTRING (40 40,180 180)', 'wkt2':'LINESTRING (120 120,20 200)', result:true}, +{'wkt1':'LINESTRING (40 40,120 120)', 'wkt2':'LINESTRING (60 240,120 120)', result:true}, +{'wkt1':'LINESTRING (40 40,180 180)', 'wkt2':'LINESTRING (20 180,140 140)', result:true}, +{'wkt1':'LINESTRING (40 40,120 120)', 'wkt2':'LINESTRING (40 120,120 40)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100)', 'wkt2':'LINESTRING (40 40,100 100)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100)', 'wkt2':'LINESTRING (100 100,40 40)', result:true}, +{'wkt1':'LINESTRING (40 40,120 120)', 'wkt2':'LINESTRING (40 120,120 160)', result:false}, +{'wkt1':'LINESTRING (20 20,180 180)', 'wkt2':'LINESTRING (20 20,180 180)', result:true}, +{'wkt1':'LINESTRING (20 20,180 180)', 'wkt2':'LINESTRING (20 20,110 110)', result:true}, +{'wkt1':'LINESTRING (20 20,180 180)', 'wkt2':'LINESTRING (50 50,140 140)', result:true}, +{'wkt1':'LINESTRING (180 180,40 40)', 'wkt2':'LINESTRING (120 120,260 260)', result:true}, +{'wkt1':'LINESTRING (40 40,180 180)', 'wkt2':'LINESTRING (260 260,120 120)', result:true}, +{'wkt1':'LINESTRING (40 40,180 180)', 'wkt2':'LINESTRING (120 120,260 260)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (40 40,20 100,40 160,20 200)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (20 200,40 160,20 100,40 40)', result:true}, +{'wkt1':'LINESTRING (80 240,200 120,100 100,40 40)', 'wkt2':'LINESTRING (20 200,40 160,20 100,40 40)', result:true}, +{'wkt1':'LINESTRING (60 60,60 230,140 230,250 160)', 'wkt2':'LINESTRING (20 20,60 60,250 160,310 230)', result:true}, +{'wkt1':'LINESTRING (60 60,60 230,140 230,250 160)', 'wkt2':'LINESTRING (20 20,110 110,200 110,320 230)', result:true}, +{'wkt1':'LINESTRING (60 110,60 250,360 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (60 110,60 250,360 210)', 'wkt2':'LINESTRING (360 210,310 160,110 160,60 110)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (160 160,240 240)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (240 240,160 160)', result:true}, +{'wkt1':'LINESTRING (60 60,60 230,140 230,250 160)', 'wkt2':'LINESTRING (60 150,110 100,170 100,110 230)', result:true}, +{'wkt1':'LINESTRING (60 60,60 230,140 230,250 160)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (200 120,200 190,150 240,200 240)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (200 240,150 240,200 200,200 120)', result:true}, +{'wkt1':'LINESTRING (60 60,60 230,140 230,250 160)', 'wkt2':'LINESTRING (60 230,80 140,120 140,140 230)', result:true}, +{'wkt1':'LINESTRING (60 110,200 110,250 160,300 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (60 110,200 110,250 160,300 210,360 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (60 110,220 110,250 160,280 110)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (60 110,150 110,200 160,250 110,360 110,360 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (130 160,160 110,220 110,250 160,250 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (130 160,160 110,190 110,230 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (130 160,160 110,200 110,230 160,260 210,360 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (130 160,160 110,200 110,230 160,260 210,360 210,380 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (130 160,160 110,200 110,230 160,260 210,380 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (110 160,160 110,200 110,250 160,250 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (110 160,180 110,250 160,320 110)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (140 160,180 80,220 160,250 80)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,130 190)', 'wkt2':'LINESTRING (20 130,70 130,160 40)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,130 190)', 'wkt2':'LINESTRING (40 160,40 100,110 40,170 40)', result:true}, +{'wkt1':'LINESTRING (130 110,180 160,230 110,280 160,330 110)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,130 190)', 'wkt2':'LINESTRING (30 140,80 140,100 100,200 30)', result:true}, +{'wkt1':'LINESTRING (110 110,110 160,180 110,250 160,250 110)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (20 20,80 80,160 80,240 80,300 140)', 'wkt2':'LINESTRING (20 60,60 60,60 140,80 80,100 20,140 140,180 20,200 80,220 20,240 80,300 80,270 110,200 110)', result:true}, +{'wkt1':'LINESTRING (20 20,230 20,20 30,170 30,20 40,230 40,20 50,230 60,60 60,230 70,20 70,180 80,60 80,230 90,20 90,230 100,30 100,210 110,20 110,80 120,20 130,170 130,90 120,230 130,170 140,230 140,80 150,160 140,20 140,70 150,20 150,230 160,80 160,230 170,20 160,180 170,20 170,230 180,20 180,40 190,230 190,20 200,230 200)', 'wkt2':'LINESTRING (30 210,30 60,40 210,40 30,50 190,50 20,60 160,60 50,70 220,70 50,80 20,80 210,90 50,90 150,100 30,100 210,110 20,110 190,120 50,120 180,130 210,120 20,140 210,130 50,150 210,130 20,160 210,140 30,170 210,150 20,180 210,160 20,190 210,180 80,170 50,170 20,180 70,180 20,190 190,190 30,200 210,200 30,210 210,210 20,220 150,220 20)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (40 40,100 100,200 120,80 240)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (80 240,200 120,100 100,40 40)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (80 240,120 200,200 120,100 100,80 80,40 40)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (260 210,240 130,280 120,260 40)', result:false}, +{'wkt1':'LINESTRING (100 20,20 20,20 160,210 160,210 20,110 20,50 120,120 150,200 150)', 'wkt2':'LINESTRING (140 130,100 110,120 60,170 60)', result:false}, +{'wkt1':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (60 110,110 160,310 160,360 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', result:true}, +{'wkt1':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', 'wkt2':'LINESTRING (60 110,110 160,250 160)', result:true}, +{'wkt1':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', 'wkt2':'LINESTRING (110 160,310 160,340 190)', result:true}, +{'wkt1':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', 'wkt2':'LINESTRING (140 160,250 160,310 160,340 190)', result:true}, +{'wkt1':'LINESTRING (60 110,110 160,250 160,310 160,360 210)', 'wkt2':'LINESTRING (110 160,250 160,310 160)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (200 120,100 100,40 40,140 80,200 40)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (280 240,240 140,200 120,100 100,40 40)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (80 190,140 140,40 40)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (240 200,200 260,80 240,140 180)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (140 180,80 240,200 260,240 200)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (280 240,240 140,200 120,80 240)', result:true}, +{'wkt1':'LINESTRING (20 20,80 80,160 80,240 80,300 140)', 'wkt2':'LINESTRING (20 80,120 80,200 80,260 20)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (100 100,200 120,240 140,280 240)', result:true}, +{'wkt1':'LINESTRING (40 40,100 100,200 120,80 240)', 'wkt2':'LINESTRING (280 240,240 140,200 120,100 100)', result:true}, +{'wkt1':'LINESTRING (20 20,80 80,160 80,240 80,300 140)', 'wkt2':'LINESTRING (80 20,80 80,240 80,300 20)', result:true}, +{'wkt1':'LINESTRING (20 20,80 80,160 80,240 80,300 140)', 'wkt2':'LINESTRING (20 80,80 80,120 80,140 140,160 80,200 80,220 20,240 80,270 110,300 80)', result:true}, +{'wkt1':'LINESTRING (100 100,20 180,180 180)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (20 100,180 100,100 180)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (100 40,100 160,180 160)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (20 100,100 100,180 100,100 180)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (100 100,160 40)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (100 100,180 20)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (60 60,100 100,140 60)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (100 100,190 10,190 100)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (100 100,160 40,160 100)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (60 140,160 40,160 140)', 'wkt2':'LINESTRING (100 100,180 20,20 20,100 100)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (80 80,20 80,140 80,80 20,80 140)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (80 80,20 80,140 80)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (80 80,140 80,80 20,80 140)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (80 80,20 80,140 80,80 20,80 80)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (80 80,20 80,140 80,80 80)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (80 80,20 80,20 140,140 20,80 20,80 80)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (20 140,140 20,100 20,100 80)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (140 80,20 80,120 80,80 20,80 140)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (140 80,20 80,140 80)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (140 80,20 80,80 140,80 20)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (140 80,80 80,20 80,50 140,50 60)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (140 80,20 80,120 80,80 20,80 80,80 140)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (140 80,20 80,80 80,140 80)', result:true}, +{'wkt1':'LINESTRING (20 20,140 140)', 'wkt2':'LINESTRING (140 80,20 80,80 140,80 80,80 20)', result:true}, +{'wkt1':'LINESTRING (130 150,220 150,220 240)', 'wkt2':'LINESTRING (130 240,130 150,220 20,50 20,130 150)', result:true}, +{'wkt1':'LINESTRING (30 150,130 150,250 150)', 'wkt2':'LINESTRING (130 240,130 150,220 20,50 20,130 150)', result:true}, +{'wkt1':'LINESTRING (30 150,250 150)', 'wkt2':'LINESTRING (130 240,130 150,220 20,50 20,130 150)', result:true}, +{'wkt1':'LINESTRING (30 150,130 150,250 150)', 'wkt2':'LINESTRING (130 240,130 20,30 20,130 150)', result:true}, +{'wkt1':'LINESTRING (30 150,250 150)', 'wkt2':'LINESTRING (120 240,120 20,20 20,120 170)', result:true}, +{'wkt1':'LINESTRING (200 200,20 20,200 20,110 110,20 200,110 200,110 110)', 'wkt2':'LINESTRING (110 110,200 110)', result:true}, +{'wkt1':'LINESTRING (110 110,200 110)', 'wkt2':'LINESTRING (200 200,20 20,200 20,110 110,20 200,110 200,110 110)', result:true}, +{'wkt1':'LINESTRING (20 110,200 110)', 'wkt2':'LINESTRING (200 200,20 20,200 20,110 110,20 200,110 200,110 110)', result:true}, +{'wkt1':'LINESTRING (200 200,20 20,200 20,110 110,20 200,110 200,110 110)', 'wkt2':'LINESTRING (20 110,200 110)', result:true}, +{'wkt1':'LINESTRING (90 200,90 130,110 110,150 200)', 'wkt2':'LINESTRING (200 200,20 20,200 20,20 200,20 130,90 130)', result:true}, +{'wkt1':'LINESTRING (200 110,110 110,90 130,90 200)', 'wkt2':'LINESTRING (200 200,20 20,200 20,20 200,20 130,90 130)', result:true}, +{'wkt1':'LINESTRING (80 80,150 80,210 80)', 'wkt2':'MULTILINESTRING ((20 20,140 140),(20 140,140 20))', result:true}, +{'wkt1':'LINESTRING (40 80,160 200,260 20,40 80)', 'wkt2':'LINESTRING (40 80,160 200,260 20,40 80)', result:true}, +{'wkt1':'LINESTRING (40 80,160 200,260 20,40 80)', 'wkt2':'LINESTRING (40 80,260 20,160 200,40 80)', result:true}, +{'wkt1':'LINESTRING (40 80,160 200,260 20,40 80)', 'wkt2':'LINESTRING (260 20,40 80,160 200,260 20)', result:true}, +{'wkt1':'LINESTRING (40 80,160 200,260 20,40 80)', 'wkt2':'LINESTRING (100 140,160 200,260 20,40 80,100 140)', result:true}, +{'wkt1':'LINESTRING (100 100,180 20,20 20,100 100)', 'wkt2':'LINESTRING (100 100,180 180,20 180,100 100)', result:true}, +{'wkt1':'LINESTRING (40 150,40 40,150 40,150 150,40 150)', 'wkt2':'LINESTRING (40 150,150 40,170 20,170 190,40 150)', result:true}, +{'wkt1':'LINESTRING (100 100,180 20,20 20,100 100)', 'wkt2':'LINESTRING (180 100,20 100,100 180,180 100)', result:true}, +{'wkt1':'LINESTRING (100 100,180 20,20 20,100 100)', 'wkt2':'LINESTRING (180 180,100 100,20 180,180 180)', result:true}, +{'wkt1':'LINESTRING (20 180,100 100,20 20,20 180)', 'wkt2':'LINESTRING (100 20,100 180,180 100,100 20)', result:true}, +{'wkt1':'LINESTRING (40 150,40 40,150 40,150 150,40 150)', 'wkt2':'LINESTRING (170 20,20 170,170 170,170 20)', result:true}, +{'wkt1':'LINESTRING (40 150,40 40,150 40,150 150,40 150)', 'wkt2':'LINESTRING (40 150,150 150,90 210,40 150)', result:true}, +{'wkt1':'LINESTRING (40 150,40 40,150 40,150 150,40 150)', 'wkt2':'LINESTRING (20 150,170 150,90 230,20 150)', result:true}, +{'wkt1':'LINESTRING (40 150,40 40,150 40,150 150,40 150)', 'wkt2':'LINESTRING (40 150,150 150,150 40,20 40,20 150,40 150)', result:true}, +{'wkt1':'LINESTRING (110 110,200 20,20 20,110 110)', 'wkt2':'LINESTRING (110 110,200 200,110 110,20 200,20 110,200 110)', result:true}, +{'wkt1':'LINESTRING (110 110,200 20,20 20,110 110)', 'wkt2':'LINESTRING (110 110,20 110,200 110,50 110,110 170)', result:true}, +{'wkt1':'LINESTRING (110 110,200 20,20 20,110 110)', 'wkt2':'LINESTRING (110 110,20 200,110 200,110 110,200 200)', result:true}, +{'wkt1':'LINESTRING (110 110,200 20,20 20,110 110)', 'wkt2':'LINESTRING (200 20,20 200,200 200,110 110,110 40)', result:true}, +{'wkt1':'LINESTRING (110 110,200 20,20 20,110 110)', 'wkt2':'LINESTRING (200 20,20 200,200 200,20 20)', result:true}, +{'wkt1':'LINESTRING (110 110,20 110,110 20,20 20,110 110)', 'wkt2':'LINESTRING (110 110,200 200,110 200,200 110,110 110)', result:true}, +{'wkt1':'LINESTRING (20 120,120 120,20 20,120 20,20 120)', 'wkt2':'LINESTRING (170 100,70 100,170 170,70 170,170 100)', result:true}, +{'wkt1':'LINESTRING (20 110,110 110,20 20,110 20,20 110)', 'wkt2':'LINESTRING (110 160,70 110,60 160,20 130,110 160)', result:true}, +{'wkt1':'LINESTRING (20 200,200 200,20 20,200 20,20 200)', 'wkt2':'LINESTRING (20 110,200 110,200 160,20 60,20 110)', result:true}, +{'wkt1':'LINESTRING (20 110,110 110,20 20,110 20,20 110)', 'wkt2':'LINESTRING (200 200,110 110,200 110,110 200,200 200)', result:true}, +{'wkt1':'LINESTRING (20 120,120 120,20 20,120 20,20 120)', 'wkt2':'LINESTRING (220 120,120 20,220 20,120 120,220 120)', result:true}, +{'wkt1':'MULTILINESTRING ((70 20,20 90,70 170),(70 170,120 90,70 20))', 'wkt2':'MULTILINESTRING ((70 20,20 90,70 170),(70 170,120 90,70 20))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 140,90 60,90 20),(170 20,130 20,20 20))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 20,170 100,170 140),(170 60,90 20,20 60),(130 100,130 60,90 20,50 90))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 20,170 100,170 140),(130 140,130 60,90 20,20 90,90 20,130 60,170 60))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 20,170 100,170 140),(170 60,90 20,20 60))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 20,170 100,170 140),(170 60,90 20,20 60),(130 100,90 20))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 20,170 100,170 140),(170 60,90 20,20 60),(120 100,170 100,90 20))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 20,170 100,170 140),(170 60,90 20,20 60),(120 100,170 100,90 20))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 20,170 100,170 140),(130 140,130 60,90 20,20 90,90 20))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 20,170 20),(90 20,90 80,90 140))', 'wkt2':'MULTILINESTRING ((90 20,170 100,170 140),(170 60,90 20,20 60,20 140,90 20))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 90,20 160),(90 160,90 20))', 'wkt2':'MULTILINESTRING ((160 160,90 90,160 20),(160 120,120 120,90 90,160 60))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 90,20 160),(90 160,90 20))', 'wkt2':'MULTILINESTRING ((160 160,90 90,160 20),(160 120,120 120,90 90,120 60,160 60))', result:true}, +{'wkt1':'MULTILINESTRING ((20 20,90 90,20 160),(90 160,90 20))', 'wkt2':'MULTILINESTRING ((160 160,90 90,160 20),(160 120,90 90,160 60))', result:true}, +{'wkt1':'POINT (20 20)', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:false}, +{'wkt1':'POINT (70 170)', 'wkt2':'POLYGON ((110 230,80 160,20 160,20 20,200 20,200 160,140 160,110 230))', result:false}, +{'wkt1':'POINT (110 130)', 'wkt2':'POLYGON ((20 160,80 160,110 100,140 160,200 160,200 20,20 20,20 160))', result:false}, +{'wkt1':'POINT (100 70)', 'wkt2':'POLYGON ((20 150,100 150,40 50,170 50,110 150,190 150,190 20,20 20,20 150))', result:false}, +{'wkt1':'POINT (100 70)', 'wkt2':'POLYGON ((20 150,100 150,40 50,160 50,100 150,180 150,180 20,20 20,20 150))', result:false}, +{'wkt1':'POINT (60 120)', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'POINT (110 120)', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'POINT (160 120)', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'POINT (100 150)', 'wkt2':'POLYGON ((20 150,100 150,40 50,160 50,100 150,180 150,180 20,20 20,20 150))', result:true}, +{'wkt1':'POINT (100 80)', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'POINT (60 160)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:false}, +{'wkt1':'POINT (190 90)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:false}, +{'wkt1':'POINT (190 190)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:true}, +{'wkt1':'POINT (360 20)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:true}, +{'wkt1':'POINT (130 130)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:true}, +{'wkt1':'POINT (280 50)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:true}, +{'wkt1':'POINT (150 100)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:true}, +{'wkt1':'POINT (100 50)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:true}, +{'wkt1':'POINT (140 120)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:true}, +{'wkt1':'POINT (190 50)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(90 50,150 110,190 50,90 50),(190 50,230 110,290 50,190 50))', result:true}, +{'wkt1':'POINT (180 90)', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(180 140,180 40,80 40,180 140),(180 90,210 140,310 40,230 40,180 90))', result:true}, +{'wkt1':'MULTIPOINT ((20 80),(110 160),(20 160))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:false}, +{'wkt1':'MULTIPOINT ((20 80),(60 120),(20 160))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((10 80),(110 170),(110 120))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((10 80),(110 170),(160 120))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((20 120),(60 120),(110 120),(160 120),(200 120))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((60 120),(110 120),(160 120))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((60 120),(160 120),(160 40),(60 40))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((20 150),(60 120),(110 80))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((110 80),(160 120),(200 160))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((110 80),(110 120),(110 160))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((110 170),(110 80))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((60 120),(160 120),(110 80),(110 170))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((90 80),(130 80))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((60 120),(160 120),(110 80))', 'wkt2':'POLYGON ((60 120,60 40,160 40,160 120,60 120))', result:true}, +{'wkt1':'MULTIPOINT ((40 170),(40 90),(130 170))', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:false}, +{'wkt1':'MULTIPOINT ((90 170),(280 170),(190 90))', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:false}, +{'wkt1':'MULTIPOINT ((190 110),(150 70),(230 70))', 'wkt2':'POLYGON ((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))', result:false}, +{'wkt1':'POINT (100 100)', 'wkt2':'MULTIPOLYGON (((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))', result:true}, +{'wkt1':'POINT (20 100)', 'wkt2':'MULTIPOLYGON (((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))', result:true}, +{'wkt1':'POINT (60 100)', 'wkt2':'MULTIPOLYGON (((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'MULTIPOLYGON (((110 110,20 200,200 200,110 110),(110 110,80 180,140 180,110 110)),((110 110,20 20,200 20,110 110),(110 110,80 40,140 40,110 110)))', result:true}, +{'wkt1':'POINT (110 200)', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:false}, +{'wkt1':'POINT (90 80)', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'POINT (340 240)', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'POINT (230 150)', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'POINT (160 150)', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'POINT (90 150)', 'wkt2':'LINESTRING (150 150,20 20,280 20,150 150)', result:false}, +{'wkt1':'POINT (150 80)', 'wkt2':'LINESTRING (150 150,20 20,280 20,150 150)', result:false}, +{'wkt1':'POINT (150 150)', 'wkt2':'LINESTRING (150 150,20 20,280 20,150 150)', result:true}, +{'wkt1':'POINT (100 20)', 'wkt2':'LINESTRING (150 150,20 20,280 20,150 150)', result:true}, +{'wkt1':'POINT (20 20)', 'wkt2':'LINESTRING (150 150,20 20,280 20,150 150)', result:true}, +{'wkt1':'POINT (220 220)', 'wkt2':'LINESTRING (110 110,220 20,20 20,110 110,220 220)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,220 20,20 20,110 110,220 220)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,220 20,20 20,220 220)', result:true}, +{'wkt1':'POINT (110 20)', 'wkt2':'LINESTRING (110 110,220 20,20 20,220 220)', result:true}, +{'wkt1':'POINT (220 20)', 'wkt2':'LINESTRING (110 110,220 20,20 20,220 220)', result:true}, +{'wkt1':'POINT (110 20)', 'wkt2':'LINESTRING (220 220,20 20,220 20,110 110)', result:true}, +{'wkt1':'POINT (20 20)', 'wkt2':'LINESTRING (220 220,20 20,220 20,110 110)', result:true}, +{'wkt1':'POINT (20 110)', 'wkt2':'LINESTRING (20 200,20 20,110 20,20 110,110 200)', result:true}, +{'wkt1':'POINT (20 200)', 'wkt2':'LINESTRING (20 200,200 20,20 20,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (20 200,200 20,140 20,140 80,80 140,20 140)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (20 200,200 20,20 20,200 200)', result:true}, +{'wkt1':'POINT (80 140)', 'wkt2':'LINESTRING (20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (20 200,200 20,140 20,140 80,110 110,80 140,20 140)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (20 200,110 110,200 20,20 20,110 110,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (20 200,200 20,20 20,110 110,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (20 200,110 110,20 20,200 20,110 110,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,110 200,20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,110 200,20 200,200 20,140 20,140 80,110 110,80 140,20 140)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,110 200,20 200,200 20,140 20,140 80,80 140,20 140)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,110 200,20 200,110 110,200 20,20 20,110 110,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,110 200,20 200,200 20,20 20,110 110,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,110 200,20 200,200 20,20 20,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,110 200,20 200,110 110,20 20,200 20,110 110,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,110 200,20 200,200 20,200 110,110 110,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,110 110,20 20,200 20,110 110,20 200,110 200,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,20 20,200 20,110 110,20 200,110 200,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,20 20,200 20,20 200,110 200,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,110 110,200 20,20 20,110 110,20 200,110 200,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,20 20,20 110,110 110,20 200,110 200,110 110)', result:true}, +{'wkt1':'POINT (110 160)', 'wkt2':'LINESTRING (110 160,200 250,110 250,110 160,110 110,110 20,20 20,110 110)', result:true}, +{'wkt1':'POINT (110 160)', 'wkt2':'LINESTRING (110 160,200 250,110 250,110 110,110 20,20 20,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 160,200 250,110 250,110 160,110 110,110 20,20 20,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 160,200 250,110 250,110 160,110 20,20 20,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,200 200,110 200,110 110,110 20,20 20,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,200 200,110 200,110 20,20 20,110 110)', result:true}, +{'wkt1':'POINT (140 200)', 'wkt2':'LINESTRING (110 110,200 200,110 200,110 110,110 20,20 20,110 110)', result:true}, +{'wkt1':'POINT (110 200)', 'wkt2':'LINESTRING (110 110,200 200,110 200,110 110,110 20,20 20,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,200 200,110 200,110 110,110 20,200 20,110 110)', result:true}, +{'wkt1':'POINT (140 200)', 'wkt2':'LINESTRING (110 110,200 200,110 200,110 110,110 20,200 20,110 110)', result:true}, +{'wkt1':'POINT (110 200)', 'wkt2':'LINESTRING (110 110,200 200,110 200,110 110,110 20,200 20,110 110)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (90 130,20 130,20 200,90 130,200 20,20 20,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (90 130,20 130,20 200,90 130,200 20,20 20,200 200)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (90 130,20 130,20 200,200 20,20 20,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (90 130,20 130,20 200,200 20,20 20,200 200)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (200 200,20 20,200 20,90 130,20 200,20 130,90 130)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,20 20,200 20,90 130,20 200,20 130,90 130)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (200 200,20 20,200 20,20 200,20 130,90 130)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,20 20,200 20,20 200,20 130,90 130)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,20 130,20 200,110 110,200 20,20 20,110 110,200 200,200 130,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,20 130,20 200,200 20,20 20,200 200,200 130,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,80 200,20 200,110 110,200 20,20 20,110 110,200 200,140 200,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 110,80 200,20 200,200 20,20 20,200 200,140 200,110 110)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,20 20,200 20,20 200,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,110 110,20 20,200 20,110 110,20 200,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (200 200,110 110,200 20,20 20,110 110,20 200,200 200)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (90 130,20 130,20 200,90 130,110 110,200 20,20 20,110 110,200 200,90 130)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (90 130,20 130,20 200,110 110,200 20,20 20,110 110,200 200,90 130)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (90 130,90 200,20 200,90 130,110 110,200 20,20 20,110 110,200 200,90 130)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (90 130,90 200,20 200,200 20,20 20,200 200,90 130)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (90 130,90 200,20 200,110 110,200 20,20 20,110 110,200 200,90 130)', result:true}, +{'wkt1':'POINT (90 130)', 'wkt2':'LINESTRING (90 130,90 200,20 200,200 20,20 20,200 200,90 130)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (90 130,90 200,20 200,200 20,20 20,200 200,90 130)', result:true}, +{'wkt1':'POINT (110 200)', 'wkt2':'LINESTRING (110 200,110 110,20 20,200 20,110 110,110 200,200 200)', result:true}, +{'wkt1':'POINT (110 150)', 'wkt2':'LINESTRING (110 200,110 110,20 20,200 20,110 110,110 200,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 200,110 110,20 20,200 20,110 110,110 200,200 200)', result:true}, +{'wkt1':'POINT (110 200)', 'wkt2':'LINESTRING (110 200,110 110,20 20,200 20,110 110,110 200)', result:true}, +{'wkt1':'POINT (110 150)', 'wkt2':'LINESTRING (110 200,110 110,20 20,200 20,110 110,110 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (110 200,110 110,20 20,200 20,110 110,110 200)', result:true}, +{'wkt1':'POINT (110 150)', 'wkt2':'LINESTRING (20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)', result:true}, +{'wkt1':'POINT (110 110)', 'wkt2':'LINESTRING (20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)', result:true}, +{'wkt1':'POINT (110 200)', 'wkt2':'LINESTRING (20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)', result:true}, +{'wkt1':'MULTIPOINT ((50 250),(90 220),(130 190))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:false}, +{'wkt1':'MULTIPOINT ((180 180),(230 130),(280 80))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:false}, +{'wkt1':'MULTIPOINT ((50 120),(90 80),(130 40))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((300 280),(340 240),(380 200))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((230 150),(260 120),(290 90))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((200 190),(240 150),(270 110))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((160 150),(190 120),(220 90))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((120 190),(160 150),(200 110))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((90 80),(160 150),(340 240))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((90 80),(160 150),(300 150))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((90 80),(160 150),(240 150))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((90 80),(130 120),(210 150))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((130 120),(210 150),(340 200))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((160 150),(240 150),(340 210))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((160 150),(300 150),(340 150))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'MULTIPOINT ((160 150),(240 150),(340 240))', 'wkt2':'LINESTRING (90 80,160 150,300 150,340 150,340 240)', result:true}, +{'wkt1':'POINT (20 20)', 'wkt2':'POINT (20 20)', result:true}, +{'wkt1':'POINT (20 20)', 'wkt2':'POINT (40 60)', result:false}, +{'wkt1':'POINT (40 40)', 'wkt2':'MULTIPOINT ((20 20),(80 80),(20 120))', result:false}, +{'wkt1':'POINT (20 20)', 'wkt2':'MULTIPOINT ((20 20),(80 80),(20 120))', result:true}, +{'wkt1':'MULTIPOINT ((40 40),(80 60),(120 100))', 'wkt2':'MULTIPOINT ((40 40),(80 60),(120 100))', result:true}, +{'wkt1':'MULTIPOINT ((40 40),(80 60),(120 100))', 'wkt2':'MULTIPOINT ((40 40),(120 100),(80 60))', result:true}, +{'wkt1':'MULTIPOINT ((40 40),(60 100),(100 60),(120 120))', 'wkt2':'MULTIPOINT ((20 120),(60 60),(100 100),(140 40))', result:false}, +{'wkt1':'MULTIPOINT ((20 20),(80 70),(140 120),(200 170))', 'wkt2':'MULTIPOINT ((20 20),80 70),(140 120),(200 170))', result:true}, +{'wkt1':'MULTIPOINT ((20 20),(140 120),(80 70),(200 170))', 'wkt2':'MULTIPOINT ((80 70),20 20),(200 170),(140 120))', result:true}, +{'wkt1':'MULTIPOINT ((20 20),(80 70),(140 120),(200 170))', 'wkt2':'MULTIPOINT ((80 70),(140 120))', result:true}, +{'wkt1':'MULTIPOINT ((80 70),(20 20),(200 170),(140 120))', 'wkt2':'MULTIPOINT ((140 120),(80 70))', result:true}, +{'wkt1':'MULTIPOINT ((80 70),(20 20),(200 170),(140 120))', 'wkt2':'MULTIPOINT ((80 170),(140 120),(200 80))', result:true}, +{'wkt1':'MULTIPOINT ((80 70),(20 20),(200 170),(140 120))', 'wkt2':'MULTIPOINT ((80 170),(140 120),(200 80),(80 70))', result:true}, +{'wkt1':'POLYGON((-8239529.462853361 4980952.065110421,-8224242.057199065 4980952.065110421,-8224242.057199064 4988844.188279452,-8239529.462853361 4988844.188279452,-8239529.462853361 4980952.065110421))', 'wkt2':'POINT(-8225445.94039435 4982695.78481786)', result:true}, +{'wkt1':'POLYGON((-8239529.462853361 4980952.065110421,-8224242.057199065 4980952.065110421,-8224242.057199064 4988844.188279452,-8239529.462853361 4988844.188279452,-8239529.462853361 4980952.065110421))', 'wkt2':'POINT(-8224242.0571985 4982695.78481786)', result:false}, +{'wkt1':'POLYGON((-8239529.462853361 4980952.065110421,-8224242.057199065 4980952.065110421,-8224242.057199064 4988844.188279452,-8239529.462853361 4988844.188279452,-8239529.462853361 4980952.065110421))', 'wkt2':'POINT(-8224242.0571995 4982695.78481786)', result:true} +]; diff --git a/openlayers/tests/data/osm.js b/openlayers/tests/data/osm.js new file mode 100644 index 0000000000..6c94459437 --- /dev/null +++ b/openlayers/tests/data/osm.js @@ -0,0 +1,14 @@ +var osm_test_data = { + 'node': ' ', + 'node_with_tags': ' ', + 'way': ' ', + 'node_way': ' ' +}; + +var osm_serialized_data = { + 'node':'', + 'node_with_tags':'', + 'way':'', + 'node_way':'' +}; + diff --git a/openlayers/tests/data_Layer_Text_textfile.txt b/openlayers/tests/data_Layer_Text_textfile.txt new file mode 100644 index 0000000000..8250988d49 --- /dev/null +++ b/openlayers/tests/data_Layer_Text_textfile.txt @@ -0,0 +1,3 @@ +point image +10,20 http://boston.openguides.org/markers/ORANGE.png +15,25 http://boston.openguides.org/markers/ORANGE.png diff --git a/openlayers/tests/data_Layer_Text_textfile_2.txt b/openlayers/tests/data_Layer_Text_textfile_2.txt new file mode 100644 index 0000000000..91a8093bda --- /dev/null +++ b/openlayers/tests/data_Layer_Text_textfile_2.txt @@ -0,0 +1,3 @@ +point title description image +10,20 a b http://boston.openguides.org/markers/ORANGE.png +15,25 c d http://boston.openguides.org/markers/ORANGE.png diff --git a/openlayers/tests/data_Layer_Text_textfile_overflow.txt b/openlayers/tests/data_Layer_Text_textfile_overflow.txt new file mode 100644 index 0000000000..bb4768ec51 --- /dev/null +++ b/openlayers/tests/data_Layer_Text_textfile_overflow.txt @@ -0,0 +1,3 @@ +overflow point title description image +auto 10,20 a b http://boston.openguides.org/markers/ORANGE.png +hidden 15,25 c d http://boston.openguides.org/markers/ORANGE.png diff --git a/openlayers/tests/geom_eq.js b/openlayers/tests/geom_eq.js new file mode 100644 index 0000000000..26f3a95034 --- /dev/null +++ b/openlayers/tests/geom_eq.js @@ -0,0 +1,110 @@ +/** + * File: xml_eq.js + * Adds a xml_eq method to AnotherWay test objects. + * + */ + +(function() { + + /** + * Function assertEqual + * Test two objects for equivalence (based on ==). Throw an exception + * if not equivalent. + * + * Parameters: + * got - {Object} + * expected - {Object} + * msg - {String} The message to be thrown. This message will be appended + * with ": got {got} but expected {expected}" where got and expected are + * replaced with string representations of the above arguments. + */ + function assertEqual(got, expected, msg) { + if(got === undefined) { + got = "undefined"; + } else if (got === null) { + got = "null"; + } + if(expected === undefined) { + expected = "undefined"; + } else if (expected === null) { + expected = "null"; + } + if(got != expected) { + throw msg + ": got '" + got + "' but expected '" + expected + "'"; + } + } + + /** + * Function assertGeometryEqual + * Test two geometries for equivalence. Geometries are considered + * equivalent if they are of the same class, and given component + * geometries, if all components are equivalent. Throws a message as + * exception if not equivalent. + * + * Parameters: + * got - {OpenLayers.Geometry} + * expected - {OpenLayers.Geometry} + * options - {Object} Optional object for configuring test options. + */ + function assertGeometryEqual(got, expected, options) { + + var OpenLayers = Test.AnotherWay._g_test_iframe.OpenLayers; + + // compare types + assertEqual(typeof got, typeof expected, "Object types mismatch"); + + // compare classes + assertEqual(got.CLASS_NAME, expected.CLASS_NAME, "Object class mismatch"); + + if(got instanceof OpenLayers.Geometry.Point) { + // compare points + assertEqual(got.x, expected.x, "x mismatch"); + assertEqual(got.y, expected.y, "y mismatch"); + assertEqual(got.z, expected.z, "z mismatch"); + } else { + // compare components + assertEqual( + got.components.length, expected.components.length, + "Component length mismatch for " + got.CLASS_NAME + ); + for(var i=0; i + + +This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: http://platial.typepad.com/news/2006/04/really_simple_t.html for more info. +http://platial.com +Crschmidt's Places At Platial + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://platial.com/place/90306 +Knitting Room +Address: 2 lake St, Arlington, MA
    Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

    Map this on Platial
    Grab this on Platial ]]>
    +42.405696 -71.142197 +crschmidt +2006-06-08T17:35:01.942452+00:00 +
    + +http://platial.com/place/67230 +Knitting Room +Address: 2 lake St, Arlington, MA
    Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

    Map this on Platial
    Grab this on Platial ]]>
    +42.405524 -71.142273 +crschmidt +2006-04-24T11:35:26.733857+00:00 +
    + +http://platial.com/place/65645 +†¢¢™£ˆøœ +Address: 151 Erie St., Cambridge, MA
    Tags: platial graffiti

    Map this on Platial
    Grab this on Platial ]]>
    +42.352455 -71.110210 +crschmidt +2006-04-20T08:56:12.696224+00:00 +
    + +http://platial.com/place/62200 +Allen Hall +Address: 1301 W Gregory Dr, Urbana, IL
    Tags: dorm, uiuc, college



    Map this on Platial
    Grab this on Platial ]]>
    +40.104172 -88.220623 +crschmidt +2006-04-14T08:01:01.872873+00:00 +
    + +http://platial.com/place/28232 +Bagby Hot Springs, OR +Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria

    Map this on Platial
    Grab this on Platial ]]>
    +44.936000 -122.173000 +crschmidt +2006-01-03T23:10:18.553063+00:00 +
    + +http://platial.com/place/43666 +Shooting Location for "The Field of Dreams" Film +Address: Dyersville, Iowa
    Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location

    Map this on Platial
    Grab this on Platial ]]>
    +42.481213 -91.111679 +echinodermata +2006-03-23T11:40:17.654061+00:00 +
    + +http://platial.com/place/28394 +Moffetts (Bonneville) Hot Springs, WA +Tags: soak, hot springs, relax, nature

    Map this on Platial
    Grab this on Platial ]]>
    +45.658000 -121.962000 +crschmidt +2006-01-03T23:16:27.329816+00:00 +
    + +http://platial.com/place/28251 +Austin Hot Springs, OR +Tags: soak, hot springs, relax, nature, popular, crowded

    Map this on Platial
    Grab this on Platial ]]>
    +45.021000 -122.009000 +crschmidt +2006-01-03T23:11:04.489886+00:00 +
    + +http://platial.com/place/28392 +Rock Creek Hot Springs, WA +Tags: soak, hot springs, relax, nature

    Map this on Platial
    Grab this on Platial ]]>
    +45.723000 -121.927000 +crschmidt +2006-01-03T23:16:22.636855+00:00 +
    + +http://platial.com/place/28391 +St. Martins (Wind River) Hot Springs, WA +Tags: hot springs, soak, relax, nature, wonderful

    Map this on Platial
    Grab this on Platial ]]>
    +45.728000 -121.800000 +crschmidt +2006-01-03T23:16:20.383244+00:00 +
    + +http://platial.com/place/28231 +Breitenbush Hot Springs, OR +Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking

    Map this on Platial
    Grab this on Platial ]]>
    +44.782000 -121.975000 +crschmidt +2006-01-03T23:10:16.529195+00:00 +
    + +http://platial.com/place/28393 +Collins Hot Springs, WA +Tags: portland, nice, hot springs, soak

    Map this on Platial
    Grab this on Platial ]]>
    +45.701000 -121.728000 +crschmidt +2006-01-03T23:16:24.648745+00:00 +
    + +http://platial.com/place/31685 +Darwin's Ltd. +Address: 148 Mount Auburn St, Cambridge, MA
    Tags: coffee, beer, sandwiches, freewifi



    Map this on Platial
    Grab this on Platial ]]>
    +42.373974 -71.125053 +crschmidt +2006-01-10T09:24:08.152985+00:00 +
    + +http://platial.com/place/28596 +Huckleberry Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.115000 -110.684000 +crschmidt +2006-01-03T23:24:32.283094+00:00 +
    + +http://platial.com/place/28595 +South Entrance Hot Springs, WY +


    Map this on Platial
    Grab this on Platial ]]>
    +44.142000 -110.656000 +crschmidt +2006-01-03T23:24:30.279497+00:00 +
    + +http://platial.com/place/28594 +Crawfish Creek Hot Springs, WY +


    Map this on Platial
    Grab this on Platial ]]>
    +44.157000 -110.699000 +crschmidt +2006-01-03T23:24:28.280271+00:00 +
    + +http://platial.com/place/28593 +Crawfish Creek Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.165000 -110.723000 +crschmidt +2006-01-03T23:24:20.364077+00:00 +
    + +http://platial.com/place/28592 +Snake Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.169000 -110.583000 +crschmidt +2006-01-03T23:24:12.234974+00:00 +
    + +http://platial.com/place/28591 +Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.187000 -110.726000 +crschmidt +2006-01-03T23:24:10.027857+00:00 +
    + +http://platial.com/place/28590 +Hot Springs on Upper Snake River, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.204000 -110.486000 +crschmidt +2006-01-03T23:24:07.79658+00:00 +
    + +http://platial.com/place/28589 +Hot Springs on lewis Lake, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.276000 -110.636000 +crschmidt +2006-01-03T23:24:05.683418+00:00 +
    + +http://platial.com/place/28588 +Rustic Geyser, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.282000 -110.506000 +crschmidt +2006-01-03T23:24:03.66329+00:00 +
    + +http://platial.com/place/28587 +Bechler River Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.285000 -110.900000 +crschmidt +2006-01-03T23:24:01.611442+00:00 +
    + +http://platial.com/place/28586 +Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.290000 -110.504000 +crschmidt +2006-01-03T23:23:59.658699+00:00 +
    + +http://platial.com/place/28585 +Heart Lake Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.299000 -110.517000 +crschmidt +2006-01-03T23:23:57.181801+00:00 +
    + +http://platial.com/place/28584 +Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.307000 -110.526000 +crschmidt +2006-01-03T23:23:55.240485+00:00 +
    + +http://platial.com/place/28583 +Hot Springs on lewis Lake, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.309000 -110.654000 +crschmidt +2006-01-03T23:23:53.22295+00:00 +
    + +http://platial.com/place/28582 +Shoshone Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.354000 -110.800000 +crschmidt +2006-01-03T23:23:51.179049+00:00 +
    + +http://platial.com/place/28581 +Hot Springs on Continental Divide, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.401000 -110.936000 +crschmidt +2006-01-03T23:23:49.077176+00:00 +
    + +http://platial.com/place/28580 +Hot Springs on Upper Firehole River, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.404000 -110.824000 +crschmidt +2006-01-03T23:23:47.054664+00:00 +
    + +http://platial.com/place/28579 +Summit Lake Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.410000 -110.953000 +crschmidt +2006-01-03T23:23:45.039394+00:00 +
    + +http://platial.com/place/28578 +Lone Star Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.414000 -110.817000 +crschmidt +2006-01-03T23:23:42.938808+00:00 +
    + +http://platial.com/place/28577 +West. Thumb Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.417000 -110.570000 +crschmidt +2006-01-03T23:23:40.90238+00:00 +
    + +http://platial.com/place/28576 +Lone Star Geyser, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.418000 -110.805000 +crschmidt +2006-01-03T23:23:38.844625+00:00 +
    + +http://platial.com/place/28575 +Smoke Jumper Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.421000 -110.952000 +crschmidt +2006-01-03T23:23:36.818513+00:00 +
    + +http://platial.com/place/28574 +West. Thumb Geyser Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.422000 -110.574000 +crschmidt +2006-01-03T23:23:34.767729+00:00 +
    + +http://platial.com/place/28573 +Potts Hot Spring Basin, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.433000 -110.581000 +crschmidt +2006-01-03T23:23:32.749915+00:00 +
    + +http://platial.com/place/28572 +Hot Springs, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.433000 -110.813000 +crschmidt +2006-01-03T23:23:30.829745+00:00 +
    + +http://platial.com/place/28571 +Hot Springs on Continental Divide, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.438000 -110.977000 +crschmidt +2006-01-03T23:23:28.730401+00:00 +
    + +http://platial.com/place/28570 +SouthEastern Group, WY +
    Map this on Platial
    Grab this on Platial ]]>
    +44.459000 -110.817000 +crschmidt +2006-01-03T23:23:26.706763+00:00 +
    +
    \ No newline at end of file diff --git a/openlayers/tests/grid_inittiles.html b/openlayers/tests/grid_inittiles.html new file mode 100644 index 0000000000..40035a2c8a --- /dev/null +++ b/openlayers/tests/grid_inittiles.html @@ -0,0 +1,30 @@ + + + + + + + +

    Grid Test

    +

    Map should display with two centered tiles. If there appear to be a combination of two zoom levels, then this test is failed, and something is broken in OpenLayers.

    +
    + + diff --git a/openlayers/tests/index.html b/openlayers/tests/index.html new file mode 100644 index 0000000000..86ec617ce4 --- /dev/null +++ b/openlayers/tests/index.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/openlayers/tests/list-tests.html b/openlayers/tests/list-tests.html new file mode 100644 index 0000000000..dd6a2ada17 --- /dev/null +++ b/openlayers/tests/list-tests.html @@ -0,0 +1,234 @@ +
      +
    • Ajax.html
    • +
    • BaseTypes.html
    • +
    • BaseTypes/Bounds.html
    • +
    • BaseTypes/Class.html
    • +
    • BaseTypes/Date.html
    • +
    • BaseTypes/Element.html
    • +
    • BaseTypes/LonLat.html
    • +
    • BaseTypes/Pixel.html
    • +
    • BaseTypes/Size.html
    • +
    • Console.html
    • +
    • Control.html
    • +
    • Control/Attribution.html
    • +
    • Control/ArgParser.html
    • +
    • Control/Button.html
    • +
    • Control/DragFeature.html
    • +
    • Control/DragPan.html
    • +
    • Control/DrawFeature.html
    • +
    • Control/EditingToolbar.html
    • +
    • Control/Geolocate.html
    • +
    • Control/GetFeature.html
    • +
    • Control/Graticule.html
    • +
    • Control/KeyboardDefaults.html
    • +
    • Control/LayerSwitcher.html
    • +
    • Control/Measure.html
    • +
    • Control/ModifyFeature.html
    • +
    • Control/MousePosition.html
    • +
    • Control/MouseToolbar.html
    • +
    • Control/Navigation.html
    • +
    • Control/NavigationHistory.html
    • +
    • Control/NavToolbar.html
    • +
    • Control/OverviewMap.html
    • +
    • Control/Panel.html
    • +
    • Control/PanZoom.html
    • +
    • Control/PanZoomBar.html
    • +
    • Control/Permalink.html
    • +
    • Control/PinchZoom.html
    • +
    • Control/Scale.html
    • +
    • Control/ScaleLine.html
    • +
    • Control/SelectFeature.html
    • +
    • Control/Snapping.html
    • +
    • Control/Split.html
    • +
    • Control/TouchNavigation.html
    • +
    • Control/TransformFeature.html
    • +
    • Control/WMSGetFeatureInfo.html
    • +
    • Control/WMTSGetFeatureInfo.html
    • +
    • Control/PanPanel.html
    • +
    • Control/SLDSelect.html
    • +
    • Events.html
    • +
    • Extras.html
    • +
    • Feature.html
    • +
    • Feature/Vector.html
    • +
    • Filter.html
    • +
    • Filter/Comparison.html
    • +
    • Filter/FeatureId.html
    • +
    • Filter/Logical.html
    • +
    • Filter/Spatial.html
    • +
    • Format.html
    • +
    • Format/Atom.html
    • +
    • Format/ArcXML.html
    • +
    • Format/XML/VersionedOGC.html
    • +
    • Format/ArcXML/Features.html
    • +
    • Format/CQL.html
    • +
    • Format/GeoJSON.html
    • +
    • Format/GeoRSS.html
    • +
    • Format/GML.html
    • +
    • Format/GML/v2.html
    • +
    • Format/GML/v3.html
    • +
    • Format/GPX.html
    • +
    • Format/JSON.html
    • +
    • Format/KML.html
    • +
    • Format/OSM.html
    • +
    • Format/Text.html
    • +
    • Format/SLD.html
    • +
    • Format/SLD/v1_0_0.html
    • +
    • Format/Filter.html
    • +
    • Format/Filter/v1.html
    • +
    • Format/Filter/v1_0_0.html
    • +
    • Format/Filter/v1_1_0.html
    • +
    • Format/QueryStringFilter.html
    • +
    • Format/WFS.html
    • +
    • Format/WFSCapabilities.html
    • +
    • Format/WFSCapabilities/v1.html
    • +
    • Format/WFSDescribeFeatureType.html
    • +
    • Format/WFST.html
    • +
    • Format/WFST/v1.html
    • +
    • Format/WFST/v1_0_0.html
    • +
    • Format/WFST/v1_1_0.html
    • +
    • Format/WKT.html
    • +
    • Format/WMC.html
    • +
    • Format/WMC/v1_1_0.html
    • +
    • Format/WMC/v1.html
    • +
    • Format/WMSCapabilities.html
    • +
    • Format/WMSCapabilities/v1_1_1.html
    • +
    • Format/WMSCapabilities/v1_1_1_WMSC.html
    • +
    • Format/WMSCapabilities/v1_3_0.html
    • +
    • Format/WMSDescribeLayer.html
    • +
    • Format/WMSGetFeatureInfo.html
    • +
    • Format/WMTSCapabilities.html
    • +
    • Format/WMTSCapabilities/v1_0_0.html
    • +
    • Format/WPSCapabilities/v1_0_0.html
    • +
    • Format/WPSDescribeProcess.html
    • +
    • Format/WPSExecute.html
    • +
    • Format/CSWGetDomain.html
    • +
    • Format/CSWGetDomain/v2_0_2.html
    • +
    • Format/CSWGetRecords.html
    • +
    • Format/CSWGetRecords/v2_0_2.html
    • +
    • Format/SOSCapabilities/v1_0_0.html
    • +
    • Format/SOSGetObservation.html
    • +
    • Format/SOSGetFeatureOfInterest.html
    • +
    • Format/OWSContext/v0_3_1.html
    • +
    • Format/OWSCommon/v1_0_0.html
    • +
    • Format/OWSCommon/v1_1_0.html
    • +
    • Format/OGCExceptionReport.html
    • +
    • Format/XLS/v1_1_0.html
    • +
    • Format/WCSGetCoverage.html
    • +
    • Format/XML.html
    • +
    • Geometry.html
    • +
    • Geometry/Collection.html
    • +
    • Geometry/Curve.html
    • +
    • Geometry/LinearRing.html
    • +
    • Geometry/LineString.html
    • +
    • Geometry/MultiLineString.html
    • +
    • Geometry/MultiPoint.html
    • +
    • Geometry/MultiPolygon.html
    • +
    • Geometry/Point.html
    • +
    • Geometry/Polygon.html
    • +
    • Geometry/Rectangle.html
    • +
    • Geometry/Surface.html
    • +
    • Handler.html
    • +
    • Handler/Box.html
    • +
    • Handler/Click.html
    • +
    • Handler/Drag.html
    • +
    • Handler/Pinch.html
    • +
    • Handler/Feature.html
    • +
    • Handler/Hover.html
    • +
    • Handler/Keyboard.html
    • +
    • Handler/MouseWheel.html
    • +
    • Handler/Path.html
    • +
    • Handler/Point.html
    • +
    • Handler/Polygon.html
    • +
    • Handler/RegularPolygon.html
    • +
    • Icon.html
    • +
    • Lang.html
    • +
    • Layer.html
    • +
    • Layer/ArcIMS.html
    • +
    • Layer/ArcGIS93Rest.html
    • +
    • Layer/ArcGISCache.html
    • +
    • Layer/Bing.html
    • +
    • Layer/EventPane.html
    • +
    • Layer/FixedZoomLevels.html
    • +
    • Layer/GeoRSS.html
    • +
    • Layer/GML.html
    • +
    • Layer/Google.html
    • +
    • Layer/Google/v3.html
    • +
    • Layer/GoogleNG.html
    • +
    • Layer/Grid.html
    • +
    • Layer/HTTPRequest.html
    • +
    • Layer/Image.html
    • +
    • Layer/KaMap.html
    • +
    • Layer/MapGuide.html
    • +
    • Layer/MapServer.html
    • +
    • Layer/Markers.html
    • +
    • Layer/MultiMap.html
    • +
    • Layer/PointGrid.html
    • +
    • Layer/PointTrack.html
    • +
    • Layer/SphericalMercator.html
    • +
    • Layer/Text.html
    • +
    • Layer/TileCache.html
    • +
    • Layer/TMS.html
    • +
    • Layer/Vector.html
    • +
    • Layer/Vector/RootContainer.html
    • +
    • Layer/WFS.html
    • +
    • Layer/WMS.html
    • +
    • Layer/WMS/Post.html
    • +
    • Layer/WMTS.html
    • +
    • Layer/WrapDateLine.html
    • +
    • Layer/XYZ.html
    • +
    • Layer/Yahoo.html
    • +
    • Map.html
    • +
    • Marker.html
    • +
    • Marker/Box.html
    • +
    • OpenLayers1.html
    • +
    • OpenLayers2.html
    • +
    • OpenLayers3.html
    • +
    • OpenLayers4.html
    • +
    • OpenLayersJsFiles.html
    • +
    • Popup.html
    • +
    • Popup/Anchored.html
    • +
    • Popup/AnchoredBubble.html
    • +
    • Popup/FramedCloud.html
    • +
    • Projection.html
    • +
    • Protocol.html
    • +
    • Protocol/HTTP.html
    • +
    • Protocol/Script.html
    • +
    • Protocol/SQL.html
    • +
    • Protocol/SQL/Gears.html
    • +
    • Protocol/WFS.html
    • +
    • Protocol/SOS.html
    • +
    • Renderer.html
    • +
    • Renderer/Canvas.html
    • +
    • Renderer/Elements.html
    • +
    • Renderer/SVG.html
    • +
    • Renderer/SVG2.html
    • +
    • Renderer/VML.html
    • +
    • Request.html
    • +
    • Request/XMLHttpRequest.html
    • +
    • Rule.html
    • +
    • Strategy.html
    • +
    • Strategy/BBOX.html
    • +
    • Strategy/Cluster.html
    • +
    • Strategy/Filter.html
    • +
    • Strategy/Fixed.html
    • +
    • Strategy/Paging.html
    • +
    • Strategy/Save.html
    • +
    • Strategy/Refresh.html
    • +
    • Style.html
    • +
    • Style2.html
    • +
    • StyleMap.html
    • +
    • Symbolizer.html
    • +
    • Symbolizer/Line.html
    • +
    • Symbolizer/Point.html
    • +
    • Symbolizer/Polygon.html
    • +
    • Symbolizer/Raster.html
    • +
    • Symbolizer/Text.html
    • +
    • Tile.html
    • +
    • Tile/Google.html
    • +
    • Tile/Image.html
    • +
    • Tile/Image/IFrame.html
    • +
    • Tile/WFS.html
    • +
    • Tween.html
    • +
    • Kinetic.html
    • +
    • Util.html
    • +
    diff --git a/openlayers/tests/manual/ajax.html b/openlayers/tests/manual/ajax.html new file mode 100644 index 0000000000..be038ad470 --- /dev/null +++ b/openlayers/tests/manual/ajax.html @@ -0,0 +1,49 @@ + + + XHR Acceptance Test + + + + + + expected output: "request completed" then "other processing"
    + + expected output: "other processing" then "request completed"
    + + expected output: "other processing" (and not "never called")
    +
    + + + diff --git a/openlayers/tests/manual/ajax.txt b/openlayers/tests/manual/ajax.txt new file mode 100644 index 0000000000..b10a4275f5 --- /dev/null +++ b/openlayers/tests/manual/ajax.txt @@ -0,0 +1 @@ +one fake text file \ No newline at end of file diff --git a/openlayers/tests/manual/alloverlays-mixed.html b/openlayers/tests/manual/alloverlays-mixed.html new file mode 100644 index 0000000000..4b64f11a32 --- /dev/null +++ b/openlayers/tests/manual/alloverlays-mixed.html @@ -0,0 +1,55 @@ + + + + + + + OpenLayers Mixed allOverlays Test + + + + + + + + +

    Mixed allOverlays Test

    + +
    + +
    +

    + The map image aboved should show a Google layer and an opaque WMS + layer. They both should align (look at the border of West Africa) +

    +
    + + diff --git a/openlayers/tests/manual/arcims-2117.html b/openlayers/tests/manual/arcims-2117.html new file mode 100644 index 0000000000..08dc4aae5f --- /dev/null +++ b/openlayers/tests/manual/arcims-2117.html @@ -0,0 +1,103 @@ + + + ArcIMS Test Ticket #2117 + + + + + + +

    ArcIMS Test Ticket #2117

    + +
    +
    +

    + Testing ticket #2117 +

    + +
    + +
    + This is an example of a bug in the ArcXML format writer. + If you don't see a map, it's broken. +
    + + + + + + + diff --git a/openlayers/tests/manual/arkansas.rss b/openlayers/tests/manual/arkansas.rss new file mode 100644 index 0000000000..926d357fa0 --- /dev/null +++ b/openlayers/tests/manual/arkansas.rss @@ -0,0 +1,9 @@ +topp:statesFeed auto-generated by GeoServerArkansas + +
    + +Map by:
    TOPP +]]>
    34.19665500000001 -94.461479 34.508326999999994 -94.452408 34.735504000000006 -94.44574 34.929050000000004 -94.439102 35.400454999999994 -94.428337 35.641003 -94.468269 35.760227 -94.485718 36.106753999999995 -94.542198 36.164444 -94.552895 36.478714 -94.607231 36.489338000000004 -94.617035 36.49095199999999 -94.080849 36.489716 -93.857323 36.489891 -93.59626 36.490196 -93.328163 36.490616 -93.297142 36.489819 -92.852104 36.489918 -92.777466 36.490855999999994 -92.522888 36.491596 -92.146164 36.491371 -92.127487 36.490955 -91.688416 36.490376 -91.45285 36.491039 -91.411659 36.487953000000005 -91.133827 36.489204 -90.804314 36.490962999999994 -90.581619 36.492751999999996 -90.224373 36.491814000000005 -90.150162 36.45741700000001 -90.137276 36.453896 -90.117226 36.422565000000006 -90.123833 36.404915 -90.116829 36.39738800000001 -90.080177 36.382553 -90.052063 36.362606 -90.050201 36.325333 -90.067635 36.300472 -90.049751 36.272273999999996 -90.066093 36.257996000000006 -90.109917 36.21207 -90.131218 36.196940999999995 -90.161308 36.172565000000006 -90.219223 36.161148 -90.232224 36.137089 -90.23484 36.118763 -90.263702 36.115905999999995 -90.284752 36.091656 -90.315239 35.989586 -90.37896 35.991158 -90.283455 35.996838 -89.963203 35.999877999999995 -89.721756 35.966324 -89.713135 35.93782 -89.664192 35.913799 -89.645401 35.894287000000006 -89.649338 35.885647000000006 -89.66465 35.911427 -89.714684 35.915012000000004 -89.737976 35.896812 -89.762909 35.884102 -89.766273 35.871418000000006 -89.757713 35.842037000000005 -89.701439 35.827515000000005 -89.700829 35.807036999999994 -89.735939 35.817420999999996 -89.759796 35.805553 -89.790382 35.774223000000006 -89.799904 35.758269999999996 -89.827042 35.748192 -89.859871 35.754836999999995 -89.909782 35.734268 -89.951035 35.712486 -89.952034 35.676266 -89.929741 35.655972000000006 -89.893402 35.673306 -89.865181 35.671062000000006 -89.857246 35.645222000000004 -89.849197 35.629745 -89.863838 35.633335 -89.877441 35.603104 -89.957047 35.578593999999995 -89.958031 35.546059 -89.921661 35.52923199999999 -89.931175 35.526900999999995 -89.947548 35.532291 -89.962273 35.561676000000006 -89.989586 35.552414 -90.033051 35.542846999999995 -90.040901 35.51244 -90.041817 35.445454 -89.999565 35.417103 -90.046783 35.41341 -90.060295 35.426506 -90.073936 35.472342999999995 -90.074844 35.478207 -90.08223 35.473568 -90.101959 35.442524000000006 -90.137276 35.423716999999996 -90.172676 35.384254 -90.167816 35.383044999999996 -90.140167 35.4076 -90.132469 35.41768999999999 -90.112244 35.418282000000005 -90.085159 35.406527999999994 -90.075478 35.381508 -90.087135 35.365982 -90.105621 35.345591999999996 -90.098701 35.314685999999995 -90.106346 35.30624400000001 -90.15699 35.282566 -90.169746 35.264056999999994 -90.152122 35.263847 -90.105942 35.254397999999995 -90.090103 35.212738 -90.068962 35.191833 -90.073303 35.166916 -90.062431 35.147385 -90.064537 35.12505 -90.082924 35.13653600000001 -90.14373 35.129611999999995 -90.164474 35.10864599999999 -90.178345 35.077827 -90.169083 35.040897 -90.195709 35.048458 -90.291809 35.000693999999996 -90.305351 34.978481 -90.299507 34.94976 -90.248169 34.938903999999994 -90.241898 34.920731 -90.242844 34.896511000000004 -90.266708 34.88269 -90.296272 34.864959999999996 -90.299446 34.851776 -90.301552 34.850266000000005 -90.322823 34.860577000000006 -90.341423 34.841038 -90.403931 34.832268 -90.42231 34.835353999999995 -90.433548 34.872643 -90.427841 34.88618099999999 -90.438087 34.88092399999999 -90.470528 34.857727 -90.474716 34.82521800000001 -90.451904 34.79966400000001 -90.466705 34.76075 -90.448868 34.741198999999995 -90.451431 34.726833 -90.485924 34.729855 -90.504417 34.748371000000006 -90.516968 34.765784999999994 -90.498734 34.789833 -90.501282 34.805603000000005 -90.516045 34.807323 -90.52726 34.790336999999994 -90.547745 34.713252999999995 -90.533279 34.702068 -90.513565 34.704254000000006 -90.469978 34.672039 -90.466225 34.638065 -90.508812 34.636894 -90.538963 34.65180599999999 -90.547546 34.685947 -90.539062 34.700287 -90.561058 34.645611 -90.5793 34.627815 -90.58799 34.604744 -90.577614 34.555649 -90.530617 34.543327000000005 -90.537148 34.532509000000005 -90.565681 34.520222000000004 -90.580345 34.496506 -90.59005 34.453945000000004 -90.574402 34.432998999999995 -90.579124 34.40459799999999 -90.60379 34.36591 -90.657242 34.330006 -90.657814 34.31797400000001 -90.679337 34.320145 -90.689377 34.3634 -90.681137 34.377871999999996 -90.687485 34.37216600000001 -90.75531 34.363913999999994 -90.761856 34.317719 -90.747757 34.278976 -90.758255 34.299957000000006 -90.792526 34.299347 -90.806419 34.277339999999995 -90.823837 34.229534 -90.83136 34.219162 -90.863411 34.250195000000005 -90.928436 34.23467599999999 -90.933708 34.20483 -90.921486 34.190544 -90.822922 34.166172 -90.80751 34.148658999999995 -90.828865 34.147544999999994 -90.846611 34.185649999999995 -90.928917 34.155804 -90.953346 34.125941999999995 -90.942245 34.102749 -90.906311 34.10095200000001 -90.866333 34.040710000000004 -90.886345 34.031288 -90.95047 34.010998 -90.973366 33.994606000000005 -90.975273 33.978874000000005 -90.961128 33.967461 -90.96479 33.960815 -90.986816 33.968372 -91.000259 33.990528 -91.009544 33.985699 -91.031059 34.006096 -91.069695 33.994468999999995 -91.088852 33.974644 -91.075706 33.936306 -91.018463 33.867081 -91.061371 33.843525 -91.054817 33.816586 -91.028854 33.798897 -90.990372 33.78533899999999 -90.984039 33.77154899999999 -90.995377 33.76397299999999 -91.018433 33.769554 -91.043404 33.786525999999995 -91.066391 33.776439999999994 -91.105415 33.780086999999995 -91.136986 33.771820000000005 -91.142891 33.723225 -91.138 33.71244 -91.128944 33.70823300000001 -91.104568 33.719357 -91.056213 33.70549 -91.038826 33.683216 -91.037834 33.662586000000005 -91.083771 33.677527999999995 -91.121048 33.718315000000004 -91.1633 33.708965000000006 -91.211678 33.690723000000006 -91.215141 33.669945 -91.205307 33.637032000000005 -91.154404 33.616161000000005 -91.15065 33.57724399999999 -91.168022 33.57468 -91.187805 33.590481 -91.22673 33.55635100000001 -91.227631 33.539276 -91.213486 33.538506 -91.204102 33.52334999999999 -91.182846 33.512012 -91.180405 33.473395999999994 -91.207642 33.459453999999994 -91.22715 33.443443 -91.232849 33.447388000000004 -91.18177 33.466644 -91.17173 33.504368 -91.174179 33.51178 -91.164978 33.493190999999996 -91.128799 33.469673 -91.118958 33.452831 -91.119713 33.443123 -91.130516 33.422112 -91.19883 33.414299 -91.204163 33.39183 -91.184982 33.388878000000005 -91.137634 33.414897999999994 -91.099129 33.462856 -91.0858 33.466206 -91.073761 33.460010999999994 -91.060982 33.431797 -91.061516 33.410179 -91.07869 33.393406 -91.106941 33.359402 -91.130424 33.322384 -91.141747 33.268505000000005 -91.122505 33.249210000000005 -91.102905 33.29235799999999 -91.076324 33.293575000000004 -91.053833 33.281921 -91.040428 33.245780999999994 -91.054543 33.225697 -91.092003 33.161602 -91.086319 33.145084 -91.095856 33.131069 -91.12133 33.150288 -91.177628 33.140465000000006 -91.195503 33.113224 -91.190536 33.090652000000006 -91.14679 33.065571000000006 -91.11779 33.04727200000001 -91.123985 33.040431999999996 -91.156685 33.021709 -91.160675 33.013039000000006 -91.162132 33.013476999999995 -91.254616 33.013419999999996 -91.427528 33.013874 -91.454353 33.010025 -92.063309 33.016701 -92.717079 33.018135 -92.978828 33.019238 -93.232376 33.021393 -93.478897 33.021152 -93.511742 33.022594 -93.809753 33.023289000000005 -94.03875 33.270325 -94.036507 33.555912000000006 -94.035927 33.577213 -94.061432 33.583954000000006 -94.086655 33.572998 -94.098701 33.567085000000006 -94.155167 33.593773 -94.159515 33.58507899999999 -94.205345 33.557987 -94.210884 33.561535000000006 -94.235367 33.585719999999995 -94.223038 33.592422 -94.237236 33.561736999999994 -94.274544 33.584605999999994 -94.272079 33.589332999999996 -94.278984 33.579853 -94.29882 33.556934 -94.302383 33.57313499999999 -94.328751 33.547684000000004 -94.370758 33.560303000000005 -94.395264 33.572661999999994 -94.372307 33.590042 -94.370628 33.593327 -94.379112 33.57495900000001 -94.393417 33.573486 -94.40657 33.59714099999999 -94.428467 33.596503999999996 -94.443329 33.604347000000004 -94.451553 33.616844 -94.436333 33.636444 -94.435913 33.631966000000006 -94.476486 33.939198000000005 -94.468376 34.19665500000001 -94.461479
    \ No newline at end of file diff --git a/openlayers/tests/manual/big-georss.html b/openlayers/tests/manual/big-georss.html new file mode 100644 index 0000000000..6be290c46b --- /dev/null +++ b/openlayers/tests/manual/big-georss.html @@ -0,0 +1,27 @@ + + + OpenLayers GML Layer Example + + + + + + +

    Does this map look like arkansas?

    +
    + + diff --git a/openlayers/tests/manual/box-quirks.html b/openlayers/tests/manual/box-quirks.html new file mode 100644 index 0000000000..eb74bed0be --- /dev/null +++ b/openlayers/tests/manual/box-quirks.html @@ -0,0 +1,52 @@ + + + Box Handler Quirks Mode Test + + + + + + + +

    Box handler Quirks Mode Test

    + +
    Test the correct appearance of the ZoomBox in quirks mode
    + +
    + +
    +

    For the box to be positioned correctly, we need to know the + width of the borders.

    +

    Shift-click on the map. A red box should be visible around the mouse + cursor position, with 20 pixels to the top and right, 10 pixels to + the left and 30 pixels to the bottom edge of the box.

    +

    Drag the box both to the top-left and the bottom-right. The cursor + should always be at the top-left or bottom-right inner corner of + the box.

    +
    + + diff --git a/openlayers/tests/manual/box-strict.html b/openlayers/tests/manual/box-strict.html new file mode 100644 index 0000000000..5b38ea5584 --- /dev/null +++ b/openlayers/tests/manual/box-strict.html @@ -0,0 +1,46 @@ + + + + Box Handler Strict Mode Test + + + + + + + +

    Box Handler Strict Mode Test

    + +
    Test the correct appearance of the ZoomBox in strict mode
    + +
    + +
    +

    For the box to be positioned correctly, we need to know the + width of the borders.

    +

    Shift-click on the map. A red box should be visible around the mouse + cursor position, with 20 pixels to the top and right, 10 pixels to + the left and 30 pixels to the bottom edge of the box.

    +

    Drag the box both to the top-left and the bottom-right. The cursor + should always be at the top-left or bottom-right inner corner of + the box.

    +
    + + diff --git a/openlayers/tests/manual/clip-features-svg.html b/openlayers/tests/manual/clip-features-svg.html new file mode 100644 index 0000000000..f4137eae7a --- /dev/null +++ b/openlayers/tests/manual/clip-features-svg.html @@ -0,0 +1,128 @@ + + +SVG inValidRange Test Case + + + + + +

    SVG inValidRange Clipping Test Case

    +

    Behavior before fixing #1631: Push Zoom 5. You see lines. Push +Zoom 6. No lines.

    +
    +
    + + + + + + diff --git a/openlayers/tests/manual/draw-feature.html b/openlayers/tests/manual/draw-feature.html new file mode 100644 index 0000000000..8872b631ed --- /dev/null +++ b/openlayers/tests/manual/draw-feature.html @@ -0,0 +1,73 @@ + + + Draw Feature Acceptance Test + + + + + + +
    +

    Resolution properties set at the map level.

    +

    Points should draw as you draw lines. Click to start + drawing and double-click to draw the last point.

    +
    + +
    +

    Resolution properties set at the layer level.

    +

    Points should draw as you draw lines. Click to start + drawing and double-click to draw the last point.

    + + diff --git a/openlayers/tests/manual/feature-handler.html b/openlayers/tests/manual/feature-handler.html new file mode 100644 index 0000000000..f9b8892926 --- /dev/null +++ b/openlayers/tests/manual/feature-handler.html @@ -0,0 +1,126 @@ + + + Feature Handler Acceptance Test + + + + + + +
    +
    +

    + Draw a few polygons on the map. Some overlapping. Activate the + feature handler and ensure that "over" and "out" are called only + when mousing over/out of a feature for the first time. The + "click" callback should be called for every click on a feature. + The "clickout" callback should be called when? +

    +
    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    +
    + +
    + + diff --git a/openlayers/tests/manual/geodesic.html b/openlayers/tests/manual/geodesic.html new file mode 100644 index 0000000000..e642558957 --- /dev/null +++ b/openlayers/tests/manual/geodesic.html @@ -0,0 +1,160 @@ + + + + + + + + +

    OpenLayers Geodesic Measurement & ScaleLine

    +

    + Tests geodesic measurement of distances and areas against a geodesic ScaleLine. +

    +
    +
    +
    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    +
    +

    Zoom in so the ScaleLine shows units in the range of 10-100 km. Measure + the length of the ScaleLine. The result should be approximately the same + as the distance printed on the ScaleLine.

    +

    Zoom out so the ScaleLine shows units in the range of 100-500 km. Drag + the map to the South or North and see how the ScaleLine length changes.

    + + diff --git a/openlayers/tests/manual/geojson-geomcoll-reprojection.html b/openlayers/tests/manual/geojson-geomcoll-reprojection.html new file mode 100644 index 0000000000..e82e08a330 --- /dev/null +++ b/openlayers/tests/manual/geojson-geomcoll-reprojection.html @@ -0,0 +1,74 @@ + + + + + + + + + +
    + + diff --git a/openlayers/tests/manual/google-panning.html b/openlayers/tests/manual/google-panning.html new file mode 100644 index 0000000000..0ccdaf26ed --- /dev/null +++ b/openlayers/tests/manual/google-panning.html @@ -0,0 +1,122 @@ + + + Google Panning Acceptance Test + + + + + + + + +
    +

    Even sized map. The map on the left should pan regularly, and the + two centers below should be equivalent. Both dragging and panning with + buttons should maintain the same center.

    +

    pixel center: +
    map center: +
    equvalent: +

    +
    + +
    +

    Odd sized map. The map on the left should pan regularly, and the + two centers below should be equivalent. Both dragging and panning with + buttons should maintain the same center.

    +

    pixel center: +
    map center: +
    equvalent: +

    + + + diff --git a/openlayers/tests/manual/google-resize.html b/openlayers/tests/manual/google-resize.html new file mode 100644 index 0000000000..c1384dfd6e --- /dev/null +++ b/openlayers/tests/manual/google-resize.html @@ -0,0 +1,55 @@ + + + OpenLayers Google Layer Example + + + + + + + + +

    Google Layer Resize Issue

    + +
    + +

    +

      +
    1. Click +
    2. +
    3. Open the LayerSwitcher and switch to Google Streets
    4. +
    5. Confirm that the whole map area is populated with tiles
    6. +
    +

    + +
    + + + diff --git a/openlayers/tests/manual/google-v3-resize.html b/openlayers/tests/manual/google-v3-resize.html new file mode 100644 index 0000000000..fb6955b38a --- /dev/null +++ b/openlayers/tests/manual/google-v3-resize.html @@ -0,0 +1,54 @@ + + + Google v3 Resize Test + + + + + + + +

    Google Layer Resize Issue

    + +
    + +

    +

      +
    1. Click +
    2. +
    3. Open the LayerSwitcher and switch to Google Streets
    4. +
    5. Confirm that the whole map area is populated with tiles
    6. +
    +

    + +
    + + + diff --git a/openlayers/tests/manual/memory/Marker-2258.html b/openlayers/tests/manual/memory/Marker-2258.html new file mode 100644 index 0000000000..b2d8a37b09 --- /dev/null +++ b/openlayers/tests/manual/memory/Marker-2258.html @@ -0,0 +1,60 @@ + + + Memory Test - Layer.Markers / Marker + + + + + + + +

    Memory Test - Layer.Markers / Marker

    +
    
    +    
    +

    + This test is a memory leak test for usage of Layer.Markers / Marker. +

    +

    + Run this test in IE6/7 with JavaScript Memory Leak Detector v2 + and watch it identify a leak unless this is fixed. +

    + + diff --git a/openlayers/tests/manual/memory/PanZoom-2323.html b/openlayers/tests/manual/memory/PanZoom-2323.html new file mode 100644 index 0000000000..de629a69db --- /dev/null +++ b/openlayers/tests/manual/memory/PanZoom-2323.html @@ -0,0 +1,41 @@ + + + Memory Test - PanZoom.getSlideFactor + + + + + + + +

    Memory Test - PanZoom.getSlideFactor

    +
    
    +    
    +

    + This test is a memory leak test for: PanZoom.getSlideFactor. +

    +

    + Run this test in IE6/7 with JavaScript Memory Leak Detector v2 + and watch it identify a leak unless this is fixed. +

    + + diff --git a/openlayers/tests/manual/memory/RemoveChild-2170.html b/openlayers/tests/manual/memory/RemoveChild-2170.html new file mode 100644 index 0000000000..abe9249dc2 --- /dev/null +++ b/openlayers/tests/manual/memory/RemoveChild-2170.html @@ -0,0 +1,56 @@ + + + Memory Test - DOMNode.removeChild + + + + + + + +

    Memory Test - DOMNode.removeChild

    +
    
    +    
    +

    + This test is a memory leak test for usage of DOMNode.removeChild +

    +

    + Run this test in IE6/7 with JavaScript Memory Leak Detector v2 + and watch it identify a leak unless this is fixed. +

    + + diff --git a/openlayers/tests/manual/memory/VML-2170.html b/openlayers/tests/manual/memory/VML-2170.html new file mode 100644 index 0000000000..2f72300bad --- /dev/null +++ b/openlayers/tests/manual/memory/VML-2170.html @@ -0,0 +1,49 @@ + + + Memory Test - Renderer.VML - onselectstart + + + + + + + +

    Memory Test - Renderer.VML - onselectstart

    +
    
    +    
    +

    + This test is a memory leak test for usage of "onselectstart" event handler in Renderer.VML +

    +

    + Run this test in IE6/7 with JavaScript Memory Leak Detector v2 + and watch it identify a leak unless this is fixed. +

    + + diff --git a/openlayers/tests/manual/multiple-google-layers.html b/openlayers/tests/manual/multiple-google-layers.html new file mode 100644 index 0000000000..df5c4f0e3e --- /dev/null +++ b/openlayers/tests/manual/multiple-google-layers.html @@ -0,0 +1,135 @@ + + + Multiple Google Layers Acceptance Test + + + + + + + +
    +
    +
    + layers for map1 +
      +
    • +
    • +
    • +
    +
    +
    +
    +
    +
    + layers for map2 +
      +
    • +
    • +
    • +
    +
    +
    +

    + This example is used to confirm that resizable maps with multiple + Google layers work properly. Click the checkboxes to add/remove + layers from the maps. Use the layer switcher to change the map's + base layer. You should be able to confirm the following: +

      +
    1. Adding and removing layers doesn't raise any errors + (regardless of how many times the same layer is added/removed).
    2. +
    3. The Google "Powered By" link is always visible and clickable + when a Google layer is displayed.
    4. +
    5. The Google "Terms of Use" link is always visible and clickable + when a Google layer is displayed.
    6. +
    7. Resizing a map (by resizing the browser window) and then + changing base layer works well. That is, the center & scale are + preserved and all tiles are well aligned.
    8. +
    9. Setting the base layer to the "Dummy Layer" hides all other + Google base layers, "Powered By" link, and "Terms of Use" link.
    10. +
    +

    + + + \ No newline at end of file diff --git a/openlayers/tests/manual/overviewmap-projection.html b/openlayers/tests/manual/overviewmap-projection.html new file mode 100644 index 0000000000..bb15c9fc35 --- /dev/null +++ b/openlayers/tests/manual/overviewmap-projection.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + +

    OpenLayers Overview Map Projection Test

    + +
    +
    +

    + Acceptance test for different projections in map and overview map. + The map uses EPSG:900913, the overview map EPSG:4326. Zoom the map and + drag both the map and the overview map to see it in action. +

    +
    + +
    +
    + + + + + diff --git a/openlayers/tests/manual/page-position.html b/openlayers/tests/manual/page-position.html new file mode 100644 index 0000000000..a59dfdefb9 --- /dev/null +++ b/openlayers/tests/manual/page-position.html @@ -0,0 +1,103 @@ + + + + Page Position Test + + + + + + + + +

    OpenLayers Page Position Test

    + +

    + Test if borders and scroll position cause unwanted offsets on the + mouse positions reported by map events. +

    +
    +
    +
    + +
      +
    • + + +
    • +
    • + + +
    • +
    + +
    +

    This map's div has a border and absolute positioning, wrapped + by a container which also has a border. The page is also + scrollable. Neither the borders nor scrolling the page should + result in unwanted offsets on pixel positions reported by map + events.

    +

    With the line drawing control active, click on the map to add a + point. The point should be drawn at the exact mouse location.

    +

    With the navigation control active, shift-drag a zoom rectangle. + The rectangle's corner should align exactly with the mouse + cursor.

    +

    Scroll the page and repeat the above tests.

    +
    +
    + + diff --git a/openlayers/tests/manual/pan-redraw-svg.html b/openlayers/tests/manual/pan-redraw-svg.html new file mode 100644 index 0000000000..ec1126b942 --- /dev/null +++ b/openlayers/tests/manual/pan-redraw-svg.html @@ -0,0 +1,58 @@ + + + + + + + + + +

    SVG inValidRange Redraw Test Case

    +

    Before fixing #1631, after klicking Go! no point would have appeared. The Go! button + pans the map over a long distance. Before dragging, the point would have been + outside the valid range, and the pan operation would not have triggered the SVG + coordinate system to be recreated. The new vector rendering takes care of all this.

    +
    + + + diff --git a/openlayers/tests/manual/popup-keepInMap.html b/openlayers/tests/manual/popup-keepInMap.html new file mode 100644 index 0000000000..4ba1c185f3 --- /dev/null +++ b/openlayers/tests/manual/popup-keepInMap.html @@ -0,0 +1,100 @@ + + + OpenLayers: Popup Mayhem + + + + + + + +

    Popup KeepInMap

    + +
    +
    + Click on popup, and the content should scroll rather than expanding outside the map. +
    + + diff --git a/openlayers/tests/manual/reflow.html b/openlayers/tests/manual/reflow.html new file mode 100644 index 0000000000..bb9585e763 --- /dev/null +++ b/openlayers/tests/manual/reflow.html @@ -0,0 +1,59 @@ + + + + + + + +
    +

    Use the pan buttons. See flicker at end of animated pan.

    + + diff --git a/openlayers/tests/manual/rendered-dimensions.html b/openlayers/tests/manual/rendered-dimensions.html new file mode 100644 index 0000000000..41b0fcf4d4 --- /dev/null +++ b/openlayers/tests/manual/rendered-dimensions.html @@ -0,0 +1,48 @@ + + + + + + + +
    + + diff --git a/openlayers/tests/manual/renderedDimensions.html b/openlayers/tests/manual/renderedDimensions.html new file mode 100644 index 0000000000..b01624b40b --- /dev/null +++ b/openlayers/tests/manual/renderedDimensions.html @@ -0,0 +1,113 @@ + + + OpenLayers: Popup Mayhem + + + + + + + +

    Popup Matrix

    + +
    +
    +
    +
    +
    + Click on popup, should be able to read a full sentence, not just two lines. +
    + + diff --git a/openlayers/tests/manual/select-feature.html b/openlayers/tests/manual/select-feature.html new file mode 100644 index 0000000000..6e1fba01a2 --- /dev/null +++ b/openlayers/tests/manual/select-feature.html @@ -0,0 +1,75 @@ + + + Select Feature Test + + + + + + +

    Select Feature Test

    +
    +

    + + The map includes two select feature controls. The first one operates on + geometries of type OpenLayers.Geometry.Point only and works on clicks. The + second one operates on geometries of type OpenLayers.Geometry.Polygon and + works on mouseover's. If you select the point geometry by clicking on it, + it shouldn't be unselected when the mouse moves out if it. + +

    + + diff --git a/openlayers/tests/manual/svg2-coordinaterange.html b/openlayers/tests/manual/svg2-coordinaterange.html new file mode 100644 index 0000000000..b1f5c62791 --- /dev/null +++ b/openlayers/tests/manual/svg2-coordinaterange.html @@ -0,0 +1,50 @@ + + + + + + +SVG2 coordinate range check + + + + +
    +

    The map should show a line on top of the OSM layer. If it does not, then + either the CSS or the SVG coordinate range is exceeded.

    +

    This test only works on browsers that support SVG.

    + + diff --git a/openlayers/tests/manual/tiles-loading.html b/openlayers/tests/manual/tiles-loading.html new file mode 100644 index 0000000000..cbd0e106e6 --- /dev/null +++ b/openlayers/tests/manual/tiles-loading.html @@ -0,0 +1,122 @@ + + + Tiles Loading Acceptance Test + + + + + + + +
    +

    + + Test 0 : at the initial zoom the WMS layer is in range, you should + therefore see the 'Loading tiles...' message when loading the page for + the first time. + +

    +

    + + Test 1 : If you zoom out by one level (using the zoombar), the WMS + layer becomes out of range. No tile should be loaded so you shouldn't see + the 'Loading tiles...' message. + +

    +

    + + Test 2 : Zoom in by one level to go back to initial state (the WMS + is back). Open the layer switcher and turn off the WMS layer. No tile + should be loaded so you shouldn't see the 'Loading tiles...' message. + +

    +

    + + Test 3 : Keep the WMS layer turned off in the layer switcher. Zoom + out by one level again. The layer is both invisible and out of range, so + you shouldn't see the 'Loading tiles...' message. + +

    +

    WMS Layer state - in range: true, visibility: true

    +

    Message:

    + + diff --git a/openlayers/tests/manual/tween.html b/openlayers/tests/manual/tween.html new file mode 100644 index 0000000000..88606cb168 --- /dev/null +++ b/openlayers/tests/manual/tween.html @@ -0,0 +1,82 @@ + + + Tween Example + + + + + +
    Tween Example
    +
    +
    Show transition effects
    + + + +
    +
    +
    +
    + This is an example of transition effects. +
    + + \ No newline at end of file diff --git a/openlayers/tests/manual/ve-opacity.html b/openlayers/tests/manual/ve-opacity.html new file mode 100644 index 0000000000..22fa43a4f2 --- /dev/null +++ b/openlayers/tests/manual/ve-opacity.html @@ -0,0 +1,61 @@ + + + + + + + + + + +

    VE Opacity

    +

    The overlay should have an opacity of 40%.

    +
    + + diff --git a/openlayers/tests/manual/vector-features-performance.html b/openlayers/tests/manual/vector-features-performance.html new file mode 100644 index 0000000000..7990379337 --- /dev/null +++ b/openlayers/tests/manual/vector-features-performance.html @@ -0,0 +1,149 @@ + + + Vector Features Performance Test + + + + + + + +

    New Rendering - Vector Features Performance Test

    +
    +

    + This test examines if checking for a feature being inside the visible + extent before rendering it has an impact on performance. Open the Firebug + console after running this test (hit F12) to see the results. +
    + After the performance test, you can drag around the map to see how the new + vector rendering feels where features get rendered only when they are visible + inside the map extent. +

    + + diff --git a/openlayers/tests/manual/vector-layer-zindex.html b/openlayers/tests/manual/vector-layer-zindex.html new file mode 100644 index 0000000000..d33c85335c --- /dev/null +++ b/openlayers/tests/manual/vector-layer-zindex.html @@ -0,0 +1,143 @@ + + + Vector Layer ZIndex Test + + + + + + +

    Vector Layer ZIndex Test

    +
    +

    + + The map includes one base layer (vmap0) and three overlays, namely a vector + layer, a fake layer with no images, and a dmsolutions layer. The overlays are + added to the map in this order: the vector layer, the fake layer, and the + dmsolutions layer. The map also includes a select feature control, which + when activated bumped the vector layer z-index to some high value. This + makes feature selection work, even though other overlays were added after + the vector layer. + +

    +

    + + If the fake layer is removed from the map (first link below), the vector layer's + z-index must not be reset, so the vector layer must not go under the + dmsolutions layer and feature selection must continue to function as + expected. + +

    +

    + + If one of the SelectFeature controls is deactivated or activated (second + and third link below), the vector layer should change it's position in the + layer stack: on top if at least one of the controls is activated, covered + by other layers if both are deactivated. + +

    + +

    + Remove the fake layer +
    Toggle the click SelectFeature control's active status +
    Toggle the hover SelectFeature control's active status +

    + + diff --git a/openlayers/tests/mice.xml b/openlayers/tests/mice.xml new file mode 100644 index 0000000000..4a001eca26 --- /dev/null +++ b/openlayers/tests/mice.xml @@ -0,0 +1,156 @@ + + + + + -89.817223,45.005555 -74.755001,51.701388 + + + + + + -79.771668,45.891110 -79.771668,45.891110 + + + + + -79.771668,45.891110 + + + + + + + + + -83.755834,46.365277 -83.755834,46.365277 + + + owl + + + -83.755834,46.365277 + + + + + + + + + -83.808612,46.175277 -83.808612,46.175277 + + + + + -83.808612,46.175277 + + + + + + + + + -84.111112,46.309166 -84.111112,46.309166 + + + + + -84.111112,46.309166 + + + + + + + + + -83.678612,46.821110 -83.678612,46.821110 + + + + + -83.678612,46.821110 + + + + + + + + + -83.664445,46.518888 -83.664445,46.518888 + + + + + -83.664445,46.518888 + + + + + + + + + -80.613334,46.730277 -80.613334,46.730277 + + + + + -80.613334,46.730277 + + + + + + + + + -79.676946,45.428054 -79.676946,45.428054 + + + + + -79.676946,45.428054 + + + + + + + + + -83.853056,46.236944 -83.853056,46.236944 + + + + + -83.853056,46.236944 + + + + + + + + + -82.289167,45.896388 -82.289167,45.896388 + + + + + -82.289167,45.896388 + + + + + + diff --git a/openlayers/tests/node.js/mockdom.js b/openlayers/tests/node.js/mockdom.js new file mode 100644 index 0000000000..68c088aa77 --- /dev/null +++ b/openlayers/tests/node.js/mockdom.js @@ -0,0 +1,104 @@ +XMLHttpRequest = function() { + return { + 'open': function() { }, + 'send': function() { } + } +}; + +navigator = { + 'appName': 'mockdom', + 'userAgent': 'mockdom', + 'appVersion': '0.1', + 'language': 'en', + 'userLanguage': 'en' +} + +element = function(type) { + type = type || ""; + + return { + 'childNodes': [], + 'className': '', + 'tagName': type.toUpperCase(), + 'style': {}, + 'setAttribute': function(attr, value) { + this[attr] = value; + }, + 'appendChild': function(element) { + if (this.childNodes.length) { + this.childNodes[this.childNodes.length - 1].nextSibling = element; + } else { + this.firstChild = element; + } + element.parentNode = this; + this.childNodes.push(element); + + }, + 'removeChild': function(element) { + var i = this.childNodes.indexOf(element); + this.childNodes.splice(i, 1); + }, + 'addEventListener': function() { + }, + 'removeEventListener': function() { + }, + 'getElementsByTagName': function(name, externalList) { + var uc = name.toUpperCase(); + var list = externalList || []; + for(var i = 0; i < this.childNodes.length; i++) { + if (this.childNodes[i].tagName == uc) { + list.push(this.childNodes[i]); + } + this.childNodes[i].getElementsByTagName(name, list); + } + return list; + }, + 'getElementById': function(id) { + for(var i = 0; i < this.childNodes.length; i++) { + if (this.childNodes[i].id == id) { + return this.childNodes[i]; + } else { + var elem = this.childNodes[i].getElementById(id); + if (elem) { + return elem + } + } + } + } + } +}; + +document = element(); +document.createElement = function(type) { + return element(type); +}; +document.createTextNode = function(text) { + var e = element("Text"); + e.innerHTML = text; +} + +document.appendChild(element("head")); +document.body = element("body"); +document.appendChild(document.body); + +window = { + 'addEventListener': function() { + }, + 'getSelection': function() { + return { + collapseToStart: function() {} + } + }, + document: document, + navigator: navigator, + location: { + href: '#', + port: '', + hostname: 'openlayers.org', + host: 'openlayers.org', + proto: 'https' + } +}; +document.location = window.location; + +window.Function = Function; diff --git a/openlayers/tests/node.js/node-tests.cfg b/openlayers/tests/node.js/node-tests.cfg new file mode 100644 index 0000000000..bc79baa5bb --- /dev/null +++ b/openlayers/tests/node.js/node-tests.cfg @@ -0,0 +1,12 @@ +# This build config is supposed to be used for the units tests with "mode=build" + +[first] +mockdom.js +[last] +node.js + +[include] + +[exclude] +OpenLayers.js +Firebug/firebug.js diff --git a/openlayers/tests/node.js/node.js b/openlayers/tests/node.js/node.js new file mode 100644 index 0000000000..32249d18a6 --- /dev/null +++ b/openlayers/tests/node.js/node.js @@ -0,0 +1 @@ +exports.OpenLayers = OpenLayers; diff --git a/openlayers/tests/node.js/run-test.js b/openlayers/tests/node.js/run-test.js new file mode 100644 index 0000000000..7b0dd8b537 --- /dev/null +++ b/openlayers/tests/node.js/run-test.js @@ -0,0 +1,26 @@ +// Requires: +/// 0. nodejs +// 1. jsdom installed (npm install jsdom) +// 2. A build profile with mockdom.js included in [first], and node.js +// inclded in [last], at ../../build/OpenLayers.js , like node-tests.js. +// 3. Run with node run-tests.js +// +// Missing: integration with a solid node.js testrunner. +var jsdom = require('jsdom'); +jsdom.env('', function(errors, window) { + for (var i in window) { + if (i == "console") { + continue; + } + eval(i+"=window['"+i+"'];"); + } + OpenLayers = require("../../build/OpenLayers.js")['OpenLayers']; + var map = new OpenLayers.Map(document.createElement("map")); + map.addLayer(new OpenLayers.Layer("", {isBaseLayer:true})); + map.setCenter(new OpenLayers.LonLat(-71,42), 10); + var px = map.getPixelFromLonLat(map.getLonLatFromPixel(new OpenLayers.Pixel(100,100))); + console.log(px); + var px = map.getLonLatFromPixel(map.getPixelFromLonLat(new OpenLayers.LonLat(10,10))); + console.log(px); + +}); diff --git a/openlayers/tests/node.js/run.sh b/openlayers/tests/node.js/run.sh new file mode 100755 index 0000000000..1434dd4b12 --- /dev/null +++ b/openlayers/tests/node.js/run.sh @@ -0,0 +1,10 @@ +#!/bin/sh +cp mockdom.js node.js ../../lib +cp node-tests.cfg ../../build +cd ../../build +python build.py -c none node-tests +cd ../tests/node.js/ + +node run-test.js +rm ../../lib/mockdom.js +rm ../../lib/node.js diff --git a/openlayers/tests/owls.xml b/openlayers/tests/owls.xml new file mode 100644 index 0000000000..4a001eca26 --- /dev/null +++ b/openlayers/tests/owls.xml @@ -0,0 +1,156 @@ + + + + + -89.817223,45.005555 -74.755001,51.701388 + + + + + + -79.771668,45.891110 -79.771668,45.891110 + + + + + -79.771668,45.891110 + + + + + + + + + -83.755834,46.365277 -83.755834,46.365277 + + + owl + + + -83.755834,46.365277 + + + + + + + + + -83.808612,46.175277 -83.808612,46.175277 + + + + + -83.808612,46.175277 + + + + + + + + + -84.111112,46.309166 -84.111112,46.309166 + + + + + -84.111112,46.309166 + + + + + + + + + -83.678612,46.821110 -83.678612,46.821110 + + + + + -83.678612,46.821110 + + + + + + + + + -83.664445,46.518888 -83.664445,46.518888 + + + + + -83.664445,46.518888 + + + + + + + + + -80.613334,46.730277 -80.613334,46.730277 + + + + + -80.613334,46.730277 + + + + + + + + + -79.676946,45.428054 -79.676946,45.428054 + + + + + -79.676946,45.428054 + + + + + + + + + -83.853056,46.236944 -83.853056,46.236944 + + + + + -83.853056,46.236944 + + + + + + + + + -82.289167,45.896388 -82.289167,45.896388 + + + + + -82.289167,45.896388 + + + + + + diff --git a/openlayers/tests/run-tests.html b/openlayers/tests/run-tests.html new file mode 100644 index 0000000000..d2bff43430 --- /dev/null +++ b/openlayers/tests/run-tests.html @@ -0,0 +1,2419 @@ + + Run the testsuite + + + + + + + + +
    +
    Test pages:
    +
    + +
    +
    +
    + + + + +
    + do not close windows opened by tests +
    +
    + +

    Record mouse input for the page:

    +

    +

    or enter page url:

    +

    +
    +
    + +
    +
    +Results: + + +
    +
    +
    +
    +
    +
    + + + + + + +-
    + +

    +  + +

    + +
     
    +

    +cursor is over +

    + +

    + keyboard control: press + ctrl - + shift - +

    + +

    +s +to start recording + +

    + +

    +h +to hide/show this window +

    + +

    +m +to record mousemove + +

    + +

    +p +to pause recording + +

    + +

    +c +to add checkpoint +

    + +

    +checkpoints: +

    +
    +
    +
    + +
    + + diff --git a/openlayers/tests/selenium/remotecontrol/config.cfg b/openlayers/tests/selenium/remotecontrol/config.cfg new file mode 100644 index 0000000000..764bd3d9c7 --- /dev/null +++ b/openlayers/tests/selenium/remotecontrol/config.cfg @@ -0,0 +1,48 @@ +[config] +server=http://openlayers.org/ +url=/dev/tests/run-tests.html?run=all&windows=none + +[local_ff] +host=localhost +browserCmd=firefox +comment=Firefox on localhost + +[local_safari] +host=localhost +browserCmd=safari +comment=Safari on localhost + +#[ie6-winxp] +#host=208.80.142.184 +#browserCmd=iexploreproxy C:\Program Files\MultipleIEs\IE6\iexplore.exe +#comment=IE6 on WinXP + +[ie7-winxp] +host=208.80.142.184 +browserCmd=iexploreproxy +comment=IE7 on WinXP + +# Running on alta: debian etch +[opera-winxp] +host=208.80.142.184 +browserCmd=opera C:\Program Files\Opera 9\Opera.exe +comment=Opera on WinXP + +# Running on alta: debian etch +[opera] +host=208.80.142.140 +browserCmd=opera +comment=Opera on Debian Etch + +# Running on alta: Debian Etch +[firefox2] +host=208.80.142.140 +browserCmd=firefox /usr/lib/iceweasel/firefox-bin +comment=Iceweasel 2 on Debian Etch + +# Running on alta: Debian Etch +[firefox3] +host=208.80.142.105 +browserCmd=firefox /usr/lib/firefox-3.0.1/firefox-bin +comment=FF3 on Ubuntu + diff --git a/openlayers/tests/selenium/remotecontrol/selenium.py b/openlayers/tests/selenium/remotecontrol/selenium.py new file mode 100644 index 0000000000..e5505ed0c2 --- /dev/null +++ b/openlayers/tests/selenium/remotecontrol/selenium.py @@ -0,0 +1,1846 @@ + +""" +Copyright 2006 ThoughtWorks, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" +__docformat__ = "restructuredtext en" + +# This file has been automatically generated via XSL + +import httplib +import urllib +import re + +class selenium: + """ + Defines an object that runs Selenium commands. + + Element Locators + ~~~~~~~~~~~~~~~~ + + Element Locators tell Selenium which HTML element a command refers to. + The format of a locator is: + + \ *locatorType*\ **=**\ \ *argument* + + + We support the following strategies for locating elements: + + + * \ **identifier**\ =\ *id*: + Select the element with the specified @id attribute. If no match is + found, select the first element whose @name attribute is \ *id*. + (This is normally the default; see below.) + * \ **id**\ =\ *id*: + Select the element with the specified @id attribute. + * \ **name**\ =\ *name*: + Select the first element with the specified @name attribute. + + * username + * name=username + + + The name may optionally be followed by one or more \ *element-filters*, separated from the name by whitespace. If the \ *filterType* is not specified, \ **value**\ is assumed. + + * name=flavour value=chocolate + + + * \ **dom**\ =\ *javascriptExpression*: + + Find an element by evaluating the specified string. This allows you to traverse the HTML Document Object + Model using JavaScript. Note that you must not return a value in this string; simply make it the last expression in the block. + + * dom=document.forms['myForm'].myDropdown + * dom=document.images[56] + * dom=function foo() { return document.links[1]; }; foo(); + + + * \ **xpath**\ =\ *xpathExpression*: + Locate an element using an XPath expression. + + * xpath=//img[@alt='The image alt text'] + * xpath=//table[@id='table1']//tr[4]/td[2] + * xpath=//a[contains(@href,'#id1')] + * xpath=//a[contains(@href,'#id1')]/@class + * xpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../td + * xpath=//input[@name='name2' and @value='yes'] + * xpath=//\*[text()="right"] + + + * \ **link**\ =\ *textPattern*: + Select the link (anchor) element which contains text matching the + specified \ *pattern*. + + * link=The link text + + + * \ **css**\ =\ *cssSelectorSyntax*: + Select the element using css selectors. Please refer to CSS2 selectors, CSS3 selectors for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package. + + * css=a[href="#id3"] + * css=span#firstChild + span + + + Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after). + + + + + Without an explicit locator prefix, Selenium uses the following default + strategies: + + + * \ **dom**\ , for locators starting with "document." + * \ **xpath**\ , for locators starting with "//" + * \ **identifier**\ , otherwise + + Element Filters + ~~~~~~~~~~~~~~~ + + Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator. + + Filters look much like locators, ie. + + \ *filterType*\ **=**\ \ *argument* + + Supported element-filters are: + + \ **value=**\ \ *valuePattern* + + + Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons. + + \ **index=**\ \ *index* + + + Selects a single element based on its position in the list (offset from zero). + + String-match Patterns + ~~~~~~~~~~~~~~~~~~~~~ + + Various Pattern syntaxes are available for matching string values: + + + * \ **glob:**\ \ *pattern*: + Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a + kind of limited regular-expression syntax typically used in command-line + shells. In a glob pattern, "\*" represents any sequence of characters, and "?" + represents any single character. Glob patterns match against the entire + string. + * \ **regexp:**\ \ *regexp*: + Match a string using a regular-expression. The full power of JavaScript + regular-expressions is available. + * \ **regexpi:**\ \ *regexpi*: + Match a string using a case-insensitive regular-expression. + * \ **exact:**\ \ *string*: + + Match a string exactly, verbatim, without any of that fancy wildcard + stuff. + + + + If no pattern prefix is specified, Selenium assumes that it's a "glob" + pattern. + + + + For commands that return multiple values (such as verifySelectOptions), + the string being matched is a comma-separated list of the return values, + where both commas and backslashes in the values are backslash-escaped. + When providing a pattern, the optional matching syntax (i.e. glob, + regexp, etc.) is specified once, as usual, at the beginning of the + pattern. + + + """ + +### This part is hard-coded in the XSL + def __init__(self, host, port, browserStartCommand, browserURL): + self.host = host + self.port = port + self.browserStartCommand = browserStartCommand + self.browserURL = browserURL + self.sessionId = None + + def start(self): + result = self.get_string("getNewBrowserSession", [self.browserStartCommand, self.browserURL]) + try: + self.sessionId = result + except ValueError: + raise Exception, result + + def stop(self): + self.do_command("testComplete", []) + self.sessionId = None + + def do_command(self, verb, args): + conn = httplib.HTTPConnection(self.host, self.port) + commandString = u'/selenium-server/driver/?cmd=' + urllib.quote_plus(unicode(verb).encode('utf-8')) + for i in range(len(args)): + commandString = commandString + '&' + unicode(i+1) + '=' + urllib.quote_plus(unicode(args[i]).encode('utf-8')) + if (None != self.sessionId): + commandString = commandString + "&sessionId=" + unicode(self.sessionId) + conn.request("GET", commandString) + + response = conn.getresponse() + #print response.status, response.reason + data = unicode(response.read(), "UTF-8") + result = response.reason + #print "Selenium Result: " + repr(data) + "\n\n" + if (not data.startswith('OK')): + raise Exception, data + return data + + def get_string(self, verb, args): + result = self.do_command(verb, args) + return result[3:] + + def get_string_array(self, verb, args): + csv = self.get_string(verb, args) + token = "" + tokens = [] + escape = False + for i in range(len(csv)): + letter = csv[i] + if (escape): + token = token + letter + escape = False + continue + if (letter == '\\'): + escape = True + elif (letter == ','): + tokens.append(token) + token = "" + else: + token = token + letter + tokens.append(token) + return tokens + + def get_number(self, verb, args): + # Is there something I need to do here? + return self.get_string(verb, args) + + def get_number_array(self, verb, args): + # Is there something I need to do here? + return self.get_string_array(verb, args) + + def get_boolean(self, verb, args): + boolstr = self.get_string(verb, args) + if ("true" == boolstr): + return True + if ("false" == boolstr): + return False + raise ValueError, "result is neither 'true' nor 'false': " + boolstr + + def get_boolean_array(self, verb, args): + boolarr = self.get_string_array(verb, args) + for i in range(len(boolarr)): + if ("true" == boolstr): + boolarr[i] = True + continue + if ("false" == boolstr): + boolarr[i] = False + continue + raise ValueError, "result is neither 'true' nor 'false': " + boolarr[i] + return boolarr + + + +### From here on, everything's auto-generated from XML + + + def click(self,locator): + """ + Clicks on a link, button, checkbox or radio button. If the click action + causes a new page to load (like a link usually does), call + waitForPageToLoad. + + 'locator' is an element locator + """ + self.do_command("click", [locator,]) + + + def double_click(self,locator): + """ + Double clicks on a link, button, checkbox or radio button. If the double click action + causes a new page to load (like a link usually does), call + waitForPageToLoad. + + 'locator' is an element locator + """ + self.do_command("doubleClick", [locator,]) + + + def context_menu(self,locator): + """ + Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element). + + 'locator' is an element locator + """ + self.do_command("contextMenu", [locator,]) + + + def click_at(self,locator,coordString): + """ + Clicks on a link, button, checkbox or radio button. If the click action + causes a new page to load (like a link usually does), call + waitForPageToLoad. + + 'locator' is an element locator + 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. + """ + self.do_command("clickAt", [locator,coordString,]) + + + def double_click_at(self,locator,coordString): + """ + Doubleclicks on a link, button, checkbox or radio button. If the action + causes a new page to load (like a link usually does), call + waitForPageToLoad. + + 'locator' is an element locator + 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. + """ + self.do_command("doubleClickAt", [locator,coordString,]) + + + def context_menu_at(self,locator,coordString): + """ + Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element). + + 'locator' is an element locator + 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. + """ + self.do_command("contextMenuAt", [locator,coordString,]) + + + def fire_event(self,locator,eventName): + """ + Explicitly simulate an event, to trigger the corresponding "on\ *event*" + handler. + + 'locator' is an element locator + 'eventName' is the event name, e.g. "focus" or "blur" + """ + self.do_command("fireEvent", [locator,eventName,]) + + + def focus(self,locator): + """ + Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field. + + 'locator' is an element locator + """ + self.do_command("focus", [locator,]) + + + def key_press(self,locator,keySequence): + """ + Simulates a user pressing and releasing a key. + + 'locator' is an element locator + 'keySequence' is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". + """ + self.do_command("keyPress", [locator,keySequence,]) + + + def shift_key_down(self): + """ + Press the shift key and hold it down until doShiftUp() is called or a new page is loaded. + + """ + self.do_command("shiftKeyDown", []) + + + def shift_key_up(self): + """ + Release the shift key. + + """ + self.do_command("shiftKeyUp", []) + + + def meta_key_down(self): + """ + Press the meta key and hold it down until doMetaUp() is called or a new page is loaded. + + """ + self.do_command("metaKeyDown", []) + + + def meta_key_up(self): + """ + Release the meta key. + + """ + self.do_command("metaKeyUp", []) + + + def alt_key_down(self): + """ + Press the alt key and hold it down until doAltUp() is called or a new page is loaded. + + """ + self.do_command("altKeyDown", []) + + + def alt_key_up(self): + """ + Release the alt key. + + """ + self.do_command("altKeyUp", []) + + + def control_key_down(self): + """ + Press the control key and hold it down until doControlUp() is called or a new page is loaded. + + """ + self.do_command("controlKeyDown", []) + + + def control_key_up(self): + """ + Release the control key. + + """ + self.do_command("controlKeyUp", []) + + + def key_down(self,locator,keySequence): + """ + Simulates a user pressing a key (without releasing it yet). + + 'locator' is an element locator + 'keySequence' is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". + """ + self.do_command("keyDown", [locator,keySequence,]) + + + def key_up(self,locator,keySequence): + """ + Simulates a user releasing a key. + + 'locator' is an element locator + 'keySequence' is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". + """ + self.do_command("keyUp", [locator,keySequence,]) + + + def mouse_over(self,locator): + """ + Simulates a user hovering a mouse over the specified element. + + 'locator' is an element locator + """ + self.do_command("mouseOver", [locator,]) + + + def mouse_out(self,locator): + """ + Simulates a user moving the mouse pointer away from the specified element. + + 'locator' is an element locator + """ + self.do_command("mouseOut", [locator,]) + + + def mouse_down(self,locator): + """ + Simulates a user pressing the mouse button (without releasing it yet) on + the specified element. + + 'locator' is an element locator + """ + self.do_command("mouseDown", [locator,]) + + + def mouse_down_at(self,locator,coordString): + """ + Simulates a user pressing the mouse button (without releasing it yet) at + the specified location. + + 'locator' is an element locator + 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. + """ + self.do_command("mouseDownAt", [locator,coordString,]) + + + def mouse_up(self,locator): + """ + Simulates the event that occurs when the user releases the mouse button (i.e., stops + holding the button down) on the specified element. + + 'locator' is an element locator + """ + self.do_command("mouseUp", [locator,]) + + + def mouse_up_at(self,locator,coordString): + """ + Simulates the event that occurs when the user releases the mouse button (i.e., stops + holding the button down) at the specified location. + + 'locator' is an element locator + 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. + """ + self.do_command("mouseUpAt", [locator,coordString,]) + + + def mouse_move(self,locator): + """ + Simulates a user pressing the mouse button (without releasing it yet) on + the specified element. + + 'locator' is an element locator + """ + self.do_command("mouseMove", [locator,]) + + + def mouse_move_at(self,locator,coordString): + """ + Simulates a user pressing the mouse button (without releasing it yet) on + the specified element. + + 'locator' is an element locator + 'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. + """ + self.do_command("mouseMoveAt", [locator,coordString,]) + + + def type(self,locator,value): + """ + Sets the value of an input field, as though you typed it in. + + + Can also be used to set the value of combo boxes, check boxes, etc. In these cases, + value should be the value of the option selected, not the visible text. + + + 'locator' is an element locator + 'value' is the value to type + """ + self.do_command("type", [locator,value,]) + + + def type_keys(self,locator,value): + """ + Simulates keystroke events on the specified element, as though you typed the value key-by-key. + + + This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; + this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events. + + Unlike the simple "type" command, which forces the specified value into the page directly, this command + may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. + For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in + the field. + + In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to + send the keystroke events corresponding to what you just typed. + + + 'locator' is an element locator + 'value' is the value to type + """ + self.do_command("typeKeys", [locator,value,]) + + + def set_speed(self,value): + """ + Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation). By default, there is no such delay, i.e., + the delay is 0 milliseconds. + + 'value' is the number of milliseconds to pause after operation + """ + self.do_command("setSpeed", [value,]) + + + def get_speed(self): + """ + Get execution speed (i.e., get the millisecond length of the delay following each selenium operation). By default, there is no such delay, i.e., + the delay is 0 milliseconds. + + See also setSpeed. + + """ + return self.get_string("getSpeed", []) + + + def check(self,locator): + """ + Check a toggle-button (checkbox/radio) + + 'locator' is an element locator + """ + self.do_command("check", [locator,]) + + + def uncheck(self,locator): + """ + Uncheck a toggle-button (checkbox/radio) + + 'locator' is an element locator + """ + self.do_command("uncheck", [locator,]) + + + def select(self,selectLocator,optionLocator): + """ + Select an option from a drop-down using an option locator. + + + + Option locators provide different ways of specifying options of an HTML + Select element (e.g. for selecting a specific option, or for asserting + that the selected option satisfies a specification). There are several + forms of Select Option Locator. + + + * \ **label**\ =\ *labelPattern*: + matches options based on their labels, i.e. the visible text. (This + is the default.) + + * label=regexp:^[Oo]ther + + + * \ **value**\ =\ *valuePattern*: + matches options based on their values. + + * value=other + + + * \ **id**\ =\ *id*: + + matches options based on their ids. + + * id=option1 + + + * \ **index**\ =\ *index*: + matches an option based on its index (offset from zero). + + * index=2 + + + + + + If no option locator prefix is provided, the default behaviour is to match on \ **label**\ . + + + + 'selectLocator' is an element locator identifying a drop-down menu + 'optionLocator' is an option locator (a label by default) + """ + self.do_command("select", [selectLocator,optionLocator,]) + + + def add_selection(self,locator,optionLocator): + """ + Add a selection to the set of selected options in a multi-select element using an option locator. + + @see #doSelect for details of option locators + + 'locator' is an element locator identifying a multi-select box + 'optionLocator' is an option locator (a label by default) + """ + self.do_command("addSelection", [locator,optionLocator,]) + + + def remove_selection(self,locator,optionLocator): + """ + Remove a selection from the set of selected options in a multi-select element using an option locator. + + @see #doSelect for details of option locators + + 'locator' is an element locator identifying a multi-select box + 'optionLocator' is an option locator (a label by default) + """ + self.do_command("removeSelection", [locator,optionLocator,]) + + + def remove_all_selections(self,locator): + """ + Unselects all of the selected options in a multi-select element. + + 'locator' is an element locator identifying a multi-select box + """ + self.do_command("removeAllSelections", [locator,]) + + + def submit(self,formLocator): + """ + Submit the specified form. This is particularly useful for forms without + submit buttons, e.g. single-input "Search" forms. + + 'formLocator' is an element locator for the form you want to submit + """ + self.do_command("submit", [formLocator,]) + + + def open(self,url): + """ + Opens an URL in the test frame. This accepts both relative and absolute + URLs. + + The "open" command waits for the page to load before proceeding, + ie. the "AndWait" suffix is implicit. + + \ *Note*: The URL must be on the same domain as the runner HTML + due to security restrictions in the browser (Same Origin Policy). If you + need to open an URL on another domain, use the Selenium Server to start a + new browser session on that domain. + + 'url' is the URL to open; may be relative or absolute + """ + self.do_command("open", [url,]) + + + def open_window(self,url,windowID): + """ + Opens a popup window (if a window with that ID isn't already open). + After opening the window, you'll need to select it using the selectWindow + command. + + + This command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). + In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using + an empty (blank) url, like this: openWindow("", "myFunnyWindow"). + + + 'url' is the URL to open, which can be blank + 'windowID' is the JavaScript window ID of the window to select + """ + self.do_command("openWindow", [url,windowID,]) + + + def select_window(self,windowID): + """ + Selects a popup window using a window locator; once a popup window has been selected, all + commands go to that window. To select the main window again, use null + as the target. + + + + + Window locators provide different ways of specifying the window object: + by title, by internal JavaScript "name," or by JavaScript variable. + + + * \ **title**\ =\ *My Special Window*: + Finds the window using the text that appears in the title bar. Be careful; + two windows can share the same title. If that happens, this locator will + just pick one. + + * \ **name**\ =\ *myWindow*: + Finds the window using its internal JavaScript "name" property. This is the second + parameter "windowName" passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag) + (which Selenium intercepts). + + * \ **var**\ =\ *variableName*: + Some pop-up windows are unnamed (anonymous), but are associated with a JavaScript variable name in the current + application window, e.g. "window.foo = window.open(url);". In those cases, you can open the window using + "var=foo". + + + + + If no window locator prefix is provided, we'll try to guess what you mean like this: + + 1.) if windowID is null, (or the string "null") then it is assumed the user is referring to the original window instantiated by the browser). + + 2.) if the value of the "windowID" parameter is a JavaScript variable name in the current application window, then it is assumed + that this variable contains the return value from a call to the JavaScript window.open() method. + + 3.) Otherwise, selenium looks in a hash it maintains that maps string names to window "names". + + 4.) If \ *that* fails, we'll try looping over all of the known windows to try to find the appropriate "title". + Since "title" is not necessarily unique, this may have unexpected behavior. + + If you're having trouble figuring out the name of a window that you want to manipulate, look at the Selenium log messages + which identify the names of windows created via window.open (and therefore intercepted by Selenium). You will see messages + like the following for each window as it is opened: + + ``debug: window.open call intercepted; window ID (which you can use with selectWindow()) is "myNewWindow"`` + + In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). + (This is bug SEL-339.) In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using + an empty (blank) url, like this: openWindow("", "myFunnyWindow"). + + + 'windowID' is the JavaScript window ID of the window to select + """ + self.do_command("selectWindow", [windowID,]) + + + def select_frame(self,locator): + """ + Selects a frame within the current window. (You may invoke this command + multiple times to select nested frames.) To select the parent frame, use + "relative=parent" as a locator; to select the top frame, use "relative=top". + You can also select a frame by its 0-based index number; select the first frame with + "index=0", or the third frame with "index=2". + + + You may also use a DOM expression to identify the frame you want directly, + like this: ``dom=frames["main"].frames["subframe"]`` + + + 'locator' is an element locator identifying a frame or iframe + """ + self.do_command("selectFrame", [locator,]) + + + def get_whether_this_frame_match_frame_expression(self,currentFrameString,target): + """ + Determine whether current/locator identify the frame containing this running code. + + + This is useful in proxy injection mode, where this code runs in every + browser frame and window, and sometimes the selenium server needs to identify + the "current" frame. In this case, when the test calls selectFrame, this + routine is called for each frame to figure out which one has been selected. + The selected frame will return true, while all others will return false. + + + 'currentFrameString' is starting frame + 'target' is new frame (which might be relative to the current one) + """ + return self.get_boolean("getWhetherThisFrameMatchFrameExpression", [currentFrameString,target,]) + + + def get_whether_this_window_match_window_expression(self,currentWindowString,target): + """ + Determine whether currentWindowString plus target identify the window containing this running code. + + + This is useful in proxy injection mode, where this code runs in every + browser frame and window, and sometimes the selenium server needs to identify + the "current" window. In this case, when the test calls selectWindow, this + routine is called for each window to figure out which one has been selected. + The selected window will return true, while all others will return false. + + + 'currentWindowString' is starting window + 'target' is new window (which might be relative to the current one, e.g., "_parent") + """ + return self.get_boolean("getWhetherThisWindowMatchWindowExpression", [currentWindowString,target,]) + + + def wait_for_pop_up(self,windowID,timeout): + """ + Waits for a popup window to appear and load up. + + 'windowID' is the JavaScript window "name" of the window that will appear (not the text of the title bar) + 'timeout' is a timeout in milliseconds, after which the action will return with an error + """ + self.do_command("waitForPopUp", [windowID,timeout,]) + + + def choose_cancel_on_next_confirmation(self): + """ + By default, Selenium's overridden window.confirm() function will + return true, as if the user had manually clicked OK; after running + this command, the next call to confirm() will return false, as if + the user had clicked Cancel. Selenium will then resume using the + default behavior for future confirmations, automatically returning + true (OK) unless/until you explicitly call this command for each + confirmation. + + """ + self.do_command("chooseCancelOnNextConfirmation", []) + + + def choose_ok_on_next_confirmation(self): + """ + Undo the effect of calling chooseCancelOnNextConfirmation. Note + that Selenium's overridden window.confirm() function will normally automatically + return true, as if the user had manually clicked OK, so you shouldn't + need to use this command unless for some reason you need to change + your mind prior to the next confirmation. After any confirmation, Selenium will resume using the + default behavior for future confirmations, automatically returning + true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each + confirmation. + + """ + self.do_command("chooseOkOnNextConfirmation", []) + + + def answer_on_next_prompt(self,answer): + """ + Instructs Selenium to return the specified answer string in response to + the next JavaScript prompt [window.prompt()]. + + 'answer' is the answer to give in response to the prompt pop-up + """ + self.do_command("answerOnNextPrompt", [answer,]) + + + def go_back(self): + """ + Simulates the user clicking the "back" button on their browser. + + """ + self.do_command("goBack", []) + + + def refresh(self): + """ + Simulates the user clicking the "Refresh" button on their browser. + + """ + self.do_command("refresh", []) + + + def close(self): + """ + Simulates the user clicking the "close" button in the titlebar of a popup + window or tab. + + """ + self.do_command("close", []) + + + def is_alert_present(self): + """ + Has an alert occurred? + + + + This function never throws an exception + + + + """ + return self.get_boolean("isAlertPresent", []) + + + def is_prompt_present(self): + """ + Has a prompt occurred? + + + + This function never throws an exception + + + + """ + return self.get_boolean("isPromptPresent", []) + + + def is_confirmation_present(self): + """ + Has confirm() been called? + + + + This function never throws an exception + + + + """ + return self.get_boolean("isConfirmationPresent", []) + + + def get_alert(self): + """ + Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts. + + + Getting an alert has the same effect as manually clicking OK. If an + alert is generated but you do not get/verify it, the next Selenium action + will fail. + + NOTE: under Selenium, JavaScript alerts will NOT pop up a visible alert + dialog. + + NOTE: Selenium does NOT support JavaScript alerts that are generated in a + page's onload() event handler. In this case a visible dialog WILL be + generated and Selenium will hang until someone manually clicks OK. + + + """ + return self.get_string("getAlert", []) + + + def get_confirmation(self): + """ + Retrieves the message of a JavaScript confirmation dialog generated during + the previous action. + + + + By default, the confirm function will return true, having the same effect + as manually clicking OK. This can be changed by prior execution of the + chooseCancelOnNextConfirmation command. If an confirmation is generated + but you do not get/verify it, the next Selenium action will fail. + + + + NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible + dialog. + + + + NOTE: Selenium does NOT support JavaScript confirmations that are + generated in a page's onload() event handler. In this case a visible + dialog WILL be generated and Selenium will hang until you manually click + OK. + + + + """ + return self.get_string("getConfirmation", []) + + + def get_prompt(self): + """ + Retrieves the message of a JavaScript question prompt dialog generated during + the previous action. + + + Successful handling of the prompt requires prior execution of the + answerOnNextPrompt command. If a prompt is generated but you + do not get/verify it, the next Selenium action will fail. + + NOTE: under Selenium, JavaScript prompts will NOT pop up a visible + dialog. + + NOTE: Selenium does NOT support JavaScript prompts that are generated in a + page's onload() event handler. In this case a visible dialog WILL be + generated and Selenium will hang until someone manually clicks OK. + + + """ + return self.get_string("getPrompt", []) + + + def get_location(self): + """ + Gets the absolute URL of the current page. + + """ + return self.get_string("getLocation", []) + + + def get_title(self): + """ + Gets the title of the current page. + + """ + return self.get_string("getTitle", []) + + + def get_body_text(self): + """ + Gets the entire text of the page. + + """ + return self.get_string("getBodyText", []) + + + def get_value(self,locator): + """ + Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter). + For checkbox/radio elements, the value will be "on" or "off" depending on + whether the element is checked or not. + + 'locator' is an element locator + """ + return self.get_string("getValue", [locator,]) + + + def get_text(self,locator): + """ + Gets the text of an element. This works for any element that contains + text. This command uses either the textContent (Mozilla-like browsers) or + the innerText (IE-like browsers) of the element, which is the rendered + text shown to the user. + + 'locator' is an element locator + """ + return self.get_string("getText", [locator,]) + + + def highlight(self,locator): + """ + Briefly changes the backgroundColor of the specified element yellow. Useful for debugging. + + 'locator' is an element locator + """ + self.do_command("highlight", [locator,]) + + + def get_eval(self,script): + """ + Gets the result of evaluating the specified JavaScript snippet. The snippet may + have multiple lines, but only the result of the last line will be returned. + + + Note that, by default, the snippet will run in the context of the "selenium" + object itself, so ``this`` will refer to the Selenium object. Use ``window`` to + refer to the window of your application, e.g. ``window.document.getElementById('foo')`` + + If you need to use + a locator to refer to a single element in your application page, you can + use ``this.browserbot.findElement("id=foo")`` where "id=foo" is your locator. + + + 'script' is the JavaScript snippet to run + """ + return self.get_string("getEval", [script,]) + + + def is_checked(self,locator): + """ + Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button. + + 'locator' is an element locator pointing to a checkbox or radio button + """ + return self.get_boolean("isChecked", [locator,]) + + + def get_table(self,tableCellAddress): + """ + Gets the text from a cell of a table. The cellAddress syntax + tableLocator.row.column, where row and column start at 0. + + 'tableCellAddress' is a cell address, e.g. "foo.1.4" + """ + return self.get_string("getTable", [tableCellAddress,]) + + + def get_selected_labels(self,selectLocator): + """ + Gets all option labels (visible text) for selected options in the specified select or multi-select element. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string_array("getSelectedLabels", [selectLocator,]) + + + def get_selected_label(self,selectLocator): + """ + Gets option label (visible text) for selected option in the specified select element. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string("getSelectedLabel", [selectLocator,]) + + + def get_selected_values(self,selectLocator): + """ + Gets all option values (value attributes) for selected options in the specified select or multi-select element. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string_array("getSelectedValues", [selectLocator,]) + + + def get_selected_value(self,selectLocator): + """ + Gets option value (value attribute) for selected option in the specified select element. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string("getSelectedValue", [selectLocator,]) + + + def get_selected_indexes(self,selectLocator): + """ + Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string_array("getSelectedIndexes", [selectLocator,]) + + + def get_selected_index(self,selectLocator): + """ + Gets option index (option number, starting at 0) for selected option in the specified select element. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string("getSelectedIndex", [selectLocator,]) + + + def get_selected_ids(self,selectLocator): + """ + Gets all option element IDs for selected options in the specified select or multi-select element. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string_array("getSelectedIds", [selectLocator,]) + + + def get_selected_id(self,selectLocator): + """ + Gets option element ID for selected option in the specified select element. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string("getSelectedId", [selectLocator,]) + + + def is_something_selected(self,selectLocator): + """ + Determines whether some option in a drop-down menu is selected. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_boolean("isSomethingSelected", [selectLocator,]) + + + def get_select_options(self,selectLocator): + """ + Gets all option labels in the specified select drop-down. + + 'selectLocator' is an element locator identifying a drop-down menu + """ + return self.get_string_array("getSelectOptions", [selectLocator,]) + + + def get_attribute(self,attributeLocator): + """ + Gets the value of an element attribute. The value of the attribute may + differ across browsers (this is the case for the "style" attribute, for + example). + + 'attributeLocator' is an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" + """ + return self.get_string("getAttribute", [attributeLocator,]) + + + def is_text_present(self,pattern): + """ + Verifies that the specified text pattern appears somewhere on the rendered page shown to the user. + + 'pattern' is a pattern to match with the text of the page + """ + return self.get_boolean("isTextPresent", [pattern,]) + + + def is_element_present(self,locator): + """ + Verifies that the specified element is somewhere on the page. + + 'locator' is an element locator + """ + return self.get_boolean("isElementPresent", [locator,]) + + + def is_visible(self,locator): + """ + Determines if the specified element is visible. An + element can be rendered invisible by setting the CSS "visibility" + property to "hidden", or the "display" property to "none", either for the + element itself or one if its ancestors. This method will fail if + the element is not present. + + 'locator' is an element locator + """ + return self.get_boolean("isVisible", [locator,]) + + + def is_editable(self,locator): + """ + Determines whether the specified input element is editable, ie hasn't been disabled. + This method will fail if the specified element isn't an input element. + + 'locator' is an element locator + """ + return self.get_boolean("isEditable", [locator,]) + + + def get_all_buttons(self): + """ + Returns the IDs of all buttons on the page. + + + If a given button has no ID, it will appear as "" in this array. + + + """ + return self.get_string_array("getAllButtons", []) + + + def get_all_links(self): + """ + Returns the IDs of all links on the page. + + + If a given link has no ID, it will appear as "" in this array. + + + """ + return self.get_string_array("getAllLinks", []) + + + def get_all_fields(self): + """ + Returns the IDs of all input fields on the page. + + + If a given field has no ID, it will appear as "" in this array. + + + """ + return self.get_string_array("getAllFields", []) + + + def get_attribute_from_all_windows(self,attributeName): + """ + Returns every instance of some attribute from all known windows. + + 'attributeName' is name of an attribute on the windows + """ + return self.get_string_array("getAttributeFromAllWindows", [attributeName,]) + + + def dragdrop(self,locator,movementsString): + """ + deprecated - use dragAndDrop instead + + 'locator' is an element locator + 'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" + """ + self.do_command("dragdrop", [locator,movementsString,]) + + + def set_mouse_speed(self,pixels): + """ + Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10). + + Setting this value to 0 means that we'll send a "mousemove" event to every single pixel + in between the start location and the end location; that can be very slow, and may + cause some browsers to force the JavaScript to timeout. + + If the mouse speed is greater than the distance between the two dragged objects, we'll + just send one "mousemove" at the start location and then one final one at the end location. + + + 'pixels' is the number of pixels between "mousemove" events + """ + self.do_command("setMouseSpeed", [pixels,]) + + + def get_mouse_speed(self): + """ + Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10). + + """ + return self.get_number("getMouseSpeed", []) + + + def drag_and_drop(self,locator,movementsString): + """ + Drags an element a certain distance and then drops it + + 'locator' is an element locator + 'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" + """ + self.do_command("dragAndDrop", [locator,movementsString,]) + + + def drag_and_drop_to_object(self,locatorOfObjectToBeDragged,locatorOfDragDestinationObject): + """ + Drags an element and drops it on another element + + 'locatorOfObjectToBeDragged' is an element to be dragged + 'locatorOfDragDestinationObject' is an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped + """ + self.do_command("dragAndDropToObject", [locatorOfObjectToBeDragged,locatorOfDragDestinationObject,]) + + + def window_focus(self): + """ + Gives focus to the currently selected window + + """ + self.do_command("windowFocus", []) + + + def window_maximize(self): + """ + Resize currently selected window to take up the entire screen + + """ + self.do_command("windowMaximize", []) + + + def get_all_window_ids(self): + """ + Returns the IDs of all windows that the browser knows about. + + """ + return self.get_string_array("getAllWindowIds", []) + + + def get_all_window_names(self): + """ + Returns the names of all windows that the browser knows about. + + """ + return self.get_string_array("getAllWindowNames", []) + + + def get_all_window_titles(self): + """ + Returns the titles of all windows that the browser knows about. + + """ + return self.get_string_array("getAllWindowTitles", []) + + + def get_html_source(self): + """ + Returns the entire HTML source between the opening and + closing "html" tags. + + """ + return self.get_string("getHtmlSource", []) + + + def set_cursor_position(self,locator,position): + """ + Moves the text cursor to the specified position in the given input element or textarea. + This method will fail if the specified element isn't an input element or textarea. + + 'locator' is an element locator pointing to an input element or textarea + 'position' is the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field. + """ + self.do_command("setCursorPosition", [locator,position,]) + + + def get_element_index(self,locator): + """ + Get the relative index of an element to its parent (starting from 0). The comment node and empty text node + will be ignored. + + 'locator' is an element locator pointing to an element + """ + return self.get_number("getElementIndex", [locator,]) + + + def is_ordered(self,locator1,locator2): + """ + Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will + not be considered ordered. + + 'locator1' is an element locator pointing to the first element + 'locator2' is an element locator pointing to the second element + """ + return self.get_boolean("isOrdered", [locator1,locator2,]) + + + def get_element_position_left(self,locator): + """ + Retrieves the horizontal position of an element + + 'locator' is an element locator pointing to an element OR an element itself + """ + return self.get_number("getElementPositionLeft", [locator,]) + + + def get_element_position_top(self,locator): + """ + Retrieves the vertical position of an element + + 'locator' is an element locator pointing to an element OR an element itself + """ + return self.get_number("getElementPositionTop", [locator,]) + + + def get_element_width(self,locator): + """ + Retrieves the width of an element + + 'locator' is an element locator pointing to an element + """ + return self.get_number("getElementWidth", [locator,]) + + + def get_element_height(self,locator): + """ + Retrieves the height of an element + + 'locator' is an element locator pointing to an element + """ + return self.get_number("getElementHeight", [locator,]) + + + def get_cursor_position(self,locator): + """ + Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers. + + + Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to + return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243. + + This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element. + + 'locator' is an element locator pointing to an input element or textarea + """ + return self.get_number("getCursorPosition", [locator,]) + + + def get_expression(self,expression): + """ + Returns the specified expression. + + + This is useful because of JavaScript preprocessing. + It is used to generate commands like assertExpression and waitForExpression. + + + 'expression' is the value to return + """ + return self.get_string("getExpression", [expression,]) + + + def get_xpath_count(self,xpath): + """ + Returns the number of nodes that match the specified xpath, eg. "//table" would give + the number of tables. + + 'xpath' is the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. + """ + return self.get_number("getXpathCount", [xpath,]) + + + def assign_id(self,locator,identifier): + """ + Temporarily sets the "id" attribute of the specified element, so you can locate it in the future + using its ID rather than a slow/complicated XPath. This ID will disappear once the page is + reloaded. + + 'locator' is an element locator pointing to an element + 'identifier' is a string to be used as the ID of the specified element + """ + self.do_command("assignId", [locator,identifier,]) + + + def allow_native_xpath(self,allow): + """ + Specifies whether Selenium should use the native in-browser implementation + of XPath (if any native version is available); if you pass "false" to + this function, we will always use our pure-JavaScript xpath library. + Using the pure-JS xpath library can improve the consistency of xpath + element locators between different browser vendors, but the pure-JS + version is much slower than the native implementations. + + 'allow' is boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath + """ + self.do_command("allowNativeXpath", [allow,]) + + + def ignore_attributes_without_value(self,ignore): + """ + Specifies whether Selenium will ignore xpath attributes that have no + value, i.e. are the empty string, when using the non-native xpath + evaluation engine. You'd want to do this for performance reasons in IE. + However, this could break certain xpaths, for example an xpath that looks + for an attribute whose value is NOT the empty string. + + The hope is that such xpaths are relatively rare, but the user should + have the option of using them. Note that this only influences xpath + evaluation when using the ajaxslt engine (i.e. not "javascript-xpath"). + + 'ignore' is boolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness. + """ + self.do_command("ignoreAttributesWithoutValue", [ignore,]) + + + def wait_for_condition(self,script,timeout): + """ + Runs the specified JavaScript snippet repeatedly until it evaluates to "true". + The snippet may have multiple lines, but only the result of the last line + will be considered. + + + Note that, by default, the snippet will be run in the runner's test window, not in the window + of your application. To get the window of your application, you can use + the JavaScript snippet ``selenium.browserbot.getCurrentWindow()``, and then + run your JavaScript in there + + + 'script' is the JavaScript snippet to run + 'timeout' is a timeout in milliseconds, after which this command will return with an error + """ + self.do_command("waitForCondition", [script,timeout,]) + + + def set_timeout(self,timeout): + """ + Specifies the amount of time that Selenium will wait for actions to complete. + + + Actions that require waiting include "open" and the "waitFor\*" actions. + + The default timeout is 30 seconds. + + 'timeout' is a timeout in milliseconds, after which the action will return with an error + """ + self.do_command("setTimeout", [timeout,]) + + + def wait_for_page_to_load(self,timeout): + """ + Waits for a new page to load. + + + You can use this command instead of the "AndWait" suffixes, "clickAndWait", "selectAndWait", "typeAndWait" etc. + (which are only available in the JS API). + + Selenium constantly keeps track of new pages loading, and sets a "newPageLoaded" + flag when it first notices a page load. Running any other Selenium command after + turns the flag to false. Hence, if you want to wait for a page to load, you must + wait immediately after a Selenium command that caused a page-load. + + + 'timeout' is a timeout in milliseconds, after which this command will return with an error + """ + self.do_command("waitForPageToLoad", [timeout,]) + + + def wait_for_frame_to_load(self,frameAddress,timeout): + """ + Waits for a new frame to load. + + + Selenium constantly keeps track of new pages and frames loading, + and sets a "newPageLoaded" flag when it first notices a page load. + + + See waitForPageToLoad for more information. + + 'frameAddress' is FrameAddress from the server side + 'timeout' is a timeout in milliseconds, after which this command will return with an error + """ + self.do_command("waitForFrameToLoad", [frameAddress,timeout,]) + + + def get_cookie(self): + """ + Return all cookies of the current page under test. + + """ + return self.get_string("getCookie", []) + + + def get_cookie_by_name(self,name): + """ + Returns the value of the cookie with the specified name, or throws an error if the cookie is not present. + + 'name' is the name of the cookie + """ + return self.get_string("getCookieByName", [name,]) + + + def is_cookie_present(self,name): + """ + Returns true if a cookie with the specified name is present, or false otherwise. + + 'name' is the name of the cookie + """ + return self.get_boolean("isCookiePresent", [name,]) + + + def create_cookie(self,nameValuePair,optionsString): + """ + Create a new cookie whose path and domain are same with those of current page + under test, unless you specified a path for this cookie explicitly. + + 'nameValuePair' is name and value of the cookie in a format "name=value" + 'optionsString' is options for the cookie. Currently supported options include 'path', 'max_age' and 'domain'. the optionsString's format is "path=/path/, max_age=60, domain=.foo.com". The order of options are irrelevant, the unit of the value of 'max_age' is second. Note that specifying a domain that isn't a subset of the current domain will usually fail. + """ + self.do_command("createCookie", [nameValuePair,optionsString,]) + + + def delete_cookie(self,name,optionsString): + """ + Delete a named cookie with specified path and domain. Be careful; to delete a cookie, you + need to delete it using the exact same path and domain that were used to create the cookie. + If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also + note that specifying a domain that isn't a subset of the current domain will usually fail. + + Since there's no way to discover at runtime the original path and domain of a given cookie, + we've added an option called 'recurse' to try all sub-domains of the current domain with + all paths that are a subset of the current path. Beware; this option can be slow. In + big-O notation, it operates in O(n\*m) time, where n is the number of dots in the domain + name and m is the number of slashes in the path. + + 'name' is the name of the cookie to be deleted + 'optionsString' is options for the cookie. Currently supported options include 'path', 'domain' and 'recurse.' The optionsString's format is "path=/path/, domain=.foo.com, recurse=true". The order of options are irrelevant. Note that specifying a domain that isn't a subset of the current domain will usually fail. + """ + self.do_command("deleteCookie", [name,optionsString,]) + + + def delete_all_visible_cookies(self): + """ + Calls deleteCookie with recurse=true on all cookies visible to the current page. + As noted on the documentation for deleteCookie, recurse=true can be much slower + than simply deleting the cookies using a known domain/path. + + """ + self.do_command("deleteAllVisibleCookies", []) + + + def set_browser_log_level(self,logLevel): + """ + Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded. + Valid logLevel strings are: "debug", "info", "warn", "error" or "off". + To see the browser logs, you need to + either show the log window in GUI mode, or enable browser-side logging in Selenium RC. + + 'logLevel' is one of the following: "debug", "info", "warn", "error" or "off" + """ + self.do_command("setBrowserLogLevel", [logLevel,]) + + + def run_script(self,script): + """ + Creates a new "script" tag in the body of the current test window, and + adds the specified text into the body of the command. Scripts run in + this way can often be debugged more easily than scripts executed using + Selenium's "getEval" command. Beware that JS exceptions thrown in these script + tags aren't managed by Selenium, so you should probably wrap your script + in try/catch blocks if there is any chance that the script will throw + an exception. + + 'script' is the JavaScript snippet to run + """ + self.do_command("runScript", [script,]) + + + def add_location_strategy(self,strategyName,functionDefinition): + """ + Defines a new function for Selenium to locate elements on the page. + For example, + if you define the strategy "foo", and someone runs click("foo=blah"), we'll + run your function, passing you the string "blah", and click on the element + that your function + returns, or throw an "Element not found" error if your function returns null. + + We'll pass three arguments to your function: + + * locator: the string the user passed in + * inWindow: the currently selected window + * inDocument: the currently selected document + + + The function must return null if the element can't be found. + + 'strategyName' is the name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation. + 'functionDefinition' is a string defining the body of a function in JavaScript. For example: ``return inDocument.getElementById(locator);`` + """ + self.do_command("addLocationStrategy", [strategyName,functionDefinition,]) + + + def capture_entire_page_screenshot(self,filename): + """ + Saves the entire contents of the current window canvas to a PNG file. + Currently this only works in Mozilla and when running in chrome mode. + Contrast this with the captureScreenshot command, which captures the + contents of the OS viewport (i.e. whatever is currently being displayed + on the monitor), and is implemented in the RC only. Implementation + mostly borrowed from the Screengrab! Firefox extension. Please see + http://www.screengrab.org for details. + + 'filename' is the path to the file to persist the screenshot as. No filename extension will be appended by default. Directories will not be created if they do not exist, and an exception will be thrown, possibly by native code. + """ + self.do_command("captureEntirePageScreenshot", [filename,]) + + + def set_context(self,context): + """ + Writes a message to the status bar and adds a note to the browser-side + log. + + 'context' is the message to be sent to the browser + """ + self.do_command("setContext", [context,]) + + + def attach_file(self,fieldLocator,fileLocator): + """ + Sets a file input (upload) field to the file listed in fileLocator + + 'fieldLocator' is an element locator + 'fileLocator' is a URL pointing to the specified file. Before the file can be set in the input field (fieldLocator), Selenium RC may need to transfer the file to the local machine before attaching the file in a web page form. This is common in selenium grid configurations where the RC server driving the browser is not the same machine that started the test. Supported Browsers: Firefox ("\*chrome") only. + """ + self.do_command("attachFile", [fieldLocator,fileLocator,]) + + + def capture_screenshot(self,filename): + """ + Captures a PNG screenshot to the specified file. + + 'filename' is the absolute path to the file to be written, e.g. "c:\blah\screenshot.png" + """ + self.do_command("captureScreenshot", [filename,]) + + + def shut_down_selenium_server(self): + """ + Kills the running Selenium Server and all browser sessions. After you run this command, you will no longer be able to send + commands to the server; you can't remotely start the server once it has been stopped. Normally + you should prefer to run the "stop" command, which terminates the current browser session, rather than + shutting down the entire server. + + """ + self.do_command("shutDownSeleniumServer", []) + + + def key_down_native(self,keycode): + """ + Simulates a user pressing a key (without releasing it yet) by sending a native operating system keystroke. + This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing + a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and + metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular + element, focus on the element first before running this command. + + 'keycode' is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! + """ + self.do_command("keyDownNative", [keycode,]) + + + def key_up_native(self,keycode): + """ + Simulates a user releasing a key by sending a native operating system keystroke. + This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing + a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and + metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular + element, focus on the element first before running this command. + + 'keycode' is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! + """ + self.do_command("keyUpNative", [keycode,]) + + + def key_press_native(self,keycode): + """ + Simulates a user pressing and releasing a key by sending a native operating system keystroke. + This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing + a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and + metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular + element, focus on the element first before running this command. + + 'keycode' is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! + """ + self.do_command("keyPressNative", [keycode,]) + diff --git a/openlayers/tests/selenium/remotecontrol/setup.txt b/openlayers/tests/selenium/remotecontrol/setup.txt new file mode 100644 index 0000000000..d349491ad9 --- /dev/null +++ b/openlayers/tests/selenium/remotecontrol/setup.txt @@ -0,0 +1,8 @@ + * Install selenium remote control from the latest snapshot: + + http://nexus.openqa.org/content/repositories/snapshots/org/seleniumhq/selenium/selenium-remote-control/1.0-SNAPSHOT/ + + * Run the server with java -jar selenium-server.jar + * Run the python script + + diff --git a/openlayers/tests/selenium/remotecontrol/test_ol.py b/openlayers/tests/selenium/remotecontrol/test_ol.py new file mode 100644 index 0000000000..cb8ad9855f --- /dev/null +++ b/openlayers/tests/selenium/remotecontrol/test_ol.py @@ -0,0 +1,95 @@ +from selenium import selenium +import time +import sys +from ConfigParser import ConfigParser + +MAX_TEST_LENGTH = 300 +if len(sys.argv) > 2: + filename = sys.argv[2] +else: + filename = "config.cfg" + +c = ConfigParser() +c.read(filename) + +targets = {} + +server = c.get('config', 'server') +url= c.get('config', 'url') +if c.has_option('config', 'timeout'): + MAX_TEST_LENGTH = int(c.get('config', 'timeout')) + + +sections = c.sections() +for s in sections: + if s == 'config': + continue + targets[s] = dict(c.items(s)) + targets[s]['name'] = s + +if sys.argv[1] == "all": + browsers = list(targets.values()) +elif sys.argv[1] not in targets: + print "Invalid target" + sys.exit() +else: + browsers = [targets[sys.argv[1]]] + +keep_going = True + +if 1: + for b in browsers: + if not keep_going: + continue + + print "Running %s on %s" % (b['name'], b['host']) + s = selenium(b['host'], 4444, "*%s" % b['browsercmd'], server) + s.start() + try: + s.open_window(url, "test_running") + time.sleep(2) + s.select_window("test_running") + time.sleep(2) + s.refresh() + + count = 0 + while count == 0: + count = int(s.get_eval("window.document.getElementById('testtable').getElementsByTagName('tr').length")) + time.sleep(5) + + ok = 0 + fail = 0 + last_change = time.time() + while True: + new_ok = int(s.get_eval('window.Test.AnotherWay._g_ok_pages')) + new_fail = int(s.get_eval('window.Test.AnotherWay._g_fail_pages')) + if new_ok != ok or new_fail != fail: + ok = new_ok + fail = new_fail + last_change = time.time() + + if (ok + fail) >= count: + break + if time.time() - last_change > MAX_TEST_LENGTH: + raise Exception("Failed: with %s okay and %s failed, ran out of time: %s is more than %s" % (ok, fail, (time.time() - last_change), MAX_TEST_LENGTH)) + time.sleep(10) + + if fail: + print "Failed: %s" % fail + html = s.get_eval("window.document.getElementById('results').innerHTML").encode("utf-8") + all_html = """ + + + + %s""" % html + + f = open("fail.%s.%s.html" % (time.time(), b['name']), "w") + f.write(all_html) + f.close() + except KeyboardInterrupt, E: + keep_going = False + print "Stopped by keyboard interrupt" + except Exception, E: + print "Error: ", E + s.stop() + diff --git a/openlayers/tests/speed/geometry.html b/openlayers/tests/speed/geometry.html new file mode 100644 index 0000000000..bc2b488346 --- /dev/null +++ b/openlayers/tests/speed/geometry.html @@ -0,0 +1,43 @@ + + + + + +
    + diff --git a/openlayers/tests/speed/string_format.html b/openlayers/tests/speed/string_format.html new file mode 100644 index 0000000000..39146b7ed8 --- /dev/null +++ b/openlayers/tests/speed/string_format.html @@ -0,0 +1,29 @@ + + + + + + +Run +
    + + diff --git a/openlayers/tests/speed/vector-renderers.html b/openlayers/tests/speed/vector-renderers.html new file mode 100644 index 0000000000..4d88dfc009 --- /dev/null +++ b/openlayers/tests/speed/vector-renderers.html @@ -0,0 +1,25 @@ + + + + Vector Features Performance Test + + + + + +

    Vector Rendering Performance

    +
    +

    + This is a benchmark for vector rendering performance. Test results are + written to the debug console. + Select a renderer here: +
    + +

    + The benchmark shows the time needed to render the features, and how long a + move (drag or zoom) takes. Drag and zoom around to produce move results. +

    + + + + \ No newline at end of file diff --git a/openlayers/tests/speed/vector-renderers.js b/openlayers/tests/speed/vector-renderers.js new file mode 100644 index 0000000000..a11b36119e --- /dev/null +++ b/openlayers/tests/speed/vector-renderers.js @@ -0,0 +1,70 @@ +var map, vectorLayer, drawFeature, features + +map = new OpenLayers.Map('map', { + eventListeners: { + movestart: function() { + console.time("move"); + }, + moveend: function() { + console.timeEnd("move"); + } + } +}); + +// allow testing of specific renderers via "?renderer=Canvas", etc +var renderer = OpenLayers.Util.getParameters(window.location.href).renderer; +renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers; + +vectorLayer = new OpenLayers.Layer.Vector("Vector Layer", { + isBaseLayer: true, + renderers: renderer, + eventListeners: { + beforefeaturesadded: function() { + console.time("addFeatures"); + }, + featuresadded: function() { + console.timeEnd("addFeatures"); + } + } +}); + +map.addLayers([vectorLayer]); +map.addControl(new OpenLayers.Control.MousePosition()); +map.setCenter(new OpenLayers.LonLat(0, 0), 2); + +features = new Array(500); +var x, y, points +for (var i = 0; i < 500; i++) { + x = 90-Math.random()*180; + y = 45-Math.random()*90; + var pointList = []; + for(var p=0; p<19; ++p) { + var a = p * (2 * Math.PI) / 20; + var r = Math.random() * 3 + 1; + var newPoint = new OpenLayers.Geometry.Point(x + (r * Math.cos(a)), + y + (r * Math.sin(a))); + pointList.push(newPoint); + } + pointList.push(pointList[0]); + features[i] = new OpenLayers.Feature.Vector( + new OpenLayers.Geometry.LinearRing(pointList)); + +} +vectorLayer.addFeatures(features); + +var select = document.getElementById("renderers"); +var renderers = OpenLayers.Layer.Vector.prototype.renderers; +var option; +for (var i=0, len=renderers.length; i + + + +Run +
    + + diff --git a/openlayers/tests/speed/wmscaps.html b/openlayers/tests/speed/wmscaps.html new file mode 100644 index 0000000000..3cab5423a1 --- /dev/null +++ b/openlayers/tests/speed/wmscaps.html @@ -0,0 +1,52 @@ + + + WMS Capabilities Speed Test + + + + + + Run +
    + + diff --git a/openlayers/tests/speed/wmscaps.js b/openlayers/tests/speed/wmscaps.js new file mode 100644 index 0000000000..a186779de4 --- /dev/null +++ b/openlayers/tests/speed/wmscaps.js @@ -0,0 +1,4956 @@ +var caps = +'' + +'' + +'' + +' ' + +' OGC:WMS' + +' GeoServer Web Map Service' + +' A compliant implementation of WMS 1.1.1 plus most of the SLD 1.0 extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS' + +' ' + +' WFS' + +' WMS' + +' GEOSERVER' + +' ' + +' ' + +' ' + +' ' + +' Claudius Ptolomaeus' + +' The ancient geographes INC' + +' ' + +' Chief geographer' + +' ' + +' Work' + +'
    ' + +' Alexandria' + +' ' + +' ' + +' Egypt' + +' ' + +' ' + +' ' + +' claudius.ptolomaeus@gmail.com' + +' ' + +' NONE' + +' NONE' + +' ' + +' ' + +' ' + +' ' + +' application/vnd.ogc.wms_xml' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' image/png' + +' application/atom xml' + +' application/atom+xml' + +' application/openlayers' + +' application/pdf' + +' application/rss xml' + +' application/rss+xml' + +' application/vnd.google-earth.kml' + +' application/vnd.google-earth.kml xml' + +' application/vnd.google-earth.kml+xml' + +' application/vnd.google-earth.kmz' + +' application/vnd.google-earth.kmz xml' + +' application/vnd.google-earth.kmz+xml' + +' atom' + +' image/geotiff' + +' image/geotiff8' + +' image/gif' + +' image/jpeg' + +' image/png8' + +' image/svg' + +' image/svg xml' + +' image/svg+xml' + +' image/tiff' + +' image/tiff8' + +' kml' + +' kmz' + +' openlayers' + +' rss' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' text/plain' + +' text/html' + +' application/vnd.ogc.gml' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' application/vnd.ogc.wms_xml' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' image/png' + +' image/jpeg' + +' image/gif' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' application/vnd.ogc.se_xml' + +' ' + +' ' + +' ' + +' GeoServer Web Map Service' + +' A compliant implementation of WMS 1.1.1 plus most of the SLD 1.0 extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS' + +' ' + +' EPSG:WGS84(DD)' + +' EPSG:2000' + +' EPSG:2001' + +' EPSG:2002' + +' EPSG:2003' + +' EPSG:2004' + +' EPSG:2005' + +' EPSG:2006' + +' EPSG:2007' + +' EPSG:2008' + +' EPSG:2009' + +' EPSG:2010' + +' EPSG:2011' + +' EPSG:2012' + +' EPSG:2013' + +' EPSG:2014' + +' EPSG:2015' + +' EPSG:2016' + +' EPSG:2017' + +' EPSG:2018' + +' EPSG:2019' + +' EPSG:2020' + +' EPSG:2021' + +' EPSG:2022' + +' EPSG:2023' + +' EPSG:2024' + +' EPSG:2025' + +' EPSG:2026' + +' EPSG:2027' + +' EPSG:2028' + +' EPSG:2029' + +' EPSG:2030' + +' EPSG:2031' + +' EPSG:2032' + +' EPSG:2033' + +' EPSG:2034' + +' EPSG:2035' + +' EPSG:2036' + +' EPSG:2037' + +' EPSG:2038' + +' EPSG:2039' + +' EPSG:2040' + +' EPSG:2041' + +' EPSG:2042' + +' EPSG:2043' + +' EPSG:2044' + +' EPSG:2045' + +' EPSG:2046' + +' EPSG:2047' + +' EPSG:2048' + +' EPSG:2049' + +' EPSG:2050' + +' EPSG:2051' + +' EPSG:2052' + +' EPSG:2053' + +' EPSG:2054' + +' EPSG:2055' + +' EPSG:2056' + +' EPSG:2057' + +' EPSG:2058' + +' EPSG:2059' + +' EPSG:2060' + +' EPSG:2061' + +' EPSG:2062' + +' EPSG:2063' + +' EPSG:2064' + +' EPSG:2065' + +' EPSG:2066' + +' EPSG:2067' + +' EPSG:2068' + +' EPSG:2069' + +' EPSG:2070' + +' EPSG:2071' + +' EPSG:2072' + +' EPSG:2073' + +' EPSG:2074' + +' EPSG:2075' + +' EPSG:2076' + +' EPSG:2077' + +' EPSG:2078' + +' EPSG:2079' + +' EPSG:2080' + +' EPSG:2081' + +' EPSG:2082' + +' EPSG:2083' + +' EPSG:2084' + +' EPSG:2085' + +' EPSG:2086' + +' EPSG:2087' + +' EPSG:2088' + +' EPSG:2089' + +' EPSG:2090' + +' EPSG:2091' + +' EPSG:2092' + +' EPSG:2093' + +' EPSG:2094' + +' EPSG:2095' + +' EPSG:2096' + +' EPSG:2097' + +' EPSG:2098' + +' EPSG:2099' + +' EPSG:2100' + +' EPSG:2101' + +' EPSG:2102' + +' EPSG:2103' + +' EPSG:2104' + +' EPSG:2105' + +' EPSG:2106' + +' EPSG:2107' + +' EPSG:2108' + +' EPSG:2109' + +' EPSG:2110' + +' EPSG:2111' + +' EPSG:2112' + +' EPSG:2113' + +' EPSG:2114' + +' EPSG:2115' + +' EPSG:2116' + +' EPSG:2117' + +' EPSG:2118' + +' EPSG:2119' + +' EPSG:2120' + +' EPSG:2121' + +' EPSG:2122' + +' EPSG:2123' + +' EPSG:2124' + +' EPSG:2125' + +' EPSG:2126' + +' EPSG:2127' + +' EPSG:2128' + +' EPSG:2129' + +' EPSG:2130' + +' EPSG:2131' + +' EPSG:2132' + +' EPSG:2133' + +' EPSG:2134' + +' EPSG:2135' + +' EPSG:2136' + +' EPSG:2137' + +' EPSG:2138' + +' EPSG:2139' + +' EPSG:2140' + +' EPSG:2141' + +' EPSG:2142' + +' EPSG:2143' + +' EPSG:2144' + +' EPSG:2145' + +' EPSG:2146' + +' EPSG:2147' + +' EPSG:2148' + +' EPSG:2149' + +' EPSG:2150' + +' EPSG:2151' + +' EPSG:2152' + +' EPSG:2153' + +' EPSG:2154' + +' EPSG:2155' + +' EPSG:2156' + +' EPSG:2157' + +' EPSG:2158' + +' EPSG:2159' + +' EPSG:2160' + +' EPSG:2161' + +' EPSG:2162' + +' EPSG:2163' + +' EPSG:2164' + +' EPSG:2165' + +' EPSG:2166' + +' EPSG:2167' + +' EPSG:2168' + +' EPSG:2169' + +' EPSG:2170' + +' EPSG:2171' + +' EPSG:2172' + +' EPSG:2173' + +' EPSG:2174' + +' EPSG:2175' + +' EPSG:2176' + +' EPSG:2177' + +' EPSG:2178' + +' EPSG:2179' + +' EPSG:2180' + +' EPSG:2188' + +' EPSG:2189' + +' EPSG:2190' + +' EPSG:2191' + +' EPSG:2192' + +' EPSG:2193' + +' EPSG:2194' + +' EPSG:2195' + +' EPSG:2196' + +' EPSG:2197' + +' EPSG:2198' + +' EPSG:2199' + +' EPSG:2200' + +' EPSG:2201' + +' EPSG:2202' + +' EPSG:2203' + +' EPSG:2204' + +' EPSG:2205' + +' EPSG:2206' + +' EPSG:2207' + +' EPSG:2208' + +' EPSG:2209' + +' EPSG:2210' + +' EPSG:2211' + +' EPSG:2212' + +' EPSG:2213' + +' EPSG:2214' + +' EPSG:2215' + +' EPSG:2216' + +' EPSG:2217' + +' EPSG:2218' + +' EPSG:2219' + +' EPSG:2220' + +' EPSG:2221' + +' EPSG:2222' + +' EPSG:2223' + +' EPSG:2224' + +' EPSG:2225' + +' EPSG:2226' + +' EPSG:2227' + +' EPSG:2228' + +' EPSG:2229' + +' EPSG:2230' + +' EPSG:2231' + +' EPSG:2232' + +' EPSG:2233' + +' EPSG:2234' + +' EPSG:2235' + +' EPSG:2236' + +' EPSG:2237' + +' EPSG:2238' + +' EPSG:2239' + +' EPSG:2240' + +' EPSG:2241' + +' EPSG:2242' + +' EPSG:2243' + +' EPSG:2244' + +' EPSG:2245' + +' EPSG:2246' + +' EPSG:2247' + +' EPSG:2248' + +' EPSG:2249' + +' EPSG:2250' + +' EPSG:2251' + +' EPSG:2252' + +' EPSG:2253' + +' EPSG:2254' + +' EPSG:2255' + +' EPSG:2256' + +' EPSG:2257' + +' EPSG:2258' + +' EPSG:2259' + +' EPSG:2260' + +' EPSG:2261' + +' EPSG:2262' + +' EPSG:2263' + +' EPSG:2264' + +' EPSG:2265' + +' EPSG:2266' + +' EPSG:2267' + +' EPSG:2268' + +' EPSG:2269' + +' EPSG:2270' + +' EPSG:2271' + +' EPSG:2272' + +' EPSG:2273' + +' EPSG:2274' + +' EPSG:2275' + +' EPSG:2276' + +' EPSG:2277' + +' EPSG:2278' + +' EPSG:2279' + +' EPSG:2280' + +' EPSG:2281' + +' EPSG:2282' + +' EPSG:2283' + +' EPSG:2284' + +' EPSG:2285' + +' EPSG:2286' + +' EPSG:2287' + +' EPSG:2288' + +' EPSG:2289' + +' EPSG:2290' + +' EPSG:2291' + +' EPSG:2292' + +' EPSG:2294' + +' EPSG:2295' + +' EPSG:2296' + +' EPSG:2297' + +' EPSG:2298' + +' EPSG:2299' + +' EPSG:2300' + +' EPSG:2301' + +' EPSG:2302' + +' EPSG:2303' + +' EPSG:2304' + +' EPSG:2305' + +' EPSG:2306' + +' EPSG:2307' + +' EPSG:2308' + +' EPSG:2309' + +' EPSG:2310' + +' EPSG:2311' + +' EPSG:2312' + +' EPSG:2313' + +' EPSG:2314' + +' EPSG:2315' + +' EPSG:2316' + +' EPSG:2317' + +' EPSG:2318' + +' EPSG:2319' + +' EPSG:2320' + +' EPSG:2321' + +' EPSG:2322' + +' EPSG:2323' + +' EPSG:2324' + +' EPSG:2325' + +' EPSG:2326' + +' EPSG:2327' + +' EPSG:2328' + +' EPSG:2329' + +' EPSG:2330' + +' EPSG:2331' + +' EPSG:2332' + +' EPSG:2333' + +' EPSG:2334' + +' EPSG:2335' + +' EPSG:2336' + +' EPSG:2337' + +' EPSG:2338' + +' EPSG:2339' + +' EPSG:2340' + +' EPSG:2341' + +' EPSG:2342' + +' EPSG:2343' + +' EPSG:2344' + +' EPSG:2345' + +' EPSG:2346' + +' EPSG:2347' + +' EPSG:2348' + +' EPSG:2349' + +' EPSG:2350' + +' EPSG:2351' + +' EPSG:2352' + +' EPSG:2353' + +' EPSG:2354' + +' EPSG:2355' + +' EPSG:2356' + +' EPSG:2357' + +' EPSG:2358' + +' EPSG:2359' + +' EPSG:2360' + +' EPSG:2361' + +' EPSG:2362' + +' EPSG:2363' + +' EPSG:2364' + +' EPSG:2365' + +' EPSG:2366' + +' EPSG:2367' + +' EPSG:2368' + +' EPSG:2369' + +' EPSG:2370' + +' EPSG:2371' + +' EPSG:2372' + +' EPSG:2373' + +' EPSG:2374' + +' EPSG:2375' + +' EPSG:2376' + +' EPSG:2377' + +' EPSG:2378' + +' EPSG:2379' + +' EPSG:2380' + +' EPSG:2381' + +' EPSG:2382' + +' EPSG:2383' + +' EPSG:2384' + +' EPSG:2385' + +' EPSG:2386' + +' EPSG:2387' + +' EPSG:2388' + +' EPSG:2389' + +' EPSG:2390' + +' EPSG:2391' + +' EPSG:2392' + +' EPSG:2393' + +' EPSG:2394' + +' EPSG:2395' + +' EPSG:2396' + +' EPSG:2397' + +' EPSG:2398' + +' EPSG:2399' + +' EPSG:2400' + +' EPSG:2401' + +' EPSG:2402' + +' EPSG:2403' + +' EPSG:2404' + +' EPSG:2405' + +' EPSG:2406' + +' EPSG:2407' + +' EPSG:2408' + +' EPSG:2409' + +' EPSG:2410' + +' EPSG:2411' + +' EPSG:2412' + +' EPSG:2413' + +' EPSG:2414' + +' EPSG:2415' + +' EPSG:2416' + +' EPSG:2417' + +' EPSG:2418' + +' EPSG:2419' + +' EPSG:2420' + +' EPSG:2421' + +' EPSG:2422' + +' EPSG:2423' + +' EPSG:2424' + +' EPSG:2425' + +' EPSG:2426' + +' EPSG:2427' + +' EPSG:2428' + +' EPSG:2429' + +' EPSG:2430' + +' EPSG:2431' + +' EPSG:2432' + +' EPSG:2433' + +' EPSG:2434' + +' EPSG:2435' + +' EPSG:2436' + +' EPSG:2437' + +' EPSG:2438' + +' EPSG:2439' + +' EPSG:2440' + +' EPSG:2441' + +' EPSG:2442' + +' EPSG:2443' + +' EPSG:2444' + +' EPSG:2445' + +' EPSG:2446' + +' EPSG:2447' + +' EPSG:2448' + +' EPSG:2449' + +' EPSG:2450' + +' EPSG:2451' + +' EPSG:2452' + +' EPSG:2453' + +' EPSG:2454' + +' EPSG:2455' + +' EPSG:2456' + +' EPSG:2457' + +' EPSG:2458' + +' EPSG:2459' + +' EPSG:2460' + +' EPSG:2461' + +' EPSG:2462' + +' EPSG:2463' + +' EPSG:2464' + +' EPSG:2465' + +' EPSG:2466' + +' EPSG:2467' + +' EPSG:2468' + +' EPSG:2469' + +' EPSG:2470' + +' EPSG:2471' + +' EPSG:2472' + +' EPSG:2473' + +' EPSG:2474' + +' EPSG:2475' + +' EPSG:2476' + +' EPSG:2477' + +' EPSG:2478' + +' EPSG:2479' + +' EPSG:2480' + +' EPSG:2481' + +' EPSG:2482' + +' EPSG:2483' + +' EPSG:2484' + +' EPSG:2485' + +' EPSG:2486' + +' EPSG:2487' + +' EPSG:2488' + +' EPSG:2489' + +' EPSG:2490' + +' EPSG:2491' + +' EPSG:2492' + +' EPSG:2493' + +' EPSG:2494' + +' EPSG:2495' + +' EPSG:2496' + +' EPSG:2497' + +' EPSG:2498' + +' EPSG:2499' + +' EPSG:2500' + +' EPSG:2501' + +' EPSG:2502' + +' EPSG:2503' + +' EPSG:2504' + +' EPSG:2505' + +' EPSG:2506' + +' EPSG:2507' + +' EPSG:2508' + +' EPSG:2509' + +' EPSG:2510' + +' EPSG:2511' + +' EPSG:2512' + +' EPSG:2513' + +' EPSG:2514' + +' EPSG:2515' + +' EPSG:2516' + +' EPSG:2517' + +' EPSG:2518' + +' EPSG:2519' + +' EPSG:2520' + +' EPSG:2521' + +' EPSG:2522' + +' EPSG:2523' + +' EPSG:2524' + +' EPSG:2525' + +' EPSG:2526' + +' EPSG:2527' + +' EPSG:2528' + +' EPSG:2529' + +' EPSG:2530' + +' EPSG:2531' + +' EPSG:2532' + +' EPSG:2533' + +' EPSG:2534' + +' EPSG:2535' + +' EPSG:2536' + +' EPSG:2537' + +' EPSG:2538' + +' EPSG:2539' + +' EPSG:2540' + +' EPSG:2541' + +' EPSG:2542' + +' EPSG:2543' + +' EPSG:2544' + +' EPSG:2545' + +' EPSG:2546' + +' EPSG:2547' + +' EPSG:2548' + +' EPSG:2549' + +' EPSG:2550' + +' EPSG:2551' + +' EPSG:2552' + +' EPSG:2553' + +' EPSG:2554' + +' EPSG:2555' + +' EPSG:2556' + +' EPSG:2557' + +' EPSG:2558' + +' EPSG:2559' + +' EPSG:2560' + +' EPSG:2561' + +' EPSG:2562' + +' EPSG:2563' + +' EPSG:2564' + +' EPSG:2565' + +' EPSG:2566' + +' EPSG:2567' + +' EPSG:2568' + +' EPSG:2569' + +' EPSG:2570' + +' EPSG:2571' + +' EPSG:2572' + +' EPSG:2573' + +' EPSG:2574' + +' EPSG:2575' + +' EPSG:2576' + +' EPSG:2577' + +' EPSG:2578' + +' EPSG:2579' + +' EPSG:2580' + +' EPSG:2581' + +' EPSG:2582' + +' EPSG:2583' + +' EPSG:2584' + +' EPSG:2585' + +' EPSG:2586' + +' EPSG:2587' + +' EPSG:2588' + +' EPSG:2589' + +' EPSG:2590' + +' EPSG:2591' + +' EPSG:2592' + +' EPSG:2593' + +' EPSG:2594' + +' EPSG:2595' + +' EPSG:2596' + +' EPSG:2597' + +' EPSG:2598' + +' EPSG:2599' + +' EPSG:2600' + +' EPSG:2601' + +' EPSG:2602' + +' EPSG:2603' + +' EPSG:2604' + +' EPSG:2605' + +' EPSG:2606' + +' EPSG:2607' + +' EPSG:2608' + +' EPSG:2609' + +' EPSG:2610' + +' EPSG:2611' + +' EPSG:2612' + +' EPSG:2613' + +' EPSG:2614' + +' EPSG:2615' + +' EPSG:2616' + +' EPSG:2617' + +' EPSG:2618' + +' EPSG:2619' + +' EPSG:2620' + +' EPSG:2621' + +' EPSG:2622' + +' EPSG:2623' + +' EPSG:2624' + +' EPSG:2625' + +' EPSG:2626' + +' EPSG:2627' + +' EPSG:2628' + +' EPSG:2629' + +' EPSG:2630' + +' EPSG:2631' + +' EPSG:2632' + +' EPSG:2633' + +' EPSG:2634' + +' EPSG:2635' + +' EPSG:2636' + +' EPSG:2637' + +' EPSG:2638' + +' EPSG:2639' + +' EPSG:2640' + +' EPSG:2641' + +' EPSG:2642' + +' EPSG:2643' + +' EPSG:2644' + +' EPSG:2645' + +' EPSG:2646' + +' EPSG:2647' + +' EPSG:2648' + +' EPSG:2649' + +' EPSG:2650' + +' EPSG:2651' + +' EPSG:2652' + +' EPSG:2653' + +' EPSG:2654' + +' EPSG:2655' + +' EPSG:2656' + +' EPSG:2657' + +' EPSG:2658' + +' EPSG:2659' + +' EPSG:2660' + +' EPSG:2661' + +' EPSG:2662' + +' EPSG:2663' + +' EPSG:2664' + +' EPSG:2665' + +' EPSG:2666' + +' EPSG:2667' + +' EPSG:2668' + +' EPSG:2669' + +' EPSG:2670' + +' EPSG:2671' + +' EPSG:2672' + +' EPSG:2673' + +' EPSG:2674' + +' EPSG:2675' + +' EPSG:2676' + +' EPSG:2677' + +' EPSG:2678' + +' EPSG:2679' + +' EPSG:2680' + +' EPSG:2681' + +' EPSG:2682' + +' EPSG:2683' + +' EPSG:2684' + +' EPSG:2685' + +' EPSG:2686' + +' EPSG:2687' + +' EPSG:2688' + +' EPSG:2689' + +' EPSG:2690' + +' EPSG:2691' + +' EPSG:2692' + +' EPSG:2693' + +' EPSG:2694' + +' EPSG:2695' + +' EPSG:2696' + +' EPSG:2697' + +' EPSG:2698' + +' EPSG:2699' + +' EPSG:2700' + +' EPSG:2701' + +' EPSG:2702' + +' EPSG:2703' + +' EPSG:2704' + +' EPSG:2705' + +' EPSG:2706' + +' EPSG:2707' + +' EPSG:2708' + +' EPSG:2709' + +' EPSG:2710' + +' EPSG:2711' + +' EPSG:2712' + +' EPSG:2713' + +' EPSG:2714' + +' EPSG:2715' + +' EPSG:2716' + +' EPSG:2717' + +' EPSG:2718' + +' EPSG:2719' + +' EPSG:2720' + +' EPSG:2721' + +' EPSG:2722' + +' EPSG:2723' + +' EPSG:2724' + +' EPSG:2725' + +' EPSG:2726' + +' EPSG:2727' + +' EPSG:2728' + +' EPSG:2729' + +' EPSG:2730' + +' EPSG:2731' + +' EPSG:2732' + +' EPSG:2733' + +' EPSG:2734' + +' EPSG:2735' + +' EPSG:2736' + +' EPSG:2737' + +' EPSG:2738' + +' EPSG:2739' + +' EPSG:2740' + +' EPSG:2741' + +' EPSG:2742' + +' EPSG:2743' + +' EPSG:2744' + +' EPSG:2745' + +' EPSG:2746' + +' EPSG:2747' + +' EPSG:2748' + +' EPSG:2749' + +' EPSG:2750' + +' EPSG:2751' + +' EPSG:2752' + +' EPSG:2753' + +' EPSG:2754' + +' EPSG:2755' + +' EPSG:2756' + +' EPSG:2757' + +' EPSG:2758' + +' EPSG:2759' + +' EPSG:2760' + +' EPSG:2761' + +' EPSG:2762' + +' EPSG:2763' + +' EPSG:2764' + +' EPSG:2765' + +' EPSG:2766' + +' EPSG:2767' + +' EPSG:2768' + +' EPSG:2769' + +' EPSG:2770' + +' EPSG:2771' + +' EPSG:2772' + +' EPSG:2773' + +' EPSG:2774' + +' EPSG:2775' + +' EPSG:2776' + +' EPSG:2777' + +' EPSG:2778' + +' EPSG:2779' + +' EPSG:2780' + +' EPSG:2781' + +' EPSG:2782' + +' EPSG:2783' + +' EPSG:2784' + +' EPSG:2785' + +' EPSG:2786' + +' EPSG:2787' + +' EPSG:2788' + +' EPSG:2789' + +' EPSG:2790' + +' EPSG:2791' + +' EPSG:2792' + +' EPSG:2793' + +' EPSG:2794' + +' EPSG:2795' + +' EPSG:2796' + +' EPSG:2797' + +' EPSG:2798' + +' EPSG:2799' + +' EPSG:2800' + +' EPSG:2801' + +' EPSG:2802' + +' EPSG:2803' + +' EPSG:2804' + +' EPSG:2805' + +' EPSG:2806' + +' EPSG:2807' + +' EPSG:2808' + +' EPSG:2809' + +' EPSG:2810' + +' EPSG:2811' + +' EPSG:2812' + +' EPSG:2813' + +' EPSG:2814' + +' EPSG:2815' + +' EPSG:2816' + +' EPSG:2817' + +' EPSG:2818' + +' EPSG:2819' + +' EPSG:2820' + +' EPSG:2821' + +' EPSG:2822' + +' EPSG:2823' + +' EPSG:2824' + +' EPSG:2825' + +' EPSG:2826' + +' EPSG:2827' + +' EPSG:2828' + +' EPSG:2829' + +' EPSG:2830' + +' EPSG:2831' + +' EPSG:2832' + +' EPSG:2833' + +' EPSG:2834' + +' EPSG:2835' + +' EPSG:2836' + +' EPSG:2837' + +' EPSG:2838' + +' EPSG:2839' + +' EPSG:2840' + +' EPSG:2841' + +' EPSG:2842' + +' EPSG:2843' + +' EPSG:2844' + +' EPSG:2845' + +' EPSG:2846' + +' EPSG:2847' + +' EPSG:2848' + +' EPSG:2849' + +' EPSG:2850' + +' EPSG:2851' + +' EPSG:2852' + +' EPSG:2853' + +' EPSG:2854' + +' EPSG:2855' + +' EPSG:2856' + +' EPSG:2857' + +' EPSG:2858' + +' EPSG:2859' + +' EPSG:2860' + +' EPSG:2861' + +' EPSG:2862' + +' EPSG:2863' + +' EPSG:2864' + +' EPSG:2865' + +' EPSG:2866' + +' EPSG:2867' + +' EPSG:2868' + +' EPSG:2869' + +' EPSG:2870' + +' EPSG:2871' + +' EPSG:2872' + +' EPSG:2873' + +' EPSG:2874' + +' EPSG:2875' + +' EPSG:2876' + +' EPSG:2877' + +' EPSG:2878' + +' EPSG:2879' + +' EPSG:2880' + +' EPSG:2881' + +' EPSG:2882' + +' EPSG:2883' + +' EPSG:2884' + +' EPSG:2885' + +' EPSG:2886' + +' EPSG:2887' + +' EPSG:2888' + +' EPSG:2889' + +' EPSG:2890' + +' EPSG:2891' + +' EPSG:2892' + +' EPSG:2893' + +' EPSG:2894' + +' EPSG:2895' + +' EPSG:2896' + +' EPSG:2897' + +' EPSG:2898' + +' EPSG:2899' + +' EPSG:2900' + +' EPSG:2901' + +' EPSG:2902' + +' EPSG:2903' + +' EPSG:2904' + +' EPSG:2905' + +' EPSG:2906' + +' EPSG:2907' + +' EPSG:2908' + +' EPSG:2909' + +' EPSG:2910' + +' EPSG:2911' + +' EPSG:2912' + +' EPSG:2913' + +' EPSG:2914' + +' EPSG:2915' + +' EPSG:2916' + +' EPSG:2917' + +' EPSG:2918' + +' EPSG:2919' + +' EPSG:2920' + +' EPSG:2921' + +' EPSG:2922' + +' EPSG:2923' + +' EPSG:2924' + +' EPSG:2925' + +' EPSG:2926' + +' EPSG:2927' + +' EPSG:2928' + +' EPSG:2929' + +' EPSG:2930' + +' EPSG:2931' + +' EPSG:2932' + +' EPSG:2933' + +' EPSG:2934' + +' EPSG:2935' + +' EPSG:2936' + +' EPSG:2937' + +' EPSG:2938' + +' EPSG:2939' + +' EPSG:2940' + +' EPSG:2941' + +' EPSG:2942' + +' EPSG:2943' + +' EPSG:2944' + +' EPSG:2945' + +' EPSG:2946' + +' EPSG:2947' + +' EPSG:2948' + +' EPSG:2949' + +' EPSG:2950' + +' EPSG:2951' + +' EPSG:2952' + +' EPSG:2953' + +' EPSG:2954' + +' EPSG:2955' + +' EPSG:2956' + +' EPSG:2957' + +' EPSG:2958' + +' EPSG:2959' + +' EPSG:2960' + +' EPSG:2961' + +' EPSG:2962' + +' EPSG:2963' + +' EPSG:2964' + +' EPSG:2965' + +' EPSG:2966' + +' EPSG:2967' + +' EPSG:2968' + +' EPSG:2969' + +' EPSG:2970' + +' EPSG:2971' + +' EPSG:2972' + +' EPSG:2973' + +' EPSG:2975' + +' EPSG:2976' + +' EPSG:2977' + +' EPSG:2978' + +' EPSG:2979' + +' EPSG:2980' + +' EPSG:2981' + +' EPSG:2982' + +' EPSG:2983' + +' EPSG:2984' + +' EPSG:2985' + +' EPSG:2986' + +' EPSG:2987' + +' EPSG:2988' + +' EPSG:2989' + +' EPSG:2990' + +' EPSG:2991' + +' EPSG:2992' + +' EPSG:2993' + +' EPSG:2994' + +' EPSG:2995' + +' EPSG:2996' + +' EPSG:2997' + +' EPSG:2998' + +' EPSG:2999' + +' EPSG:3000' + +' EPSG:3001' + +' EPSG:3002' + +' EPSG:3003' + +' EPSG:3004' + +' EPSG:3005' + +' EPSG:3006' + +' EPSG:3007' + +' EPSG:3008' + +' EPSG:3009' + +' EPSG:3010' + +' EPSG:3011' + +' EPSG:3012' + +' EPSG:3013' + +' EPSG:3014' + +' EPSG:3015' + +' EPSG:3016' + +' EPSG:3017' + +' EPSG:3018' + +' EPSG:3019' + +' EPSG:3020' + +' EPSG:3021' + +' EPSG:3022' + +' EPSG:3023' + +' EPSG:3024' + +' EPSG:3025' + +' EPSG:3026' + +' EPSG:3027' + +' EPSG:3028' + +' EPSG:3029' + +' EPSG:3030' + +' EPSG:3031' + +' EPSG:3032' + +' EPSG:3033' + +' EPSG:3034' + +' EPSG:3035' + +' EPSG:3036' + +' EPSG:3037' + +' EPSG:3038' + +' EPSG:3039' + +' EPSG:3040' + +' EPSG:3041' + +' EPSG:3042' + +' EPSG:3043' + +' EPSG:3044' + +' EPSG:3045' + +' EPSG:3046' + +' EPSG:3047' + +' EPSG:3048' + +' EPSG:3049' + +' EPSG:3050' + +' EPSG:3051' + +' EPSG:3052' + +' EPSG:3053' + +' EPSG:3054' + +' EPSG:3055' + +' EPSG:3056' + +' EPSG:3057' + +' EPSG:3058' + +' EPSG:3059' + +' EPSG:3060' + +' EPSG:3061' + +' EPSG:3062' + +' EPSG:3063' + +' EPSG:3064' + +' EPSG:3065' + +' EPSG:3066' + +' EPSG:3067' + +' EPSG:3068' + +' EPSG:3069' + +' EPSG:3070' + +' EPSG:3071' + +' EPSG:3072' + +' EPSG:3073' + +' EPSG:3074' + +' EPSG:3075' + +' EPSG:3076' + +' EPSG:3077' + +' EPSG:3078' + +' EPSG:3079' + +' EPSG:3080' + +' EPSG:3081' + +' EPSG:3082' + +' EPSG:3083' + +' EPSG:3084' + +' EPSG:3085' + +' EPSG:3086' + +' EPSG:3087' + +' EPSG:3088' + +' EPSG:3089' + +' EPSG:3090' + +' EPSG:3091' + +' EPSG:3092' + +' EPSG:3093' + +' EPSG:3094' + +' EPSG:3095' + +' EPSG:3096' + +' EPSG:3097' + +' EPSG:3098' + +' EPSG:3099' + +' EPSG:3100' + +' EPSG:3101' + +' EPSG:3102' + +' EPSG:3103' + +' EPSG:3104' + +' EPSG:3105' + +' EPSG:3106' + +' EPSG:3107' + +' EPSG:3108' + +' EPSG:3109' + +' EPSG:3110' + +' EPSG:3111' + +' EPSG:3112' + +' EPSG:3113' + +' EPSG:3114' + +' EPSG:3115' + +' EPSG:3116' + +' EPSG:3117' + +' EPSG:3118' + +' EPSG:3119' + +' EPSG:3120' + +' EPSG:3121' + +' EPSG:3122' + +' EPSG:3123' + +' EPSG:3124' + +' EPSG:3125' + +' EPSG:3126' + +' EPSG:3127' + +' EPSG:3128' + +' EPSG:3129' + +' EPSG:3130' + +' EPSG:3131' + +' EPSG:3132' + +' EPSG:3133' + +' EPSG:3134' + +' EPSG:3135' + +' EPSG:3136' + +' EPSG:3137' + +' EPSG:3138' + +' EPSG:3139' + +' EPSG:3140' + +' EPSG:3141' + +' EPSG:3142' + +' EPSG:3143' + +' EPSG:3144' + +' EPSG:3145' + +' EPSG:3146' + +' EPSG:3147' + +' EPSG:3148' + +' EPSG:3149' + +' EPSG:3150' + +' EPSG:3151' + +' EPSG:3152' + +' EPSG:3153' + +' EPSG:3154' + +' EPSG:3155' + +' EPSG:3156' + +' EPSG:3157' + +' EPSG:3158' + +' EPSG:3159' + +' EPSG:3160' + +' EPSG:3161' + +' EPSG:3162' + +' EPSG:3163' + +' EPSG:3164' + +' EPSG:3165' + +' EPSG:3166' + +' EPSG:3167' + +' EPSG:3168' + +' EPSG:3169' + +' EPSG:3170' + +' EPSG:3171' + +' EPSG:3172' + +' EPSG:3173' + +' EPSG:3174' + +' EPSG:3175' + +' EPSG:3176' + +' EPSG:3177' + +' EPSG:3178' + +' EPSG:3179' + +' EPSG:3180' + +' EPSG:3181' + +' EPSG:3182' + +' EPSG:3183' + +' EPSG:3184' + +' EPSG:3185' + +' EPSG:3186' + +' EPSG:3187' + +' EPSG:3188' + +' EPSG:3189' + +' EPSG:3190' + +' EPSG:3191' + +' EPSG:3192' + +' EPSG:3193' + +' EPSG:3194' + +' EPSG:3195' + +' EPSG:3196' + +' EPSG:3197' + +' EPSG:3198' + +' EPSG:3199' + +' EPSG:3200' + +' EPSG:3201' + +' EPSG:3202' + +' EPSG:3203' + +' EPSG:3204' + +' EPSG:3205' + +' EPSG:3206' + +' EPSG:3207' + +' EPSG:3208' + +' EPSG:3209' + +' EPSG:3210' + +' EPSG:3211' + +' EPSG:3212' + +' EPSG:3213' + +' EPSG:3214' + +' EPSG:3215' + +' EPSG:3216' + +' EPSG:3217' + +' EPSG:3218' + +' EPSG:3219' + +' EPSG:3220' + +' EPSG:3221' + +' EPSG:3222' + +' EPSG:3223' + +' EPSG:3224' + +' EPSG:3225' + +' EPSG:3226' + +' EPSG:3227' + +' EPSG:3228' + +' EPSG:3229' + +' EPSG:3230' + +' EPSG:3231' + +' EPSG:3232' + +' EPSG:3233' + +' EPSG:3234' + +' EPSG:3235' + +' EPSG:3236' + +' EPSG:3237' + +' EPSG:3238' + +' EPSG:3239' + +' EPSG:3240' + +' EPSG:3241' + +' EPSG:3242' + +' EPSG:3243' + +' EPSG:3244' + +' EPSG:3245' + +' EPSG:3246' + +' EPSG:3247' + +' EPSG:3248' + +' EPSG:3249' + +' EPSG:3250' + +' EPSG:3251' + +' EPSG:3252' + +' EPSG:3253' + +' EPSG:3254' + +' EPSG:3255' + +' EPSG:3256' + +' EPSG:3257' + +' EPSG:3258' + +' EPSG:3259' + +' EPSG:3260' + +' EPSG:3261' + +' EPSG:3262' + +' EPSG:3263' + +' EPSG:3264' + +' EPSG:3265' + +' EPSG:3266' + +' EPSG:3267' + +' EPSG:3268' + +' EPSG:3269' + +' EPSG:3270' + +' EPSG:3271' + +' EPSG:3272' + +' EPSG:3273' + +' EPSG:3274' + +' EPSG:3275' + +' EPSG:3276' + +' EPSG:3277' + +' EPSG:3278' + +' EPSG:3279' + +' EPSG:3280' + +' EPSG:3281' + +' EPSG:3282' + +' EPSG:3283' + +' EPSG:3284' + +' EPSG:3285' + +' EPSG:3286' + +' EPSG:3287' + +' EPSG:3288' + +' EPSG:3289' + +' EPSG:3290' + +' EPSG:3291' + +' EPSG:3292' + +' EPSG:3293' + +' EPSG:3294' + +' EPSG:3295' + +' EPSG:3296' + +' EPSG:3297' + +' EPSG:3298' + +' EPSG:3299' + +' EPSG:3300' + +' EPSG:3301' + +' EPSG:3302' + +' EPSG:3303' + +' EPSG:3304' + +' EPSG:3305' + +' EPSG:3306' + +' EPSG:3307' + +' EPSG:3308' + +' EPSG:3309' + +' EPSG:3310' + +' EPSG:3311' + +' EPSG:3312' + +' EPSG:3313' + +' EPSG:3314' + +' EPSG:3315' + +' EPSG:3316' + +' EPSG:3317' + +' EPSG:3318' + +' EPSG:3319' + +' EPSG:3320' + +' EPSG:3321' + +' EPSG:3322' + +' EPSG:3323' + +' EPSG:3324' + +' EPSG:3325' + +' EPSG:3326' + +' EPSG:3327' + +' EPSG:3328' + +' EPSG:3329' + +' EPSG:3330' + +' EPSG:3331' + +' EPSG:3332' + +' EPSG:3333' + +' EPSG:3334' + +' EPSG:3335' + +' EPSG:3336' + +' EPSG:3337' + +' EPSG:3338' + +' EPSG:3339' + +' EPSG:3340' + +' EPSG:3341' + +' EPSG:3342' + +' EPSG:3343' + +' EPSG:3344' + +' EPSG:3345' + +' EPSG:3346' + +' EPSG:3347' + +' EPSG:3348' + +' EPSG:3349' + +' EPSG:3350' + +' EPSG:3351' + +' EPSG:3352' + +' EPSG:3353' + +' EPSG:3354' + +' EPSG:3355' + +' EPSG:3356' + +' EPSG:3357' + +' EPSG:3358' + +' EPSG:3359' + +' EPSG:3360' + +' EPSG:3361' + +' EPSG:3362' + +' EPSG:3363' + +' EPSG:3364' + +' EPSG:3365' + +' EPSG:3366' + +' EPSG:3367' + +' EPSG:3368' + +' EPSG:3369' + +' EPSG:3370' + +' EPSG:3371' + +' EPSG:3372' + +' EPSG:3373' + +' EPSG:3374' + +' EPSG:3375' + +' EPSG:3376' + +' EPSG:3377' + +' EPSG:3378' + +' EPSG:3379' + +' EPSG:3380' + +' EPSG:3381' + +' EPSG:3382' + +' EPSG:3383' + +' EPSG:3384' + +' EPSG:3385' + +' EPSG:3386' + +' EPSG:3387' + +' EPSG:3388' + +' EPSG:3389' + +' EPSG:3390' + +' EPSG:3391' + +' EPSG:3392' + +' EPSG:3393' + +' EPSG:3394' + +' EPSG:3395' + +' EPSG:3396' + +' EPSG:3397' + +' EPSG:3398' + +' EPSG:3399' + +' EPSG:3400' + +' EPSG:3401' + +' EPSG:3402' + +' EPSG:3403' + +' EPSG:3404' + +' EPSG:3405' + +' EPSG:3406' + +' EPSG:3407' + +' EPSG:3408' + +' EPSG:3409' + +' EPSG:3410' + +' EPSG:3411' + +' EPSG:3412' + +' EPSG:3413' + +' EPSG:3414' + +' EPSG:3415' + +' EPSG:3416' + +' EPSG:3417' + +' EPSG:3418' + +' EPSG:3419' + +' EPSG:3420' + +' EPSG:3421' + +' EPSG:3422' + +' EPSG:3423' + +' EPSG:3424' + +' EPSG:3425' + +' EPSG:3426' + +' EPSG:3427' + +' EPSG:3428' + +' EPSG:3429' + +' EPSG:3430' + +' EPSG:3431' + +' EPSG:3432' + +' EPSG:3433' + +' EPSG:3434' + +' EPSG:3435' + +' EPSG:3436' + +' EPSG:3437' + +' EPSG:3438' + +' EPSG:3439' + +' EPSG:3440' + +' EPSG:3441' + +' EPSG:3442' + +' EPSG:3443' + +' EPSG:3444' + +' EPSG:3445' + +' EPSG:3446' + +' EPSG:3447' + +' EPSG:3448' + +' EPSG:3449' + +' EPSG:3450' + +' EPSG:3451' + +' EPSG:3452' + +' EPSG:3453' + +' EPSG:3454' + +' EPSG:3455' + +' EPSG:3456' + +' EPSG:3457' + +' EPSG:3458' + +' EPSG:3459' + +' EPSG:3460' + +' EPSG:3461' + +' EPSG:3462' + +' EPSG:3463' + +' EPSG:3464' + +' EPSG:3560' + +' EPSG:3561' + +' EPSG:3562' + +' EPSG:3563' + +' EPSG:3564' + +' EPSG:3565' + +' EPSG:3566' + +' EPSG:3567' + +' EPSG:3568' + +' EPSG:3569' + +' EPSG:3570' + +' EPSG:3571' + +' EPSG:3572' + +' EPSG:3573' + +' EPSG:3574' + +' EPSG:3575' + +' EPSG:3576' + +' EPSG:3577' + +' EPSG:3920' + +' EPSG:3991' + +' EPSG:3992' + +' EPSG:3993' + +' EPSG:4001' + +' EPSG:4002' + +' EPSG:4003' + +' EPSG:4004' + +' EPSG:4005' + +' EPSG:4006' + +' EPSG:4007' + +' EPSG:4008' + +' EPSG:4009' + +' EPSG:4010' + +' EPSG:4011' + +' EPSG:4012' + +' EPSG:4013' + +' EPSG:4014' + +' EPSG:4015' + +' EPSG:4016' + +' EPSG:4018' + +' EPSG:4019' + +' EPSG:4020' + +' EPSG:4021' + +' EPSG:4022' + +' EPSG:4024' + +' EPSG:4025' + +' EPSG:4027' + +' EPSG:4028' + +' EPSG:4029' + +' EPSG:4030' + +' EPSG:4031' + +' EPSG:4032' + +' EPSG:4033' + +' EPSG:4034' + +' EPSG:4035' + +' EPSG:4036' + +' EPSG:4041' + +' EPSG:4042' + +' EPSG:4043' + +' EPSG:4044' + +' EPSG:4045' + +' EPSG:4047' + +' EPSG:4052' + +' EPSG:4053' + +' EPSG:4054' + +' EPSG:4120' + +' EPSG:4121' + +' EPSG:4122' + +' EPSG:4123' + +' EPSG:4124' + +' EPSG:4125' + +' EPSG:4126' + +' EPSG:4127' + +' EPSG:4128' + +' EPSG:4129' + +' EPSG:4130' + +' EPSG:4131' + +' EPSG:4132' + +' EPSG:4133' + +' EPSG:4134' + +' EPSG:4135' + +' EPSG:4136' + +' EPSG:4137' + +' EPSG:4138' + +' EPSG:4139' + +' EPSG:4140' + +' EPSG:4141' + +' EPSG:4142' + +' EPSG:4143' + +' EPSG:4144' + +' EPSG:4145' + +' EPSG:4146' + +' EPSG:4147' + +' EPSG:4148' + +' EPSG:4149' + +' EPSG:4150' + +' EPSG:4151' + +' EPSG:4152' + +' EPSG:4153' + +' EPSG:4154' + +' EPSG:4155' + +' EPSG:4156' + +' EPSG:4157' + +' EPSG:4158' + +' EPSG:4159' + +' EPSG:4160' + +' EPSG:4161' + +' EPSG:4162' + +' EPSG:4163' + +' EPSG:4164' + +' EPSG:4165' + +' EPSG:4166' + +' EPSG:4167' + +' EPSG:4168' + +' EPSG:4169' + +' EPSG:4170' + +' EPSG:4171' + +' EPSG:4172' + +' EPSG:4173' + +' EPSG:4174' + +' EPSG:4175' + +' EPSG:4176' + +' EPSG:4178' + +' EPSG:4179' + +' EPSG:4180' + +' EPSG:4181' + +' EPSG:4182' + +' EPSG:4183' + +' EPSG:4184' + +' EPSG:4185' + +' EPSG:4188' + +' EPSG:4189' + +' EPSG:4190' + +' EPSG:4191' + +' EPSG:4192' + +' EPSG:4193' + +' EPSG:4194' + +' EPSG:4195' + +' EPSG:4196' + +' EPSG:4197' + +' EPSG:4198' + +' EPSG:4199' + +' EPSG:4200' + +' EPSG:4201' + +' EPSG:4202' + +' EPSG:4203' + +' EPSG:4204' + +' EPSG:4205' + +' EPSG:4206' + +' EPSG:4207' + +' EPSG:4208' + +' EPSG:4209' + +' EPSG:4210' + +' EPSG:4211' + +' EPSG:4212' + +' EPSG:4213' + +' EPSG:4214' + +' EPSG:4215' + +' EPSG:4216' + +' EPSG:4218' + +' EPSG:4219' + +' EPSG:4220' + +' EPSG:4221' + +' EPSG:4222' + +' EPSG:4223' + +' EPSG:4224' + +' EPSG:4225' + +' EPSG:4226' + +' EPSG:4227' + +' EPSG:4228' + +' EPSG:4229' + +' EPSG:4230' + +' EPSG:4231' + +' EPSG:4232' + +' EPSG:4233' + +' EPSG:4234' + +' EPSG:4235' + +' EPSG:4236' + +' EPSG:4237' + +' EPSG:4238' + +' EPSG:4239' + +' EPSG:4240' + +' EPSG:4241' + +' EPSG:4242' + +' EPSG:4243' + +' EPSG:4244' + +' EPSG:4245' + +' EPSG:4246' + +' EPSG:4247' + +' EPSG:4248' + +' EPSG:4249' + +' EPSG:4250' + +' EPSG:4251' + +' EPSG:4252' + +' EPSG:4253' + +' EPSG:4254' + +' EPSG:4255' + +' EPSG:4256' + +' EPSG:4257' + +' EPSG:4258' + +' EPSG:4259' + +' EPSG:4260' + +' EPSG:4261' + +' EPSG:4262' + +' EPSG:4263' + +' EPSG:4264' + +' EPSG:4265' + +' EPSG:4266' + +' EPSG:4267' + +' EPSG:4268' + +' EPSG:4269' + +' EPSG:4270' + +' EPSG:4271' + +' EPSG:4272' + +' EPSG:4273' + +' EPSG:4274' + +' EPSG:4275' + +' EPSG:4276' + +' EPSG:4277' + +' EPSG:4278' + +' EPSG:4279' + +' EPSG:4280' + +' EPSG:4281' + +' EPSG:4282' + +' EPSG:4283' + +' EPSG:4284' + +' EPSG:4285' + +' EPSG:4286' + +' EPSG:4287' + +' EPSG:4288' + +' EPSG:4289' + +' EPSG:4291' + +' EPSG:4292' + +' EPSG:4293' + +' EPSG:4294' + +' EPSG:4295' + +' EPSG:4296' + +' EPSG:4297' + +' EPSG:4298' + +' EPSG:4299' + +' EPSG:4300' + +' EPSG:4301' + +' EPSG:4302' + +' EPSG:4303' + +' EPSG:4304' + +' EPSG:4306' + +' EPSG:4307' + +' EPSG:4308' + +' EPSG:4309' + +' EPSG:4310' + +' EPSG:4311' + +' EPSG:4312' + +' EPSG:4313' + +' EPSG:4314' + +' EPSG:4315' + +' EPSG:4316' + +' EPSG:4317' + +' EPSG:4318' + +' EPSG:4319' + +' EPSG:4322' + +' EPSG:4324' + +' EPSG:4326' + +' EPSG:4327' + +' EPSG:4328' + +' EPSG:4329' + +' EPSG:4330' + +' EPSG:4331' + +' EPSG:4332' + +' EPSG:4333' + +' EPSG:4334' + +' EPSG:4335' + +' EPSG:4336' + +' EPSG:4337' + +' EPSG:4338' + +' EPSG:4339' + +' EPSG:4340' + +' EPSG:4341' + +' EPSG:4342' + +' EPSG:4343' + +' EPSG:4344' + +' EPSG:4345' + +' EPSG:4346' + +' EPSG:4347' + +' EPSG:4348' + +' EPSG:4349' + +' EPSG:4350' + +' EPSG:4351' + +' EPSG:4352' + +' EPSG:4353' + +' EPSG:4354' + +' EPSG:4355' + +' EPSG:4356' + +' EPSG:4357' + +' EPSG:4358' + +' EPSG:4359' + +' EPSG:4360' + +' EPSG:4361' + +' EPSG:4362' + +' EPSG:4363' + +' EPSG:4364' + +' EPSG:4365' + +' EPSG:4366' + +' EPSG:4367' + +' EPSG:4368' + +' EPSG:4369' + +' EPSG:4370' + +' EPSG:4371' + +' EPSG:4372' + +' EPSG:4373' + +' EPSG:4374' + +' EPSG:4375' + +' EPSG:4376' + +' EPSG:4377' + +' EPSG:4378' + +' EPSG:4379' + +' EPSG:4380' + +' EPSG:4381' + +' EPSG:4382' + +' EPSG:4383' + +' EPSG:4384' + +' EPSG:4385' + +' EPSG:4386' + +' EPSG:4387' + +' EPSG:4388' + +' EPSG:4389' + +' EPSG:4600' + +' EPSG:4601' + +' EPSG:4602' + +' EPSG:4603' + +' EPSG:4604' + +' EPSG:4605' + +' EPSG:4606' + +' EPSG:4607' + +' EPSG:4608' + +' EPSG:4609' + +' EPSG:4610' + +' EPSG:4611' + +' EPSG:4612' + +' EPSG:4613' + +' EPSG:4614' + +' EPSG:4615' + +' EPSG:4616' + +' EPSG:4617' + +' EPSG:4618' + +' EPSG:4619' + +' EPSG:4620' + +' EPSG:4621' + +' EPSG:4622' + +' EPSG:4623' + +' EPSG:4624' + +' EPSG:4625' + +' EPSG:4626' + +' EPSG:4627' + +' EPSG:4628' + +' EPSG:4629' + +' EPSG:4630' + +' EPSG:4631' + +' EPSG:4632' + +' EPSG:4633' + +' EPSG:4634' + +' EPSG:4635' + +' EPSG:4636' + +' EPSG:4637' + +' EPSG:4638' + +' EPSG:4639' + +' EPSG:4640' + +' EPSG:4641' + +' EPSG:4642' + +' EPSG:4643' + +' EPSG:4644' + +' EPSG:4645' + +' EPSG:4646' + +' EPSG:4657' + +' EPSG:4658' + +' EPSG:4659' + +' EPSG:4660' + +' EPSG:4661' + +' EPSG:4662' + +' EPSG:4663' + +' EPSG:4664' + +' EPSG:4665' + +' EPSG:4666' + +' EPSG:4667' + +' EPSG:4668' + +' EPSG:4669' + +' EPSG:4670' + +' EPSG:4671' + +' EPSG:4672' + +' EPSG:4673' + +' EPSG:4674' + +' EPSG:4675' + +' EPSG:4676' + +' EPSG:4677' + +' EPSG:4678' + +' EPSG:4679' + +' EPSG:4680' + +' EPSG:4681' + +' EPSG:4682' + +' EPSG:4683' + +' EPSG:4684' + +' EPSG:4685' + +' EPSG:4686' + +' EPSG:4687' + +' EPSG:4688' + +' EPSG:4689' + +' EPSG:4690' + +' EPSG:4691' + +' EPSG:4692' + +' EPSG:4693' + +' EPSG:4694' + +' EPSG:4695' + +' EPSG:4696' + +' EPSG:4697' + +' EPSG:4698' + +' EPSG:4699' + +' EPSG:4700' + +' EPSG:4701' + +' EPSG:4702' + +' EPSG:4703' + +' EPSG:4704' + +' EPSG:4705' + +' EPSG:4706' + +' EPSG:4707' + +' EPSG:4708' + +' EPSG:4709' + +' EPSG:4710' + +' EPSG:4711' + +' EPSG:4712' + +' EPSG:4713' + +' EPSG:4714' + +' EPSG:4715' + +' EPSG:4716' + +' EPSG:4717' + +' EPSG:4718' + +' EPSG:4719' + +' EPSG:4720' + +' EPSG:4721' + +' EPSG:4722' + +' EPSG:4723' + +' EPSG:4724' + +' EPSG:4725' + +' EPSG:4726' + +' EPSG:4727' + +' EPSG:4728' + +' EPSG:4729' + +' EPSG:4730' + +' EPSG:4731' + +' EPSG:4732' + +' EPSG:4733' + +' EPSG:4734' + +' EPSG:4735' + +' EPSG:4736' + +' EPSG:4737' + +' EPSG:4738' + +' EPSG:4739' + +' EPSG:4740' + +' EPSG:4741' + +' EPSG:4742' + +' EPSG:4743' + +' EPSG:4744' + +' EPSG:4745' + +' EPSG:4746' + +' EPSG:4747' + +' EPSG:4748' + +' EPSG:4749' + +' EPSG:4750' + +' EPSG:4751' + +' EPSG:4752' + +' EPSG:4753' + +' EPSG:4754' + +' EPSG:4755' + +' EPSG:4756' + +' EPSG:4757' + +' EPSG:4758' + +' EPSG:4801' + +' EPSG:4802' + +' EPSG:4803' + +' EPSG:4804' + +' EPSG:4805' + +' EPSG:4806' + +' EPSG:4807' + +' EPSG:4808' + +' EPSG:4809' + +' EPSG:4810' + +' EPSG:4811' + +' EPSG:4813' + +' EPSG:4814' + +' EPSG:4815' + +' EPSG:4816' + +' EPSG:4817' + +' EPSG:4818' + +' EPSG:4819' + +' EPSG:4820' + +' EPSG:4821' + +' EPSG:4894' + +' EPSG:4895' + +' EPSG:4896' + +' EPSG:4897' + +' EPSG:4898' + +' EPSG:4899' + +' EPSG:4900' + +' EPSG:4901' + +' EPSG:4902' + +' EPSG:4903' + +' EPSG:4904' + +' EPSG:4906' + +' EPSG:4907' + +' EPSG:4908' + +' EPSG:4909' + +' EPSG:4910' + +' EPSG:4911' + +' EPSG:4912' + +' EPSG:4913' + +' EPSG:4914' + +' EPSG:4915' + +' EPSG:4916' + +' EPSG:4917' + +' EPSG:4918' + +' EPSG:4919' + +' EPSG:4920' + +' EPSG:4921' + +' EPSG:4922' + +' EPSG:4923' + +' EPSG:4924' + +' EPSG:4925' + +' EPSG:4926' + +' EPSG:4927' + +' EPSG:4928' + +' EPSG:4929' + +' EPSG:4930' + +' EPSG:4931' + +' EPSG:4932' + +' EPSG:4933' + +' EPSG:4934' + +' EPSG:4935' + +' EPSG:4936' + +' EPSG:4937' + +' EPSG:4938' + +' EPSG:4939' + +' EPSG:4940' + +' EPSG:4941' + +' EPSG:4942' + +' EPSG:4943' + +' EPSG:4944' + +' EPSG:4945' + +' EPSG:4946' + +' EPSG:4947' + +' EPSG:4948' + +' EPSG:4949' + +' EPSG:4950' + +' EPSG:4951' + +' EPSG:4952' + +' EPSG:4953' + +' EPSG:4954' + +' EPSG:4955' + +' EPSG:4956' + +' EPSG:4957' + +' EPSG:4958' + +' EPSG:4959' + +' EPSG:4960' + +' EPSG:4961' + +' EPSG:4962' + +' EPSG:4963' + +' EPSG:4964' + +' EPSG:4965' + +' EPSG:4966' + +' EPSG:4967' + +' EPSG:4968' + +' EPSG:4969' + +' EPSG:4970' + +' EPSG:4971' + +' EPSG:4972' + +' EPSG:4973' + +' EPSG:4974' + +' EPSG:4975' + +' EPSG:4976' + +' EPSG:4977' + +' EPSG:4978' + +' EPSG:4979' + +' EPSG:4980' + +' EPSG:4981' + +' EPSG:4982' + +' EPSG:4983' + +' EPSG:4984' + +' EPSG:4985' + +' EPSG:4986' + +' EPSG:4987' + +' EPSG:4988' + +' EPSG:4989' + +' EPSG:4990' + +' EPSG:4991' + +' EPSG:4992' + +' EPSG:4993' + +' EPSG:4994' + +' EPSG:4995' + +' EPSG:4996' + +' EPSG:4997' + +' EPSG:4998' + +' EPSG:4999' + +' EPSG:5600' + +' EPSG:5601' + +' EPSG:5602' + +' EPSG:5603' + +' EPSG:5604' + +' EPSG:5605' + +' EPSG:5606' + +' EPSG:5607' + +' EPSG:5608' + +' EPSG:5609' + +' EPSG:5701' + +' EPSG:5702' + +' EPSG:5703' + +' EPSG:5704' + +' EPSG:5705' + +' EPSG:5706' + +' EPSG:5709' + +' EPSG:5710' + +' EPSG:5711' + +' EPSG:5712' + +' EPSG:5713' + +' EPSG:5714' + +' EPSG:5715' + +' EPSG:5716' + +' EPSG:5717' + +' EPSG:5718' + +' EPSG:5719' + +' EPSG:5720' + +' EPSG:5721' + +' EPSG:5722' + +' EPSG:5723' + +' EPSG:5724' + +' EPSG:5725' + +' EPSG:5726' + +' EPSG:5727' + +' EPSG:5728' + +' EPSG:5729' + +' EPSG:5730' + +' EPSG:5731' + +' EPSG:5732' + +' EPSG:5733' + +' EPSG:5734' + +' EPSG:5735' + +' EPSG:5736' + +' EPSG:5737' + +' EPSG:5738' + +' EPSG:5739' + +' EPSG:5740' + +' EPSG:5741' + +' EPSG:5742' + +' EPSG:5743' + +' EPSG:5744' + +' EPSG:5745' + +' EPSG:5746' + +' EPSG:5747' + +' EPSG:5748' + +' EPSG:5749' + +' EPSG:5750' + +' EPSG:5751' + +' EPSG:5752' + +' EPSG:5753' + +' EPSG:5754' + +' EPSG:5755' + +' EPSG:5756' + +' EPSG:5757' + +' EPSG:5758' + +' EPSG:5759' + +' EPSG:5760' + +' EPSG:5761' + +' EPSG:5762' + +' EPSG:5763' + +' EPSG:5764' + +' EPSG:5765' + +' EPSG:5766' + +' EPSG:5767' + +' EPSG:5768' + +' EPSG:5769' + +' EPSG:5770' + +' EPSG:5771' + +' EPSG:5772' + +' EPSG:5773' + +' EPSG:5774' + +' EPSG:5775' + +' EPSG:5776' + +' EPSG:5777' + +' EPSG:5778' + +' EPSG:5779' + +' EPSG:5780' + +' EPSG:5781' + +' EPSG:5782' + +' EPSG:5783' + +' EPSG:5784' + +' EPSG:5785' + +' EPSG:5786' + +' EPSG:5787' + +' EPSG:5788' + +' EPSG:5789' + +' EPSG:5790' + +' EPSG:5791' + +' EPSG:5792' + +' EPSG:5793' + +' EPSG:5794' + +' EPSG:5795' + +' EPSG:5796' + +' EPSG:5797' + +' EPSG:5798' + +' EPSG:5799' + +' EPSG:5800' + +' EPSG:5801' + +' EPSG:5802' + +' EPSG:5803' + +' EPSG:5804' + +' EPSG:5805' + +' EPSG:5806' + +' EPSG:5807' + +' EPSG:5808' + +' EPSG:5809' + +' EPSG:5810' + +' EPSG:5811' + +' EPSG:5812' + +' EPSG:5813' + +' EPSG:5814' + +' EPSG:5815' + +' EPSG:5816' + +' EPSG:5817' + +' EPSG:5818' + +' EPSG:7400' + +' EPSG:7401' + +' EPSG:7402' + +' EPSG:7403' + +' EPSG:7404' + +' EPSG:7405' + +' EPSG:7406' + +' EPSG:7407' + +' EPSG:7408' + +' EPSG:7409' + +' EPSG:7410' + +' EPSG:7411' + +' EPSG:7412' + +' EPSG:7413' + +' EPSG:7414' + +' EPSG:7415' + +' EPSG:7416' + +' EPSG:7417' + +' EPSG:7418' + +' EPSG:7419' + +' EPSG:7420' + +' EPSG:20004' + +' EPSG:20005' + +' EPSG:20006' + +' EPSG:20007' + +' EPSG:20008' + +' EPSG:20009' + +' EPSG:20010' + +' EPSG:20011' + +' EPSG:20012' + +' EPSG:20013' + +' EPSG:20014' + +' EPSG:20015' + +' EPSG:20016' + +' EPSG:20017' + +' EPSG:20018' + +' EPSG:20019' + +' EPSG:20020' + +' EPSG:20021' + +' EPSG:20022' + +' EPSG:20023' + +' EPSG:20024' + +' EPSG:20025' + +' EPSG:20026' + +' EPSG:20027' + +' EPSG:20028' + +' EPSG:20029' + +' EPSG:20030' + +' EPSG:20031' + +' EPSG:20032' + +' EPSG:20064' + +' EPSG:20065' + +' EPSG:20066' + +' EPSG:20067' + +' EPSG:20068' + +' EPSG:20069' + +' EPSG:20070' + +' EPSG:20071' + +' EPSG:20072' + +' EPSG:20073' + +' EPSG:20074' + +' EPSG:20075' + +' EPSG:20076' + +' EPSG:20077' + +' EPSG:20078' + +' EPSG:20079' + +' EPSG:20080' + +' EPSG:20081' + +' EPSG:20082' + +' EPSG:20083' + +' EPSG:20084' + +' EPSG:20085' + +' EPSG:20086' + +' EPSG:20087' + +' EPSG:20088' + +' EPSG:20089' + +' EPSG:20090' + +' EPSG:20091' + +' EPSG:20092' + +' EPSG:20135' + +' EPSG:20136' + +' EPSG:20137' + +' EPSG:20138' + +' EPSG:20248' + +' EPSG:20249' + +' EPSG:20250' + +' EPSG:20251' + +' EPSG:20252' + +' EPSG:20253' + +' EPSG:20254' + +' EPSG:20255' + +' EPSG:20256' + +' EPSG:20257' + +' EPSG:20258' + +' EPSG:20348' + +' EPSG:20349' + +' EPSG:20350' + +' EPSG:20351' + +' EPSG:20352' + +' EPSG:20353' + +' EPSG:20354' + +' EPSG:20355' + +' EPSG:20356' + +' EPSG:20357' + +' EPSG:20358' + +' EPSG:20436' + +' EPSG:20437' + +' EPSG:20438' + +' EPSG:20439' + +' EPSG:20440' + +' EPSG:20499' + +' EPSG:20538' + +' EPSG:20539' + +' EPSG:20790' + +' EPSG:20791' + +' EPSG:20822' + +' EPSG:20823' + +' EPSG:20824' + +' EPSG:20934' + +' EPSG:20935' + +' EPSG:20936' + +' EPSG:21035' + +' EPSG:21036' + +' EPSG:21037' + +' EPSG:21095' + +' EPSG:21096' + +' EPSG:21097' + +' EPSG:21100' + +' EPSG:21148' + +' EPSG:21149' + +' EPSG:21150' + +' EPSG:21291' + +' EPSG:21292' + +' EPSG:21413' + +' EPSG:21414' + +' EPSG:21415' + +' EPSG:21416' + +' EPSG:21417' + +' EPSG:21418' + +' EPSG:21419' + +' EPSG:21420' + +' EPSG:21421' + +' EPSG:21422' + +' EPSG:21423' + +' EPSG:21453' + +' EPSG:21454' + +' EPSG:21455' + +' EPSG:21456' + +' EPSG:21457' + +' EPSG:21458' + +' EPSG:21459' + +' EPSG:21460' + +' EPSG:21461' + +' EPSG:21462' + +' EPSG:21463' + +' EPSG:21473' + +' EPSG:21474' + +' EPSG:21475' + +' EPSG:21476' + +' EPSG:21477' + +' EPSG:21478' + +' EPSG:21479' + +' EPSG:21480' + +' EPSG:21481' + +' EPSG:21482' + +' EPSG:21483' + +' EPSG:21500' + +' EPSG:21780' + +' EPSG:21781' + +' EPSG:21817' + +' EPSG:21818' + +' EPSG:21891' + +' EPSG:21892' + +' EPSG:21893' + +' EPSG:21894' + +' EPSG:21896' + +' EPSG:21897' + +' EPSG:21898' + +' EPSG:21899' + +' EPSG:22032' + +' EPSG:22033' + +' EPSG:22091' + +' EPSG:22092' + +' EPSG:22171' + +' EPSG:22172' + +' EPSG:22173' + +' EPSG:22174' + +' EPSG:22175' + +' EPSG:22176' + +' EPSG:22177' + +' EPSG:22181' + +' EPSG:22182' + +' EPSG:22183' + +' EPSG:22184' + +' EPSG:22185' + +' EPSG:22186' + +' EPSG:22187' + +' EPSG:22191' + +' EPSG:22192' + +' EPSG:22193' + +' EPSG:22194' + +' EPSG:22195' + +' EPSG:22196' + +' EPSG:22197' + +' EPSG:22234' + +' EPSG:22235' + +' EPSG:22236' + +' EPSG:22275' + +' EPSG:22277' + +' EPSG:22279' + +' EPSG:22281' + +' EPSG:22283' + +' EPSG:22285' + +' EPSG:22287' + +' EPSG:22289' + +' EPSG:22291' + +' EPSG:22293' + +' EPSG:22300' + +' EPSG:22332' + +' EPSG:22391' + +' EPSG:22392' + +' EPSG:22521' + +' EPSG:22522' + +' EPSG:22523' + +' EPSG:22524' + +' EPSG:22525' + +' EPSG:22700' + +' EPSG:22770' + +' EPSG:22780' + +' EPSG:22832' + +' EPSG:22991' + +' EPSG:22992' + +' EPSG:22993' + +' EPSG:22994' + +' EPSG:23028' + +' EPSG:23029' + +' EPSG:23030' + +' EPSG:23031' + +' EPSG:23032' + +' EPSG:23033' + +' EPSG:23034' + +' EPSG:23035' + +' EPSG:23036' + +' EPSG:23037' + +' EPSG:23038' + +' EPSG:23090' + +' EPSG:23095' + +' EPSG:23239' + +' EPSG:23240' + +' EPSG:23433' + +' EPSG:23700' + +' EPSG:23846' + +' EPSG:23847' + +' EPSG:23848' + +' EPSG:23849' + +' EPSG:23850' + +' EPSG:23851' + +' EPSG:23852' + +' EPSG:23853' + +' EPSG:23866' + +' EPSG:23867' + +' EPSG:23868' + +' EPSG:23869' + +' EPSG:23870' + +' EPSG:23871' + +' EPSG:23872' + +' EPSG:23877' + +' EPSG:23878' + +' EPSG:23879' + +' EPSG:23880' + +' EPSG:23881' + +' EPSG:23882' + +' EPSG:23883' + +' EPSG:23884' + +' EPSG:23886' + +' EPSG:23887' + +' EPSG:23888' + +' EPSG:23889' + +' EPSG:23890' + +' EPSG:23891' + +' EPSG:23892' + +' EPSG:23893' + +' EPSG:23894' + +' EPSG:23946' + +' EPSG:23947' + +' EPSG:23948' + +' EPSG:24047' + +' EPSG:24048' + +' EPSG:24100' + +' EPSG:24200' + +' EPSG:24305' + +' EPSG:24306' + +' EPSG:24311' + +' EPSG:24312' + +' EPSG:24313' + +' EPSG:24342' + +' EPSG:24343' + +' EPSG:24344' + +' EPSG:24345' + +' EPSG:24346' + +' EPSG:24347' + +' EPSG:24370' + +' EPSG:24371' + +' EPSG:24372' + +' EPSG:24373' + +' EPSG:24374' + +' EPSG:24375' + +' EPSG:24376' + +' EPSG:24377' + +' EPSG:24378' + +' EPSG:24379' + +' EPSG:24380' + +' EPSG:24381' + +' EPSG:24382' + +' EPSG:24383' + +' EPSG:24500' + +' EPSG:24547' + +' EPSG:24548' + +' EPSG:24571' + +' EPSG:24600' + +' EPSG:24718' + +' EPSG:24719' + +' EPSG:24720' + +' EPSG:24817' + +' EPSG:24818' + +' EPSG:24819' + +' EPSG:24820' + +' EPSG:24821' + +' EPSG:24877' + +' EPSG:24878' + +' EPSG:24879' + +' EPSG:24880' + +' EPSG:24881' + +' EPSG:24882' + +' EPSG:24891' + +' EPSG:24892' + +' EPSG:24893' + +' EPSG:25000' + +' EPSG:25231' + +' EPSG:25391' + +' EPSG:25392' + +' EPSG:25393' + +' EPSG:25394' + +' EPSG:25395' + +' EPSG:25700' + +' EPSG:25828' + +' EPSG:25829' + +' EPSG:25830' + +' EPSG:25831' + +' EPSG:25832' + +' EPSG:25833' + +' EPSG:25834' + +' EPSG:25835' + +' EPSG:25836' + +' EPSG:25837' + +' EPSG:25838' + +' EPSG:25884' + +' EPSG:25932' + +' EPSG:26191' + +' EPSG:26192' + +' EPSG:26193' + +' EPSG:26194' + +' EPSG:26195' + +' EPSG:26237' + +' EPSG:26331' + +' EPSG:26332' + +' EPSG:26391' + +' EPSG:26392' + +' EPSG:26393' + +' EPSG:26432' + +' EPSG:26591' + +' EPSG:26592' + +' EPSG:26632' + +' EPSG:26692' + +' EPSG:26701' + +' EPSG:26702' + +' EPSG:26703' + +' EPSG:26704' + +' EPSG:26705' + +' EPSG:26706' + +' EPSG:26707' + +' EPSG:26708' + +' EPSG:26709' + +' EPSG:26710' + +' EPSG:26711' + +' EPSG:26712' + +' EPSG:26713' + +' EPSG:26714' + +' EPSG:26715' + +' EPSG:26716' + +' EPSG:26717' + +' EPSG:26718' + +' EPSG:26719' + +' EPSG:26720' + +' EPSG:26721' + +' EPSG:26722' + +' EPSG:26729' + +' EPSG:26730' + +' EPSG:26731' + +' EPSG:26732' + +' EPSG:26733' + +' EPSG:26734' + +' EPSG:26735' + +' EPSG:26736' + +' EPSG:26737' + +' EPSG:26738' + +' EPSG:26739' + +' EPSG:26740' + +' EPSG:26741' + +' EPSG:26742' + +' EPSG:26743' + +' EPSG:26744' + +' EPSG:26745' + +' EPSG:26746' + +' EPSG:26747' + +' EPSG:26748' + +' EPSG:26749' + +' EPSG:26750' + +' EPSG:26751' + +' EPSG:26752' + +' EPSG:26753' + +' EPSG:26754' + +' EPSG:26755' + +' EPSG:26756' + +' EPSG:26757' + +' EPSG:26758' + +' EPSG:26759' + +' EPSG:26760' + +' EPSG:26766' + +' EPSG:26767' + +' EPSG:26768' + +' EPSG:26769' + +' EPSG:26770' + +' EPSG:26771' + +' EPSG:26772' + +' EPSG:26773' + +' EPSG:26774' + +' EPSG:26775' + +' EPSG:26776' + +' EPSG:26777' + +' EPSG:26778' + +' EPSG:26779' + +' EPSG:26780' + +' EPSG:26781' + +' EPSG:26782' + +' EPSG:26783' + +' EPSG:26784' + +' EPSG:26785' + +' EPSG:26786' + +' EPSG:26787' + +' EPSG:26791' + +' EPSG:26792' + +' EPSG:26793' + +' EPSG:26794' + +' EPSG:26795' + +' EPSG:26796' + +' EPSG:26797' + +' EPSG:26798' + +' EPSG:26799' + +' EPSG:26801' + +' EPSG:26802' + +' EPSG:26803' + +' EPSG:26811' + +' EPSG:26812' + +' EPSG:26813' + +' EPSG:26901' + +' EPSG:26902' + +' EPSG:26903' + +' EPSG:26904' + +' EPSG:26905' + +' EPSG:26906' + +' EPSG:26907' + +' EPSG:26908' + +' EPSG:26909' + +' EPSG:26910' + +' EPSG:26911' + +' EPSG:26912' + +' EPSG:26913' + +' EPSG:26914' + +' EPSG:26915' + +' EPSG:26916' + +' EPSG:26917' + +' EPSG:26918' + +' EPSG:26919' + +' EPSG:26920' + +' EPSG:26921' + +' EPSG:26922' + +' EPSG:26923' + +' EPSG:26929' + +' EPSG:26930' + +' EPSG:26931' + +' EPSG:26932' + +' EPSG:26933' + +' EPSG:26934' + +' EPSG:26935' + +' EPSG:26936' + +' EPSG:26937' + +' EPSG:26938' + +' EPSG:26939' + +' EPSG:26940' + +' EPSG:26941' + +' EPSG:26942' + +' EPSG:26943' + +' EPSG:26944' + +' EPSG:26945' + +' EPSG:26946' + +' EPSG:26948' + +' EPSG:26949' + +' EPSG:26950' + +' EPSG:26951' + +' EPSG:26952' + +' EPSG:26953' + +' EPSG:26954' + +' EPSG:26955' + +' EPSG:26956' + +' EPSG:26957' + +' EPSG:26958' + +' EPSG:26959' + +' EPSG:26960' + +' EPSG:26961' + +' EPSG:26962' + +' EPSG:26963' + +' EPSG:26964' + +' EPSG:26965' + +' EPSG:26966' + +' EPSG:26967' + +' EPSG:26968' + +' EPSG:26969' + +' EPSG:26970' + +' EPSG:26971' + +' EPSG:26972' + +' EPSG:26973' + +' EPSG:26974' + +' EPSG:26975' + +' EPSG:26976' + +' EPSG:26977' + +' EPSG:26978' + +' EPSG:26979' + +' EPSG:26980' + +' EPSG:26981' + +' EPSG:26982' + +' EPSG:26983' + +' EPSG:26984' + +' EPSG:26985' + +' EPSG:26986' + +' EPSG:26987' + +' EPSG:26988' + +' EPSG:26989' + +' EPSG:26990' + +' EPSG:26991' + +' EPSG:26992' + +' EPSG:26993' + +' EPSG:26994' + +' EPSG:26995' + +' EPSG:26996' + +' EPSG:26997' + +' EPSG:26998' + +' EPSG:27037' + +' EPSG:27038' + +' EPSG:27039' + +' EPSG:27040' + +' EPSG:27120' + +' EPSG:27200' + +' EPSG:27205' + +' EPSG:27206' + +' EPSG:27207' + +' EPSG:27208' + +' EPSG:27209' + +' EPSG:27210' + +' EPSG:27211' + +' EPSG:27212' + +' EPSG:27213' + +' EPSG:27214' + +' EPSG:27215' + +' EPSG:27216' + +' EPSG:27217' + +' EPSG:27218' + +' EPSG:27219' + +' EPSG:27220' + +' EPSG:27221' + +' EPSG:27222' + +' EPSG:27223' + +' EPSG:27224' + +' EPSG:27225' + +' EPSG:27226' + +' EPSG:27227' + +' EPSG:27228' + +' EPSG:27229' + +' EPSG:27230' + +' EPSG:27231' + +' EPSG:27232' + +' EPSG:27258' + +' EPSG:27259' + +' EPSG:27260' + +' EPSG:27291' + +' EPSG:27292' + +' EPSG:27391' + +' EPSG:27392' + +' EPSG:27393' + +' EPSG:27394' + +' EPSG:27395' + +' EPSG:27396' + +' EPSG:27397' + +' EPSG:27398' + +' EPSG:27429' + +' EPSG:27492' + +' EPSG:27500' + +' EPSG:27561' + +' EPSG:27562' + +' EPSG:27563' + +' EPSG:27564' + +' EPSG:27571' + +' EPSG:27572' + +' EPSG:27573' + +' EPSG:27574' + +' EPSG:27581' + +' EPSG:27582' + +' EPSG:27583' + +' EPSG:27584' + +' EPSG:27591' + +' EPSG:27592' + +' EPSG:27593' + +' EPSG:27594' + +' EPSG:27700' + +' EPSG:28191' + +' EPSG:28192' + +' EPSG:28193' + +' EPSG:28232' + +' EPSG:28348' + +' EPSG:28349' + +' EPSG:28350' + +' EPSG:28351' + +' EPSG:28352' + +' EPSG:28353' + +' EPSG:28354' + +' EPSG:28355' + +' EPSG:28356' + +' EPSG:28357' + +' EPSG:28358' + +' EPSG:28402' + +' EPSG:28403' + +' EPSG:28404' + +' EPSG:28405' + +' EPSG:28406' + +' EPSG:28407' + +' EPSG:28408' + +' EPSG:28409' + +' EPSG:28410' + +' EPSG:28411' + +' EPSG:28412' + +' EPSG:28413' + +' EPSG:28414' + +' EPSG:28415' + +' EPSG:28416' + +' EPSG:28417' + +' EPSG:28418' + +' EPSG:28419' + +' EPSG:28420' + +' EPSG:28421' + +' EPSG:28422' + +' EPSG:28423' + +' EPSG:28424' + +' EPSG:28425' + +' EPSG:28426' + +' EPSG:28427' + +' EPSG:28428' + +' EPSG:28429' + +' EPSG:28430' + +' EPSG:28431' + +' EPSG:28432' + +' EPSG:28462' + +' EPSG:28463' + +' EPSG:28464' + +' EPSG:28465' + +' EPSG:28466' + +' EPSG:28467' + +' EPSG:28468' + +' EPSG:28469' + +' EPSG:28470' + +' EPSG:28471' + +' EPSG:28472' + +' EPSG:28473' + +' EPSG:28474' + +' EPSG:28475' + +' EPSG:28476' + +' EPSG:28477' + +' EPSG:28478' + +' EPSG:28479' + +' EPSG:28480' + +' EPSG:28481' + +' EPSG:28482' + +' EPSG:28483' + +' EPSG:28484' + +' EPSG:28485' + +' EPSG:28486' + +' EPSG:28487' + +' EPSG:28488' + +' EPSG:28489' + +' EPSG:28490' + +' EPSG:28491' + +' EPSG:28492' + +' EPSG:28600' + +' EPSG:28991' + +' EPSG:28992' + +' EPSG:29100' + +' EPSG:29101' + +' EPSG:29118' + +' EPSG:29119' + +' EPSG:29120' + +' EPSG:29121' + +' EPSG:29122' + +' EPSG:29168' + +' EPSG:29169' + +' EPSG:29170' + +' EPSG:29171' + +' EPSG:29172' + +' EPSG:29177' + +' EPSG:29178' + +' EPSG:29179' + +' EPSG:29180' + +' EPSG:29181' + +' EPSG:29182' + +' EPSG:29183' + +' EPSG:29184' + +' EPSG:29185' + +' EPSG:29187' + +' EPSG:29188' + +' EPSG:29189' + +' EPSG:29190' + +' EPSG:29191' + +' EPSG:29192' + +' EPSG:29193' + +' EPSG:29194' + +' EPSG:29195' + +' EPSG:29220' + +' EPSG:29221' + +' EPSG:29333' + +' EPSG:29371' + +' EPSG:29373' + +' EPSG:29375' + +' EPSG:29377' + +' EPSG:29379' + +' EPSG:29381' + +' EPSG:29383' + +' EPSG:29385' + +' EPSG:29635' + +' EPSG:29636' + +' EPSG:29700' + +' EPSG:29701' + +' EPSG:29702' + +' EPSG:29738' + +' EPSG:29739' + +' EPSG:29849' + +' EPSG:29850' + +' EPSG:29871' + +' EPSG:29872' + +' EPSG:29873' + +' EPSG:29900' + +' EPSG:29901' + +' EPSG:29902' + +' EPSG:29903' + +' EPSG:30161' + +' EPSG:30162' + +' EPSG:30163' + +' EPSG:30164' + +' EPSG:30165' + +' EPSG:30166' + +' EPSG:30167' + +' EPSG:30168' + +' EPSG:30169' + +' EPSG:30170' + +' EPSG:30171' + +' EPSG:30172' + +' EPSG:30173' + +' EPSG:30174' + +' EPSG:30175' + +' EPSG:30176' + +' EPSG:30177' + +' EPSG:30178' + +' EPSG:30179' + +' EPSG:30200' + +' EPSG:30339' + +' EPSG:30340' + +' EPSG:30491' + +' EPSG:30492' + +' EPSG:30493' + +' EPSG:30494' + +' EPSG:30729' + +' EPSG:30730' + +' EPSG:30731' + +' EPSG:30732' + +' EPSG:30791' + +' EPSG:30792' + +' EPSG:30800' + +' EPSG:31028' + +' EPSG:31121' + +' EPSG:31154' + +' EPSG:31170' + +' EPSG:31171' + +' EPSG:31251' + +' EPSG:31252' + +' EPSG:31253' + +' EPSG:31254' + +' EPSG:31255' + +' EPSG:31256' + +' EPSG:31257' + +' EPSG:31258' + +' EPSG:31259' + +' EPSG:31265' + +' EPSG:31266' + +' EPSG:31267' + +' EPSG:31268' + +' EPSG:31275' + +' EPSG:31276' + +' EPSG:31277' + +' EPSG:31278' + +' EPSG:31279' + +' EPSG:31281' + +' EPSG:31282' + +' EPSG:31283' + +' EPSG:31284' + +' EPSG:31285' + +' EPSG:31286' + +' EPSG:31287' + +' EPSG:31288' + +' EPSG:31289' + +' EPSG:31290' + +' EPSG:31291' + +' EPSG:31292' + +' EPSG:31293' + +' EPSG:31294' + +' EPSG:31295' + +' EPSG:31296' + +' EPSG:31297' + +' EPSG:31300' + +' EPSG:31370' + +' EPSG:31461' + +' EPSG:31462' + +' EPSG:31463' + +' EPSG:31464' + +' EPSG:31465' + +' EPSG:31466' + +' EPSG:31467' + +' EPSG:31468' + +' EPSG:31469' + +' EPSG:31528' + +' EPSG:31529' + +' EPSG:31600' + +' EPSG:31700' + +' EPSG:31838' + +' EPSG:31839' + +' EPSG:31900' + +' EPSG:31901' + +' EPSG:31965' + +' EPSG:31966' + +' EPSG:31967' + +' EPSG:31968' + +' EPSG:31969' + +' EPSG:31970' + +' EPSG:31971' + +' EPSG:31972' + +' EPSG:31973' + +' EPSG:31974' + +' EPSG:31975' + +' EPSG:31976' + +' EPSG:31977' + +' EPSG:31978' + +' EPSG:31979' + +' EPSG:31980' + +' EPSG:31981' + +' EPSG:31982' + +' EPSG:31983' + +' EPSG:31984' + +' EPSG:31985' + +' EPSG:31986' + +' EPSG:31987' + +' EPSG:31988' + +' EPSG:31989' + +' EPSG:31990' + +' EPSG:31991' + +' EPSG:31992' + +' EPSG:31993' + +' EPSG:31994' + +' EPSG:31995' + +' EPSG:31996' + +' EPSG:31997' + +' EPSG:31998' + +' EPSG:31999' + +' EPSG:32000' + +' EPSG:32001' + +' EPSG:32002' + +' EPSG:32003' + +' EPSG:32005' + +' EPSG:32006' + +' EPSG:32007' + +' EPSG:32008' + +' EPSG:32009' + +' EPSG:32010' + +' EPSG:32011' + +' EPSG:32012' + +' EPSG:32013' + +' EPSG:32014' + +' EPSG:32015' + +' EPSG:32016' + +' EPSG:32017' + +' EPSG:32018' + +' EPSG:32019' + +' EPSG:32020' + +' EPSG:32021' + +' EPSG:32022' + +' EPSG:32023' + +' EPSG:32024' + +' EPSG:32025' + +' EPSG:32026' + +' EPSG:32027' + +' EPSG:32028' + +' EPSG:32029' + +' EPSG:32030' + +' EPSG:32031' + +' EPSG:32033' + +' EPSG:32034' + +' EPSG:32035' + +' EPSG:32036' + +' EPSG:32037' + +' EPSG:32038' + +' EPSG:32039' + +' EPSG:32040' + +' EPSG:32041' + +' EPSG:32042' + +' EPSG:32043' + +' EPSG:32044' + +' EPSG:32045' + +' EPSG:32046' + +' EPSG:32047' + +' EPSG:32048' + +' EPSG:32049' + +' EPSG:32050' + +' EPSG:32051' + +' EPSG:32052' + +' EPSG:32053' + +' EPSG:32054' + +' EPSG:32055' + +' EPSG:32056' + +' EPSG:32057' + +' EPSG:32058' + +' EPSG:32061' + +' EPSG:32062' + +' EPSG:32064' + +' EPSG:32065' + +' EPSG:32066' + +' EPSG:32067' + +' EPSG:32074' + +' EPSG:32075' + +' EPSG:32076' + +' EPSG:32077' + +' EPSG:32081' + +' EPSG:32082' + +' EPSG:32083' + +' EPSG:32084' + +' EPSG:32085' + +' EPSG:32086' + +' EPSG:32098' + +' EPSG:32099' + +' EPSG:32100' + +' EPSG:32104' + +' EPSG:32107' + +' EPSG:32108' + +' EPSG:32109' + +' EPSG:32110' + +' EPSG:32111' + +' EPSG:32112' + +' EPSG:32113' + +' EPSG:32114' + +' EPSG:32115' + +' EPSG:32116' + +' EPSG:32117' + +' EPSG:32118' + +' EPSG:32119' + +' EPSG:32120' + +' EPSG:32121' + +' EPSG:32122' + +' EPSG:32123' + +' EPSG:32124' + +' EPSG:32125' + +' EPSG:32126' + +' EPSG:32127' + +' EPSG:32128' + +' EPSG:32129' + +' EPSG:32130' + +' EPSG:32133' + +' EPSG:32134' + +' EPSG:32135' + +' EPSG:32136' + +' EPSG:32137' + +' EPSG:32138' + +' EPSG:32139' + +' EPSG:32140' + +' EPSG:32141' + +' EPSG:32142' + +' EPSG:32143' + +' EPSG:32144' + +' EPSG:32145' + +' EPSG:32146' + +' EPSG:32147' + +' EPSG:32148' + +' EPSG:32149' + +' EPSG:32150' + +' EPSG:32151' + +' EPSG:32152' + +' EPSG:32153' + +' EPSG:32154' + +' EPSG:32155' + +' EPSG:32156' + +' EPSG:32157' + +' EPSG:32158' + +' EPSG:32161' + +' EPSG:32164' + +' EPSG:32165' + +' EPSG:32166' + +' EPSG:32167' + +' EPSG:32180' + +' EPSG:32181' + +' EPSG:32182' + +' EPSG:32183' + +' EPSG:32184' + +' EPSG:32185' + +' EPSG:32186' + +' EPSG:32187' + +' EPSG:32188' + +' EPSG:32189' + +' EPSG:32190' + +' EPSG:32191' + +' EPSG:32192' + +' EPSG:32193' + +' EPSG:32194' + +' EPSG:32195' + +' EPSG:32196' + +' EPSG:32197' + +' EPSG:32198' + +' EPSG:32199' + +' EPSG:32201' + +' EPSG:32202' + +' EPSG:32203' + +' EPSG:32204' + +' EPSG:32205' + +' EPSG:32206' + +' EPSG:32207' + +' EPSG:32208' + +' EPSG:32209' + +' EPSG:32210' + +' EPSG:32211' + +' EPSG:32212' + +' EPSG:32213' + +' EPSG:32214' + +' EPSG:32215' + +' EPSG:32216' + +' EPSG:32217' + +' EPSG:32218' + +' EPSG:32219' + +' EPSG:32220' + +' EPSG:32221' + +' EPSG:32222' + +' EPSG:32223' + +' EPSG:32224' + +' EPSG:32225' + +' EPSG:32226' + +' EPSG:32227' + +' EPSG:32228' + +' EPSG:32229' + +' EPSG:32230' + +' EPSG:32231' + +' EPSG:32232' + +' EPSG:32233' + +' EPSG:32234' + +' EPSG:32235' + +' EPSG:32236' + +' EPSG:32237' + +' EPSG:32238' + +' EPSG:32239' + +' EPSG:32240' + +' EPSG:32241' + +' EPSG:32242' + +' EPSG:32243' + +' EPSG:32244' + +' EPSG:32245' + +' EPSG:32246' + +' EPSG:32247' + +' EPSG:32248' + +' EPSG:32249' + +' EPSG:32250' + +' EPSG:32251' + +' EPSG:32252' + +' EPSG:32253' + +' EPSG:32254' + +' EPSG:32255' + +' EPSG:32256' + +' EPSG:32257' + +' EPSG:32258' + +' EPSG:32259' + +' EPSG:32260' + +' EPSG:32301' + +' EPSG:32302' + +' EPSG:32303' + +' EPSG:32304' + +' EPSG:32305' + +' EPSG:32306' + +' EPSG:32307' + +' EPSG:32308' + +' EPSG:32309' + +' EPSG:32310' + +' EPSG:32311' + +' EPSG:32312' + +' EPSG:32313' + +' EPSG:32314' + +' EPSG:32315' + +' EPSG:32316' + +' EPSG:32317' + +' EPSG:32318' + +' EPSG:32319' + +' EPSG:32320' + +' EPSG:32321' + +' EPSG:32322' + +' EPSG:32323' + +' EPSG:32324' + +' EPSG:32325' + +' EPSG:32326' + +' EPSG:32327' + +' EPSG:32328' + +' EPSG:32329' + +' EPSG:32330' + +' EPSG:32331' + +' EPSG:32332' + +' EPSG:32333' + +' EPSG:32334' + +' EPSG:32335' + +' EPSG:32336' + +' EPSG:32337' + +' EPSG:32338' + +' EPSG:32339' + +' EPSG:32340' + +' EPSG:32341' + +' EPSG:32342' + +' EPSG:32343' + +' EPSG:32344' + +' EPSG:32345' + +' EPSG:32346' + +' EPSG:32347' + +' EPSG:32348' + +' EPSG:32349' + +' EPSG:32350' + +' EPSG:32351' + +' EPSG:32352' + +' EPSG:32353' + +' EPSG:32354' + +' EPSG:32355' + +' EPSG:32356' + +' EPSG:32357' + +' EPSG:32358' + +' EPSG:32359' + +' EPSG:32360' + +' EPSG:32401' + +' EPSG:32402' + +' EPSG:32403' + +' EPSG:32404' + +' EPSG:32405' + +' EPSG:32406' + +' EPSG:32407' + +' EPSG:32408' + +' EPSG:32409' + +' EPSG:32410' + +' EPSG:32411' + +' EPSG:32412' + +' EPSG:32413' + +' EPSG:32414' + +' EPSG:32415' + +' EPSG:32416' + +' EPSG:32417' + +' EPSG:32418' + +' EPSG:32419' + +' EPSG:32420' + +' EPSG:32421' + +' EPSG:32422' + +' EPSG:32423' + +' EPSG:32424' + +' EPSG:32425' + +' EPSG:32426' + +' EPSG:32427' + +' EPSG:32428' + +' EPSG:32429' + +' EPSG:32430' + +' EPSG:32431' + +' EPSG:32432' + +' EPSG:32433' + +' EPSG:32434' + +' EPSG:32435' + +' EPSG:32436' + +' EPSG:32437' + +' EPSG:32438' + +' EPSG:32439' + +' EPSG:32440' + +' EPSG:32441' + +' EPSG:32442' + +' EPSG:32443' + +' EPSG:32444' + +' EPSG:32445' + +' EPSG:32446' + +' EPSG:32447' + +' EPSG:32448' + +' EPSG:32449' + +' EPSG:32450' + +' EPSG:32451' + +' EPSG:32452' + +' EPSG:32453' + +' EPSG:32454' + +' EPSG:32455' + +' EPSG:32456' + +' EPSG:32457' + +' EPSG:32458' + +' EPSG:32459' + +' EPSG:32460' + +' EPSG:32501' + +' EPSG:32502' + +' EPSG:32503' + +' EPSG:32504' + +' EPSG:32505' + +' EPSG:32506' + +' EPSG:32507' + +' EPSG:32508' + +' EPSG:32509' + +' EPSG:32510' + +' EPSG:32511' + +' EPSG:32512' + +' EPSG:32513' + +' EPSG:32514' + +' EPSG:32515' + +' EPSG:32516' + +' EPSG:32517' + +' EPSG:32518' + +' EPSG:32519' + +' EPSG:32520' + +' EPSG:32521' + +' EPSG:32522' + +' EPSG:32523' + +' EPSG:32524' + +' EPSG:32525' + +' EPSG:32526' + +' EPSG:32527' + +' EPSG:32528' + +' EPSG:32529' + +' EPSG:32530' + +' EPSG:32531' + +' EPSG:32532' + +' EPSG:32533' + +' EPSG:32534' + +' EPSG:32535' + +' EPSG:32536' + +' EPSG:32537' + +' EPSG:32538' + +' EPSG:32539' + +' EPSG:32540' + +' EPSG:32541' + +' EPSG:32542' + +' EPSG:32543' + +' EPSG:32544' + +' EPSG:32545' + +' EPSG:32546' + +' EPSG:32547' + +' EPSG:32548' + +' EPSG:32549' + +' EPSG:32550' + +' EPSG:32551' + +' EPSG:32552' + +' EPSG:32553' + +' EPSG:32554' + +' EPSG:32555' + +' EPSG:32556' + +' EPSG:32557' + +' EPSG:32558' + +' EPSG:32559' + +' EPSG:32560' + +' EPSG:32600' + +' EPSG:32601' + +' EPSG:32602' + +' EPSG:32603' + +' EPSG:32604' + +' EPSG:32605' + +' EPSG:32606' + +' EPSG:32607' + +' EPSG:32608' + +' EPSG:32609' + +' EPSG:32610' + +' EPSG:32611' + +' EPSG:32612' + +' EPSG:32613' + +' EPSG:32614' + +' EPSG:32615' + +' EPSG:32616' + +' EPSG:32617' + +' EPSG:32618' + +' EPSG:32619' + +' EPSG:32620' + +' EPSG:32621' + +' EPSG:32622' + +' EPSG:32623' + +' EPSG:32624' + +' EPSG:32625' + +' EPSG:32626' + +' EPSG:32627' + +' EPSG:32628' + +' EPSG:32629' + +' EPSG:32630' + +' EPSG:32631' + +' EPSG:32632' + +' EPSG:32633' + +' EPSG:32634' + +' EPSG:32635' + +' EPSG:32636' + +' EPSG:32637' + +' EPSG:32638' + +' EPSG:32639' + +' EPSG:32640' + +' EPSG:32641' + +' EPSG:32642' + +' EPSG:32643' + +' EPSG:32644' + +' EPSG:32645' + +' EPSG:32646' + +' EPSG:32647' + +' EPSG:32648' + +' EPSG:32649' + +' EPSG:32650' + +' EPSG:32651' + +' EPSG:32652' + +' EPSG:32653' + +' EPSG:32654' + +' EPSG:32655' + +' EPSG:32656' + +' EPSG:32657' + +' EPSG:32658' + +' EPSG:32659' + +' EPSG:32660' + +' EPSG:32661' + +' EPSG:32662' + +' EPSG:32664' + +' EPSG:32665' + +' EPSG:32666' + +' EPSG:32667' + +' EPSG:32700' + +' EPSG:32701' + +' EPSG:32702' + +' EPSG:32703' + +' EPSG:32704' + +' EPSG:32705' + +' EPSG:32706' + +' EPSG:32707' + +' EPSG:32708' + +' EPSG:32709' + +' EPSG:32710' + +' EPSG:32711' + +' EPSG:32712' + +' EPSG:32713' + +' EPSG:32714' + +' EPSG:32715' + +' EPSG:32716' + +' EPSG:32717' + +' EPSG:32718' + +' EPSG:32719' + +' EPSG:32720' + +' EPSG:32721' + +' EPSG:32722' + +' EPSG:32723' + +' EPSG:32724' + +' EPSG:32725' + +' EPSG:32726' + +' EPSG:32727' + +' EPSG:32728' + +' EPSG:32729' + +' EPSG:32730' + +' EPSG:32731' + +' EPSG:32732' + +' EPSG:32733' + +' EPSG:32734' + +' EPSG:32735' + +' EPSG:32736' + +' EPSG:32737' + +' EPSG:32738' + +' EPSG:32739' + +' EPSG:32740' + +' EPSG:32741' + +' EPSG:32742' + +' EPSG:32743' + +' EPSG:32744' + +' EPSG:32745' + +' EPSG:32746' + +' EPSG:32747' + +' EPSG:32748' + +' EPSG:32749' + +' EPSG:32750' + +' EPSG:32751' + +' EPSG:32752' + +' EPSG:32753' + +' EPSG:32754' + +' EPSG:32755' + +' EPSG:32756' + +' EPSG:32757' + +' EPSG:32758' + +' EPSG:32759' + +' EPSG:32760' + +' EPSG:32761' + +' EPSG:32766' + +' EPSG:61206405' + +' EPSG:61216405' + +' EPSG:61226405' + +' EPSG:61236405' + +' EPSG:61246405' + +' EPSG:61266405' + +' EPSG:61266413' + +' EPSG:61276405' + +' EPSG:61286405' + +' EPSG:61296405' + +' EPSG:61306405' + +' EPSG:61306413' + +' EPSG:61316405' + +' EPSG:61326405' + +' EPSG:61336405' + +' EPSG:61346405' + +' EPSG:61356405' + +' EPSG:61366405' + +' EPSG:61376405' + +' EPSG:61386405' + +' EPSG:61396405' + +' EPSG:61406405' + +' EPSG:61406413' + +' EPSG:61416405' + +' EPSG:61426405' + +' EPSG:61436405' + +' EPSG:61446405' + +' EPSG:61456405' + +' EPSG:61466405' + +' EPSG:61476405' + +' EPSG:61486405' + +' EPSG:61486413' + +' EPSG:61496405' + +' EPSG:61506405' + +' EPSG:61516405' + +' EPSG:61516413' + +' EPSG:61526405' + +' EPSG:61526413' + +' EPSG:61536405' + +' EPSG:61546405' + +' EPSG:61556405' + +' EPSG:61566405' + +' EPSG:61576405' + +' EPSG:61586405' + +' EPSG:61596405' + +' EPSG:61606405' + +' EPSG:61616405' + +' EPSG:61626405' + +' EPSG:61636405' + +' EPSG:61636413' + +' EPSG:61646405' + +' EPSG:61656405' + +' EPSG:61666405' + +' EPSG:61676405' + +' EPSG:61676413' + +' EPSG:61686405' + +' EPSG:61696405' + +' EPSG:61706405' + +' EPSG:61706413' + +' EPSG:61716405' + +' EPSG:61716413' + +' EPSG:61736405' + +' EPSG:61736413' + +' EPSG:61746405' + +' EPSG:61756405' + +' EPSG:61766405' + +' EPSG:61766413' + +' EPSG:61786405' + +' EPSG:61796405' + +' EPSG:61806405' + +' EPSG:61806413' + +' EPSG:61816405' + +' EPSG:61826405' + +' EPSG:61836405' + +' EPSG:61846405' + +' EPSG:61886405' + +' EPSG:61896405' + +' EPSG:61896413' + +' EPSG:61906405' + +' EPSG:61906413' + +' EPSG:61916405' + +' EPSG:61926405' + +' EPSG:61936405' + +' EPSG:61946405' + +' EPSG:61956405' + +' EPSG:61966405' + +' EPSG:61976405' + +' EPSG:61986405' + +' EPSG:61996405' + +' EPSG:62006405' + +' EPSG:62016405' + +' EPSG:62026405' + +' EPSG:62036405' + +' EPSG:62046405' + +' EPSG:62056405' + +' EPSG:62066405' + +' EPSG:62076405' + +' EPSG:62086405' + +' EPSG:62096405' + +' EPSG:62106405' + +' EPSG:62116405' + +' EPSG:62126405' + +' EPSG:62136405' + +' EPSG:62146405' + +' EPSG:62156405' + +' EPSG:62166405' + +' EPSG:62186405' + +' EPSG:62196405' + +' EPSG:62206405' + +' EPSG:62216405' + +' EPSG:62226405' + +' EPSG:62236405' + +' EPSG:62246405' + +' EPSG:62256405' + +' EPSG:62276405' + +' EPSG:62296405' + +' EPSG:62306405' + +' EPSG:62316405' + +' EPSG:62326405' + +' EPSG:62336405' + +' EPSG:62366405' + +' EPSG:62376405' + +' EPSG:62386405' + +' EPSG:62396405' + +' EPSG:62406405' + +' EPSG:62416405' + +' EPSG:62426405' + +' EPSG:62436405' + +' EPSG:62446405' + +' EPSG:62456405' + +' EPSG:62466405' + +' EPSG:62476405' + +' EPSG:62486405' + +' EPSG:62496405' + +' EPSG:62506405' + +' EPSG:62516405' + +' EPSG:62526405' + +' EPSG:62536405' + +' EPSG:62546405' + +' EPSG:62556405' + +' EPSG:62566405' + +' EPSG:62576405' + +' EPSG:62586405' + +' EPSG:62586413' + +' EPSG:62596405' + +' EPSG:62616405' + +' EPSG:62626405' + +' EPSG:62636405' + +' EPSG:62646405' + +' EPSG:62656405' + +' EPSG:62666405' + +' EPSG:62676405' + +' EPSG:62686405' + +' EPSG:62696405' + +' EPSG:62706405' + +' EPSG:62716405' + +' EPSG:62726405' + +' EPSG:62736405' + +' EPSG:62746405' + +' EPSG:62756405' + +' EPSG:62766405' + +' EPSG:62776405' + +' EPSG:62786405' + +' EPSG:62796405' + +' EPSG:62806405' + +' EPSG:62816405' + +' EPSG:62826405' + +' EPSG:62836405' + +' EPSG:62836413' + +' EPSG:62846405' + +' EPSG:62856405' + +' EPSG:62866405' + +' EPSG:62886405' + +' EPSG:62896405' + +' EPSG:62926405' + +' EPSG:62936405' + +' EPSG:62956405' + +' EPSG:62976405' + +' EPSG:62986405' + +' EPSG:62996405' + +' EPSG:63006405' + +' EPSG:63016405' + +' EPSG:63026405' + +' EPSG:63036405' + +' EPSG:63046405' + +' EPSG:63066405' + +' EPSG:63076405' + +' EPSG:63086405' + +' EPSG:63096405' + +' EPSG:63106405' + +' EPSG:63116405' + +' EPSG:63126405' + +' EPSG:63136405' + +' EPSG:63146405' + +' EPSG:63156405' + +' EPSG:63166405' + +' EPSG:63176405' + +' EPSG:63186405' + +' EPSG:63196405' + +' EPSG:63226405' + +' EPSG:63246405' + +' EPSG:63266405' + +' EPSG:63266406' + +' EPSG:63266407' + +' EPSG:63266408' + +' EPSG:63266409' + +' EPSG:63266410' + +' EPSG:63266411' + +' EPSG:63266412' + +' EPSG:63266413' + +' EPSG:63266414' + +' EPSG:63266415' + +' EPSG:63266416' + +' EPSG:63266417' + +' EPSG:63266418' + +' EPSG:63266419' + +' EPSG:63266420' + +' EPSG:66006405' + +' EPSG:66016405' + +' EPSG:66026405' + +' EPSG:66036405' + +' EPSG:66046405' + +' EPSG:66056405' + +' EPSG:66066405' + +' EPSG:66076405' + +' EPSG:66086405' + +' EPSG:66096405' + +' EPSG:66106405' + +' EPSG:66116405' + +' EPSG:66126405' + +' EPSG:66126413' + +' EPSG:66136405' + +' EPSG:66146405' + +' EPSG:66156405' + +' EPSG:66166405' + +' EPSG:66186405' + +' EPSG:66196405' + +' EPSG:66196413' + +' EPSG:66206405' + +' EPSG:66216405' + +' EPSG:66226405' + +' EPSG:66236405' + +' EPSG:66246405' + +' EPSG:66246413' + +' EPSG:66256405' + +' EPSG:66266405' + +' EPSG:66276405' + +' EPSG:66276413' + +' EPSG:66286405' + +' EPSG:66296405' + +' EPSG:66306405' + +' EPSG:66316405' + +' EPSG:66326405' + +' EPSG:66336405' + +' EPSG:66346405' + +' EPSG:66356405' + +' EPSG:66366405' + +' EPSG:66376405' + +' EPSG:66386405' + +' EPSG:66396405' + +' EPSG:66406405' + +' EPSG:66406413' + +' EPSG:66416405' + +' EPSG:66426405' + +' EPSG:66436405' + +' EPSG:66446405' + +' EPSG:66456405' + +' EPSG:66456413' + +' EPSG:66466405' + +' EPSG:66576405' + +' EPSG:66586405' + +' EPSG:66596405' + +' EPSG:66596413' + +' EPSG:66606405' + +' EPSG:66616405' + +' EPSG:66616413' + +' EPSG:66636405' + +' EPSG:66646405' + +' EPSG:66656405' + +' EPSG:66666405' + +' EPSG:66676405' + +' EPSG:68016405' + +' EPSG:68026405' + +' EPSG:68036405' + +' EPSG:68046405' + +' EPSG:68056405' + +' EPSG:68066405' + +' EPSG:68086405' + +' EPSG:68096405' + +' EPSG:68136405' + +' EPSG:68146405' + +' EPSG:68156405' + +' EPSG:68186405' + +' EPSG:68206405' + +' EPSG:69036405' + +' EPSG:42302' + +' EPSG:42301' + +' EPSG:900913' + +' EPSG:45556' + +' EPSG:45555' + +' EPSG:54004' + +' EPSG:41001' + +' EPSG:42311' + +' EPSG:42310' + +' EPSG:18001' + +' EPSG:100003' + +' EPSG:42106' + +' EPSG:100002' + +' EPSG:42105' + +' EPSG:100001' + +' EPSG:42309' + +' EPSG:42104' + +' EPSG:42308' + +' EPSG:42103' + +' EPSG:42307' + +' EPSG:42102' + +' EPSG:42306' + +' EPSG:42101' + +' EPSG:42305' + +' EPSG:42304' + +' EPSG:42303' + +' ' + +' ' + +' og:bugsites' + +' ' + +' <Abstract>Sample data from GRASS, bug sites location, Spearfish, South Dakota, USA</Abstract>' + +' <KeywordList>' + +' <Keyword>spearfish</Keyword>' + +' <Keyword>sfBugsites</Keyword>' + +' <Keyword>insects</Keyword>' + +' <Keyword>bugsites</Keyword>' + +' <Keyword>tiger_beetles</Keyword>' + +' </KeywordList>' + +' <SRS>EPSG:26713</SRS>' + +' <!--WKT definition of this CRS:' + +'PROJCS["NAD27 / UTM zone 13N", ' + +' GEOGCS["NAD27", ' + +' DATUM["North American Datum 1927", ' + +' SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], ' + +' TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], ' + +' AUTHORITY["EPSG","6267"]], ' + +' PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], ' + +' UNIT["degree", 0.017453292519943295], ' + +' AXIS["Geodetic longitude", EAST], ' + +' AXIS["Geodetic latitude", NORTH], ' + +' AUTHORITY["EPSG","4267"]], ' + +' PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], ' + +' PARAMETER["central_meridian", -105.0], ' + +' PARAMETER["latitude_of_origin", 0.0], ' + +' PARAMETER["scale_factor", 0.9996], ' + +' PARAMETER["false_easting", 500000.0], ' + +' PARAMETER["false_northing", 0.0], ' + +' UNIT["m", 1.0], ' + +' AXIS["Easting", EAST], ' + +' AXIS["Northing", NORTH], ' + +' AUTHORITY["EPSG","26713"]]-->' + +' <LatLonBoundingBox minx="-103.8701581843142" miny="44.286540361238224" maxx="-103.63532819794625" maxy="44.52137034760618"/>' + +' <BoundingBox SRS="EPSG:26713" minx="590232.0" miny="4914096.0" maxx="608471.0" maxy="4920512.0"/>' + +' <Style>' + +' <Name>capitals</Name>' + +' <Title>Capital cities' + +' ' + +' ' + +' image/png' + +' ' + +' ' + +' ' + +' ' + +' ' + +' og:restricted' + +' ' + +' <Abstract>Sample data from GRASS, restricted areas, Spearfish, South Dakota, USA</Abstract>' + +' <KeywordList>' + +' <Keyword>spearfish</Keyword>' + +' <Keyword>restricted</Keyword>' + +' <Keyword>sfRestricted</Keyword>' + +' <Keyword>areas</Keyword>' + +' </KeywordList>' + +' <SRS>EPSG:26713</SRS>' + +' <!--WKT definition of this CRS:' + +'PROJCS["NAD27 / UTM zone 13N", ' + +' GEOGCS["NAD27", ' + +' DATUM["North American Datum 1927", ' + +' SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], ' + +' TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], ' + +' AUTHORITY["EPSG","6267"]], ' + +' PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], ' + +' UNIT["degree", 0.017453292519943295], ' + +' AXIS["Geodetic longitude", EAST], ' + +' AXIS["Geodetic latitude", NORTH], ' + +' AUTHORITY["EPSG","4267"]], ' + +' PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], ' + +' PARAMETER["central_meridian", -105.0], ' + +' PARAMETER["latitude_of_origin", 0.0], ' + +' PARAMETER["scale_factor", 0.9996], ' + +' PARAMETER["false_easting", 500000.0], ' + +' PARAMETER["false_northing", 0.0], ' + +' UNIT["m", 1.0], ' + +' AXIS["Easting", EAST], ' + +' AXIS["Northing", NORTH], ' + +' AUTHORITY["EPSG","26713"]]-->' + +' <LatLonBoundingBox minx="-104.36424600670885" miny="43.78798270975212" maxx="-103.06226503558304" maxy="45.089963680877936"/>' + +' <BoundingBox SRS="EPSG:26713" minx="551796.8125" miny="4901896.0" maxx="652788.5625" maxy="4940954.0"/>' + +' <Style>' + +' <Name>restricted</Name>' + +' <Title>Red, translucent style' + +' A sample style that just prints out a transparent red interior with a red outline' + +' ' + +' image/png' + +' ' + +' ' + +' ' + +' ' + +' ' + +' og:archsites' + +' ' + +' <Abstract>Sample data from GRASS, archeological sites location, Spearfish, South Dakota, USA</Abstract>' + +' <KeywordList>' + +' <Keyword>archsites</Keyword>' + +' <Keyword>spearfish</Keyword>' + +' <Keyword>sfArchsites</Keyword>' + +' <Keyword>archeology</Keyword>' + +' </KeywordList>' + +' <SRS>EPSG:26713</SRS>' + +' <!--WKT definition of this CRS:' + +'PROJCS["NAD27 / UTM zone 13N", ' + +' GEOGCS["NAD27", ' + +' DATUM["North American Datum 1927", ' + +' SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], ' + +' TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], ' + +' AUTHORITY["EPSG","6267"]], ' + +' PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], ' + +' UNIT["degree", 0.017453292519943295], ' + +' AXIS["Geodetic longitude", EAST], ' + +' AXIS["Geodetic latitude", NORTH], ' + +' AUTHORITY["EPSG","4267"]], ' + +' PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], ' + +' PARAMETER["central_meridian", -105.0], ' + +' PARAMETER["latitude_of_origin", 0.0], ' + +' PARAMETER["scale_factor", 0.9996], ' + +' PARAMETER["false_easting", 500000.0], ' + +' PARAMETER["false_northing", 0.0], ' + +' UNIT["m", 1.0], ' + +' AXIS["Easting", EAST], ' + +' AXIS["Northing", NORTH], ' + +' AUTHORITY["EPSG","26713"]]-->' + +' <LatLonBoundingBox minx="-103.87480459767542" miny="44.31295793136913" maxx="-103.63549073047534" maxy="44.55227179856921"/>' + +' <BoundingBox SRS="EPSG:26713" minx="589860.0" miny="4914479.0" maxx="608355.0" maxy="4926490.0"/>' + +' <Style>' + +' <Name>point</Name>' + +' <Title>Default point' + +' A sample style that just prints out a 6px wide red square' + +' ' + +' image/png' + +' ' + +' ' + +' ' + +' ' + +' ' + +' og:streams' + +' ' + +' <Abstract>Sample data from GRASS, streams, Spearfish, South Dakota, USA</Abstract>' + +' <KeywordList>' + +' <Keyword>spearfish</Keyword>' + +' <Keyword>sfStreams</Keyword>' + +' <Keyword>streams</Keyword>' + +' </KeywordList>' + +' <SRS>EPSG:26713</SRS>' + +' <!--WKT definition of this CRS:' + +'PROJCS["NAD27 / UTM zone 13N", ' + +' GEOGCS["NAD27", ' + +' DATUM["North American Datum 1927", ' + +' SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], ' + +' TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], ' + +' AUTHORITY["EPSG","6267"]], ' + +' PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], ' + +' UNIT["degree", 0.017453292519943295], ' + +' AXIS["Geodetic longitude", EAST], ' + +' AXIS["Geodetic latitude", NORTH], ' + +' AUTHORITY["EPSG","4267"]], ' + +' PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], ' + +' PARAMETER["central_meridian", -105.0], ' + +' PARAMETER["latitude_of_origin", 0.0], ' + +' PARAMETER["scale_factor", 0.9996], ' + +' PARAMETER["false_easting", 500000.0], ' + +' PARAMETER["false_northing", 0.0], ' + +' UNIT["m", 1.0], ' + +' AXIS["Easting", EAST], ' + +' AXIS["Northing", NORTH], ' + +' AUTHORITY["EPSG","26713"]]-->' + +' <LatLonBoundingBox minx="-103.88033574142051" miny="44.30711172484593" maxx="-103.62022283326024" maxy="44.5672246330062"/>' + +' <BoundingBox SRS="EPSG:26713" minx="589443.0" miny="4913935.0" maxx="609526.75" maxy="4928059.5"/>' + +' <Style>' + +' <Name>simple_streams</Name>' + +' <Title>Default Styler for streams segments' + +' Blue lines, 2px wide' + +' ' + +' image/png' + +' ' + +' ' + +' ' + +' ' + +' ' + +' tiger:poly_landmarks' + +' Manhattan (NY) landmarks' + +' Manhattan landmarks, identifies water, lakes, parks, interesting buildilngs' + +' ' + +' DS_poly_landmarks' + +' landmarks' + +' manhattan' + +' poly_landmarks' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' tiger:poi' + +' Manhattan (NY) points of interest' + +' Points of interest in New York, New York (on Manhattan). One of the attributes contains the name of a file with a picture of the point of interest.' + +' ' + +' poi' + +' Manhattan' + +' DS_poi' + +' points_of_interest' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' tiger:tiger_roads' + +' Manhattan (NY) roads' + +' Highly simplified road layout of Manhattan in New York..' + +' ' + +' DS_tiger_roads' + +' tiger_roads' + +' roads' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' za:za_natural' + +' Natural Landmarks in South Africa' + +' This layer describes natural features of South Africa such as forests and lakes.' + +' ' + +' water' + +' forests' + +' landmarks' + +' Africa' + +' South' + +' natural' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' za:za_points' + +' Points of Interest in South Africa' + +' Noteworthy locations such as hotels and tourist attractions in South Africa.' + +' ' + +' of' + +' tourist' + +' landmarks' + +' zoo' + +' cities' + +' interest' + +' attractions' + +' points' + +' hotel' + +' museum' + +' picnic' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' za:za_roads' + +' South African Roads' + +' This layer describes roads in South Africa.' + +' ' + +' south' + +' africa' + +' roads' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' za:za_vegetation' + +' South African Vegetation' + +' This layer describes vegetated areas in South Africa, categorized by biome.' + +' ' + +' south' + +' vegetation' + +' africa' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' topp:tasmania_cities' + +' Tasmania cities' + +' Cities in Tasmania (actually, just the capital)' + +' ' + +' cities' + +' Tasmania' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' topp:tasmania_roads' + +' Tasmania roads' + +' Main Tasmania roads' + +' ' + +' Roads' + +' Tasmania' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' topp:tasmania_state_boundaries' + +' Tasmania state boundaries' + +' Tasmania state boundaries' + +' ' + +' boundaries' + +' tasmania_state_boundaries' + +' Tasmania' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' topp:tasmania_water_bodies' + +' Tasmania water bodies' + +' Tasmania water bodies' + +' ' + +' Lakes' + +' Bodies' + +' Australia' + +' Water' + +' Tasmania' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' topp:states' + +' USA Population' + +' This is some census data on the states.' + +' ' + +' census' + +' united' + +' boundaries' + +' state' + +' states' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' tike:waterways' + +' Waterways' + +' Waterways in Finland.' + +' ' + +' Finland' + +' waterways' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' tike:railways' + +' roads_Type' + +' Generated from tike' + +' ' + +' tike' + +' roads' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' tike:roads' + +' roads_Type' + +' Generated from tike' + +' ' + +' tike' + +' roads' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' og:roads' + +' roads_Type' + +' Generated from sf_reset' + +' ' + +' roads' + +' sf_reset' + +' ' + +' EPSG:26713' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' tike:points' + +' roads_Type' + +' Generated from tike' + +' ' + +' tike' + +' roads' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' ' + +' topp:bluemarble' + +' Blue Marble Imagery' + +' Blue Marble NG global bathymetry and topography data from NASA. More information about the Blue Marble NG project is available from http://earthobservatory.nasa.gov/Features/BlueMarble .' + +' ' + +' WCS' + +' bluemarble' + +' bluemarble' + +' ' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' nurc:Arc_Sample' + +' Global annual rainfall' + +' Global annual rainfall in ArcGrid format' + +' ' + +' WCS' + +' arcGridSample' + +' arcGridSample_Coverage' + +' ' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' nurc:Img_Sample' + +' North America sample imagery' + +' A very rough imagery of North America' + +' ' + +' WCS' + +' worldImageSample' + +' worldImageSample_Coverage' + +' ' + +' ' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +' sf:sfdem' + +' Spearfish DEM' + +' Digital Elevation Model data for Spearfish, South Dakota' + +' ' + +' WCS' + +' sf' + +' dem' + +' digital' + +' elevation' + +' model' + +' ' + +' ' + +' EPSG:26713' + +' ' + +' ' + +' ' + +' ' + +' ' + +' tasmania' + +' tasmania' + +' Layer-Group type layer: tasmania' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' tiger-ny' + +' tiger-ny' + +' Layer-Group type layer: tiger-ny' + +' EPSG:4326' + +' ' + +' ' + +' ' + +' ' + +' ' + +''; + diff --git a/openlayers/tests/speed/wmscaps.xml b/openlayers/tests/speed/wmscaps.xml new file mode 100644 index 0000000000..885f71275f --- /dev/null +++ b/openlayers/tests/speed/wmscaps.xml @@ -0,0 +1,4954 @@ + + + + + OGC:WMS + GeoServer Web Map Service + A compliant implementation of WMS 1.1.1 plus most of the SLD 1.0 extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS + + WFS + WMS + GEOSERVER + + + + + Claudius Ptolomaeus + The ancient geographes INC + + Chief geographer + + Work +
    + Alexandria + + + Egypt + + + + claudius.ptolomaeus@gmail.com + + NONE + NONE + + + + + application/vnd.ogc.wms_xml + + + + + + + + + + + + + image/png + application/atom xml + application/atom+xml + application/openlayers + application/pdf + application/rss xml + application/rss+xml + application/vnd.google-earth.kml + application/vnd.google-earth.kml xml + application/vnd.google-earth.kml+xml + application/vnd.google-earth.kmz + application/vnd.google-earth.kmz xml + application/vnd.google-earth.kmz+xml + atom + image/geotiff + image/geotiff8 + image/gif + image/jpeg + image/png8 + image/svg + image/svg xml + image/svg+xml + image/tiff + image/tiff8 + kml + kmz + openlayers + rss + + + + + + + + + + text/plain + text/html + application/vnd.ogc.gml + + + + + + + + + + + + + application/vnd.ogc.wms_xml + + + + + + + + + + image/png + image/jpeg + image/gif + + + + + + + + + + + application/vnd.ogc.se_xml + + + + GeoServer Web Map Service + A compliant implementation of WMS 1.1.1 plus most of the SLD 1.0 extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS + + EPSG:WGS84(DD) + EPSG:2000 + EPSG:2001 + EPSG:2002 + EPSG:2003 + EPSG:2004 + EPSG:2005 + EPSG:2006 + EPSG:2007 + EPSG:2008 + EPSG:2009 + EPSG:2010 + EPSG:2011 + EPSG:2012 + EPSG:2013 + EPSG:2014 + EPSG:2015 + EPSG:2016 + EPSG:2017 + EPSG:2018 + EPSG:2019 + EPSG:2020 + EPSG:2021 + EPSG:2022 + EPSG:2023 + EPSG:2024 + EPSG:2025 + EPSG:2026 + EPSG:2027 + EPSG:2028 + EPSG:2029 + EPSG:2030 + EPSG:2031 + EPSG:2032 + EPSG:2033 + EPSG:2034 + EPSG:2035 + EPSG:2036 + EPSG:2037 + EPSG:2038 + EPSG:2039 + EPSG:2040 + EPSG:2041 + EPSG:2042 + EPSG:2043 + EPSG:2044 + EPSG:2045 + EPSG:2046 + EPSG:2047 + EPSG:2048 + EPSG:2049 + EPSG:2050 + EPSG:2051 + EPSG:2052 + EPSG:2053 + EPSG:2054 + EPSG:2055 + EPSG:2056 + EPSG:2057 + EPSG:2058 + EPSG:2059 + EPSG:2060 + EPSG:2061 + EPSG:2062 + EPSG:2063 + EPSG:2064 + EPSG:2065 + EPSG:2066 + EPSG:2067 + EPSG:2068 + EPSG:2069 + EPSG:2070 + EPSG:2071 + EPSG:2072 + EPSG:2073 + EPSG:2074 + EPSG:2075 + EPSG:2076 + EPSG:2077 + EPSG:2078 + EPSG:2079 + EPSG:2080 + EPSG:2081 + EPSG:2082 + EPSG:2083 + EPSG:2084 + EPSG:2085 + EPSG:2086 + EPSG:2087 + EPSG:2088 + EPSG:2089 + EPSG:2090 + EPSG:2091 + EPSG:2092 + EPSG:2093 + EPSG:2094 + EPSG:2095 + EPSG:2096 + EPSG:2097 + EPSG:2098 + EPSG:2099 + EPSG:2100 + EPSG:2101 + EPSG:2102 + EPSG:2103 + EPSG:2104 + EPSG:2105 + EPSG:2106 + EPSG:2107 + EPSG:2108 + EPSG:2109 + EPSG:2110 + EPSG:2111 + EPSG:2112 + EPSG:2113 + EPSG:2114 + EPSG:2115 + EPSG:2116 + EPSG:2117 + EPSG:2118 + EPSG:2119 + EPSG:2120 + EPSG:2121 + EPSG:2122 + EPSG:2123 + EPSG:2124 + EPSG:2125 + EPSG:2126 + EPSG:2127 + EPSG:2128 + EPSG:2129 + EPSG:2130 + EPSG:2131 + EPSG:2132 + EPSG:2133 + EPSG:2134 + EPSG:2135 + EPSG:2136 + EPSG:2137 + EPSG:2138 + EPSG:2139 + EPSG:2140 + EPSG:2141 + EPSG:2142 + EPSG:2143 + EPSG:2144 + EPSG:2145 + EPSG:2146 + EPSG:2147 + EPSG:2148 + EPSG:2149 + EPSG:2150 + EPSG:2151 + EPSG:2152 + EPSG:2153 + EPSG:2154 + EPSG:2155 + EPSG:2156 + EPSG:2157 + EPSG:2158 + EPSG:2159 + EPSG:2160 + EPSG:2161 + EPSG:2162 + EPSG:2163 + EPSG:2164 + EPSG:2165 + EPSG:2166 + EPSG:2167 + EPSG:2168 + EPSG:2169 + EPSG:2170 + EPSG:2171 + EPSG:2172 + EPSG:2173 + EPSG:2174 + EPSG:2175 + EPSG:2176 + EPSG:2177 + EPSG:2178 + EPSG:2179 + EPSG:2180 + EPSG:2188 + EPSG:2189 + EPSG:2190 + EPSG:2191 + EPSG:2192 + EPSG:2193 + EPSG:2194 + EPSG:2195 + EPSG:2196 + EPSG:2197 + EPSG:2198 + EPSG:2199 + EPSG:2200 + EPSG:2201 + EPSG:2202 + EPSG:2203 + EPSG:2204 + EPSG:2205 + EPSG:2206 + EPSG:2207 + EPSG:2208 + EPSG:2209 + EPSG:2210 + EPSG:2211 + EPSG:2212 + EPSG:2213 + EPSG:2214 + EPSG:2215 + EPSG:2216 + EPSG:2217 + EPSG:2218 + EPSG:2219 + EPSG:2220 + EPSG:2221 + EPSG:2222 + EPSG:2223 + EPSG:2224 + EPSG:2225 + EPSG:2226 + EPSG:2227 + EPSG:2228 + EPSG:2229 + EPSG:2230 + EPSG:2231 + EPSG:2232 + EPSG:2233 + EPSG:2234 + EPSG:2235 + EPSG:2236 + EPSG:2237 + EPSG:2238 + EPSG:2239 + EPSG:2240 + EPSG:2241 + EPSG:2242 + EPSG:2243 + EPSG:2244 + EPSG:2245 + EPSG:2246 + EPSG:2247 + EPSG:2248 + EPSG:2249 + EPSG:2250 + EPSG:2251 + EPSG:2252 + EPSG:2253 + EPSG:2254 + EPSG:2255 + EPSG:2256 + EPSG:2257 + EPSG:2258 + EPSG:2259 + EPSG:2260 + EPSG:2261 + EPSG:2262 + EPSG:2263 + EPSG:2264 + EPSG:2265 + EPSG:2266 + EPSG:2267 + EPSG:2268 + EPSG:2269 + EPSG:2270 + EPSG:2271 + EPSG:2272 + EPSG:2273 + EPSG:2274 + EPSG:2275 + EPSG:2276 + EPSG:2277 + EPSG:2278 + EPSG:2279 + EPSG:2280 + EPSG:2281 + EPSG:2282 + EPSG:2283 + EPSG:2284 + EPSG:2285 + EPSG:2286 + EPSG:2287 + EPSG:2288 + EPSG:2289 + EPSG:2290 + EPSG:2291 + EPSG:2292 + EPSG:2294 + EPSG:2295 + EPSG:2296 + EPSG:2297 + EPSG:2298 + EPSG:2299 + EPSG:2300 + EPSG:2301 + EPSG:2302 + EPSG:2303 + EPSG:2304 + EPSG:2305 + EPSG:2306 + EPSG:2307 + EPSG:2308 + EPSG:2309 + EPSG:2310 + EPSG:2311 + EPSG:2312 + EPSG:2313 + EPSG:2314 + EPSG:2315 + EPSG:2316 + EPSG:2317 + EPSG:2318 + EPSG:2319 + EPSG:2320 + EPSG:2321 + EPSG:2322 + EPSG:2323 + EPSG:2324 + EPSG:2325 + EPSG:2326 + EPSG:2327 + EPSG:2328 + EPSG:2329 + EPSG:2330 + EPSG:2331 + EPSG:2332 + EPSG:2333 + EPSG:2334 + EPSG:2335 + EPSG:2336 + EPSG:2337 + EPSG:2338 + EPSG:2339 + EPSG:2340 + EPSG:2341 + EPSG:2342 + EPSG:2343 + EPSG:2344 + EPSG:2345 + EPSG:2346 + EPSG:2347 + EPSG:2348 + EPSG:2349 + EPSG:2350 + EPSG:2351 + EPSG:2352 + EPSG:2353 + EPSG:2354 + EPSG:2355 + EPSG:2356 + EPSG:2357 + EPSG:2358 + EPSG:2359 + EPSG:2360 + EPSG:2361 + EPSG:2362 + EPSG:2363 + EPSG:2364 + EPSG:2365 + EPSG:2366 + EPSG:2367 + EPSG:2368 + EPSG:2369 + EPSG:2370 + EPSG:2371 + EPSG:2372 + EPSG:2373 + EPSG:2374 + EPSG:2375 + EPSG:2376 + EPSG:2377 + EPSG:2378 + EPSG:2379 + EPSG:2380 + EPSG:2381 + EPSG:2382 + EPSG:2383 + EPSG:2384 + EPSG:2385 + EPSG:2386 + EPSG:2387 + EPSG:2388 + EPSG:2389 + EPSG:2390 + EPSG:2391 + EPSG:2392 + EPSG:2393 + EPSG:2394 + EPSG:2395 + EPSG:2396 + EPSG:2397 + EPSG:2398 + EPSG:2399 + EPSG:2400 + EPSG:2401 + EPSG:2402 + EPSG:2403 + EPSG:2404 + EPSG:2405 + EPSG:2406 + EPSG:2407 + EPSG:2408 + EPSG:2409 + EPSG:2410 + EPSG:2411 + EPSG:2412 + EPSG:2413 + EPSG:2414 + EPSG:2415 + EPSG:2416 + EPSG:2417 + EPSG:2418 + EPSG:2419 + EPSG:2420 + EPSG:2421 + EPSG:2422 + EPSG:2423 + EPSG:2424 + EPSG:2425 + EPSG:2426 + EPSG:2427 + EPSG:2428 + EPSG:2429 + EPSG:2430 + EPSG:2431 + EPSG:2432 + EPSG:2433 + EPSG:2434 + EPSG:2435 + EPSG:2436 + EPSG:2437 + EPSG:2438 + EPSG:2439 + EPSG:2440 + EPSG:2441 + EPSG:2442 + EPSG:2443 + EPSG:2444 + EPSG:2445 + EPSG:2446 + EPSG:2447 + EPSG:2448 + EPSG:2449 + EPSG:2450 + EPSG:2451 + EPSG:2452 + EPSG:2453 + EPSG:2454 + EPSG:2455 + EPSG:2456 + EPSG:2457 + EPSG:2458 + EPSG:2459 + EPSG:2460 + EPSG:2461 + EPSG:2462 + EPSG:2463 + EPSG:2464 + EPSG:2465 + EPSG:2466 + EPSG:2467 + EPSG:2468 + EPSG:2469 + EPSG:2470 + EPSG:2471 + EPSG:2472 + EPSG:2473 + EPSG:2474 + EPSG:2475 + EPSG:2476 + EPSG:2477 + EPSG:2478 + EPSG:2479 + EPSG:2480 + EPSG:2481 + EPSG:2482 + EPSG:2483 + EPSG:2484 + EPSG:2485 + EPSG:2486 + EPSG:2487 + EPSG:2488 + EPSG:2489 + EPSG:2490 + EPSG:2491 + EPSG:2492 + EPSG:2493 + EPSG:2494 + EPSG:2495 + EPSG:2496 + EPSG:2497 + EPSG:2498 + EPSG:2499 + EPSG:2500 + EPSG:2501 + EPSG:2502 + EPSG:2503 + EPSG:2504 + EPSG:2505 + EPSG:2506 + EPSG:2507 + EPSG:2508 + EPSG:2509 + EPSG:2510 + EPSG:2511 + EPSG:2512 + EPSG:2513 + EPSG:2514 + EPSG:2515 + EPSG:2516 + EPSG:2517 + EPSG:2518 + EPSG:2519 + EPSG:2520 + EPSG:2521 + EPSG:2522 + EPSG:2523 + EPSG:2524 + EPSG:2525 + EPSG:2526 + EPSG:2527 + EPSG:2528 + EPSG:2529 + EPSG:2530 + EPSG:2531 + EPSG:2532 + EPSG:2533 + EPSG:2534 + EPSG:2535 + EPSG:2536 + EPSG:2537 + EPSG:2538 + EPSG:2539 + EPSG:2540 + EPSG:2541 + EPSG:2542 + EPSG:2543 + EPSG:2544 + EPSG:2545 + EPSG:2546 + EPSG:2547 + EPSG:2548 + EPSG:2549 + EPSG:2550 + EPSG:2551 + EPSG:2552 + EPSG:2553 + EPSG:2554 + EPSG:2555 + EPSG:2556 + EPSG:2557 + EPSG:2558 + EPSG:2559 + EPSG:2560 + EPSG:2561 + EPSG:2562 + EPSG:2563 + EPSG:2564 + EPSG:2565 + EPSG:2566 + EPSG:2567 + EPSG:2568 + EPSG:2569 + EPSG:2570 + EPSG:2571 + EPSG:2572 + EPSG:2573 + EPSG:2574 + EPSG:2575 + EPSG:2576 + EPSG:2577 + EPSG:2578 + EPSG:2579 + EPSG:2580 + EPSG:2581 + EPSG:2582 + EPSG:2583 + EPSG:2584 + EPSG:2585 + EPSG:2586 + EPSG:2587 + EPSG:2588 + EPSG:2589 + EPSG:2590 + EPSG:2591 + EPSG:2592 + EPSG:2593 + EPSG:2594 + EPSG:2595 + EPSG:2596 + EPSG:2597 + EPSG:2598 + EPSG:2599 + EPSG:2600 + EPSG:2601 + EPSG:2602 + EPSG:2603 + EPSG:2604 + EPSG:2605 + EPSG:2606 + EPSG:2607 + EPSG:2608 + EPSG:2609 + EPSG:2610 + EPSG:2611 + EPSG:2612 + EPSG:2613 + EPSG:2614 + EPSG:2615 + EPSG:2616 + EPSG:2617 + EPSG:2618 + EPSG:2619 + EPSG:2620 + EPSG:2621 + EPSG:2622 + EPSG:2623 + EPSG:2624 + EPSG:2625 + EPSG:2626 + EPSG:2627 + EPSG:2628 + EPSG:2629 + EPSG:2630 + EPSG:2631 + EPSG:2632 + EPSG:2633 + EPSG:2634 + EPSG:2635 + EPSG:2636 + EPSG:2637 + EPSG:2638 + EPSG:2639 + EPSG:2640 + EPSG:2641 + EPSG:2642 + EPSG:2643 + EPSG:2644 + EPSG:2645 + EPSG:2646 + EPSG:2647 + EPSG:2648 + EPSG:2649 + EPSG:2650 + EPSG:2651 + EPSG:2652 + EPSG:2653 + EPSG:2654 + EPSG:2655 + EPSG:2656 + EPSG:2657 + EPSG:2658 + EPSG:2659 + EPSG:2660 + EPSG:2661 + EPSG:2662 + EPSG:2663 + EPSG:2664 + EPSG:2665 + EPSG:2666 + EPSG:2667 + EPSG:2668 + EPSG:2669 + EPSG:2670 + EPSG:2671 + EPSG:2672 + EPSG:2673 + EPSG:2674 + EPSG:2675 + EPSG:2676 + EPSG:2677 + EPSG:2678 + EPSG:2679 + EPSG:2680 + EPSG:2681 + EPSG:2682 + EPSG:2683 + EPSG:2684 + EPSG:2685 + EPSG:2686 + EPSG:2687 + EPSG:2688 + EPSG:2689 + EPSG:2690 + EPSG:2691 + EPSG:2692 + EPSG:2693 + EPSG:2694 + EPSG:2695 + EPSG:2696 + EPSG:2697 + EPSG:2698 + EPSG:2699 + EPSG:2700 + EPSG:2701 + EPSG:2702 + EPSG:2703 + EPSG:2704 + EPSG:2705 + EPSG:2706 + EPSG:2707 + EPSG:2708 + EPSG:2709 + EPSG:2710 + EPSG:2711 + EPSG:2712 + EPSG:2713 + EPSG:2714 + EPSG:2715 + EPSG:2716 + EPSG:2717 + EPSG:2718 + EPSG:2719 + EPSG:2720 + EPSG:2721 + EPSG:2722 + EPSG:2723 + EPSG:2724 + EPSG:2725 + EPSG:2726 + EPSG:2727 + EPSG:2728 + EPSG:2729 + EPSG:2730 + EPSG:2731 + EPSG:2732 + EPSG:2733 + EPSG:2734 + EPSG:2735 + EPSG:2736 + EPSG:2737 + EPSG:2738 + EPSG:2739 + EPSG:2740 + EPSG:2741 + EPSG:2742 + EPSG:2743 + EPSG:2744 + EPSG:2745 + EPSG:2746 + EPSG:2747 + EPSG:2748 + EPSG:2749 + EPSG:2750 + EPSG:2751 + EPSG:2752 + EPSG:2753 + EPSG:2754 + EPSG:2755 + EPSG:2756 + EPSG:2757 + EPSG:2758 + EPSG:2759 + EPSG:2760 + EPSG:2761 + EPSG:2762 + EPSG:2763 + EPSG:2764 + EPSG:2765 + EPSG:2766 + EPSG:2767 + EPSG:2768 + EPSG:2769 + EPSG:2770 + EPSG:2771 + EPSG:2772 + EPSG:2773 + EPSG:2774 + EPSG:2775 + EPSG:2776 + EPSG:2777 + EPSG:2778 + EPSG:2779 + EPSG:2780 + EPSG:2781 + EPSG:2782 + EPSG:2783 + EPSG:2784 + EPSG:2785 + EPSG:2786 + EPSG:2787 + EPSG:2788 + EPSG:2789 + EPSG:2790 + EPSG:2791 + EPSG:2792 + EPSG:2793 + EPSG:2794 + EPSG:2795 + EPSG:2796 + EPSG:2797 + EPSG:2798 + EPSG:2799 + EPSG:2800 + EPSG:2801 + EPSG:2802 + EPSG:2803 + EPSG:2804 + EPSG:2805 + EPSG:2806 + EPSG:2807 + EPSG:2808 + EPSG:2809 + EPSG:2810 + EPSG:2811 + EPSG:2812 + EPSG:2813 + EPSG:2814 + EPSG:2815 + EPSG:2816 + EPSG:2817 + EPSG:2818 + EPSG:2819 + EPSG:2820 + EPSG:2821 + EPSG:2822 + EPSG:2823 + EPSG:2824 + EPSG:2825 + EPSG:2826 + EPSG:2827 + EPSG:2828 + EPSG:2829 + EPSG:2830 + EPSG:2831 + EPSG:2832 + EPSG:2833 + EPSG:2834 + EPSG:2835 + EPSG:2836 + EPSG:2837 + EPSG:2838 + EPSG:2839 + EPSG:2840 + EPSG:2841 + EPSG:2842 + EPSG:2843 + EPSG:2844 + EPSG:2845 + EPSG:2846 + EPSG:2847 + EPSG:2848 + EPSG:2849 + EPSG:2850 + EPSG:2851 + EPSG:2852 + EPSG:2853 + EPSG:2854 + EPSG:2855 + EPSG:2856 + EPSG:2857 + EPSG:2858 + EPSG:2859 + EPSG:2860 + EPSG:2861 + EPSG:2862 + EPSG:2863 + EPSG:2864 + EPSG:2865 + EPSG:2866 + EPSG:2867 + EPSG:2868 + EPSG:2869 + EPSG:2870 + EPSG:2871 + EPSG:2872 + EPSG:2873 + EPSG:2874 + EPSG:2875 + EPSG:2876 + EPSG:2877 + EPSG:2878 + EPSG:2879 + EPSG:2880 + EPSG:2881 + EPSG:2882 + EPSG:2883 + EPSG:2884 + EPSG:2885 + EPSG:2886 + EPSG:2887 + EPSG:2888 + EPSG:2889 + EPSG:2890 + EPSG:2891 + EPSG:2892 + EPSG:2893 + EPSG:2894 + EPSG:2895 + EPSG:2896 + EPSG:2897 + EPSG:2898 + EPSG:2899 + EPSG:2900 + EPSG:2901 + EPSG:2902 + EPSG:2903 + EPSG:2904 + EPSG:2905 + EPSG:2906 + EPSG:2907 + EPSG:2908 + EPSG:2909 + EPSG:2910 + EPSG:2911 + EPSG:2912 + EPSG:2913 + EPSG:2914 + EPSG:2915 + EPSG:2916 + EPSG:2917 + EPSG:2918 + EPSG:2919 + EPSG:2920 + EPSG:2921 + EPSG:2922 + EPSG:2923 + EPSG:2924 + EPSG:2925 + EPSG:2926 + EPSG:2927 + EPSG:2928 + EPSG:2929 + EPSG:2930 + EPSG:2931 + EPSG:2932 + EPSG:2933 + EPSG:2934 + EPSG:2935 + EPSG:2936 + EPSG:2937 + EPSG:2938 + EPSG:2939 + EPSG:2940 + EPSG:2941 + EPSG:2942 + EPSG:2943 + EPSG:2944 + EPSG:2945 + EPSG:2946 + EPSG:2947 + EPSG:2948 + EPSG:2949 + EPSG:2950 + EPSG:2951 + EPSG:2952 + EPSG:2953 + EPSG:2954 + EPSG:2955 + EPSG:2956 + EPSG:2957 + EPSG:2958 + EPSG:2959 + EPSG:2960 + EPSG:2961 + EPSG:2962 + EPSG:2963 + EPSG:2964 + EPSG:2965 + EPSG:2966 + EPSG:2967 + EPSG:2968 + EPSG:2969 + EPSG:2970 + EPSG:2971 + EPSG:2972 + EPSG:2973 + EPSG:2975 + EPSG:2976 + EPSG:2977 + EPSG:2978 + EPSG:2979 + EPSG:2980 + EPSG:2981 + EPSG:2982 + EPSG:2983 + EPSG:2984 + EPSG:2985 + EPSG:2986 + EPSG:2987 + EPSG:2988 + EPSG:2989 + EPSG:2990 + EPSG:2991 + EPSG:2992 + EPSG:2993 + EPSG:2994 + EPSG:2995 + EPSG:2996 + EPSG:2997 + EPSG:2998 + EPSG:2999 + EPSG:3000 + EPSG:3001 + EPSG:3002 + EPSG:3003 + EPSG:3004 + EPSG:3005 + EPSG:3006 + EPSG:3007 + EPSG:3008 + EPSG:3009 + EPSG:3010 + EPSG:3011 + EPSG:3012 + EPSG:3013 + EPSG:3014 + EPSG:3015 + EPSG:3016 + EPSG:3017 + EPSG:3018 + EPSG:3019 + EPSG:3020 + EPSG:3021 + EPSG:3022 + EPSG:3023 + EPSG:3024 + EPSG:3025 + EPSG:3026 + EPSG:3027 + EPSG:3028 + EPSG:3029 + EPSG:3030 + EPSG:3031 + EPSG:3032 + EPSG:3033 + EPSG:3034 + EPSG:3035 + EPSG:3036 + EPSG:3037 + EPSG:3038 + EPSG:3039 + EPSG:3040 + EPSG:3041 + EPSG:3042 + EPSG:3043 + EPSG:3044 + EPSG:3045 + EPSG:3046 + EPSG:3047 + EPSG:3048 + EPSG:3049 + EPSG:3050 + EPSG:3051 + EPSG:3052 + EPSG:3053 + EPSG:3054 + EPSG:3055 + EPSG:3056 + EPSG:3057 + EPSG:3058 + EPSG:3059 + EPSG:3060 + EPSG:3061 + EPSG:3062 + EPSG:3063 + EPSG:3064 + EPSG:3065 + EPSG:3066 + EPSG:3067 + EPSG:3068 + EPSG:3069 + EPSG:3070 + EPSG:3071 + EPSG:3072 + EPSG:3073 + EPSG:3074 + EPSG:3075 + EPSG:3076 + EPSG:3077 + EPSG:3078 + EPSG:3079 + EPSG:3080 + EPSG:3081 + EPSG:3082 + EPSG:3083 + EPSG:3084 + EPSG:3085 + EPSG:3086 + EPSG:3087 + EPSG:3088 + EPSG:3089 + EPSG:3090 + EPSG:3091 + EPSG:3092 + EPSG:3093 + EPSG:3094 + EPSG:3095 + EPSG:3096 + EPSG:3097 + EPSG:3098 + EPSG:3099 + EPSG:3100 + EPSG:3101 + EPSG:3102 + EPSG:3103 + EPSG:3104 + EPSG:3105 + EPSG:3106 + EPSG:3107 + EPSG:3108 + EPSG:3109 + EPSG:3110 + EPSG:3111 + EPSG:3112 + EPSG:3113 + EPSG:3114 + EPSG:3115 + EPSG:3116 + EPSG:3117 + EPSG:3118 + EPSG:3119 + EPSG:3120 + EPSG:3121 + EPSG:3122 + EPSG:3123 + EPSG:3124 + EPSG:3125 + EPSG:3126 + EPSG:3127 + EPSG:3128 + EPSG:3129 + EPSG:3130 + EPSG:3131 + EPSG:3132 + EPSG:3133 + EPSG:3134 + EPSG:3135 + EPSG:3136 + EPSG:3137 + EPSG:3138 + EPSG:3139 + EPSG:3140 + EPSG:3141 + EPSG:3142 + EPSG:3143 + EPSG:3144 + EPSG:3145 + EPSG:3146 + EPSG:3147 + EPSG:3148 + EPSG:3149 + EPSG:3150 + EPSG:3151 + EPSG:3152 + EPSG:3153 + EPSG:3154 + EPSG:3155 + EPSG:3156 + EPSG:3157 + EPSG:3158 + EPSG:3159 + EPSG:3160 + EPSG:3161 + EPSG:3162 + EPSG:3163 + EPSG:3164 + EPSG:3165 + EPSG:3166 + EPSG:3167 + EPSG:3168 + EPSG:3169 + EPSG:3170 + EPSG:3171 + EPSG:3172 + EPSG:3173 + EPSG:3174 + EPSG:3175 + EPSG:3176 + EPSG:3177 + EPSG:3178 + EPSG:3179 + EPSG:3180 + EPSG:3181 + EPSG:3182 + EPSG:3183 + EPSG:3184 + EPSG:3185 + EPSG:3186 + EPSG:3187 + EPSG:3188 + EPSG:3189 + EPSG:3190 + EPSG:3191 + EPSG:3192 + EPSG:3193 + EPSG:3194 + EPSG:3195 + EPSG:3196 + EPSG:3197 + EPSG:3198 + EPSG:3199 + EPSG:3200 + EPSG:3201 + EPSG:3202 + EPSG:3203 + EPSG:3204 + EPSG:3205 + EPSG:3206 + EPSG:3207 + EPSG:3208 + EPSG:3209 + EPSG:3210 + EPSG:3211 + EPSG:3212 + EPSG:3213 + EPSG:3214 + EPSG:3215 + EPSG:3216 + EPSG:3217 + EPSG:3218 + EPSG:3219 + EPSG:3220 + EPSG:3221 + EPSG:3222 + EPSG:3223 + EPSG:3224 + EPSG:3225 + EPSG:3226 + EPSG:3227 + EPSG:3228 + EPSG:3229 + EPSG:3230 + EPSG:3231 + EPSG:3232 + EPSG:3233 + EPSG:3234 + EPSG:3235 + EPSG:3236 + EPSG:3237 + EPSG:3238 + EPSG:3239 + EPSG:3240 + EPSG:3241 + EPSG:3242 + EPSG:3243 + EPSG:3244 + EPSG:3245 + EPSG:3246 + EPSG:3247 + EPSG:3248 + EPSG:3249 + EPSG:3250 + EPSG:3251 + EPSG:3252 + EPSG:3253 + EPSG:3254 + EPSG:3255 + EPSG:3256 + EPSG:3257 + EPSG:3258 + EPSG:3259 + EPSG:3260 + EPSG:3261 + EPSG:3262 + EPSG:3263 + EPSG:3264 + EPSG:3265 + EPSG:3266 + EPSG:3267 + EPSG:3268 + EPSG:3269 + EPSG:3270 + EPSG:3271 + EPSG:3272 + EPSG:3273 + EPSG:3274 + EPSG:3275 + EPSG:3276 + EPSG:3277 + EPSG:3278 + EPSG:3279 + EPSG:3280 + EPSG:3281 + EPSG:3282 + EPSG:3283 + EPSG:3284 + EPSG:3285 + EPSG:3286 + EPSG:3287 + EPSG:3288 + EPSG:3289 + EPSG:3290 + EPSG:3291 + EPSG:3292 + EPSG:3293 + EPSG:3294 + EPSG:3295 + EPSG:3296 + EPSG:3297 + EPSG:3298 + EPSG:3299 + EPSG:3300 + EPSG:3301 + EPSG:3302 + EPSG:3303 + EPSG:3304 + EPSG:3305 + EPSG:3306 + EPSG:3307 + EPSG:3308 + EPSG:3309 + EPSG:3310 + EPSG:3311 + EPSG:3312 + EPSG:3313 + EPSG:3314 + EPSG:3315 + EPSG:3316 + EPSG:3317 + EPSG:3318 + EPSG:3319 + EPSG:3320 + EPSG:3321 + EPSG:3322 + EPSG:3323 + EPSG:3324 + EPSG:3325 + EPSG:3326 + EPSG:3327 + EPSG:3328 + EPSG:3329 + EPSG:3330 + EPSG:3331 + EPSG:3332 + EPSG:3333 + EPSG:3334 + EPSG:3335 + EPSG:3336 + EPSG:3337 + EPSG:3338 + EPSG:3339 + EPSG:3340 + EPSG:3341 + EPSG:3342 + EPSG:3343 + EPSG:3344 + EPSG:3345 + EPSG:3346 + EPSG:3347 + EPSG:3348 + EPSG:3349 + EPSG:3350 + EPSG:3351 + EPSG:3352 + EPSG:3353 + EPSG:3354 + EPSG:3355 + EPSG:3356 + EPSG:3357 + EPSG:3358 + EPSG:3359 + EPSG:3360 + EPSG:3361 + EPSG:3362 + EPSG:3363 + EPSG:3364 + EPSG:3365 + EPSG:3366 + EPSG:3367 + EPSG:3368 + EPSG:3369 + EPSG:3370 + EPSG:3371 + EPSG:3372 + EPSG:3373 + EPSG:3374 + EPSG:3375 + EPSG:3376 + EPSG:3377 + EPSG:3378 + EPSG:3379 + EPSG:3380 + EPSG:3381 + EPSG:3382 + EPSG:3383 + EPSG:3384 + EPSG:3385 + EPSG:3386 + EPSG:3387 + EPSG:3388 + EPSG:3389 + EPSG:3390 + EPSG:3391 + EPSG:3392 + EPSG:3393 + EPSG:3394 + EPSG:3395 + EPSG:3396 + EPSG:3397 + EPSG:3398 + EPSG:3399 + EPSG:3400 + EPSG:3401 + EPSG:3402 + EPSG:3403 + EPSG:3404 + EPSG:3405 + EPSG:3406 + EPSG:3407 + EPSG:3408 + EPSG:3409 + EPSG:3410 + EPSG:3411 + EPSG:3412 + EPSG:3413 + EPSG:3414 + EPSG:3415 + EPSG:3416 + EPSG:3417 + EPSG:3418 + EPSG:3419 + EPSG:3420 + EPSG:3421 + EPSG:3422 + EPSG:3423 + EPSG:3424 + EPSG:3425 + EPSG:3426 + EPSG:3427 + EPSG:3428 + EPSG:3429 + EPSG:3430 + EPSG:3431 + EPSG:3432 + EPSG:3433 + EPSG:3434 + EPSG:3435 + EPSG:3436 + EPSG:3437 + EPSG:3438 + EPSG:3439 + EPSG:3440 + EPSG:3441 + EPSG:3442 + EPSG:3443 + EPSG:3444 + EPSG:3445 + EPSG:3446 + EPSG:3447 + EPSG:3448 + EPSG:3449 + EPSG:3450 + EPSG:3451 + EPSG:3452 + EPSG:3453 + EPSG:3454 + EPSG:3455 + EPSG:3456 + EPSG:3457 + EPSG:3458 + EPSG:3459 + EPSG:3460 + EPSG:3461 + EPSG:3462 + EPSG:3463 + EPSG:3464 + EPSG:3560 + EPSG:3561 + EPSG:3562 + EPSG:3563 + EPSG:3564 + EPSG:3565 + EPSG:3566 + EPSG:3567 + EPSG:3568 + EPSG:3569 + EPSG:3570 + EPSG:3571 + EPSG:3572 + EPSG:3573 + EPSG:3574 + EPSG:3575 + EPSG:3576 + EPSG:3577 + EPSG:3920 + EPSG:3991 + EPSG:3992 + EPSG:3993 + EPSG:4001 + EPSG:4002 + EPSG:4003 + EPSG:4004 + EPSG:4005 + EPSG:4006 + EPSG:4007 + EPSG:4008 + EPSG:4009 + EPSG:4010 + EPSG:4011 + EPSG:4012 + EPSG:4013 + EPSG:4014 + EPSG:4015 + EPSG:4016 + EPSG:4018 + EPSG:4019 + EPSG:4020 + EPSG:4021 + EPSG:4022 + EPSG:4024 + EPSG:4025 + EPSG:4027 + EPSG:4028 + EPSG:4029 + EPSG:4030 + EPSG:4031 + EPSG:4032 + EPSG:4033 + EPSG:4034 + EPSG:4035 + EPSG:4036 + EPSG:4041 + EPSG:4042 + EPSG:4043 + EPSG:4044 + EPSG:4045 + EPSG:4047 + EPSG:4052 + EPSG:4053 + EPSG:4054 + EPSG:4120 + EPSG:4121 + EPSG:4122 + EPSG:4123 + EPSG:4124 + EPSG:4125 + EPSG:4126 + EPSG:4127 + EPSG:4128 + EPSG:4129 + EPSG:4130 + EPSG:4131 + EPSG:4132 + EPSG:4133 + EPSG:4134 + EPSG:4135 + EPSG:4136 + EPSG:4137 + EPSG:4138 + EPSG:4139 + EPSG:4140 + EPSG:4141 + EPSG:4142 + EPSG:4143 + EPSG:4144 + EPSG:4145 + EPSG:4146 + EPSG:4147 + EPSG:4148 + EPSG:4149 + EPSG:4150 + EPSG:4151 + EPSG:4152 + EPSG:4153 + EPSG:4154 + EPSG:4155 + EPSG:4156 + EPSG:4157 + EPSG:4158 + EPSG:4159 + EPSG:4160 + EPSG:4161 + EPSG:4162 + EPSG:4163 + EPSG:4164 + EPSG:4165 + EPSG:4166 + EPSG:4167 + EPSG:4168 + EPSG:4169 + EPSG:4170 + EPSG:4171 + EPSG:4172 + EPSG:4173 + EPSG:4174 + EPSG:4175 + EPSG:4176 + EPSG:4178 + EPSG:4179 + EPSG:4180 + EPSG:4181 + EPSG:4182 + EPSG:4183 + EPSG:4184 + EPSG:4185 + EPSG:4188 + EPSG:4189 + EPSG:4190 + EPSG:4191 + EPSG:4192 + EPSG:4193 + EPSG:4194 + EPSG:4195 + EPSG:4196 + EPSG:4197 + EPSG:4198 + EPSG:4199 + EPSG:4200 + EPSG:4201 + EPSG:4202 + EPSG:4203 + EPSG:4204 + EPSG:4205 + EPSG:4206 + EPSG:4207 + EPSG:4208 + EPSG:4209 + EPSG:4210 + EPSG:4211 + EPSG:4212 + EPSG:4213 + EPSG:4214 + EPSG:4215 + EPSG:4216 + EPSG:4218 + EPSG:4219 + EPSG:4220 + EPSG:4221 + EPSG:4222 + EPSG:4223 + EPSG:4224 + EPSG:4225 + EPSG:4226 + EPSG:4227 + EPSG:4228 + EPSG:4229 + EPSG:4230 + EPSG:4231 + EPSG:4232 + EPSG:4233 + EPSG:4234 + EPSG:4235 + EPSG:4236 + EPSG:4237 + EPSG:4238 + EPSG:4239 + EPSG:4240 + EPSG:4241 + EPSG:4242 + EPSG:4243 + EPSG:4244 + EPSG:4245 + EPSG:4246 + EPSG:4247 + EPSG:4248 + EPSG:4249 + EPSG:4250 + EPSG:4251 + EPSG:4252 + EPSG:4253 + EPSG:4254 + EPSG:4255 + EPSG:4256 + EPSG:4257 + EPSG:4258 + EPSG:4259 + EPSG:4260 + EPSG:4261 + EPSG:4262 + EPSG:4263 + EPSG:4264 + EPSG:4265 + EPSG:4266 + EPSG:4267 + EPSG:4268 + EPSG:4269 + EPSG:4270 + EPSG:4271 + EPSG:4272 + EPSG:4273 + EPSG:4274 + EPSG:4275 + EPSG:4276 + EPSG:4277 + EPSG:4278 + EPSG:4279 + EPSG:4280 + EPSG:4281 + EPSG:4282 + EPSG:4283 + EPSG:4284 + EPSG:4285 + EPSG:4286 + EPSG:4287 + EPSG:4288 + EPSG:4289 + EPSG:4291 + EPSG:4292 + EPSG:4293 + EPSG:4294 + EPSG:4295 + EPSG:4296 + EPSG:4297 + EPSG:4298 + EPSG:4299 + EPSG:4300 + EPSG:4301 + EPSG:4302 + EPSG:4303 + EPSG:4304 + EPSG:4306 + EPSG:4307 + EPSG:4308 + EPSG:4309 + EPSG:4310 + EPSG:4311 + EPSG:4312 + EPSG:4313 + EPSG:4314 + EPSG:4315 + EPSG:4316 + EPSG:4317 + EPSG:4318 + EPSG:4319 + EPSG:4322 + EPSG:4324 + EPSG:4326 + EPSG:4327 + EPSG:4328 + EPSG:4329 + EPSG:4330 + EPSG:4331 + EPSG:4332 + EPSG:4333 + EPSG:4334 + EPSG:4335 + EPSG:4336 + EPSG:4337 + EPSG:4338 + EPSG:4339 + EPSG:4340 + EPSG:4341 + EPSG:4342 + EPSG:4343 + EPSG:4344 + EPSG:4345 + EPSG:4346 + EPSG:4347 + EPSG:4348 + EPSG:4349 + EPSG:4350 + EPSG:4351 + EPSG:4352 + EPSG:4353 + EPSG:4354 + EPSG:4355 + EPSG:4356 + EPSG:4357 + EPSG:4358 + EPSG:4359 + EPSG:4360 + EPSG:4361 + EPSG:4362 + EPSG:4363 + EPSG:4364 + EPSG:4365 + EPSG:4366 + EPSG:4367 + EPSG:4368 + EPSG:4369 + EPSG:4370 + EPSG:4371 + EPSG:4372 + EPSG:4373 + EPSG:4374 + EPSG:4375 + EPSG:4376 + EPSG:4377 + EPSG:4378 + EPSG:4379 + EPSG:4380 + EPSG:4381 + EPSG:4382 + EPSG:4383 + EPSG:4384 + EPSG:4385 + EPSG:4386 + EPSG:4387 + EPSG:4388 + EPSG:4389 + EPSG:4600 + EPSG:4601 + EPSG:4602 + EPSG:4603 + EPSG:4604 + EPSG:4605 + EPSG:4606 + EPSG:4607 + EPSG:4608 + EPSG:4609 + EPSG:4610 + EPSG:4611 + EPSG:4612 + EPSG:4613 + EPSG:4614 + EPSG:4615 + EPSG:4616 + EPSG:4617 + EPSG:4618 + EPSG:4619 + EPSG:4620 + EPSG:4621 + EPSG:4622 + EPSG:4623 + EPSG:4624 + EPSG:4625 + EPSG:4626 + EPSG:4627 + EPSG:4628 + EPSG:4629 + EPSG:4630 + EPSG:4631 + EPSG:4632 + EPSG:4633 + EPSG:4634 + EPSG:4635 + EPSG:4636 + EPSG:4637 + EPSG:4638 + EPSG:4639 + EPSG:4640 + EPSG:4641 + EPSG:4642 + EPSG:4643 + EPSG:4644 + EPSG:4645 + EPSG:4646 + EPSG:4657 + EPSG:4658 + EPSG:4659 + EPSG:4660 + EPSG:4661 + EPSG:4662 + EPSG:4663 + EPSG:4664 + EPSG:4665 + EPSG:4666 + EPSG:4667 + EPSG:4668 + EPSG:4669 + EPSG:4670 + EPSG:4671 + EPSG:4672 + EPSG:4673 + EPSG:4674 + EPSG:4675 + EPSG:4676 + EPSG:4677 + EPSG:4678 + EPSG:4679 + EPSG:4680 + EPSG:4681 + EPSG:4682 + EPSG:4683 + EPSG:4684 + EPSG:4685 + EPSG:4686 + EPSG:4687 + EPSG:4688 + EPSG:4689 + EPSG:4690 + EPSG:4691 + EPSG:4692 + EPSG:4693 + EPSG:4694 + EPSG:4695 + EPSG:4696 + EPSG:4697 + EPSG:4698 + EPSG:4699 + EPSG:4700 + EPSG:4701 + EPSG:4702 + EPSG:4703 + EPSG:4704 + EPSG:4705 + EPSG:4706 + EPSG:4707 + EPSG:4708 + EPSG:4709 + EPSG:4710 + EPSG:4711 + EPSG:4712 + EPSG:4713 + EPSG:4714 + EPSG:4715 + EPSG:4716 + EPSG:4717 + EPSG:4718 + EPSG:4719 + EPSG:4720 + EPSG:4721 + EPSG:4722 + EPSG:4723 + EPSG:4724 + EPSG:4725 + EPSG:4726 + EPSG:4727 + EPSG:4728 + EPSG:4729 + EPSG:4730 + EPSG:4731 + EPSG:4732 + EPSG:4733 + EPSG:4734 + EPSG:4735 + EPSG:4736 + EPSG:4737 + EPSG:4738 + EPSG:4739 + EPSG:4740 + EPSG:4741 + EPSG:4742 + EPSG:4743 + EPSG:4744 + EPSG:4745 + EPSG:4746 + EPSG:4747 + EPSG:4748 + EPSG:4749 + EPSG:4750 + EPSG:4751 + EPSG:4752 + EPSG:4753 + EPSG:4754 + EPSG:4755 + EPSG:4756 + EPSG:4757 + EPSG:4758 + EPSG:4801 + EPSG:4802 + EPSG:4803 + EPSG:4804 + EPSG:4805 + EPSG:4806 + EPSG:4807 + EPSG:4808 + EPSG:4809 + EPSG:4810 + EPSG:4811 + EPSG:4813 + EPSG:4814 + EPSG:4815 + EPSG:4816 + EPSG:4817 + EPSG:4818 + EPSG:4819 + EPSG:4820 + EPSG:4821 + EPSG:4894 + EPSG:4895 + EPSG:4896 + EPSG:4897 + EPSG:4898 + EPSG:4899 + EPSG:4900 + EPSG:4901 + EPSG:4902 + EPSG:4903 + EPSG:4904 + EPSG:4906 + EPSG:4907 + EPSG:4908 + EPSG:4909 + EPSG:4910 + EPSG:4911 + EPSG:4912 + EPSG:4913 + EPSG:4914 + EPSG:4915 + EPSG:4916 + EPSG:4917 + EPSG:4918 + EPSG:4919 + EPSG:4920 + EPSG:4921 + EPSG:4922 + EPSG:4923 + EPSG:4924 + EPSG:4925 + EPSG:4926 + EPSG:4927 + EPSG:4928 + EPSG:4929 + EPSG:4930 + EPSG:4931 + EPSG:4932 + EPSG:4933 + EPSG:4934 + EPSG:4935 + EPSG:4936 + EPSG:4937 + EPSG:4938 + EPSG:4939 + EPSG:4940 + EPSG:4941 + EPSG:4942 + EPSG:4943 + EPSG:4944 + EPSG:4945 + EPSG:4946 + EPSG:4947 + EPSG:4948 + EPSG:4949 + EPSG:4950 + EPSG:4951 + EPSG:4952 + EPSG:4953 + EPSG:4954 + EPSG:4955 + EPSG:4956 + EPSG:4957 + EPSG:4958 + EPSG:4959 + EPSG:4960 + EPSG:4961 + EPSG:4962 + EPSG:4963 + EPSG:4964 + EPSG:4965 + EPSG:4966 + EPSG:4967 + EPSG:4968 + EPSG:4969 + EPSG:4970 + EPSG:4971 + EPSG:4972 + EPSG:4973 + EPSG:4974 + EPSG:4975 + EPSG:4976 + EPSG:4977 + EPSG:4978 + EPSG:4979 + EPSG:4980 + EPSG:4981 + EPSG:4982 + EPSG:4983 + EPSG:4984 + EPSG:4985 + EPSG:4986 + EPSG:4987 + EPSG:4988 + EPSG:4989 + EPSG:4990 + EPSG:4991 + EPSG:4992 + EPSG:4993 + EPSG:4994 + EPSG:4995 + EPSG:4996 + EPSG:4997 + EPSG:4998 + EPSG:4999 + EPSG:5600 + EPSG:5601 + EPSG:5602 + EPSG:5603 + EPSG:5604 + EPSG:5605 + EPSG:5606 + EPSG:5607 + EPSG:5608 + EPSG:5609 + EPSG:5701 + EPSG:5702 + EPSG:5703 + EPSG:5704 + EPSG:5705 + EPSG:5706 + EPSG:5709 + EPSG:5710 + EPSG:5711 + EPSG:5712 + EPSG:5713 + EPSG:5714 + EPSG:5715 + EPSG:5716 + EPSG:5717 + EPSG:5718 + EPSG:5719 + EPSG:5720 + EPSG:5721 + EPSG:5722 + EPSG:5723 + EPSG:5724 + EPSG:5725 + EPSG:5726 + EPSG:5727 + EPSG:5728 + EPSG:5729 + EPSG:5730 + EPSG:5731 + EPSG:5732 + EPSG:5733 + EPSG:5734 + EPSG:5735 + EPSG:5736 + EPSG:5737 + EPSG:5738 + EPSG:5739 + EPSG:5740 + EPSG:5741 + EPSG:5742 + EPSG:5743 + EPSG:5744 + EPSG:5745 + EPSG:5746 + EPSG:5747 + EPSG:5748 + EPSG:5749 + EPSG:5750 + EPSG:5751 + EPSG:5752 + EPSG:5753 + EPSG:5754 + EPSG:5755 + EPSG:5756 + EPSG:5757 + EPSG:5758 + EPSG:5759 + EPSG:5760 + EPSG:5761 + EPSG:5762 + EPSG:5763 + EPSG:5764 + EPSG:5765 + EPSG:5766 + EPSG:5767 + EPSG:5768 + EPSG:5769 + EPSG:5770 + EPSG:5771 + EPSG:5772 + EPSG:5773 + EPSG:5774 + EPSG:5775 + EPSG:5776 + EPSG:5777 + EPSG:5778 + EPSG:5779 + EPSG:5780 + EPSG:5781 + EPSG:5782 + EPSG:5783 + EPSG:5784 + EPSG:5785 + EPSG:5786 + EPSG:5787 + EPSG:5788 + EPSG:5789 + EPSG:5790 + EPSG:5791 + EPSG:5792 + EPSG:5793 + EPSG:5794 + EPSG:5795 + EPSG:5796 + EPSG:5797 + EPSG:5798 + EPSG:5799 + EPSG:5800 + EPSG:5801 + EPSG:5802 + EPSG:5803 + EPSG:5804 + EPSG:5805 + EPSG:5806 + EPSG:5807 + EPSG:5808 + EPSG:5809 + EPSG:5810 + EPSG:5811 + EPSG:5812 + EPSG:5813 + EPSG:5814 + EPSG:5815 + EPSG:5816 + EPSG:5817 + EPSG:5818 + EPSG:7400 + EPSG:7401 + EPSG:7402 + EPSG:7403 + EPSG:7404 + EPSG:7405 + EPSG:7406 + EPSG:7407 + EPSG:7408 + EPSG:7409 + EPSG:7410 + EPSG:7411 + EPSG:7412 + EPSG:7413 + EPSG:7414 + EPSG:7415 + EPSG:7416 + EPSG:7417 + EPSG:7418 + EPSG:7419 + EPSG:7420 + EPSG:20004 + EPSG:20005 + EPSG:20006 + EPSG:20007 + EPSG:20008 + EPSG:20009 + EPSG:20010 + EPSG:20011 + EPSG:20012 + EPSG:20013 + EPSG:20014 + EPSG:20015 + EPSG:20016 + EPSG:20017 + EPSG:20018 + EPSG:20019 + EPSG:20020 + EPSG:20021 + EPSG:20022 + EPSG:20023 + EPSG:20024 + EPSG:20025 + EPSG:20026 + EPSG:20027 + EPSG:20028 + EPSG:20029 + EPSG:20030 + EPSG:20031 + EPSG:20032 + EPSG:20064 + EPSG:20065 + EPSG:20066 + EPSG:20067 + EPSG:20068 + EPSG:20069 + EPSG:20070 + EPSG:20071 + EPSG:20072 + EPSG:20073 + EPSG:20074 + EPSG:20075 + EPSG:20076 + EPSG:20077 + EPSG:20078 + EPSG:20079 + EPSG:20080 + EPSG:20081 + EPSG:20082 + EPSG:20083 + EPSG:20084 + EPSG:20085 + EPSG:20086 + EPSG:20087 + EPSG:20088 + EPSG:20089 + EPSG:20090 + EPSG:20091 + EPSG:20092 + EPSG:20135 + EPSG:20136 + EPSG:20137 + EPSG:20138 + EPSG:20248 + EPSG:20249 + EPSG:20250 + EPSG:20251 + EPSG:20252 + EPSG:20253 + EPSG:20254 + EPSG:20255 + EPSG:20256 + EPSG:20257 + EPSG:20258 + EPSG:20348 + EPSG:20349 + EPSG:20350 + EPSG:20351 + EPSG:20352 + EPSG:20353 + EPSG:20354 + EPSG:20355 + EPSG:20356 + EPSG:20357 + EPSG:20358 + EPSG:20436 + EPSG:20437 + EPSG:20438 + EPSG:20439 + EPSG:20440 + EPSG:20499 + EPSG:20538 + EPSG:20539 + EPSG:20790 + EPSG:20791 + EPSG:20822 + EPSG:20823 + EPSG:20824 + EPSG:20934 + EPSG:20935 + EPSG:20936 + EPSG:21035 + EPSG:21036 + EPSG:21037 + EPSG:21095 + EPSG:21096 + EPSG:21097 + EPSG:21100 + EPSG:21148 + EPSG:21149 + EPSG:21150 + EPSG:21291 + EPSG:21292 + EPSG:21413 + EPSG:21414 + EPSG:21415 + EPSG:21416 + EPSG:21417 + EPSG:21418 + EPSG:21419 + EPSG:21420 + EPSG:21421 + EPSG:21422 + EPSG:21423 + EPSG:21453 + EPSG:21454 + EPSG:21455 + EPSG:21456 + EPSG:21457 + EPSG:21458 + EPSG:21459 + EPSG:21460 + EPSG:21461 + EPSG:21462 + EPSG:21463 + EPSG:21473 + EPSG:21474 + EPSG:21475 + EPSG:21476 + EPSG:21477 + EPSG:21478 + EPSG:21479 + EPSG:21480 + EPSG:21481 + EPSG:21482 + EPSG:21483 + EPSG:21500 + EPSG:21780 + EPSG:21781 + EPSG:21817 + EPSG:21818 + EPSG:21891 + EPSG:21892 + EPSG:21893 + EPSG:21894 + EPSG:21896 + EPSG:21897 + EPSG:21898 + EPSG:21899 + EPSG:22032 + EPSG:22033 + EPSG:22091 + EPSG:22092 + EPSG:22171 + EPSG:22172 + EPSG:22173 + EPSG:22174 + EPSG:22175 + EPSG:22176 + EPSG:22177 + EPSG:22181 + EPSG:22182 + EPSG:22183 + EPSG:22184 + EPSG:22185 + EPSG:22186 + EPSG:22187 + EPSG:22191 + EPSG:22192 + EPSG:22193 + EPSG:22194 + EPSG:22195 + EPSG:22196 + EPSG:22197 + EPSG:22234 + EPSG:22235 + EPSG:22236 + EPSG:22275 + EPSG:22277 + EPSG:22279 + EPSG:22281 + EPSG:22283 + EPSG:22285 + EPSG:22287 + EPSG:22289 + EPSG:22291 + EPSG:22293 + EPSG:22300 + EPSG:22332 + EPSG:22391 + EPSG:22392 + EPSG:22521 + EPSG:22522 + EPSG:22523 + EPSG:22524 + EPSG:22525 + EPSG:22700 + EPSG:22770 + EPSG:22780 + EPSG:22832 + EPSG:22991 + EPSG:22992 + EPSG:22993 + EPSG:22994 + EPSG:23028 + EPSG:23029 + EPSG:23030 + EPSG:23031 + EPSG:23032 + EPSG:23033 + EPSG:23034 + EPSG:23035 + EPSG:23036 + EPSG:23037 + EPSG:23038 + EPSG:23090 + EPSG:23095 + EPSG:23239 + EPSG:23240 + EPSG:23433 + EPSG:23700 + EPSG:23846 + EPSG:23847 + EPSG:23848 + EPSG:23849 + EPSG:23850 + EPSG:23851 + EPSG:23852 + EPSG:23853 + EPSG:23866 + EPSG:23867 + EPSG:23868 + EPSG:23869 + EPSG:23870 + EPSG:23871 + EPSG:23872 + EPSG:23877 + EPSG:23878 + EPSG:23879 + EPSG:23880 + EPSG:23881 + EPSG:23882 + EPSG:23883 + EPSG:23884 + EPSG:23886 + EPSG:23887 + EPSG:23888 + EPSG:23889 + EPSG:23890 + EPSG:23891 + EPSG:23892 + EPSG:23893 + EPSG:23894 + EPSG:23946 + EPSG:23947 + EPSG:23948 + EPSG:24047 + EPSG:24048 + EPSG:24100 + EPSG:24200 + EPSG:24305 + EPSG:24306 + EPSG:24311 + EPSG:24312 + EPSG:24313 + EPSG:24342 + EPSG:24343 + EPSG:24344 + EPSG:24345 + EPSG:24346 + EPSG:24347 + EPSG:24370 + EPSG:24371 + EPSG:24372 + EPSG:24373 + EPSG:24374 + EPSG:24375 + EPSG:24376 + EPSG:24377 + EPSG:24378 + EPSG:24379 + EPSG:24380 + EPSG:24381 + EPSG:24382 + EPSG:24383 + EPSG:24500 + EPSG:24547 + EPSG:24548 + EPSG:24571 + EPSG:24600 + EPSG:24718 + EPSG:24719 + EPSG:24720 + EPSG:24817 + EPSG:24818 + EPSG:24819 + EPSG:24820 + EPSG:24821 + EPSG:24877 + EPSG:24878 + EPSG:24879 + EPSG:24880 + EPSG:24881 + EPSG:24882 + EPSG:24891 + EPSG:24892 + EPSG:24893 + EPSG:25000 + EPSG:25231 + EPSG:25391 + EPSG:25392 + EPSG:25393 + EPSG:25394 + EPSG:25395 + EPSG:25700 + EPSG:25828 + EPSG:25829 + EPSG:25830 + EPSG:25831 + EPSG:25832 + EPSG:25833 + EPSG:25834 + EPSG:25835 + EPSG:25836 + EPSG:25837 + EPSG:25838 + EPSG:25884 + EPSG:25932 + EPSG:26191 + EPSG:26192 + EPSG:26193 + EPSG:26194 + EPSG:26195 + EPSG:26237 + EPSG:26331 + EPSG:26332 + EPSG:26391 + EPSG:26392 + EPSG:26393 + EPSG:26432 + EPSG:26591 + EPSG:26592 + EPSG:26632 + EPSG:26692 + EPSG:26701 + EPSG:26702 + EPSG:26703 + EPSG:26704 + EPSG:26705 + EPSG:26706 + EPSG:26707 + EPSG:26708 + EPSG:26709 + EPSG:26710 + EPSG:26711 + EPSG:26712 + EPSG:26713 + EPSG:26714 + EPSG:26715 + EPSG:26716 + EPSG:26717 + EPSG:26718 + EPSG:26719 + EPSG:26720 + EPSG:26721 + EPSG:26722 + EPSG:26729 + EPSG:26730 + EPSG:26731 + EPSG:26732 + EPSG:26733 + EPSG:26734 + EPSG:26735 + EPSG:26736 + EPSG:26737 + EPSG:26738 + EPSG:26739 + EPSG:26740 + EPSG:26741 + EPSG:26742 + EPSG:26743 + EPSG:26744 + EPSG:26745 + EPSG:26746 + EPSG:26747 + EPSG:26748 + EPSG:26749 + EPSG:26750 + EPSG:26751 + EPSG:26752 + EPSG:26753 + EPSG:26754 + EPSG:26755 + EPSG:26756 + EPSG:26757 + EPSG:26758 + EPSG:26759 + EPSG:26760 + EPSG:26766 + EPSG:26767 + EPSG:26768 + EPSG:26769 + EPSG:26770 + EPSG:26771 + EPSG:26772 + EPSG:26773 + EPSG:26774 + EPSG:26775 + EPSG:26776 + EPSG:26777 + EPSG:26778 + EPSG:26779 + EPSG:26780 + EPSG:26781 + EPSG:26782 + EPSG:26783 + EPSG:26784 + EPSG:26785 + EPSG:26786 + EPSG:26787 + EPSG:26791 + EPSG:26792 + EPSG:26793 + EPSG:26794 + EPSG:26795 + EPSG:26796 + EPSG:26797 + EPSG:26798 + EPSG:26799 + EPSG:26801 + EPSG:26802 + EPSG:26803 + EPSG:26811 + EPSG:26812 + EPSG:26813 + EPSG:26901 + EPSG:26902 + EPSG:26903 + EPSG:26904 + EPSG:26905 + EPSG:26906 + EPSG:26907 + EPSG:26908 + EPSG:26909 + EPSG:26910 + EPSG:26911 + EPSG:26912 + EPSG:26913 + EPSG:26914 + EPSG:26915 + EPSG:26916 + EPSG:26917 + EPSG:26918 + EPSG:26919 + EPSG:26920 + EPSG:26921 + EPSG:26922 + EPSG:26923 + EPSG:26929 + EPSG:26930 + EPSG:26931 + EPSG:26932 + EPSG:26933 + EPSG:26934 + EPSG:26935 + EPSG:26936 + EPSG:26937 + EPSG:26938 + EPSG:26939 + EPSG:26940 + EPSG:26941 + EPSG:26942 + EPSG:26943 + EPSG:26944 + EPSG:26945 + EPSG:26946 + EPSG:26948 + EPSG:26949 + EPSG:26950 + EPSG:26951 + EPSG:26952 + EPSG:26953 + EPSG:26954 + EPSG:26955 + EPSG:26956 + EPSG:26957 + EPSG:26958 + EPSG:26959 + EPSG:26960 + EPSG:26961 + EPSG:26962 + EPSG:26963 + EPSG:26964 + EPSG:26965 + EPSG:26966 + EPSG:26967 + EPSG:26968 + EPSG:26969 + EPSG:26970 + EPSG:26971 + EPSG:26972 + EPSG:26973 + EPSG:26974 + EPSG:26975 + EPSG:26976 + EPSG:26977 + EPSG:26978 + EPSG:26979 + EPSG:26980 + EPSG:26981 + EPSG:26982 + EPSG:26983 + EPSG:26984 + EPSG:26985 + EPSG:26986 + EPSG:26987 + EPSG:26988 + EPSG:26989 + EPSG:26990 + EPSG:26991 + EPSG:26992 + EPSG:26993 + EPSG:26994 + EPSG:26995 + EPSG:26996 + EPSG:26997 + EPSG:26998 + EPSG:27037 + EPSG:27038 + EPSG:27039 + EPSG:27040 + EPSG:27120 + EPSG:27200 + EPSG:27205 + EPSG:27206 + EPSG:27207 + EPSG:27208 + EPSG:27209 + EPSG:27210 + EPSG:27211 + EPSG:27212 + EPSG:27213 + EPSG:27214 + EPSG:27215 + EPSG:27216 + EPSG:27217 + EPSG:27218 + EPSG:27219 + EPSG:27220 + EPSG:27221 + EPSG:27222 + EPSG:27223 + EPSG:27224 + EPSG:27225 + EPSG:27226 + EPSG:27227 + EPSG:27228 + EPSG:27229 + EPSG:27230 + EPSG:27231 + EPSG:27232 + EPSG:27258 + EPSG:27259 + EPSG:27260 + EPSG:27291 + EPSG:27292 + EPSG:27391 + EPSG:27392 + EPSG:27393 + EPSG:27394 + EPSG:27395 + EPSG:27396 + EPSG:27397 + EPSG:27398 + EPSG:27429 + EPSG:27492 + EPSG:27500 + EPSG:27561 + EPSG:27562 + EPSG:27563 + EPSG:27564 + EPSG:27571 + EPSG:27572 + EPSG:27573 + EPSG:27574 + EPSG:27581 + EPSG:27582 + EPSG:27583 + EPSG:27584 + EPSG:27591 + EPSG:27592 + EPSG:27593 + EPSG:27594 + EPSG:27700 + EPSG:28191 + EPSG:28192 + EPSG:28193 + EPSG:28232 + EPSG:28348 + EPSG:28349 + EPSG:28350 + EPSG:28351 + EPSG:28352 + EPSG:28353 + EPSG:28354 + EPSG:28355 + EPSG:28356 + EPSG:28357 + EPSG:28358 + EPSG:28402 + EPSG:28403 + EPSG:28404 + EPSG:28405 + EPSG:28406 + EPSG:28407 + EPSG:28408 + EPSG:28409 + EPSG:28410 + EPSG:28411 + EPSG:28412 + EPSG:28413 + EPSG:28414 + EPSG:28415 + EPSG:28416 + EPSG:28417 + EPSG:28418 + EPSG:28419 + EPSG:28420 + EPSG:28421 + EPSG:28422 + EPSG:28423 + EPSG:28424 + EPSG:28425 + EPSG:28426 + EPSG:28427 + EPSG:28428 + EPSG:28429 + EPSG:28430 + EPSG:28431 + EPSG:28432 + EPSG:28462 + EPSG:28463 + EPSG:28464 + EPSG:28465 + EPSG:28466 + EPSG:28467 + EPSG:28468 + EPSG:28469 + EPSG:28470 + EPSG:28471 + EPSG:28472 + EPSG:28473 + EPSG:28474 + EPSG:28475 + EPSG:28476 + EPSG:28477 + EPSG:28478 + EPSG:28479 + EPSG:28480 + EPSG:28481 + EPSG:28482 + EPSG:28483 + EPSG:28484 + EPSG:28485 + EPSG:28486 + EPSG:28487 + EPSG:28488 + EPSG:28489 + EPSG:28490 + EPSG:28491 + EPSG:28492 + EPSG:28600 + EPSG:28991 + EPSG:28992 + EPSG:29100 + EPSG:29101 + EPSG:29118 + EPSG:29119 + EPSG:29120 + EPSG:29121 + EPSG:29122 + EPSG:29168 + EPSG:29169 + EPSG:29170 + EPSG:29171 + EPSG:29172 + EPSG:29177 + EPSG:29178 + EPSG:29179 + EPSG:29180 + EPSG:29181 + EPSG:29182 + EPSG:29183 + EPSG:29184 + EPSG:29185 + EPSG:29187 + EPSG:29188 + EPSG:29189 + EPSG:29190 + EPSG:29191 + EPSG:29192 + EPSG:29193 + EPSG:29194 + EPSG:29195 + EPSG:29220 + EPSG:29221 + EPSG:29333 + EPSG:29371 + EPSG:29373 + EPSG:29375 + EPSG:29377 + EPSG:29379 + EPSG:29381 + EPSG:29383 + EPSG:29385 + EPSG:29635 + EPSG:29636 + EPSG:29700 + EPSG:29701 + EPSG:29702 + EPSG:29738 + EPSG:29739 + EPSG:29849 + EPSG:29850 + EPSG:29871 + EPSG:29872 + EPSG:29873 + EPSG:29900 + EPSG:29901 + EPSG:29902 + EPSG:29903 + EPSG:30161 + EPSG:30162 + EPSG:30163 + EPSG:30164 + EPSG:30165 + EPSG:30166 + EPSG:30167 + EPSG:30168 + EPSG:30169 + EPSG:30170 + EPSG:30171 + EPSG:30172 + EPSG:30173 + EPSG:30174 + EPSG:30175 + EPSG:30176 + EPSG:30177 + EPSG:30178 + EPSG:30179 + EPSG:30200 + EPSG:30339 + EPSG:30340 + EPSG:30491 + EPSG:30492 + EPSG:30493 + EPSG:30494 + EPSG:30729 + EPSG:30730 + EPSG:30731 + EPSG:30732 + EPSG:30791 + EPSG:30792 + EPSG:30800 + EPSG:31028 + EPSG:31121 + EPSG:31154 + EPSG:31170 + EPSG:31171 + EPSG:31251 + EPSG:31252 + EPSG:31253 + EPSG:31254 + EPSG:31255 + EPSG:31256 + EPSG:31257 + EPSG:31258 + EPSG:31259 + EPSG:31265 + EPSG:31266 + EPSG:31267 + EPSG:31268 + EPSG:31275 + EPSG:31276 + EPSG:31277 + EPSG:31278 + EPSG:31279 + EPSG:31281 + EPSG:31282 + EPSG:31283 + EPSG:31284 + EPSG:31285 + EPSG:31286 + EPSG:31287 + EPSG:31288 + EPSG:31289 + EPSG:31290 + EPSG:31291 + EPSG:31292 + EPSG:31293 + EPSG:31294 + EPSG:31295 + EPSG:31296 + EPSG:31297 + EPSG:31300 + EPSG:31370 + EPSG:31461 + EPSG:31462 + EPSG:31463 + EPSG:31464 + EPSG:31465 + EPSG:31466 + EPSG:31467 + EPSG:31468 + EPSG:31469 + EPSG:31528 + EPSG:31529 + EPSG:31600 + EPSG:31700 + EPSG:31838 + EPSG:31839 + EPSG:31900 + EPSG:31901 + EPSG:31965 + EPSG:31966 + EPSG:31967 + EPSG:31968 + EPSG:31969 + EPSG:31970 + EPSG:31971 + EPSG:31972 + EPSG:31973 + EPSG:31974 + EPSG:31975 + EPSG:31976 + EPSG:31977 + EPSG:31978 + EPSG:31979 + EPSG:31980 + EPSG:31981 + EPSG:31982 + EPSG:31983 + EPSG:31984 + EPSG:31985 + EPSG:31986 + EPSG:31987 + EPSG:31988 + EPSG:31989 + EPSG:31990 + EPSG:31991 + EPSG:31992 + EPSG:31993 + EPSG:31994 + EPSG:31995 + EPSG:31996 + EPSG:31997 + EPSG:31998 + EPSG:31999 + EPSG:32000 + EPSG:32001 + EPSG:32002 + EPSG:32003 + EPSG:32005 + EPSG:32006 + EPSG:32007 + EPSG:32008 + EPSG:32009 + EPSG:32010 + EPSG:32011 + EPSG:32012 + EPSG:32013 + EPSG:32014 + EPSG:32015 + EPSG:32016 + EPSG:32017 + EPSG:32018 + EPSG:32019 + EPSG:32020 + EPSG:32021 + EPSG:32022 + EPSG:32023 + EPSG:32024 + EPSG:32025 + EPSG:32026 + EPSG:32027 + EPSG:32028 + EPSG:32029 + EPSG:32030 + EPSG:32031 + EPSG:32033 + EPSG:32034 + EPSG:32035 + EPSG:32036 + EPSG:32037 + EPSG:32038 + EPSG:32039 + EPSG:32040 + EPSG:32041 + EPSG:32042 + EPSG:32043 + EPSG:32044 + EPSG:32045 + EPSG:32046 + EPSG:32047 + EPSG:32048 + EPSG:32049 + EPSG:32050 + EPSG:32051 + EPSG:32052 + EPSG:32053 + EPSG:32054 + EPSG:32055 + EPSG:32056 + EPSG:32057 + EPSG:32058 + EPSG:32061 + EPSG:32062 + EPSG:32064 + EPSG:32065 + EPSG:32066 + EPSG:32067 + EPSG:32074 + EPSG:32075 + EPSG:32076 + EPSG:32077 + EPSG:32081 + EPSG:32082 + EPSG:32083 + EPSG:32084 + EPSG:32085 + EPSG:32086 + EPSG:32098 + EPSG:32099 + EPSG:32100 + EPSG:32104 + EPSG:32107 + EPSG:32108 + EPSG:32109 + EPSG:32110 + EPSG:32111 + EPSG:32112 + EPSG:32113 + EPSG:32114 + EPSG:32115 + EPSG:32116 + EPSG:32117 + EPSG:32118 + EPSG:32119 + EPSG:32120 + EPSG:32121 + EPSG:32122 + EPSG:32123 + EPSG:32124 + EPSG:32125 + EPSG:32126 + EPSG:32127 + EPSG:32128 + EPSG:32129 + EPSG:32130 + EPSG:32133 + EPSG:32134 + EPSG:32135 + EPSG:32136 + EPSG:32137 + EPSG:32138 + EPSG:32139 + EPSG:32140 + EPSG:32141 + EPSG:32142 + EPSG:32143 + EPSG:32144 + EPSG:32145 + EPSG:32146 + EPSG:32147 + EPSG:32148 + EPSG:32149 + EPSG:32150 + EPSG:32151 + EPSG:32152 + EPSG:32153 + EPSG:32154 + EPSG:32155 + EPSG:32156 + EPSG:32157 + EPSG:32158 + EPSG:32161 + EPSG:32164 + EPSG:32165 + EPSG:32166 + EPSG:32167 + EPSG:32180 + EPSG:32181 + EPSG:32182 + EPSG:32183 + EPSG:32184 + EPSG:32185 + EPSG:32186 + EPSG:32187 + EPSG:32188 + EPSG:32189 + EPSG:32190 + EPSG:32191 + EPSG:32192 + EPSG:32193 + EPSG:32194 + EPSG:32195 + EPSG:32196 + EPSG:32197 + EPSG:32198 + EPSG:32199 + EPSG:32201 + EPSG:32202 + EPSG:32203 + EPSG:32204 + EPSG:32205 + EPSG:32206 + EPSG:32207 + EPSG:32208 + EPSG:32209 + EPSG:32210 + EPSG:32211 + EPSG:32212 + EPSG:32213 + EPSG:32214 + EPSG:32215 + EPSG:32216 + EPSG:32217 + EPSG:32218 + EPSG:32219 + EPSG:32220 + EPSG:32221 + EPSG:32222 + EPSG:32223 + EPSG:32224 + EPSG:32225 + EPSG:32226 + EPSG:32227 + EPSG:32228 + EPSG:32229 + EPSG:32230 + EPSG:32231 + EPSG:32232 + EPSG:32233 + EPSG:32234 + EPSG:32235 + EPSG:32236 + EPSG:32237 + EPSG:32238 + EPSG:32239 + EPSG:32240 + EPSG:32241 + EPSG:32242 + EPSG:32243 + EPSG:32244 + EPSG:32245 + EPSG:32246 + EPSG:32247 + EPSG:32248 + EPSG:32249 + EPSG:32250 + EPSG:32251 + EPSG:32252 + EPSG:32253 + EPSG:32254 + EPSG:32255 + EPSG:32256 + EPSG:32257 + EPSG:32258 + EPSG:32259 + EPSG:32260 + EPSG:32301 + EPSG:32302 + EPSG:32303 + EPSG:32304 + EPSG:32305 + EPSG:32306 + EPSG:32307 + EPSG:32308 + EPSG:32309 + EPSG:32310 + EPSG:32311 + EPSG:32312 + EPSG:32313 + EPSG:32314 + EPSG:32315 + EPSG:32316 + EPSG:32317 + EPSG:32318 + EPSG:32319 + EPSG:32320 + EPSG:32321 + EPSG:32322 + EPSG:32323 + EPSG:32324 + EPSG:32325 + EPSG:32326 + EPSG:32327 + EPSG:32328 + EPSG:32329 + EPSG:32330 + EPSG:32331 + EPSG:32332 + EPSG:32333 + EPSG:32334 + EPSG:32335 + EPSG:32336 + EPSG:32337 + EPSG:32338 + EPSG:32339 + EPSG:32340 + EPSG:32341 + EPSG:32342 + EPSG:32343 + EPSG:32344 + EPSG:32345 + EPSG:32346 + EPSG:32347 + EPSG:32348 + EPSG:32349 + EPSG:32350 + EPSG:32351 + EPSG:32352 + EPSG:32353 + EPSG:32354 + EPSG:32355 + EPSG:32356 + EPSG:32357 + EPSG:32358 + EPSG:32359 + EPSG:32360 + EPSG:32401 + EPSG:32402 + EPSG:32403 + EPSG:32404 + EPSG:32405 + EPSG:32406 + EPSG:32407 + EPSG:32408 + EPSG:32409 + EPSG:32410 + EPSG:32411 + EPSG:32412 + EPSG:32413 + EPSG:32414 + EPSG:32415 + EPSG:32416 + EPSG:32417 + EPSG:32418 + EPSG:32419 + EPSG:32420 + EPSG:32421 + EPSG:32422 + EPSG:32423 + EPSG:32424 + EPSG:32425 + EPSG:32426 + EPSG:32427 + EPSG:32428 + EPSG:32429 + EPSG:32430 + EPSG:32431 + EPSG:32432 + EPSG:32433 + EPSG:32434 + EPSG:32435 + EPSG:32436 + EPSG:32437 + EPSG:32438 + EPSG:32439 + EPSG:32440 + EPSG:32441 + EPSG:32442 + EPSG:32443 + EPSG:32444 + EPSG:32445 + EPSG:32446 + EPSG:32447 + EPSG:32448 + EPSG:32449 + EPSG:32450 + EPSG:32451 + EPSG:32452 + EPSG:32453 + EPSG:32454 + EPSG:32455 + EPSG:32456 + EPSG:32457 + EPSG:32458 + EPSG:32459 + EPSG:32460 + EPSG:32501 + EPSG:32502 + EPSG:32503 + EPSG:32504 + EPSG:32505 + EPSG:32506 + EPSG:32507 + EPSG:32508 + EPSG:32509 + EPSG:32510 + EPSG:32511 + EPSG:32512 + EPSG:32513 + EPSG:32514 + EPSG:32515 + EPSG:32516 + EPSG:32517 + EPSG:32518 + EPSG:32519 + EPSG:32520 + EPSG:32521 + EPSG:32522 + EPSG:32523 + EPSG:32524 + EPSG:32525 + EPSG:32526 + EPSG:32527 + EPSG:32528 + EPSG:32529 + EPSG:32530 + EPSG:32531 + EPSG:32532 + EPSG:32533 + EPSG:32534 + EPSG:32535 + EPSG:32536 + EPSG:32537 + EPSG:32538 + EPSG:32539 + EPSG:32540 + EPSG:32541 + EPSG:32542 + EPSG:32543 + EPSG:32544 + EPSG:32545 + EPSG:32546 + EPSG:32547 + EPSG:32548 + EPSG:32549 + EPSG:32550 + EPSG:32551 + EPSG:32552 + EPSG:32553 + EPSG:32554 + EPSG:32555 + EPSG:32556 + EPSG:32557 + EPSG:32558 + EPSG:32559 + EPSG:32560 + EPSG:32600 + EPSG:32601 + EPSG:32602 + EPSG:32603 + EPSG:32604 + EPSG:32605 + EPSG:32606 + EPSG:32607 + EPSG:32608 + EPSG:32609 + EPSG:32610 + EPSG:32611 + EPSG:32612 + EPSG:32613 + EPSG:32614 + EPSG:32615 + EPSG:32616 + EPSG:32617 + EPSG:32618 + EPSG:32619 + EPSG:32620 + EPSG:32621 + EPSG:32622 + EPSG:32623 + EPSG:32624 + EPSG:32625 + EPSG:32626 + EPSG:32627 + EPSG:32628 + EPSG:32629 + EPSG:32630 + EPSG:32631 + EPSG:32632 + EPSG:32633 + EPSG:32634 + EPSG:32635 + EPSG:32636 + EPSG:32637 + EPSG:32638 + EPSG:32639 + EPSG:32640 + EPSG:32641 + EPSG:32642 + EPSG:32643 + EPSG:32644 + EPSG:32645 + EPSG:32646 + EPSG:32647 + EPSG:32648 + EPSG:32649 + EPSG:32650 + EPSG:32651 + EPSG:32652 + EPSG:32653 + EPSG:32654 + EPSG:32655 + EPSG:32656 + EPSG:32657 + EPSG:32658 + EPSG:32659 + EPSG:32660 + EPSG:32661 + EPSG:32662 + EPSG:32664 + EPSG:32665 + EPSG:32666 + EPSG:32667 + EPSG:32700 + EPSG:32701 + EPSG:32702 + EPSG:32703 + EPSG:32704 + EPSG:32705 + EPSG:32706 + EPSG:32707 + EPSG:32708 + EPSG:32709 + EPSG:32710 + EPSG:32711 + EPSG:32712 + EPSG:32713 + EPSG:32714 + EPSG:32715 + EPSG:32716 + EPSG:32717 + EPSG:32718 + EPSG:32719 + EPSG:32720 + EPSG:32721 + EPSG:32722 + EPSG:32723 + EPSG:32724 + EPSG:32725 + EPSG:32726 + EPSG:32727 + EPSG:32728 + EPSG:32729 + EPSG:32730 + EPSG:32731 + EPSG:32732 + EPSG:32733 + EPSG:32734 + EPSG:32735 + EPSG:32736 + EPSG:32737 + EPSG:32738 + EPSG:32739 + EPSG:32740 + EPSG:32741 + EPSG:32742 + EPSG:32743 + EPSG:32744 + EPSG:32745 + EPSG:32746 + EPSG:32747 + EPSG:32748 + EPSG:32749 + EPSG:32750 + EPSG:32751 + EPSG:32752 + EPSG:32753 + EPSG:32754 + EPSG:32755 + EPSG:32756 + EPSG:32757 + EPSG:32758 + EPSG:32759 + EPSG:32760 + EPSG:32761 + EPSG:32766 + EPSG:61206405 + EPSG:61216405 + EPSG:61226405 + EPSG:61236405 + EPSG:61246405 + EPSG:61266405 + EPSG:61266413 + EPSG:61276405 + EPSG:61286405 + EPSG:61296405 + EPSG:61306405 + EPSG:61306413 + EPSG:61316405 + EPSG:61326405 + EPSG:61336405 + EPSG:61346405 + EPSG:61356405 + EPSG:61366405 + EPSG:61376405 + EPSG:61386405 + EPSG:61396405 + EPSG:61406405 + EPSG:61406413 + EPSG:61416405 + EPSG:61426405 + EPSG:61436405 + EPSG:61446405 + EPSG:61456405 + EPSG:61466405 + EPSG:61476405 + EPSG:61486405 + EPSG:61486413 + EPSG:61496405 + EPSG:61506405 + EPSG:61516405 + EPSG:61516413 + EPSG:61526405 + EPSG:61526413 + EPSG:61536405 + EPSG:61546405 + EPSG:61556405 + EPSG:61566405 + EPSG:61576405 + EPSG:61586405 + EPSG:61596405 + EPSG:61606405 + EPSG:61616405 + EPSG:61626405 + EPSG:61636405 + EPSG:61636413 + EPSG:61646405 + EPSG:61656405 + EPSG:61666405 + EPSG:61676405 + EPSG:61676413 + EPSG:61686405 + EPSG:61696405 + EPSG:61706405 + EPSG:61706413 + EPSG:61716405 + EPSG:61716413 + EPSG:61736405 + EPSG:61736413 + EPSG:61746405 + EPSG:61756405 + EPSG:61766405 + EPSG:61766413 + EPSG:61786405 + EPSG:61796405 + EPSG:61806405 + EPSG:61806413 + EPSG:61816405 + EPSG:61826405 + EPSG:61836405 + EPSG:61846405 + EPSG:61886405 + EPSG:61896405 + EPSG:61896413 + EPSG:61906405 + EPSG:61906413 + EPSG:61916405 + EPSG:61926405 + EPSG:61936405 + EPSG:61946405 + EPSG:61956405 + EPSG:61966405 + EPSG:61976405 + EPSG:61986405 + EPSG:61996405 + EPSG:62006405 + EPSG:62016405 + EPSG:62026405 + EPSG:62036405 + EPSG:62046405 + EPSG:62056405 + EPSG:62066405 + EPSG:62076405 + EPSG:62086405 + EPSG:62096405 + EPSG:62106405 + EPSG:62116405 + EPSG:62126405 + EPSG:62136405 + EPSG:62146405 + EPSG:62156405 + EPSG:62166405 + EPSG:62186405 + EPSG:62196405 + EPSG:62206405 + EPSG:62216405 + EPSG:62226405 + EPSG:62236405 + EPSG:62246405 + EPSG:62256405 + EPSG:62276405 + EPSG:62296405 + EPSG:62306405 + EPSG:62316405 + EPSG:62326405 + EPSG:62336405 + EPSG:62366405 + EPSG:62376405 + EPSG:62386405 + EPSG:62396405 + EPSG:62406405 + EPSG:62416405 + EPSG:62426405 + EPSG:62436405 + EPSG:62446405 + EPSG:62456405 + EPSG:62466405 + EPSG:62476405 + EPSG:62486405 + EPSG:62496405 + EPSG:62506405 + EPSG:62516405 + EPSG:62526405 + EPSG:62536405 + EPSG:62546405 + EPSG:62556405 + EPSG:62566405 + EPSG:62576405 + EPSG:62586405 + EPSG:62586413 + EPSG:62596405 + EPSG:62616405 + EPSG:62626405 + EPSG:62636405 + EPSG:62646405 + EPSG:62656405 + EPSG:62666405 + EPSG:62676405 + EPSG:62686405 + EPSG:62696405 + EPSG:62706405 + EPSG:62716405 + EPSG:62726405 + EPSG:62736405 + EPSG:62746405 + EPSG:62756405 + EPSG:62766405 + EPSG:62776405 + EPSG:62786405 + EPSG:62796405 + EPSG:62806405 + EPSG:62816405 + EPSG:62826405 + EPSG:62836405 + EPSG:62836413 + EPSG:62846405 + EPSG:62856405 + EPSG:62866405 + EPSG:62886405 + EPSG:62896405 + EPSG:62926405 + EPSG:62936405 + EPSG:62956405 + EPSG:62976405 + EPSG:62986405 + EPSG:62996405 + EPSG:63006405 + EPSG:63016405 + EPSG:63026405 + EPSG:63036405 + EPSG:63046405 + EPSG:63066405 + EPSG:63076405 + EPSG:63086405 + EPSG:63096405 + EPSG:63106405 + EPSG:63116405 + EPSG:63126405 + EPSG:63136405 + EPSG:63146405 + EPSG:63156405 + EPSG:63166405 + EPSG:63176405 + EPSG:63186405 + EPSG:63196405 + EPSG:63226405 + EPSG:63246405 + EPSG:63266405 + EPSG:63266406 + EPSG:63266407 + EPSG:63266408 + EPSG:63266409 + EPSG:63266410 + EPSG:63266411 + EPSG:63266412 + EPSG:63266413 + EPSG:63266414 + EPSG:63266415 + EPSG:63266416 + EPSG:63266417 + EPSG:63266418 + EPSG:63266419 + EPSG:63266420 + EPSG:66006405 + EPSG:66016405 + EPSG:66026405 + EPSG:66036405 + EPSG:66046405 + EPSG:66056405 + EPSG:66066405 + EPSG:66076405 + EPSG:66086405 + EPSG:66096405 + EPSG:66106405 + EPSG:66116405 + EPSG:66126405 + EPSG:66126413 + EPSG:66136405 + EPSG:66146405 + EPSG:66156405 + EPSG:66166405 + EPSG:66186405 + EPSG:66196405 + EPSG:66196413 + EPSG:66206405 + EPSG:66216405 + EPSG:66226405 + EPSG:66236405 + EPSG:66246405 + EPSG:66246413 + EPSG:66256405 + EPSG:66266405 + EPSG:66276405 + EPSG:66276413 + EPSG:66286405 + EPSG:66296405 + EPSG:66306405 + EPSG:66316405 + EPSG:66326405 + EPSG:66336405 + EPSG:66346405 + EPSG:66356405 + EPSG:66366405 + EPSG:66376405 + EPSG:66386405 + EPSG:66396405 + EPSG:66406405 + EPSG:66406413 + EPSG:66416405 + EPSG:66426405 + EPSG:66436405 + EPSG:66446405 + EPSG:66456405 + EPSG:66456413 + EPSG:66466405 + EPSG:66576405 + EPSG:66586405 + EPSG:66596405 + EPSG:66596413 + EPSG:66606405 + EPSG:66616405 + EPSG:66616413 + EPSG:66636405 + EPSG:66646405 + EPSG:66656405 + EPSG:66666405 + EPSG:66676405 + EPSG:68016405 + EPSG:68026405 + EPSG:68036405 + EPSG:68046405 + EPSG:68056405 + EPSG:68066405 + EPSG:68086405 + EPSG:68096405 + EPSG:68136405 + EPSG:68146405 + EPSG:68156405 + EPSG:68186405 + EPSG:68206405 + EPSG:69036405 + EPSG:42302 + EPSG:42301 + EPSG:900913 + EPSG:45556 + EPSG:45555 + EPSG:54004 + EPSG:41001 + EPSG:42311 + EPSG:42310 + EPSG:18001 + EPSG:100003 + EPSG:42106 + EPSG:100002 + EPSG:42105 + EPSG:100001 + EPSG:42309 + EPSG:42104 + EPSG:42308 + EPSG:42103 + EPSG:42307 + EPSG:42102 + EPSG:42306 + EPSG:42101 + EPSG:42305 + EPSG:42304 + EPSG:42303 + + + og:bugsites + + <Abstract>Sample data from GRASS, bug sites location, Spearfish, South Dakota, USA</Abstract> + <KeywordList> + <Keyword>spearfish</Keyword> + <Keyword>sfBugsites</Keyword> + <Keyword>insects</Keyword> + <Keyword>bugsites</Keyword> + <Keyword>tiger_beetles</Keyword> + </KeywordList> + <SRS>EPSG:26713</SRS> + <!--WKT definition of this CRS: +PROJCS["NAD27 / UTM zone 13N", + GEOGCS["NAD27", + DATUM["North American Datum 1927", + SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], + TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], + AUTHORITY["EPSG","6267"]], + PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], + UNIT["degree", 0.017453292519943295], + AXIS["Geodetic longitude", EAST], + AXIS["Geodetic latitude", NORTH], + AUTHORITY["EPSG","4267"]], + PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], + PARAMETER["central_meridian", -105.0], + PARAMETER["latitude_of_origin", 0.0], + PARAMETER["scale_factor", 0.9996], + PARAMETER["false_easting", 500000.0], + PARAMETER["false_northing", 0.0], + UNIT["m", 1.0], + AXIS["Easting", EAST], + AXIS["Northing", NORTH], + AUTHORITY["EPSG","26713"]]--> + <LatLonBoundingBox minx="-103.8701581843142" miny="44.286540361238224" maxx="-103.63532819794625" maxy="44.52137034760618"/> + <BoundingBox SRS="EPSG:26713" minx="590232.0" miny="4914096.0" maxx="608471.0" maxy="4920512.0"/> + <Style> + <Name>capitals</Name> + <Title>Capital cities + + + image/png + + + + + + og:restricted + + <Abstract>Sample data from GRASS, restricted areas, Spearfish, South Dakota, USA</Abstract> + <KeywordList> + <Keyword>spearfish</Keyword> + <Keyword>restricted</Keyword> + <Keyword>sfRestricted</Keyword> + <Keyword>areas</Keyword> + </KeywordList> + <SRS>EPSG:26713</SRS> + <!--WKT definition of this CRS: +PROJCS["NAD27 / UTM zone 13N", + GEOGCS["NAD27", + DATUM["North American Datum 1927", + SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], + TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], + AUTHORITY["EPSG","6267"]], + PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], + UNIT["degree", 0.017453292519943295], + AXIS["Geodetic longitude", EAST], + AXIS["Geodetic latitude", NORTH], + AUTHORITY["EPSG","4267"]], + PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], + PARAMETER["central_meridian", -105.0], + PARAMETER["latitude_of_origin", 0.0], + PARAMETER["scale_factor", 0.9996], + PARAMETER["false_easting", 500000.0], + PARAMETER["false_northing", 0.0], + UNIT["m", 1.0], + AXIS["Easting", EAST], + AXIS["Northing", NORTH], + AUTHORITY["EPSG","26713"]]--> + <LatLonBoundingBox minx="-104.36424600670885" miny="43.78798270975212" maxx="-103.06226503558304" maxy="45.089963680877936"/> + <BoundingBox SRS="EPSG:26713" minx="551796.8125" miny="4901896.0" maxx="652788.5625" maxy="4940954.0"/> + <Style> + <Name>restricted</Name> + <Title>Red, translucent style + A sample style that just prints out a transparent red interior with a red outline + + image/png + + + + + + og:archsites + + <Abstract>Sample data from GRASS, archeological sites location, Spearfish, South Dakota, USA</Abstract> + <KeywordList> + <Keyword>archsites</Keyword> + <Keyword>spearfish</Keyword> + <Keyword>sfArchsites</Keyword> + <Keyword>archeology</Keyword> + </KeywordList> + <SRS>EPSG:26713</SRS> + <!--WKT definition of this CRS: +PROJCS["NAD27 / UTM zone 13N", + GEOGCS["NAD27", + DATUM["North American Datum 1927", + SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], + TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], + AUTHORITY["EPSG","6267"]], + PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], + UNIT["degree", 0.017453292519943295], + AXIS["Geodetic longitude", EAST], + AXIS["Geodetic latitude", NORTH], + AUTHORITY["EPSG","4267"]], + PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], + PARAMETER["central_meridian", -105.0], + PARAMETER["latitude_of_origin", 0.0], + PARAMETER["scale_factor", 0.9996], + PARAMETER["false_easting", 500000.0], + PARAMETER["false_northing", 0.0], + UNIT["m", 1.0], + AXIS["Easting", EAST], + AXIS["Northing", NORTH], + AUTHORITY["EPSG","26713"]]--> + <LatLonBoundingBox minx="-103.87480459767542" miny="44.31295793136913" maxx="-103.63549073047534" maxy="44.55227179856921"/> + <BoundingBox SRS="EPSG:26713" minx="589860.0" miny="4914479.0" maxx="608355.0" maxy="4926490.0"/> + <Style> + <Name>point</Name> + <Title>Default point + A sample style that just prints out a 6px wide red square + + image/png + + + + + + og:streams + + <Abstract>Sample data from GRASS, streams, Spearfish, South Dakota, USA</Abstract> + <KeywordList> + <Keyword>spearfish</Keyword> + <Keyword>sfStreams</Keyword> + <Keyword>streams</Keyword> + </KeywordList> + <SRS>EPSG:26713</SRS> + <!--WKT definition of this CRS: +PROJCS["NAD27 / UTM zone 13N", + GEOGCS["NAD27", + DATUM["North American Datum 1927", + SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], + TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], + AUTHORITY["EPSG","6267"]], + PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], + UNIT["degree", 0.017453292519943295], + AXIS["Geodetic longitude", EAST], + AXIS["Geodetic latitude", NORTH], + AUTHORITY["EPSG","4267"]], + PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]], + PARAMETER["central_meridian", -105.0], + PARAMETER["latitude_of_origin", 0.0], + PARAMETER["scale_factor", 0.9996], + PARAMETER["false_easting", 500000.0], + PARAMETER["false_northing", 0.0], + UNIT["m", 1.0], + AXIS["Easting", EAST], + AXIS["Northing", NORTH], + AUTHORITY["EPSG","26713"]]--> + <LatLonBoundingBox minx="-103.88033574142051" miny="44.30711172484593" maxx="-103.62022283326024" maxy="44.5672246330062"/> + <BoundingBox SRS="EPSG:26713" minx="589443.0" miny="4913935.0" maxx="609526.75" maxy="4928059.5"/> + <Style> + <Name>simple_streams</Name> + <Title>Default Styler for streams segments + Blue lines, 2px wide + + image/png + + + + + + tiger:poly_landmarks + Manhattan (NY) landmarks + Manhattan landmarks, identifies water, lakes, parks, interesting buildilngs + + DS_poly_landmarks + landmarks + manhattan + poly_landmarks + + EPSG:4326 + + + + + + + tiger:poi + Manhattan (NY) points of interest + Points of interest in New York, New York (on Manhattan). One of the attributes contains the name of a file with a picture of the point of interest. + + poi + Manhattan + DS_poi + points_of_interest + + EPSG:4326 + + + + + + + tiger:tiger_roads + Manhattan (NY) roads + Highly simplified road layout of Manhattan in New York.. + + DS_tiger_roads + tiger_roads + roads + + EPSG:4326 + + + + + + + za:za_natural + Natural Landmarks in South Africa + This layer describes natural features of South Africa such as forests and lakes. + + water + forests + landmarks + Africa + South + natural + + EPSG:4326 + + + + + + + za:za_points + Points of Interest in South Africa + Noteworthy locations such as hotels and tourist attractions in South Africa. + + of + tourist + landmarks + zoo + cities + interest + attractions + points + hotel + museum + picnic + + EPSG:4326 + + + + + + + za:za_roads + South African Roads + This layer describes roads in South Africa. + + south + africa + roads + + EPSG:4326 + + + + + + + za:za_vegetation + South African Vegetation + This layer describes vegetated areas in South Africa, categorized by biome. + + south + vegetation + africa + + EPSG:4326 + + + + + + + topp:tasmania_cities + Tasmania cities + Cities in Tasmania (actually, just the capital) + + cities + Tasmania + + EPSG:4326 + + + + + + + topp:tasmania_roads + Tasmania roads + Main Tasmania roads + + Roads + Tasmania + + EPSG:4326 + + + + + + + topp:tasmania_state_boundaries + Tasmania state boundaries + Tasmania state boundaries + + boundaries + tasmania_state_boundaries + Tasmania + + EPSG:4326 + + + + + + + topp:tasmania_water_bodies + Tasmania water bodies + Tasmania water bodies + + Lakes + Bodies + Australia + Water + Tasmania + + EPSG:4326 + + + + + + + topp:states + USA Population + This is some census data on the states. + + census + united + boundaries + state + states + + EPSG:4326 + + + + + + + tike:waterways + Waterways + Waterways in Finland. + + Finland + waterways + + EPSG:4326 + + + + + + + tike:railways + roads_Type + Generated from tike + + tike + roads + + EPSG:4326 + + + + + + + tike:roads + roads_Type + Generated from tike + + tike + roads + + EPSG:4326 + + + + + + + og:roads + roads_Type + Generated from sf_reset + + roads + sf_reset + + EPSG:26713 + + + + + + + tike:points + roads_Type + Generated from tike + + tike + roads + + EPSG:4326 + + + + + + + topp:bluemarble + Blue Marble Imagery + Blue Marble NG global bathymetry and topography data from NASA. More information about the Blue Marble NG project is available from http://earthobservatory.nasa.gov/Features/BlueMarble . + + WCS + bluemarble + bluemarble + + + EPSG:4326 + + + + + + nurc:Arc_Sample + Global annual rainfall + Global annual rainfall in ArcGrid format + + WCS + arcGridSample + arcGridSample_Coverage + + + EPSG:4326 + + + + + + nurc:Img_Sample + North America sample imagery + A very rough imagery of North America + + WCS + worldImageSample + worldImageSample_Coverage + + + EPSG:4326 + + + + + + sf:sfdem + Spearfish DEM + Digital Elevation Model data for Spearfish, South Dakota + + WCS + sf + dem + digital + elevation + model + + + EPSG:26713 + + + + + + tasmania + tasmania + Layer-Group type layer: tasmania + EPSG:4326 + + + + + tiger-ny + tiger-ny + Layer-Group type layer: tiger-ny + EPSG:4326 + + + + + + diff --git a/openlayers/tests/throws.js b/openlayers/tests/throws.js new file mode 100644 index 0000000000..0e2ac9a929 --- /dev/null +++ b/openlayers/tests/throws.js @@ -0,0 +1,82 @@ +/* + + throws.js -- Adds a `throws_` method to AnotherWay test objects. + + Copyright 2005 OpenLayers Contributors. released under the BSD License. + + + A reference to this file needs to be added to `run-tests.html` in the + head element after the AnotherWay classes are created: + + + + Then, it can be used just like the `ok`, `fail` and other such methods + in your unit tests. + + e.g. + + t.throws_(function () {new OpenLayers.View.Map.Dynamic();}, + ReferenceError("No container supplied."), + "OpenLayers.View.Map.Dynamic instantiation with no container " + + "must throw."); + + This was inspired by the `assertRaises` method of Python's unittest + library. + + Possible future enhancements: + + * Contribute to official AnotherWay distribution. + * Use `apply` rather than require a inner function (or as an option). + * Preserve the stack fields. + + */ + +Test.AnotherWay._test_object_t.prototype.throws_ = +function (fn, expectedException, doc) { + /* + + Executes the supplied function object catching any exception(s) + thrown, then verifies the supplied expected exception occurred. + + If no exception is thrown the test fails. + + If an exception is thrown and it does not match the supplied + expected exception the test fails. + + If the exception thrown matches the supplied expected exception + the test passes. + + Two exceptions "match" if Test.AnotherWay's `eq` method considers + the two equal when their respective stacks are ignored. + + fn - The function object to be executed + expectedException - The exception object expected to result + doc - Description of the test + + Note: The name of this method is `throws_` (with a trailing + underscore) as `throws` is a reserved identifier and can + not be used as a method name. + + Note: This function does not preserve the stack field associated + with either exception. + + */ + var theCaughtException = null; + + try { + fn(); + } catch (innerCaughtException) { + // As `innerCaughtException` is not visible outside the scope + // of this `catch` block we need to make it visible explicitly. + theCaughtException = innerCaughtException; + } + + if (theCaughtException) { + // We delete the stacks before comparison as they will never match. + delete theCaughtException.stack; + delete expectedException.stack; + this.eq(theCaughtException, expectedException, doc); + } else { + this.fail(doc); + } +}; diff --git a/openlayers/tests/xml_eq.js b/openlayers/tests/xml_eq.js new file mode 100644 index 0000000000..47084cd858 --- /dev/null +++ b/openlayers/tests/xml_eq.js @@ -0,0 +1,311 @@ +/** + * File: xml_eq.js + * Adds a xml_eq method to AnotherWay test objects. + * + */ + +(function() { + + /** + * Function: createNode + * Given a string, try to create an XML DOM node. Throws string messages + * on failure. + * + * Parameters: + * text - {String} An XML string. + * + * Returns: + * {DOMElement} An element node. + */ + function createNode(text) { + + var index = text.indexOf('<'); + if(index > 0) { + text = text.substring(index); + } + + var doc; + if(window.ActiveXObject && !this.xmldom) { + doc = new ActiveXObject("Microsoft.XMLDOM"); + try { + doc.loadXML(text); + } catch(err) { + throw "ActiveXObject loadXML failed: " + err; + } + } else if(window.DOMParser) { + try { + doc = new DOMParser().parseFromString(text, 'text/xml'); + } catch(err) { + throw "DOMParser.parseFromString failed"; + } + if(doc.documentElement && doc.documentElement.nodeName == "parsererror") { + throw "DOMParser.parseFromString returned parsererror"; + } + } else { + var req = new XMLHttpRequest(); + req.open("GET", "data:text/xml;charset=utf-8," + + encodeURIComponent(text), false); + if(req.overrideMimeType) { + req.overrideMimeType("text/xml"); + } + req.send(null); + doc = req.responseXML; + } + + var root = doc.documentElement; + if(!root) { + throw "no documentElement"; + } + return root; + } + + /** + * Function assertEqual + * Test two objects for equivalence (based on ==). Throw an exception + * if not equivalent. + * + * Parameters: + * got - {Object} + * expected - {Object} + * msg - {String} The message to be thrown. This message will be appended + * with ": got {got} but expected {expected}" where got and expected are + * replaced with string representations of the above arguments. + */ + function assertEqual(got, expected, msg) { + if(got === undefined) { + got = "undefined"; + } else if (got === null) { + got = "null"; + } + if(expected === undefined) { + expected = "undefined"; + } else if (expected === null) { + expected = "null"; + } + if(got != expected) { + throw msg + ": got '" + got + "' but expected '" + expected + "'"; + } + } + + /** + * Function assertElementNodesEqual + * Test two element nodes for equivalence. Nodes are considered equivalent + * if they are of the same type, have the same name, have the same + * namespace prefix and uri, and if all child nodes are equivalent. + * Throws a message as exception if not equivalent. + * + * Parameters: + * got - {DOMElement} + * expected - {DOMElement} + * options - {Object} Optional object for configuring test options. + * + * Valid options: + * prefix - {Boolean} Compare element and attribute + * prefixes (namespace uri always tested). Default is false. + * includeWhiteSpace - {Boolean} Include whitespace only nodes when + * comparing child nodes. Default is false. + */ + function assertElementNodesEqual(got, expected, options) { + var testPrefix = (options && options.prefix === true); + + // compare types + assertEqual(got.nodeType, expected.nodeType, "Node type mismatch"); + + // compare names + var gotName = testPrefix ? + got.nodeName : got.nodeName.split(":").pop(); + var expName = testPrefix ? + expected.nodeName : expected.nodeName.split(":").pop(); + assertEqual(gotName, expName, "Node name mismatch"); + + // for text nodes compare value + if(got.nodeType == 3) { + assertEqual( + got.nodeValue, expected.nodeValue, "Node value mismatch" + ); + } + // for element type nodes compare namespace, attributes, and children + else if(got.nodeType == 1) { + + // test namespace alias and uri + if(got.prefix || expected.prefix) { + if(testPrefix) { + assertEqual( + got.prefix, expected.prefix, + "Bad prefix for " + got.nodeName + ); + } + } + if(got.namespaceURI || expected.namespaceURI) { + assertEqual( + got.namespaceURI, expected.namespaceURI, + "Bad namespaceURI for " + got.nodeName + ); + } + + // compare attributes - disregard xmlns given namespace handling above + var gotAttrLen = 0; + var gotAttr = {}; + var expAttrLen = 0; + var expAttr = {}; + var ga, ea, gn, en; + for(var i=0; i= len(self.contents): + newChild.nextSibling = None + + parent = self + parentsNextSibling = None + while not parentsNextSibling: + parentsNextSibling = parent.nextSibling + parent = parent.parent + if not parent: # This is the last element in the document. + break + if parentsNextSibling: + newChildsLastElement.next = parentsNextSibling + else: + newChildsLastElement.next = None + else: + nextChild = self.contents[position] + newChild.nextSibling = nextChild + if newChild.nextSibling: + newChild.nextSibling.previousSibling = newChild + newChildsLastElement.next = nextChild + + if newChildsLastElement.next: + newChildsLastElement.next.previous = newChildsLastElement + self.contents.insert(position, newChild) + + def findNext(self, name=None, attrs={}, text=None, **kwargs): + """Returns the first item that matches the given criteria and + appears after this Tag in the document.""" + return self._findOne(self.findAllNext, name, attrs, text, **kwargs) + + def findAllNext(self, name=None, attrs={}, text=None, limit=None, + **kwargs): + """Returns all items that match the given criteria and appear + before after Tag in the document.""" + return self._findAll(name, attrs, text, limit, self.nextGenerator) + + def findNextSibling(self, name=None, attrs={}, text=None, **kwargs): + """Returns the closest sibling to this Tag that matches the + given criteria and appears after this Tag in the document.""" + return self._findOne(self.findNextSiblings, name, attrs, text, + **kwargs) + + def findNextSiblings(self, name=None, attrs={}, text=None, limit=None, + **kwargs): + """Returns the siblings of this Tag that match the given + criteria and appear after this Tag in the document.""" + return self._findAll(name, attrs, text, limit, + self.nextSiblingGenerator, **kwargs) + fetchNextSiblings = findNextSiblings # Compatibility with pre-3.x + + def findPrevious(self, name=None, attrs={}, text=None, **kwargs): + """Returns the first item that matches the given criteria and + appears before this Tag in the document.""" + return self._findOne(self.findAllPrevious, name, attrs, text, **kwargs) + + def findAllPrevious(self, name=None, attrs={}, text=None, limit=None, + **kwargs): + """Returns all items that match the given criteria and appear + before this Tag in the document.""" + return self._findAll(name, attrs, text, limit, self.previousGenerator, + **kwargs) + fetchPrevious = findAllPrevious # Compatibility with pre-3.x + + def findPreviousSibling(self, name=None, attrs={}, text=None, **kwargs): + """Returns the closest sibling to this Tag that matches the + given criteria and appears before this Tag in the document.""" + return self._findOne(self.findPreviousSiblings, name, attrs, text, + **kwargs) + + def findPreviousSiblings(self, name=None, attrs={}, text=None, + limit=None, **kwargs): + """Returns the siblings of this Tag that match the given + criteria and appear before this Tag in the document.""" + return self._findAll(name, attrs, text, limit, + self.previousSiblingGenerator, **kwargs) + fetchPreviousSiblings = findPreviousSiblings # Compatibility with pre-3.x + + def findParent(self, name=None, attrs={}, **kwargs): + """Returns the closest parent of this Tag that matches the given + criteria.""" + # NOTE: We can't use _findOne because findParents takes a different + # set of arguments. + r = None + l = self.findParents(name, attrs, 1) + if l: + r = l[0] + return r + + def findParents(self, name=None, attrs={}, limit=None, **kwargs): + """Returns the parents of this Tag that match the given + criteria.""" + + return self._findAll(name, attrs, None, limit, self.parentGenerator, + **kwargs) + fetchParents = findParents # Compatibility with pre-3.x + + #These methods do the real heavy lifting. + + def _findOne(self, method, name, attrs, text, **kwargs): + r = None + l = method(name, attrs, text, 1, **kwargs) + if l: + r = l[0] + return r + + def _findAll(self, name, attrs, text, limit, generator, **kwargs): + "Iterates over a generator looking for things that match." + + if isinstance(name, SoupStrainer): + strainer = name + else: + # Build a SoupStrainer + strainer = SoupStrainer(name, attrs, text, **kwargs) + results = ResultSet(strainer) + g = generator() + while True: + try: + i = g.next() + except StopIteration: + break + if i: + found = strainer.search(i) + if found: + results.append(found) + if limit and len(results) >= limit: + break + return results + + #These Generators can be used to navigate starting from both + #NavigableStrings and Tags. + def nextGenerator(self): + i = self + while i: + i = i.next + yield i + + def nextSiblingGenerator(self): + i = self + while i: + i = i.nextSibling + yield i + + def previousGenerator(self): + i = self + while i: + i = i.previous + yield i + + def previousSiblingGenerator(self): + i = self + while i: + i = i.previousSibling + yield i + + def parentGenerator(self): + i = self + while i: + i = i.parent + yield i + + # Utility methods + def substituteEncoding(self, str, encoding=None): + encoding = encoding or "utf-8" + return str.replace("%SOUP-ENCODING%", encoding) + + def toEncoding(self, s, encoding=None): + """Encodes an object to a string in some encoding, or to Unicode. + .""" + if isinstance(s, unicode): + if encoding: + s = s.encode(encoding) + elif isinstance(s, str): + if encoding: + s = s.encode(encoding) + else: + s = unicode(s) + else: + if encoding: + s = self.toEncoding(str(s), encoding) + else: + s = unicode(s) + return s + +class NavigableString(unicode, PageElement): + + def __getattr__(self, attr): + """text.string gives you text. This is for backwards + compatibility for Navigable*String, but for CData* it lets you + get the string without the CData wrapper.""" + if attr == 'string': + return self + else: + raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr) + + def __unicode__(self): + return self.__str__(None) + + def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING): + if encoding: + return self.encode(encoding) + else: + return self + +class CData(NavigableString): + + def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING): + return "" % NavigableString.__str__(self, encoding) + +class ProcessingInstruction(NavigableString): + def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING): + output = self + if "%SOUP-ENCODING%" in output: + output = self.substituteEncoding(output, encoding) + return "" % self.toEncoding(output, encoding) + +class Comment(NavigableString): + def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING): + return "" % NavigableString.__str__(self, encoding) + +class Declaration(NavigableString): + def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING): + return "" % NavigableString.__str__(self, encoding) + +class Tag(PageElement): + + """Represents a found HTML tag with its attributes and contents.""" + + XML_SPECIAL_CHARS_TO_ENTITIES = { "'" : "squot", + '"' : "quote", + "&" : "amp", + "<" : "lt", + ">" : "gt" } + + def __init__(self, parser, name, attrs=None, parent=None, + previous=None): + "Basic constructor." + + # We don't actually store the parser object: that lets extracted + # chunks be garbage-collected + self.parserClass = parser.__class__ + self.isSelfClosing = parser.isSelfClosingTag(name) + self.name = name + if attrs == None: + attrs = [] + self.attrs = attrs + self.contents = [] + self.setup(parent, previous) + self.hidden = False + self.containsSubstitutions = False + + def get(self, key, default=None): + """Returns the value of the 'key' attribute for the tag, or + the value given for 'default' if it doesn't have that + attribute.""" + return self._getAttrMap().get(key, default) + + def has_key(self, key): + return self._getAttrMap().has_key(key) + + def __getitem__(self, key): + """tag[key] returns the value of the 'key' attribute for the tag, + and throws an exception if it's not there.""" + return self._getAttrMap()[key] + + def __iter__(self): + "Iterating over a tag iterates over its contents." + return iter(self.contents) + + def __len__(self): + "The length of a tag is the length of its list of contents." + return len(self.contents) + + def __contains__(self, x): + return x in self.contents + + def __nonzero__(self): + "A tag is non-None even if it has no contents." + return True + + def __setitem__(self, key, value): + """Setting tag[key] sets the value of the 'key' attribute for the + tag.""" + self._getAttrMap() + self.attrMap[key] = value + found = False + for i in range(0, len(self.attrs)): + if self.attrs[i][0] == key: + self.attrs[i] = (key, value) + found = True + if not found: + self.attrs.append((key, value)) + self._getAttrMap()[key] = value + + def __delitem__(self, key): + "Deleting tag[key] deletes all 'key' attributes for the tag." + for item in self.attrs: + if item[0] == key: + self.attrs.remove(item) + #We don't break because bad HTML can define the same + #attribute multiple times. + self._getAttrMap() + if self.attrMap.has_key(key): + del self.attrMap[key] + + def __call__(self, *args, **kwargs): + """Calling a tag like a function is the same as calling its + findAll() method. Eg. tag('a') returns a list of all the A tags + found within this tag.""" + return apply(self.findAll, args, kwargs) + + def __getattr__(self, tag): + #print "Getattr %s.%s" % (self.__class__, tag) + if len(tag) > 3 and tag.rfind('Tag') == len(tag)-3: + return self.find(tag[:-3]) + elif tag.find('__') != 0: + return self.find(tag) + + def __eq__(self, other): + """Returns true iff this tag has the same name, the same attributes, + and the same contents (recursively) as the given tag. + + NOTE: right now this will return false if two tags have the + same attributes in a different order. Should this be fixed?""" + if not hasattr(other, 'name') or not hasattr(other, 'attrs') or not hasattr(other, 'contents') or self.name != other.name or self.attrs != other.attrs or len(self) != len(other): + return False + for i in range(0, len(self.contents)): + if self.contents[i] != other.contents[i]: + return False + return True + + def __ne__(self, other): + """Returns true iff this tag is not identical to the other tag, + as defined in __eq__.""" + return not self == other + + def __repr__(self, encoding=DEFAULT_OUTPUT_ENCODING): + """Renders this tag as a string.""" + return self.__str__(encoding) + + def __unicode__(self): + return self.__str__(None) + + def __str__(self, encoding=DEFAULT_OUTPUT_ENCODING, + prettyPrint=False, indentLevel=0): + """Returns a string or Unicode representation of this tag and + its contents. To get Unicode, pass None for encoding. + + NOTE: since Python's HTML parser consumes whitespace, this + method is not certain to reproduce the whitespace present in + the original string.""" + + encodedName = self.toEncoding(self.name, encoding) + + attrs = [] + if self.attrs: + for key, val in self.attrs: + fmt = '%s="%s"' + if isString(val): + if self.containsSubstitutions and '%SOUP-ENCODING%' in val: + val = self.substituteEncoding(val, encoding) + + # The attribute value either: + # + # * Contains no embedded double quotes or single quotes. + # No problem: we enclose it in double quotes. + # * Contains embedded single quotes. No problem: + # double quotes work here too. + # * Contains embedded double quotes. No problem: + # we enclose it in single quotes. + # * Embeds both single _and_ double quotes. This + # can't happen naturally, but it can happen if + # you modify an attribute value after parsing + # the document. Now we have a bit of a + # problem. We solve it by enclosing the + # attribute in single quotes, and escaping any + # embedded single quotes to XML entities. + if '"' in val: + fmt = "%s='%s'" + # This can't happen naturally, but it can happen + # if you modify an attribute value after parsing. + if "'" in val: + val = val.replace("'", "&squot;") + + # Now we're okay w/r/t quotes. But the attribute + # value might also contain angle brackets, or + # ampersands that aren't part of entities. We need + # to escape those to XML entities too. + val = re.sub("([<>]|&(?![^\s]+;))", + lambda x: "&" + self.XML_SPECIAL_CHARS_TO_ENTITIES[x.group(0)[0]] + ";", + val) + + attrs.append(fmt % (self.toEncoding(key, encoding), + self.toEncoding(val, encoding))) + close = '' + closeTag = '' + if self.isSelfClosing: + close = ' /' + else: + closeTag = '' % encodedName + + indentTag, indentContents = 0, 0 + if prettyPrint: + indentTag = indentLevel + space = (' ' * (indentTag-1)) + indentContents = indentTag + 1 + contents = self.renderContents(encoding, prettyPrint, indentContents) + if self.hidden: + s = contents + else: + s = [] + attributeString = '' + if attrs: + attributeString = ' ' + ' '.join(attrs) + if prettyPrint: + s.append(space) + s.append('<%s%s%s>' % (encodedName, attributeString, close)) + if prettyPrint: + s.append("\n") + s.append(contents) + if prettyPrint and contents and contents[-1] != "\n": + s.append("\n") + if prettyPrint and closeTag: + s.append(space) + s.append(closeTag) + if prettyPrint and closeTag and self.nextSibling: + s.append("\n") + s = ''.join(s) + return s + + def prettify(self, encoding=DEFAULT_OUTPUT_ENCODING): + return self.__str__(encoding, True) + + def renderContents(self, encoding=DEFAULT_OUTPUT_ENCODING, + prettyPrint=False, indentLevel=0): + """Renders the contents of this tag as a string in the given + encoding. If encoding is None, returns a Unicode string..""" + s=[] + for c in self: + text = None + if isinstance(c, NavigableString): + text = c.__str__(encoding) + elif isinstance(c, Tag): + s.append(c.__str__(encoding, prettyPrint, indentLevel)) + if text and prettyPrint: + text = text.strip() + if text: + if prettyPrint: + s.append(" " * (indentLevel-1)) + s.append(text) + if prettyPrint: + s.append("\n") + return ''.join(s) + + #Soup methods + + def find(self, name=None, attrs={}, recursive=True, text=None, + **kwargs): + """Return only the first child of this Tag matching the given + criteria.""" + r = None + l = self.findAll(name, attrs, recursive, text, 1, **kwargs) + if l: + r = l[0] + return r + findChild = find + + def findAll(self, name=None, attrs={}, recursive=True, text=None, + limit=None, **kwargs): + """Extracts a list of Tag objects that match the given + criteria. You can specify the name of the Tag and any + attributes you want the Tag to have. + + The value of a key-value pair in the 'attrs' map can be a + string, a list of strings, a regular expression object, or a + callable that takes a string and returns whether or not the + string matches for some custom definition of 'matches'. The + same is true of the tag name.""" + generator = self.recursiveChildGenerator + if not recursive: + generator = self.childGenerator + return self._findAll(name, attrs, text, limit, generator, **kwargs) + findChildren = findAll + + # Pre-3.x compatibility methods + first = find + fetch = findAll + + def fetchText(self, text=None, recursive=True, limit=None): + return self.findAll(text=text, recursive=recursive, limit=limit) + + def firstText(self, text=None, recursive=True): + return self.find(text=text, recursive=recursive) + + #Utility methods + + def append(self, tag): + """Appends the given tag to the contents of this tag.""" + self.contents.append(tag) + + #Private methods + + def _getAttrMap(self): + """Initializes a map representation of this tag's attributes, + if not already initialized.""" + if not getattr(self, 'attrMap'): + self.attrMap = {} + for (key, value) in self.attrs: + self.attrMap[key] = value + return self.attrMap + + #Generator methods + def childGenerator(self): + for i in range(0, len(self.contents)): + yield self.contents[i] + raise StopIteration + + def recursiveChildGenerator(self): + stack = [(self, 0)] + while stack: + tag, start = stack.pop() + if isinstance(tag, Tag): + for i in range(start, len(tag.contents)): + a = tag.contents[i] + yield a + if isinstance(a, Tag) and tag.contents: + if i < len(tag.contents) - 1: + stack.append((tag, i+1)) + stack.append((a, 0)) + break + raise StopIteration + +# Next, a couple classes to represent queries and their results. +class SoupStrainer: + """Encapsulates a number of ways of matching a markup element (tag or + text).""" + + def __init__(self, name=None, attrs={}, text=None, **kwargs): + self.name = name + if isString(attrs): + kwargs['class'] = attrs + attrs = None + if kwargs: + if attrs: + attrs = attrs.copy() + attrs.update(kwargs) + else: + attrs = kwargs + self.attrs = attrs + self.text = text + + def __str__(self): + if self.text: + return self.text + else: + return "%s|%s" % (self.name, self.attrs) + + def searchTag(self, markupName=None, markupAttrs={}): + found = None + markup = None + if isinstance(markupName, Tag): + markup = markupName + markupAttrs = markup + callFunctionWithTagData = callable(self.name) \ + and not isinstance(markupName, Tag) + + if (not self.name) \ + or callFunctionWithTagData \ + or (markup and self._matches(markup, self.name)) \ + or (not markup and self._matches(markupName, self.name)): + if callFunctionWithTagData: + match = self.name(markupName, markupAttrs) + else: + match = True + markupAttrMap = None + for attr, matchAgainst in self.attrs.items(): + if not markupAttrMap: + if hasattr(markupAttrs, 'get'): + markupAttrMap = markupAttrs + else: + markupAttrMap = {} + for k,v in markupAttrs: + markupAttrMap[k] = v + attrValue = markupAttrMap.get(attr) + if not self._matches(attrValue, matchAgainst): + match = False + break + if match: + if markup: + found = markup + else: + found = markupName + return found + + def search(self, markup): + #print 'looking for %s in %s' % (self, markup) + found = None + # If given a list of items, scan it for a text element that + # matches. + if isList(markup) and not isinstance(markup, Tag): + for element in markup: + if isinstance(element, NavigableString) \ + and self.search(element): + found = element + break + # If it's a Tag, make sure its name or attributes match. + # Don't bother with Tags if we're searching for text. + elif isinstance(markup, Tag): + if not self.text: + found = self.searchTag(markup) + # If it's text, make sure the text matches. + elif isinstance(markup, NavigableString) or \ + isString(markup): + if self._matches(markup, self.text): + found = markup + else: + raise Exception, "I don't know how to match against a %s" \ + % markup.__class__ + return found + + def _matches(self, markup, matchAgainst): + #print "Matching %s against %s" % (markup, matchAgainst) + result = False + if matchAgainst == True and type(matchAgainst) == types.BooleanType: + result = markup != None + elif callable(matchAgainst): + result = matchAgainst(markup) + else: + #Custom match methods take the tag as an argument, but all + #other ways of matching match the tag name as a string. + if isinstance(markup, Tag): + markup = markup.name + if markup and not isString(markup): + markup = unicode(markup) + #Now we know that chunk is either a string, or None. + if hasattr(matchAgainst, 'match'): + # It's a regexp object. + result = markup and matchAgainst.search(markup) + elif isList(matchAgainst): + result = markup in matchAgainst + elif hasattr(matchAgainst, 'items'): + result = markup.has_key(matchAgainst) + elif matchAgainst and isString(markup): + if isinstance(markup, unicode): + matchAgainst = unicode(matchAgainst) + else: + matchAgainst = str(matchAgainst) + + if not result: + result = matchAgainst == markup + return result + +class ResultSet(list): + """A ResultSet is just a list that keeps track of the SoupStrainer + that created it.""" + def __init__(self, source): + list.__init__([]) + self.source = source + +# Now, some helper functions. + +def isList(l): + """Convenience method that works with all 2.x versions of Python + to determine whether or not something is listlike.""" + return hasattr(l, '__iter__') \ + or (type(l) in (types.ListType, types.TupleType)) + +def isString(s): + """Convenience method that works with all 2.x versions of Python + to determine whether or not something is stringlike.""" + try: + return isinstance(s, unicode) or isintance(s, basestring) + except NameError: + return isinstance(s, str) + +def buildTagMap(default, *args): + """Turns a list of maps, lists, or scalars into a single map. + Used to build the SELF_CLOSING_TAGS, NESTABLE_TAGS, and + NESTING_RESET_TAGS maps out of lists and partial maps.""" + built = {} + for portion in args: + if hasattr(portion, 'items'): + #It's a map. Merge it. + for k,v in portion.items(): + built[k] = v + elif isList(portion): + #It's a list. Map each item to the default. + for k in portion: + built[k] = default + else: + #It's a scalar. Map it to the default. + built[portion] = default + return built + +# Now, the parser classes. + +class BeautifulStoneSoup(Tag, SGMLParser): + + """This class contains the basic parser and search code. It defines + a parser that knows nothing about tag behavior except for the + following: + + You can't close a tag without closing all the tags it encloses. + That is, "" actually means + "". + + [Another possible explanation is "", but since + this class defines no SELF_CLOSING_TAGS, it will never use that + explanation.] + + This class is useful for parsing XML or made-up markup languages, + or when BeautifulSoup makes an assumption counter to what you were + expecting.""" + + XML_ENTITY_LIST = {} + for i in Tag.XML_SPECIAL_CHARS_TO_ENTITIES.values(): + XML_ENTITY_LIST[i] = True + + SELF_CLOSING_TAGS = {} + NESTABLE_TAGS = {} + RESET_NESTING_TAGS = {} + QUOTE_TAGS = {} + + MARKUP_MASSAGE = [(re.compile('(<[^<>]*)/>'), + lambda x: x.group(1) + ' />'), + (re.compile(']*)>'), + lambda x: '') + ] + + ROOT_TAG_NAME = u'[document]' + + HTML_ENTITIES = "html" + XML_ENTITIES = "xml" + + def __init__(self, markup="", parseOnlyThese=None, fromEncoding=None, + markupMassage=True, smartQuotesTo=XML_ENTITIES, + convertEntities=None, selfClosingTags=None): + """The Soup object is initialized as the 'root tag', and the + provided markup (which can be a string or a file-like object) + is fed into the underlying parser. + + sgmllib will process most bad HTML, and the BeautifulSoup + class has some tricks for dealing with some HTML that kills + sgmllib, but Beautiful Soup can nonetheless choke or lose data + if your data uses self-closing tags or declarations + incorrectly. + + By default, Beautiful Soup uses regexes to sanitize input, + avoiding the vast majority of these problems. If the problems + don't apply to you, pass in False for markupMassage, and + you'll get better performance. + + The default parser massage techniques fix the two most common + instances of invalid HTML that choke sgmllib: + +
    (No space between name of closing tag and tag close) + (Extraneous whitespace in declaration) + + You can pass in a custom list of (RE object, replace method) + tuples to get Beautiful Soup to scrub your input the way you + want.""" + + self.parseOnlyThese = parseOnlyThese + self.fromEncoding = fromEncoding + self.smartQuotesTo = smartQuotesTo + self.convertEntities = convertEntities + if self.convertEntities: + # It doesn't make sense to convert encoded characters to + # entities even while you're converting entities to Unicode. + # Just convert it all to Unicode. + self.smartQuotesTo = None + self.instanceSelfClosingTags = buildTagMap(None, selfClosingTags) + SGMLParser.__init__(self) + + if hasattr(markup, 'read'): # It's a file-type object. + markup = markup.read() + self.markup = markup + self.markupMassage = markupMassage + try: + self._feed() + except StopParsing: + pass + self.markup = None # The markup can now be GCed + + def _feed(self, inDocumentEncoding=None): + # Convert the document to Unicode. + markup = self.markup + if isinstance(markup, unicode): + if not hasattr(self, 'originalEncoding'): + self.originalEncoding = None + else: + dammit = UnicodeDammit\ + (markup, [self.fromEncoding, inDocumentEncoding], + smartQuotesTo=self.smartQuotesTo) + markup = dammit.unicode + self.originalEncoding = dammit.originalEncoding + if markup: + if self.markupMassage: + if not isList(self.markupMassage): + self.markupMassage = self.MARKUP_MASSAGE + for fix, m in self.markupMassage: + markup = fix.sub(m, markup) + self.reset() + + SGMLParser.feed(self, markup) + # Close out any unfinished strings and close all the open tags. + self.endData() + while self.currentTag.name != self.ROOT_TAG_NAME: + self.popTag() + + def __getattr__(self, methodName): + """This method routes method call requests to either the SGMLParser + superclass or the Tag superclass, depending on the method name.""" + #print "__getattr__ called on %s.%s" % (self.__class__, methodName) + + if methodName.find('start_') == 0 or methodName.find('end_') == 0 \ + or methodName.find('do_') == 0: + return SGMLParser.__getattr__(self, methodName) + elif methodName.find('__') != 0: + return Tag.__getattr__(self, methodName) + else: + raise AttributeError + + def isSelfClosingTag(self, name): + """Returns true iff the given string is the name of a + self-closing tag according to this parser.""" + return self.SELF_CLOSING_TAGS.has_key(name) \ + or self.instanceSelfClosingTags.has_key(name) + + def reset(self): + Tag.__init__(self, self, self.ROOT_TAG_NAME) + self.hidden = 1 + SGMLParser.reset(self) + self.currentData = [] + self.currentTag = None + self.tagStack = [] + self.quoteStack = [] + self.pushTag(self) + + def popTag(self): + tag = self.tagStack.pop() + # Tags with just one string-owning child get the child as a + # 'string' property, so that soup.tag.string is shorthand for + # soup.tag.contents[0] + if len(self.currentTag.contents) == 1 and \ + isinstance(self.currentTag.contents[0], NavigableString): + self.currentTag.string = self.currentTag.contents[0] + + #print "Pop", tag.name + if self.tagStack: + self.currentTag = self.tagStack[-1] + return self.currentTag + + def pushTag(self, tag): + #print "Push", tag.name + if self.currentTag: + self.currentTag.append(tag) + self.tagStack.append(tag) + self.currentTag = self.tagStack[-1] + + def endData(self, containerClass=NavigableString): + if self.currentData: + currentData = ''.join(self.currentData) + if not currentData.strip(): + if '\n' in currentData: + currentData = '\n' + else: + currentData = ' ' + self.currentData = [] + if self.parseOnlyThese and len(self.tagStack) <= 1 and \ + (not self.parseOnlyThese.text or \ + not self.parseOnlyThese.search(currentData)): + return + o = containerClass(currentData) + o.setup(self.currentTag, self.previous) + if self.previous: + self.previous.next = o + self.previous = o + self.currentTag.contents.append(o) + + + def _popToTag(self, name, inclusivePop=True): + """Pops the tag stack up to and including the most recent + instance of the given tag. If inclusivePop is false, pops the tag + stack up to but *not* including the most recent instqance of + the given tag.""" + #print "Popping to %s" % name + if name == self.ROOT_TAG_NAME: + return + + numPops = 0 + mostRecentTag = None + for i in range(len(self.tagStack)-1, 0, -1): + if name == self.tagStack[i].name: + numPops = len(self.tagStack)-i + break + if not inclusivePop: + numPops = numPops - 1 + + for i in range(0, numPops): + mostRecentTag = self.popTag() + return mostRecentTag + + def _smartPop(self, name): + + """We need to pop up to the previous tag of this type, unless + one of this tag's nesting reset triggers comes between this + tag and the previous tag of this type, OR unless this tag is a + generic nesting trigger and another generic nesting trigger + comes between this tag and the previous tag of this type. + + Examples: +

    FooBar

    should pop to 'p', not 'b'. +

    FooBar

    should pop to 'table', not 'p'. +

    Foo

    Bar

    should pop to 'tr', not 'p'. +

    FooBar

    should pop to 'p', not 'b'. + +

    • *
    • * should pop to 'ul', not the first 'li'. +
  • ** should pop to 'table', not the first 'tr' + tag should + implicitly close the previous tag within the same
    ** should pop to 'tr', not the first 'td' + """ + + nestingResetTriggers = self.NESTABLE_TAGS.get(name) + isNestable = nestingResetTriggers != None + isResetNesting = self.RESET_NESTING_TAGS.has_key(name) + popTo = None + inclusive = True + for i in range(len(self.tagStack)-1, 0, -1): + p = self.tagStack[i] + if (not p or p.name == name) and not isNestable: + #Non-nestable tags get popped to the top or to their + #last occurance. + popTo = name + break + if (nestingResetTriggers != None + and p.name in nestingResetTriggers) \ + or (nestingResetTriggers == None and isResetNesting + and self.RESET_NESTING_TAGS.has_key(p.name)): + + #If we encounter one of the nesting reset triggers + #peculiar to this tag, or we encounter another tag + #that causes nesting to reset, pop up to but not + #including that tag. + popTo = p.name + inclusive = False + break + p = p.parent + if popTo: + self._popToTag(popTo, inclusive) + + def unknown_starttag(self, name, attrs, selfClosing=0): + #print "Start tag %s: %s" % (name, attrs) + if self.quoteStack: + #This is not a real tag. + #print "<%s> is not real!" % name + attrs = ''.join(map(lambda(x, y): ' %s="%s"' % (x, y), attrs)) + self.handle_data('<%s%s>' % (name, attrs)) + return + self.endData() + + if not self.isSelfClosingTag(name) and not selfClosing: + self._smartPop(name) + + if self.parseOnlyThese and len(self.tagStack) <= 1 \ + and (self.parseOnlyThese.text or not self.parseOnlyThese.searchTag(name, attrs)): + return + + tag = Tag(self, name, attrs, self.currentTag, self.previous) + if self.previous: + self.previous.next = tag + self.previous = tag + self.pushTag(tag) + if selfClosing or self.isSelfClosingTag(name): + self.popTag() + if name in self.QUOTE_TAGS: + #print "Beginning quote (%s)" % name + self.quoteStack.append(name) + self.literal = 1 + return tag + + def unknown_endtag(self, name): + #print "End tag %s" % name + if self.quoteStack and self.quoteStack[-1] != name: + #This is not a real end tag. + #print " is not real!" % name + self.handle_data('' % name) + return + self.endData() + self._popToTag(name) + if self.quoteStack and self.quoteStack[-1] == name: + self.quoteStack.pop() + self.literal = (len(self.quoteStack) > 0) + + def handle_data(self, data): + self.currentData.append(data) + + def _toStringSubclass(self, text, subclass): + """Adds a certain piece of text to the tree as a NavigableString + subclass.""" + self.endData() + self.handle_data(text) + self.endData(subclass) + + def handle_pi(self, text): + """Handle a processing instruction as a ProcessingInstruction + object, possibly one with a %SOUP-ENCODING% slot into which an + encoding will be plugged later.""" + if text[:3] == "xml": + text = "xml version='1.0' encoding='%SOUP-ENCODING%'" + self._toStringSubclass(text, ProcessingInstruction) + + def handle_comment(self, text): + "Handle comments as Comment objects." + self._toStringSubclass(text, Comment) + + def handle_charref(self, ref): + "Handle character references as data." + if self.convertEntities in [self.HTML_ENTITIES, + self.XML_ENTITIES]: + data = unichr(int(ref)) + else: + data = '&#%s;' % ref + self.handle_data(data) + + def handle_entityref(self, ref): + """Handle entity references as data, possibly converting known + HTML entity references to the corresponding Unicode + characters.""" + data = None + if self.convertEntities == self.HTML_ENTITIES or \ + (self.convertEntities == self.XML_ENTITIES and \ + self.XML_ENTITY_LIST.get(ref)): + try: + data = unichr(name2codepoint[ref]) + except KeyError: + pass + if not data: + data = '&%s;' % ref + self.handle_data(data) + + def handle_decl(self, data): + "Handle DOCTYPEs and the like as Declaration objects." + self._toStringSubclass(data, Declaration) + + def parse_declaration(self, i): + """Treat a bogus SGML declaration as raw data. Treat a CDATA + declaration as a CData object.""" + j = None + if self.rawdata[i:i+9] == '', i) + if k == -1: + k = len(self.rawdata) + data = self.rawdata[i+9:k] + j = k+3 + self._toStringSubclass(data, CData) + else: + try: + j = SGMLParser.parse_declaration(self, i) + except SGMLParseError: + toHandle = self.rawdata[i:] + self.handle_data(toHandle) + j = i + len(toHandle) + return j + +class BeautifulSoup(BeautifulStoneSoup): + + """This parser knows the following facts about HTML: + + * Some tags have no closing tag and should be interpreted as being + closed as soon as they are encountered. + + * The text inside some tags (ie. 'script') may contain tags which + are not really part of the document and which should be parsed + as text, not tags. If you want to parse the text as tags, you can + always fetch it and parse it explicitly. + + * Tag nesting rules: + + Most tags can't be nested at all. For instance, the occurance of + a

    tag should implicitly close the previous

    tag. + +

    Para1

    Para2 + should be transformed into: +

    Para1

    Para2 + + Some tags can be nested arbitrarily. For instance, the occurance + of a

    tag should _not_ implicitly close the previous +
    tag. + + Alice said:
    Bob said:
    Blah + should NOT be transformed into: + Alice said:
    Bob said:
    Blah + + Some tags can be nested, but the nesting is reset by the + interposition of other tags. For instance, a
    , + but not close a tag in another table. + +
    BlahBlah + should be transformed into: +
    BlahBlah + but, + Blah
    Blah + should NOT be transformed into + Blah
    Blah + + Differing assumptions about tag nesting rules are a major source + of problems with the BeautifulSoup class. If BeautifulSoup is not + treating as nestable a tag your page author treats as nestable, + try ICantBelieveItsBeautifulSoup, MinimalSoup, or + BeautifulStoneSoup before writing your own subclass.""" + + def __init__(self, *args, **kwargs): + if not kwargs.has_key('smartQuotesTo'): + kwargs['smartQuotesTo'] = self.HTML_ENTITIES + BeautifulStoneSoup.__init__(self, *args, **kwargs) + + SELF_CLOSING_TAGS = buildTagMap(None, + ['br' , 'hr', 'input', 'img', 'meta', + 'spacer', 'link', 'frame', 'base']) + + QUOTE_TAGS = {'script': None} + + #According to the HTML standard, each of these inline tags can + #contain another tag of the same type. Furthermore, it's common + #to actually use these tags this way. + NESTABLE_INLINE_TAGS = ['span', 'font', 'q', 'object', 'bdo', 'sub', 'sup', + 'center'] + + #According to the HTML standard, these block tags can contain + #another tag of the same type. Furthermore, it's common + #to actually use these tags this way. + NESTABLE_BLOCK_TAGS = ['blockquote', 'div', 'fieldset', 'ins', 'del'] + + #Lists can contain other lists, but there are restrictions. + NESTABLE_LIST_TAGS = { 'ol' : [], + 'ul' : [], + 'li' : ['ul', 'ol'], + 'dl' : [], + 'dd' : ['dl'], + 'dt' : ['dl'] } + + #Tables can contain other tables, but there are restrictions. + NESTABLE_TABLE_TAGS = {'table' : [], + 'tr' : ['table', 'tbody', 'tfoot', 'thead'], + 'td' : ['tr'], + 'th' : ['tr'], + 'thead' : ['table'], + 'tbody' : ['table'], + 'tfoot' : ['table'], + } + + NON_NESTABLE_BLOCK_TAGS = ['address', 'form', 'p', 'pre'] + + #If one of these tags is encountered, all tags up to the next tag of + #this type are popped. + RESET_NESTING_TAGS = buildTagMap(None, NESTABLE_BLOCK_TAGS, 'noscript', + NON_NESTABLE_BLOCK_TAGS, + NESTABLE_LIST_TAGS, + NESTABLE_TABLE_TAGS) + + NESTABLE_TAGS = buildTagMap([], NESTABLE_INLINE_TAGS, NESTABLE_BLOCK_TAGS, + NESTABLE_LIST_TAGS, NESTABLE_TABLE_TAGS) + + # Used to detect the charset in a META tag; see start_meta + CHARSET_RE = re.compile("((^|;)\s*charset=)([^;]*)") + + def start_meta(self, attrs): + """Beautiful Soup can detect a charset included in a META tag, + try to convert the document to that charset, and re-parse the + document from the beginning.""" + httpEquiv = None + contentType = None + contentTypeIndex = None + tagNeedsEncodingSubstitution = False + + for i in range(0, len(attrs)): + key, value = attrs[i] + key = key.lower() + if key == 'http-equiv': + httpEquiv = value + elif key == 'content': + contentType = value + contentTypeIndex = i + + if httpEquiv and contentType: # It's an interesting meta tag. + match = self.CHARSET_RE.search(contentType) + if match: + if getattr(self, 'declaredHTMLEncoding') or \ + (self.originalEncoding == self.fromEncoding): + # This is our second pass through the document, or + # else an encoding was specified explicitly and it + # worked. Rewrite the meta tag. + newAttr = self.CHARSET_RE.sub\ + (lambda(match):match.group(1) + + "%SOUP-ENCODING%", value) + attrs[contentTypeIndex] = (attrs[contentTypeIndex][0], + newAttr) + tagNeedsEncodingSubstitution = True + else: + # This is our first pass through the document. + # Go through it again with the new information. + newCharset = match.group(3) + if newCharset and newCharset != self.originalEncoding: + self.declaredHTMLEncoding = newCharset + self._feed(self.declaredHTMLEncoding) + raise StopParsing + tag = self.unknown_starttag("meta", attrs) + if tag and tagNeedsEncodingSubstitution: + tag.containsSubstitutions = True + +class StopParsing(Exception): + pass + +class ICantBelieveItsBeautifulSoup(BeautifulSoup): + + """The BeautifulSoup class is oriented towards skipping over + common HTML errors like unclosed tags. However, sometimes it makes + errors of its own. For instance, consider this fragment: + + FooBar + + This is perfectly valid (if bizarre) HTML. However, the + BeautifulSoup class will implicitly close the first b tag when it + encounters the second 'b'. It will think the author wrote + "FooBar", and didn't close the first 'b' tag, because + there's no real-world reason to bold something that's already + bold. When it encounters '' it will close two more 'b' + tags, for a grand total of three tags closed instead of two. This + can throw off the rest of your document structure. The same is + true of a number of other tags, listed below. + + It's much more common for someone to forget to close a 'b' tag + than to actually use nested 'b' tags, and the BeautifulSoup class + handles the common case. This class handles the not-co-common + case: where you can't believe someone wrote what they did, but + it's valid HTML and BeautifulSoup screwed up by assuming it + wouldn't be.""" + + I_CANT_BELIEVE_THEYRE_NESTABLE_INLINE_TAGS = \ + ['em', 'big', 'i', 'small', 'tt', 'abbr', 'acronym', 'strong', + 'cite', 'code', 'dfn', 'kbd', 'samp', 'strong', 'var', 'b', + 'big'] + + I_CANT_BELIEVE_THEYRE_NESTABLE_BLOCK_TAGS = ['noscript'] + + NESTABLE_TAGS = buildTagMap([], BeautifulSoup.NESTABLE_TAGS, + I_CANT_BELIEVE_THEYRE_NESTABLE_BLOCK_TAGS, + I_CANT_BELIEVE_THEYRE_NESTABLE_INLINE_TAGS) + +class MinimalSoup(BeautifulSoup): + """The MinimalSoup class is for parsing HTML that contains + pathologically bad markup. It makes no assumptions about tag + nesting, but it does know which tags are self-closing, that +