Commit Graph
100 Commits
Author SHA1 Message Date
ahocevar a66f26f839 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-11 15:21:01 +01:00
ahocevar 06de786b98 Adding information about jsdoc3 dependency 2013-03-08 19:19:14 +01:00
ahocevar b971fc1aae Bringing back the style-rules example
Features are now created programmatically as
GeoJSONFeatureCollection.
2013-03-08 16:26:18 +01:00
ahocevar 389b8d14d7 Support GeoJSON as parsed object
With this change, we can programmatically create
GeoJSONFeatureCollection objects programmatically, without
reading a GeoJSON file.
2013-03-08 16:25:23 +01:00
ahocevar 5af71a488a No need to continue rendering when we need to defer 2013-03-07 18:13:22 +01:00
ahocevar f4a16e7f57 Collect features before rendering to the sketch canvas
This avoids features being rendered multiple times when they
cross tile borders. Currently this makes the style-rules.html
example extremely slow. Fix for that to come in my next commit.
2013-03-07 16:57:22 +01:00
ahocevar f0039ee460 Additional index dimension for RTree; use RTree again
The RTree can easily maintain an additional index dimension,
by passing a type with each added item. Now instead of
maintaining an RTree for each geometry type, we have a single
RTree with a type filter. With this change, using the RTree
finally speeds up rendering as expected.
2013-03-07 14:36:09 +01:00
ahocevar 100c8a1cf4 Adding gutter when requesting features for a tile
By doing so, we avoid features being cut off when the symbolizer
causes it to be rendered across tile borders.
2013-03-06 21:06:21 +01:00
ahocevar 2af82abcda Adding missing export 2013-03-06 21:03:57 +01:00
ahocevar 2147674e2f Adding exports for icon and feature 2013-03-06 12:49:06 +01:00
ahocevar 345bb55f98 Respect width and height from symbolizer 2013-03-06 12:29:20 +01:00
ahocevar 6ee754abb6 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-06 11:20:40 +01:00
ahocevar 95f3fe535a No projection configuration needed on the layer 2013-03-06 02:20:11 +01:00
ahocevar 2ee19f699a Moving VERSION into params 2013-03-06 02:20:10 +01:00
ahocevar c1f3a6cc54 WMS GetMap request parameters shall be params
To avoid surprises, we configure everything that is a WMS GetMap
request parameter in the params object, and not as direct
configuration option. This affects the VERSION and TRANSPARENT
params.
2013-03-06 02:20:09 +01:00
ahocevar a912d48b59 Do not use tiledWMSOptions in closure function
See #269.
2013-03-06 02:20:09 +01:00
ahocevar ab19d255c7 Rendering icons from external graphic urls 2013-03-06 01:57:08 +01:00
ahocevar d8b6d17105 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-05 15:48:57 +01:00
ahocevar df4f2c4c0a No projection configuration needed on the layer 2013-03-05 15:25:47 +01:00
ahocevar 8fd25749c0 Merge pull request #276 from ahocevar/wms-params
WMS GetMap request parameters shall be params. r=@elemoine
2013-03-05 02:13:37 -08:00
ahocevar 19f8692672 Moving VERSION into params 2013-03-05 11:11:41 +01:00
ahocevar 4bb521db65 WMS GetMap request parameters shall be params
To avoid surprises, we configure everything that is a WMS GetMap
request parameter in the params object, and not as direct
configuration option. This affects the VERSION and TRANSPARENT
params.
2013-03-05 10:54:33 +01:00
ahocevar 2676050d54 Do not use tiledWMSOptions in closure function
See #269.
2013-03-05 10:50:46 +01:00
ahocevar 3803275a1e Merge pull request #269 from ahocevar/wms-extent
Fixing extent check for undefined extents. r=@elemoine
2013-03-05 00:54:12 -08:00
ahocevar 19aeb04141 Fixing extent check for undefined extents.
Thanks @marcjansen for spotting this. To make the epsg-4326
example work, I also had to change the WMS version to 1.1.1.
2013-03-05 09:47:52 +01:00
ahocevar 3526244e0c Merge pull request #268 from ahocevar/wms-improvements
Support tile sources without configured projection. r=@twpayne
2013-03-04 16:48:09 -08:00
ahocevar 23c09abd3a Calling getTileSize with z argument
Thanks for catching this @twpayne.
2013-03-05 01:47:28 +01:00
ahocevar 66b790294d Merge branch 'master' of github.com:openlayers/ol3 into wms-improvements
Conflicts:
	src/ol/source/tiledwmssource.js
	test/spec/ol/tileurlfunction.test.js
