Design comparison
SolutionDesign
Solution retrospective
Hi everyone, I need help to figure out why the map isn't auto-zooming on the change of IP address. One has to manually zoom out for that. any suggestions on how to fix this?
Community feedback
- @UserAhmad2001Posted over 2 years ago
Greetings my Queen 👋😁
If you want to edit the zooming when an IP address is inputted, You can do that by changing the second parameter of the setView method:
var map = L.map('map'); map.setView([Longitude, Latitude] , *Zooming Intensity * );
You can also set some animations to the zooming, for more in-depth info you should go check out their documentation page.
Hope i was of help to you, Your Highness
Happy Coding
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord