Commit Graph

897 Commits

Author SHA1 Message Date
fr1n63
9365e76169 First attempts at resolving the zoom bug - changes since v0.3 have rendered this fix useless - try again later 2012-07-03 15:01:56 +01:00
Vladimir Agafonkin
2f66e86479 Merge pull request #775 from danzel/fix-events
Events fixups
2012-07-03 01:05:55 -07:00
danzel
4629a10f76 Fix up Events.off with the multi method, was removing all listeners as context is null and fn should be used instead (see .on code) 2012-07-03 11:49:25 +12:00
danzel
3674c11ae7 Line up FeatureGroup change with master 2012-07-03 11:49:18 +12:00
danzel
f6f060f28b Make FeatureGroup de-init events when removing a layer 2012-07-03 11:49:09 +12: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
914204f301 Need to do the shadow too 2012-07-03 09:44:30 +12:00
danzel
166746563c If 3d is disabled, hide everything during a zoom. You can set window.L_DISABLE_3D = true to force 3d off. 2012-07-03 09:12:14 +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
Aaron King
95ed9cdda2 Allow L.Mixin.Events.addEventListener() to accept a map in which the string keys represent one or more space-separated event types and the values represent a handler function to be called for the event(s).
Allow L.Mixin.Events.removeEventListener() to accept one or more space-separated event types. Omitting the fn parameter will remove all event handlers for the supplied event type(s).

Also allow L.Mixin.Events.removeEventListener() to accept a map where the string keys represent one or more space-separated event types and the values represent handler functions previously attached for the event(s).

