如何与我在Android的谷歌地图V2图标替换蓝点?我在、图标、地图、Android

由网友(消失掉旳回忆.)分享简介:我想用我自己的谷歌地图V2图标替换蓝点(这在地图上显示当前位置)。我曾尝试以下,但没有奏效。Android地图API V2变化MyLocation图标 地图V2 myLocation蓝点回调 Disable在MyLocation在谷歌地图API V2中间的按钮 应该是这样的下面没有工作位图B = BitmapFacto...

我想用我自己的谷歌地图V2图标替换蓝点(这在地图上显示当前位置)。我曾尝试以下,但没有奏效。

Android地图API V2变化MyLocation图标 地图V2 myLocation蓝点回调 Disable在MyLocation在谷歌地图API V2中间的按钮

应该是这样的

下面没有工作

 位图B = BitmapFactory.de codeResource(getResources()
        R.drawable.location_arrow1);
googleMap.addMarker(新MarkerOptions()。位置(myPosition)
        .title伪(getIntent()。getStringExtra(FIRST_NAME))
        .icon(BitmapDesc​​riptorFactory.fromBitmap(B)));
 

解决方案

您必须停止使用 GoogleMap.setMyLocationEnabled ,写多一点code,其中包括 接收位置更新 你自己和添加的准确性。

怎样在谷歌地图卫星加一个自己显示标签

I am trying to replace blue dot (which shown current location on maps) with my own icon on Google maps v2. I have tried below, none worked.

Android Maps API v2 Change MyLocation Icon Maps V2 myLocation blue dot callback Disable center button in MyLocation at Google Map API V2

Should look like this

Below did not work

Bitmap b = BitmapFactory.decodeResource(getResources(),
        R.drawable.location_arrow1);
googleMap.addMarker(new MarkerOptions().position(myPosition)
        .title(getIntent().getStringExtra("first_name"))
        .icon(BitmapDescriptorFactory.fromBitmap(b)));

解决方案

You will have to stop using GoogleMap.setMyLocationEnabled and write a bit more code, including receiving location updates on your own and adding Circle for accuracy.

阅读全文

相关推荐

最新文章