Commit Graph
40 Commits
Author SHA1 Message Date
Guillaume Beraudo 23ae91cfd5 Skip features without geometry during canvas replay
Setting a feature geometry to null or undefined and triggering a hit
detection was throwing an exception.

This patch handles a batched feature without a geometry in the same
fashion as skipped features.
2015-08-04 18:08:54 +02:00
Guillaume Beraudo d48e818390 Fix assert documentation typo 2015-06-10 15:36:43 +02:00
Guillaume Beraudo 361d83dc73 Mark tilegrid.createTileCoordTransform() @api
Necessary since the removal of tilegridXYZ type.
2015-06-04 09:24:35 +02:00
Guillaume Beraudo a7e4e20edc Update changelog 2015-04-16 18:11:15 +02:00
Guillaume Beraudo c0c7b71af6 Add draw interaction test case 2015-04-16 17:44:45 +02:00
Guillaume Beraudo a468e8025a Modify draw interaction dispatch order
When finishing drawing, this PR dispatches the `drawend` event before adding
the feature to the source or collection.

This change allows user code to finish configuring the feature (setting style,
properties, ...).

It is useful since inserting a feature, or later on modifying it, may trigger
processing which only makes sense if the feature is ready. For example,
ol3-cesium will recreate a 3D counterpart.
2015-04-16 16:51:54 +02:00
Guillaume Beraudo 65614d74f8 Add missing @api
These types are referenced in the externs but were not declared.
Found by ol3-cesium.
2015-04-16 11:09:41 +02:00
Guillaume Beraudo 1553b88b9d Mark VectorContext @api
VectorContext type must be present in Ol3 externs to compile ol3-cesium.
Previously, the `IVectorContext` interface was exported to the externs.
2015-04-04 15:19:56 +02:00
Guillaume Beraudo 0e32456108 Use an abstract base class instead of IVectorContext
By having the abstract methods in the base class, subclasses can simply
override the methods they actually provide.
Additionally, this change fixes a regression in webgl canvas immediate.
2015-04-04 13:47:53 +02:00
Guillaume Beraudo 7765d7304c Fix assertion message 2015-04-01 11:29:28 +02:00
Guillaume Beraudo aa63f1ad6a Add some documentation to ol.xml. 2015-03-31 19:25:44 +02:00
Guillaume Beraudo 2ba2162416 Add a readme about XML parser and format
The readme content is the result of the merge of two wiki pages.
2015-03-31 19:25:41 +02:00
Guillaume Beraudo f25302f8b7 Parse KML extrude and altitudeMode from multi geometries
Handle MultiPoint, MultiLineString, MultiPolygon.
LinearRing properties are not handled.

An 'extrude' boolean array property is set in the geometry properties.
An 'altitudeMode' string array property is set in the geometry properties.
2015-03-31 17:21:12 +02:00
Guillaume Beraudo 5bd63f7e2c Parse KML extrude and altitudeMode of simple geometries
Point, LineString and Polygon are handled.
LinearRing properties are not handled.

An 'extrude' boolean property is set in the geometry properties.
An 'altitudeMode' string property is set in the geometry properties.
2015-03-31 15:30:58 +02:00
Guillaume Beraudo ea8ee16f49 Fix return type of ol.xml.pushParseAndPop 2015-03-31 15:28:20 +02:00
Guillaume Beraudo 567a9d7a5a Make ol.geom.Geometry inherit from ol.Object
This will allow storing per-geometry properties.
2015-03-31 15:28:20 +02:00
Guillaume Beraudo 6e7221ca28 Add ol.Object.unset() method
Allow deleting a property.
2015-03-30 13:30:10 +02:00
Guillaume Beraudo 132686b4a7 Generate source map of minified ol.js
Allows automatic unminification by the browser.

A postprocessing is required to:
- fix the paths to the sources;
- add the link from the minified script to its map.

If someone knows how to do the first item in Python or nodejs, please provide a
patch. A simple shell script is:
```
\#!/bin/sh
pwd=`pwd`
sed -i "s!$pwd/build!olsource!g" 'build/ol.js.map'
sed -i "s!$pwd!olsource!g" 'build/ol.js.map'
```

The second item should always be manually handled to avoid 404 errors
in debuggers
`echo '//# sourceMappingURL=ol.js.map' >> build/ol.js`

