torfsen / leaflet.zoomhome Goto Github PK
View Code? Open in Web Editor NEWA Leaflet zoom control with a home button for resetting the view.
Home Page: https://torfsen.github.io/leaflet.zoomhome
License: Other
A Leaflet zoom control with a home button for resetting the view.
Home Page: https://torfsen.github.io/leaflet.zoomhome
License: Other
I'd like to execute a custom function to clear all of the markers on my map when I click the zoomHome button. Is there a way to execute this on click? I don't see any information in the documentation about that.
Hi guys, this is my webmap:
Everything works perfectly: sidebar(v2), autopan, popup content go in sidebar panels fine.
Only a few trouble. At top right I have zoom home button.
When sidebar is close everything go fine: zoom home button center my map.
When sidebar is open the zoom home makes the same thing but the sidebar hide part of my center map.
I'd like a little right-offset on result of zoom home button when sidebar is open.
Something like:
if sidebar.close() = true
zoomhome
else
zoomhome.offset
Any advices are welcome, thanks!
Valerio
The word "home" (specifically in the context of maps) may be misinterpreted by blind users to mean the individual's home (perhaps indicative of obtaining the user's location through the Geolocation API).
Please consider a different wording for the zoomHomeTitle
:
leaflet.zoomhome/dist/leaflet.zoomhome.js
Line 20 in 84a0291
Examples for another default title: "Reset view", "Reset to initial view", "Reload view", "Reload map".
Reference discussion: Canadian-Geospatial-Platform/geoview#192
Hi Florian,
first thanks for providing this leaflet plugin - we are using it in our WordPress mapping plugin "Maps Marker Pro" (send me an email to get a free dev license ;-)
For the upcoming v3.0 release of our plugin, we also upgraded to GoogleMutant leaflet plugin for displaying Google maps. We now found that there seems to be an issue with leaflet.zoomhome and GoogleMutant: if the zoomhome button is clicked, tiles are missing:
We posted this as a new ticket at https://gitlab.com/IvanSanchez/Leaflet.GridLayer.GoogleMutant/issues/29 and also created a jsfiddle at https://jsfiddle.net/ennv4ckr/2/
As we havent found out why this issue occurs in the first place (especially as only setView() is called which shouldnt lead to an issue in our opinion), it would be great if you could have a short look at the issue too and tell us if you think this needs to be fixed by GoogleMutant only or if the issue could also be fixed within the leaflet.zoomhome repository.
Your reply would be much appreciated!
best,
Robert
Users can use setHomeBounds
to store a default bounds region for the home button.
In this method the zoom level for that bounds is calculated and stored.
But, if the browser is resized, that zoom level is now invalid.
The issue can be overcome if the bounds object is stored in the options, then the zoom level calculated in the go-home operation.
https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software
"We recommend against using Creative Commons licenses for software."
What is the proper way of calling this function? I have initialized a zoomHome and call it saying zoomHome.homeZoom() but I keep getting an error that homeZoom() is not a function.
So users can install via npm
It would be nice to have a method for setting the home coordinates.
zoomHome.setHomeCoordinates([35.01267, 88.83459])
Would be great to be able to modify the animation time and easing of the animation back to the home position by being able to pass zoom/pan options to setView.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.