2013-03-05 00:55:52 +01:00
ahocevar 586f393492 Support tile sources without configured projection
This change adds a lot of flexibility to working with tile
layers: Sources where the server projection or tile grid do not
matter can now be constructed without specifying a projection or
tile grid.

The tileUrlFunction/imageUrlFunction now also creates updated
URLs when the params of the layer change, so things like
mergeNewParams in ol2 will be possible.

A nice side effect of this whole change is that there is no more
duplicated code between tiled and single image WMS layers.

While I was at it, I also fixed a WMS 1.1.1 axis order issue
and incorrect STYLES params (STYLES=& instead of STYLES&).
2013-03-05 00:46:58 +01:00
ahocevar f1120287c3 Features can now have symbolizers
If specified, feature symbolizers take precedence over rule
based styling.
2013-03-03 18:55:52 +01:00
ahocevar 44ca6c9ff6 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-03 18:37:02 +01:00
ahocevar d4ecf53801 Adding example for rule based styling
For the first time in the history of OpenLayers, we can render
features with multiple symbolizers now, which is also shown in
this new example.
2013-03-03 17:00:20 +01:00
ahocevar 5535a26d4a Adding unit tests for rule based styling 2013-03-03 15:25:20 +01:00
ahocevar 63c048edb2 Use the actual value, not just the index in the array. 2013-03-03 15:22:52 +01:00
ahocevar db52ff926e Return an empty array for features without geometry
This ensures that the static applyDefaultStyle() method works
exactly the same way as the instance's apply() method.
2013-03-03 15:22:33 +01:00
ahocevar 9d1f737bce ol.Filter is now a (base) class, not an interface any more
ol.Filter can now also be used to provide a simple filter that
just evaluates a user provided filter function against a
feature.
2013-03-03 14:38:04 +01:00
ahocevar bdfa2cc88c Fixing return type to make Closure compiler happy 2013-03-02 17:44:15 +01:00
ahocevar f4a4522eb4 Giving vector layers the style they deserve
Now vector layers can have a style. ol.Style instances have an
apply method to get the symbolizer literals for a feature. If the
layer does not have a style defined, there is also a static
applyDefaultStyle function on ol.Style to get the default
symbolizer literals for a feature. The vector layer also got a
groupFeaturesBySymbolizerLiteral method, which returns an array
with features grouped by symbolizer, as needed by the canvas
renderer.
2013-03-02 17:38:01 +01:00
ahocevar fcd5804d2d Symbolizer and SymbolizerLiteral as base class, not interface 2013-03-02 14:08:52 +01:00
ahocevar da7820121f Renaming the 'evaluate' method to 'applies' 2013-03-02 12:50:53 +01:00
ahocevar f6c93d85b0 Making linter happy 2013-02-19 14:12:38 +01:00
ahocevar f15c2951d0 Adding RTree tests 2013-02-19 14:07:47 +01:00
ahocevar 266111e5f1 Adding goog.provide and goog.requires 2013-02-15 23:46:32 +01:00
ahocevar d2a22016e2 Adding extent filter tests 2013-02-15 23:43:10 +01:00
ahocevar 77b8688eae Regrouping tests 2013-02-15 23:42:22 +01:00
ahocevar 59fe714fa6 Making the linter happy 2013-02-15 17:44:09 +01:00
ahocevar 8c03abdaa2 Adding ol.source.Vector unit tests 2013-02-15 16:25:47 +01:00
ahocevar 8cc65756bc Only attempt fast lane for AND filters 2013-02-15 16:25:29 +01:00
ahocevar 6b43435262 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-13 12:30:16 +01:00
ahocevar e155f870cd Fixing RTree, and using it for retrieving geometries 2013-02-13 12:29:14 +01:00
ahocevar 4e971b6041 Faster extent + geometry type queries
By maintaining separate R-Trees for each geometry type, we cover
the most critical query from the canvas renderer at higher
speeds. Using the filter's own evaluate method, we can now also
serve arbitrary queries, but they won't be fast.

Still needs unit tests.
2013-02-06 16:42:55 +01:00
ahocevar 619803cdeb More goog.requires fixes 2013-02-06 16:36:42 +01:00
ahocevar a13e6bdfda Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-06 16:27:45 +01:00
ahocevar 61e4452c83 Adding missing and removing unused goog.requires 2013-02-06 16:26:24 +01:00
ahocevar 089b7013c2 Merge branch 'master' of github.com:openlayers/ol3 into vector
Conflicts:
	src/ol/renderer/canvas/canvasrenderer.js
	test/ol.html