Add unit tests for the above changes.
2012-06-29 16:14:41 -07: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
Vladimir Agafonkin
0830bb38dc fixed path setStyle in IE6-8, closed #641, updated build and changelog 2012-06-26 12:21:15 +03:00
danzel
9a979dd6d9 ImageOverlay zooming support done proper! :) 2012-06-26 11:16:46 +12:00
danzel
b901708d31 Working on ImageOverlay zoom animation. This works but the image wobbles when it zooms some times. Will have another go with scale... 2012-06-26 11:16:45 +12:00
mourner
18557d890a update build and changelog, cleanup 2012-06-26 01:51:04 +03:00
Vladimir Agafonkin
4b2ccdd7fd Merge pull request #757 from stsydow/for_mourner
fixes NaN bug in scale control and spurios mousemove event
2012-06-25 15:32:34 -07:00
Stefan Sydow
8aaac25b11 fix spurios mousemove event for Chrome on Win 2012-06-26 00:11:40 +02:00
Stefan Sydow
011bbb0906 fix NaN bug in scale control 2012-06-26 00:11:39 +02:00
mourner
a9b42fad6d update changelog, cleanup 2012-06-26 01:05:55 +03:00
Vladimir Agafonkin
784b9cc7cb Merge pull request #756 from danzel/master
Enable translate3d on all webkit3d browsers and a few comments
2012-06-25 14:37:30 -07:00
mourner
500848ef5c tilelayer bringToFront and bringToBack 2012-06-26 00:32:17 +03:00
mourner
ce06661534 marker update method 2012-06-26 00:21:58 +03:00
mourner
ed3176f18f path bringToFront and bringToBack 2012-06-26 00:16:46 +03:00
danzel
76897575f6 Comment on bottom positioning popups 2012-06-26 09:07:07 +12:00
danzel
3536e9e3cc Comment on why a work around is there 2012-06-26 09:07:07 +12:00
danzel
e5239d167d Ensure translate3d is used in all webkit3d browsers and note why. 2012-06-26 09:07:06 +12:00
mourner
bbd3c93237 add ImageOverlay opacity, hide on zoom animation 2012-06-25 23:45:37 +03:00
Vladimir Agafonkin
dd80fc296e fix typo in browser 2012-06-25 19:27:42 +03:00
Vladimir Agafonkin
2ac4a6d364 L.Browser and translate refactor and cleanup 2012-06-25 18:58:37 +03:00
Vladimir Agafonkin
99dd46b538 ensure drag is not fired after dragend, closed #555 2012-06-25 18:08:00 +03:00
Vladimir Agafonkin
4ce8d5f459 update build, cleanup 2012-06-25 17:10:01 +03:00
Vladimir Agafonkin
3f0f7d7ad4 Merge pull request #742 from shintonik/tilelayer-load-event-fix
TileLayer load event is only fired once
2012-06-25 07:07:00 -07:00
mourner
468cc5c5fa minor cleanup 2012-06-25 11:56:38 +03:00
Vladimir Agafonkin
183bf50173 Merge pull request #750 from danzel/fix-unit-tests
Fix up the unit tests
2012-06-25 01:50:12 -07:00
Vladimir Agafonkin
1a598fe1b7 Merge pull request #751 from danzel/ie10
Minor fixups for IE 10 support
2012-06-25 01:48:00 -07:00
mourner
ca9b96edde Fix IE9 (and older) popup positioning 2012-06-25 11:42:51 +03:00
danzel
d8289081b8 Minor fixups for IE 10 support (Tested with Release Preview in a VirtualBox VM). Not sure if multi-touch support will work as I don't have a device. 2012-06-25 15:30:27 +12:00
danzel
61ce465134 Fix up the unit tests. Polyline.closestLayerPoint and noConflict were broken. 2012-06-25 12:16:46 +12:00
mourner
0479e24034 add autopanstart event to Map 2012-06-23 02:20:32 +03:00
mourner
76b0a1de5a get rid of "unbounded" stuff (unprojection should always be unbounded) 2012-06-22 18:24:08 +03:00
mourner
d208f38a0a update build 2012-06-22 17:32:53 +03:00
mourner
0b372dfa7c Merge remote-tracking branch 'origin/master' 2012-06-22 16:11:12 +03:00
danzel
7ec0563dac When reuseTiles is enabled, don't remove and re-add tiles from the DOM, just mark them as off screen and reposition them as required. This performs slightly better.
google maps does this trick too. You can test by finding the tile container ("leaflet-layer" equiv), right click it and set "break on subtree modifications", this will cause a js break whenever a child node is added/removed from that node.
2012-06-22 16:20:06 +12:00
danzel
c92059324d Position tiles without 3d transforms, this makes them faster (google maps does the same). The transforms for them (pan, zoom animation etc) happen on a parent node, this is unaffected.
If you run chrome with about:flags "Composited render layer borders" enabled you will see each tile is dark blue outlined when 3d positioned (meaning each is a render surface) and when not 3d positioned they are cyan outlined (tiles in a tiled composited layer), which renders faster.
Ref http://www.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome (very bottom)
2012-06-22 16:15:08 +12:00
danzel
640e447c7c Remove unused variable. Don't set leaflet-tile-loaded multiple times when reuseTiles:true, don't fire tileload for blank images 2012-06-22 15:19:44 +12:00
danzel
a1afe37436 Rename animateMarkerZoom to markerZoomAnimation to match other animation options. 2012-06-22 09:36:01 +12:00
mourner
46a2e3456d Merge branch 'danzel-animate-zoom-tryagain' 2012-06-21 14:53:48 +03:00
mourner
02f167e29d fix Marker zIndex on zoom animation 2012-06-21 14:52:13 +03:00
shintonik
6428baaa6b bug fix: TileLayer load event was fired only once 2012-06-21 11:10:12 +02:00
danzel
4bc3455812 Fix canvas zooming 2012-06-21 12:05:45 +12:00
danzel
9cec6643f1 Use a generic class (leaflet-zoom-animated) instead of explicitly stating in the CSS what things are zoom animated. 2012-06-21 12:05:31 +12:00
danzel
6d725f02cd Change animateMarkerZoom to use a class/style rather than setting visibility directly. 2012-06-21 11:22:22 +12:00
danzel
106228647e Only do Marker/Path zoom animation if options.zoomAnimation is on (Aka we are doing the zoom animation), be pointless otherwise ;) 2012-06-21 11:15:02 +12:00
danzel
df07bf0ae6 Use generic transform rather than webkit, should make this work on a win8 touch tablet, now I just need someone to give me one to test on :-) 2012-06-21 10:37:28 +12:00
mourner
6713200642 Fix panning animations in Firefox/Opera 2012-06-20 11:01:03 +03:00
danzel
f56682ef31 Add an option to the map: animateMarkerZoom (default true). Set to false and markers will disappear instead of animating when the zoom animation plays. 2012-06-20 16:49:29 +12:00
danzel
be9f96c645 Re-Add TouchZoom firing the zoomstart event 2012-06-20 16:48:35 +12:00
danzel
92f9541f9d Correct the translate+scale code in Path.SVG so that it works correctly for transitions. THIS FIXES TOUCHZOOM WOO!!! 2012-06-20 16:26:00 +12:00
mourner
ff47132527 move private method into correct place 2012-06-19 17:25:07 +03:00
mourner
45d9421417 refactoring, fix autopanning bug 2012-06-19 16:38:40 +03:00
danzel
8d605a0f8d rename _zooming inside Path to _pathZooming so it has a different name to _zooming in Map.TouchZoom. Minor other tidy ups. 2012-06-19 15:11:41 +12:00
Rob Brackett
a3d91156a2 Add support for maps with position: fixed 2012-06-18 18:11:27 -07:00
danzel
289071fa5c Fix up TouchZoom SVG zoom handling AGAIN. This works, but if you do some weird movements (two finger scroll on iPad) it makes the animation get weird. 2012-06-19 11:59:58 +12:00
danzel
bda2a8a2bc Add zooming animation support to Path.Canvas layers also. 2012-06-19 11:12:29 +12:00
danzel
0556e73c3f Path.SVG needs to keep track of when a zoom is going on and not redraw while it is happening or the animation will get messed up 2012-06-19 10:38:32 +12:00
danzel
60f4a70710 Make BackfaceVisibility generic. 2012-06-19 10:21:57 +12:00
danzel
063341c35e Add L.Browser.opera3d, L.Browser.any3d and use it everywhere instead of testing each browsers 3d everywhere. Gives opera 3d support!
Not totally happy with L.Browser.any3d not being in the closure, but it works.
2012-06-19 09:49:44 +12:00
danzel
4b638bde42 Fix up TouchZoom free-zoom. 'zoomstart' event is abused a bit now, might need to fix that. 2012-06-19 09:20:36 +12:00
danzel
9bb49ac4e3 Fix merge issue 2012-06-19 09:20:35 +12:00
danzel
da475a9d23 Don't animate movement when zooming by touch. Still doesn't work right for touch. 2012-06-19 09:20:35 +12:00
danzel
b33d1f3231 Working towards making this work on touch browsers. Doesn't quite work yet but getting there. 2012-06-19 09:20:34 +12:00
danzel
c04020aa18 Remove remaining hacks from Map.ZoomAnimation and implement them properly (using events) in Marker and Popup. 2012-06-19 09:20:34 +12:00
danzel
1ac3a1ba59 Fix up Map.js zoomstart event 2012-06-19 09:20:33 +12:00
danzel
0b30a9b893 Move more zoom animation bits out to css 2012-06-19 09:20:33 +12:00
danzel
86596daa8f Only do SVG zoomstart handling if we support 3d transforms 2012-06-19 09:20:32 +12:00
danzel
c42ce5992f Code tidy up/compaction 2012-06-19 09:20:32 +12:00
danzel
d30d057968 Do major tidy ups on the SVG zoom animation, pretty certain that this is tidy now.
Conflicts:

	src/map/anim/Map.ZoomAnimation.js
