Initial zoom setting seems not work and blank the leaflet map in node view. My settings map: OSM Mapnik, initial zoom: 14, minimum and maximum zoom: use map defined setting. Below is the map I get.
I checked the network monitor tab in Firebug, it turned out that the browser tried to retrieve the zoom level 18 tiles instead of 14 which I set as initial zoom level. Below is a snapshot from Firebug:
And I changed the max zoom level to a fixed level like 17, the browser tried to retrieve zoom level 17 tiles. Whether or not the tiles are retrieved successfully by the browser, I always got the almost blank map. And the zoom control won't work.
However, if I configure a pop-up and click the marker to bring up the pop-up. The map is shown well and complete with correct initial zoom level.
Wonder if anyone encounters this bug and knows how to deal with it.
PS. This is just for the node. Just checked this in a view, there was no such a problem.
Comment | File | Size | Author |
---|---|---|---|
#18 | leaflet-map-config.PNG | 15.8 KB | sja1 |
屏幕快照 2014-07-06 上午10.40.16.png | 13.6 KB | passengerabcd | |
屏幕快照 2014-07-06 上午10.50.39.png | 30.57 KB | passengerabcd |
Comments
Comment #1
passengerabcd CreditAttribution: passengerabcd commentedComment #2
passengerabcd CreditAttribution: passengerabcd commentedComment #3
passengerabcd CreditAttribution: passengerabcd commentedComment #4
passengerabcd CreditAttribution: passengerabcd commentedDid more testings and found out that initial zoom setting doesn't work for 14 or higher zoom level. Tested on default OSM tiles and Bing map. Strange.
Comment #5
passengerabcd CreditAttribution: passengerabcd commentedComment #6
fultonchain CreditAttribution: fultonchain commentedI can replicate this on the OSM and Google hybrid maps (haven't tried Bing). Zoom levels >14 prevent the map from rendering on load.
Comment #7
peterm95018 CreditAttribution: peterm95018 commentedI'm +1 with this issue as well. Zoom levels less than 14 allow the map and zoom controls to render.
Comment #8
stefan.kornI can confirm same issue here, zoom levels >= 14 do not render (or only partially).
Comment #9
stefan.kornI have downgraded the leaflet library from version 0.7.3 to 0.6.4 and now the maps do render for initial zoom level >= 14 as well.
Comment #10
PrineShazar CreditAttribution: PrineShazar commentedThanks stefan.korn, would be good to possibly log this with Leaflet. I'll do that when i get some time. #9 worked for me
Comment #11
AlfTheCat CreditAttribution: AlfTheCat commentedHaving this issue too. Thank god I found this thread, would have never figured it out.
Comment #12
marcvangendSame problem here. I can confirm that going back to Leaflet 0.6.4 solves the problem.
Comment #13
michaelmallett CreditAttribution: michaelmallett commentedHave the same issue inside a panel.
Comment #14
RdeBoerPossibly related to #2366987: Leaflet + Leaflet Markercluster and zoom levels whose patch was applied.
Not sure.
Comment #15
wak CreditAttribution: wak commentedSame problem here, even within a view.
Comment #16
RdeBoer@marcvangend, @michaelmallett, @wak
So have you all reverted to Leaflet JS 0.6.4 and the problem has gone away?
And this is happening in a View display when there is only 1 marker to show, at zoom levels of 14 or higher?
Rik
Comment #17
marcvangend@rdeboer yes, I reverted to Leaflet JS 0.6.4.
If I recall correctly (not 100% sure, it was 4 months ago :-)) I was using the leaflet field formatter, showing a single point stored in a geofield.
Comment #18
sja1 CreditAttribution: sja1 as a volunteer commentedI just upgraded my leaflet library, and had the same problem with a google map being displayed as a panel pane. I noticed in the configuration popup for the map that the google map now has a zoom range of 0..21, when before the upgrade it was 0..18. (see screen capture)
Inside the zoom settings for the map, I had the initial zoom level field set to "use map defined setting". I switched this to 18 (which by the way is the highest number allowed currently by the module), and my maps started showing correctly again.
Could perhaps the problem be caused by the change in the zoom ranges defined by the leaflet library?
Comment #19
indigoxela CreditAttribution: indigoxela commentedHi sja1,
welcome to our mystery tour ;)
I only realized this problem with OSM Mapnik.
Values between 1 and 13 rendered just fine, zoom level 18 also rendered fine.
The problem seemed to occur only with 14, 15, 16 and 17.
Clicking on the marker of such a half-rendered map "repaired" everything. I tried different versions of Leaflet JS but that didn't fix it for me.
I just saw that a new version (beta) of Leaflet js is available: Leaflet 1.0 beta 1, released on July 14, 2015.
And with this version all initial zoom levels work perfectly.
Caution: Library version detection of leaflet module won't work with this beta.
Open leaflet.js with a text editor and somewhere in the comment add:
version="1.0.0"
Has anybody else tried 1.0 beta 1 yet?
Comment #20
RdeBoer@indigoxela,
Thanks for your report. No haven't tried Leaflet JS 1.0 Beta yet.
I read in the release notes that there are API changes, which scared me a little, but looks like you've found few problems. In fact, you've found a FIX !
Rik
Comment #21
gifad CreditAttribution: gifad commentedIssue seems to be fixed in Leaflet 0.7.5 as well;
Using it for a week, and everything works as designed ;)
Comment #22
RdeBoerThanks for sharing @gifad !
Consider this fixed until proven otherwise.
Rik
Comment #23
indigoxela CreditAttribution: indigoxela commentedI can confirm that. Initial zoom levels above 13 work fine with 0.7.5 (updated on Sep 2, 2015).
Comment #24
marcvangendThanks for testing and reporting back!
Comment #25
shevgenyCool! But now is not working: "Auto-box to fit all markers"
Comment #26
shevgenyRather, it works, but not as much as before, does not always work. Especially if you open several cards on one page by ajax (AutoDialog module)
demonstration — https://youtu.be/Imav8VfdmC8