Commit Graph

262 Commits

Author SHA1 Message Date
Marc Jansen
a34e627b75 Remove dangling space in license header. 2013-02-07 10:33:20 +01:00
Tim Schaub
bbc73a21d8 Update copyright date 2013-01-07 22:01:16 -05:00
ahocevar
80f13188a3 Addressing @bartvde's review comments 2013-01-07 14:26:41 +01:00
ahocevar
a02e08ad2a New beforeload event and slightly changed loading sequence
Having the TileManager remove an image from the DOM, then setting the
cached image, and then having to position it felt a bit awkward. With the
new beforeload event, the setImage method and putting renderTile before
positionTile, providing the cached image feels way more natural.
2012-12-23 17:00:46 +01:00
ahocevar
80fa251649 New TileManager
This removes all tile queueing/loading specific code from Layer.Grid
and creates a new class that manages tile loading and caching.
2012-12-23 17:00:45 +01:00
ahocevar
d431b504bd Missing change that should have gone in with #705 2012-11-07 16:54:26 +01:00
ahocevar
a54ecca32b Merge pull request #705 from ahocevar/animation
Remove complexity from the image loading sequence. r=@elemoine,@tschaub
2012-11-05 10:33:59 -08:00
ahocevar
5a3bcc716b Not using requestAnimationFrame
Using the Timeline tab of the Chrome Developer Tools, no significant
difference of Paint events can be observed when requestAnimationFrame is
used. So I agree with @elemoine that there is no need to introduce
asynchronous behavior here.
2012-11-05 17:28:10 +01:00
ahocevar
65fa1aaa2d Make sure we do not make abandoned tiles visible 2012-11-05 10:43:05 +01:00
ahocevar
ebeb49b5e7 blankImageUrl is no longer needed for image tiles 2012-11-05 10:40:05 +01:00
ahocevar
ff4a1b2468 Optimizing positions for rendering
Calculating pixel positions from origin and grid index causes alignment
issues in the grid. By going back to incremental positioning, we get a
result without blank spaces between tiles again.
2012-10-12 03:23:56 +02:00
ahocevar
7e5e221c8d Image loading performance improvements
Performance improvements are achieved by using requestAnimationFrame when
a tile's visibility changes, and by not starting with a blank image when
creating a new tile image. It seems that even Firefox does not show a
loading placeholder when the tile is made visible in an animation.
2012-10-05 09:24:53 +02:00
Pierre GIRAUD
8d8abac32a call stopObserving before setting img.src to blank image as well 2012-09-21 11:32:48 +02:00
Stéphane Brunner
341c08adee Add missing requires on Request for UTFGrid 2012-09-11 11:38:24 +02:00
ahocevar
b2210d00a9 Removing no longer needed code.
Thanks @elemoine for catching the IE6 reflow in Tile/Image.js.
2012-08-21 13:57:11 +02:00
ahocevar
f0ad48597f No more percentage based positioning.
Client zoom now supports both over- and undersampling.
2012-08-21 13:57:11 +02:00
ahocevar
ff1f99a03f Don't reuse tile images unless we have a new url to load.
Without this change, some browsers don't cache the images. See #454 for a discussion about this issue.
2012-05-25 18:47:57 +02:00
Éric Lemoine
612401a644 fix bug where tiles with gutters are shifted (refs #441) 2012-04-28 21:23:55 +02:00
ahocevar
fc0b15ad45 Overriding onImageLoad to set the opacity on the correct element. 2012-04-24 08:08:41 -04:00
É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
ahocevar
f32bfa2240 Making backbuffer work again for tiles with frame. 2012-03-19 10:10:40 +01:00
Tim Schaub
1a444589e0 Merge pull request #274 from tschaub/utfgrid
UTFGrid Tile, Layer, and Control.  This adds support for responsive handling of interactions with large numbers of features represented by UTFGrids.
2012-03-09 08:49:30 -08:00
ahocevar
81e7913075 Fixing crossorigin attribute handling. 2012-03-06 23:21:25 +01:00
ahocevar
a05eab29db Adding tileloadstart event to layer.
For this to be useful (i.e. so listeners can see/modify the tile url), a change in Tile.Image is required so we do not fire the loadstart event before we have the url to load.
2012-03-06 14:40:08 +01:00
Éric Lemoine
3b860ca4d7 Merge pull request #168 from jorix/Docs-issues3
Some problems in the documentation
2012-03-06 00:05:52 -08:00
Tim Schaub
cf30e71b9f Merge branch 'master' of github.com:openlayers/openlayers into utfgrid 2012-03-06 00:06:15 -07:00
ahocevar
fe63d0aa63 New events: loaderror for Tile, tileerror for Layer.Grid. 2012-03-05 14:20:01 +01:00
Xavier Mamano
bfb379f349 Fix some problems in the documentation. 2012-03-05 11:43:09 +01:00
Éric Lemoine
9a116b21b9 Revert "protect for in loops with hasOwnProperty"
This reverts commit e3cc96dbfb.
2012-03-03 22:35:39 +01:00
Bart van den Eijnden
e3cc96dbfb protect for in loops with hasOwnProperty 2012-02-29 18:43:55 +01: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
ahocevar
c55a8b554d Merge pull request #229 from ahocevar/post-blank
Using a blankImageUrl that works for IFrames in IE9. r=@elemoine.
2012-02-28 00:23:51 -08:00
tschaub
fd595e6282 Clearer tile method names. 2012-02-27 16:47:11 -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
faeb691f3a Tests for UTFGrid tiles. 2012-02-25 23:07:31 -07:00
Tim Schaub
8c95a90052 The parseData method doesn't need to know of XHR. 2012-02-25 20:51:03 -07:00
Tim Schaub
12fa9b54ef Consistency with tile loading events.
Since loadstart is being fired here, it makes sense to fire loadend as well.  The isLoading flag also needs to be cleared.  Needs tests still.
2012-02-25 20:45:18 -07:00
Tim Schaub
c18f6a23be Use JSON format for parsing JSON.
To get IE7 support, the OpenLayers.Format.JSON parser should be used.  This leverages the native JSON.parse method where available.  It does add extra weight to UTFGrid builds.  However, as of this commit date, we lose large portions of US govt agencies when we exclude IE7.
2012-02-25 20:18:23 -07:00
Tim Schaub
e6f0aa08e5 Cleanup use of Script protocol.
I would think there would still be an error thrown here.  Will put together a test to determine for sure, but I'd think that the default GeoJSON parser used by the protocol would choke on the UTFGrid json.
2012-02-25 20:09:34 -07:00
Tim Schaub
73e6973ab5 Remove cargo culted image tile bits. 2012-02-25 20:03:40 -07:00
mperry
ede6da8e6f Merge remote-tracking branch 'upstream/master' into utfgrid 2012-02-25 17:51:56 -08:00
ahocevar
85498cb23f Removing imageOffset and using getImageSize.
This fixes a regression that was introduced with the Tile.Image overhaul. See http://trac.osgeo.org/openlayers/ticket/3625.
2012-02-21 15:06:32 +01:00
ahocevar
221d7caf70 Using a blankImgUrl that works for IFrames in IE9.
See http://trac.osgeo.org/openlayers/ticket/3624.
2012-02-20 12:01:56 +01:00
Matthew Perry
bdf9e1b99e Just call read; don't store variable 2012-02-14 11:16:41 -08:00
ahocevar
5e734f20dc Merge pull request #179 from ahocevar/tile-queue
A tile queue that can be aborted. r=@elemoine,@fredj,@tonio
2012-02-14 10:59:12 -08:00
Matthew Perry
867080a074 Option for loading utfgrid via jsonp 2012-02-13 16:56:35 -08:00
fredj
f8099e9ab1 Unset crossOrigin when setting blankImageUrl to the image.
Tested with FF 10, Chrome 16 and 18.
2012-02-10 13:46:13 +01:00
ahocevar
342d624616 New crossOriginKeyword property.
Set to 'anonymous' for Layer.OSM and Layer.Bing, and not used by default for other layers.
2012-02-10 12:50:13 +01:00