2012-06-19 09:20:31 +12:00
danzel
1fc674b58a Fix up SVG zooming with firefox 2012-06-19 09:20:30 +12:00
danzel
6e1802a7db Animate SVG layers when zooming 2012-06-19 09:20:30 +12:00
danzel
ccbd43f1e5 Animate popup boxes when zooming 2012-06-19 09:20:29 +12:00
danzel
6de02571a1 Only apply Path.SVG mobile Webkit hack for mobileWebkit 2012-06-19 09:20:29 +12:00
danzel
65fe7a8e5b Position Popup using L.DomUtil.setPosition for Hardware Accel. 2012-06-19 09:20:28 +12:00
danzel
04bb46a053 Make Map.ZoomAnimation hack browser independant, works on firefox too :) 2012-06-19 09:20:28 +12:00
danzel
cc304bf212 Add gecko3d support to Browser/DomUtil 2012-06-19 09:20:27 +12:00
danzel
51fb9eeacf Start on making markers animate when zooming rather than disappearing and reappearing. Currently implemented as a hack in Map.ZoomAnimation. 2012-06-19 09:20:27 +12:00
mourner
8fa1a0632e Merge remote-tracking branch 'origin/master' 2012-06-18 12:10:37 +03:00
mourner
2e80cfd719 update build, some merges 2012-06-18 12:10:20 +03:00
Vladimir Agafonkin
a287a6f553 Merge pull request #638 from jacobtoye/PreventDefault
Prevent default action when opening layers control
2012-06-18 02:01:06 -07:00
Vladimir Agafonkin
9a1360b7e5 Merge pull request #701 from shramov/polyline-edit-fix
polyline: Fix old position of middle point
2012-06-18 01:56:50 -07:00
Vladimir Agafonkin
0858706837 Merge pull request #716 from twinbit/master
Add coordinates to "featureparse" event
2012-06-18 01:54:00 -07:00
danzel
21c7c0d7a5 Disable the continuous zoom animation on android as it doesn't work due to Androids issue with double translate. 2012-06-18 09:57:48 +12:00
danzel
dc9aa649a9 Performing a touch-zoom needs the transform the other way around, let it have its way... 2012-06-15 16:18:38 +12:00
danzel
4f07a167f1 Tidy up comments and remove console output 2012-06-13 14:34:37 +12:00
danzel
64ae71a4d2 Fix moving your mouse and zooming again before the fg layer has loaded. Previously the bg would get moved to the wrong location, now it moves to the correct location 2012-06-13 14:33:28 +12:00
danzel
e54bc27a18 When zooming, if the current foreground layer doesn't have many tiles and the current background layer does, keep the current background layer rather than swapping in the current foreground. Makes continuous zooming look more awesome, rather than going blank after 2 quick zooms. (Has a big of debug output to be cleaned up later) 2012-06-13 14:19:30 +12:00
Pavel Shramov
03a84a9a84 polyline: Don't reinitialize MarkerGroup
If updateMarkers is called without add/remove old
markers are removed but new don't appear on map
2012-06-12 16:16:34 +04:00
Pavel Shramov
cacf112494 polyline: Fix old position of middle point
When marker position changed and middle point is clicked (not dragged)
old coordinates are used for new point.
2012-06-12 16:16:34 +04:00
Paolo e Stefano Mainardi
4aed9ed533 Keep geometry object on "featureparse" event. 2012-06-04 03:15:59 +03:00
Paolo e Stefano Mainardi
0ca0f2275a Add coordinates to featureparse event. 2012-06-04 03:04:38 +03:00
Pavel Shramov
95ae759632 polyline: Remove deleted marker from internal list
When marker is deleted from line it's left in internal _markers list.
2012-05-25 19:18:53 +04:00
mourner
3c8495b6f3 Fixed layers control in IE7, closed #652 2012-05-16 16:39:03 +03:00
Vladimir Agafonkin
13d861360f Merge pull request #682 from cfis/tilesLoaded
Make sure TileLayer load event is fired
2012-05-15 16:15:34 -07:00
Vladimir Agafonkin
7a056b660f Merge pull request #683 from cfis/tileLayersToLoad
_tileLayersToLoad Cleanup
2012-05-15 16:14:21 -07:00
Vladimir Agafonkin
7d46fdd2b4 Fix error with removing GeoJSON, closes #685 2012-05-16 02:13:15 +03:00
Charlie Savage
a04e4372e8 When a tileLayer is added or removed form a map, the _tileLayersNum property is appropriately updated but the _tileLayersToLoad is not. It is not updated until resetView, but that is called after the method _onTileLayerLoad is called. Thus, if you add one tile layer the _tileLayersToLoad is zero and when _onTileLayerLoad is called the values is decremented to -1.
This in the end doesn't make a difference on the initial zoom level of a map because _onTileLayerLoad also checks to see if there is a background tile layer, which there is not until after a first zoom.  However, this seems to me a bug waiting to happen, thus the patch.
2012-05-12 17:32:04 -06:00
Charlie Savage
da29f47e25 The load event for a tile layer is only fired after all tiles are loaded. However, the previous code only took into account successful tile loads. It is legitimate for a tile load to cause an error - you might be zoomed out on a map and are pulling a non-existent tile (especially on indoors maps). This patch takes into account both successful and unsuccessful tile loads. 2012-05-12 17:22:53 -06:00
mourner
0a6e8d87b7 update build 2012-05-10 17:17:04 +03:00
mourner
c188756573 Merge remote-tracking branch 'origin/master' 2012-05-10 17:08:14 +03:00
mourner
6f40aeeb97 refactor icon and default marker image paths, wrap library in a function 2012-05-10 17:03:50 +03:00
Graeme West
8b2bda9bc3 Converting spaces to tabs for consistency. 2012-05-10 11:45:06 +01:00
Graeme West
081b75b6e8 Fixing indentation so that Leaflet compiles. 2012-05-10 10:05:54 +01:00
mourner
be647f1b20 Make any Circle visible even on low zoom levels 2012-05-10 11:12:59 +03:00
mourner
7956c8c87e limitExecByInterval fixes 2012-05-10 11:09:30 +03:00
Vladimir Agafonkin
1de934ef7e Merge pull request #586 from Mithgol/master
Detect retina displays and adjust tileSize accordingly
2012-05-10 01:00:58 -07:00
Peter Gassner
b0486f2e0b Fix feature detection for IE9 when drawing SVG paths 2012-05-07 16:56:30 +03:00
Charlie Savage
d6af5e8e03 this.edit is not always set for polygons - this happens to us for example when loading from geojson. This patch makes sure that this.editing is set before checking whether editing is enabled. 2012-05-07 00:05:47 -06:00
Geremia Taglialatela
434e09f01b ie6 filter clearing fix 2012-05-05 13:13:07 +02:00
Vladimir Agafonkin
0bd0c1a95a Merge pull request #657 from ericmmartinez/master
Patch for L.Control#setPosition
2012-05-03 07:55:53 -07:00
emartinez
cfbf31721b Patch so setPosition works properly on Control. 2012-05-01 18:04:27 -06:00
Aaron King
69aa3500ff Add getLatLng() and getRadius() methods to L.Circle. 2012-04-30 15:52:23 -07:00
Aaron King
1ffedae5ab Add getContainer() method to L.Map as per the documentation. 2012-04-27 12:49:57 -07:00
Dino Ravnić
1195ac3eea code reformating to make it compliant with jake 2012-04-27 15:00:36 +02:00
Vladimir Agafonkin
0d5e4ccf54 Merge pull request #602 from chx007/patch-1
getViewportOffset -> position:fiexd
2012-04-25 13:59:56 -07:00
jacobtoye
4e2fe35554 Prevent the default action and stop propagation when the layers control is expanded. 2012-04-17 13:11:41 +12:00
Mithgol the Webmaster
a8fa869a41 includes fixes provided by Max Ogden 2012-04-08 05:10:32 +04:00
djomp
ecec332504 Fix for passing jake jshint 2012-04-03 10:42:29 +02:00
Reed
a73b812fe1 fixed _checkIfEmpty in Circle.js with check for _map property 2012-04-01 15:39:00 -04:00
Mithgol the Webmaster
cc0fc0e5b7 adjust zoom levels as well (otherwise markers seem mispositioned) 2012-03-30 09:46:31 +04:00
Mithgol the Webmaster
443181af07 detectRetina is optional (false by default) to prevent map features (like city titles) from being too small to read on retinal tiles 2012-03-26 19:57:12 +04:00
chx007
280649bf42 getViewportOffset -> position:fiexd 2012-03-26 22:04:57 +08:00
Damon Oehlman
ab936cbafb Tweaked DOM util opacity to only apply in IE when opacity !== 1 2012-03-26 14:53:05 +10:00
Johannes
7a9b504e75 Fix bug in bind causing loss of arguments
Empty Arrays are truthy

