Compare commits

...

755 Commits

Author SHA1 Message Date
crschmidt
7c132119f3 Tagging the 2.11-rc1 release.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.11-rc1@11997 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-23 14:33:56 +00:00
crschmidt
9a3db8c5b7 Updating version numbers for 2.11-rc1.
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.11@11996 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-23 14:33:54 +00:00
crschmidt
e846551c2c Branching for the 2.11 release
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.11@11995 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-23 14:25:10 +00:00
crschmidt
7adbed5dc8 Remove out of date and unused news.txt.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11994 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-23 13:47:21 +00:00
ahocevar
9f4c47a282 now using v3.5 of the GMaps API
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11986 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-22 14:00:48 +00:00
Marc Jansen
98f52eadde Adding various trunk commiters to the authors list. No functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11985 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-20 20:16:01 +00:00
ahocevar
81d6051752 making TRANSPARENT param values all UPPERCASE to conform to the WMS spec. r=bartvde (closes #3304)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11984 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-20 11:24:19 +00:00
Marc Jansen
feed7f2ed3 corrected a typo that went in with [11978], see ticket #3302
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11979 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-20 09:52:53 +00:00
ahocevar
6721110f49 returning Get and Post OnlineResources separately, in addition to the existing href, which is now for get. p=jachym, r=me (closes #3302)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11978 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-19 14:45:08 +00:00
Antoine Abt
6ce9feed03 round coordinates of externalGraphic in Canvas renderer, prevent Gecko to blur images p=pgira,me r=ahocevar (closes #3305)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11977 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-19 14:02:44 +00:00
ahocevar
397a844f87 removing alert
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11976 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-19 12:21:26 +00:00
Tim Schaub
b6b11f560a Switching to the 2-clause BSD license - aka the FreeBSD license.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11971 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-17 15:29:44 +00:00
Éric Lemoine
d45edfb2c0 Allow to pan the map while drawing in some examples, p=jorix, r=me (closes #3271)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11969 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-16 07:12:03 +00:00
Éric Lemoine
c82704905d fix Layer/Vector.html tests in FF4 (closes #3298)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11968 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-13 22:03:55 +00:00
Éric Lemoine
fedcad3cb4 fix Util tests in FF4 (closes #3300)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11967 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-13 21:49:34 +00:00
ahocevar
21daa083e9 fixing APIdoc typos
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11966 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-11 08:02:20 +00:00
Éric Lemoine
0d45c5f148 allow toggling TYPE_TOOL controls in panels, p=jorix, r=me (closes #3294)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11965 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-10 07:13:22 +00:00
Éric Lemoine
e1be8e9dfb the default controls of the editing and navigation toolbars are not activated, p=jorix, r=me (closes #3268)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-10 07:09:17 +00:00
Éric Lemoine
fef7e4febf fix regression where drawing accurately is not possible anymore, r=jorix,bbinet (closes #3272)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11962 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-09 09:34:19 +00:00
Éric Lemoine
e87e1c0c57 make the Navigation control support pinch-zoom, r=bbinet (closes #3273)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11961 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-09 08:28:35 +00:00
bartvde
00cfa5de55 add Lithuanian L10N file provided by monas (closes #3263)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11960 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-09 08:07:52 +00:00
Éric Lemoine
b61e29d920 CSWGetRecords format additions for parsing GeoNetwork specific fields, p=fvanderbiest, r=bartvde,me (closes #2961)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11959 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-09 07:52:39 +00:00
ahocevar
5e7c501539 do not reuse event objects to avoid incorrect event types. r=bartvde (closes #3280)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11958 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-09 07:36:57 +00:00
Éric Lemoine
491a5c0f62 SWGetRecords format additions for sorting, p=fvanderbiest, r=me,bartvde (closes #2952)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11957 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-09 07:16:39 +00:00
Bruno Binet
c0112c9bc6 fix regression introduced in [11881]: redraw is needed for unrendered features to be properly cleared. r=erilem (closes #3224)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11949 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-04 12:08:25 +00:00
Éric Lemoine
17f2843317 make it so features are not selected if there are multiple touches in the touchstart event, r=bbinet (closes #3279)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11948 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-04 10:37:09 +00:00
Frédéric Junod
8f70a140d0 fix api doc typo, no functionnal changes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11947 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-04 07:48:55 +00:00
Éric Lemoine
53984809ce Handler.Feature may not trigger click when touching a feature, r=sbrunner
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11943 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-03 14:09:09 +00:00
Bruno Binet
e4d13784fa fix api doc typo, no functionnal changes
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11942 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-05-03 10:08:42 +00:00
Frédéric Junod
afbec6829f fix broken WMS tests. (see #3261)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11925 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-28 17:38:33 +00:00
bartvde
4e9da707a1 OWSContext/v0_3_1.html tests fail in IE8, r=erilem (closes #3278)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11924 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-28 10:14:11 +00:00
pgiraud
55be96a9dc Don't put the box under the cursor until the mouse moved, prevent errors with the GetFeature and click events. I also removed the no longer valid (and failing) tests. r=elemoine, (Closes #2993)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11923 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-28 07:09:01 +00:00
Éric Lemoine
7ed03671df point handler - remove the ununsed finishTouchGeometry function, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11913 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-27 06:17:18 +00:00
Tim Schaub
a852fc5153 The 'new OpenLayers.Map()' syntax used in this exmaple doesn't work. Correcting that, it is still unclear if the example works. I'm removing it to avoid confusion by others.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11908 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 23:04:39 +00:00
Tim Schaub
9ce31ac8ee Giving the restricted extent some width.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11907 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 22:44:31 +00:00
Tim Schaub
5f125e0ac2 Pink tiles. I also don't think we want to encourage anybody to use our browser sniffer.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11906 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 22:15:52 +00:00
Tim Schaub
6adcf2a4df This example is quirky (markers don't show on Google Hybrid or Yahoo layers, MultiMap isn't working) and is potentially more confusing than instructive.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11905 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 22:13:10 +00:00
Tim Schaub
3967bbfaa6 This example says it is deprecated (in favor of wms-long-url.html). Removing examples of deprecated code will ease the eventual deprecated code removal.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11904 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 22:07:17 +00:00
Tim Schaub
bef047bf31 This example doesn't appear to work. We've got other examples that demonstrate the use of the newer GML parsers.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11903 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 22:05:02 +00:00
Tim Schaub
190f13e884 This example doesn't work any longer. And we have others that use the WMSGetFeatureInfo control.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11902 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 22:02:48 +00:00
Tim Schaub
582b21a4b1 Use OSM tiles for the wfs-snap-split.html example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11901 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 21:59:28 +00:00
Éric Lemoine
81342b4b1f the canvas renderer may mess up when rendering external graphics, r=erilem (closes #3264)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11899 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 07:55:19 +00:00
Bruno Binet
2c3a9eca5e add missing </ul> closing tag, no functionnal change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11898 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-21 07:30:30 +00:00
Bruno Binet
5476d307f8 remove duplicated css, no functionnal change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11896 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-20 13:40:54 +00:00
crschmidt
3c775ccc1a Update the website contents.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11895 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-20 03:37:24 +00:00
Tim Schaub
7eab9597cf No longer requesting exceptions as images by default. This makes it less likely to litter a cache with in-image exception reports. r=ahocevar,erilem,bartvde (closes #3261)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11894 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-19 18:57:12 +00:00
Bruno Binet
a7f2311c32 remove trailing comma, no functionnal change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11893 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-19 15:47:11 +00:00
Tim Schaub
d332ac2ef6 Correcting markup in attribution template for Bing layer. p=manchito r=me (closes #3260).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11889 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-14 15:00:12 +00:00
ahocevar
a3655cd66f Only start dragging when we are over a feature. r=tschaub (closes #3252)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11888 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-09 12:22:52 +00:00
Tim Schaub
32f70d06c2 Mobilize the canvas hit detection exmample.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11887 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-07 19:15:45 +00:00
Tim Schaub
13207d4ea1 Casting property values used as symbolizer labels to strings (allowing us to safely split them in the renderers). r=erilem (see #2193, closes #3249)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11886 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-07 18:45:31 +00:00
Tim Schaub
b650d4d89e Less mocking in the createSymbolizer tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11885 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-07 18:37:22 +00:00
Tim Schaub
b95e9dac11 Reworking test so failures are deterministic.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11884 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-07 18:29:18 +00:00
Éric Lemoine
64a611e861 Protocol.HTTP.read should not write params into the protocol's options object, p=etdube,me r=me (closes #3237)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11883 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-07 06:49:38 +00:00
Tim Schaub
4f3a0f1267 Correcting a typo from 11871. Thanks jorix for the catch (see #3236, closes #3250).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11882 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-06 22:06:31 +00:00
Tim Schaub
d711e36ed6 Making it so the Canvas renderer does not draw features with display "none" or those with geometries outside the renderer extent. p=me,ahocevar r=erilem (closes #3224)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11881 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-06 15:35:24 +00:00
Frédéric Junod
89639a12bb WFS protocol commit: send HTTP headers. p=arneke,me r=me (closes #3204)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11880 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-06 06:59:05 +00:00
Éric Lemoine
79b70e6dd4 avoid defining the same variable multiple times, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11879 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-05 19:27:52 +00:00
bartvde
29133b05ab add matchCase attribute for PropertyIsLike, r=tschaub (closes #3247)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11878 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-05 19:23:23 +00:00
Éric Lemoine
fd145c82b1 GeoJSON format output produces invalid CRS, p=hoxworth, r=me (closes #3022)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11876 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-05 07:07:01 +00:00
bartvde
f33c5ef112 WMSGetFeatureInfo control: relate features to url, thanks erilem for the extensive amount of reviews you have done for OL 2.11, r=erilem (closes #2883)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11875 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-05 06:52:42 +00:00
Éric Lemoine
6e3af67dab change Panel to avoid redrawing every control on every activate/deactivate, p=jorix, r=me (closes #2906)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11874 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-05 06:35:49 +00:00
Éric Lemoine
8337674791 the editing toolbar is pushed to the right in the editingtoolbar-outside.html example in IE7 and IE8 in compatibility mode, p=jorix, r=me (closes #2946)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11873 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-05 06:22:12 +00:00
Tim Schaub
0e27cea7f8 Things break when map maxExtent does not match the Google maxExtent and a Google layer is used as the base layer (see #3242).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11872 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 21:34:56 +00:00
Tim Schaub
7a5e837c9b Enhancements to the WMC parser for better contact information, SRS, and style support. p=trondmm, r=me (closes #3236)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11871 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 17:15:14 +00:00
Tim Schaub
a7d1cc9134 The tileOrigin property is not read or written in WMC docs (see #3245).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11870 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 17:11:14 +00:00
Tim Schaub
def3fbece6 Updating wmc.html example to use a currently working service.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11869 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 16:48:55 +00:00
ahocevar
5995202f3a working around drawImage issue on Android 2.1 devices. r=erilem (closes #3243)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11868 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 15:12:44 +00:00
bartvde
8596bbc779 getFullRequestString fails when layer has no projection, r=ahocevar (closes #3244)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11867 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 10:25:34 +00:00
ahocevar
0527f120a8 Removing unused variables and function. Non-functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11866 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 07:58:13 +00:00
Éric Lemoine
c7a67700ce fix an issue where the user cannot interact with the map when in the area to the left of the editing toolbar, p=jorix (closes #3241)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11865 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 07:47:07 +00:00
pgiraud
e140a5d843 Adding wrapDateLine support for XYZ layers. The OSM layer now wraps the date line by default. p=tomh, r=me (Closes #2246)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11864 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 07:20:48 +00:00
Éric Lemoine
035a30021d fix test_Handler_Box_draw by using another method to check whether we can get computed dimensions of an element (closes #3240)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11863 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-04 07:19:46 +00:00
Éric Lemoine
779732b63b fix test_Handler_Box_draw in FF3, providing getComputedStyle with the correct number of arguments, this test still fails in IE8, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11862 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-03 19:49:01 +00:00
Éric Lemoine
adbd2405ca mouseout callbacks should check if the mouse leaves map.eventsDiv instead of map.div or map.viewPortDiv, p=jorix, r=me (closes #3239)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11861 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-03 12:47:14 +00:00
Tim Schaub
cf311ee532 Making the canvas renderer keep track of a pending redraw. With this change we properly redraw even if the last feature in a batch has no geometry. p=me,ahocevar r=ahocevar (closes #3225)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11860 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-03 05:04:17 +00:00
Tim Schaub
62dd64c1c9 Simplifying hit detection for external graphics rendered with canvas. With this change, events within the graphic bounds will be considered hits (previously only events over visible pixels in the external graphic were considered hits). This simplification gets around same origin limitations. r=erilem (closes #3238)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11859 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-03 04:58:49 +00:00
Tim Schaub
7e60535fe7 Cleaning up from the canvas tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11856 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-01 21:37:06 +00:00
ahocevar
536a0410ee only add features to the unrendererdFeatures array when they were not drawn due to lack of geometry. r=erilem (closes #3235)"
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11853 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-01 09:26:39 +00:00
bartvde
d3a2e0c5de add missing requires, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11852 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-04-01 09:11:11 +00:00
Tim Schaub
bb9a11a469 Making it so the canvas renderer returns true after rendering a feature. This saves an extra draw for every moveTo. p=vog,me r=me (closes #3225)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11851 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 22:25:06 +00:00
Tim Schaub
970ff2741f Documentation fixes from jorix (thanks). (closes #3234)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11850 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 22:02:46 +00:00
Tim Schaub
3ef0b05949 Adding in support for hit detection with canvas (and rendering holes in polygons). r=fredj (closes #3207)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11849 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 21:00:03 +00:00
Tim Schaub
66dabae11b Making it so overlays at the top of the draw stack get the moveTo call first (base layer still gets the first moveTo). p=mosesonline, r=me (closes #3230)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11848 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 16:26:42 +00:00
Stéphane Brunner
baf35aeda2 Sencha Touch SelectFeature, p=cmoulet, r=me (closes #3229)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11847 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 14:42:44 +00:00
Éric Lemoine
fba3582b15 make the mobile-layers example rely on the OpenLayers mobile build, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11846 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 14:40:08 +00:00
Frédéric Junod
ae2f36963b drag feature support on mobile. r=erilem (closes #3231)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11845 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 14:34:05 +00:00
Éric Lemoine
44c675c48f add mobile-layers example, demonstrating that data from various layer/format types can be displayed on mobile, p=cmoullet, r=me (closes #3223)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11844 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 14:32:54 +00:00
Stéphane Brunner
0af21e8088 typo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11842 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 12:47:41 +00:00
ahocevar
174078bca9 adding support for line breaks to SVG, SVG2 and Canvas renderers. Also adds vertical alignment support to Canvas. p=vog,fredj,me r=me (closes #2193)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11838 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 11:58:28 +00:00
ahocevar
9d04541683 apidoc updates
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11837 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 11:53:46 +00:00
Éric Lemoine
61ed146240 when drawing make sure the point follow the cursor, even after zooming in or out, p=jorix, r=me (closes #3195)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11836 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 11:35:24 +00:00
Éric Lemoine
4a6524fa85 better tests for Measure test_cancel, thanks jorix for reporting this (in #3195)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11835 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 11:35:15 +00:00
Éric Lemoine
aed69fe93a Measure tests - move a comment to its proper location, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11834 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 11:35:08 +00:00
Frédéric Junod
7963fb6a7f add modify feature control to mobile drawing example
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11833 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 11:28:11 +00:00
Stéphane Brunner
07f4ad8354 fix Don't let the browser to zoom or select the map on feature selection, r=erilem (closes #3212)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11831 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 09:52:33 +00:00
Stéphane Brunner
04f2b20674 revert mistake [11829]
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11830 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 09:49:41 +00:00
Stéphane Brunner
c9d459c7fe fix Don't let the browser to zoom or select the map on feature selection, r=erilem (closes #3212)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11829 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 09:45:50 +00:00
ahocevar
0628c05fc3 doc fixes: Firefox instead of FireFox. p=vog (closes #2911)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11828 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 09:06:33 +00:00
Stéphane Brunner
36face3f71 Cleanup mouse event on touch devices, r=erilem (closes #3215)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11827 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 09:01:05 +00:00
Frédéric Junod
80ce6e6583 increase pointRadius size
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11824 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 07:59:42 +00:00
Frédéric Junod
4c0935771d add 'renderer' url param.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11822 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-31 07:01:35 +00:00
Tim Schaub
b8ba064ede Making it so you can remove more points from a linear ring. p=gregers, r=me (closes #2172)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11819 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 23:54:54 +00:00
Tim Schaub
587b2320ab Restore drag handler state in deactivate. r=erilem (closes #3218)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11808 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 20:54:41 +00:00
Tim Schaub
a25f506f20 Restore click handler state in deactivate. r=erilem (closes #3217)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11807 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 20:53:46 +00:00
Tim Schaub
5fc138f69b Making it so the setFilter method on the filter strategy allows notification to listeners of feature add/remove events. p=vog,me r=me (closes #3216)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11804 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 20:19:24 +00:00
Éric Lemoine
b14822c569 RegularPolygon handler - reverting [11770], as calling cancel from out causes issues (#3199)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11802 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 16:47:08 +00:00
Éric Lemoine
0d07893f2a nicer zoom +/- buttons in the mobile-drawing.html example, the same as in mobile.html, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11801 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 16:36:19 +00:00
Frédéric Junod
4b9f60f456 fix comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11800 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 16:17:35 +00:00
bartvde
56bca84cfe add support for maxVertices in Hander.Path, p=me,r=erilem, thanks erilem for the updated patch and your great work on this (closes #2779)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11797 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 14:38:32 +00:00
Stéphane Brunner
7a29b2d324 fix Don't let the browser zoom on the page on dbl click, r=erilem (closes #3209)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11795 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 14:29:28 +00:00
Éric Lemoine
a84c6b9302 simplify the code of the path and polygon handlers, removing the finishTouchGeometry function, r=sbrunner (closes #3214)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11793 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 14:26:12 +00:00
Frédéric Junod
7f45ff559a remove tabs
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11792 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 14:26:03 +00:00
Frédéric Junod
d5d21b1e71 remove dependency on AnchoredBubble and Marker from Feature. r=marcjansen,bartvde,erilem (closes #1633)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11790 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 14:17:13 +00:00
Éric Lemoine
4d44799cc2 make every mobile example rely on the mobile build, and add files to the build for the mobile-drawing example, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11789 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 14:07:56 +00:00
Frédéric Junod
acc96324c5 update copyright to 2011
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11786 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 13:55:31 +00:00
Stéphane Brunner
9e74908bc6 fix No click on drag handler, r=erilem (closes #3210)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11783 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 13:38:17 +00:00
bartvde
464aed9d75 add support for OpenLS (Location Utility Service), thanks cmoullet for the great example, p=me,r=cmoullet,erilem,fredj (closes #2953)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11781 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 13:27:30 +00:00
Frédéric Junod
76f1987a8b add 'renderer' url param.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11780 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 12:51:01 +00:00
bartvde
a108fb86bb make use of WFS paging backported to WFS 1.1, thanks ahocevar for the improved patch, r=ahocevar (closes #3213)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11779 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 12:47:42 +00:00
Éric Lemoine
147e5bba1a some refactoring in the touch-specific code of draw handlers, r=sbrunner (closes #3208)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11773 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 11:30:07 +00:00
Éric Lemoine
cafe9661c4 click handler fires a "click" event when it should not, r=sbrunner (closes #3202)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11771 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 08:25:40 +00:00
Éric Lemoine
637dddf3b2 when drawing a regular polygon cancel drawing instead of finalizing when the mouse leaves the map, p=jorix, r=me,sbrunner (closes #3199)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11770 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 08:16:47 +00:00
Éric Lemoine
c15ffab9bc better tests for the polygon handler, and minor changes to the path handler tests, tests only change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11769 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 07:09:31 +00:00
Marc Jansen
4918785ca1 Fix spelling in example. No functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11768 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-30 06:40:31 +00:00
Éric Lemoine
b176d522c9 better tests for path handler, tests only patch
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11760 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 21:59:24 +00:00
Éric Lemoine
266f4c5843 better tests for the point handler, tests only patch
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11759 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 21:59:08 +00:00
Tim Schaub
fba3a883ac Removing the simpleFilterSerializer method on OpenLayers.Protocol in favor of a format for serializing filters for use with query strings. r=sbrunner (closes #3163)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11758 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 19:22:13 +00:00
Tim Schaub
8b9486a936 Making it so the merge tool supports @require directives in addition to @requires.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11757 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 19:04:40 +00:00
Tim Schaub
3ba8a294ff Extending the filter format and the feature ID filter to support writing of logical filters that contain FID filters. r=bartvde (closes #3012)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11756 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 18:49:27 +00:00
Frédéric Junod
15a7d0d18e align toString and fromString methods. r=erilem (closes #1275)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11755 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 17:07:54 +00:00
Frédéric Junod
d966553cdf fix comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11754 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 15:27:09 +00:00
ahocevar
7dd75fa6ea omit some tests in browsers that don't give us getComputedStyle for elements inside hidden frames (closes #2910)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11753 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 15:15:07 +00:00
Frédéric Junod
1417382f10 fix indent. non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11752 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 14:44:35 +00:00
Éric Lemoine
77c003e9f7 fix DrawFeature tests that changeset [11745] broke, thanks fredj for catching this, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11751 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 14:12:38 +00:00
Éric Lemoine
2f892476ea currently our mobile-drawing example has two navigation controls, change that, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11750 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 14:02:38 +00:00
ahocevar
c5dfe37bd4 fixed box sizing and positioning. r=sbrunner (closes #2910)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11749 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 13:44:04 +00:00
Frédéric Junod
54b58e3faf duplicate function name
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11748 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 13:28:01 +00:00
Éric Lemoine
2ff5aee63e better doc strings for the pixelTolerance option of Handler.Point, plus code styling, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11747 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 13:24:15 +00:00
Stéphane Brunner
e92d872a4a fix Allow to have PanZoomBar without pan icons, r=erilem (closes #3167)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11746 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 12:05:26 +00:00
Éric Lemoine
0276351f50 when zooming out right after drawing a polygon or a line a point appears in the upper left corner, p=jorix, r=me (closes #3196)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11745 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 12:00:58 +00:00
Frédéric Junod
33d330c0db font style support for feature label. r=erilem (closes #3051)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11744 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 09:54:00 +00:00
Frédéric Junod
222162fa98 remove unit if the value is 0. non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11743 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 09:50:33 +00:00
bartvde
46fc3182e4 Not all ESRI WMSGetFeatureInfo formats parsed, p=me, r=cmoullet,erilem (closes #3177)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11741 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 09:44:07 +00:00
Frédéric Junod
af2f3b7a70 remove semicolons after the if closing curly bracket. non functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11740 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 09:43:20 +00:00
Éric Lemoine
aec3d44979 new icons for the navigation toolbar, p=jorix, r=me,marcjansen (closes #2946)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11738 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 09:39:42 +00:00
Éric Lemoine
5287e4a38b remove an IE-unfriendly trailing comma in the navtoolbar-alwaysZoom.html example
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11737 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 09:32:17 +00:00
ahocevar
a53097e7fe setting cursor property on text labels. r=fredj (closes #3188)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11736 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 09:24:46 +00:00
bartvde
2c9cbab011 transitionEffect does not always work, thanks to Marco Nijdam for identifying the issue and thanks to Marc Pfister for the feedback on the dev list, p=me,r=fredj (closes #2848)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11734 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 08:59:31 +00:00
bartvde
c03b23e6ee maxResolution not correctly set when initializing map from WMC document, p=trondmm,r=me (closes #3191)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11733 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-29 08:44:18 +00:00
ahocevar
e8f79d95b1 making clearMouseCache work when document.body is not ready, which fixes a regression. r=bartvde (closes #3189)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11730 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-28 13:52:59 +00:00
ahocevar
f88f6cd6ed removing box when deactivating the handler. p=jorix, r=me (closes #3198)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11729 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-27 17:00:38 +00:00
bartvde
52b227958e fix trailing comma in example, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11728 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-25 16:48:15 +00:00
Frédéric Junod
31f3954923 add renderer url param. r=ahocevar (closes #3186)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11726 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-23 16:37:23 +00:00
ahocevar
8f584f2b84 Making Layer.PointTrack play nicely with gx:Track from Format.KML. Thanks bartvde for the updated patch. r=fredj,bartvde (closes #2792)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11722 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-22 13:46:33 +00:00
ahocevar
2d29236fb0 Making Layer.PointTrack play nicely with gx:Track from Format.KML. Thanks bartvde for the updated patch. r=fredj,bartvde (closes #2792)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11721 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-22 13:45:58 +00:00
bartvde
991a7314c3 add srsName to geometry filters written out by OpenLayers.Control.SLDSelect, this fixes the issue on the OpenLayers side, but not yet on the GeoServer side, although this might have been fixed after 2.1RC2 as aaime pointed out on geoserver-users, r=ahocevar (closes #3182)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11720 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-22 12:30:41 +00:00
ahocevar
bb1c61acc2 making it so Strategy.BBOX receives options from layer.refresh(options). Thanks vmische for the tests. r=bartvde (closes #2171)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11719 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-22 08:27:27 +00:00
bartvde
55e345a02b fix up Projection test in IE8, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11718 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-22 08:15:48 +00:00
Éric Lemoine
04ee616947 make it possible to activate a drawing handler before the map is centered, r=ahocevar (closes #3179)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11717 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-21 08:28:58 +00:00
bartvde
96198dee07 WMSGetFeatureInfo Control does not allow for different infoFormats per layer, r=erilem, thanks erilem for the quick review, api docs now have instructions for this (closes 3176)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11716 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-18 12:48:17 +00:00
Stéphane Brunner
78ab33e8f7 Fix wrong slider positions in PanZoomBar (closes #3154, r=erilem)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11714 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-17 16:33:12 +00:00
bartvde
2f71742fc9 fix up whitespace issue, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11713 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-17 15:50:08 +00:00
bartvde
dbd08a10a3 Geoserver filter Functions support in OL filter encoding, p=igrcic,r=me (closes #3053)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11712 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-17 15:47:28 +00:00
ahocevar
2e00e2e442 better support for file:// resources. r=bartvde (closes #3174)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11711 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-17 13:01:37 +00:00
crschmidt
bc28c096a7 When using wrapDateLine, pass both a rightTolerance and a leftTolerance at the
Layer level. This is fix a report from a user: "WMS tiles not loading when map
region crossing international date line(IDL)". All tests continue to pass, and
the lack of this tolerance here seems clear enough given the surrounding code.
Thanks to senthil for the patch, (Closes #2754)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11708 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-16 10:14:27 +00:00
crschmidt
87215daa54 The dynamic text layer uses an onPopupClose which looks to the layer and
first calls unselect on the selectfeaturecontrol. However, this fails if
the feature in question is no longer in the map -- for example, if you zoom
in or otherwise change positions. (The selected feature no longer exists,
so you call close on a feature which no longer has a layer object.) This change
to the examples by Jorix fixes this behavior in the example.

Note that many people use similar functionalities in their code, so this
likely means that what we *should* do is armor unselect() against being
called with a feature with a null layer, but that involves a longer 
discussion -- do we still fire onUnselect? Do we still fire the unselect
events? is there other cleanup we need to do? etc. -- so this is changing
the example to demonstrate one way to armor application code against
the problem.

Thanks to jorix for the suggestion on the example fix.
(See #3046)
(See #2515)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11707 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-16 09:41:37 +00:00
ahocevar
09bcb46a03 fixing scroll position issue on the IPhone by only clearing the mouse cache conditionally. r=erilem (closes #3132)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11706 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-16 02:52:43 +00:00
Frédéric Junod
9315972bb0 update copyright to 2011, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11703 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-14 08:42:16 +00:00
bartvde
49bb038692 fix up undefined error in ArcGISCache layer, thanks jorix, non-functional change (closes #3030)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11702 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-12 17:35:01 +00:00
bartvde
318003d399 Point Handler should not create feature if it is not active anymore, p=me,erilem r=ahocevar (closes #3172)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11701 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-12 16:03:57 +00:00
ahocevar
770a0f31f5 duplicating constants from Renderer.SVG and fixing API docs. Thanks jorix for the pointer. Non-functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11700 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-12 02:31:39 +00:00
Éric Lemoine
45b54f4a2c the editing toolbar is absolutely positioned in the top right corner of the map, p=jorix,me r=me (closes #2223)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11699 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-11 22:08:31 +00:00
ahocevar
83ade8f9d7 restoring allOverlays behavior as before #3062 when initially centering outside the base layer. r=bartvde (closes #3170)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11698 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-11 20:15:43 +00:00
ahocevar
120d59f0e1 reverting r11645, and fixing the root of the reported problem. r=bartvde (closes #2392)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11697 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-11 19:28:55 +00:00
bartvde
807000c4b7 ArcGISCache layer should not generate x and y values of less than 0, p=dmiddlecamp, r=me (closes #3169)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11696 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-11 18:34:53 +00:00
Tim Schaub
5b7d530461 Reworking click and pinch handling to get better behavior on multi-touch devices. r=ahocevar +testing from others (closes #3133)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11695 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-11 01:53:26 +00:00
bartvde
3ce239208f adding ArcGIS (AGS) Tile Cache Layer, great contribution from Azavea, thanks, p=dmiddlecamp, r=me (closes #3030)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11693 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-11 00:54:25 +00:00
ahocevar
c0ae33e457 documenting the options argument and how to limit the attributes returned by GetFeature
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11692 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-10 22:46:42 +00:00
Tim Schaub
27da366cd0 Adding a protocol for reading features cross-origin from services that support JSON with a callback. r=erilem (closes #2956)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11691 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-10 20:51:03 +00:00
Éric Lemoine
545c001b5e examples index - do not cut off long description texts, thanks Ivan for catching this
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11690 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-10 20:14:49 +00:00
bartvde
046f0a39ed Format.WMSGetFeatureInfo: also parse empty elements, p=me,r=erilem (closes #2867)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11688 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-10 16:36:30 +00:00
bartvde
9af89ff189 MapGuide and Zoomify layers use top-left as the tile origin, p=madair, r=me (closes #3160)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11686 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-09 17:05:49 +00:00
Éric Lemoine
d5848115df the fullScreen example js code was doubled for some reason, example only change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11685 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-09 13:28:10 +00:00
bartvde
e04efa811d incorrect argument type in calculateGridLayout, p=madair (closes #3160)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11681 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 22:28:13 +00:00
Frédéric Junod
2cf798c459 remove Control.KeyboardDefaults::destroy method: handler destroy already done in the parent class. r=bartvde (closes #3155)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11678 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 16:31:36 +00:00
bartvde
e3a5426789 WFSCapabilities - support for parsing SRS and DefaultSRS nodes, p=adube, r=me (closes #3048)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11677 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 16:19:36 +00:00
Tim Schaub
49e96f352f Adding a filterToParams method on the HTTP protocol. This allows you to specify how a filter is serialized in HTTP feature requests (using CQL for example). By default, we use the OpenLayers.Protocol.simpleFilterSerializer method. r=crschmidt (closes #3032)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11673 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 15:45:18 +00:00
Tim Schaub
f5769b8097 Setting lastMoveEvt in dragmove so it is accessible in both touch and mouse environments. r=erilem (closes #2936)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11671 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 15:21:33 +00:00
bartvde
288641e00d OpenLayers.Protocol.WFS misses a setGeometryName method, p=fvanderbiest, r=me,erilem (closes #3037)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11670 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 15:21:14 +00:00
Éric Lemoine
dfd80545ca since [11381] (pan while drawing) the map must have a center when a drawing handler is activated, fixing the example until a better solution is found (closes #3159)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11667 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 08:15:07 +00:00
Tim Schaub
d023ffc461 Getting rid of global component in SVG2.js (thanks jorix for the report).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11665 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 07:00:11 +00:00
Tim Schaub
14324728ff Getting rid of global yRestriction in Map.js (thanks jorix for the report).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11664 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 06:57:52 +00:00
Tim Schaub
2f93c18bd5 Getting rid of global tlViewPort in Grid.js (thanks jorix for the report).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11663 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 06:54:48 +00:00
ahocevar
34b4bdd835 removing redundant variable definition
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11662 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 06:13:46 +00:00
ahocevar
3f619f8b68 fixing the movestart-move-moveend sequence. r=bartvde (closes #3139)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11661 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-08 06:12:59 +00:00
Stéphane Brunner
91d4efcbe1 rm debug. r=aabt (closes #3143)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11660 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 16:52:01 +00:00
bartvde
23d24518fb need a setFeatureType function on Protocol.WFS, r=erilem (closes #2639)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11659 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 15:40:37 +00:00
Frédéric Junod
86fd4d076b re-add the Constructor API doc removed in r11641 (see #3149)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11656 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 14:48:26 +00:00
Frédéric Junod
dc9f615833 re-add the Constructor API doc removed in r11610 (see #3146)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11653 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 14:33:48 +00:00
Frédéric Junod
415aca4763 re-add the Constructor API doc removed in r11640 (see #3147)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11652 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 14:13:32 +00:00
Stéphane Brunner
7865f4d1f3 Add mobile-drawing example, Close: #3143, r=crschmidt
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11651 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 12:49:51 +00:00
Frédéric Junod
77a214764c Renderer.NG: remove global variables. r=crschmidt (closes #3153)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11650 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 11:48:51 +00:00
Frédéric Junod
7cea45db7f don't crash if OpenLayers.Renderer.NG is not defined. r=crschmidt (closes #3152)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11649 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 11:31:51 +00:00
crschmidt
89ea2f4ee2 Bump up the timeout on layer/gml test timeout for better testing on slower
devices.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11648 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 11:22:44 +00:00
crschmidt
d3f5100327 Add support to Format.OSM to reproject on writing. Initial suggestion from
Arnd Wipperman, turned into a patch by me, r=bartvde (Closes #2988)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11647 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 11:21:32 +00:00
crschmidt
c27af60153 Fix a bug in Rico Color introduced by our original porting by switching to
use our internal OpenLayers function instead of an external function; found
by jorix in his closure work. r=bartvde, (Closes #2976)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11646 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 11:20:12 +00:00
crschmidt
324603612d "Controls misbehave in WebKit browsers when vector layers present and map is
rendered"; this fix was presented by Nick M, and reviewed by erilem. 
(Closes #2392)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11645 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 11:18:45 +00:00
crschmidt
ce4ff521b0 Fix the double-reprojection of components of a collection in KML, and write a
test for it in both GeoJSON and KML to demonstrate that it works. r=bartvde,
(Closes #2040)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11644 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 11:15:20 +00:00
Frédéric Junod
105351995e remove 'empty' initialize method (method that only call the parent class). r=bartvde (closes #3149)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11641 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 09:26:23 +00:00
Frédéric Junod
315bbcdef3 remove 'empty' initialize method (method that only call the parent class). r=bartvde (closes #3147)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11640 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 09:25:17 +00:00
Éric Lemoine
1b3404f1f9 the map may jump on mouseup after dragging, p=me, r=crschmidt (closes #2936)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11635 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 08:21:51 +00:00
Éric Lemoine
1f58346772 SelectFeature control - highlightOnly and toggle don't play well together, p=me, r=bartvde (closes #2812)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11633 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 07:57:14 +00:00
bartvde
e8a3885d27 update copyright to 2011, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11632 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 05:38:51 +00:00
bartvde
e1a32ba630 Control should set this.div to null in destroy, thanks jorix for the updated patch, p=jorix,me r=me,fredj (closes #2850)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11631 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 05:02:51 +00:00
bartvde
987c2ae102 Writing map via OWSContext discards nesting path, p=hbruch, r=me (closes #3064)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11630 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 01:26:56 +00:00
bartvde
57191f5fd2 only write out LegendURL in OWSContext format if present, p=hbruch, r=me (closes #3045)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11629 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-07 01:14:55 +00:00
bartvde
99e51364e5 Geolocation Examples: JSLINT + IE Fixes, p=cmoullet, r=me (closes #3150)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11622 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-06 10:08:35 +00:00
bartvde
361ca8af95 fix up the case in which a vector layer needs to be reprojected and the map is not yet centered for the BBOX Strategy, thanks tschaub for the catch, p=vmische, r=me (closes #3142)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11617 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-05 23:34:44 +00:00
ahocevar
e3d137754c New SVG2 renderer for increased performance and smaller library size. Not enabled by default. To use, include 'SVG2' in the renderers array of your OpenLayers.Layer.Vector instance. r=crschmidt (closes #2802)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11616 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-05 21:17:02 +00:00
crschmidt
72f2ce5d0e Also listen on touchmove, since apparently evt.touches doesn't get multiple
touches on down?


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11611 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-03 14:40:29 +00:00
Frédéric Junod
7827b26a7d remove 'empty' initialize method (method that only call the parent class). r=bartvde (closes #3146)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11610 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-02 13:23:17 +00:00
Frédéric Junod
010ab7e81f fix typo in doc
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11609 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-02 11:30:38 +00:00
ahocevar
2a12176915 make setOptions work for restrictedExtent change, like it was before #3062. r=bartvde (closes #3144)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11608 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-02 11:09:24 +00:00
ahocevar
fb5f081ea6 fixing restrictedExtent check in moveByPx. r=bartvde (closes #3138)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11607 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-02 09:55:28 +00:00
Frédéric Junod
41ff5b8af8 fix typo in doc
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11606 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-02 08:15:20 +00:00
bartvde
afb80bfe48 Vector layer with BBOX Strategy isn't loaded/requested automatically, p=vmische, r=me (closes #3142)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11598 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-01 14:03:31 +00:00
ahocevar
07d5822995 removing unneeded arguments from extent.clone
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11597 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-01 13:51:07 +00:00
bartvde
55647c3e30 fix typo in APIProperty reported by Denis Rykov
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11591 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-03-01 09:14:53 +00:00
ahocevar
873fa8aa24 modifier+click no longer opens a new tab on FF when using externalGraphic. r=bartvde,pgiraud (closes #1421)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11584 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 18:56:00 +00:00
ahocevar
1f3a64d706 use wgs84 maxExtent when sphericalMercator is not set
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11583 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 17:11:08 +00:00
crschmidt
a0d3524994 Prevent "flicker" from Yahoo! when ending a drag by using dragPan object
unless there is no oldCenter, or we are zooming. r=ahocevar (Closes #2213)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11582 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 17:00:13 +00:00
ahocevar
f7c96d32c2 fixing issue with maps disappearing on resize. r=crschmidt (closes #2828)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11581 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 12:55:40 +00:00
ahocevar
be1adc5d69 use moveTo when dragPanMap object is not available. r=crschmidt (closes #3135)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11580 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 12:33:52 +00:00
Frédéric Junod
82a64751af fix Natural Docs comments, no functional change. p=jorix, r=me (closes #2989)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11576 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 08:19:18 +00:00
Frédéric Junod
1887969a3c move addTile code to the base class (OpenLayers.Layer.Grid). r=crschmidt (closes #2904)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11575 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 08:12:05 +00:00
Frédéric Junod
f7d58dc36c GeoRSS <description> is not properly parsed if multiple children. r=crschmidt (closes #2780)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11574 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 08:10:10 +00:00
Frédéric Junod
8beb04d2ca deprecate OpenLayers.Element hide() / show(). r=crschmidt (closes #1099)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11573 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 08:05:56 +00:00
crschmidt
31f1dd2610 Moving some properties (title, div, type, events, activate, deactivate) to
API Properties. (Closes #2827)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11570 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 00:56:20 +00:00
crschmidt
a5c9052b94 Make SVG graphicTitle standards compliant. p=potter000, r=pgiraud (Closes #2924)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11569 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-28 00:46:52 +00:00
Tim Schaub
8569ec2c2f Remove unused testEvent.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11568 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 23:22:57 +00:00
Tim Schaub
b750f690d9 Mocking less and (more importantly) making sure all assertions are not made in conditionally run code.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11567 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 17:03:57 +00:00
Tim Schaub
7fde5fd248 Refactoring the click handler tests so they are more legible and rely less on long sequences.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11566 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 15:29:32 +00:00
ahocevar
5a8260bb87 use correct y-offset for graphic. p=sbrunner, r=me (closes #3134)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11565 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 15:21:37 +00:00
Tim Schaub
693c95f999 Correcting click handler comment.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11564 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 15:19:32 +00:00
ahocevar
33eef42075 making drawing handler work on touch devices. p=sbrunner, r=me (closes #3072)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11563 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 15:00:38 +00:00
Tim Schaub
ba8aed56ef Since r11544, the event xy property is the average of all touch pixel locations. This test should have been updated with that change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11560 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 13:57:33 +00:00
Tim Schaub
02d4257544 Using real pixels in tests so we get distanceTo method.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11558 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 13:08:51 +00:00
Tim Schaub
b754cc40ac Working WFS.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11555 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 11:09:53 +00:00
crschmidt
709863eeae Some node.js test hacking.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11551 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-27 00:39:39 +00:00
crschmidt
7ede83ad75 Fricking differences between os x and linux sed. This fixes the mobile
build for OpenLayers in our live examples.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11550 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-26 22:08:23 +00:00
crschmidt
28ccd43ba4 Simple demo game-like thing showing how to use the accelerometer to control
a vector feature on a map.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11549 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-26 15:21:40 +00:00
crschmidt
b3091002f6 Add a quick test for multitouch. If you can't get the number reported higher
than one, your browser doesn't support multitouch.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-26 09:56:43 +00:00
Tim Schaub
f785153bca Adding a PinchZoom control for smooth zooming on multi-touch devices. p=bbinet,me r=crschmidt (closes #3105)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11544 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-26 02:22:45 +00:00
Tim Schaub
1425c2b0e6 Making it so the map doesn't show the white void beyond the edge of the world.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11543 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-26 00:33:10 +00:00
crschmidt
6486043716 Update the browser.html example to support further testing. patch by cmoullet,
simple example change, (Closes #3108)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11539 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 19:20:19 +00:00
crschmidt
b0b297bccd Update the dev dir building script to take the '?mobile' flagged .js
files and use the mobile OL build on them.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11538 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 19:06:58 +00:00
Tim Schaub
76a420b278 Making it so the navigation control zooms out on two touch taps. r=erilem (closes #3127)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11537 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 18:35:50 +00:00
ahocevar
5826bf5f3b make tween panning use Map::moveByPx. p=aabt, r=me (closes #3098)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11536 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 18:14:29 +00:00
ahocevar
2d5f29c55e New private movePyPx method to avoid going through all the unnecessary pixel-lonlat conversions. p=elemoine,me (closes #3062)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11535 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 18:02:12 +00:00
Frédéric Junod
4c40f7c11f increase delay for slow browser. (closes #3121)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11531 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 16:44:40 +00:00
Éric Lemoine
7219fd3743 firebugx.js sets window.i, no functional change, p=aabt,me (closes #3116)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11530 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 16:40:19 +00:00
Frédéric Junod
bc509b84e3 fixup my city name
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11527 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 16:22:17 +00:00
Éric Lemoine
fa533001d1 do no declare vars multiple times in functions, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11517 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 15:52:48 +00:00
pgiraud
26d8f31c5d Enhancing the mobile jQuery example, p=pgiraud,igorti,aabt
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11514 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 15:51:32 +00:00
Éric Lemoine
0e487a6d6b call zoomToMaxExtent only if the ArgParser didn't center the map itself, examples only change, thanks cmoullet for catching this
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11513 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 15:25:26 +00:00
Frédéric Junod
a076ce9228 Handler.Feature: fix mobile support. p=fredj,erilem r=erilem (closes #3106)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11510 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 15:18:02 +00:00
crschmidt
a26f8b7e27 Build examples when releasing.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11508 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 15:13:53 +00:00
Tim Schaub
960ef3de18 Don't store touch events. The same event is used between touchstart, touchmove, and touchend. Instead, we store event details on the handler and use those when needed. p=bbinet, r=me (closes #3120)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11507 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 14:52:56 +00:00
Frédéric Junod
b34dbcb903 add missing tags in examples/accelerometer.html. p=cmoullet, r=me (closes #3109)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11506 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 14:35:43 +00:00
Frédéric Junod
979d78f6aa use OLLoader.js for Geolocate unit test. p=cmoullet, r=me (closes #3124)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11505 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 14:33:55 +00:00
Frédéric Junod
0aa0b680a2 fix shortdesc in accelerometer.html
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11504 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 14:28:51 +00:00
ahocevar
d7afd24ac5 documenting that Layer.VirtualEarth requires restrictedExtent to be set, and changing the examples accordingly. p=marcjansen (closes #3123)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11503 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 14:27:54 +00:00
Éric Lemoine
7ec361cda9 100 milliseconds seems to be a good value for drag pan interval on most devices, no functional change (closes #3093)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11501 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 14:19:17 +00:00
Éric Lemoine
0546f974c5 make the mobile-navigation example use an OSM layer, example only change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11499 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 13:51:33 +00:00
pgiraud
1179ffe682 Fixing different things in the mobile aware examples:
- css styling for the zoom panel control,
 - creating a new mobile-base.js file shared by sencha and jq examples,
 - (re-)simplyfing mobile.js


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11496 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 13:45:19 +00:00
crschmidt
97db05e482 Fix error when no closure compiler is around.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11494 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 13:41:40 +00:00
Tim Schaub
b6cc99be8f Adding a distanceTo for pixels. p=bbinet, r=me (closes #3119)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11491 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 13:34:59 +00:00
Frédéric Junod
09c21c6b86 adding closure-compiler.jar to svn:ignore
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11484 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 12:14:35 +00:00
pgiraud
99f0376c8f Enhancing the sencha touch example, p=mjansen,bartvde,fredj,pgiraud, (Closes #3101)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11483 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 12:12:20 +00:00
Éric Lemoine
4a4d9b29cd the grid layer needs to clear its tile loading timeout when it's removed from the map, or moveGriddedTiles can be called with this.map set to null, r=crschmidt (closes #3110)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11482 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 12:02:29 +00:00
crschmidt
339d1ebaef Default the buffer to 0 instead of 2. On small maps (or fullscreen
maps on small devices) this is a huge win: instead of downloading
*42 tiles* on a 500x500 div, we now download just 12, a 3.5x savings
in downloads by default. The buffer of 2 was originally chosen when
most maps were based on slow-loading WMS laeyrs and having an area
to pan into was more important. That default no longer makes sense.

(Closes #3111) r=tschaub


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11481 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 11:50:30 +00:00
Tim Schaub
f7fcb86ee9 Making it so moveTo is only called once when creating a map with center and layers options. r=crschmidt (closes #3114)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11480 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 11:47:41 +00:00
crschmidt
269749ec23 Automatically grab and unpack the closure compiler when building releases.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11478 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 10:28:52 +00:00
crschmidt
be040c6614 Using CSS tidy to compress stylesheets on the dev site always, and to
include tidy-ified stylesheets in the released builds.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11477 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 10:23:42 +00:00
Tim Schaub
3f47ab809c Remove unused google.css.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11472 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 10:02:20 +00:00
crschmidt
a2d1623b80 pngcrush pngs to save another 1k for people who are using the PanZoom +
LayerSwitcher controls (and more for people who are also using
other controls).


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11470 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 09:33:19 +00:00
crschmidt
03cdbd8a02 pngcrush theme images. On the most common images (editing tooolbar,
pan-panel), this saves us an additional 3k of bits to transfer.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11469 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 09:28:33 +00:00
Tim Schaub
7d195697b6 Adding example demonstrating device orientation and accelerometer use. Nice example from cmoullet (closes #3083).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11463 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 08:59:04 +00:00
Frédéric Junod
93da80b0c4 deactivate the Geolocate control on destroy. r=bartvde,elemoine (closes #1185)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11459 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 08:52:28 +00:00
Tim Schaub
9d6d6bdd27 Adding profile for mobile builds (see #3069).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11458 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 08:48:33 +00:00
crschmidt
479d2c28b6 This patch causes the zoomBox to become visible again, after the changes
to add an eventsDiv, and fixes the OverviewMap to work again. r=bartvde,
(Closes #3104)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11455 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 08:30:50 +00:00
crschmidt
4be8f72afe Extending Map.js documentation to include comment regarding destroy from
#2277.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11454 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-25 07:25:03 +00:00
crschmidt
b22963a2ef Wrap path in abspath
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11450 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 23:59:51 +00:00
crschmidt
876e0dfd81 Fix build script on python before 2.6, and update_dev_dir now compiles
with closure instead of jsmin.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11449 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 23:48:24 +00:00
crschmidt
d06c66edab Adding support for closure compiler and some documentation
in the README about how to use it.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11448 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 23:19:53 +00:00
crschmidt
8d2bbfe28f Add support for the closure compiler webservice, using simple optimizations.
Using this build mode, on a lite build, we save approximately 15% after
gzip. However, this build method can not be used on full builds, as they
exceed the 1000kb limit on the closure compiler webservice. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11443 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 22:39:40 +00:00
bartvde
07e34672b5 OpenLayers.Util.getFormattedLonLat does not deal correctly with 60 seconds and 60 minutes, p=mattnott,jorix, r=me,marcjansen (closes #2852)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11405 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 11:24:50 +00:00
Tim Schaub
680923319c Adding a pinch handler for multi-touch devices. Great patch from Bruno. p=bbinet, r=me (closes #3077)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11389 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 10:05:49 +00:00
crschmidt
8da53d8fbd Better mocking of the function calls on handlers so that handlers which
expect an evt object don't get errors when activating. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11387 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 09:37:47 +00:00
crschmidt
6b54f9e80a Add an option to build.py to specify a compressor or 'none' for uncompressed.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11382 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 09:08:00 +00:00
Éric Lemoine
30aeab365a make it possible to pan the map while drawing geometries, r=tschaub (closes #3052)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11381 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-24 09:00:49 +00:00
crschmidt
f8db509725 Test that getLonLatFromPixel and getPixelFromLonLat are inverses of each
other (within a reasonable tolerance)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11374 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 22:24:35 +00:00
Tim Schaub
fa32a4a645 Arrange elements so we can get mouse events on controls while preventing the default (scroll) behavior on touch devices. r=elemoine (closes #3091)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11365 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 17:59:37 +00:00
Tim Schaub
0961132ab6 Opening popup windows with the same query string from the parent. This allows mode=build for tests in popups.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11341 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 15:54:26 +00:00
Frédéric Junod
5c400dac4f add some fancy move to geolocation accuracy. p=aabt, r=me (closes #1885)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11321 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 14:08:32 +00:00
Tim Schaub
8284c81b3b We register for mousemove, we generate mousemove, and IE gives us event.type 'load'. This is likely the window event property.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11318 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 13:48:49 +00:00
pgiraud
61452e2821 Adding getCurrentLocation API method so that application can get the location anytime, p=aabt, r=elemoine, (Closes #3090)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11315 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 13:33:14 +00:00
Tim Schaub
f55291bd34 Updating the EventPane tests so we always run the same number of tests (except Firefox) and report better failures.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11312 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 13:21:47 +00:00
Éric Lemoine
9ce641bd75 better API doc strings in the Kinetic class, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11309 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 12:13:53 +00:00
Éric Lemoine
e1b9b2b89d change <title> of the mobile-navigation example, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11305 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 11:40:36 +00:00
Tim Schaub
8ef02b39ef Adding detail to the messages for easier failure detection.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11292 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 10:28:27 +00:00
Tim Schaub
9ebdb1e4f7 No floats above map containers without position or clear.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11289 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 10:14:53 +00:00
Tim Schaub
257b96b309 Only invoke the landscape rules if the max width is fewer than 600 px (thanks aabt).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11287 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 10:04:55 +00:00
Tim Schaub
75538b6f42 Getting consistent datestring parsing in Chrome and Firefox. r=crschmidt (closes #2994)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11281 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 09:32:36 +00:00
Éric Lemoine
abb2bb509d The Android browser doesn't allow scrolling in a div, this is a problem for our unit test page. With this patch, we disable scrolling in our test page's divs if noscroll is set in the query string. No functional change. p=aabt (closes #3085)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11277 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 09:23:36 +00:00
Éric Lemoine
b469555a79 better display in our examples when orientation is landscape, and enable text size adjust in webkit; no functional change, p=aabt, r=me (closes #3067)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11275 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 09:14:26 +00:00
Frédéric Junod
6e83eb0018 set the language code in tests, tests expects English messages (closes #3084)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11272 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-23 09:06:20 +00:00
Tim Schaub
c55323cf3a More descriptive titles.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11264 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 22:38:31 +00:00
Tim Schaub
7fe4329afe Linking to example source code. Setting watch checkbox to match initial control state.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11263 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 22:00:59 +00:00
Éric Lemoine
8d15d94494 better descriptions for the mobile-navigation example, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11262 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 21:25:35 +00:00
Tim Schaub
d21b7b081f Taking advantage of the nice media query styles. Separating code from markup.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11261 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 21:21:31 +00:00
Tim Schaub
406bca8d70 Adding title and description to mobile examples.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11260 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 20:56:27 +00:00
Tim Schaub
1619f0801b Working with json if available. Fall back to simplejson.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11259 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 20:55:36 +00:00
Éric Lemoine
50c292f176 add a Geolocate control, p=cmoullet,aabt, r=me (closes #1885)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11258 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 16:48:05 +00:00
Tim Schaub
8965a61c75 Making it so the click handler works even if other listeners stop propagation on touchstart. r=elemoine (closes #3089)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11253 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 15:28:31 +00:00
Tim Schaub
629720b2d1 Fewer pink tiles.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11248 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 15:08:17 +00:00
Frédéric Junod
d34a9ee035 add tags in browser.html examples (closes #3088)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11245 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 14:54:01 +00:00
Éric Lemoine
dda9139347 add tags to our mobile examples, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11242 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 14:39:49 +00:00
bartvde
418dd126fa two-finger tap zoomout should work on iPhone, non-functional change (closes #3087)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11241 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 14:39:39 +00:00
Éric Lemoine
f299a41340 say hi to the new examples index, which works on mobile devices as well, thanks to our web designer pair, Marc and Antoine
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11238 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 14:22:00 +00:00
Éric Lemoine
b7babb5edf add a ZoomPanel to the mobile example, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11237 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 14:11:57 +00:00
Éric Lemoine
2f42aeb440 mobile example - set interval to 0 in the drag handler, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11236 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 14:11:49 +00:00
Éric Lemoine
9e2eef5f47 bigger zoomin/out buttons in the mobile-navigation example, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11233 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 13:45:26 +00:00
Éric Lemoine
b378d28e41 move the examples images in an "img" directory, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11231 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 13:06:35 +00:00
Éric Lemoine
ab309197e2 mobile-navigation example - place the JS code in a separate file, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11230 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 12:08:30 +00:00
bartvde
36f5232dd6 PanZoomBar doesn't handle forceFixedZoomLevel correct, p=patzi,marcjansen r=me (closes #2725)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11229 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 12:06:12 +00:00
bartvde
892d9d7768 fix up JS error in PanZoomBar testcase in IE, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11228 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 12:03:55 +00:00
Éric Lemoine
500d351013 test that we set clientX and clientY in the event, test-only patch
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11227 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 11:44:36 +00:00
bartvde
98a6c1754d fix up issue with Sencha Touch example not handling double tap to zoom in, r=elemoine (closes #3079)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11226 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 11:21:20 +00:00
Éric Lemoine
f67bcaa033 add a touch events related test for the drag handler, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11225 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 11:10:35 +00:00
Éric Lemoine
6b5ac685b1 use the touch navigation control in the mobile examples, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11224 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 10:36:38 +00:00
Éric Lemoine
2a59831290 enable kinetic for the mobile-navigation example, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11223 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 10:33:33 +00:00
Frédéric Junod
cd10d36025 add copyright header, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11222 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 10:15:38 +00:00
Éric Lemoine
332208539d remove trailing whitespaces, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11221 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 10:00:42 +00:00
Éric Lemoine
103e620dff kinetic/momemtum dragging support, p=camptocamp, r=me (closes #2999)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11220 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 09:59:21 +00:00
crschmidt
83f9422296 Adding a test page to show mobile browser events; this is useful for when
a new device is available to understand what events are supported by
a given browser.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11219 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 09:49:37 +00:00
ahocevar
bc81882a8e removing unused _bounds member variable. non-functinal change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11215 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 09:06:50 +00:00
Éric Lemoine
c852abad61 let's have a basic mobile-navigation example focusing on navigation-related functionality for mobile, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11212 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-22 08:54:42 +00:00
Éric Lemoine
c9fe40cc3c add a touch device-specific navigation control, p=bbinet, r=me (closes #3068)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11208 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 17:38:11 +00:00
Tim Schaub
849426f845 Making it so controls that register for mousedown and mouseup work in touch environments. r=crschmidt (closes #3075)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11207 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 17:31:19 +00:00
Tim Schaub
3066b50956 Removing the ie-killer trailing comma to make the mobile.html example work for crschmidt (and debunking the myth that you can't render a map with a script in the body).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11205 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 16:12:55 +00:00
Éric Lemoine
7a8f3917c9 make click handler work with touch events (closes #2996)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11201 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 16:04:34 +00:00
pgiraud
2908fa79e5 Putting the loader code into an self-executed function so that we don't have problems with global scope variables, Closes #3076
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11196 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 15:39:14 +00:00
Éric Lemoine
07160f5385 make drag handler work with touch events, p=lotsofpeople, r=tschaub (closes #2995)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11189 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 15:07:55 +00:00
Frédéric Junod
7a1cb00fe4 Add missing semicolon. Non functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11185 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 14:55:01 +00:00
pgiraud
2fd0eff3c1 The OpenLayersXXXX.html tests shouldn't use the built file
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11177 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 13:02:11 +00:00
Tim Schaub
fa15785c96 Updating the update_dev_dir script to use the tests.cfg profile. This brings in lang and console utilities.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11175 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 12:01:39 +00:00
Tim Schaub
17eaecc4e5 Excuse the bad commit message on r1172. This change and that one add a reusable empty function. r=ahocevar (closes #3073)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11174 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 12:01:17 +00:00
Tim Schaub
174bd431f4 Updating the update_dev_dir script to use the tests.cfg profile. This brings in lang and console utilities.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11172 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 11:54:15 +00:00
Éric Lemoine
7e18475a0b add support for anchor-based permalink, p=sbrunner, r=me (closes #2785)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11170 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 11:53:08 +00:00
Frédéric Junod
3fce968f2a use OpenLayers.Util.getImagesLocation() from default marker location
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11169 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 11:51:21 +00:00
pgiraud
dbf886dad0 Adds a specific config for the build to be used for the unit tests (python build.py tests.cfg). This build is similar to the full one but with Firebug and Lang, r=fredj
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11168 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 11:35:38 +00:00
pgiraud
941ebc78ce Now we rely on relative paths + minor changes
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11167 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 11:32:37 +00:00
crschmidt
788b05c32f check SVN revision online rather than via 'svn up' and put svn up inside the
revision check loop.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11164 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 10:33:59 +00:00
pgiraud
f84f696e31 Adds the possibility to use a built version of OpenLayers for the tests, users simply have to add '?mode=build' in the run-tests.html url
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11162 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 10:10:25 +00:00
Éric Lemoine
08acb65e0e deferred tile loading, i.e. the Google Maps way, p=pgiraud,ahocevar,me, r=ahocevar,me (closes #2998)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11159 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 09:45:22 +00:00
Éric Lemoine
7f34868fe2 use mobile-specific metas in our examples, and add a media query to remove padding and set map width to page width on small scth on small-screen devices, r=aabt (closes #3067)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11158 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-21 06:48:33 +00:00
Tim Schaub
d33477d65f A framework-less example that will soon work.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11157 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-20 17:31:46 +00:00
Éric Lemoine
39e9728696 add missing test file for #2947, no functional test
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11151 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-20 15:25:24 +00:00
Tim Schaub
a736a44955 Reverting before update to avoid conflicts when examples are removed.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11150 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-20 15:24:08 +00:00
Tim Schaub
5e091d46d8 Use OpenLayers.Console.log. Make gg and sm globally available so we can transform position.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11149 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-20 15:06:53 +00:00
ahocevar
b30d35c615 making ModifyFeature control in standalone mode trigger the beforefeaturemodified event. r=bartvde (closes #3009
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11146 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-18 15:25:41 +00:00
ahocevar
d6695cff67 fixing error when closing page in IE. Thanks bartvde for the testcase. r=bartvde (closes #3003)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11145 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-18 15:22:12 +00:00
pgiraud
28e5614e98 Avoid tests crashs because of delay problems. Adding more control so that conditions fail without crashing. r=bartvde (Closes #2997)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11144 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-18 13:20:07 +00:00
Frédéric Junod
994c156878 remove tabs, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11143 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-18 08:01:59 +00:00
Frédéric Junod
95d8cd3473 save the resourceUrl elements into the WMTS capabilities object. r=bartvde (closes #2986)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11142 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-18 07:14:27 +00:00
Éric Lemoine
95380a512c allow custom jsfiles array, r=tschaub (closes #2947)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11136 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-17 19:54:11 +00:00
Frédéric Junod
1f042af289 initialize the WMTS layer with style.identifier instead of the whole object. r=bartvde (closes #3027)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11135 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-17 15:25:28 +00:00
bartvde
3db27d7832 add missing part for #3055
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11134 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-17 15:08:18 +00:00
bartvde
04acbeeb0e OpenLayers.Request issue method creates URLs such as http://service?&key=value, p=fvanderbiest, r=me (closes #3055)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11133 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-17 15:04:53 +00:00
Tim Schaub
0781655e19 Removing scrolling workaround.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11132 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-17 05:29:11 +00:00
Tim Schaub
0fa37001dc Prevent scrolling from map.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11131 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-17 05:07:50 +00:00
Frédéric Junod
2eee8a3add mark OpenLayers.Layer.MultiMap as deprecated (see #3063)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11125 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-16 13:21:14 +00:00
Tim Schaub
6e13d7f8f3 Adding Sencha Touch example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11124 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-16 08:50:32 +00:00
Tim Schaub
b3ca71d48f Remove unused log element.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11123 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-16 08:47:14 +00:00
Tim Schaub
1be7701c8f Add example using jQuery mobile (limited functionality).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11119 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-16 00:34:16 +00:00
ahocevar
4f3466b005 use the correct maxResolution of 156543.03390625. r=bartvde (closes #3058)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11118 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-14 13:10:39 +00:00
crschmidt
94ddd78df7 Fix doc bug pointed out by vmx.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11117 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-14 12:07:02 +00:00
pgiraud
92849418d8 Use mouse cursors (pointer or move) for the control buttons, p=fvanderbiest, r=me, (Closes #3047)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11105 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-11 15:40:39 +00:00
Tim Schaub
47767fbd0c Adding igrcic to the authors list.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11096 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-10 19:28:39 +00:00
bartvde
5f89ce40ea add a testcase showing that we can now parse the boundedBy tag of a Feature Collection using output: 'object' non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11074 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-10 10:08:15 +00:00
Éric Lemoine
9495c8cb70 add onEnter and onLeave callback functions to the DragFeature control, p=adube, r=me (closes #3034)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11071 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-08 20:47:23 +00:00
ahocevar
198b3a9c7f new slideRatio option for Control.Pan and Control.PanPanel. r=bartvde (closes #3039)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11070 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-02 15:00:57 +00:00
Tim Schaub
5d92c646b6 Correcting link to source.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11066 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-02-01 16:05:47 +00:00
Tim Schaub
6b0b3375e3 Adding a parser for reading and writing CQL. This can be used to create filters to be used in rules when styling or it can be used to serialize filters when making requests to services that supprot CQL. p=dwinslow, r=me (closes #2522)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11065 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-28 23:15:10 +00:00
ahocevar
b434c02e1d using new restricedMinZoom property to make Layer.Bing code much cleaner. r=bartvde (closes #3025)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11059 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-24 21:45:44 +00:00
ahocevar
a1c80ffb7e new restrictedMinZoom property. r=bartvde (closes #3024)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11058 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-24 21:43:35 +00:00
bartvde
2f7a3e818a forgot to commit these files for ticket:3026
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11057 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-24 12:43:53 +00:00
bartvde
54fe8a5590 add support for parsing WMS-C type capabilities, r=ahocevar (closes #3026)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11056 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-24 12:20:36 +00:00
Éric Lemoine
3ba277f6b7 remove incorrect comment in library.cfg, thanks rodo for reporting the issues (closes #3023)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11053 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-23 14:38:25 +00:00
ahocevar
4a9460b314 give layer an "added" and "removed" event. p=mpriour,me r=me (closes #2983)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11052 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-22 12:04:40 +00:00
ahocevar
f73fb689a8 added examples stylesheet and title.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11049 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-21 12:34:06 +00:00
ahocevar
3a16592b1a giving Layer.Google.v3 an animationEnabled option, like the one we already have for Layer.VirtualEarth. r=bartvde (closes #3020)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11047 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-20 13:31:30 +00:00
bartvde
3913ef1787 WMS GetFeatureInfo control should use integers for X and Y, r=ahocevar (closes #3019)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11046 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-20 13:20:03 +00:00
ahocevar
c8982cb99a give Layer.Vector a vertexremoved event, to be fired e.g. by the ModifyFeature control. r=bartvde (closes #3017)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11043 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-19 16:44:39 +00:00
ahocevar
edfbcb0a5e Fix Google layer to work with the v3.3 api. Update examples from v3.2 to v3.3. r=bartvde (closes #2984)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11042 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-19 12:01:28 +00:00
ahocevar
fcdd918170 check if using a proxy is required, and if so, issue a warning if none is configured. p=fvanderbiest,me r=me (closes #3015)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11038 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-18 00:13:35 +00:00
Éric Lemoine
b5f4eca585 removing lib/OpenLayers.js.orig which was accidently added with [11036], no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11037 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-17 14:39:27 +00:00
Éric Lemoine
7b5718f9ac always use "parser-inserted scripts" for guaranteed execution order, thanks a lot hsivonen for reporting this and the thorough explanations, r=pgiraud (closes #2933)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11036 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-17 14:37:15 +00:00
ahocevar
3795dbf490 Giving fromArray and fromString a reverseAxisOrder option. r=erilem (closes #3014)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11035 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-17 09:18:21 +00:00
Tim Schaub
c8c8a74be7 In r11031 support was added for writing null geometries in an update transaction. This change corrects the syntax for null geometries, omitting the wfs:Value element altogether. r=ahocevar (closes #3010).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11034 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-14 16:13:10 +00:00
Tim Schaub
441a5408cd Adding support for a tileOrigin property to all gridded layers. If working with a cache of tiles that don't align with the bottom left corner of the layer's maxExtent property, set the layer's tileOrigin property. This change also removes the tileExtent property (not in any release), favoring tileOrigin as the way to determine how the grid is aligned. r=ahocevar (closes #3011).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11033 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-14 15:56:07 +00:00
ahocevar
3515d23ce7 made metadata api parameters configurable. p="Jeff Maki",me r=me (closes #3013)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11032 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-14 13:28:45 +00:00
Tim Schaub
f68ee50a8e Allow WFS transactions with null geometry. r=ahocevar (closes #3010)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11031 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-13 19:37:35 +00:00
ahocevar
eaeb2467bf Revert changes that were accidently committed with r10018
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11021 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-09 22:38:40 +00:00
Tim Schaub
1c1bcf86ff Clarifying docs and removing a bit of lint.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11020 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-07 22:28:25 +00:00
Tim Schaub
ece7beff27 I'm assuming that it was a mistake to remove the v3.2 bit in r11018 (this keeps us from getting that annoying popup). Please clarify if it was indeed supposed to be removed. (see #2985)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11019 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-07 22:21:53 +00:00
ahocevar
03fd0056aa Reverted a part of r10976 which removed code that is still needed. Thanks cmoullet for spotting this. r=me (closes #2985)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11018 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-07 18:50:23 +00:00
Tim Schaub
472f0e55fe Not really required here, but taking a shortcut.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11017 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-07 00:13:46 +00:00
Tim Schaub
8c258e9901 Control resolution at which snapping is considered with minResolution and maxResolution per target. r=elemoine (closes #3007).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11016 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-06 21:41:25 +00:00
Tim Schaub
8dd58e484a Optionally include SRS id in serialized BBOX by constructing a HTTP protocol with srsInBBOX true. r=elemoine (closes #3006).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11015 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-06 21:39:14 +00:00
Tim Schaub
6ccbdf330c Updating load order for Util tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11014 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 19:34:59 +00:00
Tim Schaub
b6de19074e A critical oversight in r11003. The Class.js script must be loaded first now (see #2992).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11013 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 19:33:03 +00:00
Tim Schaub
11c609d3fd Simplifying the build profiles. Build only commit.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11008 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 17:43:28 +00:00
Tim Schaub
b9b7a68b19 Declaring dependencies in the source. Comments only commit.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11007 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 17:42:45 +00:00
Tim Schaub
0bc34e48c6 Simplifying the toposort method used for sorting dependencies. The new version imposes an arbitrary sort order for circular dependencies (instead of bombing out). The merge script now uses this new toposort. Tools only commit.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11006 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 17:39:44 +00:00
Tim Schaub
52a105c3aa Adding the tile extent examples as part of #3002.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11005 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 17:37:58 +00:00
Tim Schaub
9e89f4f173 Removing the OpenLayers.Util.extend method to the Class.js file to avoid a circular dependency that cannot be resolved with an arbitrary sort order. r=elemoine (closes #2992)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11003 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 17:24:32 +00:00
Tim Schaub
373dc629bb For gridded layers where the tile lattice on the server doesn't align with the maxExtent on the client, set the layer tileExtent property. r=ahocevar (closes #3002)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11002 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 17:21:58 +00:00
ahocevar
1efea75029 draw external graphics even if no fill is specified (e.g. for symbolizers from sld). p=gernot,me r=me (closes #3004)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11001 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 16:45:10 +00:00
Éric Lemoine
46a382e79f missing var declaration in LineString.js, p=jorix, r=me (closes #3001)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11000 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-05 07:59:46 +00:00
Éric Lemoine
1144b2cd8c small optimization for the toFloat func, r=pgiraud (closes #2875)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10998 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-04 07:43:54 +00:00
ahocevar
d0ab1fd219 fix Bing layer's zoom level management. r=tschaub (closes #2987)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10997 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-03 18:18:43 +00:00
pgiraud
06b32c30a7 Prevent Box handler from cancelling the click event by displaying the box only when the cursor move, p=me, r=elemoine (Closes #2993)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10996 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-03 15:48:37 +00:00
Tim Schaub
ad54169479 Happy New Year.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10995 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-03 15:39:40 +00:00
ahocevar
5587fe7013 also use v3.2 for the osm-google example
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10992 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-03 08:40:51 +00:00
ahocevar
1c421576c3 Missing graphic-name.js which should have been committed with r10976 (closes #2985)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10991 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-02 16:59:07 +00:00
Tim Schaub
e7803974b0 A bit of lint removal.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10990 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-01 23:48:08 +00:00
Tim Schaub
7eed099b4e Getting specific about the radix. Trivial change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10989 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-01 23:41:47 +00:00
Tim Schaub
564376c847 Only loading what is strictly required by Util tests (see #2947).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10977 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2011-01-01 18:44:59 +00:00
ahocevar
fe6047859f Always copy graphicName symbols, because there were too many issues with use/defs. Ctrl-Click and Shift-Click now works as expected on graphicName symbols. p=marcjansen, r=me (closes #2985)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10976 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-29 12:06:46 +00:00
ahocevar
1b9996d62c Added Bing layer with direct tile access. p=me,tschaub r=tschaub,me (closes #2975)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10975 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-17 23:46:22 +00:00
Tim Schaub
62d91da358 Using the v3.2 api to avoid attribution popup.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10974 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-17 16:04:06 +00:00
ahocevar
24f233fb30 updated the description and documentation of the example. p=marcjansen, r=me (closes #2869)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10973 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-17 10:02:05 +00:00
Tim Schaub
697ee375b8 Making it clearer what WKT read does with a geometry collection.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10972 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-16 19:31:10 +00:00
Tim Schaub
e00a21541d Serializing features with OpenLayers.Geometry.Collection geometries as GEOMETRYCOLLECTION in WKT. p=strk, r=me (closes #2706).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10971 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-16 19:14:44 +00:00
ahocevar
e9e2aec77d Added Douglas-Peucker linestring simplification to OpenLayers.Geometry.LineString. Thanks chrismayer for this excellent patch. p=chrismayer, r=me (closes #2869)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10969 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-15 13:38:52 +00:00
ahocevar
b61cec71a1 Make it possible to exclude Console.js and Lang/en.js for really small builds. r=bartvde (closes #2882)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10967 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-15 09:42:19 +00:00
Éric Lemoine
4c3d4c77c0 make Request rely on standard XMLHttpRequest interfaces, p=jorix, r=me (References #2913)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10966 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-15 07:52:00 +00:00
Éric Lemoine
8084f63cb0 add XMLHttpRequest readyState compliance tests, p=jorix (References #2913)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10965 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-15 07:51:50 +00:00
Éric Lemoine
1ff89a9c40 Give Layer.Vector a method getFeaturesByAttribute, p=marcjansen, r=me (closes #2979)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10960 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-14 08:07:29 +00:00
bartvde
b351734cf6 upgrade the XMLHttpRequest library to version 1.0.5 in order to fix the Request/Abort unit test, thx to jorix and erilem for their hard work on this, r=erilem
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10959 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-13 10:14:06 +00:00
Tim Schaub
4104942bca Manual test for Google v3 resizing issue.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10957 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-08 17:58:41 +00:00
Éric Lemoine
43d9e2e1a4 the drag handler's mouseout func should check if the mouse left the map viewport div as opposed to the map div, r=ahocevar (closes #2941)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10956 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-08 16:06:42 +00:00
ahocevar
9f47e1915d auto-create the GetFeature readFormat for known outputFormats. r=tschaub (closes #2968)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10955 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-07 23:56:32 +00:00
ahocevar
ed7faebbcb fix document dragging which was broken with r10871. Note that this could also have been fixed by creating the Events instance on the element returned by OpenLayers.Util.getViewportElement() instead of document. r=erilem (closes #2941)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10954 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-07 23:48:20 +00:00
Tim Schaub
43dd65d357 Avoiding infinite recursion when getting bounds of geometry collections. r=ahocevar (closes #2967)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10953 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-07 23:37:56 +00:00
ahocevar
92493cc12b Use native JSON if available. p=fredj,me r=bartvde,tschaub,elemoine (closes #1807)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10952 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-07 16:56:49 +00:00
Éric Lemoine
831420aac2 missing var's, p=jorix (thx), r=me (closes #2960)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10951 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-06 20:15:15 +00:00
ahocevar
b125e045d1 Make WMSGetFeature control respect layer projection if it equals the map projection. r=bartvde (closes #2918)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10948 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-04 13:51:11 +00:00
ahocevar
492a6d930b Let the read method respect readOptions and pass them to the format's read method. r=bartvde (closes #2957)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10947 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-04 13:44:26 +00:00
ahocevar
da8766d9d6 give ModifyFeature control a vertexRenderIntent property. r=tschaub (closes #2955)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10938 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-01 19:40:17 +00:00
ahocevar
b3f7d25c37 added APIdoc comment for the beforefeatureselected event
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10937 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-12-01 15:26:18 +00:00
ahocevar
542f8c5a84 fixed API docs. p=patzi, r=me (closes #2948)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10919 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-25 16:46:57 +00:00
Éric Lemoine
0f6c6545f6 do not rely on Function.prototype.startsWith, use OpenLayers.String.startsWith, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10918 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-24 20:03:00 +00:00
ahocevar
e970151067 new "immediate" option to enable live measuring while moving the mouse. p=patzi,me r=me (closes #2935)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10917 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-24 10:44:01 +00:00
ahocevar
30eabe26ad set IS_GECKO to true only for real gecko browsers, not for webkit ones. r=bartvde (closes #2942)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10909 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-23 09:19:25 +00:00
ahocevar
e851d453de reverting r10700 (closes #2870)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10907 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-20 17:43:06 +00:00
ahocevar
57bbf90cab reverting r10905, which included more changes than it should have
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10906 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-20 17:38:23 +00:00
ahocevar
b696581405 reverting r10700 (closes #2870)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10905 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-20 17:36:15 +00:00
Éric Lemoine
3e9253a5cb make Request.html pass again, it passes in Chrome7, IE7 and FF3, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10904 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-18 13:39:08 +00:00
Éric Lemoine
5fe1b76e19 Layer.XYZ: support a subset of server resolutions, p=bbinet, r=me (closes #2909)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10903 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-17 12:51:22 +00:00
bartvde
9a3ca5fa7e several improvement to the SOSGetObservation Format, p=sonxurxo, r=me (closes #2842)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10902 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-17 10:06:07 +00:00
bartvde
7608e867e9 remove deprecated Layer.WMS.Post from SLDSelect control, r=ahocevar (closes #2930)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10898 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-16 15:15:06 +00:00
Frédéric Junod
f5735dabae fix comment, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10897 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-15 09:48:10 +00:00
pgiraud
a56fe160d2 The built library file is now at the root level in the release archives (Closes #2923)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10895 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-12 14:22:10 +00:00
Tim Schaub
8e9087344d Updated single tile example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10883 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-10 18:23:58 +00:00
bartvde
851681cca1 changing an existing testcase to show that Format.WFST will write out srsName correctly on the envelope tag for a BBOX filter, non-functional change (closes #2921)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10880 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-09 13:08:56 +00:00
bartvde
66960d392f Filter strategy constructor should not need filter, r=tschaub,fredj (closes #2841)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10879 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-09 12:57:06 +00:00
ahocevar
c8c9b51e73 Fixed OverviewMap and PanZoomBar controls. The former was broken because the extent rectangle div now has to be added to the viewPortDiv instead of the div, and the latter because it uses pagePosition where it doesn't need to, with an incorrect argument. r=fredj (closes #2247)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10878 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-08 12:26:40 +00:00
Tim Schaub
003312856c Update KML layer example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10875 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-05 21:56:24 +00:00
Éric Lemoine
6763ec26f8 fix minor typo in a comment, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10874 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-05 14:14:28 +00:00
Frédéric Junod
34c52fb5a8 handleBrowserEvent: don't compute mouse position if it's not needed. r=erilem (closes #2880)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10873 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-05 14:07:40 +00:00
Éric Lemoine
5924c75c9b in Popup.html mock BROWSER_NAME instead of Util.getBrowserName, non-functional change (closes #2919)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10872 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-05 14:05:41 +00:00
ahocevar
a59266325b Make it so getMousePosition does not report incorrect position when borders are used in containing elements, by replacing the pagePosition method with a new one and attaching map events to the internal viewport div instead of the user provided map div. r=erilem,tschaub (closes #2247)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10871 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-05 12:44:38 +00:00
ahocevar
e40bb1f10d Support EPSG:3857, EPSG:102113 and EPSG:102100 as additional web mercator aliases. p=tschaub, r=me (closes #2915)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10870 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-05 07:49:12 +00:00
ahocevar
b9517a4cb5 Handle projections with different aliases: smarter Projection.equals and Layer.WMS.getFullRequestString methods. r=tschaub (closes #2914)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10869 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-05 07:33:38 +00:00
Tim Schaub
aa9112c494 Avoiding unnecessary repeated checks of navigator.userAgent. The constants added here should not be used outside the library. In the future, they should be removed from the library. r=ahocevar (closes #2911)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10868 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-03 00:10:00 +00:00
Tim Schaub
89c215bba4 Fixing up the WMS Post tests so they don't override getBrowserName (closes #2912).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10867 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-11-02 19:35:02 +00:00
Frédéric Junod
532f64f105 Remove the activate, deactivate and setMap functions from the
WMTSGetFeatureInfo control. Not needed because they do the same as the
parent class. r=erilem (closes #2805)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10864 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-28 06:50:31 +00:00
Frédéric Junod
7fd84b613d avoid double redraw when panning/zooming. p=tsauerwein,r=erilem (closes #2801)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10863 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-28 06:44:35 +00:00
Éric Lemoine
8024e58177 do not assume that the browser won't add new script tags to the DOM before it's done with the evaluation of OpenLayers.js, r=fredj,ahocevar (closes #2873)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10862 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-27 10:26:05 +00:00
Frédéric Junod
3c57b6b36c Add missing semicolon and remove 'date' local variable declaration
(already declared at the beginning of the function). Tests still pass
with FF. Non-functional change.



git-svn-id: http://svn.openlayers.org/trunk/openlayers@10861 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-27 10:12:01 +00:00
Éric Lemoine
da9bf7991d remove duplicated code in OpenLayers.html tests, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10860 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-26 14:09:26 +00:00
Frédéric Junod
a5e06e66e2 add '-khtml-user-select: none;' to prevent the selection of the element .r=erilem (closes #2898)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10859 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-26 06:48:35 +00:00
ahocevar
e087e31621 Remove overhead from OpenLayers.Class, using erilem's fancy OpenLayers.inherit function. r=erilem (closes #2899)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10858 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-22 20:34:21 +00:00
ahocevar
1b44b82908 Make sure that the background node is removed when redrawing with a different symbolizer. Thanks ahtih for this excellent debut patch. p=ahtih, r=me (closes #2891)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10851 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-20 14:01:36 +00:00
crschmidt
2bb081255e Mention that layer.display is not designed for external use, and redirect
users to setVisibility. No functional change.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10848 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-18 19:12:13 +00:00
bartvde
e606386b94 Path handler: create APIFunction from dblclick internals (called finishGeometry) so people can programmatically stop the path handler, r=erilem (closes #2889)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10847 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-18 09:46:46 +00:00
Éric Lemoine
107cf7948c remove property Layer.Vector.isVector, it serves no purpose, r=bartvde (closes #2888)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10846 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-18 08:09:56 +00:00
ahocevar
6c56531378 change server for the example, because wfs on demo.opengeo.org appears to be broken.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10843 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-16 21:58:49 +00:00
bartvde
44bba4bc6b dos2unix, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10838 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-15 14:36:48 +00:00
ahocevar
12d3c86eb4 Avoid VML rendering issues with zero area inner rings. We don't actually do an expensive area calculation, but just make sure that we have at least three distinct points. This version is slightly different from Tim's previous patch: it compares the VML path components rathter than the geometry components, which is less expensive and more reliable (because the VML path uses integers). p=tschaub,me r=me (closes #2876)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10837 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-15 13:47:35 +00:00
Frédéric Junod
2176013e24 Use an OSM layer instead of TMS with a custom getURL. Non functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10836 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-15 11:43:53 +00:00
ahocevar
1ce6ce1827 fixed APIdocs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10835 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-14 18:52:19 +00:00
ahocevar
ea3999d755 partially reverted r10732 (because we don't deactivate controls on destrly) and reverted r10810 (because it is not needed any more). r=elemoine (closes #2864)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10834 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-14 10:57:31 +00:00
ahocevar
758a252bd8 reverted r10832 - inclusion of Console.js should be handled elsewhere. Thanks elemoine for mentioning this.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10833 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-14 08:26:12 +00:00
ahocevar
aa49e90a2f added missing @requires. Thanks jorix for spotting this (see #2873)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10832 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-14 08:18:56 +00:00
ahocevar
102f7da67e Also handle the case where the regex does not match in OpenLayers.js::_getScriptLocation, and use a shorter variable name for the match. In addition to the reviewed patch, also added some comments about simplification in 3.0, and to make jorix happy. Finally, moved VERSION_NUMBER to the top to make it easy to see it in a minified build. r=elemoine (closes #2873)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10831 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-14 08:08:54 +00:00
Tim Schaub
1397f816b5 Adding interior ring digitizing for polygons. Thanks jachym for the initial work. r=ahocevar (closes #1894)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10828 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-13 22:12:52 +00:00
Tim Schaub
ba21865e28 Update jugl.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10824 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-13 19:01:00 +00:00
Frédéric Junod
113f87b317 return an empty string if the script don't ends with 'OpenLayers.js', add OpenLayers.VERSION_NUMBER. r=elemoine (closes #2873)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10823 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-13 13:59:31 +00:00
ahocevar
485ebaa316 Made _getScriptLocation smarter, and added it to SingleFile.js also. This means that single file builds no longer need to contain OpenLayers.js. r=eleomine (closes #2873)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10822 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-13 13:02:08 +00:00
Éric Lemoine
8dc19c84c7 Layer/TileCache.js missing @requires to Tile/Image.js, reported by fvanderbiest, no functional change (closes #2861)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10818 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-11 18:40:55 +00:00
Tim Schaub
0bcf869632 Excluding Lang dir in library.cfg (Lang/en.js is pulled in by OpenLayers.js).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10817 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-11 15:57:40 +00:00
Tim Schaub
8047afd909 Adding support for excluding directories when an includes list is not explicitly provided. For our full.cfg example profile, we can exclude the OpenLayers/Lang and Firebug directories instead of having to explicitly list language files to exclude (see #2871).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10816 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-11 15:51:29 +00:00
crschmidt
5ec2f0371d Testing commit emails.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10815 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-09 22:15:20 +00:00
ahocevar
e22a37476d remove unwanted streetview control from the google layer. r=pgiraud (closes #2868)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10813 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-08 16:23:22 +00:00
Éric Lemoine
ee9c3e76af add an Extend Cluster Strategy example, provided by Marc Jansen, no functional change to the library, r=me (closes #2865)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10811 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-07 08:29:06 +00:00
Éric Lemoine
26d20c1fb1 cannot destroy a map with panels, r=fredj (closes #2864)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10810 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-10-06 09:15:00 +00:00
Éric Lemoine
233ffe6a10 Use div.childNodes instead of div.children, as div.children isn't supported by FireFox 3.0, p=fvanderbiest, r=me (closes #2855)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10801 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-30 11:26:29 +00:00
ahocevar
2049b2a8b2 Use new MultiMap API key for the mm example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10800 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-30 09:30:12 +00:00
Tim Schaub
1d1911e28d Fire measurepartial synchronously if in freehand mode. Cancel delayed messages when measure completes, when control is deactivated, or when measure is canceled. p=jorix,me r=me (closes #2820)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10799 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-28 21:57:00 +00:00
Éric Lemoine
059b83a52f we get a js error in the Fixed strategy when the layer is removed from the map right after strategy.load is called, p=fvanderbiest, r=me (closes #2851)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10791 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-27 10:13:00 +00:00
bartvde
0dc5793834 undo fix for #2850
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10790 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-24 08:44:12 +00:00
bartvde
fe16f7b409 Control should set this.div to null in destroy, r=fredj (closes #2850)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10789 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-24 06:39:08 +00:00
pgiraud
ff6a4d44e7 Fixing identation, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10775 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-21 13:20:11 +00:00
ahocevar
f4a99d4052 Fixed viewRequestID regression and mixin issue that caused the mixin to always be applied unless maxGetUrlLength was explicitly set. Includes a regression test for the viewRequestID bit. r=tschaub (closes #2847)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10773 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-17 23:20:55 +00:00
Tim Schaub
b8feb3c22e Making it so OpenLayers.Util.getParameters doesn't fail with improperly encoded query string parameter names or values. We expect parameter names and values to be encoded according to RFC 3986 (http://labs.apache.org/webarch/uri/rfc/rfc3986.html). However, there are cases where browsers will not use utf-8 character encoding in generating a URL. In these cases, the unescape function provides a fallback that tries to use the ISO Latin character set. This may not always be a good second assumption, but it is better than failing to load the library when the first assumption fails. r=ahocevar (closes #2821)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10771 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-17 16:48:11 +00:00
Tim Schaub
bb71632848 Removing null default values from symbolizers. Later, we could consider static setDefaults methods on the constructors. r=ahocevar (closes #2840)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10770 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-17 16:32:07 +00:00
ahocevar
38c3a4d4c5 use Util.getParameters correctly. r=tschaub (closes #2846)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10769 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-17 16:20:54 +00:00
ahocevar
e22389086c removing unused method. Non-functional change, see #2824
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10768 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-17 09:38:46 +00:00
ahocevar
ce90aebfd0 Made Tile.Image.IFrame an addin which will be used only if a layer is configured with the maxGetUrlLength option. This deprecates Layer.WMS.Post. r=tschaub (closes #2824)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10755 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-16 21:54:22 +00:00
Tim Schaub
1284b71bbc Updating basic example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10754 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-16 20:34:49 +00:00
ahocevar
c70a97fb77 Removing redundant redraw. This patch is an excellent example of how things should be done, well done jorix. p=jorix, r=me (closes #2837)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10734 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-14 07:30:28 +00:00
ahocevar
5417057974 Removing redundant line of code that causes problems when placing the div outside the map. Thanks jorix for catching this. p=jorix, r=me (closes #2836)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10733 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-13 21:15:13 +00:00
ahocevar
a1f20ee345 Avoid panel being displayed after deactivate. p=jorix, r=me (closes #2835)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10732 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-13 13:26:07 +00:00
ahocevar
35092e9226 Added keywords and tags to examples. People who want to help clean up our examples collection should look for the cleanup tag. Patch created by marcjansen during the FOSS4G 2009 and 2010 code sprints. Thanks! p=marcjansen, r=me (closes #2830)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10730 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-13 12:26:18 +00:00
crschmidt
4be7614570 Add support for examples list to parse and use tags. Patch from marcjansen
at the code sprint at FOSS4G2010. Woohoo. r=me, (Closes #2829)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10728 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-13 11:27:12 +00:00
ahocevar
581525af98 There is no reason to not create OpenLayers.Filter instances. Non-functional change (see #2818)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10727 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-10 15:10:05 +00:00
crschmidt
a40edf44f7 Testing commit.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10726 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-10 14:27:53 +00:00
Tim Schaub
3aeab46132 Putting the script tag at the end of the body (for demonstration purposes).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10725 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-10 13:14:06 +00:00
ahocevar
d879ca8d00 add MultiMap tests without document.write, because this does not work in IE. We also have to do a try-catch in the first test to avoid tests from failing in WebKit browsers when the api key is incorrect. Non-functional change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10724 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-10 12:49:10 +00:00
bartvde
92429bb7c2 add failure handler to SOS example, non-functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10720 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-04 08:27:21 +00:00
bartvde
47173e6b62 protect SOS example against misbehaving SOS
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10719 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-04 08:22:58 +00:00
crschmidt
3471306a2e (Minor spacing, testing commit.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10718 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-03 16:43:33 +00:00
crschmidt
26eccbd049 Add a release tool to SVN.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10717 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-02 21:53:34 +00:00
Tim Schaub
95512dfa5a The cluster strategy originally destroyed all features on the layer because it created them. When the threshold property was introduced, the strategy should have been removing instead of destroying features that it didn't create. This wasn't a problem until r10597 when the destroyMethod method was made to actually work. With this change, the cluster strategy removes instead of destroys features. r=crschmidt (closes #2815).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10714 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-02 18:29:06 +00:00
bartvde
f76f8ded46 fix up SOS client example, non-functional change, the underlying SOS service had changed something in the accepted resultModel values
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10713 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-02 09:35:09 +00:00
crschmidt
cfa3353d42 Change the remaining examples that reference MetaCarta Labs server to
point to the newly set up TileCache service on the OSGeo projects
server.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10709 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-01 19:12:41 +00:00
crschmidt
fb35f555be Change all references to the labs.metacarta.com WMS server to the
OSGeo-hosted vmap0.tiles.osgeo.org server. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10708 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-01 11:36:05 +00:00
crschmidt
e3d36e80e9 Minor changes in languages: "es" and "ca". (Pullup #2751)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10707 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-01 03:45:25 +00:00
crschmidt
f0d474e50b Change license text to point to "OpenLayers contributors", referencing
authors.txt file. In reality, MetaCarta does not own copyright to these files,
they merely have a right to distribute them under the license terms agreed to
by the contributors. At this point, there is no longer any reference to
MetaCarta as a copyright holder in the OpenLayers project, only to its
individual contributors via the authors.txt file.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@10706 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-09-01 03:06:31 +00:00
bartvde
dde71c9b3b fix up tests in Control SLDSelect (closes #2814)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10705 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-29 11:06:45 +00:00
bartvde
7f50e32905 fix up tests in Layer.Image as well see #2360
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10704 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-29 08:45:51 +00:00
bartvde
fd083d64d2 no way to pass read options from protocol to format, r=ahocevar,elemoine (closes #2656)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10703 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2010-08-29 08:41:13 +00:00
crschmidt
54fd1f561c Fix for Anchored popup does not respect anchor size when relative position is
'tl', (Closes #2651)


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


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


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


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


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


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


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


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


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


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

View File

@@ -1,14 +1,43 @@
The OpenLayers build tool supports several different
forms of compressing your javascript code, and a method
of describing build profiles to create customized
OpenLayers builds with only the components you need.
## HowTo: Build & deploy "Shrunk" Single File Library version of OpenLayers ##
When building a file, you can choose to build with several
different compression options to the Python-based build.py
script. The following is an example script:
* Build:
python build.py -c closure full OpenLayers-closure.js
cd build
./build.py
cd ..
This script selects the 'closure' compression mechanism,
uses a config file called 'full.cfg', and writes the output
to OpenLayers-closure.js.
* Upload the result to the server: e.g.
The options available for compression are:
scp build/OpenLayers.js openlayers@openlayers.org:openlayers.org/htdocs/code/
* closure
This requires you to have a closure-compiler.jar in your
tools directory. You can do this by fetching the compiler
from:
http://closure-compiler.googlecode.com/files/compiler-latest.zip
Then unzipping that file, and placing compiler.jar into tools
and renaming it closure-compiler.jar.
* closure_ws
This uses the closure compiler webservice. This will only work
for files source Javascript files which are under 1MB. (Note that
the default OpenLayers full build is not under 1MB.)
* jsmin
jsmin is the default compiler, and uses the Python-based
jsmin script to compress the Javascript.
* minimize
This is a simple whitespace removing Python script, designed
to fill in when other tools are unavailable.
* none
None will leave the Javascript uncompressed.

View File

@@ -3,48 +3,80 @@
import sys
sys.path.append("../tools")
import mergejs
import optparse
have_compressor = None
try:
def build(config_file = None, output_file = None, options = None):
have_compressor = []
try:
import jsmin
have_compressor = "jsmin"
except ImportError:
have_compressor.append("jsmin")
except ImportError:
print "No jsmin"
try:
import closure
have_compressor.append("closure")
except Exception, E:
print "No closure (%s) % E"
try:
import closure_ws
have_compressor.append("closure_ws")
except ImportError:
print "No closure_ws"
try:
import minimize
have_compressor = "minimize"
except Exception, E:
print E
pass
have_compressor.append("minimize")
except ImportError:
print "No minimize"
sourceDirectory = "../lib"
configFilename = "full.cfg"
outputFilename = "OpenLayers.js"
use_compressor = None
if options.compressor and options.compressor in have_compressor:
use_compressor = options.compressor
if len(sys.argv) > 1:
configFilename = sys.argv[1]
sourceDirectory = "../lib"
configFilename = "full.cfg"
outputFilename = "OpenLayers.js"
if config_file:
configFilename = config_file
extension = configFilename[-4:]
if extension != ".cfg":
configFilename = sys.argv[1] + ".cfg"
configFilename = config_file + ".cfg"
if len(sys.argv) > 2:
outputFilename = sys.argv[2]
if output_file:
outputFilename = output_file
print "Merging libraries."
merged = mergejs.run(sourceDirectory, None, configFilename)
if have_compressor == "jsmin":
print "Compressing using jsmin."
print "Merging libraries."
merged = mergejs.run(sourceDirectory, None, configFilename)
print "Compressing using %s" % use_compressor
if use_compressor == "jsmin":
minimized = jsmin.jsmin(merged)
elif have_compressor == "minimize":
print "Compressing using minimize."
elif use_compressor == "minimize":
minimized = minimize.minimize(merged)
else: # fallback
print "Not compressing."
elif use_compressor == "closure_ws":
minimized = closure_ws.minimize(merged)
elif use_compressor == "closure":
minimized = closure.minimize(merged)
else: # fallback
minimized = merged
print "Adding license file."
minimized = file("license.txt").read() + minimized
print "Adding license file."
minimized = file("license.txt").read() + minimized
print "Writing to %s." % outputFilename
file(outputFilename, "w").write(minimized)
print "Writing to %s." % outputFilename
file(outputFilename, "w").write(minimized)
print "Done."
print "Done."
if __name__ == '__main__':
opt = optparse.OptionParser(usage="%s [options] [config_file] [output_file]\n Default config_file is 'full.cfg', Default output_file is 'OpenLayers.js'")
opt.add_option("-c", "--compressor", dest="compressor", help="compression method: one of 'jsmin', 'minimize', or 'none'", default="jsmin")
(options, args) = opt.parse_args()
if not len(args):
build(options=options)
elif len(args) == 1:
build(args[0], options=options)
elif len(args) == 2:
build(args[0], args[1], options=options)
else:
print "Wrong number of arguments"

View File

@@ -2,31 +2,12 @@
# like Renderers and Formats.
[first]
OpenLayers/SingleFile.js
OpenLayers.js
OpenLayers/BaseTypes.js
OpenLayers/BaseTypes/Class.js
OpenLayers/Util.js
Rico/Corner.js
[last]
[include]
[exclude]
Firebug/firebug.js
Firebug/firebugx.js
OpenLayers/Lang/ca.js
OpenLayers/Lang/cs-CZ.js
OpenLayers/Lang/da-DK.js
OpenLayers/Lang/de.js
OpenLayers/Lang/en-CA.js
OpenLayers/Lang/es.js
OpenLayers/Lang/fr.js
OpenLayers/Lang/it.js
OpenLayers/Lang/nb.js
OpenLayers/Lang/nl.js
OpenLayers/Lang/pt-BR.js
OpenLayers/Lang/sv-SE.js
OpenLayers/Lang/zh-TW.js
OpenLayers/Lang/zh-CN.js
Firebug
OpenLayers.js
OpenLayers/Lang

View File

@@ -1,22 +1,15 @@
# This file includes the OpenLayers code to create a build for everything that
# does not require vector support. build.py uses this profile if no other one
# is specified.
# does not require vector support.
[first]
OpenLayers/SingleFile.js
OpenLayers.js
OpenLayers/BaseTypes.js
OpenLayers/BaseTypes/Class.js
OpenLayers/Util.js
Rico/Corner.js
[last]
[include]
[exclude]
Firebug/firebug.js
Firebug/firebugx.js
Firebug
OpenLayers.js
OpenLayers/Format/GeoRSS.js
OpenLayers/Format/GML.js
OpenLayers/Format/WKT.js
@@ -50,19 +43,6 @@ OpenLayers/Renderer/Elements.js
OpenLayers/Renderer/SVG.js
OpenLayers/Renderer/VML.js
OpenLayers/Renderer.js
OpenLayers/Lang/ca.js
OpenLayers/Lang/cs-CZ.js
OpenLayers/Lang/da-DK.js
OpenLayers/Lang/de.js
OpenLayers/Lang/en-CA.js
OpenLayers/Lang/es.js
OpenLayers/Lang/fr.js
OpenLayers/Lang/it.js
OpenLayers/Lang/nb.js
OpenLayers/Lang/nl.js
OpenLayers/Lang/pt-BR.js
OpenLayers/Lang/sv-SE.js
OpenLayers/Lang/zh-TW.js
OpenLayers/Lang/zh-CN.js
OpenLayers/Lang

View File

@@ -2,8 +2,8 @@
OpenLayers.js -- OpenLayers Map Viewer Library
Copyright 2005-2008 MetaCarta, Inc., released under the Clear BSD license.
Please see http://svn.openlayers.org/trunk/openlayers/license.txt
Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD
license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt
for the full text of the license.
Includes compressed code under the following licenses:
@@ -90,3 +90,36 @@
* issues. Applications that use the code below will continue to work seamlessly
* when that happens.
*/
/**
* OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
* Copyright (c) 2006, Yahoo! Inc.
* All rights reserved.
*
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of Yahoo! Inc. nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission of Yahoo! Inc.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

View File

@@ -5,11 +5,6 @@
# Web Mapping BOF.
[first]
OpenLayers/SingleFile.js
OpenLayers.js
OpenLayers/BaseTypes.js
OpenLayers/BaseTypes/Class.js
OpenLayers/Util.js
[last]

36
build/mobile.cfg Normal file
View File

@@ -0,0 +1,36 @@
[first]
[last]
[include]
OpenLayers/Map.js
OpenLayers/Kinetic.js
OpenLayers/Projection.js
OpenLayers/Layer/SphericalMercator.js
OpenLayers/Layer/XYZ.js
OpenLayers/Layer/Bing.js
OpenLayers/Layer/WMS.js
OpenLayers/Control/TouchNavigation.js
OpenLayers/Control/Geolocate.js
OpenLayers/Control/ZoomPanel.js
OpenLayers/Control/Attribution.js
OpenLayers/Control/SelectFeature.js
OpenLayers/Control/DrawFeature.js
OpenLayers/Control/ModifyFeature.js
OpenLayers/Control/Panel.js
OpenLayers/Handler/Point.js
OpenLayers/Handler/Path.js
OpenLayers/Handler/Polygon.js
OpenLayers/Layer/Vector.js
OpenLayers/Renderer/SVG.js
OpenLayers/Renderer/Canvas.js
OpenLayers/Format/GeoJSON.js
OpenLayers/Format/KML.js
OpenLayers/Protocol/HTTP.js
OpenLayers/Protocol/WFS.js
OpenLayers/Protocol/WFS/v1_0_0.js
OpenLayers/Strategy/Fixed.js
[exclude]

10
build/tests.cfg Normal file
View File

@@ -0,0 +1,10 @@
# This build config is supposed to be used for the units tests with "mode=build"
[first]
[last]
[include]
[exclude]
OpenLayers.js

View File

@@ -1,8 +1,11 @@
OpenLayers contributors:
Antoine Abt
Mike Adair
Jeff Adams
Seb Benthall
Bruno Binet
Stéphane Brunner
Howard Butler
Bertil Chaupis
John Cole
@@ -15,8 +18,11 @@ Christian López Espínola
John Frank
Sean Gilles
Pierre Giraud
Ivan Grcic
Andreas Hocevar
Marc Jansen
Ian Johnson
Frédéric Junod
Eric Lemoine
Philip Lindsay
Martijn van Oosterhout

View File

@@ -1,43 +0,0 @@
<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" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function parseData(req) {
g = new OpenLayers.Format.GML();
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 += "</ul>"
}
document.getElementById('output').innerHTML = html;
}
function load() {
OpenLayers.loadURL("gml/owls.xml", "", null, parseData);
}
</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>

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers KML Parser Example</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
@@ -31,7 +33,9 @@
<body onload="load()">
<h1 id="title">KML Parser Example</h1>
<div id="tags"></div>
<div id="tags">
KML, parsing, format
</div>
<p id="shortdesc">
Demonstrate the operation of the KML parser.

200
examples/SLDSelect.html Normal file
View File

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

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers WMSDescribeLayer Parser Example</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
@@ -25,7 +27,9 @@
<body onload="load()">
<h1 id="title">WMSDescribeLayer Parser Example</h1>
<div id="tags"></div>
<div id="tags">
wmsdescribelayer, parser, cleanup
</div>
<p id="shortdesc">
Demonstrate the operation of the WMSDescribeLayer parser.

View File

@@ -1,175 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Basic WMS Example via HTTP-POST protocol</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init(){
var sld = '<StyledLayerDescriptor version="1.0.0">';
sld+= '<NamedLayer>';
sld+= '<Name>topp:tasmania_roads</Name>';
sld+= '<UserStyle>';
sld+= '<IsDefault>1</IsDefault>';
sld+= '<FeatureTypeStyle>';
sld+= '<Rule>';
sld+= '<LineSymbolizer>';
sld+= '<Stroke>';
sld+= '<CssParameter name="stroke">';
sld+= '<Literal>#787878</Literal>';
sld+= '</CssParameter>';
sld+= '<CssParameter name="stroke-width">';
sld+= '<Literal>2</Literal>';
sld+= '</CssParameter>';
sld+= '</Stroke>';
sld+= '</LineSymbolizer>';
sld+= '</Rule>';
sld+= '</FeatureTypeStyle>';
sld+= '</UserStyle>';
sld+= '</NamedLayer>';
sld+= '<NamedLayer>';
sld+= '<Name>topp:tasmania_water_bodies</Name>';
sld+= '<UserStyle>';
sld+= '<IsDefault>1</IsDefault>';
sld+= '<FeatureTypeStyle>';
sld+= '<Rule>';
sld+= '<LineSymbolizer>';
sld+= '<Stroke>';
sld+= '<CssParameter name="stroke">';
sld+= '<Literal>#4F94CD</Literal>';
sld+= '</CssParameter>';
sld+= '<CssParameter name="stroke-width">';
sld+= '<Literal>3</Literal>';
sld+= '</CssParameter>';
sld+= '</Stroke>';
sld+= '</LineSymbolizer>';
sld+= '<PolygonSymbolizer>';
sld+= '<Fill>';
sld+= '<CssParameter name="fill">';
sld+= '<Literal>#63B8FF</Literal>';
sld+= '</CssParameter>';
sld+= '</Fill>';
sld+= '</PolygonSymbolizer>';
sld+= '</Rule>';
sld+= '</FeatureTypeStyle>';
sld+= '</UserStyle>';
sld+= '</NamedLayer>';
sld+= '<NamedLayer>';
sld+= '<Name>topp:tasmania_cities</Name>';
sld+= '<UserStyle>';
sld+= '<IsDefault>1</IsDefault>';
sld+= '<FeatureTypeStyle>';
sld+= '<Rule>';
sld+= '<PointSymbolizer>';
sld+= '<Graphic>';
sld+= '<Mark>';
sld+= '<WellKnownName>cross</WellKnownName>';
sld+= '<Fill>';
sld+= '<CssParameter name="fill">';
sld+= '<Literal>#00FF00</Literal>';
sld+= '</CssParameter>';
sld+= '</Fill>';
sld+= '</Mark>';
sld+= '<Size>15</Size>';
sld+= '</Graphic>';
sld+= '</PointSymbolizer>';
sld+= '<TextSymbolizer>';
sld+= '<Label><PropertyName>CITY_NAME</PropertyName></Label>';
sld+= '<Font>';
sld+= '<SvgParameter name="font-size">15</SvgParameter>';
sld+= '</Font>';
sld+= '</TextSymbolizer>';
sld+= '</Rule>';
sld+= '</FeatureTypeStyle>';
sld+= '</UserStyle>';
sld+= '</NamedLayer>';
sld+= '<NamedLayer>';
sld+= '<Name>topp:tasmania_state_boundaries</Name>';
sld+= '<UserStyle>';
sld+= '<IsDefault>1</IsDefault>';
sld+= '<FeatureTypeStyle>';
sld+= '<Rule>';
sld+= '<PolygonSymbolizer>';
sld+= '<Fill>';
sld+= '<CssParameter name="fill">';
sld+= '<Literal>#8B8989</Literal>';
sld+= '</CssParameter>';
sld+= '<CssParameter name="fill-opacity">';
sld+= '<Literal>0.2</Literal>';
sld+= '</CssParameter>';
sld+= '</Fill>';
sld+= '<Stroke>';
sld+= '<CssParameter name="stroke">';
sld+= '<Literal>#FF4040</Literal>';
sld+= '</CssParameter>';
sld+= '<CssParameter name="stroke-width">';
sld+= '<Literal>2</Literal>';
sld+= '</CssParameter>';
sld+= '</Stroke>';
sld+= '</PolygonSymbolizer>';
sld+= '</Rule>';
sld+= '</FeatureTypeStyle>';
sld+= '</UserStyle>';
sld+= '</NamedLayer>';
sld+= '</StyledLayerDescriptor>';
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{
layers: 'basic'
}
);
var rcbw = new OpenLayers.Layer.WMS.Post("Roads, Cities, Boundaries, Water",
"http://demo.opengeo.org/geoserver/wms",
{
'layers': 'topp:tasmania_roads,topp:tasmania_water_bodies,topp:tasmania_state_boundaries,topp:tasmania_cities',
transparent: true,
format: 'image/jpeg',
sld_body: sld
},
{
isBaseLayer: false,
unsupportedBrowsers: []
}
);
map.addLayers([layer, rcbw]);
map.setCenter(new OpenLayers.LonLat(146.65748632815,-42.230763671875), 7);
}
</script>
</head>
<body onload="init()">
<h1 id="title">Basic WMS Example via HTTP-POST protocol with a large SLD
included</h1>
<div id="tags"></div>
<div id="shortdesc">Creating a WMS layer with a large SLD in the sld_body</div>
<div id="map" style="width: 512; height: 256; border: 1px solid red;"></div>
<div id="docs">
This example uses a large SLD created on the client side to style a WMS
layer. This example uses a WMS.Post layer which transfers data via the
HTTP-POST protocol. <br>
NOTE: Opera is not able to display transparent tiles with this layer,
and in some Firefox browsers can appear ugly viewport-shaking effects
while dragging arround. Use the 'unsupportedBrowsers' property to
control which browsers should use plain image tiles (like Layer.WMS)
instead. The default setting (["mozilla", "firefox", "opera"])
excludes problematic browsers without removing the ability to use long
request parameters, because all these browsers support long urls via
GET.
</div>
</body>
</html>

View File

@@ -0,0 +1,99 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>OpenLayers Accelerometer Usage</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<script type="text/javascript" src="browser.js"></script>
<style type="text/css">
.olControlAttribution {
bottom: 5px;
}
</style>
<script type="text/javascript">
function init() {
if (isEventSupported('deviceorientation', window) || isEventSupported('mozorientation', window) || isEventSupported('devicemotion', window)) {
if (window.DeviceOrientationEvent) {
window.addEventListener("deviceorientation", function (event) {
document.getElementById('resultDeviceOrientation').innerHTML = '';
if (typeof(event.alpha) != 'undefined') {
document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Alpha: " + event.alpha + "<br>";
document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Beta: " + event.beta + "<br>";
document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Gamma: " + event.gamma + "<br>";
}
if (typeof(event.absolute) != 'undefined') {
document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Gamma: " + event.absolute + "<br>";
}
if (typeof(event.compassCalibrate) != 'undefined') {
document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Gamma: " + event.compassCalibrated + "<br>";
}
}, true);
}
if (window.DeviceMotionEvent) {
window.addEventListener('devicemotion', function (event) {
document.getElementById('resultDeviceMotion').innerHTML = '';
if (typeof(event.accelerationIncludingGravity) != 'undefined') {
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "accelerationIncludingGravity.x: " + event.accelerationIncludingGravity.x + "<br>";
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "accelerationIncludingGravity.y: " + event.accelerationIncludingGravity.y + "<br>";
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "accelerationIncludingGravity.z: " + event.accelerationIncludingGravity.z + "<br>";
}
if (typeof(event.acceleration) != 'undefined') {
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "acceleration.x: " + event.acceleration.x + "<br>";
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "acceleration.y: " + event.acceleration.y + "<br>";
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "acceleration.z: " + event.acceleration.z + "<br>";
}
if (typeof(event.rotationRate) != 'undefined') {
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "rotationRate.alpha: " + event.rotationRate.alpha + "<br>";
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "rotationRate.beta: " + event.rotationRate.beta + "<br>";
document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "rotationRate.gamma: " + event.rotationRate.gamma + "<br>";
}
}, true);
}
if (window.MozOrientation) {
window.addEventListener("MozOrientation", function (orientation) {
document.getElementById('resultMozOrientation').innerHTML = "orientation.x: " + orientation.x + "<br>";
document.getElementById('resultMozOrientation').innerHTML = document.getElementById('resultMozOrientation').innerHTML + "orientation.y: " + orientation.y + "<br>";
document.getElementById('resultMozOrientation').innerHTML = document.getElementById('resultMozOrientation').innerHTML + "orientation.z: " + orientation.z + "<br>";
}, true);
}
} else {
alert("Unfortunately, your brower doesn't support the orientation usage");
}
}
</script>
</head>
<body onload="init()">
<h1 id="title">Accelerometer</h1>
<p id="shortdesc">
The goal of this script is to demonstrate the usage of accelerometer.
</p>
<p>
The orientation specification can be found <a href="http://dev.w3.org/geo/api/spec-source-orientation.html">here</a>.
</p>
<div id="tags">
browser, vendor, mobile, orientation
</div>
<h1>Device motion</h1>
<div id="resultDeviceMotion">
</div>
<h1>Device orientation</h1>
<div id="resultDeviceOrientation">
</div>
<h1>MOZ orientation</h1>
<div id="resultMozOrientation">
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Accessible Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -38,7 +40,7 @@
map = new OpenLayers.Map('map', options);
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?",
"http://vmap0.tiles.osgeo.org/wms/vmap0?",
{layers: 'basic'}
);
map.addLayer(wms);
@@ -50,6 +52,7 @@
<h1 id="title">Accessible Example</h1>
<div id="tags">
keyboard, pan, panning, zoom, zooming, accesskey
</div>
<p id="shortdesc">

View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers All Overlays with Google and OSM</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="all-overlays-google.js"></script>
</head>
<body onload="init()">
<h1 id="title">All Overlays with Google and OSM</h1>
<div id="tags">
overlay, baselayer, google, osm, openstreetmap
</div>
<p id="shortdesc">
Using the Google and OSM layers as overlays.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
Using the allOverlays property on the map, the first layer added
must initially be visible. This example demonstrates the use of
a Google layer and an OSM layer treated as overlays.
</p><p>
See the <a href="all-overlays-google.js" target="_blank">
all-overlays-google.js source</a> to see how this is done.
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,19 @@
var map;
function init() {
map = new OpenLayers.Map({
div: "map",
allOverlays: true
});
var osm = new OpenLayers.Layer.OSM();
var gmap = new OpenLayers.Layer.Google("Google Streets", {visibility: false});
// note that first layer must be visible
map.addLayers([osm, gmap]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>All Overlays Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -56,6 +58,9 @@
</head>
<body onload="init()">
<h1 id="title">OpenLayers Overlays Only Example</h1>
<div id="tags">
overlay, baselayer
</div>
<p id="shortdesc">
Demonstrates a map with overlays only.
</p>

View File

@@ -0,0 +1,27 @@
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<title>AnchorPermalink Example</title>
<script src="../lib/OpenLayers.js"></script>
<script src="anchor-permalink.js"></script>
</head>
<body onload="init()">
<h1 id="title">AnchorPermalink Example</h1>
<div id="tags">
anchor, permalink
</div>
<p id="shortdesc">
Place a permalink in the anchor of the url.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
See the <a href="anchor-permalink.js" target="_blank">anchor-permalink.js
source</a> to see how this is done.
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,13 @@
function init() {
var map = new OpenLayers.Map({
div: "map",
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
layers: [
new OpenLayers.Layer.OSM()
]
});
if (!map.getCenter()) map.zoomToMaxExtent();
map.addControl(new OpenLayers.Control.Permalink({anchor: true}));
}

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Animated Panning of the Map via map.panTo</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -36,7 +38,7 @@
function init(){
map = new OpenLayers.Map('map', {numZoomLevels: 2});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.zoomToMaxExtent();
@@ -47,7 +49,7 @@
map2 = new OpenLayers.Map('map2', {'panMethod': null, numZoomLevels: 2} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map2.addLayer(layer);
map2.zoomToMaxExtent();
@@ -73,7 +75,9 @@
</head>
<body onload="init()">
<h1 id="title">map.panTo Example</h1>
<div id="tags">map.panTo</div>
<div id="tags">
panning, animation, effect, smooth, panMethod
</div>
<div id="shortdesc">Show animated panning effects in the map</div>
<div id="map" class="smallmap"></div>
<div id="docs">

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
@@ -41,6 +43,7 @@
<h1 id="title">ArcGIS Server 9.3 Rest API Example</h1>
<div id="tags">
ESRI, ArcGIS, REST, filter
</div>
<p id="shortdesc">
Shows the basic use of openlayers using an ArcGIS Server 9.3 Rest API layer

View File

@@ -0,0 +1,219 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers ArcGIS Cache Example (MapServer Access)</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<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 src="../lib/OpenLayers/Layer/ArcGISCache.js" type="text/javascript"></script>
<script type="text/javascript">
var map,
cacheLayer,
testLayer,
//This layer requires meta data about the ArcGIS service. Typically you should use a
//JSONP call to get this dynamically. For this example, we are just going to hard-code
//an example that we got from here (yes, it's very big):
// http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json&pretty=true
layerInfo = {
"currentVersion" : 10.01,
"serviceDescription" : "This worldwide street map presents highway-level data for the world and street-level data for the United States, Canada, Japan, Southern Africa, and a number of countries in Europe and elsewhere. This comprehensive street map includes highways, major roads, minor roads, railways, water features, administrative boundaries, cities, parks, and landmarks, overlaid on shaded relief imagery for added context. The street map was developed by ESRI using ESRI basemap data, AND road data, USGS elevation data, and UNEP-WCMC parks and protected areas for the world, and Tele Atlas Dynamap<61> and Multinet<65> street data for North America and Europe. Coverage for street-level data in Europe includes Andorra, Austria, Belgium, Czech Republic, Denmark, France, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Luxembourg, Netherlands, Northern Ireland (Belfast only), Norway, Poland, Portugal, San Marino, Slovakia, Spain, Sweden, and Switzerland. Coverage for street-level data elsewhere in the world includes China (Hong Kong only), Colombia, Egypt (Cairo only), Indonesia (Jakarta only), Japan, Mexico (Mexico City only), Russia (Moscow and St. Petersburg only), South Africa, Thailand, and Turkey (Istanbul and Ankara only). For more information on this map, visit us \u003ca href=\"http://goto.arcgisonline.com/maps/World_Street_Map \" target=\"_new\"\u003eonline\u003c/a\u003e.",
"mapName" : "Layers",
"description" : "This worldwide street map presents highway-level data for the world and street-level data for the United States, Canada, Japan, Southern Africa, most countries in Europe, and several other countries. This comprehensive street map includes highways, major roads, minor roads, one-way arrow indicators, railways, water features, administrative boundaries, cities, parks, and landmarks, overlaid on shaded relief imagery for added context. The map also includes building footprints for selected areas in the United States and Europe and parcel boundaries for much of the lower 48 states.\n\nThe street map was developed by ESRI using ESRI basemap data, DeLorme base map layers, AND road data, USGS elevation data, UNEP-WCMC parks and protected areas for the world, Tele Atlas Dynamap<61> and Multinet<65> street data for North America and Europe, and First American parcel data for the United States. Coverage for street-level data in Europe includes Andorra, Austria, Belgium, Czech Republic, Denmark, France, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Luxembourg, Netherlands, Norway, Poland, Portugal, San Marino, Slovakia, Spain, Sweden, and Switzerland. Coverage for street-level data elsewhere in the world includes China (Hong Kong only), Colombia, Egypt (Cairo only), Indonesia (Jakarta only), Japan, Mexico, Russia, South Africa, Thailand, and Turkey (Istanbul and Ankara only). For more information on this map, visit us online at http://goto.arcgisonline.com/maps/World_Street_Map\n",
"copyrightText" : "Sources: ESRI, DeLorme, AND, Tele Atlas, First American, ESRI Japan, UNEP-WCMC, USGS, METI, ESRI Hong Kong, ESRI Thailand, Procalculo Prosis",
"layers" : [
{
"id" : 0,
"name" : "World Street Map",
"parentLayerId" : -1,
"defaultVisibility" : true,
"subLayerIds" : null,
"minScale" : 0,
"maxScale" : 0
}
],
"tables" : [
],
"spatialReference" : {
"wkid" : 102100
},
"singleFusedMapCache" : true,
"tileInfo" : {
"rows" : 256,
"cols" : 256,
"dpi" : 96,
"format" : "JPEG",
"compressionQuality" : 90,
"origin" : {
"x" : -20037508.342787,
"y" : 20037508.342787
},
"spatialReference" : {
"wkid" : 102100
},
"lods" : [
{"level" : 0, "resolution" : 156543.033928, "scale" : 591657527.591555},
{"level" : 1, "resolution" : 78271.5169639999, "scale" : 295828763.795777},
{"level" : 2, "resolution" : 39135.7584820001, "scale" : 147914381.897889},
{"level" : 3, "resolution" : 19567.8792409999, "scale" : 73957190.948944},
{"level" : 4, "resolution" : 9783.93962049996, "scale" : 36978595.474472},
{"level" : 5, "resolution" : 4891.96981024998, "scale" : 18489297.737236},
{"level" : 6, "resolution" : 2445.98490512499, "scale" : 9244648.868618},
{"level" : 7, "resolution" : 1222.99245256249, "scale" : 4622324.434309},
{"level" : 8, "resolution" : 611.49622628138, "scale" : 2311162.217155},
{"level" : 9, "resolution" : 305.748113140558, "scale" : 1155581.108577},
{"level" : 10, "resolution" : 152.874056570411, "scale" : 577790.554289},
{"level" : 11, "resolution" : 76.4370282850732, "scale" : 288895.277144},
{"level" : 12, "resolution" : 38.2185141425366, "scale" : 144447.638572},
{"level" : 13, "resolution" : 19.1092570712683, "scale" : 72223.819286},
{"level" : 14, "resolution" : 9.55462853563415, "scale" : 36111.909643},
{"level" : 15, "resolution" : 4.77731426794937, "scale" : 18055.954822},
{"level" : 16, "resolution" : 2.38865713397468, "scale" : 9027.977411},
{"level" : 17, "resolution" : 1.19432856685505, "scale" : 4513.988705}
]
},
"initialExtent" : {
"xmin" : -20037507.0671618,
"ymin" : -20037507.0671618,
"xmax" : 20037507.0671618,
"ymax" : 20037507.0671619,
"spatialReference" : {
"wkid" : 102100
}
},
"fullExtent" : {
"xmin" : -20037507.0671618,
"ymin" : -19971868.8804086,
"xmax" : 20037507.0671618,
"ymax" : 19971868.8804086,
"spatialReference" : {
"wkid" : 102100
}
},
"units" : "esriMeters",
"supportedImageFormatTypes" : "PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP",
"documentInfo" : {
"Title" : "World Street Map",
"Author" : "ESRI",
"Comments" : "",
"Subject" : "streets, highways, major roads, railways, water features, administrative boundaries, cities, parks, protected areas, landmarks ",
"Category" : "transportation(Transportation Networks) ",
"Keywords" : "World, Global, 2009, Japan, UNEP-WCMC",
"Credits" : ""
},
"capabilities" : "Map"
};
function init(){
//The max extent for spherical mercator
var maxExtent = new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34);
//Max extent from layerInfo above
var layerMaxExtent = new OpenLayers.Bounds(
layerInfo.fullExtent.xmin,
layerInfo.fullExtent.ymin,
layerInfo.fullExtent.xmax,
layerInfo.fullExtent.ymax
);
var resolutions = [];
for (var i=0; i<layerInfo.tileInfo.lods.length; i++) {
resolutions.push(layerInfo.tileInfo.lods[i].resolution);
}
map = new OpenLayers.Map('map', {
maxExtent: maxExtent,
StartBounds: layerMaxExtent,
units: (layerInfo.units == "esriFeet") ? 'ft' : 'm',
resolutions: resolutions,
tileSize: new OpenLayers.Size(layerInfo.tileInfo.width, layerInfo.tileInfo.height),
projection: 'EPSG:' + layerInfo.spatialReference.wkid
});
cacheLayer = new OpenLayers.Layer.ArcGISCache( "AGSCache",
"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer", {
isBaseLayer: true,
//From layerInfo above
resolutions: resolutions,
tileSize: new OpenLayers.Size(layerInfo.tileInfo.cols, layerInfo.tileInfo.rows),
tileOrigin: new OpenLayers.LonLat(layerInfo.tileInfo.origin.x , layerInfo.tileInfo.origin.y),
maxExtent: layerMaxExtent,
projection: 'EPSG:' + layerInfo.spatialReference.wkid
});
// create Google Mercator layers
testLayer = new OpenLayers.Layer.Google(
"Google Streets",
{'sphericalMercator': true}
);
map.addLayers([testLayer, cacheLayer]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl( new OpenLayers.Control.MousePosition() );
map.zoomToExtent(new OpenLayers.Bounds(-8341644, 4711236, -8339198, 4712459));
}
</script>
</head>
<body onload="init()">
<h1 id="title">OpenLayers ArcGIS Cache Example (MapServer Access)</h1>
<div id="tags">
arcgis, arcgiscache, cache, tms
</div>
<p id="shortdesc">
Demonstrates the basic initialization of the ArcGIS Cache layer using a prebuilt configuration, and standard tile access.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>This example demonstrates using the ArcGISCache layer for
accessing ESRI's ArcGIS Server (AGS) Map Cache tiles through
an AGS MapServer. Toggle the visibility of the AGS layer to
demonstrate how the two maps are lined up correctly.</p>
<h2>Notes on this layer</h2>
<p>A few attempts have been made at this kind of layer before. See
<a href="http://trac.osgeo.org/openlayers/ticket/1967">here</a> and
<a href="http://trac.osgeo.org/openlayers/browser/sandbox/tschaub/arcgiscache/lib/OpenLayers/Layer/ArcGISCache.js">here</a>.
A problem the users encounter is that the tiles seem to "jump around".
This is due to the fact that the max extent for the cached layer actually
changes at each zoom level due to the way these caches are constructed.
We have attempted to use the resolutions, tile size, and tile origin
from the cache meta data to make the appropriate changes to the max extent
of the tile to compensate for this behavior.</p>
You will need to know:
<ul>
<li>Max Extent: The max extent of the layer</li>
<li>Resolutions: An array of resolutions, one for each zoom level</li>
<li>Tile Origin: The location of the tile origin for the cache in the upper left.</li>
<li>Tile Size: The size of each tile in the cache. Commonly 256 x 256</li>
</ul>
<p>It's important that you set the correct values in your layer, and these
values will differ from layer to layer. You can find these values for your
layer in a metadata page in ArcGIS Server.
(ie. <a href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer">http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer</a>)</p>
<ul>
<li>Max Extent: Full Extent</li>
<li>Resolutions: Tile Info -> Levels of Detail -> Resolution</li>
<li>Tile Origin: Origin -> X,Y</li>
<li>Tile Size: Tile Info -> Height,Width</li>
</ul>
<h2> Other Examples </h2>
<p>This is one of three examples for this layer. You can also configure this
layer to use <a href="arcgiscache_direct.html">prebuilt tiles in a file store
(not a live server).</a> It is also possible to let this
<a href="arcgiscache_jsonp.html">layer 'auto-configure' itself using the
capabilities json object from the server itself when using a live ArcGIS server.</a>
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,106 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ArcGIS Server Map Cache Example (Direct Access)</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js" type="text/javascript"></script>
<script src="../lib/OpenLayers/Layer/ArcGISCache.js" type="text/javascript"></script>
<script type="text/javascript">
/* First 4 variables extracted from conf.xml file */
/* Tile layers & map MUST have same projection */
var proj='EPSG:26915';
/* Layer can also accept serverResolutions array
* to deal with situation in which layer resolution array & map resolution
* array are out of sync*/
var mapResolutions = [33.0729828126323,16.9333672000677,8.46668360003387,4.23334180001693,2.11667090000847,1.05833545000423];
/* For this example this next line is not really needed, 256x256 is default.
* However, you would need to change this if your layer had different tile sizes */
var tileSize = new OpenLayers.Size(256,256);
/* Tile Origin is required unless it is the same as the implicit map origin
* which can be affected by several variables including maxExtent for map or base layer */
var agsTileOrigin = new OpenLayers.LonLat(-5120900,9998100);
/* This can really be any valid bounds that the map would reasonably be within */
/* var mapExtent = new OpenLayers.Bounds(293449.454286,4307691.661132,314827.830376,4323381.484178); */
var mapExtent = new OpenLayers.Bounds(289310.8204,4300021.937,314710.8712,4325421.988);
var aerialsUrl = 'http://serverx.esri.com/arcgiscache/dgaerials/Layers/_alllayers';
var roadsUrl = 'http://serverx.esri.com/arcgiscache/DG_County_roads_yesA_backgroundDark/Layers/_alllayers';
var map;
function init(){
map = new OpenLayers.Map('map', {
maxExtent:mapExtent,
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.MousePosition()]
});
var baseLayer = new OpenLayers.Layer.ArcGISCache('Aerials', aerialsUrl, {
tileOrigin: agsTileOrigin,
resolutions: mapResolutions,
sphericalMercator: true,
maxExtent: mapExtent,
useArcGISServer: false,
isBaseLayer: true,
type: 'jpg',
projection: proj
});
var overlayLayer = new OpenLayers.Layer.ArcGISCache('Roads', roadsUrl, {
tileOrigin: agsTileOrigin,
resolutions: mapResolutions,
sphericalMercator: true,
maxExtent: mapExtent,
useArcGISServer: false,
isBaseLayer: false,
projection: proj
});
map.addLayers([baseLayer, overlayLayer]);
//map.zoomToExtent(new OpenLayers.Bounds(295892.34, 4308521.69, 312825.71, 4316988.37));
map.zoomToExtent(new OpenLayers.Bounds(-8341644, 4711236, -8339198, 4712459));
}
</script>
</head>
<body onload="init()">
<h1 id="title">ArcGIS Server Map Cache Example (Direct Access)</h1>
<div id="tags">
</div>
<p id="shortdesc">
Demonstrates the basic initialization of the ArcGIS Cache layer using a prebuilt configuration, and direct tile access from a file store.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>This example demonstrates using the ArcGISCache layer for
accessing ESRI's ArcGIS Server (AGS) Map Cache tiles directly
via the folder structure and HTTP. Toggle the visibility of the AGS layer to
demonstrate how the two maps are lined up correctly.</p>
<h2>Notes on this Layer</h2>
<p>It's important that you set the correct values in your layer, and these
values will differ between tile sets. You can find these values for your
layer in conf.xml at the root of your cache.
(ie. <a href="http://serverx.esri.com/arcgiscache/dgaerials/Layers/conf.xml">http://serverx.esri.com/arcgiscache/dgaerials/Layers/conf.xml</a>)</p>
<p>For fused map caches this is often http:<i>ServerName</i>/arcgiscache/<i>MapServiceName</i>/Layers <br />
For individual layer caches this is often http:<i>ServerName</i>/arcgiscache/<i>LayerName</i>/Layers </p>
<h2> Other Examples </h2>
<p>This is one of three examples for this layer. You can also configure this
layer to use <a href="arcgiscache_ags.html">prebuilt tiles from a live server.</a> It is also
possible to let this <a href="arcgiscache_jsonp.html">layer 'auto-configure' itself using the capabilities json object from the server itself when using a live ArcGIS server.</a>
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,108 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers ArcGIS Cache Example (Autoconfigure with JSONP)</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/OpenLayers/Layer/ArcGISCache.js" type="text/javascript"></script>
<!-- This is to simplify making the JSONP request for this example -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
var map,
layerURL = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer";
function init() {
var jsonp_url = layerURL + '?f=json&pretty=true&callback=?';
$.getJSON(jsonp_url, function(data) {
initMap(data);
});
}
function initMap(layerInfo){
/*
* The initialize function in this layer has the ability to automatically configure
* itself if given the JSON capabilities object from the ArcGIS map server.
* This hugely simplifies setting up a new layer, and switching basemaps when using this technique.
*
* see the 'initialize' function in ArcGISCache.js, or
* see the other two ArcGISCache.js examples for direct manual configuration options
*
*/
var baseLayer = new OpenLayers.Layer.ArcGISCache("AGSCache", layerURL, {
layerInfo: layerInfo
});
/*
* Make sure our baselayer and our map are synced up
*/
map = new OpenLayers.Map('map', {
maxExtent: baseLayer.maxExtent,
units: baseLayer.units,
resolutions: baseLayer.resolutions,
numZoomLevels: baseLayer.numZoomLevels,
tileSize: baseLayer.tileSize,
displayProjection: baseLayer.displayProjection,
StartBounds: baseLayer.initialExtent
});
map.addLayers([baseLayer]);
//overlay test layer
//http://openlayers.org/dev/examples/web-mercator.html
var wms = new OpenLayers.Layer.WMS("Highways",
"http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer",
{layers: "2", format: "image/gif", transparent: "true"},
{ isBaseLayer: false, wrapDateLine: false }
);
map.addLayers([wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition() );
//map.zoomToExtent(new OpenLayers.Bounds(-8341644, 4711236, -8339198, 4712459));
map.zoomToExtent(new OpenLayers.Bounds(-8725663.6225564, 4683718.6735907, -8099491.4868444, 4996804.7414467));
}
</script>
</head>
<body onload="init()">
<h1 id="title">OpenLayers ArcGIS Cache Example (Autoconfigure with JSONP)</h1>
<div id="tags">
arcgis, arcgiscache, cache, tms, jsonp
</div>
<p id="shortdesc">
Demonstrates the basic initialization of the ArcGIS Cache layer by using the server capabilities object.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>This example demonstrates using the ArcGISCache layer for
accessing ESRI's ArcGIS Server (AGS) Map Cache tiles normally through
a live AGS MapServer. Toggle the visibility of the overlay to
demonstrate how the two layers are lined up correctly.</p>
<h2>Notes on this Layer</h2>
<p>
This method automatically configures the layer using the capabilities object
generated by the server itself. This page shows how to construct the url for the server capabilities object,
retrieve it using JSONP (and jQuery), and pass it in during construction. Note that in this case,
the layer is constructed before the map. This approach greatly simplifies the
configuration of your map, and works best when all your tiles / overlays are similarly laid out.
If you are using a live AGS map server for your layer, it can be helpful to check your
server configuration using this technique before trying one of the other examples for this layer.
</p>
<h2> Other Examples </h2>
<p>This is one of three examples for this layer. You can also configure this
layer to use <a href="arcgiscache_direct.html">prebuilt tiles in a file store (not a live server).</a>
As well a retrieve <a href="arcgiscache_ags.html">tiles from a live server.</a>
</p>
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>ArcIMS Thematic Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -58,6 +60,7 @@
<h1 id="title">ArcIMS Thematic Example</h1>
<div id="tags">
ESRI, ArcIMS, ArcXML, style, thematic, chloropleth, representation
</div>
<p id="shortdesc">
Shows the advanced use of OpenLayers using a thematic ArcIMS layer

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>ArcIMS Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -33,6 +35,7 @@
<h1 id="title">ArcIMS Example</h1>
<div id="tags">
ESRI, ArcIMS
</div>
<p id="shortdesc">
Shows the basic use of OpenLayers using an ArcIMS layer

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Attribution Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -11,8 +13,8 @@
map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},
{'attribution': 'Provided by <a href="http://labs.metacarta.com/">MetaCarta</a>'});
"http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'},
{'attribution': 'Provided by OSGeo'});
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
@@ -34,7 +36,7 @@
<h1 id="title">Attribution Example</h1>
<div id="tags">
copyright watermark logo attribution
copyright, watermark, logo, attribution
</div>
<p id="shortdesc">
@@ -47,7 +49,7 @@
This is an example of how to add an attribution block to the OpenLayers window. In order to use an
attribution block, an attribution parameter must be set in each layer that requires attribution. In
addition, an attribution control must be added to the map, though one is added to all OpenLayers Maps by default.
Be aware that this is a layer *option*: the options hash goes in
Be aware that this is a layer <strong>option</strong>: the options hash goes in
different places depending on the layer type you are using.
</div>
</body>

View File

@@ -1,96 +0,0 @@
<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" />
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
#controls
{
width: 512px;
}
</style>
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>
<!-- Localhost key -->
<!-- <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script>-->
<script type="text/javascript" src="http://clients.multimap.com/API/maps/1.1/metacarta_04"></script>
<script src='http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1'></script>
<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
var lat = 40;
var zoom = 5;
var map, markers;
var barcelona = new OpenLayers.LonLat(2.13134765625,
41.37062534198901);
var madrid = new OpenLayers.LonLat(-3.6968994140625,
40.428314208984375);
function init(){
map = new OpenLayers.Map( 'map' );
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'} );
var google = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP });
var ve = new OpenLayers.Layer.VirtualEarth( "VE");
var yahoo = new OpenLayers.Layer.Yahoo( "Yahoo");
var mm = new OpenLayers.Layer.MultiMap( "MultiMap");
map.addLayers([wms, google, ve, yahoo, mm]);
markers = new OpenLayers.Layer.Markers("markers");
map.addLayer(markers);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
map.addControl( new OpenLayers.Control.LayerSwitcher() );
map.addControl( new OpenLayers.Control.MousePosition() );
}
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);
marker = new OpenLayers.Marker(barcelona, icon);
markers.addMarker(marker);
marker = new OpenLayers.Marker(madrid, icon.clone());
markers.addMarker(marker);
}
function remove() {
markers.removeMarker(marker);
}
</script>
</head>
<body onload="init()">
<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" class="smallmap"></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

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Vector Behavior Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -10,7 +12,7 @@
function init(){
map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0",
"OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}
);
@@ -31,6 +33,9 @@
</head>
<body onload="init()">
<h1 id="title">Vector Behavior Example (Fixed/HTTP/GML)</h1>
<div id="tags">
vector, strategy, strategies, protocoll, advanced, gml, http, fixed
</div>
<p id="shortdesc">
Vector layer with a Fixed strategy, HTTP protocol, and GML format.
</p>

37
examples/bing-tiles.html Normal file
View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Bing Tiles Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
.olControlAttribution {
left: 5px;
right: inherit;
bottom: 5px;
}
</style>
</head>
<body>
<h1 id="title">Basic Bing Tiles Example</h1>
<div id="tags">
bing tiles
</div>
<div id="shortdesc">Use Bing with direct tile access</div>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>This example shows a very simple map with Bing layers that use
direct tile access through Bing Maps REST Services.</p><p>See
<a target="_blank" href="bing-tiles.js">bing-tiles.js</a> for the
source code.</p>
</div>
<script src="../lib/OpenLayers.js"></script>
<script src="bing-tiles.js"></script>
</body>
</html>

29
examples/bing-tiles.js Normal file
View File

@@ -0,0 +1,29 @@
// API key for http://openlayers.org. Please get your own at
// http://bingmapsportal.com/ and use that instead.
var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
var map = new OpenLayers.Map( 'map');
var road = new OpenLayers.Layer.Bing({
key: apiKey,
type: "Road",
// custom metadata parameter to request the new map style - only useful
// before May 1st, 2011
metadataParams: {mapVersion: "v1"}
});
var aerial = new OpenLayers.Layer.Bing({
key: apiKey,
type: "Aerial"
});
var hybrid = new OpenLayers.Layer.Bing({
key: apiKey,
type: "AerialWithLabels",
name: "Bing Aerial With Labels"
});
map.addLayers([road, aerial, hybrid]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
), 12);

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Bing Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -12,7 +14,14 @@
var map;
function init(){
// setting restrictedExtent so that we can use the
// VirtualEarth-layers, see e.g.
// http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/VirtualEarth-js.html
var restrictedExtent = new OpenLayers.Bounds(-180, -90,
180, 90);
map = new OpenLayers.Map("map");
map.addControl(new OpenLayers.Control.LayerSwitcher());
var shaded = new OpenLayers.Layer.VirtualEarth("Shaded", {
@@ -35,7 +44,9 @@
<body onload="init()">
<h1 id="title">Bing Example</h1>
<div id="tags"></div>
<div id="tags">
Bing, Microsoft, Virtual Earth
</div>
<p id="shortdesc">
Demonstrates the use of Bing layers.

View File

@@ -1,6 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Boxes Example</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Boxes Vector Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
@@ -16,7 +18,7 @@
map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
var boxes = new OpenLayers.Layer.Vector( "Boxes" );
@@ -38,9 +40,10 @@
</script>
</head>
<body onload="init()">
<h1 id="title">Boxes Example</h1>
<h1 id="title">Boxes Example Vector</h1>
<div id="tags">
box, vector, annotation
</div>
<p id="shortdesc">

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Boxes Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -16,7 +18,7 @@
map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
var boxes = new OpenLayers.Layer.Boxes( "Boxes" );
@@ -40,6 +42,7 @@
<h1 id="title">Boxes Example</h1>
<div id="tags">
box, annotation
</div>
<p id="shortdesc">

View File

@@ -1,89 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
// making this a global variable so that it is accessible for
// debugging/inspecting in Firebug
var map = null;
function init(){
//set title name to include Browser Detection
// this is the only way to test the functionality
// of the getBrowserName() function
//
var header = OpenLayers.Util.getElement("browserHeader");
header.innerHTML = "(browser: ";
var browserCode = OpenLayers.Util.getBrowserName();
switch (browserCode) {
case "opera":
browserName = "Opera";
break;
case "msie":
browserName = "Internet Explorer";
break;
case "safari":
browserName = "Safari";
break;
case "firefox":
browserName = "FireFox";
break;
case "mozilla":
browserName = "Mozilla";
break;
default:
browserName = "detection error"
break;
}
header.innerHTML += browserName + ")";
map = new OpenLayers.Map('map');
var options = {
resolutions: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101]
};
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},
options);
var options2 = {
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://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",
{layers: "bathymetry,land_fn,park,drain_fn,drainage," +
"prov_bound,fedlimit,rail,road,popplace",
transparent: "true", format: "image/png"},
{minResolution: 0.17578125,
maxResolution: 0.703125});
map.addLayers([ol_wms, jpl_wms, dm_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h1 id="title" style="display:inline;">Example Showing Browser Name</h1>
<h3 id="browserHeader" style="display:inline;"></h3>
<div id="tags"></div>
<p id="shortdesc">
Demonstrate a simple map that shows the browser name.
</p>
<div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
</html>

151
examples/browser.html Normal file
View File

@@ -0,0 +1,151 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>OpenLayers Browser Detection</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<script type="text/javascript" src="browser.js"></script>
<style type="text/css">
.olControlAttribution {
bottom: 5px;
}
.tester {
margin: 3px;
}
</style>
<script type="text/javascript">
function init() {
var result = document.getElementById('result');
result.innerHTML = result.innerHTML + "Browser CodeName: " + navigator.appCodeName + '<br>';
result.innerHTML = result.innerHTML + "Browser Name: " + navigator.appName + '<br>';
result.innerHTML = result.innerHTML + "Browser Version: " + navigator.appVersion + '<br>';
result.innerHTML = result.innerHTML + "Cookies Enabled: " + navigator.cookieEnabled + '<br>';
result.innerHTML = result.innerHTML + "Platform: " + navigator.platform + '<br>';
result.innerHTML = result.innerHTML + 'User agent: ' + navigator.userAgent + '<br>';
divResult('mouse', 'click', null, result);
divResult('mouse', 'dblclick', null, result);
divResult('mouse', 'mousedown', null, result);
divResult('mouse', 'mouseup', null, result);
divResult('mouse', 'mouseover', null, result);
divResult('mouse', 'mousemove', null, result);
divResult('mouse', 'mouseout', null, result);
divResult('key', 'keypress', null, result);
divResult('key', 'keydown', null, result);
divResult('key', 'keyup', null, result);
divResult('HTML', 'load', null, result);
divResult('HTML', 'unload', window, result);
divResult('HTML', 'abort', null, result);
divResult('HTML', 'error', null, result);
divResult('view', 'resize', window, result);
divResult('view', 'scroll', null, result);
divResult('form', 'submit', null, result);
divResult('form', 'reset', null, result);
divResult('form control', 'select', null, result);
divResult('form control', 'change', null, result);
divResult('activation', 'focus', null, result);
divResult('activation', 'blur', null, result);
divResult('touch', 'touchstart', null, result);
divResult('touch', 'touchend', null, result);
divResult('touch', 'touchmove', null, result);
divResult('touch', 'touchcancel', null, result);
divResult('gesture', 'gesturestart', null, result);
divResult('gesture', 'gesturechange', null, result);
divResult('gesture', 'gestureend', null, result);
divResult('HTML5', 'hashchange', document.body, result);
divResult('HTML5', 'online', document.body, result);
divResult('HTML5', 'offline', document.body, result);
divResult('HTML5', 'message', window, result);
divResult('HTML5', 'undo', document.body, result);
divResult('HTML5', 'redo', document.body, result);
divResult('HTML5', 'storage', window, result);
divResult('HTML5', 'popstate', window, result);
divResult('HTML5', 'canplay', document.createElement('video'), result);
divResult('HTML5', 'seeking', document.createElement('video'), result);
divResult('HTML5', 'seekend', document.createElement('video'), result);
divResult('orientation', 'deviceorientation', window, result);
divResult('orientation', 'mozorientation', window, result);
divResult('orientation', 'devicemotion', window, result);
}
</script>
</head>
<body onload="init()">
<h1 id="title">Browser detection</h1>
<div id="tags">
browser, vendor, mobile, events, HTML5, gesture, touch
</div>
<p id="shortdesc">
The goal of this script is to inform about the capacity of the browser used by the user.
</p>
<div id="docs">
<p>
See the <a href="browser.js" target="_blank">
browser.js source</a> to see how this is done.
</p>
</div>
<h1>Your browser information</h1>
<div id="result">
</div>
<h1>Click or touch the red square to get information about the selected events</h1>
<div>
<div class="tester">
<INPUT TYPE=CHECKBOX ID="clickID" checked>click<BR>
<INPUT TYPE=CHECKBOX ID="dblclickID">dblclick<BR>
<INPUT TYPE=CHECKBOX ID="mousedownID">mousedown<BR>
<INPUT TYPE=CHECKBOX ID="mouseupID">mouseup<BR>
<INPUT TYPE=CHECKBOX ID="mouseoverID">mouseover<BR>
<INPUT TYPE=CHECKBOX ID="mousemoveID">mousemove<BR>
<INPUT TYPE=CHECKBOX ID="mouseoutID">mouseout<BR>
<INPUT TYPE=CHECKBOX ID="touchstartID">touchstart<BR>
<INPUT TYPE=CHECKBOX ID="touchendID">touchend<BR>
<INPUT TYPE=CHECKBOX ID="touchmoveID">touchmove<BR>
<INPUT TYPE=CHECKBOX ID="touchcancelID">touchcancel<BR>
<INPUT TYPE=CHECKBOX ID="gesturestartID">gesturestart<BR>
<INPUT TYPE=CHECKBOX ID="gesturechangeID">gesturechange<BR>
<INPUT TYPE=CHECKBOX ID="gestureendID">gestureend<BR>
</div>
<div style="height: 200px;width: 200px;" class="tester">
<div id="box" style="height: 200px; width: 200px; background: none repeat scroll 0% 0% red; "
onclick="click(event)"
ondblclick="dblclick(event)"
onmousedown="mousedown(event)"
onmouseup="mouseup(event)"
onmouseover="mouseover(event)"
onmousemove="mousemove(event)"
onmouseout="mouseout(event)"
ontouchstart="touchstart(event)"
ontouchend="touchend(event)"
ontouchmove="touchmove(event)"
ontouchcancel="touchcancel(event)"
ongesturestart="gesturestart(event)"
ongesturechange="gesturechange(event)"
ongestureend="gestureend(event)">
</div>
</div>
<div id="log" class="tester"></div>
</div>
</body>
</html>

241
examples/browser.js Normal file
View File

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

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Buffer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -13,15 +15,15 @@
function init(){
map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "0 buffer: OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {'buffer':0} );
map.addLayer(layer);
layer = new OpenLayers.Layer.WMS( "1 buffer: OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {'buffer':1} );
map.addLayer(layer);
layer = new OpenLayers.Layer.WMS( "4 buffer: OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {'buffer':4} );
map.addLayer(layer);
map.addControl(new OpenLayers.Control.LayerSwitcher())
@@ -33,6 +35,7 @@
<h1 id="title">Buffer Example</h1>
<div id="tags">
buffer, performance, tile
</div>
<p id="shortdesc">

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Canvas Hit Detection Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../lib/OpenLayers.js"></script>
</head>
<body>
<h1 id="title">Feature Hit Detection with Canvas</h1>
<p id="shortdesc">
Demonstrates detection of feature hits with the canvas renderer.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
Click on the features above to see them selected. This example
uses the Canvas renderer so it only works on browsers where
canvas is supported.
</p>
<p>
View the <a href="canvas-hit-detection.js" target="_blank">canvas-hit-detection.js</a>
source to see how this is done.
</p>
</div>
<script src="canvas-hit-detection.js"></script>
</body>
</html>

View File

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

View File

@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Canvas Inspector</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../lib/OpenLayers.js"></script>
<script src="Jugl.js"></script>
<style>
#template {
display: none;
}
#inspector table {
border-right: 1px solid #666;
border-bottom: 1px solid #666;
}
#inspector table td {
font-size: 9px;
text-align: center;
width: 60px;
height: 60px;
border-top: 1px solid #666;
border-left: 1px solid #666;
}
</style>
</head>
<body>
<h1 id="title">Canvas Inspector</h1>
<p id="shortdesc">
Displays pixel values for canvas context.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
View the <a href="canvas-inspector.js" target="_blank">canvas-inspector.js</a>
source to see how this is done.
</p>
</div>
<div id="inspector">
</div>
<table id="template">
<tr jugl:repeat="row new Array(rows)">
<td jugl:repeat="col new Array(cols)"
jugl:attributes="id 'c' + repeat.col.index + 'r' + repeat.row.index">
&nbsp;
</td>
</tr>
</table>
<script src="canvas-inspector.js"></script>
</body>
</html>

View File

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

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Canvas Renderer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -9,6 +11,9 @@
</head>
<body onload="init()">
<h1 id="title">Canvas Renderer Example</h1>
<div id="tags">
canvas, renderer, advanced,
</div>
<p id="shortdesc">
Demonstrates the use of the canvas renderer with a vector layer.
</p>

View File

@@ -43,9 +43,9 @@ function init() {
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:900913",
url: "http://demo.opengeo.org/geoserver/wfs",
url: "http://v2.suite.opengeo.org/geoserver/wfs",
featureType: "states",
featureNS: "http://www.openplans.org/topp"
featureNS: "http://usa.opengeo.org"
}),
styleMap: styleMap,
renderers: ["Canvas", "SVG", "VML"]

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Click Handler Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -16,7 +18,7 @@
#east {
position: absolute;
left: 370px;
top: 3em;
top: 4em;
}
table td {
@@ -81,7 +83,7 @@
map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}
);
map.addLayers([layer]);
@@ -156,6 +158,7 @@
<div id="west">
<div id="tags">
event, events, propagation, advanced
</div>
<p id="shortdesc">

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Click Event Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -41,7 +43,7 @@
map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
@@ -65,17 +67,23 @@
<h1 id="title">Click Event Example</h1>
<div id="tags">
click control, double, doubleclick, double-click, event, events,
propagation
</div>
<p id="shortdesc">
This example shows the use of the click handler and getLonLatFromViewPortPx functions to trigger events on mouse click.
This example shows the use of the click handler and
getLonLatFromViewPortPx functions to trigger events on mouse click.
</p>
<div id="map" class="smallmap"></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.
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,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Map Controls Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -24,24 +26,32 @@
});
var ol_wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}
);
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://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"});
var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
var gwc = new OpenLayers.Layer.WMS(
"Global Imagery",
"http://maps.opengeo.org/geowebcache/service/wms",
{layers: "bluemarble"},
{tileOrigin: new OpenLayers.LonLat(-180, -90)}
);
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," +
"prov_bound,fedlimit,rail,road,popplace",
transparent: "true", format: "image/png" });
transparent: "true", format: "image/png"},
{visibility: false}
);
jpl_wms.setVisibility(false);
dm_wms.setVisibility(false);
map.addLayers([ol_wms, gwc, dm_wms]);
map.addLayers([ol_wms, jpl_wms, dm_wms]);
if (!map.getCenter()) map.zoomToMaxExtent();
if (!map.getCenter()) {
map.zoomToMaxExtent();
}
}
</script>
</head>
@@ -49,14 +59,15 @@
<h1 id="title">Map Controls Example</h1>
<div id="tags">
control, basic
</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" class="smallmap"></div>
<a href="#" id="permalink">Permalink</a>
<div id="docs"></div>
</body>

53
examples/cql-format.html Normal file
View File

@@ -0,0 +1,53 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>
OpenLayers CQL Example
</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<style>
#cql {
width: 400px;
}
#output {
padding-top: 1em;
width: 512px;
height: 60px;
border: none;
color: #ff3333;
}
</style>
<script src="../lib/OpenLayers.js"></script>
</head>
<body>
<h1 id="title">CQL Filter Example</h1>
<div id="tags">
CQL, filter
</div>
<p id="shortdesc">
Demonstrate use the CQL filter.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
Enter text for a CQL filter to update the features displayed.
<br>
<form name="cql_form" id="cql_form">
<label for="cql">CQL</label>
<input id="cql" type="text" value="STATE_ABBR >= 'B' AND STATE_ABBR <= 'O'">
<input type="submit" value="update">
<input type="reset" value="reset">
</form>
<textarea id="output"></textarea>
</p><p>
View the <a href="cql-format.js" target="_blank">cql-format.js source</a>
to see how this is done.
</p>
</div>
<script src="cql-format.js"></script>
<script src="http://demo.opengeo.org/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typename=topp:states&amp;outputFormat=json&amp;format_options=callback:loadFeatures" type="text/javascript"></script>
</body>
</html>

61
examples/cql-format.js Normal file
View File

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

View File

@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Script Protocol Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<script src="../lib/OpenLayers.js"></script>
</head>
<body>
<h1 id="title">Script Protocol</h1>
<div id="tags">
protocol, script, cross origin, advanced
</div>
<p id="shortdesc">
Demonstrates the use of a script protocol for making feature requests
cross origin.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
In cases where a service returns serialized features and accepts
a named callback (e.g. http://example.com/features.json?callback=foo),
the script protocol can be used to read features without being
restricted by the same origin policy.
</p>
<p>
View the <a href="cross-origin.js" target="_blank">cross-origin.js</a>
source to see how this is done
</p>
</div>
<script src="cross-origin.js"></script>
</body>
</html>

39
examples/cross-origin.js Normal file
View File

@@ -0,0 +1,39 @@
var map = new OpenLayers.Map({
div: "map",
layers: [
new OpenLayers.Layer.WMS(
"World Map",
"http://maps.opengeo.org/geowebcache/service/wms",
{layers: "bluemarble"}
),
new OpenLayers.Layer.Vector("States", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.Script({
url: "http://suite.opengeo.org/geoserver/wfs",
callbackKey: "format_options",
callbackPrefix: "callback:",
params: {
service: "WFS",
version: "1.1.0",
srsName: "EPSG:4326",
request: "GetFeature",
typeName: "world:cities",
outputFormat: "json"
},
filterToParams: function(filter, params) {
// example to demonstrate BBOX serialization
if (filter.type === OpenLayers.Filter.Spatial.BBOX) {
params.bbox = filter.value.toArray();
if (filter.projection) {
params.bbox.push(filter.projection.getCode());
}
}
return params;
}
})
})
],
center: new OpenLayers.LonLat(0, 0),
zoom: 1
});

View File

@@ -1,56 +0,0 @@
<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" />
<link rel="stylesheet" href="style.css" type="text/css" />
<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'} );
var control = new OpenLayers.Control();
OpenLayers.Util.extend(control, {
draw: function () {
// this Handler.Point will intercept the shift-mousedown
// before Control.MouseDefault gets to see it
this.point = new OpenLayers.Handler.Point( control,
{"done": this.notice},
{keyMask: OpenLayers.Handler.MOD_SHIFT});
this.point.activate();
},
notice: function (bounds) {
document.getElementById('bounds').innerHTML = bounds;
}
});
map.addLayer(layer);
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" class="smallmap"></div>
<div id="bounds"></div>
<div id="docs"></div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Custom Control Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -13,7 +15,7 @@
function init(){
map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
var control = new OpenLayers.Control();
OpenLayers.Util.extend(control, {
@@ -46,14 +48,19 @@
<h1 id="title">Custom Control Example</h1>
<div id="tags">
control, panel, rectangle
</div>
<p id="shortdesc">
Demonstrate the addition of a draggable rectangle to the OpenLayers window.
Demonstrate the addition of a rectangle to the OpenLayers window.
</p>
<div id="map" class="smallmap"></div>
<div id="docs"></div>
<div id="docs">
The control allows you to draw a rectangle, that reports its coordinates
after creation. Hold down the shift key on your keyboard and draw a
rectangle with the mouse.
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Custom Style Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -10,7 +12,7 @@
}
div.olControlMousePosition {
font-family: Verdana;
font-size: 0.5em;
font-size: 2em;
color: red;
}
</style>
@@ -25,7 +27,7 @@
var options = {theme: null};
map = new OpenLayers.Map('map', options);
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addControl(new OpenLayers.Control.MousePosition());
map.addLayer(layer);
@@ -37,6 +39,7 @@
<h1 id="title">Custom Style Example</h1>
<div id="tags">
styling, css, stylesheet, theming, theme
</div>
<p id="shortdesc">

View File

@@ -2,6 +2,8 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Debug Example</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/Firebug/firebug.js"></script>
@@ -27,7 +29,9 @@
<body>
<h1 id="title">Debug Example</h1>
<div id="tags"></div>
<div id="tags">
debugging, error, fix, fixing, console, firebug, developers, advanced
</div>
<p id="shortdesc">
Demonstrate console calls to a Firebug console. Requires Firefox. Mostly for developers.

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Document Drag Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -14,7 +16,7 @@
new OpenLayers.Control.Attribution()
]} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} );
map.addLayer(layer);
map.zoomToMaxExtent();
@@ -24,7 +26,9 @@
<body onload="init()">
<h1 id="title">OpenLayers Document Drag Example</h1>
<div id="tags"></div>
<div id="tags">
drag
</div>
<div id="shortdesc">Keep on dragging even when the mouse cursor moves outside of the map</div>

61
examples/donut.html Normal file
View File

@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Polygon Hole Digitizing</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<style>
#controlToggle li {
list-style: none;
}
.olControlAttribution {
font-size: 9px;
bottom: 2px;
}
#output {
margin: 1em;
font-size: 0.9em;
}
</style>
</head>
<body>
<h1 id="title">Drawing Holes in Polygons</h1>
<div id="tags">
draw polygon hole
</div>
<p id="shortdesc">
The DrawFeature control can be used to digitize donut polygons.
</p>
<div id="map" class="smallmap"></div>
<ul id="controlToggle">
<li>
<input type="radio" name="type" value="none" id="noneToggle"
onclick="toggleControl(this);" checked="checked">
<label for="noneToggle">navigate</label>
</li>
<li>
<input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);">
<label for="polygonToggle">draw polygon</label>
</li>
</ul>
<div id="output"></div>
<div id="docs">
<p>
To digitize holes in polygons, hold down the <code>Alt</code>
key and draw over an existing polygon. By default, the
<code>Shift</code> key triggers freehand drawing. Use a
combination of the <code>Shift</code> and <code>Alt</code> keys
to digitize holes in freehand mode.
</p>
<p>
See the <a href="donut.js" target="_blank">
donut.js source</a> for details on how this is done.
</p>
</div>
<script src="../lib/OpenLayers.js"></script>
<script src="donut.js"></script>
</body>
</html>

44
examples/donut.js Normal file
View File

@@ -0,0 +1,44 @@
// allow testing of specific renderers via "?renderer=Canvas", etc
var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
var map = new OpenLayers.Map({
div: "map",
layers: [
new OpenLayers.Layer.OSM(),
new OpenLayers.Layer.Vector("Vector Layer", {
renderers: renderer
})
],
center: new OpenLayers.LonLat(0, 0),
zoom: 1
});
var draw = new OpenLayers.Control.DrawFeature(
map.layers[1],
OpenLayers.Handler.Polygon,
{handlerOptions: {holeModifier: "altKey"}}
);
map.addControl(draw);
// optionally listen for sketch events on the layer
var output = document.getElementById("output");
function updateOutput(event) {
window.setTimeout(function() {
output.innerHTML = event.type + " " + event.feature.id;
}, 100);
}
map.layers[1].events.on({
sketchmodified: updateOutput,
sketchcomplete: updateOutput
})
// add behavior to UI elements
function toggleControl(element) {
if (element.value === "polygon" && element.checked) {
draw.activate();
} else {
draw.deactivate();
}
}
document.getElementById("noneToggle").checked = true;

View File

@@ -1,5 +1,7 @@
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Double Set Center Example</title>
<script src="../lib/OpenLayers.js"></script>
@@ -9,7 +11,9 @@
<body>
<h1 id="title">Double Set Center Example</h1>
<div id="tags"></div>
<div id="tags">
center, centering, cleanup
</div>
<p id="shortdesc">
Demonstrate the behavior of two calls to set the center after instatiating the layer object.
@@ -20,7 +24,7 @@
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(wms);
map.setCenter(new OpenLayers.LonLat(100,10));
map.setCenter(new OpenLayers.LonLat(1,1));

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Drag Feature Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -21,9 +23,15 @@
function init(){
map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
"http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
vectors = new OpenLayers.Layer.Vector("Vector Layer");
// allow testing of specific renderers via "?renderer=Canvas", etc
var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
vectors = new OpenLayers.Layer.Vector("Vector Layer", {
renderers: renderer
});
map.addLayers([wms, vectors]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
@@ -62,7 +70,9 @@
<body onload="init()">
<h1 id="title">Drag Feature Example</h1>
<div id="tags"></div>
<div id="tags">
point, line, linestring, polygon, digitizing, geometry, draw, drag
</div>
<p id="shortdesc">
Demonstrates point, line and polygon creation and editing.

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Draw Feature Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -24,7 +26,7 @@
map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
"http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
var lineLayer = new OpenLayers.Layer.Vector("Line Layer");
@@ -62,12 +64,22 @@
}
}
}
function allowPan(element) {
var stop = !element.checked;
for(var key in drawControls) {
drawControls[key].handler.stopDown = stop;
drawControls[key].handler.stopUp = stop;
}
}
</script>
</head>
<body onload="init()">
<h1 id="title">OpenLayers Draw Feature Example</h1>
<div id="tags"></div>
<div id="tags">
point, line, linestring, polygon, digitizing, geometry, draw, drag
</div>
<p id="shortdesc">
Demonstrate on-screen digitizing tools for point, line, and polygon creation.
@@ -93,15 +105,20 @@
<input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" />
<label for="polygonToggle">draw polygon</label>
</li>
<li>
<input type="checkbox" name="allow-pan" value="allow-pan" id="allowPanCheckbox" checked=true onclick="allowPan(this);" />
<label for="allowPanCheckbox">allow pan while drawing</label>
</li>
</ul>
<div id="docs">
<p>With the point drawing control active, click on the map to add a point. You can drag the point
before letting the mouse up if you want to adjust the position.</p>
<p>With the point drawing control active, click on the map to add a point.</p>
<p>With the line drawing control active, click on the map to add the points that make up your line.
Double-click to finish drawing.</p>
<p>With the polygon drawing control active, click on the map to add the points that make up your
polygon. Double-click to finish drawing.</p>
<p>With any drawing control active, paning the map can still be achieved. Drag the map as
usual for that.</p>
<p>Hold down the shift key while drawing to activate freehand mode. While drawing lines or polygons
in freehand mode, hold the mouse down and a point will be added with every mouse movement.<p>
</div>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Vector Behavior Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -10,7 +12,7 @@
function init(){
map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0",
"OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}
);
@@ -39,7 +41,13 @@
// Needed only for interaction, not for the display.
function onPopupClose(evt) {
// 'this' is the popup.
selectControl.unselect(this.feature);
var feature = this.feature;
if (feature.layer) { // The feature is not destroyed
selectControl.unselect(feature);
} else { // After "moveend" or "refresh" events on POIs layer all
// features have been destroyed by the Strategy.BBOX
this.destroy();
}
}
function onFeatureSelect(evt) {
feature = evt.feature;
@@ -51,7 +59,7 @@
null, true, onPopupClose);
feature.popup = popup;
popup.feature = feature;
map.addPopup(popup);
map.addPopup(popup, true);
}
function onFeatureUnselect(evt) {
feature = evt.feature;
@@ -66,6 +74,9 @@
</head>
<body onload="init()">
<h1 id="title">Dynamic POIs via a Text Layer</h1>
<div id="tags">
poi, dynamic data, text, format, strategy, popup, select, selection
</div>
<p id="shortdesc">
Loading dynamic data from a text file.
</p>

View File

@@ -1,15 +1,15 @@
<!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>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers: Custom Editing Toolbar</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
.olControlEditingToolbar {
float:left;
right: 0px;
height: 30px;
width: 150px;
width: 116px;
}
</style>
<script src="../lib/Firebug/firebug.js"></script>
@@ -24,7 +24,7 @@
map = new OpenLayers.Map('map', {theme: null});
layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: "basic"}
);
map.addLayer(layer);
@@ -43,6 +43,9 @@
</head>
<body onload="init()">
<h1 id="title">OpenLayers EditingToolbar Outside Viewport</h1>
<div id="tags">
digitizing, point, line, linestring, polygon, editing, positioning, style
</div>
<p id="shortdesc">
Display an editing toolbar panel outside the map viewport.
</p>

View File

@@ -1,9 +1,14 @@
<!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>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Editing Toolbar Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<!--[if lte IE 6]>
<link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
<![endif]-->
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/Firebug/debug.js"></script>
@@ -15,7 +20,7 @@
function init(){
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
vlayer = new OpenLayers.Layer.Vector( "Editable" );
map = new OpenLayers.Map( 'map', {
@@ -33,7 +38,9 @@
<body onload="init()">
<h1 id="title">Editing Toolbar Example</h1>
<div id="tags"></div>
<div id="tags">
digitizing, point, line, linestring, polygon, editing
</div>
<p id="shortdesc">
Demonstrate polygon, polyline and point creation and editing tools.

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Event Handling</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
@@ -18,7 +20,7 @@
#output {
position: absolute;
left: 550px;
top: 40px;
top: 4em;
width: 350px;
height: 400px;
}
@@ -106,7 +108,7 @@
var vmap = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}
);
var landsat = new OpenLayers.Layer.WMS(
@@ -136,6 +138,7 @@
<h1 id="title">Event Handling</h1>
<div id="tags">
event, events, handler, listener, cleanup
</div>
<p id="shortdesc">

View File

@@ -1,6 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- This is the example list source: if you are trying to look at the
source of an example, YOU ARE IN THE WRONG PLACE. If you want to view
the source of just one example, you can typically choose
@@ -12,14 +14,24 @@
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
html, body {
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
line-height: 1.25em;
}
#logo {
text-shadow: 2px 2px 3px gray;
color: white;
vertical-align: middle;
position: absolute;
top: 5px;
left: 5px;
font-size: 34px;
font-family: "Trebuchet MS",Helvetica,Arial,sans-serif;
}
#logo img {
vertical-align: middle;
}
.ex_container{
border-bottom: 1px solid #cccccc;
}
.ex_container a {
text-decoration: none;
@@ -34,6 +46,12 @@
font-weight: bold;
color: #333;
}
.ex_tags{
display: inline;
font-size: smaller;
font-style: italic;
color: #333;
}
.ex_filename {
font-weight: normal;
font-size: 0.8em;
@@ -49,20 +67,18 @@
display: none;
}
#toc {
width: 30%;
width: 100%;
height: 100%;
}
#filter {
position: fixed;
text-align: center;
top: 0px;
height: 50px;
padding: 10px 1em 10px 1em;
background: #9D9FA1;
width: 100%;
padding: 1.3em 0;
}
#examples {
border-top: 1px solid #cccccc;
position: absolute;
width: 30%;
top: 70px;
bottom: 0px;
overflow: auto;
list-style: none;
margin: 0;
@@ -72,11 +88,20 @@
list-style: none;
margin: 0;
padding: 0;
margin-top: 4em;
}
#examples ul li {
display: block;
margin: 0;
display: inline;
float: left;
width: 350px;
margin: 10px 0 0 10px;
padding: 0;
border: 1px solid #ddd;
border-radius: 3px;
}
#examples .mainlink {
height: 8em;
overflow: auto;
}
#exwin {
position: absolute;
@@ -88,12 +113,30 @@
border-left: 1px solid #cccccc;
margin: 0;
}
@media only screen and (max-width: 600px) {
#examples ul {
margin-top: 100px;
}
#filter {
padding-top: 50px;
}
#examples ul li {
margin-left: 0;
border-radius: 0;
border-width: 1px 0;
width: 100%;
}
#examples .mainlink {
height: auto;
}
#examples .ex_tags, #examples .ex_filename {
display: none;
}
}
</style>
<script type="text/javascript" src="Jugl.js"></script>
<script type="text/javascript" src="example-list.js"></script>
<script type="text/javascript">
// import
var Jugl = window["http://jugl.tschaub.net/trunk/lib/Jugl.js"];
var template, target;
function listExamples(examples) {
@@ -127,7 +170,7 @@
for(var i=0; i<words.length; ++i) {
var word = words[i].toLowerCase()
var dict = info.index[word];
if(dict) {
var updateScores = function() {
for(exIndex in dict) {
var count = dict[exIndex];
if(scores[exIndex]) {
@@ -142,6 +185,18 @@
}
}
}
if(dict) {
updateScores();
} else {
var r;
for (idx in info.index) {
r = new RegExp(word);
if (r.test(idx)) {
dict = info.index[idx];
updateScores();
}
}
}
}
examples = [];
for(var j in scores) {
@@ -195,10 +250,10 @@
}
}
window.onload = function() {
template = new Jugl.Template("template");
//document.getElementById('keywords').focus();
template = new jugl.Template("template");
target = document.getElementById("examples");
listExamples(info.examples);
document.getElementById("exwin").src = "../examples/example.html";
document.getElementById("keywords").onkeyup = inputChange
parseQuery();
};
@@ -207,20 +262,24 @@
<body>
<div id="toc">
<div id="filter">
<div id="logo">
<img src="http://www.openlayers.org/images/OpenLayers.trac.png"
/>
OpenLayers
</div>
<p>
<label for="keywords">Filter by keywords</label><br />
<input type="text" id="keywords" />
<span id="count"></span><br />
<input autofocus placeholder="filter by keywords..." type="text" id="keywords" />
<span id="count"></span>
<a href="javascript:void showAll();">show all</a>
</p>
</div>
<div id="examples"></div>
</div>
<iframe id="exwin" name="exwin" frameborder="0"></iframe>
<div style="display: none;">
<ul id="template">
<li class="ex_container" jugl:repeat="example examples">
<a jugl:attributes="href example.link" target="exwin">
<a jugl:attributes="href example.link" class="mainlink"
target="_blank">
<h5 class="ex_title">
<span jugl:replace="example.title">title</span><br />
<span class="ex_filename" jugl:content="'(' + example.example + ')'">filename</span>
@@ -231,6 +290,9 @@
<p class="ex_classes" jugl:content="example.classes">
Related Classes go here
</p>
<div class="ex_tags" jugl:content="'...tagged with ' + example.tags">
</div>
</a>
</li>
</ul>

View File

@@ -1,55 +1,24 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
// making this a global variable so that it is accessible for
// debugging/inspecting in Firebug
var map = null;
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 jpl_wms = new OpenLayers.Layer.WMS(
"NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
{layers: "landsat7"}
);
var dm_wms = new OpenLayers.Layer.WMS(
"Canadian Data",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
{
layers: "bathymetry,land_fn,park,drain_fn,drainage," +
"prov_bound,fedlimit,rail,road,popplace",
transparent: "true",
format: "image/png"
},
{isBaseLayer: false, visibility: false}
);
map.addLayers([ol_wms, jpl_wms, dm_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}
</script>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body onload="init()">
<body>
<h1 id="title">OpenLayers Example</h1>
<div id="tags"></div>
<div id="tags">simple, basic</div>
<p id="shortdesc">
Demonstrate a simple map with an overlay that includes layer switching controls.
</p>
<div id="map" class="smallmap"></div>
<div id="docs"></div>
<div id="docs">
<p>This is a basic example demonstrating the use of a map with two layers and a few controls.</p>
<p>View the <a href="example.js" target="_blank">example.js</a> source to see how this is done.</p>
</div>
<script src="../lib/OpenLayers.js"></script>
<script src="example.js"></script>
</body>
</html>

23
examples/example.js Normal file
View File

@@ -0,0 +1,23 @@
var map = new OpenLayers.Map("map");
var ol_wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: "basic"}
);
var dm_wms = new OpenLayers.Layer.WMS(
"Canadian Data",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
{
layers: "bathymetry,land_fn,park,drain_fn,drainage," +
"prov_bound,fedlimit,rail,road,popplace",
transparent: "true",
format: "image/png"
},
{isBaseLayer: false, visibility: false}
);
map.addLayers([ol_wms, dm_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();

View File

@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Filter Strategy Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../lib/OpenLayers.js"></script>
<script>OpenLayers.ImgPath = "../img/";</script>
<style>
.olControlAttribution {
font-size: 9px;
bottom: 2px;
}
</style>
</head>
<body>
<h1 id="title">Filter Strategy</h1>
<div id="tags">
filter, strategy, strategies, kml, advanced
</div>
<p id="shortdesc">
Demonstrates the filter strategy for limiting features passed to the layer.
</p>
<div id="map" class="smallmap"></div>
<label for="span">time span (seconds)</label>
<select id="span" name="span">
<option value="15">15</option>
<option value="30">30</option>
<option value="60" selected>60</option>
<option value="120">120</option>
<option value="240">240</option>
</select>
<input type="button" id="start" value="start">
<input type="button" id="stop" value="stop"><br><br>
<div id="docs">
<p>
This example uses a filter strategy to limit the features that are passed
to a layer. Features bound for this layer have a <code>when</code> attribute
with date values. A filter strategy is constructed with a between filter
that limits the span of dates shown. A simple animation cycles through
the domain of the <code>when</code> values, calling <code>setFilter</code>
on the strategy with an updated filter.
</p><p>
View the <a href="filter-strategy.js" target="_blank">filter-strategy.js</a>
source to see how this is done
</p>
</div>
<script src="filter-strategy.js"></script>
</body>
</html>

View File

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

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<style>
@@ -63,6 +65,10 @@
</head>
<body>
<h1 id="title">Filter Encoding</h1>
<div id="tags">
filter, format, comparison, filter encoding, fe, logical, attribute,
attributive, spatial, advanced
</div>
<p id="shortdesc">
Using the filter format write out filter objects.
</p>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
@@ -13,7 +15,7 @@
numZoomLevels: 10 });
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}
);
map.addLayers([wms]);
@@ -40,6 +42,7 @@
<h1 id="title">Fractional Zoom Example</h1>
<div id="tags">
zoomlevel, unlimited zoom, scale
</div>
<p id="shortdesc">
Shows the use of a map with fractional (or non-discrete) zoom levels.

View File

@@ -1,13 +1,14 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Full Screen Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
body {
html, body, #map {
margin: 0;
}
#map {
width: 100%;
height: 100%;
}
@@ -17,33 +18,13 @@
bottom: 1em;
left: 1em;
width: 512px;
z-index: 20000;
background-color: white;
padding: 0 0.5em 0.5em 0.5em;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
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 jpl_wms = new OpenLayers.Layer.WMS( "NASA 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," +
"prov_bound,fedlimit,rail,road,popplace",
transparent: "true", format: "image/png" });
map.addLayers([ol_wms, jpl_wms, dm_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.zoomToMaxExtent();
}
</script>
<script src="fullScreen.js"></script>
</head>
<body onload="init()">
<div id="map"></div>
@@ -51,15 +32,20 @@
<div id="text">
<h1 id="title">Full Screen Example</h1>
<div id="tags"></div>
<div id="tags">
css, style, fullscreen, window, margin, padding, scrollbar
</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!
<p>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!</p>
<p>See the
<a href="fullScreen.js" target="_blank">fullScreen.js source</a>
to see how this is done.</p>
</div>
</div>
</body>

15
examples/fullScreen.js Normal file
View File

@@ -0,0 +1,15 @@
var map;
function init(){
map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} );
var ol_wms_nobuffer = new OpenLayers.Layer.WMS( "OpenLayers WMS (no tile buffer)",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {buffer: 0});
map.addLayers([ol_wms, ol_wms_nobuffer]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(0, 0), 6);
}

View File

@@ -0,0 +1,80 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Game: Bounce Ball</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js?mobile"></script>
<style type="text/css">
html, body { height: 100%; }
#shortdesc { display: none; }
#tags { display: none; }
</style>
<script type="text/javascript">
var map, vlayer;
function adjustLocation(delta, feature) {
feature.geometry.move(delta.x, delta.y);
var me = map.maxExtent;
var rad = 6;
if (feature.geometry.x > (me.right - rad)) {
feature.geometry.x = me.right - rad;
} else if (feature.geometry.x < (me.left+rad)) {
feature.geometry.x = me.left+rad;
}
if (feature.geometry.y > (me.top-rad)) {
feature.geometry.y = me.top-rad;
} else if (feature.geometry.y < (me.bottom+rad)) {
feature.geometry.y = me.bottom+rad;
}
vlayer.drawFeature(feature);
}
function init() {
map = new OpenLayers.Map( 'map',
{
'maxExtent': new OpenLayers.Bounds(0, 0, $("map").clientWidth, $("map").clientHeight),
controls: [],
maxResolution: 'auto'}
);
var layer = new OpenLayers.Layer("",
{isBaseLayer: true} );
map.addLayer(layer);
map.zoomToMaxExtent();
vlayer = new OpenLayers.Layer.Vector();
var feature = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point(map.getCenter().lon, map.getCenter().lat));
vlayer.addFeatures(feature);
map.addLayer(vlayer);
if (window.DeviceMotionEvent) {
window.addEventListener('devicemotion', function (evt) {
var delta = null;
if (typeof(evt.accelerationIncludingGravity) != 'undefined') {
delta = {
'x': evt.accelerationIncludingGravity.x * 3,
'y': evt.accelerationIncludingGravity.y * 3,
'z': evt.accelerationIncludingGravity.z
}
}
adjustLocation(delta, feature);
}, true);
} else {
alert("This demo does not work on your browser.");
}
}
</script>
</head>
<body onload="init()">
<h1 id="title">Accelerometer Example</h1>
<div id="tags">
mobile, game
</div>
<div id="shortdesc">Simple acceleration demo; roll a vector feature around
on a map. (Only tested on iOS 4.)</div>
<div id="map" width="100%" height="100%" style="background-color: grey"></div>
<div id="docs">
Demo works best when device is locked in portrait mode.
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
@@ -12,7 +14,7 @@
function init(){
map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
@@ -57,6 +59,17 @@
</head>
<body onload="init()">
<h1 id="title">GeoJSON Example</h1>
<div id="tags">
JSON, GeoJSON
</div>
<p id="shortdesc">
Demonstrate the use of the GeoJSON format.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
This example uses the GeoJSON format.
</div>
</body>
</html>

40
examples/geolocation.html Normal file
View File

@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>OpenLayers Geolocation</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<style>
.olControlAttribution {
bottom: 3px;
}
</style>
</head>
<body>
<h1 id="title">Geolocation Example</h1>
<div id="tags">
geolocation, geolocate, mobile
</div>
<p id="shortdesc">
Track current position and display it with its accuracy.
</p>
<div id="map" class="smallmap"></div>
<button id="locate">Locate me!</button>
<input type="checkbox" name="track" id="track">
<label for="track">Track my position</label>
<div id="docs">
<p>
View the <a href="geolocation.js" target="_blank">geolocation.js source</a>
to see how this is done.
</p>
</div>
<script src="../lib/OpenLayers.js"></script>
<script src="geolocation.js"></script>
</body>
</html>

105
examples/geolocation.js Normal file
View File

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

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
@@ -16,7 +18,7 @@
map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
@@ -94,7 +96,23 @@
</head>
<body onload="init()">
<h1 id="title">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="tags">
georss, style, styling, marker, flickr, thumbnail, image, rule
</div>
<p id="shortdesc">
Display a flickr-feed on top of the map
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<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>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers GeoRSS Marker Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -11,13 +13,13 @@
function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.addControl(new OpenLayers.Control.LayerSwitcher());
var newl = new OpenLayers.Layer.GeoRSS( 'GeoRSS', 'georss.xml');
map.addLayer(newl);
var yelp = new OpenLayers.Icon("http://openlayers.org/~crschmidt/yelp.png", new OpenLayers.Size(20,29));
var yelp = new OpenLayers.Icon("http://www.openlayers.org/images/OpenLayers.trac.png", new OpenLayers.Size(49,44));
var newl = new OpenLayers.Layer.GeoRSS( 'Yelp GeoRSS', 'yelp-georss.xml', {'icon':yelp});
map.addLayer(newl);
}
@@ -26,7 +28,9 @@
<body onload="init()">
<h1 id="title">GeoRSS Marker Example</h1>
<div id="tags"></div>
<div id="tags">
georss, style, styling, marker, flickr, image
</div>
<p id="shortdesc">
Demonstrate loading a GeoRSS feed using the GeoRSS parser.

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers GeoRSS Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -11,7 +13,7 @@
function init(){
map = new OpenLayers.Map('map', {maxResolution:'auto'});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.addControl(new OpenLayers.Control.LayerSwitcher());
@@ -29,7 +31,9 @@
<body onload="init()">
<h1 id="title">GeoRSS Example</h1>
<div id="tags"></div>
<div id="tags">
georss, style, styling, marker
</div>
<p id="shortdesc">
Display a couple of locally cached georss feeds on an a basemap.
@@ -48,9 +52,9 @@
<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 --
<p>The above input box allows the input of a URL to a GeoRSS feed. This feed can be local to the HTML page &mdash;
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
georss.xml &mdash; 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>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<title>WFS: GetFeature Example (GeoServer)</title>
@@ -18,8 +20,8 @@
});
layer = new OpenLayers.Layer.WMS(
"States WMS/WFS",
"http://demo.opengeo.org/geoserver/ows",
{layers: 'topp:states', format: 'image/gif'}
"http://v2.suite.opengeo.org/geoserver/ows",
{layers: 'usa:states', format: 'image/gif'}
);
select = new OpenLayers.Layer.Vector("Selection", {styleMap:
new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])
@@ -57,6 +59,7 @@
<h1 id="title">WFS GetFeature Example (GeoServer)</h1>
<div id="tags">
WFS, GetFeature
</div>
<p id="shortdesc">

View File

@@ -1,5 +1,7 @@
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers WMS Feature Info Example (GeoServer)</title>
<script src="../lib/OpenLayers.js"></script>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -37,7 +39,6 @@
text-align:left;
font-size:100%;
font-weight:bold;
text-transform:uppercase;
padding:.2em .2em;
}
@@ -161,7 +162,9 @@
<body onload="load()">
<h1 id="title">Feature Info Example</h1>
<div id="tags"></div>
<div id="tags">
WMS, GetFeatureInfo
</div>
<p id="shortdesc">
Demonstrates the WMSGetFeatureInfo control for fetching information about a position from WMS (via GetFeatureInfo request).

View File

@@ -1,5 +1,7 @@
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>GetFeatureInfo Popup</title>
<script src="../lib/OpenLayers.js"></script>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -75,7 +77,9 @@
<body onload="load()">
<h1 id="title">Feature Info in Popup</h1>
<div id="tags"></div>
<div id="tags">
WMS, GetFeatureInfo, popup
</div>
<p id="shortdesc">
Demonstrates the WMSGetFeatureInfo control for fetching information

View File

@@ -1,62 +0,0 @@
<html>
<head>
<title>OpenLayers Feature Info Example</title>
<script src="../lib/OpenLayers.js"></script>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="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>
<div id="nodeList">
</div>
</div>
<div id="map" class="smallmap"></div>
<script defer="defer" type="text/javascript">
OpenLayers.ProxyHost = "/dev/examples/proxy.cgi?url=";
var map = new OpenLayers.Map('map', {'maxResolution':'auto'});
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://world.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/world/map/factbook.map", {'layers': 'factbook'} );
map.addLayer(wms);
map.addControl(new OpenLayers.Control.Permalink('permalink'));
map.zoomToMaxExtent();
map.events.register('click', map, function (e) {
OpenLayers.Util.getElement('nodeList').innerHTML = "Loading... please wait...";
var url = wms.getFullRequestString({
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "application/vnd.ogc.se_xml",
BBOX: wms.map.getExtent().toBBOX(),
X: e.xy.x,
Y: e.xy.y,
INFO_FORMAT: 'text/html',
QUERY_LAYERS: wms.params.LAYERS,
WIDTH: wms.map.size.w,
HEIGHT: wms.map.size.h});
OpenLayers.loadURL(url, '', this, setHTML);
OpenLayers.Event.stop(e);
});
function setHTML(response) {
OpenLayers.Util.getElement('nodeList').innerHTML = response.responseText;
}
</script>
<div id="docs">
</div>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers GML Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -13,7 +15,7 @@
function init(){
map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.zoomToExtent(new OpenLayers.Bounds(-3.922119,44.335327,4.866943,49.553833));
map.addLayer(new OpenLayers.Layer.GML("GML", "gml/polygon.xml"));
@@ -23,7 +25,9 @@
<body onload="init()">
<h1 id="title">GML Layer Example</h1>
<div id="tags"></div>
<div id="tags">
GML
</div>
<p id="shortdesc">
Loads locally stored GML vector data on a basemap. Includes GML example file.

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Google with Overlay Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -37,7 +39,9 @@
<body onload="init()">
<h1 id="title">Google with Overlay Example</h1>
<div id="tags"></div>
<div id="tags">
Google, overlay, mercator, reproject, cleanup
</div>
<p id="shortdesc">
Demonstrate a Google basemap used with boundary overlay layer.

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Google (v3) Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="google-v3-alloverlays.js"></script>
</head>
<body onload="init()">
<h1 id="title">Google (v3) allOverlays Layer Example</h1>
<div id="tags">
Google, overlay
</div>
<p id="shortdesc">
Demonstrate use the Google Maps v3 API with allOverlays set to true on the map.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
You can also use Google layers as overlays, e.g. in a map with
allOverlays set to true. Note some of the layers disappear as
you zoom in to levels that are not supported by all layers. See the
<a href="google-v3-alloverlays.js" target="_blank">google-v3-alloverlays.js source</a>
to see how this is done.
</p>
</div>
</body>
</html>

View File

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

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

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Google (v3) Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
<link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?v=3.5&amp;sensor=false"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="google-v3.js"></script>
</head>
<body onload="init()">
<h1 id="title">Google (v3) Layer Example</h1>
<div id="tags">
Google, api key, apikey
</div>
<p id="shortdesc">
Demonstrate use the Google Maps v3 API.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p><input id="animate" type="checkbox" checked="checked">Animated
zoom (if supported by GMaps on your device)</input></p>
<p>
If you use the Google Maps v3 API with a Google layer, you don't
need to include an API key. This layer only works in the
spherical mercator projection. See the
<a href="google-v3.js" target="_blank">google-v3.js source</a>
to see how this is done.
<p>
In order to position the Google attribution div in the default
location, you must include the extra theme/default/google.css
stylesheet.
</p>
</div>
</body>
</html>

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

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

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Google Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="../theme/default/google.css" type="text/css" />
@@ -41,7 +43,9 @@
<body onload="init()">
<h1 id="title">Google Layer Example</h1>
<div id="tags"></div>
<div id="tags">
Google
</div>
<p id="shortdesc">
Demonstrate use of the various types of Google layers.

View File

@@ -1,89 +1,41 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>OpenLayers Graphic Names</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
// user custom graphicname
OpenLayers.Renderer.symbol.lightning = [0,0, 4,2, 6,0, 10,5, 6,3, 4,5, 0,0];
OpenLayers.Renderer.symbol.rectangle = [0,0, 4,0, 4,10, 0,10, 0,0];
var map;
function init() {
map = new OpenLayers.Map('map');
// list of well-known graphic names
var graphics = ["star", "cross", "x", "square", "triangle", "circle", "lightning", "rectangle"];
// Create one feature for each well known graphic.
// Give features a type attribute with the graphic name.
var num = graphics.length;
var slot = map.maxExtent.getWidth() / num;
var features = Array(num);
for(var i=0; i<graphics.length; ++i) {
lon = map.maxExtent.left + (i * slot) + (slot / 2);
features[i] = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point(
map.maxExtent.left + (i * slot) + (slot / 2), 0
), {
type: graphics[i]
}
);
}
// Create a style map for painting the features.
// The graphicName property of the symbolizer is evaluated using
// the type attribute on each feature (set above).
var styles = new OpenLayers.StyleMap({
"default": {
graphicName: "${type}",
pointRadius: 10,
strokeColor: "fuchsia",
strokeWidth: 2,
fillColor: "lime",
fillOpacity: 0.6
},
"select": {
pointRadius: 20,
fillOpacity: 1,
rotation: 45
}
});
// Create a vector layer and give it your style map.
var layer = new OpenLayers.Layer.Vector(
"Graphics", {styleMap: styles, isBaseLayer: true}
);
layer.addFeatures(features);
map.addLayer(layer);
// Create a select feature control and add it to the map.
var select = new OpenLayers.Control.SelectFeature(layer, {hover: true});
map.addControl(select);
select.activate();
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
}
</script>
<script src="../lib/OpenLayers.js" type="text/javascript"></script>
<script src="./graphic-name.js" type="text/javascript"></script>
</head>
<body onload="init()">
<body onload="init();">
<h1 id="title">Named Graphics Example</h1>
<div id="tags"></div>
<div id="tags">
vector, named graphic, star, cross, x, square, triangle, circle, style
</div>
<p id="shortdesc">
Shows how to use well-known graphic names.
</p>
<div id="map" class="smallmap"></div>
<div id="map" class="smallmap">
</div>
<div id="docs">
OpenLayers supports well-known names for a few graphics. You can use
the names "star", "cross", "x", "square", "triangle", and "circle" as
the value for the graphicName property of a symbolizer.
<p>
OpenLayers supports well-known names for a few graphics. You
can use the names &quot;star&quot;, &quot;cross&quot;,
&quot;x&quot;, &quot;square&quot;, &quot;triangle&quot;, and
&quot;circle&quot; as value for the graphicName property of a
symbolizer.
</p>
<p>
The named symbols &quot;lightning&quot;, &quot;rectangle&quot;
and &quot;church&quot; are user defined.
</p>
<p>
See <a href="./graphic-name.js">graphic-name.js</a>
for the source code of this example.
</p>
</div>
</body>
</html>

62
examples/graphic-name.js Normal file
View File

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

View File

@@ -1,5 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Graticule Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -23,19 +25,20 @@
<script type="text/javascript">
Proj4js.defs["EPSG:42304"]="+title=Atlas of Canada, LCC +proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";
var graticuleCtl1, graticuleCtl2;
var map1, map2;
function init(){
initLonLat();
initProjected();
}
function initLonLat(){
graticuleCtl1 = new OpenLayers.Control.Graticule({
numPoints: 2,
labelled: true
});
map1 = new OpenLayers.Map('map', {
controls: [
new OpenLayers.Control.Graticule({
numPoints: 2,
labelled: true,
visible: true
}),
graticuleCtl1,
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.Navigation()
@@ -43,7 +46,7 @@
});
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}, {wrapDateLine: true} );
map1.addLayers([ol_wms]);
@@ -52,12 +55,13 @@
function initProjected(){
var extent = new OpenLayers.Bounds(-2200000,-712631,3072800,3840000);
var mapOptions = {
controls: [
new OpenLayers.Control.Graticule({
graticuleCtl2 = new OpenLayers.Control.Graticule({
labelled: true,
targetSize: 200
}),
});
var mapOptions = {
controls: [
graticuleCtl2,
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.Navigation()
@@ -87,6 +91,7 @@
<h1 id="title">Graticule Example</h1>
<div id="tags">
graticule, grid
</div>
<p id="shortdesc">
@@ -98,5 +103,12 @@
<div id="map2" class="smallmap"></div>
<div id="docs"></div>
<br style="clear:both" />
<ul>
<li><a href="#"
onclick="graticuleCtl1.activate(); graticuleCtl2.activate(); return false;">Activate graticule controls</a></li>
<li><a href="#"
onclick="graticuleCtl1.deactivate(); graticuleCtl2.deactivate(); return false;">Deactivate graticule controls</a></li>
</ul>
</body>
</html>

View File

@@ -1,5 +1,7 @@
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Gutter Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
@@ -33,7 +35,9 @@
<body>
<h1 id="title">Gutter Example</h1>
<div id="tags"></div>
<div id="tags">
gutter, quality, tile
</div>
<p id="shortdesc">
Demonstrates map tiling artifacts, and OpenLayer's facility for correcting this distortion.

View File

@@ -1,7 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>SelectFeature Control for Select and Highlight</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<!--[if lte IE 6]>
<link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
<![endif]-->
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
#controlToggle li {
@@ -70,6 +75,9 @@
</head>
<body onload="init()">
<h1 id="title">OpenLayers Select and Highlight Feature Example</h1>
<div id="tags">
select, highlight, hover, onmouseover, click, vector
</div>
<p id="shortdesc">
Select features on click, highlight features on hover.
</p>

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