Commit Graph
100 Commits
Author SHA1 Message Date
Guillaume Beraudo b00b877ca1 Update upgrade notes 2019-02-05 17:25:00 +01:00
Guillaume Beraudo 168edac4a6 Allow declutter with image render mode
Using declutter in image render mode is legitimate: each tile is
decluttered, avoiding symbol/text overlaps.
2019-02-05 17:25:00 +01:00
Guillaume Beraudo 81d0bc21d5 Pass instructions to executor constructor 2018-11-16 12:36:50 +01:00
Guillaume Beraudo ce44a9a3e4 Final renamings 2018-11-15 23:46:20 +01:00
Guillaume Beraudo 89fed65f07 Fix incorrect Executor/Builder types 2018-11-15 23:27:43 +01:00
Guillaume Beraudo da92b2ab3f Improve text replay test 2018-11-15 23:01:45 +01:00
Guillaume Beraudo eaed37da96 Fix width comparison 2018-11-15 20:03:35 +01:00
Guillaume Beraudo b1a5f4855f Create geometryWidths array only when needed 2018-11-15 20:03:34 +01:00
Guillaume Beraudo f9dcadb982 Remove unused methods 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 0f5ced8483 Reduce usage of "replay" term 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 5ecd832c92 Adapt test to new text builder behaviour 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 87a1b926c9 Cleanup executor of unused properties 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 4ba84d7926 Cleanly separate text building and execution 2018-11-15 15:20:41 +01:00
Guillaume Beraudo afc946b215 Cleanup duplicated and unused code 2018-11-15 15:20:41 +01:00
Guillaume Beraudo c0df61468f Move drawText along line to executor 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 0ece0fb002 Cleanup unused text replay code 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 3170355b07 Remove unused function from executor 2018-11-15 15:20:41 +01:00
Guillaume Beraudo f5a8ad63f9 Improve typing 2018-11-15 15:20:41 +01:00
Guillaume Beraudo ba6a6fff7d Module renaming 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 951d4d5ade Fix tests 2018-11-15 15:20:41 +01:00
Guillaume Beraudo e299863117 More renaming 2018-11-15 15:20:41 +01:00
Guillaume Beraudo f3bd08321a Rename Replay to InstructionsBuilder 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 8097be8419 Remove replay code from Instruction Builder class 2018-11-15 15:20:41 +01:00
Guillaume Beraudo fcf470fc8d Introduce Instruction executors
Executors are use to render instructions.
They do not contain cod for building instructions.

Signed-off-by: Guillaume Beraudo <guillaume.beraudo@camptocamp.com>
2018-11-15 15:20:41 +01:00
Guillaume Beraudo ecf79a9ec2 First step in uncoupling replay creation and rendering
Signed-off-by: Guillaume Beraudo <guillaume.beraudo@camptocamp.com>
2018-11-15 15:20:41 +01:00
Guillaume Beraudo 315cfa1033 Fix WMTS layers URLs with dimensions 2018-08-16 15:34:56 +02:00
Guillaume Beraudo abbfb5c653 Document the stableSort function 2018-08-06 10:50:18 +02:00
Guillaume Beraudo a4178d05ef Expose the stableSort function
This is a low level function, essential to OpenLayers so it is always
shipped with OpenLayers.
2018-08-06 09:18:56 +02:00
Guillaume Beraudo dbf9048d8f Expose the getUid function
It is often useful in application code to have a way to uniquely identify
and object.

Exposing the OpenLayers mechanism allows for best performance and avoid
unneccessary dirt.
2018-08-06 09:18:56 +02:00
Guillaume Beraudo fe86d2e7f7 Expose original getGutter
TileWMS objects take a gutter option but do not have a public getter
for it. This makes it convoluted for user code to recreate the object
(ex: in the case of serialization/deserialization).

- the getGutterInternal() method is renamed to getGutter;
- the getGutter(projection) method is renamed to getGutterForProjection,
  which is also more explicit.

The getGutter method was not API and is only used by the renderer.
2018-08-02 17:12:41 +02:00
Guillaume Beraudo e131fe3728 Update upgrade notes 2018-06-18 14:08:56 +02:00
Guillaume Beraudo 8e6b3bba99 Remove documentation related to the closure compiler
In OpenLayers 5, the following features are not supported anymore:
- Google Closure Compiler builds;
- custom builds.

The Google Closure Compiler is only kept for internal type checking.
2018-05-09 21:55:37 +02:00
Guillaume Beraudo cb539bce98 Untie feature loader and XML code 2018-03-01 09:14:45 +01:00
Guillaume Beraudo 6280941669 Remove window prefix from event listener functions 2018-02-28 23:28:38 +01:00
Guillaume Beraudo f9a2780546 Do not assume window is defined
It is notably not the case in web workers.
2018-02-28 23:24:53 +01:00
Guillaume Beraudo cfa9718df9 Remove window prefix
The prefix is unnecessary and prevent usage in web workers.
2018-02-28 23:22:18 +01:00
Guillaume Beraudo 94e821f9bf Make zoom to extent control extensible 2017-11-16 15:54:13 +01:00
Guillaume Beraudo b4ffc8cf75 Put greekeeper changelog in a separate block 2017-08-23 08:07:36 +02:00
Guillaume Beraudo 3b39ca350c Exclude greenkeeper merges from changelog
There is a great deal of lines about Greenkeeper merges in the changelog, making it
hard to find real changes to the code.

