blog

Clustering in Google Maps made simple: the SimpleCluster class

In combination to my SimpleMarker class I have made an engine for clustering those markers if many of them are in a similar location. However, before you use this engine in your application, please note the following: there are probably much better classes for managing high counts of markers, e.g. the MarkerManager class from the Google Maps Utility Library. My SimpleMarker class is also compatible to this MarkerManager, if you want to combine lightweight markers with managing classes.

You still might want to take a look on my code if you want to learn how clustering can be done, as I tried to design the code as understandable as possible. This is why I wrote this article, so keep on reading and see how it works ;-).

Read more »

SimpleMarker Update

My SimpleMarker class just got an update. As someone pointed out that the MarkerManager from the Google Maps Utility Library needs a setVisible() method from its markers, I have added this particular method. Now it is compatible to the Manager and can be used in situations where you need lightweight markers and clustering or other marker management.

Update: I've uploaded a second update. From now on the bounds which are calculated with SimpleMarker.getBounds() will be cached in an array. This improves the performance for my SimpleCluster class to which an article will follow in the next days.

A lightweight marker for Google Maps: the SimpleMarker class

Lately I have been working a lot with the Google Maps API V3. In many cases you want to display a high count of markers, but the default google.maps.Marker acts horribly slow when shown in large numbers. Because of this, the concept of "Lightweight Markers" has been invented. Basically you implement an abstract class for an overlay that keeps the marker-object in the DOM hierarchy as simple as possible. There are various implementations of lightweight markers, some of them have more and some of them less features.

Read more »

Hello, Blog!

And hello, dear readers! The purpose of this blog is to tell you a little bit more about me and what I'm doing. I want to share code snippets of mine of which I think they may be useful and present projects that I've been working on. There may be other content as well in the future, so keep on reading or bookmark this blog in your newsreader (a RSS-feed is available here). As I'm not a native English speaker, please forgive mistakes that I should make. If you're from Germany: this site is available in German, too!

But enough said. I hope you'll enjoy reading this blog and maybe some of my work might help you in the future :-)

Tags: general Published