Commit Graph

19 Commits

Author SHA1 Message Date
Éric Lemoine
e0b93c2e45 The OpenLayers code is published under the 2-clause BSD license 2012-03-30 08:33:55 +02:00
Éric Lemoine
650df2a8f1 change copyright header in every OpenLayers js file 2012-03-29 22:14:56 +02:00
Tim Schaub
46054b8543 Correctly getting tile data for a location.
The UTFGrid layer's `getTileInfo` method was not correctly handling dateline wrapping (and was a bit more complicated than it needed to be).  Since it would be useful to all grid layers to be able to retrieve a tile and pixel offset for any map location, this functionality deserves to be on the Grid layer.

The WMTS layer currently exposes a `getTileInfo` method that is used within the layer and by the WMTSGetFeatureInfo control.  This method could be renamed to `getRemoteTileInfo` or something to differentiate it from a method that gets locally cached tile info.  Until that change is made, the method on the Grid layer will be called `getGridData`.
2012-03-06 16:06:15 -07:00
Tim Schaub
28687257d6 Use existing methods on XYZ layer. 2012-03-05 23:07:28 -07:00
Tim Schaub
dc4df928ed Doc cleanup for UTFGrid layer. 2012-03-03 17:28:55 -07:00
Tim Schaub
36d22bbb15 Single argument constructor for UTFGrid layer. 2012-03-03 16:07:50 -07:00
Tim Schaub
4d31a3ed3a Method for getting both feature id and data.
Having to call two methods to get complete feature information (id and data) is cumbersome.  The `getFeatureInfo` method returns an object with both feature id and data.
2012-02-28 05:37:28 -07:00
tschaub
89e8a872a5 Making the default UTFGrid resolution 2.
According to the latest [spec](https://github.com/mapbox/utfgrid-spec/blob/master/1.2/utfgrid.md): "By default, UTFGrid operates on a 2x2 grid."
2012-02-27 08:57:22 -07:00
Tim Schaub
551c582ab1 Layer and tile API update.
The tile now has responsibility for resolving feature ids and fetching feature data given x, y pixel offsets with getFeatureId and getFeatureData methods.  The layer has corresponding getFeatureId and getFeatureData methods that take a map location, lookup the appropriate tile, and delegate to the tile for the rest of the work.
2012-02-26 21:05:12 -07:00
Tim Schaub
fc03f57591 Simplify constructor by setting projection. 2012-02-26 19:23:22 -07:00
Tim Schaub
65233dd0bc Add dependency on UTFGrid tile. 2012-02-25 20:01:14 -07:00
Tim Schaub
e1dffacdde Providing a method to get data from the layer.
I think it should be the job of the layer to retrieve data for a given location (instead of the control).  The first part of this change creates a `getData` method on the layer and updates the control to use this method.

The second part of this change removes the assumption that the data returned will be an simple object representing feature attributes.  The UTFGrid specification doesn't say anything about the structure of property values in the optional data member.  The examples given in the spec use string values.  The default callback previously assumed that the data could be rendered in a two column table.  I think it would make more sense not to make this assumption.  With this change, the user must always provide a callback to do anything with returned data.
2012-02-25 17:33:32 -07:00
Matthew Perry
867080a074 Option for loading utfgrid via jsonp 2012-02-13 16:56:35 -08:00
Matthew Perry
b01026bd80 Cleaning up the docs to a marginally acceptable level. 2012-02-08 11:16:50 -08:00
Matthew Perry
80656cdfd0 Support specifying grid resolution at the layer level 2012-02-07 12:20:29 -08:00
Matthew Perry
8aaaecc9ee Fix a problem determining zoom levels. Updated some docs. 2012-02-06 09:06:49 -08:00
Matthew Perry
6ff3b895c9 Some refactoring and cleaning up rounding errors in tile math. Added
debugging mechanism.
2012-02-05 11:17:02 -08:00
Matthew Perry
be4db93e9b Preliminary working implementation.. still lots of slop to clean up 2012-02-05 09:33:32 -08:00
Matthew Perry
a6df52ff83 Initial import of UTFGrid support. Needs work. 2012-02-04 12:22:27 -08:00