Changeset 5534
- Timestamp:
- 12/20/07 03:54:25 (1 year ago)
- Files:
-
- sandbox/GooglePopups/openlayers/apidoc_config/Languages.txt (modified) (1 diff)
- sandbox/GooglePopups/openlayers/apidoc_config/Menu.txt (modified) (12 diffs)
- sandbox/GooglePopups/openlayers/apidoc_config/Topics.txt (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/doc/readme.txt (modified) (1 diff)
- sandbox/GooglePopups/openlayers/doc_config/Languages.txt (modified) (1 diff)
- sandbox/GooglePopups/openlayers/doc_config/Menu.txt (modified) (10 diffs)
- sandbox/GooglePopups/openlayers/doc_config/Topics.txt (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/examples/select-feature.html (modified) (4 diffs)
- sandbox/GooglePopups/openlayers/examples/sld.html (copied) (copied from trunk/openlayers/examples/sld.html)
- sandbox/GooglePopups/openlayers/examples/spherical-mercator.html (modified) (6 diffs)
- sandbox/GooglePopups/openlayers/examples/tasmania (copied) (copied from trunk/openlayers/examples/tasmania)
- sandbox/GooglePopups/openlayers/examples/tasmania/TasmaniaCities.xml (copied) (copied from trunk/openlayers/examples/tasmania/TasmaniaCities.xml)
- sandbox/GooglePopups/openlayers/examples/tasmania/TasmaniaRoads.xml (copied) (copied from trunk/openlayers/examples/tasmania/TasmaniaRoads.xml)
- sandbox/GooglePopups/openlayers/examples/tasmania/TasmaniaStateBoundaries.xml (copied) (copied from trunk/openlayers/examples/tasmania/TasmaniaStateBoundaries.xml)
- sandbox/GooglePopups/openlayers/examples/tasmania/TasmaniaWaterBodies.xml (copied) (copied from trunk/openlayers/examples/tasmania/TasmaniaWaterBodies.xml)
- sandbox/GooglePopups/openlayers/examples/tasmania/sld-tasmania.xml (copied) (copied from trunk/openlayers/examples/tasmania/sld-tasmania.xml)
- sandbox/GooglePopups/openlayers/examples/tilecache.html (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/examples/vector-formats.html (modified) (5 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/BaseTypes.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/ArgParser.js (modified) (3 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/ModifyFeature.js (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/MousePosition.js (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/Navigation.js (modified) (4 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/Panel.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/Permalink.js (modified) (3 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/SelectFeature.js (modified) (8 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format/GML.js (modified) (3 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format/GeoJSON.js (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format/GeoRSS.js (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format/KML.js (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format/SLD.js (copied) (copied from trunk/openlayers/lib/OpenLayers/Format/SLD.js)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format/Text.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format/WKT.js (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Format/XML.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Geometry/Collection.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Geometry/LinearRing.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Geometry/Point.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Handler.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Handler/Feature.js (modified) (5 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Handler/Point.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Layer.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Layer/Google.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Layer/Markers.js (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Layer/TileCache.js (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Map.js (modified) (5 diffs)
- sandbox/GooglePopups/openlayers/lib/OpenLayers/Rule/FeatureId.js (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/Control/test_DragFeature.html (modified) (7 diffs)
- sandbox/GooglePopups/openlayers/tests/Control/test_MousePosition.html (modified) (2 diffs)
- sandbox/GooglePopups/openlayers/tests/Control/test_Panel.html (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/Format/test_SLD.html (copied) (copied from trunk/openlayers/tests/Format/test_SLD.html)
- sandbox/GooglePopups/openlayers/tests/Format/test_XML.html (modified) (4 diffs)
- sandbox/GooglePopups/openlayers/tests/Handler/test_Feature.html (modified) (3 diffs)
- sandbox/GooglePopups/openlayers/tests/Handler/test_Point.html (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/Layer/test_Google.html (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/Layer/test_MapServer.html (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/Layer/test_Markers.html (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/Layer/test_TileCache.html (modified) (15 diffs)
- sandbox/GooglePopups/openlayers/tests/Layer/test_WMS.html (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/list-tests.html (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/test_BaseTypes.html (modified) (1 diff)
- sandbox/GooglePopups/openlayers/tests/test_Map.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/GooglePopups/openlayers/apidoc_config/Languages.txt
r3545 r5534 1 Format: 1.351 Format: Development Release 12-07-2007 (1.35 base) 2 2 3 3 # This is the Natural Docs languages file for this project. If you change sandbox/GooglePopups/openlayers/apidoc_config/Menu.txt
r5410 r5534 1 Format: 1.351 Format: Development Release 12-07-2007 (1.35 base) 2 2 3 3 … … 8 8 # Footer: [text] 9 9 # If you want to add a copyright notice, this would be the place to do it. 10 11 # You can add a timestamp to your documentation like one of these: 12 # Timestamp: Generated on month day, year 13 # Timestamp: Updated mm/dd/yyyy 14 # Timestamp: Last updated mon day 15 # 16 # m - One or two digit month. January is "1" 17 # mm - Always two digit month. January is "01" 18 # mon - Short month word. January is "Jan" 19 # month - Long month word. January is "January" 20 # d - One or two digit day. 1 is "1" 21 # dd - Always two digit day. 1 is "01" 22 # day - Day with letter extension. 1 is "1st" 23 # yy - Two digit year. 2006 is "06" 24 # yyyy - Four digit year. 2006 is "2006" 25 # year - Four digit year. 2006 is "2006" 10 26 11 27 … … 55 71 File: Attribution (no auto-title, OpenLayers/Control/Attribution.js) 56 72 File: DragFeature (no auto-title, OpenLayers/Control/DragFeature.js) 57 File: DragPan (no auto-title, OpenLayers/Control/DragPan.js)58 73 File: DrawFeature (no auto-title, OpenLayers/Control/DrawFeature.js) 59 74 File: EditingToolbar (no auto-title, OpenLayers/Control/EditingToolbar.js) … … 73 88 File: Scale (no auto-title, OpenLayers/Control/Scale.js) 74 89 File: SelectFeature (no auto-title, OpenLayers/Control/SelectFeature.js) 75 File: ZoomBox (no auto-title, OpenLayers/Control/ZoomBox.js)76 File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js)77 90 } # Group: Control 78 91 … … 81 94 Group: Feature { 82 95 83 File: Feature ( OpenLayers/Feature.js)96 File: Feature (no auto-title, OpenLayers/Feature.js) 84 97 File: Vector (no auto-title, OpenLayers/Feature/Vector.js) 85 98 File: WFS (no auto-title, OpenLayers/Feature/WFS.js) … … 88 101 Group: Format { 89 102 90 File: Format (OpenLayers/Format.js)103 File: Format.js (OpenLayers/Format.js) 91 104 File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js) 92 105 File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js) … … 94 107 File: JSON (no auto-title, OpenLayers/Format/JSON.js) 95 108 File: KML (no auto-title, OpenLayers/Format/KML.js) 109 File: Text (no auto-title, OpenLayers/Format/Text.js) 96 110 File: WFS (no auto-title, OpenLayers/Format/WFS.js) 97 111 File: WKT (no auto-title, OpenLayers/Format/WKT.js) … … 101 115 Group: Geometry { 102 116 103 File: Geometry ( OpenLayers/Geometry.js)117 File: Geometry (no auto-title, OpenLayers/Geometry.js) 104 118 File: Collection (no auto-title, OpenLayers/Geometry/Collection.js) 105 119 File: Curve (no auto-title, OpenLayers/Geometry/Curve.js) … … 117 131 Group: Handler { 118 132 119 File: Handler ( OpenLayers/Handler.js)133 File: Handler (no auto-title, OpenLayers/Handler.js) 120 134 File: Box (no auto-title, OpenLayers/Handler/Box.js) 135 File: Click (no auto-title, OpenLayers/Handler/Click.js) 121 136 File: Drag (no auto-title, OpenLayers/Handler/Drag.js) 122 137 File: Feature (no auto-title, OpenLayers/Handler/Feature.js) … … 133 148 Group: Layer { 134 149 135 File: Layer ( OpenLayers/Layer.js)150 File: Layer (no auto-title, OpenLayers/Layer.js) 136 151 File: Boxes (no auto-title, OpenLayers/Layer/Boxes.js) 137 152 File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js) … … 165 180 Group: Marker { 166 181 167 File: Marker ( OpenLayers/Marker.js)182 File: Marker (no auto-title, OpenLayers/Marker.js) 168 183 File: Box (no auto-title, OpenLayers/Marker/Box.js) 169 184 } # Group: Marker 170 185 171 186 File: Projection (no auto-title, OpenLayers/Projection.js) 187 File: Rule (no auto-title, OpenLayers/Rule.js) 188 File: Style (no auto-title, OpenLayers/Style.js) 172 189 173 190 Group: Popup { … … 188 205 Group: Tile { 189 206 190 File: Tile ( OpenLayers/Tile.js)207 File: Tile (no auto-title, OpenLayers/Tile.js) 191 208 File: Image (no auto-title, OpenLayers/Tile/Image.js) 192 209 File: WFS (no auto-title, OpenLayers/Tile/WFS.js) 193 210 } # Group: Tile 211 212 Group: Rule { 213 214 File: Comparison (no auto-title, OpenLayers/Rule/Comparison.js) 215 File: FeatureId (no auto-title, OpenLayers/Rule/FeatureId.js) 216 File: Logical (no auto-title, OpenLayers/Rule/Logical.js) 217 } # Group: Rule 194 218 195 219 File: Util (OpenLayers/Util.js) sandbox/GooglePopups/openlayers/apidoc_config/Topics.txt
r3545 r5534 1 Format: 1.351 Format: Development Release 12-07-2007 (1.35 base) 2 2 3 3 # This is the Natural Docs topics file for this project. If you change anything … … 59 59 # Whether the topics are part of the class hierarchy. Defaults to no. 60 60 # 61 # Variable Type: [yes|no]62 # Whether the topics can be a variable type. Defaults to no.63 #64 61 # Page Title If First: [yes|no] 65 62 # Whether the topic's title becomes the page title if it's the first one in sandbox/GooglePopups/openlayers/doc/readme.txt
r3545 r5534 1 1 Automatically generated OpenLayers API documentation is online: 2 2 3 http://dev.openlayers.org/ docs/overview-tree.html3 http://dev.openlayers.org/apidocs sandbox/GooglePopups/openlayers/doc_config/Languages.txt
r3545 r5534 1 Format: 1.351 Format: Development Release 12-07-2007 (1.35 base) 2 2 3 3 # This is the Natural Docs languages file for this project. If you change sandbox/GooglePopups/openlayers/doc_config/Menu.txt
r5410 r5534 1 Format: 1.351 Format: Development Release 12-07-2007 (1.35 base) 2 2 3 3 … … 8 8 # Footer: [text] 9 9 # If you want to add a copyright notice, this would be the place to do it. 10 11 # You can add a timestamp to your documentation like one of these: 12 # Timestamp: Generated on month day, year 13 # Timestamp: Updated mm/dd/yyyy 14 # Timestamp: Last updated mon day 15 # 16 # m - One or two digit month. January is "1" 17 # mm - Always two digit month. January is "01" 18 # mon - Short month word. January is "Jan" 19 # month - Long month word. January is "January" 20 # d - One or two digit day. 1 is "1" 21 # dd - Always two digit day. 1 is "01" 22 # day - Day with letter extension. 1 is "1st" 23 # yy - Two digit year. 2006 is "06" 24 # yyyy - Four digit year. 2006 is "2006" 25 # year - Four digit year. 2006 is "2006" 10 26 11 27 … … 81 97 Group: Feature { 82 98 83 File: Feature ( OpenLayers/Feature.js)99 File: Feature (no auto-title, OpenLayers/Feature.js) 84 100 File: Vector (no auto-title, OpenLayers/Feature/Vector.js) 85 101 File: WFS (no auto-title, OpenLayers/Feature/WFS.js) … … 88 104 Group: Format { 89 105 90 File: Format ( OpenLayers/Format.js)106 File: Format (no auto-title, OpenLayers/Format.js) 91 107 File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js) 92 108 File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js) … … 94 110 File: JSON (no auto-title, OpenLayers/Format/JSON.js) 95 111 File: KML (no auto-title, OpenLayers/Format/KML.js) 112 File: Text (no auto-title, OpenLayers/Format/Text.js) 96 113 File: WFS (no auto-title, OpenLayers/Format/WFS.js) 97 114 File: WKT (no auto-title, OpenLayers/Format/WKT.js) … … 101 118 Group: Geometry { 102 119 103 File: Geometry ( OpenLayers/Geometry.js)120 File: Geometry (no auto-title, OpenLayers/Geometry.js) 104 121 File: Collection (no auto-title, OpenLayers/Geometry/Collection.js) 105 122 File: Curve (no auto-title, OpenLayers/Geometry/Curve.js) … … 117 134 Group: Handler { 118 135 119 File: Handler ( OpenLayers/Handler.js)136 File: Handler (no auto-title, OpenLayers/Handler.js) 120 137 File: Box (no auto-title, OpenLayers/Handler/Box.js) 138 File: Click (no auto-title, OpenLayers/Handler/Click.js) 121 139 File: Drag (no auto-title, OpenLayers/Handler/Drag.js) 122 140 File: Feature (no auto-title, OpenLayers/Handler/Feature.js) … … 133 151 Group: Layer { 134 152 135 File: Layer ( OpenLayers/Layer.js)153 File: Layer (no auto-title, OpenLayers/Layer.js) 136 154 File: Boxes (no auto-title, OpenLayers/Layer/Boxes.js) 137 155 File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js) … … 170 188 171 189 File: Projection (no auto-title, OpenLayers/Projection.js) 190 File: Rule (no auto-title, OpenLayers/Rule.js) 191 File: Style (no auto-title, OpenLayers/Style.js) 172 192 173 193 Group: Popup { … … 188 208 Group: Tile { 189 209 190 File: Tile ( OpenLayers/Tile.js)210 File: Tile (no auto-title, OpenLayers/Tile.js) 191 211 File: Image (no auto-title, OpenLayers/Tile/Image.js) 192 212 File: WFS (no auto-title, OpenLayers/Tile/WFS.js) 193 213 } # Group: Tile 214 215 Group: Rule { 216 217 File: Comparison (no auto-title, OpenLayers/Rule/Comparison.js) 218 File: FeatureId (no auto-title, OpenLayers/Rule/FeatureId.js) 219 File: Logical (no auto-title, OpenLayers/Rule/Logical.js) 220 } # Group: Rule 194 221 195 222 File: Util (OpenLayers/Util.js) sandbox/GooglePopups/openlayers/doc_config/Topics.txt
r3545 r5534 1 Format: 1.351 Format: Development Release 12-07-2007 (1.35 base) 2 2 3 3 # This is the Natural Docs topics file for this project. If you change anything … … 56 56 # Whether the topics are part of the class hierarchy. Defaults to no. 57 57 # 58 # Variable Type: [yes|no]59 # Whether the topics can be a variable type. Defaults to no.60 #61 58 # Page Title If First: [yes|no] 62 59 # Whether the topic's title becomes the page title if it's the first one in sandbox/GooglePopups/openlayers/examples/select-feature.html
r5362 r5534 14 14 <script src="../lib/OpenLayers.js"></script> 15 15 <script type="text/javascript"> 16 var map, drawControls , select;16 var map, drawControls; 17 17 OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '2'; 18 18 function init(){ … … 39 39 vectors, OpenLayers.Handler.Polygon 40 40 ), 41 select: new OpenLayers.Control.SelectFeature(vectors), 42 hover: new OpenLayers.Control.SelectFeature( 43 vectors, {hover: true} 41 select: new OpenLayers.Control.SelectFeature( 42 vectors, 43 { 44 clickout: false, toggle: false, 45 multiple: false, hover: false, 46 toggleKey: "ctrlKey", // ctrl key removes from selection 47 multipleKey: "shiftKey" // shift key adds to selection 48 } 44 49 ) 45 50 }; … … 60 65 control.deactivate(); 61 66 } 67 } 68 } 69 70 function update() { 71 var clickout = document.getElementById("clickout").checked; 72 drawControls.select.clickout = clickout; 73 var hover = document.getElementById("hover").checked; 74 drawControls.select.hover = hover; 75 if(hover && drawControls.select.active) { 76 // turn on/off to clear feature property of handler 77 drawControls.select.deactivate(); 78 drawControls.select.activate(); 62 79 } 63 80 } … … 95 112 <input type="radio" name="type" value="select" id="selectToggle" 96 113 onclick="toggleControl(this);" /> 97 <label for="selectToggle">select feature on click</label> 114 <label for="selectToggle">select feature</label> 115 <ul> 116 <li> 117 <input id="clickout" type="checkbox" 118 name="clickout" onchange="update()" /> 119 <label for="clickout">click out to unselect features</label> 120 </li> 121 <li> 122 <input id="hover" type="checkbox" 123 name="hover" onchange="update()" /> 124 <label for="hover">hover to select features</label> 125 </li> 126 </ul> 98 127 </li> 99 <li> 100 <input type="radio" name="type" value="hover" id="hoverToggle" 101 onclick="toggleControl(this);" /> 102 <label for="hoverToggle">select feature on hover</label> 103 </li> 104 </ul> 128 </ul> 129 <p>Use the shift key to select multiple features. Use the ctrl key to 130 toggle selection on features one at a time. Note: the "clickout" option has no 131 effect when "hover" is selected.</p> 105 132 </body> 106 133 </html> sandbox/GooglePopups/openlayers/examples/spherical-mercator.html
r5362 r5534 26 26 function init(){ 27 27 var options = { 28 projection: "EPSG:900913", 28 projection: new OpenLayers.Projection("EPSG:900913"), 29 displayProjection: new OpenLayers.Projection("EPSG:4326"), 29 30 units: "m", 30 31 maxResolution: 156543.0339, … … 40 41 ); 41 42 var gsat = new OpenLayers.Layer.Google( 42 "Google Sat telite",43 "Google Satellite", 43 44 {type: G_SATELLITE_MAP, 'sphericalMercator': true} 44 45 ); … … 50 51 // create Virtual Earth layers 51 52 var veroad = new OpenLayers.Layer.VirtualEarth( 52 "Virtual Earth R aods",53 "Virtual Earth Roads", 53 54 {'type': VEMapStyle.Road, 'sphericalMercator': true} 54 55 ); … … 68 69 ); 69 70 var yahoosat = new OpenLayers.Layer.Yahoo( 70 "Yahoo Sat telite",71 "Yahoo Satellite", 71 72 {'type': YAHOO_MAP_SAT, 'sphericalMercator': true} 72 73 ); … … 105 106 map.addControl(new OpenLayers.Control.LayerSwitcher()); 106 107 map.addControl(new OpenLayers.Control.EditingToolbar(vector)); 108 map.addControl(new OpenLayers.Control.Permalink()); 109 map.addControl(new OpenLayers.Control.MousePosition()); 107 110 map.zoomToMaxExtent() 108 111 } … … 137 140 138 141 <div id="docs"> 139 This is an example of using googles Mercator projection layers in a map window140 142 </div> 141 143 </body> sandbox/GooglePopups/openlayers/examples/tilecache.html
r5362 r5534 14 14 map = new OpenLayers.Map( $('map')); 15 15 layer = new OpenLayers.Layer.TileCache("TileCache Layer", 16 ["http://c0.labs.metacarta.com/wms-c/cache/", 17 "http://c1.labs.metacarta.com/wms-c/cache/", 18 "http://c2.labs.metacarta.com/wms-c/cache/", 19 "http://c3.labs.metacarta.com/wms-c/cache/", 20 "http://c4.labs.metacarta.com/wms-c/cache/"], 21 "basic", {'format': 'image/png'}); 16 ["http://c0.labs.metacarta.com/wms-c/cache/", 17 "http://c1.labs.metacarta.com/wms-c/cache/", 18 "http://c2.labs.metacarta.com/wms-c/cache/", 19 "http://c3.labs.metacarta.com/wms-c/cache/", 20 "http://c4.labs.metacarta.com/wms-c/cache/"], 21 "basic", 22 { 23 'format': 'image/png', 24 maxResolution: 180/256 // same as the TileCache config 25 } 26 ); 22 27 map.addLayer(layer); 23 28 map.setCenter(new OpenLayers.LonLat(0, 0), 0); … … 42 47 43 48 <p id="shortdesc"> 44 Demonstrates a TileCache layer that loads tiles from from a web accessible disk-based cache only. 49 Demonstrates a TileCache layer that loads tiles from from a web 50 accessible disk-based cache only. 45 51 </p> 46 52 47 <div id="map"> 53 <div id="map"></div> 48 54 49 55 <div id="docs"> 56 This layer should be used for web accessible disk-based caches only. 57 It is not used to request new tiles from TileCache. Note that you 58 should specify resolutions explicitly on this layer so that they match 59 your TileCache configuration. 50 60 </div> 51 61 </body> sandbox/GooglePopups/openlayers/examples/vector-formats.html
r5362 r5534 56 56 <script type="text/javascript"> 57 57 var map, vectors, formats; 58 function updateFormats() { 59 var in_options = { 60 'internalProjection': map.baseLayer.projection, 61 'externalProjection': new OpenLayers.Projection(OpenLayers.Util.getElement("inproj").value) 62 } 63 var out_options = { 64 'internalProjection': map.baseLayer.projection, 65 'externalProjection': new OpenLayers.Projection(OpenLayers.Util.getElement("outproj").value) 66 } 67 formats = { 68 'in': { 69 wkt: new OpenLayers.Format.WKT(in_options), 70 geojson: new OpenLayers.Format.GeoJSON(in_options), 71 georss: new OpenLayers.Format.GeoRSS(in_options), 72 gml: new OpenLayers.Format.GML(in_options), 73 kml: new OpenLayers.Format.KML(in_options) 74 }, 75 'out': { 76 wkt: new OpenLayers.Format.WKT(out_options), 77 geojson: new OpenLayers.Format.GeoJSON(out_options), 78 georss: new OpenLayers.Format.GeoRSS(out_options), 79 gml: new OpenLayers.Format.GML(out_options), 80 kml: new OpenLayers.Format.KML(out_options) 81 } 82 }; 83 } 58 84 function init(){ 59 85 map = new OpenLayers.Map('map'); … … 74 100 map.addControl(select); 75 101 select.activate(); 76 77 formats = { 78 wkt: new OpenLayers.Format.WKT(), 79 geojson: new OpenLayers.Format.GeoJSON(), 80 georss: new OpenLayers.Format.GeoRSS(), 81 gml: new OpenLayers.Format.GML(), 82 kml: new OpenLayers.Format.KML() 83 }; 102 103 updateFormats(); 84 104 85 105 map.setCenter(new OpenLayers.LonLat(0, 0), 1); … … 90 110 // second argument for pretty printing (geojson only) 91 111 var pretty = document.getElementById("prettyPrint").checked; 92 var str = formats[ type].write(feature, pretty);112 var str = formats['out'][type].write(feature, pretty); 93 113 // not a good idea in general, just for this demo 94 114 str = str.replace(/,/g, ', '); … … 99 119 var element = document.getElementById('text'); 100 120 var type = document.getElementById("formatType").value; 101 var features = formats[ type].read(element.value);121 var features = formats['in'][type].read(element.value); 102 122 var bounds; 103 123 if(features) { … … 165 185 name="prettyPrint" value="1" /> 166 186 <br /> 187 Input Projection: <select id="inproj" onchange='updateFormats()'> 188 <option value="EPSG:4326" selected="selected">EPSG:4326</option> 189 <option value="EPSG:900913">Spherical Mercator</option> 190 </select> <br /> 191 Output Projection: <select id="outproj" onchange='updateFormats()'> 192 <option value="EPSG:4326" selected="selected">EPSG:4326</option> 193 <option value="EPSG:900913">Spherical Mercator</option> 194 </select> 195 <br /> 167 196 <textarea id="text">paste text here...</textarea> 168 197 <br /> sandbox/GooglePopups/openlayers/lib/OpenLayers.js
r5438 r5534 178 178 "OpenLayers/Format/WFS.js", 179 179 "OpenLayers/Format/WKT.js", 180 "OpenLayers/Format/SLD.js", 180 181 "OpenLayers/Format/Text.js", 181 182 "OpenLayers/Format/JSON.js", sandbox/GooglePopups/openlayers/lib/OpenLayers/BaseTypes.js
r5317 r5534 350 350 }; 351 351 } 352 353 /********************* 354 * * 355 * ARRAY * 356 * * 357 *********************/ 358 359 OpenLayers.Array = { 360 361 /** 362 * APIMethod: OpenLayers.Array.filter 363 * Filter an array. Provides the functionality of the 364 * Array.prototype.filter extension to the ECMA-262 standard. Where 365 * available, Array.prototype.filter will be used. 366 * 367 * Based on well known example from http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:filter 368 * 369 * Parameters: 370 * array - {Array} The array to be filtered. This array is not mutated. 371 * Elements added to this array by the callback will not be visited. 372 * callback - {Function} A function that is called for each element in 373 * the array. If this function returns true, the element will be 374 * included in the return. The function will be called with three 375 * arguments: the element in the array, the index of that element, and 376 * the array itself. If the optional caller parameter is specified 377 * the callback will be called with this set to caller. 378 * caller - {Object} Optional object to be set as this when the callback 379 * is called. 380 * 381 * Returns: 382 * {Array} An array of elements from the passed in array for which the 383 * callback returns true. 384 */ 385 filter: function(array, callback, caller) { 386 var selected = []; 387 if (Array.prototype.filter) { 388 selected = array.filter(callback, caller); 389 } else { 390 var len = array.length; 391 if (typeof callback != "function") { 392 throw new TypeError(); 393 } 394 for(var i=0; i<len; i++) { 395 if (i in array) { 396 var val = array[i]; 397 if (callback.call(caller, val, i, array)) { 398 selected.push(val); 399 } 400 } 401 } 402 } 403 return selected; 404 } 405 406 }; sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/ArgParser.js
r4985 r5534 31 31 */ 32 32 layers: null, 33 34 /** 35 * APIProperty: displayProjection 36 * {<OpenLayers.Projection>} Requires proj4js support. 37 * Projection used when reading the coordinates from the URL. This will 38 * reproject the map coordinates from the URL into the map's 39 * projection. 40 * 41 * If you are using this functionality, be aware that any permalink 42 * which is added to the map will determine the coordinate type which 43 * is read from the URL, which means you should not add permalinks with 44 * different displayProjections to the same map. 45 */ 46 displayProjection: null, 33 47 34 48 /** … … 57 71 if ( (control != this) && 58 72 (control.CLASS_NAME == "OpenLayers.Control.ArgParser") ) { 73 74 // If a second argparser is added to the map, then we 75 // override the displayProjection to be the one added to the 76 // map. 77 if (control.displayProjection != this.displayProjection) { 78 this.displayProjection = control.displayProjection; 79 } 80 59 81 break; 60 82 } … … 98 120 this.map.events.unregister('changebaselayer', this, 99 121 this.setCenter); 100 122 123 if (this.displayProjection) { 124 this.center.transform(this.displayProjection, 125 this.map.getProjectionObject()); 126 } 127 101 128 this.map.setCenter(this.center, this.zoom); 102 129 } sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/ModifyFeature.js
r5470 r5534 30 30 31 31 /** 32 * APIProperty: clickout 33 * {Boolean} Unselect features when clicking outside any feature. 34 * Default is true. 35 */ 36 clickout: true, 37 38 /** 39 * APIProperty: toggle 40 * {Boolean} Unselect a selected feature on click. 41 * Default is true. 42 */ 43 toggle: true, 44 45 /** 32 46 * Property: layer 33 47 * {<OpenLayers.Layer.Vector>} … … 166 180 var selectOptions = { 167 181 geometryTypes: this.geometryTypes, 182 clickout: this.clickout, 183 toggle: this.toggle, 168 184 onSelect: function(feature) { 169 185 control.selectFeature.apply(control, [feature]); sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/MousePosition.js
r5490 r5534 52 52 */ 53 53 lastXy: null, 54 55 /** 56 * APIProperty: displayProjection 57 * {<OpenLayers.Projection>} A projection that the 58 * mousecontrol will display. 59 */ 60 displayProjection: null, 54 61 55 62 /** … … 114 121 return; 115 122 } 123 if (this.displayProjection) { 124 lonLat.transform(this.map.getProjectionObject(), 125 this.displayProjection ); 126 } 116 127 this.lastXy = evt.xy; 128 117 129 } 118 130 sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/Navigation.js
r5002 r5534 58 58 this.dragPan.activate(); 59 59 this.wheelHandler.activate(); 60 this.clickHandler.activate(); 60 61 this.zoomBox.activate(); 61 62 return OpenLayers.Control.prototype.activate.apply(this,arguments); … … 68 69 this.zoomBox.deactivate(); 69 70 this.dragPan.deactivate(); 71 this.clickHandler.deactivate(); 70 72 this.wheelHandler.deactivate(); 71 73 return OpenLayers.Control.prototype.deactivate.apply(this,arguments); … … 76 78 */ 77 79 draw: function() { 78 this.map.events.register( "dblclick", this, this.defaultDblClick ); 80 this.clickHandler = new OpenLayers.Handler.Click(this, 81 { 'dblclick': this.defaultDblClick }, 82
