fitBounds() shows whole earth (if map is first hidden and then shown)

前端 未结 5 1129
南笙
南笙 2021-02-15 06:50

I have a bunch or markers, and I want to show only the area containing them. I found a long list of similar questions (see at the bottom of the post for some), but none of the s

5条回答
  •  孤城傲影
    2021-02-15 07:42

    I tried your code in a fiddle, and it works as expected.

    So the reason why your code fails must be in the definition of your datapoints (as already suggested by Engineer). Compare your list definition with mine and check if they are different.

提交回复
热议问题