2013-02-05 17:28:36 +01:00
ahocevar 386b97cf9a Merge branch 'master' of github.com:openlayers/ol3 into vector
Conflicts:
	src/ol/renderer/canvas/canvasrenderer.js
	test/ol.html
2013-02-05 17:17:09 +01:00
ahocevar dafa48da2e Using spatial index and combined filters
This should significantly speed up feature access. Needs unit
tests.
2013-02-04 22:51:58 +01:00
ahocevar c58f0afcc3 New R-Tree struct for spatial indexing.
This needs unit tests.
2013-02-04 22:50:59 +01:00
ahocevar 428793cd7c New filters for extent and logical filtering
These need unit tests.
2013-02-04 22:50:21 +01:00
ahocevar 43dd9ca68c Don't use unshift 2013-02-02 12:29:08 +01:00
ahocevar 9a0f509a94 Use objects instead of arrays for geometry type cache
Also trying to reference features directly here instead of
storing feature ids in the index. We'll see if this is good when
we have an index for tile coords as well and want to filter
with multiple filters, accessing multiple indices.
2013-01-30 18:03:27 +01:00
ahocevar e61c26830e Manage tile cache
This change implements a LRU policy for tile cachint, and keeps
128 tiles in the cache by default.
2013-01-30 17:09:43 +01:00
ahocevar 1ecbc36a39 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-01-30 15:54:24 +01:00
ahocevar 65b3bb70a1 Some optimizations
* Tiles are now cut out of the sketch renderer in a separate
  pass. This ensures that point features at tile borders appear
  at both sides of the border. However, if such features get
  added in a later tileRange rendering pass, tiles from a
  previous rendering pass will still not have that feature.
* The tile canvas is only created once, and cloneNode(false) is
  used to get a canvas for a new tile.
