Show count of all google map markers

Posted by aland on Stack Overflow See other posts from Stack Overflow or by aland
Published on 2010-03-23T12:56:01Z Indexed on 2010/03/28 2:33 UTC
Read the original article Hit count: 487

Is there any easy way using the api to get a count of all markers on a map? I have a page similar to this http://www.gorissen.info/Pierre/maps/googleMapLocationv3.php where a user can add markers by clicking on the map. I'd also like to show a count of all the markers. I could do this by declaring a global count var and incrementing it in the event listener, but I thought it would be better if there was an API method I could use and I can find it in the docs.

© Stack Overflow or respective owner

Related posts about google-maps

Related posts about google-maps-api