Commit Graph

170 Commits

Author SHA1 Message Date
Vladimir Agafonkin
5c18361aa2 fix typo, fix animated setView not converting latlng input 2013-02-20 20:54:12 +02:00
Vladimir Agafonkin
cf00a0113d fix rounding error when changing zoom, close #426 2013-02-20 20:11:47 +02:00
Vladimir Agafonkin
06190b1ec8 Merge pull request #1434 from jfirebaugh/remove
Add Map#remove
2013-02-20 09:41:44 -08:00
Vladimir Agafonkin
40a824fc97 refactor TileLayer animation, fix #1140, #1437, #52, #1442
Refactored TileLayer animation so that it happens for each tile layer
independently instead of animating the parent of all tile layers. Moved
TileLayer animation code into a separate file (TileLayer.Anim.js).
Fixes loads of bugs and makes the code easier to understand.
2013-02-20 18:40:00 +02:00
John Firebaugh
6ef25866eb Add Map#remove
This is a minimal implementation; it only unbinds events
and deletes the _leaflet flag from the container.

Refs #1101.
2013-02-19 17:36:03 -08:00
Vladimir Agafonkin
d98b4ea035 throw meaningful exception on getCenter before setView, close #1395 2013-02-19 16:54:29 +02:00
Vladimir Agafonkin
a948379db8 Merge pull request #1376 from moonlite/zoomlevelschange-event
Zoomlevelschange event
2013-02-14 03:35:57 -08:00
Mattias Bengtsson
cbee6851c8 Don't expose getZoomLevels. 2013-02-14 12:00:08 +01:00
Mattias Bengtsson
efe0c6f6ea Fire zoomlevelschange event when zoomlevels are updated.
This is triggered when you remove a layer from a map with greater
zoom level coverage than the remainding layers or when you add a tilelayer
with greater zoomlevel coverage than the previous set of layers had.
2013-02-14 03:04:10 +01:00
oslek
2c11fdfa6d prevent false move events in invalidateSize 2013-02-13 12:38:33 -08:00
Roemer Vlasveld
109fd06ae6 hasLayer not checking for null
Return false when checking for a null object in L.Map.hasLayer, in
response to issue #1282.
2013-01-21 23:22:01 +01:00
oslek
7dd7e4f699 Robust array type check for cross-frame support
In a multi-frame DOM environment, if setView is called with an array for
the first parameter, a subsequent call to getBounds raises "Invalid
LatLng object" exception. This is the case if the array passed to
setView was created outside the iFrame that contains the map. It causes
the array test using "instanceof" in L.latLng to fail, and
_initialTopLeftPoint to not being properly initialized.

