Compare commits

..

696 Commits

Author SHA1 Message Date
Bart van den Eijnden
1c21d9cc15 Merge pull request #998 from bartvde/tilemgrdefault
enable TileManager by default as suggested by @marcjansen and @bartvde ... (r=@ahocevar)
2013-06-06 14:18:18 +02:00
ahocevar
4d52d4aeb5 Drag interval of 0 (i.e. no separate cycle) seems appropriate now
The reason for setting this to 1 was ancient IPhones with ancient iOS
versions. On all other devices, 0 seems to work better, and it removes the
overhead of spawning a separate cycle for each drag.
2013-06-06 13:38:13 +02:00
Bart van den Eijnden
1e94821042 set VERSION_NUMBER to 2.13-rc6 2013-06-06 09:19:42 +02:00
ahocevar
8cccbfb189 Protect ZoomBox from division by zero
When the map is at the highest zoom level, the old and the current
resolution will be the same. This would cause a division by zero, which
the JavaScript engine does not recognize as such. So we have to protect
zoomOriginPx from becoming {x: Infinity, y: Infinity}.
2013-06-06 09:18:35 +02:00
Bart van den Eijnden
1cf69634cf update VERSION_NUMBER to 2.13-rc5 2013-05-30 15:41:00 +02:00
ahocevar
c2b7e8b327 Merge pull request #987 from ahocevar/google-orphaned
Vector layer duplicates when changeing to google base layer. r=@bartvde
2013-05-30 15:37:35 +02:00
ahocevar
fe0620dc7f Merge pull request #174 from ahocevar/feature-events
Turning @tschaub's FeatureAgent into an event extension. r=@bartvde
2013-05-30 15:33:24 +02:00
Bart van den Eijnden
8778b746b3 update VERSION_NUMBER to 2.13-rc4 2013-05-24 12:09:53 +02:00
ahocevar
a5ea8d7fcf Fixing tests
Selecting the same feature again should not do anything, which was ensured
in the old implementation by a check in the SelectFeature control. This
means that the previous commit causes a change in behavior in standalone
mode, which I would consider a bugfix. I documented this change in the
release notes.
2013-05-24 12:07:49 +02:00
ahocevar
b103d3b428 We don't want to re-select an already selected feature 2013-05-24 12:07:35 +02:00
ahocevar
8562582dd2 Avoiding duplicate events 2013-05-24 12:07:22 +02:00
ahocevar
cd5ae45273 Do not manage cache when cached tile is on target layer's backbuffer 2013-05-24 12:06:58 +02:00
Tobias Bieniek
d1b00824fc Format/EncodedPolyline: Change default factor to 1e5
This matches the factors in the other methods and the default of the
original algorithm. Having this set at 1 before can be considered
as a bug.
2013-05-24 12:06:39 +02:00
Tobias Bieniek
4399ebcb04 Format/EncodedPolyline: Added opt_factor parameter to encode/decode() 2013-05-24 12:06:25 +02:00
Tobias Bieniek
0bb804c9e7 tests/EncodedPolyline: Fixed indent 2013-05-24 12:06:12 +02:00
Bart van den Eijnden
572d78fb4d set version number to 2.13-rc3 2013-05-17 13:16:49 +02:00
ahocevar
1d948fc914 Make sure that drawTilesFromQueue gets executed
For events other than move, the tile queue may not be populated yet when
updateTimeout is called. So instead of checking for the queue's length,
we register the timer unconditionally in these cases.
2013-05-17 13:15:01 +02:00
ahocevar
449b85966e .olTileReplacing is on the parent of .olTileImage when using frame 2013-05-17 13:14:36 +02:00
ahocevar
1223ea339d Use getTile() instead of imgDiv to get the correct element
The correct way to get the markup of a tile is to use getTile() - the
imgDiv will only be available if the tile does not use a frame.
2013-05-17 13:14:16 +02:00
Bart van den Eijnden
d0f8fa3ecf set version number to RC2 2013-05-13 13:25:03 +02:00
Éric Lemoine
e9a349e4f1 Make feature handler propagate touch events
This commit is a follow-up on issue #294 (commit a6119f6) and #861 (commit c7a4045). The feature handler should not stop the bubbling up of browser events. In this particular case, when the feature handler is activate, Sencha Touch will trigger longpress events when panning the map because the feature handler stops touchmove.
2013-05-13 13:17:02 +02:00
ahocevar
8b4592e71a We are dealing with strings for comparison
Because OpenLayers.Util.getParameters turns comma delimited values into
arrays, comparing e.g. bbox values in urls will return false. By
introducing a splitArgs option, we can use getParameters in a way that
leaves such values as strings and makes them comparable in
OpenLayers.Util.isEquivalentUrl.
2013-05-13 13:01:21 +02:00
iacovlev-pavel
7c5afe1acf Add OpenLayers/Control.js to "requires"
Fix issue #969
2013-05-13 13:01:21 +02:00
Bart van den Eijnden
c0ccf6a8f0 set VERSION_NUMBER 2013-05-06 17:11:59 +02:00
ahocevar
80482acdad Merge pull request #962 from ahocevar/tilequeue-throttling
Bring back throttling for tile loading. r=@bartvde
2013-05-06 07:31:24 -07:00
Tim Schaub
90535134d4 Spelling
See 44a2b50455 (commitcomment-3123666)
2013-05-01 09:26:55 -06:00
Marc Jansen
989464cd93 Minor formatting changes. 2013-05-01 17:51:27 +03:00
ahocevar
1aabcde0a6 Merge pull request #827 from geops/fixed-strategy
Improved Fixed Strategy
2013-04-30 09:21:27 -07:00
ahocevar
70bfba3011 Fixing typo 2013-04-30 15:45:26 +03:00
friedjoff
54655c7fca Merge branch 'master' into fixed-strategy 2013-04-30 12:44:17 +02:00
ahocevar
779c97f43e Using no buffer by default, because it makes no sense with TileManager
And while we're at it, simplify the example to use the OSM layer and the
new default for transitionEffect.
2013-04-29 14:50:43 +02:00
ahocevar
48efd43250 Bring back throttling for tile loading
In OpenLayers 2.12, only one tile was loaded per animation frame. This
change brings back something similar as part of the tile manager. But we
do not use requestAnimationFrame anymore, because @elemoine pointed out
that browsers may give requestAnimationFrame invoked functions a higher
priority than setTimeout invoked functions.

The reason for this change is
http://lists.osgeo.org/pipermail/openlayers-users/2013-April/028063.html.
2013-04-29 14:20:18 +02:00
ahocevar
142546c6d5 Merge pull request #961 from ahocevar/modifyfeature-layerorder
Regression: ModifyFeature control  not act if layer is not on top. r=@jorix
2013-04-29 04:25:59 -07:00
ahocevar
9d6ce21109 Raise layer that's being modified 2013-04-27 21:46:22 +02:00
Marc Jansen
f3c0348567 Merge pull request #543 from jorix/no-manual-tests2
Can test some manual tests as normal tests.
2013-04-26 00:32:48 -07:00
Bart van den Eijnden
ec4d3a48d7 Merge pull request #224 from jorix/3402-touch_logic_to_superclass
Move some touch logic to the `handler` base class
2013-04-25 07:42:39 -07:00
Xavier Mamano
5ecc54a689 Take into account the comments of bartvde 2013-04-25 16:25:56 +02:00
Frédéric Junod
7beb33f99e Merge pull request #357 from fredj/deprecated
mv AnchoredBubble to deprecated.js, rm LayerSwitcher.roundedCorner. r=bartvde
2013-04-25 01:41:08 -07:00
Frederic Junod
96fc2d71e3 Remove Rico/*.js from debug loader. 2013-04-25 10:26:58 +02:00
Frederic Junod
5ed18a9708 Remove deprecated roundedCorner option from LayerSwitcher control. 2013-04-25 10:26:58 +02:00
Frederic Junod
5a3c06aa7e Move OpenLayers.Popup.AnchoredBubble to deprecated.js 2013-04-25 10:25:03 +02:00
ahocevar
27ccd3cbaa Completing mock for 2D transforms (see #950) 2013-04-24 22:03:37 +02:00
Xavier Mamano
43a8821ce6 Can test some manual tests as normal tests. 2013-04-24 17:21:25 +02:00
ahocevar
6af9f5f3d3 Merge pull request #954 from ahocevar/url-compare
URL comparison fails in IE8. r=@bartvde
2013-04-24 07:36:44 -07:00
ahocevar
2782fa47c8 URL comparison fails in IE8
The W3C standard says that setAttribute/getAttribute on any DOM element is
a simple setter/getter thing. IE8 tries to be smarter and returns the full
URL when calling getAttribute('src') on an image instead of the one that
was set with setAttribute('src').

This change makes sure that urls are compared properly, also in IE8.
2013-04-24 15:41:04 +02:00
ahocevar
11977f57a3 Making pagePosition test work in IE8 2013-04-24 14:31:33 +02:00
ahocevar
9f53506754 Tile bounds changed with #517 to remove white lines between tiles 2013-04-24 14:15:12 +02:00
ahocevar
acc497bf3c Making TouchNavigation tests work in Firefox 2013-04-24 01:01:56 +02:00
Marc Jansen
3ef69b967d Merge pull request #631 from jorix/format_undefined
Avoid breaking the "OpenLayers.String.format" execution
2013-04-23 13:54:15 -07:00
ahocevar
11a187ffaf Merge pull request #849 from luizvital/master
Change language code from 'pt-br' to 'pt-BR'
2013-04-23 12:59:26 -07:00
ahocevar
e0f0744500 Merge pull request #946 from Turbo87/uglify
build: Added "uglify-js" as optional compressor
2013-04-23 12:55:15 -07:00
Bart van den Eijnden
872502311f remove trailing comma from cluster strategy tests (see #950) 2013-04-23 15:36:52 +02:00
Bart van den Eijnden
d63055f28c remove trailing comma from PanZoomBar tests (see #950) 2013-04-23 15:25:06 +02:00
ahocevar
60a966714d Hack for making page position calculations work
Many browsers do very limited rendering/reflow on hidden IFrames. By making
the test IFrame visible, we get everything rendered like a real page. This
is a partial fix for #947.
2013-04-23 14:22:59 +02:00
Bart van den Eijnden
415265db40 protect 2 Google test cases for validkey 2013-04-23 13:28:39 +02:00
Bart van den Eijnden
2613ccb504 fix WMSDescribeLayer format exception test case in IE9 and IE10 (see #948) 2013-04-23 13:17:53 +02:00
Bart van den Eijnden
7cb99834e3 fix opacity tests in IE10 (see #948) 2013-04-23 13:02:29 +02:00
ahocevar
2e88ca6905 Use other edge and outside coordinates
This avoids a failing test due to anti-aliasing artifacts in Safari.
2013-04-23 12:40:15 +02:00
ahocevar
7cb38f69d5 Merge pull request #780 from ahocevar/ms-pointer-events
Touch Navigation doesn't work in Internet Explorer 10. r=@bartvde,@gregersrygg,@mpriour
2013-04-23 01:46:10 -07:00
ahocevar
aa2345693a Addressing @bartvde's review comments 2013-04-23 10:45:08 +02:00
Tobias Bieniek
444d9a06ae build: Added "uglify-js" as optional compressor 2013-04-22 23:11:57 +02:00
ahocevar
1bdfb492d5 Merge pull request #944 from Karamell/labelOutlineOpacity2
added a labelOutlineOpacity attribute to SVG and Canvas Renderers.
2013-04-22 00:53:30 -07:00
Karamell
76efa60888 added a labelOutlineOpacity attribute to SVG and Canvas Renderers. 2013-04-21 11:04:06 +02:00
ahocevar
87d8b6003d Merge pull request #927 from adv-isu/HandlerPathUndoTouchFix2
Improved touch support for Handler.Path.undo
2013-04-20 02:32:31 -07:00
ahocevar
f4725c48ce Merge pull request #937 from Turbo87/layer-switcher
LayerSwitcher: Simplified checkRedraw() method
2013-04-20 02:20:26 -07:00
ahocevar
6fb10d6e0a Re-ordering topics in the release notes 2013-04-20 11:08:43 +02:00
ahocevar
44a2b50455 Release notes for GPU, animated zoom and ModifyFeature control 2013-04-20 11:03:46 +02:00
ahocevar
010035e047 New example showing how to switch projections 2013-04-18 16:54:37 +02:00
Tobias Bieniek
ae8a04c601 LayerSwitcher: Simplified checkRedraw() method 2013-04-17 00:00:36 +02:00
ahocevar
111821e86d Making buttons work
Thanks @gregersrygg for testing. With this change, zoom and other buttons
(e.g. editing toolbar) work in touch mode.
2013-04-16 16:44:02 +02:00
ahocevar
9cdc991b8c Attempt to handle IE >= 10 pointer events
Using the same technique as Leaflet, this relays MSPointer events to touch
events. Using the simulator, I can verify that even pinch-zoom works with
this change, but the visual experience is a bit jumpy. Would be great if
people could test this on physical touch devices and see how it looks/feels
there.
2013-04-16 11:18:17 +02:00
ahocevar
80a6185947 Yet another documentation improvement for #932.
Now it should be clear that the map's changelayer event is triggered
whenever the layer's actual visibility (i.e. visible to the user) changes.
2013-04-10 10:21:28 +02:00
ahocevar
92ac9680d8 Another documentation improvement for #932. 2013-04-10 10:21:28 +02:00
ahocevar
f22937b2ae Documentation improvement (fixes #932) 2013-04-10 10:21:28 +02:00
ahocevar
5deb2c6280 Merge pull request #931 from ahocevar/beforefeaturemodified
Also trigger beforefeaturemodified event in non-standalone mode. r=@bartvde
2013-04-10 01:12:29 -07:00
ahocevar
e5dc583d52 Also trigger beforefeaturemodified event in non-standalone mode
d2a32d5 accidently changed the number of assertions in the
test_selectFeature function, so the change in behavior that no
beforefeaturemodified event is called any more in non-standalone mode got
unnoticed: Before unhacking ModifyFeature, the SelectFeature control
called the beforeSelectFeature method directly. Now, without a built-in
SelectFeature control, we need to call it from the selectFeature method in
both standalone and non-standalone mode.
2013-04-09 23:16:30 +02:00
Tim Schaub
e1dea2d8e1 Merge pull request #532 from adv-isu/WKTrequires
Format/WKT.js: add @requires for geometry types
2013-04-04 10:13:25 -07:00
Andrew Vardeman
62cb6d62f6 Explicitly require the various Geometry types, as in GML.js, so listing OpenLayers/Format/WKT.js in a build config file is sufficient to build in these types. 2013-04-04 11:37:19 -05:00
Andrew Vardeman
7ff0247b00 Account for the fact that touch devices have no mouse and therefore no last mouse position. When "undo" is invoked in a mobile app, sync the meaningless last-mouse-position point to the last point in the digitized linestring so there is visible feedback that something has been undone. Otherwise the last-mouse-position point is left at the point of the last tap on the map, which is unfortunately the location of the vertex that has just been undone, incorrectly implying that the vertex is still there. 2013-04-04 11:03:13 -05:00
ahocevar
d3f32c4dea Merge pull request #925 from ahocevar/google-container
Google Maps rendering bug on fresh reload. r=@kevbradwick (fix #925)
2013-04-04 03:36:58 -07:00
ahocevar
f0ef4728d8 Simplifying layer visibility handling
Instead of adding and removing the Google container, we just toggle
style.display. This also removes the unused rendered and displayed
properties of the cache.
2013-04-04 11:40:21 +02:00
Marc Jansen
aaabdbc803 Merge pull request #461 from tschaub/ie9-leaks
OpenLayers-2.12-rc2 + jQuery-1.7.2 Memory leak in Internet Explorer 9 (p=@tschaub,r=@marcjansen,@elemoine)
2013-04-03 02:43:48 -07:00
Marc Jansen
93e800a9bd Merge pull request #919 from IJMacD/patch-1
Fix imageryProviders Bug (p=@IJMacD,r=@marcjansen)
2013-03-28 10:26:56 -07:00
Pierre GIRAUD
27233df5c7 Merge pull request #908 from pgiraud/GPX
Remove prefix 'gpx:' to node tags. Most of the GPX tools don't support it.
2013-03-28 06:04:51 -07:00
Pierre GIRAUD
f562b2a02c Adding a note for 2.13 about changes made to GPX format 2013-03-28 13:55:37 +01:00
Pierre GIRAUD
9f6b803afa Don't add prefix 'gpx:' to node tags. Most of the GPX tools don't support it. 2013-03-28 13:55:37 +01:00
ahocevar
c62ffb29b8 Merge pull request #922 from ahocevar/backbuffer-zindex
Configurable backbuffer order. r=@bartvde
2013-03-27 13:13:36 -07:00
ahocevar
bc5054399c Typo in API docs; use "map-resize" option in example 2013-03-27 21:11:15 +01:00
ahocevar
434178ef49 Making backbuffer order configurable
In OpenLayers 2.12, the backbuffer for each layer was placed right below
the layer itself. With animated zooming, that was changed so backbuffers
are all placed below the base layer. As it turned out, this is only good
for certain kinds of layers (e.g. street labels), so the default now is
to place the backbuffer right below its layer again. But the
transitionEffect option can now have a new value, 'map-resize', which will
cause the backbuffer to be placed below the base layer.
2013-03-27 17:46:36 +01:00
Frédéric Junod
30a4069e8a Merge pull request #921 from gravitystorm/patch-5
Fix UTFGrid isBaseLayer documentation
2013-03-27 08:23:51 -07:00
ahocevar
fe172ccf6e Backbuffer needs z-index
Since we don't rely on the DOM order for layers, we also cannot rely on it
for backbuffers. This change simply adds a sensible z-index to the
backbuffer container.
2013-03-27 16:19:58 +01:00
Andy Allan
c23b09d72a Fix isBaseLayer documentation
Ensure the documentation matches the code with regards to the default value, and make the explanation slightly clearer as to why it defaults to false.
2013-03-27 14:58:34 +00:00
ahocevar
246d2d99d3 Merge pull request #920 from ahocevar/backbuffer-conditional
Backbuffer and transitionend only when there are tiles. r=@bartvde
2013-03-27 07:14:51 -07:00
ahocevar
316c1888d2 Use the last child of the container only if loading was aborted
Otherwise we may pick a tile that is already half way through the
transition, which will cause the backbuffer to go away too early.
2013-03-26 14:48:23 +01:00
Bart van den Eijnden
e6dafa5d01 add default value for ratio to the api docs 2013-03-26 13:13:35 +01:00
ahocevar
7f18a7b3df Backbuffer and transitionend only when there are tiles
When an application zooms the map programmatically right after
initialization, there will be an empty backbuffer. This should be avoided,
because it adds an unnecessary DOM element.

The tile.onLoadEnd handler registers a transitionend listener on the image
of the last loaded tile. But if loading was aborted, there will be no
image. The new logic registers the transitionend event on the last child
of the layer div, which is not necessarily the tile we're handling loadend
for. When the backbuffer is empty (i.e. no tile was loaded at the time the
backbuffer was created), it will be removed immediately.
2013-03-26 11:53:27 +01:00
ahocevar
63ea10a916 Merge pull request #917 from Turbo87/segment-distance
Geometry: Added distanceSquaredToSegment() function
2013-03-25 12:30:05 -07:00
Tobias Bieniek
6b79391b5e Geometry: Added "along" to the API documentation 2013-03-25 19:10:50 +01:00
Iain MacDonald
847584bbbd Fix imageryProviders Bug
Sometimes imageryProviders is null so accessing providers.length on
line 255 causes a TypeError.
2013-03-25 16:16:55 +00:00
ahocevar
cae4df3ce7 Merge pull request #916 from Turbo87/bounds
Added extendXY() method to Bounds class
2013-03-25 05:17:49 -07:00
Tobias Bieniek
29976ba98a Geometry: Added distanceSquaredToSegment() function 2013-03-23 16:56:32 +01:00
Tobias Bieniek
04d3c6ce53 Geometry: Added along attribute to distanceToSegment() function 2013-03-23 16:49:30 +01:00
Tobias Bieniek
467bf66163 Bounds: Simplified extend() method
.. by using the new extendXY() method if the given object is LonLat or a
Point.
2013-03-23 11:49:17 +01:00
Tobias Bieniek
b3ce8d556a Bounds: Added extendXY() method
This is a simpler variant of the extend() method, but with less overhead.
2013-03-23 11:41:58 +01:00
Tobias Bieniek
afd0388f87 Bounds: Fixed comment location 2013-03-23 11:33:21 +01:00
Tobias Bieniek
d65f604b25 tests/Bounds: Fixed indentation and whitespace 2013-03-23 11:33:17 +01:00
Tobias Bieniek
03735b74ab tests/Bounds: Fixed typos 2013-03-23 11:29:11 +01:00
ahocevar
9a06ec47f6 Merge pull request #914 from Turbo87/encoded-polyline
EncodedPolyline: Backported ol3 polyline parser library
2013-03-22 06:12:52 -07:00
Tobias Bieniek
17e972de3d EncodedPolyline: Backported ol3 polyline parser library
The ol3 version of the library is more advanced and complete. It can also
parse into flat array. It can handle unsigned integers, signed integers
and floats.
2013-03-20 20:56:47 +01:00
ahocevar
410a88c674 Thicker strokes make it easier to select line segments 2013-03-20 10:30:05 +01:00
ahocevar
b0bc72fa7f Merge pull request #913 from ahocevar/modify-feature
Simplifying and unhacking the ModifyFeature control. r=@bartvde
2013-03-20 02:23:42 -07:00
ahocevar
6fca6aef60 Addressing @bartvde's review comments 2013-03-20 10:23:00 +01:00
Pierre GIRAUD
15800c01ad Merge pull request #730 from pgiraud/wmts
don't try to update the matrix in setMap since it's too early and done l...
2013-03-20 00:48:41 -07:00
ahocevar
bed011514f Increasing point radius for easier touch selection 2013-03-20 05:12:35 +01:00
ahocevar
d2a32d5421 Simplifying and unhacking the ModifyFeature control
With two nested controls (DragFeature, SelectFeature), which - among
others - activated two OpenLayers.Handler.Feature instances, the
ModifyFeature control was fragile and hard to debug.

The issue that @iwillig, @bartvde and myself tried to track down was
that the two Feature handlers interfered with each other, making it hard
to select features on mobile devices, and causing points to jump during
dragging because of not updated last pixel positions.

With this refactoring, there are no more nested controls. All that's left
is a Drag handler. All tests pass. I had to remove one test that checked
for dragging of an unselected point while another was selected, because
now (and partially even before this change, thanks to the ugly drag
handler hack that is now removed) dragging a point will also select it,
saving the user an extra click.
2013-03-19 23:00:10 +01:00
ahocevar
7002ec49e7 Merge pull request #903 from ahocevar/903
Google Maps and WMS layer Backbuffer error. r=@mosesonline
2013-03-19 14:38:46 -07:00
ahocevar
3dea8dacb4 Using the correct parent node
When we have a Google base layer, the parent node of the base layer's div
will be a different one.
2013-03-13 08:06:41 +01:00
ahocevar
5b98769234 Merge pull request #896 from mosesonline/refresh-bugfix
Refresh bugfix
2013-03-01 07:02:35 -08:00
mosesonline
05227d32d0 [New] Tests for deactivation of refresh strategy 2013-03-01 12:52:18 +01:00
mosesonline
e1e11ab9c6 [BugFix] visibilitychanged listener is not unregistered on deactivation of Strategy/Refresh. 2013-03-01 12:44:29 +01:00
Tim Schaub
a1bf41a4de Merge pull request #886 from rauldobrota/patch-1
Create ro.js
2013-02-26 10:37:18 -08:00
Tim Schaub
7c10331a92 Merge pull request #890 from tschaub/utfgrid-backbuffer
Override createBackBuffer in UTFGrid layer.
2013-02-21 14:50:27 -08:00
Tim Schaub
7c4df5186f Test clean up 2013-02-21 12:19:34 -07:00
Tim Schaub
461c5c4328 Test that createBackBuffer doesn't fail 2013-02-21 12:17:55 -07:00
Tim Schaub
8e555dee56 Overriding createBackBuffer in UTFGrid layer
This layer doesn't need to create a backbuffer.
2013-02-21 12:12:12 -07:00
Tim Schaub
f1a79135b4 Chasing tiles 2013-02-21 11:31:41 -07:00
Tim Schaub
22db2a9f61 Update MapQuest tile URL templates 2013-02-20 13:33:04 -07:00
rauldobrota
007368fce5 Create ro.js
Language support for romanian users.
2013-02-18 23:39:56 -08:00
ahocevar
2f85ca99bf Remove osm layer when back in Vienna
Thanks @tschaub for this suggestion.
2013-02-17 12:53:59 +01:00
ahocevar
419cb272c7 Adding ZoomBox and OSM fallback layer
Using the new defaults, we don't need to pass options to the Navigation
control anymore. As a side effect, we get ZoomBox, but need to add css for
it to work properly. For users outside Vienna, an OSM fallback layer was
added which gets activated when the viewport does not intersect Vienna.
2013-02-16 10:32:35 +01:00
Tim Schaub
efdba65e0a Merge pull request #883 from tschaub/nicer-defaults
Setting `transitionEffect: "resize"` by default for `OpenLayers.Layer.Grid`.  Setting `enableKinetic: true` for `OpenLayers.Control.DragPan`.
2013-02-15 13:34:48 -08:00
Tim Schaub
fdb954100e Merge pull request #882 from tschaub/zoom-box
Restored zoom box behavior (thanks @ahocevar for the review).
2013-02-14 14:48:27 -08:00
Tim Schaub
a2896beafd As the comments mention, this assumes null transitionEffect 2013-02-14 15:26:05 -07:00
Tim Schaub
0cf9833362 Resize transitions by default 2013-02-14 15:18:07 -07:00
Tim Schaub
891cd35f60 Kinetic dragging by default 2013-02-14 15:17:55 -07:00
Tim Schaub
399c8ff643 Correct calculation of anchor for zooming
Quick explanation:

Let targetCenterPx be described by PX and PY.  Let oldRes and newRes be R0 and R1 respectively.  Let centerPx (center after zoom) be described by CX and CY.  And assume there is some anchored pixel point out there that represents the same map location before and after zoom.  Let this be the origin OX and OY.

We want to recenter the map on the provided box.  This means the map distance between the origin and box center at R0 is the same as the map distance between the origin and the map center at R1.

That is,

    R0 * (OX - PX) = R1 * (OX - CX), and
    R1 * (OY - PY) = R1 * (OY - CY)

Or, solving for OX and OY:

    OX = (R0 * PX - R1 * CX) / (R0 - R1), and
    OY = (R0 * PY - R1 * CY) / (R0 - R1)
2013-02-14 14:38:35 -07:00
Tim Schaub
1ac16835f2 If we are getting flipped top/bottom, let's correct it at the source 2013-02-14 14:27:00 -07:00
Tim Schaub
30c82bad45 For pixel bounds, the bottom is a larger value than the top
This still doesn't address the broken ZoomBox test (see #800), it fails in the same way with or without this change.
2013-02-14 14:25:01 -07:00
Tim Schaub
d32ab41292 Correcting misinformation 2013-02-14 14:25:01 -07:00
ahocevar
ba0ba64c74 Updating PinchZoom tests (see #800)
With the map's applyTransform method, the control does not need and have
its own applyTransform and center management any more.
2013-02-14 22:13:07 +01:00
Tim Schaub
e9eefc7a33 Fewer failing tests
There are still tests failing, but this change addresses some of the new failures after 4b163e0482 (which is an awesome improvement despite the test failures :).
2013-02-14 12:29:03 -07:00
Marc Jansen
4d7eaf4939 Merge pull request #866 from marcjansen/866
LayerSwitcher generate bad ID when layername has spaces in it. (r=@ahocevar)
2013-02-14 07:01:32 -08:00
ahocevar
e9b65691c4 Updating example to match @ahocevar's mobile-wmts-vienna branch 2013-02-14 10:44:41 +01:00
ahocevar
4b163e0482 Merge pull request #800 from ahocevar/transform
Use GPU where available; animated zooming. r=@elemoine
2013-02-14 01:15:18 -08:00
ahocevar
18b0c5fc7d Merge pull request #812 from ahocevar/mousewheel
Better mousewheel/touchpad behavior for zooming. r=@elemoine
2013-02-14 01:13:56 -08:00
ahocevar
d0249643b3 Incorporating @elemoine's review comments 2013-02-14 10:11:48 +01:00
Marc Jansen
465498b83a Use blank.gif as WMS-mockup URL in test. 2013-02-14 09:13:01 +01:00
Marc Jansen
73c5dbd8dc Only valid characters in generated ids. 2013-02-14 07:14:13 +01:00
ahocevar
f46ed44131 Merge pull request #857 from faegi/featureClickPatch
Clear cached mousedown/up positions used for distinguishing between (fix #856).
2013-02-12 01:46:30 -08:00
ahocevar
982302ff03 Merge pull request #877 from finn-no/panzoombar-fix
Fix click on PanZoomBar when page is scrolled (fix #798).
2013-02-11 23:58:41 -08:00
Gregers Gram Rygg
97c793281f Subtract page scroll from button position, since clientX/Y is relative to the viewport not page 2013-02-11 16:32:38 +01:00
Bart van den Eijnden
14bc72bcac Merge pull request #876 from bartvde/tilemgr-changelayer
the tileQueue is not always cleared, for instance when adding a layer in... (r=@ahocevar)
2013-02-08 06:17:12 -08:00
Bart van den Eijnden
09d1b9e8ca the tileQueue is not always cleared, for instance when adding a layer in GeoExplorer and then switching base layers, so make sure we also clear the tileQueue when the visibility of a layer changes 2013-02-08 14:02:20 +01:00
ahocevar
47d60a6ab8 Merge pull request #874 from ahocevar/tilemanager-backbuffer-id
Tile images should not have an id. r=@bartvde
2013-02-07 08:17:35 -08:00
ahocevar
7936f0345f Tile images should not have an id
When the TileManager adds an image to its cache, it might be a backbuffer
image. Backbuffer images have an id with a '_bb' postfix. Regular images
do not have an id at all. In OpenLayers.Layer.Grid, in
addTileMonitoringHooks, a loadend listener is created for each tile. This
listener checks for tie image id, and will remove it from its parent node.
This will cause images to be removed from the layerDiv if the image comes
from the TileManager's tileCache and was on a backbuffer by the time it was
added to the cache.

Simply removing the image's id before assigning it to a tile resolves the
issue.
2013-02-07 16:44:16 +01:00
Marc Jansen
661df3593d Merge pull request #873 from marcjansen/dangling-license-space
Remove dangling space in license header.
2013-02-07 06:44:49 -08:00
Marc Jansen
2a5e113126 Merge pull request #872 from marcjansen/wmsgfi-api
WMSGetFeatureInfo API enhancements
2013-02-07 02:16:39 -08:00
Marc Jansen
d417ba7c25 Adjust license header of WPSProcess.js. 2013-02-07 11:13:08 +01:00
Marc Jansen
716d85594c Adjust license header of WPSClient.js. 2013-02-07 11:13:01 +01:00
Marc Jansen
6c5ffb6930 Adjust license header of Animation.js. 2013-02-07 11:08:30 +01:00
Marc Jansen
0dc531794d Adjust license header of vendorPrefix.js. 2013-02-07 11:05:37 +01:00
Marc Jansen
5bfc4db4fb Give ArcGISCache layer a license header. 2013-02-07 11:05:37 +01:00
Marc Jansen
39a5aed5a6 Remove trailing whitespace. 2013-02-07 10:42:18 +01:00
Marc Jansen
a34e627b75 Remove dangling space in license header. 2013-02-07 10:33:20 +01:00
Marc Jansen
c5dbaf7cab Remove end-of-line whitespace.
The license header is left untouched, to keep it the same in all files.
A seperate commit will probably deal with this
2013-02-07 10:23:16 +01:00
Marc Jansen
d141ed60da Merge pull request #871 from marcjansen/measure-api
Measure API enhancements
2013-02-07 01:20:08 -08:00
Marc Jansen
70ea8f6588 Readd dangling space in header.
This allows for easier search and replace operations. The space will
eventually be removed in all files in a seperate commit.
2013-02-07 10:17:06 +01:00
Marc Jansen
a8d7d246e5 Reformat documentation to match surrounding doc. 2013-02-07 10:12:14 +01:00
Marc Jansen
14a3afb6cf Promote several properties to public API.
The properties

  * layers
  * queryVisible
  * url
  * layerUrls
  * infoFormat
  * vendorParams
  * format
  * formatOptions

should all be visible in the public API since they are essentially very
convenient to use when customizing the control.
2013-02-07 10:06:19 +01:00
Marc Jansen
9f7a0ed448 Remove end-of-line whitespace. 2013-02-07 09:52:26 +01:00
Marc Jansen
cbc705bdf7 Adjust method documentation. 2013-02-07 09:52:26 +01:00
Marc Jansen
23355abb42 Make 'geodesic' & 'displaySystem' API properties.
The geodesic-property is used inside of our examples, yet isn't officially
part of the public API.

The displaySystem-property provides a very useful way of configuring the
output of the measurements and should be promoted as well.
2013-02-07 09:52:12 +01:00
Tim Schaub
84e36dd573 Avoid touching the geolocation object until needed
IE9 leaks when `navigator.geolocation` is accessed (see #461).  The goal of this change is to avoid that leak in builds that include the Geolocate control but do not use it.
2013-02-04 15:46:45 -07:00
ahocevar
47e7c300a8 Merge pull request #863 from ahocevar/uncache
Uncache images that are no longer valid. r=@bartvde
2013-02-01 06:01:40 -08:00
ahocevar
378a0e97b5 Uncache images that are no longer valid
When a layer sets a cached image's className to something else than
.olTileImage (e.g. by setting .olTileReplacing), we should not keep the
image in the cache any more, because it may no longer be valid.
2013-02-01 00:58:40 +01:00
Éric Lemoine
69061d3f3d Merge pull request #861 from elemoine/stopevent
Make click handler propagate touchend
2013-01-30 06:58:39 -08:00
Éric Lemoine
c7a4045e88 Make click handler propagate touchend
This commit is a follow-up on issue #294 and commit a6119f6. Our handlers should not prevent the bubbling up of browser events. This, for example, prevents Sencha Touch's longpress events from working properly.
2013-01-30 15:25:34 +01:00
ejn
364d371f10 Add unit test for cleared cache, and adjust existing unit test which
assumed cached position
2013-01-28 16:16:16 +01:00
ejn
dea7438850 Clear cached mousedown/up positions used for distinguishing between
drag and click in feature handler after a click event.

Fixes #856
2013-01-28 10:14:51 +01:00
Bart van den Eijnden
4dd76e0c74 Merge pull request #852 from mpriour/agsCacheZoom
Don't hex encode zoom level in AGSCache layer (r=@bartvde)
2013-01-26 07:51:32 -08:00
Matt Priour
17930432c7 Don't hex encode zoom level in AGSCache layer 2013-01-22 10:06:28 -06:00
ahocevar
40f9296372 Merge pull request #850 from eykamp/irregular_character
Irregular character
2013-01-22 06:56:25 -08:00
Christopher Eykamp
c179c8493b Simplify pull request 2013-01-22 15:50:19 +01:00
Christopher Eykamp
da62be0137 Fix irregular character that Ruby/Rails objects to 2013-01-22 15:44:19 +01:00
Luiz Fernando Barbosa Vital
549c97063b Adjust language code from 'pt-br' to 'pt-BR'
Portuguese Brazilian translations were not loaded due to this.
2013-01-22 12:22:54 -02:00
Christopher Eykamp
5bb5530fd7 Added tests 2013-01-18 15:58:49 +01:00
Christopher Eykamp
459e38c2d6 Update tests 2013-01-18 15:54:38 +01:00
Christopher Eykamp
36fd417095 Merge remote-tracking branch 'upstream/master' 2013-01-18 15:40:25 +01:00
ahocevar
32d7e02ec0 Merge pull request #843 from ahocevar/early-loadend
Safeguard against listeners that recreate the grid. r=@bartvde
2013-01-17 07:30:22 -08:00
ahocevar
c742c14a52 Safeguard against listeners that recreate the grid
We need to handle the backbuffer before we fire the loadend event.
Otherwise listeners that call e.g. mergeNewParams() will cause the
backbuffer removal code to fail, because tile.imgDiv (and hence
this._transitionElement) will be null.
2013-01-17 16:24:15 +01:00
Christopher Eykamp
3bc16555a0 Merge branch 'master' of https://github.com/openlayers/openlayers 2013-01-16 18:40:27 +01:00
Bart van den Eijnden
0f9010cfb8 Merge pull request #840 from bartvde/clone
when cloning a layer that is loading, make sure numLoadingTiles is reset...
2013-01-16 07:29:06 -08:00
Bart van den Eijnden
d7f013ddbd when cloning a layer that is loading, make sure numLoadingTiles is reset to 0 on the clone 2013-01-16 16:26:51 +01:00
ahocevar
86c425774a Merge pull request #839 from ahocevar/tilemanager-changelayer
Process queue immediately when params change. r=@bartvde
2013-01-16 04:14:50 -08:00
ahocevar
e23c18a09c Process queue immediately when params change
This fixes an issue where the queue would never be processed when a layer
is updated using mergeNewParams.
2013-01-16 12:09:37 +01:00
ahocevar
2a7547c36c Merge pull request #836 from ahocevar/replacing
No .olTileReplacing class for singleTile layers. r=@bartvde
2013-01-16 02:48:26 -08:00
ahocevar
fde7c5cc76 After #829 fallThrough needs to be true for this test 2013-01-15 13:41:26 +01:00
ahocevar
2cd14dfbfd No .olTileReplacing class for singleTile layers
This fixes a regression for singleTile layers with transitionEffect set to
'resize', where the .olTileReplacing class was not removed from the tile.
2013-01-15 13:08:48 +01:00
Tim Schaub
e6c264286a Merge pull request #832 from perrygeo/2.12-perrygeo
guard against null tileInfo
2013-01-11 09:42:24 -08:00
ahocevar
3107751fb7 Clarifications on fallThorugh (see #829) 2013-01-10 22:12:35 +01:00
ahocevar
158185e9a2 Merge pull request #829 from bjornharrtell/fallThough
Default fallThrough to false
2013-01-10 13:08:21 -08:00
Björn Harrtell
58e33601ba Update notes/2.13.md 2013-01-10 22:00:48 +01:00
Björn Harrtell
aa6c5b8a35 Default fallThrough to false
Default behaviour in OpenLayers 2.12 is to swallow events, even though the documentation says otherwise.
2013-01-10 21:30:09 +01:00
Matthew Perry
b54faf222c guard against null tileInfo 2013-01-10 10:45:02 -08:00
ahocevar
774e983631 Turning on GPU for the tiles only turns out to be faster
Especially on iOS 6, this gives way better performance. And it does not
seem to cause any additional flicker.
2013-01-09 14:38:18 +01:00
ahocevar
9b7e35d1dd Merge branch 'master' of github.com:openlayers/openlayers into transform
Conflicts:
	theme/default/style.css
2013-01-09 14:31:52 +01:00
Bart van den Eijnden
443c715f51 Merge pull request #626 from mpriour/zeropad
Consolidate numeric zero padding functions (r=@bartvde)
2013-01-09 00:26:17 -08:00
Matt Priour
3b56053849 Use BaseTypes zeropad function in ArcGISCache tests 2013-01-08 14:00:35 -06:00
friedjoff
b92887e76d Remove unnecessary success check 2013-01-08 17:58:34 +01:00
friedjoff
b442f85bf4 Restore layer alias variable 2013-01-08 17:48:59 +01:00
friedjoff
83be3ff7e8 Restore layer alias variable 2013-01-08 17:41:59 +01:00
friedjoff
c1015d31e4 Restore arguments parameter to make function future-proof 2013-01-08 15:40:00 +01:00
friedjoff
77eefdbd55 Fix copyright date 2013-01-08 14:55:22 +01:00
friedjoff
88e184e7e5 Move detection of map procjection to merge function, check for successful response and fix tests. 2013-01-08 14:49:42 +01:00
ahocevar
6ce72e9185 Adding TileManager to mobile build profile, and note in Map.js
As suggested by @probins; see #702.
2013-01-08 14:26:18 +01:00
Tim Schaub
bbc73a21d8 Update copyright date 2013-01-07 22:01:16 -05:00
ahocevar
8b501eb051 Merge pull request #811 from ahocevar/mergenewparams
When the resolution does not change, remove backbuffer tile by tile. r=@bartvde
2013-01-07 13:45:53 -08:00
ahocevar
f0db21f9c9 Fixing tests 2013-01-07 18:16:23 +01:00
ahocevar
c8564838bc When the resolution does not change, remove backbuffer tile by tile
This change introduces a new 'replace' mode for tile transitions: when the
resolution does not change, which happens when mergeNewParams is called,
the tile will be marked with the .olTileReplace class. If this class sets
the tile's imgDiv display to 'none', the backbuffer for the tile will
immediately be removed when the tile is loaded.
2013-01-07 15:42:34 +01:00
ahocevar
18d548f979 Merge pull request #702 from ahocevar/smart-queue
New tile image cache and tile queue improvements. r=@bartvde,@elemoine
2013-01-07 06:38:07 -08:00
ahocevar
4a3651b7da Release notes and additional in-line comment
As suggested by @bartvde.
2013-01-07 15:30:05 +01:00
ahocevar
80f13188a3 Addressing @bartvde's review comments 2013-01-07 14:26:41 +01:00
Bart van den Eijnden
9adbf431ca clear the grid when we change from singleTile mode true to false or vice versa, discussed change with @ahocevar see #821 for the details 2013-01-07 13:25:15 +01:00
ahocevar
1eeda5d9f7 Merge pull request #823 from probins/maxextent
Overview map should use map.getMaxExtent
2013-01-07 00:56:05 -08:00
ahocevar
94020f0fb1 Merge pull request #822 from probins/mapmax
Map: correct docs for maxExtent
2013-01-07 00:55:22 -08:00
Peter Robins
dcaefea3cc Map: correct docs for maxExtent 2013-01-06 13:45:36 +00:00
Peter Robins
e8421fa923 Overview map should use map.getMaxExtent 2013-01-06 11:41:21 +00:00
Bart van den Eijnden
9dfc5870fb Merge pull request #821 from bartvde/singletile
ability to switch between singleTile true and false on the fly (r=@ahocevar)
2013-01-04 08:15:26 -08:00
Bart van den Eijnden
5b5415d6b7 fix indentation 2013-01-04 17:09:38 +01:00
Bart van den Eijnden
de4b995616 incorporate @ahocevar's review 2013-01-04 17:05:03 +01:00
Bart van den Eijnden
1e1ce54e5b add tests and finish off the functionality for switching between singleTile true and false 2013-01-04 15:10:48 +01:00
Bart van den Eijnden
5114ecbaee ability to switch between singleTile true and false 2013-01-04 14:29:07 +01:00
Bart van den Eijnden
193e2696ad fix undefined variable that breaks Closure (closes #819) 2013-01-04 11:11:40 +01:00
Bart van den Eijnden
bec34f2d3d Merge pull request #814 from eykamp/wcsdev
Add WCS GetCapabilities parsing for WCS 1.0.0 and 1.1.0 (r=@bartvde)
2013-01-02 08:40:34 -08:00
Christopher Eykamp
adba74b735 Remove blank line and trailing comma 2013-01-02 17:29:50 +01:00
Christopher Eykamp
fe799ddfff Add notes 2013-01-02 17:15:40 +01:00
Christopher Eykamp
f9bb64505b Add final LF 2013-01-02 17:12:51 +01:00
Christopher Eykamp
9c7f6e1de7 Add final LF 2013-01-02 17:10:02 +01:00
Christopher Eykamp
54c5656df5 Add final LF 2013-01-02 17:08:57 +01:00
Christopher Eykamp
0a93154f32 Remove trailing commas 2013-01-02 17:05:54 +01:00
Christopher Eykamp
91bf459ab2 Tactical retreat from dot notation 2013-01-02 17:04:16 +01:00
Christopher Eykamp
ed6a32cea7 Fix @requires 2013-01-02 16:52:17 +01:00
Christopher Eykamp
730415aa74 Update @requires 2013-01-02 16:49:53 +01:00
Christopher Eykamp
951da38e80 Add @requires 2013-01-02 16:48:32 +01:00
Christopher Eykamp
d0af8726d3 Remove this file properly 2013-01-02 16:26:55 +01:00
Christopher Eykamp
ff4e6fc8d7 git acting strangely 2013-01-02 16:26:24 +01:00
Christopher Eykamp
d720090310 Reduce vertical whitespace 2013-01-02 16:05:06 +01:00
ahocevar
f71976b487 Merge pull request #818 from Turbo87/encoded-polyline
examples/vector-formats: Added "Encoded Polyline" format
2013-01-02 07:03:12 -08:00
Christopher Eykamp
a215f362cc Remove call to applyDefaults 2013-01-02 15:46:35 +01:00
Christopher Eykamp
76aa10c52c Add trailing LF 2013-01-02 15:42:46 +01:00
Christopher Eykamp
c8e0ba5544 Reduce vertical whitespace 2013-01-02 15:42:03 +01:00
Christopher Eykamp
3f9461e91c Update terminology 2013-01-02 15:39:55 +01:00
Christopher Eykamp
c9dbc33649 Remove all traces of Protocol/WCS 2013-01-02 15:38:27 +01:00
eykamp
9788133b03 Update notes/2.13.md 2013-01-02 15:36:17 +01:00
Christopher Eykamp
673f0d9a99 Remove unused commented code 2013-01-02 15:35:00 +01:00
Christopher Eykamp
8193f309dc Update comment/documentation 2013-01-02 15:28:31 +01:00
Christopher Eykamp
ddc6bd817d Prefer dot notation 2013-01-02 14:36:04 +01:00
Christopher Eykamp
f06931b1b7 Update source of sample XML 2013-01-02 14:32:02 +01:00
Christopher Eykamp
b15c751808 Reuse GML pos reader -- something looks not quite right here, but it does work 2013-01-02 14:21:30 +01:00
Christopher Eykamp
37fd98bb03 Move WCS_Capabilities reader into v_1_0_0 class 2013-01-02 13:41:34 +01:00
Christopher Eykamp
eb4bbff8f4 Reinstate deleted comment block 2013-01-02 13:25:15 +01:00
Christopher Eykamp
abd733865b Reference OWS 1.1.0 readers 2013-01-02 13:21:43 +01:00
Christopher Eykamp
a8ae30079e Forgot this somehow... the missing WCS.js file 2013-01-02 13:01:45 +01:00
Christopher Eykamp
008c7d582e Update test to reflect changes in last commit 2013-01-02 12:51:52 +01:00
Christopher Eykamp
15138605c3 Rename contents to contentMetadata to maintain some sort of continuity between WCS 1.0.0 and 1.1.0 2013-01-02 12:48:55 +01:00
Christopher Eykamp
f7605dcb66 Reformat to 80 cols 2013-01-02 12:44:57 +01:00
Christopher Eykamp
d3345a58b1 Whitespace 2013-01-02 12:42:56 +01:00
Christopher Eykamp
5f2c3803f4 Correct comment about inheritance 2013-01-02 12:42:28 +01:00
Christopher Eykamp
57e833d71f Move comment to shorten line 2013-01-02 12:26:51 +01:00
Christopher Eykamp
0a639404c4 Convert APIProperty to Property 2013-01-02 12:26:13 +01:00
Christopher Eykamp
b076dd8041 Remove comment block referring to constructor -- not needed for abstract class 2013-01-02 12:14:19 +01:00
Christopher Eykamp
e40034521b Comments 2013-01-02 12:12:04 +01:00
Christopher Eykamp
543a5f6881 Remove line break 2013-01-02 12:10:54 +01:00
Christopher Eykamp
700b036c1b Remove unneeded WCS protocol lines 2013-01-02 12:09:45 +01:00
Tobias Bieniek
f92f0ad02e examples/vector-formats: Added "Encoded Polyline" format 2013-01-01 20:01:10 +01:00
Stéphane Brunner
fa14b94570 Merge pull request #817 from sbrunner/wmts-restful
Add RESTful compatibility support, r=@marcjansen
2012-12-31 06:38:20 -08:00
Stéphane Brunner
0915fb72a2 Add RESTful compatibility support 2012-12-31 15:35:38 +01:00
ahocevar
b57540ecfc Merge pull request #813 from Turbo87/encoded-polyline
Format: Added EncodedPolyline class. Merging this as a first step towards
support for alternative geometry encodings. See #813 for TBDs.
2012-12-28 11:55:12 -08:00
Tim Schaub
75423660d8 Merge pull request #815 from Turbo87/wkt
Small Format.WKT code cleanup
2012-12-28 11:38:01 -08:00
Tobias Bieniek
06bd07ff8d EncodedPolyline: Added write() method 2012-12-28 20:24:57 +01:00
Tobias Bieniek
69d759635f WKT: Removed unused variables from write() method 2012-12-28 19:30:50 +01:00
Tobias Bieniek
60a02e343b WKT: Added APIMethod keywords to documentation 2012-12-28 19:30:47 +01:00
Tobias Bieniek
06409da72e EncodedPolyline: Added APIMethod keywords to documentation 2012-12-28 19:14:30 +01:00
Tobias Bieniek
510d42b12f EncodedPolyline: Added encode() method
The write() method will follow in the next commit.
2012-12-28 01:31:24 +01:00
Tobias Bieniek
8651e05e75 EncodedPolyline: Allow setting geometryType to "point 2012-12-27 23:19:44 +01:00
Tobias Bieniek
c118d9884d EncodedPolyline: Extracted universal decode(encoded, dims) method 2012-12-27 23:09:08 +01:00
Tobias Bieniek
2c5d4c75d4 EncodedPolyline: Merged duplicate code in read() method
This patch also prepares the code for making it possible to read encoded
strings with multi-dimensional points.
2012-12-27 23:09:08 +01:00
Tobias Bieniek
aedafc0336 EncodedPolyline: Added geometryType attribute
This makes it possible to read polygons or multipoints too. Since the
encoded format is just a list of points the reader needs to be told what
Feature to create from the encoded list.

The example code is edited to reflect that API extension.
2012-12-27 23:09:08 +01:00
Tobias Bieniek
88a3091a90 examples: Added example for the EncodedPolyline Format class 2012-12-27 19:49:49 +01:00
Christopher Eykamp
49ff1b44ea Whitespace 2012-12-27 15:43:33 +01:00
Christopher Eykamp
16981a8afa Remove unneeded files 2012-12-27 15:38:01 +01:00
Christopher Eykamp
0e9691c628 Remove unused readers 2012-12-27 14:40:28 +01:00
Christopher Eykamp
be7c55f432 Added full suite of wcs 1.1.0 tests, all are passing 2012-12-27 14:28:46 +01:00
Christopher Eykamp
a8f1c76811 Whitespace 2012-12-27 13:48:38 +01:00
Christopher Eykamp
5a19c74604 Whitespace 2012-12-27 13:47:37 +01:00
Christopher Eykamp
809ecb1155 Remove uneeded readers from WCS 1.0.0 2012-12-27 13:47:16 +01:00
Christopher Eykamp
b6c2c26580 WCS parsing working properly, but needs more tests; moved errorProperty down to parser, where it arguably belongs, and where it has to live to work with WCS. Also removed null error property on versionedOGC. 2012-12-27 13:29:02 +01:00
Tobias Bieniek
63a9567858 Format: Added EncodedPolyline class
This class is able to convert an encoded polyline string into a LineString embedded in a Vector Feature.

See https://developers.google.com/maps/documentation/utilities/polylinealgorithm for more information.
2012-12-26 18:25:04 +01:00
Christopher Eykamp
8ff05cdeac WCS 1.1.0 parsing correctlyy; error property still not correctly set so parsing reports errors. 2012-12-24 18:19:42 +01:00
ahocevar
4b2e80fa36 Merge pull request #805 from mosesonline/unselectAllFix
unselectAll on removing layer fix
2012-12-24 06:17:04 -08:00
ahocevar
07e039b566 Merge pull request #803 from ahocevar/tween-framerate
Tween: skip frames when minimum frame rate is not reached. r=@bartvde
2012-12-24 06:11:11 -08:00
Bart van den Eijnden
2dfc23e217 Merge pull request #806 from eykamp/master
Identify and fix bug with WFS 1.1.0 (r=@bartvde,@ahocevar)
2012-12-24 05:35:14 -08:00
ahocevar
1b2003a2b4 Recovering from merge conflicts 2012-12-23 19:18:26 +01:00
ahocevar
21448d2fd5 Adding animated zooming 2012-12-23 18:47:03 +01:00
ahocevar
d2b3bded72 Better way to get GPU support, and avoid flicker
These declarations were suggested on
http://blog.teamtreehouse.com/increase-your-sites-performance-with-hardware-accelerated-css
2012-12-23 18:34:55 +01:00
ahocevar
afe53aba7d Put backbuffer below all layers, except when panning 2012-12-23 18:34:55 +01:00
ahocevar
0b8deb11a2 Revert "No backbuffer removal delay needed with 3d enabled"
This reverts commit 7e8271525ed52288092a135b1c65eed4849c8e49.
2012-12-23 18:34:55 +01:00
ahocevar
aa5bab250a 3d transforms in svg content are bad in other browsers as well 2012-12-23 18:34:54 +01:00
ahocevar
a309b24053 Only use 3d transforms when stylesheet has transform on layerContainerDiv
This allows users to control whether 3d acceleration should be used or not:
Just like with plain web pages, having a stylesheet that sets a transform
on the map's layerContainerDiv will make OpenLayers use translate3d and
scale3d. When no such transform is set in the stylesheet, style.left and
style.top will be used, except for e.g. pinch zoom, where scaling is
needed.
2012-12-23 18:34:54 +01:00
ahocevar
13b4ca6560 Do not set translate3d on svg children
In current Webkit browsers, having translate3d on svg child elements
causes the positioning from the layer not to be inherited by the vector
layer content.
2012-12-23 18:34:54 +01:00
ahocevar
b89d3f1ee8 Going one element up with GPU support, adding it to mobile css also 2012-12-23 18:34:54 +01:00
ahocevar
c03f1dc9bf Own applyTransform method is no longer needed 2012-12-23 18:34:53 +01:00
ahocevar
25c8b0ceaf Adding transforms to turn on GPU 2012-12-23 18:34:53 +01:00
ahocevar
980792e190 GPU needs to be turned on for all elements we move 2012-12-23 18:34:53 +01:00
ahocevar
3d79001a92 Updating and adding tests 2012-12-23 18:34:53 +01:00
ahocevar
3ab9a1f63b No closure, to make testing easier 2012-12-23 18:34:52 +01:00
ahocevar
f51211e93f No magic for loadend delay
This change reintroduces the removeBackBufferDelay, and documents exactly
what it does and when it may be useful.
2012-12-23 18:34:52 +01:00
ahocevar
1764bbdd18 Giving the last tile time to render
The loadend event of an image is fired before the image is rendered. For
standard 256x256 tiles, this does not matter. But for singleTile layers on
large screens, rendering time needs to be considered. So we add a delay
that depends on the tile size. TODO: make the denominator configurable.
2012-12-23 18:34:52 +01:00
ahocevar
a02163f01d No backbuffer removal delay needed with 3d enabled 2012-12-23 18:34:52 +01:00
ahocevar
eb65336fa9 Adding docs, removing console.log 2012-12-23 18:32:27 +01:00
ahocevar
64d291ea20 Turn on GPU support for all children of the layerContainerDiv
This seems to remove all kinds of flicker and jumpiness, and to me it feels
also like it makes panning on slow mobile devices smoother.
2012-12-23 18:32:26 +01:00
ahocevar
44f28f8791 Use translate3d and translate where available. 2012-12-23 18:32:26 +01:00
ahocevar
1081fc4b54 Better mousewheel/touchpad behavior for zooming
The navigation control gets better defaults, and the MouseWheel handler
gets a new maxDelta option, which can be used to avoid huge zoom level
jumps on heavy wheel/pad movements.
2012-12-23 18:01:17 +01:00
ahocevar
efd2de870a Recovering from merge conflicts 2012-12-23 17:24:20 +01:00
ahocevar
64177a52ec Enable fade-in for tiles from cache when we have a backbuffer 2012-12-23 17:00:47 +01:00
ahocevar
a02e08ad2a New beforeload event and slightly changed loading sequence
Having the TileManager remove an image from the DOM, then setting the
cached image, and then having to position it felt a bit awkward. With the
new beforeload event, the setImage method and putting renderTile before
positionTile, providing the cached image feels way more natural.
2012-12-23 17:00:46 +01:00
ahocevar
64df7e3d04 Remove images from dom when replacing them with cached images 2012-12-23 17:00:46 +01:00
ahocevar
faa0e60b99 512 tiles is too much for some mobile browsers 2012-12-23 17:00:46 +01:00
ahocevar
c0913668d3 moveTimerId is no longer used 2012-12-23 17:00:45 +01:00
ahocevar
ecbedf5536 Updating tests 2012-12-23 17:00:45 +01:00
ahocevar
273657a6ab Adding API docs for the tileManager property 2012-12-23 17:00:45 +01:00
ahocevar
781f2ac73d Configure maps with TileManger instances (and not the other way around)
This resolves issues with destroying caches on window unload, and makes
cache sharing among maps less confusing to configure.
2012-12-23 17:00:45 +01:00
ahocevar
9609bb1449 Adding destroy method, as suggested by @bartvde 2012-12-23 17:00:45 +01:00
ahocevar
80fa251649 New TileManager
This removes all tile queueing/loading specific code from Layer.Grid
and creates a new class that manages tile loading and caching.
2012-12-23 17:00:45 +01:00
ahocevar
2ee362a79b New tile image cache and tile queue improvements
We now reuse tile images by maintaining a cache of image elements with a
simplified LRU expiry policy (by order, not by timestamp). The tile queue
is bypassed for images that are available in the cache, so they can be
rendered immediately. And the tile queue itself loads more than just one
image at a time now (2 per layer url).
2012-12-23 16:57:24 +01:00
ahocevar
9759902dac Fixing API; addressing @mpriour's doc comment
Previously, minFrameRate could not be set as option with the start method.
The tests failed to catch this flaw. Now both the start method and the
tests are fixed.
2012-12-21 21:24:04 +01:00
Christopher Eykamp
d0986de775 WCS 1.0.0 parsing now passing all tests 2012-12-21 18:51:39 +01:00
Christopher Eykamp
5c07ae47bb WCS testing more-or-less working, many tests failing, as expected 2012-12-21 13:15:01 +01:00
ahocevar
810d9ea95d Fixing line breaks. 2012-12-21 13:10:26 +01:00
ahocevar
c6aa104462 Merge pull request #810 from ahocevar/transitionend
Use transitionend listeners where available. r=@bartvde
2012-12-21 04:08:29 -08:00
ahocevar
fcd8586883 Using an array for the transitionend event names 2012-12-21 13:07:36 +01:00
ahocevar
43c646b6da Use new Opera event name as well
As pointed out by @bartvde, according to
http://stackoverflow.com/questions/5819912/webkit-transition-end-in-mozilla-and-opera,
Opera uses otransitionend or oTransitionEnd, depending on the version.
2012-12-21 13:01:15 +01:00
ahocevar
dd244e6988 Use transitionend listeners where available
In addition to relying on removeBackBufferDelay, we can remove the
backbuffer earlier without flicker in an ontransitionend listener on the
last loaded tile.
2012-12-21 12:33:28 +01:00
ahocevar
86db8fabc6 Merge pull request #807 from ahocevar/units
WMTS Example misaligning with OSM base layer. r=@sbrunner
2012-12-20 14:35:57 -08:00
ahocevar
fc64b2c5f8 Fixing tests properly, as suggested by @sbrunner 2012-12-20 16:30:58 +01:00
mosesonline
ef028b1e91 Update lib/OpenLayers/Control/SelectFeature.js
indentation fixed and added comment to explain null case
2012-12-20 08:55:21 +01:00
ahocevar
f5d7f794c9 Some tweaks to make tests pass again 2012-12-19 23:13:11 +01:00
ahocevar
893966dfae 'm' and 'Meters' in OpenLayers.INCHES_PER_UNIT are not the same
OpenLayers.INCHES_PER_UNIT.m should equal
OpenLayers.INCHES_PER_UNIT.Meters, just like OpenLayers.INCHES_PER_UNIT.km
should equal OpenLayers.Inches_PER_UNIT.Kilometers. This confusion probably
comes from mixing International inches with US Survey inches when compiling
the unit conversion list (1 meter is 39.37007874 International inches, but
39.37 US Survey inches. It may not be obvious, but 'inches'/'Inch' in
OpenLayers means US Survey inch, and 'IInch' means International inch).

This change also fixes offsets caused by incorrect resolution calculations in
OpenLayers.Format.WMTSCapabilities.
2012-12-19 22:23:45 +01:00
Christopher Eykamp
6c5119455d Basic WCS testing in place. Tests are basically meaningless at this point. 2012-12-19 18:11:14 +01:00
Christopher Eykamp
2a21d61400 Change errorProperty to fix bug; now passes all tests 2012-12-19 11:19:56 +01:00
Christopher Eykamp
2c6b8aefcf Improve added error tests 2012-12-19 10:49:16 +01:00
Christopher Eykamp
a2c161be08 Revert error message change 2012-12-19 10:45:25 +01:00
Christopher Eykamp
428335fd0d Even more sensible error message 2012-12-19 10:32:19 +01:00
Christopher Eykamp
7790a0a9b6 More sensible error message 2012-12-19 10:31:42 +01:00
mosesonline
0263b2b5e1 [Change] renamed test and added print of error 2012-12-18 09:47:33 +01:00
mosesonline
7aed43185b [BugFix] Added tests for handle destroyed layer in SelectFeature. 2012-12-18 09:43:22 +01:00
mosesonline
0cdb3aeb52 [BugFix] Fix selectFeatures is null exception when layer is destroyed. Since you can listen only to preremovelayer to handle removing layer with SelectFeature. But preremovelayer is triggered after selectFeatures is set to null. 2012-12-18 09:34:48 +01:00
Pierre GIRAUD
b404ca0a7a Merge pull request #802 from pgiraud/pinch_preserve_center_
Pinch preserve center
2012-12-18 00:20:18 -08:00
Christopher Eykamp
2478e2311f Update number of tests, add comment 2012-12-17 18:33:19 +01:00
Christopher Eykamp
f4be1d138c Add test that demonstrates bug in WFS 1.1.0 parsing 2012-12-17 18:08:23 +01:00
ahocevar
f0f1ea0867 Skip frames when minimum frame rate is not reached
The new minFrameRate option is used to make sure that an animation does not
run longer than the time calculated from that frame rate. Time is made up
by skipping frames, i.e. skipping execution of the eachStep callback.
2012-12-17 14:54:08 +01:00
Pierre GIRAUD
c9fa5aabad Merge pull request #801 from pgiraud/map_movestart_zoomchanged
Send zoomChanged value when triggering movestart event
2012-12-17 04:56:32 -08:00
Pierre GIRAUD
6c21c2043f Completing the doc strings 2012-12-17 13:55:32 +01:00
Pierre GIRAUD
d0c85850f5 More detailed documentation 2012-12-17 13:43:16 +01:00
Pierre GIRAUD
06597f1897 Missing var 2012-12-17 13:23:10 +01:00
Pierre GIRAUD
69580cd698 Don't change the example 2012-12-17 12:56:09 +01:00
Pierre GIRAUD
00c3ca47c0 Adding test for new preserveCenter option 2012-12-17 11:56:33 +01:00
Pierre GIRAUD
0a131f380a Adding preserveCenter config option 2012-12-17 11:56:18 +01:00
Pierre GIRAUD
ee5796cb78 Send zoomChanged value when triggering movestart event 2012-12-17 11:45:10 +01:00
ahocevar
257b249b9d Updating notes after 84cf468 2012-12-14 09:35:15 +01:00
ahocevar
84cf468a22 Use http protocol for non-http (i.e. file) URIs (see #700) 2012-12-14 09:30:13 +01:00
ahocevar
083fcca882 Fixing tests (see #700) 2012-12-14 09:07:26 +01:00
ahocevar
ab5035ba05 Note about Bing protocol change (see #700) 2012-12-14 01:28:21 +01:00
ahocevar
bb788fdd0b Merge pull request #700 from rjmackay/bing-maps-ssl-699
Make Bing maps use SSL (if current document does)
2012-12-13 16:23:54 -08:00
Robbie Mackay
ec5df48d01 Add unit test for OpenLayers.Layer.Bing.protocol
* Test that attribution logo uses correct protocol
* Test that tile urls use correct protocol
2012-12-14 12:34:26 +13:00
Robbie Mackay
3189a473fb Fetch Bing map tiles and logo over HTTPS if document uses https
The Bing REST api still returns HTTP urls in meta data even if
we hit the API over SSL. This replaces http:// with // to
avoid any SSL browser errors.

Default to replacing with // but can force http: or https: with the
protocol parameter
2012-12-14 12:13:24 +13:00
mosesonline
9ea9b85988 Revert "[New] raise feature function to move features in layer."
This reverts commit cb1c3a834a.

the drawing order is controlled by Renderer not the Layer classes
2012-12-11 07:27:09 +01:00
ahocevar
7061cbf0fa Merge pull request #787 from ahocevar/mousewheel-event
Wheel handler does not work on IE when interval is set. r=@bartvde
2012-12-10 14:02:58 -08:00
Tim Schaub
0d78dda8c4 Additional test for filter parsing
This confirms that literals are properly parsed when they have text node siblings (see #794).
2012-12-10 08:59:03 -07:00
ahocevar
e295e3b70f Merge pull request #788 from ahocevar/no-opacity
Rework of Google layer leads to map div transparency. r=@bartvde
2012-12-10 00:49:54 -08:00
ahocevar
e2dcfb7965 Merge pull request #791 from ahocevar/google-tilesloaded
Do not add viewport to GMaps object before it is fully rendered. r=@bartvde
2012-12-10 00:48:30 -08:00
Tim Schaub
3d777cd263 Merge pull request #790 from justb4/master
Atom.js: typo in Polygon parsing causes empty GeoRSS Polygon geometry (closes #789)
2012-12-08 12:02:18 -08:00
ahocevar
6724098f5b Notes about Google.v3 layers (see #484) 2012-12-08 20:10:52 +01:00
ahocevar
ab53f7c311 Do not add viewport to GMaps object before it is fully rendered
This avoids issues with Elements renderers, where the nodeFactory method
cannot find nodes while the map viewport is transitioning from the mapDiv
to the googleControl.
2012-12-08 14:53:48 +01:00
Just van den Broecke
1225c817b4 Fix typo causing empty Polygon geometry
See OpenLayers issue 789, var 'points' needs to be passed, not 'components' at line 649.
2012-12-08 14:44:45 +01:00
ahocevar
64508c741e Avoid transparent OpenLayers content on top of Google layer 2012-12-08 01:53:44 +01:00
ahocevar
c36b897878 Removing unused code
Because this method is called by OpenLayers.Function.bindAsEventListener,
which conditionally assigns window.event already, e cannot be null or
undefined here.
2012-12-07 21:10:20 +01:00
ahocevar
8701a54603 Cloning event for use in delayed function
In IE, where window.event is used, the event can change during the delay.
To avoid this, we store the event properties in a new object.
2012-12-07 21:09:09 +01:00
mosesonline
5bffb3dea3 Update lib/OpenLayers/Handler/Feature.js
simplify code a little
2012-12-07 12:46:28 +01:00
ahocevar
1b1e90c268 Merge pull request #484 from ahocevar/484
Rework Google layer. r=@bartvde
2012-12-06 02:48:55 -08:00
ahocevar
978cb4be9f Only create Google control once
The control div is now an empty container that we can always append to and
remove from without having to worry about GMaps changing styles on it. It
also makes sure that the control is appended before Google's own
attribution control, so the "Report a map error" link will always be
clickable.
2012-12-06 11:44:49 +01:00
ahocevar
d75e3ecac9 Removing google.css from other examples and tests 2012-12-06 10:35:03 +01:00
ahocevar
00d9664b95 No longer touching internal GMaps DOM elements.
Simple and effective: As soon as a map has a Google layer, the whole map viewport is added as control to the GMap. As soon as no Google layer is visible on the map any more, the map viewport is appended to the map container again. With this change, OpenLayers strictly limits its GMaps integration to the GMaps API.

Also note that there are no css overrides for the attribution any more. Instead, controls can now be conditionally positioned differently for Google layer by using the .olForeignContainer selector.
2012-12-06 10:35:03 +01:00
Frédéric Junod
6075b599f3 Merge pull request #786 from probins/xyztypo
XYZ: fix typo
2012-12-05 05:59:05 -08:00
Peter Robins
8a4bf871f1 XYZ: fix typo 2012-12-05 13:54:43 +00:00
Éric Lemoine
b5364727a2 Merge pull request #785 from finn-no/pinch-zoom-fix-issue778
Fix for Issue #778 as suggested by elemoine
2012-12-04 08:09:12 -08:00
Gregers Gram Rygg
262153eecc Fix for Issue #778 as suggested by elemoine 2012-12-04 16:58:40 +01:00
ahocevar
df6e0a0846 Easier workaround for border image squeezing issue 2012-12-04 14:10:33 +01:00
ahocevar
470cce73ab Merge pull request #775 from ahocevar/wmts-resolutions
Fix regression introduced by #732. r=@sbrunner
2012-11-28 05:50:22 -08:00
ahocevar
1cc07232a7 Fixing regression introduced by #732
Now that serverResolutions are set for all layers, we need to generate
resolutions also for non-baselayers.
2012-11-28 07:12:29 -06:00
Antoine Abt
9ddd3d3ed9 Merge pull request #769 from tonio/noimportant
Avoid !important when not needed. img.olTileImage is precise enough to override boostrap’s rule.
2012-11-26 00:02:26 -08:00
Antoine Abt
862a53ddaf Avoid !important when not needed.
This css selector is sufficient to override bootstrap’s one.
2012-11-26 08:54:02 +01:00
Bart van den Eijnden
eef879c152 Merge pull request #767 from bartvde/projdefaults
make sure we do not fail if OpenLayers.Projection.defaults has not been set (r=@ahocevar) thanks @pvgenuchten for the report
2012-11-23 06:08:32 -08:00
Bart van den Eijnden
663ba16b59 make sure we do not fail if OpenLayers.Projection.defaults has not been set for a custom projection 2012-11-23 13:26:26 +01:00
Bart van den Eijnden
1d3eb0e60c Merge pull request #763 from bartvde/insertresult
WFST 1.0.0 InsertResult not read correctly (r=@pgiraud) thanks Pierre for the quick review and thanks to @fgravin for the detailed bug report
2012-11-23 03:39:48 -08:00
Bart van den Eijnden
195352c403 make sure we can have multiple feature ids in InsertResults 2012-11-21 13:08:37 +01:00
Bart van den Eijnden
ec294af55a Merge pull request #762 from bartvde/schema
parse annotation from WFS DescribeFeatureType schemas (r=@ahocevar)
2012-11-20 08:07:29 -08:00
ahocevar
c48458faa5 Merge pull request #760 from ahocevar/wmscaps-scalehint
Correct handling of 0 and Infinity ScaleHint. r=@marcjansen
2012-11-20 08:01:48 -08:00
ahocevar
5273d63f3a Documenting ScaleHint parsing, as suggested by @marcjansen 2012-11-20 17:01:08 +01:00
Bart van den Eijnden
52d69ecfda documentation is also an array, and lang is optional thanks @ahocevar for the catch 2012-11-20 16:48:50 +01:00
Bart van den Eijnden
cbd9a90477 appinfo can be specified multiple times, so use an array instead thanks @ahocevar 2012-11-20 16:42:06 +01:00
Bart van den Eijnden
f410cd7e41 remove JSON parsing from format, applications should handle this, as suggested by @ahocevar 2012-11-20 16:36:12 +01:00
Bart van den Eijnden
14f009e2f7 parse annotation from WFS DescribeFeatureType schemas 2012-11-20 15:48:48 +01:00
Marc Jansen
5febfbc8ff Merge pull request #761 from marcjansen/owsc-inlinegeometry
Fix exporting empty vector layers to OWSContext (p=me,@chrismayer;r=@bartvde).
2012-11-20 04:42:30 -08:00
Marc Jansen
13584d7319 Reuse variable, thanks @bartvde. 2012-11-20 13:39:27 +01:00
Marc Jansen
798d2b2cb7 Fix exporting empty vector layers to OWSContext.
When a vector layer is exported to an OWSContext document, we throw an
exception when the layer contains no features, and the geometries are to be
exported inside of an InlineGeometry-element.

This commit fixes this behaviour by exporting sth. like this in such cases:

<Layer name="vector" hidden="0">i
  <ows:Title xmlns:ows="http://www.opengis.net/ows"/>
  <InlineGeometry/>
</Layer>
2012-11-20 10:38:25 +01:00
ahocevar
cbc4f4e422 Correct handling of 0 and Infinity ScaleHint
minScale and maxScale values of 0 and Infinity do not make sense in
OpenLayers, but they are used in WMS GetCapabilities 1.1.1 to indicate
that there is no minScale or maxScale restriction. Assuming that the
capability values for minScale and maxScale are passed as config options
to a WMS layer, it is better to not set minScale and maxScale when 0 or
Infinity are found in the ScaleHint.
2012-11-16 17:31:45 +01:00
Tim Schaub
12046503ca Merge pull request #435 from tschaub/kind-transform
Stay on the world when transforming coords.
2012-11-14 11:26:11 -08:00
Bart van den Eijnden
1f229ba275 Merge pull request #757 from bartvde/ajax
make sure config.headers does not overwrite DEFAULT_CONFIG.headers in OpenLayers.Request.issue (r=@ahocevar)
2012-11-13 07:15:12 -08:00
Bart van den Eijnden
3265b0e73f Make sure config.headers does not overwrite DEFAULT_CONFIG.headers in OpenLayers.Request.issue 2012-11-13 16:12:14 +01:00
Tim Schaub
57e22ef491 Merge pull request #755 from tschaub/bootstrap-css
Making OpenLayers play well with Bootstrap
2012-11-09 16:51:55 -08:00
Tim Schaub
fa740a42a9 Making OpenLayers play well with Bootstrap
Bootstrap CSS sets the max-width for images to 100%.  This makes it so
OpenLayers maps don't render (the layer container has 0 width, so all images
are given the same).  Even if our layer container had a more sensible width
(e.g. 100% of the viewport), we would still have issues with tiles that are
larger than the viewport.

Since the OpenLayers stylesheet may be loaded before or after bootstrap.css,
we should use !important when setting the max-width to none for images we
control.
2012-11-09 15:05:18 -07:00
ahocevar
7530751d98 Merge pull request #747 from ahocevar/wpsexecute-mixin
Filter.v1 methods need to be available when using Filter writers. r=@bartvde
2012-11-07 09:51:07 -08:00
ahocevar
a2fe036e2c Filter.v1 methods need to be available when using Filter writers
Format classes that define member methods need to be mixed into other
format classes that use their writers. In this case, methods from
Filter.v1 were missing so a test for Format.WPSExecute failed.
2012-11-07 18:14:56 +01:00
ahocevar
d431b504bd Missing change that should have gone in with #705 2012-11-07 16:54:26 +01:00
ahocevar
4f5bcdbe76 Fixing mock 2012-11-07 16:25:34 +01:00
Bart van den Eijnden
575301ad32 Merge pull request #746 from bartvde/loadend
when using BBOX or Fixed strategies, pass on the filter used in the request to the loadstart event (r=@ahocevar,@elemoine)
2012-11-07 02:57:26 -08:00
Bart van den Eijnden
8cc0cdc6a1 incorporate suggestions by @ahocevar and @elemoine 2012-11-07 11:56:04 +01:00
Bart van den Eijnden
a4df9a871b when using BBOX or Fixed strategies, pass on the filter used in the request to the loadstart event. This is mostly important in the case of BBOX, since there is no other way to get the filter used in the request. An example use case is doing a hitCount request using the same filter to find out the true number of features matched on the server-side 2012-11-07 11:43:18 +01:00
Bart van den Eijnden
c420fc6aad fix up Strategy.BBOX tests 2012-11-06 15:14:22 +01:00
Éric Lemoine
7ecbce28aa Merge pull request #742 from finn-no/scroll-touch-fix
Fixed problems with touch events on a scrollable page
2012-11-06 06:04:07 -08:00
Gregers Gram Rygg
7b1bc2a675 Removed Event from doc, since it's not being used 2012-11-05 23:15:53 +01:00
Gregers Gram Rygg
6e18d0e254 Added comment about olMochWin 2012-11-05 23:08:42 +01:00
Gregers Gram Rygg
4842c9e572 Renamed _mochWin to olMochWin 2012-11-05 23:04:32 +01:00
Gregers Gram Rygg
0fbe28a348 Removed debugger statement 2012-11-05 22:31:15 +01:00
ahocevar
a54ecca32b Merge pull request #705 from ahocevar/animation
Remove complexity from the image loading sequence. r=@elemoine,@tschaub
2012-11-05 10:33:59 -08:00
ahocevar
5a3bcc716b Not using requestAnimationFrame
Using the Timeline tab of the Chrome Developer Tools, no significant
difference of Paint events can be observed when requestAnimationFrame is
used. So I agree with @elemoine that there is no need to introduce
asynchronous behavior here.
2012-11-05 17:28:10 +01:00
Bart van den Eijnden
b45f903198 Merge pull request #744 from bartvde/cqlnull
add support for OpenLayers.Filter.Comparison.IS_NULL in CQL format (thanks @elemoine for the review)
2012-11-05 06:42:38 -08:00
Bart van den Eijnden
703e0a2ca1 make it clear with docs that maxFeatures can be specified on Protocol.WFS (non-functional change) 2012-11-05 15:31:08 +01:00
Bart van den Eijnden
31b4c39b5b Merge branch 'master' of github.com:openlayers/openlayers 2012-11-05 15:27:55 +01:00
Bart van den Eijnden
41ac2dea08 add support for OpenLayers.Filter.Comparison.IS_NULL in OpenLayers.Format.CQL 2012-11-05 13:21:51 +01:00
ahocevar
65fa1aaa2d Make sure we do not make abandoned tiles visible 2012-11-05 10:43:05 +01:00
ahocevar
796a349c61 Synchronous image loading for opacity and backbuffer tests 2012-11-05 10:40:50 +01:00
ahocevar
ebeb49b5e7 blankImageUrl is no longer needed for image tiles 2012-11-05 10:40:05 +01:00
Éric Lemoine
8bb58e453b Merge pull request #576 from probins/cors
CORS support in Request: remove console warning if not same origin
2012-11-05 01:36:56 -08:00
Peter Robins
99906c8b98 CORS support in Request: remove console warning if not same origin 2012-11-05 09:32:20 +00:00
Bart van den Eijnden
fcb45d9c41 Merge branch 'cql-quoted' of git://github.com/tschaub/openlayers 2012-11-05 09:44:34 +01:00
Éric Lemoine
41ba4d0d51 Merge pull request #740 from probins/gftex
Update Fusion Tables example for latest API version
2012-11-04 13:00:26 -08:00
tschaub
47ef7e87f7 Handle whitespace and escaped quotes in CQL values
See #743.
2012-11-02 11:44:41 -06:00
Gregers Gram Rygg
9ac758ae86 Removed mobile-scroll example, as it's not an example but a page to reproduce the bugs 2012-11-02 15:38:33 +01:00
Gregers Gram Rygg
a2a391d3b5 Fixed problems with touch events on a scrollable page 2012-11-02 14:22:46 +01:00
Peter Robins
8d36a1d7f7 Update Fusion Tables example for latest API version 2012-10-31 10:24:32 +00:00
Tim Schaub
8d0da09454 Merge pull request #733 from tschaub/filter-tweaks
Allow writer functions to use document fragments when they need to append more than a single child to the parent.
2012-10-26 09:45:53 -07:00
Tim Schaub
8d8a9f3105 Merge pull request #729 from tschaub/date
WFS date filter literal not sent as ISO format
2012-10-26 09:01:54 -07:00
tschaub
4cf7f99de0 Work with formats that copy filter writers 2012-10-25 12:31:20 -06:00
tschaub
9e21911ca3 Unnecessary call to appendChild
The writeNode function already calls appendChild on the parent.
2012-10-25 12:11:25 -06:00
tschaub
e6399a265d Use document fragments to write multiple nodes
For writer functions that need to generate multiple nodes, the
createDocumentFragment method can be used.
2012-10-25 11:56:48 -06:00
tschaub
81d3584e09 Test custom encodeLiteral function 2012-10-25 11:24:55 -06:00
tschaub
993add338d Allow user to customize literal encoding
As suggested by @mpriour, it would be nice if the user could determine how
date values are encoded in literal elements.  Extending this beyond date
values, we can provide an `encodeLiteral` method that can be overridden to
provide application specific behavior.
2012-10-25 10:52:54 -06:00
ahocevar
7f2ce74dd7 Merge pull request #732 from ahocevar/wmts-serverresolutions
WMTS layers created from capabilities have no serverResolutions. r=@sbrunner
2012-10-25 08:06:05 -07:00
ahocevar
ca532c5db6 WMTS layers created from capabilities have no serverResolutions
By adding serverResolutions to the WMTS configuration, it is possible to
use WMTS layers as overlays, even if the map or the base layer is
configured with different resolutions than the WMTS.
2012-10-25 14:40:26 +02:00
Tim Schaub
ed66271be3 Use ISO 8601 formatting for dates in filters 2012-10-24 11:16:29 -06:00
Tim Schaub
1c39820eb1 Merge pull request #728 from tschaub/kml-track
Properly parse track attributes
2012-10-24 09:11:04 -07:00
Pierre GIRAUD
6efcab3d2d don't try to update the matrix in setMap since it's too early and done later in moveTo 2012-10-24 13:31:06 +02:00
tschaub
edb4798518 Testing multiple track attributes 2012-10-23 14:24:48 -06:00
tschaub
596ac680da Use correct track attribute
Previously, the last track attribute name would be used as the
feature attribute name.  For tracks with multiple attributes, this
doesn't work.
2012-10-23 14:15:22 -06:00
Tim Schaub
8a8b3076c8 Adding an example that reprojects GeoJSON. 2012-10-19 14:16:13 -04:00
ahocevar
4b7a0b43b1 Merge pull request #709 from jorix/ghostClusters
Bug: Ghost clusters
2012-10-17 10:33:30 -07:00
Xavier Mamano
ee34448844 Add test remove features and zoom on Strategy/Cluster.html 2012-10-17 19:06:53 +02:00
Stéphane Brunner
788d49a3bb Merge pull request #666 from sbrunner/Prevent.KeyboardDefaults-ie
Prevent KeyboardDefaults.js from triggering keyboard events when user is...
2012-10-17 03:01:58 -07:00
Xavier Mamano
3c416a4d60 Clear the cache on Strategy.Cluster when features are removed.
This prevents reappearing the removed features after zooming.
2012-10-16 18:43:53 +02:00
Bart van den Eijnden
0b46f19ba6 Merge pull request #722 from tomhughes/bbox-fail
Clear the bounds in Protocol.BBOX when a load fails (r=bartvde)
2012-10-16 06:18:02 -07:00
Tom Hughes
628978f894 Clear the bounds in Protocol.BBOX when a load fails
If a load fails then we won't have any features, but we also won't
try and load them again for any part of that area because the bounds
tell us we have already loaded them. So clear the bounds in order
that reloads will be triggered.
2012-10-16 14:16:37 +01:00
Bart van den Eijnden
d098897c79 Merge pull request #717 from walkermatt/master
Support for PropertyIsNull Filter
2012-10-16 00:24:23 -07:00
Matt Walker
a65a231da3 Updated IS_NULL filter to check for strict null.
The IS_NULL filter evaluates to true only when the
property is null. Updated tests to reflect this
change.
2012-10-16 08:11:59 +01:00
Matt Walker
ea5a510d45 Moved node var declaration to the top of the function 2012-10-15 11:16:00 +01:00
Matt Walker
a9494394da Comparing the filter XML written using t.xml_eq.
The PropertyIsNull test now used the t.xml_eq method
to verify the XML output when the filter is written.

Tided up variable names to be consistent with other
tests.
2012-10-15 11:09:52 +01:00
Matt Walker
41dac08cfa Resolved redefinition of filter variable in test 2012-10-15 09:51:56 +01:00
Matt Walker
bccd0824b9 Removed duplicate line that gets the filter value 2012-10-15 09:47:10 +01:00
ahocevar
c3b13b5df3 Using radix parameter to make linter happy 2012-10-15 08:27:01 +02:00
Matt Walker
8f860e516e Removed stray console.log in PropertyIsNull test 2012-10-13 20:05:43 +01:00
Matt Walker
0707bb49bd Merge remote-tracking branch 'upstream/master' 2012-10-13 19:59:41 +01:00
Matt Walker
f08c562955 Added IS_NULL evaluate feature tests 2012-10-13 09:47:23 +01:00
ahocevar
e38ab01752 Fixing image-layer example 2012-10-13 09:26:45 +02:00
Matt Walker
6a37e72ae3 Added some comments to Format/Filter tests. 2012-10-12 22:49:30 +01:00
Matt Walker
d5013d6df5 Added support for PropertyIsNull filter.
Added a simple comparison and read/write for PropertyIsNull
encoded as XML including tests for each.
2012-10-12 22:40:56 +01:00
ahocevar
583dc15700 Merge pull request #587 from ahocevar/587
Layer.WMS: BBOX precision errors in URLs. r=@bartvde
2012-10-12 08:53:23 -07:00
ahocevar
a0acf1e550 Calculating rowSign only once 2012-10-12 16:16:44 +02:00
ahocevar
0eb8949ad2 Updating and fixing API docs 2012-10-12 16:11:10 +02:00
ahocevar
f757580ed4 Merge pull request #634 from ahocevar/634
CacheWrite caches an empty image if the tile is unloaded before the image is loaded. r=@bartvde
2012-10-12 06:41:24 -07:00
ahocevar
e5feda7ad7 Camel casing method name 2012-10-12 15:03:38 +02:00
ahocevar
157dd9e1c2 Fixing typo 2012-10-12 14:44:48 +02:00
ahocevar
6607bcc0bb Do not cache data from aborted tile loads
This also results in a simplified cache method that can more easily be
overridden for use with other storage providers.
2012-10-12 14:06:08 +02:00
ahocevar
cf3ea0c7db Register application listener after the control's 2012-10-12 13:41:54 +02:00
ahocevar
ff4a1b2468 Optimizing positions for rendering
Calculating pixel positions from origin and grid index causes alignment
issues in the grid. By going back to incremental positioning, we get a
result without blank spaces between tiles again.
2012-10-12 03:23:56 +02:00
ahocevar
66455600c7 Better precision for right and top corners 2012-10-12 03:10:42 +02:00
ahocevar
f78d127b1c Removing console.log line 2012-10-11 23:59:17 +02:00
ahocevar
7df5e3ca8e Fixing KaMap layer
This also fixes an issue that has gone unnoticed for a while: the grid did
not cover the bottom of the map viewport, but instead covered an invisible
area above the top of the map viewport.
2012-10-11 23:54:04 +02:00
ahocevar
e7292ecbe2 Fixing ArcGISCache layer
This is done by caching the tileOrigin at grid creation time.
2012-10-11 22:26:59 +02:00
ahocevar
c5bb52d93f No deltas for tile bounds/position calculation
Now we also do not use deltas for shiftRow and shiftColumn. Some
refactoring was done so we do not need different calculateGridLayout
methods for layers with top-left and bottom-left tile origin.

TODO: With this commit, ArcGisCache and KaMap layers are broken.
2012-10-11 21:22:52 +02:00
ahocevar
d4f011d00c Absolute calculation of tile bounds
This avoids cumulated tile bounds errors for layer types that do not use a
tile row/column index in requests (e.g. WMS).
2012-10-10 12:22:57 +02:00
Stéphane Brunner
f1e7425821 use OpenLayers.Event.element 2012-10-10 11:28:18 +02:00
Stéphane Brunner
2e44aff5f0 Prevent KeyboardDefaults.js from triggering keyboard events when user is typing into the form elements for IE 2012-10-10 11:28:18 +02:00
ahocevar
0b3f582e10 Merge pull request #708 from mpriour/displayEvent
Fire the 'changelayer:visibility' event from layer's display method
2012-10-09 14:23:28 -07:00
Matt Priour
e8cc0deeb5 Remove extra event firing logic from Layer::setVisibility 2012-10-09 12:21:25 -05:00
Matt Priour
f17a3c70e4 Fire the 'changelayer:visibility' event from layer's display method
Move the changelayer event firing logic for in / out of resolution range
from the Map class to the Layer class. Tests have been also been created
to specifically test that the display method works correctly and fires
events only when needed.
2012-10-09 11:10:55 -05:00
Bart van den Eijnden
74103ec3e0 Merge pull request #706 from bartvde/wmsc
allow versioned profiled parsers to fallback to the non-profiled parser (r=@ahocevar)
2012-10-08 23:41:57 -07:00
Bart van den Eijnden
ec8fa47a39 remove duplicate line in comment 2012-10-08 16:34:12 +02:00
Bart van den Eijnden
fd6e7ebe03 allow versioned profiled parsers to fallback to the non-profiled parser, this will help deal with situations in which a WMSC parser is created, the server is requested for WMS 1.1.1, but returns 1.1.0 2012-10-08 16:28:19 +02:00
ahocevar
7e5e221c8d Image loading performance improvements
Performance improvements are achieved by using requestAnimationFrame when
a tile's visibility changes, and by not starting with a blank image when
creating a new tile image. It seems that even Firefox does not show a
loading placeholder when the tile is made visible in an animation.
2012-10-05 09:24:53 +02:00
Tim Schaub
e3a5091ebd Merge pull request #699 from tschaub/schemeless
Bing Layers should fetch metadata over HTTPS when the document is server over HTTPS.  Rewriting image URLs to use HTTPS will be handled separately (see #700).
2012-10-04 07:50:54 -07:00
Tim Schaub
c0bff1c3ff Use protocol-relative URL for Bing metadata.
The [URI standard](http://tools.ietf.org/html/rfc3986#section-4.2) allows for URI without a scheme.  Where http is used to load the app, using a schemeless URL for the Bing metadata loads a script using http - and the same goes for https.
2012-10-03 21:44:48 -06:00
ahocevar
8317744d31 Merge pull request #697 from ahocevar/describelayer
Applying VersionedOGC pattern to WMSDescribeLayer format. r=@bartvde
2012-10-03 05:44:54 -07:00
ahocevar
47379ff7a2 Do not provide an 1.1 parser 2012-10-02 16:28:59 +02:00
ahocevar
88a7b7d3e2 Testing backwards compatibility 2012-10-02 16:11:27 +02:00
ahocevar
3d1b0f0bd9 Less intrusive version fallback 2012-10-02 16:07:35 +02:00
ahocevar
e326a9ea2f Adding TODO, as suggested by @bartvde 2012-10-02 14:40:37 +02:00
ahocevar
84a8d8d1f6 Applying VersionedOGC pattern to WMSDescribeLayer format
The WMSDescribeLayer format currently differs from other formats that
inhreit from VersionedOGC by having an array instead of an object as return
type. This especially bad since the VersionedOGC superclass sets a version
property on the array. With this change, the WMSDescribeLayer format will
also be compatible with GeoServer's new JSON response type for
DescribeLayer - see
http://sourceforge.net/mailarchive/message.php?msg_id=29912776.

Another change included here is the removal of the WMSDescribeLayer
format's getVersion hack, which was replaced by a generic fallback to less
generic parsers, e.g. from a v1_1_1 parser to a v1_1 parser if v1_1_1 is
not implemented.
2012-10-02 14:35:05 +02:00
ahocevar
95839728a1 Declaring undeclared variable 2012-10-02 13:30:47 +02:00
ahocevar
9113bc4004 Merge pull request #695 from ahocevar/wmts
Support for multiple resource urls for WMTS. r=@sbrunner
2012-10-02 01:58:00 -07:00
ahocevar
ea86afec16 Addressing @sbrunner's review comment 2012-10-02 10:56:41 +02:00
ahocevar
f055f13a3a Fixing typo
Thanks @sbrunner for catching this. That's what I got from making
last-minute changes before committing without testing again.
2012-10-02 10:56:06 +02:00
ahocevar
363306bcd1 Multiple URLs also for unconstrained GetTile resources 2012-10-02 08:58:47 +02:00
ahocevar
22c5e76b0b Support for multiple resource urls
With this change, createLayer generates url arrays for both KVP and REST
encoding if multiple resource urls are provided. To make this work, the
WMTSCapabilities format got a new resourceUrls property, because
previously only the first resourceUrl for a format was stored.
2012-10-01 15:28:30 +02:00
Pierre GIRAUD
b63ce9af18 Merge pull request #690 from pgiraud/client_zoom
call stopObserving before setting img.src to blank image as well
2012-10-01 00:36:15 -07:00
ahocevar
51ae75a54f Merge pull request #660 from m-click/fix-setAttributeNS
Fix DOM API call to setAttributeNS()
2012-09-28 03:56:58 -07:00
Pierre GIRAUD
8d8abac32a call stopObserving before setting img.src to blank image as well 2012-09-21 11:32:48 +02:00
Stéphane Brunner
9a93e58080 Merge pull request #683 from sbrunner/wmtscapabilities-right-url
Gets the right url (#608 / 3)
2012-09-19 04:20:06 -07:00
Slawomir Messner
cb1c3a834a [New] raise feature function to move features in layer. 2012-09-18 08:14:54 +02:00
Stéphane Brunner
e8987c0683 Gets the right url (#608 / 3) 2012-09-14 15:39:12 +02:00
ahocevar
503fff32b6 Merge pull request #455 from ahocevar/455
Support Subdomains in Openlayers WMTS. r=@sbrunner
2012-09-13 07:07:11 -07:00
Stéphane Brunner
4b91b9c304 Merge pull request #615 from sbrunner/wmts-first-matrix-set
gets the first matrix set instance of only the unique one
2012-09-13 06:06:04 -07:00
Tim Schaub
877d81cffa Merge pull request #676 from tschaub/osm-copyright
Updating attribution for OSM layer.
2012-09-12 20:39:23 -07:00
Tim Schaub
9607ee480a Using the entity reference for copyright symbol. 2012-09-12 21:38:30 -06:00
tschaub
499055e247 Updating attribution for OSM layer.
See http://www.openstreetmap.org/copyright for details.
2012-09-12 09:15:46 -06:00
Marc Jansen
2a48759bc9 Merge pull request #675 from marcjansen/no-tabs
Replace tabs with spaces where appropriate.
2012-09-11 12:55:43 -07:00
Marc Jansen
1348f97546 Replace tabs with spaces where appropriate. 2012-09-11 21:51:18 +02:00
Stéphane Brunner
f7ca64b1aa Merge pull request #671 from sbrunner/add-missing-requires
Add missing requires on Request for UTFGrid Tile
2012-09-11 10:58:24 -07:00
Stéphane Brunner
341c08adee Add missing requires on Request for UTFGrid 2012-09-11 11:38:24 +02:00
ahocevar
c88ad36600 Comment about side effect.
I wonder why isFixed is advertised as APIProperty for Vector layers.
2012-09-07 12:18:12 +02:00
Marc Jansen
6b2836b455 Merge pull request #665 from marcjansen/selected-evt
SLDSelect: Make it possible to change the filter in handlers
2012-09-06 05:23:39 -07:00
Marc Jansen
1063a4cd19 Make it possible to change the filter in handlers
Trigger the 'select'-event earlier, this way any handlers for the event can
change both the filter and the resulting SLD inside the callback.
2012-09-06 13:29:59 +02:00
Marc Jansen
97b75578ba Update lib/OpenLayers/Control/SLDSelect.js
Correct API docs. Non-functional change.
2012-09-06 10:40:13 +03:00
ahocevar
2197f1656a Updating row/col sizes in tests (see #639) 2012-08-31 11:11:34 +02:00
Volker Grabsch
e8051ca1ec Fix DOM API call to setAttributeNS() 2012-08-30 16:54:49 +02:00
Marc Jansen
60cc590bf2 Another API-docs spelling error. 2012-08-30 00:46:57 +03:00
Marc Jansen
a4bc3f33e6 Fix API-docs spelling error.
This fixes #654. Thanks to @dandv for catching this.
2012-08-30 00:40:43 +03:00
ahocevar
ec26dd6564 Merge pull request #644 from fastrde/ModifyFeatureDocumentDrag
Adds documentDrag to ModifyFeature
2012-08-27 02:53:39 -07:00
fastr
e8716847f8 Adding DocumentDrag to ModifyFeature 2012-08-25 23:37:39 +02:00
fastr
053dba59a1 Inserted documentDrag in ModifyFeature so that you can drag vertices over the viewport of the map in analogy to the DragFeature-Control. documentDrag is internaly passed to the DragFreature that's used by ModifyFeature. 2012-08-25 23:30:27 +02:00
Marc Jansen
1d670fcddb Merge pull request #642 from marcjansen/api-docs
Better documentation. Non-functional change.
2012-08-22 15:11:53 -07:00
Marc Jansen
287e9caf46 Code docs for the Bounds-class. 2012-08-22 23:59:11 +02:00
Marc Jansen
04e271570b Document the VERSION_NUMBER "constant". 2012-08-22 23:52:12 +02:00
ahocevar
ddd4c4c022 Merge pull request #517 from ahocevar/no-percent
No more percentage based positioning. r=@bartvde,@elemoine,@rdewit
2012-08-21 05:02:11 -07:00
ahocevar
75f2e1f847 Addressing @bartdve's review comments. 2012-08-21 14:00:48 +02:00
ahocevar
a3ec0f77e0 Using integer pixel space to avoid whitespace between tiles. 2012-08-21 13:57:11 +02:00
ahocevar
475cd7cd60 Fixing test (backBufferLonLat should not be OpenLayers.Bounds).
Thanks @rdewit for the IE7 test report - this fixes one of the reported issues.
2012-08-21 13:57:11 +02:00
ahocevar
b2210d00a9 Removing no longer needed code.
Thanks @elemoine for catching the IE6 reflow in Tile/Image.js.
2012-08-21 13:57:11 +02:00
ahocevar
f0ad48597f No more percentage based positioning.
Client zoom now supports both over- and undersampling.
2012-08-21 13:57:11 +02:00
ahocevar
405cebd482 Merge pull request #639 from ahocevar/grid-align
When using a buffer, the grid lacks rows/columns at the top/left. r=@bartvde
2012-08-21 04:47:10 -07:00
ahocevar
26d4fe3ce8 Making row and column size consistent, as suggested by @bartvde. 2012-08-21 13:37:48 +02:00
ahocevar
0f58868830 When using a buffer, the grid lacks rows/columns at the top/left.
This is because the threshold used for deciding when a column or row is shifted is too far to the bottom right. A tiny fix, but effective. A new test makes sure that we don't shift columns more than necessary when the layer is dragged.
2012-08-20 18:52:17 +02:00
ahocevar
87e7cfe29c Merge pull request #632 from ahocevar/wps-client
WPS Client. r=@bartvde,@tschaub
2012-08-18 10:01:01 -07:00
ahocevar
e04d7cd627 Addressing final review comments. 2012-08-18 18:56:36 +02:00
Marc Jansen
470dde0e38 Documentation enhancements. No functional change. 2012-08-17 23:41:19 +02:00
Marc Jansen
b7063b364c Enhancements to the MouseCoordinates example.
Non-functional change.
2012-08-17 23:40:18 +02:00
Marc Jansen
df19317c95 Merge branch 'master' of https://github.com/openlayers/openlayers
Conflicts:
	tests/list-tests.html
2012-08-17 22:46:06 +02:00
Bart van den Eijnden
f6adcd2651 Merge pull request #637 from bartvde/resizecleanup
cleanup and always use window resize as suggested by @tonio (r=@tonio)
2012-08-17 03:50:47 -07:00
Bart van den Eijnden
7b4cb8e3f5 cleanup and always use window resize as suggested by @tonio 2012-08-17 11:36:03 +02:00
Bart van den Eijnden
5e4aea58f1 Merge pull request #636 from bartvde/autoresize
introduce new property on the Map called autoUpdateSize (r=@ahocevar)
2012-08-17 01:22:23 -07:00
Bart van den Eijnden
3b9ce4ca2d introduce new property on the Map called autoUpdateSize which lets applications take control of window resizing / device orientation changes if they want to 2012-08-17 10:13:04 +02:00
Bart van den Eijnden
2843a18602 Revert "fix issue with orientation changes on mobile devices (tested on Motorola Xoom 2 with Android 3.2.2 in the stock browser)"
This reverts commit 39a6d7d8ef.
2012-08-16 16:35:21 +02:00
Bart van den Eijnden
e4e06a877f Merge pull request #635 from bartvde/resize
fix issue with orientation changes on mobile devices (r=@ahocevar and thanks to @ahocevar for coming up with this idea in the first place)
2012-08-16 05:28:07 -07:00
Bart van den Eijnden
39a6d7d8ef fix issue with orientation changes on mobile devices (tested on Motorola Xoom 2 with Android 3.2.2 in the stock browser) 2012-08-16 14:21:36 +02:00
tschaub
5cf260f38a Add missing requires (closes #633). 2012-08-14 11:01:58 -06:00
ahocevar
88572303fb Addressing @tschaub's review comment. 2012-08-14 13:31:41 +02:00
ahocevar
5fff368a2d Addressing review suggestions and fixing asynchronous function calls.
This commit addresses @bartvde's review comments, adds more documentation, and fixes asynchronous function calls. Previously, when creating multiple processes with the same identifier, the describe callback would only have been called for the first process. This was fixed to move DescribeProcess handling from WPSProcess to WPSClient.
2012-08-14 13:17:07 +02:00
ahocevar
006d98151f Use the correct name of the result, not just hard-coded 'result'. 2012-08-13 13:29:34 +02:00
ahocevar
94f3ab393f Giving the test code more time to execute. 2012-08-12 22:08:43 +02:00
ahocevar
4e3f3e2080 Adding dependencies. 2012-08-12 21:39:15 +02:00
ahocevar
96db01006c Making Firefox happy. 2012-08-11 19:32:17 +02:00
ahocevar
e2acbc56d0 More docs and unit tests. 2012-08-11 19:32:17 +02:00
ahocevar
ebc71b492e Making sure that the process description is not loaded. 2012-08-11 19:32:17 +02:00
ahocevar
ec9ab8129e Adding support for chaining processes. 2012-08-11 19:32:17 +02:00
ahocevar
c64621f510 Adding unit tests. 2012-08-11 19:32:17 +02:00
ahocevar
b61120d3b5 Cache of DescribeProcess responses on the client. 2012-08-11 19:32:17 +02:00
ahocevar
9bc7bb8115 Using proxy and demo server. 2012-08-11 19:32:17 +02:00
ahocevar
0108250ed9 WPSClient and WPSProcess for convenient WPS interaction. 2012-08-11 19:32:17 +02:00
Xavier Mamano
79ca3cfd69 Avoid breaking the "OpenLayers.String.format" execution when searching for an attribute in an undefined object. 2012-08-11 17:28:59 +02:00
Matt Priour
a83ab56f97 Modify classes which contained an internal numeric zero padding function to use the one in BaseTypes instead 2012-08-08 22:36:39 -05:00
Matt Priour
dc93478e6b Move zeroPad function to BaseTypes and add tests for it 2012-08-08 22:34:26 -05:00
tschaub
970448effc Tests for response property on loadend event.
This confirms that the loadend event includes a response property when it results from a call to the strategy merge method (see #624).
2012-08-08 11:41:51 -06:00
tschaub
7e326f97e2 Doc fix for merge method. 2012-08-08 11:41:33 -06:00
tschaub
4ae9f6878d Making events easier to test.
This should make it more straightforward to test the new event properties being sent with loadend on BBOX and Fixed strategies (see #624).
2012-08-08 11:23:02 -06:00
ahocevar
49227967bc Merge pull request #624 from milkypostman/master
return response object on "loadend" event for Fixed strategy. Also closes #85.
2012-08-08 07:51:56 -07:00
Donald Curtis
2696494443 return response object on "loadend" event for Fixed and BBOX strategies 2012-08-08 09:46:58 -05:00
Bart van den Eijnden
bab1858bfc slightly modify the wfs-states example to show how to switch between a WMS and a vector layer at a certain scale (non-functional change) 2012-08-08 09:20:14 +02:00
Stéphane Brunner
65cacaa756 Merge pull request #614 from sbrunner/wmts-fix
correct units in WMTS capabilities
2012-08-03 02:35:26 -07:00
ahocevar
159ee7c7b4 Merge pull request #612 from ahocevar/612
Touch events do not trigger the default action in attribution links. r=@marcjansen
2012-08-01 04:16:38 -07:00
ahocevar
aef5517bfa Adding unit tests. 2012-08-01 13:15:59 +02:00
ahocevar
98569203a6 Check whether an event target should be considered for handling. 2012-08-01 10:20:25 +02:00
Stéphane Brunner
093bb529d2 gets the first matrix set instance of only the unique one 2012-07-30 23:26:45 +02:00
Stéphane Brunner
9d31c57e2a correct units in WMTS capabilities 2012-07-30 23:17:11 +02:00
Pierre GIRAUD
940c0e8ca2 Adding missing attribution for OSM 2012-07-20 16:18:28 +02:00
Stéphane Brunner
584749b524 Merge pull request #601 from temporaryaccount/temporaryopenlayers
Prevent KeyboardDefaults.js from triggering keyboard events when user is...
2012-07-20 04:37:25 -07:00
ahocevar
7249510553 Using the safe unicode representation of the minus sign.
No functional change; see #588.
2012-07-20 09:41:42 +02:00
ahocevar
c786952219 Fixing tests. 2012-07-20 09:19:20 +02:00
temporaryaccount
950904f59a Prevent KeyboardDefaults.js from triggering keyboard events when user is typing into the form elements 2012-07-19 18:08:30 +04:00
Pierre GIRAUD
99553d0ae5 Fixing doc. No functional change. 2012-07-17 16:15:03 +03:00
Stéphane Brunner
f9cf3a0c95 Merge pull request #588 from sbrunner/minus
use minus sign
2012-07-13 02:58:09 -07:00
Stéphane Brunner
a45cbfdb07 use minus sign 2012-07-12 18:32:30 +02:00
ahocevar
af70240191 Merge pull request #580 from jorix/_onImgLoad
Fix typo "_onImageLoad" is "_onImgLoad"
2012-07-08 23:37:18 -07:00
Xavier Mamano
9be8bb2416 Fix typo "_onImageLoad" is "_onImgLoad" 2012-07-08 23:50:52 +02:00
Éric Lemoine
14d5525ced Merge pull request #528 from probins/build
Add AMD and version options to build.py
2012-07-03 08:02:27 -07:00
Éric Lemoine
679111fa88 release.sh script - do not remove the build/closure-compiler folder 2012-07-03 08:57:05 +02:00
Éric Lemoine
90d3c2d9a9 WMTS capabilities format - make JSLint happier 2012-07-03 08:45:19 +02:00
Éric Lemoine
f7860a329c WMTS capabilities format - make the mid var local to the createLayer function 2012-07-03 08:45:19 +02:00
Frédéric Junod
f5aae88a31 Merge pull request #294 from fredj/stopped-map-events
can't listen to mousedown/touchstart on map div
2012-07-02 13:44:06 -07:00
Éric Lemoine
0144a9473e Set VERSION_NUMBER to Release 2.13 dev 2012-07-02 16:33:40 +02:00
Éric Lemoine
37ebc3b991 Merge pull request #567 from rdewit/master
Fix for typo in OL 2.12 release notes
2012-07-01 23:46:29 -07:00
rdewit
b837d9bdf4 Fixed typo in CSS code for overriding default tile animation. 2012-07-02 15:00:50 +10:00
ahocevar
f3b0c2ec9d Merge pull request #558 from dregade/zoomify
fix size initialization and resolution/zoom usage. Thanks @dregade - this change makes fractional zoom work with Layer.Zoomify.
2012-06-29 05:27:08 -07:00
dregade
74f9a943cc fix serverResolutions if not provided 2012-06-29 09:22:54 +02:00
dregade
7b91c9c26f fix size initialization and resolution/zoom usage 2012-06-28 17:16:22 +02:00
ahocevar
f686589d1e Merge pull request #551 from finn-no/projection-test-fix
Fixed broken test
2012-06-27 23:59:56 -07:00
ahocevar
0d8b76d2b2 Merge pull request #546 from finn-no/vendor-prefixes
Vendor prefix detection. Thanks @gregersrygg for this excellent contribution.
2012-06-27 23:29:15 -07:00
Éric Lemoine
0834593f9f Merge branch '2.12' 2012-06-27 22:59:12 +02:00
Éric Lemoine
0412410be0 set VERSION_NUMBER to Release 2.12 2012-06-27 22:56:31 +02:00
Éric Lemoine
301ed5c3ce 2.12 notes - explain how to disable hw accelerated animations (refs #542) 2012-06-27 21:55:37 +02:00
Gregers Gram Rygg
5e0050cc9a Fixed broken test 2012-06-27 18:32:48 +02:00
Gregers Gram Rygg
2bd8b5c4ba Merge branch 'master' of https://github.com/openlayers/openlayers into vendor-prefixes 2012-06-27 16:52:06 +02:00
Gregers Gram Rygg
d71e7a7beb Mock div.style through document.createElement hack instead of exposing method in vendorPrefix.js 2012-06-27 16:49:59 +02:00
Gregers Gram Rygg
1ba6aa75d7 Removed Prefix from method names, since now it's part of the module name 2012-06-27 13:33:47 +02:00
Gregers Gram Rygg
7f32342ec3 Moved OpenLayers.Vendor to OpenLayers.Util.vendorPrefix 2012-06-27 13:28:43 +02:00
Gregers Gram Rygg
36451db928 Expose caches instead of _clearCache method 2012-06-27 12:39:47 +02:00
Gregers Gram Rygg
d1ed8bb952 Removed duplicate declarations of i and l 2012-06-27 11:57:04 +02:00
Gregers Gram Rygg
f40d677164 Removed declaration of OpenLayers if it's not defined (already requires SingleFile.js) 2012-06-27 11:07:41 +02:00
Stéphane Brunner
d42f5ee993 Merge pull request #271 from sbrunner/wmts-capabilities
Create Layer from WMTS capabilities in rest mode
2012-06-27 01:34:02 -07:00
Stéphane Brunner
484eda2ee5 add alternate projection parsing 2012-06-26 16:20:36 +02:00
Stéphane Brunner
419ead9191 fix projection syntax 2012-06-26 16:09:38 +02:00
Frédéric Junod
34750774d7 Merge pull request #547 from fredj/wmts-vienna
mobile-wmts-vienna example: requestEncoding already set in defaults
2012-06-25 09:20:10 -07:00
ahocevar
293d173079 Simple example with an OSM map, a marker and a popup. 2012-06-25 17:19:53 +02:00
Stéphane Brunner
81dffce4f4 remove unworking example in wmts-capabilities 2012-06-25 14:58:14 +02:00
Frederic Junod
8058a800ed mobile-wmts-vienna example: requestEncoding already set in defaults 2012-06-25 14:56:40 +02:00
Frederic Junod
0e78d40da2 Update WMS base layer in strategy-cluster-threshold.html 2012-06-25 14:19:26 +02:00
Gregers Gram Rygg
93211a31bc Merge branch 'master' of https://github.com/openlayers/openlayers into vendor-prefixes 2012-06-25 14:17:19 +02:00
Gregers Gram Rygg
ab6b2ef008 Use vendor detection for requestAnimationFrame 2012-06-25 13:45:33 +02:00
Gregers Gram Rygg
58a83b0d17 Refactored vendor methods to it's own module 2012-06-25 13:44:35 +02:00
Gregers Gram Rygg
b394b93723 Removed unrelated changes 2012-06-25 09:38:23 +02:00
Gregers Gram Rygg
fb3acbdbc2 Renamed char (reserved word in ES3) 2012-06-24 23:48:24 +02:00
Éric Lemoine
533e5f4242 Merge pull request #538 from probins/proj
Change Projection so Proj4js no longer has to be global
2012-06-24 02:16:52 -07:00
Gregers Gram Rygg
da3495beac Merge branch 'master' of https://github.com/openlayers/openlayers into vendor-prefixes 2012-06-24 02:38:05 +02:00
Gregers Gram Rygg
6d5f5c37df Style vendor prefixes should start with first char uppercase, js properties should be lower 2012-06-23 22:46:43 +02:00
Gregers Gram Rygg
b9670a292b Added support to detect vendor-prefixes for non-style objects 2012-06-23 21:48:44 +02:00
ahocevar
78d07c8d8a Merge pull request #524 from ahocevar/panzoombar
Zoom level restriction improvements. r=@bartvde
2012-06-22 16:59:13 -07:00
Marc Jansen
b86394b79b Merge branch 'control-inheritance' of https://github.com/marcjansen/openlayers 2012-06-20 18:08:01 +02:00
Stéphane Brunner
e976f4f627 Merge pull request #539 from jarofgreen/master
Credits on an example map are wrong.
2012-06-20 06:23:40 -07:00
James
dfb1c1e234 According to
http://developer.mapquest.com/web/products/open/map#openlayers (Terms of Use Section)
this is how MapQuest Open Aerial Tiles should be credited.
2012-06-20 12:50:59 +01:00
James
a74fa3d52c According to http://wiki.openstreetmap.org/wiki/Mapquest#MapQuest-hosted_map_tiles the attributtion
for Open Street Map derived Map Quest tiles was wrong. Fixed.
2012-06-20 12:10:36 +01:00
Peter Robins
b6296a40b6 Change Projection so Proj4js no longer has to be global 2012-06-20 08:43:36 +01:00
Bart van den Eijnden
69c8a8e161 Merge pull request #378 from bartvde/wfsdft
error handling in WFSDescribeFeatureType format (r=@ahocevar,elemoine)
2012-06-19 08:31:57 -07:00
Peter Robins
4e956dc80d Add AMD and version options to build.py 2012-06-18 17:31:35 +01:00
ahocevar
fe31af5c80 Adding unit tests. 2012-06-13 23:14:34 +02:00
ahocevar
032df4b90a Adding a getMinZoom API method.
This can be used by zoom slider controls, e.g. the GeoExt.ZoomSlider. Note that adjustZoom now also respects the map's fractionalZoom setting.
2012-06-13 21:37:59 +02:00
ahocevar
7141d237d9 Create a new reliable updatesize event.
The resize event is not fired in all browsers. What we actually need is an event that is called every time the updateSize method is called.
2012-06-13 21:36:17 +02:00
ahocevar
1d680df6d0 Respect zoom level restriction. 2012-06-12 23:39:29 +02:00
Stéphane Brunner
8d1d08b0c2 add tests to create a REST WMTS Layer 2012-06-11 13:21:35 +02:00
Stéphane Brunner
a662f82a1b improve createLayer from WMTS Capabilities 2012-06-11 13:21:35 +02:00
Marc Jansen
0c87de44b4 Merge branch 'control-inheritance' of https://github.com/marcjansen/openlayers into control-inheritance
Conflicts:
	tests/Control/ZoomOut.html
	tests/Control/ZoomToMaxExtent.html
2012-06-08 09:44:36 +02:00
ahocevar
99dd0bbcb2 URL switching for all REST encoded WMTS layers. 2012-06-02 01:48:20 +02:00
Frederic Junod
74dd106082 Use OpenLayers.Event.preventDefault, deprecate OpenLayers.Renderer.SVG.preventDefault. 2012-05-30 09:07:49 +02:00
Frederic Junod
a6119f6a75 Prevent the default browser behavior without stopping the event propagation. 2012-05-30 09:07:49 +02:00
Frederic Junod
cf92ced1c8 Add tests/manual/map-events.html test file 2012-05-30 09:07:49 +02:00
Gregers Gram Rygg
a18ce5adf6 Rewrite PinchZoom to detect vendor-prefix, so it works in more browsers 2012-05-22 17:06:03 +02:00
Gregers Gram Rygg
875a2b98ff API description should inform that the method only tests for DOM style properties. Not object properties. 2012-05-22 17:05:13 +02:00
Gregers Gram Rygg
f27002b565 Tests for vendor prefix detection 2012-05-21 16:41:55 +02:00
Gregers Gram Rygg
e3a32f29a8 Util methods to detect vendor prefix for DOM properties and CSS 2012-05-21 16:40:36 +02:00
Marc Jansen
a87f5ac16a Merge branch 'master' of https://github.com/openlayers/openlayers into control-inheritance 2012-05-15 08:34:53 +02:00
Stéphane Brunner
da67953c61 add a REST example in wmts-capabilities 2012-04-27 18:22:37 +02:00
Tim Schaub
ec7b12257b Stay on the world when transforming coords.
Instead of a transform that results in +/- Infinity northing, we can constrain the results to be within the world bounds.
2012-04-23 18:49:55 -04:00
Marc Jansen
4cd34bc851 Added tests for OpenLayers.Control.Pan. 2012-04-17 21:31:12 +02:00
Marc Jansen
d86c1b6c9c Changed Pan control to inherit from OpenLayers.Control.Button. 2012-04-17 21:29:32 +02:00
Marc Jansen
56d7cee8cf Protect the trigger action of pan control by checking whether
we were added to a map prior to calling this.map.pan().
2012-04-17 21:25:56 +02:00
Marc Jansen
53ed973eec Added tests for OpenLayers.Control.Pan. 2012-04-17 21:24:54 +02:00
Marc Jansen
d08fb575b1 The changed controls should also check whether they have correctly
inherited the property 'type' of the new parent class.
2012-04-17 20:21:06 +02:00
Marc Jansen
d5bdadc18e Removed erroneously commited alert-statements in tests. 2012-04-17 20:06:40 +02:00
Marc Jansen
292da06150 Changed ZoomIn control to inherit from OpenLayers.Control.Button. 2012-04-17 20:05:47 +02:00
Marc Jansen
4af41b41f5 Added tests for ZoomIn control. 2012-04-17 20:04:49 +02:00
Marc Jansen
a5c5fd8d3e Added tests for the 'type' property which is now inherited from the
parent class.
2012-04-17 08:20:09 +02:00
Marc Jansen
3dfa3fd157 Changed ZoomOut control to inherit from OpenLayers.Control.Button. 2012-04-17 08:11:48 +02:00
Marc Jansen
c40bdc90e9 Added tests for ZoomOut control. 2012-04-17 08:11:08 +02:00
Marc Jansen
029bdaccde The ZoomToMaxExtent control should extend the OpenLayers.Control.Button
and not OpenLayers.Control.
2012-04-13 09:59:44 +02:00
Marc Jansen
84e5c47caa Add tests for the ZoomToMaxExtent control. 2012-04-13 09:58:59 +02:00
Bart van den Eijnden
e773ec32d1 incorporate @ahocevar's suggestion 2012-03-30 23:33:10 +02:00
Bart van den Eijnden
2e83863e90 error handling in WFSDescribeFeatureType format 2012-03-30 23:04:03 +02:00
Xavier Mamano
ee8e892bb4 Move some touch logic to the handler base class. 2012-02-15 17:55:37 +01:00
1785 changed files with 225623 additions and 95554 deletions

8
.gitignore vendored
View File

@@ -1,5 +1,7 @@
*.pyc
/build
/examples/*.html.png
/build/OpenLayers.js
/tools/closure-compiler.jar
/tools/*.pyc
/apidoc_config/Data/
/doc/apidocs/
/examples/example-list.js
/examples/example-list.xml

View File

@@ -1,12 +0,0 @@
before_install:
- "sudo pip install http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz"
- "git clone --depth=50 https://github.com/jsdoc3/jsdoc build/jsdoc"
- "git clone https://code.google.com/p/glsl-unit/ build/glsl-unit"
before_script:
- "./build.py plovr"
- "./build.py serve-integration-test &"
- "rm src/ol/renderer/webgl/*shader.js"
- "sleep 3"
script: "./build.py JSDOC=build/jsdoc/jsdoc integration-test"

View File

@@ -1,57 +0,0 @@
OpenLayers contributors:
* Antoine Abt
* Mike Adair
* Jeff Adams
* Seb Benthall
* Bruno Binet
* Stéphane Brunner
* Howard Butler
* Bertil Chaupis
* John Cole
* Tim Coulter
* Robert Coup
* Jeff Dege
* Roald de Wit
* Schuyler Erle
* Christian López Espínola
* John Frank
* Sean Gilles
* Pierre Giraud
* Ivan Grcic
* Andreas Hocevar
* Marc Jansen
* Ian Johnson
* Frédéric Junod
* Eric Lemoine
* Philip Lindsay
* Martijn van Oosterhout
* David Overstrom
* Tom Payne
* Corey Puffault
* Peter William Robins
* Gregers Rygg
* Tim Schaub
* Christopher Schmidt
* Cameron Shorter
* Pedro Simonetti
* Paul Spencer
* Paul Smith
* Glen Stampoultzis
* James Stembridge
* Erik Uzureau
* Bart van den Eijnden
* Ivan Willig
* Thomas Wood
* Bill Woodall
* Steve Woodbridge
* David Zwarg
Some portions of OpenLayers are used under the Apache 2.0 license, available
in doc/licenses/APACHE-2.0.txt.
Some portions of OpenLayers are used under the MIT license, availabie in
doc/licenses/MIT-LICENSE.txt.
Some portions of OpenLayers are Copyright 2001 Robert Penner, and are used
under the BSD license, available in doc/licenses/BSD-LICENSE.txt

View File

@@ -1,21 +0,0 @@
# Contributing to OpenLayers 3
Thanks for your interest in contributing to OpenLayers 3.
## Contributing Code
Our preferred means of receiving contributions is through [pull
requests](https://help.github.com/articles/using-pull-requests).
See the [Developer
Guide](https://github.com/openlayers/ol3/wiki/Developer-Guide) to get started
with OpenLayers 3 development. This guide provides information you should know
before creating pull requests.
Note that, before accepting a contribution, we ask that you provide us
a Contributor License Agreement. If you are making your contribution as part of
work for your employer, please follow the guidelines on submitting a [Corporate
Contributor License Agreement](http://www.openlayers.org/ccla.txt). If you are
making your contribution as an individual, you can submit a digital [Individual
Contributor License
Agreement](https://docs.google.com/spreadsheet/viewform?formkey=dGNNVUJEMXF2dERTU0FXM3JjNVBQblE6MQ).

View File

@@ -1,9 +0,0 @@
# OpenLayers 3
[![Travis CI Status](https://secure.travis-ci.org/openlayers/ol3.png)](http://travis-ci.org/#!/openlayers/ol3)
Welcome to OpenLayers 3!
To see OpenLayers 3 in action you can look at the live examples on
http://openlayers.github.io/ol3/master/examples/. If you want to contribute
to OpenLayers 3 please read the [CONTRIBUTING](CONTRIBUTING.md) page.

113
apidoc_config/Languages.txt Normal file
View File

@@ -0,0 +1,113 @@
Format: 1.52
# This is the Natural Docs languages file for this project. If you change
# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change
# something for all your projects, edit the Languages.txt in Natural Docs'
# Config directory instead.
# You can prevent certain file extensions from being scanned like this:
# Ignore Extensions: [extension] [extension] ...
#-------------------------------------------------------------------------------
# SYNTAX:
#
# Unlike other Natural Docs configuration files, in this file all comments
# MUST be alone on a line. Some languages deal with the # character, so you
# cannot put comments on the same line as content.
#
# Also, all lists are separated with spaces, not commas, again because some
# languages may need to use them.
#
# Language: [name]
# Alter Language: [name]
# Defines a new language or alters an existing one. Its name can use any
# characters. If any of the properties below have an add/replace form, you
# must use that when using Alter Language.
#
# The language Shebang Script is special. It's entry is only used for
# extensions, and files with those extensions have their shebang (#!) lines
# read to determine the real language of the file. Extensionless files are
# always treated this way.
#
# The language Text File is also special. It's treated as one big comment
# so you can put Natural Docs content in them without special symbols. Also,
# if you don't specify a package separator, ignored prefixes, or enum value
# behavior, it will copy those settings from the language that is used most
# in the source tree.
#
# Extensions: [extension] [extension] ...
# [Add/Replace] Extensions: [extension] [extension] ...
# Defines the file extensions of the language's source files. You can
# redefine extensions found in the main languages file. You can use * to
# mean any undefined extension.
#
# Shebang Strings: [string] [string] ...
# [Add/Replace] Shebang Strings: [string] [string] ...
# Defines a list of strings that can appear in the shebang (#!) line to
# designate that it's part of the language. You can redefine strings found
# in the main languages file.
#
# Ignore Prefixes in Index: [prefix] [prefix] ...
# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ...
#
# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ...
# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ...
# Specifies prefixes that should be ignored when sorting symbols in an
# index. Can be specified in general or for a specific topic type.
#
#------------------------------------------------------------------------------
# For basic language support only:
#
# Line Comments: [symbol] [symbol] ...
# Defines a space-separated list of symbols that are used for line comments,
# if any.
#
# Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ...
# Defines a space-separated list of symbol pairs that are used for block
# comments, if any.
#
# Package Separator: [symbol]
# Defines the default package separator symbol. The default is a dot.
#
# [Topic Type] Prototype Enders: [symbol] [symbol] ...
# When defined, Natural Docs will attempt to get a prototype from the code
# immediately following the topic type. It stops when it reaches one of
# these symbols. Use \n for line breaks.
#
# Line Extender: [symbol]
# Defines the symbol that allows a prototype to span multiple lines if
# normally a line break would end it.
#
# Enum Values: [global|under type|under parent]
# Defines how enum values are referenced. The default is global.
# global - Values are always global, referenced as 'value'.
# under type - Values are under the enum type, referenced as
# 'package.enum.value'.
# under parent - Values are under the enum's parent, referenced as
# 'package.value'.
#
# Perl Package: [perl package]
# Specifies the Perl package used to fine-tune the language behavior in ways
# too complex to do in this file.
#
#------------------------------------------------------------------------------
# For full language support only:
#
# Full Language Support: [perl package]
# Specifies the Perl package that has the parsing routines necessary for full
# language support.
#
#-------------------------------------------------------------------------------
# The following languages are defined in the main file, if you'd like to alter
# them:
#
# Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python,
# PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile,
# ActionScript, ColdFusion, R, Fortran
# If you add a language that you think would be useful to other developers
# and should be included in Natural Docs by default, please e-mail it to
# languages [at] naturaldocs [dot] org.

472
apidoc_config/Menu.txt Normal file
View File

@@ -0,0 +1,472 @@
Format: 1.52
Title: OpenLayers
SubTitle: JavaScript Mapping Library
# You can add a footer to your documentation like this:
# Footer: [text]
# If you want to add a copyright notice, this would be the place to do it.
# You can add a timestamp to your documentation like one of these:
# Timestamp: Generated on month day, year
# Timestamp: Updated mm/dd/yyyy
# Timestamp: Last updated mon day
#
# m - One or two digit month. January is "1"
# mm - Always two digit month. January is "01"
# mon - Short month word. January is "Jan"
# month - Long month word. January is "January"
# d - One or two digit day. 1 is "1"
# dd - Always two digit day. 1 is "01"
# day - Day with letter extension. 1 is "1st"
# yy - Two digit year. 2006 is "06"
# yyyy - Four digit year. 2006 is "2006"
# year - Four digit year. 2006 is "2006"
# --------------------------------------------------------------------------
#
# Cut and paste the lines below to change the order in which your files
# appear on the menu. Don't worry about adding or removing files, Natural
# Docs will take care of that.
#
# You can further organize the menu by grouping the entries. Add a
# "Group: [name] {" line to start a group, and add a "}" to end it.
#
# You can add text and web links to the menu by adding "Text: [text]" and
# "Link: [name] ([URL])" lines, respectively.
#
# The formatting and comments are auto-generated, so don't worry about
# neatness when editing the file. Natural Docs will clean it up the next
# time it is run. When working with groups, just deal with the braces and
# forget about the indentation and comments.
#
# --------------------------------------------------------------------------
Group: OpenLayers {
File: OpenLayers (no auto-title, OpenLayers.js)
Group: BaseTypes {
File: Base Types (no auto-title, OpenLayers/BaseTypes.js)
File: Bounds (no auto-title, OpenLayers/BaseTypes/Bounds.js)
File: Class (no auto-title, OpenLayers/BaseTypes/Class.js)
File: Date (no auto-title, OpenLayers/BaseTypes/Date.js)
File: Element (no auto-title, OpenLayers/BaseTypes/Element.js)
File: LonLat (no auto-title, OpenLayers/BaseTypes/LonLat.js)
File: Pixel (no auto-title, OpenLayers/BaseTypes/Pixel.js)
File: Size (no auto-title, OpenLayers/BaseTypes/Size.js)
} # Group: BaseTypes
File: Console (no auto-title, OpenLayers/Console.js)
Group: Control {
File: Control (no auto-title, OpenLayers/Control.js)
File: ArgParser (no auto-title, OpenLayers/Control/ArgParser.js)
File: Attribution (no auto-title, OpenLayers/Control/Attribution.js)
File: Button (no auto-title, OpenLayers/Control/Button.js)
File: DragFeature (no auto-title, OpenLayers/Control/DragFeature.js)
File: DragPan (no auto-title, OpenLayers/Control/DragPan.js)
File: DrawFeature (no auto-title, OpenLayers/Control/DrawFeature.js)
File: EditingToolbar (no auto-title, OpenLayers/Control/EditingToolbar.js)
File: Geolocate (no auto-title, OpenLayers/Control/Geolocate.js)
File: GetFeature (no auto-title, OpenLayers/Control/GetFeature.js)
File: Graticule (no auto-title, OpenLayers/Control/Graticule.js)
File: KeyboardDefaults (no auto-title, OpenLayers/Control/KeyboardDefaults.js)
File: LayerSwitcher (no auto-title, OpenLayers/Control/LayerSwitcher.js)
File: Measure (no auto-title, OpenLayers/Control/Measure.js)
File: ModifyFeature (no auto-title, OpenLayers/Control/ModifyFeature.js)
File: MousePosition (no auto-title, OpenLayers/Control/MousePosition.js)
File: Navigation (no auto-title, OpenLayers/Control/Navigation.js)
File: NavigationHistory (no auto-title, OpenLayers/Control/NavigationHistory.js)
File: NavToolbar (no auto-title, OpenLayers/Control/NavToolbar.js)
File: OverviewMap (no auto-title, OpenLayers/Control/OverviewMap.js)
File: Pan (no auto-title, OpenLayers/Control/Pan.js)
File: Panel (no auto-title, OpenLayers/Control/Panel.js)
File: PanPanel (no auto-title, OpenLayers/Control/PanPanel.js)
File: PanZoom (no auto-title, OpenLayers/Control/PanZoom.js)
File: PanZoomBar (no auto-title, OpenLayers/Control/PanZoomBar.js)
File: Permalink (no auto-title, OpenLayers/Control/Permalink.js)
File: PinchZoom (no auto-title, OpenLayers/Control/PinchZoom.js)
File: Scale (no auto-title, OpenLayers/Control/Scale.js)
File: ScaleLine (no auto-title, OpenLayers/Control/ScaleLine.js)
File: SelectFeature (no auto-title, OpenLayers/Control/SelectFeature.js)
File: SLDSelect (no auto-title, OpenLayers/Control/SLDSelect.js)
File: Snapping (no auto-title, OpenLayers/Control/Snapping.js)
File: Split (no auto-title, OpenLayers/Control/Split.js)
File: TouchNavigation (no auto-title, OpenLayers/Control/TouchNavigation.js)
File: TransformFeature (no auto-title, OpenLayers/Control/TransformFeature.js)
File: WMSGetFeatureInfo (no auto-title, OpenLayers/Control/WMSGetFeatureInfo.js)
File: WMTSGetFeatureInfo (no auto-title, OpenLayers/Control/WMTSGetFeatureInfo.js)
File: ZoomBox (no auto-title, OpenLayers/Control/ZoomBox.js)
File: ZoomIn (no auto-title, OpenLayers/Control/ZoomIn.js)
File: ZoomOut (no auto-title, OpenLayers/Control/ZoomOut.js)
File: ZoomPanel (no auto-title, OpenLayers/Control/ZoomPanel.js)
File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js)
} # Group: Control
File: Events (no auto-title, OpenLayers/Events.js)
Group: Feature {
File: Feature (no auto-title, OpenLayers/Feature.js)
File: Vector (no auto-title, OpenLayers/Feature/Vector.js)
} # Group: Feature
Group: Filter {
File: Filter (no auto-title, OpenLayers/Filter.js)
File: Comparison (no auto-title, OpenLayers/Filter/Comparison.js)
File: FeatureId (no auto-title, OpenLayers/Filter/FeatureId.js)
File: Function (no auto-title, OpenLayers/Filter/Function.js)
File: Logical (no auto-title, OpenLayers/Filter/Logical.js)
File: Spatial (no auto-title, OpenLayers/Filter/Spatial.js)
} # Group: Filter
Group: Format {
File: Format (no auto-title, OpenLayers/Format.js)
File: ArcXML (no auto-title, OpenLayers/Format/ArcXML.js)
File: ArcXML.Features (no auto-title, OpenLayers/Format/ArcXML/Features.js)
File: Atom (no auto-title, OpenLayers/Format/Atom.js)
File: Context (no auto-title, OpenLayers/Format/Context.js)
File: CQL (no auto-title, OpenLayers/Format/CQL.js)
File: CSWGetDomain (no auto-title, OpenLayers/Format/CSWGetDomain.js)
File: CSWGetDomain.v2_0_2 (no auto-title, OpenLayers/Format/CSWGetDomain/v2_0_2.js)
File: CSWGetRecords (no auto-title, OpenLayers/Format/CSWGetRecords.js)
File: CSWGetRecords.v2_0_2 (no auto-title, OpenLayers/Format/CSWGetRecords/v2_0_2.js)
Group: Filter {
File: Filter (no auto-title, OpenLayers/Format/Filter.js)
File: v1 (no auto-title, OpenLayers/Format/Filter/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/Filter/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/Filter/v1_1_0.js)
} # Group: Filter
Group: GML {
File: GML (no auto-title, OpenLayers/Format/GML.js)
File: Base (no auto-title, OpenLayers/Format/GML/Base.js)
File: v2 (no auto-title, OpenLayers/Format/GML/v2.js)
File: v3 (no auto-title, OpenLayers/Format/GML/v3.js)
} # Group: GML
Group: SLD {
File: SLD (no auto-title, OpenLayers/Format/SLD.js)
File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js)
} # Group: SLD
File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js)
File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js)
File: GPX (no auto-title, OpenLayers/Format/GPX.js)
File: JSON (no auto-title, OpenLayers/Format/JSON.js)
File: KML (no auto-title, OpenLayers/Format/KML.js)
File: OGCExceptionReport (no auto-title, OpenLayers/Format/OGCExceptionReport.js)
File: OSM (no auto-title, OpenLayers/Format/OSM.js)
Group: OWSCommon {
File: OWSCommon (no auto-title, OpenLayers/Format/OWSCommon.js)
File: v1 (no auto-title, OpenLayers/Format/OWSCommon/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_1_0.js)
} # Group: OWSCommon
File: OWSContext (no auto-title, OpenLayers/Format/OWSContext.js)
File: OWSContext.v0_3_1 (no auto-title, OpenLayers/Format/OWSContext/v0_3_1.js)
File: QueryStringFilter (no auto-title, OpenLayers/Format/QueryStringFilter.js)
File: SOSCapabilities (no auto-title, OpenLayers/Format/SOSCapabilities.js)
File: SOSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/SOSCapabilities/v1_0_0.js)
File: SOSGetFeatureOfInterest (no auto-title, OpenLayers/Format/SOSGetFeatureOfInterest.js)
File: SOSGetObservation (no auto-title, OpenLayers/Format/SOSGetObservation.js)
File: Text (no auto-title, OpenLayers/Format/Text.js)
File: VersionedOGC (OpenLayers/Format/XML/VersionedOGC.js)
File: WCSGetCoverage version 1.1.0 (no auto-title, OpenLayers/Format/WCSGetCoverage.js)
File: WFS (no auto-title, OpenLayers/Format/WFS.js)
Group: WFSCapabilities {
File: WFSCapabilities (no auto-title, OpenLayers/Format/WFSCapabilities.js)
File: v1 (no auto-title, OpenLayers/Format/WFSCapabilities/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_1_0.js)
} # Group: WFSCapabilities
Group: WFST {
File: WFST (no auto-title, OpenLayers/Format/WFST.js)
File: v1 (no auto-title, OpenLayers/Format/WFST/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/WFST/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WFST/v1_1_0.js)
} # Group: WFST
Group: WMC {
File: WMC (no auto-title, OpenLayers/Format/WMC.js)
File: v1 (no auto-title, OpenLayers/Format/WMC/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/WMC/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WMC/v1_1_0.js)
} # Group: WMC
Group: WMSCapabilities {
File: WMSCapabilities (no auto-title, OpenLayers/Format/WMSCapabilities.js)
File: v1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1.js)
File: v1_1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_0.js)
File: v1_1_1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_1.js)
File: v1_3 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_3.js)
File: v1_3_0 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_3_0.js)
File: WMSCapabilities/v1_1_1_WMSC (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js)
} # Group: WMSCapabilities
Group: WMSDescribeLayer {
File: WMSDescribeLayer (no auto-title, OpenLayers/Format/WMSDescribeLayer.js)
File: v1_1 (no auto-title, OpenLayers/Format/WMSDescribeLayer/v1_1.js)
} # Group: WMSDescribeLayer
File: WFSDescribeFeatureType (no auto-title, OpenLayers/Format/WFSDescribeFeatureType.js)
File: WKT (no auto-title, OpenLayers/Format/WKT.js)
File: WMSGetFeatureInfo (no auto-title, OpenLayers/Format/WMSGetFeatureInfo.js)
File: WMTSCapabilities (no auto-title, OpenLayers/Format/WMTSCapabilities.js)
File: WMTSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WMTSCapabilities/v1_0_0.js)
File: WPSCapabilities (no auto-title, OpenLayers/Format/WPSCapabilities.js)
File: WPSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WPSCapabilities/v1_0_0.js)
File: WPSDescribeProcess (no auto-title, OpenLayers/Format/WPSDescribeProcess.js)
File: WPSExecute version 1.0.0 (no auto-title, OpenLayers/Format/WPSExecute.js)
File: XLS (no auto-title, OpenLayers/Format/XLS.js)
File: XLS.v1 (no auto-title, OpenLayers/Format/XLS/v1.js)
File: XLS.v1_1_0 (no auto-title, OpenLayers/Format/XLS/v1_1_0.js)
File: XML (no auto-title, OpenLayers/Format/XML.js)
} # Group: Format
Group: Geometry {
File: Geometry (no auto-title, OpenLayers/Geometry.js)
File: Collection (no auto-title, OpenLayers/Geometry/Collection.js)
File: Curve (no auto-title, OpenLayers/Geometry/Curve.js)
File: LinearRing (no auto-title, OpenLayers/Geometry/LinearRing.js)
File: LineString (no auto-title, OpenLayers/Geometry/LineString.js)
File: MultiLineString (no auto-title, OpenLayers/Geometry/MultiLineString.js)
File: MultiPoint (no auto-title, OpenLayers/Geometry/MultiPoint.js)
File: MultiPolygon (no auto-title, OpenLayers/Geometry/MultiPolygon.js)
File: Point (no auto-title, OpenLayers/Geometry/Point.js)
File: Polygon (no auto-title, OpenLayers/Geometry/Polygon.js)
} # Group: Geometry
Group: Handler {
File: Handler (no auto-title, OpenLayers/Handler.js)
File: Box (no auto-title, OpenLayers/Handler/Box.js)
File: Click (no auto-title, OpenLayers/Handler/Click.js)
File: Drag (no auto-title, OpenLayers/Handler/Drag.js)
File: Feature (no auto-title, OpenLayers/Handler/Feature.js)
File: Hover (no auto-title, OpenLayers/Handler/Hover.js)
File: Keyboard (no auto-title, OpenLayers/Handler/Keyboard.js)
File: MouseWheel (no auto-title, OpenLayers/Handler/MouseWheel.js)
File: Path (no auto-title, OpenLayers/Handler/Path.js)
File: Pinch (no auto-title, OpenLayers/Handler/Pinch.js)
File: Point (no auto-title, OpenLayers/Handler/Point.js)
File: Polygon (no auto-title, OpenLayers/Handler/Polygon.js)
File: RegularPolygon (no auto-title, OpenLayers/Handler/RegularPolygon.js)
} # Group: Handler
File: Icon (no auto-title, OpenLayers/Icon.js)
Group: Lang {
File: Lang (no auto-title, OpenLayers/Lang.js)
File: ar (no auto-title, OpenLayers/Lang/ar.js)
File: be-tarask (no auto-title, OpenLayers/Lang/be-tarask.js)
File: bg (no auto-title, OpenLayers/Lang/bg.js)
File: br (no auto-title, OpenLayers/Lang/br.js)
File: ca (no auto-title, OpenLayers/Lang/ca.js)
File: cs-CZ (no auto-title, OpenLayers/Lang/cs-CZ.js)
File: da-DK (no auto-title, OpenLayers/Lang/da-DK.js)
File: de (no auto-title, OpenLayers/Lang/de.js)
File: en (no auto-title, OpenLayers/Lang/en.js)
File: en-CA (no auto-title, OpenLayers/Lang/en-CA.js)
File: es (no auto-title, OpenLayers/Lang/es.js)
File: el (no auto-title, OpenLayers/Lang/el.js)
File: fi (no auto-title, OpenLayers/Lang/fi.js)
File: fr (no auto-title, OpenLayers/Lang/fr.js)
File: fur (no auto-title, OpenLayers/Lang/fur.js)
File: gl (no auto-title, OpenLayers/Lang/gl.js)
File: gsw (no auto-title, OpenLayers/Lang/gsw.js)
File: hr (no auto-title, OpenLayers/Lang/hr.js)
File: hsb (no auto-title, OpenLayers/Lang/hsb.js)
File: hu (no auto-title, OpenLayers/Lang/hu.js)
File: ia (no auto-title, OpenLayers/Lang/ia.js)
File: id (no auto-title, OpenLayers/Lang/id.js)
File: io (no auto-title, OpenLayers/Lang/io.js)
File: is (no auto-title, OpenLayers/Lang/is.js)
File: it (no auto-title, OpenLayers/Lang/it.js)
File: ja (no auto-title, OpenLayers/Lang/ja.js)
File: km (no auto-title, OpenLayers/Lang/km.js)
File: ksh (no auto-title, OpenLayers/Lang/ksh.js)
File: lt (no auto-title, OpenLayers/Lang/lt.js)
File: nds (no auto-title, OpenLayers/Lang/nds.js)
File: nb (no auto-title, OpenLayers/Lang/nb.js)
File: nl (no auto-title, OpenLayers/Lang/nl.js)
File: nn (no auto-title, OpenLayers/Lang/nn.js)
File: oc (no auto-title, OpenLayers/Lang/oc.js)
File: pt (no auto-title, OpenLayers/Lang/pt.js)
File: pl (no auto-title, OpenLayers/Lang/pl.js)
File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js)
File: ru (no auto-title, OpenLayers/Lang/ru.js)
File: sk (no auto-title, OpenLayers/Lang/sk.js)
File: sv-SE (no auto-title, OpenLayers/Lang/sv-SE.js)
File: te (no auto-title, OpenLayers/Lang/te.js)
File: vi (no auto-title, OpenLayers/Lang/vi.js)
File: zh-CN (no auto-title, OpenLayers/Lang/zh-CN.js)
File: zh-TW (no auto-title, OpenLayers/Lang/zh-TW.js)
} # Group: Lang
Group: Layer {
File: Layer (no auto-title, OpenLayers/Layer.js)
File: ArcGISCache.js (no auto-title, OpenLayers/Layer/ArcGISCache.js)
File: ArcGIS93Rest (no auto-title, OpenLayers/Layer/ArcGIS93Rest.js)
File: ArcIMS (no auto-title, OpenLayers/Layer/ArcIMS.js)
File: Bing (no auto-title, OpenLayers/Layer/Bing.js)
File: Boxes (no auto-title, OpenLayers/Layer/Boxes.js)
File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js)
File: FixedZoomLevels (no auto-title, OpenLayers/Layer/FixedZoomLevels.js)
File: GeoRSS (no auto-title, OpenLayers/Layer/GeoRSS.js)
File: Google (no auto-title, OpenLayers/Layer/Google.js)
File: Google.v3 (no auto-title, OpenLayers/Layer/Google/v3.js)
File: Grid (no auto-title, OpenLayers/Layer/Grid.js)
File: HTTPRequest (no auto-title, OpenLayers/Layer/HTTPRequest.js)
File: Image (no auto-title, OpenLayers/Layer/Image.js)
File: KaMap (no auto-title, OpenLayers/Layer/KaMap.js)
File: KaMapCache (no auto-title, OpenLayers/Layer/KaMapCache.js)
File: MapGuide (no auto-title, OpenLayers/Layer/MapGuide.js)
File: MapServer (no auto-title, OpenLayers/Layer/MapServer.js)
File: Markers (no auto-title, OpenLayers/Layer/Markers.js)
File: OSM (no auto-title, OpenLayers/Layer/OSM.js)
File: PointGrid (no auto-title, OpenLayers/Layer/PointGrid.js)
File: PointTrack (no auto-title, OpenLayers/Layer/PointTrack.js)
File: SphericalMercator (no auto-title, OpenLayers/Layer/SphericalMercator.js)
File: Text (no auto-title, OpenLayers/Layer/Text.js)
File: TileCache (no auto-title, OpenLayers/Layer/TileCache.js)
File: TMS (no auto-title, OpenLayers/Layer/TMS.js)
File: Vector (no auto-title, OpenLayers/Layer/Vector.js)
File: Vector.RootContainer (no auto-title, OpenLayers/Layer/Vector/RootContainer.js)
File: WMS (no auto-title, OpenLayers/Layer/WMS.js)
File: WMTS (no auto-title, OpenLayers/Layer/WMTS.js)
File: WorldWind (no auto-title, OpenLayers/Layer/WorldWind.js)
File: XYZ (no auto-title, OpenLayers/Layer/XYZ.js)
File: Zoomify (no auto-title, OpenLayers/Layer/Zoomify.js)
} # Group: Layer
File: Map (no auto-title, OpenLayers/Map.js)
Group: Marker {
File: Marker (no auto-title, OpenLayers/Marker.js)
File: Box (no auto-title, OpenLayers/Marker/Box.js)
} # Group: Marker
Group: Popup {
File: Popup (no auto-title, OpenLayers/Popup.js)
File: Anchored (no auto-title, OpenLayers/Popup/Anchored.js)
File: Framed (no auto-title, OpenLayers/Popup/Framed.js)
File: FramedCloud (no auto-title, OpenLayers/Popup/FramedCloud.js)
} # Group: Popup
File: Projection (no auto-title, OpenLayers/Projection.js)
Group: Protocol {
File: Protocol (no auto-title, OpenLayers/Protocol.js)
File: HTTP (no auto-title, OpenLayers/Protocol/HTTP.js)
Group: WFS {
File: WFS (no auto-title, OpenLayers/Protocol/WFS.js)
File: v1 (no auto-title, OpenLayers/Protocol/WFS/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Protocol/WFS/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Protocol/WFS/v1_1_0.js)
} # Group: WFS
File: Script (no auto-title, OpenLayers/Protocol/Script.js)
File: SOS.DEFAULTS (no auto-title, OpenLayers/Protocol/SOS.js)
File: SOS.v1_0_0 (no auto-title, OpenLayers/Protocol/SOS/v1_0_0.js)
} # Group: Protocol
Group: Renderer {
File: Renderer (no auto-title, OpenLayers/Renderer.js)
File: Canvas (no auto-title, OpenLayers/Renderer/Canvas.js)
File: ElementsIndexer (no auto-title, OpenLayers/Renderer/Elements.js)
File: SVG (no auto-title, OpenLayers/Renderer/SVG.js)
File: VML (no auto-title, OpenLayers/Renderer/VML.js)
} # Group: Renderer
Group: Request {
File: Request (no auto-title, OpenLayers/Request.js)
File: XMLHttpRequest (no auto-title, OpenLayers/Request/XMLHttpRequest.js)
} # Group: Request
File: Rule (no auto-title, OpenLayers/Rule.js)
File: SingleFile.js (no auto-title, OpenLayers/SingleFile.js)
Group: Strategy {
File: Strategy (no auto-title, OpenLayers/Strategy.js)
File: BBOX (no auto-title, OpenLayers/Strategy/BBOX.js)
File: Cluster (no auto-title, OpenLayers/Strategy/Cluster.js)
File: Filter (no auto-title, OpenLayers/Strategy/Filter.js)
File: Fixed (no auto-title, OpenLayers/Strategy/Fixed.js)
File: Paging (no auto-title, OpenLayers/Strategy/Paging.js)
File: Refresh (no auto-title, OpenLayers/Strategy/Refresh.js)
File: Save (no auto-title, OpenLayers/Strategy/Save.js)
} # Group: Strategy
File: Style (no auto-title, OpenLayers/Style.js)
File: Style2 (no auto-title, OpenLayers/Style2.js)
File: StyleMap (no auto-title, OpenLayers/StyleMap.js)
Group: Symbolizer {
File: Symbolizer (no auto-title, OpenLayers/Symbolizer.js)
File: Line (no auto-title, OpenLayers/Symbolizer/Line.js)
File: Point (no auto-title, OpenLayers/Symbolizer/Point.js)
File: Polygon (no auto-title, OpenLayers/Symbolizer/Polygon.js)
File: Raster (no auto-title, OpenLayers/Symbolizer/Raster.js)
File: Text (no auto-title, OpenLayers/Symbolizer/Text.js)
} # Group: Symbolizer
Group: Tile {
File: Tile (no auto-title, OpenLayers/Tile.js)
File: Image (no auto-title, OpenLayers/Tile/Image.js)
File: Image.IFrame (no auto-title, OpenLayers/Tile/Image/IFrame.js)
} # Group: Tile
File: Tween (no auto-title, OpenLayers/Tween.js)
File: Util (no auto-title, OpenLayers/Util.js)
File: Deprecated (no auto-title, deprecated.js)
} # Group: OpenLayers
Group: Index {
Index: Everything
Class Index: Classes
Constant Index: Constants
Function Index: Functions
Property Index: Properties
File Index: Files
Constructor Index: Constructor
} # Group: Index

20
apidoc_config/OL.css Normal file
View File

@@ -0,0 +1,20 @@
p {
text-indent: 0; margin-bottom: 1em;
}
.MGroup {
font-variant: normal;
margin: 0.4em 0 0em 10px
}
.MTitle {
font-variant: normal;
}
.CGroup .CTitle {
font-variant: normal;
}
.SGroup .SEntry {
font-variant: normal;
}

105
apidoc_config/Topics.txt Normal file
View File

@@ -0,0 +1,105 @@
Format: 1.52
# This is the Natural Docs topics file for this project. If you change anything
# here, it will apply to THIS PROJECT ONLY. If you'd like to change something
# for all your projects, edit the Topics.txt in Natural Docs' Config directory
# instead.
Ignore Keywords:
function, functions
func, funcs
procedure, procedures
proc, procs
routine, routines
subroutine, subroutines
sub, subs
method, methods
callback, callbacks
property, properties
prop, props
#-------------------------------------------------------------------------------
# SYNTAX:
#
# Topic Type: [name]
# Alter Topic Type: [name]
# Creates a new topic type or alters one from the main file. Each type gets
# its own index and behavior settings. Its name can have letters, numbers,
# spaces, and these charaters: - / . '
#
# Plural: [name]
# Sets the plural name of the topic type, if different.
#
# Keywords:
# [keyword]
# [keyword], [plural keyword]
# ...
# Defines or adds to the list of keywords for the topic type. They may only
# contain letters, numbers, and spaces and are not case sensitive. Plural
# keywords are used for list topics. You can redefine keywords found in the
# main topics file.
#
# Index: [yes|no]
# Whether the topics get their own index. Defaults to yes. Everything is
# included in the general index regardless of this setting.
#
# Scope: [normal|start|end|always global]
# How the topics affects scope. Defaults to normal.
# normal - Topics stay within the current scope.
# start - Topics start a new scope for all the topics beneath it,
# like class topics.
# end - Topics reset the scope back to global for all the topics
# beneath it.
# always global - Topics are defined as global, but do not change the scope
# for any other topics.
#
# Class Hierarchy: [yes|no]
# Whether the topics are part of the class hierarchy. Defaults to no.
#
# Page Title If First: [yes|no]
# Whether the topic's title becomes the page title if it's the first one in
# a file. Defaults to no.
#
# Break Lists: [yes|no]
# Whether list topics should be broken into individual topics in the output.
# Defaults to no.
#
# Can Group With: [type], [type], ...
# Defines a list of topic types that this one can possibly be grouped with.
# Defaults to none.
#-------------------------------------------------------------------------------
# The following topics are defined in the main file, if you'd like to alter
# their behavior or add keywords:
#
# Generic, Class, Interface, Section, File, Group, Function, Variable,
# Property, Type, Constant, Enumeration, Event, Delegate, Macro,
# Database, Database Table, Database View, Database Index, Database
# Cursor, Database Trigger, Cookie, Build Target
# If you add something that you think would be useful to other developers
# and should be included in Natural Docs by default, please e-mail it to
# topics [at] naturaldocs [dot] org.
Topic Type: Constructor
Class Hierarchy: Yes
Keywords:
constructor
initialize
Alter Topic Type: Function
Add Keywords:
apimethod
apifunction
Alter Topic Type: Property
Add Keywords:
apiproperty

127
art/arrows.svg Normal file
View File

@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18.000000px"
height="18.000000px"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.42"
sodipodi:docbase="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements"
sodipodi:docname="pan_icons.svg"
inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.0000000"
inkscape:cx="9.0000000"
inkscape:cy="9.0000000"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1226"
inkscape:window-height="800"
inkscape:window-x="42"
inkscape:window-y="22" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="background"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2110">
<path
transform="matrix(0.000000,-1.003160,1.003160,0.000000,-2.844000e-2,18.02844)"
d="M 17.971654 9.0000000 A 8.9716539 8.9716539 0 1 1 0.028346062,9.0000000 A 8.9716539 8.9716539 0 1 1 17.971654 9.0000000 z"
sodipodi:ry="8.9716539"
sodipodi:rx="8.9716539"
sodipodi:cy="9.0000000"
sodipodi:cx="9.0000000"
id="path2059"
style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
sodipodi:type="arc" />
<rect
transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)"
y="4.3599998e-06"
x="-9.0000048"
height="18.000000"
width="9.0000000"
id="rect2061"
style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="zoom"
style="display:inline">
<text
xml:space="preserve"
style="font-size:18.000000px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica"
x="3.7485352"
y="-3.4077148"
id="text2114"
sodipodi:linespacing="125.00000%"
transform="scale(1.000000,-1.000000)"><tspan
sodipodi:role="line"
id="tspan2118"
x="3.7485352"
y="-3.4077148"></tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="overlay"
style="display:none">
<path
style="font-size:12.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana"
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
id="text2082"
sodipodi:nodetypes="csccsssscccssscccssssccscc" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="pan triangle"
style="display:none">
<path
sodipodi:type="star"
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2107"
sodipodi:sides="3"
sodipodi:cx="6.8031497"
sodipodi:cy="5.1874018"
sodipodi:r1="5.0880113"
sodipodi:r2="2.5440056"
sodipodi:arg1="1.0471976"
sodipodi:arg2="2.0943951"
inkscape:flatsided="false"
inkscape:rounded="0.0000000"
inkscape:randomized="0.0000000"
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18.000000px"
height="18.000000px"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.43"
sodipodi:docbase="/home/sderle/projects/openlayers/layerswitcher/art"
sodipodi:docname="layer-switcher-maximize.svg"
inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="16"
inkscape:cx="9"
inkscape:cy="9"
inkscape:document-units="px"
inkscape:current-layer="layer4"
inkscape:window-width="1226"
inkscape:window-height="800"
inkscape:window-x="42"
inkscape:window-y="25" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="background"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2110"
transform="matrix(-7.849624e-17,1,-1,-7.849624e-17,18,0)">
<path
transform="matrix(0,-1.00316,1.00316,0,-2.844e-2,18.02844)"
d="M 17.971654 9 A 8.9716539 8.9716539 0 1 1 0.028346062,9 A 8.9716539 8.9716539 0 1 1 17.971654 9 z"
sodipodi:ry="8.9716539"
sodipodi:rx="8.9716539"
sodipodi:cy="9"
sodipodi:cx="9"
id="path2059"
style="fill:#00008b;fill-opacity:1;stroke:none;stroke-width:39.98414612;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:type="arc" />
<rect
transform="matrix(0,-1,1,0,0,0)"
y="4.3599998e-06"
x="-9.0000048"
height="18"
width="9"
id="rect2061"
style="fill:#00008b;fill-opacity:1;stroke:none;stroke-width:39.98414612;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="zoom"
style="display:inline">
<text
xml:space="preserve"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline;font-family:Helvetica"
x="1.5214844"
y="-3.2949219"
id="text2114"
sodipodi:linespacing="125%"
transform="scale(1,-1)"><tspan
sodipodi:role="line"
id="tspan2118"
x="1.5214844"
y="-3.2949219">+</tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="overlay"
style="display:none">
<path
style="font-size:12.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana"
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
id="text2082"
sodipodi:nodetypes="csccsssscccssscccssssccscc" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="pan triangle"
style="display:none">
<path
sodipodi:type="star"
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
id="path2107"
sodipodi:sides="3"
sodipodi:cx="6.8031497"
sodipodi:cy="5.1874018"
sodipodi:r1="5.0880113"
sodipodi:r2="2.5440056"
sodipodi:arg1="1.0471976"
sodipodi:arg2="2.0943951"
inkscape:flatsided="false"
inkscape:rounded="0.0000000"
inkscape:randomized="0.0000000"
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:export-ydpi="90.000000"
inkscape:export-xdpi="90.000000"
inkscape:export-filename="/home/sderle/projects/openlayers/layerswitcher/img/layer-switcher-minimize.png"
sodipodi:docname="layer-switcher-minimize.svg"
sodipodi:docbase="/home/sderle/projects/openlayers/layerswitcher/art"
inkscape:version="0.43"
sodipodi:version="0.32"
id="svg2"
height="18.000000px"
width="18.000000px">
<defs
id="defs4" />
<sodipodi:namedview
inkscape:window-y="26"
inkscape:window-x="42"
inkscape:window-height="800"
inkscape:window-width="1226"
inkscape:current-layer="layer1"
inkscape:document-units="px"
inkscape:cy="9.3025513"
inkscape:cx="9"
inkscape:zoom="16"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
style="display:inline"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="background">
<rect
style="fill:#00008b;fill-opacity:0;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
id="rect2061"
width="18.014498"
height="18.000000"
x="-18.014502"
y="4.3599998e-06"
transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:export-filename="/home/sderle/projects/openlayers/layerswitcher/art/layer-switcher-minimize.png" />
</g>
<g
inkscape:label="graticule"
id="layer5"
inkscape:groupmode="layer">
<text
xml:space="preserve"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;display:inline;font-family:Helvetica"
x="5.2802601"
y="-3.8032362"
id="text1432"
sodipodi:linespacing="125%"
transform="scale(1,-1)"><tspan
sodipodi:role="line"
id="tspan1434"
x="5.2802601"
y="-3.8032362">-</tspan></text>
<rect
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99699599px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
id="rect1438"
width="13.003004"
height="13.002999"
x="2.498498"
y="2.4984975" />
</g>
<g
style="display:none"
inkscape:label="zoom"
id="layer4"
inkscape:groupmode="layer">
<text
transform="scale(1.000000,-1.000000)"
sodipodi:linespacing="125.00000%"
id="text2114"
y="-3.4077148"
x="3.7485352"
style="font-size:18.000000;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica;text-anchor:start;writing-mode:lr-tb"
xml:space="preserve"><tspan
y="-3.4077148"
x="3.7485352"
id="tspan2118"
sodipodi:role="line"></tspan></text>
</g>
<g
style="display:none"
inkscape:label="overlay"
id="layer2"
inkscape:groupmode="layer">
<path
sodipodi:nodetypes="csccsssscccssscccssssccscc"
id="text2082"
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
style="font-size:12.000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana;text-anchor:start;writing-mode:lr-tb" />
</g>
<g
style="display:none"
inkscape:label="pan triangle"
id="layer3"
inkscape:groupmode="layer">
<path
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)"
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
inkscape:randomized="0.0000000"
inkscape:rounded="0.0000000"
inkscape:flatsided="false"
sodipodi:arg2="2.0943951"
sodipodi:arg1="1.0471976"
sodipodi:r2="2.5440056"
sodipodi:r1="5.0880113"
sodipodi:cy="5.1874018"
sodipodi:cx="6.8031497"
sodipodi:sides="3"
id="path2107"
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
sodipodi:type="star" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

25
art/marker.svg Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
]>
<svg version="1.1" id="Layer_1" xmlns:i="&ns_ai;"
xmlns="&ns_svg;" width="20.5" height="24.5" viewBox="0 0 20.5 24.5"
overflow="visible" enable-background="new 0 0 20.5 24.5" xml:space="preserve">
<g i:extraneous="self">
<rect x="0.25" y="0.25" opacity="0" stroke="#000000" stroke-width="1" width="20" height="24"/>
<g id="XMLID_2_">
<g>
<polygon fill="#FF0000" points="10.12,0.6 19.93,7.71 10.06,24.03 0.6,7.58 "/>
</g>
<g>
<polyline fill="none" stroke="#000000" stroke-width="1" points="9.98,24.16 10.06,24.03 19.93,7.71 20.06,7.49 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="10.13,24.16 10.06,24.03 0.6,7.58 0.5,7.41 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="0.41,7.72 0.6,7.58 10.12,0.6 10.29,0.47 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="9.94,0.47 10.12,0.6 19.93,7.71 20.06,7.8 "/>
</g>
</g>
<ellipse stroke="#000000" stroke-width="1" cx="10.125" cy="9.25" rx="1.5" ry="1.5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
<g i:extraneous="self">
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
<line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
<rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/>
<line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
<line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/>
<rect x="5.252" y="11.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.1621 12.1086)" fill="#FFBF00" width="20" height="5"/>
<line fill="#FFBF00" stroke="#000000" x1="8.376" y1="15.783" x2="10.717" y2="18.766"/>
<line fill="#FFBF00" stroke="#000000" x1="11.946" y1="13.043" x2="14.288" y2="16.027"/>
<line fill="#FFBF00" stroke="#000000" x1="15.342" y1="10.437" x2="17.684" y2="13.42"/>
<line fill="#FFBF00" stroke="#000000" x1="18.69" y1="7.869" x2="21.03" y2="10.852"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
<g i:extraneous="self">
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
<rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/>
<line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
<line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
<line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/>
<rect x="4.252" y="12.157" transform="matrix(0.7933 -0.6088 0.6088 0.7933 -5.9776 11.7065)" fill="#FFBF00" width="20" height="5"/>
<line fill="#FFBF00" stroke="#000000" x1="7.376" y1="16.783" x2="9.717" y2="19.766"/>
<line fill="#FFBF00" stroke="#000000" x1="10.946" y1="14.043" x2="13.288" y2="17.027"/>
<line fill="#FFBF00" stroke="#000000" x1="14.342" y1="11.437" x2="16.684" y2="14.42"/>
<line fill="#FFBF00" stroke="#000000" x1="17.69" y1="8.869" x2="20.03" y2="11.852"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

44
art/panning-hand-off.svg Normal file
View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
<g i:extraneous="self">
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
<line fill="none" stroke="#00008B" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
<rect x="0.875" y="1.045" fill="#00008B" width="27.125" height="26"/>
<line fill="none" stroke="#00008B" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
<line fill="none" stroke="#FFFFFF" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="1" x2="0.875" y2="27"/>
<path fill="#FFFFFF" stroke="#000000" d="M9.458,22.458c-0.473-0.168-1.02-1.269-1.363-1.695
c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648
c1.036-0.767,2.095-0.162,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421
c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709
c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042
c-0.222-0.209-0.148-0.508-0.155-0.782c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45
c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248
c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.067,0.168,1.558
c-0.146-0.269-0.113-0.749-0.127-1.057c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324
c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91
c-0.13,0.459-0.293,1.222-0.239,1.638c0-0.902,0.334-1.697,0.334-2.588c0-0.678-0.272-2.099,0.581-2.334
c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.882c-0.318,2.154-0.845,4.227-2.096,6.072
c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604
c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

44
art/panning-hand-on.svg Normal file
View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.1" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="28.375" height="28" viewBox="0 0 28.375 28"
overflow="visible" enable-background="new 0 0 28.375 28" xml:space="preserve">
<g i:extraneous="self">
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M27.875,1.375"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M0,1.375"/>
<path fill="none" stroke="#FFFFFF" d="M0,27.475"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,27.645"/>
<path fill="none" stroke="#00008B" stroke-width="1.5" d="M1,0.544"/>
<line fill="none" stroke="#FFFFFF" x1="0.875" y1="27.5" x2="27.875" y2="27.475"/>
<rect x="0.875" y="1.045" fill="#ADD8E6" width="27.125" height="26"/>
<line fill="none" stroke="#FFFFFF" x1="27.875" y1="26.925" x2="27.875" y2="0.925"/>
<line fill="none" stroke="#00008B" x1="1.375" y1="0.5" x2="27.375" y2="0.5"/>
<line fill="none" stroke="#00008B" x1="0.875" y1="1" x2="0.875" y2="27"/>
<path fill="#FFFFFF" stroke="#000000" d="M8.458,23.458c-0.473-0.168-1.02-1.269-1.363-1.695
c-0.479-0.595-0.894-1.245-1.377-1.829c-0.733-0.887-1.356-1.729-1.854-2.764c-0.375-0.782-0.884-1.997-0.005-2.648
c1.036-0.767,2.095-0.161,2.934,0.479c0.844,0.646,1.729,1.18,2.526,1.869c-0.372-0.305-0.548-0.986-0.778-1.421
c-0.253-0.477-0.565-0.906-0.822-1.375c-0.359-0.657-0.767-1.201-1.21-1.823c-0.544-0.763-1.051-1.74-0.925-2.709
c0.133-1.025,0.972-1.527,1.924-1.207c1.202,0.405,1.969,1.692,2.627,2.698c0.636,0.971,1.201,2.159,1.938,3.042
c-0.222-0.21-0.148-0.509-0.155-0.783c-0.01-0.37-0.097-0.626-0.219-0.967c-0.162-0.455-0.219-0.972-0.24-1.45
c-0.034-0.776-0.25-1.465-0.25-2.247c0-0.988-0.14-1.963,0.71-2.631c0.666-0.523,1.649-0.764,2.381-0.248
c1.385,0.976,1.057,2.999,1.209,4.458c0.079,0.759,0.165,1.489,0.2,2.263c0.022,0.496,0.209,1.068,0.168,1.558
c-0.146-0.27-0.113-0.75-0.127-1.058c-0.022-0.502-0.041-0.982-0.115-1.47c-0.114-0.743-0.188-1.564-0.25-2.324
c-0.152-1.877,2.054-3.17,3.301-1.469c0.884,1.206,0.773,2.643,0.773,4.085c0,0.698-0.034,1.251-0.22,1.91
c-0.13,0.459-0.293,1.222-0.239,1.639c0-0.902,0.334-1.697,0.334-2.589c0-0.678-0.272-2.099,0.581-2.334
c1.065-0.294,2.008,0.875,2.428,1.66c0.458,0.855,0.555,1.901,0.409,2.883c-0.318,2.153-0.845,4.227-2.096,6.071
c-0.268,0.396-0.485,0.838-0.79,1.22c-0.361,0.452-0.923,0.772-1.416,1.071c-0.381,0.232-0.764,0.53-1.176,0.604
c-0.822,0.149-1.725,0.157-2.565,0.157c-1.29,0-2.564-0.068-3.832-0.251c-0.799-0.115-2.12,0.153-2.668-0.54"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

71
art/slider.svg Normal file
View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.41.1"
sodipodi:docbase="/afs/metacarta.com/user/sderle/public_html/ol.zoombar/art"
sodipodi:docname="slider.svg"
inkscape:export-filename="/afs/metacarta.com/user/sderle/public_html/ol.zoombar/img/slider.png"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000">
<defs
id="defs3" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="39.870978"
inkscape:cx="140.00732"
inkscape:cy="695.49796"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1010"
inkscape:window-height="538"
inkscape:window-x="20"
inkscape:window-y="107" />
<metadata
id="metadata4">
<rdf:RDF
id="RDF5">
<cc:Work
rdf:about=""
id="Work6">
<dc:format
id="format7">image/svg+xml</dc:format>
<dc:type
id="type9"
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#00008b;fill-opacity:1.0000000;stroke:#000080;stroke-width:4.9999957;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
id="rect1291"
x="132.50000"
y="354.86218"
width="15.014628"
height="4.0040474" />
<path
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.0000000;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
d="M 134.08880,356.89603 L 146.00000,356.87002"
id="path2052" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

193
art/zoom-world.svg Normal file
View File

@@ -0,0 +1,193 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:export-ydpi="90.000000"
inkscape:export-xdpi="90.000000"
inkscape:export-filename="/Users/phil/Documents/work/metacarta/2svn.openlayers.net/follower/code/b-edits-1/openlayers/assets/ui_elements/zoom-minus-mini.png"
sodipodi:docname="zoom-world.svg"
sodipodi:docbase="/afs/metacarta.com/user/sderle/OL/openlayers/assets/ui_elements"
inkscape:version="0.41.1"
sodipodi:version="0.32"
id="svg2"
height="18.000000px"
width="18.000000px">
<defs
id="defs4" />
<sodipodi:namedview
inkscape:window-y="26"
inkscape:window-x="42"
inkscape:window-height="800"
inkscape:window-width="1226"
inkscape:current-layer="layer5"
inkscape:document-units="px"
inkscape:cy="9.3025513"
inkscape:cx="9.0000000"
inkscape:zoom="1.0000000"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata7">
<rdf:RDF
id="RDF1295">
<cc:Work
id="Work1297"
rdf:about="">
<dc:format
id="format1299">image/svg+xml</dc:format>
<dc:type
id="type1301"
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
style="display:inline"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="background">
<rect
style="fill:#00008b;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
id="rect2061"
width="18.014498"
height="18.000000"
x="-18.014502"
y="4.3599998e-06"
transform="matrix(0.000000,-1.000000,1.000000,0.000000,0.000000,0.000000)" />
</g>
<g
inkscape:label="graticule"
id="layer5"
inkscape:groupmode="layer">
<g
transform="translate(0.000000,-4.419417e-2)"
id="g2876">
<path
transform="matrix(1.155321,0.000000,0.000000,1.155321,-2.292065,-1.751761)"
d="M 16.869573 9.3188362 A 7.0579743 7.0579743 0 1 1 2.7536244,9.3188362 A 7.0579743 7.0579743 0 1 1 16.869573 9.3188362 z"
sodipodi:ry="7.0579743"
sodipodi:rx="7.0579743"
sodipodi:cy="9.3188362"
sodipodi:cx="9.8115988"
id="path1321"
style="fill:none;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:0.50000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
sodipodi:type="arc" />
<path
sodipodi:nodetypes="cc"
id="path2086"
d="M 8.1145142,1.1289949 C 15.315267,9.5238831 8.3963197,17.101449 8.3963197,17.057255"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
<path
sodipodi:nodetypes="cc"
id="path2846"
d="M 11.588885,1.3666059 C 18.922222,9.5405232 11.605526,16.764536 11.605526,16.764536"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
<path
sodipodi:nodetypes="cc"
id="path2848"
d="M 5.2258471,2.0593951 C 11.080923,9.7405585 5.3432210,16.278941 5.3432210,16.278941"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
<path
sodipodi:nodetypes="cc"
id="path2850"
d="M 2.7388198,3.7571959 C 6.3686281,9.1817837 2.9127331,14.361601 2.9127331,14.361601"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
</g>
<g
transform="matrix(-6.269315e-2,0.998033,-0.998033,-6.269315e-2,18.62352,0.612232)"
id="g2883">
<path
transform="matrix(1.155321,0.000000,0.000000,1.155321,-2.292065,-1.751761)"
d="M 16.869573 9.3188362 A 7.0579743 7.0579743 0 1 1 2.7536244,9.3188362 A 7.0579743 7.0579743 0 1 1 16.869573 9.3188362 z"
sodipodi:ry="7.0579743"
sodipodi:rx="7.0579743"
sodipodi:cy="9.3188362"
sodipodi:cx="9.8115988"
id="path2885"
style="fill:none;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:0.50000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
sodipodi:type="arc" />
<path
sodipodi:nodetypes="cc"
id="path2887"
d="M 8.1145142,1.1289949 C 15.315267,9.5238831 8.3963197,17.101449 8.3963197,17.057255"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
<path
sodipodi:nodetypes="cc"
id="path2889"
d="M 11.588885,1.3666059 C 18.922222,9.5405232 11.605526,16.764536 11.605526,16.764536"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
<path
sodipodi:nodetypes="cc"
id="path2891"
d="M 5.2258471,2.0593951 C 11.080923,9.7405585 5.3432210,16.278941 5.3432210,16.278941"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
<path
sodipodi:nodetypes="cc"
id="path2893"
d="M 2.7388198,3.7571959 C 6.3686281,9.1817837 2.9127331,14.361601 2.9127331,14.361601"
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.50000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
</g>
</g>
<g
style="display:none"
inkscape:label="zoom"
id="layer4"
inkscape:groupmode="layer">
<text
transform="scale(1.000000,-1.000000)"
sodipodi:linespacing="125.00000%"
id="text2114"
y="-3.4077148"
x="3.7485352"
style="font-size:18.000000;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:#ffffff;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1.0000000;font-family:Helvetica;text-anchor:start;writing-mode:lr-tb"
xml:space="preserve"><tspan
y="-3.4077148"
x="3.7485352"
id="tspan2118"
sodipodi:role="line"></tspan></text>
</g>
<g
style="display:none"
inkscape:label="overlay"
id="layer2"
inkscape:groupmode="layer">
<path
sodipodi:nodetypes="csccsssscccssscccssssccscc"
id="text2082"
d="M 2.9678210,9.0332227 C 2.9678314,9.5015070 3.1752531,9.8938504 3.5900866,10.210254 C 3.6463464,10.254553 3.9451742,10.453889 4.4865710,10.808262 L 8.1568835,13.247754 C 8.2693886,13.323691 8.4240759,13.393300 8.6209460,13.456582 C 8.8107943,13.519862 9.0041535,13.551503 9.2010240,13.551504 C 9.5736843,13.551503 9.8936056,13.431269 10.160789,13.190801 C 10.427980,12.950332 10.561574,12.659238 10.561572,12.317520 C 10.561574,11.861896 10.322511,11.488536 9.8443836,11.197442 L 8.5998522,10.428575 L 14.548408,10.428575 C 15.026535,10.428577 15.406221,10.298849 15.687470,10.039395 C 15.968721,9.7799443 16.109345,9.4318977 16.109345,8.9952540 C 16.109345,8.5396330 15.961690,8.1915865 15.666377,7.9511133 C 15.364034,7.7106494 14.980831,7.5904152 14.516767,7.5904102 L 8.6314928,7.5904102 L 9.9920390,6.7076368 C 10.160793,6.5937365 10.290871,6.4481897 10.382274,6.2709962 C 10.466652,6.0874870 10.508840,5.8913153 10.508837,5.6824805 C 10.508840,5.3281127 10.378761,5.0338552 10.118602,4.7997070 C 9.8584498,4.5655745 9.5279814,4.4485043 9.1271961,4.4484962 C 8.7615757,4.4485043 8.4029823,4.5624104 8.0514147,4.7902149 L 3.9697741,7.5239649 C 3.6393151,7.7454540 3.4002529,7.9542820 3.2525866,8.1504493 C 3.0627532,8.3972503 2.9678314,8.6756875 2.9678210,8.9857618 L 2.9678210,9.0332227"
style="font-size:12.000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Verdana;text-anchor:start;writing-mode:lr-tb" />
</g>
<g
style="display:none"
inkscape:label="pan triangle"
id="layer3"
inkscape:groupmode="layer">
<path
transform="matrix(0.000000,-1.331000,1.331000,0.000000,2.038879,16.92102)"
d="M 9.3471551,9.5937489 L 5.5311469,7.3905753 L 1.7151384,5.1874015 L 5.5311469,2.9842283 L 9.3471555,0.78105489 L 9.3471553,5.1874018 L 9.3471551,9.5937489 z "
inkscape:randomized="0.0000000"
inkscape:rounded="0.0000000"
inkscape:flatsided="false"
sodipodi:arg2="2.0943951"
sodipodi:arg1="1.0471976"
sodipodi:r2="2.5440056"
sodipodi:r1="5.0880113"
sodipodi:cy="5.1874018"
sodipodi:cx="6.8031497"
sodipodi:sides="3"
id="path2107"
style="fill:#ffffff;fill-opacity:1.0000000;stroke:none;stroke-width:39.984146;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
sodipodi:type="star" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

73
art/zoombar.svg Normal file
View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18"
height="18"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.43"
version="1.0"
inkscape:export-filename="C:\Documents and Settings\crschmidt\Desktop\zoombar.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
sodipodi:docbase="C:\Documents and Settings\crschmidt\Desktop"
sodipodi:docname="zoombar.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-117.50597"
inkscape:cy="65.94562"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showguides="false"
showgrid="false"
inkscape:window-width="1024"
inkscape:window-height="721"
inkscape:window-x="-4"
inkscape:window-y="-4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:0.5;fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000012;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1307"
width="16.999998"
height="10.000004"
x="-125.51302"
y="-52.420002" />
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999958;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078"
d="M -125.54176,-52.415494 L -125.54176,-42.415495"
id="path8297" />
<path
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999982;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078"
d="M -108.48157,-52.418044 L -108.48157,-42.418046"
id="path12667" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

56
authors.txt Normal file
View File

@@ -0,0 +1,56 @@
OpenLayers contributors:
Antoine Abt
Mike Adair
Jeff Adams
Seb Benthall
Bruno Binet
Stéphane Brunner
Howard Butler
Bertil Chaupis
John Cole
Tim Coulter
Robert Coup
Jeff Dege
Roald de Wit
Schuyler Erle
Christian López Espínola
John Frank
Sean Gilles
Pierre Giraud
Ivan Grcic
Andreas Hocevar
Marc Jansen
Ian Johnson
Frédéric Junod
Eric Lemoine
Philip Lindsay
Martijn van Oosterhout
David Overstrom
Corey Puffault
Peter William Robins
Gregers Rygg
Tim Schaub
Christopher Schmidt
Cameron Shorter
Pedro Simonetti
Paul Spencer
Paul Smith
Glen Stampoultzis
James Stembridge
Erik Uzureau
Bart van den Eijnden
Ivan Willig
Thomas Wood
Bill Woodall
Steve Woodbridge
David Zwarg
Some portions of OpenLayers are used under the Apache 2.0 license, available
in doc/licenses/APACHE-2.0.txt.
Some portions of OpenLayers are used under the MIT license, availabie in
doc/licenses/MIT-LICENSE.txt.
Some portions of OpenLayers are Copyright 2001 Robert Penner, and are used
under the BSD license, available in doc/licenses/BSD-LICENSE.txt

View File

@@ -1,30 +0,0 @@
//
// A PhantomJS script used to check that the hosted examples load
// without errors. This script is executed by the build tool's
// check-examples target.
//
var args = require('system').args;
if (args.length != 2) {
phantom.exit(2);
}
var examplePath = args[1];
var page = require('webpage').create();
page.onError = function(msg, trace) {
var msgStack = ['JavaScript ERROR: ' + msg];
if (trace) {
msgStack.push('TRACE:');
trace.forEach(function(t) {
msgStack.push(' -> ' + t.file + ': ' + t.line + (t.function ? ' (in function "' + t.function + '")' : ''));
});
}
console.error(msgStack.join('\n'));
phantom.exit(1);
};
page.open(examplePath, function(s) {
var exitCode = 0;
if (s != 'success') {
exitCode = 1;
console.error('PAGE LOAD ERROR');
}
phantom.exit(exitCode);
});

View File

@@ -1,202 +0,0 @@
#!/usr/bin/env python
#
# Copyright 2009 The Closure Library Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Generates out a Closure deps.js file given a list of JavaScript sources.
Paths can be specified as arguments or (more commonly) specifying trees
with the flags (call with --help for descriptions).
Usage: depswriter.py [path/to/js1.js [path/to/js2.js] ...]
"""
import logging
import optparse
import os
import posixpath
import shlex
import sys
import source
import treescan
__author__ = 'nnaze@google.com (Nathan Naze)'
def MakeDepsFile(source_map):
"""Make a generated deps file.
Args:
source_map: A dict map of the source path to source.Source object.
Returns:
str, A generated deps file source.
"""
# Write in path alphabetical order
paths = sorted(source_map.keys())
lines = []
for path in paths:
js_source = source_map[path]
# We don't need to add entries that don't provide anything.
if js_source.provides:
lines.append(_GetDepsLine(path, js_source))
return ''.join(lines)
def _GetDepsLine(path, js_source):
"""Get a deps.js file string for a source."""
provides = sorted(js_source.provides)
requires = sorted(js_source.requires)
return 'goog.addDependency(\'%s\', %s, %s);\n' % (path, provides, requires)
def _GetOptionsParser():
"""Get the options parser."""
parser = optparse.OptionParser(__doc__)
parser.add_option('--output_file',
dest='output_file',
action='store',
help=('If specified, write output to this path instead of '
'writing to standard output.'))
parser.add_option('--root',
dest='roots',
default=[],
action='append',
help='A root directory to scan for JS source files. '
'Paths of JS files in generated deps file will be '
'relative to this path. This flag may be specified '
'multiple times.')
parser.add_option('--root_with_prefix',
dest='roots_with_prefix',
default=[],
action='append',
help='A root directory to scan for JS source files, plus '
'a prefix (if either contains a space, surround with '
'quotes). Paths in generated deps file will be relative '
'to the root, but preceded by the prefix. This flag '
'may be specified multiple times.')
parser.add_option('--path_with_depspath',
dest='paths_with_depspath',
default=[],
action='append',
help='A path to a source file and an alternate path to '
'the file in the generated deps file (if either contains '
'a space, surround with whitespace). This flag may be '
'specified multiple times.')
return parser
def _NormalizePathSeparators(path):
"""Replaces OS-specific path separators with POSIX-style slashes.
Args:
path: str, A file path.
Returns:
str, The path with any OS-specific path separators (such as backslash on
Windows) replaced with URL-compatible forward slashes. A no-op on systems
that use POSIX paths.
"""
return path.replace(os.sep, posixpath.sep)
def _GetRelativePathToSourceDict(root, prefix=''):
"""Scans a top root directory for .js sources.
Args:
root: str, Root directory.
prefix: str, Prefix for returned paths.
Returns:
dict, A map of relative paths (with prefix, if given), to source.Source
objects.
"""
# Remember and restore the cwd when we're done. We work from the root so
# that paths are relative from the root.
start_wd = os.getcwd()
os.chdir(root)
path_to_source = {}
for path in treescan.ScanTreeForJsFiles('.'):
prefixed_path = _NormalizePathSeparators(os.path.join(prefix, path))
path_to_source[prefixed_path] = source.Source(source.GetFileContents(path))
os.chdir(start_wd)
return path_to_source
def _GetPair(s):
"""Return a string as a shell-parsed tuple. Two values expected."""
try:
# shlex uses '\' as an escape character, so they must be escaped.
s = s.replace('\\', '\\\\')
first, second = shlex.split(s)
return (first, second)
except:
raise Exception('Unable to parse input line as a pair: %s' % s)
def main():
"""CLI frontend to MakeDepsFile."""
logging.basicConfig(format=(sys.argv[0] + ': %(message)s'),
level=logging.INFO)
options, args = _GetOptionsParser().parse_args()
path_to_source = {}
# Roots without prefixes
for root in options.roots:
path_to_source.update(_GetRelativePathToSourceDict(root))
# Roots with prefixes
for root_and_prefix in options.roots_with_prefix:
root, prefix = _GetPair(root_and_prefix)
path_to_source.update(_GetRelativePathToSourceDict(root, prefix=prefix))
# Source paths
for path in args:
path_to_source[path] = source.Source(source.GetFileContents(path))
# Source paths with alternate deps paths
for path_with_depspath in options.paths_with_depspath:
srcpath, depspath = _GetPair(path_with_depspath)
path_to_source[depspath] = source.Source(source.GetFileContents(srcpath))
# Make our output pipe.
if options.output_file:
out = open(options.output_file, 'w')
else:
out = sys.stdout
out.write('// This file was autogenerated by %s.\n' % sys.argv[0])
out.write('// Please do not edit.\n')
out.write(MakeDepsFile(path_to_source))
if __name__ == '__main__':
main()

View File

@@ -1,114 +0,0 @@
# Copyright 2009 The Closure Library Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Scans a source JS file for its provided and required namespaces.
Simple class to scan a JavaScript file and express its dependencies.
"""
__author__ = 'nnaze@google.com'
import re
_BASE_REGEX_STRING = '^\s*goog\.%s\(\s*[\'"](.+)[\'"]\s*\)'
_PROVIDE_REGEX = re.compile(_BASE_REGEX_STRING % 'provide')
_REQUIRES_REGEX = re.compile(_BASE_REGEX_STRING % 'require')
# This line identifies base.js and should match the line in that file.
_GOOG_BASE_LINE = (
'var goog = goog || {}; // Identifies this file as the Closure base.')
class Source(object):
"""Scans a JavaScript source for its provided and required namespaces."""
# Matches a "/* ... */" comment.
# Note: We can't definitively distinguish a "/*" in a string literal without a
# state machine tokenizer. We'll assume that a line starting with whitespace
# and "/*" is a comment.
_COMMENT_REGEX = re.compile(
r"""
^\s* # Start of a new line and whitespace
/\* # Opening "/*"
.*? # Non greedy match of any characters (including newlines)
\*/ # Closing "*/""",
re.MULTILINE | re.DOTALL | re.VERBOSE)
def __init__(self, source):
"""Initialize a source.
Args:
source: str, The JavaScript source.
"""
self.provides = set()
self.requires = set()
self._source = source
self._ScanSource()
def __str__(self):
return 'Source %s' % self._path
def GetSource(self):
"""Get the source as a string."""
return self._source
@classmethod
def _StripComments(cls, source):
return cls._COMMENT_REGEX.sub('', source)
def _ScanSource(self):
"""Fill in provides and requires by scanning the source."""
source = self._StripComments(self.GetSource())
source_lines = source.splitlines()
for line in source_lines:
match = _PROVIDE_REGEX.match(line)
if match:
self.provides.add(match.group(1))
match = _REQUIRES_REGEX.match(line)
if match:
self.requires.add(match.group(1))
# Closure's base file implicitly provides 'goog'.
for line in source_lines:
if line == _GOOG_BASE_LINE:
if len(self.provides) or len(self.requires):
raise Exception(
'Base files should not provide or require namespaces.')
self.provides.add('goog')
def GetFileContents(path):
"""Get a file's contents as a string.
Args:
path: str, Path to file.
Returns:
str, Contents of file.
Raises:
IOError: An error occurred opening or reading the file.
"""
fileobj = open(path)
try:
return fileobj.read()
finally:
fileobj.close()

View File

@@ -1,78 +0,0 @@
#!/usr/bin/env python
#
# Copyright 2010 The Closure Library Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Shared utility functions for scanning directory trees."""
import os
import re
__author__ = 'nnaze@google.com (Nathan Naze)'
# Matches a .js file path.
_JS_FILE_REGEX = re.compile(r'^.+\.js$')
def ScanTreeForJsFiles(root):
"""Scans a directory tree for JavaScript files.
Args:
root: str, Path to a root directory.
Returns:
An iterable of paths to JS files, relative to cwd.
"""
return ScanTree(root, path_filter=_JS_FILE_REGEX)
def ScanTree(root, path_filter=None, ignore_hidden=True):
"""Scans a directory tree for files.
Args:
root: str, Path to a root directory.
path_filter: A regular expression filter. If set, only paths matching
the path_filter are returned.
ignore_hidden: If True, do not follow or return hidden directories or files
(those starting with a '.' character).
Yields:
A string path to files, relative to cwd.
"""
def OnError(os_error):
raise os_error
for dirpath, dirnames, filenames in os.walk(root, onerror=OnError):
# os.walk allows us to modify dirnames to prevent decent into particular
# directories. Avoid hidden directories.
for dirname in dirnames:
if ignore_hidden and dirname.startswith('.'):
dirnames.remove(dirname)
for filename in filenames:
# nothing that starts with '.'
if ignore_hidden and filename.startswith('.'):
continue
fullpath = os.path.join(dirpath, filename)
if path_filter and not path_filter.match(fullpath):
continue
yield os.path.normpath(fullpath)

View File

@@ -1,180 +0,0 @@
/**
* This script is supposed to be executed via phantomjs. It will generate
* screenshots of the html files in the directory specified by a commandline
* option when these files are served through a webserver which can also be
* specified. The screenshots will be in the current working directory.
*
* Example usage:
*
* user@host:~/ol3/bin $ phantomjs example-screenshot.js \
* http://localhost:8000/ol3/examples/ \
* ../examples
*
* The above command will generate `*.png` files in `examples/` for all html
* files that are served through `http://localhost:8000/ol3/examples/`.
*
* So if there is a file `my-humpty-example.html` inside of the relative folder
* `../examples/` which is being served through the webserver so that
* `http://localhost:8000/ol3/examples/my-humpty-example.html` is a valid and
* reachable URL, this script will generate a screenshot and store it as
* `my-humpty-example.html.png`.
*
* The query string `?mode=raw` will be appended to the generated URL.
*
* Known limitations:
*
* As phantomjs doesn't support WebGL (see e.g.
* https://github.com/ariya/phantomjs/wiki/Supported-Web-Standards and
* http://code.google.com/p/phantomjs/issues/detail?id=273) This won't render
* OpenLayers maps rendered through the webglrenderer.
*
* In parts based upon this gist: https://gist.github.com/crazy4groovy/3160121
*/
(function() { // global closure
var page = require('webpage').create(), // imports
fs = require('fs'),
system = require('system'),
// arguments
baseExamplesUrl = system.args[1],
exampleDir = system.args[2],
// various settings
ignoreFiles = [
'index.html'
],
intervalMillisecs = 25,
renderMillisecs = 2000,
// basic variables
curDir = fs.workingDirectory,
exampleDirList = fs.list(exampleDir),
pageindex = 0,
fileName = '',
htmlFiles = [],
lenHtmlFiles = 0,
loadInProgress = false;
// simple object with helper functions
var util = {
/**
* Returns the basename of a file given a path.
*/
baseName: function(path) {
var parts = path.split(fs.separator);
return parts[parts.length - 1];
},
/**
* Super basic test whether a file can be considered a HTML-file.
*/
isHtmlFile: function(filename) {
return (/\.html?$/).test(filename);
},
/**
* Appends a slash to given string if it isn't there already.
*/
appendSlash: function(str) {
return ((/\/$/).test(str)) ? str : str + '/';
},
/**
* Generates an URL out of given baseurl and path.
*/
buildUrl: function(baseurl, path) {
var name = util.baseName(path),
mode = 'raw';
return util.appendSlash(baseurl) + name + '?mode=' + mode;
},
/**
* Simple progressbar logger that uses our globals pageindex & lenHtmlFiles.
*/
logProgress: function() {
var doneSymbol = '-',
todoSymbol = ' ',
currentSymbol = '>',
barStrLeft = '[',
barStrRight = ']',
progresStep = 5, // one doneSymbol equals this percentage
totalSteps = Math.round(100 / progresStep),
ratio = (lenHtmlFiles === 0) ? 0 : (pageindex / lenHtmlFiles),
percent = (ratio === 0) ? 0 : ratio * 100,
normalizedNumDone = Math.floor(ratio * totalSteps),
normalizedNumTodo = totalSteps - normalizedNumDone,
progressLine = '',
i = 0;
// the progress bar
progressLine += barStrLeft;
for (; i < normalizedNumDone; i++) {
progressLine += doneSymbol;
}
for (i = 0; i < normalizedNumTodo; i++) {
progressLine += (i === 0) ? currentSymbol : todoSymbol;
}
progressLine += barStrRight;
// the percentage information
// pad if necessary
if (percent < 10) {
progressLine += ' ';
} else if (percent < 100) {
progressLine += ' ';
}
progressLine += ' ' + percent.toFixed(1) + ' % done';
// additional information
if (fileName !== '') {
progressLine += ', ' + util.baseName(fileName) + '';
}
console.log(progressLine);
}
};
// iterate over all files in examples directory
// and find the HTML files.
for (var i = 0; i < exampleDirList.length; i++) {
var fullpath = exampleDir + fs.separator + exampleDirList[i];
if (fs.isFile(fullpath) && util.isHtmlFile(fullpath) &&
ignoreFiles.indexOf(util.baseName(fullpath)) === -1) {
//TODO: make this more async (i.e. pop on/off stack WHILE rending pages)
htmlFiles.push(fullpath);
}
}
lenHtmlFiles = htmlFiles.length;
console.log('Capturing ' + lenHtmlFiles + ' example screenshots.');
// The main interval function that is executed regularily and renders a
// page to a file
var interval = setInterval(function() {
if (!loadInProgress && pageindex < lenHtmlFiles) {
util.logProgress();
fileName = htmlFiles[pageindex];
page.viewportSize = { width: 800, height: 600 };
page.clipRect = {
top: 0,
left: 0,
width: page.viewportSize.width,
height: page.viewportSize.height
};
page.open(util.buildUrl(baseExamplesUrl, htmlFiles[pageindex]));
}
if (pageindex == lenHtmlFiles) {
util.logProgress();
console.log(lenHtmlFiles + ' screenshots captured.');
phantom.exit();
}
}, intervalMillisecs);
// set loadInProgress flag so we only process one image at time.
page.onLoadStarted = function() {
loadInProgress = true;
};
// When the page is loaded, render it to an image
page.onLoadFinished = function() {
var dest = exampleDir + fs.separator + util.baseName(fileName) + '.png';
window.setTimeout(function() {
loadInProgress = false;
page.render(dest); // actually render the page.
pageindex++;
}, renderMillisecs);
};
})(); // eof global closure

View File

@@ -1,323 +0,0 @@
#!/usr/bin/env python
from collections import defaultdict
from itertools import ifilter
from operator import attrgetter
from optparse import OptionParser
import re
import sys
def simplerepr(obj):
keys = sorted(key for key in obj.__dict__.keys() if not key.startswith('_'))
attrs = ''.join(' %s=%r' % (key, obj.__dict__[key]) for key in keys)
return '<%s%s>' % (obj.__class__.__name__, attrs)
class Exportable(object):
def __init__(self, name):
self.name = name
__repr__ = simplerepr
def export(self):
return ''
def extern(self):
return ''
def typedef(self):
return ''
class Class(Exportable):
def __init__(self, name, object_literal, objects):
Exportable.__init__(self, name)
self.object_literal = object_literal
self.objects = objects
self.props = set()
__repr__ = simplerepr
def nested_options(self):
def get_class_by_object_literal_name(name):
for k, o in self.objects.iteritems():
if isinstance(o, Class) and o.object_literal.name == name:
return o
return None
for option in sorted(self.object_literal.prop_types.keys()):
types = self.object_literal.prop_types[option].split('|')
base, object_literal = None, None
for t in types:
if t in self.objects:
o = self.objects[t]
if isinstance(o, (Class, Symbol)):
if base:
raise RuntimeError('Multiple "class" types found for '
'option %s.%s: %s, %s.' %
(self.object_literal.name, option,
base.name, o.name))
base = o
elif isinstance(o, ObjectLiteral):
if object_literal:
raise RuntimeError('Multiple "literal" types found for '
'option %s.%s: %s, %s.' %
(self.object_literal.name, option,
object_literal.name, o.name))
object_literal = o
if object_literal:
if not base:
raise RuntimeError('%s "literal" type found for option %s.%s, '
'but no "class" type.' %
(object_literal.name, self.object_literal.name, option))
klass = get_class_by_object_literal_name(object_literal.name)
if not klass:
raise RuntimeError('No constructor taking a %s found.' %
object_literal.name)
yield option, object_literal, klass, base
def export(self):
lines = []
if self.object_literal is None:
lines.append('\n\ngoog.exportSymbol(\n \'%s\',\n %s);\n' % (self.name, self.name))
else:
lines.append('\n\n\n')
lines.append('/**\n')
lines.append(' * @constructor\n')
lines.append(' * @extends {%s}\n' % (self.name,))
lines.append(' * @param {%s} options Options.\n' % (self.object_literal.extern_name(),))
lines.append(' */\n')
lines.append('%s = function(options) {\n' % (self.export_name(),))
lines.append(' /** @type {%s} */\n' % (self.object_literal.name,))
lines.append(' var arg;\n');
lines.append(' if (goog.isDefAndNotNull(options)) {\n')
# FIXME: we modify the user's options object
lines.append(''.join(
' if (!(options.%(o)s instanceof %(base)s)) {\n'
' options.%(o)s = new %(ctor)s(\n'
' /** @type {%(extern)s} */ (options.%(o)s));\n'
' }\n' %
{'o': o, 'base': b.name, 'ctor': k.export_name(),
'extern': ol.extern_name()} \
for o, ol, k, b in self.nested_options()))
lines.append(' arg = {')
lines.extend(','.join('\n %s: options.%s' % (key, key) for key in sorted(self.object_literal.prop_types.keys())))
lines.append('\n };\n')
lines.append(' } else {\n')
lines.append(' arg = /** @type {%s} */ (options);\n' % (self.object_literal.name,))
lines.append(' }\n')
lines.append(' goog.base(this, arg);\n')
lines.append('};\n')
lines.append('goog.inherits(\n')
lines.append(' %sExport,\n' % (self.name,));
lines.append(' %s);\n' % (self.name,));
lines.append('goog.exportSymbol(\n')
lines.append(' \'%s\',\n' % (self.name,))
lines.append(' %s);\n' % (self.export_name(),))
lines.extend('goog.exportProperty(\n %s,\n \'%s\',\n %s.%s);\n' % (self.name, prop, self.name, prop) for prop in sorted(self.props))
return ''.join(lines)
def export_name(self):
return '%sExport' % self.name
class ObjectLiteral(Exportable):
def __init__(self, name):
Exportable.__init__(self, name)
self.prop_types = {}
__repr__ = simplerepr
def extern(self):
lines = []
lines.append('\n\n\n')
lines.append('/**\n')
lines.append(' * @interface\n')
lines.append(' */\n')
lines.append('%s = function() {};\n' % (self.extern_name(),))
for prop in sorted(self.prop_types.keys()):
lines.append('\n\n')
lines.append('/**\n')
lines.append(' * @type {%s}\n' % (self.prop_types[prop],))
lines.append(' */\n')
lines.append('%s.prototype.%s;\n' % (self.extern_name(), prop))
return ''.join(lines)
def extern_name(self):
return re.sub(r'ol\.(\S+)', r'olx.\1Extern', self.name)
def extern_namespace(self):
return '.'.join(self.extern_name().split('.')[:-1]) or None
def provide(self):
return 'goog.provide(\'%s\');\n' % (self.name,)
def typedef(self):
lines = []
lines.append('\n\n')
lines.append('/**\n')
for i, prop in enumerate(sorted(self.prop_types.keys())):
prefix = ' * @typedef {{' if i == 0 else ' * '
suffix = '}}' if i == len(self.prop_types) - 1 else ','
type = self.prop_types[prop]
if '|' in type:
type = '(%s)' % (type,)
lines.append('%s%s: %s%s\n' % (prefix, prop, type, suffix))
lines.append(' */\n')
lines.append('%s;\n' % (self.name,))
return ''.join(lines)
class Symbol(Exportable):
def __init__(self, name, export_symbol, export_as=None):
Exportable.__init__(self, name)
self.export_symbol = export_symbol
self.export_as = export_as or self.name
self.props = set()
__repr__ = simplerepr
def export(self):
lines = []
if self.export_symbol:
lines.append('\n\ngoog.exportSymbol(\n \'%s\',\n %s);\n' % (self.name, self.export_as))
lines.extend('goog.exportProperty(\n %s,\n \'%s\',\n %s.%s);\n' % (self.name, prop, self.name, prop) for prop in sorted(self.props))
return ''.join(lines)
def main(argv):
option_parser = OptionParser()
option_parser.add_option('--exports', action='store_true')
option_parser.add_option('--externs', action='store_true')
option_parser.add_option('--typedef', action='store_true')
options, args = option_parser.parse_args(argv[1:])
objects = {}
requires = set()
for arg in args:
in_comment = False
object_literal = None
for line in open(arg):
line = line.strip()
if not line:
continue
if line == '/**':
assert not in_comment
in_comment = True
continue
if line == '*/':
assert in_comment
in_comment = False
object_literal = None
continue
if in_comment:
if not line.startswith('*'):
raise RuntimeError(line) # malformed comment
m = re.match(r'\*\s*@typedef\s*\{Object\}\s*(?P<name>\S+)', line)
if m:
assert object_literal is None
name = m.group('name')
if name in objects:
raise RuntimeError(line) # Name already defined
object_literal = ObjectLiteral(name)
objects[name] = object_literal
continue
m = re.match(r'\*\s*@property\s*{(?P<type>.*)}\s*(?P<prop>\S+)', line)
if m:
assert object_literal is not None
prop = m.group('prop')
if prop in object_literal.prop_types:
raise RuntimeError(line) # Duplicate property
type = m.group('type')
object_literal.prop_types[prop] = type
continue
continue
m = re.match(r'@exportClass\s+(?P<name>\S+)(?:\s+(?P<object_literal_name>\S+))?\Z', line)
if m:
name = m.group('name')
if name in objects:
raise RuntimeError(line) # Name already defined
object_literal_name = m.group('object_literal_name')
object_literal = objects[object_literal_name]
if not isinstance(object_literal, ObjectLiteral):
raise RuntimeError(line) # Undefined object literal
klass = Class(name, object_literal, objects)
objects[name] = klass
continue
m = re.match(r'@exportProperty\s+(?P<prop>\S+)\Z', line)
if m:
components = m.group('prop').split('.')
if components[-2] == 'prototype':
requires.add('.'.join(components[:-2]))
else:
requires.add('.'.join(components[:-1]))
name = '.'.join(components[:-1])
prop = components[-1]
if name in objects:
symbol = objects[name]
else:
symbol = Symbol(name, False)
objects[name] = symbol
symbol.props.add(prop)
continue
m = re.match(r'@exportSymbol\s+(?P<name>\S+)(?:\s+(?P<export_as>\S+))?\Z', line)
if m:
name = m.group('name')
if name in objects:
raise RuntimeError(line) # Name already defined
export_as = m.group('export_as')
symbol = Symbol(name, True, export_as)
objects[name] = symbol
if not export_as:
components = m.group('name').split('.')
if re.match(r'[A-Z]', components[-1]):
requires.add(name)
elif len(components) > 1:
requires.add('.'.join(components[:-1]))
continue
raise RuntimeError(line)
objects = sorted(objects.values(), key=attrgetter('name'))
if options.exports:
requires.update(obj.name for obj in objects if isinstance(obj, Class))
if requires:
for require in sorted(requires):
sys.stdout.write('goog.require(\'%s\');\n' % (require,))
for obj in objects:
sys.stdout.write(obj.export())
if options.externs:
object_literals = [obj for obj in objects if isinstance(obj, ObjectLiteral)]
sys.stdout.write('/**\n')
sys.stdout.write(' * @externs\n')
sys.stdout.write(' */\n')
namespaces = sorted(set(filter(None, (object_literal.extern_namespace() for object_literal in object_literals))))
for namespace in namespaces:
sys.stdout.write('\n\n')
sys.stdout.write('/**\n')
sys.stdout.write(' * @type {Object}\n')
sys.stdout.write(' */\n')
if '.' in namespace:
sys.stdout.write('%s = {};\n' % (namespace,))
else:
sys.stdout.write('var %s;\n' % (namespace,))
for object_literal in object_literals:
sys.stdout.write(object_literal.extern())
if options.typedef:
object_literals = [obj for obj in objects if isinstance(obj, ObjectLiteral)]
for object_literal in object_literals:
sys.stdout.write(object_literal.provide())
for object_literal in object_literals:
sys.stdout.write(object_literal.typedef())
if __name__ == '__main__':
sys.exit(main(sys.argv))

View File

@@ -1,86 +0,0 @@
/**
* Loader to add ol.css, ol.js and the example-specific js file to the
* documents.
*
* This loader is used for the hosted examples. It is used in place of the
* development loader (examples/loader.js).
*
* ol.css, ol.js, ol-simple.js, ol-whitespace.js, and ol-deps.js are built
* by OL3's build.py script. They are located in the ../build/ directory,
* relatively to this script.
*
* The script must be named loader.js.
*
* Usage:
*
* <script src="../loader.js?id=my-demo"></script>
*/
(function() {
var i, pair;
var href = window.location.href, start, end, paramsString, pairs,
pageParams = {};
if (href.indexOf('?') > 0) {
start = href.indexOf('?') + 1;
end = href.indexOf('#') > 0 ? href.indexOf('#') : href.length;
paramsString = href.substring(start, end);
pairs = paramsString.split(/[&;]/);
for (i = 0; i < pairs.length; ++i) {
pair = pairs[i].split('=');
if (pair[0]) {
pageParams[decodeURIComponent(pair[0])] =
decodeURIComponent(pair[1]);
}
}
}
var scripts = document.getElementsByTagName('script');
var src, index, search, chunks, scriptParams = {};
for (i = scripts.length - 1; i >= 0; --i) {
src = scripts[i].getAttribute('src');
if (~(index = src.indexOf('loader.js?'))) {
search = src.substr(index + 10);
chunks = search ? search.split('&') : [];
for (i = chunks.length - 1; i >= 0; --i) {
pair = chunks[i].split('=');
if (pair[0]) {
scriptParams[decodeURIComponent(pair[0])] =
decodeURIComponent(pair[1]);
}
}
break;
}
}
var oljs = 'ol.js', mode;
if ('mode' in pageParams) {
mode = pageParams.mode.toLowerCase();
if (mode == 'debug') {
mode = 'raw';
}
if (mode != 'advanced' && mode != 'raw') {
oljs = 'ol-' + mode + '.js';
}
}
// CLOSURE_NO_DEPS has an effect in "raw" and "whitespace" modes only (i.e.
// when COMPILED is false). In "raw" mode we use our own deps file
// (ol-deps.js), so we set CLOSURE_NO_DEPS to true to prevent Google
// Library's base.js script to load deps.js. In "whitespace" mode
// no deps file is needed at all, yet base.js will attempt to load deps.js
// if CLOSURE_NO_DEPS is not set to true.
window.CLOSURE_NO_DEPS = true;
var scriptId = encodeURIComponent(scriptParams.id);
document.write('<link rel="stylesheet" href="../build/ol.css" type="text/css">');
if (mode != 'raw') {
document.write('<scr' + 'ipt type="text/javascript" src="../build/' + oljs + '"></scr' + 'ipt>');
} else {
document.write('<scr' + 'ipt type="text/javascript" src="../closure-library/closure/goog/base.js"></scr' + 'ipt>');
document.write('<scr' + 'ipt type="text/javascript" src="../build/ol-deps.js"></scr' + 'ipt>');
document.write('<scr' + 'ipt type="text/javascript" src="' + scriptId + '-require.js"></scr' + 'ipt>');
}
document.write('<scr' + 'ipt type="text/javascript" src="' + scriptId + '.js"></scr' + 'ipt>');
}());

View File

@@ -1,2 +0,0 @@
@echo off
%SystemDrive%\Python27\python.exe build.py %*

759
build.py
View File

@@ -1,759 +0,0 @@
#!/usr/bin/env python
from cStringIO import StringIO
import gzip
import json
import os
import os.path
import re
import shutil
import sys
from pake import Target
from pake import ifind, main, output, rule, target, variables, virtual, which
if sys.platform == 'win32':
""" windows_defaults assumes that jsdoc was installed at a specific place
(C:\jsdoc). It also fixes a certain version (1.9.0) of phantomjs which
might not anymore be proposed on
http://code.google.com/p/phantomjs/downloads/list"""
windows_defaults = {
'ProgramFiles': os.environ.get('ProgramFiles', 'C:\\Program Files'),
'Python27': os.environ.get('SystemDrive', 'C:') + '\\Python27',
'jsdoc': os.environ.get('SystemDrive', 'C:') + '\\jsdoc3',
'phantomjs': (os.environ.get('SystemDrive', 'C:') +
'\\phantomjs-1.9.0-windows')
}
if which('git.exe'):
variables.GIT = 'git.exe'
else:
variables.GIT = os.path.join(windows_defaults['ProgramFiles'],
'Git', 'bin', 'git.exe')
if which('gjslint.exe'):
variables.GJSLINT = 'gjslint.exe'
else:
variables.GJSLINT = os.path.join(windows_defaults['Python27'],
'Scripts', 'gjslint.exe')
if which('java.exe'):
variables.JAVA = 'java.exe'
else:
variables.JAVA = os.path.join(windows_defaults['ProgramFiles'],
'Java', 'jre7', 'bin', 'java.exe')
if which('jar.exe'):
variables.JAR = 'jar.exe'
else:
variables.JAR = os.path.join(windows_defaults['ProgramFiles'],
'Java', 'jdk1.7.0_17', 'bin', 'jar.exe')
if which('jsdoc.cmd'):
variables.JSDOC = 'jsdoc.cmd'
else:
variables.JSDOC = os.path.join(windows_defaults['jsdoc'],
'jsdoc.cmd')
if which('python.exe'):
variables.PYTHON = 'python.exe'
else:
variables.PYTHON = os.path.join(windows_defaults['Python27'],
'python.exe')
if which('phantomjs.exe'):
variables.PHANTOMJS = 'phantomjs.exe'
else:
variables.PHANTOMJS = os.path.join(windows_defaults['phantomjs'],
'phantomjs.exe')
else:
variables.GIT = 'git'
variables.GJSLINT = 'gjslint'
variables.JAVA = 'java'
variables.JAR = 'jar'
variables.JSDOC = 'jsdoc'
variables.NODE = 'node'
variables.PYTHON = 'python'
variables.PHANTOMJS = 'phantomjs'
TEMPLATE_GLSL_COMPILER_JS = 'build/glsl-unit/bin/template_glsl_compiler.js'
variables.BRANCH = output(
'%(GIT)s', 'rev-parse', '--abbrev-ref', 'HEAD').strip()
EXECUTABLES = [variables.GIT, variables.GJSLINT, variables.JAVA, variables.JAR,
variables.JSDOC, variables.PYTHON, variables.PHANTOMJS]
EXPORTS = [path
for path in ifind('src')
if path.endswith('.exports')]
EXTERNAL_SRC = [
'build/src/external/externs/types.js',
'build/src/external/src/exports.js',
'build/src/external/src/types.js']
EXAMPLES = [path
for path in ifind('examples')
if path.endswith('.html')
if path != 'examples/index.html']
EXAMPLES_SRC = [path
for path in ifind('examples')
if path.endswith('.js')
if not path.endswith('.combined.js')
if not path.startswith('examples/bootstrap')
if not path.startswith('examples/font-awesome')
if path != 'examples/Jugl.js'
if path != 'examples/jquery.min.js'
if path != 'examples/loader.js'
if path != 'examples/example-list.js']
EXAMPLES_JSON = ['build/' + example.replace('.html', '.json')
for example in EXAMPLES]
EXAMPLES_COMBINED = ['build/' + example.replace('.html', '.combined.js')
for example in EXAMPLES]
INTERNAL_SRC = [
'build/src/internal/src/requireall.js',
'build/src/internal/src/types.js']
GLSL_SRC = [path
for path in ifind('src')
if path.endswith('.glsl')]
JSDOC_SRC = [path
for path in ifind('src')
if path.endswith('.jsdoc')]
SHADER_SRC = [path.replace('.glsl', 'shader.js')
for path in GLSL_SRC]
SPEC = [path
for path in ifind('test/spec')
if path.endswith('.js')]
SRC = [path
for path in ifind('src/ol')
if path.endswith('.js')
if path not in SHADER_SRC]
PLOVR_JAR = 'build/plovr-eba786b34df9.jar'
PLOVR_JAR_MD5 = '20eac8ccc4578676511cf7ccbfc65100'
PROJ4JS = 'build/proj4js/lib/proj4js-combined.js'
PROJ4JS_ZIP = 'build/proj4js-1.1.0.zip'
PROJ4JS_ZIP_MD5 = '17caad64cf6ebc6e6fe62f292b134897'
def report_sizes(t):
t.info('uncompressed: %d bytes', os.stat(t.name).st_size)
stringio = StringIO()
gzipfile = gzip.GzipFile(t.name, 'w', 9, stringio)
with open(t.name) as f:
shutil.copyfileobj(f, gzipfile)
gzipfile.close()
t.info(' compressed: %d bytes', len(stringio.getvalue()))
virtual('default', 'build')
virtual('integration-test', 'lint', 'build', 'build-all',
'test', 'build-examples', 'check-examples', 'doc')
virtual('build', 'build/ol.css', 'build/ol.js',
'build/ol-simple.js', 'build/ol-whitespace.js')
virtual('check', 'lint', 'build/ol.css', 'build/ol-all.js', 'test')
virtual('todo', 'fixme')
@target('build/ol.css', 'build/ol.js')
def build_ol_css(t):
t.touch()
@target('build/ol.js', PLOVR_JAR, SRC, EXTERNAL_SRC, SHADER_SRC,
'buildcfg/base.json', 'buildcfg/ol.json')
def build_ol_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol.json')
report_sizes(t)
@target('build/ol-simple.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
'buildcfg/base.json', 'buildcfg/ol.json', 'buildcfg/ol-simple.json')
def build_ol_simple_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol-simple.json')
report_sizes(t)
@target('build/ol-whitespace.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
'buildcfg/base.json', 'buildcfg/ol.json',
'buildcfg/ol-whitespace.json')
def build_ol_whitespace_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR,
'build', 'buildcfg/ol-whitespace.json')
report_sizes(t)
virtual('build-all', 'build/ol-all.js')
@target('build/ol-all.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
'buildcfg/base.json', 'buildcfg/ol-all.json')
def build_ol_all_js(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol-all.json')
@target('build/src/external/externs/types.js', 'bin/generate-exports.py',
'src/objectliterals.jsdoc')
def build_src_external_externs_types_js(t):
t.output('%(PYTHON)s', 'bin/generate-exports.py',
'--externs', 'src/objectliterals.jsdoc')
@target('build/src/external/src/exports.js', 'bin/generate-exports.py',
'src/objectliterals.jsdoc', EXPORTS)
def build_src_external_src_exports_js(t):
t.output('%(PYTHON)s', 'bin/generate-exports.py',
'--exports', 'src/objectliterals.jsdoc', EXPORTS)
@target('build/src/external/src/types.js', 'bin/generate-exports.py',
'src/objectliterals.jsdoc')
def build_src_external_src_types_js(t):
t.output('%(PYTHON)s', 'bin/generate-exports.py',
'--typedef', 'src/objectliterals.jsdoc')
if os.path.exists(TEMPLATE_GLSL_COMPILER_JS):
for glsl_src in GLSL_SRC:
def shader_src_helper(glsl_src):
@target(glsl_src.replace('.glsl', 'shader.js'), glsl_src,
'src/ol/webgl/shader.mustache')
def shader_src(t):
t.run('%(NODE)s', TEMPLATE_GLSL_COMPILER_JS,
'--input', glsl_src,
'--template', 'src/ol/webgl/shader.mustache',
'--output', t.name)
shader_src_helper(glsl_src)
def _build_require_list(dependencies, output_file_name):
requires = set()
for dependency in dependencies:
for line in open(dependency):
match = re.match(r'goog\.provide\(\'(.*)\'\);', line)
if match:
requires.add(match.group(1))
with open(output_file_name, 'w') as f:
for require in sorted(requires):
f.write('goog.require(\'%s\');\n' % (require,))
@target('build/src/internal/src/requireall.js', SRC, SHADER_SRC)
def build_src_internal_src_requireall_js(t):
_build_require_list(t.dependencies, t.name)
@target('build/test/requireall.js', SPEC)
def build_test_requireall_js(t):
_build_require_list(t.dependencies, t.name)
@target('build/src/internal/src/types.js', 'bin/generate-exports.py',
'src/objectliterals.jsdoc')
def build_src_internal_types_js(t):
t.output('%(PYTHON)s', 'bin/generate-exports.py',
'--typedef', 'src/objectliterals.jsdoc')
virtual('build-examples', 'examples', EXAMPLES_COMBINED)
virtual('examples', 'examples/example-list.xml', EXAMPLES_JSON)
@target('examples/example-list.xml', 'examples/example-list.js')
def examples_examples_list_xml(t):
t.touch() # already generated by bin/exampleparser.py
@target('examples/example-list.js', 'bin/exampleparser.py', EXAMPLES)
def examples_examples_list_js(t):
t.run('%(PYTHON)s', 'bin/exampleparser.py', 'examples', 'examples')
@rule(r'\Abuild/examples/(?P<id>.*).json\Z')
def examples_star_json(name, match):
def action(t):
content = json.dumps({
'id': match.group('id'),
'inherits': '../../buildcfg/base.json',
'inputs': [
'../examples/%(id)s.js' % match.groupdict(),
'../build/src/internal/src/types.js',
],
'externs': [
'//json.js',
'//jquery-1.7.js',
'../externs/bingmaps.js',
'../externs/bootstrap.js',
'../externs/geojson.js',
'../externs/oli.js',
'../externs/proj4js.js',
'../externs/tilejson.js',
'../externs/w3c_device_sensor_event.js',
],
})
with open(t.name, 'w') as f:
f.write(content)
dependencies = [__file__, 'buildcfg/base.json']
return Target(name, action=action, dependencies=dependencies)
@rule(r'\Abuild/examples/(?P<id>.*).combined.js\Z')
def examples_star_combined_js(name, match):
def action(t):
t.output('%(JAVA)s', '-jar', PLOVR_JAR, 'build',
'build/examples/%(id)s.json' % match.groupdict())
report_sizes(t)
dependencies = [PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC,
'buildcfg/base.json',
'examples/%(id)s.js' % match.groupdict(),
'build/examples/%(id)s.json' % match.groupdict()]
return Target(name, action=action, dependencies=dependencies)
@target('serve', PLOVR_JAR, 'test-deps', 'examples')
def serve(t):
t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', 'buildcfg/ol.json',
'buildcfg/ol-all.json', EXAMPLES_JSON, 'buildcfg/test.json')
@target('serve-integration-test', PLOVR_JAR, INTERNAL_SRC)
def serve_precommit(t):
t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve',
'buildcfg/ol-all.json', 'buildcfg/test.json')
virtual('lint', 'build/lint-timestamp', 'build/lint-generated-timestamp',
'build/check-requires-timestamp', 'build/check-whitespace-timestamp')
@target('build/lint-timestamp', SRC, EXAMPLES_SRC, SPEC, precious=True)
def build_lint_src_timestamp(t):
t.run('%(GJSLINT)s',
'--jslint_error=all',
'--strict',
t.newer(t.dependencies))
t.touch()
@target('build/lint-generated-timestamp', INTERNAL_SRC, EXTERNAL_SRC,
precious=True)
def build_lint_generated_timestamp(t):
limited_doc_files = [
path
for path in ifind('externs', 'build/src/external/externs')
if path.endswith('.js')]
t.run('%(GJSLINT)s',
'--jslint_error=all',
# ignore error for max line length (for these auto-generated sources)
'--disable=110',
# for a complete list of error codes to allow, see
# http://closure-linter.googlecode.com/svn/trunk/closure_linter/errors.py
'--limited_doc_files=%s' % (','.join(limited_doc_files),),
'--strict',
t.newer(t.dependencies))
t.touch()
def _strip_comments(lines):
# FIXME this is a horribe hack, we should use a proper JavaScript parser
# here
in_multiline_comment = False
lineno = 0
for line in lines:
lineno += 1
if in_multiline_comment:
index = line.find('*/')
if index != -1:
in_multiline_comment = False
line = line[index + 2:]
if not in_multiline_comment:
line = re.sub(r'//[^\n]*', '', line)
line = re.sub(r'/\*.*?\*/', '', line)
index = line.find('/*')
if index != -1:
yield lineno, line[:index]
in_multiline_comment = True
else:
yield lineno, line
@target('build/check-requires-timestamp', SRC, INTERNAL_SRC, EXTERNAL_SRC,
EXAMPLES_SRC, SHADER_SRC, SPEC)
def build_check_requires_timestamp(t):
from zipfile import ZipFile
unused_count = 0
all_provides = set()
zf = ZipFile(PLOVR_JAR)
for zi in zf.infolist():
if zi.filename.endswith('.js'):
if not zi.filename.startswith('closure/goog/'):
continue
# Skip goog.i18n because it contains so many modules that it causes
# the generated regular expression to exceed Python's limits
if zi.filename.startswith('closure/goog/i18n/'):
continue
for line in zf.open(zi):
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
if m:
all_provides.add(m.group(1))
for filename in sorted(t.dependencies):
if filename == 'build/src/internal/src/requireall.js':
continue
require_linenos = {}
uses = set()
lines = open(filename).readlines()
for lineno, line in _strip_comments(lines):
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
if m:
all_provides.add(m.group(1))
continue
m = re.match(r'goog.require\(\'(.*)\'\);', line)
if m:
require_linenos[m.group(1)] = lineno
continue
ignore_linenos = require_linenos.values()
for lineno, line in enumerate(lines):
if lineno in ignore_linenos:
continue
for require in require_linenos.iterkeys():
if require in line:
uses.add(require)
for require in sorted(set(require_linenos.keys()) - uses):
t.info('%s:%d: unused goog.require: %r' % (
filename, require_linenos[require], require))
unused_count += 1
all_provides.discard('ol')
all_provides.discard('ol.MapProperty')
class Node(object):
def __init__(self):
self.present = False
self.children = {}
def _build_re(self, key):
if len(self.children) == 1:
child_key, child = next(self.children.iteritems())
child_re = '\\.' + child._build_re(child_key)
if self.present:
return key + '(' + child_re + ')?'
else:
return key + child_re
elif self.children:
children_re = '(?:\\.(?:' + '|'.join(
self.children[k]._build_re(k)
for k in sorted(self.children.keys())) + '))'
if self.present:
return key + children_re + '?'
else:
return key + children_re
else:
assert self.present
return key
def build_re(self, key):
return re.compile('\\b' + self._build_re(key) + '\\b')
root = Node()
for provide in all_provides:
node = root
for component in provide.split('.'):
if component not in node.children:
node.children[component] = Node()
node = node.children[component]
node.present = True
provide_res = [child.build_re(key)
for key, child in root.children.iteritems()]
missing_count = 0
for filename in sorted(t.dependencies):
if filename in INTERNAL_SRC or filename in EXTERNAL_SRC:
continue
provides = set()
requires = set()
uses = set()
uses_linenos = {}
for lineno, line in _strip_comments(open(filename)):
m = re.match(r'goog.provide\(\'(.*)\'\);', line)
if m:
provides.add(m.group(1))
continue
m = re.match(r'goog.require\(\'(.*)\'\);', line)
if m:
requires.add(m.group(1))
continue
while True:
for provide_re in provide_res:
m = provide_re.search(line)
if m:
uses.add(m.group())
uses_linenos[m.group()] = lineno
line = line[:m.start()] + line[m.end():]
break
else:
break
if filename == 'src/ol/renderer/layerrenderer.js':
uses.discard('ol.renderer.Map')
m = re.match(
r'src/ol/renderer/(\w+)/\1(\w*)layerrenderer\.js\Z', filename)
if m:
uses.discard('ol.renderer.Map')
uses.discard('ol.renderer.%s.Map' % (m.group(1),))
missing_requires = uses - requires - provides
if missing_requires:
for missing_require in sorted(missing_requires):
t.info("%s:%d missing goog.require('%s')" %
(filename, uses_linenos[missing_require], missing_require))
missing_count += 1
if unused_count or missing_count:
t.error('%d unused goog.requires, %d missing goog.requires' %
(unused_count, missing_count))
t.touch()
@target('build/check-whitespace-timestamp', SRC, INTERNAL_SRC, EXTERNAL_SRC,
EXAMPLES_SRC, SPEC, EXPORTS, JSDOC_SRC,
precious=True)
def build_check_whitespace_timestamp(t):
CR_RE = re.compile(r'\r')
TRAILING_WHITESPACE_RE = re.compile(r'\s+\n\Z')
NO_NEWLINE_RE = re.compile(r'[^\n]\Z')
ALL_WHITESPACE_RE = re.compile(r'\s+\Z')
errors = 0
for filename in sorted(t.newer(t.dependencies)):
whitespace = False
for lineno, line in enumerate(open(filename)):
if CR_RE.search(line):
t.info('%s:%d: carriage return character in line', filename, lineno + 1)
errors += 1
if TRAILING_WHITESPACE_RE.search(line):
t.info('%s:%d: trailing whitespace', filename, lineno + 1)
errors += 1
if NO_NEWLINE_RE.search(line):
t.info('%s:%d: no newline at end of file', filename, lineno + 1)
errors += 1
whitespace = ALL_WHITESPACE_RE.match(line)
if whitespace:
t.info('%s: trailing whitespace at end of file', filename)
errors += 1
if errors:
t.error('%d whitespace errors' % (errors,))
t.touch()
virtual('plovr', PLOVR_JAR)
@target(PLOVR_JAR, clean=False)
def plovr_jar(t):
t.info('downloading %r', t.name)
t.download('https://plovr.googlecode.com/files/' +
os.path.basename(PLOVR_JAR), md5=PLOVR_JAR_MD5)
t.info('downloaded %r', t.name)
@target('gh-pages', 'host-examples', 'doc', phony=True)
def gh_pages(t):
with t.tempdir() as tempdir:
t.run('%(GIT)s', 'clone', '--branch', 'gh-pages',
'git@github.com:openlayers/ol3.git', tempdir)
with t.chdir(tempdir):
t.rm_rf('%(BRANCH)s')
t.cp_r('build/gh-pages/%(BRANCH)s', tempdir + '/%(BRANCH)s')
with t.chdir(tempdir):
t.run('%(GIT)s', 'add', '--all', '%(BRANCH)s')
t.run('%(GIT)s', 'commit', '--message', 'Updated')
t.run('%(GIT)s', 'push', 'origin', 'gh-pages')
virtual('doc', 'build/jsdoc-%(BRANCH)s-timestamp' % vars(variables))
@target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), 'host-resources',
'build/src/external/src/exports.js', 'build/src/external/src/types.js',
SRC, SHADER_SRC, ifind('doc/template'))
def jsdoc_BRANCH_timestamp(t):
t.run('%(JSDOC)s', '-c', 'doc/conf.json', 'src', 'doc/index.md',
'-d', 'build/gh-pages/%(BRANCH)s/apidoc')
t.touch()
def split_example_file(example, dst_dir):
lines = open(example).readlines()
target_lines = []
target_require_lines = []
found_requires = False
found_code = False
for line in lines:
m = re.match(r'goog.require\(\'(.*)\'\);', line)
if m:
found_requires = True
target_require_lines.append(line)
elif found_requires:
if found_code or line not in ('\n', '\r\n'):
found_code = True
target_lines.append(line)
target = open(
os.path.join(dst_dir, os.path.basename(example)), 'w')
target_require = open(
os.path.join(dst_dir, os.path.basename(example)
.replace('.js', '-require.js')),
'w')
target.writelines(target_lines)
target.close()
target_require.writelines(target_require_lines)
target_require.close()
@target('host-resources', phony=True)
def host_resources(t):
resources_dir = 'build/gh-pages/%(BRANCH)s/resources'
t.rm_rf(resources_dir)
t.cp_r('resources', resources_dir)
@target('host-examples', 'build', 'host-resources', 'examples', phony=True)
def host_examples(t):
examples_dir = 'build/gh-pages/%(BRANCH)s/examples'
build_dir = 'build/gh-pages/%(BRANCH)s/build'
t.rm_rf(examples_dir)
t.makedirs(examples_dir)
t.rm_rf(build_dir)
t.makedirs(build_dir)
t.cp(EXAMPLES, examples_dir)
for example in [path.replace('.html', '.js') for path in EXAMPLES]:
split_example_file(example, examples_dir % vars(variables))
t.cp_r('examples/data', examples_dir + '/data')
t.cp('bin/loader_hosted_examples.js', examples_dir + '/loader.js')
t.cp('build/ol.js', 'build/ol-simple.js', 'build/ol-whitespace.js',
'build/ol.css', build_dir)
t.cp('examples/index.html', 'examples/example-list.js',
'examples/example-list.xml', 'examples/Jugl.js',
'examples/jquery.min.js', examples_dir)
t.rm_rf('build/gh-pages/%(BRANCH)s/closure-library')
t.makedirs('build/gh-pages/%(BRANCH)s/closure-library')
with t.chdir('build/gh-pages/%(BRANCH)s/closure-library'):
t.run('%(JAR)s', 'xf', '../../../../' + PLOVR_JAR, 'closure')
t.run('%(JAR)s', 'xf', '../../../../' + PLOVR_JAR, 'third_party')
t.rm_rf('build/gh-pages/%(BRANCH)s/ol')
t.makedirs('build/gh-pages/%(BRANCH)s/ol')
t.cp_r('src/ol', 'build/gh-pages/%(BRANCH)s/ol/ol')
t.run('%(PYTHON)s', 'bin/closure/depswriter.py',
'--root_with_prefix', 'src ../../../ol',
'--root', 'build/gh-pages/%(BRANCH)s/closure-library/closure/goog',
'--root_with_prefix', 'build/gh-pages/%(BRANCH)s/closure-library/'
'third_party ../../third_party',
'--output_file', 'build/gh-pages/%(BRANCH)s/build/ol-deps.js')
@target('check-examples', 'host-examples', phony=True)
def check_examples(t):
examples = ['build/gh-pages/%(BRANCH)s/' + e for e in EXAMPLES]
all_examples = \
[e + '?mode=raw' for e in examples] + \
[e + '?mode=whitespace' for e in examples] + \
[e + '?mode=simple' for e in examples] + \
examples
for example in all_examples:
t.run('%(PHANTOMJS)s', 'bin/check-example.js', example)
@target(PROJ4JS, PROJ4JS_ZIP)
def proj4js(t):
from zipfile import ZipFile
zf = ZipFile(PROJ4JS_ZIP)
contents = zf.open('proj4js/lib/proj4js-combined.js').read()
with open(t.name, 'wb') as f:
f.write(contents)
@target(PROJ4JS_ZIP, clean=False)
def proj4js_zip(t):
t.info('downloading %r', t.name)
t.download('http://download.osgeo.org/proj4js/' +
os.path.basename(t.name), md5=PROJ4JS_ZIP_MD5)
t.info('downloaded %r', t.name)
virtual('test-deps', INTERNAL_SRC, PROJ4JS, 'build/test/requireall.js')
@target('test', 'test-deps', phony=True)
def test(t):
t.run('%(PHANTOMJS)s', 'test/mocha-phantomjs.coffee', 'test/ol.html')
@target('fixme', phony=True)
def find_fixme(t):
regex = re.compile('FIXME|TODO')
matches = dict()
totalcount = 0
for filename in SRC:
f = open(filename, 'r')
for lineno, line in enumerate(f):
if regex.search(line):
if (filename not in matches):
matches[filename] = list()
matches[filename].append('#%-10d %s' % (
lineno + 1, line.strip()))
totalcount += 1
f.close()
for filename in matches:
num_matches = len(matches[filename])
noun = 'matches' if num_matches > 1 else 'match'
print ' %s has %d %s:' % (filename, num_matches, noun)
for match in matches[filename]:
print ' %s' % (match,)
print
print 'A total of %d TODO/FIXME(s) were found' % (totalcount,)
@target('reallyclean')
def reallyclean(t):
"""Removes untracked files and folders from previous builds."""
# -X => only clean up files that are usually ignored e.g.
# through .gitignore
# -d => also consider directories for deletion
# -f => if git configuration variable clean.requireForce != false,
# git clean will refuse to run unless given -f or -n.
t.run('%(GIT)s', 'clean', '-X', '-d', '-f', '.')
@target('checkdeps')
def check_dependencies(t):
for exe in EXECUTABLES:
status = 'present' if which(exe) else 'MISSING'
print 'Program "%s" seems to be %s.' % (exe, status)
print 'For certain targets all above programs need to be present.'
if __name__ == '__main__':
main()

46
build/README.txt Normal file
View File

@@ -0,0 +1,46 @@
The OpenLayers build tool supports several different
forms of compressing your javascript code, and a method
of describing build profiles to create customized
OpenLayers builds with only the components you need.
When building a file, you can choose to build with several
different compression options to the Python-based build.py
script. The following is an example script:
python build.py -c closure full OpenLayers-closure.js
This script selects the 'closure' compression mechanism,
uses a config file called 'full.cfg', and writes the output
to OpenLayers-closure.js.
The options available for compression are:
* closure
This requires you to have a closure-compiler.jar in your
tools directory. You can do this by fetching the compiler
from:
http://closure-compiler.googlecode.com/files/compiler-latest.zip
Then unzipping that file, and placing compiler.jar into tools
and renaming it closure-compiler.jar.
* closure_ws
This uses the closure compiler webservice. This will only work
for files source Javascript files which are under 1MB. (Note that
the default OpenLayers full build is not under 1MB.)
* jsmin
jsmin is the default compiler, and uses the Python-based
jsmin script to compress the Javascript.
* minimize
This is a simple whitespace removing Python script, designed
to fill in when other tools are unavailable.
* none
None will leave the Javascript uncompressed.
For more information on the build script and custom build profiles,
see http://docs.openlayers.org/library/deploying.html

158
build/build.py Executable file
View File

@@ -0,0 +1,158 @@
#!/usr/bin/env python
import sys
import os
sys.path.append("../tools")
import mergejs
import optparse
def build(config_file = None, output_file = None, options = None):
have_compressor = []
try:
import jsmin
have_compressor.append("jsmin")
except ImportError:
print "No jsmin"
try:
# tools/closure_library_jscompiler.py from:
# http://code.google.com/p/closure-library/source/browse/trunk/closure/bin/build/jscompiler.py
import closure_library_jscompiler as closureCompiler
have_compressor.append("closure")
except Exception, E:
print "No closure (%s)" % E
try:
import closure_ws
have_compressor.append("closure_ws")
except ImportError:
print "No closure_ws"
try:
import minimize
have_compressor.append("minimize")
except ImportError:
print "No minimize"
try:
import uglify_js
uglify_js.check_available()
have_compressor.append("uglify-js")
except Exception, E:
print "No uglify-js (%s)" % E
use_compressor = None
if options.compressor and options.compressor in have_compressor:
use_compressor = options.compressor
sourceDirectory = "../lib"
configFilename = "full.cfg"
outputFilename = "OpenLayers.js"
if config_file:
configFilename = config_file
extension = configFilename[-4:]
if extension != ".cfg":
configFilename = config_file + ".cfg"
if output_file:
outputFilename = output_file
print "Merging libraries."
try:
if use_compressor == "closure" or use_compressor == 'uglify-js':
sourceFiles = mergejs.getNames(sourceDirectory, configFilename)
else:
merged = mergejs.run(sourceDirectory, None, configFilename)
except mergejs.MissingImport, E:
print "\nAbnormal termination."
sys.exit("ERROR: %s" % E)
if options.amdname:
options.amdname = "'" + options.amdname + "',"
else:
options.amdname = ""
if options.amd == 'pre':
print "\nAdding AMD function."
merged = "define(%sfunction(){%sreturn OpenLayers;});" % (options.amdname, merged)
print "Compressing using %s" % use_compressor
if use_compressor == "jsmin":
minimized = jsmin.jsmin(merged)
elif use_compressor == "minimize":
minimized = minimize.minimize(merged)
elif use_compressor == "closure_ws":
if len(merged) > 1000000: # The maximum file size for this web service is 1000 KB.
print "\nPre-compressing using jsmin"
merged = jsmin.jsmin(merged)
print "\nIs being compressed using Closure Compiler Service."
try:
minimized = closure_ws.minimize(merged)
except Exception, E:
print "\nAbnormal termination."
sys.exit("ERROR: Closure Compilation using Web service failed!\n%s" % E)
if len(minimized) <= 2:
print "\nAbnormal termination due to compilation errors."
sys.exit("ERROR: Closure Compilation using Web service failed!")
else:
print "Closure Compilation using Web service has completed successfully."
elif use_compressor == "closure":
jscompilerJar = "../tools/closure-compiler.jar"
if not os.path.isfile(jscompilerJar):
print "\nNo closure-compiler.jar; read README.txt!"
sys.exit("ERROR: Closure Compiler \"%s\" does not exist! Read README.txt" % jscompilerJar)
minimized = closureCompiler.Compile(
jscompilerJar,
sourceFiles, [
"--externs", "closure-compiler/Externs.js",
"--jscomp_warning", "checkVars", # To enable "undefinedVars"
"--jscomp_error", "checkRegExp", # Also necessary to enable "undefinedVars"
"--jscomp_error", "undefinedVars"
]
)
if minimized is None:
print "\nAbnormal termination due to compilation errors."
sys.exit("ERROR: Closure Compilation failed! See compilation errors.")
print "Closure Compilation has completed successfully."
elif use_compressor == "uglify-js":
minimized = uglify_js.compile(sourceFiles)
if minimized is None:
print "\nAbnormal termination due to compilation errors."
sys.exit("ERROR: Uglify JS compilation failed! See compilation errors.")
print "Uglify JS compilation has completed successfully."
else: # fallback
minimized = merged
if options.amd == 'post':
print "\nAdding AMD function."
minimized = "define(%sfunction(){%sreturn OpenLayers;});" % (options.amdname, minimized)
if options.status:
print "\nAdding status file."
minimized = "// status: " + file(options.status).read() + minimized
print "\nAdding license file."
minimized = file("license.txt").read() + minimized
print "Writing to %s." % outputFilename
file(outputFilename, "w").write(minimized)
print "Done."
if __name__ == '__main__':
opt = optparse.OptionParser(usage="%s [options] [config_file] [output_file]\n Default config_file is 'full.cfg', Default output_file is 'OpenLayers.js'")
opt.add_option("-c", "--compressor", dest="compressor", help="compression method: one of 'jsmin' (default), 'minimize', 'closure_ws', 'closure', or 'none'", default="jsmin")
opt.add_option("-s", "--status", dest="status", help="name of a file whose contents will be added as a comment at the front of the output file. For example, when building from a git repo, you can save the output of 'git describe --tags' in this file. Default is no file.", default=False)
opt.add_option("--amd", dest="amd", help="output should be AMD module; wrap merged files in define function; can be either 'pre' (before compilation) or 'post' (after compilation). Wrapping the OpenLayers var in a function means the filesize can be reduced by the closure compiler using 'pre', but be aware that a few functions depend on the OpenLayers variable being present. Either option can be used with jsmin or minimize compression. Default false, not AMD.", default=False)
opt.add_option("--amdname", dest="amdname", help="only useful with amd option. Name of AMD module. Default no name, anonymous module.", default=False)
(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"

25
build/buildUncompressed.py Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env python
import sys
sys.path.append("../tools")
import jsmin, mergejs
sourceDirectory = "../lib"
configFilename = "full.cfg"
outputFilename = "OpenLayers.js"
if len(sys.argv) > 1:
configFilename = sys.argv[1] + ".cfg"
if len(sys.argv) > 2:
outputFilename = sys.argv[2]
print "Merging libraries."
merged = mergejs.run(sourceDirectory, None, configFilename)
print "Adding license file."
merged = file("license.txt").read() + merged
print "Writing to %s." % outputFilename
file(outputFilename, "w").write(merged)
print "Done."

View File

@@ -0,0 +1,50 @@
// ********************************************
// This source file serves *ONLY* to avoid some compilation errors when the
// compiler uses the flag:
// --jscomp_error undefinedVars
//
// In this source are declared all variables from other programs that use
// OpenLayers. This avoids the error of undefined variable for these names.
//
// NOTE: The compiler does not include externs files like this in the
// compilation result.
// ********************************************
// Used in lib/Firebug/firebug.js when gecko_dom
var frames;
// Check the console when using Firebug Lite
var console;
// Proj4js
var Proj4js = {Proj: function(){}};
// Check JSON in lib/OpenLayers/Format/JSON.js
var JSON = {};
// Google Maps
var GMap2;
var G_NORMAL_MAP;
var GEvent;
var GLatLngBounds = function(){};
var GSize = function(x, y){};
var GPoint = function(x, y){};
var GLatLng = function(lat, lon){};
// Multimap
var MultimapViewer = function(div){};
var MMLatLon = function(lat, lon){};
var MMPoint = function(x, y){};
//VirtualEarth
var VEMap = function(name){};
var VEPixel = function(x, y){};
var VELatLong = function(lat, lon){};
var Msn = {VE:{}};
// Yahoo
var YMap = function(div, type, size){};
var YGeoPoint = function(lat, lon){};
var YCoordPoint = function(x, y){};
var YSize = function(w, h){};

14
build/full.cfg Normal file
View File

@@ -0,0 +1,14 @@
# This is the full build with all files: this includes the vector-related files
# like Renderers and Formats.
[first]
[last]
[include]
[exclude]
Firebug
OpenLayers.js
OpenLayers/Lang
deprecated.js

57
build/license.txt Normal file
View File

@@ -0,0 +1,57 @@
/*
OpenLayers.js -- OpenLayers Map Viewer Library
Copyright (c) 2006-2013 by OpenLayers Contributors
Published under the 2-clause BSD license.
See http://openlayers.org/dev/license.txt for the full text of the license, and http://openlayers.org/dev/authors.txt for full list of contributors.
Includes compressed code under the following licenses:
(For uncompressed versions of the code used, please see the
OpenLayers Github repository: <https://github.com/openlayers/openlayers>)
*/
/**
* Contains XMLHttpRequest.js <http://code.google.com/p/xmlhttprequest/>
* Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*/
/**
* 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.
*/

32
build/light.cfg Normal file
View File

@@ -0,0 +1,32 @@
[first]
[last]
[include]
OpenLayers/Map.js
OpenLayers/Kinetic.js
OpenLayers/Projection.js
OpenLayers/Layer/Vector.js
OpenLayers/Layer/OSM.js
OpenLayers/Layer/Bing.js
OpenLayers/Layer/WMS.js
OpenLayers/Layer/Google/v3.js
OpenLayers/Popup/FramedCloud.js
OpenLayers/Control/Navigation.js
OpenLayers/Control/Zoom.js
OpenLayers/Control/Attribution.js
OpenLayers/Control/SelectFeature.js
OpenLayers/Control/Panel.js
OpenLayers/Control/LayerSwitcher.js
OpenLayers/Renderer/SVG.js
OpenLayers/Renderer/VML.js
OpenLayers/Format/GeoJSON.js
OpenLayers/Protocol/HTTP.js
OpenLayers/Strategy/Fixed.js
OpenLayers/Strategy/BBOX.js
OpenLayers/StyleMap.js
OpenLayers/Rule.js
OpenLayers/Filter/Comparison.js
OpenLayers/Filter/Logical.js
[exclude]

17
build/lite.cfg Normal file
View File

@@ -0,0 +1,17 @@
# This file includes a small subset of OpenLayers code, designed to be
# integrated into another application. It includes only the Layer types
# neccesary to create tiled or untiled WMS, and does not include any Controls.
# This is the result of what was at the time called "Webmap.js" at the FOSS4G
# Web Mapping BOF.
[first]
[last]
[include]
OpenLayers/Map.js
OpenLayers/Layer/WMS.js
[exclude]

35
build/mobile.cfg Normal file
View File

@@ -0,0 +1,35 @@
[first]
[last]
[include]
OpenLayers/Map.js
OpenLayers/Kinetic.js
OpenLayers/Projection.js
OpenLayers/Layer/OSM.js
OpenLayers/Layer/Bing.js
OpenLayers/Layer/WMS.js
OpenLayers/Control/TouchNavigation.js
OpenLayers/Control/Geolocate.js
OpenLayers/Control/Zoom.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]

11
build/tests.cfg Normal file
View File

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

View File

@@ -1,105 +0,0 @@
{
"ambiguate-properties": true,
"checks": {
"accessControls": "ERROR",
"ambiguousFunctionDecl": "ERROR",
"checkDebuggerStatement": "WARNING",
"checkRegExp": "ERROR",
"checkTypes": "ERROR",
"checkVars": "ERROR",
"const": "ERROR",
"constantProperty": "ERROR",
"deprecated": "ERROR",
"duplicate": "ERROR",
"duplicateMessage": "ERROR",
"es5Strict": "ERROR",
"externsValidation": "ERROR",
"fileoverviewTags": "ERROR",
"globalThis": "ERROR",
"internetExplorerChecks": "ERROR",
"invalidCasts": "ERROR",
"missingProperties": "ERROR",
"nonStandardJsDocs": "ERROR",
"strictModuleDepCheck": "ERROR",
"typeInvalidation": "ERROR",
"undefinedNames": "ERROR",
"undefinedVars": "ERROR",
"unknownDefines": "ERROR",
"uselessCode": "ERROR",
"visibility": "ERROR"
},
"define": {
"goog.dom.ASSUME_STANDARDS_MODE": true,
"goog.DEBUG": false
},
"disambiguate-properties": true,
"externs": [
"//json.js",
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/oli.js",
"../externs/proj4js.js",
"../externs/tilejson.js",
"../externs/w3c_device_sensor_event.js"
],
"level": "VERBOSE",
"mode": "ADVANCED",
"name-suffixes-to-strip": [
"logger",
"logger_"
],
"paths": [
"../build/src/internal/src",
"../src"
],
"treat-warnings-as-errors": false,
"type-prefixes-to-strip": [
"goog.asserts",
"goog.debug.Console",
"goog.debug.DebugWindow",
"goog.debug.DevCss",
"goog.debug.DivConsole",
"goog.debug.EntryPointMonitor",
"goog.debug.ErrorHandler",
"goog.debug.ErrorReporter",
"goog.debug.FancyWindow",
"goog.debug.Formatter",
"goog.debug.FpsDisplay",
"goog.debug.GcDiagnostics",
"goog.debug.HtmlFormatter",
"goog.debug.LogBuffer",
"goog.debug.LogManager",
"goog.debug.LogRecord",
"goog.debug.Logger",
"goog.debug.RelativeTimeProvider",
"goog.debug.TextFormatter",
"goog.debug.Trace",
"goog.debug.catchErrors",
"goog.debug.deepExpose",
"goog.debug.enhanceError",
"goog.debug.entryPointRegistry",
"goog.debug.errorHandlerWeakDep",
"goog.debug.expose",
"goog.debug.exposeArray",
"goog.debug.exposeException",
"goog.debug.getFunctionName",
"goog.debug.getStacktrace",
"goog.debug.getStacktraceSimple",
"goog.debug.logRecordSerializer",
"goog.debug.makeWhitespaceVisible",
"goog.debug.normalizeErrorObject",
"goog.debug.reflect"
]
}

View File

@@ -1,24 +0,0 @@
{
"id": "ol-all",
"externs": [
"//json.js",
"../build/src/external/externs/types.js",
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/oli.js",
"../externs/proj4js.js",
"../externs/tilejson.js",
"../externs/w3c_device_sensor_event.js"
],
"inherits": "base.json",
"inputs": [
"../build/src/internal/src/requireall.js",
"../build/src/internal/src/types.js",
"../build/src/external/src/exports.js"
]
}

View File

@@ -1,38 +0,0 @@
{
// If ambiguate-properties and disambiguate-properties are set to true
// we get function names like "ol_control_Control_prototype$setMap" in
// the compiled code when using the SIMPLE compilation. It looks like
// "ambiguate-properties" and "disambiguate-properties" are only
// appropriate for ADVANCED compilation.
"ambiguate-properties": false,
"disambiguate-properties": false,
"id": "ol-simple",
"externs": [
"//json.js",
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/oli.js",
"../externs/proj4js.js",
"../externs/tilejson.js",
"../externs/w3c_device_sensor_event.js"
],
"inherits": "ol.json",
"inputs": [
"../build/src/internal/src/requireall.js",
"../build/src/internal/src/types.js"
],
"mode": "SIMPLE",
// Note: we can't have a (function(){%output%})() output wrapper with
// WHITESPACE and SIMPLE modes. See this link for explanations:
// https://groups.google.com/forum/#!topic/plovr/gQyZEa2NpsU
"output-wrapper": "%output%"
}

View File

@@ -1,41 +0,0 @@
{
"id": "ol-whitespace",
// If ambiguate-properties and disambiguate-properties are set to true
// we get function names like "ol_control_Control_prototype$setMap" in
// the compiled code when using the SIMPLE compilation. It looks like
// "ambiguate-properties" and "disambiguate-properties" are only
// appropriate for ADVANCED compilation. To be sure we also don't
// set them for WHITESPACE.
"ambiguate-properties": false,
"disambiguate-properties": false,
"externs": [
"//json.js",
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/oli.js",
"../externs/proj4js.js",
"../externs/tilejson.js",
"../externs/w3c_device_sensor_event.js"
],
"inherits": "ol.json",
"inputs": [
"../build/src/internal/src/requireall.js",
"../build/src/internal/src/types.js"
],
"mode": "WHITESPACE",
// Note: we can't have a (function(){%output%})() output wrapper with
// WHITESPACE and SIMPLE modes. See this link for explanations:
// https://groups.google.com/forum/#!topic/plovr/gQyZEa2NpsU
"output-wrapper": "%output%",
"pretty-print": true
}

View File

@@ -1,39 +0,0 @@
{
"id": "ol",
"css-allowed-unrecognized-properties": [
"user-select"
],
"css-inputs": [
"../css/ol.css"
],
"css-output-file": "../build/ol.css",
"externs": [
"//json.js",
"../build/src/external/externs/types.js",
"../externs/bingmaps.js",
"../externs/geojson.js",
"../externs/oli.js",
"../externs/proj4js.js",
"../externs/tilejson.js",
"../externs/w3c_device_sensor_event.js"
],
"inherits": "base.json",
"inputs": [
"../build/src/external/src/exports.js",
"../build/src/external/src/types.js"
],
"output-wrapper": "(function(){%output%})();",
"paths": [
"../src"
]
}

View File

@@ -1,16 +0,0 @@
{
"id": "test",
"inherits": "base.json",
"inputs": [
"../build/test/requireall.js"
],
"paths": [
"../src",
"../test"
]
}

View File

@@ -1,204 +0,0 @@
.ol-attribution {
position: absolute;
text-align: right;
color: #eeeeee;
bottom: 0;
right: 0;
background: rgba(0,60,136,0.3);
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
padding: 6px;
}
.ol-attribution a {
color: white;
text-decoration: none;
}
.ol-attribution ul {
margin: 0;
padding: 0;
font-size: 10px;
line-height: 12px;
}
.ol-attribution li {
display: inline;
list-style: none;
line-height: inherit;
}
.ol-attribution li:not(:last-child):after {
content: "\2003";
}
.ol-dragbox {
position: absolute;
border: 2px solid red;
}
.ol-full-screen {
background: rgba(255,255,255,0.4);
border-radius: 4px;
padding: 2px;
position: absolute;
right: 8px;
top: 8px;
}
@media print {
.ol-full-screen {
display: none;
}
}
.ol-full-screen a {
background: rgba(0,60,136,0.5);
color: white;
display: block;
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
font-size: 18px;
font-weight: bold;
height: 22px;
line-height: 19px;
margin: 1px;
padding: 0;
text-align: center;
text-decoration: none;
width: 22px;
}
a.ol-full-screen-false:after {
content: "\2194";
}
a.ol-full-screen-true:after {
content: "\00d7";
}
.ol-full-screen div {
border-radius: 2px;
}
.ol-full-screen div a {
border-radius: 2px;
}
.ol-full-screen a:hover {
background: rgba(0,60,136,0.7);
}
.ol-logo {
bottom: 0;
left: 0;
padding: 2px;
position: absolute;
}
.ol-logo ul {
margin: 0;
}
.ol-logo ul li {
display: inline;
list-style: none;
}
.ol-mouse-position {
top: 8px;
right: 8px;
position: absolute;
}
.ol-scale-line {
background: rgba(0,60,136,0.3);
border-radius: 4px;
bottom: 8px;
left: 8px;
padding: 2px;
position: absolute;
}
.ol-scale-line-inner {
border: 1px solid #eeeeee;
border-top: none;
color: #eeeeee;
font-size: 10px;
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
text-align: center;
margin: 1px;
padding: 0px 2px;
}
.ol-unsupported {
display: none;
}
.ol-viewport .ol-unselectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.ol-zoom {
position: absolute;
top: 8px;
left: 8px;
background: rgba(255,255,255,0.4);
border-radius: 4px;
padding: 2px;
}
@media print {
.ol-zoom {
display: none;
}
}
.ol-zoom a {
display: block;
margin: 1px;
padding: 0;
color: white;
font-size: 18px;
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
font-weight: bold;
text-decoration: none;
text-align: center;
height: 22px;
width: 22px;
line-height: 19px;
background: rgba(0,60,136,0.5);
}
.ol-touch .ol-zoom a {
font-size: 20px;
height: 30px;
width: 30px;
line-height: 26px;
}
.ol-zoom a:hover {
background: rgba(0,60,136,0.7);
}
.ol-zoom-in {
border-radius: 2px 2px 0 0;
}
.ol-zoom-in:before {
content: "+";
}
.ol-zoom-out {
border-radius: 0 0 2px 2px;
}
.ol-zoom-out:before {
content: "\2212";
}
.ol-zoomslider {
position: absolute;
top: 67px;
left: 8px;
background: rgba(255, 255, 255, 0.4);
border-radius: 4px;
width: 28px;
height: 200px;
outline: none;
overflow: hidden;
padding: 0;
margin: 0;
}
.ol-zoomslider-thumb {
position: absolute;
display: block;
padding: 0;
margin: 2px;
background: rgba(0,60,136,0.5);
border-radius: 2px;
outline: none;
overflow: hidden;
height: 20px;
width: 24px;
}

View File

@@ -1,30 +0,0 @@
{
"opts": {
"recurse": true,
"template": "doc/template",
"tutorials": "doc/tutorials"
},
"tags": {
"allowUnknownTags": true
},
"source": {
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"plugins": [
"plugins/markdown",
"doc/plugins/inheritdoc",
"doc/plugins/exports"
],
"markdown": {
"parser": "gfm"
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
}
},
"jsVersion": 180
}

View File

@@ -1,17 +0,0 @@
Finding your way round
----------------------
See the class list to the right and especially take a look at {@link ol.Map} and {@link ol.layer.Layer} because those are the central objects.
In general every use of OpenLayers starts by initializing a map, then adding the required layers. Controls and interactions can be added to change the behavior of the map.
Projections
-----------
A {@link ol.Projection} defines which point on earth is represented by a pair of coordinates. Coordinates within OpenLayers can be used in various projections where some common projections are always supported, others can be used via Proj4js.
Maps and Layers
---------------
A map in OpenLayers is essentially a staple of layers that is viewed from the top. Layers are responsible for retieving data and displaying it.
Contributing
------------
See CONTRIBUTING.md for instructions on building and tesing OpenLayers. The file does also describe how to commit your changes to OpenLayers.

View File

@@ -1,94 +0,0 @@
/*
* This plugin parses goog.exportSymbol and goog.exportProperty calls to build
* a list of API symbols and properties. Everything else is marked undocumented,
* which will remove it from the docs.
*/
var api = [];
function collectExports(source) {
var i, ii, symbol, property;
var syms = source.match(/goog\.exportSymbol\([^\)]*\)/g);
if (syms) {
i = 0; ii = syms.length;
for (; i < ii; ++i) {
symbol = syms[i].match(/'([^']*)'/)[1];
api.push(symbol);
}
}
var props = source.match(/goog\.exportProperty\([^\)]*\)/g);
if (props) {
i = 0; ii = props.length;
for (; i < ii; ++i) {
property = props[i].match(/[^,]*,[^,]*,\r?\n? *([^\)]*)\)/)[1]
.replace('.prototype.', '#');
api.push(property);
}
}
}
var encoding = env.conf.encoding || 'utf8';
var fs = require('jsdoc/fs');
collectExports(fs.readFileSync('build/src/external/src/exports.js', encoding));
collectExports(fs.readFileSync('build/src/external/src/types.js', encoding));
exports.handlers = {
beforeParse: function(e) {
if (/\.js$/.test(e.filename)) {
collectExports(e.source);
}
},
newDoclet: function(e) {
if (api.indexOf(e.doclet.longname) > -1) {
// Add params of API symbols to the API
var names, name;
var params = e.doclet.params;
if (params) {
for (var i = 0, ii = params.length; i < ii; ++i) {
names = params[i].type.names;
if (names) {
for (var j = 0, jj=names.length; j < jj; ++j) {
name = names[j];
if (api.indexOf(name) === -1) {
api.push(name);
}
}
}
}
}
}
}
};
function filter(e) {
if (e.doclet) {
var fqn = e.doclet.longname;
if (fqn) {
e.doclet.undocumented = (api.indexOf(fqn) === -1);
// Remove parents that are not part of the API
var parent;
var parents = e.doclet.augments;
if (parents) {
for (var i = parents.length - 1; i >= 0; --i) {
parent = parents[i];
if (api.indexOf(parent) === -1) {
parents.splice(i, 1);
}
}
}
}
}
}
exports.nodeVisitor = {
visitNode: function(node, e, parser, currentSourceName) {
// filter out non-API symbols before the addDocletRef finisher is called
e.finishers.unshift(filter);
}
};

View File

@@ -1,16 +0,0 @@
/*
* This is a hack to prevent inheritDoc and override tags from entirely removing
* documentation of the method that inherits the documentation.
*
* TODO: Remove this hack when https://github.com/jsdoc3/jsdoc/issues/53
* is addressed.
*/
exports.nodeVisitor = {
visitNode: function(node, e, parser, currentSourceName) {
if (/@(inheritDoc|override)(\n|\r)/.test(e.comment)) {
e.preventDefault = true;
}
}
};

View File

@@ -1 +0,0 @@
The default template for JSDoc 3 uses: [the Taffy Database library](http://taffydb.com/) and the [Underscore Template library](http://documentcloud.github.com/underscore/#template).

View File

@@ -1,392 +0,0 @@
/*global env: true */
var template = require('jsdoc/template'),
fs = require('fs'),
path = require('path'),
taffy = require('taffydb').taffy,
helper = require('jsdoc/util/templateHelper'),
scopeToPunc = helper.scopeToPunc,
hasOwnProp = Object.prototype.hasOwnProperty,
data,
view,
outdir = env.opts.destination;
function find(spec) {
return helper.find(data, spec);
}
function tutoriallink(tutorial) {
return helper.toTutorial(tutorial, null, { tag: 'em', classname: 'disabled', prefix: 'Tutorial: ' });
}
function getAncestorLinks(doclet) {
return helper.getAncestorLinks(data, doclet);
}
var linkto = helper.linkto;
var htmlsafe = helper.htmlsafe;
function hashToLink(doclet, hash) {
if ( !/^(#.+)/.test(hash) ) { return hash; }
var url = helper.createLink(doclet);
url = url.replace(/(#.+|$)/, hash);
return '<a href="' + url + '">' + hash + '</a>';
}
function addSignatureParams(f) {
var params = helper.getSignatureParams(f, 'optional');
f.signature = (f.signature || '') + '('+params.join(', ')+')';
}
function addSignatureReturns(f) {
var returnTypes = helper.getSignatureReturns(f);
f.signature = '<span class="signature">'+(f.signature || '') + '</span>' + '<span class="type-signature">'+(returnTypes.length? ' &rarr; {'+returnTypes.join('|')+'}' : '')+'</span>';
}
function addSignatureTypes(f) {
var types = helper.getSignatureTypes(f);
f.signature = (f.signature || '') + '<span class="type-signature">'+(types.length? ' :'+types.join('|') : '')+'</span>';
}
function addAttribs(f) {
var attribs = helper.getAttribs(f);
f.attribs = '<span class="type-signature">'+htmlsafe(attribs.length? '<'+attribs.join(', ')+'> ' : '')+'</span>';
}
function generate(title, docs, filename) {
var docData = {
title: title,
docs: docs
};
var outpath = path.join(outdir, filename),
html = view.render('container.tmpl', docData);
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
fs.writeFileSync(outpath, html, 'utf8');
}
/**
* Create the navigation sidebar.
* @param {object} members The members that will be used to create the sidebar.
* @param {array<object>} members.classes
* @param {array<object>} members.externals
* @param {array<object>} members.globals
* @param {array<object>} members.mixins
* @param {array<object>} members.modules
* @param {array<object>} members.namespaces
* @param {array<object>} members.tutorials
* @return {string} The HTML for the navigation sidebar.
*/
function buildNav(members) {
var nav = '<h2><a href="index.html">Index</a></h2>',
seen = {};
/**
* Sorts elements by their qualified names (property longname).
* See https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/sort
* @param {object} a
* @param {object} b
* @return {number}
*/
function byLongName(a, b){
if(a.longname===b.longname){
return 0;
} else if(a.longname < b.longname){
return -1;
} else {
return 1;
}
}
if (members.modules.length) {
nav += '<h3>Modules</h3><ul>';
members.modules.sort(byLongName).forEach(function(m) {
if ( !hasOwnProp.call(seen, m.longname) ) {
nav += '<li>'+linkto(m.longname, m.longname)+'</li>';
}
seen[m.longname] = true;
});
nav += '</ul>';
}
if (members.externals.length) {
nav += '<h3>Externals</h3><ul>';
members.externals.sort(byLongName).forEach(function(e) {
if ( !hasOwnProp.call(seen, e.longname) ) {
nav += '<li>'+linkto( e.longname, e.name.replace(/(^"|"$)/g, '') )+'</li>';
}
seen[e.longname] = true;
});
nav += '</ul>';
}
if (members.classes.length) {
var moduleClasses = 0;
members.classes.sort(byLongName).forEach(function(c) {
var moduleSameName = find({kind: 'module', longname: c.longname});
if (moduleSameName.length) {
c.name = c.name.replace('module:', 'require("')+'")';
moduleClasses++;
moduleSameName[0].module = c;
}
if (moduleClasses !== -1 && moduleClasses < members.classes.length) {
nav += '<h3>Classes</h3><ul>';
moduleClasses = -1;
}
if ( !hasOwnProp.call(seen, c.longname) ) {
nav += '<li>'+linkto(c.longname, c.longname)+'</li>';
}
seen[c.longname] = true;
});
nav += '</ul>';
}
if (members.namespaces.length) {
nav += '<h3>Namespaces</h3><ul>';
members.namespaces.sort(byLongName).forEach(function(n) {
if ( !hasOwnProp.call(seen, n.longname) ) {
nav += '<li>'+linkto(n.longname, n.longname)+'</li>';
}
seen[n.longname] = true;
});
nav += '</ul>';
}
if (members.mixins.length) {
nav += '<h3>Mixins</h3><ul>';
members.mixins.sort(byLongName).forEach(function(m) {
if ( !hasOwnProp.call(seen, m.longname) ) {
nav += '<li>'+linkto(m.longname, m.longname)+'</li>';
}
seen[m.longname] = true;
});
nav += '</ul>';
}
if (members.tutorials.length) {
nav += '<h3>Tutorials</h3><ul>';
members.tutorials.sort(byLongName).forEach(function(t) {
nav += '<li>'+tutoriallink(t.name)+'</li>';
});
nav += '</ul>';
}
if (members.globals.length) {
nav += '<h3>Global</h3><ul>';
members.globals.sort(byLongName).forEach(function(g) {
if ( g.kind !== 'typedef' && !hasOwnProp.call(seen, g.longname) ) {
nav += '<li>'+linkto(g.longname, g.longname)+'</li>';
}
seen[g.longname] = true;
});
nav += '</ul>';
}
return nav;
}
/**
@param {TAFFY} taffyData See <http://taffydb.com/>.
@param {object} opts
@param {Tutorial} tutorials
*/
exports.publish = function(taffyData, opts, tutorials) {
data = taffyData;
var templatePath = opts.template;
view = new template.Template(templatePath + '/tmpl');
// set up templating
view.layout = 'layout.tmpl';
// set up tutorials for helper
helper.setTutorials(tutorials);
data = helper.prune(data);
data.sort('longname, version, since');
data().each(function(doclet) {
doclet.attribs = '';
if (doclet.examples) {
doclet.examples = doclet.examples.map(function(example) {
var caption, code;
if (example.match(/^\s*<caption>([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i)) {
caption = RegExp.$1;
code = RegExp.$3;
}
return {
caption: caption || '',
code: code || example
};
});
}
if (doclet.see) {
doclet.see.forEach(function(seeItem, i) {
doclet.see[i] = hashToLink(doclet, seeItem);
});
}
});
// update outdir if necessary, then create outdir
var packageInfo = ( find({kind: 'package'}) || [] ) [0];
if (packageInfo && packageInfo.name) {
outdir = path.join(outdir, packageInfo.name, packageInfo.version);
}
fs.mkPath(outdir);
// copy static files to outdir
var fromDir = path.join(templatePath, 'static'),
staticFiles = fs.ls(fromDir, 3);
staticFiles.forEach(function(fileName) {
var toDir = fs.toDir( fileName.replace(fromDir, outdir) );
fs.mkPath(toDir);
fs.copyFileSync(fileName, toDir);
});
data().each(function(doclet) {
var url = helper.createLink(doclet);
helper.registerLink(doclet.longname, url);
});
data().each(function(doclet) {
var url = helper.longnameToUrl[doclet.longname];
if (url.indexOf('#') > -1) {
doclet.id = helper.longnameToUrl[doclet.longname].split(/#/).pop();
}
else {
doclet.id = doclet.name;
}
if (doclet.kind === 'function' || doclet.kind === 'class') {
addSignatureParams(doclet);
addSignatureReturns(doclet);
addAttribs(doclet);
}
});
// do this after the urls have all been generated
data().each(function(doclet) {
doclet.ancestors = getAncestorLinks(doclet);
doclet.signature = '';
if (doclet.kind === 'member') {
addSignatureTypes(doclet);
addAttribs(doclet);
}
if (doclet.kind === 'constant') {
addSignatureTypes(doclet);
addAttribs(doclet);
doclet.kind = 'member';
}
});
var members = helper.getMembers(data);
members.tutorials = tutorials.children;
// add template helpers
view.find = find;
view.linkto = linkto;
view.tutoriallink = tutoriallink;
view.htmlsafe = htmlsafe;
// once for all
view.nav = buildNav(members);
for (var longname in helper.longnameToUrl) {
if ( hasOwnProp.call(helper.longnameToUrl, longname) ) {
// reuse 'members', which speeds things up a bit
var classes = taffy(members.classes);
classes = helper.find(classes, {longname: longname});
if (classes.length) {
generate('Class: ' + classes[0].longname, classes, helper.longnameToUrl[longname]);
}
var modules = taffy(members.modules);
modules = helper.find(modules, {longname: longname});
if (modules.length) {
generate('Module: ' + modules[0].longname, modules, helper.longnameToUrl[longname]);
}
var namespaces = taffy(members.namespaces);
namespaces = helper.find(namespaces, {longname: longname});
if (namespaces.length) {
generate('Namespace: ' + namespaces[0].longname, namespaces, helper.longnameToUrl[longname]);
}
var mixins = taffy(members.mixins);
mixins = helper.find(mixins, {longname: longname});
if (mixins.length) {
generate('Mixin: ' + mixins[0].longname, mixins, helper.longnameToUrl[longname]);
}
var externals = taffy(members.externals);
externals = helper.find(externals, {longname: longname});
if (externals.length) {
generate('External: ' + externals[0].longname, externals, helper.longnameToUrl[longname]);
}
}
}
if (members.globals.length) { generate('Global', members.globals, 'global.html'); }
// index page displays information from package.json and lists files
var files = find({kind: 'file'}),
packages = find({kind: 'package'});
generate('Index',
packages.concat(
[{kind: 'mainpage', readme: opts.readme, longname: (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'}]
).concat(files),
'index.html');
// TODO: move the tutorial functions to templateHelper.js
function generateTutorial(title, tutorial, filename) {
var tutorialData = {
title: title,
header: tutorial.title,
content: tutorial.parse(),
children: tutorial.children
};
var tutorialPath = path.join(outdir, filename),
html = view.render('tutorial.tmpl', tutorialData);
// yes, you can use {@link} in tutorials too!
html = helper.resolveLinks(html); // turn {@link foo} into <a href="foodoc.html">foo</a>
fs.writeFileSync(tutorialPath, html, 'utf8');
}
// tutorials can have only one parent so there is no risk for loops
function saveChildren(node) {
node.children.forEach(function(child) {
generateTutorial('Tutorial: ' + child.title, child, helper.tutorialToUrl(child.name));
saveChildren(child);
});
}
saveChildren(tutorials);
};

View File

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

View File

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);

View File

@@ -1,28 +0,0 @@
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();

View File

@@ -1,285 +0,0 @@
html
{
overflow: auto;
background-color: #fff;
}
body
{
font: 14px "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans serif;
line-height: 130%;
color: #000;
background-color: #fff;
}
a {
color: #444;
}
a:visited {
color: #444;
}
a:active {
color: #444;
}
header
{
display: block;
padding: 6px 4px;
}
.class-description {
font-style: italic;
font-family: Palatino, 'Palatino Linotype', serif;
font-size: 130%;
line-height: 140%;
margin-bottom: 1em;
margin-top: 1em;
}
#main {
float: left;
width: 100%;
}
section
{
display: block;
background-color: #fff;
padding: 12px 24px;
border-bottom: 1px solid #ccc;
margin-right: 240px;
}
.variation {
display: none;
}
.optional:after {
content: "opt";
font-size: 60%;
color: #aaa;
font-style: italic;
font-weight: lighter;
}
nav
{
display: block;
float: left;
margin-left: -230px;
margin-top: 28px;
width: 220px;
border-left: 1px solid #ccc;
padding-left: 9px;
}
nav ul {
font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
font-size: 100%;
line-height: 17px;
padding:0;
margin:0;
list-style-type:none;
}
nav h2 a, nav h2 a:visited {
color: #A35A00;
text-decoration: none;
}
nav h3 {
margin-top: 12px;
}
nav li {
margin-top: 6px;
}
nav a {
color: #5C5954;
}
nav a:visited {
color: #5C5954;
}
nav a:active {
color: #5C5954;
}
footer {
display: block;
padding: 6px;
margin-top: 12px;
font-style: italic;
font-size: 90%;
}
h1
{
font-size: 200%;
font-weight: bold;
letter-spacing: -0.01em;
margin: 6px 0 9px 0;
}
h2
{
font-size: 170%;
font-weight: bold;
letter-spacing: -0.01em;
margin: 6px 0 3px 0;
}
h3
{
font-size: 150%;
font-weight: bold;
letter-spacing: -0.01em;
margin-top: 16px;
margin: 6px 0 3px 0;
}
h4
{
font-size: 130%;
font-weight: bold;
letter-spacing: -0.01em;
margin-top: 16px;
margin: 18px 0 3px 0;
color: #A35A00;
}
h5, .container-overview .subsection-title
{
font-size: 120%;
font-weight: bold;
letter-spacing: -0.01em;
margin: 8px 0 3px -16px;
}
h6
{
font-size: 100%;
letter-spacing: -0.01em;
margin: 6px 0 3px 0;
font-style: italic;
}
.protected {
display: none;
}
dt.tag-source, dd.tag-source {
display: none;
}
.ancestors { color: #999; }
.ancestors a
{
color: #999 !important;
text-decoration: none;
}
.important
{
font-weight: bold;
color: #950B02;
}
.yes-def {
text-indent: -1000px;
}
.type-signature {
color: #aaa;
}
.name, .signature {
font-family: Consolas, "Lucida Console", Monaco, monospace;
}
.details { margin-top: 14px; }
.details dt { width:110px; float:left; border-left: 2px solid #DDD; padding-left: 10px; padding-top: 6px; }
.details dd { margin-left: 50px; }
.details ul { margin: 0; }
.details ul { list-style-type: none; }
.details li { margin-left: 30px; padding-top: 6px; }
.description {
margin-bottom: 1em;
margin-left: -16px;
margin-top: 1em;
}
.code-caption
{
font-style: italic;
font-family: Palatino, 'Palatino Linotype', serif;
font-size: 107%;
margin: 0;
}
.prettyprint
{
border: 1px solid #ddd;
width: 80%;
}
.prettyprint code
{
font-family: Consolas, 'Lucida Console', Monaco, monospace;
font-size: 100%;
line-height: 18px;
display: block;
padding: 4px 12px;
margin: 0;
background-color: #fff;
color: #000;
border-left: 3px #ddd solid;
}
.params, .props
{
border-spacing: 0;
border: 0;
border-collapse: collapse;
}
.params .name, .props .name, .name code {
color: #A35A00;
font-family: Consolas, 'Lucida Console', Monaco, monospace;
font-size: 100%;
}
.params td, .params th, .props td, .props th
{
border: 1px solid #ddd;
margin: 0px;
text-align: left;
vertical-align: top;
padding: 4px 6px;
display: table-cell;
}
.params thead tr, .props thead tr
{
background-color: #ddd;
font-weight: bold;
}
.params .params thead tr, .props .props thead tr
{
background-color: #fff;
font-weight: bold;
}
.params th, .props th { border-right: 1px solid #aaa; }
.params thead .last, .props thead .last { border-right: 1px solid #ddd; }
.disabled {
color: #454545;
}

View File

@@ -1,111 +0,0 @@
/* JSDoc prettify.js theme */
/* plain text */
.pln {
color: #000000;
font-weight: normal;
font-style: normal;
}
/* string content */
.str {
color: #006400;
font-weight: normal;
font-style: normal;
}
/* a keyword */
.kwd {
color: #000000;
font-weight: bold;
font-style: normal;
}
/* a comment */
.com {
font-weight: normal;
font-style: italic;
}
/* a type name */
.typ {
color: #000000;
font-weight: normal;
font-style: normal;
}
/* a literal value */
.lit {
color: #006400;
font-weight: normal;
font-style: normal;
}
/* punctuation */
.pun {
color: #000000;
font-weight: bold;
font-style: normal;
}
/* lisp open bracket */
.opn {
color: #000000;
font-weight: bold;
font-style: normal;
}
/* lisp close bracket */
.clo {
color: #000000;
font-weight: bold;
font-style: normal;
}
/* a markup tag name */
.tag {
color: #006400;
font-weight: normal;
font-style: normal;
}
/* a markup attribute name */
.atn {
color: #006400;
font-weight: normal;
font-style: normal;
}
/* a markup attribute value */
.atv {
color: #006400;
font-weight: normal;
font-style: normal;
}
/* a declaration */
.dec {
color: #000000;
font-weight: bold;
font-style: normal;
}
/* a variable name */
.var {
color: #000000;
font-weight: normal;
font-style: normal;
}
/* a function name */
.fun {
color: #000000;
font-weight: bold;
font-style: normal;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0;
}

View File

@@ -1,132 +0,0 @@
/* Tomorrow Theme */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
/* plain text */
.pln {
color: #4d4d4c; }
@media screen {
/* string content */
.str {
color: #718c00; }
/* a keyword */
.kwd {
color: #8959a8; }
/* a comment */
.com {
color: #8e908c; }
/* a type name */
.typ {
color: #4271ae; }
/* a literal value */
.lit {
color: #f5871f; }
/* punctuation */
.pun {
color: #4d4d4c; }
/* lisp open bracket */
.opn {
color: #4d4d4c; }
/* lisp close bracket */
.clo {
color: #4d4d4c; }
/* a markup tag name */
.tag {
color: #c82829; }
/* a markup attribute name */
.atn {
color: #f5871f; }
/* a markup attribute value */
.atv {
color: #3e999f; }
/* a declaration */
.dec {
color: #f5871f; }
/* a variable name */
.var {
color: #c82829; }
/* a function name */
.fun {
color: #4271ae; } }
/* Use higher contrast and text-weight for printable form. */
@media print, projection {
.str {
color: #060; }
.kwd {
color: #006;
font-weight: bold; }
.com {
color: #600;
font-style: italic; }
.typ {
color: #404;
font-weight: bold; }
.lit {
color: #044; }
.pun, .opn, .clo {
color: #440; }
.tag {
color: #006;
font-weight: bold; }
.atn {
color: #404; }
.atv {
color: #060; } }
/* Style */
/*
pre.prettyprint {
background: white;
font-family: Menlo, Monaco, Consolas, monospace;
font-size: 12px;
line-height: 1.5;
border: 1px solid #ccc;
padding: 10px; }
*/
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0; }
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L4,
li.L5,
li.L6,
li.L7,
li.L8,
li.L9 {
/* */ }
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
/* */ }

View File

@@ -1,143 +0,0 @@
<?js
var self = this;
docs.forEach(function(doc, i) {
?>
<?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?>
<?js= self.partial('mainpage.tmpl', doc) ?>
<?js } else { ?>
<section>
<header>
<h2><?js if (doc.ancestors && doc.ancestors.length) { ?>
<span class="ancestors"><?js= doc.ancestors.join('') ?></span>
<?js } ?>
<?js= doc.longname ?>
<?js if (doc.variation) { ?>
<sup class="variation"><?js= doc.variation ?></sup>
<?js } ?></h2>
<?js if (doc.classdesc) { ?>
<div class="class-description"><?js= doc.classdesc ?></div>
<?js } ?>
</header>
<article>
<div class="container-overview">
<?js if (doc.kind === 'module' && doc.module) { ?>
<?js= self.partial('method.tmpl', doc.module) ?>
<?js } ?>
<?js if (doc.kind === 'class') { ?>
<?js= self.partial('method.tmpl', doc) ?>
<?js } else { ?>
<?js if (doc.description) { ?>
<div class="description"><?js= doc.description ?></div>
<?js } ?>
<?js= self.partial('details.tmpl', doc) ?>
<?js if (doc.examples && doc.examples.length) { ?>
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
<?js= self.partial('examples.tmpl', doc.examples) ?>
<?js } ?>
<?js } ?>
</div>
<?js if (doc.augments && doc.augments.length) { ?>
<h3 class="subsection-title">Extends</h3>
<ul><?js doc.augments.forEach(function(a) { ?>
<li><?js= self.linkto(a, a) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (doc.mixes && doc.mixes.length) { ?>
<h3 class="subsection-title">Mixes In</h3>
<ul><?js doc.mixes.forEach(function(a) { ?>
<li><?js= self.linkto(a, a) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js if (doc.requires && doc.requires.length) { ?>
<h3 class="subsection-title">Requires</h3>
<ul><?js doc.requires.forEach(function(r) { ?>
<li><?js= self.linkto(r, r) ?></li>
<?js }); ?></ul>
<?js } ?>
<?js
var classes = self.find({kind: 'class', memberof: doc.longname});
if (doc.kind !== 'globalobj' && classes && classes.length) {
?>
<h3 class="subsection-title">Classes</h3>
<dl><?js classes.forEach(function(c) { ?>
<dt><?js= self.linkto(c.longname, c.longname) ?></dt>
<dd><?js if (c.summary) { ?><?js= c.summary ?><?js } ?></dd>
<?js }); ?></dl>
<?js } ?>
<?js
var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
if (doc.kind !== 'globalobj' && namespaces && namespaces.length) {
?>
<h3 class="subsection-title">Namespaces</h3>
<dl><?js namespaces.forEach(function(n) { ?>
<dt><a href="namespaces.html#<?js= n.longname ?>"><?js= self.linkto(n.longname, n.longname) ?></a></dt>
<dd><?js if (n.summary) { ?><?js= n.summary ?><?js } ?></dd>
<?js }); ?></dl>
<?js } ?>
<?js
var members = self.find({kind: 'member', memberof: title === 'Globals'? {isUndefined: true} : doc.longname});
if (members && members.length && members.forEach) {
?>
<h3 class="subsection-title">Members</h3>
<dl><?js members.forEach(function(p) { ?>
<?js= self.partial('members.tmpl', p) ?>
<?js }); ?></dl>
<?js } ?>
<?js
var methods = self.find({kind: 'function', memberof: title === 'Globals'? {isUndefined: true} : doc.longname});
if (methods && methods.length && methods.forEach) {
?>
<h3 class="subsection-title">Methods</h3>
<dl><?js methods.forEach(function(m) { ?>
<?js= self.partial('method.tmpl', m) ?>
<?js }); ?></dl>
<?js } ?>
<?js
var typedefs = self.find({kind: 'typedef', memberof: doc.longname});
if (typedefs && typedefs.length && typedefs.forEach) {
?>
<h3 class="subsection-title">TypeDefs</h3>
<dl><?js typedefs.forEach(function(e) { ?>
<?js= self.partial('members.tmpl', e) ?>
<?js }); ?></dl>
<?js } ?>
<?js
var events = self.find({kind: 'event', memberof: doc.longname});
if (events && events.length && events.forEach) {
?>
<h3 class="subsection-title">Events</h3>
<dl><?js events.forEach(function(e) { ?>
<?js= self.partial('method.tmpl', e) ?>
<?js }); ?></dl>
<?js } ?>
</article>
</section>
<?js } ?>
<?js }); ?>

View File

@@ -1,96 +0,0 @@
<?js
var data = obj;
var self = this;
?>
<dl class="details">
<?js
var properties = data.properties;
if (properties && properties.length && properties.forEach) {
?>
<h5 class="subsection-title">Properties:</h5>
<dl><?js= this.partial('properties.tmpl', properties) ?></dl>
<?js } ?>
<?js if (data.version) {?>
<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
<?js } ?>
<?js if (data.since) {?>
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li><?js= since ?></dd>
<?js } ?>
<?js if (data.inherited && data.inherits) { ?>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<?js= this.linkto(data.inherits, this.htmlsafe(data.inherits)) ?>
</li></dd>
<?js } ?>
<?js if (data.deprecated) { ?>
<dt class="important tag-deprecated">Deprecated:</dt><?js
if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li><ul></dd><?js }
?>
<?js } ?>
<?js if (data.author && author.length) {?>
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul><?js author.forEach(function(a) { ?>
<li><?js= a ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.copyright) {?>
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
<?js } ?>
<?js if (data.license) {?>
<dt class="tag-license">License:</dt>
<dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
<?js } ?>
<?js if (data.defaultvalue) {?>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li><?js= data.defaultvalue ?></li></ul></dd>
<?js } ?>
<?js if (data.meta) {?>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li><?js= meta.filename ?>, line <?js= meta.lineno ?></li></ul></dd>
<?js } ?>
<?js if (data.tutorials && tutorials.length) {?>
<dt class="tag-tutorial">Tutorials:</dt>
<dd class="tag-tutorial">
<ul><?js tutorials.forEach(function(t) { ?>
<li><?js= self.tutoriallink(t) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.see && see.length) {?>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul><?js see.forEach(function(s) { ?>
<li><?js= self.linkto(s) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
<?js if (data.todo && todo.length) {?>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul><?js todo.forEach(function(t) { ?>
<li><?js= t ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
</dl>

View File

@@ -1,2 +0,0 @@
<?js var data = obj; ?>
<pre><code><?js= data ?></code></pre>

View File

@@ -1,11 +0,0 @@
<?js
var data = obj;
data.forEach(function(example) {
if (example.caption) {
?>
<p class="code-caption"><?js= example.caption ?></p>
<?js } ?>
<pre class="prettyprint"><code><?js= example.code ?></code></pre>
<?js
});
?>

View File

@@ -1,19 +0,0 @@
<?js
var data = obj;
if (data.description) {
?>
<div class="param-desc">
<?js= description ?>
</div>
<?js } ?>
<?js if (data.type && data.type.names) {?>
<dl>
<dt>
Type
</dt>
<dd>
<?js= this.partial('type.tmpl', data.type.names) ?>
</dd>
</dl>
<?js } ?>

View File

@@ -1,4 +0,0 @@
<?js var data = obj; ?>
<li>
<?js= data ?>
</li>

View File

@@ -1,52 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OpenLayers 3 API Documentation - <?js= title ?></title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-jsdoc.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="./">OpenLayers 3 API Documentation - <?js= title ?></a>
<ul class="nav pull-right">
<li><iframe class="github-watch-button" src="http://ghbtns.com/github-btn.html?user=openlayers&repo=ol3&type=watch&count=true"
allowtransparency="true" frameborder="0" scrolling="0" height="20" width="90"></iframe></li>
<li><a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-hashtags="openlayers">&nbsp;</a></li>
<li><div class="g-plusone-wrapper"><div class="g-plusone" data-size="medium" data-annotation="none"></div></div></li>
</ul>
</div>
</div>
</div>
<div id="main">
<?js= content ?>
</div>
<nav>
<?js= this.nav ?>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3</a>
</footer>
<script> prettyPrint(); </script>
<script src="../resources/social-links.js" type="text/javascript"></script>
</body>
</html>

View File

@@ -1,14 +0,0 @@
<?js
var data = obj;
var self = this;
?>
<?js if (data.kind === 'package') { ?>
<h3><?js= data.name ?> <?js= data.version ?></h3>
<?js } ?>
<?js if (data.readme) { ?>
<section>
<article><?js= data.readme ?></article>
</section>
<?js } ?>

View File

@@ -1,22 +0,0 @@
<?js var data = obj; ?>
<dt class="<?js= data.access ?>">
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + name + data.signature ?></h4>
<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
<?js } ?>
</dt>
<dd class="<?js= data.access ?>">
<?js if (data.description) { ?>
<div class="description">
<?js= data.description ?>
</div>
<?js } ?>
<?js= this.partial('details.tmpl', data) ?>
<?js if (data.examples && examples.length) { ?>
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
<?js= this.partial('examples.tmpl', examples) ?>
<?js } ?>
</dd>

View File

@@ -1,76 +0,0 @@
<?js
var data = obj;
var self = this;
?>
<dt>
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind == 'class'? 'new ':'') + name + data.signature ?></h4>
<?js if (data.summary) { ?>
<p class="summary"><?js= summary ?></p>
<?js } ?>
</dt>
<dd>
<?js if (data.description) { ?>
<div class="description">
<?js= data.description ?>
</div>
<?js } ?>
<?js if (kind === 'event' && data.type && data.type.names) {?>
<h5>Type:</h5>
<ul>
<li>
<?js= self.partial('type.tmpl', data.type.names) ?>
</li>
</ul>
<?js } ?>
<?js if (data['this']) { ?>
<h5>This:</h5>
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
<?js } ?>
<?js if (data.params && params.length) { ?>
<h5>Parameters:</h5>
<?js= this.partial('params.tmpl', params) ?>
<?js } ?>
<?js= this.partial('details.tmpl', data) ?>
<?js if (data.fires && fires.length) { ?>
<h5>Fires:</h5>
<ul><?js fires.forEach(function(f) { ?>
<?js= self.partial('fires.tmpl', self.linkto(f) ) ?>
<?js }); ?></ul>
<?js } ?>
<?js if (data.exceptions && exceptions.length) { ?>
<h5>Throws:</h5>
<?js if (exceptions.length > 1) { ?><ul><?js
exceptions.forEach(function(r) { ?>
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
<?js });
?></ul><?js } else {
exceptions.forEach(function(r) { ?>
<?js= self.partial('exceptions.tmpl', r) ?>
<?js });
} } ?>
<?js if (data.returns && returns.length) { ?>
<h5>Returns:</h5>
<?js if (returns.length > 1) { ?><ul><?js
returns.forEach(function(r) { ?>
<li><?js= self.partial('returns.tmpl', r) ?></li>
<?js });
?></ul><?js } else {
returns.forEach(function(r) { ?>
<?js= self.partial('returns.tmpl', r) ?>
<?js });
} } ?>
<?js if (data.examples && examples.length) { ?>
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
<?js= this.partial('examples.tmpl', examples) ?>
<?js } ?>
</dd>

View File

@@ -1,108 +0,0 @@
<?js
var params = obj;
/* sort subparams under their parent params (like opts.classname) */
var parentParam = null;
params.forEach(function(param, i) {
if (!param) { return; }
if ( parentParam && param.name && param.name.indexOf(parentParam.name + '.') === 0 ) {
param.name = param.name.substr(parentParam.name.length+1);
parentParam.subparams = parentParam.subparams || [];
parentParam.subparams.push(param);
params[i] = null;
}
else {
parentParam = param;
}
});
/* determine if we need extra columns, "attributes" and "default" */
params.hasAttributes = false;
params.hasDefault = false;
params.hasName = false;
params.forEach(function(param) {
if (!param) { return; }
if (param.optional || param.nullable) {
params.hasAttributes = true;
}
if (param.name) {
params.hasName = true;
}
if (typeof param.defaultvalue !== 'undefined') {
params.hasDefault = true;
}
});
?>
<table class="params">
<thead>
<tr>
<?js if (params.hasName) {?>
<th>Name</th>
<?js } ?>
<th>Type</th>
<?js if (params.hasAttributes) {?>
<th>Argument</th>
<?js } ?>
<?js if (params.hasDefault) {?>
<th>Default</th>
<?js } ?>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<?js
var self = this;
params.forEach(function(param) {
if (!param) { return; }
?>
<tr>
<?js if (params.hasName) {?>
<td class="name"><code><?js= param.name.replace(/^opt_/, "") ?></code></td>
<?js } ?>
<td class="type">
<?js if (param.type && param.type.names) {?>
<?js= self.partial('type.tmpl', param.type.names) ?>
<?js } ?>
</td>
<?js if (params.hasAttributes) {?>
<td class="attributes">
<?js if (param.optional) { ?>
&lt;optional><br>
<?js } ?>
<?js if (param.nullable) { ?>
&lt;nullable><br>
<?js } ?>
</td>
<?js } ?>
<?js if (params.hasDefault) {?>
<td class="default">
<?js if (typeof param.defaultvalue !== 'undefined') { ?>
<?js= self.htmlsafe(param.defaultvalue) ?>
<?js } ?>
</td>
<?js } ?>
<td class="description last"><?js= (param.optional ? "(Optional) " : "") + param.description ?><?js if (param.subparams) { ?>
<h6>Properties</h6>
<?js= self.partial('params.tmpl', param.subparams) ?>
<?js } ?></td>
</tr>
<?js }); ?>
</tbody>
</table>

View File

@@ -1,107 +0,0 @@
<?js
var props = obj;
/* sort subprops under their parent props (like opts.classname) */
var parentProp = null;
props.forEach(function(prop, i) {
if (!prop) { return; }
if ( parentProp && prop.name.indexOf(parentProp.name + '.') === 0 ) {
prop.name = prop.name.substr(parentProp.name.length+1);
parentProp.subprops = parentProp.subprops || [];
parentProp.subprops.push(prop);
props[i] = null;
}
else {
parentProp = prop;
}
});
/* determine if we need extra columns, "attributes" and "default" */
props.hasAttributes = false;
props.hasDefault = false;
props.hasName = false;
props.forEach(function(prop) {
if (!prop) { return; }
if (prop.optional || prop.nullable) {
props.hasAttributes = true;
}
if (prop.name) {
props.hasName = true;
}
if (typeof prop.defaultvalue !== 'undefined') {
props.hasDefault = true;
}
});
?>
<table class="props">
<thead>
<tr>
<?js if (props.hasName) {?>
<th>Name</th>
<?js } ?>
<th>Type</th>
<?js if (props.hasAttributes) {?>
<th>Argument</th>
<?js } ?>
<?js if (props.hasDefault) {?>
<th>Default</th>
<?js } ?>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<?js
var self = this;
props.forEach(function(prop) {
if (!prop) { return; }
?>
<tr>
<?js if (props.hasName) {?>
<td class="name"><code><?js= prop.name ?></code></td>
<?js } ?>
<td class="type">
<?js if (prop.type && prop.type.names) {?>
<?js= self.partial('type.tmpl', prop.type.names) ?>
<?js } ?>
</td>
<?js if (props.hasAttributes) {?>
<td class="attributes">
<?js if (prop.optional) { ?>
&lt;optional><br>
<?js } ?>
<?js if (prop.nullable) { ?>
&lt;nullable><br>
<?js } ?>
</td>
<?js } ?>
<?js if (props.hasDefault) {?>
<td class="default">
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
<?js= self.htmlsafe(prop.defaultvalue) ?>
<?js } ?>
</td>
<?js } ?>
<td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?>
<h6>Properties</h6><?js= self.partial('properties.tmpl', prop.subprops) ?>
<?js } ?></td>
</tr>
<?js }); ?>
</tbody>
</table>

View File

@@ -1,19 +0,0 @@
<?js
var data = obj;
if (data.description) {
?>
<div class="param-desc">
<?js= description ?>
</div>
<?js } ?>
<?js if (data.type && data.type.names) {?>
<dl>
<dt>
Type
</dt>
<dd>
<?js= this.partial('type.tmpl', data.type.names) ?>
</dd>
</dl>
<?js } ?>

View File

@@ -1,8 +0,0 @@
<?js
var data = obj;
?>
<section>
<article>
<pre class="prettyprint source"><code><?js= data.code ?></code></pre>
</article>
</section>

View File

@@ -1,19 +0,0 @@
<section>
<header>
<?js if (children.length > 0) { ?>
<ul><?js
var self = this;
children.forEach(function(t) { ?>
<li><?js= self.tutoriallink(t.name) ?></li>
<?js }); ?></ul>
<?js } ?>
<h2><?js= header ?></h2>
</header>
<article>
<?js= content ?>
</article>
</section>

View File

@@ -1,7 +0,0 @@
<?js
var data = obj;
var self = this;
data.forEach(function(name, i) { ?>
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span>
<?js if (i < data.length-1) { ?>|<?js } ?>
<?js }); ?>

View File

@@ -1,3 +0,0 @@
{
"title": "OpenLayers 3 Architecture"
}

View File

@@ -1,274 +0,0 @@
CLASS HIERARCHY
===============
```
goog.math.Coordinate // Simple 2D point
|
+- TileCoord
goog.math.Box
|
+- Extent // The extent of a single object in two dimensions, projection not stored
|
+- TileBounds // A range of tiles in two dimensions, integer coordinates, z not stored
Projection
goog.events.EventTarget
|
+- MVCObject
| |
| +- Camera
| |
| +- Control
| | |
| | +- ?
| |
| +- Layer
| | |
| | +- TileLayer
| | | |
| | | +- TMSTileLayer
| | | |
| | | +- WMTSTileLayer
| | | |
| | | +- XYZTileLayer / OSMTileLayer
| | |
| | +- VectorLayer
| | |
| | +- ImageLayer
| |
| +- LayerRenderer
| |
| +- LayerRendererOptions
| |
| +- Map
| |
| +- MapRenderer
| | |
| | +- HTMLMapRenderer
| | |
| | +- WebGLMapRenderer
| |
| +- MVCArray
| | |
| | +- ControlArray
| | |
| | +- LayerViewArray
|
| +- TileQueue
|
+- Tile
```
Layer renderer hierarchy
------------------------
```
goog.events.EventTarget
|
+- MVCObject
|
+- LayerRenderer
|
+- SingleTileLayerRenderer
| |
| +- HTMLSingleTileLayerRenderer
| |
| +- WebGLSingleTileLayerRenderer
|
+- TileLayerRenderer
| |
| +- HTMLTileLayerRenderer
| |
| +- WebGLTileLayerRenderer
|
+- VectorLayerRenderer
| |
| +- HTMLVectorLayerRenderer
| | |
| | +- SVGHTMLVectorLayerRenderer
| | |
| | +- Canvas2DHTMLVectorLayerRenderer
| | |
| | +- VMLHTMLVectorLayerRenderer
| |
| +- WebGLVectorLayerRenderer
```
OBJECT PROPERTIES AND METHODS
=============================
Notation:
- `property type` property with type, trailing ? indicates unsure, getters and setters are assumed to exist.
- `f(args) -> type` function taking args returning type.
- `f(args) -> type = something` f is a trivial wrapper around something.
- `fires 'x'` fires events of type 'x'.
Principles:
- All non-trivial objects inherit from `MVCObject`.
- All non-trivial collections are either `MVCArrays` or a child class thereof.
- Resolutions are `Array.<number>`, infinitely scalable resources (e.g. vectore layers) have resolutions == null.
```
MVCObject
as Google Maps MVCObject
freeze()
unfreeze()
TileCoord
clone() -> TileCoord
getHash() -> number
TileBounds
forEachTileCoord(z, function(tileCoord))
Tile
tileCoord TileCoord
url string
state UNLOADED | LOADING | LOADED
fires 'loaded' // when loaded
fires 'aborted' // when loading is aborted
Camera
position goog.math.Coordinate
resolution number
rotation number
Layer
projections Array.<Projection>
extent Extent
getResolutions() -> Array.<number>|null
fires 'change' // when data changes
LayerArray
getResolutions() -> Array.<number>|null
getMaxResolution() = this.getResolutions()[0] | null
LayerRendererOptions
layer Layer
visible boolean
opacity number
brightness number
color number
hue number
saturation number
Map
projection Projection
renderer Renderer
layers LayerArray
addLayer(layer) = layers.push(layer)
getExtent() -> Extent
getMaxResolution() = layers.getMaxResolution()
TileGrid
resolutions Array.<number>
extent ol.Extent
xEast boolean
ySouth boolean
origin(s) Coord|Array.<Coord>
tileSize goog.math.Size
forEachTileCoordChild(tileCoord, function(z, TileBounds))
forEachTileCoordParent(tileCoord, function(z, TileBounds))
getExtentTileBounds(z, extent) -> TileBounds
getTileCoord(coordinate) -> TileCoord
getTileCoordCenter(tileCoord) -> goog.math.Coordinate
getTileCoordExtent(tileCoord) -> ol.Extent
getTileCoordResolution(tileCoord) -> number
getZForResolution(resolution) -> number
TileLayer
tileGrid TileGrid
tileUrl function(tileCoord) -> string
getTileCoordUrl(tileCoord) -> string = this.tileUrl(tileCoord)
TileQueue
camera Camera // or maybe MVCArray.<Camera> ?
getTileCoordPriority(tileCoord) -> number // private
enqueueTile(Tile)
VectorLayer
forEachFeature(resolution, extent, projection, function(Feature))
Renderer
target HTMLDivElement
map Map
camera Camera
getCapabilities() -> Array.<string> // maybe ?
```
Questions:
- Store tile layer extent in TileLayer or in TileGrid? (not clear)
Two concepts: tile coordinate system range and and available data extent.
TileGrid extent is range (or validity extent) of the tile coordinate system.
TileLayer extent is the available data extent. A particular TileGrid may range
from 0,0 to 10,10. My cache may conform to that grid but I may only have tiles
ranging from 2,2 to 8,8. When you need to wrap multiple worlds, you pay
attention to the TileGrid extent. When you need to decide whether or not to
bother requesting a tile, you pay attention to the TileLayer extent.
- Who determines "best" resolution? (static function?)
Todo: if tile layer extent stored in TileLayer rather than TileGrid then extent
will occasionally need to be passed to TileGrid functions for cropping.
DESIGN ASSERTIONS
=================
Map
- A map has a renderer (the map renderer).
- A map has a camera.
- Multiple maps can share the same camera.
- A map has a layer list.
Layer
- A layer can have multiple projections (the supported projections).
- A layer advertizes the projections it supports.
- A layer returns no data if asked data for an unsupported projection.
LayerRendererOptions
- A layer renderer options object stores view-related states for a layer.
- Options include visibility, opacity, saturation, hue, etc.
- A layer renderer options object has a layer.
- Multiple layer renderer options can share the same layer.
- In other words a layer can be viewed in different manners.
Renderer
- The map renderer responds to events.
- The map renderer receives events from the camera.
- The map renderer creates layer renderers.
Control
- A control may listen to map events.
- A control may listen to camera events.
- A map navigation control acts on the camera.
MVC
- Types can be described in MVC terms.
- Models don't know what rendering means.
- Maps are models.
- Layers are models.
- Layer views are models (sorry!).
- Cameras are models.
- Layer lists are collections.
- Renderers are views.
- Controls are views or controllers or both.
- An attribution control is a view.
- A map navigation control is a controller.
- A zoom slider control is both a view and a controller.

113
doc_config/Languages.txt Normal file
View File

@@ -0,0 +1,113 @@
Format: 1.52
# This is the Natural Docs languages file for this project. If you change
# anything here, it will apply to THIS PROJECT ONLY. If you'd like to change
# something for all your projects, edit the Languages.txt in Natural Docs'
# Config directory instead.
# You can prevent certain file extensions from being scanned like this:
# Ignore Extensions: [extension] [extension] ...
#-------------------------------------------------------------------------------
# SYNTAX:
#
# Unlike other Natural Docs configuration files, in this file all comments
# MUST be alone on a line. Some languages deal with the # character, so you
# cannot put comments on the same line as content.
#
# Also, all lists are separated with spaces, not commas, again because some
# languages may need to use them.
#
# Language: [name]
# Alter Language: [name]
# Defines a new language or alters an existing one. Its name can use any
# characters. If any of the properties below have an add/replace form, you
# must use that when using Alter Language.
#
# The language Shebang Script is special. It's entry is only used for
# extensions, and files with those extensions have their shebang (#!) lines
# read to determine the real language of the file. Extensionless files are
# always treated this way.
#
# The language Text File is also special. It's treated as one big comment
# so you can put Natural Docs content in them without special symbols. Also,
# if you don't specify a package separator, ignored prefixes, or enum value
# behavior, it will copy those settings from the language that is used most
# in the source tree.
#
# Extensions: [extension] [extension] ...
# [Add/Replace] Extensions: [extension] [extension] ...
# Defines the file extensions of the language's source files. You can
# redefine extensions found in the main languages file. You can use * to
# mean any undefined extension.
#
# Shebang Strings: [string] [string] ...
# [Add/Replace] Shebang Strings: [string] [string] ...
# Defines a list of strings that can appear in the shebang (#!) line to
# designate that it's part of the language. You can redefine strings found
# in the main languages file.
#
# Ignore Prefixes in Index: [prefix] [prefix] ...
# [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ...
#
# Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ...
# [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ...
# Specifies prefixes that should be ignored when sorting symbols in an
# index. Can be specified in general or for a specific topic type.
#
#------------------------------------------------------------------------------
# For basic language support only:
#
# Line Comments: [symbol] [symbol] ...
# Defines a space-separated list of symbols that are used for line comments,
# if any.
#
# Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ...
# Defines a space-separated list of symbol pairs that are used for block
# comments, if any.
#
# Package Separator: [symbol]
# Defines the default package separator symbol. The default is a dot.
#
# [Topic Type] Prototype Enders: [symbol] [symbol] ...
# When defined, Natural Docs will attempt to get a prototype from the code
# immediately following the topic type. It stops when it reaches one of
# these symbols. Use \n for line breaks.
#
# Line Extender: [symbol]
# Defines the symbol that allows a prototype to span multiple lines if
# normally a line break would end it.
#
# Enum Values: [global|under type|under parent]
# Defines how enum values are referenced. The default is global.
# global - Values are always global, referenced as 'value'.
# under type - Values are under the enum type, referenced as
# 'package.enum.value'.
# under parent - Values are under the enum's parent, referenced as
# 'package.value'.
#
# Perl Package: [perl package]
# Specifies the Perl package used to fine-tune the language behavior in ways
# too complex to do in this file.
#
#------------------------------------------------------------------------------
# For full language support only:
#
# Full Language Support: [perl package]
# Specifies the Perl package that has the parsing routines necessary for full
# language support.
#
#-------------------------------------------------------------------------------
# The following languages are defined in the main file, if you'd like to alter
# them:
#
# Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python,
# PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile,
# ActionScript, ColdFusion, R, Fortran
# If you add a language that you think would be useful to other developers
# and should be included in Natural Docs by default, please e-mail it to
# languages [at] naturaldocs [dot] org.

473
doc_config/Menu.txt Normal file
View File

@@ -0,0 +1,473 @@
Format: 1.52
Title: OpenLayers
SubTitle: JavaScript Mapping Library
# You can add a footer to your documentation like this:
# Footer: [text]
# If you want to add a copyright notice, this would be the place to do it.
# You can add a timestamp to your documentation like one of these:
# Timestamp: Generated on month day, year
# Timestamp: Updated mm/dd/yyyy
# Timestamp: Last updated mon day
#
# m - One or two digit month. January is "1"
# mm - Always two digit month. January is "01"
# mon - Short month word. January is "Jan"
# month - Long month word. January is "January"
# d - One or two digit day. 1 is "1"
# dd - Always two digit day. 1 is "01"
# day - Day with letter extension. 1 is "1st"
# yy - Two digit year. 2006 is "06"
# yyyy - Four digit year. 2006 is "2006"
# year - Four digit year. 2006 is "2006"
# --------------------------------------------------------------------------
#
# Cut and paste the lines below to change the order in which your files
# appear on the menu. Don't worry about adding or removing files, Natural
# Docs will take care of that.
#
# You can further organize the menu by grouping the entries. Add a
# "Group: [name] {" line to start a group, and add a "}" to end it.
#
# You can add text and web links to the menu by adding "Text: [text]" and
# "Link: [name] ([URL])" lines, respectively.
#
# The formatting and comments are auto-generated, so don't worry about
# neatness when editing the file. Natural Docs will clean it up the next
# time it is run. When working with groups, just deal with the braces and
# forget about the indentation and comments.
#
# --------------------------------------------------------------------------
Group: OpenLayers {
File: OpenLayers (no auto-title, OpenLayers.js)
Group: BaseTypes {
File: Base Types (no auto-title, OpenLayers/BaseTypes.js)
File: Bounds (no auto-title, OpenLayers/BaseTypes/Bounds.js)
File: Class (no auto-title, OpenLayers/BaseTypes/Class.js)
File: Date (no auto-title, OpenLayers/BaseTypes/Date.js)
File: Element (no auto-title, OpenLayers/BaseTypes/Element.js)
File: LonLat (no auto-title, OpenLayers/BaseTypes/LonLat.js)
File: Pixel (no auto-title, OpenLayers/BaseTypes/Pixel.js)
File: Size (no auto-title, OpenLayers/BaseTypes/Size.js)
} # Group: BaseTypes
File: Console (no auto-title, OpenLayers/Console.js)
Group: Control {
File: Control (no auto-title, OpenLayers/Control.js)
File: ArgParser (no auto-title, OpenLayers/Control/ArgParser.js)
File: Attribution (no auto-title, OpenLayers/Control/Attribution.js)
File: Button (no auto-title, OpenLayers/Control/Button.js)
File: DragFeature (no auto-title, OpenLayers/Control/DragFeature.js)
File: DragPan (no auto-title, OpenLayers/Control/DragPan.js)
File: DrawFeature (no auto-title, OpenLayers/Control/DrawFeature.js)
File: EditingToolbar (no auto-title, OpenLayers/Control/EditingToolbar.js)
File: Geolocate (no auto-title, OpenLayers/Control/Geolocate.js)
File: GetFeature (no auto-title, OpenLayers/Control/GetFeature.js)
File: Graticule (no auto-title, OpenLayers/Control/Graticule.js)
File: KeyboardDefaults (no auto-title, OpenLayers/Control/KeyboardDefaults.js)
File: LayerSwitcher (no auto-title, OpenLayers/Control/LayerSwitcher.js)
File: Measure (no auto-title, OpenLayers/Control/Measure.js)
File: ModifyFeature (no auto-title, OpenLayers/Control/ModifyFeature.js)
File: MousePosition (no auto-title, OpenLayers/Control/MousePosition.js)
File: Navigation (no auto-title, OpenLayers/Control/Navigation.js)
File: NavigationHistory (no auto-title, OpenLayers/Control/NavigationHistory.js)
File: NavToolbar (no auto-title, OpenLayers/Control/NavToolbar.js)
File: OverviewMap (no auto-title, OpenLayers/Control/OverviewMap.js)
File: Pan (no auto-title, OpenLayers/Control/Pan.js)
File: Panel (no auto-title, OpenLayers/Control/Panel.js)
File: PanPanel (no auto-title, OpenLayers/Control/PanPanel.js)
File: PanZoom (no auto-title, OpenLayers/Control/PanZoom.js)
File: PanZoomBar (no auto-title, OpenLayers/Control/PanZoomBar.js)
File: Permalink (no auto-title, OpenLayers/Control/Permalink.js)
File: PinchZoom (no auto-title, OpenLayers/Control/PinchZoom.js)
File: Scale (no auto-title, OpenLayers/Control/Scale.js)
File: ScaleLine (no auto-title, OpenLayers/Control/ScaleLine.js)
File: SelectFeature (no auto-title, OpenLayers/Control/SelectFeature.js)
File: SLDSelect (no auto-title, OpenLayers/Control/SLDSelect.js)
File: Snapping (no auto-title, OpenLayers/Control/Snapping.js)
File: Split (no auto-title, OpenLayers/Control/Split.js)
File: TouchNavigation (no auto-title, OpenLayers/Control/TouchNavigation.js)
File: TransformFeature (no auto-title, OpenLayers/Control/TransformFeature.js)
File: WMSGetFeatureInfo (no auto-title, OpenLayers/Control/WMSGetFeatureInfo.js)
File: WMTSGetFeatureInfo (no auto-title, OpenLayers/Control/WMTSGetFeatureInfo.js)
File: ZoomBox (no auto-title, OpenLayers/Control/ZoomBox.js)
File: ZoomIn (no auto-title, OpenLayers/Control/ZoomIn.js)
File: ZoomOut (no auto-title, OpenLayers/Control/ZoomOut.js)
File: ZoomPanel (no auto-title, OpenLayers/Control/ZoomPanel.js)
File: ZoomToMaxExtent (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js)
} # Group: Control
File: Events (no auto-title, OpenLayers/Events.js)
Group: Feature {
File: Feature (no auto-title, OpenLayers/Feature.js)
File: Vector (no auto-title, OpenLayers/Feature/Vector.js)
} # Group: Feature
Group: Filter {
File: Filter (no auto-title, OpenLayers/Filter.js)
File: Comparison (no auto-title, OpenLayers/Filter/Comparison.js)
File: FeatureId (no auto-title, OpenLayers/Filter/FeatureId.js)
File: Function (no auto-title, OpenLayers/Filter/Function.js)
File: Logical (no auto-title, OpenLayers/Filter/Logical.js)
File: Spatial (no auto-title, OpenLayers/Filter/Spatial.js)
} # Group: Filter
Group: Format {
File: Format (no auto-title, OpenLayers/Format.js)
File: ArcXML (no auto-title, OpenLayers/Format/ArcXML.js)
File: ArcXML.Features (no auto-title, OpenLayers/Format/ArcXML/Features.js)
File: Atom (no auto-title, OpenLayers/Format/Atom.js)
File: Context (no auto-title, OpenLayers/Format/Context.js)
File: CQL (no auto-title, OpenLayers/Format/CQL.js)
File: CSWGetDomain (no auto-title, OpenLayers/Format/CSWGetDomain.js)
File: CSWGetDomain.v2_0_2 (no auto-title, OpenLayers/Format/CSWGetDomain/v2_0_2.js)
File: CSWGetRecords (no auto-title, OpenLayers/Format/CSWGetRecords.js)
File: CSWGetRecords.v2_0_2 (no auto-title, OpenLayers/Format/CSWGetRecords/v2_0_2.js)
Group: Filter {
File: Filter (no auto-title, OpenLayers/Format/Filter.js)
File: v1 (no auto-title, OpenLayers/Format/Filter/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/Filter/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/Filter/v1_1_0.js)
} # Group: Filter
Group: GML {
File: GML (no auto-title, OpenLayers/Format/GML.js)
File: Base (no auto-title, OpenLayers/Format/GML/Base.js)
File: v2 (no auto-title, OpenLayers/Format/GML/v2.js)
File: v3 (no auto-title, OpenLayers/Format/GML/v3.js)
} # Group: GML
Group: SLD {
File: SLD (no auto-title, OpenLayers/Format/SLD.js)
File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js)
} # Group: SLD
File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js)
File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js)
File: GPX (no auto-title, OpenLayers/Format/GPX.js)
File: JSON (no auto-title, OpenLayers/Format/JSON.js)
File: KML (no auto-title, OpenLayers/Format/KML.js)
File: OGCExceptionReport (no auto-title, OpenLayers/Format/OGCExceptionReport.js)
File: OSM (no auto-title, OpenLayers/Format/OSM.js)
Group: OWSCommon {
File: OWSCommon (no auto-title, OpenLayers/Format/OWSCommon.js)
File: v1 (no auto-title, OpenLayers/Format/OWSCommon/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_1_0.js)
} # Group: OWSCommon
File: OWSContext (no auto-title, OpenLayers/Format/OWSContext.js)
File: OWSContext.v0_3_1 (no auto-title, OpenLayers/Format/OWSContext/v0_3_1.js)
File: QueryStringFilter (no auto-title, OpenLayers/Format/QueryStringFilter.js)
File: SOSCapabilities (no auto-title, OpenLayers/Format/SOSCapabilities.js)
File: SOSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/SOSCapabilities/v1_0_0.js)
File: SOSGetFeatureOfInterest (no auto-title, OpenLayers/Format/SOSGetFeatureOfInterest.js)
File: SOSGetObservation (no auto-title, OpenLayers/Format/SOSGetObservation.js)
File: Text (no auto-title, OpenLayers/Format/Text.js)
File: VersionedOGC (OpenLayers/Format/XML/VersionedOGC.js)
File: WCSGetCoverage version 1.1.0 (no auto-title, OpenLayers/Format/WCSGetCoverage.js)
File: WFS (no auto-title, OpenLayers/Format/WFS.js)
Group: WFSCapabilities {
File: WFSCapabilities (no auto-title, OpenLayers/Format/WFSCapabilities.js)
File: v1 (no auto-title, OpenLayers/Format/WFSCapabilities/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_1_0.js)
} # Group: WFSCapabilities
Group: WFST {
File: WFST (no auto-title, OpenLayers/Format/WFST.js)
File: v1 (no auto-title, OpenLayers/Format/WFST/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/WFST/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WFST/v1_1_0.js)
} # Group: WFST
Group: WMC {
File: WMC (no auto-title, OpenLayers/Format/WMC.js)
File: v1 (no auto-title, OpenLayers/Format/WMC/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Format/WMC/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WMC/v1_1_0.js)
} # Group: WMC
Group: WMSCapabilities {
File: WMSCapabilities (no auto-title, OpenLayers/Format/WMSCapabilities.js)
File: v1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1.js)
File: v1_1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1.js)
File: v1_1_0 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_0.js)
File: v1_1_1 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_1.js)
File: v1_3 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_3.js)
File: v1_3_0 (no auto-title, OpenLayers/Format/WMSCapabilities/v1_3_0.js)
File: WMSCapabilities/v1_1_1_WMSC (no auto-title, OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js)
} # Group: WMSCapabilities
Group: WMSDescribeLayer {
File: WMSDescribeLayer (no auto-title, OpenLayers/Format/WMSDescribeLayer.js)
File: v1_1 (no auto-title, OpenLayers/Format/WMSDescribeLayer/v1_1.js)
} # Group: WMSDescribeLayer
File: WFSDescribeFeatureType (no auto-title, OpenLayers/Format/WFSDescribeFeatureType.js)
File: WKT (no auto-title, OpenLayers/Format/WKT.js)
File: WMSGetFeatureInfo (no auto-title, OpenLayers/Format/WMSGetFeatureInfo.js)
File: WMTSCapabilities (no auto-title, OpenLayers/Format/WMTSCapabilities.js)
File: WMTSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WMTSCapabilities/v1_0_0.js)
File: WPSCapabilities (no auto-title, OpenLayers/Format/WPSCapabilities.js)
File: WPSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WPSCapabilities/v1_0_0.js)
File: WPSDescribeProcess (no auto-title, OpenLayers/Format/WPSDescribeProcess.js)
File: WPSExecute version 1.0.0 (no auto-title, OpenLayers/Format/WPSExecute.js)
File: XLS (no auto-title, OpenLayers/Format/XLS.js)
File: XLS.v1 (no auto-title, OpenLayers/Format/XLS/v1.js)
File: XLS.v1_1_0 (no auto-title, OpenLayers/Format/XLS/v1_1_0.js)
File: XML (no auto-title, OpenLayers/Format/XML.js)
} # Group: Format
Group: Geometry {
File: Geometry (no auto-title, OpenLayers/Geometry.js)
File: Collection (no auto-title, OpenLayers/Geometry/Collection.js)
File: Curve (no auto-title, OpenLayers/Geometry/Curve.js)
File: LinearRing (no auto-title, OpenLayers/Geometry/LinearRing.js)
File: LineString (no auto-title, OpenLayers/Geometry/LineString.js)
File: MultiLineString (no auto-title, OpenLayers/Geometry/MultiLineString.js)
File: MultiPoint (no auto-title, OpenLayers/Geometry/MultiPoint.js)
File: MultiPolygon (no auto-title, OpenLayers/Geometry/MultiPolygon.js)
File: Point (no auto-title, OpenLayers/Geometry/Point.js)
File: Polygon (no auto-title, OpenLayers/Geometry/Polygon.js)
} # Group: Geometry
Group: Handler {
File: Handler (no auto-title, OpenLayers/Handler.js)
File: Box (no auto-title, OpenLayers/Handler/Box.js)
File: Click (no auto-title, OpenLayers/Handler/Click.js)
File: Drag (no auto-title, OpenLayers/Handler/Drag.js)
File: Feature (no auto-title, OpenLayers/Handler/Feature.js)
File: Hover (no auto-title, OpenLayers/Handler/Hover.js)
File: Keyboard (no auto-title, OpenLayers/Handler/Keyboard.js)
File: MouseWheel (no auto-title, OpenLayers/Handler/MouseWheel.js)
File: Path (no auto-title, OpenLayers/Handler/Path.js)
File: Pinch (no auto-title, OpenLayers/Handler/Pinch.js)
File: Point (no auto-title, OpenLayers/Handler/Point.js)
File: Polygon (no auto-title, OpenLayers/Handler/Polygon.js)
File: RegularPolygon (no auto-title, OpenLayers/Handler/RegularPolygon.js)
} # Group: Handler
File: Icon (no auto-title, OpenLayers/Icon.js)
File: Kinetic (no auto-title, OpenLayers/Kinetic.js)
Group: Lang {
File: Lang (no auto-title, OpenLayers/Lang.js)
File: ar (no auto-title, OpenLayers/Lang/ar.js)
File: be-tarask (no auto-title, OpenLayers/Lang/be-tarask.js)
File: bg (no auto-title, OpenLayers/Lang/bg.js)
File: br (no auto-title, OpenLayers/Lang/br.js)
File: ca (no auto-title, OpenLayers/Lang/ca.js)
File: cs-CZ (no auto-title, OpenLayers/Lang/cs-CZ.js)
File: da-DK (no auto-title, OpenLayers/Lang/da-DK.js)
File: de (no auto-title, OpenLayers/Lang/de.js)
File: en (no auto-title, OpenLayers/Lang/en.js)
File: en-CA (no auto-title, OpenLayers/Lang/en-CA.js)
File: es (no auto-title, OpenLayers/Lang/es.js)
File: el (no auto-title, OpenLayers/Lang/el.js)
File: fi (no auto-title, OpenLayers/Lang/fi.js)
File: fr (no auto-title, OpenLayers/Lang/fr.js)
File: fur (no auto-title, OpenLayers/Lang/fur.js)
File: gl (no auto-title, OpenLayers/Lang/gl.js)
File: gsw (no auto-title, OpenLayers/Lang/gsw.js)
File: hr (no auto-title, OpenLayers/Lang/hr.js)
File: hsb (no auto-title, OpenLayers/Lang/hsb.js)
File: hu (no auto-title, OpenLayers/Lang/hu.js)
File: ia (no auto-title, OpenLayers/Lang/ia.js)
File: id (no auto-title, OpenLayers/Lang/id.js)
File: io (no auto-title, OpenLayers/Lang/io.js)
File: is (no auto-title, OpenLayers/Lang/is.js)
File: it (no auto-title, OpenLayers/Lang/it.js)
File: ja (no auto-title, OpenLayers/Lang/ja.js)
File: km (no auto-title, OpenLayers/Lang/km.js)
File: ksh (no auto-title, OpenLayers/Lang/ksh.js)
File: lt (no auto-title, OpenLayers/Lang/lt.js)
File: nds (no auto-title, OpenLayers/Lang/nds.js)
File: nb (no auto-title, OpenLayers/Lang/nb.js)
File: nl (no auto-title, OpenLayers/Lang/nl.js)
File: nn (no auto-title, OpenLayers/Lang/nn.js)
File: oc (no auto-title, OpenLayers/Lang/oc.js)
File: pl (no auto-title, OpenLayers/Lang/pl.js)
File: pt (no auto-title, OpenLayers/Lang/pt.js)
File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js)
File: ru (no auto-title, OpenLayers/Lang/ru.js)
File: sk (no auto-title, OpenLayers/Lang/sk.js)
File: sv-SE (no auto-title, OpenLayers/Lang/sv-SE.js)
File: te (no auto-title, OpenLayers/Lang/te.js)
File: vi (no auto-title, OpenLayers/Lang/vi.js)
File: zh-CN (no auto-title, OpenLayers/Lang/zh-CN.js)
File: zh-TW (no auto-title, OpenLayers/Lang/zh-TW.js)
} # Group: Lang
Group: Layer {
File: Layer (no auto-title, OpenLayers/Layer.js)
File: ArcGISCache.js (no auto-title, OpenLayers/Layer/ArcGISCache.js)
File: ArcGIS93Rest (no auto-title, OpenLayers/Layer/ArcGIS93Rest.js)
File: ArcIMS (no auto-title, OpenLayers/Layer/ArcIMS.js)
File: Bing (no auto-title, OpenLayers/Layer/Bing.js)
File: Boxes (no auto-title, OpenLayers/Layer/Boxes.js)
File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js)
File: FixedZoomLevels (no auto-title, OpenLayers/Layer/FixedZoomLevels.js)
File: GeoRSS (no auto-title, OpenLayers/Layer/GeoRSS.js)
File: Google (no auto-title, OpenLayers/Layer/Google.js)
File: Google.v3 (no auto-title, OpenLayers/Layer/Google/v3.js)
File: Grid (no auto-title, OpenLayers/Layer/Grid.js)
File: HTTPRequest (no auto-title, OpenLayers/Layer/HTTPRequest.js)
File: Image (no auto-title, OpenLayers/Layer/Image.js)
File: KaMap (no auto-title, OpenLayers/Layer/KaMap.js)
File: KaMapCache (no auto-title, OpenLayers/Layer/KaMapCache.js)
File: MapGuide (no auto-title, OpenLayers/Layer/MapGuide.js)
File: MapServer (no auto-title, OpenLayers/Layer/MapServer.js)
File: Markers (no auto-title, OpenLayers/Layer/Markers.js)
File: PointGrid (no auto-title, OpenLayers/Layer/PointGrid.js)
File: PointTrack (no auto-title, OpenLayers/Layer/PointTrack.js)
File: SphericalMercator (no auto-title, OpenLayers/Layer/SphericalMercator.js)
File: Text (no auto-title, OpenLayers/Layer/Text.js)
File: TileCache (no auto-title, OpenLayers/Layer/TileCache.js)
File: TMS (no auto-title, OpenLayers/Layer/TMS.js)
File: Vector (no auto-title, OpenLayers/Layer/Vector.js)
File: Vector.RootContainer (no auto-title, OpenLayers/Layer/Vector/RootContainer.js)
File: WMS (no auto-title, OpenLayers/Layer/WMS.js)
File: WMTS (no auto-title, OpenLayers/Layer/WMTS.js)
File: WorldWind (no auto-title, OpenLayers/Layer/WorldWind.js)
File: XYZ (no auto-title, OpenLayers/Layer/XYZ.js)
File: Zoomify (no auto-title, OpenLayers/Layer/Zoomify.js)
} # Group: Layer
File: Map (no auto-title, OpenLayers/Map.js)
Group: Marker {
File: Marker (no auto-title, OpenLayers/Marker.js)
File: Box (no auto-title, OpenLayers/Marker/Box.js)
} # Group: Marker
Group: Popup {
File: Popup (no auto-title, OpenLayers/Popup.js)
File: Anchored (no auto-title, OpenLayers/Popup/Anchored.js)
File: Framed (no auto-title, OpenLayers/Popup/Framed.js)
File: FramedCloud (no auto-title, OpenLayers/Popup/FramedCloud.js)
} # Group: Popup
File: Projection (no auto-title, OpenLayers/Projection.js)
Group: Protocol {
File: Protocol (no auto-title, OpenLayers/Protocol.js)
File: HTTP (no auto-title, OpenLayers/Protocol/HTTP.js)
Group: WFS {
File: WFS (no auto-title, OpenLayers/Protocol/WFS.js)
File: v1 (no auto-title, OpenLayers/Protocol/WFS/v1.js)
File: v1_0_0 (no auto-title, OpenLayers/Protocol/WFS/v1_0_0.js)
File: v1_1_0 (no auto-title, OpenLayers/Protocol/WFS/v1_1_0.js)
} # Group: WFS
File: Script (no auto-title, OpenLayers/Protocol/Script.js)
File: SOS.DEFAULTS (no auto-title, OpenLayers/Protocol/SOS.js)
File: SOS.v1_0_0 (no auto-title, OpenLayers/Protocol/SOS/v1_0_0.js)
} # Group: Protocol
Group: Renderer {
File: Renderer (no auto-title, OpenLayers/Renderer.js)
File: Canvas (no auto-title, OpenLayers/Renderer/Canvas.js)
File: ElementsIndexer (no auto-title, OpenLayers/Renderer/Elements.js)
File: SVG (no auto-title, OpenLayers/Renderer/SVG.js)
File: VML (no auto-title, OpenLayers/Renderer/VML.js)
} # Group: Renderer
Group: Request {
File: Request (no auto-title, OpenLayers/Request.js)
File: XMLHttpRequest (no auto-title, OpenLayers/Request/XMLHttpRequest.js)
} # Group: Request
File: Rule (no auto-title, OpenLayers/Rule.js)
File: SingleFile.js (no auto-title, OpenLayers/SingleFile.js)
Group: Strategy {
File: Strategy (no auto-title, OpenLayers/Strategy.js)
File: BBOX (no auto-title, OpenLayers/Strategy/BBOX.js)
File: Cluster (no auto-title, OpenLayers/Strategy/Cluster.js)
File: Filter (no auto-title, OpenLayers/Strategy/Filter.js)
File: Fixed (no auto-title, OpenLayers/Strategy/Fixed.js)
File: Paging (no auto-title, OpenLayers/Strategy/Paging.js)
File: Refresh (no auto-title, OpenLayers/Strategy/Refresh.js)
File: Save (no auto-title, OpenLayers/Strategy/Save.js)
} # Group: Strategy
File: Style (no auto-title, OpenLayers/Style.js)
File: Style2 (no auto-title, OpenLayers/Style2.js)
File: StyleMap (no auto-title, OpenLayers/StyleMap.js)
Group: Symbolizer {
File: Symbolizer (no auto-title, OpenLayers/Symbolizer.js)
File: Line (no auto-title, OpenLayers/Symbolizer/Line.js)
File: Point (no auto-title, OpenLayers/Symbolizer/Point.js)
File: Polygon (no auto-title, OpenLayers/Symbolizer/Polygon.js)
File: Raster (no auto-title, OpenLayers/Symbolizer/Raster.js)
File: Text (no auto-title, OpenLayers/Symbolizer/Text.js)
} # Group: Symbolizer
Group: Tile {
File: Tile (no auto-title, OpenLayers/Tile.js)
File: Image (no auto-title, OpenLayers/Tile/Image.js)
File: Image.IFrame (no auto-title, OpenLayers/Tile/Image/IFrame.js)
} # Group: Tile
File: Tween (no auto-title, OpenLayers/Tween.js)
File: Util (no auto-title, OpenLayers/Util.js)
File: Spherical (no auto-title, OpenLayers/Spherical.js)
File: Deprecated (no auto-title, deprecated.js)
} # Group: OpenLayers
Group: Index {
Index: Everything
Class Index: Classes
Constant Index: Constants
Function Index: Functions
Property Index: Properties
File Index: Files
Constructor Index: Constructor
} # Group: Index

20
doc_config/OL.css Normal file
View File

@@ -0,0 +1,20 @@
p {
text-indent: 0; margin-bottom: 1em;
}
.MGroup {
font-variant: normal;
margin: 0.4em 0 0em 10px
}
.MTitle {
font-variant: normal;
}
.CGroup .CTitle {
font-variant: normal;
}
.SGroup .SEntry {
font-variant: normal;
}

102
doc_config/Topics.txt Normal file
View File

@@ -0,0 +1,102 @@
Format: 1.52
# This is the Natural Docs topics file for this project. If you change anything
# here, it will apply to THIS PROJECT ONLY. If you'd like to change something
# for all your projects, edit the Topics.txt in Natural Docs' Config directory
# instead.
# If you'd like to prevent keywords from being recognized by Natural Docs, you
# can do it like this:
# Ignore Keywords: [keyword], [keyword], ...
#
# Or you can use the list syntax like how they are defined:
# Ignore Keywords:
# [keyword]
# [keyword], [plural keyword]
# ...
#-------------------------------------------------------------------------------
# SYNTAX:
#
# Topic Type: [name]
# Alter Topic Type: [name]
# Creates a new topic type or alters one from the main file. Each type gets
# its own index and behavior settings. Its name can have letters, numbers,
# spaces, and these charaters: - / . '
#
# Plural: [name]
# Sets the plural name of the topic type, if different.
#
# Keywords:
# [keyword]
# [keyword], [plural keyword]
# ...
# Defines or adds to the list of keywords for the topic type. They may only
# contain letters, numbers, and spaces and are not case sensitive. Plural
# keywords are used for list topics. You can redefine keywords found in the
# main topics file.
#
# Index: [yes|no]
# Whether the topics get their own index. Defaults to yes. Everything is
# included in the general index regardless of this setting.
#
# Scope: [normal|start|end|always global]
# How the topics affects scope. Defaults to normal.
# normal - Topics stay within the current scope.
# start - Topics start a new scope for all the topics beneath it,
# like class topics.
# end - Topics reset the scope back to global for all the topics
# beneath it.
# always global - Topics are defined as global, but do not change the scope
# for any other topics.
#
# Class Hierarchy: [yes|no]
# Whether the topics are part of the class hierarchy. Defaults to no.
#
# Page Title If First: [yes|no]
# Whether the topic's title becomes the page title if it's the first one in
# a file. Defaults to no.
#
# Break Lists: [yes|no]
# Whether list topics should be broken into individual topics in the output.
# Defaults to no.
#
# Can Group With: [type], [type], ...
# Defines a list of topic types that this one can possibly be grouped with.
# Defaults to none.
#-------------------------------------------------------------------------------
# The following topics are defined in the main file, if you'd like to alter
# their behavior or add keywords:
#
# Generic, Class, Interface, Section, File, Group, Function, Variable,
# Property, Type, Constant, Enumeration, Event, Delegate, Macro,
# Database, Database Table, Database View, Database Index, Database
# Cursor, Database Trigger, Cookie, Build Target
# If you add something that you think would be useful to other developers
# and should be included in Natural Docs by default, please e-mail it to
# topics [at] naturaldocs [dot] org.
Topic Type: Constructor
Class Hierarchy: Yes
Keywords:
constructor
initialize
Alter Topic Type: Function
Add Keywords:
apimethod
apifunction
Alter Topic Type: Property
Add Keywords:
apiproperty

57
examples/KMLParser.html Normal file
View File

@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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>
<script type="text/javascript">
function parseData(req) {
g = new OpenLayers.Format.KML({extractStyles: true});
html = "";
features = g.read(req.responseText);
for(var feat in features) {
html += "Feature: Geometry: "+ features[feat].geometry+",";
html += "<ul>";
for (var j in features[feat].attributes) {
html += "<li>Attribute "+j+":"+features[feat].attributes[j]+"</li>";
}
html += "</ul>";
html += "<ul>";
for (var j in features[feat].style) {
html += "<li>Style "+j+":"+features[feat].style[j]+"</li>";
}
html += "</ul>"
}
document.getElementById('output').innerHTML = html;
}
function load() {
OpenLayers.Request.GET({
url: "kml/lines.kml",
success: parseData
});
}
</script>
</head>
<body onload="load()">
<h1 id="title">KML Parser Example</h1>
<div id="tags">
KML, parsing, format
</div>
<p id="shortdesc">
Demonstrate the operation of the KML parser.
</p>
<div id="output"></div>
<div id="docs">
<p>This script reads data from a KML file and parses out the
coordinates, appending them to a HTML string with markup tags.
This markup is dumped to an element in the page.</p>
</div>
</body>
</html>

202
examples/SLDSelect.html Normal file
View File

@@ -0,0 +1,202 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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: 512px; height: 256px; 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

@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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>
<script type="text/javascript">
function parseData(req) {
format = new OpenLayers.Format.WMSDescribeLayer();
html = "<br>";
resp = format.read(req.responseText);
var layerDescriptions = resp.layerDescriptions;
for(var i = 0; i < layerDescriptions.length; i++) {
html += "Layer: typeName: "+layerDescriptions[i].typeName+",";
html += "<ul>";
html += "<li>owsURL: "+layerDescriptions[i].owsURL+"</li>";
html += "<li>owsType: "+layerDescriptions[i].owsType+"</li>";
html += "</ul>"
}
document.getElementById('output').innerHTML = html;
}
function load() {
OpenLayers.Request.GET({
url: "xml/wmsdescribelayer.xml",
success: parseData
});
}
</script>
</head>
<body onload="load()">
<h1 id="title">WMSDescribeLayer Parser Example</h1>
<div id="tags">
wmsdescribelayer, parser, cleanup
</div>
<p id="shortdesc">
Demonstrate the operation of the WMSDescribeLayer parser.
</p>
<div id="output"></div>
<div id="docs">
<p>This script reads data from a file and parses out the coordinates,
appending them to a HTML string with markup tags. This markup is
dumped to an element in the page.</p>
</div>
</body>
</html>

100
examples/accelerometer.html Normal file
View File

@@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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

@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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>Accessible Custom Click 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">
<style type="text/css">
a {
text-decoration: none;
font-size: 1.2em;
}
a em {
font-style: normal;
font-weight: normal;
text-decoration: underline;
}
a:hover {
text-decoration: underline;
}
a.api {
font-size:1em;
text-decoration:underline;
}
a.accesskey {
color: white;
}
a.accesskey:focus {
color: #436976;
}
a.zoom {
padding-right: 20px;
}
</style>
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script src="accessible-click-control.js"></script>
</head>
<body onload="init()">
<h1 id="title">An accessible click control implementation</h1>
<div id="tags">
click, control, accessibility
</div>
<a class="accesskey"
href=""
accesskey="1"
onclick="document.getElementById('map').focus();return false;">
Jump to map
</a>
<div id="map" class="smallmap" tabindex="0"></div>
<p id="desc">
Demonstrate the KeyboardDefaults control as well as a control that
allows clicking on the map using the keyboard.
First focus the map (using tab key or mouse), then press the 'i'
key to activate the query control. You can then move the point
using arrow keys. Press 'RETURN' to get the coordinate. Press 'i'
again to deactivate the control.
</p>
</body>
</html>

View File

@@ -0,0 +1,199 @@
var map, navigationControl, queryControl;
function init(){
map = new OpenLayers.Map('map', {controls: []});
var layer = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'}
);
map.addLayers([layer]);
navigationControl = new OpenLayers.Control.KeyboardDefaults({
observeElement: 'map'
});
map.addControl(navigationControl);
queryControl = new OpenLayers.Control.KeyboardClick({
observeElement: 'map'
});
map.addControl(queryControl);
map.zoomToMaxExtent();
}
/**
* Class: OpenLayers.Control.KeyboardClick
*
* A custom control that (a) adds a vector point that can be moved using the
* arrow keys of the keyboard, and (b) displays a browser alert window when the
* RETURN key is pressed. The control can be activated/deactivated using the
* "i" key. When activated the control deactivates any KeyboardDefaults control
* in the map so that the map is not moved when the arrow keys are pressed.
*
* This control relies on the OpenLayers.Handler.KeyboardPoint custom handler.
*/
OpenLayers.Control.KeyboardClick = OpenLayers.Class(OpenLayers.Control, {
initialize: function(options) {
OpenLayers.Control.prototype.initialize.apply(this, [options]);
var observeElement = this.observeElement || document;
this.handler = new OpenLayers.Handler.KeyboardPoint(this, {
done: this.onClick,
cancel: this.deactivate
}, {
observeElement: observeElement
});
OpenLayers.Event.observe(
observeElement,
"keydown",
OpenLayers.Function.bindAsEventListener(
function(evt) {
if (evt.keyCode == 73) { // "i"
if (this.active) {
this.deactivate();
} else {
this.activate();
}
}
},
this
)
);
},
onClick: function(geometry) {
alert("You clicked near " + geometry.x + " N, " +
geometry.y + " E");
},
activate: function() {
if(!OpenLayers.Control.prototype.activate.apply(this, arguments)) {
return false;
}
// deactivate any KeyboardDefaults control
var keyboardDefaults = this.map.getControlsByClass(
'OpenLayers.Control.KeyboardDefaults')[0];
if (keyboardDefaults) {
keyboardDefaults.deactivate();
}
return true;
},
deactivate: function() {
if(!OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {
return false;
}
// reactivate any KeyboardDefaults control
var keyboardDefaults = this.map.getControlsByClass(
'OpenLayers.Control.KeyboardDefaults')[0];
if (keyboardDefaults) {
keyboardDefaults.activate();
}
return true;
}
});
/**
* Class: OpenLayers.Handler.KeyboardPoint
*
* A custom handler that displays a vector point that can be moved
* using the arrow keys of the keyboard.
*/
OpenLayers.Handler.KeyboardPoint = OpenLayers.Class(OpenLayers.Handler, {
KEY_EVENTS: ["keydown"],
initialize: function(control, callbacks, options) {
OpenLayers.Handler.prototype.initialize.apply(this, arguments);
// cache the bound event listener method so it can be unobserved later
this.eventListener = OpenLayers.Function.bindAsEventListener(
this.handleKeyEvent, this
);
},
activate: function() {
if(!OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
return false;
}
this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME);
this.map.addLayer(this.layer);
this.observeElement = this.observeElement || document;
for (var i=0, len=this.KEY_EVENTS.length; i<len; i++) {
OpenLayers.Event.observe(
this.observeElement, this.KEY_EVENTS[i], this.eventListener);
}
if(!this.point) {
this.createFeature();
}
return true;
},
deactivate: function() {
if (!OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
return false;
}
for (var i=0, len=this.KEY_EVENTS.length; i<len; i++) {
OpenLayers.Event.stopObserving(
this.observeElement, this.KEY_EVENTS[i], this.eventListener);
}
this.map.removeLayer(this.layer);
this.destroyFeature();
return true;
},
handleKeyEvent: function (evt) {
switch(evt.keyCode) {
case OpenLayers.Event.KEY_LEFT:
this.modifyFeature(-3, 0);
break;
case OpenLayers.Event.KEY_RIGHT:
this.modifyFeature(3, 0);
break;
case OpenLayers.Event.KEY_UP:
this.modifyFeature(0, 3);
break;
case OpenLayers.Event.KEY_DOWN:
this.modifyFeature(0, -3);
break;
case OpenLayers.Event.KEY_RETURN:
this.callback('done', [this.point.geometry.clone()]);
break;
case OpenLayers.Event.KEY_ESC:
this.callback('cancel');
break;
}
},
modifyFeature: function(lon, lat) {
if(!this.point) {
this.createFeature();
}
var resolution = this.map.getResolution();
this.point.geometry.x = this.point.geometry.x + lon * resolution;
this.point.geometry.y = this.point.geometry.y + lat * resolution;
this.callback("modify", [this.point.geometry, this.point, false]);
this.point.geometry.clearBounds();
this.drawFeature();
},
createFeature: function() {
var center = this.map.getCenter();
var geometry = new OpenLayers.Geometry.Point(
center.lon, center.lat
);
this.point = new OpenLayers.Feature.Vector(geometry);
this.callback("create", [this.point.geometry, this.point]);
this.point.geometry.clearBounds();
this.layer.addFeatures([this.point], {silent: true});
},
destroyFeature: function() {
this.layer.destroyFeatures([this.point]);
this.point = null;
},
drawFeature: function() {
this.layer.drawFeature(this.point, this.style);
}
});

View File

@@ -0,0 +1,130 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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 and accessible panel</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">
.olControlPanel button {
position: relative;
display: block;
margin: 2px;
border: 1px solid;
padding: 0 5px;
border-radius: 4px;
height: 35px;
background-color: white;
float: left;
overflow: visible; /* needed to remove padding from buttons in IE */
}
.olControlPanel button span {
padding-left: 25px;
}
.olControlPanel button span:first-child {
padding-left: 0;
display: block;
position: absolute;
left: 2px;
}
.olControlPanel .olControlDrawFeatureItemActive span:first-child {
background-image: url("../theme/default/img/draw_line_on.png");
height: 22px;
width: 24px;
top: 5px;
}
.olControlPanel .olControlDrawFeatureItemInactive span:first-child {
background-image: url("../theme/default/img/draw_line_off.png");
height: 22px;
width: 24px;
top: 5px;
}
.olControlPanel .olControlZoomBoxItemInactive span:first-child {
background-image: url("../img/drag-rectangle-off.png");
height: 29px;
width: 29px;
top: 2px;
}
.olControlPanel .olControlZoomBoxItemActive span:first-child {
background-image: url("../img/drag-rectangle-on.png");
height: 29px;
width: 29px;
top: 2px;
}
.olControlPanel .olControlZoomToMaxExtentItemInactive span:first-child {
background-image: url("../img/zoom-world-mini.png");
height: 18px;
width: 18px;
top: 8px;
}
.olControlPanel .navHistory span:first-child {
background-image: url("../theme/default/img/navigation_history.png");
height: 24px;
width: 24px;
top: 4px;
}
.olControlPanel .navHistoryPreviousItemActive span:first-child {
background-position: 0 0;
}
.olControlPanel .navHistoryPreviousItemInactive span:first-child {
background-position: 0 -24px;
}
.olControlPanel .navHistoryNextItemActive span:first-child {
background-position: -24px 0;
}
.olControlPanel .navHistoryNextItemInactive span:first-child {
background-position: -24px -24px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script src="accessible-panel.js"></script>
</head>
<body onload="init()">
<h1 id="title">Custom and accessible panel</h1>
<div id="tags">
panels, CSS, style, accessibility, button
</div>
<p id="shortdesc">
Create a custom and accessible panel, styled entirely with
CSS.
</p>
<div id="panel"></div>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>An accessible panel:
<ul>
<li>The buttons are actual HTML buttons. You can therefore
use the TAB key to give the focus to the panel's buttons, and the "ENTER"
key to activate or trigger the corresponding control.</li>
<li>The buttons include text and titles (displayed when a button
is hovered).</li>
<li>If you remove colors from the page (for example using FireFox's <a
href="https://addons.mozilla.org/en-US/firefox/addon/no-color/">No
Color extension</a>) the buttons are still visible, and
accessible using the keyboard.</li>
</ul>
</p>
<p>By default a panel creates buttons as divs. In this example the
<code>createControlMarkup</code> panel function is overridden to create
a more accessible markup for the buttons. See the <a
href="accessible-panel.js" target="_blank"> accessible-panel.js
source</a> to see how this is done.</p>
<p>Note: in IE 8, when a button is pressed its content shifts by 1 pixel.
This is a <a
href="http://labs.findsubstance.com/2009/05/21/ie8-form-button-with-background-image-on-click-css-bug/">known
IE8 bug</a>, with known workarounds. No workaround is applied in this
example though.</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,64 @@
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init() {
map = new OpenLayers.Map( 'map', { controls: [] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
vlayer = new OpenLayers.Layer.Vector( "Editable" );
map.addLayer(vlayer);
zb = new OpenLayers.Control.ZoomBox({
title: "Zoom box: zoom clicking and dragging",
text: "Zoom"
});
var panel = new OpenLayers.Control.Panel({
defaultControl: zb,
createControlMarkup: function(control) {
var button = document.createElement('button'),
iconSpan = document.createElement('span'),
textSpan = document.createElement('span');
iconSpan.innerHTML = '&nbsp;';
button.appendChild(iconSpan);
if (control.text) {
textSpan.innerHTML = control.text;
}
button.appendChild(textSpan);
return button;
}
});
panel.addControls([
zb,
new OpenLayers.Control.DrawFeature(vlayer, OpenLayers.Handler.Path,
{title:'Draw a feature', text: 'Draw'}),
new OpenLayers.Control.ZoomToMaxExtent({
title:"Zoom to the max extent",
text: "World"
})
]);
nav = new OpenLayers.Control.NavigationHistory({
previousOptions: {
title: "Go to previous map position",
text: "Prev"
},
nextOptions: {
title: "Go to next map position",
text: "Next"
},
displayClass: "navHistory"
});
// parent control must be added to the map
map.addControl(nav);
panel.addControls([nav.next, nav.previous]);
map.addControl(panel);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}

167
examples/accessible.html Normal file
View File

@@ -0,0 +1,167 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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">
<style type="text/css">
table {
border: 1 px solid white;
padding: 0;
}
td {
text-align: center;
}
a {
text-decoration: none;
font-size: 1.2em;
}
a em {
font-style: normal;
font-weight: normal;
text-decoration: underline;
}
a:hover {
text-decoration: underline;
}
a.api {
font-size:1em;
text-decoration:underline;
}
a.accesskey {
color: white;
}
a.accesskey:focus {
color: #436976;
}
a.zoom {
padding-right: 20px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map = null;
function init(){
var options = {
controls: [
new OpenLayers.Control.KeyboardDefaults({
observeElement: 'map'
})
]
};
map = new OpenLayers.Map('map', options);
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0?",
{layers: 'basic'}
);
map.addLayer(wms);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h1 id="title">Accessible Example</h1>
<div id="tags">
keyboard, pan, panning, zoom, zooming, accesskey
</div>
<a class="accesskey"
href=""
accesskey="1"
onclick="document.getElementById('map').focus(); return false;">
Go to map
</a>
<p id="shortdesc">
Demonstrate the KeyboardDefaults control and how to use links
with Access Keys to navigate the map with the keyboard.
</p>
<a class="zoom"
href="javascript: void map.zoomIn();"
accesskey="i">
zoom <em>i</em>n</a>
<a class="zoom"
href="javascript: void map.zoomOut();"
accesskey="o">
zoom <em>o</em>ut</a>
<table>
<tbody>
<tr>
<td>&nbsp;</td>
<td>
<a href="javascript: void map.pan(0, -map.getSize().h / 4);"
accesskey="n">
pan <em>n</em>orth
</a>
</td>
</tr>
<tr>
<td>
<a href="javascript: void map.pan(-map.getSize().w / 4, 0);"
accesskey="w">
pan <em>w</em>est
</a>
</td>
<td id="map" class="smallmap" tabindex="0"></td>
<td>
<a href="javascript: void map.pan(map.getSize().w / 4, 0);"
accesskey="e">
pan <em>e</em>ast
</a>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<a href="javascript: void map.pan(0, map.getSize().h / 4);"
accesskey="s">
pan <em>s</em>outh
</a>
</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<div id="docs">
<p>Navigate the map in one of three ways:</p>
<ol>
<li>Use Access Key "1" (alt + 1) to focus the map element, and
use following keys to pan and zoom:
<ul>
<li>+ (zoom in)</li>
<li>- (zoom out)</li>
<li>up-arrow (pan north)</li>
<li>down-arrow (pan south)</li>
<li>left-arrow (pan east)</li>
<li>right-arrow (pan west)</li>
</ul>
See <a href=http://en.wikipedia.org/wiki/Access_key>wikipedia</a> for
more detail about Access Keys.
</li>
<li>Navigate to pan and zoom links using the "tab" key, and
press "enter" to pan and zoom</li>
<li>If Access Keys work for links in your browser, use:
<ul>
<li>i (zoom in)</li>
<li>o (zoom out)</li>
<li>n (pan north)</li>
<li>s (pan south)</li>
<li>e (pan east)</li>
<li>w (pan west)</li>
</ul>
</li>
</ol>
<p>
This is an example of using alternate methods to control panning and zooming. This approach uses map.pan() and map.zoom(). You'll note that to pan, additional math is necessary along with map.size() in order to set the distance to pan.
</div>
</body>
</html>

View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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="style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?v=3&amp;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, light
</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

@@ -0,0 +1,76 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init() {
map = new OpenLayers.Map({
div: "map",
allOverlays: true,
maxExtent: new OpenLayers.Bounds(
1549471.9221, 6403610.94, 1550001.32545, 6404015.8
)
});
// give the features some style
var styles = new OpenLayers.StyleMap({
"default": {
strokeWidth: 2
},
"select": {
strokeColor: "#0099cc",
strokeWidth: 4
}
});
// add rules from the above lookup table
styles.addUniqueValueRules("default", "RP_TYPE", {
10: {strokeColor: "#000000", strokeWidth: 2},
12: {strokeColor: "#222222", strokeWidth: 2},
14: {strokeColor: "#444444", strokeWidth: 2},
16: {strokeColor: "#666666", strokeWidth: 2},
18: {strokeColor: "#888888", strokeWidth: 2},
19: {strokeColor: "#666666", strokeWidth: 1}
});
var vectors = new OpenLayers.Layer.Vector("Lines", {
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "data/roads.json",
format: new OpenLayers.Format.GeoJSON()
}),
styleMap: styles
});
map.addLayer(vectors);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
<h1 id="title">OpenLayers Overlays Only Example</h1>
<div id="tags">
overlay, baselayer, light
</div>
<p id="shortdesc">
Demonstrates a map with overlays only.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
To create a map that allows any draw order with all layer types
and lets you set the visibility of any layer independently, set
the allOverlays property on the map to true.
</div>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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

@@ -0,0 +1,98 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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">
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer, running = false;
OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'delay': 200
},
initialize: function(options) {
this.handlerOptions = OpenLayers.Util.extend(
{}, this.defaultHandlerOptions
);
OpenLayers.Control.prototype.initialize.apply(
this, arguments
);
this.handler = new OpenLayers.Handler.Click(
this, {
'click': this.onClick
}, this.handlerOptions
);
},
onClick: function(evt) {
map.panTo(map.getLonLatFromPixel(evt.xy));
}
});
function init(){
map = new OpenLayers.Map('map', {numZoomLevels: 2});
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.zoomToMaxExtent();
var click = new OpenLayers.Control.Click();
map.addControl(click);
click.activate();
map.addControl(new OpenLayers.Control.OverviewMap());
map2 = new OpenLayers.Map('map2', {'panMethod': null, numZoomLevels: 2} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map2.addLayer(layer);
map2.zoomToMaxExtent();
}
function setCenterInterval() {
if (!running) {
setCenter();
running = setInterval('setCenter()', 500);
} else {
clearInterval(running);
running = false;
}
}
function setCenter() {
var lon = Math.random() * 360 - 180;
var lat = Math.random() * 180 - 90;
var lonlat = new OpenLayers.LonLat(lon, lat);
map.panTo(lonlat);
}
</script>
</head>
<body onload="init()">
<h1 id="title">map.panTo Example</h1>
<div id="tags">
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">
<p>This is an example of transition effects. If the new random center is in the current extent, the map will pan smoothly. <br>
The random selection will continue until you press it again. Additionally, you can single click in the map to pan smoothly
to that area, or use the pan control to pan smoothly.
</p>
</div>
<button onclick="setCenterInterval()">Start/stop random recenter</button>
<div id="map2" class="smallmap"></div>
<div>
<p>To turn off Animated Panning, create a map with an panMethod set to
null. </p>
</div>
</body>
</html>

View File

@@ -1,68 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<title>Animation example</title>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="./">OpenLayers 3 Examples</a>
<ul class="nav pull-right">
<li><iframe class="github-watch-button" src="http://ghbtns.com/github-btn.html?user=openlayers&repo=ol3&type=watch&count=true"
allowtransparency="true" frameborder="0" scrolling="0" height="20" width="90"></iframe></li>
<li><a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-hashtags="openlayers">&nbsp;</a></li>
<li><div class="g-plusone-wrapper"><div class="g-plusone" data-size="medium" data-annotation="none"></div></div></li>
</ul>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div id="map" class="map"></div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<button id="rotate-left"><i class="icon-arrow-left"></i></button>
<button id="rotate-right"><i class="icon-arrow-right"></i></button>
<button id="pan-to-london">Pan to London</button>
<button id="elastic-to-moscow">Elastic to Moscow</button>
<button id="bounce-to-istanbul">Bounce to Istanbul</button>
<button id="spin-to-rome">Spin to Rome</button>
<button id="fly-to-bern">Fly to Bern</button>
<button id="spiral-to-madrid">Spiral to Madrid</button>
</div>
</div>
<div class="row-fluid">
<div class="span4">
<h4 id="title">Animation example</h4>
<p id="shortdesc">Demonstrates animated pan, zoom, and rotation.</p>
<div id="docs">
<p>See the <a href="animation.js" target="_blank">animation.js source</a> to see how this is done.</p>
</div>
<div id="tags">animation</div>
</div>
</div>
</div>
<script src="loader.js?id=animation" type="text/javascript"></script>
<script src="../resources/social-links.js" type="text/javascript"></script>
</body>
</html>

View File

@@ -1,143 +0,0 @@
goog.require('ol.Map');
goog.require('ol.RendererHints');
goog.require('ol.View2D');
goog.require('ol.animation');
goog.require('ol.easing');
goog.require('ol.layer.TileLayer');
goog.require('ol.proj');
goog.require('ol.source.OSM');
var london = ol.proj.transform([-0.12755, 51.507222], 'EPSG:4326', 'EPSG:3857');
var moscow = ol.proj.transform([37.6178, 55.7517], 'EPSG:4326', 'EPSG:3857');
var istanbul = ol.proj.transform([28.9744, 41.0128], 'EPSG:4326', 'EPSG:3857');
var rome = ol.proj.transform([12.5, 41.9], 'EPSG:4326', 'EPSG:3857');
var bern = ol.proj.transform([7.4458, 46.95], 'EPSG:4326', 'EPSG:3857');
var madrid = ol.proj.transform([-3.683333, 40.4], 'EPSG:4326', 'EPSG:3857');
var view = new ol.View2D({
// the view's initial state
center: istanbul,
zoom: 6
});
var map = new ol.Map({
layers: [
new ol.layer.TileLayer({
preload: 4,
source: new ol.source.OSM()
})
],
renderers: ol.RendererHints.createFromQueryData(),
target: 'map',
view: view
});
var rotateLeft = document.getElementById('rotate-left');
rotateLeft.addEventListener('click', function() {
var rotateLeft = ol.animation.rotate({
duration: 2000,
rotation: -4 * Math.PI
});
map.addPreRenderFunction(rotateLeft);
}, false);
var rotateRight = document.getElementById('rotate-right');
rotateRight.addEventListener('click', function() {
var rotateRight = ol.animation.rotate({
duration: 2000,
rotation: 4 * Math.PI
});
map.addPreRenderFunction(rotateRight);
}, false);
var panToLondon = document.getElementById('pan-to-london');
panToLondon.addEventListener('click', function() {
var pan = ol.animation.pan({
duration: 2000,
source: view.getCenter()
});
map.addPreRenderFunction(pan);
view.setCenter(london);
}, false);
var elasticToMoscow = document.getElementById('elastic-to-moscow');
elasticToMoscow.addEventListener('click', function() {
var pan = ol.animation.pan({
duration: 2000,
easing: ol.easing.elastic,
source: view.getCenter()
});
map.addPreRenderFunction(pan);
view.setCenter(moscow);
}, false);
var bounceToIstanbul = document.getElementById('bounce-to-istanbul');
bounceToIstanbul.addEventListener('click', function() {
var pan = ol.animation.pan({
duration: 2000,
easing: ol.easing.bounce,
source: view.getCenter()
});
map.addPreRenderFunction(pan);
view.setCenter(istanbul);
}, false);
var spinToRome = document.getElementById('spin-to-rome');
spinToRome.addEventListener('click', function() {
var duration = 2000;
var start = +new Date();
var pan = ol.animation.pan({
duration: duration,
source: view.getCenter(),
start: start
});
var rotate = ol.animation.rotate({
duration: duration,
rotation: 2 * Math.PI,
start: start
});
map.addPreRenderFunctions([pan, rotate]);
view.setCenter(rome);
}, false);
var flyToBern = document.getElementById('fly-to-bern');
flyToBern.addEventListener('click', function() {
var duration = 2000;
var start = +new Date();
var pan = ol.animation.pan({
duration: duration,
source: view.getCenter(),
start: start
});
var bounce = ol.animation.bounce({
duration: duration,
resolution: 4 * view.getResolution(),
start: start
});
map.addPreRenderFunctions([pan, bounce]);
view.setCenter(bern);
}, false);
var spiralToMadrid = document.getElementById('spiral-to-madrid');
spiralToMadrid.addEventListener('click', function() {
var duration = 2000;
var start = +new Date();
var pan = ol.animation.pan({
duration: duration,
source: view.getCenter(),
start: start
});
var bounce = ol.animation.bounce({
duration: duration,
resolution: 2 * view.getResolution(),
start: start
});
var rotate = ol.animation.rotate({
duration: duration,
rotation: -4 * Math.PI,
start: start
});
map.addPreRenderFunctions([pan, bounce, rotate]);
view.setCenter(madrid);
}, false);

670
examples/animator.js Normal file
View File

@@ -0,0 +1,670 @@
/*
Animator.js 1.1.9
This library is released under the BSD license:
Copyright (c) 2006, Bernard Sumption. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer. Redistributions in binary
form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials
provided with the distribution. Neither the name BernieCode nor
the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
*/
// Applies a sequence of numbers between 0 and 1 to a number of subjects
// construct - see setOptions for parameters
function Animator(options) {
this.setOptions(options);
var _this = this;
this.timerDelegate = function(){_this.onTimerEvent()};
this.subjects = [];
this.target = 0;
this.state = 0;
this.lastTime = null;
};
Animator.prototype = {
// apply defaults
setOptions: function(options) {
this.options = Animator.applyDefaults({
interval: 20, // time between animation frames
duration: 400, // length of animation
onComplete: function(){},
onStep: function(){},
transition: Animator.tx.easeInOut
}, options);
},
// animate from the current state to provided value
seekTo: function(to) {
this.seekFromTo(this.state, to);
},
// animate from the current state to provided value
seekFromTo: function(from, to) {
this.target = Math.max(0, Math.min(1, to));
this.state = Math.max(0, Math.min(1, from));
this.lastTime = new Date().getTime();
if (!this.intervalId) {
this.intervalId = window.setInterval(this.timerDelegate, this.options.interval);
}
},
// animate from the current state to provided value
jumpTo: function(to) {
this.target = this.state = Math.max(0, Math.min(1, to));
this.propagate();
},
// seek to the opposite of the current target
toggle: function() {
this.seekTo(1 - this.target);
},
// add a function or an object with a method setState(state) that will be called with a number
// between 0 and 1 on each frame of the animation
addSubject: function(subject) {
this.subjects[this.subjects.length] = subject;
return this;
},
// remove all subjects
clearSubjects: function() {
this.subjects = [];
},
// forward the current state to the animation subjects
propagate: function() {
var value = this.options.transition(this.state);
for (var i=0; i<this.subjects.length; i++) {
if (this.subjects[i].setState) {
this.subjects[i].setState(value);
} else {
this.subjects[i](value);
}
}
},
// called once per frame to update the current state
onTimerEvent: function() {
var now = new Date().getTime();
var timePassed = now - this.lastTime;
this.lastTime = now;
var movement = (timePassed / this.options.duration) * (this.state < this.target ? 1 : -1);
if (Math.abs(movement) >= Math.abs(this.state - this.target)) {
this.state = this.target;
} else {
this.state += movement;
}
try {
this.propagate();
} finally {
this.options.onStep.call(this);
if (this.target == this.state) {
window.clearInterval(this.intervalId);
this.intervalId = null;
this.options.onComplete.call(this);
}
}
},
// shortcuts
play: function() {this.seekFromTo(0, 1)},
reverse: function() {this.seekFromTo(1, 0)},
// return a string describing this Animator, for debugging
inspect: function() {
var str = "#<Animator:\n";
for (var i=0; i<this.subjects.length; i++) {
str += this.subjects[i].inspect();
}
str += ">";
return str;
}
};
// merge the properties of two objects
Animator.applyDefaults = function(defaults, prefs) {
prefs = prefs || {};
var prop, result = {};
for (prop in defaults) result[prop] = prefs[prop] !== undefined ? prefs[prop] : defaults[prop];
return result;
};
// make an array from any object
Animator.makeArray = function(o) {
if (o == null) return [];
if (!o.length) return [o];
var result = [];
for (var i=0; i<o.length; i++) result[i] = o[i];
return result;
};
// convert a dash-delimited-property to a camelCaseProperty (c/o Prototype, thanks Sam!)
Animator.camelize = function(string) {
var oStringList = string.split('-');
if (oStringList.length == 1) return oStringList[0];
var camelizedString = string.indexOf('-') == 0
? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
: oStringList[0];
for (var i = 1, len = oStringList.length; i < len; i++) {
var s = oStringList[i];
camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
}
return camelizedString;
};
// syntactic sugar for creating CSSStyleSubjects
Animator.apply = function(el, style, options) {
if (style instanceof Array) {
return new Animator(options).addSubject(new CSSStyleSubject(el, style[0], style[1]));
}
return new Animator(options).addSubject(new CSSStyleSubject(el, style));
};
// make a transition function that gradually accelerates. pass a=1 for smooth
// gravitational acceleration, higher values for an exaggerated effect
Animator.makeEaseIn = function(a) {
return function(state) {
return Math.pow(state, a*2);
}
};
// as makeEaseIn but for deceleration
Animator.makeEaseOut = function(a) {
return function(state) {
return 1 - Math.pow(1 - state, a*2);
}
};
// make a transition function that, like an object with momentum being attracted to a point,
// goes past the target then returns
Animator.makeElastic = function(bounces) {
return function(state) {
state = Animator.tx.easeInOut(state);
return ((1-Math.cos(state * Math.PI * bounces)) * (1 - state)) + state;
}
};
// make an Attack Decay Sustain Release envelope that starts and finishes on the same level
//
Animator.makeADSR = function(attackEnd, decayEnd, sustainEnd, sustainLevel) {
if (sustainLevel == null) sustainLevel = 0.5;
return function(state) {
if (state < attackEnd) {
return state / attackEnd;
}
if (state < decayEnd) {
return 1 - ((state - attackEnd) / (decayEnd - attackEnd) * (1 - sustainLevel));
}
if (state < sustainEnd) {
return sustainLevel;
}
return sustainLevel * (1 - ((state - sustainEnd) / (1 - sustainEnd)));
}
};
// make a transition function that, like a ball falling to floor, reaches the target and/
// bounces back again
Animator.makeBounce = function(bounces) {
var fn = Animator.makeElastic(bounces);
return function(state) {
state = fn(state);
return state <= 1 ? state : 2-state;
}
};
// pre-made transition functions to use with the 'transition' option
Animator.tx = {
easeInOut: function(pos){
return ((-Math.cos(pos*Math.PI)/2) + 0.5);
},
linear: function(x) {
return x;
},
easeIn: Animator.makeEaseIn(1.5),
easeOut: Animator.makeEaseOut(1.5),
strongEaseIn: Animator.makeEaseIn(2.5),
strongEaseOut: Animator.makeEaseOut(2.5),
elastic: Animator.makeElastic(1),
veryElastic: Animator.makeElastic(3),
bouncy: Animator.makeBounce(1),
veryBouncy: Animator.makeBounce(3)
};
// animates a pixel-based style property between two integer values
function NumericalStyleSubject(els, property, from, to, units) {
this.els = Animator.makeArray(els);
if (property == 'opacity' && window.ActiveXObject) {
this.property = 'filter';
} else {
this.property = Animator.camelize(property);
}
this.from = parseFloat(from);
this.to = parseFloat(to);
this.units = units != null ? units : 'px';
}
NumericalStyleSubject.prototype = {
setState: function(state) {
var style = this.getStyle(state);
var visibility = (this.property == 'opacity' && state == 0) ? 'hidden' : '';
var j=0;
for (var i=0; i<this.els.length; i++) {
try {
this.els[i].style[this.property] = style;
} catch (e) {
// ignore fontWeight - intermediate numerical values cause exeptions in firefox
if (this.property != 'fontWeight') throw e;
}
if (j++ > 20) return;
}
},
getStyle: function(state) {
state = this.from + ((this.to - this.from) * state);
if (this.property == 'filter') return "alpha(opacity=" + Math.round(state*100) + ")";
if (this.property == 'opacity') return state;
return Math.round(state) + this.units;
},
inspect: function() {
return "\t" + this.property + "(" + this.from + this.units + " to " + this.to + this.units + ")\n";
}
};
// animates a colour based style property between two hex values
function ColorStyleSubject(els, property, from, to) {
this.els = Animator.makeArray(els);
this.property = Animator.camelize(property);
this.to = this.expandColor(to);
this.from = this.expandColor(from);
this.origFrom = from;
this.origTo = to;
}
ColorStyleSubject.prototype = {
// parse "#FFFF00" to [256, 256, 0]
expandColor: function(color) {
var hexColor, red, green, blue;
hexColor = ColorStyleSubject.parseColor(color);
if (hexColor) {
red = parseInt(hexColor.slice(1, 3), 16);
green = parseInt(hexColor.slice(3, 5), 16);
blue = parseInt(hexColor.slice(5, 7), 16);
return [red,green,blue]
}
if (window.DEBUG) {
alert("Invalid colour: '" + color + "'");
}
},
getValueForState: function(color, state) {
return Math.round(this.from[color] + ((this.to[color] - this.from[color]) * state));
},
setState: function(state) {
var color = '#'
+ ColorStyleSubject.toColorPart(this.getValueForState(0, state))
+ ColorStyleSubject.toColorPart(this.getValueForState(1, state))
+ ColorStyleSubject.toColorPart(this.getValueForState(2, state));
for (var i=0; i<this.els.length; i++) {
this.els[i].style[this.property] = color;
}
},
inspect: function() {
return "\t" + this.property + "(" + this.origFrom + " to " + this.origTo + ")\n";
}
};
// return a properly formatted 6-digit hex colour spec, or false
ColorStyleSubject.parseColor = function(string) {
var color = '#', match;
if(match = ColorStyleSubject.parseColor.rgbRe.exec(string)) {
var part;
for (var i=1; i<=3; i++) {
part = Math.max(0, Math.min(255, parseInt(match[i])));
color += ColorStyleSubject.toColorPart(part);
}
return color;
}
if (match = ColorStyleSubject.parseColor.hexRe.exec(string)) {
if(match[1].length == 3) {
for (var i=0; i<3; i++) {
color += match[1].charAt(i) + match[1].charAt(i);
}
return color;
}
return '#' + match[1];
}
return false;
};
// convert a number to a 2 digit hex string
ColorStyleSubject.toColorPart = function(number) {
if (number > 255) number = 255;
var digits = number.toString(16);
if (number < 16) return '0' + digits;
return digits;
};
ColorStyleSubject.parseColor.rgbRe = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i;
ColorStyleSubject.parseColor.hexRe = /^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
// Animates discrete styles, i.e. ones that do not scale but have discrete values
// that can't be interpolated
function DiscreteStyleSubject(els, property, from, to, threshold) {
this.els = Animator.makeArray(els);
this.property = Animator.camelize(property);
this.from = from;
this.to = to;
this.threshold = threshold || 0.5;
}
DiscreteStyleSubject.prototype = {
setState: function(state) {
var j=0;
for (var i=0; i<this.els.length; i++) {
this.els[i].style[this.property] = state <= this.threshold ? this.from : this.to;
}
},
inspect: function() {
return "\t" + this.property + "(" + this.from + " to " + this.to + " @ " + this.threshold + ")\n";
}
};
// animates between two styles defined using CSS.
// if style1 and style2 are present, animate between them, if only style1
// is present, animate between the element's current style and style1
function CSSStyleSubject(els, style1, style2) {
els = Animator.makeArray(els);
this.subjects = [];
if (els.length == 0) return;
var prop, toStyle, fromStyle;
if (style2) {
fromStyle = this.parseStyle(style1, els[0]);
toStyle = this.parseStyle(style2, els[0]);
} else {
toStyle = this.parseStyle(style1, els[0]);
fromStyle = {};
for (prop in toStyle) {
fromStyle[prop] = CSSStyleSubject.getStyle(els[0], prop);
}
}
// remove unchanging properties
var prop;
for (prop in fromStyle) {
if (fromStyle[prop] == toStyle[prop]) {
delete fromStyle[prop];
delete toStyle[prop];
}
}
// discover the type (numerical or colour) of each style
var prop, units, match, type, from, to;
for (prop in fromStyle) {
var fromProp = String(fromStyle[prop]);
var toProp = String(toStyle[prop]);
if (toStyle[prop] == null) {
if (window.DEBUG) alert("No to style provided for '" + prop + '"');
continue;
}
if (from = ColorStyleSubject.parseColor(fromProp)) {
to = ColorStyleSubject.parseColor(toProp);
type = ColorStyleSubject;
} else if (fromProp.match(CSSStyleSubject.numericalRe)
&& toProp.match(CSSStyleSubject.numericalRe)) {
from = parseFloat(fromProp);
to = parseFloat(toProp);
type = NumericalStyleSubject;
match = CSSStyleSubject.numericalRe.exec(fromProp);
var reResult = CSSStyleSubject.numericalRe.exec(toProp);
if (match[1] != null) {
units = match[1];
} else if (reResult[1] != null) {
units = reResult[1];
} else {
units = reResult;
}
} else if (fromProp.match(CSSStyleSubject.discreteRe)
&& toProp.match(CSSStyleSubject.discreteRe)) {
from = fromProp;
to = toProp;
type = DiscreteStyleSubject;
units = 0; // hack - how to get an animator option down to here
} else {
if (window.DEBUG) {
alert("Unrecognised format for value of "
+ prop + ": '" + fromStyle[prop] + "'");
}
continue;
}
this.subjects[this.subjects.length] = new type(els, prop, from, to, units);
}
}
CSSStyleSubject.prototype = {
// parses "width: 400px; color: #FFBB2E" to {width: "400px", color: "#FFBB2E"}
parseStyle: function(style, el) {
var rtn = {};
// if style is a rule set
if (style.indexOf(":") != -1) {
var styles = style.split(";");
for (var i=0; i<styles.length; i++) {
var parts = CSSStyleSubject.ruleRe.exec(styles[i]);
if (parts) {
rtn[parts[1]] = parts[2];
}
}
}
// else assume style is a class name
else {
var prop, value, oldClass;
oldClass = el.className;
el.className = style;
for (var i=0; i<CSSStyleSubject.cssProperties.length; i++) {
prop = CSSStyleSubject.cssProperties[i];
value = CSSStyleSubject.getStyle(el, prop);
if (value != null) {
rtn[prop] = value;
}
}
el.className = oldClass;
}
return rtn;
},
setState: function(state) {
for (var i=0; i<this.subjects.length; i++) {
this.subjects[i].setState(state);
}
},
inspect: function() {
var str = "";
for (var i=0; i<this.subjects.length; i++) {
str += this.subjects[i].inspect();
}
return str;
}
};
// get the current value of a css property,
CSSStyleSubject.getStyle = function(el, property){
var style;
if(document.defaultView && document.defaultView.getComputedStyle){
style = document.defaultView.getComputedStyle(el, "").getPropertyValue(property);
if (style) {
return style;
}
}
property = Animator.camelize(property);
if(el.currentStyle){
style = el.currentStyle[property];
}
return style || el.style[property]
};
CSSStyleSubject.ruleRe = /^\s*([a-zA-Z\-]+)\s*:\s*(\S(.+\S)?)\s*$/;
CSSStyleSubject.numericalRe = /^-?\d+(?:\.\d+)?(%|[a-zA-Z]{2})?$/;
CSSStyleSubject.discreteRe = /^\w+$/;
// required because the style object of elements isn't enumerable in Safari
/*
CSSStyleSubject.cssProperties = ['background-color','border','border-color','border-spacing',
'border-style','border-top','border-right','border-bottom','border-left','border-top-color',
'border-right-color','border-bottom-color','border-left-color','border-top-width','border-right-width',
'border-bottom-width','border-left-width','border-width','bottom','color','font-size','font-size-adjust',
'font-stretch','font-style','height','left','letter-spacing','line-height','margin','margin-top',
'margin-right','margin-bottom','margin-left','marker-offset','max-height','max-width','min-height',
'min-width','orphans','outline','outline-color','outline-style','outline-width','overflow','padding',
'padding-top','padding-right','padding-bottom','padding-left','quotes','right','size','text-indent',
'top','width','word-spacing','z-index','opacity','outline-offset'];*/
CSSStyleSubject.cssProperties = ['azimuth','background','background-attachment','background-color','background-image','background-position','background-repeat','border-collapse','border-color','border-spacing','border-style','border-top','border-top-color','border-right-color','border-bottom-color','border-left-color','border-top-style','border-right-style','border-bottom-style','border-left-style','border-top-width','border-right-width','border-bottom-width','border-left-width','border-width','bottom','clear','clip','color','content','cursor','direction','display','elevation','empty-cells','css-float','font','font-family','font-size','font-size-adjust','font-stretch','font-style','font-variant','font-weight','height','left','letter-spacing','line-height','list-style','list-style-image','list-style-position','list-style-type','margin','margin-top','margin-right','margin-bottom','margin-left','max-height','max-width','min-height','min-width','orphans','outline','outline-color','outline-style','outline-width','overflow','padding','padding-top','padding-right','padding-bottom','padding-left','pause','position','right','size','table-layout','text-align','text-decoration','text-indent','text-shadow','text-transform','top','vertical-align','visibility','white-space','width','word-spacing','z-index','opacity','outline-offset','overflow-x','overflow-y'];
// chains several Animator objects together
function AnimatorChain(animators, options) {
this.animators = animators;
this.setOptions(options);
for (var i=0; i<this.animators.length; i++) {
this.listenTo(this.animators[i]);
}
this.forwards = false;
this.current = 0;
}
AnimatorChain.prototype = {
// apply defaults
setOptions: function(options) {
this.options = Animator.applyDefaults({
// by default, each call to AnimatorChain.play() calls jumpTo(0) of each animator
// before playing, which can cause flickering if you have multiple animators all
// targeting the same element. Set this to false to avoid this.
resetOnPlay: true
}, options);
},
// play each animator in turn
play: function() {
this.forwards = true;
this.current = -1;
if (this.options.resetOnPlay) {
for (var i=0; i<this.animators.length; i++) {
this.animators[i].jumpTo(0);
}
}
this.advance();
},
// play all animators backwards
reverse: function() {
this.forwards = false;
this.current = this.animators.length;
if (this.options.resetOnPlay) {
for (var i=0; i<this.animators.length; i++) {
this.animators[i].jumpTo(1);
}
}
this.advance();
},
// if we have just play()'d, then call reverse(), and vice versa
toggle: function() {
if (this.forwards) {
this.seekTo(0);
} else {
this.seekTo(1);
}
},
// internal: install an event listener on an animator's onComplete option
// to trigger the next animator
listenTo: function(animator) {
var oldOnComplete = animator.options.onComplete;
var _this = this;
animator.options.onComplete = function() {
if (oldOnComplete) oldOnComplete.call(animator);
_this.advance();
}
},
// play the next animator
advance: function() {
if (this.forwards) {
if (this.animators[this.current + 1] == null) return;
this.current++;
this.animators[this.current].play();
} else {
if (this.animators[this.current - 1] == null) return;
this.current--;
this.animators[this.current].reverse();
}
},
// this function is provided for drop-in compatibility with Animator objects,
// but only accepts 0 and 1 as target values
seekTo: function(target) {
if (target <= 0) {
this.forwards = false;
this.animators[this.current].seekTo(0);
} else {
this.forwards = true;
this.animators[this.current].seekTo(1);
}
}
};
// an Accordion is a class that creates and controls a number of Animators. An array of elements is passed in,
// and for each element an Animator and a activator button is created. When an Animator's activator button is
// clicked, the Animator and all before it seek to 0, and all Animators after it seek to 1. This can be used to
// create the classic Accordion effect, hence the name.
// see setOptions for arguments
function Accordion(options) {
this.setOptions(options);
var selected = this.options.initialSection, current;
if (this.options.rememberance) {
current = document.location.hash.substring(1);
}
this.rememberanceTexts = [];
this.ans = [];
var _this = this;
for (var i=0; i<this.options.sections.length; i++) {
var el = this.options.sections[i];
var an = new Animator(this.options.animatorOptions);
var from = this.options.from + (this.options.shift * i);
var to = this.options.to + (this.options.shift * i);
an.addSubject(new NumericalStyleSubject(el, this.options.property, from, to, this.options.units));
an.jumpTo(0);
var activator = this.options.getActivator(el);
activator.index = i;
activator.onclick = function(){_this.show(this.index)};
this.ans[this.ans.length] = an;
this.rememberanceTexts[i] = activator.innerHTML.replace(/\s/g, "");
if (this.rememberanceTexts[i] === current) {
selected = i;
}
}
this.show(selected);
}
Accordion.prototype = {
// apply defaults
setOptions: function(options) {
this.options = Object.extend({
// REQUIRED: an array of elements to use as the accordion sections
sections: null,
// a function that locates an activator button element given a section element.
// by default it takes a button id from the section's "activator" attibute
getActivator: function(el) {return document.getElementById(el.getAttribute("activator"))},
// shifts each animator's range, for example with options {from:0,to:100,shift:20}
// the animators' ranges will be 0-100, 20-120, 40-140 etc.
shift: 0,
// the first page to show
initialSection: 0,
// if set to true, document.location.hash will be used to preserve the open section across page reloads
rememberance: true,
// constructor arguments to the Animator objects
animatorOptions: {}
}, options || {});
},
show: function(section) {
for (var i=0; i<this.ans.length; i++) {
this.ans[i].seekTo(i > section ? 1 : 0);
}
if (this.options.rememberance) {
document.location.hash = this.rememberanceTexts[section];
}
}
};

View File

@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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>
<script type="text/javascript">
var map;
var layer;
function init(){
var mapOptions = {
maxExtent: new OpenLayers.Bounds(-174,18.4,-63.5,71),
maxResolution: 0.25,
projection: "EPSG:4326"};
map = new OpenLayers.Map( 'map', mapOptions );
layer = new OpenLayers.Layer.ArcGIS93Rest( "ArcGIS Server Layer",
"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export",
{layers: "show:0,2"});
map.addLayer(layer);
map.addControl( new OpenLayers.Control.MousePosition() );
map.setCenter(new OpenLayers.LonLat(-115, 45), 0);
}
function enableFilter() {
layer.setLayerFilter(2, "STATE_NAME LIKE '%" + document.getElementById('filterValueField').value + "%'");
layer.redraw();
}
function disableFilter() {
layer.setLayerFilter(2, null);
layer.redraw();
}
function updateButton() {
document.getElementById('filterButton').value = "Show '" +
document.getElementById('filterValueField').value + "' States";
}
</script>
</head>
<body onload="init()">
<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
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
This is an example of how to add an ArcGIS Server 9.3 Rest API layer to the OpenLayers window.
</div>
<input id="filterValueField" type="textfield" value="A"/>
<input id="filterButton" type="button" onclick="enableFilter();" value="Filter States"/>
<input type="button" onclick="disableFilter();" value="Show All States"/>
<br>
(Filter is case sensitive.)
</body>
</html>

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