Commit Graph

48 Commits

Author SHA1 Message Date
Bart van den Eijnden
78d20056f5 update all the other examples that used MapQuest 2014-01-08 13:36:35 +01:00
Éric Lemoine
8402eee0c3 Map "click" event renamed to "singleclick"
As discussed with @tschaub in #1195.
2013-10-31 09:37:16 +01:00
Éric Lemoine
4008ab7f6c Vector examples display feature info on click again 2013-10-18 09:59:47 +02:00
Éric Lemoine
fe3440a83d Use jQuery to listen to map mousemove in examples
This commit also removes the click listener, which was used for touch devices. The click listener will be added back when the lib will correctly handle clicks on touch devices.
2013-10-18 09:59:47 +02:00
Tim Schaub
539ecbdd9c Add stroke support for text symbolizers 2013-10-07 16:17:38 -06:00
Tim Schaub
e71d3aec1a Update example to use maxResolution 2013-09-27 11:47:29 +02:00
Frederic Junod
764aacb568 Rename {get|set}FeatureId to {get|set}Id 2013-09-17 12:50:56 +02:00
Tom Payne
8f8f94e697 Rename ol.layer.TileLayer to ol.layer.Tile 2013-09-09 15:14:45 +02:00
Tim Schaub
c36ceab2a0 Separate stroke and fill 2013-08-15 10:37:18 -04:00
ahocevar
5673feb48f Merge pull request #885 from ahocevar/wms-getfeatureinfo
Implement WMS GetFeatureInfo
2013-08-08 07:44:04 -07:00
Tim Schaub
c2cc1af2ac Separate opacity in examples 2013-08-05 11:32:48 -06:00
ahocevar
5acff857e7 Add example, and use getFeatures in other examples
The new dedicated getfeatureinfo example shows how to combine
feature info from a WMS and a vector layer. The other examples
that previously used getFeatureInfo from vector layers now use
the more appropriate getFeatures.
2013-07-31 17:47:16 +02:00
ahocevar
892088ffac Updating examples to use the new API 2013-07-17 11:39:57 +02:00
Tim Schaub
2577d3f7d6 Rename ol.expression to ol.expr 2013-06-25 12:15:34 -06:00
Tim Schaub
233595ac75 Allow registration of custom functions for expressions 2013-06-25 12:15:33 -06:00
ahocevar
d250f4449c Updating example to use new properties 2013-06-20 15:24:54 +02:00
ahocevar
c17424deec Basic support for text symbolizers
This adds basic label rendering for points and polygons to the
canvas renderer, and a text symbolizer to the style package.
2013-06-19 22:01:51 +02:00
Tim Schaub
2ee0805075 Taking advantage of GitHub's rendering of .geojson 2013-06-18 15:39:45 -06:00
ahocevar
3a6c7cf204 Renaming featureInfoFunction to transformFeatureInfo 2013-06-07 15:34:13 +02:00
ahocevar
77d22c4038 getFeatures method and featureInfo templates
To avoid surprises for application developers, this change
creates a new getFeatures method. So it is clear now beforehand
whether features or feature info markup is returned. The result
is now also grouped by layer, so application developers always
have a link between a layer and the feature info it returns.

To make getFeatureInfo return markup for vector layers, this
change also adds a featureInfoFunction property to the vector
layer, which gives developers full control over how features are
rendered to feature info markup.
2013-06-07 15:34:13 +02:00
Tom Payne
46553c719c Rename ol.projection to ol.proj 2013-05-30 18:55:58 +02:00
ahocevar
8c0f1f979a Store the feature's commonly used id
To not clobber the feature's attributes, this is a separate
member property.
2013-05-23 11:16:17 -05:00
Frederic Junod
db34b37716 getFeatureInfo examples: listen to click events
This make the examples works on touch devices.
2013-05-22 12:30:31 +02:00
Frederic Junod
7d544e0868 Pass layers as array instead of ol.Collection 2013-05-21 12:35:02 +02:00
ahocevar
53b85c99ae map#getFeatureInfo does not return anything
Thanks @elemoine for catching this.
2013-05-09 22:32:40 +02:00
ahocevar
7b256c3ec6 Asynchronous API for map#getFeatureInfo
This change allows us to use feature info services on the
server. It will also be useful for the GetFeature control to
get results from a WFS.
2013-05-09 22:26:55 +02:00
ahocevar
d2c81db06a Info box instead of tooltip as suggested by @fredj 2013-04-30 14:15:39 +02:00
ahocevar
cc1b70c74b Giving the map a getFeatureInfoForPixel method
This method is an entry point for getting feature information.
Renderers can use a hit canvas or defer to a layer (source) to
get matching features for a pixel.