Thank you to Juriy Zaytsev for the full explaination:
http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
John Resig and Dean Edwards post comments and concur.
2013-01-14 14:04:50 -08:00
Vladimir Agafonkin
40b59b2a85 add ability to call init hooks manually in the constructor 2012-12-12 17:48:30 +02:00
Vladimir Agafonkin
782e8e7dcf implement hooks for Class constructors (AOP-style), close #1123 2012-12-12 12:26:33 +02:00
Vladimir Agafonkin
96e4c80c75 revert clearing map div contents, fix positioning, close #278 again 2012-12-10 17:57:04 +02:00
mourner
1d14b0c50d fix code style issues #1159, update build 2012-11-29 22:43:40 +02:00
Mattias Bengtsson
c0135a219d Added a bunch of tests and fixed some bugs those exposed.
Also don't try to automatically adjust zoom. Leave that to the
layer control for now and wait for a setBaseLayer / switchLayer
or something instead.
2012-11-19 04:36:13 +01:00
Mattias Bengtsson
6f1532f402 Fix for https://github.com/CloudMade/Leaflet/pull/623
There seems to be a timing bug though.
2012-11-18 22:07:27 +01:00
Vladimir Agafonkin
dbd4da6255 add shortcuts for extend, bind, stamp and setOptions 2012-11-07 20:30:56 +02:00
Vladimir Agafonkin
a293f52e80 different whitespace fixes (smart tabs, lines no longer than 100) 2012-11-07 14:13:06 +02:00
John Firebaugh
0b4d2b0c44 Add Map#whenReady
Fixes #1063
2012-10-12 12:54:13 -07:00
John Firebaugh
fbf91fef54 Ensure that getBounds can be called during the first moveend event
Fixes #1027
2012-10-04 14:02:46 -07:00
mourner
0bdc48a864 improve zoom control (shift-clicking) 2012-08-10 23:11:28 +03:00
mourner
8980f2d224 minor code cleanup, more destructive point operations 2012-08-10 22:40:55 +03:00
Vladimir Agafonkin
0cca115ecb Fix map to not animate on resize by default 2012-08-06 13:36:52 +03:00
Vladimir Agafonkin
10ffc863db Merge pull request #857 from ajbeaven/AnimatedInvalidateSize
Added option to animate pan on invalidateSize()
2012-07-31 01:11:27 -07:00
Andrew Beaven
2b27065c6b Added option to animate pan on invalidateSize() 2012-07-31 11:59:06 +12:00
Vladimir Agafonkin
cdfaad994f more TileLayer and Control.Layers zIndex improvements, #309 2012-07-27 12:32:24 +03:00
Vladimir Agafonkin
55c35828a8 Fix jittery marker movement on pinch-zoom (removed position rounding) 2012-07-25 11:14:21 +03:00
Vladimir Agafonkin
5a1e2a926f make zoom animation cancel the resize moveend trigger 2012-07-24 17:55:48 +03:00
jacobtoye
770d2c899f change second map mousedown to be mouseup 2012-07-16 15:34:55 +12:00
jacobtoye
661c6c6d1d Revert "change second mousedown to be mouseup"
This reverts commit 3b6f57e233.
2012-07-16 15:28:13 +12:00
jacobtoye
3b6f57e233 change second mousedown to be mouseup 2012-07-16 15:10:53 +12:00
Vladimir Agafonkin
275760352b remove accidental console.log 2012-07-12 15:54:44 +03:00
Vladimir Agafonkin
532ff7232d optimize map resizing 2012-07-12 15:53:58 +03:00
Vladimir Agafonkin
01e26a4cce add Map mouseup event 2012-07-12 15:48:44 +03:00
Jan Pieter Waagmeester
97e3d08dd5 Use L.DomUtil.addClass to add classes instead of direct attribute manipulation 2012-07-05 16:59:00 +02:00
Vladimir Agafonkin
16cdb668b2 merge simplify-api 2012-07-05 16:24:42 +03:00
Vladimir Agafonkin
3e24ed5400 more work on simplified api 2012-07-05 14:45:06 +03:00
Vladimir Agafonkin
7ea7b144f9 Merge pull request #759 from danzel/zoom-marker-hack-fix
Zoom Marker Hack Fix
2012-07-04 16:09:11 -07:00
Vladimir Agafonkin
0d6749a3ac initial API simplification 2012-07-03 17:06:44 +03:00
danzel
62061396cc Make the android hacks only happen for android 2 and 3. On 4 (and hopefully future version) actually seem to do everything correct (Tested in chrome and the native browser) 2012-07-03 10:23:22 +12:00
danzel
dc46ae2ae3 By default only enable markerZoomAnimation if the browser supports transition and 3d. Allows Browser.any3d=false hack to work again 2012-07-03 08:25:12 +12:00
mourner
50c6c480b4 add window and undefined to outer closure 2012-07-01 16:18:00 +03:00
mourner
28a21fd4c3 minor cleanup / refactoring, fix removeEventListener bug 2012-07-01 15:46:31 +03:00
mourner
0f40da1cce merge events by Guiswa, minor cleanup/refactoring 2012-06-30 14:51:09 +03:00
mourner
8d619899b0 refactoring, map getZoomScale and getScaleZoom, fix path zoom anim to take clip padding into account 2012-06-29 02:59:49 +03:00
mourner
9387db04c2 refactoring, cleanup, add Bounds.getBottomLeft and getTopRight 2012-06-29 01:47:30 +03:00
Charlie Moad
4a9b87bdbb use abs val distance 2012-06-27 21:18:02 -04:00
mourner
76b0a1de5a get rid of "unbounded" stuff (unprojection should always be unbounded) 2012-06-22 18:24:08 +03:00