This commit modifies the changelog task to exclude such lines.
2017-08-21 14:55:43 +02:00
Guillaume Beraudo 63b14f5f32 Make ol.layer.Group change handling consistent
Changes to the layer were only propagated in some cases like addition/removal of a
layer to the group.

To make it consistent both with the rest of the group.js file and with the
layer.js file, the changes are now always notified.
2017-08-03 11:44:06 +02:00
Guillaume Beraudo c33383d248 Add rendering test for transparent layer 2017-07-12 10:56:15 +02:00
Guillaume Beraudo 645e359cde Render transparent vector layers to an intermediate canvas
Until now, the features of transparent vector layers were rendered using
the layer opacity. This caused colors to mix together and the opacities
to stack up to an higher value than the expected layer opacity.

With this commit, the features are rendered at 100% opacity to an
intermediate canvas which ensures colors do not mix up even in the case
of features using an array of styles. The intermediate canvas is then
composed to the map canvas using the layer opacity.

Transparent layers are automatically detected, non-transparent layers
are not affected by the change.
2017-07-12 09:23:04 +02:00
Guillaume Beraudo bb8a1b061c Make ol.source.Cluster extensible
Change from private to protected to allow extension.
2017-06-09 13:43:07 +02:00
Guillaume Beraudo 630d9c5200 Fix proj4 type
Previous typing was confusing the compiler. It could not figure out the
difference between the proj4 property and the constructor, which lead to
errors such as:

- ol.proj.setProj4(proj4)
ERR! compile /home/gberaudo/dev/ngeo/src/proj/epsg21781.js:8: ERROR - actual parameter 1 of ol.proj.setProj4 does not match formal parameter
ERR! compile found   : function (new:proj4): ?
ERR! compile required: (null|proj4)
ERR! compile   ol.proj.setProj4(proj4);
ERR! compile                    ^^^^^

- ol.proj.proj4.get().defs('EPSG:21781', epsg21781def)
ERR! compile /home/gberaudo/dev/ngeo/src/proj/epsg21781.js:26: ERROR - Property defs never defined on proj4
ERR! compile   ol.proj.proj4.get().defs('EPSG:21781', epsg21781def);
ERR! compile                       ^^^^
2017-03-22 09:47:29 +01:00
Guillaume Beraudo 687ef25649 Ignore unused local variable in all examples compile
This makes it consistent with the eslint configuration for examples in
examples/.eslintrc.
2017-01-31 14:40:18 +01:00
Guillaume Beraudo c77169fcac Update closure compiler to v20170124 2017-01-31 11:48:02 +01:00
Guillaume Beraudo c16cc286cd Prefer @override in the case there is no other annotations
See
https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#override
2017-01-31 09:31:34 +01:00
Guillaume Beraudo 1c353061fe Consistently handle not implemented methods 2017-01-31 09:21:01 +01:00
Guillaume Beraudo c9d33fb03a Fix missing require 2017-01-30 17:18:30 +01:00
Guillaume Beraudo b54ea89395 Handle concrete classes with non implemented abstract methods 2017-01-30 17:16:01 +01:00
Guillaume Beraudo 67a4eaa9d5 Move ol.interaction.TranslateEventType enum to its file 2017-01-18 22:33:48 +01:00
Guillaume Beraudo 6c9af04df3 Add ol.GeolocationProperty enum file 2017-01-18 21:11:59 +01:00
Guillaume Beraudo 1faead6d69 Rename and move some interaction enums 2017-01-18 21:11:59 +01:00
Guillaume Beraudo 109e6a8324 Make modify interaction more robust
When the map has not been rendered yet, adding a feature should not
trigger coordinate related functions as they make use of the framestate.
2016-12-07 11:15:28 +01:00
Guillaume Beraudo e40b545e40 Add basic WEBGL LineString rendering
Use gl.LINES and hardcode a width.
Implement polygon stroking using the line string replay.
2016-11-23 09:49:46 +01:00
Guillaume Beraudo 8e9b589ca9 Add tests to PolygonReplay renderer 2016-11-23 09:49:46 +01:00
Guillaume Beraudo 581ea8c775 Add color to WEBGL polygons 2016-11-23 09:49:46 +01:00
Guillaume Beraudo 2519cf36fc Basic WEBGL rendering of polygons 2016-11-23 09:49:46 +01:00
Guillaume Beraudo 8bdbe7aae0 Add earcut to package.json and wrap it in ol.ext
Earcut is a library for triangulating polygons.
See https://github.com/mapbox/earcut.
2016-11-23 09:49:46 +01:00
Guillaume Beraudo f3ca9e4bf5 ESLint rule typo 2016-08-31 11:15:28 +02:00
Guillaume Beraudo bb32b6ac55 Fix typo 2016-06-14 09:10:07 +02:00
Guillaume Beraudo e2b2004aa4 Make olx.view.FitOptions.padding optional
Makes it consistent with other attributes.
2016-05-03 13:44:58 +02:00
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