Commit Graph

258 Commits

Author SHA1 Message Date
Olivier Terral cc3660f32a Fix getImageElement calls in canvas and webgl renderer 2013-10-28 14:04:40 +01:00
ahocevar 33f426fd85 Merge pull request #1135 from ahocevar/no-blur
Use integers when positioning on the target canvas
2013-10-16 09:03:08 -07:00
ahocevar 386fac2429 Use integers when positioning on the target canvas
This avoids blurred images after view center changes (dx, dy)
and at fractional zoom levels (dw, dh).
2013-10-16 16:39:45 +02:00
Tim Schaub b02f47a5a5 Align pixels when drawing icons or shapes
The floor before setting the transform ensures that we translate by integer pixels for odd and even dimenstions.  The round before drawing the image ensures pixels are aligned.
2013-10-15 22:12:12 -06:00
Tim Schaub 2011e02364 Avoid calling lineTo on the same pixel for polygon stroke 2013-10-14 17:07:06 -06:00
Tim Schaub 71a6c4f270 Only call lineTo if we are in a new pixel for linestring
Rendering performance degrades as the context lineWidth increases when calling lineTo many times for the same pixel coordinate.  This appears to be a widespread performance issue and is very clearly improved by only calling lineTo when in a new pixel coordinate.
2013-10-14 17:06:44 -06:00
Tim Schaub 2ee776d9f6 Support fontWeight in text symbolizer 2013-10-09 11:59:30 -06:00
Tim Schaub 539ecbdd9c Add stroke support for text symbolizers 2013-10-07 16:17:38 -06:00
ahocevar 52552c9b18 Fire change events for multi-part geometries 2013-10-04 23:36:16 -06:00
Tim Schaub 626a319222 Accessor for polygon rings 2013-10-03 12:28:34 -06:00
Tim Schaub 64dd5cfc1f Extend goog.events.Event for custom vector layer events
Vector events include features and extents.  In the case of feature change events, the extents array will include old and new extents for features with modified geometries.w
2013-10-03 11:25:30 -06:00
ahocevar dbb9525515 No longer group features by geometry type
With symbolizer literals now being geometry type specific, we no
longer need the overhead to query the RTree separately for each
geometry type and render symbolizer groups by geometry type.

The geometry type index of the FeatureCache is no longer needed.