Fixes issue #574
2012-03-17 16:57:47 +00:00
Mithgol the Webmaster
97cd41e9f5 correction: window.devicePixelRatio > 1 becomes false even if devicePixelRatio is undefined 2012-03-16 10:53:54 +04:00
Mithgol the Webmaster
c7e29b5a87 detecting retina displays, adjusting tileSize 2012-03-16 09:44:07 +04:00
mourner
b333f86e1d fix superclass regression 2012-03-09 11:28:14 +02:00
mourner
9081e9a00c Merge branch 'master' of github.com:CloudMade/Leaflet 2012-03-07 00:08:17 +02:00
Vladimir Agafonkin
14f1a6a947 Merge pull request #557 from JasonSanford/feature-group-bounds
Adding getBounds method to FeatureGroup.
2012-03-06 07:13:07 -08:00
Mattias Bengtsson
e27f4cbcbd Make Leaflet build again. 2012-03-06 15:18:53 +01:00
Jason Sanford
713a3a702f Adding getBounds method to FeatureGroup. 2012-03-03 22:54:50 -07:00
mourner
e5f934e97f more global refactoring 2012-03-04 00:42:50 +02:00
Vladimir Agafonkin
d7998fa7cb Merge pull request #553 from JasonSanford/bounds-extend
LatLngBounds.extend(otherLatLngBounds)
2012-03-03 13:37:50 -08:00
CKeen
a4197a825e add start & end events for Map.BoxZoom 2012-03-03 11:39:14 -05:00
Jason Sanford
d86278571d LatLngBounds.extend(otherLatLngBounds) seems to be working. Addresses #517. 2012-03-03 08:39:18 -07:00
mourner
0474023675 initial global refactoring 2012-03-03 17:02:20 +02:00
Vladimir Agafonkin
20c0bad37e Merge pull request #548 from mehmeta/contentupdated
Added contentupdated event to popup
2012-03-03 05:51:33 -08:00