Compare commits

...

201 Commits

Author SHA1 Message Date
crschmidt
4fff45f9b4 Tagging the 2.10 rc2 Release
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.10-rc2@10716 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-02 21:47:14 +00:00
crschmidt
efb925d632 Commit fixes for:
* (Closes #2360) make Layer.addOptions call initResolutions if necessary
 * (Closes #2656) no way to pass read options from protocol to format
 * (Closes #2751) Changes in languages: "es" and "ca".
 * (Closes #2814) SLDSelect control tests failing
 * (Closes #2815) Cluster Strategy should not destroy all features

Also:
 * Change examples to use OSGeo, rather than MetaCarta, servers.
 * Change copyright statements to correctly state joint copyright
   in the project, rather than MetaCarta copyright.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.10@10715 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-02 21:43:25 +00:00
crschmidt
48145f62be Branching for 2.10 release
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.10@10701 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-26 14:42:51 +00:00
crschmidt
54fd1f561c Fix for Anchored popup does not respect anchor size when relative position is
'tl', (Closes #2651)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10700 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-26 14:35:00 +00:00
crschmidt
acae8a8013 Panel: Adding controls, unnecessarily activations occur followed by
deactivations (closes #2769)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10699 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-26 14:34:30 +00:00
Frédéric Junod
e32372e4b2 replace marker url (closes #2273)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10698 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-25 12:13:57 +00:00
Frédéric Junod
8b0d660b00 add missing semicolon
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10697 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-25 06:27:44 +00:00
Frédéric Junod
a167860818 add missing semicolon
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10696 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-25 06:25:11 +00:00
ahocevar
257cc5576b Give Layer.Vector a getFeatureByFid and a getFeatureBy method. Thanks vog for this very clean patch and the verbose unit tests. r=me (closes #2722)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10691 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-24 11:13:51 +00:00
ahocevar
fce15acc01 better regex for host check (see #1691)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10690 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-24 09:25:46 +00:00
ahocevar
b7f0f27dcd re-added MultiMap test with new API url and API key, but only if running from (www.)openlayers.org. The multimap-mercator.html example was fixed with r10552 already (closes #1691)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10689 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-24 09:19:19 +00:00
Frédéric Junod
cdb4b78136 fix WKT MULIPOINT in tests (see #2670)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10688 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-24 07:12:51 +00:00
Frédéric Junod
5f59b8d72d add missing semicolon
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10687 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 14:39:06 +00:00
Frédéric Junod
7295ffc9d4 Element.{show|hide}: check element before setting display. r=elemoine (closes #2652)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10682 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 12:43:36 +00:00
Éric Lemoine
6e28a7cafd Layer: add getter method for maxExtent, p=regli_dominik, r=me
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10681 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 12:37:39 +00:00
Éric Lemoine
6f73f7059f make Layer.addOptions call initResolutions if necessary, r=bartvde (closes #2360)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10680 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 12:28:57 +00:00
ahocevar
ce0ba0b570 New saveState option to restore the active state of controls in a panel after re-activating the panel. r=crschmidt,jorix (closes #2753)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10679 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 12:09:42 +00:00
Frédéric Junod
a6319b2974 LonLat.add: cast arguments to float. r=crschmidt (closes #2686)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10678 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 11:50:56 +00:00
Éric Lemoine
19af3bb8e7 Fix a localization problem with the XML format's createTextNode method in IE, p=fvanderbiest,me r=fredj (closes #2782)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10676 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 08:51:46 +00:00
Frédéric Junod
7832d8dda1 Add a smooth transition for singleTile layer panning only. r=tschaub (closes #2593)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10675 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 07:04:39 +00:00
Frédéric Junod
cb3fc7842b Add a new option to Control.OverviewMap to start maximized. r=bartvde (closes #2746)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10674 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 06:59:49 +00:00
Frédéric Junod
29dece02a5 Use the graphicOpacity to set canvas.globalAlpha. Move the image source assignment after the onload. r=crschmidt (closes #2608)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10673 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-23 06:52:17 +00:00
bartvde
6b9ee6bb5e WMSGetFeatureInfo: add an event when no queryable layers are found, r=crschmidt (closes #2744)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10670 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-22 18:44:44 +00:00
crschmidt
ed2e943e52 Update MousePositoin control to support activate/deactivate. Patch by jorix,
tests pass, and controls.html example still works the same as before.
(Closes #2520)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10669 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-21 22:45:32 +00:00
crschmidt
c5f233ab8c Extend the maximum size of the FramedCloud popup to 1200px wide, instead of
600. Updated image and patch provided by adrian_gh.popa@romtelecom.ro, 
tested by me. r=me, (Closes #2742)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10668 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-21 17:38:27 +00:00
crschmidt
bf778b21c1 Remove unused events from OpenLayers documentation. doc change
only. (Closes #2553)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10667 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-21 16:20:51 +00:00
crschmidt
69032c0534 ArcIMS layer does not have a proper clone method. patch=bartvde,
r=me, tests pass in Safari and IE, (Closes #2490)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10666 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-21 16:17:12 +00:00
crschmidt
3520c32140 In order to resolve a memory leak in IE, observable via drip, remove elemnts
from panels before calling innerHTML. This resolves the memory error. All
tests pass in FF and IE, and there are no obvious side effects I can imagine;
committing. Patch from aabt, r=me, (Closes #2745)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10665 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-21 16:10:21 +00:00
crschmidt
da14451dbd Fix from tim_abell to make build.py callable from another function,
(Closes #2468)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10664 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-21 16:06:06 +00:00
crschmidt
a785dc1b1f Commit fix for #2670 from fredj, r=me (Closes #2670)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10663 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-21 16:04:50 +00:00
ahocevar
23137091fc Make VML behave when removing previously added stroke symbolizers. r=tschaub (closes #2784)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10659 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 23:56:34 +00:00
Tim Schaub
f37c9f8aef Making it so mergeWithDefaultFilter returns undefined if the protocol defaultFilter is falsey. r=ahocevar,me (closes #2796)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10658 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 23:48:45 +00:00
ahocevar
ee7065c9fa Fixed ScaleLine when geodesic option is set to true and the map center is beyond the poles. Also added geodesic option to the Scale control. r=tschaub (closes #2600)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10657 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 23:29:33 +00:00
Tim Schaub
3f172c501d Adding a WMTSGetFeatureInfo control for querying WMTS layers. r=ahocevar (closes #2678)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10656 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 22:49:08 +00:00
Tim Schaub
25fac24436 Adding a filter strategy for limiting features that are included in a layer's collection. The strategy takes a filter and caches features that don't pass the filter. Call setFilter on the strategy to update the cache and collection on the layer. r=ahocevar (closes #2790)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10655 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 22:41:01 +00:00
Tim Schaub
28558c171c Giving the getCentroid method on geometry collections a 'weighted' argument. If true, the centroid will be calculated based on the weighted average of all component centroids. Thanks for the great patch dzwarg. r=me (closes #2469)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10652 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 20:28:48 +00:00
Tim Schaub
2c7eade60c Demonstrating that the layer.destroyFeatures() issue is already fixed (see #2649).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10651 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 20:01:08 +00:00
Tim Schaub
59953b8eb6 Adding a zoomOffset property to XYZ and TMS layers. This allows you to have a map with a maximum resolution that differs from the maximum cache resolution (if you want to show a subset of OSM for example). r=ahocevar (closes #2616)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10650 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 19:40:53 +00:00
Tim Schaub
5750b5f6e0 Properly setting the hoverRequest so it can be aborted. r=ahocevar (closes #2797)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10649 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 19:30:00 +00:00
bartvde
050eda6670 Layer.WMS should use a supported exception format for WMS 1.3 by default, p=ahocevar, r=me (closes #2478)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10648 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 18:48:55 +00:00
ahocevar
7eaa37856c don't treat strings as array. p=madair, r=me (closes #2563)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10646 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 17:05:23 +00:00
ahocevar
814810f6ed Give ReglarPolygon handler a layerOptions config option. p=zanchin, r=me (closes #2755)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10645 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 16:58:39 +00:00
ahocevar
9450124359 Made transformcomplete listener do as documented - return the transformed feature. p=patzi, r=me (closes #2714)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10644 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 16:56:46 +00:00
Tim Schaub
9d4e91e717 Creating a Type variable that refers to arguments[i]. Including parentheses when calling the constructor. r=elemoine (closes #2791)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10642 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-20 15:50:46 +00:00
ahocevar
0d6658f52d fixed positioning of rotated graphics after zoom change. r=tschaub (closes #2733)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10639 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-19 15:51:19 +00:00
ahocevar
7993fc177b Fixed onselect handling for the first down-move-up-out cycle. r=bartvde (closes #2735)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10637 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-19 14:52:45 +00:00
Tim Schaub
94c29f1d4d Updating example and tests to demonstrate the trackAttributes property for per point attribute parsing (see #2771).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10633 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-18 18:53:43 +00:00
ahocevar
42fedc4d69 Make it safer to extend the Google Layer by not invoking Map.getLayersByClass. Also removed an unused variable. tschaub made one more change to check for other Google layers only if we have a cache already - otherwise the whole logic would not apply anyway. Thanks iacovlev_pavel for bringing this up on IRC. p+r=tschaub,me (closes #2793)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10632 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-18 16:43:45 +00:00
Tim Schaub
415fcbf9f9 Adding gx:Track parsing to the KML format. If extractTracks is true, the parser will extract points from gx:Track elements as features, acquiring attributes from the Placemark plus when, trackId, altitude, heading, tilt, and roll (assuming angles are present). r=ahocevar (closes #2771)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10631 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-18 15:38:09 +00:00
Tim Schaub
fc9e67318e Adding OpenLayers.Date utility functions to parse and serialize dates. The date string format parsed complies with ECMA-262 (v5) section 15.9.1.15, derived from the profile of ISO 8601 for date and time on the Internet (http://tools.ietf.org/html/rfc3339). Where available (and functional) the native date.toISOString and Date.parse methods will be used. r=ahocevar (closes #2778)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10630 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-18 15:11:27 +00:00
ahocevar
9ae54040db Only call dashStyle when strokeDashstyle is set. r=tschaub (closes #2768)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10621 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-15 19:53:14 +00:00
Éric Lemoine
5a8775cd16 the old-but-still-used GML format creates features with geometries of type OpenLayers.Bounds, p=fvanderbiest, r=me (closes #2724)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10614 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-11 14:24:51 +00:00
bartvde
602cf46c10 Marking setLayer on SelectFeature Control as API, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10613 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-11 09:37:15 +00:00
ahocevar
68d82edc01 Added note about requirement of serializability of feature attributes. Non-functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10609 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-09 14:05:57 +00:00
Tim Schaub
c68e234b71 Slippery proxy! (That 501 gets me all the time.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10605 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-07 00:06:11 +00:00
Tim Schaub
a52cb98622 Example demonstrating the use of a filter with the WFS protocol.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10600 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-05 21:20:56 +00:00
Tim Schaub
33410b0e76 Adding a removeAllFeatures method to the vector layer. This bypasses a few unnecessary steps when removing all features but retains the same behavior as the removeFeatures method otherwise. Optimizing the clear method on elements renderers a bit by avoiding length calculation of the live collection and looking up the first child once per node removal. r=ahocevar (closes #2774)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10597 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-05 15:46:23 +00:00
Tim Schaub
e0c3db1227 Making consistent the evaluate method of filters. The evaluate method accepts vector features, making possible logical filters that combine spatial and comparison filters. r=ahocevar (closes #2773)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10596 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-05 15:38:55 +00:00
Tim Schaub
c15a1a0779 Making it so the clear method on the canvas renderer permanently clears features (as with the other renderers). r=crschmidt (closes #2775)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10595 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-05 15:34:48 +00:00
ahocevar
d965d4a1a0 fixed APIdocs. Non-functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10594 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-05 14:30:46 +00:00
crschmidt
c77688a0be Change the OSM example to show how to setCenter (using reprojection), in
part to demonstrate that OSM is in spherical mercator coords.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10583 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-04 18:41:00 +00:00
ahocevar
f0736370f3 Use a loop variable to avoid array lookups and use one if clause instead of two. Non-functional change (see #2764)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10577 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-04 08:10:40 +00:00
ahocevar
ea1290f8d8 Do not change the active state of button controls on a panel when a tool control is activated. p=jorix, r=me (closes #2764)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10576 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-04 07:56:25 +00:00
Tim Schaub
9d3c4ecb1c Firing the beforefeaturesremoved event from the vector layer. r=ahocevar (closes #2770)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10575 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-03 23:37:31 +00:00
Tim Schaub
31afaf1fca Fixes for the WMTS layer to properly update matrix related properties. Determining the best matrix in the set based on current map resolution. Properly parsing TopLeftCorner coordinates and providing a way to specify identifiers for backwards CRS. r=ahocevar (closes #2677)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10570 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-03 15:21:06 +00:00
ahocevar
f89fb1f226 make yx property an object rather than an array. r=elemoine,bartvde (closes #2767)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10569 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-03 09:15:26 +00:00
Tim Schaub
0892e61bcb Documenting that OSM extends XYZ and XYZ extends Grid. The buffer property comes from the Grid prototype. (closes #2766)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10561 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-02 19:53:00 +00:00
Tim Schaub
6c0952934f Adding point, line, polygon, text, and raster symbolizer constructors. This paves the way for rendering multiple symbolizers per rule. The SLD parser now successfully round-trips documents with multiple symbolizers and multiple FeatureTypeStyle elements (through the symbolizer zIndex property). The Style2 (yes, ack) constructor is used to represent a collection of rules with multiple symbolizers. Style2 objects are currently only used by the SLD parser if the multipleSymbolizer property is set to true. Future enhancements to the renderers can be made to account for multiple symbolizers. r=ahocevar (closes #2760).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10560 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-02 19:49:52 +00:00
Tim Schaub
9fd7463680 Making it so layers that use the SphericalMercator mixin call getLonLatFromViewPortPx and getViewPortPxFromLonLat on the Layer prototype instead of relying on the underlying map object for pixel to map location translations. This allows the Google (and other SM) layers to be used as a base layer but not be visible (with allOverlays set true on the map). r=ahocevar (closes #2759)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10554 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-29 17:23:10 +00:00
ahocevar
f2247ae079 New api key and overlay for multimap example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10552 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-29 12:44:31 +00:00
ahocevar
e5f0cfe906 Respect setVisibity(false) before layer is fully loaded. r=tschaub (closes #2750)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10551 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-29 07:25:21 +00:00
ahocevar
a5f2ddcfa1 Google layer improvements for maps with allOverlays set to true. r=tschaub (closes #2758)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10550 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-29 07:23:02 +00:00
crschmidt
ca27481c66 The sandbox is now updated here as well, so check the most recent
rev for the whole tree instead of just that particular checkout.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10520 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-27 12:55:25 +00:00
ahocevar
7398216346 Implemented activate, deactivate and destroy methods; use autoActivate option with a default of true. p=jorix,r=me (closes #2567)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10510 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-23 14:38:21 +00:00
ahocevar
b2f810361d Improved clone method for Layer.XYZ; gave Layer.OSM its own clone method. Thanks aratcliffe for bringing this up. r=tschaub (closes #2738)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10507 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-21 07:55:37 +00:00
crschmidt
6adffe5be2 Add updating sandbox to script
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10502 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-20 15:27:13 +00:00
pgiraud
2a30747bd9 add support for the ol:tileSize layer property in WMC, p=fvanderbiest,r=me (Closes #2740)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10491 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-15 15:01:36 +00:00
ahocevar
67b0c7180f Added a note about incompatibility with UI controls provided by the GMaps API. Thanks pwr for pointing this out (see #2736)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10485 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-13 08:28:16 +00:00
Tim Schaub
ee00417729 Making the Google v3 layer work with deferred map rendering. r=ahocevar (closes #2731)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10484 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-12 15:34:41 +00:00
Frédéric Junod
d880d2d2b7 add missing semicolon, remove global and unused variables, remove unreachable code
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10482 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-12 06:45:19 +00:00
Tim Schaub
afa7b9c2bb Making it so the Google layer is not visible if used as an overlay with visibility false. Container is offset to allow proper calculation of size. r=ahocevar (closes #2730)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10480 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-09 21:52:04 +00:00
Tim Schaub
3d0c264198 Moving the OpenLayers.Layer.Google.v2 definition into Google.js so we don't break any custom builds that include just the Google.js script. r=ahocevar (closes #2729)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10479 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-09 21:10:00 +00:00
Tim Schaub
a5ca639c5b As with r10477, this change simplifies the setGMapVisibility tests to make sure that repositionMapElements is getting called. These tests were periodically failing depending upon the order in which they run. This likely indicates we've got to do some more cleaning up in map.destroy or elsewhere (see #2493).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10478 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-09 20:21:30 +00:00
Tim Schaub
1d8773eab6 In practice, this allOverlays example displays the terms of service element. In this test, it appears that the google script is hiding it again after we make it visible - perhaps because it is not actually displayed. And this is not always consistent. I can get this test to pass by making the timeout shorter. In any case, a simpler test is to confirm that repositionMapElements is getting called (see #2493).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10477 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-09 18:05:42 +00:00
Tim Schaub
309d198e04 Removing stuff that was added twice in r10474 (see #2493).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10476 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-09 15:50:45 +00:00
ahocevar
64842fd711 add support for GMaps v3. Thanks tschaub for the big improvements to my original patch. p=tschaub,me, r=tschaub (closes #2493)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10474 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-09 12:01:11 +00:00
Frédéric Junod
4d3a1eebf7 coding style: add braces around test, use {} instead of new Array(), remove unused variable
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10473 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-09 11:53:36 +00:00
Frédéric Junod
74a6f7e895 replace tabs with spaces
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10472 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-09 11:45:31 +00:00
Tim Schaub
e32d63d7b2 Correctly selecting url when an array is provided. Thanks cmoullet for the patch. r=me (closes #2727)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10471 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-08 16:46:06 +00:00
Frédéric Junod
b81b05a9b5 remove tabs, remove unused variable
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10469 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-08 10:29:41 +00:00
Frédéric Junod
1c4afaaded add missing semicolon.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10468 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-08 10:15:37 +00:00
Frédéric Junod
8c2caf91d1 remove wrong svn:mime-type. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10467 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-08 09:59:29 +00:00
bartvde
c4eaee5b5c fix comment error in containsBounds non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10465 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-08 08:48:23 +00:00
bartvde
b428e58090 typo in previous commit
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10464 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-08 08:24:41 +00:00
bartvde
28a7776d04 fix wrong comment in Cluster Strategy non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10463 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-08 08:22:19 +00:00
Frédéric Junod
42b003669c add missing semicolon.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10457 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-06 09:37:38 +00:00
Frédéric Junod
509042078e update documentation link. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10456 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-06 08:16:09 +00:00
Frédéric Junod
d47944e4b7 remove unused variable and unreachable code, replace tab with space. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10452 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-04 19:28:20 +00:00
Frédéric Junod
de462bbe33 remove global and unused variable. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10451 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-03 21:14:00 +00:00
Tim Schaub
22aa4281fa Making it more convenient to create WMTS layers from capabilities documents. The format now has a createLayer method that takes a capabilities response object and a layer configuration object. This returns a properly configured WMTS layer based on the layer and matrix definition found in the capabilities. Unless otherwise specified, the layer name will be derived from the advertised title, and the style identifier will be the advertised default. r=ahocevar (closes #2676)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10449 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-02 16:11:37 +00:00
ahocevar
ef9afd22cb change the SLDSelect control's default Polygon symbolizer to produce the same result as before r10430. r=elemoine (closes #2712)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10446 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-01 14:30:57 +00:00
Frédéric Junod
ea183210fe replace the deprecated OpenLayers.Util.getArgs with OpenLayers.Util.getParameters
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10445 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-01 13:22:38 +00:00
Frédéric Junod
72e2280c87 don't use the deprecated bind function
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10442 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-01 09:46:32 +00:00
Frédéric Junod
955ee1b1a9 fix token syntax in lang files. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10441 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-01 08:18:15 +00:00
Frédéric Junod
a9a9b6387e remove tabs and trailing whitespace. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10439 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-07-01 07:33:50 +00:00
Tim Schaub
1f601390dd Documentation tweak for the vector layer.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10438 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-30 19:48:29 +00:00
Frédéric Junod
40539ff6d3 remove setMap function from WMSGetFeatureInfo. r=ahocevar (closes #2717)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10437 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-30 13:56:50 +00:00
Frédéric Junod
c8cad59575 remove unnecessary semicolon and unused variable. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10436 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-30 11:58:49 +00:00
bartvde
20a4025af0 Renderer: give featureId to eraseGeometry function, r=fredj (closes #2693)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10435 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-30 10:49:06 +00:00
Frédéric Junod
e643531a0a fix OverviewMap regression. r=elemoine (closes #2137)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10434 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-30 09:06:27 +00:00
bartvde
0bc3e3c8b3 Layer.Vector's renderers array should be able to deal with function as well as strings so that people can use their own custom renderer in their own namespace, r=ahocevar,fredj (closes #2669)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10432 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-29 11:53:59 +00:00
Frédéric Junod
08f506176b use array join instead of string concat. r=ahocevar (closes #2713)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10431 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-29 11:05:00 +00:00
ahocevar
2939bad8d0 fixed use of the "fill" and "stroke" symbolizer properties in Renderer and Format.SLD to match the documentation (i.e. false means to not apply a fill or stroke)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10430 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-29 08:21:26 +00:00
Frédéric Junod
0db8f59ae3 add missing semicolon. Non functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10429 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-28 08:41:43 +00:00
Frédéric Junod
d895af91a5 fix SVG tests in webkit
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10428 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-28 08:33:15 +00:00
Frédéric Junod
98941c9952 removed svn:executable property. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10427 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-28 07:23:16 +00:00
Éric Lemoine
0b9e0f50ab revert [10347] which causes double requests in certain conditions, discussed in #2065, r=ahocevar
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10426 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-28 07:16:37 +00:00
Éric Lemoine
60e869e295 Add Vincenty direct formula, and make the Vincenty functions part of the API, p=aabt, r=me (closes #2692)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10425 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-24 09:05:36 +00:00
Frédéric Junod
ae472b69a2 syntax error. r=me
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10424 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-22 14:30:45 +00:00
Frédéric Junod
a8af8bceb5 Handler.RegularPolygon.clear: check if this.layer is set. r=bartvde (closes #2701)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10423 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-22 14:10:43 +00:00
Frédéric Junod
5f6a2209ba Handler.Box.destroy: destroy the dragHandler. r=bartvde (closes #2697)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10422 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-22 14:07:32 +00:00
Éric Lemoine
fa1b7d2481 more tests for Format.Filter.v1, all pass in FF3, IE7 and Chromium6, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10421 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-22 07:08:20 +00:00
Éric Lemoine
9a2363d06b Format.Filter.v1 may fail to read LowerBoundary and upperBoundary, r=bartvde
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10420 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-21 08:08:13 +00:00
Tim Schaub
e6b0ec0ee3 Adding an example to the WMTS constructor docs (as with the WMS docs).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10415 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-18 15:15:08 +00:00
Frédéric Junod
4bb7ccaf0a remove redundant OpenLayers.Util.extend. r=elemoine (closes #2137)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10408 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-17 13:04:16 +00:00
Éric Lemoine
c4fbe1c0b3 measure control - wrong measure when moving fast, r=fredj (closes #2691)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10407 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-17 12:55:44 +00:00
Frédéric Junod
cd94a7f17d don't fire measurepartial on first click. r=elemoine (closes #2096)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10406 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-17 11:59:37 +00:00
bartvde
cca1395fc6 Geometry.Collection does not call parent destructor, so bounds are not reset, r=fredj (closes #2688)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10405 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-16 14:25:15 +00:00
bartvde
eb4d5a2447 reverting r10372, leave #2619 for 3.0
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10402 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-16 05:58:08 +00:00
Frédéric Junod
98c7687033 removed svn:executable property. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10401 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-15 15:34:32 +00:00
Frédéric Junod
e6de46b9d3 call stop instead of duplicate the code. r=elemoine (closes #2675)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10392 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-14 06:13:35 +00:00
Tim Schaub
f42bbd1dfc Add WMTS capabilities parsing example (see #2637).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10391 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-12 18:46:33 +00:00
Tim Schaub
07ee9991be Adjust attribution position on example (no functional change).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10390 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-12 18:45:27 +00:00
Tim Schaub
fba8a99b9b Additional documentation for the WMTS layer (see #2637).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10389 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-12 05:37:43 +00:00
Tim Schaub
d1e24bdcc0 Adding a WMTS layer and capabilities parser to work with OGC WMTS service implementations. Thanks August Town for this nice contribution. p=august,me r=me (closes #2637)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10388 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-12 02:41:51 +00:00
Tim Schaub
f7113df376 Adding namespaces to versioned OWSCommon formats. Adding regExes to OWSCommon v1 prototype. r=bartvde (closes #2671)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10387 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-11 14:38:42 +00:00
Frédéric Junod
35b8350aec remove unneeded parseFloat from OpenLayers.LonLat.fromString. r=bartvde (closes #2674)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10386 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-11 12:35:19 +00:00
Frédéric Junod
7177144816 nullify panTween on destroy. r=bartvde (closes #2673)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10385 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-11 12:08:34 +00:00
Tim Schaub
71482163cf Making it possible to use a custom SRS identifier for spherical mercator layers. r=bartvde (closes #2665)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10384 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-08 21:37:33 +00:00
Éric Lemoine
d0a2edbebd correct minor typo in the API docs, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10383 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-08 19:04:16 +00:00
Frédéric Junod
448373eb75 cache the WMSCapabilities format parser. r=bartvde (closes #2666)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10382 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-08 14:57:44 +00:00
Frédéric Junod
1b5add6efe removed svn:executable property. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10381 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-08 10:41:42 +00:00
Frédéric Junod
2b8e293d83 set copyright header. Non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10380 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-08 10:38:34 +00:00
Frédéric Junod
fd6c16bb6c Set the olCursorWait class when selecting by box and hover. r=elemoine (closes #2664)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10379 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-08 07:56:32 +00:00
Frédéric Junod
a69a0d2164 make tests pass on FF with the 'file' protocol. r=elemoine (closes #2660)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10378 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-07 14:43:53 +00:00
Frédéric Junod
ae5d20b39f don't clone the size from map.getSize(). r=elemoine (closes #2603)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10377 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-06 07:28:59 +00:00
bartvde
744ee039bd Deprecate the theme map option, p=ahocevar, r=me (closes #2619)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10372 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-04 19:24:10 +00:00
ahocevar
9bd7f02dbb Added degrees symbol to Util.getFormattedLonLat. p=milesjordan, r=me (closes #2654)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10368 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-06-03 07:08:46 +00:00
Éric Lemoine
88f2922f54 Layer.Vector fires featuresadded event with shapes vetoed by beforefeatureadded, p=timbonicus, r=me (closes #2549)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10362 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-28 12:30:52 +00:00
pgiraud
8b0712bb24 added a single config option to allow several features as a result of a click (or 'zero extent' box), r=elemoine, (Closes #2643)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10361 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-28 08:54:39 +00:00
Frédéric Junod
925b6fa206 add missing semi-colon, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10357 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-25 08:34:43 +00:00
bartvde
f9391dd158 add Raster to the list of SYMBOLIZER_PREFIXES, p=ahocevar, r=me (closes #2642)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10350 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-21 07:35:26 +00:00
ahocevar
d57b603d07 Added parseFloat for quantity and opacity on read, as suggested in bartvde's review. With additional tests to show that everything works as suggested now. See #2642.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10349 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-20 21:57:13 +00:00
Éric Lemoine
5f96b1f914 do not store redundant data in the object created by WFS Capabilities format, r=tschaub (closes #2640)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10348 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-20 20:05:52 +00:00
ahocevar
e4085bbdc6 Using the IE cache fix from XMLHttpRequest.js allows us to send asynchronous requests without a setTimeout handler. r=bartvde (closes #2065)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10347 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-20 18:11:30 +00:00
ahocevar
91bceb273b apply symbolizer defaults earlier. r=tschaub (closes #2584)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10346 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-20 15:35:45 +00:00
bartvde
53b4356219 upgrade to XMLHttpRequest version 1.0.4 since we got permission from the author Sergey Ilinsky to relicense his library under the Apache license, r=elemoine,ahocevar (closes #2625)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10345 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-20 08:53:12 +00:00
ahocevar
f52cd8972a added partial support for RasterSymbolizer to Format.SLD. r=bartvde (closes #2642)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10344 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-20 08:42:55 +00:00
Éric Lemoine
ef87d15cfe fix indent, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10342 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-19 15:39:25 +00:00
bartvde
0f648dedf4 do not send request if abort has been called, r=elemoine (closes #2065)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10341 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-19 12:51:09 +00:00
Éric Lemoine
1c9ba551a7 make WFSCapabilities format retrieve feature type prefix and namespace, r=bartvde (closes #2640)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10340 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-18 14:27:27 +00:00
ahocevar
69b4a84381 replaced Renderer.Elements' minimumSymbolizer and Renderer.Canvas' symbolizer defaults with a new Renderer.defaultSymbolizer. r=elemoine (closes #2584)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10316 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-12 20:58:13 +00:00
ahocevar
c4e779b992 give Style a unique id and a clone method. r=elemoine (closes #2605)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10315 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-12 20:41:30 +00:00
bartvde
f95532ab6f There can be more than one observedProperty per offering in SOS GetCapabilities, p=sonxurxo, r=me (closes #2548)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10314 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-12 14:26:50 +00:00
Éric Lemoine
194c6adc4d Protocol.HTTP - add @requires to XMLHttpRequest.js, reported by pwr in #2633, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10310 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-12 06:59:20 +00:00
ahocevar
489d3c47b6 Fixed tests. p=jorix, r=me (closes #2506)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10309 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-11 21:56:21 +00:00
bartvde
a6cd2d51d5 remove text-transform uppercase css from getfeatureinfo-control example, since attributes are case-sensitive (closes #2630)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10303 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-11 07:35:27 +00:00
bartvde
fd32f2e9dd make Format.ArcXML tests pass in Safari, invalid XML documents are dealt with differently in Safari, r=elemoine (closes #2626)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-11 07:17:48 +00:00
Éric Lemoine
a1f90c7ac8 fix and rewrite initResolutions, see <http://trac.openlayers.org/ticket/2427#comment:18> for a detailed explanation on the changes brought by this changeset, r=ahocevar (closes #2427)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10301 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-11 07:16:32 +00:00
bartvde
449bc859c4 Create Format for OWSContext, r=ahocevar (closes #2063)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10300 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-11 06:51:21 +00:00
Frédéric Junod
e67c9411b4 add missing semicolons, use the filter variable in createSLD(). r=bartvde (closes #2570)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10296 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-07 05:51:38 +00:00
ahocevar
c19a190905 Merge rules without creating a new rules object. r=tschaub (closes #2622)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10295 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-06 20:56:35 +00:00
ahocevar
baa4e7469b fixed scope inside handler. r=bartvde (closes #2570)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10294 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-06 14:24:30 +00:00
bartvde
2d8981aed5 reducing number of sides for the circle RegularPolygon handler in the SLDSelect example so that the example works against demo.geoserver.org in Firefox as well, otherwise the urls are getting too long for Apache to handle
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10293 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-06 13:40:14 +00:00
bartvde
7c40667ad7 Create control to perform SLD selections on WMS layers, r=ahocevar (closes #2570)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10290 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-06 12:53:43 +00:00
Frédéric Junod
3b0cd09aad remove global variables. r=ahocevar (closes #2620)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10286 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-06 07:58:12 +00:00
Frédéric Junod
57d3f26efc fix loop, remove unneeded semicolon and unused variable. r=ahocevar (closes #2621)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10285 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-06 07:53:23 +00:00
ahocevar
f38d5e0790 removed global variables. r=fredj (closes #2604)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10280 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-04 14:51:10 +00:00
ahocevar
b0e726b988 now don't use getDimensions any more, but use offsetWidth and offsetHeight before like getDimension does if style.display is not none. r=elemoine,quietriver (pullup #2414)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10278 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-04 10:00:38 +00:00
ahocevar
f66607a6e8 reverted r10125, which does not fix the described issue, and store style.display instead (first patch attached to #2414). r=bartvde,elemoine (pullup #2414)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10276 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-04 09:41:25 +00:00
bartvde
c7e840876c WFS 1.1 writer for GetFeature does not support resultType attribute, r=ahocevar (closes #2449)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10269 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-03 19:20:40 +00:00
bartvde
4658d32b31 add support for WFS hit count (1.1) in WFST Format, r=ahocevar (closes #2131)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10268 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-03 18:39:42 +00:00
Éric Lemoine
a5093a27fa fix an error in the Layer.Vector docs, non-functional change, caught by pwr (closes #2613)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10267 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-03 15:39:01 +00:00
Éric Lemoine
701896e0c3 Protocol.HTTP - fix a regression where update and delete never take feature.url into account if a url is set in the protocol options, p=pwr,me r=me,bartvde (#2393)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10266 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-05-03 13:58:08 +00:00
crschmidt
cbfcf40e6a Update copyright year to 2010
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10262 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-30 16:07:15 +00:00
bartvde
dc4d5036e4 Have NavigationHistory control deal with reprojection, r=ahocevar (closes #1997)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10261 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-30 14:52:38 +00:00
bartvde
0bb5ab8191 Have Format.WFST support multiple typenames, r=ahocevar (closes #1839)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10260 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-30 09:25:19 +00:00
bartvde
69cb8fbb5e change APIComment for Fixed Strategy, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10259 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-28 14:40:39 +00:00
ahocevar
5a05b6c142 fixed a regression that caused incorrect positioning of rotated graphics when they are not rendered for the 1st time. r=elemoine (closes #2596)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10258 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-28 06:53:20 +00:00
bartvde
6341e8e2b9 update news.txt
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10250 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-22 15:41:30 +00:00
ahocevar
aa246a1122 Fixed typo. Non-functional change (see #2581)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10216 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-15 14:47:39 +00:00
ahocevar
4f809a9714 Avoid duplicate feature requests for clicks, and make clear that the click handler takes precedence over the box handler. r=bartvde,pgiraud (pullup #2581)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10215 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-15 14:44:50 +00:00
Schuyler Erle
ca3ecfc5b1 New i18n file update from roberthl dated 2010-04-06. Closes #2582.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10208 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-14 19:16:23 +00:00
ahocevar
35aadaf0c8 Fixed regression parsing KML with CDATA blocks. r=bartvde (pullup #2398)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-12 10:55:07 +00:00
Frédéric Junod
674a414971 Use bracket notation for 'abstract'. r=bartvde (pullup #2569)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10183 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-08 13:24:16 +00:00
Frédéric Junod
be986a0243 Remove unused variable. r=bartvde (pullup #2558)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10182 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-08 13:20:09 +00:00
Tim Schaub
295363fe58 After r10021 we lost the ability to set the opacity of a Google layer. This makes layer.setOpacity work again by setting the opactiy of the shared GMap container. r=bartvde (pullup #2562)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10174 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-07 22:35:59 +00:00
Frédéric Junod
d5daa28fed Renderer.VML: allow one character for labelAlign. p=avlee, r=bartvde,tschaub (pullup #2563)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10172 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-07 06:08:21 +00:00
Tim Schaub
69d8ac892f Updating docs to indicate that the first argument to the map constructor can be a string or a dom element. (closes #2564)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10170 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-06 23:19:02 +00:00
Tim Schaub
7b7c174cc7 Allow center to be provided to map constructor without layers. r=bartvde (closes #2561)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10169 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-04-06 19:20:57 +00:00
Éric Lemoine
da2dffce1a drawing features while the layer is not in the map may cause problem, r=pgiraud (closes #2546)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10151 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-03-29 12:44:16 +00:00
494 changed files with 19734 additions and 2647 deletions

View File

@@ -4,6 +4,7 @@ import sys
sys.path.append("../tools") sys.path.append("../tools")
import mergejs import mergejs
def build():
have_compressor = None have_compressor = None
try: try:
import jsmin import jsmin
@@ -48,3 +49,6 @@ print "Writing to %s." % outputFilename
file(outputFilename, "w").write(minimized) file(outputFilename, "w").write(minimized)
print "Done." print "Done."
if __name__ == '__main__':
build()

View File

@@ -2,8 +2,8 @@
OpenLayers.js -- OpenLayers Map Viewer Library OpenLayers.js -- OpenLayers Map Viewer Library
Copyright 2005-2008 MetaCarta, Inc., released under the Clear BSD license. Copyright 2005-2010 OpenLayers Contributors, released under the Clear BSD
Please see http://svn.openlayers.org/trunk/openlayers/license.txt license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt
for the full text of the license. for the full text of the license.
Includes compressed code under the following licenses: Includes compressed code under the following licenses:

196
examples/SLDSelect.html Normal file
View File

@@ -0,0 +1,196 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers SLD based selection control</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
.olControlSLDSelectBoxActive {
cursor: crosshair;
}
.olControlSLDSelectPolygonActive {
cursor: crosshair;
}
.olControlSLDSelectLineActive {
cursor: crosshair;
}
.olControlSLDSelectPointActive {
cursor: pointer;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, controls, layers;
function init(){
OpenLayers.ProxyHost= "proxy.cgi?url=";
map = new OpenLayers.Map('map', {allOverlays: true, controls: []});
var url = "http://demo.opengeo.org/geoserver/wms";
layers = {
states: new OpenLayers.Layer.WMS("State boundary", url,
{layers: 'topp:tasmania_state_boundaries', format: 'image/gif', transparent: 'TRUE'},
{singleTile: true}),
roads: new OpenLayers.Layer.WMS("Roads", url,
{layers: 'topp:tasmania_roads', format: 'image/gif', transparent: 'TRUE'},
{singleTile: true}),
waterbodies: new OpenLayers.Layer.WMS("Water bodies", url,
{layers: 'topp:tasmania_water_bodies', format: 'image/gif', transparent: 'TRUE'},
{singleTile: true}),
cities: new OpenLayers.Layer.WMS("Cities", url,
{layers: 'topp:tasmania_cities', format: 'image/gif', transparent: 'TRUE'},
{singleTile: true})
};
for (var key in layers) {
map.addLayer(layers[key]);
}
map.setCenter(new OpenLayers.LonLat(146.65748632815,-42.230763671875), 7);
map.addControl(new OpenLayers.Control.LayerSwitcher());
controls = {
navigation: new OpenLayers.Control.Navigation(),
box: new OpenLayers.Control.SLDSelect(
OpenLayers.Handler.RegularPolygon,
{
displayClass: 'olControlSLDSelectBox',
layers: [layers['waterbodies']],
handlerOptions: {irregular: true}
}
),
polygon: new OpenLayers.Control.SLDSelect(
OpenLayers.Handler.Polygon,
{
displayClass: 'olControlSLDSelectPolygon',
layers: [layers['waterbodies']]
}
),
line: new OpenLayers.Control.SLDSelect(
OpenLayers.Handler.Path,
{
displayClass: 'olControlSLDSelectLine',
layers: [layers['waterbodies']]
}
),
point: new OpenLayers.Control.SLDSelect(
OpenLayers.Handler.Click,
{
displayClass: 'olControlSLDSelectPoint',
layers: [layers['waterbodies']]
}
),
circle: new OpenLayers.Control.SLDSelect(
OpenLayers.Handler.RegularPolygon,
{
displayClass: 'olControlSLDSelectBox',
layers: [layers['waterbodies']],
handlerOptions: {sides: 30}
}
)
};
for(var key in controls) {
map.addControl(controls[key]);
}
}
function toggleControl(element) {
for(var key in controls) {
var control = controls[key];
if(element.value == key && element.checked) {
control.activate();
} else {
control.deactivate();
}
}
}
function toggleSelectionLayer(element) {
var selectLayers = [];
var elements = element.value.split("_");
for (var key in layers) {
var layer = layers[key];
for (var i=0, len=elements.length; i<len; i++) {
var value = elements[i];
if (value == key && element.checked) {
selectLayers.push(layer);
}
}
}
for (var i=0, len=this.map.controls.length; i<len; i++) {
var control = this.map.controls[i];
if (control instanceof OpenLayers.Control.SLDSelect) {
control.setLayers(selectLayers);
}
}
}
</script>
</head>
<body onload="init()">
<h1 id="title">SLD based selection on WMS layers</h1>
<div id="tags"></div>
<div id="shortdesc">Using Styled Layer Descriptors to make a selection on WMS layers</div>
<div id="map" style="width: 512; height: 256; border: 1px solid red;"></div>
<div id="docs">
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.
</div>
<div id="controls">
<ul id="controlToggle"><b>Map Controls</b>
<li>
<input type="radio" name="control" value="navigation" id="noneToggle" onclick="toggleControl(this);" CHECKED>
<label for="noneToggle">navigate</label>
</li>
<li>
<input type="radio" name="control" value="box" id="boxToggle" onclick="toggleControl(this);">
<label for="boxToggle">SLD select with box</label>
</li>
<li>
<input type="radio" name="control" value="polygon" id="polygonToggle" onclick="toggleControl(this);">
<label for="polygonToggle">SLD select with polygon</label>
</li>
<li>
<input type="radio" name="control" value="line" id="lineToggle" onclick="toggleControl(this);">
<label for="lineToggle">SLD select with line</label>
</li>
<li>
<input type="radio" name="control" value="point" id="pointToggle" onclick="toggleControl(this);">
<label for="pointToggle">SLD select with point</label>
</li>
<li>
<input type="radio" name="control" value="circle" id="circleToggle" onclick="toggleControl(this);">
<label for="circleToggle">SLD select with circle</label>
</li>
</ul>
</div>
<div id="layers">
<ul id="layerToggle"><b>Selection layer</b>
<li>
<input type="radio" name="layer" value="waterbodies" id="waterbodiesToggle" onclick="toggleSelectionLayer(this);" CHECKED>
<label for="noneToggle">Water bodies</label>
</li>
<li>
<input type="radio" name="layer" value="cities" id="citiesToggle" onclick="toggleSelectionLayer(this);">
<label for="citiesToggle">Cities</label>
</li>
<li>
<input type="radio" name="layer" value="roads" id="roadsToggle" onclick="toggleSelectionLayer(this);">
<label for="roadsToggle">Roads</label>
</li>
<li>
<input type="radio" name="layer" value="roads_cities" id="roadsCitiesToggle" onclick="toggleSelectionLayer(this);">
<label for="roadsCitiesToggle">Roads and cities</label>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -124,7 +124,7 @@
var layer = new OpenLayers.Layer.WMS( var layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{ {
layers: 'basic' layers: 'basic'
} }

View File

@@ -38,7 +38,7 @@
map = new OpenLayers.Map('map', options); map = new OpenLayers.Map('map', options);
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", "http://vmap0.tiles.osgeo.org/wms/vmap0?",
{layers: 'basic'} {layers: 'basic'}
); );
map.addLayer(wms); map.addLayer(wms);

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers All Overlays with Google and OSM</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="all-overlays-google.js"></script>
</head>
<body onload="init()">
<h1 id="title">All Overlays with Google and OSM</h1>
<p id="shortdesc">
Using the Google and OSM layers as overlays.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
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.
</p><p>
See the <a href="all-overlays-google.js" target="_blank">
all-overlays-google.js source</a> to see how this is done.
</p>
</div>
</body>
</html>

View File

@@ -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();
}

View File

@@ -36,7 +36,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map', {numZoomLevels: 2}); map = new OpenLayers.Map('map', {numZoomLevels: 2});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.zoomToMaxExtent(); map.zoomToMaxExtent();
@@ -47,7 +47,7 @@
map2 = new OpenLayers.Map('map2', {'panMethod': null, numZoomLevels: 2} ); map2 = new OpenLayers.Map('map2', {'panMethod': null, numZoomLevels: 2} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map2.addLayer(layer); map2.addLayer(layer);
map2.zoomToMaxExtent(); map2.zoomToMaxExtent();

View File

@@ -11,8 +11,8 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'},
{'attribution': 'Provided by <a href="http://labs.metacarta.com/">MetaCarta</a>'}); {'attribution': 'Provided by OSGeo'});
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7", "http://t1.hypercube.telascience.org/cgi-bin/landsat7",

View File

@@ -33,7 +33,7 @@
map = new OpenLayers.Map( 'map' ); map = new OpenLayers.Map( 'map' );
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
var google = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP }); var google = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP });
var ve = new OpenLayers.Layer.VirtualEarth( "VE"); var ve = new OpenLayers.Layer.VirtualEarth( "VE");
@@ -53,8 +53,8 @@
} }
function add() { function add() {
var url = 'http://boston.openguides.org/markers/AQUA.png'; var url = 'http://www.openlayers.org/dev/img/marker.png';
var sz = new OpenLayers.Size(10, 17); var sz = new OpenLayers.Size(21, 25);
var calculateOffset = function(size) { var calculateOffset = function(size) {
return new OpenLayers.Pixel(-(size.w/2), -size.h); return new OpenLayers.Pixel(-(size.w/2), -size.h);
}; };

View File

@@ -10,7 +10,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );

View File

@@ -16,7 +16,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
var boxes = new OpenLayers.Layer.Vector( "Boxes" ); var boxes = new OpenLayers.Layer.Vector( "Boxes" );

View File

@@ -16,7 +16,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
var boxes = new OpenLayers.Layer.Boxes( "Boxes" ); var boxes = new OpenLayers.Layer.Boxes( "Boxes" );

View File

@@ -47,7 +47,7 @@
}; };
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'},
options); options);
var options2 = { var options2 = {

View File

@@ -13,15 +13,15 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map' ); map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "0 buffer: OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "0 buffer: OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {'buffer':0} ); {layers: 'basic'}, {'buffer':0} );
map.addLayer(layer); map.addLayer(layer);
layer = new OpenLayers.Layer.WMS( "1 buffer: OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "1 buffer: OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {'buffer':1} ); {layers: 'basic'}, {'buffer':1} );
map.addLayer(layer); map.addLayer(layer);
layer = new OpenLayers.Layer.WMS( "4 buffer: OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "4 buffer: OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {'buffer':4} ); {layers: 'basic'}, {'buffer':4} );
map.addLayer(layer); map.addLayer(layer);
map.addControl(new OpenLayers.Control.LayerSwitcher()) map.addControl(new OpenLayers.Control.LayerSwitcher())

View File

@@ -81,7 +81,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS( var layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );
map.addLayers([layer]); map.addLayers([layer]);

View File

@@ -41,7 +41,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7", "http://t1.hypercube.telascience.org/cgi-bin/landsat7",

View File

@@ -26,7 +26,7 @@
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7", "http://t1.hypercube.telascience.org/cgi-bin/landsat7",

View File

@@ -14,7 +14,7 @@
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
var control = new OpenLayers.Control(); var control = new OpenLayers.Control();
OpenLayers.Util.extend(control, { OpenLayers.Util.extend(control, {

View File

@@ -13,7 +13,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
var control = new OpenLayers.Control(); var control = new OpenLayers.Control();
OpenLayers.Util.extend(control, { OpenLayers.Util.extend(control, {

View File

@@ -25,7 +25,7 @@
var options = {theme: null}; var options = {theme: null};
map = new OpenLayers.Map('map', options); map = new OpenLayers.Map('map', options);
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addControl(new OpenLayers.Control.MousePosition()); map.addControl(new OpenLayers.Control.MousePosition());
map.addLayer(layer); map.addLayer(layer);

View File

@@ -14,7 +14,7 @@
new OpenLayers.Control.Attribution() new OpenLayers.Control.Attribution()
]} ); ]} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.zoomToMaxExtent(); map.zoomToMaxExtent();

View File

@@ -20,7 +20,7 @@
<script defer="defer" type="text/javascript"> <script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map'); var map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(wms); map.addLayer(wms);
map.setCenter(new OpenLayers.LonLat(100,10)); map.setCenter(new OpenLayers.LonLat(100,10));
map.setCenter(new OpenLayers.LonLat(1,1)); map.setCenter(new OpenLayers.LonLat(1,1));

View File

@@ -21,7 +21,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
vectors = new OpenLayers.Layer.Vector("Vector Layer"); vectors = new OpenLayers.Layer.Vector("Vector Layer");

View File

@@ -24,7 +24,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
var pointLayer = new OpenLayers.Layer.Vector("Point Layer"); var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
var lineLayer = new OpenLayers.Layer.Vector("Line Layer"); var lineLayer = new OpenLayers.Layer.Vector("Line Layer");

View File

@@ -10,7 +10,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );

View File

@@ -24,7 +24,7 @@
map = new OpenLayers.Map('map', {theme: null}); map = new OpenLayers.Map('map', {theme: null});
layer = new OpenLayers.Layer.WMS( layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: "basic"} {layers: "basic"}
); );
map.addLayer(layer); map.addLayer(layer);

View File

@@ -15,7 +15,7 @@
function init(){ function init(){
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
vlayer = new OpenLayers.Layer.Vector( "Editable" ); vlayer = new OpenLayers.Layer.Vector( "Editable" );
map = new OpenLayers.Map( 'map', { map = new OpenLayers.Map( 'map', {

View File

@@ -106,7 +106,7 @@
var vmap = new OpenLayers.Layer.WMS( var vmap = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );
var landsat = new OpenLayers.Layer.WMS( var landsat = new OpenLayers.Layer.WMS(

View File

@@ -15,7 +15,7 @@
var ol_wms = new OpenLayers.Layer.WMS( var ol_wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );

View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Filter Strategy Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../lib/OpenLayers.js"></script>
<script>OpenLayers.ImgPath = "../img/";</script>
<script src="filter-strategy.js"></script>
<style>
.olControlAttribution {
font-size: 9px;
bottom: 2px;
}
</style>
</head>
<body onload="init()">
<h1 id="title">Filter Strategy</h1>
<p id="shortdesc">
Demonstrates the filter strategy for limiting features passed to the layer.
</p>
<div id="map" class="smallmap"></div>
<label for="span">time span (seconds)</label>
<select id="span" name="span">
<option value="15">15</option>
<option value="30">30</option>
<option value="60" selected>60</option>
<option value="120">120</option>
<option value="240">240</option>
</select>
<input type="button" id="start" value="start">
<input type="button" id="stop" value="stop"><br><br>
<div id="docs">
<p>
This example uses a filter strategy to limit the features that are passed
to a layer. Features bound for this layer have a <code>when</code> 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 <code>when</code> values, calling <code>setFilter</code>
on the strategy with an updated filter.
</p><p>
View the <a href="filter-strategy.js" target="_blank">filter-strategy.js</a>
source to see how this is done
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,89 @@
var map, filter, filterStrategy;
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 init() {
// 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);
};
var animationTimer;
var currentDate;
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;
}
}

View File

@@ -13,7 +13,7 @@
numZoomLevels: 10 }); numZoomLevels: 10 });
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );
map.addLayers([wms]); map.addLayers([wms]);

View File

@@ -26,7 +26,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7", "http://t1.hypercube.telascience.org/cgi-bin/landsat7",

View File

@@ -12,7 +12,7 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map' ); map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);

View File

@@ -16,7 +16,7 @@
map = new OpenLayers.Map('map', {maxResolution:'auto'}); map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0); map.setCenter(new OpenLayers.LonLat(0, 0), 0);

View File

@@ -11,7 +11,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'}); map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0); map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());

View File

@@ -11,7 +11,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'}); map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0); map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());

View File

@@ -37,7 +37,6 @@
text-align:left; text-align:left;
font-size:100%; font-size:100%;
font-weight:bold; font-weight:bold;
text-transform:uppercase;
padding:.2em .2em; padding:.2em .2em;
} }

View File

@@ -13,7 +13,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.zoomToExtent(new OpenLayers.Bounds(-3.922119,44.335327,4.866943,49.553833)); map.zoomToExtent(new OpenLayers.Bounds(-3.922119,44.335327,4.866943,49.553833));
map.addLayer(new OpenLayers.Layer.GML("GML", "gml/polygon.xml")); map.addLayer(new OpenLayers.Layer.GML("GML", "gml/polygon.xml"));

View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Google (v3) Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="google-v3-alloverlays.js"></script>
</head>
<body onload="init()">
<h1 id="title">Google (v3) allOverlays Layer Example</h1>
<p id="shortdesc">
Demonstrate use the Google Maps v3 API with allOverlays set to true on the map.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
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
<a href="google-v3-alloverlays.js" target="_blank">google-v3-alloverlays.js source</a>
to see how this is done.
</p>
</div>
</body>
</html>

View File

@@ -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);
}

32
examples/google-v3.html Normal file
View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Google (v3) Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="google-v3.js"></script>
</head>
<body onload="init()">
<h1 id="title">Google (v3) Layer Example</h1>
<p id="shortdesc">
Demonstrate use the Google Maps v3 API.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
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
<a href="google-v3.js" target="_blank">google-v3.js source</a>
to see how this is done.
<p>
In order to position the Google attribution div in the default
location, you must include the extra theme/default/google.css
stylesheet.
</p>
</div>
</body>
</html>

32
examples/google-v3.js Normal file
View File

@@ -0,0 +1,32 @@
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);
}

View File

@@ -23,19 +23,20 @@
<script type="text/javascript"> <script type="text/javascript">
Proj4js.defs["EPSG:42304"]="+title=Atlas of Canada, LCC +proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"; Proj4js.defs["EPSG:42304"]="+title=Atlas of Canada, LCC +proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";
var graticuleCtl1, graticuleCtl2;
var map1, map2; var map1, map2;
function init(){ function init(){
initLonLat(); initLonLat();
initProjected(); initProjected();
} }
function initLonLat(){ function initLonLat(){
graticuleCtl1 = new OpenLayers.Control.Graticule({
numPoints: 2,
labelled: true
});
map1 = new OpenLayers.Map('map', { map1 = new OpenLayers.Map('map', {
controls: [ controls: [
new OpenLayers.Control.Graticule({ graticuleCtl1,
numPoints: 2,
labelled: true,
visible: true
}),
new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.Navigation() new OpenLayers.Control.Navigation()
@@ -43,7 +44,7 @@
}); });
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {wrapDateLine: true} ); {layers: 'basic'}, {wrapDateLine: true} );
map1.addLayers([ol_wms]); map1.addLayers([ol_wms]);
@@ -52,12 +53,13 @@
function initProjected(){ function initProjected(){
var extent = new OpenLayers.Bounds(-2200000,-712631,3072800,3840000); var extent = new OpenLayers.Bounds(-2200000,-712631,3072800,3840000);
var mapOptions = { graticuleCtl2 = new OpenLayers.Control.Graticule({
controls: [
new OpenLayers.Control.Graticule({
labelled: true, labelled: true,
targetSize: 200 targetSize: 200
}), });
var mapOptions = {
controls: [
graticuleCtl2,
new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.Navigation() new OpenLayers.Control.Navigation()
@@ -98,5 +100,12 @@
<div id="map2" class="smallmap"></div> <div id="map2" class="smallmap"></div>
<div id="docs"></div> <div id="docs"></div>
<br style="clear:both" />
<ul>
<li><a href="#"
onclick="graticuleCtl1.activate(); graticuleCtl2.activate(); return false;">Activate graticule controls</a></li>
<li><a href="#"
onclick="graticuleCtl1.deactivate(); graticuleCtl2.deactivate(); return false;">Deactivate graticule controls</a></li>
</ul>
</body> </body>
</html> </html>

View File

@@ -76,7 +76,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS( var layer = new OpenLayers.Layer.WMS(
'OpenLayers WMS', 'OpenLayers WMS',
'http://labs.metacarta.com/wms/vmap0', 'http://vmap0.tiles.osgeo.org/wms/vmap0',
{layers: 'basic'} {layers: 'basic'}
); );
map.addLayers([layer]); map.addLayers([layer]);

View File

@@ -12,7 +12,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml", map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml",
{ {

36
examples/kml-track.html Normal file
View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers KLM Track Parsing Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<style>
.olControlAttribution {
bottom: 2px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script src="kml-track.js"></script>
</head>
<body onload="init()">
<h1 id="title">Parsing gx:Track in KML</h1>
<p id="shortdesc">
Demonstrates parsing of gx:Track elements from KML.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
If a KML document contains <code>&lt;gx:Track&gt;</code>
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 <code>&lt;when&gt;</code> element from
the track.
</p>
<p>
View the <a href="kml-track.js" target="_blank">kml-track.js</a>
source to see how this is done.
</div>
</body>
</html>

40
examples/kml-track.js Normal file
View File

@@ -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
});
};

3359
examples/kml-track.kml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@
map = new OpenLayers.Map(); map = new OpenLayers.Map();
layer = new OpenLayers.Layer.WMS( layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );
map.addLayer(layer); map.addLayer(layer);

View File

@@ -32,28 +32,28 @@
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());
buffer0 = new OpenLayers.Layer.WMS( "WMS Buffer 0", buffer0 = new OpenLayers.Layer.WMS( "WMS Buffer 0",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} , {layers: 'basic'} ,
{ singleTile: false, buffer:0} { singleTile: false, buffer:0}
); );
registerEvents(buffer0); registerEvents(buffer0);
buffer1 = new OpenLayers.Layer.WMS( "WMS Buffer 1", buffer1 = new OpenLayers.Layer.WMS( "WMS Buffer 1",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} , {layers: 'basic'} ,
{ singleTile: false, buffer:1} { singleTile: false, buffer:1}
); );
registerEvents(buffer1); registerEvents(buffer1);
buffer2 = new OpenLayers.Layer.WMS( "WMS Buffer 2", buffer2 = new OpenLayers.Layer.WMS( "WMS Buffer 2",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} , {layers: 'basic'} ,
{ singleTile: false, buffer:2 } { singleTile: false, buffer:2 }
); );
registerEvents(buffer2); registerEvents(buffer2);
singleTileLayer = new OpenLayers.Layer.WMS( "Single Tile Layer", singleTileLayer = new OpenLayers.Layer.WMS( "Single Tile Layer",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} , {layers: 'basic'} ,
{ singleTile: true} { singleTile: true}
); );

View File

@@ -13,7 +13,7 @@
map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')})); map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}));
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {'displayInLayerSwitcher':false} ); {layers: 'basic'}, {'displayInLayerSwitcher':false} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",

View File

@@ -9,7 +9,7 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map' ); map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.zoomToMaxExtent(); map.zoomToMaxExtent();

View File

@@ -13,7 +13,7 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map' ); map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS", layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'},
{gutter: 15}); {gutter: 15});
map.addLayer(layer); map.addLayer(layer);

View File

@@ -16,7 +16,7 @@
window.onload = function(){ window.onload = function(){
map = new OpenLayers.Map( 'map', {maxResolution: 'auto'} ); map = new OpenLayers.Map( 'map', {maxResolution: 'auto'} );
var layer = new OpenLayers.Layer.MapServer( "MapServer Untiled", var layer = new OpenLayers.Layer.MapServer( "MapServer Untiled",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {singleTile: true} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'}, {singleTile: true} );
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 1); map.setCenter(new OpenLayers.LonLat(0, 0), 1);
map.addControl( new OpenLayers.Control.LayerSwitcher() ); map.addControl( new OpenLayers.Control.LayerSwitcher() );

View File

@@ -11,17 +11,17 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
var markers = new OpenLayers.Layer.Markers( "Markers" ); var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers); map.addLayer(markers);
size = new OpenLayers.Size(50,50); size = new OpenLayers.Size(21, 25);
calculateOffset = function(size) { calculateOffset = function(size) {
return new OpenLayers.Pixel(-(size.w/2), -size.h); }; return new OpenLayers.Pixel(-(size.w/2), -size.h); };
icon = new OpenLayers.Icon( icon = new OpenLayers.Icon(
'http://boston.openguides.org/markers/AQUA.png', 'http://www.openlayers.org/dev/img/marker.png',
size, null, calculateOffset); size, null, calculateOffset);
markers.addMarker( markers.addMarker(
new OpenLayers.Marker(new OpenLayers.LonLat(-71,40), icon)); new OpenLayers.Marker(new OpenLayers.LonLat(-71,40), icon));

0
examples/marker_shadow.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 374 B

View File

@@ -11,7 +11,7 @@
OpenLayers.ProxyHost="/proxy/?url="; OpenLayers.ProxyHost="/proxy/?url=";
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0); map.setCenter(new OpenLayers.LonLat(0, 0), 0);
@@ -22,9 +22,9 @@
var markers = new OpenLayers.Layer.Markers( "Markers" ); var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers); map.addLayer(markers);
var size = new OpenLayers.Size(10,17); var size = new OpenLayers.Size(21,25);
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h); var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
var icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,offset); var icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png',size,offset);
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon)); markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon));
var halfIcon = icon.clone(); var halfIcon = icon.clone();

View File

@@ -11,7 +11,7 @@
OpenLayers.ProxyHost="/proxy/?url="; OpenLayers.ProxyHost="/proxy/?url=";
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);

View File

@@ -29,7 +29,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
map.addLayers([wmsLayer]); map.addLayers([wmsLayer]);
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());

View File

@@ -21,7 +21,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '2'; OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '2';
vectors = new OpenLayers.Layer.Vector("Vector Layer"); vectors = new OpenLayers.Layer.Vector("Vector Layer");

View File

@@ -14,7 +14,7 @@
map.addControl(new OpenLayers.Control.MousePosition()); map.addControl(new OpenLayers.Control.MousePosition());
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
map.addLayers([ol_wms]); map.addLayers([ol_wms]);

View File

@@ -23,7 +23,7 @@
new OpenLayers.Control.Attribution() new OpenLayers.Control.Attribution()
]} ); ]} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.zoomToMaxExtent(); map.zoomToMaxExtent();

View File

@@ -12,7 +12,8 @@
</style> </style>
<script type="text/javascript" src="http://clients.multimap.com/API/maps/1.1/metacarta_04"></script> <!-- multimap api key for http://(www.)openlayers.org -->
<script type="text/javascript" src="http://developer.multimap.com/API/maps/1.2/OA10072915821139765"></script>
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@@ -34,11 +35,9 @@
{'sphericalMercator': true} {'sphericalMercator': true}
); );
merc = new OpenLayers.Layer.WMS("World Map", merc = new OpenLayers.Layer.WMS("World Map",
"http://world.freemap.in/tiles/", "http://maps.opengeo.org/geowebcache/service/wms",
{'layers': 'factbook-overlay', {'layers': 'bluemarble'},
'format':'png'}, {'opacity': 0.4,
{'reproject': false,
'opacity': 0.4,
'isBaseLayer': false, 'isBaseLayer': false,
'wrapDateLine': true}); 'wrapDateLine': true});

View File

@@ -13,8 +13,8 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map' ); map = new OpenLayers.Map( 'map' );
var urlArray = ["http://t1.labs.metacarta.com/wms-c/Basic.py", var urlArray = ["http://tilecache.osgeo.org/wms-c/Basic.py",
"http://t2.labs.metacarta.com/wms-c/Basic.py"]; "http://tilecache.osgeo.org/wms-c/Basic.py"];
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
urlArray, urlArray,
{layers: 'basic'} ); {layers: 'basic'} );

View File

@@ -17,7 +17,7 @@
function runMVS() { function runMVS() {
OpenLayers.ProxyHost = '/proxy/?url='; OpenLayers.ProxyHost = '/proxy/?url=';
if (document.location.protocol != "file:") { if (document.location.protocol != "file:") {
theArgs = OpenLayers.Util.getArgs(); theArgs = OpenLayers.Util.getParameters();
} else { } else {
theArgs = {}; theArgs = {};
theArgs.center = "0,0"; theArgs.center = "0,0";
@@ -81,7 +81,7 @@ function runMVS() {
case 'openlayers': case 'openlayers':
theMVS.addLayer( theMVS.addLayer(
new OpenLayers.Layer.WMS( "OpenLayers WMS", new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ) {layers: 'basic'} )
); );
break; break;

View File

@@ -9,7 +9,7 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map', { controls: [] }); map = new OpenLayers.Map( 'map', { controls: [] });
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
nav = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false}); nav = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false});

View File

@@ -32,7 +32,7 @@
var layer = new OpenLayers.Layer.WMS( var layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );
map.addLayer(layer); map.addLayer(layer);

View File

@@ -56,7 +56,7 @@
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );

View File

@@ -22,7 +22,7 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map', { controls: [new OpenLayers.Control.PanZoom()] } ); map = new OpenLayers.Map( 'map', { controls: [new OpenLayers.Control.PanZoom()] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
var panel = new OpenLayers.Control.NavToolbar({'div':OpenLayers.Util.getElement('paneldiv')}); var panel = new OpenLayers.Control.NavToolbar({'div':OpenLayers.Util.getElement('paneldiv')});
map.addControl(panel); map.addControl(panel);

View File

@@ -18,7 +18,7 @@
function init() { function init() {
map = new OpenLayers.Map( 'map', { controls: [new OpenLayers.Control.PanZoom()] } ); map = new OpenLayers.Map( 'map', { controls: [new OpenLayers.Control.PanZoom()] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
var panel = new OpenLayers.Control.NavToolbar(); var panel = new OpenLayers.Control.NavToolbar();

View File

@@ -10,11 +10,11 @@
map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'}); map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
var old_ol_wms = new OpenLayers.Layer.WMS.Untiled( "WMS.Untiled", var old_ol_wms = new OpenLayers.Layer.WMS.Untiled( "WMS.Untiled",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
old_ol_wms.addOptions({isBaseLayer: true}); old_ol_wms.addOptions({isBaseLayer: true});
var new_ol_wms = new OpenLayers.Layer.WMS( "WMS w/singleTile", var new_ol_wms = new OpenLayers.Layer.WMS( "WMS w/singleTile",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'},
{ singleTile: true, ratio: 1 } ); { singleTile: true, ratio: 1 } );
new_ol_wms.addOptions({isBaseLayer: true}); new_ol_wms.addOptions({isBaseLayer: true});

27
examples/osm-google.html Normal file
View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers OSM and Google Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="osm-google.js"></script>
</head>
<body onload="init()">
<h1 id="title">OSM and Google Together</h1>
<p id="shortdesc">
Demonstrate use of an OSM layer and a Google layer as base layers.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
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 <a href="osm-google.js" target="_blank">
osm-google.js source</a> to see how this is done.
</p>
</div>
</body>
</html>

28
examples/osm-google.js Normal file
View File

@@ -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
);
}

View File

@@ -10,7 +10,12 @@
map = new OpenLayers.Map( 'map'); map = new OpenLayers.Map( 'map');
layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); layer = new OpenLayers.Layer.OSM( "Simple OSM Map");
map.addLayer(layer); map.addLayer(layer);
map.zoomToMaxExtent(); map.setCenter(
new OpenLayers.LonLat(-71.147, 42.472).transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
), 12
);
} }
</script> </script>
</head> </head>

View File

@@ -42,7 +42,7 @@
var ol = new OpenLayers.Layer.WMS( var ol = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );
@@ -75,15 +75,13 @@
map1.addControl(new OpenLayers.Control.LayerSwitcher()); map1.addControl(new OpenLayers.Control.LayerSwitcher());
// create an overview map control with the default options // create an overview map control with the default options
var overview1 = new OpenLayers.Control.OverviewMap(); var overview1 = new OpenLayers.Control.OverviewMap({
maximized: true
});
map1.addControl(overview1); map1.addControl(overview1);
map1.setCenter(new OpenLayers.LonLat(0, 0), 2); map1.setCenter(new OpenLayers.LonLat(0, 0), 2);
// expand the overview map control
overview1.maximizeControl();
// create the bottom map (with advanced overview map control) // create the bottom map (with advanced overview map control)
var mapOptions = { var mapOptions = {
maxExtent: new OpenLayers.Bounds(-8242894.927728, 4965204.031195, maxExtent: new OpenLayers.Bounds(-8242894.927728, 4965204.031195,
@@ -99,6 +97,7 @@
// create an overview map control with non-default options // create an overview map control with non-default options
var controlOptions = { var controlOptions = {
maximized: true,
mapOptions: OpenLayers.Util.extend(mapOptions, { mapOptions: OpenLayers.Util.extend(mapOptions, {
maxResolution: 156543.0339, maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
@@ -111,9 +110,6 @@
map2.setCenter(new OpenLayers.LonLat(-8233165.3575055, 4980298.21113769), 3); map2.setCenter(new OpenLayers.LonLat(-8233165.3575055, 4980298.21113769), 3);
// expand the overview map control
overview2.maximizeControl();
</script> </script>
</body> </body>
</html> </html>

View File

@@ -32,7 +32,7 @@
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );
map.addLayers([wms]); map.addLayers([wms]);

View File

@@ -9,7 +9,7 @@
width: 24px; width: 24px;
height: 24px; height: 24px;
margin: 5px; margin: 5px;
background-color:red; background-color:white;
} }
.olControlPanel .olControlMouseDefaultsItemActive { .olControlPanel .olControlMouseDefaultsItemActive {
@@ -60,7 +60,7 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map', { controls: [] } ); map = new OpenLayers.Map( 'map', { controls: [] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
vlayer = new OpenLayers.Layer.Vector( "Editable" ); vlayer = new OpenLayers.Layer.Vector( "Editable" );
@@ -78,6 +78,12 @@
{title:'Draw a feature'}), {title:'Draw a feature'}),
new OpenLayers.Control.ZoomToMaxExtent({title:"Zoom to the max extent"}) new OpenLayers.Control.ZoomToMaxExtent({title:"Zoom to the max extent"})
]); ]);
nav = new OpenLayers.Control.NavigationHistory();
// parent control must be added to the map
map.addControl(nav);
panel.addControls([nav.next, nav.previous]);
map.addControl(panel); map.addControl(panel);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);

View File

@@ -11,7 +11,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'}); map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(20.22, 22.05), 9); map.setCenter(new OpenLayers.LonLat(20.22, 22.05), 9);
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());

0
examples/popupMatrix.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -11,7 +11,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
layer = new OpenLayers.Layer.Google( "Google" ); layer = new OpenLayers.Layer.Google( "Google" );
map.addLayer(layer); map.addLayer(layer);

View File

@@ -31,7 +31,7 @@
// create base layer // create base layer
var layer = new OpenLayers.Layer.WMS("OpenLayers WMS", var layer = new OpenLayers.Layer.WMS("OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{"layers": "basic"} {"layers": "basic"}
); );
map.addLayer(layer); map.addLayer(layer);

View File

@@ -20,7 +20,8 @@ allowedHosts = ['www.openlayers.org', 'openlayers.org',
'prototype.openmnnd.org', 'geo.openplans.org', 'prototype.openmnnd.org', 'geo.openplans.org',
'sigma.openplans.org', 'demo.opengeo.org', 'sigma.openplans.org', 'demo.opengeo.org',
'www.openstreetmap.org', 'sample.azavea.com', 'www.openstreetmap.org', 'sample.azavea.com',
'v-swe.uni-muenster.de:8080'] 'v-swe.uni-muenster.de:8080',
'vmap0.tiles.osgeo.org']
method = os.environ["REQUEST_METHOD"] method = os.environ["REQUEST_METHOD"]

View File

@@ -41,7 +41,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer");

View File

@@ -15,7 +15,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
var style_blue = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']); var style_blue = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);

View File

@@ -17,7 +17,7 @@
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", "http://vmap0.tiles.osgeo.org/wms/vmap0?",
{layers: 'basic'} {layers: 'basic'}
); );

View File

@@ -15,7 +15,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);
var style_blue = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']); var style_blue = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);

View File

@@ -16,7 +16,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( var wmsLayer = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );

View File

@@ -32,7 +32,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer"); var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer");

View File

@@ -16,7 +16,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( var wmsLayer = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );

View File

@@ -22,7 +22,7 @@
var map = new OpenLayers.Map('map'); var map = new OpenLayers.Map('map');
var bounds = new OpenLayers.Bounds(-45,-45, 0, 45); var bounds = new OpenLayers.Bounds(-45,-45, 0, 45);
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(wms); map.addLayer(wms);
map.zoomToExtent(bounds); map.zoomToExtent(bounds);
var boxes = new OpenLayers.Layer.Boxes("boxes"); var boxes = new OpenLayers.Layer.Boxes("boxes");

65
examples/sld-parser.html Normal file
View File

@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers SLD Parser</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<style>
#input {
width: 90%;
height: 300px;
}
#output {
width: 90%;
height: 300px;
}
</style>
</head>
<body>
<h1 id="title">SLD Parser</h1>
<div id="shortdesc">Parsing Styled Layer Descriptor (SLD) documents with the SLD format.</div>
<textarea id="input">paste SLD here</textarea><br>
<input type="checkbox" id="symbolizers" checked="checked"><label for="symbolizers">Maintain multiple symbolizers and FeatureTypeStyle elements</label><br>
<input type="checkbox" id="array"><label for="array">Compile an array of named styles instead of an object.</label><br>
<input type="button" id="button" value="Parse SLD">
<div id="docs">
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.
</div>
<textarea id="output"></textarea>
<script>
var button = document.getElementById("button");
var input = document.getElementById("input");
var output = document.getElementById("output");
var symbolizers = document.getElementById("symbolizers");
var array = document.getElementById("array");
var json = new OpenLayers.Format.JSON();
var format, obj;
button.onclick = function() {
var str = input.value;
format = new OpenLayers.Format.SLD({
multipleSymbolizers: !!symbolizers.checked,
namedLayersAsArray: !!array.checked
});
obj = format.read(str);
try {
output.value = json.write(obj, true);
} catch (err) {
output.value = "Trouble: " + err;
}
}
</script>
</body>
</html>

0
examples/small.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -69,7 +69,7 @@
getTitleForObservedProperty: function(property) { getTitleForObservedProperty: function(property) {
for (var name in this.SOSCapabilities.contents.offeringList) { for (var name in this.SOSCapabilities.contents.offeringList) {
var offering = this.SOSCapabilities.contents.offeringList[name]; var offering = this.SOSCapabilities.contents.offeringList[name];
if (offering.observedProperty === property) { if (offering.observedProperties[0] === property) {
return offering.name; return offering.name;
} }
} }
@@ -127,11 +127,11 @@
var offering = this.SOSCapabilities.contents.offeringList[name]; var offering = this.SOSCapabilities.contents.offeringList[name];
var xml = this.obsformat.write({ var xml = this.obsformat.write({
eventTime: 'latest', eventTime: 'latest',
resultModel: 'measurement', resultModel: 'om:Measurement',
responseMode: 'inline', responseMode: 'inline',
procedure: feature.attributes.id, procedure: feature.attributes.id,
offering: name, offering: name,
observedProperty: offering.observedProperty, observedProperty: offering.observedProperties[0],
responseFormat: this.responseFormat responseFormat: this.responseFormat
}); });
OpenLayers.Request.POST({ OpenLayers.Request.POST({
@@ -149,7 +149,7 @@
function init(){ function init(){
map = new OpenLayers.Map( 'map' ); map = new OpenLayers.Map( 'map' );
var baseLayer = new OpenLayers.Layer.WMS("Test Layer", "http://labs.metacarta.com/wms/vmap0?", { var baseLayer = new OpenLayers.Layer.WMS("Test Layer", "http://vmap0.tiles.osgeo.org/wms/vmap0?", {
layers: "basic"}, {singleTile: true}); layers: "basic"}, {singleTile: true});
var sos = new OpenLayers.SOSClient({map: map, url: 'http://v-swe.uni-muenster.de:8080/WeatherSOS/sos?'}); var sos = new OpenLayers.SOSClient({map: map, url: 'http://v-swe.uni-muenster.de:8080/WeatherSOS/sos?'});

View File

@@ -34,9 +34,9 @@
function init() { function init() {
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var base = new OpenLayers.Layer.WMS("OpenLayers WMS", var base = new OpenLayers.Layer.WMS("OpenLayers WMS",
["http://t3.labs.metacarta.com/wms-c/Basic.py", ["http://t3.tilecache.osgeo.org/wms-c/Basic.py",
"http://t2.labs.metacarta.com/wms-c/Basic.py", "http://t2.tilecache.osgeo.org/wms-c/Basic.py",
"http://t1.labs.metacarta.com/wms-c/Basic.py"], "http://t1.tilecache.osgeo.org/wms-c/Basic.py"],
{layers: 'satellite'} {layers: 'satellite'}
); );

View File

@@ -5,7 +5,7 @@ function init() {
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: "basic"} {layers: "basic"}
); );

View File

@@ -11,7 +11,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );

View File

@@ -10,7 +10,7 @@
function init(){ function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'}); map = new OpenLayers.Map('map', {maxResolution:'auto'});
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(wms); map.addLayer(wms);
map.setCenter(new OpenLayers.LonLat(0, 0), 0); map.setCenter(new OpenLayers.LonLat(0, 0), 0);

View File

@@ -13,7 +13,7 @@
map = new OpenLayers.Map('map'); map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} {layers: 'basic'}
); );

Some files were not shown because too many files have changed in this diff Show More