The filtering functionality of the FeatureCache's
getFeaturesObject method can be removed because it is no longer
used.
2013-10-03 08:35:11 -06:00
ahocevar adc1d130c8 Rename ol.renderer.canvas.VectorRenderer
To be consistent with our naming convention, this one should be
renamed to ol.renderer.canvas.Vector.
2013-10-02 15:58:27 -06:00
Tom Payne 167b309242 Replace source ready flag with loading/ready/error enum 2013-09-30 13:30:54 +02:00
Tim Schaub 1aa83e133b Remove dimension property from geometries
This was only necessary when using the shared vertices structure.
2013-09-27 23:18:34 +01:00
ahocevar 3349bded1c Merge pull request #1065 from ahocevar/skip-hidden
Select interaction does not work with shape symbolizers and canvas renderer
2013-09-27 05:45:50 -07:00
Tim Schaub bbef15e50e Consider resolution when applying rules 2013-09-27 11:46:48 +02:00
ahocevar c556ddd593 Skip hidden features for hit detection 2013-09-26 12:56:49 +02:00
Bruno Binet cf4799e87c Add support for layer min/maxResolution 2013-09-19 16:59:38 +02:00
Frederic Junod 9906497cb8 Only reset canvas transformation matrix when it has changed 2013-09-18 19:12:36 +02:00
Tim Schaub 7caaed4218 Merge pull request #1017 from tschaub/provide-objects-only
Never use goog.provide with primitives (especially with falsely values).
2013-09-16 06:46:26 -07:00
Tim Schaub a2c70dba85 Provide ol.canvas instead of ol.canvas.SUPPORTED
This is not currently used outside the library, so it is not exported.
2013-09-15 15:54:01 -06:00
Tim Schaub e806f51b3d Changing extent structure back to single array: [minX, minY, maxX, maxY]
This means we'll have to have a new structure and new methods for 3D envelopes.
2013-09-15 00:31:32 -06:00
Tim Schaub e575df6df0 Canvas renderer updates for new extent structure 2013-09-14 21:13:47 -06:00
Tom Payne 8f8f94e697 Rename ol.layer.TileLayer to ol.layer.Tile 2013-09-09 15:14:45 +02:00
Tom Payne 7d5a84ce8a Rename ol.layer.ImageLayer to ol.layer.Image 2013-09-09 14:36:40 +02:00
Frederic Junod 393566155d Export ol.*.SUPPORTED symbols 2013-09-06 22:34:32 +02:00
ahocevar 83720975f8 More specific INTENTCHANGE instead of SYMBOLIZER event 2013-08-30 12:10:55 +02:00
ahocevar 3a50a754aa Implementing renderIntent handling 2013-08-29 16:50:52 +02:00
Tim Schaub e9aa316007 Call getUid once 2013-08-27 16:22:45 -06:00
Tim Schaub 6b625e368b Account for icon offsets when doing feature hit detection 2013-08-27 16:22:45 -06:00
Tim Schaub efeb00e4a5 Add x/y offset for icon symbolizers 2013-08-27 16:22:45 -06:00
Tim Schaub 966034e4f7 Alphabetize 2013-08-15 13:50:50 -04:00
Tim Schaub 6078fe7b02 Line literal color instead of strokeColor etc. 2013-08-15 10:37:18 -04:00
Tim Schaub 90fb37c220 Rename ol.style.SymbolizerLiteral to ol.style.Literal 2013-08-15 10:37:18 -04:00
Bruno Binet 3ecb5b89ff Create a custom event type for vector layers
Vector layers will now dispatch ol.layer.VectorLayerEventType.ADD and
ol.layer.VectorLayerEventType.REMOVE event types instead of the generic
goog.events.EventType.CHANGE event type.
This will fix a maximum call stack size exceeded javascript error.
2013-08-13 12:27:38 +02:00
Tim Schaub 993e76e3a1 Support fillOpacity and strokeOpacity on polygon symbolizers 2013-08-05 11:16:49 -06:00
Tim Schaub f210d6d0e1 Rename line symbolizer opacity to strokeOpacity for consistency
We already have strokeColor and strokeWidth.  Having strokeOpacity makes sense.
2013-08-05 11:16:49 -06:00
Tim Schaub 1cedea6606 Support fillOpacity and strokeOpacity on shape symbolizers 2013-08-05 11:16:48 -06:00
ahocevar 53765ebd0f Merge pull request #878 from ahocevar/polygon-labels
Better label placement for polygons
2013-07-30 01:04:44 -07:00
ahocevar b2e25c8f6b Renaming method to getInteriorPoint
as suggested by @tschaub. Also giving credit to JTS.
2013-07-30 09:25:24 +02:00
Tom Payne 46d16ba0ca Use setElementShown instead of showElement 2013-07-22 17:42:47 +02:00
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
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 a9fcc5ff15 Addressing @elemoine's review comments 2013-07-19 13:30:14 +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
Tim Schaub cab983f826 We are guarnteed that all TextLiteral properties are defined (see #770)
Instead of using the browser defaults, we use `ol.style.TextDefaults`.
2013-06-25 12:15:33 -06:00
Tim Schaub b04a36ede7 Replace use of filter with expressions
The canvas vector layer still has the (API candidate) `getFeatures` method that accepts an arbitrary expression (was filter).  This, and the `getFeaturesObject` method under it are only used in the tests.  The rendering code that was using filters is now calling `layer.getFeaturesObjectForExtent` with an explicit extent and optional geometry type.
2013-06-25 12:15:33 -06:00
Tim Schaub 20527ab1f1 Reuse tile range 2013-06-24 11:34:59 -06:00
Tim Schaub a9f01a4390 Use getMetersPer unit method 2013-06-24 11:34:48 -06:00