Commit Graph

73 Commits

Author SHA1 Message Date
Éric Lemoine b7fa22c4d4 Add type VectorLayerOptions 2013-03-17 22:33:02 +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
Tim Schaub 895bc4e76c The addFeatures method will be added back later
This needs to be made to take advantage of the shared vertices.
2013-03-07 23:47:41 -07:00
Tim Schaub 4918106a22 Make shared vertices structures accessible 2013-03-07 23:09:23 -07:00
Tim Schaub 5752a69d6b Adding addFeatures back as an API method temporarily
Eventually, parseFeatures and addFeatures should be collapsed.
2013-03-07 10:09:19 -07: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
Tim Schaub f961930823 Render countries from GeoJSON
This reveals a number of issues that still need to be addressed.
2013-03-06 19:24:53 -07:00
Tim Schaub d7c547f736 Method for parsing features
Shared structures are still per geometry type.  Need to be made per symbolizer type.
2013-03-06 19:02:21 -07:00
Tim Schaub e1c3faa53e Vector related exports 2013-03-05 18:13:10 +01:00
Tim Schaub 12bee3178e Moving the feature management to the layer
The source will be responsible for fetching vector data.
2013-03-05 12:46:55 +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 63c048edb2 Use the actual value, not just the index in the array. 2013-03-03 15:22:52 +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
Tim Schaub e30b0959e0 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-18 10:11:00 -07:00
Tom Payne 27125640ef Add ol.layer.ImageLayer 2013-02-14 23:36:36 +01:00
Tim Schaub e4132813af Shorter name 2013-01-21 18:06:14 -07:00
Tim Schaub 1a63bf078f Basic vector source and layer
The vector source maintains a cache of features.  These are indexed by geometry type in anticipation of the renderer's needs.
2013-01-21 17:59:09 -07:00
Tom Payne f3cace499c Implement frame state and animation architecture 2013-01-11 15:48:24 +01:00
Tom Payne 06bb56eff2 Fix typecasts in ol.layer.TileLayer 2013-01-07 13:18:59 +01:00
Tom Payne 3ef85a3651 Fix typecasts in ol.layer.Layer 2013-01-07 13:18:59 +01:00
tschaub 9622395c86 Use radians for hue rotation
This commit is a cherry-pick from 7f578f0.

Conflicts:

	src/ol/renderer/dom/domlayerrenderer.js
2012-12-12 15:22:01 +01:00
tschaub 4d97b583c6 Match the current Filter Effects spec
This commit is a cherry-pick of 19f7778.

The current draft of the [filter spec](https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html)
describes brightness, contrast, hue-rotate, and saturate functions that
roughly match our layer's setBrightness, setContrast, setHue, and
setSaturation methods.  These changes make the range of our methods match
the corresponding functions in the spec.  The one exception is the
brightness function.  The spec says it has a range of 0 to positive infinity.
The WebKit implementation accepts a range of -1 to 1 (as of
https://github.com/WebKit/webkit/commit/8f4765e569).  There's an open
(ticket)[https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647] recommending
that the spec be changed to match.

I'm not stuck on having our methods match those of the filter spec, but the
parity would be nice.

These changes leave the WebGL map renderer "broken" (whacky colors).  It would
be straightforward to update the current fragment shader to handle the new
range of hue, but the brightness, contrast, and saturation handling will
need to be reworked.

For inspiration, here are the color transformation
matrix calculations the WebKit filters:
https://github.com/WebKit/webkit/blob/8f4765e5698c9171c2b3f984d0d9d65188185de3/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp#L64-80

Conflicts:

	src/ol/renderer/dom/domlayerrenderer.js
2012-12-12 15:18:34 +01:00
Éric Lemoine 576c54eb61 Move object literal exports to their own file 2012-10-24 17:05:33 +02:00
Éric Lemoine d81b232587 Granularize the exports
This commit decomposes exports.txt into multiple, per-component, export files.  This will be required for custom builds;
2012-10-20 22:31:33 +02:00
Tom Payne 9d253ab6bb Refactor exports and externs 2012-10-04 15:11:26 +02:00
Tom Payne 24771c73a0 Export layer options type 2012-09-29 15:36:17 +02:00
Éric Lemoine d99a0c164e Make functions @protected or @private
This also makes jsdoc3 happy along the way.
2012-09-27 17:56:29 +02:00
Tom Payne 65b8e0f915 Use object literals and use generic tile layer 2012-09-27 12:45:00 +02:00
Tom Payne d3b9af30d0 Don't modify return type of method 2012-09-27 09:36:55 +02:00
Tom Payne 96bd703271 s/tilesource/source/ 2012-09-27 09:36:55 +02:00
Tom Payne 50334b7971 s/ol.TileLayer/ol.layer.TileLayer/ 2012-09-27 09:36:55 +02:00
Tom Payne 290d03e76f s/store/source/ 2012-09-26 19:43:23 +02:00
Tom Payne 88fd7729e2 Add missing dependency 2012-09-25 12:18:49 +02:00
Éric Lemoine 3e01ca97c3 remove the jsunit tests 2012-09-25 12:03:36 +02:00
Tom Payne 8394147df1 Satisfy gjslint 2012-09-24 21:25:29 +02:00
Tim Schaub 1f9e2aa3c4 Move Layer into ol.layer namespace. 2012-09-24 17:08:36 +02:00
Tom Payne a416d1f601 s/TileBounds/TileRange/ 2012-09-24 14:33:24 +02:00
Tom Payne f8c31ba45c s/ol3/ol/ 2012-09-24 14:21:41 +02:00
Tom Payne f3d9b3332c Move code to be merged into src/attic 2012-07-26 00:21:37 +02:00
Tom Payne 3eefbaa337 Remove merged code 2012-07-22 03:10:33 +02:00
Tom Payne a2cf655bfa Add ol.Layer 2012-07-11 17:20:06 +02:00
Éric Lemoine fbd4023d6a [ol.layer.TileLayer] better func comment 2012-06-24 22:30:48 +02:00
Éric Lemoine 192caa1c65 [ol.layer.TileLayer] do not load tiles outside the layer's extent 2012-06-24 22:25:01 +02:00
ahocevar 9c46aadd22 Adding attribution control and attribution. 2012-06-24 22:22:18 +02:00
Éric Lemoine f92e128636 [ol.layer.WMS] add a basic tiled WMS layer implementation 2012-06-22 20:39:56 +02:00
Éric Lemoine 5dc156995a [ol.layer.TileLayer] use ol.error 2012-06-22 18:46:52 +02:00
Éric Lemoine a26913f26e [ol.layer.TileLayer] getTileUrl should be implemented in subclasses 2012-06-22 18:31:32 +02:00
Éric Lemoine 68fdab6824 [ol.layer.TileLayer] do not create tiles outside the layer extent 2012-06-22 17:30:35 +02:00
Éric Lemoine e5c3dcfe09 [ol.layer.TileLayer] fix maxResolution calculation 2012-06-22 15:43:18 +02:00