Tomislav
Tomislav

Reputation: 153

Cluster Marker OpenStreetMap java

Currently in one project I use GoogleMaps with ClusterMarker based on PhotSpot http://code.google.com/p/android-playground-erdao/wiki/PhotSpot.
I tried to convert it to use OpenStreetMap with mapsforge library( http://code.google.com/p/mapsforge/) replacing referenced libraries from googlemaps to mapsforge.

I need to override and implement method from mapsforge library in my custom class based on ClusterMarker ( http://code.google.com/p/android-playground-erdao/source/browse/trunk/SampleClusterMap/src/com/erdao/android/mapviewutil/markerclusterer/ClusterMarker.java ) from photspot and here I have hit the wall.

@Override
    protected void drawOverlayBitmap(Canvas canvas, Point drawPosition, Projection projection,
            byte drawZoomLevel) {
    }

Did any of you tried to create clustermarker overlays on openstreetmap in java or maybe know any open source library that could help?

Upvotes: 1

Views: 1932

Answers (1)

joshas
joshas

Reputation: 1474

Thanks for great resource. Coincidentally, I was working on ItemClustering implementation for mapsforge too.

After importing SampleClusterMap source and making little adjustments to code I got it working. Here's a link to current project source http://ge.tt/7Zq63CH , most of changes are self explanatory. Don't forget to add mapsforge 0.3.0 library to build path.

Upvotes: 1

Related Questions