A
A
Anton Alfimov2015-09-22 15:25:50
JavaScript
Anton Alfimov, 2015-09-22 15:25:50

How to get the maximum distance on the map from the center?

Good afternoon!
I'm trying to load objects from the database of only the visible area for Yandex.Maps . Objects for balloons are in GeoJSON point and searched by parameters: center[longitude, latitude], and search distance in meters.
I would like to take data to search for objects directly from Yandex.Maps. Everything is clear with the search center - this is the center of the map. But how to find out the maximum search distance, that is, the maximum distance from the center of the map to one of its corners? The scale in its pure form does not roll, since the map can be of different sizes, and I consider plan B to recalculate the size of the map frame to the scale.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Leonid Sysoletin, 2015-09-22
@Archarious

How to calculate the distance between two points on a map

F
forgotten, 2015-09-22
@forgotten

In general, you don't need to do that. Your solution is bad in that it is not cacheable, i.e. shifting the map by 1 pixel will re-request all data
habrahabr.ru/company/yandex/blog/243665

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question