Commit Graph

29 Commits

Author SHA1 Message Date
Iván Sánchez Ortega
7e1740ecdf Better sanity checks for avoiding loading infinite tiles (#5479)
* Sanity check to prevent loading tiles when bounds are `Infinity`

* Make linter happy

* Better sanity checks for avoiding loading infinite tiles

* typo
2017-04-25 15:00:47 +02:00
Joachim Kuebart
1010451a66 Pull min/maxNativeZoom from TileLayer into GridLayer, as per #5316. (#5319)
* Pull min/maxNativeZoom from TileLayer into GridLayer, as per #5316.

* Add a couple unit tests for GridLayer's maxNativeZoom
2017-02-09 10:33:43 +01:00
Julio Garcia
d303a7b681 Adding Unit Tests for minNativeZoom and maxNativeZoom 2016-11-18 15:45:23 +01:00
Iván Sánchez Ortega
63fd4edc76 wrap tileBounds if noWrap is false by @fyeah (#4908) 2016-09-12 16:59:21 +02:00
Yohan Boniface
5dfc3364d1 Allow to make screenshots in Phantomjs (#4705)
* Load CSS in PhantomJS

* Allow to take screenshot in PhantomJS while running tests

For that, one need to run this call:

    window.top.callPhantom({'render': 'screenshot.png'});

* Make PhantomJS serve images

* Bonus: those tests now passe in Phantom too

* Add helper to make screenshot in tests

	takeScreenshot();

or

	takeScreenshot('path/to/screenshot.png');
2016-07-08 11:05:12 +02:00
Iván Sánchez Ortega
b2d7cf110b Fix #4039: Use different L.Bounds for "marking as prunable" and loading tiles (#4650)
* Fix #4039: Use different L.Bounds for "marking as prunable" and loading tiles.

* configurable tile pruning tests

* using spy for testing load did not happen
2016-06-21 15:27:44 +02:00
Iván Sánchez Ortega
4b38a7165a rm spurious check, fixes #4068 2016-04-02 18:32:31 +02:00
Jan Pieter Waagmeester
ccaf632268 Do not calculate inverted y coords for CRSes with infinite: true
Fixes #4338
2016-03-22 14:10:24 +01:00
Jan Pieter Waagmeester
34075a893a Unit tests for TileLayer getTileUrl replacements 2016-03-21 15:00:13 +01:00
Iván Sánchez Ortega
8da61993d2 Added four prosthetic-hand tests, checking mouse&touch drag events and touch-zoom 2016-03-18 15:24:42 +01:00
Iván Sánchez Ortega
c6e2a2021a Unit tests for flyTo and TileLayers. 2016-02-05 16:30:29 +01:00
Iván Sánchez Ortega
efdc626262 Fix tile pruning on fade-in, pass all unit tests now :-D 2016-02-04 15:19:35 +01:00
Iván Sánchez Ortega
f777f42c6b More GridLayer unit tests; Grid zoom calculation changed during zoom anims 2016-02-03 17:35:52 +01:00
Iván Sánchez Ortega
bf37a9106c Change the way GridLayer is reset on a map viewreset 2016-02-02 16:56:18 +01:00
Iván Sánchez Ortega
ed05d4ac1e Unit tests for GridLayer loading logic 2016-02-02 14:56:02 +01:00
Yohan Boniface
e2fbe19683 Fix GridLayer pixelBounds computation
Map size does not change from one zoom to another, so we dont need
to scale it.

Without this change, we are creating more or less 4x tiles when
zooming in.
There are still cases where we are requesting a bit more tiles than
what I would expect, but I see it also happens on 0.7.3
2015-11-22 23:19:57 +01:00
Vladimir Agafonkin
cfdbd10431 enforce indentation in specs 2015-09-25 13:55:37 +03:00
Per Liedman
fecd412209 Truncate high/low latitudes for Spherical Mercator like previous versions.
Close #3700.
2015-08-03 21:26:56 +02:00
Vladimir Agafonkin
fdd60cc66b ditch viewreset event, reliable zoomend
removes viewreset use everywhere; also changes event order to have
zoomend before move and moveend to make zoomend a reliable viewreset
successor
2015-06-04 20:42:28 +03:00
John Firebaugh
21701a6fae Remove test specific to old zoom code 2015-02-06 16:36:43 -08:00
Vladimir Agafonkin
d145b1fdba fix a bunch of eslint warnings in the spec suite 2015-01-28 19:32:27 +02:00
John Firebaugh
68f86d85d3 Better fix for tile pruning
Need to always prune in _addTiles, otherwise tiles can
get stranded.
2014-11-07 16:27:42 -08:00
Vladimir Agafonkin
0c70dcb581 remove slow tests 2014-10-29 17:20:06 +02:00
Vladimir Agafonkin
2ff2c42847 move some GridLayer tests, add createTile stub 2014-10-23 12:58:29 +03:00
bennlich
4eb033c719 Included leaflet.css in html instead of TileLayerSpec.js 2014-07-31 23:43:14 -06:00
bennlich
abfcd9ea59 Added TileLayerSpec.js tests for loading events 2014-07-31 15:38:21 -06:00
Vladimir Agafonkin
1a7b12604b run view reset before load, fix #2510 2014-03-05 23:27:32 +02:00
John Firebaugh
af9302ce19 Make GridLayer methods safe to call pre-setView 2013-12-13 18:01:06 -05:00
Vladimir Agafonkin
04c95e1af9 basic GridLayer spec, move TileLayer spec 2013-12-02 19:18:08 +02:00