Commit Graph
69 Commits
Author SHA1 Message Date
Guillaume Beraudo 166dd98b72 Simplify and modernize closure tutorial
Use jscomp_error * and keep most advanced options for the last example.
2016-03-10 16:04:46 +01:00
Guillaume Beraudo fedf477f29 Simplify custom-builds tutorial
Remove, the disturbing goog.dom.ASSUME_STANDARDS_MODE define.
Remove jscomp_off stuff.
2016-03-10 16:03:03 +01:00
Guillaume Beraudo 7e6115a763 Fix geolocation error cast
Despite the dispatchEvent method accepting a hash with a "target" property of
"undefined", closure may still require the "target" property to be
explicit.
2016-02-16 11:36:24 +01:00
Guillaume Beraudo 3e9683d88d Fix checks for undefined in zoomtoextentcontrol 2016-02-11 11:03:35 +01:00
Guillaume Beraudo 4722d341af Fix checks for undefined in zoomslidercontrol 2016-02-11 11:03:35 +01:00
Guillaume Beraudo b53d74285b Fix checks for undefined in zoom control 2016-02-11 11:03:35 +01:00
Guillaume Beraudo 6c1d0f1bbe Fix checks for undefined in scaline control 2016-02-11 11:03:35 +01:00
Guillaume Beraudo cf5006617c Fix checks for undefined in rotate control 2016-02-11 11:03:35 +01:00
Guillaume Beraudo adb5b78cb6 Fix checks for undefined in overviewmapcontrol 2016-02-11 11:03:35 +01:00
Guillaume Beraudo 6779ab5e29 Fix checks for undefined in mousepositioncontrol 2016-02-11 11:03:35 +01:00
Guillaume Beraudo a513754d25 Fix checks for undefined in fullscreencontrol 2016-02-11 11:03:35 +01:00
Guillaume Beraudo 9703be932d Fix checks for undefined in attributioncontrol 2016-02-11 11:03:35 +01:00
Guillaume Beraudo a910ab626a Add test for URL template expansion 2016-02-03 16:54:29 +01:00
Guillaume Beraudo 46fc1c2a1b Prevent unnecessary casts 2016-02-03 16:26:43 +01:00
Guillaume Beraudo 289e571fb0 Remove all remaining unnecessary casts
There is still such a cast in the goog library itself.
See https://github.com/google/closure-library/pull/637
2016-02-03 16:26:43 +01:00
Guillaume Beraudo 42df157a04 Add test for URL template expansion 2016-02-03 12:49:12 +01:00
Guillaume Beraudo 9132d91f66 Remove remaining unnecessary ol.source.State casts 2016-01-21 16:05:06 +01:00
Guillaume Beraudo d32d6e6851 Simplify source state option
The ol.source.State is already a string.
Removed extra union and cast.
2016-01-21 14:40:58 +01:00
Guillaume Beraudo f0e396678c Add missing cacheSize attribute 2016-01-21 14:39:42 +01:00
Guillaume Beraudo d2cc04d770 Bind tileUrlFunction to the source
In order to have the function returned by ol.source.UrlTile#getTileUrlFunction()
to return a url even when executed outside the context of the source, then it
should be bound to the source.
2016-01-20 17:54:32 +01:00
Guillaume Beraudo a1c72d8890 Add missing return type to GeoJSON format 2016-01-05 11:02:23 +01:00
Guillaume Beraudo 9b3f61a084 Remove goog.string.remove
Use standard replace method instead.
2015-10-01 14:54:04 +02:00
Guillaume Beraudo fef1b0981e Remove goog.string.trim()
Replace with standard ECMAScript 5.1.
2015-10-01 14:14:06 +02:00
Guillaume Beraudo b092bce4ff Remove goog.string.startsWith
Replace with simple indexOf test
2015-10-01 14:00:42 +02:00
Guillaume Beraudo 43f72031f9 Add Z-index layer ordering tests 2015-09-03 11:31:57 +02:00
Guillaume Beraudo 3811228ac7 Add Z-index to layers
This commit allows setting a z-index property on the layers and uses
it in the canvas, WEBGL and DOM map renderers for ordering the layers
before rendering.

Default z-index is 0 for managed layers and 1000 for unmanaged ones.
It allows always on bottom, always on top and more complex layer layouts.
2015-09-03 11:31:57 +02:00
Guillaume Beraudo e189667d20 Improve ol.Overlay extensibility
- make autoPan_ protected;
- split updatePixelPosition_() and make it protected;
- use a protected setVisible() function.
2015-08-24 16:15:26 +02:00
Guillaume Beraudo 464ce13b13 Mark ol.style.Icon#load() @api
We currently rely on the renderer to load the styles it intents to use.

In Ol3-Cesium we want to allow different styles for 3D and for 2D.
This commit fixes the issue by allowing application code to explicitely
initiate the loading process.
2015-08-07 15:56:07 +02:00
Guillaume Beraudo e57919e55b Skip features without geometry during webgl 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.

An equivalent patch has been applied to the canvas replay.
2015-08-07 09:50:25 +02:00
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