Arshdeep Singh
Arshdeep Singh

Reputation: 316

Change the origin of the marker in google maps android

enter image description here

I've used a custom marker to give my current location but the problem is that it shows the bottom of part of the image at the location which I've entered.

I want the center of the image to be at the location which I've entered!

I'm using GoogleMap and mapFragment for this purpose!

Upvotes: 0

Views: 223

Answers (1)

greeble31
greeble31

Reputation: 5042

Use MarkerOptions.anchor():

MarkerOptions options;
[...]
options.anchor( 0.5f, 0.5f );   //set anchor point in center
map.addMarker( options );

Upvotes: 2

Related Questions