Commit Graph

986 Commits

Author SHA1 Message Date
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 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 c64c24d3dc Common code for creating a style function 2014-02-13 10:25:16 -07:00
Tim Schaub 5c21f24df5 Add tests for vector layer 2014-02-13 10:25:16 -07:00
Antoine Abt 8f9e2ea88d Merge pull request #1649 from tonio/geometrycollection_change
Make GeometryCollection propagate change events of its geometries.
2014-02-06 16:33:13 +01:00
Tom Payne b5da2d387b Merge pull request #1651 from twpayne/fix-rbush-remove
Fix ol.structs.RBush#remove
2014-02-06 13:56:24 +01:00
Éric Lemoine c2d0cab07a Add tests for ol.style.IconImageCache 2014-02-06 12:59:39 +01:00
Éric Lemoine 90c41523a2 Add tests for ol.renderer.vector 2014-02-06 12:59:39 +01:00
Éric Lemoine ae2b3359f8 Fix the kml format tests 2014-02-06 12:59:38 +01:00
Frederic Junod c94b78144f Fix test description 2014-02-06 12:48:51 +01:00
Antoine Abt ef27ed7aef Add failing test for change event propagation 2014-02-06 10:31:01 +01:00
Tom Payne 0b4b6e2a75 Merge pull request #1639 from twpayne/kml-ie9
KML support for Internet Explorer
2014-02-05 14:23:07 +01:00
Hadrien Tulipe b5fefc9ab3 Supprt parsing of kml:datetime (#1585)
This commit modifies the previous regex used to match following
datetimes:

- 2014
- 2014-02
- 2014-02-15

The new regex also matches dates that were matched by the previous
regex.

This commit also include a unit test for kml:dateTime parsing.
2014-02-04 22:36:42 +01:00
Tom Payne 7940a2fc64 Don't use problematic afterLoadXml function 2014-02-04 22:20:45 +01:00
Tom Payne 2b268e284e Fix closing tag in tests 2014-02-04 17:36:56 +01:00
Tom Payne 62114a73e2 Fix typo in tests 2014-02-04 17:36:56 +01:00
Tom Payne a37199675c Add ol.geom.MultiLineString#getFlatMidpoints 2014-02-03 15:49:03 +01:00
Tom Payne 8e46c91bae Add ol.geom.LineString#getFlatMidpoint 2014-02-03 15:49:03 +01:00
Bart van den Eijnden 1ada9dfea5 Add export for ol.proj.METERS_PER_UNIT 2014-01-30 11:12:17 +01:00
Tom Payne d4db171a3c Merge pull request #1588 from twpayne/event-properties
Use properties, not get* methods, in events
2014-01-29 06:23:30 -08:00
Tom Payne 318fc68159 Convert ol.MapBrowserEvent#get* methods into properties 2014-01-29 14:51:27 +01:00
oterral 63c321b980 Lets ol.style.Icon to define default values 2014-01-28 13:30:11 +01:00
Tom Payne 37351c530c Convert ol.ObjectEvent#getKey method into key property 2014-01-27 15:53:58 +01:00
Tom Payne 3d68a3550e Convert ol.CollectionEvent#getElement method into element property 2014-01-27 15:52:03 +01:00
Bart van den Eijnden 2fc884a3d9 simplify the assignment of this.target_ 2014-01-27 15:22:25 +01:00
Bart van den Eijnden e6c4fd973a allow target to be specified as a string for controls, update the documentation to make more clear what element and target are for 2014-01-27 15:22:25 +01:00
oterral b2819a2332 Add some tests for drawing polygons 2014-01-22 09:59:04 +01:00
Tom Payne 913038a124 Merge pull request #1560 from twpayne/hide-oriented-rings
Hide oriented rings
2014-01-21 11:40:40 -08:00
Tim Schaub b7ed585e31 Reminder to remove workaround when GeoServer GeoJSON issue is fixed
See #1566 and http://jira.codehaus.org/browse/GEOS-5996
2014-01-21 09:59:25 -07:00
Tom Payne 4d88d53146 Add test for ol.geom.Polygon#getLinearRings 2014-01-21 16:11:53 +01:00
Tom Payne 8e372f8db0 Don't automatically orient rings in ol.geom.MultiPolygon 2014-01-21 16:11:52 +01:00
Tom Payne 5b5865d48e Add ol.geom.Polygon#getOrientedFlatCoordinates 2014-01-21 16:11:52 +01:00
Tom Payne ff73f080b3 Don't automatically orient rings in ol.geom.Polygon 2014-01-21 16:07:26 +01:00
Tom Payne f9e0167b66 Parse out-of-spec CRSs generated by GeoServer 2014-01-21 16:02:02 +01:00
Tom Payne 8a7484c0de Add test for ol.structs.RBush#update with single object 2014-01-20 18:16:49 +01:00
Éric Lemoine 8b52adfce3 Merge pull request #1540 from elemoine/draw
Configure draw interaction with a vector source instead of a layer
2014-01-20 08:02:19 -08:00
oterral 84be78b35a Add parsing of <gx:Track> in <Placemark> 2014-01-20 16:32:17 +01:00
Éric Lemoine 9d6d0e03c2 Configure draw interaction with a vector source 2014-01-20 16:09:48 +01:00
Éric Lemoine 646dd18149 Merge pull request #1547 from elemoine/gfi
Add getGetFeatureInfoUrl methods to ImageWMS and TileWMS sources
2014-01-20 05:22:40 -08:00
Tom Payne 52a0263310 Preserve extra dimensions in ol.geom.MultiPoint#closestPointXY 2014-01-20 09:39:09 +01:00
Tom Payne 2da724572a Preserve extra dimensions in ol.geom.Point#closestPointXY 2014-01-20 09:32:21 +01:00
Tom Payne 6f0f42040c Linearly interpolate extra dimensions in ol.geom.flat.closestPoint 2014-01-20 09:24:41 +01:00
Tom Payne 5bee477734 Maintain M and Z coordinates in ol.geom.Circle#getClosestPoint 2014-01-20 08:55:28 +01:00
Éric Lemoine eb19000a06 Add tests for ol.source.TileWMS#getGetFeatureInfoUrl 2014-01-19 21:52:28 +01:00
Éric Lemoine f1fa0fcfc6 Add tests for ol.source.ImageWMS#getGetFeatureInfoUrl 2014-01-19 21:49:48 +01:00
Tom Payne 917b6cda8f Add ol.source.GPX 2014-01-16 22:44:18 +01:00
Tom Payne fa89c1c3a3 Add ol.format.GPX 2014-01-16 22:44:18 +01:00
Tom Payne bb758c7ee9 Merge pull request #1533 from twpayne/vector-api-tile-hidpi
[vector-api] HiDPI support for tile layers
2014-01-16 06:55:54 -08:00
Antoine Abt c8e7c9f64e Add support for reading id & properties 2014-01-16 10:25:19 +01:00