Commit Graph

4736 Commits

Author SHA1 Message Date
ahocevar
b4043398eb Added wpt serialization for ol.format.GPX 2014-02-21 07:18:42 +01:00
ahocevar
45860f4552 Framework for serializing structures to XML
This adds several helper functions for serializing to XML:

* ol.xml.serialize: Counterpart to ol.xml.parse. By splitting
  the serialization process up into a node factory and a node
  writer, note writers can easily be used for different
  namespaces.

* ol.xml.pushSerializeAndPop: Counterpart to
  ol.xml.pushParseAndPop.

* ol.xml.makeStructureNS: Works like ol.xml.createParsersNS,
  but works for arbitrary structures.

* ol.xml.makeChildAppender: If the top item of the stack has
  the new ol.xml.NodeStackItem type, this helper function
  can be used to create a serializer that appends the current
  node to its designated parent.

* ol.xml.makeChildNodeFactory: Creates a node factory which
  produces child nodes from an array of node names which are
  passed to ol.xml.serialize.

* ol.xml.makeSequence: A convenience function for creating
  xsd:sequence structures. Takes an object literal and an
  ordered list of the keys, and returns an array that can be
  passed as values to ol.xml.serialize.

* ol.xml.makeSimpleTypeWriter: Using e.g. the new write*TextNode
  functions from ol.format.XSD, this function creates a node
  writer that writes simple type nodes for values like strings
  or numbers.

The following commits will be using this new framework for
implementing ol.format.GPX.writeFeatures, and prose
documentation with instructions based on what was said above
will be added.
2014-02-21 07:18:36 +01:00
ahocevar
3463defd9c Merge pull request #1707 from ahocevar/css-transform-detection
CSS transform detection when DOM is ready
2014-02-16 02:47:02 +01:00
ahocevar
f3c099de8a Simplifying has2d and has3d check 2014-02-16 02:29:14 +01:00
ahocevar
91a736954d Properly cache the css transform support result 2014-02-15 17:37:37 +01:00
Tom Payne
a5fd5667b6 Set text style in ol.render.canvas.Immediate 2014-02-15 14:17:10 +01:00
ahocevar
81f7ea106b CSS transform detection when DOM is ready
The code to detect CSS transforms requires a DOM to append an
element to. By performing this action when first called instead
of unconditionally upon library load, we can load OpenLayers in
the document's head again.
2014-02-15 10:48:04 +01:00
Tim Schaub
a549df459b Merge pull request #1690 from tschaub/style
Accept a style option and provide setStyle and getStyle methods.
2014-02-14 13:44:15 -07:00
Bart van den Eijnden
d71ccf64b9 Merge pull request #1682 from bartvde/issue-1682
better description for function typedef's params and return (r=@ahocevar)
2014-02-14 15:41:47 +01:00
Bart van den Eijnden
87d651af04 Add documentation for API typedef functions 2014-02-14 15:32:12 +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
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
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
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
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
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
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
Frederic Junod
4cb4ab89db Use protocol relative URL for OSM tiles 2014-02-13 11:21:27 +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
f8a748d7f4 Fix MultiPoint modify 2014-02-12 15:26:57 +01:00
Antoine Abt
56a1f053ff Check geometry type instead of instanceof 2014-02-12 15:25:47 +01:00
Antoine Abt
0764ea99ee Merge pull request #1654 from tonio/vector-api-modify
Add Modify Interaction
2014-02-11 16:59:43 +01:00
Tom Payne
e0765240a2 Merge branch 'ie-compat' of git://github.com/Intermedix/ol3 into Intermedix-ie-compat 2014-02-11 16:54:39 +01:00
Bart van den Eijnden
ee33cbc525 Merge pull request #1650 from bartvde/apidoc
missing link in api doc (r=@ahocevar)
2014-02-11 15:02:12 +01:00
Bart van den Eijnden
304e7c7df7 Add properties found in objectliterals.jsdoc to the API 2014-02-11 14:49:04 +01:00
Antoine Abt
03624b5f78 Check segment writers existence 2014-02-11 14:36:54 +01:00
oterral
3a7c80dfda Remove exports from ol.style.Image 2014-02-11 13:13:51 +01:00
oterral
8edcc7e161 Add exports for ol.style.Text 2014-02-11 12:33:12 +01:00