This method takes three arguments, the first one being the marker you want to add. You add markers to the MarkerManager with addMarker(GMarker, minZoom, maxZoom?). The MarkerManager is initially a bit slower than just adding markers directly to the map but the added benefit is that you can have more control over them. By defining at which zoom-levels each marker should appear you can cluster the markers to reduce the amount being shown at a time. The MarkerManager keeps track of all your markers. Rather than adding each marker individually to the map using GMap2.addOverlay() you first add them to the MarkerManager. Your first option might be to use the MarkerManager since it’s an utility library provided by Google. If you’re new to markers in Google Maps I recommend that you first read Basic operations with markers in Google Maps for an introduction on how to use them. The test results in the end of the article and the test page has also been revised. Update :This article has been updated with the addition of the utility library MarkerClusterer. I’ve also put together a test page to compare them. In this article I will show you a few approaches to speed up performance. But once you have more than a few hundred of them, performance quickly starts to degrade. To use markers in Google Maps is fairly trivial, at least when you have a reasonable amount of them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |