Commit Graph

3720 Commits

Author SHA1 Message Date
ahocevar 11ef2cb7d1 Better label placement for polygons
Using the y-coordinate of the polygon's bounding box, this
simple algorithm intersects the polygon with the horizontal
center line of its bounding box. The x-coordinate of the label
point is the center of the longest segment of this intersection
that is inside the polygon.
2013-07-20 10:36:13 +02:00
Frédéric Junod 58d3314f7a Merge pull request #868 from fredj/apidoc
Add basic ol.animation api doc
2013-07-19 11:10:16 -07:00
Éric Lemoine 65ec948cb0 Merge pull request #859 from elemoine/zoomtoextent
Add a ZoomToExtent control
2013-07-19 05:46:26 -07:00
ahocevar 781caff9e5 Expire tile by range and listen to changes
Instead of just listening for the first change, we now listen
for all changes, and expire tiles by tile range. The outcome is
that the vector layer's addFeatures and removeFeatures methods
now show instant results on the rendered map.
2013-07-19 14:07:16 +02:00
ahocevar d04c6f4c01 New pruneTileRange method
This also adds an assert that cache values are an instance of
ol.Tile in expireCache, instead of doing a type cast. Later we
will want to enforce the ol.Tile type by overriding the set
method.
2013-07-19 14:07:16 +02:00
ahocevar ac67c10acd Add and remove features with meaningful events
This adds a removeFeatures method, and makes the CHANGE event
more useful by adding information about changed features and
extent.
2013-07-19 14:07:15 +02:00
ahocevar c3bed305c7 Merge pull request #870 from ahocevar/vector-api
Give VectorSource the ability to load and parse data
2013-07-19 05:06:19 -07:00
ahocevar a9fcc5ff15 Addressing @elemoine's review comments 2013-07-19 13:30:14 +02:00
Éric Lemoine 4e1012823f Merge pull request #860 from elemoine/exports
Add exports
2013-07-18 04:21:59 -07:00
Frederic Junod a965d9ee9f Remove unused ol.Object#setOptions function 2013-07-17 13:50:43 +02:00
ahocevar 9095032014 Removing unused methods and changing getFeaturesObjectForExtent
With this change, getFeaturesObjectForExtent may return null if
the source does not have data loaded for the provided extent.
A callback can be passed to getFeaturesObjectForExtent to get
notified when the requested data is available.
2013-07-17 11:28:48 +02:00
ahocevar f325046a95 Allow VectorSource to load and parse data
This adds url, data and parser options to the source, and makes
EPSG:4326 the default projection. It also adds a prepareFeatures
method, which is used to load/parse data once the target
projection is known.
2013-07-17 11:24:34 +02:00
Frederic Junod 2565e00e1d Add basic ol.animation api doc 2013-07-17 10:56:19 +02:00
Éric Lemoine 907476f566 No need to impl setMap in ZoomToExtent control 2013-07-16 17:13:38 +02:00
Stéphane Brunner 86001fd331 Add zoom to extent control 2013-07-16 17:13:38 +02:00
Frederic Junod ad42496948 Initialize all the items in tileRangeByZ 2013-07-16 15:31:05 +02:00
Tim Schaub 8b93c5a0a0 Getters and setters for text symbolizer 2013-07-12 11:16:17 -06:00
Tim Schaub 0e87922389 Getters and setters for icon symbolizer 2013-07-12 10:42:59 -06:00
Tim Schaub 8844465188 Fixing bug with IconLiteral#equals and adding tests 2013-07-12 10:17:08 -06:00
Tim Schaub 2e08ccce03 Getters and setters for shape symbolizers 2013-07-12 09:57:40 -06:00
Tim Schaub a0d058b2fa Getters and setters for polygon symbolizer 2013-07-12 09:50:42 -06:00
Tim Schaub 711261171b Getters and setters for line symbolizers 2013-07-12 09:41:47 -06:00
Éric Lemoine 42d02e064e Export ol.layer.Layer and its getSource func 2013-07-12 10:21:01 +02:00
Éric Lemoine 9b039d76ea Export ol.source.TileSource and its getTileGrid func 2013-07-12 10:20:02 +02:00
Éric Lemoine b2fc570328 Export tilegrid.WMTS functions 2013-07-12 10:12:51 +02:00
Éric Lemoine c51265502d Export TileGrid functions 2013-07-12 10:12:30 +02:00
Éric Lemoine 757ccf148b Merge pull request #858 from elemoine/getzoom
Add ol.View2D#getZoom
2013-07-11 00:51:25 -07:00
Éric Lemoine 3e4d39b228 Export ol.View2D#getZoom 2013-07-11 09:50:31 +02:00
Éric Lemoine d7e838274e Merge pull request #840 from fredj/zoomcontrol
Add ol.control.Zoom#zoomByDelta function
2013-07-09 21:38:41 -07:00
Éric Lemoine 2cc5c7a776 Merge pull request #857 from elemoine/view2d-docs
Better View2D docs
2013-07-09 06:29:12 -07:00
Éric Lemoine daa03b5ef7 @class doc for View2D 2013-07-09 15:28:31 +02:00
Éric Lemoine 42abdb308a Better docs for View2DOptions 2013-07-09 15:28:31 +02:00
Frederic Junod 17f0d01e9f Add ol.control.Zoom#zoomByDelta function
To replace ol.control.Zoom#handleIn_ and ol.control.Zoom#handleOut_ callbacks.
2013-07-09 14:21:46 +02:00
Éric Lemoine f72784dc38 Merge pull request #855 from elemoine/zoom-slider-fix
Zoomslider cannot be added to a map with no target
2013-07-09 04:45:50 -07:00
Bart van den Eijnden 31fd41ab14 make filterMap_ static as proposed by @tschaub 2013-07-09 13:34:23 +02:00
Éric Lemoine 44a9c181aa handleMapPostrender may get a null frameState 2013-07-09 10:06:01 +02:00
Éric Lemoine ccf6aa10ac Zoomslider cannot be added to a map with no target
The zoom slider control's initSlider_ function requires that the control's element is inserted in the document. So if initSlider_ is called before the map have a target then the slider isn't correctly initialized. This commit fixes that by defering the slider initialization until the first handleMapPostrender call.
2013-07-09 10:05:15 +02:00
Éric Lemoine a10d142752 Add ol.View2D#getZoom 2013-07-09 09:30:45 +02:00
Bart van den Eijnden c299bfa1cb more dot notation 2013-07-08 17:29:32 +02:00
Bart van den Eijnden 499319fb99 address most of @tschaub's review comments, use dot notation where possible still needs to be done, and I have some questions on the _expression reader still 2013-07-08 17:04:27 +02:00
Tim Schaub 087b4d04a6 Merge pull request #809 from tschaub/clockwise
Consistent winding order for polygon rings.
2013-07-05 17:04:50 -07:00
Éric Lemoine 3af5e530ca Merge pull request #835 from elemoine/setzoom
Add ol.View2D.prototype.setZoom
2013-07-05 12:31:34 -07:00
Tim Schaub d482b66af3 Doc typo 2013-07-05 11:48:45 -06:00
Éric Lemoine 7efff5c3cf Merge pull request #833 from elemoine/stop-other-interactions
Remove ol.MapBrowserEvent#stopOtherInteractions
2013-07-04 00:48:35 -07:00
Éric Lemoine d0e198df93 Use constrainResolution function
Use the constrainResolution function when setting the initial view resolution.
2013-07-04 09:16:04 +02:00
Éric Lemoine e6efa741d2 More type checking for View2D 2013-07-04 09:13:31 +02:00
Éric Lemoine 552853a3b8 Remove unused createContinuous function 2013-07-04 08:58:33 +02:00
Éric Lemoine 0cf4024194 Add ol.View2D.prototype.setZoom 2013-07-04 08:58:32 +02:00
Bart van den Eijnden ab40ab6208 Add parser for OGC Filter 1.0 and 1.1 (read/write)
This work is based on the ol.expr package by @tschaub.
It adds a few named expression functions to that package:

 * INTERSECTS, CONTAINS, DWITHIN, WITHIN (no client-side implementation as yet)
 * LIKE (like comparison with wildcard, singleChar and escapeChar)
 * IEQ (case-insensitive equality)
 * INEQ (case-insensitive non-equality)

It also adds a few extra parameters to the existing EXTENT function to be able
to deserialize and serialize all info (i.e. projection and property name).

Some changes were needed for the GML parser as well:

 * createGeometry function needed to be public
 * when parsing Box (GML2) and Envelope (GML3) also parse the srsName
 * fix up writing for Box and Envelope now that bounds is an array

Also added createDocumentFragment function to the XML parser. Implementation
is similar to OpenLayers 2.

Some addtional notes on the implementation:

 * PropertyIsBetween was implemented as an ol.expr.Logical with operator
   ol.expr.LogicalOp.AND and two ol.expr.Comparison instances with operator
   ol.expr.ComparisonOp.GTE and ol.expr.ComparisonOp.LTE
 * In OGC Filter And and Or can contain more than 2 sub filters, so this
   is translated into a hierarchy of ol.expr.Logical
2013-07-03 13:09:25 +02:00
Frederic Junod 1c3369a3f6 Add className parameter documentation 2013-07-01 15:04:14 +02:00