P
P
Peter Slobodyanyuk2016-03-05 15:38:37
Google Maps
Peter Slobodyanyuk, 2016-03-05 15:38:37

Place all markers on the map (autodetect center and scale)?

Hello! How to make all markers on the map visible at once? That is, you need to somehow determine the center of the map and its scale by markers. Or are there some built-in methods?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Petr Slobodyanyuk, 2016-03-09
@PeterLS

This is done by the fitBounds() function. Here 's how to do it!

A
Alexey A, 2016-03-05
@allewa

So here is the jsfiddle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question