Finally, create an alias / copy ol3 directory to /olsource in your
deployed environment.
2015-01-09 12:17:35 +01:00
Guillaume Beraudo 3c00c7cf4c Print example name in check-examples exception 2014-12-15 15:21:55 +01:00
Guillaume Beraudo ae998a7585 Mark Image style constructor properties @api 2014-12-15 14:41:35 +01:00
Guillaume Beraudo e3947fb09a Add optional fast parameter for clearing vector source 2014-12-05 18:06:23 +01:00
Guillaume Beraudo 17e56d8357 Introduce clear event on vector source
Three seconds speed up when clearing 100'000 features.
Clearing is now around 350ms.
2014-12-05 15:03:23 +01:00
Guillaume Beraudo 3e2cc3c246 Faster vector source clear
Three seconds speed up for clearing 100'000 features.
2014-12-05 15:03:20 +01:00
Guillaume Beraudo e4063102b7 Potentialy faster array allocation in rbush 2014-12-05 15:03:07 +01:00
Guillaume Beraudo fe74bd1b2c Add missing call to flush in webgl map renderer 2014-11-21 13:36:09 +01:00
Guillaume Beraudo 235f7c5bd1 Fix lack of @api doc in webgl Immediate 2014-11-21 13:35:20 +01:00
Guillaume Beraudo 7d01946fef Removing webgl Immediate delegation code for drawing text 2014-11-20 13:53:00 +01:00
Guillaume Beraudo 257784e277 More lenient webgl Immediate drawing of a feature.
Remove assert to handle drawing features with supported geometries.
2014-11-20 13:53:00 +01:00
Guillaume Beraudo f1402522b5 More lenient Immediate geometry collection rendering
Render geometry collection elements with a valid renderer inspite of
throwing an assertion error. Allows support of hierarchies of points.
2014-11-20 13:53:00 +01:00
Guillaume Beraudo 20ceae2655 Webgl immediate implementation for points
Internally uses a replay group to share code.

Modifies the dynamic data example to use PointGeometry
and Feature in addition to MultiPoint.
2014-11-20 13:53:00 +01:00
Guillaume Beraudo c05ffff629 Dynamically selected renderer in draw feature example 2014-11-07 14:20:51 +01:00
Guillaume Beraudo 6abe3047ec Add feature overlay support to webgl map renderer. 2014-11-07 14:17:31 +01:00
Guillaume Beraudo f715e3186a Readability rearangement in canvasmaprenderer.js 2014-11-07 11:15:02 +01:00
Guillaume Beraudo 6b8a5870ba Small feature overlay optimization
Compute `getSquaredTolerance` once, out of the loops.
2014-11-06 11:49:44 +01:00
Guillaume Beraudo 5adcaa3487 Exit on check-examples failure
Should avoid Travis to pass even though there are errors.

Waiting for the check-examples to finish to get all the errors.
It may also be necessary in order to free system resources like file
descriptors.
2014-10-08 14:46:42 +02:00
Guillaume Beraudo 67f4e9c817 Export constructors of ol.source.Source children
Necessary addition to https://github.com/openlayers/ol3/pull/2749.
2014-09-30 09:33:55 +02:00
Guillaume Beraudo d67cefdf3a Consistent circle transform
Depending on compilation flags, applying a transform used to either:
- work;
- fail throwing an abstract method not implemented message;
- fail silently.

Now it should consistently work, like the other geometries.

Adding a polygon factory method creating an approximation of a circle on
a plane would be useful for users wanting the circle to be deformed.
It would be similar to the `circular` function which creates an
approximation of a circle on a sphere.
2014-09-16 13:41:17 +02:00
Guillaume Beraudo 590486fa72 Use pool thread for calling bin/check-example.js.
Saves 50s out of 60s on my machine, that is 83%.
Fixes https://github.com/openlayers/ol3/issues/2695
2014-09-11 09:30:44 +02:00
Guillaume Beraudo 9adb12846c Add TextStyle offsets getters to API.
The other properties getters are in the API already.
2014-09-03 17:21:27 +02:00
Guillaume Beraudo da2a291208 ol.layer.Vector.getSource return type specialisation. 2014-09-02 15:14:01 +02:00