Commit Graph
100 Commits
Author SHA1 Message Date
Tim Schaub 93041becbe Toggle css class and use css content for anchor 2013-04-11 18:25:31 +02:00
Tim Schaub d71da50fb9 Merge pull request #532 from tschaub/update-size
Add an updateSize method.  Application code should call this when the map viewport size changes by some method other than a window resize.
2013-04-10 13:40:58 -07:00
Tim Schaub b499f71d97 Add an updateSize method
We need a non-private/protected method to call when the map viewport size changes.
2013-04-10 12:47:06 -06:00
Tim Schaub 2ecaf2bc69 Merge pull request #501 from tschaub/logical
Logical filter touch-ups
2013-04-09 09:21:13 -07:00
Tim Schaub f0c62294f9 Doc fixes 2013-04-07 17:42:52 -06:00
Tim Schaub 27e23cce9c Convenient factories for logical filters 2013-04-07 17:37:31 -06:00
Tim Schaub ceb9541031 Correcting or and adding not
Previously, OR filters always returned true (fixes #500).
2013-04-07 17:36:54 -06:00
Tim Schaub 2f829b4aba Merge pull request #471 from tschaub/example-typo
Correct link to example source
2013-04-04 20:42:06 -07:00
Tim Schaub 613b9d7592 Correct link to example source 2013-04-04 21:40:35 -06:00
Tim Schaub e2d200882a Merge pull request #422 from tschaub/stop-ignoring-global-leaks
Stop ignoring global leaks
2013-03-23 05:34:20 -07:00
Tim Schaub d9ab545985 Stop ignoring global leaks
The `goog.dom.ViewportSizeMonitor` (used in map.js) creates a global leak by setting `goog.UID_PROPERTY_` on the monitored window.  In order to test that we don't have other global leaks, we preemptively set the property so Mocha can compare the global before and after our tests.
2013-03-23 05:50:54 -06:00
Tim Schaub 53fc6f3989 Merge pull request #421 from tschaub/global-leak
Fix global leak in WebGL image layer test
2013-03-23 03:59:45 -07:00
Tim Schaub ff28c0b793 Fix global leak in WebGL image layer test 2013-03-23 04:38:12 -06:00
Tim Schaub f74940fe2b Using a server that is not down (closes #406) 2013-03-20 16:00:26 -06:00
Tim Schaub 26aefc1f63 The _blank target is an antipattern
The examples all have links back to the index page.  People know how to open links in new tabs/windows when they want to.
2013-03-19 12:18:08 -06:00
Tim Schaub 462659a9fc Use index.html instead of example-list.html
The original decision to avoid index.html was because it only works with a build step.  Since we've all accepted a build step, the more sensible name is index.html.  Without this change, every hosted example has a link to http://openlayers.github.com/ol3/master/examples/example-list.html which 404s.
2013-03-19 12:17:00 -06:00
Tim Schaub 374e436872 Picking a color that shows up more clearly on bluemarble 2013-03-19 11:54:50 -06:00
Tim Schaub 86eb65cc13 Merge pull request #395 from tschaub/no-test-markup
Create test specific markup in the individual tests as needed instead of relying on a common dom structure for all tests.
2013-03-19 09:18:41 -07:00
Tim Schaub c07be93d25 Merge pull request #325 from tschaub/dirty-animation
Render new vector tiles after animation completes.  This was previously happening during an animated zoom, but not an animated pan.
2013-03-19 09:17:05 -07:00
Tim Schaub 825a6d65e8 Properly maintain dirty state during animation
The previous logic assumed that if there were any tiles to render, the dirty state should be false.  The correct logic is to say that if we don't render during animation, dirty is true.
2013-03-19 07:27:59 -06:00
Tim Schaub 251d6fc488 Example touch-ups
The strokeStyle property is now spelled strokeColor.  There is no sense in setting opacity to 1.5.  Moving map initialization up.
2013-03-19 06:38:50 -06:00
Tim Schaub 956c31b59d Lint in build.py 2013-03-18 23:40:40 -06:00
Tim Schaub d9380d0260 Copy social links script for hosted examples 2013-03-18 23:35:26 -06:00
Tim Schaub 27ccd13e48 Create test specific markup in tests
Instead of relying on a shared dom structure, the tests should create (and destroy) elements as needed.
2013-03-18 22:53:04 -06:00
Tim Schaub fad57a0fe5 Clarifying which var is accesed
This test creates its own zoomslider and doesn't access the one from the closure.
2013-03-18 21:52:01 -06:00
Tim Schaub 928457e174 Correcting test semantics
Despite what the test comment says, the orientation of this slider is horizontal.
2013-03-18 21:50:00 -06:00
Tim Schaub 0fc7ba5bfb Merge pull request #393 from tschaub/social
Make social links more social
2013-03-18 17:17:54 -07:00
Tim Schaub 6b5e251279 Fix global leak
A bit curious that the linter didn't catch this.  My test runner fails with it.
2013-03-18 17:54:36 -06:00
Tim Schaub 1ac77b1a6f Make social links more social 2013-03-18 13:27:47 -06:00
Tim Schaub 4cec0546c8 Range from -π to π in rotation inputs (see #392) 2013-03-18 12:10:44 -06:00
Tim Schaub 7f62b26c80 New example style 2013-03-07 23:48:23 -07:00
Tim Schaub ee75c4b90e Use new projection getter 2013-03-07 23:48:10 -07:00
Tim Schaub 895bc4e76c The addFeatures method will be added back later
This needs to be made to take advantage of the shared vertices.
2013-03-07 23:47:41 -07:00
Tim Schaub 85a1599a1a Removing the style rules example for now
The addFeatures method on layer is going to go away temporarily (so all feature adding will take advantage of shared vertices structures).  Later we can accept feature arrays in parseFeatures and rename the method back to addFeatures.
2013-03-07 23:32:56 -07:00
Tim Schaub 4422e3e73b Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-07 23:10:06 -07:00
Tim Schaub 4918106a22 Make shared vertices structures accessible 2013-03-07 23:09:23 -07:00
Tim Schaub faee18bae1 Use fillColor and strokeColor instead of fillStyle and strokeStyle
The color names are more intuitive.  And if we want to support pattern strokes or fills, we'll need additional proerties to represent other pattern properties.
2013-03-07 22:51:14 -07:00
Tim Schaub 5ce114c1b6 Style in example 2013-03-07 22:29:00 -07:00
Tim Schaub 77355ca634 Optional polygon stroke or fill 2013-03-07 22:28:39 -07:00
Tim Schaub f93bf2ad77 Avoid filling/stroking parts of multi-polygons twice 2013-03-07 21:39:34 -07:00
Tim Schaub db4e62477d Nicer caps and joins
As mentioned in the TODOs, caps and joins should be user configurable on the symbolizers.
2013-03-07 10:37:48 -07:00
Tim Schaub b28a1efec6 Export GeoJSON parser 2013-03-07 10:26:15 -07:00
Tim Schaub 5752a69d6b Adding addFeatures back as an API method temporarily
Eventually, parseFeatures and addFeatures should be collapsed.
2013-03-07 10:09:19 -07:00
Tim Schaub f961930823 Render countries from GeoJSON
This reveals a number of issues that still need to be addressed.
2013-03-06 19:24:53 -07:00
Tim Schaub 84527c4b56 Disable bbox filtering for now
The RTree doesn't appear to be performing properly
2013-03-06 19:07:26 -07:00
Tim Schaub 2e4dc430e9 Render multi-part geometries
As noted in the comment, filtering/rendering once per geometry type will be replaced by rendering once per symbolizer type.
2013-03-06 19:06:41 -07:00
Tim Schaub 00fa7ff3a9 Listen for layer changes and expire tiles
We need a more flexible event system.  We could have a VectorLayerEvent type and dispatch 'featuresadded' here.  But listeners want features typically and perhaps extent.  This won't be true for all vector layer events (suggesting a more specific VectorFeatureEvent type or something).
2013-03-06 19:05:35 -07:00
Tim Schaub d7c547f736 Method for parsing features
Shared structures are still per geometry type.  Need to be made per symbolizer type.
2013-03-06 19:02:21 -07:00
Tim Schaub 7c4c3c547c Draw multi-part geometries
Polygons still need holes.
2013-03-06 19:01:16 -07:00
Tim Schaub 6cddd47d54 Correcting title for example list (see #296) 2013-03-06 15:24:50 -05:00
Tim Schaub 060edb2070 Merge branch 'vector' of github.com:openlayers/ol3 into vector
Conflicts:
	src/ol/style/shape.js
2013-03-06 02:28:33 +01:00
Tim Schaub ac10bb6ca5 Enforce that either stroke or fill is provided 2013-03-06 02:20:11 +01:00
Tim Schaub c0c8faaf9f Allow literal from symbolizer without feature 2013-03-06 02:20:11 +01:00
Tim Schaub 4f2523fcf2 Vector related exports 2013-03-05 18:25:07 +01:00
Tim Schaub 9a0e7a96fe Moving the feature management to the layer
The source will be responsible for fetching vector data.
2013-03-05 18:25:07 +01:00
Tim Schaub e1c3faa53e Vector related exports 2013-03-05 18:13:10 +01:00
Tim Schaub 12bee3178e Moving the feature management to the layer
The source will be responsible for fetching vector data.
2013-03-05 12:46:55 +01:00
Tim Schaub a968a5ca66 The shared vertices structure now works with integer arrays only
Previously, a lookup object containing start indexes was also used.  This allowed us to remove arrays of vertices and properly update the start indexes for remaining coordinate values.  In order to provide callers with stable identifiers and to work with arrays of integers alone, we cannot support a remove method.  I think this is worth revisiting.  Even if the array length cannot be changed in WebGL, we don't need to also impose the restriction outside.  Instead, the WebGL renderer could be notified when array sizes change and update itself accordingly.  I think there is more value in providing geometries with stable identifiers.

This common structure is used to store vertices for all geometry types.  A slight optimization could be made by creating yet another structure to store point vertices - since these don't need to have a counts array (always 1).  Creating a new structure would mean saving memory at the expense of more lib code to transport.  The coordinate value lookups are not negatively impacted by using the same structure for points and higher order geometries.  Since the first change above goes against my instincts, I'm not making this second change (to add another structure for shared point vertices).
2013-03-05 11:47:42 +01:00
Tim Schaub 54d8d45fc9 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-05 10:58:27 +01:00
Tim Schaub 1d6cd1bd1b Lint-free tests 2013-03-04 21:30:23 +01:00
Tim Schaub dc19948a85 Get tile size for zoom level (see #258) 2013-03-04 21:30:01 +01:00
Tim Schaub c29fabebef Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-04 21:06:13 +01:00
Tim Schaub cae925ad1f Correct spelling (thanks @fredj) 2013-03-04 21:04:59 +01:00
Tim Schaub 8c8ddce290 GeoJSON parser implements StringFeatureParser 2013-03-04 20:31:01 +01:00
Tim Schaub 9c8ec42713 Feature parser interfaces
Parsers that read features from strings, objects, or dom elements should implement the right interface.  Among the read options is a callback that gets called after feature construction and before geometry construction.  This callback is called with the feature and the geometry type and returns a shared vertices structure.  The geometry is then constructed with this shared vertices structure before being added to the feature.
2013-03-04 20:29:42 +01:00
Tim Schaub 9edf63fdb8 Proper bounds 2013-03-04 20:25:18 +01:00
Tim Schaub 978527f880 Accept missing properties in symbolizer constructors
Still need to have some discussion about when to apply defaults.
2013-03-04 19:31:11 +01:00
Tim Schaub fae79dbc0f Fewer function calls during bounds calculation 2013-03-04 18:55:20 +01:00
Tim Schaub 0b05432faa Vector source isn't a tile source 2013-03-04 18:43:46 +01:00
Tim Schaub 0558cfa3ac Add externs for GeoJSON support 2013-03-04 18:41:04 +01:00
Tim Schaub 303f2df9e1 Merge pull request #256 from tschaub/transform-arrays
Updating ol.TransformFunction instances so they work with arrays instead of coordinates.
2013-03-03 14:46:22 -08:00
Tim Schaub e9fa08fccb Use in-place transforms where possible 2013-03-03 20:53:13 +01:00
Tim Schaub 40bde4056b Accept a destination array for transforms
This allows in-place transforms.
2013-03-03 20:24:14 +01:00
Tim Schaub 7a5e6a06d8 Make transform functions work with arrays
Instead of working with ol.Coordinate instances, transform functions work with arrays.  This is in anticipation of using transform functions to transform large arrays of vertex coordinate values.  The ol.projection.transform and ol.projection.transformWithCodes are slightly more convenient functions for dealing with ol.Coordinate instances.  Whether we make this more consistent with the use of functions returned by ol.projection.getTransform is up for discussion.
2013-03-03 19:27:57 +01:00
Tim Schaub 0df692e159 Lint in the tests 2013-03-03 17:58:03 +01:00
Tim Schaub 022917e719 Lint free externs 2013-03-03 17:06:15 +01:00
Tim Schaub d3c4869917 Work with new ol.projection package 2013-03-03 16:09:00 +01:00
Tim Schaub 5a73529da5 Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-03 15:52:40 +01:00
Tim Schaub b247031fe2 Test reading with shared vertices 2013-03-03 15:51:24 +01:00
Tim Schaub 4af32560ce Removing abstract methods for now
Later we'll discuss having more specific FeatureParser and readFeatures type methods.
2013-03-03 15:50:33 +01:00
Tim Schaub 5d917ebed6 Helper functions for running tests after xhr 2013-03-03 14:29:22 +01:00
Tim Schaub 69b6fae744 Parser base class
GeoJSON is now a parser.  The idea is that we'll want to pass parsers to sources or protocols and want a known type.
2013-03-03 11:50:51 +01:00
Tim Schaub 93ab45432b Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-03-03 09:46:11 +01:00
Tim Schaub b52d283641 Allow geometries to use a shared vertex array
The ol.geom.SharedVertices structure represents a flattened array of vertex coordinates.  This is intended to support optimal WebGL rendering.
2013-03-02 18:39:24 +01:00
Tim Schaub ff27fd33a1 Merge pull request #232 from tschaub/projection-tests
Projection tests
2013-02-27 21:06:54 -08:00
Tim Schaub 52da64564c Tests for getting transforms
These are regression tests for #231.
2013-02-25 11:40:55 -07:00
Tim Schaub ca85c26537 Method for removing cached transforms 2013-02-25 11:28:14 -07:00
Tim Schaub 940ba8afa7 Stray debugger 2013-02-25 11:26:04 -07:00
Tim Schaub 72ba8c4cbd Smoke test for ol.Projection.getTransformFromCodes 2013-02-25 10:36:21 -07:00
Tim Schaub 48e69f7559 Unused var 2013-02-25 10:36:21 -07:00
Tim Schaub 86262bf17e Space for linter 2013-02-25 10:36:21 -07:00
Tim Schaub 6ceae978bf Merge pull request #231 from probins/projfix
Fix bug/typo in projection.getTransform
2013-02-25 09:33:10 -08:00
Tim Schaub e23ca1655c Confirm that arbitrary attribute names can be used 2013-02-20 10:34:10 -07:00
Tim Schaub 7ce89f1fbe Proper getAttributes method
With a59aa9bb37 we can now provide an object with user set attributes.
2013-02-20 10:33:42 -07:00
Tim Schaub 0f2f26969d Merge branch 'master' of github.com:openlayers/ol3 into vector 2013-02-20 10:18:09 -07:00
Tim Schaub a59aa9bb37 Merge pull request #217 from tschaub/safer-object
Allow ol.Object to be used with arbitrary keys.  Add a getKeys method.
2013-02-20 07:56:07 -08:00
Tim Schaub 689f8c9d9d Merge pull request #206 from tschaub/interim-tiles
Share common code to find loaded tiles
2013-02-20 00:52:49 -08:00
Tim Schaub 8f578b88b1 Removing the typed arrays
Its not clear that we will be able to leverage the Float64Array.  It may also be that the overhead of constructing these small arrays negates any benefit of faster access.  And for all coordinate arrays, we'll need arrays that grow/shrink.
2013-02-20 01:15:39 -07:00
Tim Schaub 176f18c937 Merge branch 'master' of github.com:openlayers/ol3 into vector
Resolved conflicts:
  src/ol/renderer/canvas/canvasrenderer.js
2013-02-20 00:38:07 -07:00
Tim Schaub d642628545 Example syntax 2013-02-20 00:21:08 -07:00