Commit Graph
100 Commits
Author SHA1 Message Date
Éric Lemoine 2211aec553 Use rBush.getAll and rBush.getAllInExtent 2013-11-27 15:54:00 +01:00
Éric Lemoine 1192162792 Merge branch 'master' into vector-api 2013-11-27 15:40:22 +01:00
Éric Lemoine 8f361e35dd Do not draw non-loaded icons 2013-11-27 10:03:23 +01:00
Éric Lemoine 82e03ea508 Add an icon example 2013-11-26 16:32:03 +01:00
Éric Lemoine 9365c227ab Make icon size optional 2013-11-26 16:19:57 +01:00
Éric Lemoine 519e2539cc Export ol.icon.renderIcon 2013-11-26 15:33:27 +01:00
Éric Lemoine 83293651b7 Add ol.icon.renderIcon 2013-11-26 15:33:27 +01:00
Éric Lemoine 0a4fd29c10 Add icon support to canvas vector renderer 2013-11-26 15:25:32 +01:00
Éric Lemoine b1a123a927 Shapes are loaded images 2013-11-26 15:23:55 +01:00
Éric Lemoine 189a859dde Export ol.style.Image options 2013-11-26 15:21:51 +01:00
Éric Lemoine 29009d27f3 Make ol.style.Image loadable 2013-11-26 15:20:04 +01:00
Éric Lemoine 1d8fefe683 Adapt styleFunction in vector-layer example 2013-11-26 14:19:24 +01:00
Éric Lemoine 972deebbc6 Adapt styleFunction in synthetic-points example 2013-11-26 14:19:24 +01:00
Éric Lemoine 9be03b2e3a Use ol.style.Style in synthetic-points example 2013-11-26 14:19:24 +01:00
Éric Lemoine 305be3c689 Adapt styleFunction in synthetic-lines example 2013-11-26 14:19:24 +01:00
Éric Lemoine 82aa5cc675 Adapt styleFunction in rtree example 2013-11-26 14:19:24 +01:00
Éric Lemoine 39af934e71 Adapt styleFunction in geojson example 2013-11-26 14:19:24 +01:00
Éric Lemoine 317294756a Style function takes a resolution arg 2013-11-26 14:19:24 +01:00
Éric Lemoine 3820caade1 Style function returns an array of styles 2013-11-26 14:19:24 +01:00
Éric Lemoine 6ca2fef0a3 Always same format for color strings 2013-11-22 17:02:59 +01:00
Éric Lemoine b78bcce8ab Draw a temporary point in geojson example 2013-11-22 17:01:55 +01:00
Éric Lemoine 95826cd3c8 Add FIXME 2013-11-22 17:01:55 +01:00
Éric Lemoine 34ce9e478d Store raw style values in immediate objects
This commit also uses default style values (e.g.  ol.render.canvas.defaultStrokeFill) when no value is defined by the user.
2013-11-22 17:01:54 +01:00
Éric Lemoine 68caa8141c Fix typo in replay code 2013-11-22 16:36:06 +01:00
Éric Lemoine c4731ff37b Use canvas style default values 2013-11-22 11:49:14 +01:00
Éric Lemoine 2a122f057c Rename currentFillColor to currentFillStyle 2013-11-22 11:49:14 +01:00
Éric Lemoine d3ad1a7506 Add canvas style default values 2013-11-22 11:49:14 +01:00
Éric Lemoine 92a34d380b Make setting image rotation and subtractViewRotation optional 2013-11-22 11:49:13 +01:00
Éric Lemoine 66bda92597 Make setting stroke color and width optional 2013-11-22 11:49:13 +01:00
Éric Lemoine 3655d15f61 Make setting a fill color optional 2013-11-22 11:49:13 +01:00
Éric Lemoine 381eef2cfb Simplify style setting in geojson example 2013-11-21 23:06:01 +01:00
Éric Lemoine ff66a60e5e Export ol.webgl.Context
It's used in the layer-clipping-webgl example
2013-11-21 23:04:37 +01:00
Éric Lemoine d973c40141 Export getAllFeaturesAtCoordinate 2013-11-21 23:04:37 +01:00
Éric Lemoine 43a903d98b Make vector-layer example work when hosted 2013-11-21 23:04:37 +01:00
Éric Lemoine ed79da6c0c Add vector tag to geojson example 2013-11-21 23:02:25 +01:00
Éric Lemoine 4b91065f00 Make dynamic-data example work when hosted 2013-11-21 23:02:25 +01:00
Éric Lemoine 082d126544 synthetic-data example renamed to synthetic-points 2013-11-21 23:02:24 +01:00
Éric Lemoine c0eb7bb1f6 Store raw style values for ImageReplay 2013-11-21 12:15:38 +01:00
Éric Lemoine 5493543c1f Store raw style values for PolygonReplay 2013-11-21 12:15:37 +01:00
Éric Lemoine 0ccd1ef217 Store raw style values for LineStringReplay 2013-11-21 12:15:37 +01:00
Éric Lemoine 93087c7661 Remove unused ol.style.Text width property 2013-11-20 15:48:11 +01:00
Éric Lemoine 38bc0a28a6 Export ol.style.Style 2013-11-20 15:35:11 +01:00
Éric Lemoine e783703854 Export ol.style.Text 2013-11-20 15:35:11 +01:00
Éric Lemoine dc49cc4c2f Export ol.style.Stroke 2013-11-20 15:35:11 +01:00
Éric Lemoine 3971425677 Export ol.style.Image 2013-11-20 15:35:11 +01:00
Éric Lemoine 6e2f907e09 Export ol.style.Fill 2013-11-20 15:35:11 +01:00
Éric Lemoine 16f3d5879e Use new ol.style in vector-layer example 2013-11-20 15:35:11 +01:00
Éric Lemoine 7d9b09b4ac Use new ol.style in synthetic-lines example 2013-11-20 15:35:11 +01:00
Éric Lemoine ddb2786394 Use new ol.style in synthetic-data example 2013-11-20 15:35:11 +01:00
Éric Lemoine 6db824baa4 Use new ol.style in rtree example 2013-11-20 15:35:10 +01:00
Éric Lemoine 602fd7f13a Use new ol.style in geojson example 2013-11-20 15:35:10 +01:00
Éric Lemoine db7ce8e657 Use new ol.style in dynamic-data example 2013-11-20 15:35:10 +01:00
Éric Lemoine 644748860b Remove the previous ol.style types and functions 2013-11-20 15:35:10 +01:00
Éric Lemoine efba141bf0 Do not use default style function 2013-11-20 15:35:10 +01:00
Éric Lemoine ddacc0aabd Use new ol.style in ol.shape.renderCircle 2013-11-20 15:35:10 +01:00
Éric Lemoine 1e7266f6b5 Use new ol.style in ol.render.canvas.Replay 2013-11-20 15:35:10 +01:00
Éric Lemoine e535a8360f Use new ol.style in ol.render.canvas.Immediate 2013-11-20 15:35:10 +01:00
Éric Lemoine fd0ef8f238 Use new ol.style in ol.render.DragBox 2013-11-20 15:35:10 +01:00
Éric Lemoine cef2cac0d3 Add ol.style.Text constructor 2013-11-20 15:35:09 +01:00
Éric Lemoine f1d67f69c3 Add ol.style.Stroke constructor 2013-11-20 15:35:09 +01:00
Éric Lemoine 22fa0e305a Add ol.style.Image constructor 2013-11-20 15:35:09 +01:00
Éric Lemoine f38054d737 Add ol.style.Fill constructor 2013-11-20 15:35:09 +01:00
Éric Lemoine 1cfd185355 Add ol.style.Style constructor 2013-11-20 15:35:09 +01:00
Éric Lemoine c217c95e6d Add a WebGL layer clipping example 2013-11-20 11:45:25 +01:00
Éric Lemoine 215344af71 Set stencil to true in webgl context 2013-11-20 11:45:25 +01:00
Éric Lemoine 93aef958e9 Move arrayBuffer_ to layer renderer 2013-11-20 11:45:25 +01:00
Éric Lemoine 1c03886e1c Rename arrayBuffer_ to renderArrayBuffer_ 2013-11-20 11:45:25 +01:00
Éric Lemoine eead07b0bb Fire pre and postcompose events from webgl map 2013-11-20 11:45:25 +01:00
Éric Lemoine 8d191ca4b8 Fire pre and postcompose events from webgl layers 2013-11-20 11:45:25 +01:00
Éric Lemoine 478f8c43ca ol.render.Event take an ol.webgl.Context object 2013-11-20 11:45:24 +01:00
Éric Lemoine 325534aa46 Fire precompose events from map 2013-11-20 11:45:24 +01:00
Éric Lemoine 4090b3f8b1 Phantomjs does not have requestAnimationFrame 2013-11-20 11:44:49 +01:00
Éric Lemoine 6493998a22 Add a synthetic-lines example 2013-11-20 11:44:49 +01:00
Éric Lemoine b698c5bf7b Add a layer clipping example 2013-11-20 11:44:47 +01:00
Éric Lemoine 2073d78582 Fire precompose events from layers 2013-11-20 11:44:47 +01:00
Éric Lemoine c0e1c7051b Add display-frame-rate.js script 2013-11-20 11:44:45 +01:00
Éric Lemoine 60ef4f214e Rename symbol to shape 2013-11-20 11:44:45 +01:00
Éric Lemoine 0d84befe83 Add synthetic-data example 2013-11-20 11:39:18 +01:00
Éric Lemoine 0c9f7eb616 Use experimental canvas vector layer renderer 2013-11-20 11:39:16 +01:00
Éric Lemoine 4b9642f4b1 Experimental canvas vector layer renderer 2013-11-20 11:36:28 +01:00
Éric Lemoine 8d57f0c78b Stop clicks on zoom slider thumb 2013-11-17 00:05:16 +01:00
Éric Lemoine a898b9588e Handle click on zoom slider 2013-11-17 00:05:16 +01:00
Éric Lemoine 9ff7470f65 Change ol.control.ZoomSlider#amountDragged_ signature 2013-11-17 00:05:15 +01:00
Éric Lemoine 14f5e5aedc Do not pretend the zoom slider supports touch 2013-11-17 00:05:15 +01:00
Éric Lemoine 2a20693ffb Fix issue where map is stuck in drag mode
If the control container stops "up" events the map browser event handler won't see these events and will keep triggering "drag" events.
2013-11-16 23:41:48 +01:00
Éric Lemoine 559cad4cf3 Simplify zoom slider code 2013-11-16 23:29:22 +01:00
Éric Lemoine 16b0e73666 Better use of good.dom.createDom in zoom slider 2013-11-16 23:22:41 +01:00
Éric Lemoine d81fe5ac95 Map browser event handler refactoring
This commit refactors the code of the map browser event handler. The changes are the following:

Previously the `handleTouch*_` listener functions handled both `touch*` and `mspointer*` events. With this commit we use per-event type listeners. This duplicates some code (could be avoidable), but makes it easier to introduce mouse/touch/pointer specific treatments in the future.

We now listen to pointermove, pointerup, touchmove and touchend only when needed. In this way we're assured that a `down` event was received (and that `this.down_` is set) when the `up` or `move` listeners are called. This fixes the bug @oterral reported on the mailing list: https://groups.google.com/d/msg/ol3-dev/jR844F7Nlg8/eN9dt4uATK0J.

To avoid problems in browsers that trigger different types of events (e.g. both mouse and pointer events) the `down` listeners unregister the other `down` listeners. For example, the `pointerdown` listener unregisters the `mousedown` and `touchstart` listeners, for ever.
2013-10-31 13:35:01 +01:00
Éric Lemoine 8402eee0c3 Map "click" event renamed to "singleclick"
As discussed with @tschaub in #1195.
2013-10-31 09:37:16 +01:00
Éric Lemoine 2c930d74b5 clickOnly condition checks map clicks 2013-10-30 13:17:12 +01:00
Éric Lemoine 6ab88aad72 Add tests for emulated clicks 2013-10-30 13:16:09 +01:00
Éric Lemoine 0fa66cc7e7 Remove mousedown listener on first touchstart 2013-10-30 13:16:09 +01:00
Éric Lemoine 9f7ead5ef4 Remove unused ol.MapBrowserEventHandler#relayEvent_ func 2013-10-30 13:16:09 +01:00
Éric Lemoine a85b82090d Emulate click events only on mouse "action"
`click` events are fired only if the mouse action button is pressed. This prevents `click` events from being fired when the middle mouse button is used.

Also, without this commit, in Chrome with emulated touch events enabled, double-clicking the map doesn't zoom the map. This is because `ol.BrowserFeature.HAS_TOUCH` is `false` in that environment. The commit fixes it by testing `isMouseActionButton` on mouse devices only.
2013-10-30 13:16:09 +01:00
Éric Lemoine 0c212fdcb5 Emulated click events on mouse devices
The map already emits emulated `click` and `dblclick` events on touch and pointer devices. With this commit the map emits emulated `click` and `dblclick` events on mouse devices as well.
2013-10-30 13:16:09 +01:00
Éric Lemoine 16b817b830 Overlay stopEvent and insertFirst default to true 2013-10-30 09:49:38 +01:00
Éric Lemoine c065282243 Stop mspointer events
Stop mspointerup and mspointerdown events reaching the "stop event" overlay container.
2013-10-21 15:33:12 +02:00
Éric Lemoine 1c890d837e Unconditonally set the framestate focus 2013-10-18 10:03:59 +02:00
Éric Lemoine 08bad9746b Do not relay mouseout events 2013-10-18 10:00:53 +02:00
Éric Lemoine 4008ab7f6c Vector examples display feature info on click again 2013-10-18 09:59:47 +02:00