android google map marker,android google map marker placing

在Android应用中,开发者遇到了在地图上设置marker的问题。他们已经将marker定位在坐标51.507351,-0.127758(伦敦),使用了一个带有‘Q’符号的图片作为marker。问题在于,‘Q’符号的位置位于坐标点上方,而他们希望将marker的位置调整到箭头的底部。他们附上了图片以供理解,并寻求解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

In my Android application I need to place marker at exact position on map. I pin a marker on map with 51.507351, -0.127758 (London) location. I used the following code to do the work.

googleMap.addMarker(new MarkerOptions().position(

new LatLng(51.507351, -0.127758)).icon(

BitmapDescriptorFactory.fromBitmap(BitmapFactory

.decodeResource(getResources(),

R.drawable.q_icon))));

googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(

new LatLng(51.507351, -0.127758), 20));

And this my marker drawable image:

bd765a1a4eb3923c16a333fcf99525b7.png

Now my problem is, the "Q" symbol is placed at the location of 51.507351, -0.127758. I need to place marker at the position where bottom arrow starts.

Please see the picture so that you can understand my question.

How can I do this? please help me.

74ee697703ef9cc52fe9aa89a645cac1.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值