javascript - how to load markers if their location is what is displayed on screen using Google maps api or gmaps.js -
i have bunch of markers want add together map dynamically.
i getting markers database json object , placing them on map, when map loads
the map have in div 300px x 300px
.
the issue i'm trying solve want load markers on visible part of map.
i know lat
, long
of each marker question how find area displayed on screen, , maybe lat
, long
ranges.
if pan map want update can show more markers...
not sure if makes sense :)
any ideas on issue ?
observe bounds_changed
-event of map. when fires , may utilize contains
-method of bounds
of map(returned mapinstance.getbounds()
) filter markers .
javascript google-maps-api-3 maps google-maps-markers area
No comments:
Post a Comment