For now this is only implemented for vector layers, and it uses
a bbox query because we cannot refine the result because of
missing geometry intersection functions yet.
2013-04-30 13:32:16 +02:00
Tom Payne
81712a28a3 Fix whitespace errors in examples 2013-04-08 13:24:10 +02:00
Tom Payne
02196c94b5 Redefine ol.Coordinate to be Array.<number> 2013-04-05 12:30:37 +02:00
Tim Schaub
374e436872 Picking a color that shows up more clearly on bluemarble 2013-03-19 11:54:50 -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
Éric Lemoine
51625b8008 Make vector-layer example ignore XHR errors
This is a workaround for our check-example.js PhantomJS script to work with this example. Without this check-example.js fails because xhr.status is 0. I tried to give the explicit file:/// scheme as indicated in https://groups.google.com/d/msg/phantomjs/wFGme0pE-Tk/WUjU5s-27NwJ, but that didn't work for me.
2013-03-15 15:46:40 +01:00
Éric Lemoine
a34adc6f62 Add countries.json to examples data dir
The examples cannot use files located in the test dir, or they won't work when hosted as GitHub pages.
2013-03-15 14:25:05 +01:00
Bruno Binet
9b1c389c80 Remove unused goog.require directives 2013-03-14 11:39:43 +01:00
ahocevar
f5b53740e6 Define map at the top 2013-03-12 08:28:24 +01: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
5ce114c1b6 Style in example 2013-03-07 22:29:00 -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
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
d3c4869917 Work with new ol.projection package 2013-03-03 16:09:00 +01:00
Tim Schaub
d642628545 Example syntax 2013-02-20 00:21:08 -07:00
Tim Schaub
735f490f56 Treating geometry as just another attribute
The first set geometry is considered the default.  As an added bonus, we're back to a single argument constructor.  Later, we could allow a schema to be set.  This would be done before setting values (calling constructor with no args).
2013-02-20 00:02:50 -07:00
ahocevar
61e4452c83 Adding missing and removing unused goog.requires 2013-02-06 16:26:24 +01:00
Tim Schaub
4e3f984796 Properly rendering features to canvas tiles
It looks like this approach will work well for panning (as anticipated).  For animated zooming, it is not going to work as is.  It looks like the canvas tile generation is too much for this type of animation loop.  Though there are clearly still areas for optimization:

 * Don't create new tiles while animating between zoom levels.  Using existing tiles only while animating should bring a significant performance gain.
 * Simple spatial index for tiles - each tile coord in the matrix could have a feature lookup object (keyed by id).  This needs to account for rendered dimension (as witnessed by the point being cut by a tile).  Given that the current example uses only three features, adding the spatial index should only be a minor improvement.
 * Reuse a fixed set of canvas tiles that are generated at construction (and increased/decreased with view size changes).
 * If a fixed set of tiles is not used, at least new ones could be cloned from existing ones (minor).
 * Do some profiling to look for more ideas.

In addition, world-wrapping needs addressed.  I don't think this renderer is the right (or at least the only) place to address this.  And the cache of tiles needs to be managed for real.  But hey, at least we've got a working tiled vector renderer now.
2013-01-24 21:57:12 -07:00
Tim Schaub
8d5a45d827 Set up example for debugging 2013-01-24 16:51:10 -07:00
Tim Schaub
c50fcecf42 Vector rendering example
There is a ton of room for optimization here.  The vector layer renderer should only render dirty areas and could maintain a cache of rendered canvas tiles.  The vector source could have a simple spatial index for features (by tile coord).  Need to also discuss how to work with this animation framework (to avoid the excess work while waiting for tiles to load on every other layer).
2013-01-22 01:46:27 -07:00