Closed (fixed)
Project:
Leaflet
Version:
10.0.13
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2014 at 14:31 UTC
Updated:
18 Jun 2023 at 17:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pebosi commentedComment #2
d0t101101 commentedThanks!
I manually applied part of this to v8.x-dev, and noticed duplicate scale controls were rendered on the map. To resolve, I added the following addition to to ensure scale controls are added once and only once in the JS (when multiple layers are in use):
Comment #3
rdeboerYou can also use Leaflet in combination with IPGV&M which has Scale Control (imperial/metric) as a configuration option.
Comment #4
orkutmuratyilmazI've also created a patch for Version 10.0.13 and I hope that it works for everyone:)
Comment #5
itamair commentedComment #7
itamair commentedWith this last commit: https://git.drupalcode.org/project/leaflet/-/commit/747d05f337de271b227f...
this feature request has finally been committed into 10.x dev branch, in a solid and configurable way, according to Leaflet Map Scale Control: https://leafletjs.com/reference.html#control-scale
This is going to be part of next Leaflet 10.0.14 release
Comment #8
orkutmuratyilmazThank you @itamair:)
Comment #9
_kom__ commentedDid anybody test this new feature with Lealet Layers installed and more than one map bundle created?
The are some issues for me, but I can't decide if they are Leaflet 10.0.14 release issues, Leaflet Layers issues or maybe even known Drupal core JS bugs.
Comment #10
orkutmuratyilmaz@_kom__, I'm using Leaflet Layers with my installation too. What kind of issues do you have? I'm facing an issue like this, but I don't think that the reason is scale control.
Can you share more details with us?
Best,
Orkut
Comment #11
orkutmuratyilmazI'd like to be sure and I've tried to uncheck the "Enable Map Scale Control." on my view's Leaflet display settings, then flushed the cache. Nothing happened. This feature doesn't interfere with my issue, at least.
Comment #12
_kom__ commented@Orkut, 1)create two different map bundles, 2)create two different node types with geofield in each represented by these different bundles, 3)disable Scale Control for all bundles in Leaflet settings (or maybe for one). Will all other controls enabled (except +/- buttons) stay in place?