Ask Your Question
3

How can the maximum zoom level be increased for a leaflet?

asked 2022-11-09 11:00:00 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-04-30 08:00:00 +0000

devzero gravatar image

The maximum zoom level for a leaflet map can be increased by changing the value of the "maxZoom" option in the map options.

For example, if you want to increase the maximum zoom level from the default value of 18 to 20, you can use the following code:

var map = L.map('map', {
  maxZoom: 20
});

This will allow you to zoom in closer to the map than before. However, keep in mind that increasing the maximum zoom level may also increase the amount of data that needs to be loaded, which can impact performance.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-09 11:00:00 +0000

Seen: 8 times

Last updated: Apr 30 '21