Commit Graph

12909 Commits

Author SHA1 Message Date
Antoine Abt
1970285066 Merge pull request #1704 from tonio/fix_fullscreen
Prevent OSX Safari to display distorted map
2014-02-14 13:55:28 +01:00
Antoine Abt
bb50d5936f Prevent OSX Safari to display distorded map 2014-02-14 11:32:00 +01:00
ahocevar
f5c80f40bd Merge pull request #1700 from ahocevar/document-browserfeature
Make ol.BrowserFeature appear in API docs
2014-02-14 11:05:28 +01:00
Antoine Abt
4478d6c34c Fixes mobile fullscreen example (no mode chooser) 2014-02-14 09:32:14 +01:00
Antoine Abt
4dd8c248f5 Remove ol.RendererHints.createFromQueryData 2014-02-14 09:32:14 +01:00
Antoine Abt
21bfdb1d1e Add example extern for exampleNS 2014-02-14 09:32:14 +01:00
ahocevar
7c29fe974b Merge pull request #1693 from ahocevar/no-load-on-interacting
Do not load tiles while interacting
2014-02-13 23:29:00 +01:00
ahocevar
adad57d481 Make the default effectively truthy 2014-02-13 22:52:48 +01:00
ahocevar
aa5a08a377 No typecast needed 2014-02-13 22:29:20 +01:00
ahocevar
3cc1dad2e0 Make loading parameters configurable 2014-02-13 22:08:26 +01:00
ahocevar
877e881a52 Do not load tiles while interacting
Especially on mobile devices, loading just a single tile can
cause major janks. During animations, it is fine to just skip
frames. But during user interaction (e.g. dragging), a more
instant visual feedback is desirable.
2014-02-13 21:03:21 +01:00
ahocevar
0200ee4f48 Make ol.BrowserFeature appear in API docs 2014-02-13 21:00:57 +01:00
ahocevar
4d0d2500a2 Merge pull request #1699 from ahocevar/logo-position
Fix logo position in apps without Bootstrap
2014-02-13 20:54:09 +01:00
Tim Schaub
e9b4e42d84 Create anonymous functions in an execution context with limited scope 2014-02-13 10:49:01 -07:00
Tim Schaub
0ec5201f3a Documentation and exports 2014-02-13 10:37:10 -07:00
Tim Schaub
66d5d1d277 Export setStyle for vector layer 2014-02-13 10:25:17 -07:00
Tim Schaub
f4585331f2 Add setStyle and getStyle to ol.Feature
As with vector layers and feature overlays, feature style can be set by calling
setStyle.  Calling getStyle returns what was passed to setStyle.  Internally, we call getStyleFunction.
2014-02-13 10:25:17 -07:00
Tim Schaub
477c369f6c As with the vector layer, feature overlays have getStyle and setStyle 2014-02-13 10:25:17 -07:00
Tim Schaub
a1f714f7dc Add setStyle and getStyle methods to ol.layer.Vector
The setStyle method accepts a single style, an array of styles, or a style function.  The getStyle method returns what was set.  Internally, we use the getStyleFunction method which always returns a function.  When calling setStyle, a change event is dispatched (fixes #1671).
2014-02-13 10:25:17 -07:00
Tim Schaub
a185fc963d Tests for get/setStyleFunction
It would be nice to also test the following:

    it('does not return user set property with the same name', function() {
      var feature = new ol.Feature({
        whatever: 'some value',
        styleFunction: 'another value'
      });
      expect(feature.getStyleFunction()).to.be(undefined);
    });

Unfortunately, in uncompiled code (or if we export `setStyleFunction`) this does not work.  Same goes for user set `id` properties (this will set our internal `id_` property).  See #1672.
2014-02-13 10:25:17 -07:00
Tim Schaub
620a38d3e9 Avoid clashing with user property names
Features are records with any number of user set values.  Separate from this, we rely on feature properties like the feature identifier and feature style.  The two (user properties and our internal properties) should not be mixed.
2014-02-13 10:25:17 -07:00
Tim Schaub
10d5073732 Give the draw interaction a style option 2014-02-13 10:25:17 -07:00
Tim Schaub
76f6961f83 Delete style option before passing to base 2014-02-13 10:25:16 -07:00
Tim Schaub
c64c24d3dc Common code for creating a style function 2014-02-13 10:25:16 -07:00
Tim Schaub
6abb691224 Give feature overlays a style option 2014-02-13 10:25:16 -07:00
Tim Schaub
b309c44020 Give vector image source a style option 2014-02-13 10:25:16 -07:00
Tim Schaub
1072f6dfa7 Use style option in vector layer examples
Providing a styleFunction option still works because the layer property is still named styleFunction.
2014-02-13 10:25:16 -07:00
Tim Schaub
5c21f24df5 Add tests for vector layer 2014-02-13 10:25:16 -07:00
Tim Schaub
499ba4ac8f Add a style option for vector layers
This can be a single ol.style.Style, and array of styles, or a style function.
2014-02-13 10:25:16 -07:00
ahocevar
672fc681ec Fix logo position in apps without Bootstrap 2014-02-13 18:12:26 +01:00
Antoine Abt
b169ef2094 Add renderer guess in example shared file
& use it in every example.
2014-02-13 17:21:03 +01:00
Antoine Abt
2369ac62eb Load example-behaviour before example script 2014-02-13 17:21:02 +01:00
Bart van den Eijnden
990a852d4f Merge pull request #1675 from bartvde/wmts-example-fix
WMTS example is broken (r=@twpayne)
2014-02-13 16:25:59 +01:00
Bart van den Eijnden
56a39e936f Use APOLLO imagery WMTS in the WMTS example 2014-02-13 16:14:39 +01:00
Tom Payne
03beeafc21 Merge pull request #1681 from twpayne/line-dash
Fix management of line dash state
2014-02-13 15:40:39 +01:00
Tom Payne
dfc57e9db4 Fix handling of line dash state in ol.render.canvas.Immediate 2014-02-13 15:30:04 +01:00
Tom Payne
32e527458b Merge pull request #1694 from twpayne/protocol-relative-url
Use protocol relative URL in tile sources
2014-02-13 15:26:38 +01:00
Tom Payne
c31d423717 Merge pull request #1695 from twpayne/fix-render-node-leak
Save replay group, even if empty
2014-02-13 15:25:56 +01:00
Tom Payne
a178712f6b Only replay replay group if it is not empty 2014-02-13 14:47:47 +01:00
Tom Payne
5b8e85afbd Save replay group, even if it is empty 2014-02-13 14:36:59 +01:00
Tom Payne
02b4e7cced Use protocol relative URL in ol.source.Stamen 2014-02-13 13:48:06 +01:00
Tom Payne
bb7a1c11f6 Use protocol relative URL in ol.source.MapQuest 2014-02-13 13:47:13 +01:00
Frédéric Junod
0007b5e3ec Merge pull request #1692 from fredj/osm-tiles
Use protocol relative URL for OSM tiles
2014-02-13 12:14:59 +01:00
Frederic Junod
4cb4ab89db Use protocol relative URL for OSM tiles 2014-02-13 11:21:27 +01:00
ahocevar
20402a6e71 Merge pull request #1684 from ahocevar/ie-cursor
Changing pointer cursor in examples is broken
2014-02-12 23:30:06 +01:00
Tom Payne
5cc3983cdb Fix handling of line dash state in ol.render.canvas.Replay 2014-02-12 17:59:11 +01:00
Tom Payne
a74da436d2 Use ol.BrowserFeature.HAS_CANVAS_LINE_DASH in ol.render.canvas.Replay 2014-02-12 17:57:29 +01:00
Tom Payne
1924e2b9b3 Add detection of canvas line dash support 2014-02-12 15:56:01 +01:00
Antoine Abt
196f6cccfd Merge pull request #1689 from tonio/fix_modify
Check for geometries type instead of `instanceof`
2014-02-12 15:51:32 +01:00
Antoine Abt
f8a748d7f4 Fix MultiPoint modify 2014-02-12 15:26:57 +01:00