2013-01-25 16:46:12 +01:00
ahocevar b0a7badc8f Started on proper date line wrapping
What we want in the end is vector tiles repeated just as raster
tiles. This change only avoids repeated tiles with the same
content being rendered and stored in the cache.
2013-01-24 17:29:21 +01:00
ahocevar fe605ceebb Better, but still not all the way there 2013-01-24 16:21:30 +01:00
ahocevar 4a54cc69ce Tiled vector rendering
This needs more work still - see inline TODOs. It also has a
major bug - rendered vector features do not scale and do not
change their offset during panning. So only the initial view is
correct.
2013-01-23 21:37:06 +01:00
ahocevar 4e6b864e27 Making default symbolizers compiler safe 2013-01-22 14:09:04 +01:00
ahocevar 16865fc1fa Removing no longer needed Tiled Vector Source. 2013-01-22 13:24:37 +01:00
ahocevar 300c1048bd Cache and bucket fixes 2013-01-21 15:56:35 +01:00
ahocevar e060498fad Fixing compiler errors (mostly caused by typos) 2013-01-21 13:41:18 +01:00
ahocevar d3e63bc98a Basic feature implementation 2013-01-21 12:16:04 +01:00
ahocevar d0d397f98f Tiled vector source
This source has features and provides tiles with the feature
geometries rendered, using the feature symbolizers. Needs more
work because it is still very unefficient, because it renders
all feature geometries to all tiles, and uses a collection of
features, which we do not have yet.
2013-01-20 21:23:19 +01:00
ahocevar 8a38f9aa9d Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-01-16 16:34:59 +01:00
ahocevar 7c05587aed Merge pull request #114 from ahocevar/resolutions
Use validity extent to generate default resolutions. r=@twpayne,@elemoine
2013-01-16 07:17:10 -08:00
ahocevar 87ce763ccb Use validity extent to generate default resolutions
Previously, the TiledWMS source generated a resolutions array
derived from the world extent in meters, to match the default
Web Mercator resolutions of the map. This wouldn't work for
projections with distance units different than meters. It is
better to commit to a default resolutions array where zoom level
0 is the validity extent of the projection (not the Web Mercator
world extent!) at a 256 pixel tile size.
2013-01-14 16:10:55 +01:00
ahocevar 3c305db4a4 Canvas tile renderer - first cut
Untested and no styling
2013-01-04 18:47:33 +01:00
ahocevar 3d84571043 Use WebGL now that server sends CORS headers (see #75) 2012-11-03 10:33:20 +01:00
ahocevar 13e48787a3 Merge pull request #79 from ahocevar/projection
Projection handling improvements. r=@twpayne, @elemoine
2012-10-31 10:13:17 -07:00
ahocevar eb4a8683e2 Projection handling improvements
* The Map's private createProjection_ method is now a public
  method of the Projection. It is also used by TiledWMSSource
  to calculate the appropriate projection from the user
  configuration.
* ol.Projection.addProjection now adds the transformation for
  the source == target case. This makes it easy for the user
  to create custom projection maps without including proj4js and
  without adding a custom transformation, as long as the
  userProjection equals the projection.
* The TiledWMSSource now uses the same default resolutions as
  the map (i.e. the OSM resolutions)
* The modulo calculation for wrapping extents now works for all
  grid configurations, by not calculating the number of columns
  based on an assumption about the way the zoom levels relate to
  resolutions.
* The wms-custom-proj example now shows how to properly
  configure a custom resolution, i.e. by using the validity
  extent of the projection as its extent.
2012-10-31 13:17:58 +01:00
ahocevar f4139f208a Merge pull request #74 from ahocevar/tiled-wms
Adding tiled WMS source. r=@twpayne,@elemoine
2012-10-29 01:47:20 -07:00
ahocevar e157d17ab7 Addressing review comments regarding typeDef 2012-10-29 09:44:25 +01:00
ahocevar 393bb36784 Removing standalone example 2012-10-29 09:36:08 +01:00
ahocevar b170fa3d16 Using DOM renderer; no custom extent for layers
The server does not send CORS headers, so we cannot use the
WebGL renderer. Since the layers use the projection's extent,
it is not necessary to specify the extent.
2012-10-29 09:34:53 +01:00
ahocevar 0c77aacf33 proj4js externs are not necessary 2012-10-29 09:33:00 +01:00
ahocevar e672083027 Indentation and line break fixes 2012-10-28 23:59:36 +01:00
ahocevar e5308fec40 No extent magic
Setting the extent on a tile source now only means that tiles
won't be drawn outside that extent. Now the only way to specify
the origin of the tile grid is to provide a custom tileGrid. By
default, the grid origin is the top left corner of the
projection's extent.
2012-10-27 17:28:08 +02:00
ahocevar b872b5a74f Cross origin handling to make example work in Firefox
The WMS used in the example does not send CORS headers (I think
not many WMS services do). It seems that the WebGL renderer
needs script access to the image data, so the example only works
with the DOM renderer in Firefox.
2012-10-27 09:16:09 +02:00
ahocevar 433b12c39a Using the projection's extent for resolutions math by default
This ensures that maps with WMS layers with different extents
do not scale the tiles differently for each layer when the
default tileGrid is used. Note that it is always possible to
configure WMS sources with a custom tileGrid.
2012-10-26 22:51:30 +02:00
ahocevar 084506cdb5 Adding tiled WMS source
As shown in the example, this adds support for tiled WMS layers.
2012-10-26 21:36:30 +02:00
ahocevar 69859b415b More MapBrowserEvent improvements
Now we use the browser's native dblclick event on pointer
devices, and we fire dragstart and dragend only if we're really
dragging, and not on mousedown/touchstart and mouseup/touchend.
2012-09-29 18:54:29 +02:00
ahocevar 877971185f MapBrowserEvent simplifications and improvements
We don't register two listeners for mouseup and touchend any
more. And instead of using the native click event on touch
devices, we react on touchend, to make clicking more responsive.
On pointer devices, the underlying native event of a dblclick
event is now a click event.
2012-09-29 16:51:08 +02:00
ahocevar 6267100871 Move customizations out of arrow_box CSS 2012-09-29 16:48:22 +02:00
ahocevar 2b53481932 Making Vienna's location more accurate 2012-09-29 09:54:34 +02:00
ahocevar dcc3fdde96 Fixing popup in example 2012-09-28 19:19:46 +02:00
ahocevar 467fef8875 Updating readme
File urls work fine now, so using a HTTP server has become
optional.
2012-09-28 17:07:33 +02:00
ahocevar 163737d3de Adding popup to full-screen example 2012-09-28 16:47:55 +02:00
ahocevar 6b395cafb5 Stop click event, as previously promised
This should have gone in with 3910318f1b.
2012-09-28 16:47:54 +02:00
ahocevar 82058412a1 Bringing label markup back
Also with a bit of css, we can make the label invisible before
it gets added as overlay to the map.
2012-09-28 14:44:36 +02:00
ahocevar b233b8e1a5 Making sure that position:absolute is set
Positioning of overlays is only possible when position:absolute
is set on the element. So we set it programmatically now.
2012-09-28 14:44:35 +02:00