Compare commits

...

588 Commits

Author SHA1 Message Date
crschmidt
22c1d22caf Tag RC2.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.6-rc2@6836 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-09 18:02:23 +00:00
crschmidt
53b20137cb Finish pullups for RC2.
#1498 Easily turning off/overriding default select and temporary intent
        styles
  #1501 GeoRSS format tests fail in Safari
  #1502 Events register method fails if listeners member is not an array
  #1503 panning off for odd-sized viewport
  #1504 doc review


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.6@6835 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-09 17:58:44 +00:00
crschmidt
4085a2c220 Pullup commits from trunk to 2.6 branch:
* virtualStyle typo (Closes #1495)
 * JSON fix for Safari 3.1 (Closes #1493)
 * panzoombar off-by-one (Closes #1486)
 * Handler Hover exception (Closes #1480)
 * Popup.framedcloud exception (Closes #1479)
 * VML Renderer when including namespace in page (Closes #1477)
 * SLD/Rule/Filter changes -- most of this commit (Closes #1492)


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.6@6819 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-08 01:51:04 +00:00
crschmidt
b9348dd5d5 avlee, elemoine, and ahocevar point out that we should change the
initialization of the imageSrc property to be *before* we call the 
superclass. This pullup (Closes #1475), and is the last thing I'm going 
to touch before the 2.6 release. svn merge -r6749:6751 trunk branch.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.6@6752 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-01 11:00:45 +00:00
Schuyler Erle
1c055d4f84 Branch the 2.6 release. Hooray!
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.6@6749 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-01 01:30:22 +00:00
Paul Spencer
d15ab68360 quick lint before rc1, only some missing missing semi-colons.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6748 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-01 00:14:34 +00:00
crschmidt
2fbb96099b apply VML rendering fix from andreas, since we're about to kick off RC1
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6747 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 23:01:49 +00:00
crschmidt
8aa4af76e0 Calculating the FramedCloud path at load time leads to not respecting the
ImgPath variable if it is set, because it can't be set before the 
OpenLayers.js file is loaded. Move ImgPath calculation into initialize(),
so that it is picked up correctly. Thanks, fvanderbiest! (Closes #1473)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6734 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 14:17:58 +00:00
ahocevar
f5af355a17 Popup close image is now in the theme's img folder (closes #1472)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6733 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 11:24:28 +00:00
ahocevar
b1a9f9b662 move close button image for popups into the theme (references #1472)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6732 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 11:23:15 +00:00
pgiraud
d225c8b42a r6673 introduced typos in this file resulting in not valid html code
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6731 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 09:33:49 +00:00
crschmidt
0f35350920 Add sizes to a couple of the sundial images, and zoom into show two of the
ones we hae sizes for to create a more compelling first impression.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6730 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 06:19:43 +00:00
crschmidt
a53dbf6cda Moving sundials kml into kml subdir
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6729 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 06:10:29 +00:00
euzuro
c839d7be10 sorry, forgot about this jpg
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6728 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:55:45 +00:00
crschmidt
f3d81983dd Add 'allowSelection' option to controls, to determine whether they allow
selection. Use CSS ClassName in FF, and onselectstart attribute in IE, to
control selection. Fix inappropriate overriding of className in some Control
subclasses in order to let this work. Prevents accidental selection of controls
in IE and FF. r=euzuro. (Closes #1378)  


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6727 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:55:12 +00:00
crschmidt
1c2dc204c4 Use framedcloud popups, because they're awesome.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6726 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:37:39 +00:00
crschmidt
e6c3d695ad bring back changes from r6718 that i accidentally blew away
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6725 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:32:56 +00:00
euzuro
3e348f450e fix up tests, remove _01_. (Closes #1387)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6724 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:31:28 +00:00
crschmidt
0d6174db7f Note to self: when moving all test files, *also* move the location of those
files in the test plan. (in other words: oops.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6723 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:16:11 +00:00
crschmidt
ce1e4d81ea Another bad location
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6722 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:14:16 +00:00
crschmidt
62d1ec19fc missed these files in the initial move
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6721 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:13:25 +00:00
crschmidt
a3b84b5d23 update path
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6720 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:12:47 +00:00
crschmidt
0244858054 bring back r6710 now that popup changes are in
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6719 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 05:03:49 +00:00
euzuro
463dc45fbb Adding support for new generation 'framed' popups. This patch includes numerous improvements to the main popups, including the addition of autoSizing, panIntoView, and full support for overflow:auto of the contents div. Thanks go out to the CloudAmber folks, to Pierre in la belle France, to the guys at TOPP and of course, to senior cr5 for his patience and help in the last and final stretch. this is a huge improvement in the popup arena and couldn't have been done without the broad help of everyone out there in the community. Thank you everyone for making this possible. Big step for OpenLayers. (Closes #926)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6718 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 04:43:36 +00:00
crschmidt
0fa07edb04 Firefox 2.0.0.13 changed behavior iwth regard to loading files relative to an
iframe included in a page from matching every other browser to matching IE.
Rather than try and guess what's going to happen with this in the future, at
the moment, just duplicate the data, in hopes of a more sane solution coming 
along in the future for all our data loading needs.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6712 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 02:41:26 +00:00
crschmidt
69ca5c7fdd Revert r6710: The new popup coe is going to need to change tests, so this
needs to wait.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6711 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 02:12:03 +00:00
crschmidt
02bbd43687 Since we've now completed all the work that is including new tests in 2.6, move
tests around. (See #1387) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6710 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-31 01:57:38 +00:00
crschmidt
7a7ab7109b Path Handler can result in selection of map in IE (Closes #1410), with patch + research from bjorn (hooray!)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6708 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-30 22:03:29 +00:00
euzuro
136a37bf2f replacing tabs with spaces. no functional diffs here.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6673 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-29 00:38:47 +00:00
Tim Schaub
d46f884201 Promoting the map.layers property to the API. Assuming this meets the approval of other devs, please roll back if not.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6661 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-28 16:58:21 +00:00
crschmidt
e0aae7f946 Move to the latest google api to pick up smooth dragging support
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6659 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-28 14:51:22 +00:00
Tim Schaub
3b267f5334 SLD format rewrite. Adds a versioned parser with read and write support. This does not come with full support for ogc:expression parsing, but makes for easy future enhancements. r=ahocevar (closes #1458)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6645 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-27 17:18:05 +00:00
crschmidt
6b1903b5a3 Improve performance when not using transitions by not forcing a reflow,
which can slow rendering significantly when many layers are in place.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6638 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-27 13:01:25 +00:00
crschmidt
793fa3444b Add support for Safari 3.1 SVG version strings: Safari got more 'honest' about
what it supports, at the cost of breaking OpenLayers Vector layers. This looks
for a more 'basic' SVG featureset, as recommended by a Webkit developer.
r=pagameba (Closes #1463)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6581 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-25 17:29:11 +00:00
Paul Spencer
19da92a321 Re #1451. Re #1456. Change the way ScaleLine respectZoom is tested to test if the maxWidth of the control is respected at all zoom levels with two separate map units and with a custom maxWidth value.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6580 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-24 13:17:34 +00:00
Tim Schaub
66e89b9bf0 Making the feature handler a dependency of the SelectFeature control.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6577 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-21 18:55:26 +00:00
Tim Schaub
f07e0ccda6 Adding an extra check for IE, where request.responseXML is true on occasion even if the documentElement doesn't exist. r=crschmidt (closes #1428)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6573 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-21 17:34:27 +00:00
crschmidt
03fc6aacd4 FixedZoomLevels subclassese don't propertly set min/max resolution, so
calculateInRange always returns false, so the layers can never be displayed
(due to recent code): Fix calculateInRange by setting min/max res. r=tschaub,
(Closes #1457) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6572 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-21 17:31:58 +00:00
crschmidt
cc8f3d2319 Use the more modern click handler to interact with click events rather thanregistering directly on the map. This gives more flexibility and functionalityto applications, and should be the preferred way to handle these events goingforward.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6571 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-21 15:45:54 +00:00
Tim Schaub
4b02bc5ab1 Adding Czech translation from jachym. Only en.js is included in single-file builds. Edit your configuration for a single-file build with translation support. r=me (closes #1454)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6569 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-20 18:16:00 +00:00
Éric Lemoine
ce321ccea3 dragging mode of modify feature control is broken. r=crschmidt,tschaub. (closes #1418)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6564 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-20 07:26:21 +00:00
Paul Spencer
8b759ab1d6 Closes #1451: change test to be (hopefully) map unit independent. r=crschmidt.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6557 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-19 21:09:53 +00:00
crschmidt
2694905155 Fix mousewheeling on eventpane layers. r=tschaub (Closes #1438)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6556 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-19 20:53:59 +00:00
euzuro
9f425430ef removing extraneous lines from getParameters() function (r=tschaub) (Closes #1450)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6555 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-19 20:38:25 +00:00
Tim Schaub
3cc419aada Fixing OpenLayers.Style.createLiteral to work with all strings. r=ahocevar (closes #1439)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6553 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-19 19:23:15 +00:00
Frédéric Junod
410cd22976 fix doc typo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6549 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-18 08:44:40 +00:00
Tim Schaub
88c449736c correcting namespace for xlink
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6543 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-17 20:09:15 +00:00
Tim Schaub
8d4a03cbbc Natural Docs menu update
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6542 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-17 18:40:48 +00:00
crschmidt
ac7172bec7 If you call setVisibility(true) on a layer which is out of range, the layer's
visibility won't change, but the tiles will be displayed anyway, in the 
wrong position. Instead, prevent tiles from being displayed at all. r=ahocevar,
(Closes #1429)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6540 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-17 15:53:13 +00:00
ahocevar
ec3c55606c added navigation control so users can at least play around a little
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6536 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-17 09:58:27 +00:00
Tim Schaub
32d7e9d92b Correcting typo in message thrown by format. c=trivial
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6535 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-16 19:52:17 +00:00
crschmidt
cd27825fb5 Add format-level layerOptions configuration property to WMC parser, to support
the configuration of user-preferred layer options in order to allow 
configurability of options like buffer, ratio, etc. r=ahocevar (Closes #1411).


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6534 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-16 12:21:15 +00:00
Tim Schaub
ca4a8d1ebf Demonstrating the use of the MousePosition control with the Hover handler.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6533 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-15 00:16:37 +00:00
Tim Schaub
6e9b661af1 Avoid infinite loops with Not elements in SLD parsing. c=ahocevar (closes #1440)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6532 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-14 21:07:39 +00:00
Tim Schaub
adb7255910 Util doc updates.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6519 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-13 16:58:01 +00:00
crschmidt
0da40191ec Rolling back patch from #751: this broke IE when used (destroy tries to
destroy slider even though it was never created). Thanks to the tests we
caught it, but this patch needs reworking.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6516 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-13 13:44:09 +00:00
ahocevar
31f769b61a Prevent SVG renderer from drawing features in the upperleft corner of the map pane when coordinates are outside range. The fix in r6380 did not work properly. r=crschmidt (closes #1360)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6515 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-13 09:49:43 +00:00
crschmidt
9b1cf1ef01 showPan & showZoomBar options in control PanZoomBar, to turn off the
various chunks. In the future, we'll use this to have a single control 
integrating panzoom and panzoombar, but not quite yet. Revamped patch 
from kkempfer (thx!) with tests. r=me (Closes #754)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6514 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-13 04:20:53 +00:00
ahocevar
85d06c5137 VML and SVG renderers behave differently with zero strokeWidth. r=tschaub (closes #1435)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6513 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 22:38:15 +00:00
Tim Schaub
106e73618a Adding an args argument to OpenLayers.String.format. This lets you set context properties as functions that will be executed with the given arguments where tokens match. For styles, this means you can specify a context that contains functions that return some value based on the feature being styled. See the styles-context.html example for use. r=ahocevar (closes #1434)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6512 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 22:24:33 +00:00
ahocevar
7a25a14f93 propertyStyles of a Style's default symbolizer will not be parsed unless rules are specified. r=tschaub (closes #1432)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6505 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 16:42:16 +00:00
crschmidt
0768fa4d27 Fix tileMonitoringHooks test: faked-out tile was missing an unload method.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6501 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 16:04:23 +00:00
Tim Schaub
ae5ec139b9 Cruft begone.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6499 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 15:40:02 +00:00
Tim Schaub
ba4a33b478 Since the name google.html should be reserved for our canonical Google example, I'm moving this reproject stuff into a google-reproject.html example. The google.html example now shows the various Google layers available. The google-reproject.html example demonstrates the reproject trick. I find examples with different indentation on every line a bit hard to read, so I'm straightening that out as well - and removing bits that were not used or not relevant to the examples.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6498 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 15:34:05 +00:00
Tim Schaub
a54f36650c four tabs for spaces
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6497 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 14:51:37 +00:00
Tim Schaub
90d824041c No longer do we force re-parsing of request.responseText for WFS, GML, and GeoRSS layers. Thanks avlee for spotting this performance hit we've been taking since at least r174. r=crschmidt (closes #1428)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6496 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 14:21:27 +00:00
crschmidt
cde39e98ae Improve the handling of tile events with regard to tiles being unloaded before
their load events fire by adding an 'unload' event to the tile, and calling
it from the places where we're about to stop listening to events. In the longer
term, it might make sense to have this be automatic, but this resolves issues
with map resizes screwing with tile events, and reverts a previous,
incomplete solution to solve a problem with untiled tiles not resizing when
the map size changes. r=ahocevar, checked out by bartvde (Closes #1417) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6495 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 12:53:34 +00:00
crschmidt
819825d8c3 Apply patch from rdewit to fix parsing of hotSpot values on Icon objects
in KML styles. This fixes issues reported with the location of icons when
using KML styling. r=me (Closes #1426)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6494 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 12:49:47 +00:00
crschmidt
98e7bd3db6 Add David Overstrom to authors for his help on #1402
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6493 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-11 18:35:28 +00:00
Tim Schaub
d12fd7c04c Smooth GDragging at last. Thanks to overstdr for digging up the getDragObject method. With v2.93 and later we no longer get flickers on panning. Non-API smooth dragging is no longer supported. r=crschmidt,me (closes #1402)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6492 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-11 18:32:17 +00:00
crschmidt
008c820e2b Clean up google example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6491 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-11 18:14:18 +00:00
Tim Schaub
6d59830d0e Documenting onModification* methods as deprecated in ModifyFeature control.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6490 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-11 16:02:39 +00:00
Tim Schaub
606347cdc9 panning test updates
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6470 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-10 01:25:44 +00:00
crschmidt
d0b4a17116 Add improved navigation control support for disabling zooming with the
mousewheel. Original from sbenthall (yay), example and more code from me, tests
from elem. r=elemoine.  (Closes #1339)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6462 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-07 23:04:32 +00:00
Éric Lemoine
6ee694fc2b fix Tile tests (checked with FF2 and IE7)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6456 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-07 08:42:03 +00:00
Paul Spencer
3fa5487c37 Re #933. Apply transition effect patch to trunk, many thanks to Erik, Tim and Chris for support. r=crschmidt, tschaub.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6452 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-06 22:50:44 +00:00
Tim Schaub
e7b9a9a41b Adding explicit eventListener unregistering in map, layer, and control destroy methods. Note that this only makes explicit what is already happening elsewhere, but it makes us feel complete. Also throwing in the example I missed in the previous change. r=euzuro (closes #1404)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6447 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-06 18:24:18 +00:00
crschmidt
21c097a297 Add more docs to rectangle
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6446 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-06 15:02:30 +00:00
Tim Schaub
438011bdab No var keyword needed in this scope.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6444 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-06 09:23:10 +00:00
Tim Schaub
0a8aa16f78 Control panels should deactivate all non-toggle type controls before activating a new control. r=me (closes #1414)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6443 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-06 05:22:18 +00:00
Tim Schaub
e4b7c6de53 The barest of docs for the Google constructor.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6442 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-06 04:58:46 +00:00
euzuro
23a1ce7729 fixinG icon offset issue. thanks to abejenaru for the oriGinal buGreport (r=tschaub) (Closes #1363)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6441 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-05 21:43:41 +00:00
crschmidt
590aa9d74e MapGuide 2.0 (just released) has support for a 'clip' parameter, which is
designed to help performance with non-tiled layers. Patch from madair to
take advantage of this in OpenLayers. Thanks Mike. r=me, (Closes #995)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6438 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-05 21:06:42 +00:00
ahocevar
155d86f070 updated ND comment (see #1417)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6437 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-05 15:11:21 +00:00
ahocevar
0a8ffebb85 resizing the map quickly messes up tile load events (singleTile). Thanks bartvde for the patch. r=me (closes #1417)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6436 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-05 14:41:32 +00:00
Tim Schaub
894c457fdd Adding eventListeners property to layer, control, and map. Setting this property at construction registers the given listeners based on event type key. r=elemoine (closes #1404)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6435 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-05 00:07:46 +00:00
Frédéric Junod
0c03b8e631 Separating jsdoc declarations.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6433 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-04 10:29:08 +00:00
ahocevar
d9cef80589 typo in ZoomBox. Thanks avlee for spotting this and the patch. r=me (closes #1413)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6432 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-04 10:19:24 +00:00
Frédéric Junod
88b42f0e46 Separating jsdoc declarations. (See #1229)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6431 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-04 10:11:32 +00:00
Frédéric Junod
b11d8bbd37 fix ND comments
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6430 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-04 07:09:05 +00:00
euzuro
c7bd58b774 fix stray ND comments
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6428 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-03 18:15:31 +00:00
Tim Schaub
6adeb7c304 ND typo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6427 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-03 07:06:27 +00:00
crschmidt
cac0402c92 chagne geo for sigma, since geo appears to be gone/down
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6425 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-01 15:08:04 +00:00
crschmidt
ad97e9b16f Silly patch, doubling up my example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6424 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-01 15:06:22 +00:00
Tim Schaub
7001ce1be6 A bit more docs for fractionalZoom.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6423 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 21:13:42 +00:00
crschmidt
e54074e6f1 Improve WFS reprojection:
* Transform bbox back to layer projection
 * Transform commits back to layer projection
r=tschaub, (Closes #1406)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6422 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 18:39:37 +00:00
Tim Schaub
05858dc9fb Changing bounds.transform so it works with non-conformal projections. r=ahocevar (closes #1407)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6421 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 17:32:02 +00:00
Frédéric Junod
279af295f1 Add missing ND comments. (non-functional changes)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6418 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 14:16:10 +00:00
euzuro
bf97a6c0d2 be very very careful about how we deal with the wheel. only take action when over scrollable items or over the main map. all of this is explained in the ticket and patch it is really late and i dont feel like typing it again. basically, this puppy means that scrolling on controls or in popups will no longer zoom the map unwantedly. that is good. thank you cr5 and IRC for taking such care of me. (r=cr5) (Closes #1382)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6416 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 08:37:12 +00:00
pgiraud
fde0715f4e add the Quad easing methods for Tween
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6415 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 07:31:56 +00:00
Tim Schaub
323de7085b The click and hover handlers need to take care that the event they are handling doesn't get modified before the delayed listeners get called. Appears to only be a problem in IE. Thanks for the catch madair. r=crschmidt (closes #1393)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6414 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 07:30:34 +00:00
Frédéric Junod
8b91ee8d64 Send events when modifying features:
'beforefeaturemodified' triggered when a feature is selected to be modified,
  'featuremodified' triggered when a feature has been modified,
  'afterfeaturemodified' triggered when a feature is finished being modified

r=tschaub (Closes #1358)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6413 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 06:50:39 +00:00
crschmidt
5f93cc2b52 panmethod option on map to allow for the turning off of animated panning.
Includes example. All tests pass. r=tschaub. (Closes #1356)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6411 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 06:03:12 +00:00
Tim Schaub
6ff86dc756 Checking for properties directly on the prototype since it has been extended already. r=crschmidt (closes #1405)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6410 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 05:59:43 +00:00
Tim Schaub
836f037fda The loadURL function now returns something that acts more like XMLHttpRequest should. If you name this return request, call request.abort to abort the request. r=crschmidt (closes #1386)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6408 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-29 00:16:47 +00:00
Tim Schaub
145981c303 Though the structure is not something we promise will not change, the internal context object is now available to those who parse WMC. r=crschmidt (closes #1370)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6401 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-28 21:09:28 +00:00
Tim Schaub
fcd7ecfa3c got ahead of myself in r6399
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6400 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-28 20:21:53 +00:00
Tim Schaub
4107e90c0a sasifying my need for unmixed tabs
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6399 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-28 20:20:23 +00:00
crschmidt
c92527fae5 Improve calls to movestart/moveend so that they happen at the start/end of
moves. This includes fixing pantween to set playing to false after it is
done, and fixing the map to store its dragging state again so we can use
it to figure out when a move has started.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6398 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-28 19:47:38 +00:00
crschmidt
248385ccf4 Make MapGuide tests run in IE. It appears that IE tries to run tests even if they're commented out (at least IE7) in test.anotherway, which is slightly annoying ( to say the least).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6397 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-28 18:31:35 +00:00
ahocevar
2f0382e6f6 * Style and Rule now have separate context properties
* new convenience method addUniqueValueRules in OL.!StyleMap. This can actually be used to achieve what I was trying to show in the example of this ticket's description.
 * some refactoring of OL.Style to remove duplicate code (with tests)
 * a new example showing how to add a "unique value" legend to a point layer using the new addUniqueValueRules method
 * Rule.symbolizer can now also be just a symbolizer, instead of a hash of symbolizers keyed by "Point", "Line", "Polygon". This will make things even simpler (as can be seen in the styles-unique.html example)

r=tschaub (closes #1373)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6396 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-28 17:57:37 +00:00
euzuro
d3294e73fd proper tabbing is the artichoke of a good garden.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6392 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-28 00:02:48 +00:00
ahocevar
3e21905fc4 "svg flicker at end of pan". Gecko-based browsers might not reflow svg if only style properties of dom elements are changed. Fixed by setting the scrollLeft property. r=pgiraud,tschaub (closes #1390)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6389 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-27 19:32:44 +00:00
Tim Schaub
1b57ea3069 Invoking the trivial change clause, I'm adding a semicolon. (see #1392)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6388 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-27 19:05:28 +00:00
pgiraud
ffecbe0594 add a new 'playing' property to the Tween class so that a call to stop doesn't do anything if animation is already finished, r=ahocevar,crschmidt (Closes #1392)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6387 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-27 13:57:13 +00:00
pgiraud
0fc0112e07 remove extra comma, IE was complaining
tests don't seem to pass under IE though

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6383 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-27 08:46:44 +00:00
ahocevar
16a83026a1 WFS transactions use wrong namespace for Delete. Thanks to Stephen Woodbridge for this fix. r=tschaub (closes #1394)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6381 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-27 00:50:09 +00:00
ahocevar
9c55f8c1e1 SVG renderer draws features in the upperleft corner of the map pane when coordinate outside range. r=tschaub (closes #1360)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6380 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-27 00:47:55 +00:00
crschmidt
99265c2581 Add support for MapGuide Open Source layers in OpenLayers. Great work by
Mike Adair on following this one through. Includes example, tests, code, 
etc. r=me (Closes #995)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6368 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-26 02:56:40 +00:00
Tim Schaub
3405e97835 Adding more complete style parsing to the WMC format. The format now has support for named, linked (SLD), and inline (SLD_BODY) styles. r=ahocevar (closes #1313)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6358 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-24 20:25:27 +00:00
Tim Schaub
b06a8762a4 asynchronous false implies synchronous
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6346 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-24 08:02:41 +00:00
Tim Schaub
fa42329b31 Modifying xml_eq so that prefixes for element and attribute nodes are not tested by default. Namespace URI is always tested for both. If you also want to confirm that prefixes are equal, test with options.prefix true. Modifying tests for the XML format to use xml_eq. (see #1383)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6344 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-22 20:08:28 +00:00
Tim Schaub
39b2cae514 Adding a xml_eq method to Test.AnotherWay test objects. The function takes two nodes (or strings) and a message. A test passes when got and expected nodes have the same type, the same name, the same namespace prefix and uri, the same attributes, and the same children (based on the same criteria). Otherwise it fails. Failure messages tell you at which child on which node which criteria was not met. (closes #1383)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6341 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-22 00:12:07 +00:00
ahocevar
0f8f8c4249 "WFS layer format cannot be modified on the map". Concatenate EVENT_TYPES with specific class prototype instead of this.EVENT_TYPES. r=tschaub (closes #1361)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6337 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-21 09:11:34 +00:00
ahocevar
f34358f1b9 now really fixed this test. The additional assertion (call of Console.warn) occured with non-english browsers, because the language resource could not be found. Setting the language to the default language for this test fixes the problem.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6335 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-21 00:54:39 +00:00
ahocevar
1f107bde9d fixed number of planned tests in test_Util_getArgs
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6334 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-21 00:15:11 +00:00
ahocevar
9635c8868c exclude additional language resources from the full.cfg build profile. r=tschaub (closes #1372)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6333 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-21 00:10:14 +00:00
Tim Schaub
db8869e50f Respecting minResolution and maxScale if specified in the layer options. r=ahocevar (closes #1321)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6332 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-21 00:03:11 +00:00
Tim Schaub
697da4900d Adding support for fractional zoom to the pan zoom bar. Setting map.fractionalZoom to true allows you to access a continuous range of resolutions with the pan zoom bar. r=crschmidt,me (closes #1288)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6331 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-20 23:44:34 +00:00
ahocevar
c3c34751bd Click on overview map raises error in IE. r=tschaub (closes #1371)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6330 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-20 23:40:18 +00:00
Tim Schaub
0a96e9c17b Adding a preaddlayer event for maps. This is triggered before a layer is added. r=me (closes #1220)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-20 23:39:46 +00:00
ahocevar
3dcbeaa351 converting encoding to UTF-8
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6321 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-18 18:49:59 +00:00
ahocevar
505b6fc665 fixed @requires
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6320 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-18 18:46:01 +00:00
ahocevar
1f7e97a500 German Translation. Thanks anonymous for that contribution. Some changes were made to the original patch:
* replaced some German terms with English terms that should be more familiar to the average German speaking user
 * removed translations for console messages (which are usually only read by developers), because too much translation of code-related information does not help in understanding a problem
 * apply defaults from Lang["en"] to avoid ending up with dictionary keys in messages.

r=me (closes #1367)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6318 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-17 15:41:39 +00:00
ahocevar
e8d8dfccb7 New minimumSymbolizer object on Renderer.Elements, which defines only those properties that are needed to ensure that nothing breaks. r=tschaub (closes #1345)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6317 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-17 14:49:37 +00:00
Schuyler Erle
afd0648a2f Add Tiles@Home layer to spherical-mercator example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6316 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-17 11:54:51 +00:00
pgiraud
10ee48c84c fixes typo (Closes #1365)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6315 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-16 08:20:49 +00:00
crschmidt
1f2a057c5d We have a Format.WFS that works in IE now -- by doing so, it means it is
spitting out a string, not an object, so this patch removes the 
Ajax.serializeToString on the string which was breaking. r=tschaub 
(Closes #1355)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6314 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-15 22:42:07 +00:00
Tim Schaub
fa55f54e32 Adding framework for internationalization support. The new OpenLayers.Lang.translate method takes a key and looks for a value in a dictionary based on the current language setting. Set a new language code with OpenLayers.Lang.setCode. Get the current code with OpenLayers.Lang.getCode. Thanks to Mike Adair for the lead on this one. r=ahocevar,me (closes #109)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6313 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-15 21:15:48 +00:00
euzuro
bafc8b758b fix nd arguments list
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6251 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-13 19:08:10 +00:00
ahocevar
b3e53fce68 added @requires OpenLayers/StyleMap.js
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6247 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-13 15:35:32 +00:00
ahocevar
0d9ab3b3df looking for properties in rules symbolizer may fail. r=elemoine (closes #1362)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6246 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-13 12:21:47 +00:00
ahocevar
c5dd8ada2c "users should be able to customize the select style per feature": Created a !StyleMap class which stores all styles that are needed for a layer. Controls that need to render features differently can now just give a render intent (e.g. "default", "select" or "temporary") to the layer's drawFeature method, instead of having extra style informations like Control.!SelectFeature.selectStyle. Existing application that set layer.style or feature.style are still supported, but both of these style properties are now null by default. r=crschmidt,elemoine,tschaub (closes #1120)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6240 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-12 23:05:47 +00:00
crschmidt
dd1f4d1fa9 We split the grid init into a seperate function, and use that as the
controlling mechanism, to reduce code duplication between Grid/KaMap/other
layers that need a different grid origin. r=euzuro (Closes #1349)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6231 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-12 18:24:15 +00:00
Tim Schaub
57f6d9b914 Only destroy events if they are not already destroyed. This is relevant for controls with obligate controls. Since the map thinks it is in charge of destroying controls, and parent controls also destroy obligate controls, control.destroy ends up getting called twice. If someone wants to change the way this is handled, we should have a standard property that lets the map know that control.destroy is the responsibility of someone else. r=crschmidt (closes #1346)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6230 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-12 16:43:47 +00:00
crschmidt
49c7ec2739 Tim points out I'm clearly not running the tests often enough by showing
that the Ajax test fails. Sorry to all; I'm a bad OL dev.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6229 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-12 16:33:23 +00:00
crschmidt
38a6b180ba Map depends on tweening; fix single file builds for users who have
custom profiles. Reported by Bart on the mailing list.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6204 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-11 14:15:15 +00:00
pgiraud
93b25bf073 It looked like movestart, move and moveend events weren't triggered in a good way while using panTo (with panTween effect), this is fixed by calling moveTo with 'dragging' and 'noEvent' options, and trigering 'moveend' internaly, r=crschmidt (Closes #1348)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6203 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-11 13:55:04 +00:00
Frédéric Junod
32d541641d fix typos and missing documentation in ND comments. (non-functional changes)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-11 09:54:21 +00:00
Frédéric Junod
da706ed568 fix ND start tag. (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6196 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-11 08:08:11 +00:00
crschmidt
f42bb15716 No need for ProxyHost to be in Format.KML directly anymore, since #1350
adds it to Ajax.Request. Thanks, rdewit. r=me (Closes #1354)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6195 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-11 02:39:01 +00:00
crschmidt
416661ecc6 Apply patch from rdewit to fix a typo I missed; thx rdewit. (Closes
#1350)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6190 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-11 00:28:42 +00:00
crschmidt
54f85bdb8f Move ProxyHost addition to Ajax.Request instead of
OpenLayers.loadURL. Makes it easier to write more complex 
apps that require ajax.request stuff without duplication 
of code. r=elemoine (Closes #1350)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6184 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-10 20:57:41 +00:00
Tim Schaub
4d6ccf2e50 Closing the panel div.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6183 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-10 20:48:51 +00:00
crschmidt
03248296e7 Set a FID on OSM features. Includes tests. Original patch by kleptog
(thx), r=me (Closes #1351


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6181 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-10 16:18:48 +00:00
ahocevar
c70fb21103 Add KML Styling support. Thanks rdewit for this great contribution. r=crschmidt,me (closes #1259)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6179 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 20:42:32 +00:00
Éric Lemoine
06571e2cf3 fix indent (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6178 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 20:33:47 +00:00
Tim Schaub
db77398339 Thanks Ian Mayo for this nice ScaleLine control. Give your maps a dualie scale line control customizable with CSS. r=crschmidt (closes #1089)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6177 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 19:39:12 +00:00
crschmidt
1bb88a2f13 Make popup text selectable in Firefox. (Closes #1129)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6176 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 19:35:27 +00:00
crschmidt
b4bf9ea9bc Pass WMC options through to versioned methods.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6174 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 19:18:02 +00:00
Tim Schaub
7b87a414a3 The vector layer now only adds events to those available from the layer superclass. r=crschmidt (closes #1343)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6173 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 19:16:25 +00:00
ahocevar
886b963ce5 Fixed several destroy() methods to avoid running into undefined objects when the page unloads. r=crschmidt,me (closes #1222)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6172 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 18:51:48 +00:00
crschmidt
8e2b4956f2 make redraw have a 'force' parameter to allow it to actually add random data to
the params hash to  bust caches. r=ahocevar (Closes #1295)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6171 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 18:29:18 +00:00
ahocevar
09a6814e2d VML flicker when dragging is finished. This very nice patch by sbenthall fixes it. Thanks Seb! r=me (closes #1340)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6169 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 17:35:33 +00:00
crschmidt
431b882630 Don't redraw the single tile if the layer is not visible; it will be redrawn
by setCenter since we clear the grid anyway.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6168 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 16:51:39 +00:00
Tim Schaub
bf224d699d Giving all controls an events instance. You can now listen for activate and deactivate on any control. Panel controls do this to know when they should redraw. Navigation history control demonstrates the effect of this change. r=elemoine (closes #1346)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6167 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 16:46:02 +00:00
crschmidt
9bfd829512 Rollback patch from #1332, which broke feature creation.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6163 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 04:23:54 +00:00
ahocevar
eb5307608a VML fails to render features with undefined pointRadius symbolizer property. r=crschmidt (closes #1345)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6161 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 04:00:20 +00:00
Tim Schaub
c52ed952d8 Add navigation history control. This control creates two obligate controls: next and previous. Calling trigger on the next and previous controls steps through the navigation history. r=crschmidt,ahocevar,pgiraud (closes #1240)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6157 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 01:27:45 +00:00
crschmidt
05409a35c0 Make default build be full.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6156 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 01:19:12 +00:00
crschmidt
60706fc3f9 Refactor Hanadler.Point cancel/finalize to just call a cleanup and pass a
callback type, since otherwise they're the same thing. From sbenthall, r=me
(Closes #1332) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6154 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-09 00:49:38 +00:00
Tim Schaub
de13a7f91f Updating the WFS (transaction) format to add srsName to geometry and include attributes. Thanks sbenthall for the patch. r=me (closes #1344)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6150 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 23:54:24 +00:00
Tim Schaub
f27833f1db Trigger feature related events with feature information and layer related events with layer information. Also adding events.on and events.un convenience methods. r=crschmidt (closes #1343)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6149 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 23:31:27 +00:00
Tim Schaub
464fb30589 Reset the deal.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6148 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 23:19:09 +00:00
Tim Schaub
bde60b6851 Destroy toys when you're done playing.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6147 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 23:14:38 +00:00
crschmidt
10907f2880 In order to make it more clear that users are required to have the theme/
directory to deploy when depending on features which use CSS, and make it clear
how to override the CSS in OpenLayers, include <link rel> ags in all examples.
(Closes #884)  


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6145 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 22:19:28 +00:00
crschmidt
6f2a3598be Fix lots of EOL SSTyle line ending problems.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6131 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 19:51:55 +00:00
crschmidt
d555835791 Committed the wrong version of this file somehow; this should have been in
the commit for #110.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6129 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 19:47:51 +00:00
crschmidt
d6691ed219 missing layer (how did this go away? Nobody knows.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6126 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 19:37:54 +00:00
ahocevar
3581276835 Add optional context property to OpenLayers.Rule, so rules can now be evaluated against diffent contexts than feature.attributes. This changeset also renames Rule.Logical.children to Rule.Logical.rules, to make it more consistent with OL.Style. r=crschmidt (closes #1331)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6116 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 16:56:48 +00:00
crschmidt
bb26a2601d Add support for animated panning, with most of the work done by Pierre, thx pierre! panTo method now animates when moving. (Closes #110)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6111 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 16:28:11 +00:00
crschmidt
3f7bbdfa9c Fix for map destroy doesn't clean up all listeners r=tschaub (Closes #1301)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6108 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 16:04:00 +00:00
Tim Schaub
49e0bff93d For controls with multiple handlers, we now tack them on to a handlers object. The base destroy takes care of the handlers. r=crschmidt,uz/2 (closes #1338)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6106 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 15:52:03 +00:00
crschmidt
03a827de4d Refactor setCenter to do most of its work through a smarter function called
moveTo. In moveTo, we also have knowledge of whether the event was fired
through setCenter, allowing us to know the difference between an 'internal'
move and an external one.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6099 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 13:23:41 +00:00
pgiraud
f6fe7d48d3 adds tween and easing classes (with algorithms from Robert Penner) to handle animation
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6097 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 13:09:58 +00:00
Frédéric Junod
1847986723 Correctly add the fill element to the VML node. r=ahocevar (Closes #1312)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6080 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 06:51:01 +00:00
crschmidt
db0e03e2bd Layers with the 'alpha' flag set to true never register proper load events, so
they never fire loadend events. r=euz (Closes #1336)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6068 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 04:18:13 +00:00
Tim Schaub
99f3fa0d26 By default, the click handler now has a zero pixelTolerance. This means we don't call click if the click includes a drag. Set pixelTolerance to null if you want click called with a drag. r=crschmidt (closes #1335)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6066 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 03:24:42 +00:00
crschmidt
fba4528c9a Add further improvements to WFS writing code from sbenthall, to write out
things in IE. (Closes #1278) (again)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6054 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 00:56:52 +00:00
crschmidt
a56b84e922 overviewmap needs to set fallThrough to false (Closes #1333)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6052 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 00:42:47 +00:00
euzuro
6c2dfdeaf1 we want to keep a reference to the close div in our popups if we make it. (Closes #1334)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6048 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-07 23:59:54 +00:00
crschmidt
870e196c20 Adding Seb Benthall and Ivan Willig to authors.txt, for their contributions
added earlier today.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6037 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-07 22:28:18 +00:00
crschmidt
9075aa804c Refactor out names into namespace prefixes for overridability (and to make
the  code slightly less verbose).


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6036 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-07 21:54:33 +00:00
Tim Schaub
61f124f214 Only write out min/max scale related properties if they are explicitly set on the layer. Thanks for slapping Safari around a bit with this on crschmidt. Works but still untested there. r=crschmidt (closes #1314)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6033 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-07 21:06:08 +00:00
Tim Schaub
9d045baf71 Changing the editing toolbar to use a single image. Thanks iwillig for the work on this. r=me (closes #1330)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6025 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-07 20:07:48 +00:00
crschmidt
c75909a45e Don't render features with no geometry. This gives us similar behavior in IE
and FF. There is probably more to this, but we can solve those issues as they
come up: going with this one as is for now. (Closes #1111)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6023 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-07 20:04:42 +00:00
ahocevar
92b4894e33 "Tests Broken on IE6". This adds an additional check that prevents IE6 from complaining about undefined properties. r=crschmidt (closes #1322)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6021 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-07 19:46:04 +00:00
crschmidt
d52701aec8 Adding a space to clean up diffs for transition patch. (No functional change.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6012 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-07 06:20:50 +00:00
crschmidt
ca5c08ee26 Fix typo in comments.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6011 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-06 23:52:39 +00:00
ahocevar
ae6588140a Race conditions with creation and destruction of OverviewMap. r=tschaub (closes #1320)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6010 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-06 22:49:41 +00:00
Tim Schaub
8d5d8f6d94 Just because I had it open and was looking at 952, I'm shortening test names. (see #952)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6006 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-06 19:46:22 +00:00
Tim Schaub
98edddb28d More tests for XML format that pass in Safari - confirming nothing except that I have gone nuts
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6005 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-06 16:00:55 +00:00
Frédéric Junod
911a2772a4 Opera version < 9.20 invert the wheelDelta value but version >= 9.20 don't. r=crschmidt (Closes #1193)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6004 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-06 15:34:16 +00:00
euzuro
672d3c4eed give the navigation control a proper destroy and also give it a test file while we're at it. (Closes #1289)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5990 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-05 06:34:20 +00:00
euzuro
8311449985 give the wfs layer a proper destroy method (Closes #1256)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5989 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-05 06:12:29 +00:00
Tim Schaub
211a2834de Adding fractionalZoom property to the map. This allows zooming to an arbitrary level, making it possible to have non-discrete resolutions for layers that support it. This property should not be set to true for layers with fixed zoom levels (commercial layers or others with cached tiles). r=elemoine,crschmidt,ahocevar (closes #1243)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5982 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-04 06:23:54 +00:00
ahocevar
1faf641806 evaluation of else filter in SLD. r=tschaub (closes #1317)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5978 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-03 17:48:19 +00:00
crschmidt
a664b6b390 left in too much from source license text
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5977 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-03 17:43:18 +00:00
Éric Lemoine
cf87ffc26c Add properties stopClick, stopDown, and stopUp to the feature handler. If
stopClick is true, clicks handled by the feature handler don't propagate to
other click listeners; otherwise handled clicks do propagate. The same kind of
rule applies to stopDown and stopUp. These properties default to true. Thanks
to Attila Csipa for expressing the need for this feature and cooking up the
first patch. r=tschaub. (closes #1266)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5976 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-03 17:35:39 +00:00
Éric Lemoine
f9950ec389 This commit solves the following problem with the select feature control: if
you create two select feature controls on the same vector layer, one with
hover:false that handles geometry type A only, and the other with hover:true
that handles geometry type B only, then if you click on a geometry of type A
and moves out of that geometry, the second control will unselect it. r=tschaub
(closes #1221)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5975 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-03 17:20:39 +00:00
Éric Lemoine
3acc19ae3d The modify feature control destroys the vertex that was dragged in the drag
complete callback. Thus, the drag feature control won't detect a mouse-out on
that vertex and won't deactivate its drag handler. This causes errors because
the drag feature control has a feature to drag but that feature is destroyed
(feature.geometry is null). To prevent this, we make resetVertices explicitely
call outFeature on the drag feature control if the control has a feature to
drag. tschaub did most of the investigation on the problem. r=tschaub,me
(closes #1235)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5974 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-03 17:10:03 +00:00
Tim Schaub
5a176d7852 Explicitly check that we know who the parent is before removing child from parent. r=crschmidt (closes #1316)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5973 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-02 22:48:37 +00:00
crschmidt
2bb8d7cc8f Add mention that the files have been changed. This is obvious from
context, but the apache license requires us to mention it explicitly. 
(No functional changes.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5971 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-02 14:46:04 +00:00
crschmidt
592e1719db Add links to various licenses that we use, in order to come closer to
compliance with those licenses. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5970 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-02 14:38:27 +00:00
Tim Schaub
2259db2225 Correcting typo in the OSM format and adding support for null namespaceURI in IE. r=crschmidt (closes #1318)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5965 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-01 21:44:43 +00:00
ahocevar
4fc4c6ce4b SLD maps minScaleDenominator and maxScaleDenominator to rule minScale and maxScale. r=tschaub (closes #1297)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-01 21:17:12 +00:00
Tim Schaub
9bb51fb088 Taming the select feature control a bit. Previously, onUnselect was called twice for every unselection. r=elemoine (closes #1234)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5959 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-01 16:42:33 +00:00
Frédéric Junod
508dc66e6a fix typo in ND comment (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5950 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-31 15:05:57 +00:00
ahocevar
152e48a5a4 Cannot switch externalGraphic style on VML-rendered feature. r=tschaub (closes #1312)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5944 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-30 22:43:18 +00:00
crschmidt
894589fe7c Docs for Util.js incorrect documented parameter types.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5941 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-30 17:07:23 +00:00
ahocevar
8276327d7f sld example does not need a custom select method for Control.SelectFeature any more
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5925 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-28 23:02:47 +00:00
Tim Schaub
d1d058d30f Removing use of deprecated untiled wms layer from example in favor of layer with singleTile true. (closes #1309)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5923 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-28 21:19:32 +00:00
ahocevar
c3c97be5b2 Create tests for OpenLayers.js. r=crschmidt (closes #1267)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5922 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-28 20:29:25 +00:00
ahocevar
97ec46b15d "_getScriptLocation cannot handle query string". Patch originally by john.pulles@geodan.hl, improved by beau@beaugunderson.com. Thanks! r=crschmidt,me (closes #1263)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5921 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-28 20:27:54 +00:00
Tim Schaub
44f7ebdc22 Adding Web Map Context document parsing for versions 1.0.0 and 1.1.0. This also adds a cross browser setAttributeNS to the XML format. Thanks bartvde for supporting this work. r=crschmidt (closes #100)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5919 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-28 16:39:05 +00:00
Tim Schaub
a14418f53f Modifying initResolutions so that minResolution and numZoomLevels are respected if they are set as layer options. Note that if only minResolution and maxResolution are specified, minResolution will still not be respected in general. r=pspencer (closes #1300)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5918 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-28 16:28:21 +00:00
Frédéric Junod
866cfe631d Change OpenLayers.Layer.setIsBaseLayer to trig the 'changebaselayer' event not
the 'changelayer' event. r=crschmidt (Closes #1306) 



git-svn-id: http://svn.openlayers.org/trunk/openlayers@5917 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-28 13:10:46 +00:00
Éric Lemoine
221967cc3f Map.setCenter() should not call Layer.moveTo if inRange has changed to false.
With this patch you should no longer see tiles loading if your layer is out of
range or not visible. Hopefully! r=crschmidt (closes #937)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5913 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-27 22:59:31 +00:00
crschmidt
8487829362 add kleptog to authors.txt
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5912 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-27 18:12:19 +00:00
crschmidt
d597e4f9a9 Because onselectstart is null by default, our logic to set it and
replace it was somewhat lacking. This changes the behavior such that 
using hte drag handler does not totally disable text selection in IE. 
Patch from Bart, r=me (Closes #906)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5911 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-27 14:48:02 +00:00
crschmidt
ea5e96df85 Add support to set the 'title' property of a control such that it will
be displayed when hovering over the control in a control.panel via its 
panel_div. r=me (Closes #822)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5910 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-27 14:44:16 +00:00
Éric Lemoine
bd07adbb10 This commit fixes this: once a feature's been selected the "pointer" cursor is
always used when going over it. r=crschmidt (closes #1217)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5909 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-27 14:26:28 +00:00
crschmidt
5f3e05bb5e Set the fallThrough property to 'true' by default. This seems to have no
adverse affect on the examples, is documented in the 2.6 release notes, 
and will allow for easier display of built-in browser tooltips for 
controls. r=elemoine (Closes #1303)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5907 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-27 14:10:00 +00:00
crschmidt
83d5461796 Add a seperate method which actually does the formatting in the
MousePosition control in order to allow easier changes in formatting at 
the application level (with less duplication of code). Patch from 
Kleptog, r=me. (Closes #778)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5906 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-27 02:26:36 +00:00
crschmidt
cd266a99e0 Updating example for changed location where osm_id is stored
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5903 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-26 14:46:12 +00:00
crschmidt
bd7eaeb167 Add support for parsing and serializing OpenStreetMap data. Includes
tests, examples, modification to proxy.cgi, etc. This should allow one
to build an OpenLayers based OpenStreetMap editor with some effort, and 
makes it trivially simple to drop OpenStreetMap data from the API into 
your OpenLayers application. r=ahocevar,elemoine (Closes #1271)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5902 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-26 14:41:41 +00:00
Éric Lemoine
4159d1b1e8 add a manual test showing how OpenLayers should behave with respect to
when it should load tiles and when it shouldn't. As reported in #937
OpenLayers doesn't behave properly today, it breaks Test 1 and Test 3
of this manual test.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5901 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-26 13:36:35 +00:00
euzuro
3ccf5af733 arg parser triggers load of baselayer too early. thanks for the patch, kleptog. i've taken it upon myself to run the damn tests. all pass. (Closes #1290)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5900 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-26 00:00:37 +00:00
euzuro
082ff954d6 be more forgiving in removeMarker() -- do not cause script error if marker has already been removed r=cr5 (Closes #1152)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5899 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-25 23:46:03 +00:00
euzuro
fd321883a8 fix broken test_Handler -- stray try {} statement, presumably from debugging.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5898 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-25 23:28:26 +00:00
Éric Lemoine
a68492e003 The deactivate method of the modify feature control calls the unselect method
of its select feature control and passes it the current selected feature (if
any). If that selected feature is destroyed between the time it was selected
and the time the modify feature control is deactivated, the unselect method of
the select feature control will attempt to draw it on the layer while it no
longer has a geometry (it's destroyed!). This patch prevents this from
happening. Thanks to tlpinney for reporting the bug and helping on its
evaluation. r=tschaub (closes #1281) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5897 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-25 23:18:20 +00:00
ahocevar
45d5fdfd06 SelectFeature and OpenLayers.Feature.Vector.style["select"]: changed Control.SelectFeature to inherit properties that are not set in selectStyle from feature.style. r=tschaub (closes #1260)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5896 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-25 23:13:57 +00:00
crschmidt
8901982955 Fix broken handler test due to r5891 in IE.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5892 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-25 17:07:15 +00:00
crschmidt
e4ec1b58b0 Cleanup after the Navigation control (at least slightly more)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5891 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-25 01:35:34 +00:00
crschmidt
233af36280 "We know this doesn't work" warning.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5876 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-24 13:33:50 +00:00
crschmidt
81505f54b0 Add generic 'button' control. r=tschaub. (Closes #872)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5870 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-24 03:16:42 +00:00
Paul Spencer
412314e665 missing semi-colons
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5869 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-24 02:22:04 +00:00
crschmidt
cff527ba6f Change the Format.WFS to use Format.XML methods instead of
document.createElementNS methods. r=tschaub. (Closes #1278) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5868 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-24 02:18:56 +00:00
crschmidt
72a1cef5da Accidentally committed Format/OSM test in list-tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5867 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-24 02:14:10 +00:00
crschmidt
7af5b1c657 Fix silly typo which neither Paul nor I caught, with tests this time. Thanks
Tim for catching it.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5866 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-24 02:12:21 +00:00
crschmidt
f4b4e85433 loadURL does not escape + (plus) character in proxied URL. Thanks to rdewit
for following up on this, and to tschaub for reminding us of the right way
to do things. r=pagameba (Closes #1262)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5865 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-24 02:04:11 +00:00
Paul Spencer
ef1af7dee4 Add clone methods to Tile and Tile.Image, and add associated tests. r=crschmidt (closes #1296)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5854 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-23 20:29:46 +00:00
Tim Schaub
74bbd0347e Documenting supported event types for the map.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5853 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-23 20:08:43 +00:00
crschmidt
077db39d39 Fix mice.xml loading in IE.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5846 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-23 01:03:53 +00:00
crschmidt
ea06b08517 fix projection tests (wrong count, got missed in patch)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5845 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-23 00:56:10 +00:00
euzuro
68a05a7c0d remove test numbers from wfs layer's tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5844 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-23 00:01:58 +00:00
crschmidt
90d8517e73 Previous commit to change wfs tile to support formatobject + formatoptions
was the wrong patch: this typo was left out. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5839 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-22 15:43:07 +00:00
crschmidt
6937fabe3a Ensure that GeoRSS format does not fail when reprojection null geometries.
patch=Edgemaster, ar=me (Closes #1258)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5837 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-22 00:17:29 +00:00
ahocevar
bf39fa06a9 To make the example work out of the box for external URLs, the URL to the proxy must be changed. (closes #1287)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5836 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-21 23:44:49 +00:00
ahocevar
df78f09e36 "Pointtrack example does not work". r=crschmidt (closes #1287)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5835 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-21 16:13:59 +00:00
crschmidt
f28a1c314a Add support for reprojection of vector formats when loading data. This allows
for the definition of a 'projection' option on a layer. IF this projection 
object exists, it will be used to create the format's internal/external 
projection options, making it such that any data loaded will be reprojected 
to the map's projection automatically. r=pagameba (Closes #1273, #1225, #1269) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5828 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-20 20:33:54 +00:00
crschmidt
7a19fd6a95 Don't let the SVG renderer bail if the node we are trying to add is out of
bounds *and* not yet added to the map. r=pagameba (Closes #1274)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5826 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-20 20:11:38 +00:00
crschmidt
f6e20a0b75 Fix for Projection.equals fails when passed 'null'. r=pagameba
(Closes #1286) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5825 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-20 20:03:42 +00:00
Paul Spencer
ae9ceeec6c mis-spelling in comment.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5821 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-20 19:09:27 +00:00
crschmidt
a0e6dd7c7a Thought that normal selection wasn't working. Turns out I had a local
modification I'd forgotten about. take hover off to more closely resemble the
boxes-vector example.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5820 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-20 16:50:12 +00:00
crschmidt
d4ca01a134 vector boxes examplee
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5819 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-20 16:45:56 +00:00
crschmidt
7d15b18d86 Bump time out up to 12s
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5818 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-20 16:07:51 +00:00
crschmidt
6b4c0acc54 add missing mice.xml file
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5817 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-20 15:32:10 +00:00
Paul Spencer
fff63a1f9f (Closes #1187.) applying Bart's patch to add a zoom out option to the zoom control. r=pspencer.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5796 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-17 16:35:49 +00:00
euzuro
52220873e3 See #964 - not only should we cancel ajax requests when we destroy the tile, but also when we initiate a new response. which is to say that when we instruct the tile to run a new request, we can discard the old one(s). that is what this patch does (as well as cleaning up memory in the destroy). Note that I have added this.request.destroy(); call, but commented out. this is a nod to future development/improvement of the OpenLayers.Ajax.Base and OpenLayers.Ajax.Request class to give it its own destroy() method. Just for fun I'll go ahead and open a separate ticket for that: #1277. Thanks elemoine for the reviews and the good dialogue to finishing up this patch.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5777 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-16 17:35:51 +00:00
crschmidt
28659c9ebc Add setUrl function for GML layer. Thanks to a well done patch (with tests!)
from Ian Johnson. (Closes #1264)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5776 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-16 17:07:20 +00:00
ahocevar
ab47cc6040 VML renderer fails to render features without strokeOpacity set. r=crschmidt (closes #1276)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5774 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-16 15:03:05 +00:00
pgiraud
e3e860b415 don't re-append the geometry node to root if it is already there to keep it in place and to prevent z-index to change, r=elemoine (closes #1066)
Thanks Eric for giving me the opportunity to have my first commit in OpenLayers trunk

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5772 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-16 08:40:22 +00:00
Éric Lemoine
0f2d373a90 If scales is set on the map, you cannot use minScale and maxScale on the layer. r=crschmidt. (closes #1199)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5755 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-15 20:49:24 +00:00
Éric Lemoine
c768a12a4d fix typo in ND comment (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5754 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-15 20:25:00 +00:00
Éric Lemoine
f053a4e0c8 Add hover handler. With this handler user-defined actions can be triggered as the mouse moves over the map and pauses. An example of use is send WMS/GetFeatureInfo requests. r=crschmidt,tschaub (closes #1255)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5746 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-15 12:54:47 +00:00
crschmidt
c1185e8f8b TileCache.js uses math.floor instead of math.round like TC does.
Thanks Brent. (Closes #1261)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5745 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-15 12:19:22 +00:00
ahocevar
df3d4b2d98 Fixed geo namespace declaration. The previously defined namespace was the one used in Atom feeds with georss:point, but we have a rss 2.0 feed here with geo:lat/geo:long.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5734 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-14 15:17:19 +00:00
ahocevar
651b60f8f7 New layer type PointTrack: connects point features to lines. r=crschmidt,elemoine. (closes #1167)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5733 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-14 14:42:29 +00:00
crschmidt
cb13a6d053 "GeoRSS Format Parsing fails with items with no geo-feature". Patch from
Edgemaster to fix this failure mode. r=me  (Closes #1258)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5715 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-11 01:16:18 +00:00
euzuro
454026baf8 remove test number from wfs tile test. no functional change here.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5709 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-10 17:03:39 +00:00
Tim Schaub
11c1ef3f68 The pixelTolerance check on the click handler only works if mousedown events get to the handler. This keeps the handler from failing in cases where mousedown is stopped and pixelTolerance is set. r=crschmidt (closes #1246)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5698 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-09 09:55:22 +00:00
Tim Schaub
5b31ee3c0a Giving the drag handler a stopDown property. Set this to true in the constructor options to let mousedown events propagate. r=crschmidt (closes #1247)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5697 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-09 09:50:21 +00:00
crschmidt
f176d12dc1 Fix redrawing of tiles in Safari, Opera, which don't fire onlod events unless
the img.src changes.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5696 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-09 08:36:41 +00:00
Tim Schaub
d864adeee0 Adding OpenLayers.Number.format for string formatted numbers. Thanks for initiating this Andreas. Nice pairing with you. r=me (closes #1253)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5686 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-08 18:22:39 +00:00
Tim Schaub
dc77bd5d5f Removing methods copied from the drag handler.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5685 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-08 17:34:34 +00:00
Éric Lemoine
21f2605b55 click handler's cachedEvent property isn't needed. r=tschaub. (closes #1252)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5676 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-07 23:49:59 +00:00
Tim Schaub
9193ef67d5 Gutting the OverviewMap control to give it an update. Now uses a click handler and a drag handler instead of its own event handling code. In addition, the control now has a minRecSize property. When the extent rectangle is smaller than the specified size, its style is switched. By default, we provide a rectangle replacement graphic. This can be customized with CSS. Finally, I'm tucking in one non-API property. The dragging arg sent to map.setCenter is now stored at map.dragging. This gives easy reference to dragging state where a reference to the navigation control and its drag handler is not convenient. r=pspencer (closes #1244)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5674 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-07 20:54:28 +00:00
Tim Schaub
580a44a1b3 Getting explicit about precision. We now support thirteen significant digits in coordinates when testing for geometry intersections. r=pspencer (closes #1245)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5673 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-07 19:54:44 +00:00
Tim Schaub
ef3ad090c1 If you'd like to try OpenLayers but only have Netscape 2.0, please buy a new browser.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5659 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-06 22:15:43 +00:00
Tim Schaub
d7cd93abf3 If your browser doesn't support the script tag, you have no business running these tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5658 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-06 22:10:28 +00:00
Tim Schaub
02ad66f580 keep local value (closes #1248)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5652 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-05 00:39:33 +00:00
Éric Lemoine
d516b63fe3 fix typo in Ajax.js. Thanks david reksten for reporting this. (closes #1242)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5644 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-03 09:58:39 +00:00
crschmidt
caefde18fe implement support for alternative js minimization in build system,
and if jsmin/minimize is not available, just spit out the uncompressed 
version.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5635 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-03 06:40:27 +00:00
crschmidt
c63ac2d80f Make buildUncompressed executable
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5633 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-03 05:52:37 +00:00
Tim Schaub
6048cdc108 Constructor doc comment for control panel.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5631 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-03 00:30:33 +00:00
Tim Schaub
d80bb6bd74 Oh please Google, give us some well named methods that solve this issue. We muddle around with obfuscated code trying in vein to solve your pesky setCenter flicker. This brings us a bit closer with even sized viewports but is still embarassingly wrong for users panning across the dateline with odd sized viewport. r=crschmidt (closes #1174)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5627 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-02 19:36:12 +00:00
crschmidt
4effccbb97 Uncommit unrelated part of r5433.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5626 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-02 19:27:14 +00:00
Tim Schaub
af76852841 Giving vector features an onScreen method. By default, this uses geometry.intersects. If a rougher approximation will do, call with boundsOnly set to true. r=crschmidt (closes #1238)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5625 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-02 19:16:58 +00:00
Tim Schaub
6791cf6086 Point, path, and poly handlers now clean up before calling callbacks. r=crschmidt (closes #1239)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5624 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-02 19:06:07 +00:00
Tim Schaub
d643492888 Proper handling of virtual vertices so we don't leave them on the layer. r=crschmidt (closes #1230)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5623 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-02 18:54:33 +00:00
crschmidt
67e260775e Make MapServer multi-url selection deterministic. (Closes #803)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5622 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-02 15:23:45 +00:00
crschmidt
09e0d3ec81 Update copyrights to 2008.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5614 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-01 08:14:55 +00:00
Tim Schaub
7cb4ba4354 adding click handler as dependency to navigation control
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5613 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-31 23:41:36 +00:00
Tim Schaub
b24f50efe3 Spaces only.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5597 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-31 00:43:51 +00:00
crschmidt
16d9d36da2 Slightly more informative docs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5576 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-28 13:11:36 +00:00
Tim Schaub
e636e82455 reordering tests for a bit easier reading
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5575 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-26 23:49:20 +00:00
Tim Schaub
9425869c2b Match XHR behavor at 2.5. The browser default content type is application/xml, so we set that as our default contentType option. Looks like there is no browser default for encoding, so we remove that. r=crschmidt (closes #1232)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5570 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-24 18:44:06 +00:00
Tim Schaub
f4df2a3b2a Changing prototype.js ajax stuff so exceptions aren't swallowed by default. If you want this behavior, set request.options.onException to something that swallows, or use OpenLayers.Ajax.Responders.register for onException. r=crschmidt (closes #1232)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5567 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-21 23:42:05 +00:00
Tim Schaub
86116ddd73 Making feature handler call over and out callbacks just once per mouseover and mouseout (of a feature). r=elemoine (closes #1226)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5555 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-21 08:48:08 +00:00
Tim Schaub
33e313b059 Separating jsdoc style docs into their own block. The new NaturalDocs doesn't parse these mixed blocks, giving us no class descriptions with the two together. (closes #1229)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5553 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-21 08:28:09 +00:00
Frédéric Junod
2447848e7f Coding style: dont use local variable when it's not necessary, remove new lines.
No functional changes, tests pass on FF2, IE6, IE7 and safari 3.0.4 windows.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5552 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-21 07:28:05 +00:00
Paul Spencer
c056118b59 Small patch to removeItem so that all instances of a value in the array are removed, even if they are consecutive by reversing the order in which the array is enumerated. Updated tests and checked in Safari 3, FF2. (closes #1228).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5543 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 20:22:36 +00:00
Éric Lemoine
2931cd3065 Add style property "display" to vector feature style. If display is "none" the feature won't be rendered and there's a DOM node for that feature it'll be removed. Commiting this on behalf of ahocevar. Thanks Andreas for the patch. r=crschmidt. (closes #1173).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5541 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 19:20:23 +00:00
Tim Schaub
2d1099d60d Abort XMLHttpRequest on tile.destroy for WFS. The loadURL function now returns a request object. Thanks pgiraud for the fix. r=crschmidt (closes #964)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5539 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 17:28:51 +00:00
crschmidt
59dd8b2d99 Fix to "style with no rule returns empty array" via the 'unruly.patch' from
tschaub. -10 points for bad pun, +10 points for catching this in his review
of the SLD code. r=me (Closes #1223)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5536 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 13:01:19 +00:00
Tim Schaub
3268e53ed1 Serious rewrite in the Ajax namespace by pgiraud to keep up with prototype.js 1.6. Thanks for the effort and for suffering numerous revisions. Now, let's cross our fingers... r=crschmidt,me (closes #1170)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5535 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 09:26:53 +00:00
Tim Schaub
44543b3e36 adding manual test for the feature handler
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5533 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 08:49:15 +00:00
Tim Schaub
36e04a689f Adding OpenLayers.Array.filter to mimic Array.prototype.filter. Adding panel.getControlsBy and related methods that use filter. Reworking map.getBy to use filter as well. r=elemoine (closes #1203)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5532 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 08:12:19 +00:00
Frédéric Junod
c44b028a30 Fix ND comment typo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5531 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 07:37:26 +00:00
Frédéric Junod
52fb422c49 fix sdl broken url
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5530 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 06:57:48 +00:00
Tim Schaub
72dd4047af doc change only - feature vector not vector feature
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5529 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 06:47:28 +00:00
crschmidt
3751402ff8 importNode in XML.Format serializer to prevent reports of adding the node to
the wrong DOM element. This fixes tests in Webkit-based browsers
and FF3, which enforces this constraint. r=tschaub (Closes #1219) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5528 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 04:15:26 +00:00
crschmidt
2e507b68b7 Fix for "When Navigation control is inactive, doubleclick zooms in", using
the new click handler that Tim and I created over the weekend. (Hooray for
handlers!) r=tschaub (Closes #1068)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5527 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 04:11:52 +00:00
Tim Schaub
78bf7f5912 correcting url for apidocs in doc readme.txt
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5526 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 03:58:36 +00:00
Tim Schaub
981f00dd6d Removing the explicit maxResolution from the TileCache layer. We now depend on resolutions being properly set on the map or directly on the layer. r=crschmidt (closes #1212).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5525 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 03:50:08 +00:00
crschmidt
3b7e63a488 Silence these errors like we did for Opera. With this and #1219 applied,
Safari passes all tests. (Time to write more tests.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5524 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 03:23:39 +00:00
Tim Schaub
5babc73615 stop clicks on the point handler - this means no more clicks sneaking through while editing - if you wanted that behavior, speak up - r=crschmidt (closes #1020)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5523 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 03:02:54 +00:00
crschmidt
8eb682c02f More typos. am blind.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5522 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 02:49:51 +00:00
crschmidt
1d4b8f8c2a Typos.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5521 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 00:37:37 +00:00
Tim Schaub
7011c0f470 Big thanks to Andreas Hocevar for this SLD format class - this continues to extend his Rule and Style work by giving us the ability to read SLD docs - onward with style r=tschaub (closes #533).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5520 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-20 00:24:20 +00:00
crschmidt
acc8cfc0f2 add displayProjection API Property on the Map, and on relevant controls.
Spherical mercator example now makes use of this, displaying coordinates 
in lon/lat instead of meters, and permalink/argparser now work in lon/lat
as well. this functionality will make using SphericalMercator easier for
a number of applications. 
r=tschaub (Closes #1036)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5519 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 23:36:34 +00:00
Tim Schaub
811e35cff3 tidying up the doc menus - somebody has to be the doc nanny around here
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5517 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 22:15:32 +00:00
crschmidt
6d6c08fbef Formats now support reprojection using internalProjection and
externalProjection properties. These allow for the reprojection of data --
OpenLayers users with SphericalMercator get this built in for EPSG:900913, and
other users can use the external proj4js library available from MapBuilder SVN
to add support for any number of projections. This means that featres can be,
for example, transformed from a KML doc in 4326 to Spherical Mercator before
being added to a layer, making using SphericalMercator slightly more enticing. 
r=elemoine
(Closes #1039)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5516 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 22:07:12 +00:00
crschmidt
7440556585 Add reprojection support on Geometry classes. Geometries can now be transformed
in place by using .transform(source, dest). r=elemoine (Closes #1037) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5515 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 22:04:30 +00:00
Tim Schaub
50ec61dfc9 nd comments only - wrapping html in code block to make nd happy
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5514 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 21:55:28 +00:00
Frédéric Junod
e3406bf095 OpenLayers.Layer.Markers - propagate layer's opacity to the markers. Thanks
ahughes for the bug report and crschmidt for review and advices. (Closes #1114)



git-svn-id: http://svn.openlayers.org/trunk/openlayers@5509 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 15:00:49 +00:00
Éric Lemoine
6fb48c0cd7 Enables unselecting selected features by clicking outside any feature. This is the default mode of the modify feature control. If you want to use the old mode where a click on a selected feature unselects that feature, set the toggle option to true. If you really want the old mode and not have selected features be unselected when clicking outside any feature, set the clickout option to false. The patch also adds the properties toggleKey and multipleKey to the modify feature control. With these one can temporarily enable the toggle and multiple mode, respectively. See the select-feature.html example to see all this in action. Thanks to pvalsecc and tschaub for the great colloration on this. (closes #1137)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5506 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 11:09:44 +00:00
Frédéric Junod
65ad59a277 Don't override tileSize, maxExtent and theme when calling
Map.setOptions(). Thanks pspencer for the review. (Closes #1206)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5505 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 07:30:52 +00:00
crschmidt
5c6934b0b0 Allow the use of custom GMapTypes via the Layer.Google. When passed a type in
the Layer.Google constructor, we check if the type we are given is not in the
map's list of types, and if so, add it. (Closes #1082) 
r=tschaub 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5504 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-19 01:33:20 +00:00
crschmidt
cc29ab1085 bring back removal of XML prolog.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5501 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 17:45:09 +00:00
crschmidt
5d4109a3ab Because IE serializes the processing instruction, we can't just grab the
firstChild, we have to actually do a getElementsByTagNameNS to be 
cross-browser friendly.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5500 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 17:06:09 +00:00
crschmidt
8572258fd1 no need to process the expected data twice.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5499 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 16:54:15 +00:00
crschmidt
d9230297ec Change test to use importNode if available, and add a test for serializing a
node as well as a geometry. (The latter test will fail in FF3 until
#1219 is fixed.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5498 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 16:52:06 +00:00
Frédéric Junod
546d49fc34 Fix (again) the setSize() test.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5494 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 15:26:53 +00:00
Frédéric Junod
ac4f4dba7c Fix the setSize() test. Regression introduced in r5488
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5492 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 15:14:23 +00:00
Paul Spencer
32081348bf Fix tests for Safari 3. Composite styles like border have to be read through their component properties. Invalid styles, like filter, return null regardless of what is assigned to them.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5491 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 14:26:08 +00:00
Frédéric Junod
f51315c26d Fix ND comment. No functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5490 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 13:49:19 +00:00
Paul Spencer
9200676f89 Fix tests for Safari 3. For some reason, you can set the style.overflow property but you have to read it as overflowX or overflowY.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5489 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 13:47:23 +00:00
Frédéric Junod
c1b008dcb3 Remove the 'blinking' phenomenon on IE by setting the display elements to
'absolute'. Thanks to pgiraud for the patch (Closes #965)



git-svn-id: http://svn.openlayers.org/trunk/openlayers@5488 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 13:08:35 +00:00
crschmidt
d4ff6a4c8b XML Serialization doesn't wrap nodes in documents. This breaks or changes
serialization in some browsers. This fixes the XML Format based
tests in Safari. (Closes #1218)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5487 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 12:17:34 +00:00
crschmidt
93d73acd49 for the autommated tester, make the delay_call timeouts ~3 times
as long -- presumably, the tests are less 'interactive', so the longer
wait doesn't hurt anyone, and this should help prevent failures due to
timeouts.l 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5486 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 12:16:23 +00:00
Frédéric Junod
bcc623f444 Fix ND comments and indentation. No functional changes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5485 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 10:49:29 +00:00
Frédéric Junod
a61e5fb91c fix Class ND comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5484 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 10:37:04 +00:00
crschmidt
7b04c305cd Run the four eventPane test in more browsers. If this breaks IE, you have
permission to beat me senseless for not being able to test it there first.
Note that I'm pretty sure this still doens't work with FF3.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5479 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 05:15:47 +00:00
crschmidt
a50bfb4d4e Remove XML prolog from tests. Browsers can't seem to decide whether they like
it or not, and #1218 will cause the behavior to change across the board, 
most likely, so we'll just be slightly more accepting, since the XML prolog
is almost definitely unlikely to not matter.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5478 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 03:44:21 +00:00
crschmidt
b2d12df117 revert previous commit. This is actually caused by a bug in Format.XML.
(See #1218)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5477 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 03:33:01 +00:00
crschmidt
611cb91171 Vector test fix
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5476 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 02:44:17 +00:00
crschmidt
1b40772aaf Safari's XMLSerializer support is broken: it doesn't export namespaces, so
the KML comes out namespaceless. Wrap the test up so that it doesn't totally
fail, and Paul is adding this to KnownIssues. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5475 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-18 02:23:41 +00:00
crschmidt
9e6d2a649a FF and Opera have different ideas about how this test should work.
FF2 won't work unless the map is loaded 'onload' -- but in Opera, adding
something to onload causes opera to believe that the page never finishes
loading within the test framework. FF3 works fine with this test if we 
don't run it in a new window, but FF2 does not. For the time being, make 
it work in our most well-supported platform -- FF2 -- and add a
FIXME to make it work in Opera. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5474 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 17:09:42 +00:00
Paul Spencer
5b2f4a2335 loosen the test for XML write by removing the <?xml ... ?> header before comparing the results (fixes test for Safari 3 and FF3)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5473 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 17:05:38 +00:00
Paul Spencer
5a11ac8ac6 patches Test.AnotherWay._constructor_name to return an appropriate value using 'typeof' instead of an empty string when the constructor of a value could not be correctly determined using the current logic. This fixes many of the tests in Safari 3 and does not appear to affect FF2 or IE6 since the current logic is working for them.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5472 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 16:44:00 +00:00
Frédéric Junod
50ad4d4090 coding standards: line too long, fix ND comment typo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5471 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 14:45:34 +00:00
Éric Lemoine
dc2cc625f3 Do not call preFeatureInsert() and onFeatureInsert() callbacks when the modify feature control and the regular polygon handler internally adds point geometries to the layer. This is accomplished by adding an 'options' argument to the addFeatures() method in Layer.Vector. If that options argument has the silent property set to true, then the preFeatureInsert() and onFeatureInsert() callbacks aren't called. Thanks tschaub and fredj for your input. Thanks crschmidt for the final review. (closes #1148)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5470 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 14:36:39 +00:00
crschmidt
ccf16fa024 Work around the Opera test failures for now, and log to debug that they fail
so that someone who is motivated knows to fix them.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5469 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 13:39:04 +00:00
crschmidt
8479ecb4a0 Don't test reprojection in Opera, since we get different results, and
we still want this to b reported as a success, but log them to debug so that
people are aware the test is being skipped.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5468 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 13:35:07 +00:00
Éric Lemoine
175c401e0f ModifyFeature: enable dragging without enabling vertex modifications. Special thanks to tschaub for the collaboration on all the changes to the modify feature control. And thanks to crschmidt for the review. (closes #1188)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5467 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 10:12:56 +00:00
Éric Lemoine
8733534ad8 Fix test_Style.html on IE. Thanks Andreas for fixing this in no time.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5466 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 09:56:50 +00:00
Éric Lemoine
a1522246a6 Subclasses of markers layer should destroy, then clear their list of markers.
Thanks crschmidt for the review. (closes #1123)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5465 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 09:03:01 +00:00
crschmidt
772b6452ce fix wrapdateline test
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5464 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 06:33:29 +00:00
crschmidt
dc05a91d4a don't open a new window: we don't need to in order to run this test.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5463 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 06:29:46 +00:00
crschmidt
29f2280fb8 missed one -- this function has two maps initialized.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5462 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 06:23:09 +00:00
crschmidt
8a6f50496f fix more tests in Opera by adding map.destroy() calls.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5461 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 06:20:10 +00:00
crschmidt
0fd898859f fix more tests in opera
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5460 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 06:14:00 +00:00
crschmidt
03f6ddd5d0 Fix tests in opera by cleaning up after ourselves and destroying our maps. TMS
tests now pass.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5459 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 06:11:59 +00:00
Tim Schaub
5667311cba add geometry.intersects method for all geometry types (closes #1072)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5458 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 06:05:35 +00:00
crschmidt
189b12d020 Come closer to passing tests in opera by destroying all map objects we create.
If we do not do this, then every time we instantiate a new map using the same
div, the clientHeight as reported by the browser grows, and eventually we're
doing tests with a totally different sized window than we intended to.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5457 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 06:03:59 +00:00
crschmidt
80fb92686b Opera serializes attributes before namespace declarations.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5456 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 05:28:06 +00:00
crschmidt
bebcb130f7 Opera doesn't encode greater than symbols, only less than, when using
XMLSerializer. Format.GeoRSS tests now pass.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5455 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 04:57:13 +00:00
crschmidt
5f6cabf2ec opera drops the ';' on the assigned property when retrieving it.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5454 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 04:47:30 +00:00
crschmidt
abfe313ab4 Opera returns a 'null' instead of an empty string if the attribute doesn't
exist. Fallback to an empty string if getAttributeNS returns null. With
this change, the Format.XML test passes in Opera. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5453 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 04:38:12 +00:00
crschmidt
428710e3af Add support for reprojection of lonlats/bounds. (Closes #1213)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5452 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 03:12:57 +00:00
Tim Schaub
5884c02683 shorter url for run-tests.html
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5451 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 02:18:04 +00:00
crschmidt
2f1c17446b apply r5447 to auto-tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5449 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 01:30:16 +00:00
crschmidt
430906ff22 FF3.0b1 has a bug with testing innerWidth/innerHeight of frames. This will be fixed in later versions, but none are released yet.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5447 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 01:19:57 +00:00
crschmidt
bacdad9e30 Add auto-tester page for OpenLayers. Three differences from the main run-tests.html:
1. Meta-refresh, set to 20 minutes.
 2. 20 second page download timeout, instead of the standard 6.
 3. After all tests have finished, posts results back to 
    http://openlayers.org/test/results.cgi , which shows the results. Failures kick
    off an email (currently only to me).

To set up auto-testing for your platform, set up a machine with a browser running full
time, and open the URL:
 http://openlayers.org/dev/tests/auto-tests.html?run=all

tests will be run automatically on load, and every time the page refreshes, they will
run again, recording their results each time.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5444 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-17 00:55:07 +00:00
crschmidt
db90eca5bb An antidote to r5440: Allow for '@requires: ' to trigger single file build
dependencies, since this is our most common tpo in this regard.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5442 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-16 23:15:28 +00:00
Tim Schaub
41bfd3b4d4 single file build broke with r5401 as well - layer now requires OpenLayers.Projection (see #1035)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5441 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-16 22:45:29 +00:00
Tim Schaub
7fddbbdaef very trivial typo - but single file build is broken without this fix (closes #1215)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5440 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-16 22:33:12 +00:00
crschmidt
b5b1cd3c9d Fix a couple minor mis-spelings in
OpenLayers.Geometry.Polygon.createRegularPolygon (Closes #1214)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5439 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-16 20:00:20 +00:00
Tim Schaub
6ad22b8e6a adding a click handler for flexible cross-browser single and double click handling - add to a control and set click or dblclick callbacks - thanks for the review and pairing crschmidt (closes #1211)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5438 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-16 04:42:14 +00:00
Tim Schaub
aa3536ed3a Fixed test for GeoJSON collections (closes #1067).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5437 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-16 03:09:08 +00:00
Tim Schaub
35054c4a41 non-functional change - just removing an extra comma from r5435 to appease IE (see #1067)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5436 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-16 01:08:46 +00:00
crschmidt
44a6b9b176 GeoJSON should parse and serialize GeometryCollections as a Geometry.Collection
object. (Closes #1067)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5435 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 21:45:51 +00:00
crschmidt
7881c2099a When trying to deactivate a control from within that control's featureAdded
event, a null exception is encountered. A null check fixes this bug. (Closes
#1143)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5433 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 21:29:06 +00:00
crschmidt
f746ed4211 Fix getZoomForResolution() on FixedZoomLevels, which is passed an extra
(unused) argument. (Closes #1046)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5431 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 16:32:33 +00:00
crschmidt
45c420782c Don't flip SVG Y values anymore, since we're working in pixel space these days,
and the Y transforms just make working with the SVG directly -- for example,
with people modifying it to support text -- more difficult than it should be.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5430 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 16:24:31 +00:00
crschmidt
fb3c02354f Add support for the extremely awesomely super-comprehensive rule based styling
that Andreas has been working so hard on. I think this is the single most
awesome commit I've ever had the pleasure of committing. The results of this
commit are described on http://trac.openlayers.org/wiki/Styles: essentially,
this makes it possible to style features in all kinds of fun ways based on
rules, and will also form the underlying basis for #533. Things this patch
adds:

 * OL.Rule classes. These classes allow you to do tests against the propertie
   of a feature, and set a style based on these properties -- so you can
   compare the 'speedlimit' property of a line, and test if it is > 60, and if
   it is greater than 60, render it in a different color. You can also test
   combinations of rules using the OL.Rule.Logical class, and test featureids
   with the FeatureID class. 
 * OL.Style class: The OL.Style class lets you wrap up Rules into styles that 
   can be used with drawFeature to draw the feature in the selected style.
 * OL.Layer.Vector.drawFeature will check if the given style is an OL.Style
   object, and if so, it will draw the feature accordingly.

examples/georss-flickr.html shows usage of these classes.

Many, many thanks go to Andreas for all his hard work on this: this code really
is very pretty, and includes unit tests for all the classes (and we know that I
am a big fan of tests.)

Three cheers for Andreas: Hip hip, hooray! hip hip, hooray! hip hip, hooray!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5429 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 16:17:50 +00:00
crschmidt
43a4f9320b Tile.Image should register for error events with respect to tile loading
events -- this means that if an image fails to load, it will still trigger
a loadend event, and the layer will eventually be in a state where it is no
longer waiting to load. Thanks to Andreas for the investigation! (Closes #842) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5428 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 14:16:18 +00:00
crschmidt
4322cf921d Forgot to svn add before committing.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5416 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 05:52:15 +00:00
crschmidt
c720e44c7c Patch from Gregers Rygg to fix setOpacity for AnchoredBubble popups.
(Closes #1204)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5415 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 03:51:21 +00:00
crschmidt
c9fdb6122f Create Format.Text, and have Layer.Text use it. (Closes #1033)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5412 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 22:02:00 +00:00
Tim Schaub
7c04a7f88a tweaking the dynamic script tag adding bit (closes #1092).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5411 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 20:48:19 +00:00
crschmidt
a170e3fdf6 Add support for transformation functions without using proj4js, and make
the SphericalMercator mixin register two transformations to/from EPSG:900913,
EPSG:4326. Thanks to Tim for the feedback and review. (Closes #1210)

This allows us to transform points to/from SphericalMercator 
without proj4js support -- and if other projects need similar functionality, 
they can write their own custom transformation functions rather than 
modifying proj4js to support some custom projection.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5410 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 20:45:42 +00:00
Frédéric Junod
9dd5d0e6da Declare 'proj' and 'projCode' properties, simplify verbose code
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5408 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 13:52:43 +00:00
crschmidt
c1eb0fe24b Fix for "Permalink captions and harcoded to be smaller". (Closes #747)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5406 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 12:11:33 +00:00
Frédéric Junod
22bbf98398 Include tests/test_Projection.html and lib/OpenLayers/Projection.js (taken from
projections.2.patch). (Closes #1035)



git-svn-id: http://svn.openlayers.org/trunk/openlayers@5405 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 08:36:36 +00:00
Frédéric Junod
47edbf4524 Fix bad spelled word
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5404 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 07:30:32 +00:00
crschmidt
2a00af3dd7 Move scale control styling into CSS file where it belongs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5403 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 04:47:43 +00:00
crschmidt
f223101539 Apply a fix to KML format to support > 4k characters in a linestring.
(Closes #1088)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5402 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-14 00:01:13 +00:00
crschmidt
abe2a52c31 With a confirmation that Tim is happy considering this a review, I'm going to
go ahead and commit this (relatively lighttweight) patch to the code so that
the projection library base API is there, even though for the most part, it's
not usable yet. This changes map.projection from being a string to being a 
class, with a projCode on it. (Closes #1035)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5401 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-13 23:29:18 +00:00
crschmidt
c3c2895e8c Use Format.GeoRSS to do the work in Layer.GeoRSS. (Closes #1025)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5400 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-13 23:23:02 +00:00
crschmidt
5824170f10 Box Handler should use CSS to style its box. (Closes #1070)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5399 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-13 19:51:49 +00:00
Tim Schaub
3e652566e8 triggerEvent can now be called with additional arguments for the listeners - this means instead of getting news like 'hey, someone won the lottery' listeners now get news like 'hey, you won the lottery' - in addition, the triggerer gets back the return from the listener, so if a listener wants to say 'dont tell anyone else' the triggerer gets that message - thanks for the reviews (closes #1189)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5398 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-13 17:30:52 +00:00
Tim Schaub
0b39ae35ce remove unused code that referred to element.geometry - thanks for catching this pgiraud - I missed it in r3043 (closes #1140).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5397 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-13 17:08:38 +00:00
Éric Lemoine
2f7fad80df Handler.Point doesn't render points if no default resolution props in map object. Thanks fredj for the review. (closes #1205)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5396 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-13 14:53:36 +00:00
Frédéric Junod
0cd5ba5b9f fix ND comment typo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5393 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-13 13:09:01 +00:00
Frédéric Junod
7063cdab3a Speed up geometry rendering with VML by replacing string concatenation by array
concatenation and joining. Thanks tschaub for the patch optimization and
review. (Closes #1095)



git-svn-id: http://svn.openlayers.org/trunk/openlayers@5392 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-13 10:24:51 +00:00
Tim Schaub
8f1bca93b1 IE6 is happy, IE7 is happy, I'm grumpy - seems like it takes IE a while to properly update the elements here - adding in an alert lets tests pass in IE6 - clearing the renderer does the same thing
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5391 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-12 23:35:14 +00:00
Tim Schaub
fc442271b7 try namespaced element first for ie7 - what a godawful mess
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5390 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-12 23:16:08 +00:00
Tim Schaub
5a70226676 throw a real geometry in there for good measure
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5389 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-12 22:53:06 +00:00
Tim Schaub
4ae06d5be9 this fake renderer needs an eraseFeatures method - thanks pgiraud for catching this
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5388 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-12 22:50:26 +00:00
Tim Schaub
ac1f51a19a renaming getLayersByType and getControlsByType to getLayersByClass and getControlsByClass - since controls have a type property, we want to leave room for a real getControlsByType - thanks for the review elem (closes #1153).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5387 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-12 20:17:30 +00:00
Éric Lemoine
00d6f66c06 removeLayer must reset layers z-index. Thanks tschaub for the review and the new patch. (closes #1090)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5386 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-12 20:08:49 +00:00
Tim Schaub
8f38213e86 scope matters
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5384 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-12 17:45:39 +00:00
crschmidt
4722009ade A coworker points out that all old OpenLayers builds are pointing to an invalid
location for the license. Fix it by adding a reference to the current license
location.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5380 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-12 02:23:03 +00:00
Frédéric Junod
fa81ea81a6 Remove the drawCurve method from the renderers because it is never used. Reported by pgiraud (Closes #1138)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5373 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-11 08:32:18 +00:00
Frédéric Junod
a9b2a64bdc Util.modifyDOMElement don't update the opactity if the passed value is
evaluated as false, passing 0.0 won't work as expected. Fix it. Spotted by
sebastien and reviewed by crschmidt. (Closes #1168)



git-svn-id: http://svn.openlayers.org/trunk/openlayers@5372 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-11 08:23:52 +00:00
crschmidt
354817649d MousePosition control throws error when no layers are on map. Fix it so that
they don't. Thanks for the review, fredj. Includes tests. (Closes #1029)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5371 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-11 07:27:45 +00:00
Tim Schaub
b105017586 removing console call from example
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5370 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-10 23:06:27 +00:00
crschmidt
6a1b77b382 Turn the pixels into geographic coordinates.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5369 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-10 23:01:24 +00:00
crschmidt
d72fb3c130 move walkthrough from Schuyler over into doc, since it is not an example,
and update links in the process.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5363 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-08 14:32:20 +00:00
crschmidt
7da6a3540e Merge the excellent documentation work done during foss4g into trunk. Many
thanks to all the contributors who helped put this together. 
I'm not exactly sure of what's going to happen with this, but for now,
at http://openlayers.org/dev/doc/examples.html you can see links to all the
examples *with descriptions*. Hooray!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5362 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-08 14:21:53 +00:00
Tim Schaub
ebf611c932 adding getBy and related methods to map - this allows flexible retrieval of things like controls and layers - thanks elem for the review (closes #1153).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5361 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-08 00:18:56 +00:00
crschmidt
e5998110b3 Fix broken link. (thx hue)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5360 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-07 22:49:52 +00:00
Frédéric Junod
382b750edd fix ND comment typo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5358 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-07 15:48:18 +00:00
crschmidt
de427d30f5 Fix missing units param in call to getResolutionFromScale . This should have
been fixed a while ago, but we were waiting on a test: Now that it's been
reported by four different users, I'm just going to go ahead and fix it,
grudgingly, rather than wait longer on a test. (Closes #958, #1117) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5357 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-07 14:50:15 +00:00
crschmidt
46b75b2154 Mark the forward and reverse mercator functions as public. This is hte
canonical way of transforming data, and we should make sure users feel 
comfortable using it.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5350 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-06 15:00:48 +00:00
Tim Schaub
6758f490bc set map.baseLayer to null when removing base layer - thanks for review elemoine (closes #1191).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5349 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-05 17:20:56 +00:00
Frédéric Junod
6b1b2f0f37 There is 2 tests for the getLength function, remove one of them
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5348 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-05 13:25:05 +00:00
Tim Schaub
e58ba687cd remove geometry components backwards - thanks for the catch flixo and review crschmidt (closes #1190).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5347 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-05 08:53:27 +00:00
Frédéric Junod
fce3f19724 fix ND comment, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5346 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-05 07:54:59 +00:00
Éric Lemoine
b71f8bc6c9 applies latest patch to the renderers tests, special thanks to pgiraud for his great work! (hopefully closes #1128 this time)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5340 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-04 13:36:02 +00:00
Frédéric Junod
75795805b4 ND comment fix (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5333 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-03 10:01:18 +00:00
Frédéric Junod
7e43f8688a ND comment fix (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5332 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-03 09:29:00 +00:00
Éric Lemoine
8231be5a4b Another fix for an ND comment typo, thanks pgiraud! (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5331 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-03 08:49:57 +00:00
Éric Lemoine
db47606f6c ND comment fix (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5330 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-03 08:44:30 +00:00
Éric Lemoine
a277332238 fix test_Elements.html tests and make them compatible with r5323 (#1172) (closes #1184)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-03 08:13:04 +00:00
Frédéric Junod
fec5d40fc7 Add the missing this.layername in TileCache constructor (in clone function), add a unit test for this function (Closes #1180)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5328 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-03 06:59:05 +00:00
crschmidt
92f5a7d749 Reversing the order we set opacity changes the behavior when using VE, but
nothing else. This fixes the fact that you can't use client side opacity 
while including the Virtual Earth javascript. Thanks for the spot from
Jeff Yutzler. Includes a manual test. (Closes #1175)   


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5326 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-02 20:46:15 +00:00
Éric Lemoine
70ec5ed6de ND comment fix (non-functional change)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5325 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-02 12:36:34 +00:00
crschmidt
73fe6380c7 Fixes and performance improvements to VML renderer problems with
externalGraphic, diligently filed, investigated, and fixed by The great and
powerful Oz, er, Andreas, who is becoming my new vector rendering hero. 
(Closes #1172) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5323 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-01 22:57:58 +00:00
crschmidt
a291ff04fb Fix a mistake in my commit of the tests: forgot to 'svn add' the directory
I needed. Good catch, elemoine. (Closes #1128)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5320 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-01 19:16:05 +00:00
crschmidt
d91db97efa Renderer tests, from pgiraud. (Thx!) (Closes #1128)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5319 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-01 15:03:23 +00:00
Éric Lemoine
f6091b2ecf FixedZoomLevels.js doesn't properly set the resolutions array. Special thanks to Sebastien Roch for the bug report and to Tim Schaub for the code review and extra comments. (closes #1124)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5318 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-01 14:04:18 +00:00
crschmidt
76fa0da3b7 New OpenLayers.String.format function to Format a string given a string
template and some context -- to be used within the SLD framework. Developed
by Andreas and Sr. Schaub. Thanks, guys!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5317 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-01 13:20:59 +00:00
Tim Schaub
10cf5bfefc drag, rotate, resize, and reshape with the ModifyFeature control - thanks pvalsecc and elemoine for the inspiration, tests, and code - good partenering with you guys (closes #1150).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5301 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-30 17:09:23 +00:00
Tim Schaub
600435ad21 adding a manual acceptance test to tests folder
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5295 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-29 20:57:55 +00:00
Frédéric Junod
155796bcfd Fix ND comment typo. Spotted by blaamann
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5291 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-28 07:02:31 +00:00
Tim Schaub
527866aa51 adding doc comments to text layer - tidying up doc menus
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5289 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-27 18:20:18 +00:00
Frédéric Junod
f1fe7c7c63 Fix ND comment.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5287 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-27 11:40:53 +00:00
Frédéric Junod
7d0d11fba3 Correctly check if the alpha hack needs to be applied to the layer's div by testing
if the alpha option is set and by calling Util.alphaHack(). 
Thanks elemoine for the review (Closes #1130)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5284 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-27 10:17:54 +00:00
Frédéric Junod
38652a7686 Change Util.alphaHack to return 'False' not 'undefined' as defined by the API. (Closes #1169)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5283 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-27 10:05:18 +00:00
Tim Schaub
12c7cb07b2 extend now only sets defined properties on the destination - if your source has a property set to undefined, the destination property will not be set (closes #1160).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5281 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-26 23:45:43 +00:00
Tim Schaub
d7905ec735 applyDefaults now respects null - if you want to override a property with applyDefaults, set it to undefined first - applyDefaults also now correctly applies a custom toString method (closes #1063).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5280 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-26 23:34:50 +00:00
euzuro
0b571f128f fix gmaps key for domain
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5271 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-23 21:52:36 +00:00
crschmidt
263fade72a Mark drawFeature as stable (Closes #1059)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5244 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 20:31:13 +00:00
Paul Spencer
24d4fdc1bd apply patch from #1106, minor tweaks for performance. (Closes #1106)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5243 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 20:14:50 +00:00
euzuro
a13cacdde9 protect stopObserving() from trying to remove nonexistant events. thx for review, cr5 (Closes #1151)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5241 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 18:50:55 +00:00
crschmidt
164f96714f Commit this quite-excellent patch from Roald de Wit, which adds:
* the ability to 'flip' the GML format xy ordering on parsing, allowing the 
   GML parser to parse 'real' GML in 4326 when the option is on.
 * parsing of GML 'envelope' as a Polygon. this is primarily to support 
   the next...
 * GeoRSS GML read support, using the GML format when neccesary. 

Includes a comprehensive set of tests, and is really one of the better assembled 
major patches from a first-time contributor I've ever seen. Thanks for the hard
work, Roald! (Closes #1109) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5238 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 15:53:32 +00:00
crschmidt
a4d3f48752 'supported' is defined, API-wise, to return 'false' if not supported, but the
VML test returns 'undefined' instead. Fix that with this patch from fredj.
(Closes #1165)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5237 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 15:48:41 +00:00
crschmidt
de8c0119f1 Only add the VML namespace if we haven't already added it. (Closes #1141)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5236 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 15:18:12 +00:00
crschmidt
bd15c32ca4 Add attribution for OSM.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5234 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 13:36:22 +00:00
crschmidt
ffc9a57575 typo snuck into previous commit.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5232 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 08:38:49 +00:00
euzuro
3719a3e875 tabs. no func change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5231 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 08:24:30 +00:00
euzuro
82e43d743f add smooth drag panning to yahoo layer. the trinity is united. killer props to cr5 for digging through and finding these. ladies and gentlemen, you now have *no*excuse* for not using openlayers. smooth and sexy GYM commercial layers. (Closes #1163)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5230 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 08:22:39 +00:00
crschmidt
9acb997b20 Add an option for turning off smooth dragging, since it works on a pixel level,
and our geography doesn't, so the numbers end up off in the north-south
direction when *not* using spherical mercator. Now, if someone comes to use us
and says 'oh my! you ruined me!' we can say 'options! we love options!' and do
a rain dance. (Closes #1164) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5229 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 08:22:35 +00:00
euzuro
14ae911b47 update ND comment. tabbing
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5228 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 08:06:26 +00:00
euzuro
cd9ee75a73 give the ve layer smooth (but safe) dragging. just like google layer. (Closes #1161) (See #1053)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5227 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 07:54:45 +00:00
euzuro
b89126ae20 get resolution from map via the accessor instead of directly from the property. (Closes #1162)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5226 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 07:41:15 +00:00
crschmidt
f7d417af54 change the spherical-mercator -- our prime example -- to use 2.82 of Google,
just so we pick up smooth dragging, and fix the broken API key (for my domain,
cough) of draggingGoogle.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5225 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-21 03:25:49 +00:00
euzuro
0e53fa10bf patch for smoother dragging of google layer. For now this remains a wierd (and admirable) hack... restricted to the use of v2.82 of the google api... but hot damn. it does work. hopefully the good folks at google might help us out and open this up as part of the API. Dinosaur egg kudos to cr5 for finding this and taking the time to plug it in. Thanks to tschaub for the quick review. (Closes #816)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5224 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-20 22:21:54 +00:00
euzuro
3ae69b0789 improve map's getLayer() function, includes improved test. cheers to pensyakito for bringing this up and to cr5 for the review (Closes #861)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5221 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-20 06:21:07 +00:00
euzuro
8296db3072 fix ND definition for OpenLayers.Renderer.SVG. Thanks for spotting this one, fredj (Closes #1156)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5217 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-19 19:04:53 +00:00
Tim Schaub
aadb1b31a1 removing unused third arg from nodeFactory - thanks for the patch pgiraud (closes #1139).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5213 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-16 18:30:19 +00:00
Tim Schaub
eef420ded6 correcting title of example
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5211 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-16 17:34:52 +00:00
Tim Schaub
7a37430ef5 adding point and line drawing to the select feature demo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5210 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-16 17:33:54 +00:00
Tim Schaub
ceecacfe3a adding irregular option to regular polygon control - now, go draw rectangles, and more - thanks for the review elem (closes #1098).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-15 23:37:36 +00:00
Éric Lemoine
75163f6635 avoid code duplication in Renderer/SVG.js, thanks fredj for the patch (closes #1144)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5188 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-15 15:31:48 +00:00
euzuro
ad40db89af Fix for addPopup()'s 'exclusive' option -- reworking of the for loop to make sure all popups are removed without error. Great find on this by li ethan and excellent work turning it into a patch by fredj. Once again, open source prevails. Thanks everyone. All tests pass FF/IE6. (Closes #1149)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5187 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-15 14:54:18 +00:00
Éric Lemoine
adf2381731 Make OpenLayers.Util.applyDefaults() return the modified object. To be consistent with OpenLayers.Util.Extend() and be able to use anonymous object as the 'to' object. Thanks fredj for the patch and tests. Thanks euzuro and crschmidt for the reviews. (closes #992)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5162 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-09 20:13:31 +00:00
Tim Schaub
cbdf3522a7 correct writing of multi-part geometries for KML - thanks for the swift review crschmidt (closes #1132).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5161 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-09 18:50:06 +00:00
Tim Schaub
0ae59513db minor space and comment changes only (for KML format)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5160 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-09 18:19:14 +00:00
crschmidt
c986fe376e "Sometimes, it is handy to have "zoomWorld" icon in
OpenLayers.Control.PanZoomBar. This patch enables it." Patch from jachym.
(Closes #1131)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5159 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-09 17:57:27 +00:00
Tim Schaub
10eaa329ba stop the renderers from flashing black and filling white - ahhh, much prettier vector drawing now - thanks to pgiraud and crschmidt (closes #1042).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5158 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-09 17:14:10 +00:00
euzuro
15e6809bf2 remove some stray oldschool jsdoc comments for the CLASS_NAME property. this re-closes the 853 ticket (Closes #853)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5157 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-09 16:23:54 +00:00
Tim Schaub
d3125f250c putting google back in there - excuse me for breaking this acceptance test - how about a tests/accpetance directory?
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5145 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-07 19:13:21 +00:00
Tim Schaub
9e35dd7581 getting rid of google script here
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5142 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-07 17:26:42 +00:00
Tim Schaub
4a3011a0f3 even more explicit in the TileCache layer doc comments
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5128 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-06 19:40:23 +00:00
Tim Schaub
aab744a5c8 correcting a typo in a doc comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5127 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-06 17:05:09 +00:00
Tim Schaub
99d4d662e4 A bit more documentation on the TileCache layer class.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5126 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-06 17:00:22 +00:00
Schuyler Erle
4b83b83018 Simple walkthrough made for FAO GeoNetwork workshop. Intended to be a stopgap until the new automated example indexing is committed to trunk.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5118 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-06 11:26:29 +00:00
Schuyler Erle
2834d66879 Change examples from using OnEarth WMS because it no longer support 512px tiles.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5117 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-06 11:24:21 +00:00
Tim Schaub
4fe97a92c6 giving the overview example two maps
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5114 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-05 17:41:39 +00:00
Tim Schaub
2b55af61b9 give wfs delete transactions the correct feature.fid - thanks for the review elemoine (closes #1119).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5113 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-05 16:02:29 +00:00
crschmidt
1cccb29a3b add yards and nautical miles to OpenLayers units. (Closes #1065)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5101 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-02 02:20:25 +00:00
crschmidt
07965f6fed Update TileCache format determination to support TileCache's weird jpg->jpeg
translation correctly. Also, update example to show usage, and tests to test
jpeg instead of testing png incorrectly.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5100 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-02 02:16:44 +00:00
Tim Schaub
8007298d7b Dissalow vertex deletion while dragging - thanks for the review crschmidt (closes #1122).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5099 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-01 23:06:10 +00:00
Tim Schaub
ba8354b593 Make the drag handler only call done if it actually dragged - thanks for the review Eric (closes #1118).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5097 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-01 20:53:06 +00:00
Éric Lemoine
756f6ca24d handlers have to check if layer exists before destroying it. Thanks pgiraud. (closes #1107)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5085 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-01 13:37:16 +00:00
euzuro
7ab5d456a8 couldn't help making this small code reduction. no functional change. all tests pass.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5084 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-01 08:31:27 +00:00
euzuro
e14f0c20b8 since tschaub fixed the limitSigDigs() function to no longer be restricted to integers, nd comments should reflect that.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5083 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-01 08:23:10 +00:00
euzuro
6360ebadcd when we made the nd switch, we agreed that functions which are on static objects would be called Function and functions defined in prototypes would be called Methods. Since these are all now static functions, they should be labelled as such. No functional change here.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5082 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-11-01 07:22:11 +00:00
crschmidt
2b7dc4d9e4 remove unneccesary reproject: false option.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5064 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-26 02:06:46 +00:00
Schuyler Erle
db416603e1 Now 20% more lite!
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5063 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-25 21:51:40 +00:00
Paul Spencer
16aa4cf7f0 (Closes #1084) Apply patch to set resolution and correctly scale width and height of SVG rectangles.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5029 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-19 18:39:27 +00:00
Paul Spencer
65d3947045 remove local scope variables from global namespace.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5028 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-19 18:34:00 +00:00
Tim Schaub
4bafcddff1 properly initialize OpenLayers
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5027 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-19 18:20:18 +00:00
Paul Spencer
5c4dae31c3 embedded comment in license text removed to clean up final lint error on built version of OpenLayers.js
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5017 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-19 01:14:39 +00:00
Paul Spencer
4a6e180637 semi-colon and curly brace stuff for the Rico library.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5015 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-18 23:49:41 +00:00
euzuro
dc6466c621 as long as we're cleaning up this little function. let's make it look pretty. Another non-functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5011 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-18 16:27:09 +00:00
euzuro
8f0ded1092 remove added (but commented out) console.log() call from r5002. As long as we're going it, let's give our return string a better variable name and move the newParams into its own variable, too. no functional change here. all tests pass.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5010 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-18 16:25:43 +00:00
euzuro
032601d315 Fix small oddities from r5002. Odd character in ND for pagePosition() and /** **/ style comment in function getParameters(). Our style up until now has been to use // for comments when mixed with code. This allows for easier disabling of large chunks of code using /** **/ for debugging.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5008 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-18 16:17:35 +00:00
Paul Spencer
4cf0ffeb9f remove DigitalGlobe layer that was inadvertantly added in changeset:5002
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5005 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-18 13:57:17 +00:00
Paul Spencer
3e9beffc99 large scale syntactic clean up adding missing semi-colons and curly braces around blocks.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5002 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-18 12:27:35 +00:00
crschmidt
954df47c30 Update news.txt to indicate the release of 2.5. (And I wanted to be commit
5000.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5000 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-18 01:21:33 +00:00
euzuro
4564090ee7 readability fix for setTileSize(). No reason to be re-declaring the size variable -- it already exists as a parameter. Thanks to pvalsecc for spotting this one. :-) (See #1094)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4991 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-17 15:28:54 +00:00
crschmidt
faac1f98c9 Fix synchronous Ajax requests in IE. Reported by bphilippot (Closes #1097)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4990 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-17 14:21:07 +00:00
crschmidt
ed3221441c Refactor SVN layout in compliance with RFC/LicenseChange. This hopefully
completes an important blocker for moving forward with OSGeo incubation. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4985 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-17 02:21:22 +00:00
crschmidt
91e9add5a8 TMS doesn't take params. (Documentation fix only, no functional change.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4945 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-14 20:06:43 +00:00
euzuro
d9821260ae update ND and function declarations for getFullRequestString() in WFS/WMS to match the original in their superclass, HTTPRequest.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4930 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-12 18:26:52 +00:00
crschmidt
961a5a6613 Update release building script to build naturaldocs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4928 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-12 13:30:22 +00:00
crschmidt
b9a04a0e9b "In Feature.js the popup is always newly created, instead of reusing the
existing popup.", reported by (and original fix provided by) Bart. Patch
reworked, and tests modified to accomodate for destruction of popup. (Closes
#815) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4927 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-12 01:36:12 +00:00
Éric Lemoine
561f4d6a22 callback for close button on popup (closes #1061)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4916 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-10 19:03:18 +00:00
crschmidt
8312bb3f6d Fix a missing argument in the onFeatureInsert call.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4878 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-08 19:18:41 +00:00
crschmidt
d2ecceb5f0 Integrate pierre's suggested changes from 1012, based on user confusion when
working with the vector-features.html example. (Closes #1012)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4871 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-07 00:47:30 +00:00
Tim Schaub
3a00d05358 adding example of panel outside viewport
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4825 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-04 19:21:24 +00:00
Tim Schaub
29c33888cf Give MouseToolbar a CLASS_NAME (closes #1057).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4820 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-04 18:39:17 +00:00
crschmidt
84ab6d9a2f The createCRSObject stuff never really worked. Unfortunately, the tests didn't
catch it because they were all minimal unit tests -- so they never hooked
up features to layers with projections. This fixes the createCRSObject
function, including updated documentation, and includes tests for regression.
(Pullup #1062)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4819 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-04 18:11:15 +00:00
euzuro
71c338c3c6 coding standards. no functional change. (Closes #1047)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4802 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 22:34:08 +00:00
euzuro
c38e1ee76c update comment to be valid for given code. (Closes #1048)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4801 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 22:32:59 +00:00
euzuro
145e446ceb rearranging the style here for setBaseLayer() so that it's more readable, less duplication of code. No functional change, all tests pass
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4800 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 22:32:01 +00:00
crschmidt
5904d15680 KML should use the correct namespace for the placemark it is processing.
This is slightly more expensive for parsing, but leads to the ability to 
load almost all KML Placemarks with geometries on the web, instead of a small
portion of them.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4797 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 21:15:09 +00:00
crschmidt
408a7aee84 Disable dragging on the Yahoo API, since we implement it ourselves. Recent
API changes have made working with the Yahoo! API more painful (more errors)
but have also made available a function to change that, which we now use.
(Pullup #1052)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4793 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 20:11:50 +00:00
euzuro
137a69b17a Change to getZoomForResolution() (and those who call it) so that it does not choose the closest fit by default. Doing so was causing us problems, because user would drag a zoom box and then the map's new zoom would not contain said zoombox. Not good. Default is back to how it was before, but now there's an option 'closest' for those times when what we really want is the closest. Right now, the only time that's true is when we're switching baselayers. This is based on the work from sandbox/euzuro/zoomToResolution, which is started by reverting r4318. (Closes #1043)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4792 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 19:21:05 +00:00
euzuro
cb494d0c3f Allow user to specify the 'slideFactor' for the default panzoom control. (Closes #996)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4785 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 16:19:04 +00:00
crschmidt
d29782e3e2 Add API method for changing an icon's marker image.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4784 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 16:17:55 +00:00
crschmidt
3d71b4ff4e IE thinks that window and document.body are really the same thing -- even
though one has a style property and the other doesn't. This means that when
we pass in 'window' to pagePosition, it blows up, but it didin't before a 
recent reorganization. Here, we create a short term preventative measure to
ensure that old apps don't break -- this should be fixed in 2.6. 
(See #1034, #1051)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4783 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 16:15:43 +00:00
crschmidt
61bd874785 Fix Format tests (committed the wrong one.) (See #1024)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4779 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 14:57:45 +00:00
crschmidt
8ddd13db34 GeoJSON format back up to spec with draft 4. (See #1028)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4770 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 05:32:18 +00:00
crschmidt
cb3cde8d1c Support W3C Geo in Format.GeoRSS -- this.geons was referenced ,but never
defined. Add property and test. Reviewed by SDE (thx!), (See #1024) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4769 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 05:30:17 +00:00
euzuro
5957d25583 Even though we're deprecating them, we can't go back. WMS.Untiled and MapServer.Untiled both need to be able to clone correctly. Patch with tests. (See #1013)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4761 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 01:39:08 +00:00
crschmidt
d000ca7b6b The WFS moveTo function was not calling addTileMonitoringHooks on new tiles
it created after the first one. this means that the layer loadstart/loadend 
functions were never being called. Fix with a patch by rdewit. (See #1045)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4760 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-03 01:23:35 +00:00
Tim Schaub
a1d3f20632 All geometry equals methods now work with bad arguments (closes #1041).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4707 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-10-01 01:03:29 +00:00
Tim Schaub
7ce4621042 Add vector layer to map (see #1040).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4692 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-30 20:07:08 +00:00
Tim Schaub
149e85c923 In changing base layers, we now rely on the old map resolution instead of the old map zoom. This means that for layers with different resolutions arrays, we try to keep the map resolution as consistent as possible (instead of keeping an arbitrary zoom level consistent). This change also fixes a bug that comes up in changing base layers for layers with different length resolution arrays (closes #1032).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4682 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-30 18:11:27 +00:00
crschmidt
01154beb5d from fredj: "in lib/OpenLayers/Layer.js and lib/OpenLayers/Control.js the div
id is not passed to the createDiv() function." (Closes #1015)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4677 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-30 16:41:42 +00:00
crschmidt
33f85eeb35 From fredj: "layer.destroy() calls removeLayer() so control.destroy()
should do the same by calling removeControl()". (Closes #1009)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4676 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-30 16:25:43 +00:00
crschmidt
46c8730601 Make VML Renderer use namespace set in this.xmlns, instead of hardcoding it
in two places. From fredj. (Closes #1002)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4675 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-30 16:24:02 +00:00
crschmidt
2b2fccc847 Better firebug include. (Closes #1014)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4674 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-30 16:22:58 +00:00
euzuro
1390a0a6f7 Do not copy by reference size/bounds/position in making a new tile. All tests pass ie6/ff (Closes #1026).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4579 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-28 21:37:05 +00:00
euzuro
eacfa2b88a Remove 'drawn' property from Tiles. (Closes #1018)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4557 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-28 20:45:31 +00:00
Schuyler Erle
af2f5b6577 Add serviceVersion property to Layer.TMS. (see #1023)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4521 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-28 18:13:55 +00:00
Paul Spencer
8c003733cf add missing semicolons.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4505 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-28 17:17:45 +00:00
euzuro
c28f13f88d Fix to remove extraneous clear() from Tile.moveTo (Closes #1017)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4502 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-28 17:11:18 +00:00
crschmidt
0307d4868a Fix to mouseposition destroy from fredj
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4431 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-21 11:44:36 +00:00
crschmidt
85e9e30908 Extract attributes wrapped in CDATA, by adding an additional nodeType. (See
#1007) This closes the last remaining bug for 2.5RC3 -- I'll release that in
the morning unless anything new pops up.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4429 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-21 01:14:25 +00:00
Tim Schaub
640b62adc8 Adding a concatChildValues method to the XML parser. This gets around a messy 4kb limit for text node lengths - over which browsers split values among multiple siblings (see #1006).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4410 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-20 17:06:04 +00:00
Tim Schaub
ad4044cd3b Make the drag handler tidy up after itself a bit more. This solves the click blocking after shift-drag issue (see #1003).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4400 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-19 21:01:04 +00:00
crschmidt
8cf5670134 Remove kml-layer-linestring, now replaced by kml-layer, since we only have one
useful KML file anymore. (See #1001)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4394 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-19 13:49:16 +00:00
crschmidt
2e965baa17 Make KML example use kml/lines.kml instead of the now-deleted mc-search.kml.
(See #1001)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4393 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-19 13:44:15 +00:00
euzuro
6ce8949189 update nd for OpenLayers.Control.PanZoom. (See #983)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4386 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-19 01:56:00 +00:00
crschmidt
80491d626a More for docs updates: with the splitting of BaseTypes, we want to include
them all by default into builds. This will achieve that. (This fixes bart's
email to the users list: "[OpenLayers-Users] OL 2.5RC1" sent this morning.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4382 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-19 01:05:23 +00:00
Tim Schaub
1f745b4be9 New behavior for layer.getZoomForResolution. This method now returns the index of the resolution closest to the passed in resolution - making for fewer unwanted resolution changes, and a generally happier populace (see #990).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4381 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-19 00:23:26 +00:00
euzuro
a2fabd7d17 test to see if 'fromLatLngToContainerPixel' is defined on the prototype, not on the class. (See #994).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4380 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-18 23:47:40 +00:00
euzuro
471e5c5a1b whitespacing for google layer. strangely this has been there since 2.2. wierd. (See #983)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4377 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-18 21:03:35 +00:00
Tim Schaub
9ce8a4eb85 Use documented getContainer method instead of chasing obfuscated properties. Note that we are still tip-toeing around the dom here assuming they won't pull a fast one on us - Google users beware (see #994). Big thanks to Uz for help sleuthing this one out.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4375 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-18 19:04:54 +00:00
Tim Schaub
3f9aeb3ae6 speeling error in ndocs see (#983).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4372 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-18 16:48:09 +00:00
crschmidt
e34178f4c9 In discussion with Jachym, Tim pointed out that he has already written a
proxy that supports post -- and his was more complete. Pull in Tim's. (This
is from the wfsv sandbox.) Thanks, Tim. (See #991)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4371 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-18 15:47:08 +00:00
crschmidt
0dd277b31b Add POST support to proxy.cgi (See #991) from jachym.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4370 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-18 13:48:52 +00:00
Tim Schaub
5c3abf8dd4 No circular dependencies allowed by toposort. Geometry requires WKT (for toString) and WKT requires geometry. Removing requires from WKT to fix the single file build (see #983).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4363 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-18 08:26:24 +00:00
euzuro
ccd7a34701 Replacing Tabs with Spaces. (See #988)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4356 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 23:43:48 +00:00
crschmidt
cc78cf3a13 Fix Layer.Image typo in setUrl (See #985) reported by Linda on the mailing
list. Thanks for the review Tim.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4355 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 22:49:25 +00:00
Tim Schaub
91fab27e7d Simplify click handling in the drag handler - this makes the sequence down, move, up a complete drag (see #982).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4354 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 19:25:26 +00:00
Tim Schaub
2337f9f2d8 Adding angle brackets to link class names in the docs (see #983).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4353 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 16:59:16 +00:00
Tim Schaub
1812c7fb0d documenting requirements for format classes (see #983).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4352 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 16:44:33 +00:00
Tim Schaub
0e417a3315 doc tweaks for Bounds (see #983).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4351 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 16:39:05 +00:00
Tim Schaub
9f0c017f92 A few doc tweaks for BaseTypes (see #983).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4350 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-09-17 16:30:44 +00:00
471 changed files with 43831 additions and 8329 deletions

View File

@@ -1,4 +1,4 @@
Format: 1.35
Format: Development Release 12-07-2007 (1.35 base)
# This is the Natural Docs languages file for this project. If you change
# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change

View File

@@ -1,4 +1,4 @@
Format: 1.35
Format: Development Release 12-07-2007 (1.35 base)
Title: OpenLayers
@@ -8,6 +8,22 @@ SubTitle: JavaScript Mapping Library
# Footer: [text]
# If you want to add a copyright notice, this would be the place to do it.
# You can add a timestamp to your documentation like one of these:
# Timestamp: Generated on month day, year
# Timestamp: Updated mm/dd/yyyy
# Timestamp: Last updated mon day
#
# m - One or two digit month. January is "1"
# mm - Always two digit month. January is "01"
# mon - Short month word. January is "Jan"
# month - Long month word. January is "January"
# d - One or two digit day. 1 is "1"
# dd - Always two digit day. 1 is "01"
# day - Day with letter extension. 1 is "1st"
# yy - Two digit year. 2006 is "06"
# yyyy - Four digit year. 2006 is "2006"
# year - Four digit year. 2006 is "2006"
# --------------------------------------------------------------------------
#
@@ -52,26 +68,31 @@ Group: OpenLayers {
File: Control (no auto-title, OpenLayers/Control.js)
File: ArgParser (no auto-title, OpenLayers/Control/ArgParser.js)
File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js)
File: OverviewMap (no auto-title, OpenLayers/Control/OverviewMap.js)
File: Attribution (no auto-title, OpenLayers/Control/Attribution.js)
File: Button (no auto-title, OpenLayers/Control/Button.js)
File: DragFeature (no auto-title, OpenLayers/Control/DragFeature.js)
File: DragPan (no auto-title, OpenLayers/Control/DragPan.js)
File: DrawFeature (no auto-title, OpenLayers/Control/DrawFeature.js)
File: EditingToolbar (no auto-title, OpenLayers/Control/EditingToolbar.js)
File: KeyboardDefaults (no auto-title, OpenLayers/Control/KeyboardDefaults.js)
File: LayerSwitcher (no auto-title, OpenLayers/Control/LayerSwitcher.js)
File: ModifyFeature (no auto-title, OpenLayers/Control/ModifyFeature.js)
File: MouseDefaults (no auto-title, OpenLayers/Control/MouseDefaults.js)
File: MousePosition (no auto-title, OpenLayers/Control/MousePosition.js)
File: MouseToolbar (no auto-title, OpenLayers/Control/MouseToolbar.js)
File: Navigation (no auto-title, OpenLayers/Control/Navigation.js)
File: NavigationHistory (no auto-title, OpenLayers/Control/NavigationHistory.js)
File: NavToolbar (no auto-title, OpenLayers/Control/NavToolbar.js)
File: OverviewMap (no auto-title, OpenLayers/Control/OverviewMap.js)
File: Panel (no auto-title, OpenLayers/Control/Panel.js)
File: PanZoom (no auto-title, OpenLayers/Control/PanZoom.js)
File: PanZoomBar (no auto-title, OpenLayers/Control/PanZoomBar.js)
File: Permalink (no auto-title, OpenLayers/Control/Permalink.js)
File: Scale (no auto-title, OpenLayers/Control/Scale.js)
File: ScaleLine (no auto-title, OpenLayers/Control/ScaleLine.js)
File: SelectFeature (no auto-title, OpenLayers/Control/SelectFeature.js)
File: ZoomBox (no auto-title, OpenLayers/Control/ZoomBox.js)
File: PanZoom (OpenLayers/Control/PanZoom.js)
File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js)
} # Group: Control
File: Events (no auto-title, OpenLayers/Events.js)
@@ -79,26 +100,53 @@ Group: OpenLayers {
Group: Feature {
File: Feature (no auto-title, OpenLayers/Feature.js)
File: WFS (no auto-title, OpenLayers/Feature/WFS.js)
File: Vector (no auto-title, OpenLayers/Feature/Vector.js)
File: WFS (no auto-title, OpenLayers/Feature/WFS.js)
} # Group: Feature
Group: Filter {
File: Filter (no auto-title, OpenLayers/Filter.js)
File: Comparison (no auto-title, OpenLayers/Filter/Comparison.js)
File: FeatureId (no auto-title, OpenLayers/Filter/FeatureId.js)
File: Logical (no auto-title, OpenLayers/Filter/Logical.js)
} # Group: Filter
Group: Format {
File: Format (OpenLayers/Format.js)
File: Format (no auto-title, OpenLayers/Format.js)
File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js)
File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js)
File: GML (no auto-title, OpenLayers/Format/GML.js)
File: JSON (no auto-title, OpenLayers/Format/JSON.js)
File: KML (no auto-title, OpenLayers/Format/KML.js)
File: OSM (no auto-title, OpenLayers/Format/OSM.js)
Group: SLD {
File: SLD (no auto-title, OpenLayers/Format/SLD.js)
File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js)
} # Group: SLD
File: Text (no auto-title, OpenLayers/Format/Text.js)
File: WFS (no auto-title, OpenLayers/Format/WFS.js)
File: WKT (no auto-title, OpenLayers/Format/WKT.js)
File: XML (no auto-title, OpenLayers/Format/XML.js)
Group: WMC {
File: WMC (no auto-title, OpenLayers/Format/WMC.js)
File: v1 (no auto-title, OpenLayers/Format/WMC/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/WMC/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WMC/v1_1_0.js)
} # Group: WMC
} # Group: Format
Group: Geometry {
File: Geometry (OpenLayers/Geometry.js)
File: Geometry (no auto-title, OpenLayers/Geometry.js)
File: Collection (no auto-title, OpenLayers/Geometry/Collection.js)
File: Curve (no auto-title, OpenLayers/Geometry/Curve.js)
File: LinearRing (no auto-title, OpenLayers/Geometry/LinearRing.js)
@@ -109,15 +157,16 @@ Group: OpenLayers {
File: Point (no auto-title, OpenLayers/Geometry/Point.js)
File: Polygon (no auto-title, OpenLayers/Geometry/Polygon.js)
File: Rectangle (no auto-title, OpenLayers/Geometry/Rectangle.js)
File: Surface (no auto-title, OpenLayers/Geometry/Surface.js)
} # Group: Geometry
Group: Handler {
File: Handler (OpenLayers/Handler.js)
File: Handler (no auto-title, OpenLayers/Handler.js)
File: Box (no auto-title, OpenLayers/Handler/Box.js)
File: Click (no auto-title, OpenLayers/Handler/Click.js)
File: Drag (no auto-title, OpenLayers/Handler/Drag.js)
File: Feature (no auto-title, OpenLayers/Handler/Feature.js)
File: Hover (no auto-title, OpenLayers/Handler/Hover.js)
File: Keyboard (no auto-title, OpenLayers/Handler/Keyboard.js)
File: MouseWheel (no auto-title, OpenLayers/Handler/MouseWheel.js)
File: Path (no auto-title, OpenLayers/Handler/Path.js)
@@ -128,9 +177,19 @@ Group: OpenLayers {
File: Icon (no auto-title, OpenLayers/Icon.js)
Group: Lang {
File: Lang (no auto-title, OpenLayers/Lang.js)
File: Lang["cs-CZ"] (OpenLayers/Lang/cs-CZ.js)
File: Lang["de"] (no auto-title, OpenLayers/Lang/de.js)
File: Lang["en"] (no auto-title, OpenLayers/Lang/en.js)
File: Lang["en-CA"] (no auto-title, OpenLayers/Lang/en-CA.js)
File: Lang["fr"] (no auto-title, OpenLayers/Lang/fr.js)
} # Group: Lang
Group: Layer {
File: Layer (OpenLayers/Layer.js)
File: Layer (no auto-title, OpenLayers/Layer.js)
File: Boxes (no auto-title, OpenLayers/Layer/Boxes.js)
File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js)
File: FixedZoomLevels (no auto-title, OpenLayers/Layer/FixedZoomLevels.js)
@@ -141,10 +200,12 @@ Group: OpenLayers {
File: HTTPRequest (no auto-title, OpenLayers/Layer/HTTPRequest.js)
File: Image (no auto-title, OpenLayers/Layer/Image.js)
File: KaMap (no auto-title, OpenLayers/Layer/KaMap.js)
File: MapGuide (no auto-title, OpenLayers/Layer/MapGuide.js)
File: MapServer (no auto-title, OpenLayers/Layer/MapServer.js)
File: MapServer.Untiled (no auto-title, OpenLayers/Layer/MapServer/Untiled.js)
File: Markers (no auto-title, OpenLayers/Layer/Markers.js)
File: MultiMap (no auto-title, OpenLayers/Layer/MultiMap.js)
File: PointTrack (no auto-title, OpenLayers/Layer/PointTrack.js)
File: SphericalMercator (no auto-title, OpenLayers/Layer/SphericalMercator.js)
File: Text (no auto-title, OpenLayers/Layer/Text.js)
File: TileCache (no auto-title, OpenLayers/Layer/TileCache.js)
@@ -162,33 +223,42 @@ Group: OpenLayers {
Group: Marker {
File: Marker (OpenLayers/Marker.js)
File: Marker (no auto-title, OpenLayers/Marker.js)
File: Box (no auto-title, OpenLayers/Marker/Box.js)
} # Group: Marker
Group: Popup {
File: Popup (OpenLayers/Popup.js)
File: Popup (no auto-title, OpenLayers/Popup.js)
File: Anchored (no auto-title, OpenLayers/Popup/Anchored.js)
File: AnchoredBubble (no auto-title, OpenLayers/Popup/AnchoredBubble.js)
File: Framed (OpenLayers/Popup/Framed.js)
File: FramedCloud (OpenLayers/Popup/FramedCloud.js)
} # Group: Popup
File: Projection (no auto-title, OpenLayers/Projection.js)
Group: Renderer {
File: Renderer (OpenLayers/Renderer.js)
File: Renderer (no auto-title, OpenLayers/Renderer.js)
File: Elements (no auto-title, OpenLayers/Renderer/Elements.js)
File: SVG (no auto-title, OpenLayers/Renderer/SVG.js)
File: VML (no auto-title, OpenLayers/Renderer/VML.js)
} # Group: Renderer
File: Rule (no auto-title, OpenLayers/Rule.js)
File: Style (no auto-title, OpenLayers/Style.js)
File: StyleMap (no auto-title, OpenLayers/StyleMap.js)
Group: Tile {
File: Tile (OpenLayers/Tile.js)
File: Tile (no auto-title, OpenLayers/Tile.js)
File: Image (no auto-title, OpenLayers/Tile/Image.js)
File: WFS (no auto-title, OpenLayers/Tile/WFS.js)
} # Group: Tile
File: Util (OpenLayers/Util.js)
File: Tween (no auto-title, OpenLayers/Tween.js)
File: Util (no auto-title, OpenLayers/Util.js)
} # Group: OpenLayers
Group: Index {

View File

@@ -1,4 +1,4 @@
Format: 1.35
Format: Development Release 12-07-2007 (1.35 base)
# This is the Natural Docs topics file for this project. If you change anything
# here, it will apply to THIS PROJECT ONLY. If you'd like to change something
@@ -58,9 +58,6 @@ Ignore Keywords:
# Class Hierarchy: [yes|no]
# Whether the topics are part of the class hierarchy. Defaults to no.
#
# Variable Type: [yes|no]
# Whether the topics can be a variable type. Defaults to no.
#
# Page Title If First: [yes|no]
# Whether the topic's title becomes the page title if it's the first one in
# a file. Defaults to no.

View File

@@ -2,11 +2,22 @@
import sys
sys.path.append("../tools")
import mergejs
import jsmin, mergejs
have_compressor = None
try:
import jsmin
have_compressor = "jsmin"
except ImportError:
try:
import minimize
have_compressor = "minimize"
except Exception, E:
print E
pass
sourceDirectory = "../lib"
configFilename = "library.cfg"
configFilename = "full.cfg"
outputFilename = "OpenLayers.js"
if len(sys.argv) > 1:
@@ -21,8 +32,15 @@ if len(sys.argv) > 2:
print "Merging libraries."
merged = mergejs.run(sourceDirectory, None, configFilename)
print "Compressing."
minimized = jsmin.jsmin(merged)
if have_compressor == "jsmin":
print "Compressing using jsmin."
minimized = jsmin.jsmin(merged)
elif have_compressor == "minimize":
print "Compressing using minimize."
minimized = minimize.minimize(merged)
else: # fallback
print "Not compressing."
minimized = merged
print "Adding license file."
minimized = file("license.txt").read() + minimized

2
build/buildUncompressed.py Normal file → Executable file
View File

@@ -6,7 +6,7 @@ sys.path.append("../tools")
import jsmin, mergejs
sourceDirectory = "../lib"
configFilename = "library.cfg"
configFilename = "full.cfg"
outputFilename = "OpenLayers.js"
if len(sys.argv) > 1:

View File

@@ -13,3 +13,7 @@ Rico/Corner.js
[exclude]
Firebug/firebug.js
Firebug/firebugx.js
OpenLayers/Lang/de.js
OpenLayers/Lang/en-CA.js
OpenLayers/Lang/fr.js
OpenLayers/Lang/cs-CZ.js

View File

@@ -46,5 +46,9 @@ OpenLayers/Renderer/Elements.js
OpenLayers/Renderer/SVG.js
OpenLayers/Renderer/VML.js
OpenLayers/Renderer.js
OpenLayers/Lang/de.js
OpenLayers/Lang/en-CA.js
OpenLayers/Lang/fr.js
OpenLayers/Lang/cs-CZ.js

View File

@@ -2,8 +2,8 @@
OpenLayers.js -- OpenLayers Map Viewer Library
Copyright 2005-2007 MetaCarta, Inc., released under a modified BSD license.
Please see http://svn.openlayers.org/trunk/openlayers/repository-license.txt
Copyright 2005-2008 MetaCarta, Inc., released under the Clear BSD license.
Please see http://svn.openlayers.org/trunk/openlayers/license.txt
for the full text of the license.
Includes compressed code under the following licenses:
@@ -21,7 +21,7 @@
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://prototype.conio.net/
*
/*--------------------------------------------------------------------------*/
*--------------------------------------------------------------------------*/
/**
*

View File

@@ -21,3 +21,8 @@ OpenLayers/Tile/Image.js
[exclude]
Firebug/firebug.js
Firebug/firebugx.js
OpenLayers/Lang/de.js
OpenLayers/Lang/en-CA.js
OpenLayers/Lang/fr.js
OpenLayers/Lang/cs-CZ.js

74
doc/Jugl.js Normal file
View File

@@ -0,0 +1,74 @@
/**
* Jugl.js -- JavaScript Template Attribute Language
* This code is not yet licensed for release or distribution.
*
* Copyright 2007 Tim Schaub
*/
/**
* Contains portions of OpenLayers.js -- OpenLayers Map Viewer Library
*
* Copyright 2005-2006 MetaCarta, Inc., released under a modified BSD license.
* Please see http://svn.openlayers.org/trunk/openlayers/repository-license.txt
* for the full text of the license.
*/
/**
* Contains portions of Prototype.js:
*
* Prototype JavaScript framework, version 1.4.0
* (c) 2005 Sam Stephenson <sam@conio.net>
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://prototype.conio.net/
*/
(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl={singleFile:true};window[uri]=Jugl;})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var singleFile=(typeof window[uri]=="object"&&window[uri].singleFile);var Jugl={prefix:"jugl",namespaceURI:"http://namespace.jugl.org/",scriptName:(!singleFile)?"lib/Jugl.js":"Jugl.js",getScriptLocation:function(){var scriptLocation="";var scriptName=Jugl.scriptName;var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute('src');if(src){var index=src.lastIndexOf(scriptName);if((index>-1)&&(index+scriptName.length==src.length)){scriptLocation=src.slice(0,-scriptName.length);break;}}}
return scriptLocation;}};if(!singleFile){var jsfiles=new Array("Jugl/Util.js","Jugl/Class.js","Jugl/Async.js","Jugl/Node.js","Jugl/Attribute.js","Jugl/Console.js","Jugl/Template.js");var allScriptTags="";var host=Jugl.getScriptLocation()+"lib/";for(var i=0;i<jsfiles.length;i++){if(/MSIE/.test(navigator.userAgent)||/Safari/.test(navigator.userAgent)){var currentScriptTag="<script src='"+host+jsfiles[i]+"'></script>";allScriptTags+=currentScriptTag;}else{var s=document.createElement("script");s.src=host+jsfiles[i];var h=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;h.appendChild(s);}}
if(allScriptTags){document.write(allScriptTags);}}
window[uri]=Jugl;})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Class=function(){var Class=function(){this.initialize.apply(this,arguments);}
var extended={};var parent;for(var i=0;i<arguments.length;++i){if(typeof arguments[i]=="function"){parent=arguments[i].prototype;}else{parent=arguments[i];}
Jugl.Util.extend(extended,parent);}
Class.prototype=extended;return Class;};})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Util=new Object();Jugl.Util.extend=function(destination,source){for(property in source){destination[property]=source[property];}
return destination;};Jugl.Util.indexOf=function(array,obj){for(var i=0;i<array.length;i++){if(array[i]==obj)return i;}
return-1;};Jugl.Util.bind=function(method,object){var args=[];for(var i=2;i<arguments.length;++i){args.push(arguments[i]);}
return function(){for(var i=0;i<arguments.length;++i){args.push(arguments[i]);}
return method.apply(object,args);}};})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){}};(function(){if(window.console){var scripts=document.getElementsByTagName("script");for(var i=0;i<scripts.length;++i){if(scripts[i].src.indexOf("firebug.js")!=-1){Jugl.Util.extend(Jugl.Console,console);break;}}}})();})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Attribute=Jugl.Class({node:null,element:null,type:null,nodeValue:null,template:null,initialize:function(node,element,type){this.node=node;this.element=element;this.type=type;this.nodeValue=element.nodeValue;this.nodeName=element.nodeName;this.template=node.template;},splitAttributeValue:function(value){value=(value!=null)?value:this.nodeValue;var matches=this.template.regExes.trimSpace.exec(value);var items;if(matches.length==3){items=[matches[1],matches[2]];}
return items;},getAttributeValues:function(){var trimmed=this.nodeValue.replace(/[\t\n]/g,"").replace(/;\s*$/,"");var tabbed=trimmed.replace(/;;/g,"\t");var newlined=tabbed.split(";").join("\n");return newlined.replace(/\t/g,";").split(/\n/g);},removeSelf:function(){this.node.removeAttributeNode(this);},process:function(){return this.processAttribute[this.type].apply(this,[]);},evalInScope:function(str){var expression="with(this.node.scope){"+str+"}";return eval(expression);},processAttribute:{"define":function(){var values=this.getAttributeValues();var pair;for(var i=0;i<values.length;++i){pair=this.splitAttributeValue(values[i]);this.node.scope[pair[0]]=this.evalInScope(pair[1]);}
this.removeSelf();return true;},"condition":function(){var proceed;try{proceed=!!(this.evalInScope(this.nodeValue));}catch(err){var message=err.name+": "+err.message+"\n";message+="attribute: "+this.nodeName;Jugl.Console.error(message);Jugl.Console.dirxml(this.node.element);Jugl.Console.log(this.node.scope);}
this.removeSelf();if(!proceed){this.node.removeSelf();}
return proceed;},"repeat":function(){var pair=this.splitAttributeValue();var key=pair[0];var list=this.evalInScope(pair[1]);this.removeSelf();if(!(list instanceof Array)){var items=new Array();for(var p in list){items.push(p);}
list=items;}
var node;var previousSibling=this.node;var length=list.length;for(var i=0;i<length;++i){node=this.node.clone();node.scope[key]=list[i];node.scope.repeat[key]={index:i,number:i+1,even:!(i%2),odd:!!(i%2),start:(i==0),end:(i==length-1),length:length};previousSibling.insertAfter(node);node.process();previousSibling=node;}
this.node.removeSelf();return false;},"content":function(){var str;try{str=this.evalInScope(this.nodeValue);}catch(err){Jugl.Console.error("Failed to eval in node scope: "+
this.nodeValue);throw err;}
this.removeSelf();var child=new Jugl.Node(this.template,document.createTextNode(str));this.node.removeChildNodes();this.node.appendChild(child);return true;},"replace":function(){var str;try{str=this.evalInScope(this.nodeValue);}catch(err){Jugl.Console.error("Failed to eval in node scope: "+
this.nodeValue);throw err;}
this.removeSelf();var replacement=new Jugl.Node(this.template,document.createTextNode(str));this.node.insertBefore(replacement);this.node.removeSelf();return true;},"attributes":function(){var values=this.getAttributeValues();var pair,name,value;for(var i=0;i<values.length;++i){pair=this.splitAttributeValue(values[i]);name=pair[0];value=this.evalInScope(pair[1]);if(value!==false){this.node.setAttribute(name,value);}}
this.removeSelf();return true;},"omit-tag":function(){var omit;try{omit=((this.nodeValue=="")||!!(this.evalInScope(this.nodeValue)));}catch(err){Jugl.Console.error("Failed to eval in node scope: "+
this.nodeValue);throw err;}
this.removeSelf();if(omit){var children=this.node.getChildNodes();var child;for(var i=0;i<children.length;++i){this.node.insertBefore(children[i]);}
this.node.removeSelf();}}},CLASS_NAME:"Jugl.Attribute"});})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Template=Jugl.Class({element:null,usingNS:false,xhtmlns:"http://www.w3.org/1999/xhtml",xmldom:null,regExes:null,loaded:false,loading:false,initialize:function(element,options){if(typeof(element)=="string"){element=document.getElementById(element);}
if(element){this.element=element;this.loaded=true;}
this.regExes={trimSpace:(/^\s*(\w+)\s+(.*?)\s*$/)};if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM");}},process:function(context,clone,toString){if(this.element.getAttributeNodeNS){if(this.element.getAttributeNodeNS(Jugl.xhtmlns,Jugl.prefix)){this.usingNS=true;}}
var node=new Jugl.Node(this,this.element);if(clone){node=node.clone();}
if(context){node.scope=context;}
try{node.process();}catch(err){Jugl.Console.error("Failed to process "+
this.element+" node");}
var data;if(toString){if(node.element.innerHTML){data=node.element.innerHTML;}else{if(this.xmldom){data=node.element.xml;}else{var serializer=new XMLSerializer();data=serializer.serializeToString(node.element);}}}else{data=node.element;}
return data;},load:function(url){this.loading=true;var setElement=function(request){var doc=request.responseXML;this.element=doc.documentElement;this.loading=false;this.loaded=true;this.onLoad();}
Jugl.Async.loadUrl(url,setElement,this);},onLoad:function(){},CLASS_NAME:"Jugl.Template"});})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Node=Jugl.Class({template:null,element:null,scope:null,initialize:function(template,element){this.template=template;this.element=element;this.scope=new Object();this.scope.repeat=new Object();},clone:function(){var element=this.element.cloneNode(true);var node=new Jugl.Node(this.template,element);Jugl.Util.extend(node.scope,this.scope);return node;},getAttribute:function(localName){var element;if(this.element.nodeType==1){if(this.template.usingNS){element=this.element.getAttributeNodeNS(Jugl.namespaceURI,localName);}else{element=this.element.getAttributeNode(Jugl.prefix+":"+
localName);}
if(element&&!element.specified){element=false;}}
var attribute;if(element){attribute=new Jugl.Attribute(this,element,localName);}else{attribute=element;}
return attribute;},setAttribute:function(name,value){this.element.setAttribute(name,value);},removeAttributeNode:function(attribute){this.element.removeAttributeNode(attribute.element);},getChildNodes:function(){var children=[];var node,scope;for(var i=0;i<this.element.childNodes.length;++i){node=new Jugl.Node(this.template,this.element.childNodes[i]);node.scope=Jugl.Util.extend({},this.scope);children.push(node);}
return children;},removeChildNodes:function(){while(this.element.hasChildNodes()){this.element.removeChild(this.element.firstChild);}},removeChild:function(node){this.element.removeChild(node.element);return node;},removeSelf:function(){this.element.parentNode.removeChild(this.element);},appendChild:function(node){this.element.appendChild(node.element);},insertAfter:function(node){var parent=this.element.parentNode;var sibling=this.element.nextSibling;if(sibling){parent.insertBefore(node.element,sibling);}else{parent.appendChild(node.element);}},insertBefore:function(node){var parent=this.element.parentNode;parent.insertBefore(node.element,this.element);},process:function(){var attribute;var keepProcessing=true;var series=["define","condition","repeat"];for(var i=0;i<series.length;++i){attribute=this.getAttribute(series[i]);if(attribute){try{keepProcessing=attribute.process();}catch(err){Jugl.Console.error("Failed to process "+
series[i]+" attribute");throw err;}
if(!keepProcessing){return;}}}
var content=this.getAttribute("content");if(content){try{content.process();}catch(err){Jugl.Console.error("Failed to process content attribute");throw err;}}else{var replace=this.getAttribute("replace");if(replace){try{replace.process();}catch(err){Jugl.Console.error("Failed to process replace attribute");throw err;}}}
var attributes=this.getAttribute("attributes");if(attributes){try{attributes.process();}catch(err){Jugl.Console.error("Failed to process attributes attribute");throw err;}}
if(!content&&!replace){this.processChildNodes();}
var omit=this.getAttribute("omit-tag");if(omit){try{omit.process();}catch(err){Jugl.Console.error("Failed to process omit-tag attribute");throw err;}}},processChildNodes:function(){var element,child;var children=this.getChildNodes();for(var i=0;i<children.length;++i){try{children[i].process();}catch(err){Jugl.Console.error("Failed to process "+
children[i]+" node");throw err;}}},CLASS_NAME:"Jugl.Node"});})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Async={loadTemplate:function(url,onComplete,caller){var createTemplate=function(request){var doc=request.responseXML;var template=new Jugl.Template(doc.documentElement);var complete=Jugl.Util.bind(onComplete,caller);complete(template);}
Jugl.Async.loadUrl(url,createTemplate);},loadUrl:function(url,onComplete,caller){var complete=(caller)?Jugl.Util.bind(onComplete,caller):onComplete;var request=Jugl.Async.createXMLHttpRequest();request.open("GET",url);request.onreadystatechange=function(){if(request.readyState==4){complete(request);}}
request.send(null);},createXMLHttpRequest:function(){if(typeof XMLHttpRequest!="undefined"){return new XMLHttpRequest();}else if(typeof ActiveXObject!="undefined"){return new ActiveXObject("Microsoft.XMLHTTP");}else{throw new Error("XMLHttpRequest not supported");}}};})();

View File

@@ -1,17 +1,24 @@
OpenLayers contributors:
Seb Benthall
Howard Butler
Bertil Chaupis
John Cole
Jeff Dege
Roald de Wit
Schuyler Erle
Christian López Espínola
John Frank
Sean Gilles
Pierre Giraud
Andreas Hocevar
Ian Johnson
Eric Lemoine
Philip Lindsay
Martijn van Oosterhout
David Overstrom
Corey Puffault
Gregers Rygg
Tim Schaub
Christopher Schmidt
Cameron Shorter
@@ -19,9 +26,15 @@ Paul Spencer
Glen Stampoultzis
James Stembridge
Erik Uzureau
Ivan Willig
Bill Woodall
Steve Woodbridge
Some portions of OpenLayers are used under the Apache 2.0 license, available
in doc/licenses/APACHE-2.0.txt.
OpenLayers is graciously supported by MetaCarta, Inc.
<http://www.metacarta.com>.
Some portions of OpenLayers are used under the MIT license, availabie in
doc/licenses/MIT-LICENSE.txt.
Some portions of OpenLayers are Copyright 2001 Robert Penner, and are used
under the BSD license, available in doc/licenses/BSD-LICENSE.txt

55
doc/examples.html Normal file
View File

@@ -0,0 +1,55 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html>
<head>
<title>OL Docs</title>
<style type="text/css">
html, body {margin: 0;padding: 0.5em 1em;font: 0.9em Verdana, Arial, sans serif;}
.exampleContainer{width:90%; padding:5px; border-bottom:1px solid grey; }
.exampleNumber{display:inline; font-weight:bold; color:#333; }
.exampleTitle{display:inline; font-weight:bold; color:#333; }
.exampleName{display:inline; color:#333; }
.exampleDescription{color:#222; padding:3px; font-size:1.2em; }
.exampleClasses{font-size:.7em; color:grey;display:none;}
</style>
<script type="text/javascript" src="./Jugl.js"></script>
<script type="text/javascript" src="examples.js"></script>
<script type="text/javascript">
// import
var uri = "http://jugl.tschaub.net/trunk/lib/Jugl.js";
var Jugl = window[uri];
// this part does the actual template processing
window.onload = function() {
var template = new Jugl.Template("basic");
template.process();
}
</script>
</head>
<body>
<div id="basic" style="margin: 0 auto;">
<div class="exampleContainer" jugl:repeat="example examples">
<div class="exampleNumber" jugl:content="repeat.example.number">
Example # goes here
</div>
<div class="exampleTitle" jugl:content="example.title">
Title goes here
</div>
<div class="exampleName">
<a jugl:content="example.example"
jugl:attributes="href example.link">
Example Filename and Link
</a>
</div>
<div class="exampleDescription">
<span jugl:content="example.shortdesc">
Short Description goes here
</span>
</div>
<div class="exampleClasses" >
<span jugl:content="example.classes">
Related Classes go here
</span>
</div>
</div>
</div>
</body>
</html>

202
doc/licenses/APACHE-2.0.txt Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -0,0 +1,28 @@
Redistribution and use of this software in source and binary forms, with or
without modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of Yahoo! Inc. nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of Yahoo! Inc.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,18 @@
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,3 +1,3 @@
Automatically generated OpenLayers API documentation is online:
http://dev.openlayers.org/docs/overview-tree.html
http://dev.openlayers.org/apidocs

96
doc/walkthru.html Normal file
View File

@@ -0,0 +1,96 @@
<html>
<head>
<title>OpenLayers examples walkthrough</title>
<style type="text/css">
a { color:blue; text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
<base href="http://openlayers.org/dev/examples/">
</head>
<body style="font-family: sans-serif">
<h1><pre style="font-size: larger">&lt;ol&gt;</pre></h1>
<p>API documentation: <a href="http://dev.openlayers.org/docs/">http://dev.openlayers.org/docs/</a></p>
<p>Examples: <a href="http://dev.openlayers.org/examples/">http://openlayers.org/dev/examples/</a></p>
<h2>Maps</h2>
<ol>
<li><a href="../examples/lite.html">Basic example</a></li>
<li><a href="../examples/layerswitcher.html">Layer switcher (aka legend)</a></li>
<li><a href="../examples/example.html">Base layers versus overlays</a></li>
<li><a href="../examples/multiserver.html">Multiple WMS mirrors</a></li>
<li><a href="../examples/fullScreen.html">Full screen map</a></li>
<li><a href="../examples/wrapDateLine.html">Wrapping the date line</a></li>
<li><a href="../examples/projected-map.html">Other cartographic projections</a></li>
<li><a href="../examples/layer-opacity.html">Translucent overlays</a></li>
</ol>
<h2>Raster Layers</h2>
<ol>
<li><a href="../examples/wms-untiled.html">Untiled WMS layer</a></li>
<li><a href="../examples/kamap.html">Ka-Map layer</a></li>
<li><a href="../examples/mapserver.html">MapServer layer</a></li>
<li><a href="../examples/worldwind.html">Worldwind layer</a></li>
<li><a href="../examples/tms.html">TMS layer</a></li>
<li><a href="../examples/image-layer.html">Image layer</a></li>
<li><a href="../examples/google.html">Google layer</a></li>
<li><a href="../examples/ve.html">VirtualEarth layer</a></li>
<li><a href="../examples/spherical-mercator.html">Spherical Mercator ("EPSG:900913")</a></li>
<li><a href="http://tilecache.org/">TileCache</a></li>
</ol>
<h2>Marker Layers</h2>
<ol>
<li><a href="../examples/markers.html">Markers</a></li>
<li><a href="../examples/markerResize.html">Changing marker properties dynamically</a></li>
<li><a href="../examples/popups.html">Popups</a></li>
<li><a href="../examples/georss.html">GeoRSS</a> (<a href="georss.xml">example data</a>)</a></li>
<li><a href="../examples/georss-markers.html">GeoRSS with custom markers</a></li>
<li><a href="../examples/wfs.html">Point layer from WFS</a></li>
<li><a href="../examples/getfeatureinfo.html">WFS GetFeatureInfo example</a></li>
</ol>
<h2>Events and Controls</h2>
<ol>
<li><a href="../examples/navtoolbar.html">Navigation tools on the map</a></li>
<li><a href="../examples/navtoolbar-outsidemap.html">Navigation toolbar off the map</a></li>
<li><a href="../examples/mouse-position.html">Tracking the mouse position</a></li>
<li><a href="../examples/overview.html">Overview map</a></li>
<li><a href="../examples/attribution.html">Layer attribution</a></li>
<li><a href="../examples/controls.html">Full range of controls</a></li>
<li><a href="../examples/custom-control.html">Custom controls #1</a></li>
<li><a href="../examples/custom-control.html">Custom controls #2</a></li>
<li><a href="../examples/custom-style.html">Custom control styles</a></li>
<li><a href="../examples/click.html">Trapping click events</a></li>
<li><a href="../examples/layerLoadMonitoring.html">Tracking map events</a></li>
</ol>
<h2>Vector Layers</h2>
<ol>
<li><a href="../examples/vector-features.html">Generating features in JavaScript</a></li>
<li><a href="../examples/gml-layer.html">Loading features from GML</a></li>
<li><a href="../examples/kml-layer.html">Loading features from KML</a></li>
<li><a href="../examples/gml-serialize.html">Serializing features to GML</a></li>
<li><a href="../examples/vector-formats.html">Serializing to other formats</a></li>
<li><a href="../examples/select-feature.html">Selecting features</a></li>
<li><a href="../examples/select-feature-openpopup.html">Attaching popups to features</a></li>
</ol>
<h2>Editing Tools</h2>
<ol>
<li><a href="../examples/draw-feature.html">Drawing features</a></li>
<li><a href="../examples/editingtoolbar.html">Editing toolbar</a> (<a href="editingtoolbar-outside.html">outside the map</a>)</li>
<li><a href="../examples/regular-polygons.html">Creating regular polygons</a></li>
<li><a href="../examples/modify-feature.html">Modifying features</a></li>
<li><a href="../examples/resize-features.html">Resizing features</a></li>
<li><a href="../examples/rotate-features.html">Rotating features</a></li>
<li><a href="../examples/wfs-t.html">Transactional WFS example</a></li>
<li><a href="http://featureserver.org/">FeatureServer</a></li>
</ol>
<h2>Testing</h2>
<ol>
<li><a href="../tests/run-tests.html">Test.AnotherWay suite</a></li>
</ol>
<h1><pre style="font-size: larger">&lt;/ol&gt;</pre></h1>
</body>
</html>

View File

@@ -1,4 +1,4 @@
Format: 1.35
Format: Development Release 12-07-2007 (1.35 base)
# This is the Natural Docs languages file for this project. If you change
# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change

View File

@@ -1,4 +1,4 @@
Format: 1.35
Format: Development Release 12-07-2007 (1.35 base)
Title: OpenLayers
@@ -8,6 +8,22 @@ SubTitle: JavaScript Mapping Library
# Footer: [text]
# If you want to add a copyright notice, this would be the place to do it.
# You can add a timestamp to your documentation like one of these:
# Timestamp: Generated on month day, year
# Timestamp: Updated mm/dd/yyyy
# Timestamp: Last updated mon day
#
# m - One or two digit month. January is "1"
# mm - Always two digit month. January is "01"
# mon - Short month word. January is "Jan"
# month - Long month word. January is "January"
# d - One or two digit day. 1 is "1"
# dd - Always two digit day. 1 is "01"
# day - Day with letter extension. 1 is "1st"
# yy - Two digit year. 2006 is "06"
# yyyy - Four digit year. 2006 is "2006"
# year - Four digit year. 2006 is "2006"
# --------------------------------------------------------------------------
#
@@ -50,55 +66,87 @@ Group: OpenLayers {
Group: Control {
File: Control (OpenLayers/Control.js)
File: Control (no auto-title, OpenLayers/Control.js)
File: ArgParser (no auto-title, OpenLayers/Control/ArgParser.js)
File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js)
File: OverviewMap (no auto-title, OpenLayers/Control/OverviewMap.js)
File: Attribution (no auto-title, OpenLayers/Control/Attribution.js)
File: Button (no auto-title, OpenLayers/Control/Button.js)
File: DragFeature (no auto-title, OpenLayers/Control/DragFeature.js)
File: DragPan (no auto-title, OpenLayers/Control/DragPan.js)
File: DrawFeature (no auto-title, OpenLayers/Control/DrawFeature.js)
File: EditingToolbar (no auto-title, OpenLayers/Control/EditingToolbar.js)
File: KeyboardDefaults (no auto-title, OpenLayers/Control/KeyboardDefaults.js)
File: LayerSwitcher (no auto-title, OpenLayers/Control/LayerSwitcher.js)
File: ModifyFeature (no auto-title, OpenLayers/Control/ModifyFeature.js)
File: MouseDefaults (no auto-title, OpenLayers/Control/MouseDefaults.js)
File: MousePosition (no auto-title, OpenLayers/Control/MousePosition.js)
File: MouseToolbar (no auto-title, OpenLayers/Control/MouseToolbar.js)
File: Navigation (no auto-title, OpenLayers/Control/Navigation.js)
File: NavigationHistory (no auto-title, OpenLayers/Control/NavigationHistory.js)
File: NavToolbar (no auto-title, OpenLayers/Control/NavToolbar.js)
File: OverviewMap (no auto-title, OpenLayers/Control/OverviewMap.js)
File: Panel (no auto-title, OpenLayers/Control/Panel.js)
File: PanZoom (no auto-title, OpenLayers/Control/PanZoom.js)
File: PanZoomBar (no auto-title, OpenLayers/Control/PanZoomBar.js)
File: Permalink (no auto-title, OpenLayers/Control/Permalink.js)
File: Scale (no auto-title, OpenLayers/Control/Scale.js)
File: ScaleLine (no auto-title, OpenLayers/Control/ScaleLine.js)
File: SelectFeature (no auto-title, OpenLayers/Control/SelectFeature.js)
File: ZoomBox (no auto-title, OpenLayers/Control/ZoomBox.js)
File: PanZoom (no auto-title, OpenLayers/Control/PanZoom.js)
File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js)
} # Group: Control
File: Events (no auto-title, OpenLayers/Events.js)
Group: Feature {
File: Feature (OpenLayers/Feature.js)
File: WFS (no auto-title, OpenLayers/Feature/WFS.js)
File: Feature (no auto-title, OpenLayers/Feature.js)
File: Vector (no auto-title, OpenLayers/Feature/Vector.js)
File: WFS (no auto-title, OpenLayers/Feature/WFS.js)
} # Group: Feature
Group: Filter {
File: Filter (no auto-title, OpenLayers/Filter.js)
File: Comparison (no auto-title, OpenLayers/Filter/Comparison.js)
File: FeatureId (no auto-title, OpenLayers/Filter/FeatureId.js)
File: Logical (no auto-title, OpenLayers/Filter/Logical.js)
} # Group: Filter
Group: Format {
File: Format (OpenLayers/Format.js)
File: Format (no auto-title, OpenLayers/Format.js)
File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js)
File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js)
File: GML (no auto-title, OpenLayers/Format/GML.js)
File: JSON (no auto-title, OpenLayers/Format/JSON.js)
File: KML (no auto-title, OpenLayers/Format/KML.js)
File: OSM (no auto-title, OpenLayers/Format/OSM.js)
Group: SLD {
File: SLD (no auto-title, OpenLayers/Format/SLD.js)
File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js)
} # Group: SLD
File: Text (no auto-title, OpenLayers/Format/Text.js)
File: WFS (no auto-title, OpenLayers/Format/WFS.js)
File: WKT (no auto-title, OpenLayers/Format/WKT.js)
File: XML (no auto-title, OpenLayers/Format/XML.js)
Group: WMC {
File: WMC (no auto-title, OpenLayers/Format/WMC.js)
File: v1 (no auto-title, OpenLayers/Format/WMC/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/WMC/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WMC/v1_1_0.js)
} # Group: WMC
} # Group: Format
Group: Geometry {
File: Geometry (OpenLayers/Geometry.js)
File: Geometry (no auto-title, OpenLayers/Geometry.js)
File: Collection (no auto-title, OpenLayers/Geometry/Collection.js)
File: Curve (no auto-title, OpenLayers/Geometry/Curve.js)
File: LinearRing (no auto-title, OpenLayers/Geometry/LinearRing.js)
@@ -109,15 +157,16 @@ Group: OpenLayers {
File: Point (no auto-title, OpenLayers/Geometry/Point.js)
File: Polygon (no auto-title, OpenLayers/Geometry/Polygon.js)
File: Rectangle (no auto-title, OpenLayers/Geometry/Rectangle.js)
File: Surface (no auto-title, OpenLayers/Geometry/Surface.js)
} # Group: Geometry
Group: Handler {
File: Handler (OpenLayers/Handler.js)
File: Handler (no auto-title, OpenLayers/Handler.js)
File: Box (no auto-title, OpenLayers/Handler/Box.js)
File: Click (no auto-title, OpenLayers/Handler/Click.js)
File: Drag (no auto-title, OpenLayers/Handler/Drag.js)
File: Feature (no auto-title, OpenLayers/Handler/Feature.js)
File: Hover (no auto-title, OpenLayers/Handler/Hover.js)
File: Keyboard (no auto-title, OpenLayers/Handler/Keyboard.js)
File: MouseWheel (no auto-title, OpenLayers/Handler/MouseWheel.js)
File: Path (no auto-title, OpenLayers/Handler/Path.js)
@@ -128,9 +177,19 @@ Group: OpenLayers {
File: Icon (no auto-title, OpenLayers/Icon.js)
Group: Lang {
File: Lang (no auto-title, OpenLayers/Lang.js)
File: Lang["cs-CZ"] (OpenLayers/Lang/cs-CZ.js)
File: Lang["de"] (no auto-title, OpenLayers/Lang/de.js)
File: Lang["en"] (no auto-title, OpenLayers/Lang/en.js)
File: Lang["en-CA"] (no auto-title, OpenLayers/Lang/en-CA.js)
File: Lang["fr"] (no auto-title, OpenLayers/Lang/fr.js)
} # Group: Lang
Group: Layer {
File: Layer (OpenLayers/Layer.js)
File: Layer (no auto-title, OpenLayers/Layer.js)
File: Boxes (no auto-title, OpenLayers/Layer/Boxes.js)
File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js)
File: FixedZoomLevels (no auto-title, OpenLayers/Layer/FixedZoomLevels.js)
@@ -141,10 +200,12 @@ Group: OpenLayers {
File: HTTPRequest (no auto-title, OpenLayers/Layer/HTTPRequest.js)
File: Image (no auto-title, OpenLayers/Layer/Image.js)
File: KaMap (no auto-title, OpenLayers/Layer/KaMap.js)
File: MapGuide (no auto-title, OpenLayers/Layer/MapGuide.js)
File: MapServer (no auto-title, OpenLayers/Layer/MapServer.js)
File: MapServer.Untiled (no auto-title, OpenLayers/Layer/MapServer/Untiled.js)
File: Markers (no auto-title, OpenLayers/Layer/Markers.js)
File: MultiMap (no auto-title, OpenLayers/Layer/MultiMap.js)
File: PointTrack (no auto-title, OpenLayers/Layer/PointTrack.js)
File: SphericalMercator (no auto-title, OpenLayers/Layer/SphericalMercator.js)
File: Text (no auto-title, OpenLayers/Layer/Text.js)
File: TileCache (no auto-title, OpenLayers/Layer/TileCache.js)
@@ -168,27 +229,36 @@ Group: OpenLayers {
Group: Popup {
File: Popup (OpenLayers/Popup.js)
File: Popup (no auto-title, OpenLayers/Popup.js)
File: Anchored (no auto-title, OpenLayers/Popup/Anchored.js)
File: AnchoredBubble (no auto-title, OpenLayers/Popup/AnchoredBubble.js)
File: Framed (OpenLayers/Popup/Framed.js)
File: FramedCloud (OpenLayers/Popup/FramedCloud.js)
} # Group: Popup
File: Projection (no auto-title, OpenLayers/Projection.js)
Group: Renderer {
File: Renderer (OpenLayers/Renderer.js)
File: Renderer (no auto-title, OpenLayers/Renderer.js)
File: Elements (no auto-title, OpenLayers/Renderer/Elements.js)
File: SVG (no auto-title, OpenLayers/Renderer/SVG.js)
File: VML (no auto-title, OpenLayers/Renderer/VML.js)
} # Group: Renderer
File: Rule (no auto-title, OpenLayers/Rule.js)
File: Style (no auto-title, OpenLayers/Style.js)
File: StyleMap (no auto-title, OpenLayers/StyleMap.js)
Group: Tile {
File: Tile (OpenLayers/Tile.js)
File: Tile (no auto-title, OpenLayers/Tile.js)
File: Image (no auto-title, OpenLayers/Tile/Image.js)
File: WFS (no auto-title, OpenLayers/Tile/WFS.js)
} # Group: Tile
File: Util (OpenLayers/Util.js)
File: Tween (no auto-title, OpenLayers/Tween.js)
File: Util (no auto-title, OpenLayers/Util.js)
} # Group: OpenLayers
Group: Index {

View File

@@ -1,4 +1,4 @@
Format: 1.35
Format: Development Release 12-07-2007 (1.35 base)
# This is the Natural Docs topics file for this project. If you change anything
# here, it will apply to THIS PROJECT ONLY. If you'd like to change something
@@ -55,9 +55,6 @@ Format: 1.35
# Class Hierarchy: [yes|no]
# Whether the topics are part of the class hierarchy. Defaults to no.
#
# Variable Type: [yes|no]
# Whether the topics can be a variable type. Defaults to no.
#
# Page Title If First: [yes|no]
# Whether the topic's title becomes the page title if it's the first one in
# a file. Defaults to no.

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers GML Parser</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
@@ -21,7 +23,7 @@
}
html += "</ul>"
}
document.body.innerHTML = html;
document.getElementById('output').innerHTML = html;
}
function load() {
OpenLayers.loadURL("gml/owls.xml", "", null, parseData);
@@ -29,5 +31,19 @@
</script>
</head>
<body onload="load()">
<h1 id="title">GML Parser Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate the operation of the GML parser.
</p>
<div id="output"></div>
<div id="docs">
This script reads data from a GML file and parses out the coordinates, appending them to a HTML string with markup tags.
This markup is dumped to an element in the page.
</div>
</body>
</html>

View File

@@ -1,27 +1,26 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<title>OpenLayers KML Parser Example</title>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function parseData(req) {
g = new OpenLayers.Format.KML();
g = new OpenLayers.Format.KML({extractStyles: true});
html = ""
features = g.read(req.responseText);
for(var feat in features) {
html += "Feature: Geometry: "+ features[feat].geometry+",";
html += "<ul>";
for (var j in features[feat].attributes) {
html += "<li>"+j+":"+features[feat].attributes[j]+"</li>";
html += "<li>Attribute "+j+":"+features[feat].attributes[j]+"</li>";
}
html += "</ul>"
html += "<ul>";
for (var j in features[feat].style) {
html += "<li>Style "+j+":"+features[feat].style[j]+"</li>";
}
html += "</ul>"
}
document.body.innerHTML = html;
document.getElementById('output').innerHTML = html;
}
function load() {
OpenLayers.loadURL("kml/lines.kml", "", null, parseData);
@@ -29,5 +28,19 @@
</script>
</head>
<body onload="load()">
<h1 id="title">KML Parser Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate the operation of the KML parser.
</p>
<div id="output"></div>
<div id="docs">
This script reads data from a KML file and parses out the coordinates, appending them to a HTML string with markup tags.
This markup is dumped to an element in the page.
</div>
</body>
</html>

View File

@@ -1,9 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Accessible Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 256px;
height: 512px;
border: 1px solid #eee;
}
table {
@@ -25,6 +28,10 @@
a:hover {
text-decoration: underline;
}
a.api {
font-size:1em;
text-decoration:underline;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
@@ -45,7 +52,15 @@
</script>
</head>
<body onload="init()">
<h3>OpenLayers Example</h3>
<h1 id="title">Accessible Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrate how to use the KeyboardDefaults option parameter for layer types.
</p>
<table>
<tbody>
<tr>
@@ -95,6 +110,8 @@
</tr>
</tbody>
</table>
<div id="docs">
<p>Navigate the map in one of three ways:
<ul>
<li>Click on the named links to zoom and pan</li>
@@ -120,5 +137,8 @@
</li>
</ul>
</p>
This is an example of using alternate methods to control panning and zooming. This approach uses map.pan() and map.zoom(). You'll note that to pan, additional math is necessary along with map.size() in order to set the distance to pan.
</div>
</body>
</html>

View File

@@ -0,0 +1,103 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Animated Panning of the Map via map.panTo</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 256px;
border: 1px solid black;
}
#map2 {
width: 512px;
height: 256px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer, running = false;
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'delay': 200
},
initialize: function(options) {
this.handlerOptions = OpenLayers.Util.extend(
{}, this.defaultHandlerOptions
);
OpenLayers.Control.prototype.initialize.apply(
this, arguments
);
this.handler = new OpenLayers.Handler.Click(
this, {
'click': this.onClick
}, this.handlerOptions
);
},
onClick: function(evt) {
map.panTo(map.getLonLatFromPixel(evt.xy));
}
});
function init(){
map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.zoomToMaxExtent();
var click = new OpenLayers.Control.Click();
map.addControl(click);
click.activate();
map.addControl(new OpenLayers.Control.OverviewMap());
map2 = new OpenLayers.Map('map2', {'panMethod': null} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map2.addLayer(layer);
map2.zoomToMaxExtent();
}
function setCenterInterval() {
if (!running) {
setCenter();
running = setInterval('setCenter()', 500);
} else {
clearInterval(running);
running = false;
}
}
function setCenter() {
var lon = Math.random() * 360 - 180;
var lat = Math.random() * 180 - 90;
var lonlat = new OpenLayers.LonLat(lon, lat);
map.panTo(lonlat);
}
</script>
</head>
<body onload="init()">
<h1 id="title">map.panTo Example</h1>
<div id="tags">map.panTo</div>
<div id="shortdesc">Show animated panning effects in the map</div>
<div id="map"></div>
<div id="docs">
<p>This is an example of transition effects. If the new random center is in the current extent, the map will pan smoothly. <br />
The random selection will continue until you press it again. Additionally, you can single click in the map to pan smoothly
to that area, or use the pan control to pan smoothly.
</p>
</div>
<button onclick="setCenterInterval()">Start/stop random recenter</button>
<div id="map2"></div>
<div>
<p>To turn off Animated Panning, create a map with an panMethod set to
null. </p>
</div>
</body>
</html>

View File

@@ -1,5 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Attribution Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -18,8 +21,8 @@
{'attribution': 'Provided by <a href="http://labs.metacarta.com/">MetaCarta</a>'});
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"},{attribution:"Provided by NASA"});
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"},{attribution:"Provided by Telascience"});
map.addLayers([ol_wms, jpl_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
@@ -30,7 +33,21 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<h1 id="title">Attribution Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Shows the use of the attribution layer option on a number of layer types.
</p>
<div id="map"></div>
<div id="docs">
This is an example of how to add an attribution block to the OpenLayers window. In order to use an
attribution block, an attribution parameter must be set in each layer that requires attribution. In
addition, an attribution control must be added to the map.
</div>
</body>
</html>

View File

@@ -1,12 +1,19 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Base Layers Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 100%;
width: 512;
height: 512px;
border: 1px solid black;
background-color: blue;
}
#controls
{
width: 512px;
}
</style>
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
@@ -72,9 +79,23 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers With WMS, Google, VE Example</h1>
<h1 id="title">Base Layers Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
This example shows the use base layers from multiple commercial map image providers.
</p>
<div id="controls">
<div id="map"></div>
<div style="background-color:green" onclick="add()"> click to add a marker to the map</div>
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
</div>
<div id="docs">
</div>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Boxes Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var box_extents = [
[-10, 50, 5, 60],
[-75, 41, -71, 44],
[-122.6, 37.6, -122.3, 37.9],
[10, 10, 20, 20]
];
var map;
function init(){
map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
var boxes = new OpenLayers.Layer.Vector( "Boxes" );
for (var i = 0; i < box_extents.length; i++) {
ext = box_extents[i];
bounds = new OpenLayers.Bounds(ext[0], ext[1], ext[2], ext[3]);
box = new OpenLayers.Feature.Vector(bounds.toGeometry());
boxes.addFeatures(box);
}
map.addLayers([ol_wms, boxes]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
var sf = new OpenLayers.Control.SelectFeature(boxes);
map.addControl(sf);
sf.activate();
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h1 id="title">Boxes Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrate marker and box type annotations on a map.
</p>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Boxes Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -41,7 +43,17 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<h1 id="title">Boxes Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrate marker and box type annotations on a map.
</p>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,9 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Buffer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 694px;
height: 464px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
@@ -34,8 +36,20 @@
</script>
</head>
<body onload="init()">
<h1 id="title">Buffer Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
This example shows the use of the buffer layer option for any layer that inherits from OpenLayers.Layer.Grid.
</p>
<div id="map"></div>
<p>Use the buffer property to control how many tiles are included
outside the visible map area. Default is 2</p>
<div id="docs">
Use the buffer property to control how many tiles are included
outside the visible map area. Default is 2.
</div>
</body>
</html>

226
examples/click-handler.html Normal file
View File

@@ -0,0 +1,226 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Click Handler Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 340px;
height: 170px;
border: 1px solid gray;
}
#west {
width: 350px;
}
#east {
position: absolute;
left: 370px;
top: 3em;
}
table td {
text-align: center;
margin: 0;
border: 1px solid gray;
}
textarea.output {
text-align: left;
font-size: 0.9em;
width: 250px;
height: 65px;
overflow: auto;
}
</style>
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'double': false,
'pixelTolerance': 0,
'stopSingle': false,
'stopDouble': false
},
initialize: function(options) {
this.handlerOptions = OpenLayers.Util.extend(
{}, this.defaultHandlerOptions
);
OpenLayers.Control.prototype.initialize.apply(
this, arguments
);
this.handler = new OpenLayers.Handler.Click(
this, {
'click': this.onClick,
'dblclick': this.onDblclick
}, this.handlerOptions
);
},
onClick: function(evt) {
var output = document.getElementById(this.key + "Output");
var msg = "click " + evt.xy;
output.value = output.value + msg + "\r\n";
},
onDblclick: function(evt) {
var output = document.getElementById(this.key + "Output");
var msg = "dblclick " + evt.xy;
output.value = output.value + msg + "\n";
}
});
var map, controls;
function init(){
map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'}
);
map.addLayers([layer]);
controls = {
"single": new OpenLayers.Control.Click({
hanlerOptions: {
"single": true
}
}),
"double": new OpenLayers.Control.Click({
handlerOptions: {
"single": false,
"double": true
}
}),
"both": new OpenLayers.Control.Click({
handlerOptions: {
"single": true,
"double": true
}
}),
"drag": new OpenLayers.Control.Click({
handlerOptions: {
"single": true,
"pixelTolerance": null
}
}),
"stopsingle": new OpenLayers.Control.Click({
handlerOptions: {
"single": true,
"stopSingle": true
}
}),
"stopdouble": new OpenLayers.Control.Click({
handlerOptions: {
"single": false,
"double": true,
"stopDouble": true
}
})
};
var props = document.getElementById("props");
var control;
for(var key in controls) {
control = controls[key];
// only to route output here
control.key = key;
map.addControl(control);
}
map.zoomToMaxExtent();
}
function toggle(key) {
var control = controls[key];
if(control.active) {
control.deactivate();
} else {
control.activate();
}
var status = document.getElementById(key + "Status");
status.innerHTML = control.active ? "on" : "off";
var output = document.getElementById(key + "Output");
output.value = "";
}
</script>
</head>
<body onload="init()">
<h1 id="title">Click Handler Example</h1>
<div id="west">
<div id="tags">
</div>
<p id="shortdesc">
This example shows the use of the click handler.
</p>
<div id="map"></div>
<p>
The click handler can be used to gain more flexibility over handling
click events. The handler can be constructed with options to handle
only single click events, to handle single and double-click events,
to ignore clicks that include a drag, and to stop propagation of
single and/or double-click events. A single click is a click that
is not followed by another click for more than 300ms. This delay
is configured with the delay property.
</p>
<p>
The options to stop single and double clicks have to do with
stopping event propagation on the map events listener queue
(not stopping events from cascading to other elements). The
ability to stop an event from propagating has to do with the
order in which listeners are registered. With stopSingle or
stopDouble true, a click handler will stop propagation to all
listeners that were registered (or all handlers that were
activated) before the click handler was activated. So, for
example, activating a click handler with stopDouble true after
the navigation control is active will stop double-clicks from
zooming in.
</p>
</div>
<div id="east">
<table>
<caption>Controls with click handlers (toggle on/off to clear output)</caption>
<tbody>
<tr>
<td>single only</td>
<td><button id="singleStatus" onclick="toggle('single')">off</button></td>
<td><textarea class="output" id="singleOutput"></textarea></td>
</tr>
<tr>
<td>double only</td>
<td><button id="doubleStatus" onclick="toggle('double')">off</button></td>
<td><textarea class="output" id="doubleOutput"></textarea></td>
</tr>
<tr>
<td>both</td>
<td><button id="bothStatus" onclick="toggle('both')">off</button></td>
<td><textarea class="output" id="bothOutput"></textarea></td>
</tr>
<tr>
<td>single with drag</td>
<td><button id="dragStatus" onclick="toggle('drag')">off</button></td>
<td><textarea class="output" id="dragOutput"></textarea></td>
</tr>
<tr>
<td>single with stop</td>
<td><button id="stopsingleStatus" onclick="toggle('stopsingle')">off</button></td>
<td><textarea class="output" id="stopsingleOutput"></textarea></td>
</tr>
<tr>
<td>double with stop</td>
<td><button id="stopdoubleStatus" onclick="toggle('stopdouble')">off</button></td>
<td><textarea class="output" id="stopdoubleOutput"></textarea></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

View File

@@ -1,5 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Click Event Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -9,6 +12,36 @@
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'double': false,
'pixelTolerance': 0,
'stopSingle': false,
'stopDouble': false
},
initialize: function(options) {
this.handlerOptions = OpenLayers.Util.extend(
{}, this.defaultHandlerOptions
);
OpenLayers.Control.prototype.initialize.apply(
this, arguments
);
this.handler = new OpenLayers.Handler.Click(
this, {
'click': this.trigger,
}, this.handlerOptions
);
},
trigger: function(e) {
var lonlat = map.getLonLatFromViewPortPx(e.xy);
alert("You clicked near " + lonlat.lat + " N, " +
+ lonlat.lon + " E");
},
});
var map;
function init(){
map = new OpenLayers.Map('map');
@@ -17,8 +50,8 @@
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"});
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"});
jpl_wms.setVisibility(false);
@@ -26,16 +59,29 @@
map.addControl(new OpenLayers.Control.LayerSwitcher());
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.zoomToMaxExtent();
map.events.register("click", map, function(e) {
var lonlat = map.getLonLatFromViewPortPx(e.xy);
alert("You clicked near " + lonlat.lat + " N, " +
+ lonlat.lon + " E");
});
var click = new OpenLayers.Control.Click();
map.addControl(click);
click.activate();
}
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<h1 id="title">Click Event Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
This example shows the use of the click handler and getLonLatFromViewPortPx functions to trigger events on mouse click.
</p>
<div id="map"></div>
<div id="docs">
Using the Click handler allows you to (for example) catch clicks without catching double clicks, something that standard browser events don't do for you. (Try double clicking: you'll zoom in, whereas using the browser click event, you would just get two alerts.) This example click control shows you how to use it.
</div>
</body>
</html>

View File

@@ -1,5 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Map Controls Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -17,6 +20,7 @@
map.addControl(new OpenLayers.Control.MouseToolbar());
map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
map.addControl(new OpenLayers.Control.Permalink());
map.addControl(new OpenLayers.Control.ScaleLine());
map.addControl(new OpenLayers.Control.Permalink('permalink'));
map.addControl(new OpenLayers.Control.MousePosition());
map.addControl(new OpenLayers.Control.OverviewMap());
@@ -25,11 +29,9 @@
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"});
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"});
var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
{layers: "bathymetry,land_fn,park,drain_fn,drainage," +
@@ -45,8 +47,18 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<h1 id="title">Map Controls Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Attach zooming, panning, layer switcher, overview map, and permalink map controls to an OpenLayers window.
</p>
<a style="float:right" href="" id="permalink">Permalink</a>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,15 +1,16 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Custom Control Point Examle</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
@@ -41,11 +42,21 @@
map.addControl(control);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<h1 id="title">Custom Control Point Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrate the addition of a point reporting control to the OpenLayers window.
</p>
<div id="map"></div>
<div id="bounds"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,15 +1,16 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Custom Control Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
@@ -32,7 +33,12 @@
},
notice: function (bounds) {
alert(bounds);
var ll = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom));
var ur = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top));
alert(ll.lon.toFixed(4) + ", " +
ll.lat.toFixed(4) + ", " +
ur.lon.toFixed(4) + ", " +
ur.lat.toFixed(4));
}
});
@@ -40,10 +46,20 @@
map.addControl(control);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<h1 id="title">Custom Control Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrate the addition of a draggable rectangle to the OpenLayers window.
</p>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,10 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Custom Style Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 500px;
height: 350px;
width: 512px;
height: 512px;
border: 1px solid gray;
}
p {
@@ -18,7 +20,6 @@
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
@@ -34,11 +35,21 @@
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<h1 id="title">Custom Style Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrate changing CSS styles on controls in the OpenLayers window.
</p>
<div id="map"></div>
<div id="docs">
<p>If you care to modify the style of any OpenLayers element, include
the default stylesheet as a link and declare any style modifications
below that link. These style declarations can be in other linked
@@ -49,5 +60,6 @@
<p>This example shows how to declare the font family, size, and color
for the mouse position. Note that only the style keys that you want to
modify (change from the default) need to be specified.</p>
</div>
</body>
</html>

View File

@@ -2,10 +2,11 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Debug Example</title>
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
function consoleLog() {
OpenLayers.Console.log("This is the result of an OpenLayers.Console.log() call");
}
@@ -21,16 +22,23 @@
function consoleDirxml() {
OpenLayers.Console.dirxml(document.getElementsByTagName('body')[0]);
}
// -->
</script>
</head>
<body>
<h1>OpenLayers Debug Example</h1>
<h1 id="title">Debug Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate console calls to a Firebug console. Requires Firefox. Mostly for developers.
</p>
<div id="docs">
<p>To run OpenLayers in debug mode, include the following script
tag <b>before</b> the tag that loads OpenLayers:
<pre>
&lt;script src="../lib/Firebug/firebug.js"&gt;&lt;/script&gt;
</pre>
<pre> &lt;script src="../lib/Firebug/firebug.js"&gt;&lt;/script&gt;</pre>
The path to firebug.js must be relative to your
html file. With this script included calls to OpenLayers.Console
will be displayed in the Firebug console. For browsers without
@@ -60,5 +68,6 @@
<p>The Firebug website has a complete list of
<a href="http://www.getfirebug.com/console.html">console calls</a>.
Note that not all are supported with Firebug Lite.</p>
</div>
</body>
</html>

View File

@@ -1,9 +1,27 @@
<html>
<head>
<script src="../lib/OpenLayers.js"></script>
</head>
<body>
<div style="width:100%; height:100%" id="map"></div>
<head>
<title>OpenLayers Double Set Center Example</title>
<script src="../lib/OpenLayers.js"></script>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width:512px;
height:521px;
}
</style>
</head>
<body>
<h1 id="title">Double Set Center Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate the behavior of two calls to set the center after instatiating the layer object.
</p>
<div id="map"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
@@ -12,6 +30,8 @@
map.setCenter(new OpenLayers.LonLat(100,10));
map.setCenter(new OpenLayers.LonLat(1,1));
</script>
</body>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,10 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Drag Feature</title>
<title>Drag Feature Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 350px;
height: 512px;
border: 1px solid gray;
}
#controls {
@@ -19,7 +21,6 @@
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, vectors, controls;
function init(){
map = new OpenLayers.Map('map');
@@ -60,13 +61,19 @@
}
}
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers Drag Feature Example</h1>
<h1 id="title">Drag Feature Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrates point, line and polygon creation and editing.
</p>
<div id="map"></div>
<div id="controls">
<ul id="controlToggle">
<li>
@@ -93,5 +100,7 @@
</li>
</ul>
</div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,9 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Draw Feature Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 350px;
height: 512px;
border: 1px solid gray;
}
#controlToggle li {
@@ -15,7 +18,6 @@
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, drawControls;
OpenLayers.Util.onImageLoadErrorColor = "transparent";
function init(){
@@ -61,12 +63,19 @@
}
}
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers Draw Feature Example</h1>
<h1 id="title">OpenLayers Draw Feature Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate on-screen digitizing tools for point, line, and polygon creation.
</p>
<div id="map"></div>
<ul id="controlToggle">
<li>
<input type="radio" name="type" value="none" id="noneToggle"
@@ -86,11 +95,13 @@
<label for="polygonToggle">draw polygon</label>
</li>
</ul>
<div id="docs">
<p>Feature digitizing is in freehand mode by default. In freehand mode, the mouse is treated as a pen.
Drawing begins on mouse down, continues with every mouse move, and ends with mouse up.</p>
<p>To turn freehand mode off, hold down the shift key while digitizing. With freehand mode off, one
vertex is added with each click and double-clicks finish drawing. Freehand mode can be toggled on and off
at any time while drawing.</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,52 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
.olControlEditingToolbar {
float:left;
right: 0px;
height: 30px;
width: 150px;
}
#map {
width: 512px;
height: 256px;
border: 1px solid gray;
}
</style>
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map('map', {theme: null});
layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: "basic"}
);
map.addLayer(layer);
vlayer = new OpenLayers.Layer.Vector( "Editable" );
map.addLayer(vlayer);
var container = document.getElementById("panel");
var panel = new OpenLayers.Control.EditingToolbar(
vlayer, {div: container}
);
map.addControl(panel);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
</script>
</head>
<body onload="init()">
<h3>OpenLayers EditingToolbar Outside Viewport</h3>
<div id="map"></div>
<div id="panel" class="olControlEditingToolbar"></div>
</body>
</html>

View File

@@ -1,17 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Editing Toolbar Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/Firebug/debug.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
@@ -30,11 +32,20 @@
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<h1 id="title">Editing Toolbar Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate polygon, polyline and point creation and editing tools.
</p>
<div id="panel"></div>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

154
examples/events.html Normal file
View File

@@ -0,0 +1,154 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Event Handling</title>
<style type="text/css">
#map {
width: 512px;
height: 256px;
border: 1px solid gray;
}
#panel {
margin: 5px;
height: 30px;
width: 200px;
}
#panel div {
float: left;
margin-left: 5px;
width: 25px;
height: 25px;
border: 1px solid gray;
}
#output {
position: absolute;
left: 550px;
top: 40px;
width: 350px;
height: 400px;
}
div.blueItemInactive {
background-color: #aac;
}
div.blueItemActive {
background-color: #33c;
}
div.orangeItemInactive {
background-color: #ca6;
}
div.orangeItemActive {
background-color: #ea0;
}
div.greenItemInactive {
background-color: #aca;
}
div.greenItemActive {
background-color: #3c3;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, panel;
function init(){
// define custom map event listeners
function mapEvent(event) {
log(event.type);
}
function mapBaseLayerChanged(event) {
log(event.type + " " + event.layer.name);
}
function mapLayerChanged(event) {
log(event.type + " " + event.layer.name + " " + event.property);
}
map = new OpenLayers.Map('map', {
eventListeners: {
"moveend": mapEvent,
"zoomend": mapEvent,
"changelayer": mapLayerChanged,
"changebaselayer": mapBaseLayerChanged
}
});
panel = new OpenLayers.Control.Panel(
{div: document.getElementById("panel")}
);
// define custom event listeners
function toolActivate(event) {
log("activate " + event.object.displayClass);
}
function toolDeactivate(event) {
log("deactivate " + event.object.displayClass);
}
// Multiple objects can share listeners with the same scope
var toolListeners = {
"activate": toolActivate,
"deactivate": toolDeactivate
};
var blue = new OpenLayers.Control({
type: OpenLayers.Control.TYPE_TOGGLE,
eventListeners: toolListeners,
displayClass: "blue"
});
var orange = new OpenLayers.Control({
type: OpenLayers.Control.TYPE_TOGGLE,
eventListeners: toolListeners,
displayClass: "orange"
});
var green = new OpenLayers.Control({
type: OpenLayers.Control.TYPE_TOGGLE,
eventListeners: toolListeners,
displayClass: "green"
});
// add buttons to a panel
panel.addControls([blue, orange, green]);
map.addControl(panel);
var vmap = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'}
);
var landsat = new OpenLayers.Layer.WMS(
"NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"}
);
var nexrad = new OpenLayers.Layer.WMS(
"Nexrad",
"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi",
{layers:"nexrad-n0r-wmst", transparent: "TRUE", format: 'image/png'},
{isBaseLayer: false}
);
map.addLayers([vmap, landsat, nexrad]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}
function log(msg) {
document.getElementById("output").innerHTML += msg + "\n";
}
</script>
</head>
<body onload="init()">
<h1 id="title">Event Handling</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrating various styles of event handling in OpenLayers.
</p>
<div id="map"></div>
<div id="panel"></div>
<textarea id="output"></textarea>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -13,7 +15,6 @@
// debugging/inspecting in Firebug
var map = null;
<!--
function init(){
//set title name to include Browser Detection
@@ -59,8 +60,8 @@
resolutions: [0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101]
};
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"}, options2);
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"}, options2);
var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
@@ -75,15 +76,20 @@
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.zoomToMaxExtent();
}
// -->
</script>
</head>
<body onload="init()">
<table><tr><td>
<h1>OpenLayers Example</h1>
</td><td>
<h3 id="browserHeader"></h3>
</td></tr></table>
<h1 id="title" style="display:inline;">OpenLayers Example</h1>
<h3 id="browserHeader" style="display:inline;"></h3>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a simple map with an overlay that includes layer switching controls.
</p>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -0,0 +1,73 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 256px;
border: 1px solid gray;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init() {
map = new OpenLayers.Map('map',
{controls: [new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar()],
numZoomLevels: 10 });
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'}
);
map.addLayers([wms]);
map.events.register("moveend", null, displayZoom);
map.zoomToMaxExtent();
update(document.getElementById("fractional"));
}
function displayZoom() {
document.getElementById("zoom").innerHTML = map.zoom.toFixed(4);
}
function update(input) {
map.fractionalZoom = input.checked;
map.zoomTo(Math.round(map.zoom));
}
</script>
</head>
<body onload="init()">
<h1 id="title">Fractional Zoom Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Shows the use of a map with fractional (or non-discrete) zoom levels.
</p>
<div id="map"></div>
<input type="checkbox" name="fractional"
id="fractional" checked="checked" onclick="update(this)" />
<label for="fractional">Fractional Zoom</label>
(zoom: <span id="zoom"></span>)
<br /><br />
<div id="docs">
<p>
Setting the map.fractionalZoom property to true allows zooming to
an arbitrary level (between the min and max resolutions). This
can be demonstrated by shift-dragging a box to zoom to an arbitrary
extent.
</p>
</div>
</body>
</html>

View File

@@ -1,11 +1,21 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Full Screen Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 100%;
height: 100%;
border: 1px solid black;
}
#text {
position: absolute;
bottom: 0px;
left:0px;
width: 512px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
@@ -14,11 +24,11 @@
map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com:80/wms/vmap0?", {layers: 'basic'});
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"});
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"});
var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
@@ -35,5 +45,20 @@
</head>
<body onload="init()">
<div id="map"></div>
<div id="text">
<h1 id="title">Full Screen Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a map that fill the entire browser window.
</p>
<div id="docs">
This example uses CSS to define the dimensions of the map element in order to fill the screen.
When the user resizes the window, the map size changes correspondingly. No scroll bars!
</div>
</div>
</body>
</html>

52
examples/fullScreen2.html Normal file
View File

@@ -0,0 +1,52 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Full Screen Example 2</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 100%;
height: 100%;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init(){
map = new OpenLayers.Map('map');
var options = {numZoomLevels: 3};
var docImage = new OpenLayers.Layer.Image(
'Full Screen',
'fullscreen.jpg',
new OpenLayers.Bounds(-156, -90, 156, 90),
new OpenLayers.Size(1121, 650),
options);
map.addLayers([docImage]);
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<div id="map"></div>
<div id="text">
<h1 id="title">Full Screen Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a map that fill the entire browser window.
</p>
<div id="docs">
This example uses CSS to define the dimensions of the map element in order to fill the screen.
When the user resizes the window, the map size changes correspondingly. No scroll bars!
</div>
</div>
</body>
</html>

BIN
examples/fullscreen.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

67
examples/geojson.html Normal file
View File

@@ -0,0 +1,67 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
var featurecollection = {
"type": "FeatureCollection",
"features": [
{"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "LineString",
"coordinates":
[[11.0878902207, 45.1602390564],
[15.01953125, 48.1298828125]]
},
{
"type": "Polygon",
"coordinates":
[[[11.0878902207, 45.1602390564],
[14.931640625, 40.9228515625],
[0.8251953125, 41.0986328125],
[7.63671875, 48.96484375],
[11.0878902207, 45.1602390564]]]
},
{
"type":"Point",
"coordinates":[15.87646484375, 44.1748046875]
}
]
},
"type": "Feature",
"properties": {}}
]
};
var geojson_format = new OpenLayers.Format.GeoJSON();
var vector_layer = new OpenLayers.Layer.Vector();
map.addLayer(vector_layer);
vector_layer.addFeatures(geojson_format.read(featurecollection));
}
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

115
examples/georss-flickr.html Normal file
View File

@@ -0,0 +1,115 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 400px;
border: 1px solid black;
}
.olPopupContent {
font-size: smaller;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer, markerLayer, style, popup;
function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.addControl(new OpenLayers.Control.LayerSwitcher());
// create a property style that reads the externalGraphic url from
// the thumbail attribute of the rss item
style = new OpenLayers.Style({externalGraphic: "${thumbnail}"});
// create a rule with a point symbolizer that will make the thumbnail
// larger if the title of the rss item conatins "powder"
var rule = new OpenLayers.Rule({
symbolizer: {pointRadius: 30},
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.LIKE,
property: "title",
value: "*powder*"
})
});
rule.filter.value2regex("*");
// If the above rule does not apply, use a smaller pointRadius.
var elseRule = new OpenLayers.Rule({
elseFilter: true,
symbolizer: {pointRadius: 20}
});
style.addRules([rule, elseRule]);
// Create a layer with a style map. Giving the style map keys
// for "default" and "select" rendering intent.
markerLayer = new OpenLayers.Layer.Vector("", {
styleMap: new OpenLayers.StyleMap({
"default": style,
"select": new OpenLayers.Style({pointRadius: 35})
})
});
map.addLayer(markerLayer);
// control that will show a popup when clicking on a thumbnail
var popupControl = new OpenLayers.Control.SelectFeature(markerLayer, {
onSelect: function(feature) {
var pos = feature.geometry;
if (popup) {
map.removePopup(popup);
}
popup = new OpenLayers.Popup("popup",
new OpenLayers.LonLat(pos.x, pos.y),
new OpenLayers.Size(254,320),
"<h3>" + feature.attributes.title + "</h3>" +
feature.attributes.description,
true);
map.addPopup(popup);
}
});
map.addControl(popupControl);
popupControl.activate();
OpenLayers.loadURL("xml/georss-flickr.xml", null, window, afterload);
}
function afterload(req) {
// extended version of OpenLayers.Format.GeoRSS.createFeatureFromItem;
// adds the thumbnail attribute to the feature
function createFeatureFromItem(item) {
var feature = OpenLayers.Format.GeoRSS.prototype
.createFeatureFromItem.apply(this, arguments);
feature.attributes.thumbnail =
this.getElementsByTagNameNS(
item, "*", "thumbnail")[0].getAttribute("url");
return feature;
}
var store = new OpenLayers.Format.GeoRSS({
createFeatureFromItem: createFeatureFromItem});
rss = store.read(req.responseText);
markerLayer.setName("Some images from Flickr");
markerLayer.addFeatures(rss);
}
</script>
</head>
<body onload="init()">
<h1>GeoRSS from Flickr in OpenLayers</h1>
<p>The displayed GeoRSS feed has a <tt>&lt;media:thumbnail/&gt;</tt> property for each item. An extended <tt>createFeatureFromItem()</tt> function is used to add this attribute to the attributes hash of each feature read in by <tt>OpenLayers.Format.GeoRSS</tt>. The example is configured with a style to render each item with its thumbnail image. Also, to show how rules work, we defined a rule that if the title of an rss item contains "powder", it will be rendered larger than the others.</p>
<div id="map"></div>
</body>
</html>

View File

@@ -1,9 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers GeoRSS Marker Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 400px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
@@ -28,7 +30,16 @@
</script>
</head>
<body onload="init()">
<h1>GeoRSS in OpenLayers</h1>
<h1 id="title">GeoRSS Marker Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate loading a GeoRSS feed using the GeoRSS parser.
</p>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,9 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers GeoRSS Serialize Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 45%;
height: 350px;
width: 512px;
height: 512px;
border: 1px solid gray;
}
</style>
@@ -37,10 +39,20 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Draw Point Example</h1>
<h1 id="title">Draw Point Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate serialization of features in a Vector layer to GeoRSS.
</p>
<div style="float:right;width:50%">
<textarea id="gml" style="width:100%" rows="30"></textarea>
</div>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,9 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers GeoRSS Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 400px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
@@ -31,12 +33,31 @@
</script>
</head>
<body onload="init()">
<h1>GeoRSS in OpenLayers</h1>
<p style="font-size:.9em;">This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are currently supported. <a href="http://trac.openlayers.org/wiki/HowToDownload">Get the code!</a></p>
<form onsubmit="return false;">
GeoRSS URL: <input type="text" id="url" size="50" /><input type="submit" onclick="addUrl(); return false;" value="Load Feed" onsubmit="addUrl(); return false;" />
</form>
<p>The above input box allows the input of a URL to a GeoRSS feed. This feed can be local to the HTML page -- for example, entering 'georss.xml' will work by default, because there is a local file in the directory called georss.xml -- or, with a properly set up ProxyHost variable (as is used here), it will be able to load any HTTP URL which contains GeoRSS and display it. Anything else will simply have no effect.</p>
<h1 id="title">GeoRSS Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Display a couple of locally cached georss feeds on an a basemap.
</p>
<div id="map"></div>
<div id="docs">
<p>This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are
currently supported. The OpenLayers GeoRSS parser will automatically connect an information bubble to the map
markers, similar to Google maps. In addition, the parser can use custom PNG icons for markers. A sample GeoRSS
file (georss.xml) is included.
<form onsubmit="return false;">
GeoRSS URL: <input type="text" id="url" size="50" value="georss.xml" />
<input type="submit" onclick="addUrl(); return false;" value="Load Feed" onsubmit="addUrl(); return false;" />
</form>
<p>The above input box allows the input of a URL to a GeoRSS feed. This feed can be local to the HTML page --
for example, entering 'georss.xml' will work by default, because there is a local file in the directory called
georss.xml -- or, with a properly set up ProxyHost variable (as is used here), it will be able to load any
HTTP URL which contains GeoRSS and display it. Anything else will simply have no effect.</p>
</div>
</body>
</html>

View File

@@ -1,20 +1,31 @@
<html>
<head>
<script src="../lib/OpenLayers.js"></script>
<style type="text/css">
ul, li { padding-left: 0px; margin-left: 0px; }
</style>
<title>World Map Query</title>
</head>
<body>
<a id='permalink' href="">Permalink</a><br />
<head>
<title>OpenLayers Feature Info Example</title>
<script src="../lib/OpenLayers.js"></script>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
ul, li { padding-left: 0px; margin-left: 0px; }
</style>
</head>
<body>
<h1 id="title">Feature Info Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrates sending a GetFeatureInfo query to an OWS. Returns information about a map feature in the side DIV.
</p>
<a id="permalink" href="">Permalink</a><br />
<div style="float:right;width:28%">
<h1 style="font-size:1.3em;">CIA Factbook</h1>
<p style='font-size:.8em;'>Click a country to see statistics about the country below.</p>
<p style="font-size:.8em;">Click a country to see statistics about the country below.</p>
<div id="nodeList">
</div>
</div>
<div id="map" style="width:70%; height:90%"></div>
<div id="map" style="width:512px; height:512px"></div>
<script defer="defer" type="text/javascript">
OpenLayers.ProxyHost = "/dev/examples/proxy.cgi?url=";
var map = new OpenLayers.Map('map', {'maxResolution':'auto'});
@@ -43,5 +54,8 @@ ul, li { padding-left: 0px; margin-left: 0px; }
OpenLayers.Util.getElement('nodeList').innerHTML = response.responseText;
}
</script>
</body>
<div id="docs">
</div>
</body>
</html>

View File

@@ -1,9 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers GML Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
@@ -25,6 +27,16 @@
</script>
</head>
<body onload="init()">
<h1 id="title">GML Layer Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Loads locally stored GML vector data on a basemap. Includes GML example file.
</p>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers GML Serialization Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -58,7 +60,14 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Draw Point Example</h1>
<h1 id="title">GML Serialization Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate the serialization of features drawn in the OpenLayers window.
</p>
<div style="float:right">
<ul id="controlToggle">
<li>
@@ -75,9 +84,14 @@
<label for="lineToggle">draw line</label>
</li>
</ul>
<p>Check the box to draw points. Uncheck to navigate normally.</p>
<textarea id="gml" cols="80" rows="30"></textarea>
</div>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -0,0 +1,65 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Google with Overlay Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init(){
map = new OpenLayers.Map('map');
var satellite = new OpenLayers.Layer.Google(
"Google Satellite" , {type: G_SATELLITE_MAP}
);
var wms = new OpenLayers.Layer.WMS(
"World Map",
"http://world.freemap.in/cgi-bin/mapserv",
{
map: '/www/freemap.in/world/map/factbooktrans.map',
transparent: 'TRUE',
layers: 'factbook'
},
{'reproject': true}
);
map.addLayers([satellite, wms]);
map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5);
map.addControl( new OpenLayers.Control.LayerSwitcher() );
map.addControl( new OpenLayers.Control.PanZoomBar() );
}
</script>
</head>
<body onload="init()">
<h1 id="title">Google with Overlay Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a Google basemap used with boundary overlay layer.
</p>
<div id="map"></div>
<div id="docs">
An overlay in a Geographic projection can be stretched to somewhat
line up with Google tiles (in a Mercator projection). Results get
worse farther from the equator. Use the "reproject" option on a
layer to get this behavior. Use the sphericalMercator option on
a Google layer to get proper overlays (with other layers in
Spherical Mercator).
</div>
</body>
</html>

View File

@@ -1,75 +1,64 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Google Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 100%;
width: 512px;
height: 512px;
border: 1px solid black;
background-color: red;
}
</style>
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
<!-- Localhost key -->
<!-- <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script>-->
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
var lat = 40;
var zoom = 17;
var map, layer;
var map;
function init(){
map = new OpenLayers.Map( 'map' ,
{ controls: [new OpenLayers.Control.MouseDefaults()] , 'numZoomLevels':20});
function init() {
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} );
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets" // the default
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP}
);
map.addLayers([satellite]);
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic', 'transparent':true},
{isBaseLayer: false} );
layer.setVisibility(false);
var twms = new OpenLayers.Layer.WMS( "World Map",
"http://world.freemap.in/cgi-bin/mapserv?",
{map: '/www/freemap.in/world/map/factbooktrans.map', transparent:'true',
layers: 'factbook', 'format':'png'}, {'reproject': true} );
map.addLayer(twms);
markers = new OpenLayers.Layer.Markers("markers");
map.addLayer(markers);
map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5);
map.addControl( new OpenLayers.Control.LayerSwitcher() );
map.addControl( new OpenLayers.Control.PanZoomBar() );
map.addLayers([gphy, gmap, ghyb, gsat]);
map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 5);
}
function add() {
var url = 'http://boston.openguides.org/markers/AQUA.png';
var sz = new OpenLayers.Size(10, 17);
var calculateOffset = function(size) {
return new OpenLayers.Pixel(-(size.w/2), -size.h);
};
var icon = new OpenLayers.Icon(url, sz, null, calculateOffset);
var barcelona = new OpenLayers.LonLat(2.13134765625,
41.37062534198901);
marker = new OpenLayers.Marker(barcelona, icon);
markers.addMarker(marker);
}
function remove() {
markers.removeMarker(marker);
}
</script>
</head>
<body onload="init()">
<h1>OpenLayers With Google Layer Example</h1>
<h1 id="title">Google Layer Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate use of the various types of Google layers.
</p>
<div id="map"></div>
<div style="background-color:green" onclick="add()"> click to add a marker to the map</div>
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
<div id="docs">
For best performance, you must be using a version of the Google Maps
API which is v2.93 or higher. In order to use this version of the API,
it is best to simply set your application to use the string "v=2" in
the request, rather than tying your application to an explicit version.
</div>
</body>
</html>

View File

@@ -1,13 +1,15 @@
<html>
<head>
<title>OpenLayers Gutter Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 500px;
height: 300px;
width: 521px;
height: 512px;
border: 1px solid gray;
}
p.caption {
width: 500px;
width: 512px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
@@ -33,8 +35,17 @@
</script>
</head>
<body>
<h1>OpenLayers Gutter Example</h1>
<h1 id="title">Gutter Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrates map tiling artifacts, and OpenLayer's facility for correcting this distortion.
</p>
<div id="map"></div>
<div id="docs">
<p class="caption">
When you render tiles with certain types of symbols, there are artifacts
at tile edges that make symbology not look continuous. In the center of
@@ -42,6 +53,6 @@
vertically by a tile. Open the layer switcher and change to the layer
with a 15 pixel gutter to see how the symbology looks nicer.
</p>
</div>
</body>
</html>

211
examples/hover-handler.html Normal file
View File

@@ -0,0 +1,211 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Hover Handler Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 340px;
height: 170px;
border: 1px solid gray;
}
#west {
width: 350px;
}
#east {
position: absolute;
left: 370px;
top: 3em;
}
table td {
text-align: center;
margin: 0;
border: 1px solid gray;
}
textarea.output {
text-align: left;
font-size: 0.9em;
width: 250px;
height: 65px;
overflow: auto;
}
</style>
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
OpenLayers.Control.Hover = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'delay': 500,
'pixelTolerance': null,
'stopMove': false
},
initialize: function(options) {
this.handlerOptions = OpenLayers.Util.extend(
{}, this.defaultHandlerOptions
);
OpenLayers.Control.prototype.initialize.apply(
this, arguments
);
this.handler = new OpenLayers.Handler.Hover(
this,
{'pause': this.onPause, 'move': this.onMove},
this.handlerOptions
);
},
onPause: function(evt) {
var output = document.getElementById(this.key + 'Output');
var msg = 'pause ' + evt.xy;
output.value = output.value + msg + "\r\n";
},
onMove: function(evt) {
// if this control sent an Ajax request (e.g. GetFeatureInfo) when
// the mouse pauses the onMove callback could be used to abort that
// request.
}
});
var map, controls;
function init(){
map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS(
'OpenLayers WMS',
'http://labs.metacarta.com/wms/vmap0',
{layers: 'basic'}
);
map.addLayers([layer]);
controls = {
'long': new OpenLayers.Control.Hover({
handlerOptions: {
'delay': 2000
}
}),
'short': new OpenLayers.Control.Hover({
handlerOptions: {
'delay': 100
}
}),
'tolerant': new OpenLayers.Control.Hover({
handlerOptions: {
'delay': 1000,
'pixelTolerance': 6
}
}),
'untolerant': new OpenLayers.Control.Hover({
handlerOptions: {
'delay': 1000,
'pixelTolerance': 1
}
}),
'stoppropag': new OpenLayers.Control.Hover({
handlerOptions: {
'stopMove': true
}
})
};
var props = document.getElementById("props");
var control;
for(var key in controls) {
control = controls[key];
// only to route output here
control.key = key;
map.addControl(control);
}
map.addControl(new OpenLayers.Control.MousePosition());
map.zoomToMaxExtent();
}
function toggle(key) {
var control = controls[key];
if(control.active) {
control.deactivate();
} else {
control.activate();
}
var status = document.getElementById(key + "Status");
status.innerHTML = control.active ? "on" : "off";
var output = document.getElementById(key + "Output");
output.value = "";
}
</script>
</head>
<body onload="init()">
<h1 id="title">Hover Handler Example</h1>
<div id="west">
<div id="tags">
</div>
<p id="shortdesc">
This example shows the use of the hover handler.
</p>
<div id="map"></div>
<p>
The hover handler is to be used to emulate mouseovers on
objects on the map that aren't DOM elements. For example
one can use the hover hander to send WMS/GetFeatureInfo
requests as the user moves the mouse over the map.
</p>
<p>
The "delay" option specifies the number of milliseconds
before the event is considered a hover. Default is 500
milliseconds.
</p>
<p>
The "pixelTolerance" option specifies the maximum number
of pixels between mousemoves for an event to be
considered a hover. Default is null, which means no
pixel tolerance.
</p>
<p>
The "stopMove" option specifies whether other mousemove
listeners registered before the hover handler listener must
be notified on mousemoves or not. Default is false (meaning
that the other mousemove listeners will be notified on
mousemove).
</p>
</div>
<div id="east">
<table>
<caption>Controls with hover handlers (toggle on/off to clear output)</caption>
<tbody>
<tr>
<td>long delay (2 sec)</td>
<td><button id="longStatus" onclick="toggle('long')">off</button></td>
<td><textarea class="output" id="longOutput"></textarea></td>
</tr>
<tr>
<td>short delay (100 msec)</td>
<td><button id="shortStatus" onclick="toggle('short')">off</button></td>
<td><textarea class="output" id="shortOutput"></textarea></td>
</tr>
<tr>
<td>tolerant (6 pixels)</td>
<td><button id="tolerantStatus" onclick="toggle('tolerant')">off</button></td>
<td><textarea class="output" id="tolerantOutput"></textarea></td>
</tr>
<tr>
<td>untolerant (1 pixel)</td>
<td><button id="untolerantStatus" onclick="toggle('untolerant')">off</button></td>
<td><textarea class="output" id="untolerantOutput"></textarea></td>
</tr>
<tr>
<td>stop propagation</td>
<td><button id="stoppropagStatus" onclick="toggle('stoppropag')">off</button></td>
<td><textarea class="output" id="stoppropagOutput"></textarea></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

View File

@@ -1,12 +1,14 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Image Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
p {
width: 512px;
}
#map {
width: 512px;
height: 256px;
height: 512px;
border: 1px solid gray;
}
</style>
@@ -26,8 +28,8 @@
options);
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"}, options);
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"}, options);
map.addLayers([graphic, jpl_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
@@ -36,8 +38,17 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Image Layer Example</h1>
<h1 id="title">Image Layer Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a single non-tiled image as a selectable base layer.
</p>
<div id="map"></div>
<div id="docs">
<p>
The "City Lights" layer above is created from a single web accessible
image. If you construct it without any resolution related options,
@@ -46,5 +57,6 @@
intended to be used in an overview map - where another layer type
might not make a good overview.
</p>
</div>
</body>
</html>

179
examples/intersects.html Normal file
View File

@@ -0,0 +1,179 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Geometry Intersections</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
html, body {
margin: 0;
padding: 1em;
font: 0.9em Verdana, Arial, sans serif;
}
input, select, textarea {
font: 0.9em Verdana, Arial, sans-serif;
}
h2 {
margin-top: 0.75em;
font-size: 1.6em;
}
#leftcol {
position: absolute;
top: 0;
left: 1em;
padding: 0;
width: 455px;
}
#map {
width: 450px;
height: 225px;
border: 1px solid #ccc;
}
#input {
width: 450px;
}
#text {
font-size: 0.85em;
margin: 1em 0 1em 0;
width: 100%;
height: 10em;
}
#info {
position: relative;
padding: 2em 0;
margin-left: 470px;
}
#features {
font-size: 0.8em;
width: 100%;
height: 200px;
}
#intersections {
font-size: 0.8em;
width: 100%;
height: 200px;
}
p {
margin: 0;
padding: 0.75em 0 0.75em 0;
}
</style>
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, vectors, geojson;
function init(){
map = new OpenLayers.Map('map');
vectors = new OpenLayers.Layer.Vector(
"Vector Layer",
{isBaseLayer: true}
);
map.addLayers([vectors]);
map.addControl(new OpenLayers.Control.MousePosition());
var panel = new OpenLayers.Control.EditingToolbar(vectors);
map.addControl(panel);
geojson = new OpenLayers.Format.GeoJSON();
map.setCenter(new OpenLayers.LonLat(0, 0), 1);
}
function serialize() {
var str = geojson.write(vectors.features, true);
document.getElementById('features').value = str;
}
function deserialize() {
var element = document.getElementById('text');
var features = geojson.read(element.value);
var bounds;
if(features) {
if(features.constructor != Array) {
features = [features];
}
for(var i=0; i<features.length; ++i) {
if (!bounds) {
bounds = features[i].geometry.getBounds();
} else {
bounds.extend(features[i].geometry.getBounds());
}
}
vectors.addFeatures(features);
map.zoomToExtent(bounds);
var plural = (features.length > 1) ? 's' : '';
element.value = features.length + ' feature' + plural + ' added'
} else {
element.value = 'Bad input';
}
}
function intersect() {
var features = vectors.features;
var feat1, feat2, intersects12, intersects21;
var parts = [];
// reset attributes
for(var i=0; i<features.length; ++i) {
features[i].attributes.intersectsWith = [];
}
for(var i=0; i<features.length-1; ++i) {
feat1 = features[i];
for(var j=i+1; j<features.length; ++j) {
feat2 = features[j];
intersects12 = feat1.geometry.intersects(feat2.geometry);
if(intersects12) {
feat1.attributes.intersectsWith.push("f" + j);
parts.push("f" + i + " intersects f" + j + "\n");
}
intersects21 = feat2.geometry.intersects(feat1.geometry);
if(intersects21) {
feat2.attributes.intersectsWith.push("f" + i);
parts.push("f" + j + " intersects f" + i + "\n");
}
if(intersects12 != intersects21) {
parts.push("trouble with " + i + " and " + j + "\n");
}
}
}
if(parts.length > 0) {
document.getElementById("intersections").value = parts.join("");
} else {
document.getElementById("intersections").value = "no intersections";
}
}
// preload images
(function() {
var roots = ["draw_point", "draw_line", "draw_polygon", "pan"];
var onImages = [];
var offImages = [];
for(var i=0; i<roots.length; ++i) {
onImages[i] = new Image();
onImages[i].src = "../theme/default/img/" + roots[i] + "_on.png";
offImages[i] = new Image();
offImages[i].src = "../theme/default/img/" + roots[i] + "_on.png";
}
})();
</script>
</head>
<body onload="init()">
<div id="leftcol">
<h2>OpenLayers Geometry Intersection Example</h2>
<div id="map"></div>
<div id="input">
<textarea id="text"></textarea>
<input type="button" value="add feature" onclick="deserialize();" />
<span id="selected"></span>
</div>
</div>
<div id="info">
Features
<input type="button" value="refresh" onclick="serialize();" /><br />
<textarea id="features"></textarea>
Intersections
<input type="button" value="intersect all" onclick="intersect();" /><br />
<textarea id="intersections"></textarea>
</div>
</body>
</html>

View File

@@ -1,9 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers KaMap Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
@@ -28,7 +30,16 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<h1 id="title">KaMap Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a tiled kamap layer as the base map, which can be pre-cached for higher performance.
</p>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,30 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml", {format: OpenLayers.Format.KML}));
map.zoomToExtent(new OpenLayers.Bounds(-112.292744,36.068477,-112.22408,36.109246));
}
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

View File

@@ -1,9 +1,10 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
@@ -19,12 +20,29 @@
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/mc-search.kml", {format: OpenLayers.Format.KML}));
map.zoomToMaxExtent();
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml",
{
format: OpenLayers.Format.KML,
formatOptions: {
extractStyles: true,
extractAttributes: true
}
}));
map.zoomToExtent(new OpenLayers.Bounds(-112.306698,36.017792,-112.03204,36.18087));
}
</script>
</head>
<body onload="init()">
<h1 id="title">KML Layer Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrates loading and displaying a KML file on top of a basemap.
</p>
<div id="map"></div>
<div id="docs"></div>
</body>
</html>

2273
examples/kml/sundials.kml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,14 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Layer Opacity Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
body {
font-family: sans-serif;
}
#map {
width: 512px;
height: 350px;
height: 512px;
border: 1px solid lightgray;
}
p {
@@ -47,29 +49,35 @@
}
function init(){
var options = {
projection: "EPSG:26912",
units: 'm',
maxExtent: new OpenLayers.Bounds(455402, 4967657, 473295, 4984095),
maxResolution: 'auto',
maxZoomLevel: 8
maxExtent: new OpenLayers.Bounds(-110.994, 45.885, -110.950, 45.929),
maxResolution: "auto"
};
map = new OpenLayers.Map('map', options);
var drg = new OpenLayers.Layer.WMS("Topo Maps",
"http://terraservice.net/ogcmap.ashx",
{layers: "DRG"});
shade = new OpenLayers.Layer.WMS("Shaded Relief",
"http://ims.cr.usgs.gov/servlet19/com.esri.wms.Esrimap/USGS_EDC_Elev_NED_3",
"http://gisdata.usgs.gov/wmsconnector/com.esri.wms.Esrimap?ServiceName=USGS_EDC_Elev_NED_3",
{layers: "HR-NED.IMAGE", reaspect: "false", transparent: 'true'},
{isBaseLayer: false, opacity: 0.3});
map.addLayers([drg, shade]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(464348.5,4975876), 1);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h2>OpenLayers Layer Opacity Example</h2>
<h1 id="title">Layer Opacity Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a change in the opacity for an overlay layer.
</p>
<div id="map"></div>
<div id="docs">
<p>
Note that if you also have the setOpacity method defined on the Layer
class, you can tweak the layer opacity after it has been added to the map.
@@ -80,5 +88,6 @@
<a title="increase opacity" href="javascript: changeOpacity(0.1);">&gt;&gt;</a>
</p>
<p class="note">IE users: Wait until the shade layer has finished loading to try this.</p>
</div>
</body>
</html>

View File

@@ -1,18 +1,19 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Layer Load Monitoring Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
position: absolute;
top: 5px;
left: 5px;
width: 450px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
#controls {
float: left;
text-align: right;
}
#eventsLogID {
position: absolute;
top: 5px;
left: 460px;
text-align: left;
width: 350px;
height: 475px;
overflow: auto;
@@ -108,14 +109,25 @@
</script>
</head>
<body onload="init()">
<div id="map"></div>
<h1 id="title">Layer Load Monitoring Example</h1>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a method for monitoring tile loading performance.
</p>
<div id="map" style="float:left;"></div>
<div id="controls">
<div id="eventsLogID">
<b>Events Log:</b>
</div>
<input type="button" value="Clear" onclick="clearLog()"/>
</div>
<div style="position:absolute; top: 500px; width: 700px">
<input type="button" value="Clear" style="float:right" onclick="clearLog()"/>
<div id="docs">
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Layer Switcher Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -12,6 +14,7 @@
var map;
function init(){
map = new OpenLayers.Map('map', { controls: [] });
map.addControl(new OpenLayers.Control.Navigation());
map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}));
@@ -20,8 +23,8 @@
{layers: 'basic'}, {'displayInLayerSwitcher':false} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"}, {'isBaseLayer': false});
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"}, {'isBaseLayer': false});
var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
@@ -38,7 +41,15 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<h1 id="title">Layer Switcher Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrates the use of the LayerSwitcher outside of the OpenLayers window.
</p>
<div id="layerswitcher" style="float:right; width: 20em;"></div>
<div id="map"></div>
<div id="docs">

View File

@@ -1,30 +1,38 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Basic Single WMS Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h1 id="title">Basic Single WMS Example</h1>
<div id="tags"></div>
<div id="shortdesc">Show a Simple Map</div>
<div id="map"></div>
<div id="docs">
This example shows a very simple layout with minimal controls. This example uses a single WMS base layer.
</div>
</body>
</html>

110
examples/mapguide.html Normal file
View File

@@ -0,0 +1,110 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 400px;
height: 400px;
border: 1px solid black;
float:left;
}
#map2 {
width: 400px;
height: 400px;
border: 1px solid black;
float:left;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
var url = "http://demo01.dmsolutions.ca/mapguide/mapagent/mapagent.fcgi";
//you can use this URL when MapGuide OS is installed locally
//var url = "/mapguide/mapagent/mapagent.fcgi";
//tiled version
function initTiled(){
OpenLayers.DOTS_PER_INCH = 96;
var extent = new OpenLayers.Bounds(-3631568.75,-1293815.5,4491139.5833333321,4937122);
var tempScales = [50000000,23207944.16806,10772173.45016,5000000,2320794.41681,1077217.34502,500000,232079.44168,107721.7345,50000];
var mapOptions = {
maxExtent: extent,
scales: tempScales,
units: 'm',
projection: 'EPSG:42304'
};
map = new OpenLayers.Map( 'map', mapOptions );
var params = {
mapdefinition: 'Library://Samples/Gmap/Maps/gmapTiled.MapDefinition',
basemaplayergroupname: "BaseLayerGroup"
}
var options = {
singleTile: false
}
var layer = new OpenLayers.Layer.MapGuide( "MapGuide OS tiled layer", url, params, options );
map.addLayer(layer);
map.zoomToMaxExtent();
}
//un-tiled version
function initUntiled() {
OpenLayers.DOTS_PER_INCH = 96;
var extent = new OpenLayers.Bounds(-87.865114442365922,43.665065564837931,-87.595394059497067,43.823852564430069);
var mapOptions = {
maxExtent: extent,
maxResolution: 'auto'
};
map = new OpenLayers.Map( 'map2', mapOptions );
var options = {
buffer: 1,
singleTile: true
};
var params = {
mapdefinition: 'Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition'
};
/*
The MapGuide layer can also be created using mapname and session as follows provided there
is some wrapper code to obtain a valid session id and mapname
var params = {
mapname: 'Sheboygan47b3560bf1071',
session: '043bb716-0000-1000-8000-0017a4e6ff5d_en_7F0000010AFC0AFB0AFA'
};
*/
var layer = new OpenLayers.Layer.MapGuide( "MapGuide OS untiled baselayer", url, params, options );
map.addLayer(layer);
//this is how to set up the layer for transparent overlays. Requires a valid session ID
//and mapName stored in that session.
//If the mapagent URL is on a different server than this OL layer, the OpenLayers proxy script
//must be used since this layer must perform an additional AJAX request before requesting the
//map image
/*
var options = {
isBaseLayer: false,
transparent: true,
buffer: 1,
singleTile: true
};
var params = {
mapName: 'Sheboygan',
session: '0b8cb80e-0000-1000-8003-0017a4e6ff5d_en_C0A802AD0AFC0AFB0AFA',
};
layer = new OpenLayers.Layer.MapGuide( "MapGuide OS Overlay layer", url, params, options );
map.addLayer(layer);
*/
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="initUntiled(); initTiled()">
<p>If prompted for a password, username is Anonymous and an empty password</p>
<div id="map"></div>
<div id="map2"></div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MapServer Layer</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
@@ -28,6 +30,12 @@
</script>
</head>
<body onload="init()">
<div id="title">MapServer Layer</div>
<div id="tags"></div>
<div id="shortdesc">Shows MapServer Layer</div>
<div id="map"></div>
<div id="docs">
This is an example of using a MapServer Layer with a gutter parameter. The gutter parameter is used to try to limit the edge effects between tiles.
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MapServer Single Tile Mode</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 100%;
@@ -21,6 +23,12 @@
</script>
</head>
<body>
<div id="title">MapServer Single Tile Mode</div>
<div id="tags"></div>
<div id="shortdesc">Shows single tile MapServer Layer</div>
<div id="map"></div>
<div id="docs">
This shows an example of using a MapServer Layer in single tile mode. Single tile mode can be useful when pulling data from dynamic sources.
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Resize a Marker</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -43,8 +45,13 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<div id="title">Resize a Marker</div>
<div id="tags"></div>
<div id="shortdesc">Dynamically resize a marker</div>
<div id="map"></div>
<div id="docs">
This example shows how to create a OpenLayers.Layer.Markers layer, add an icon, put it into a marker, and add the marker to the layer. Once the marker has been added it is possible to use setSize() on the icon in order to resize the marker.
</div>
<div style="background-color:purple" onclick="resize()"> click to resize marker</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Markers Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -46,7 +48,12 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<div id="title">Markers Layer Example</div>
<div id="tags"></div>
<div id="shortdesc">Show markers layer with different markers</div>
<div id="map"></div>
<div id="docs">
This is an example of an OpenLayers.Layers.Markers layer that shows some examples of adding markers. Also demonstrated is registering a mousedown effect on a marker.
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Using a Layer.Text to display markers</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -28,7 +30,11 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<h1 id="title">Using a Layer.Text to display markers</h1>
<p id="shortdesc">
The Layer.Text class reads a Tab seperated values file and displays it as markers on
the map.
</p>
<div id="map"></div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MultiMap</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 100%;
@@ -46,7 +48,10 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers MultiMap Example</h1>
<h1 id="title">MultiMap Example</h1>
<p id="shortdesc">
An example of using the Layer.MultiMap class.
</p>
<div id="map"></div>
<div style="background-color:green" onclick="add()"> click to add the marker to the map</div>
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>

View File

@@ -1,6 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Modify Feature</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -53,6 +54,9 @@
OpenLayers.Handler.Path),
polygon: new OpenLayers.Control.DrawFeature(vectors,
OpenLayers.Handler.Polygon),
regular: new OpenLayers.Control.DrawFeature(vectors,
OpenLayers.Handler.RegularPolygon,
{handlerOptions: {sides: 5}}),
modify: new OpenLayers.Control.ModifyFeature(vectors,
modifyOptions)
};
@@ -65,6 +69,32 @@
document.getElementById('noneToggle').checked = true;
}
function update() {
// reset modification mode
controls.modify.mode = OpenLayers.Control.ModifyFeature.RESHAPE;
var rotate = document.getElementById("rotate").checked;
if(rotate) {
controls.modify.mode |= OpenLayers.Control.ModifyFeature.ROTATE;
}
var resize = document.getElementById("resize").checked;
if(resize) {
controls.modify.mode |= OpenLayers.Control.ModifyFeature.RESIZE;
}
var drag = document.getElementById("drag").checked;
if(drag) {
controls.modify.mode |= OpenLayers.Control.ModifyFeature.DRAG;
}
// disable reshape mode if at least one of modes rotate, resize,
// drag is enabled
if (rotate || resize || drag) {
controls.modify.mode &= ~OpenLayers.Control.ModifyFeature.RESHAPE;
}
var sides = parseInt(document.getElementById("sides").value);
sides = Math.max(3, isNaN(sides) ? 0 : sides);
controls.regular.handler.sides = sides;
var irregular = document.getElementById("irregular").checked;
controls.regular.handler.irregular = irregular;
}
function toggleControl(element) {
for(key in controls) {
@@ -80,7 +110,8 @@
</script>
</head>
<body onload="init()">
<h3>OpenLayers Modify Feature Example</h3>
<h3 id="title">OpenLayers Modify Feature Example</h3>
<div id="shortdesc">A demonstration of the ModifyFeature control for editing vector features.</div>
<div id="map"></div>
<div id="controls">
<ul id="controlToggle">
@@ -101,10 +132,41 @@
<input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" />
<label for="polygonToggle">draw polygon</label>
</li>
<li>
<input type="radio" name="type" value="regular" id="regularToggle" onclick="toggleControl(this);" />
<label for="regularToggle">draw regular polygon</label>
<label for="sides"> - sides</label>
<input id="sides" type="text" size="2" maxlength="2"
name="sides" value="5" onchange="update()" />
<ul>
<li>
<input id="irregular" type="checkbox"
name="irregular" onchange="update()" />
<label for="irregular">irregular</label>
</li>
</ul>
</li>
<li>
<input type="radio" name="type" value="modify" id="modifyToggle"
onclick="toggleControl(this);" />
<label for="modifyToggle">modify feature</label>
<ul>
<li>
<input id="rotate" type="checkbox"
name="rotate" onchange="update()" />
<label for="rotate">allow rotation</label>
</li>
<li>
<input id="resize" type="checkbox"
name="resize" onchange="update()" />
<label for="resize">allow resizing</label>
</li>
<li>
<input id="drag" type="checkbox"
name="drag" onchange="update()" />
<label for="drag">allow dragging</label>
</li>
</ul>
</li>
</ul>
</div>

View File

@@ -2,6 +2,8 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" debug="true">
<head>
<title>MousePosition Control</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
body {
margin: 0;
@@ -35,6 +37,11 @@
</script>
</head>
<body onload="init()">
<h3 id="title">MousePosition Control</h3>
<p id="shortdesc">
Use the MousePosition Control to display the coordinates of the cursor
inside or outside the map div.
</p>
<div id="map"></div>
<div id="coords"></div>
<p>Moving your mouse to the upper left corner of this map should return 'x=0,y=0' -- in the past, it didn't in IE. If it returns 2,2, consider it a bug, and report it.</p>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MultiMap SphericalMercator</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 100%;
@@ -51,7 +53,12 @@
</script>
</head>
<body onload="init()">
<h3>OpenLayers MultiMap Mercator Example</h3>
<h3 id="title">MultiMap Mercator Example</h3>
<p id="shortdesc">
This sphericalMercator example using multimap demonstrates that the
multimap layer does not fully support the sphericalMercator projection at
this time.
</p>
<div id="map"></div>
</body>
</html>

View File

@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
@@ -28,6 +29,18 @@
</script>
</head>
<body onload="init()">
<h1 id="title">Multiple Server URLS</h1>
<div id="tags">
</div>
<p id="shortdesc">
Load your tiles faster by pointing to the same server, but with different urls
</p>
<div id="map"></div>
<div id="docs">
Browsers typically limit the number of concurrent requests to the same server, based on hostname. In order to ake tiles load more quickly, it often makes sense to distribute requests over multiple hostnames to achieve more concurrency. Typically, browsers perform best with 3 different hostnames -- your performance may vary. (For example, if your server can't handle more than 2 requests simultaneously, then additional hostnames will not help you.)
</div>
</body>
</html>

View File

@@ -88,10 +88,10 @@ function runMVS() {
case 'nasa':
theMVS.addLayer(
new OpenLayers.Layer.WMS("NASA Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{"EXCEPTIONS" : "application/vnd.ogc.se_inimage",
"format" : "image/jpeg",
layers:"modis,global_mosaic"}
layers:"landsat7"}
));
break;
case 'gmaps':

View File

@@ -0,0 +1,40 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Navigation Control</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
map = new OpenLayers.Map( 'map', { controls: [] });
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'} );
map.addLayer(layer);
nav = new OpenLayers.Control.Navigation({'zoomWheelEnabled': false});
map.addControl(nav);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h1 id="title">Navigation Control</h1>
<div id="tags"></div>
<div id="shortdesc">Demonstrate Navigation Control features</div>
<div id="map"></div>
<a href="#" onclick="nav.enableZoomWheel();return false">Turn on Wheel Zoom</a> | <a href="#" onclick="nav.disableZoomWheel(); return false;">Turn off Wheel Zoom</a>
<div id="docs">
This example demonstrates a couple features of the Navigation control. The Navigation control controls most map dragging, movement, zooming, etc. In this case, we have a demonstration of how to create a navigation control with no zoom wheel action, which can then be enabled or disabled by the user.
</div>
</body>
</html>

View File

@@ -0,0 +1,75 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Navigation History Example</title>
<style type="text/css">
#map {
width: 512px;
height: 256px;
border: 1px solid gray;
}
#panel {
right: 0px;
height: 30px;
width: 200px;
}
#panel div {
float: left;
margin: 5px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, nav, panel;
// preload images if you care
var preload = [
"../theme/default/img/view_previous_on.png",
"../theme/default/img/view_next_on.png"
];
var img = new Array(preload.length);
for(var i=0; i<preload.length; ++i) {
img[i] = new Image();
img[i].src = preload[i];
}
function init(){
map = new OpenLayers.Map('map');
nav = new OpenLayers.Control.NavigationHistory();
// parent control must be added to the map
map.addControl(nav);
panel = new OpenLayers.Control.Panel(
{div: document.getElementById("panel")}
);
panel.addControls([nav.next, nav.previous]);
map.addControl(panel);
var layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'}
);
map.addLayer(layer);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h1 id="title">Map Navigation History Example</h1>
<div id="tags">
</div>
<p id="shortdesc">
A control for zooming to previous and next map extents.
</p>
<div id="map"></div>
Map navigation history controls<div id="panel"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
@@ -9,6 +10,7 @@
}
</style>
<title>NavToolbar Demo</title>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
@@ -16,7 +18,7 @@
var zoom = 5;
var map, layer;
function init(){
function init() {
map = new OpenLayers.Map( 'map', { controls: [new OpenLayers.Control.PanZoom()] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
@@ -30,6 +32,11 @@
</script>
</head>
<body onload="init()">
<h3 id="title">NavToolbar Demo</h3>
<p id="shortdesc">
Demo the NavToolbar, a subclass of Control.Panel which shows icons for
navigation.
</p>
<div id="map"></div>
</body>
</html>

View File

@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#mapDiv {
width: 400px;
@@ -29,7 +30,11 @@
</script>
</head>
<body onload="init()">
<h1>OpenLayers Example</h1>
<h1 id="title">Untiled Example</h1>
<p id="shortdesc">
Create an untiled WMS layer using the singleTile: true, option or the deprecated
WMS.Untiled layer.
</p>
<div id="mapDiv"></div>
<p> The first layer is an old OpenLayers.Layer.WMS.Untiled layer, using
a default ratio value of 1.5.

View File

@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 600px;
@@ -27,12 +28,12 @@
map.addLayer(wms);
wfs = new OpenLayers.Layer.WFS("Minnesota Streams (WFS)", wfs_url, {'typename':'streams'}, {ratio:1.25, minZoomLevel:4});
wfs = new OpenLayers.Layer.WFS("Minnesota Streams (WFS)", wfs_url, {'typename':'streams'}, {ratio:1.25, minZoomLevel:4, style: OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default'])});
// preFeatureInsert can be used to set style before the feature is drawn
wfs.preFeatureInsert= function(feature) { feature.style.strokeWidth="3"; feature.style.strokeColor="blue";
}
wfs.onFeatureInsert = function() {
wfs.onFeatureInsert = function(feature) {
OpenLayers.Util.getElement('stream_features').innerHTML = feature.layer.features.length;
}
map.addLayer(wfs);
@@ -56,7 +57,7 @@
map.addLayer(pwfs);
rstyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
OpenLayers.Util.extend(rstyle, {'strokeColor': 'white', strokeWIdth: "4"});
OpenLayers.Util.extend(rstyle, {'strokeColor': 'white', strokeWidth: "4"});
rwfs = new OpenLayers.Layer.WFS("Minnesota Roads (WFS)", wfs_url, {'typename':'roads'},
{ratio:1.25, minZoomLevel:7, extractAttributes: true, style:rstyle});
@@ -136,6 +137,26 @@
</li>
</ul>
</div>
<p id="shortdesc">This example shows the use of a WFS service rendered using the OpenLayers vector library.</p>
<div id="map"></div>
<div id="docs">
<p>
This is an example that shows rendering a WFS service using OpenLayer vectors in the browser. The OpenLayers code will download the GML
from the WFS service for each layer, parse it and create features using the OL vector library to draw the features on the map. For
more information on the vector library, please visit <a href="http://trac.openlayers.org/wiki/Documentation/VectorSupport">vector support wiki</a>.
In this example there are 4 layers shown on the map. The base layer and parcel layer are created from a WMS serivce using the OpenLayers.Layer.WMS object.
The streams, roads, and plat layers are drawn from a WFS service using the OpenLayers.Layer.WFS object.
</p>
<p>
Rendering WFS layers into vectors is possible, but you need to be cautions when showing the features on the map. Testing has shown that when
you renderer more than 200 vectors in the browser the performance decreases dramatically. Also features that have a lot of vertices
can cause performance issues. In this example the parcel layer is rendered as a WMS layer because at the time of developing this example
there where a handful of features that had too many vertices to render without killing the browser resources.
There are a number of properties that can be set for each WFS layer, such color and line weight using style properties such as strokeColor and strokeWidth.
You can also get feature attributes from the WFS services using the extractAttribute property. View the source to see the example code.
</p>
</div>
</body>
</html>

118
examples/osm-layer.html Normal file
View File

@@ -0,0 +1,118 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 70%;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer, gml;
function export_vectors() {
var x = new OpenLayers.Format.XML();
var content = x.write(gml.renderer.rendererRoot);
$("vectors").value = content;
$("vectors").style.display = "block";
$("vectorlink").href = "data:image/svg+xml," + escape(content);
$("vectorlink").style.display="block";
}
function on_feature_hover(feature) {
var text ="<ul>";
var type ="way";
if (feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
type = "node";
}
text += "<li>" + feature.osm_id + ": <a href='http://crschmidt.net/osm/attributes.html?type="+type+"&id="+feature.osm_id+"'>Edit</a>, <a href='http://www.openstreetmap.org/api/0.5/"+type + "/" + feature.osm_id + "'>API</a></li>";
for (var key in feature.attributes) {
text += "<li>" + key + ": " + feature.attributes[key] + "</li>";
}
text += "</ul>";
$("status").innerHTML = text;
}
function clear_data() {
gml.destroyFeatures();
}
function new_data() {
if (!check_zoom()) { return; }
clear_data();
gml.loaded = false;
gml.url = "http://www.openstreetmap.org/api/0.5/map?bbox=" + map.getExtent().toBBOX();
$("status").innerHTML = "Loading more data...";
gml.loadGML();
}
function style_osm_feature(feature) {
feature.style = OpenLayers.Util.extend({'fill':'black'}, OpenLayers.Feature.Vector.style['default']);
if (feature.attributes.highway == "motorway") {
feature.style.strokeColor = "blue";
feature.style.strokeWidth = 5;
} else if (feature.attributes.highway == "primary") {
feature.style.strokeColor = "red";
} else if (feature.attributes.highway == "secondary") {
feature.style.strokeColor = "orange";
} else if (feature.attributes.highway) {
feature.style.strokeColor = "black";
}
}
function check_zoom() {
var zoom = map.getZoom();
if (zoom >= 11) { return true; }
if (zoom >= 9) { return confirm("Loading this amount of data may slow your browser. Are you sure you want to do this?"); }
$("status").innerHTML = "Area too large. Zoom in to load data. (Current zoom level: "+ zoom + ". Must be at zoom 9+.)";
return false;
}
function init(){
OpenLayers.ProxyHost = "proxy.cgi?url=";
OpenLayers.Feature.Vector.style['default'].strokeWidth = 4;
OpenLayers.Feature.Vector.style['default'].cursor = 'pointer';
map = new OpenLayers.Map('map', {'maxResolution': 360/512/16, 'numZoomLevels':15, controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoomBar() ]});
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.Permalink());
layer = new OpenLayers.Layer.WMS( "OSM",
[
"http://t1.hypercube.telascience.org/tiles?",
"http://t2.hypercube.telascience.org/tiles?",
"http://t3.hypercube.telascience.org/tiles?",
"http://t4.hypercube.telascience.org/tiles?"
],
{layers: 'osm-4326', format: 'image/png' } );
map.addLayer(layer);
if (!map.getCenter()) {
gml = new OpenLayers.Layer.GML("OSM", "osm/sutton_coldfield.osm", {format: OpenLayers.Format.OSM});
map.zoomToExtent(new OpenLayers.Bounds(-1.819072,52.549034,-1.814341,52.551582));
} else {
if (map.getZoom() >= 11) {
gml = new OpenLayers.Layer.GML("OSM", "http://www.openstreetmap.org/api/0.5/map?bbox=" + map.getExtent().toBBOX(), {format: OpenLayers.Format.OSM});
} else {
gml = new OpenLayers.Layer.GML("OSM", "xml/cambridgeport.osm", {format: OpenLayers.Format.OSM});
}
}
gml.events.register("loadstart", null, function() { $("status").innerHTML = "Loading..."; })
gml.events.register("loadend", null, function() { $("status").innerHTML = ""; })
map.addLayer(gml);
gml.preFeatureInsert = style_osm_feature;
var sf = new OpenLayers.Control.SelectFeature(gml, {'onSelect': on_feature_hover});
map.addControl(sf);
sf.activate();
}
</script>
</head>
<body onload="init()">
<div style="width:28%; float:right" id="download">
<ul>
<li><a href="javascript:new_data();">Download current view</a></li>
<li><a href="javascript:clear_data();">Clear current data</a></li>
<li><a href="javascript:export_vectors();">Export Vector Data</a></li>
</ul>
<div id="status">Loading...</div>
</div>
<div id="map"></div>
<a id="vectorlink" href="" style="display:none">Display via data: URL (FF Only)</a>
<textarea id="vectors" style="display:none;width:100%" rows="10"></textarea>
</body>
</html>

View File

@@ -0,0 +1,662 @@
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.5" generator="OpenStreetMap server">
<node id="200545" lat="52.5503033" lon="-1.8166417" user="blackadder" visible="true" timestamp="2006-03-22T16:33:41+00:00"/>
<node id="200546" lat="52.5501965" lon="-1.8168261" user="blackadder" visible="true" timestamp="2006-03-22T16:33:43+00:00"/>
<node id="200547" lat="52.5501645" lon="-1.8169929" user="blackadder" visible="true" timestamp="2006-03-22T16:33:45+00:00"/>
<node id="200548" lat="52.5501805" lon="-1.8172475" user="blackadder" visible="true" timestamp="2006-03-22T16:33:47+00:00"/>
<node id="200549" lat="52.5502392" lon="-1.8175372" user="blackadder" visible="true" timestamp="2006-03-22T16:33:50+00:00"/>
<node id="200627" lat="52.5499115" lon="-1.8161012" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200628" lat="52.5497408" lon="-1.81586" user="blackadder" visible="true" timestamp="2007-11-22T17:33:31+00:00"/>
<node id="200752" lat="52.5505598" lon="-1.8140051" user="blackadder" visible="true" timestamp="2006-03-22T16:36:20+00:00"/>
<node id="200758" lat="52.5501087" lon="-1.8142773" user="blackadder" visible="true" timestamp="2006-03-22T16:36:32+00:00"/>
<node id="645729" lat="52.5504008" lon="-1.8169154" user="blackadder" visible="true" timestamp="2006-07-24T23:21:42+01:00">
<tag k="place_name" v="Sutton Coldfield"/>
<tag k="ref" v="B72 1162"/>
<tag k="amenity" v="post_box"/>
<tag k="created_by" v="JOSM"/>
</node>
<node id="653121" lat="52.5506073" lon="-1.8137881" user="blackadder" visible="true" timestamp="2006-03-25T18:08:29+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783468" lat="52.5506446" lon="-1.8141177" user="blackadder" visible="true" timestamp="2007-05-30T14:22:33+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783470" lat="52.5501275" lon="-1.8151451" user="blackadder" visible="true" timestamp="2007-05-30T14:22:33+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783471" lat="52.5505521" lon="-1.8157703" user="blackadder" visible="true" timestamp="2007-12-18T15:33:59+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783472" lat="52.5501836" lon="-1.8164007" user="blackadder" visible="true" timestamp="2007-12-18T15:33:59+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783473" lat="52.5506035" lon="-1.8170311" user="blackadder" visible="true" timestamp="2007-05-30T14:21:32+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783474" lat="52.5509559" lon="-1.8164092" user="blackadder" visible="true" timestamp="2007-05-30T14:21:33+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783571" lat="52.5506331" lon="-1.813672" user="blackadder" visible="true" timestamp="2007-05-30T14:25:11+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175922968" lat="52.5508635" lon="-1.8167837" user="blackadder" visible="true" timestamp="2007-12-18T16:12:50+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175922970" lat="52.5507591" lon="-1.8169628" user="blackadder" visible="true" timestamp="2007-12-17T23:10:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923086" lat="52.5506787" lon="-1.8175799" user="blackadder" visible="true" timestamp="2007-12-17T23:10:50+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923089" lat="52.5505886" lon="-1.8177227" user="blackadder" visible="true" timestamp="2007-12-18T16:12:51+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128255" lat="52.5504144" lon="-1.8171548" user="blackadder" visible="true" timestamp="2007-12-18T16:12:52+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128257" lat="52.5506497" lon="-1.8175392" user="blackadder" visible="true" timestamp="2007-12-18T16:12:52+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128259" lat="52.550557" lon="-1.8176871" user="blackadder" visible="true" timestamp="2007-12-18T16:12:52+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128262" lat="52.5503122" lon="-1.8173195" user="blackadder" visible="true" timestamp="2007-12-18T16:12:52+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128265" lat="52.5499209" lon="-1.8164147" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128266" lat="52.550178" lon="-1.8175708" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128268" lat="52.550066" lon="-1.8176374" user="blackadder" visible="true" timestamp="2007-12-19T17:06:34+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128270" lat="52.5498069" lon="-1.8164854" user="blackadder" visible="true" timestamp="2007-12-19T17:06:34+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128273" lat="52.5498629" lon="-1.8162923" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128275" lat="52.5497909" lon="-1.8164134" user="blackadder" visible="true" timestamp="2007-12-19T17:06:34+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128278" lat="52.5502519" lon="-1.8173348" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128280" lat="52.5504396" lon="-1.817036" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128281" lat="52.5503051" lon="-1.816799" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128283" lat="52.5502337" lon="-1.8169643" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128286" lat="52.5503168" lon="-1.8170397" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
<tag k="amenity" v="parking"/>
</node>
<node id="177177218" lat="52.5501201" lon="-1.8175441" user="blackadder" visible="true" timestamp="2007-12-18T16:53:50+00:00">
<tag k="created_by" v="JOSM"/>
<tag k="ref" v="28"/>
<tag k="building" v="residential"/>
</node>
<node id="177177220" lat="52.5498859" lon="-1.8164918" user="blackadder" visible="true" timestamp="2007-12-18T16:53:50+00:00">
<tag k="created_by" v="JOSM"/>
<tag k="ref" v="2"/>
<tag k="building" v="residential"/>
</node>
<node id="177177222" lat="52.5498106" lon="-1.8162993" user="blackadder" visible="true" timestamp="2007-12-18T16:53:50+00:00">
<tag k="created_by" v="JOSM"/>
<tag k="ref" v="160"/>
<tag k="building" v="residential"/>
</node>
<node id="177230961" lat="52.550392" lon="-1.8172751" user="blackadder" visible="true" timestamp="2007-12-18T16:53:44+00:00">
<tag k="created_by" v="JOSM"/>
<tag k="ref" v="158"/>
<tag k="building" v="residential"/>
</node>
<node id="177230963" lat="52.5501893" lon="-1.8162725" user="blackadder" visible="true" timestamp="2007-12-18T16:53:44+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230965" lat="52.5502522" lon="-1.8161638" user="blackadder" visible="true" timestamp="2007-12-18T16:53:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230968" lat="52.5498311" lon="-1.8155709" user="blackadder" visible="true" timestamp="2007-12-18T16:53:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231022" lat="52.5497724" lon="-1.8156875" user="blackadder" visible="true" timestamp="2007-12-18T16:53:47+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231024" lat="52.5501922" lon="-1.8161729" user="blackadder" visible="true" timestamp="2007-12-18T16:53:47+00:00">
<tag k="created_by" v="JOSM"/>
<tag k="ref" v="145"/>
<tag k="building" v="residential"/>
</node>
<node id="200551" lat="52.5520062" lon="-1.8172738" user="blackadder" visible="true" timestamp="2006-03-22T16:33:54+00:00"/>
<node id="200552" lat="52.5520649" lon="-1.8171246" user="blackadder" visible="true" timestamp="2006-03-22T16:33:55+00:00"/>
<node id="200553" lat="52.5520008" lon="-1.8172124" user="blackadder" visible="true" timestamp="2006-03-22T16:33:59+00:00"/>
<node id="200554" lat="52.5517927" lon="-1.8169666" user="blackadder" visible="true" timestamp="2006-03-22T16:34:01+00:00"/>
<node id="200555" lat="52.5517499" lon="-1.8168788" user="blackadder" visible="true" timestamp="2006-03-22T16:34:03+00:00"/>
<node id="200556" lat="52.5517248" lon="-1.8167286" user="blackadder" visible="true" timestamp="2007-11-22T17:33:33+00:00"/>
<node id="200557" lat="52.5518792" lon="-1.8163956" user="blackadder" visible="true" timestamp="2007-11-22T17:33:33+00:00"/>
<node id="200558" lat="52.5519665" lon="-1.8163705" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200562" lat="52.5519848" lon="-1.815281" user="blackadder" visible="true" timestamp="2006-03-22T16:34:21+00:00"/>
<node id="200573" lat="52.5520736" lon="-1.8145054" user="blackadder" visible="true" timestamp="2006-03-22T16:34:49+00:00"/>
<node id="200751" lat="52.5511951" lon="-1.8142246" user="blackadder" visible="true" timestamp="2006-03-22T16:36:18+00:00"/>
<node id="29783476" lat="52.5513103" lon="-1.8169385" user="blackadder" visible="true" timestamp="2007-05-30T14:21:33+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783477" lat="52.5517893" lon="-1.8159626" user="blackadder" visible="true" timestamp="2007-05-30T14:21:33+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783478" lat="52.5518461" lon="-1.8145067" user="blackadder" visible="true" timestamp="2007-05-30T14:21:33+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783479" lat="52.5511883" lon="-1.8143197" user="blackadder" visible="true" timestamp="2007-05-30T14:21:33+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="200511" lat="52.5558034" lon="-1.8267378" user="blackadder" visible="true" timestamp="2006-03-22T16:32:25+00:00"/>
<node id="200512" lat="52.5550357" lon="-1.8249151" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200513" lat="52.5553343" lon="-1.8257585" user="blackadder" visible="true" timestamp="2006-03-22T16:32:28+00:00"/>
<node id="200514" lat="52.5546308" lon="-1.8238934" user="blackadder" visible="true" timestamp="2006-03-22T16:32:30+00:00"/>
<node id="200515" lat="52.5544693" lon="-1.823135" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200517" lat="52.5545308" lon="-1.8235208" user="blackadder" visible="true" timestamp="2006-03-22T16:32:37+00:00"/>
<node id="200526" lat="52.5543989" lon="-1.8225501" user="blackadder" visible="true" timestamp="2006-03-22T16:33:02+00:00"/>
<node id="200527" lat="52.5543241" lon="-1.8221902" user="blackadder" visible="true" timestamp="2006-03-22T16:33:05+00:00"/>
<node id="200528" lat="52.5542654" lon="-1.8219444" user="blackadder" visible="true" timestamp="2006-03-22T16:33:07+00:00"/>
<node id="200530" lat="52.5541587" lon="-1.8216547" user="blackadder" visible="true" timestamp="2006-03-22T16:33:11+00:00"/>
<node id="200532" lat="52.5538918" lon="-1.821163" user="blackadder" visible="true" timestamp="2006-03-22T16:33:15+00:00"/>
<node id="200533" lat="52.5536782" lon="-1.8208031" user="blackadder" visible="true" timestamp="2006-03-22T16:33:17+00:00"/>
<node id="200534" lat="52.5534108" lon="-1.8204187" user="blackadder" visible="true" timestamp="2006-03-22T16:33:19+00:00"/>
<node id="200535" lat="52.5530804" lon="-1.8200481" user="blackadder" visible="true" timestamp="2006-03-22T16:33:21+00:00"/>
<node id="200536" lat="52.5527228" lon="-1.8197232" user="blackadder" visible="true" timestamp="2006-03-22T16:33:23+00:00"/>
<node id="200537" lat="52.5525413" lon="-1.8195652" user="blackadder" visible="true" timestamp="2006-03-22T16:33:25+00:00"/>
<node id="200539" lat="52.5522844" lon="-1.8193896" user="blackadder" visible="true" timestamp="2006-03-22T16:33:29+00:00"/>
<node id="200540" lat="52.5519374" lon="-1.8190999" user="blackadder" visible="true" timestamp="2006-03-22T16:33:31+00:00"/>
<node id="200541" lat="52.5521848" lon="-1.8193018" user="blackadder" visible="true" timestamp="2007-12-17T23:11:03+00:00"/>
<node id="200542" lat="52.5516186" lon="-1.8186947" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200543" lat="52.5517933" lon="-1.8189419" user="blackadder" visible="true" timestamp="2006-03-22T16:33:37+00:00"/>
<node id="200544" lat="52.5513983" lon="-1.8183449" user="blackadder" visible="true" timestamp="2006-03-22T16:33:39+00:00"/>
<node id="200550" lat="52.5519976" lon="-1.8179888" user="blackadder" visible="true" timestamp="2007-11-22T17:33:33+00:00"/>
<node id="200559" lat="52.5523069" lon="-1.816393" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200560" lat="52.5523905" lon="-1.8163169" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200561" lat="52.552524" lon="-1.8159306" user="blackadder" visible="true" timestamp="2006-03-22T21:55:12+00:00"/>
<node id="200563" lat="52.5526121" lon="-1.8152809" user="blackadder" visible="true" timestamp="2006-03-22T16:34:24+00:00"/>
<node id="200564" lat="52.5526358" lon="-1.8149766" user="blackadder" visible="true" timestamp="2007-11-22T17:33:34+00:00"/>
<node id="200565" lat="52.5526654" lon="-1.8146664" user="blackadder" visible="true" timestamp="2006-03-22T16:34:29+00:00"/>
<node id="200566" lat="52.5525937" lon="-1.8156438" user="blackadder" visible="true" timestamp="2006-03-22T16:34:31+00:00"/>
<node id="200571" lat="52.5535575" lon="-1.8148566" user="blackadder" visible="true" timestamp="2007-11-15T12:54:40+00:00"/>
<node id="200572" lat="52.5523885" lon="-1.8145932" user="blackadder" visible="true" timestamp="2006-03-22T16:34:46+00:00"/>
<node id="200629" lat="52.5495701" lon="-1.8156789" user="blackadder" visible="true" timestamp="2007-11-22T17:33:31+00:00"/>
<node id="200630" lat="52.5493694" lon="-1.815524" user="blackadder" visible="true" timestamp="2007-11-22T17:33:31+00:00"/>
<node id="200631" lat="52.5490781" lon="-1.8153587" user="blackadder" visible="true" timestamp="2007-11-22T17:33:31+00:00"/>
<node id="200632" lat="52.5488293" lon="-1.815287" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200633" lat="52.5485269" lon="-1.8153192" user="blackadder" visible="true" timestamp="2007-11-22T17:33:32+00:00"/>
<node id="200650" lat="52.5482109" lon="-1.815399" user="blackadder" visible="true" timestamp="2007-11-22T17:33:31+00:00"/>
<node id="200651" lat="52.5478984" lon="-1.8153867" user="blackadder" visible="true" timestamp="2007-11-22T17:33:31+00:00"/>
<node id="200652" lat="52.5474767" lon="-1.8152603" user="blackadder" visible="true" timestamp="2007-11-22T17:33:31+00:00"/>
<node id="200653" lat="52.5468312" lon="-1.8150679" user="blackadder" visible="true" timestamp="2007-11-22T17:33:29+00:00"/>
<node id="200753" lat="52.5496876" lon="-1.8136891" user="blackadder" visible="true" timestamp="2006-03-22T21:55:13+00:00"/>
<node id="200754" lat="52.549009" lon="-1.8133906" user="blackadder" visible="true" timestamp="2006-03-22T16:36:24+00:00"/>
<node id="200755" lat="52.5478879" lon="-1.8128287" user="blackadder" visible="true" timestamp="2006-03-22T16:36:26+00:00"/>
<node id="200756" lat="52.548993" lon="-1.8134871" user="blackadder" visible="true" timestamp="2006-03-22T16:36:28+00:00"/>
<node id="200757" lat="52.5490304" lon="-1.8135925" user="blackadder" visible="true" timestamp="2006-03-22T16:36:31+00:00"/>
<node id="200759" lat="52.5464722" lon="-1.8119684" user="blackadder" visible="true" timestamp="2006-03-22T16:36:34+00:00"/>
<node id="200771" lat="52.5466312" lon="-1.8121126" user="blackadder" visible="true" timestamp="2006-03-22T16:37:02+00:00"/>
<node id="653117" lat="52.5423754" lon="-1.8078749" user="blackadder" visible="true" timestamp="2007-11-26T18:40:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="653118" lat="52.5465842" lon="-1.81179" user="blackadder" visible="true" timestamp="2006-03-25T18:08:29+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="653119" lat="52.5444001" lon="-1.8100834" user="blackadder" visible="true" timestamp="2006-03-25T18:08:29+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="653120" lat="52.5490713" lon="-1.8131664" user="blackadder" visible="true" timestamp="2006-03-25T18:08:29+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="653122" lat="52.5526798" lon="-1.814402" user="blackadder" visible="true" timestamp="2006-03-25T18:08:29+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="653123" lat="52.5536564" lon="-1.814631" user="blackadder" visible="true" timestamp="2007-11-15T12:54:42+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783564" lat="52.5538289" lon="-1.8145536" user="blackadder" visible="true" timestamp="2007-11-15T12:53:07+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783565" lat="52.5539485" lon="-1.8128538" user="blackadder" visible="true" timestamp="2007-11-15T12:53:07+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783566" lat="52.5509299" lon="-1.8119156" user="blackadder" visible="true" timestamp="2007-05-30T14:25:10+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783567" lat="52.5470281" lon="-1.8097771" user="blackadder" visible="true" timestamp="2007-05-30T14:25:11+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783568" lat="52.5465979" lon="-1.811457" user="blackadder" visible="true" timestamp="2007-05-30T14:25:11+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783569" lat="52.5466086" lon="-1.8115118" user="blackadder" visible="true" timestamp="2007-05-30T14:25:11+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783570" lat="52.5491153" lon="-1.8130205" user="blackadder" visible="true" timestamp="2007-05-30T14:25:11+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="29783572" lat="52.5527014" lon="-1.8142812" user="blackadder" visible="true" timestamp="2007-05-30T14:25:11+01:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="135352210" lat="52.5549423" lon="-1.814954" user="blackadder" visible="true" timestamp="2007-11-26T18:37:58+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175922965" lat="52.551783" lon="-1.8181591" user="blackadder" visible="true" timestamp="2007-12-18T16:12:50+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175922972" lat="52.5516751" lon="-1.8183582" user="blackadder" visible="true" timestamp="2007-12-17T23:10:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923064" lat="52.5542375" lon="-1.8222046" user="blackadder" visible="true" timestamp="2007-12-18T15:34:00+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923066" lat="52.5540618" lon="-1.8217823" user="blackadder" visible="true" timestamp="2007-12-17T23:10:49+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923068" lat="52.5537913" lon="-1.8213338" user="blackadder" visible="true" timestamp="2007-12-17T23:10:49+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923070" lat="52.5529993" lon="-1.8203219" user="blackadder" visible="true" timestamp="2007-12-17T23:10:49+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923072" lat="52.5521418" lon="-1.8195539" user="blackadder" visible="true" timestamp="2007-12-17T23:10:49+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923077" lat="52.5517862" lon="-1.8192228" user="blackadder" visible="true" timestamp="2007-12-18T16:12:51+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923081" lat="52.55152" lon="-1.8188757" user="blackadder" visible="true" timestamp="2007-12-17T23:10:49+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923083" lat="52.5510247" lon="-1.8181078" user="blackadder" visible="true" timestamp="2007-12-17T23:10:50+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923092" lat="52.5514479" lon="-1.8190434" user="blackadder" visible="true" timestamp="2007-12-18T16:12:51+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923093" lat="52.5517434" lon="-1.8194353" user="blackadder" visible="true" timestamp="2007-12-18T16:12:51+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923094" lat="52.5529379" lon="-1.8205018" user="blackadder" visible="true" timestamp="2007-12-18T16:12:51+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923095" lat="52.5537161" lon="-1.8214889" user="blackadder" visible="true" timestamp="2007-12-18T16:12:51+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923096" lat="52.5539755" lon="-1.8218808" user="blackadder" visible="true" timestamp="2007-12-18T16:12:50+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="175923099" lat="52.5541405" lon="-1.8222767" user="blackadder" visible="true" timestamp="2007-12-18T15:34:00+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177081428" lat="52.5552884" lon="-1.8256253" user="blackadder" visible="true" timestamp="2007-12-18T15:01:16+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177081440" lat="52.5551147" lon="-1.825166" user="blackadder" visible="true" timestamp="2007-12-18T15:01:17+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128288" lat="52.5496708" lon="-1.816009" user="blackadder" visible="true" timestamp="2007-12-18T15:33:55+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128291" lat="52.5494958" lon="-1.8157939" user="blackadder" visible="true" timestamp="2007-12-18T15:33:56+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128294" lat="52.5492862" lon="-1.8156326" user="blackadder" visible="true" timestamp="2007-12-18T15:33:56+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128297" lat="52.5490612" lon="-1.8155156" user="blackadder" visible="true" timestamp="2007-12-18T15:33:56+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128299" lat="52.5488284" lon="-1.8154808" user="blackadder" visible="true" timestamp="2007-12-18T15:33:56+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128301" lat="52.5488246" lon="-1.8156477" user="blackadder" visible="true" timestamp="2007-12-19T17:06:33+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128303" lat="52.5490573" lon="-1.8156698" user="blackadder" visible="true" timestamp="2007-12-19T17:06:33+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128306" lat="52.5492802" lon="-1.8157959" user="blackadder" visible="true" timestamp="2007-12-19T17:06:33+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128308" lat="52.5494967" lon="-1.8159735" user="blackadder" visible="true" timestamp="2007-12-19T17:06:33+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177128310" lat="52.549613" lon="-1.8161509" user="blackadder" visible="true" timestamp="2007-12-19T17:06:33+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230972" lat="52.5496355" lon="-1.8153859" user="blackadder" visible="true" timestamp="2007-12-18T16:53:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230975" lat="52.5494398" lon="-1.8152371" user="blackadder" visible="true" timestamp="2007-12-18T16:53:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230979" lat="52.5492418" lon="-1.8151165" user="blackadder" visible="true" timestamp="2007-12-18T16:53:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230981" lat="52.5490437" lon="-1.8150441" user="blackadder" visible="true" timestamp="2007-12-18T16:53:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230983" lat="52.5488114" lon="-1.8149878" user="blackadder" visible="true" timestamp="2007-12-18T16:53:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230985" lat="52.5485375" lon="-1.815024" user="blackadder" visible="true" timestamp="2007-12-18T16:53:45+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230988" lat="52.5481977" lon="-1.8150843" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230989" lat="52.5480118" lon="-1.8150884" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177230996" lat="52.5480143" lon="-1.8152371" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231000" lat="52.5482099" lon="-1.8152331" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231003" lat="52.5485498" lon="-1.8151567" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231007" lat="52.5488212" lon="-1.8151246" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231010" lat="52.5490364" lon="-1.8151728" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231014" lat="52.5492393" lon="-1.8152452" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231016" lat="52.5494081" lon="-1.8153618" user="blackadder" visible="true" timestamp="2007-12-18T16:53:46+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231019" lat="52.5495915" lon="-1.8155106" user="blackadder" visible="true" timestamp="2007-12-18T16:53:47+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<node id="177231081" lat="52.5555213" lon="-1.8261466" user="blackadder" visible="true" timestamp="2007-12-18T16:53:49+00:00">
<tag k="created_by" v="JOSM"/>
</node>
<way id="35" visible="true" timestamp="2007-09-18T02:37:16+01:00" user="crschmidt">
<nd ref="200542"/>
<nd ref="200550"/>
<nd ref="200551"/>
<nd ref="200553"/>
<tag k="note" v="fire access route"/>
<tag k="created_by" v="JOSM"/>
<tag k="highway" v="footway"/>
<tag k="place_name" v="Sutton Coldfield"/>
<tag k="surface" v="paved"/>
</way>
<way id="37" visible="true" timestamp="2007-12-18T16:53:51+00:00" user="blackadder">
<nd ref="200511"/>
<nd ref="177231081"/>
<nd ref="200513"/>
<nd ref="177081428"/>
<nd ref="177081440"/>
<nd ref="200512"/>
<nd ref="200514"/>
<nd ref="200517"/>
<nd ref="200515"/>
<nd ref="200526"/>
<nd ref="200527"/>
<nd ref="200528"/>
<nd ref="200530"/>
<nd ref="200532"/>
<nd ref="200533"/>
<nd ref="200534"/>
<nd ref="200535"/>
<nd ref="200536"/>
<nd ref="200537"/>
<nd ref="200539"/>
<nd ref="200541"/>
<nd ref="200540"/>
<nd ref="200543"/>
<nd ref="200542"/>
<nd ref="200544"/>
<nd ref="200545"/>
<nd ref="200627"/>
<nd ref="200628"/>
<nd ref="200629"/>
<nd ref="200630"/>
<nd ref="200631"/>
<nd ref="200632"/>
<nd ref="200633"/>
<nd ref="200650"/>
<nd ref="200651"/>
<nd ref="200652"/>
<nd ref="200653"/>
<tag k="created_by" v="JOSM"/>
<tag k="place_name" v="Sutton Coldfield"/>
<tag k="postal_code" v="B72"/>
<tag k="name" v="Maney Hill Road"/>
<tag k="abutters" v="residential"/>
<tag k="highway" v="residential"/>
</way>
<way id="54" visible="true" timestamp="2006-03-29T09:51:45+01:00" user="blackadder">
<nd ref="200545"/>
<nd ref="200546"/>
<nd ref="200547"/>
<nd ref="200548"/>
<nd ref="200549"/>
<tag k="name" v="Mottrams Close"/>
<tag k="abutters" v="residential"/>
<tag k="postal_code" v="B72"/>
<tag k="highway" v="residential"/>
<tag k="place_name" v="Sutton Coldfield"/>
<tag k="created_by" v="JOSM"/>
</way>
<way id="55" visible="true" timestamp="2006-03-22T21:55:16+00:00" user="blackadder">
<nd ref="200758"/>
<nd ref="200757"/>
<nd ref="200756"/>
<nd ref="200754"/>
<tag k="place_name" v="Sutton Coldfield"/>
<tag k="highway" v="residential"/>
<tag k="postal_code" v="B72"/>
<tag k="name" v="East View Road"/>
<tag k="created_by" v="JOSM"/>
</way>
<way id="57" visible="true" timestamp="2007-09-26T14:35:13+01:00" user="blackadder">
<nd ref="200571"/>
<nd ref="200565"/>
<nd ref="200572"/>
<nd ref="200573"/>
<nd ref="200751"/>
<nd ref="200752"/>
<nd ref="200753"/>
<nd ref="200754"/>
<nd ref="200755"/>
<nd ref="200771"/>
<nd ref="200759"/>
<tag k="place_name" v="Sutton Coldfield"/>
<tag k="postal_code" v="B72"/>
<tag k="name" v="East View Road"/>
<tag k="created_by" v="JOSM"/>
<tag k="highway" v="unclassified"/>
</way>
<way id="395" visible="true" timestamp="2007-12-19T17:50:08+00:00" user="blackadder">
<nd ref="200552"/>
<nd ref="200553"/>
<nd ref="200554"/>
<nd ref="200555"/>
<nd ref="200556"/>
<nd ref="200557"/>
<nd ref="200558"/>
<nd ref="200559"/>
<nd ref="200560"/>
<nd ref="200561"/>
<nd ref="200566"/>
<nd ref="200563"/>
<nd ref="200564"/>
<nd ref="200565"/>
<tag k="place_name" v="Sutton Coldfield"/>
<tag k="postal_code" v="B72"/>
<tag k="name" v="Shooters Hill"/>
<tag k="abutters" v="residential"/>
<tag k="created_by" v="JOSM"/>
<tag k="highway" v="residential"/>
</way>
<way id="418" visible="true" timestamp="2006-03-25T11:39:32+00:00" user="blackadder">
<nd ref="200562"/>
<nd ref="200563"/>
<tag k="place_name" v="Sutton Coldfield"/>
<tag k="highway" v="residential"/>
<tag k="postal_code" v="B72"/>
<tag k="abutters" v="residential"/>
<tag k="name" v="Corncrake Close"/>
<tag k="created_by" v="JOSM"/>
</way>
<way id="4685537" visible="true" timestamp="2007-05-30T14:21:35+01:00" user="blackadder">
<nd ref="29783472"/>
<nd ref="29783473"/>
<nd ref="29783474"/>
<nd ref="29783476"/>
<nd ref="29783477"/>
<nd ref="29783478"/>
<nd ref="29783479"/>
<nd ref="29783468"/>
<nd ref="29783470"/>
<nd ref="29783471"/>
<nd ref="29783472"/>
<tag k="name" v="Maney Hill School"/>
<tag k="created_by" v="JOSM"/>
<tag k="landuse" v="school"/>
<tag k="amenity" v="school"/>
</way>
<way id="4685542" visible="true" timestamp="2007-05-30T14:25:15+01:00" user="blackadder">
<nd ref="29783570"/>
<nd ref="29783571"/>
<nd ref="29783572"/>
<nd ref="29783564"/>
<nd ref="29783565"/>
<nd ref="29783566"/>
<nd ref="29783567"/>
<nd ref="29783568"/>
<nd ref="29783569"/>
<nd ref="29783570"/>
<tag k="landuse" v="school"/>
<tag k="created_by" v="JOSM"/>
<tag k="amenity" v="school"/>
</way>
<way id="14166897" visible="true" timestamp="2007-11-26T18:40:45+00:00" user="blackadder">
<nd ref="135352210"/>
<nd ref="653123"/>
<nd ref="653122"/>
<nd ref="653121"/>
<nd ref="653120"/>
<nd ref="653118"/>
<nd ref="653119"/>
<nd ref="653117"/>
<tag k="created_by" v="JOSM"/>
<tag k="name" v="Freight Line"/>
<tag k="railway" v="rail"/>
</way>
<way id="16966783" visible="true" timestamp="2007-12-17T23:11:00+00:00" user="blackadder">
<nd ref="175922965"/>
<nd ref="175922968"/>
<nd ref="175922970"/>
<nd ref="175922972"/>
<nd ref="175922965"/>
<tag k="created_by" v="JOSM"/>
<tag k="building" v="residential"/>
</way>
<way id="16966792" visible="true" timestamp="2007-12-17T23:11:01+00:00" user="blackadder">
<nd ref="175923064"/>
<nd ref="175923066"/>
<nd ref="175923068"/>
<nd ref="175923070"/>
<nd ref="175923072"/>
<nd ref="175923077"/>
<nd ref="175923081"/>
<nd ref="175923083"/>
<nd ref="175923086"/>
<nd ref="175923089"/>
<nd ref="175923092"/>
<nd ref="175923093"/>
<nd ref="175923094"/>
<nd ref="175923095"/>
<nd ref="175923096"/>
<nd ref="175923099"/>
<nd ref="175923064"/>
<tag k="created_by" v="JOSM"/>
<tag k="building" v="residential"/>
</way>
<way id="17060325" visible="true" timestamp="2007-12-18T15:37:01+00:00" user="blackadder">
<nd ref="177128255"/>
<nd ref="177128262"/>
<nd ref="177128259"/>
<nd ref="177128257"/>
<nd ref="177128255"/>
<tag k="created_by" v="JOSM"/>
<tag k="building" v="residential"/>
</way>
<way id="17060326" visible="true" timestamp="2007-12-18T15:37:01+00:00" user="blackadder">
<nd ref="177128265"/>
<nd ref="177128270"/>
<nd ref="177128268"/>
<nd ref="177128266"/>
<nd ref="177128265"/>
<tag k="created_by" v="JOSM"/>
<tag k="building" v="residential"/>
</way>
<way id="17060327" visible="true" timestamp="2007-12-18T15:37:01+00:00" user="blackadder">
<nd ref="177128275"/>
<nd ref="177128273"/>
<nd ref="177128288"/>
<nd ref="177128291"/>
<nd ref="177128294"/>
<nd ref="177128297"/>
<nd ref="177128299"/>
<nd ref="177128301"/>
<nd ref="177128303"/>
<nd ref="177128306"/>
<nd ref="177128308"/>
<nd ref="177128310"/>
<nd ref="177128275"/>
<tag k="created_by" v="JOSM"/>
<tag k="building" v="residential"/>
</way>
<way id="17060329" visible="true" timestamp="2007-12-18T15:33:58+00:00" user="blackadder">
<nd ref="177128278"/>
<nd ref="177128280"/>
<nd ref="177128281"/>
<nd ref="177128283"/>
<nd ref="177128278"/>
<tag k="created_by" v="JOSM"/>
<tag k="amenity" v="parking"/>
</way>
<way id="17067452" visible="true" timestamp="2007-12-18T16:53:49+00:00" user="blackadder">
<nd ref="177230963"/>
<nd ref="177230965"/>
<nd ref="177230968"/>
<nd ref="177230972"/>
<nd ref="177230975"/>
<nd ref="177230979"/>
<nd ref="177230981"/>
<nd ref="177230983"/>
<nd ref="177230985"/>
<nd ref="177230988"/>
<nd ref="177230989"/>
<nd ref="177230996"/>
<nd ref="177231000"/>
<nd ref="177231003"/>
<nd ref="177231007"/>
<nd ref="177231010"/>
<nd ref="177231014"/>
<nd ref="177231016"/>
<nd ref="177231019"/>
<nd ref="177231022"/>
<nd ref="177230963"/>
<tag k="created_by" v="JOSM"/>
<tag k="building" v="residential"/>
</way>
</osm>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Using maxResolution to control overlays</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 650px;
@@ -50,7 +52,11 @@
<body onload="init()">
<h3 id="title">Using maxResolution to control overlays</h3>
<p id="shortdesc">
See how to control the maximum resolution for a markers layer,
causing it to not be displayed beyond a certain point.
</p>
<div id="map"></div>
</body>

View File

@@ -1,47 +1,104 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Overview Map Example</title>
<script src="../lib/OpenLayers.js" type="text/javascript"></script>
<style>
#map{
width:100%;
height:500px;
border:1px solid;
}
</style>
</head>
<body>
<div id="map"></div>
<html>
<head>
<title>Overview Map Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<script src="../lib/OpenLayers.js" type="text/javascript"></script>
<style>
#map1 {
width: 500px;
height: 300px;
border: 1px solid gray;
}
#map2 {
width: 500px;
height: 300px;
border: 1px solid gray;
}
</style>
</head>
<body>
<h1 id="title">Overview Map</h1>
<div id="tags">
</div>
<p id="shortdesc">
Enable a small Overview Map that moves/interacts with your main map.
</p>
<div id="map1"></div>
<p>The above map has an overview map control that is created with
the default options. Much like a regular map, the map contained by
the overview map control defaults to a geographic projection.</p>
<div id="map2"></div>
<p>The second map has an overview map control that is created with
non-default options. In this case, the mapOptions property of the
control has been set to use non-default projection related properties.
In addition, any other properties of the overview map control can be
set in this way.</p>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
// my city
var constantina = new OpenLayers.LonLat(-5.6165,37.8623);
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
var nasa_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi", {layers: "modis,global_mosaic"} );
map.addLayers([
nasa_wms,
wms
]);
// create the top map (with default overview map control)
var map1 = new OpenLayers.Map('map1');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var ol = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'}
);
var options = {
layers: [wms.clone()],
minRatio: 8,
maxRatio: 128
var jpl = new OpenLayers.Layer.WMS(
"NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"}
);
map1.addLayers([ol, jpl]);
map1.addControl(new OpenLayers.Control.LayerSwitcher());
// create an overview map control with the default options
var overview1 = new OpenLayers.Control.OverviewMap();
map1.addControl(overview1);
map1.setCenter(new OpenLayers.LonLat(0, 0), 2);
// expand the overview map control
overview1.maximizeControl();
// create the bottom map (with advanced overview map control)
var mapOptions = {
maxExtent: new OpenLayers.Bounds(33861, 717605, 330846, 1019656),
maxResolution: 296985/1024,
projection: "EPSG:2805",
units: "m"
};
var overview = new OpenLayers.Control.OverviewMap(options);
map.addControl(overview);
var map2 = new OpenLayers.Map('map2', mapOptions);
map.setCenter(constantina, 4);
var bos = new OpenLayers.Layer.WMS(
"Boston",
"http://boston.freemap.in/cgi-bin/mapserv",
{
map: '/www/freemap.in/boston/map/gmaps.map',
layers: 'border,water,roads,rapid_transit,buildings',
format: 'png'
}
);
map2.addLayers([bos]);
map2.addControl(new OpenLayers.Control.LayerSwitcher());
// create an overview map control with non-default options
var controlOptions = {
mapOptions: mapOptions
}
var overview2 = new OpenLayers.Control.OverviewMap(controlOptions);
map2.addControl(overview2);
map2.setCenter(new OpenLayers.LonLat(182500, 868500), 3);
// expand the overview map control
overview2.maximizeControl();
overview.maximizeControl();
</script>
</body>
</body>
</html>

View File

@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
@@ -51,8 +52,8 @@
}
</style>
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/Firebug/debug.js"></script>
<script type="text/javascript">
var lon = 5;
var lat = 40;
@@ -69,13 +70,16 @@
map.addLayer(vlayer);
zb = new OpenLayers.Control.ZoomBox();
zb = new OpenLayers.Control.ZoomBox(
{title:"Zoom box: Selecting it you can zoom on an area by clicking and dragging."});
var panel = new OpenLayers.Control.Panel({defaultControl: zb});
panel.addControls([
new OpenLayers.Control.MouseDefaults(),
new OpenLayers.Control.MouseDefaults(
{title:'You can use the default mouse configuration'}),
zb,
new OpenLayers.Control.DrawFeature(vlayer, OpenLayers.Handler.Path),
new OpenLayers.Control.ZoomToMaxExtent()
new OpenLayers.Control.DrawFeature(vlayer, OpenLayers.Handler.Path,
{title:'Draw a feature'}),
new OpenLayers.Control.ZoomToMaxExtent({title:"Zoom to the max extent"})
]);
map.addControl(panel);
@@ -84,6 +88,11 @@
</script>
</head>
<body onload="init()">
<h3 id="title">Custom Control.Panel</h3>
<p id="shortdesc">
Create a custom control.panel, styled entirely with
CSS, and add your own controls to it.
</p>
<div id="panel"></div>
<div id="map"></div>
</body>

View File

@@ -0,0 +1,69 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 800px;
height: 400px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer, rss, lineFeatures, popup;
OpenLayers.ProxyHost = "proxy.cgi?url=";
function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(20.22, 22.05), 9);
map.addControl(new OpenLayers.Control.LayerSwitcher());
}
function addUrl() {
var urlObj = OpenLayers.Util.getElement('url');
var value = urlObj.value;
var parts = value.split("/");
rss = new OpenLayers.Layer.GeoRSS(parts[parts.length-1], value);
rss.events.register("loadend", window, populateMap);
map.addLayer(rss);
}
function populateMap() {
// create the point track layer
var lineLayer = new OpenLayers.Layer.PointTrack(rss.name + " Track",
{dataFrom: OpenLayers.Layer.PointTrack.dataFrom.SOURCE_NODE});
// add the features from the rss layer to the track layer. This
// also works with OpenLayers.Feature.Vector features.
lineLayer.addNodes(rss.features);
map.addLayer(lineLayer);
rss.setName(rss.name + " Comments");
var feature, marker;
// only show markers for features that are not "Untitled"
for (var i = rss.features.length-1; i>0; i--) {
if (rss.features[i].data.popupContentHTML.indexOf(
"Untitled") != -1) {
rss.removeMarker(rss.markers[i]);
}
}
// keep markers on top of tracks
map.raiseLayer(rss, 1);
}
</script>
</head>
<body onload="init()">
<h1>GeoRSS PointTrack in OpenLayers</h1>
<p style="font-size:.9em;">This demo uses OpenLayers.Layer.GeoRSS and OpenLayers.Layer.PointTrack. The track is created by connecting the points of the GeoRSS feed.</a></p>
<form onsubmit="return false;">
GeoRSS URL: <input type="text" id="url" size="50" /><input type="submit" onclick="addUrl(); return false;" value="Load Feed" onsubmit="addUrl(); return false;" />
</form>
<p>The above input box allows the input of a URL to a GeoRSS feed. This feed can be local to the HTML page -- for example, entering 'xml/track1.xml' will work by default.</p>
<p>The example shows a track, displayed as a line connecting the points of the feed. It also shows markers at positions that have a title tag in the rss item. If clicked, a popup will show title and description.</p>
<div id="map"></div>
</body>
</html>

891
examples/popupMatrix.html Normal file
View File

@@ -0,0 +1,891 @@
<html xmlns="http://www.w3.org/1999/xhtml" debug="true">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 900px;
height: 500px;
border: 1px solid black;
background-color: blue;
}
</style>
<link rel="stylesheet" href="../theme/default/framedCloud.css" type="text/css" />
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
var layer, markers;
var currentPopup;
var samplePopupContentsHTML = "Old man down, way down down, down by the docks of the city.<br>Blind and dirty, asked me for a dime, a dime for a cup of coffee.<br>I got no dime but I got some time to hear his story.<br>My name is August West, and I love my Pearly Baker best more than my wine.<br>More than my wine - more than my maker, though he's no friend of mine.<br><br>Everyone said, I'd come to no good, I knew I would Pearly, believe them.<br>Half of my life, I spent doin' time for some other fucker's crime,<br>The other half found me stumbling 'round drunk on Burgundy wine.<br><br>But I'll get back on my feet again someday,<br>The good Lord willin', if He says I may.<br>I know that the life i'm livin's no good,<br>I'll get a new start, live the life I should.<br>I'll get up and fly away, I'll get up and fly away, fly away.<br><br>Pearly's been true, true to me, true to my dyin' day he said,<br>I said to him, I said to him, I'm sure she's been.<br>I said to him, I'm sure she's been tru to you.<br><br>Got up and wandered, wandered downtown, nowhere to go but just hang around.<br>I've got a girl, named Bonnie Lee, I know that girl's been true to me.<br>I know she's been, I'm sure she's been true to me.<br><br>";
var samplePopupContentsHTML_WideShort = "Old man down, way down down, down by the docks of the city.Blind and dirty, asked me for a dime, a dime for a cup of coffee.I got no dime but I got some time to hear his story.My name is August West, and I love my Pearly Baker best more than my wine.More than my wine - more than my maker, though he's no friend of mine.Everyone said, I'd come to no good, I knew I would Pearly, believe them.<br>Half of my life, I spent doin' time for some other fucker's crime,The other half found me stumbling 'round drunk on Burgundy wine.But I'll get back on my feet again someday,The good Lord willin', if He says I may.I know that the life i'm livin's no good,I'll get a new start, live the life I should.I'll get up and fly away, I'll get up and fly away, fly away.Pearly's been true, true to me, true to my dyin' day he said,I said to him, I said to him, I'm sure she's been.I said to him, I'm sure she's been tru to you.Got up and wandered, wandered downtown, nowhere to go but just hang around.I've got a girl, named Bonnie Lee, I know that girl's been true to me.I know she's been, I'm sure she's been true to me.";
// different popup types
//anchored
AutoSizeAnchored = OpenLayers.Class(OpenLayers.Popup.Anchored, {
'autoSize': true
});
AutoSizeAnchoredMinSize = OpenLayers.Class(OpenLayers.Popup.Anchored, {
'autoSize': true,
'minSize': new OpenLayers.Size(400,400)
});
AutoSizeAnchoredMaxSize = OpenLayers.Class(OpenLayers.Popup.Anchored, {
'autoSize': true,
'maxSize': new OpenLayers.Size(100,100)
});
//anchoredbubble
AutoSizeAnchoredBubble = OpenLayers.Class(OpenLayers.Popup.AnchoredBubble, {
'autoSize': true
});
AutoSizeAnchoredBubbleMinSize = OpenLayers.Class(OpenLayers.Popup.AnchoredBubble, {
'autoSize': true,
'minSize': new OpenLayers.Size(400,400)
});
AutoSizeAnchoredBubbleMaxSize = OpenLayers.Class(OpenLayers.Popup.AnchoredBubble, {
'autoSize': true,
'maxSize': new OpenLayers.Size(100,100)
});
//framed
//disable the autosize for the purpose of our matrix
OpenLayers.Popup.FramedCloud.prototype.autoSize = false;
AutoSizeFramedCloud = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {
'autoSize': true
});
AutoSizeFramedCloudMinSize = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {
'autoSize': true,
'minSize': new OpenLayers.Size(400,400)
});
AutoSizeFramedCloudMaxSize = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {
'autoSize': true,
'maxSize': new OpenLayers.Size(100,100)
});
function init(){
map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.Image(
"popupMatrix",
"popupMatrix.jpg",
new OpenLayers.Bounds(-82.5,-71.5,97.5,67.5),
new OpenLayers.Size(1024,768)
);
map.addLayer(layer);
markers = new OpenLayers.Layer.Markers("zibo");
map.addLayer(markers);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
addMarkers();
}
function addMarkers() {
var ll, popupClass, popupContentHTML;
//
//Anchored NO OVERFLOW
//
//anchored popup small contents no autosize
ll = new OpenLayers.LonLat(-55,20);
popupClass = OpenLayers.Popup.Anchored;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup small contents no autosize closebox
var ll = new OpenLayers.LonLat(-50,20);
popupClass = OpenLayers.Popup.Anchored;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup small contents autosize
ll = new OpenLayers.LonLat(-40,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup small contents autosize closebox
ll = new OpenLayers.LonLat(-35,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup small contents autosize minsize
ll = new OpenLayers.LonLat(-25,20);
popupClass = AutoSizeAnchoredMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup small contents autosize minsize closebox
ll = new OpenLayers.LonLat(-20,20);
popupClass = AutoSizeAnchoredMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup small contents autosize maxsize
ll = new OpenLayers.LonLat(-10,20);
popupClass = AutoSizeAnchoredMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup small contents autosize maxsize closebox
ll = new OpenLayers.LonLat(-5,20);
popupClass = AutoSizeAnchoredMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup bigger contents autosize
ll = new OpenLayers.LonLat(5,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML);
//anchored popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup wide short text contents autosize
ll = new OpenLayers.LonLat(20,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML);
//anchored popup wide short text contents autosize closebox
ll = new OpenLayers.LonLat(25,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup wide short fixed contents autosize
ll = new OpenLayers.LonLat(35,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup wide short fixed contents autosize closebox
ll = new OpenLayers.LonLat(40,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="wideshort.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup thin long fixed contents autosize
ll = new OpenLayers.LonLat(50,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML);
//anchored popup thin long fixed contents autosize closebox
ll = new OpenLayers.LonLat(55,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="thinlong.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored popup wide long fixed contents autosize
ll = new OpenLayers.LonLat(65,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML);
//anchored popup wide long fixed contents autosize closebox
ll = new OpenLayers.LonLat(70,20);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true);
//
//Anchored WITH OVERFLOW
//
//anchored popup small contents no autosize overflow
var ll = new OpenLayers.LonLat(-55,15);
popupClass = OpenLayers.Popup.Anchored;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup small contents no autosize closebox overflow
var ll = new OpenLayers.LonLat(-50,15);
popupClass = OpenLayers.Popup.Anchored;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup small contents autosize overflow
ll = new OpenLayers.LonLat(-40,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup small contents autosize closebox overflow
ll = new OpenLayers.LonLat(-35,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup small contents autosize minsize overflow
ll = new OpenLayers.LonLat(-25,15);
popupClass = AutoSizeAnchoredMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup small contents autosize minsize closebox overflow
ll = new OpenLayers.LonLat(-20,15);
popupClass = AutoSizeAnchoredMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup small contents autosize maxsize overflow
ll = new OpenLayers.LonLat(-10,15);
popupClass = AutoSizeAnchoredMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup small contents autosize maxsize closebox overflow
ll = new OpenLayers.LonLat(-5,15);
popupClass = AutoSizeAnchoredMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup bigger contents autosize overflow
ll = new OpenLayers.LonLat(5,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup bigger contents autosize closebox overflow
ll = new OpenLayers.LonLat(10,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup wide short text contents autosize overflow
ll = new OpenLayers.LonLat(20,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup wide short text contents autosize closebox overflow
ll = new OpenLayers.LonLat(25,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup wide short fixed contents autosize overflow
ll = new OpenLayers.LonLat(35,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup wide short fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(40,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup thin long fixed contents autosize overflow
ll = new OpenLayers.LonLat(50,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup thin long fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(55,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored popup wide long fixed contents autosize overflow
ll = new OpenLayers.LonLat(65,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored popup wide long fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(70,15);
popupClass = AutoSizeAnchored;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//
//Bubble NO OVERFLOW
//
//anchored bubble popup small contents no autosize
var ll = new OpenLayers.LonLat(-55,5);
popupClass = OpenLayers.Popup.AnchoredBubble;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup small contents no autosize closebox
var ll = new OpenLayers.LonLat(-50,5);
popupClass = OpenLayers.Popup.AnchoredBubble;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup small contents autosize
ll = new OpenLayers.LonLat(-40,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup small contents autosize closebox
ll = new OpenLayers.LonLat(-35,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup small contents autosize minsize
ll = new OpenLayers.LonLat(-25,5);
popupClass = AutoSizeAnchoredBubbleMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup small contents autosize minsize closebox
ll = new OpenLayers.LonLat(-20,5);
popupClass = AutoSizeAnchoredBubbleMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup small contents autosize maxsize
ll = new OpenLayers.LonLat(-10,5);
popupClass = AutoSizeAnchoredBubbleMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup small contents autosize maxsize closebox
ll = new OpenLayers.LonLat(-5,5);
popupClass = AutoSizeAnchoredBubbleMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(5,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide short text contents autosize
ll = new OpenLayers.LonLat(20,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide short text contents autosize closebox
ll = new OpenLayers.LonLat(25,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide short fixed contents autosize
ll = new OpenLayers.LonLat(35,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide short fixed contents autosize closebox
ll = new OpenLayers.LonLat(40,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup thin long fixed contents autosize
ll = new OpenLayers.LonLat(50,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup thin long fixed contents autosize closebox
ll = new OpenLayers.LonLat(55,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide long fixed contents autosize
ll = new OpenLayers.LonLat(65,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide long fixed contents autosize closebox
ll = new OpenLayers.LonLat(70,5);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true);
//
//Bubble OVERFLOW
//
//anchored bubble popup small contents no autosize
var ll = new OpenLayers.LonLat(-55,0);
popupClass = OpenLayers.Popup.AnchoredBubble;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup small contents no autosize closebox
var ll = new OpenLayers.LonLat(-50,0);
popupClass = OpenLayers.Popup.AnchoredBubble;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup small contents autosize
ll = new OpenLayers.LonLat(-40,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup small contents autosize closebox
ll = new OpenLayers.LonLat(-35,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup small contents autosize minsize
ll = new OpenLayers.LonLat(-25,0);
popupClass = AutoSizeAnchoredBubbleMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup small contents autosize minsize closebox
ll = new OpenLayers.LonLat(-20,0);
popupClass = AutoSizeAnchoredBubbleMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup small contents autosize maxsize
ll = new OpenLayers.LonLat(-10,0);
popupClass = AutoSizeAnchoredBubbleMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup small contents autosize maxsize closebox
ll = new OpenLayers.LonLat(-5,0);
popupClass = AutoSizeAnchoredBubbleMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(5,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide short contents autosize overflow
ll = new OpenLayers.LonLat(20,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup wide short contents autosize closebox overflow
ll = new OpenLayers.LonLat(25,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide short fixed contents autosize overflow
ll = new OpenLayers.LonLat(35,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup wide short fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(40,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup thin long fixed contents autosize overflow
ll = new OpenLayers.LonLat(50,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup thin long fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(55,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide long fixed contents autosize overflow
ll = new OpenLayers.LonLat(65,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup wide long fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(70,0);
popupClass = AutoSizeAnchoredBubble;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//FRAMED
//
//FRAMED NO OVERFLOW
//
//anchored bubble popup small contents no autosize
var ll = new OpenLayers.LonLat(-55,-15);
popupClass = OpenLayers.Popup.FramedCloud;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup small contents no autosize closebox
var ll = new OpenLayers.LonLat(-50,-15);
popupClass = OpenLayers.Popup.FramedCloud;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup small contents autosize
ll = new OpenLayers.LonLat(-40,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup small contents autosize closebox
ll = new OpenLayers.LonLat(-35,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup small contents autosize minsize
ll = new OpenLayers.LonLat(-25,-15);
popupClass = AutoSizeFramedCloudMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup small contents autosize minsize closebox
ll = new OpenLayers.LonLat(-20,-15);
popupClass = AutoSizeFramedCloudMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup small contents autosize maxsize
ll = new OpenLayers.LonLat(-10,-15);
popupClass = AutoSizeFramedCloudMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup small contents autosize maxsize closebox
ll = new OpenLayers.LonLat(-5,-15);
popupClass = AutoSizeFramedCloudMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(5,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, false);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide short text contents autosize
ll = new OpenLayers.LonLat(20,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide short text contents autosize closebox
ll = new OpenLayers.LonLat(25,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide short fixed contents autosize
ll = new OpenLayers.LonLat(35,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide short fixed contents autosize closebox
ll = new OpenLayers.LonLat(40,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup thin long fixed contents autosize
ll = new OpenLayers.LonLat(50,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup thin long fixed contents autosize closebox
ll = new OpenLayers.LonLat(55,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true);
//anchored bubble popup wide long fixed contents autosize
ll = new OpenLayers.LonLat(65,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML);
//anchored bubble popup wide long fixed contents autosize closebox
ll = new OpenLayers.LonLat(70,-15);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true);
//
//FRAMED OVERFLOW
//
//anchored bubble popup small contents no autosize
var ll = new OpenLayers.LonLat(-55,-20);
popupClass = OpenLayers.Popup.FramedCloud;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup small contents no autosize closebox
var ll = new OpenLayers.LonLat(-50,-20);
popupClass = OpenLayers.Popup.FramedCloud;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup small contents autosize
ll = new OpenLayers.LonLat(-40,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup small contents autosize closebox
ll = new OpenLayers.LonLat(-35,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup small contents autosize minsize
ll = new OpenLayers.LonLat(-25,-20);
popupClass = AutoSizeFramedCloudMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup small contents autosize minsize closebox
ll = new OpenLayers.LonLat(-20,-20);
popupClass = AutoSizeFramedCloudMinSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup small contents autosize maxsize
ll = new OpenLayers.LonLat(-10,-20);
popupClass = AutoSizeFramedCloudMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup small contents autosize maxsize closebox
ll = new OpenLayers.LonLat(-5,-20);
popupClass = AutoSizeFramedCloudMaxSize;
popupContentHTML = '<img src="small.jpg"></img>';
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(5,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup bigger contents autosize closebox
ll = new OpenLayers.LonLat(10,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide short contents autosize overflow
ll = new OpenLayers.LonLat(20,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup wide short contents autosize closebox overflow
ll = new OpenLayers.LonLat(25,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide short fixed contents autosize overflow
ll = new OpenLayers.LonLat(35,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup wide short fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(40,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="wideshort.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup thin long fixed contents autosize overflow
ll = new OpenLayers.LonLat(50,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup thin long fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(55,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="thinlong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
//anchored bubble popup wide long fixed contents autosize overflow
ll = new OpenLayers.LonLat(65,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, false, true);
//anchored bubble popup wide long fixed contents autosize closebox overflow
ll = new OpenLayers.LonLat(70,-20);
popupClass = AutoSizeFramedCloud;
popupContentHTML = '<img src="widelong.jpg"></img>'
addMarker(ll, popupClass, popupContentHTML, true, true);
}
/**
* Function: addMarker
* Add a new marker to the markers layer given the following lonlat,
* popupClass, and popup contents HTML. Also allow specifying
* whether or not to give the popup a close box.
*
* Parameters:
* ll - {<OpenLayers.LonLat>} Where to place the marker
* popupClass - {<OpenLayers.Class>} Which class of popup to bring up
* when the marker is clicked.
* popupContentHTML - {String} What to put in the popup
* closeBox - {Boolean} Should popup have a close box?
* overflow - {Boolean} Let the popup overflow scrollbars?
*/
function addMarker(ll, popupClass, popupContentHTML, closeBox, overflow) {
var feature = new OpenLayers.Feature(layer, ll);
feature.closeBox = closeBox;
feature.popupClass = popupClass;
feature.data.popupContentHTML = popupContentHTML;
feature.data.overflow = (overflow) ? "auto" : "hidden";
var marker = feature.createMarker();
var markerClick = function (evt) {
if (this.popup == null) {
this.popup = this.createPopup(this.closeBox);
map.addPopup(this.popup);
this.popup.show();
} else {
this.popup.toggle();
}
currentPopup = this.popup;
OpenLayers.Event.stop(evt);
};
marker.events.register("mousedown", feature, markerClick);
markers.addMarker(marker);
}
</script>
</head>
<body onload="init()">
<h1 id="title">Popup Matrix</h1>
<div id="tags">
</div>
<p id="shortdesc">
All kinds of different popup configurations.
</p>
<div id="map"></div>
<!-- preloading these images so the autosize will work correctly -->
<img src="small.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
<img src="wideshort.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
<img src="widelong.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
<img src="thinlong.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
<br/>
</div>
</body>
</html>

BIN
examples/popupMatrix.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -1,5 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -7,8 +8,8 @@
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer, popup;
var markers, feature, marker;
@@ -71,25 +72,14 @@
}
function mousedown(evt) {
// check to see if the popup was hidden by the close box
// if so, then destroy it before continuing
if (popup != null) {
if (!popup.visible()) {
markers.map.removePopup(popup);
popup.destroy();
popup = null;
}
}
if (popup == null) {
popup = feature.createPopup(true);
popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>");
popup.setContentHTML("<div style='background-color:red; width:150;height:100'><a href='http://www.somethingconstructive.net' target='_blank'>click me</a></div>");
popup.setBackgroundColor("yellow");
popup.setOpacity(0.7);
markers.map.addPopup(popup);
} else {
markers.map.removePopup(popup);
popup.destroy();
popup = null;
popup.toggle();
}
OpenLayers.Event.stop(evt);
}
@@ -120,6 +110,14 @@
</script>
</head>
<body onload="init()">
<h1 id="title">Popup Mayhem</h1>
<div id="tags">
</div>
<p id="shortdesc">
All kinds of ways to create and interact with Popups.
</p>
<div id="map"></div>
<p>If you open an anchoredbubble and switch to google, it shouldn't crash. If it does, don't release OpenLayers.</p>
<div style="background-color:purple" onclick="add()"> click to add Popup to map</div>
@@ -129,5 +127,8 @@
<div style="background-color:grey" onclick="removelayer()"> click to remove the markers layer</div>
<div style="background-color:orange" onclick="alert(marker.onScreen())"> marker.onscreen()?</div>
<div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div>
<div id="docs">
Detailed description of this example needs to be written.
</div>
</body>
</html>

View File

@@ -1,6 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
body {
border: 0px;
@@ -55,6 +56,13 @@
</head>
<body onload="init()">
<h1 id="title">Layer Projections</h1>
<div id="tags">
</div>
<p id="shortdesc">
Use different (not default) projections with your map
</p>
<div id="map"></div>
<p>When using alternative projections, you still use OpenLayers.LonLat objects, even though
the properties are actually X/Y values at that point.</p>

View File

@@ -6,22 +6,32 @@ restrictions that prevent the Javascript from loading pages not on the
same server as the Javascript. This has several problems: it's less
efficient, it might break some sites, and it's a security risk because
people can use this proxy to browse the web and possibly do bad stuff
with it. If you can get your code signed (see:
http://trac.openlayers.org/wiki/HowToSignJavascript), then you should
modify Parameters.js so that this isn't used. Otherwise, you're stuck
with it. It only loads pages via http and https, but it can load any
content type. XML and HTML are both currently used by Openlayers."""
content type. It supports GET and POST requests."""
import urllib
import urllib2
import cgi
fs = cgi.FieldStorage()
url = fs.getvalue('url', "http://openlayers.org")
import sys, os
# Designed to prevent Open Proxy type stuff.
allowedHosts = ['www.openlayers.org', 'openlayers.org', 'octo.metacarta.com', 'merrimack.metacarta.com', 'labs.metacarta.com', 'world.freemap.in',
'prototype.openmnnd.org']
allowedHosts = ['www.openlayers.org', 'openlayers.org',
'labs.metacarta.com', 'world.freemap.in',
'prototype.openmnnd.org', 'geo.openplans.org',
'www.openstreetmap.org']
method = os.environ["REQUEST_METHOD"]
if method == "POST":
qs = os.environ["QUERY_STRING"]
d = cgi.parse_qs(qs)
if d.has_key("url"):
url = d["url"][0]
else:
url = "http://www.openlayers.org"
else:
fs = cgi.FieldStorage()
url = fs.getvalue('url', "http://www.openlayers.org")
try:
host = url.split("/")[2]
@@ -30,24 +40,36 @@ try:
print "Content-Type: text/plain"
print
print "This proxy does not allow you to access that location."
print
print os.environ
elif url.startswith("http://") or url.startswith("https://"):
y = urllib.urlopen(url)
if method == "POST":
length = int(os.environ["CONTENT_LENGTH"])
headers = {"Content-Type": os.environ["CONTENT_TYPE"]}
body = sys.stdin.read(length)
r = urllib2.Request(url, body, headers)
y = urllib2.urlopen(r)
else:
y = urllib2.urlopen(url)
headers = str(y.info()).split('\n')
for h in headers:
if h.startswith("Content-Type:"):
print h
# print content type header
i = y.info()
if i.has_key("Content-Type"):
print "Content-Type: %s" % (i["Content-Type"])
else:
print "Content-Type: text/plain"
print
print y.read()
y.close()
else:
print """Content-Type: text/plain
print "Content-Type: text/plain"
print
print "Illegal request."
Illegal request."""
except Exception, E:
print "Status: 500 Unexpected Error"
print "Content-Type: text/plain"

View File

@@ -1,6 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Regular Polygon Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
html, body {
margin: 0;
@@ -66,6 +67,7 @@
map.setCenter(new OpenLayers.LonLat(0, 0), 3);
document.getElementById('noneToggle').checked = true;
document.getElementById('irregularToggle').checked = false;
}
function setOptions(options) {
polygonControl.handler.setOptions(options);
@@ -78,7 +80,11 @@
</script>
</head>
<body onload="init()">
<h2>OpenLayers Regular Polygon Example</h2>
<h2 id="title">OpenLayers Regular Polygon Example</h2>
<p id="shortdesc">
Shows how to use the RegularPolygon handler to draw features with
different numbers of sides.
</p>
<div id="map"></div>
<div id="config">
@@ -146,6 +152,16 @@
</select>
</td>
</tr>
<tr>
<td>
irregular
</td>
<td>
<input id="irregularToggle" name="irregular"
type="checkbox"
onchange="setOptions({irregular: this.checked})") />
</td>
</tr>
</tbody>
</table>
</div>
@@ -156,5 +172,7 @@
the snap angle is non-null) and you hold down the <b>Shift</b> key, you
will toggle to non-snapping mode.
</p>
<p>
The <i>irregular</i> option allows drawing of irregular polygons. With this option, the fixed radius option is ignored.
</body>
</html>

View File

@@ -1,6 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Resize Features Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 500px;
@@ -82,6 +83,11 @@
</script>
</head>
<body onload="init()">
<h3 id="title">Resize Features Programatically</h3>
<p id="shortdesc">
Demonstration of how to use the geometry resize methods to
change feature sizes programatically.
</p>
<div id="map"></div>
<p>This example demonstrates how features can be resized. There is not yet
a control built that provides a tool for resizing, but the geometry.resize

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Restricted Extent Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 512px;
@@ -40,7 +42,11 @@
</script>
</head>
<body onload="init()">
<h3>OpenLayers Restricted Extent Example</h3>
<h3 id="title">OpenLayers Restricted Extent Example</h3>
<p id="shortdesc">
Don't let users drag outside the map extent: instead, limit dragging such
that the extent of the layer is the maximum viewable area.
</p>
<div id="map"></div>
<p>
Map navigation is limited by a combination of map and layer properties.

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