如何添加自定义标记Gmap [英] How to add custom markers Gmap

查看:105
本文介绍了如何添加自定义标记Gmap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找如何将特定标记添加到我的gmap中。

这是代码:

  LatLng coord1 = new LatLng y,x); 
advancedModel.addOverlay(new Marker(coord1,test,orange.png,http://maps.google.com/mapfiles/ms/micons/blue-dot.png));

我想添加我在 / resources / images 中的特定标记不是这个 http://maps.google.com/mapfiles/ms/micons/blue-dot.png



<你可以做这样的事情:

 标记newMarker =新标记(新LatLng(纬度,经度)); 
newMarker.setIcon(resources / media / marker-blue-dot.png);
simpleModel.addOverlay(newMarker);


I'm looking how to add specific markers to my gmap.

This is the code:

LatLng coord1 = new LatLng (y, x);
advancedModel.addOverlay(new Marker(coord1, "test", "orange.png", "http://maps.google.com/mapfiles/ms/micons/blue-dot.png"));

I want to add my specific marker which is in /resources/images not this one http://maps.google.com/mapfiles/ms/micons/blue-dot.png

Can you help?

解决方案

You can do something like this:

Marker newMarker = new Marker(new LatLng(latitude, longitude));
newMarker.setIcon("resources/media/marker-blue-dot.png");
simpleModel.addOverlay(newMarker);

这篇关于如何添加自定义标记Gmap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