Set marker center in GeoPoint

I am working on osmdroid and trying to make something very simple, which I did on another card, but I cannot find how to do it on OSMdroid. I want to place a marker somewhere on a map, on GeoPoint. It's easy before that. But I also want the center of the pic marker to be on the supposed geo-integration. With my code, right now, geoinformation is in the lower left corner of the image.

How to do it?

+3
source share
2 answers

OK, I found it. Therefore, I answer my question if someone has the same problem.

I tried your woodstock idea first, but I could not find the boundCenter method.

, GeoPoint , :

overlayItem.setMarker(YourDrawable);
overlayItem.setMarkerHotspot(HotspotPlace.CENTER);
+10

osmdroid, , .

, Google MapView , , , GeoPoint:

super(boundCenter(defaultMarker));
0

All Articles