Показать сообщение отдельно
  #2 (permalink)  
Старый 16.08.2016, 16:58
Профессор
Отправить личное сообщение для Dilettante_Pro Посмотреть профиль Найти все сообщения от Dilettante_Pro
 
Регистрация: 27.11.2015
Сообщений: 2,899

SuperBenza,
Для Google Maps Api по событию bounds_changed использовать метод
getBounds()
Return Value: LatLngBounds
Returns the lat/lng bounds of the current viewport. If more than one copy of the world is visible, the bounds range in longitude from -180 to 180 degrees inclusive. If the map is not yet initialized (i.e. the mapType is still null), or center and zoom have not been set then the result is null or undefined.
LatLngBounds(sw?:LatLng|LatLngLiteral, ne?:LatLng|LatLngLiteral) Constructs a rectangle from the points at its south-west and north-east corners.
И запрашивать из бд маркеры, лежащие в этой зоне и отображать их.
Также полезно при большом количестве маркеров использовать кластеризацию.

Последний раз редактировалось Dilettante_Pro, 16.08.2016 в 17:07.
Ответить с цитированием