谷歌地图v3标准图标/影子名称(在v2中等同于G_DEFAULT_ICON)

我正在切换图标types的谷歌地图标记之间的默认一个和另一个(由谷歌图表API制作)。 切换回标准图标我使用:

marker.setIcon('http://maps.google.com/mapfiles/marker.png'); 

对于我使用的另一个图标:

 marker.setIcon('http://maps.google.com/mapfiles/marker_yellow.png'); 

问题是:

  1. 是我使用的真正的“标准”(规范)的url? 是否确定谷歌不会改变它?

  2. 在gmaps api v2中使用像G_DEFAULT_ICON这样的常量会更好。 在api v3中有没有类似的东西?

  3. 如果没有的话,哪里可以find在所有的谷歌api v3的生活中保证工作的规范图标/影子url的列表?

同样的阴影问题 – 当我设置图标时,如何获得标准阴影而不是使用丑陋的m.setShadow(new google.maps.MarkerImage('http://maps.gstatic.com/mapfiles/shadow50.png', null, null, new google.maps.Point(10, 34))) ? (请注意, getShadow()不会告诉你任何事情,因为它使用defaultshadow在默认图标上返回null )。


PS:有一些dynamic的图标API,但他们都已被弃用, 并没有find补救办法 。

我做了一些挖掘Google地图 – 我的地点的创build页面,有一个地方可以find一堆默认的图标。 不知道他们是否会永远保留,但这里有一个近百个名单,让你在默认图标的正确方向:

预览PNG

https://maps.gstatic.com/intl/en_us/mapfiles/ms2/iconm.png

在这里输入图像说明


第1行

https://maps.gstatic.com/mapfiles/ms2/micons/blue-dot.png

https://maps.gstatic.com/mapfiles/ms2/micons/red-dot.png

https://maps.gstatic.com/mapfiles/ms2/micons/green-dot.png

https://maps.gstatic.com/mapfiles/ms2/micons/ltblue-dot.png

https://maps.gstatic.com/mapfiles/ms2/micons/yellow-dot.png

https://maps.gstatic.com/mapfiles/ms2/micons/purple-dot.png

https://maps.gstatic.com/mapfiles/ms2/micons/pink-dot.png

点影: https : //maps.gstatic.com/mapfiles/ms2/micons/msmarker.shadow.png


第2行

固体

https://maps.gstatic.com/mapfiles/ms2/micons/blue.png

https://maps.gstatic.com/mapfiles/ms2/micons/red.png

https://maps.gstatic.com/mapfiles/ms2/micons/green.png

https://maps.gstatic.com/mapfiles/ms2/micons/lightblue.png

https://maps.gstatic.com/mapfiles/ms2/micons/yellow.png

https://maps.gstatic.com/mapfiles/ms2/micons/purple.png

https://maps.gstatic.com/mapfiles/ms2/micons/pink.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/msmarker.shadow.png


第3行

按大头针

https://maps.gstatic.com/mapfiles/ms2/micons/blue-pushpin.png

https://maps.gstatic.com/mapfiles/ms2/micons/red-pushpin.png

https://maps.gstatic.com/mapfiles/ms2/micons/grn-pushpin.png

https://maps.gstatic.com/mapfiles/ms2/micons/ltblu-pushpin.png

https://maps.gstatic.com/mapfiles/ms2/micons/ylw-pushpin.png

https://maps.gstatic.com/mapfiles/ms2/micons/purple-pushpin.png

https://maps.gstatic.com/mapfiles/ms2/micons/pink-pushpin.png

图钉阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/pushpin_shadow.png


第4行

餐厅

https://maps.gstatic.com/mapfiles/ms2/micons/restaurant.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/restaurant.shadow.png

咖啡屋

https://maps.gstatic.com/mapfiles/ms2/micons/coffeehouse.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/coffeehouse.shadow.png

酒吧

https://maps.gstatic.com/mapfiles/ms2/micons/bar.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/bar.shadow.png

小吃店

https://maps.gstatic.com/mapfiles/ms2/micons/snack_bar.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/snack_bar.shadow.png

https://maps.gstatic.com/mapfiles/ms2/micons/man.png

阴影:

https://maps.gstatic.com/mapfiles/ms2/micons/man.shadow.png

女人

https://maps.gstatic.com/mapfiles/ms2/micons/woman.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/woman.shadow.png

无障碍通道

https://maps.gstatic.com/mapfiles/ms2/micons/wheel_chair_accessible.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/wheel_chair_accessible.shadow.png


第5行

停车场

https://maps.gstatic.com/mapfiles/ms2/micons/parkinglot.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/parkinglot.shadow.png

出租车

https://maps.gstatic.com/mapfiles/ms2/micons/cabs.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/cabs.shadow.png

总线

https://maps.gstatic.com/mapfiles/ms2/micons/bus.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/bus.shadow.png

卡车

https://maps.gstatic.com/mapfiles/ms2/micons/truck.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/truck.shadow.png

https://maps.gstatic.com/mapfiles/ms2/micons/rail.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/rail.shadow.png

平面

https://maps.gstatic.com/mapfiles/ms2/micons/plane.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/plane.shadow.png

渡船

https://maps.gstatic.com/mapfiles/ms2/micons/ferry.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/ferry.shadow.png


第6行

直升机

https://maps.gstatic.com/mapfiles/ms2/micons/helicopter.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/helicopter.shadow.png

地铁

https://maps.gstatic.com/mapfiles/ms2/micons/subway.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/subway.shadow.png

电车

https://maps.gstatic.com/mapfiles/ms2/micons/tram.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/tram.shadow.png

信息

https://maps.gstatic.com/mapfiles/ms2/micons/info.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/info.shadow.png

信息圈

https://maps.gstatic.com/mapfiles/ms2/micons/info_circle.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/info_circle.shadow.png

https://maps.gstatic.com/mapfiles/ms2/micons/flag.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/flag.shadow.png

多雨的

https://maps.gstatic.com/mapfiles/ms2/micons/rainy.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/rainy.shadow.png


第7行

https://maps.gstatic.com/mapfiles/ms2/micons/water.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/water.shadow.png

简单的雪花

https://maps.gstatic.com/mapfiles/ms2/micons/snowflake_simple.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/snowflake_simple.shadow.png

海洋

https://maps.gstatic.com/mapfiles/ms2/micons/marina.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/marina.shadow.png

钓鱼

https://maps.gstatic.com/mapfiles/ms2/micons/fishing.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/fishing.shadow.png

帆船

https://maps.gstatic.com/mapfiles/ms2/micons/sailing.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/sailing.shadow.png

游泳的

https://maps.gstatic.com/mapfiles/ms2/micons/swimming.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/swimming.shadow.png

滑雪

https://maps.gstatic.com/mapfiles/ms2/micons/ski.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/ski.shadow.png


第8行

https://maps.gstatic.com/mapfiles/ms2/micons/tree.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/tree.shadow.png

营火

https://maps.gstatic.com/mapfiles/ms2/micons/campfire.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/campfire.shadow.png

野餐

https://maps.gstatic.com/mapfiles/ms2/micons/picnic.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/picnic.shadow.png

营地

https://maps.gstatic.com/mapfiles/ms2/micons/campground.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/campground.shadow.png

护林员站

https://maps.gstatic.com/mapfiles/ms2/micons/rangerstation.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/rangerstation.shadow.png

洗手间

https://maps.gstatic.com/mapfiles/ms2/micons/toilets.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/toilets.shadow.png

兴趣点(POI)

https://maps.gstatic.com/mapfiles/ms2/micons/POI.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/POI.shadow.png


第9行

远足

https://maps.gstatic.com/mapfiles/ms2/micons/hiker.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/hiker.shadow.png

循环

https://maps.gstatic.com/mapfiles/ms2/micons/cycling.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/cycling.shadow.png

摩托车

https://maps.gstatic.com/mapfiles/ms2/micons/motorcycling.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/motorcycling.shadow.png

骑马

https://maps.gstatic.com/mapfiles/ms2/micons/horsebackriding.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/horsebackriding.shadow.png

运动场地

https://maps.gstatic.com/mapfiles/ms2/micons/sportvenue.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/sportvenue.shadow.png

高尔夫

https://maps.gstatic.com/mapfiles/ms2/micons/golfer.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/golfer.shadow.png

落后

https://maps.gstatic.com/mapfiles/ms2/micons/trail.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/trail.shadow.png


第10行

购物

https://maps.gstatic.com/mapfiles/ms2/micons/shopping.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/shopping.shadow.png

电影

https://maps.gstatic.com/mapfiles/ms2/micons/movies.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/movies.shadow.png

杂货店

https://maps.gstatic.com/mapfiles/ms2/micons/grocerystore.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/grocerystore.shadow.png

Convienance商店

https://maps.gstatic.com/mapfiles/ms2/micons/convienancestore.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/convienancestore.shadow.png

艺术

https://maps.gstatic.com/mapfiles/ms2/micons/arts.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/arts.shadow.png

家庭花园业务

https://maps.gstatic.com/mapfiles/ms2/micons/homegardenbusiness.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/homegardenbusiness.shadow.png

电子产品

https://maps.gstatic.com/mapfiles/ms2/micons/electronics.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/electronics.shadow.png


第11行

机械

https://maps.gstatic.com/mapfiles/ms2/micons/mechanic.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/mechanic.shadow.png

加油站

https://maps.gstatic.com/mapfiles/ms2/micons/gas.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/gas.shadow.png

房地产

https://maps.gstatic.com/mapfiles/ms2/micons/realestate.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/realestate.shadow.png

沙龙

https://maps.gstatic.com/mapfiles/ms2/micons/salon.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/salon.shadow.png

美元

https://maps.gstatic.com/mapfiles/ms2/micons/dollar.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/dollar.shadow.png

欧元

https://maps.gstatic.com/mapfiles/ms2/micons/euro.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/euro.shadow.png

日元

https://maps.gstatic.com/mapfiles/ms2/micons/yen.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/yen.shadow.png


第12行

消防部门

https://maps.gstatic.com/mapfiles/ms2/micons/firedept.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/firedept.shadow.png

医院

https://maps.gstatic.com/mapfiles/ms2/micons/hospitals.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/hospitals.shadow.png

住宿

https://maps.gstatic.com/mapfiles/ms2/micons/lodging.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/lodging.shadow.png

电话

https://maps.gstatic.com/mapfiles/ms2/micons/phone.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/phone.shadow.png

警告

https://maps.gstatic.com/mapfiles/ms2/micons/caution.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/caution.shadow.png

地震

https://maps.gstatic.com/mapfiles/ms2/micons/earthquake.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/earthquake.shadow.png

落石

https://maps.gstatic.com/mapfiles/ms2/micons/fallingrocks.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/fallingrocks.shadow.png


第13行

邮局 – 美国

https://maps.gstatic.com/mapfiles/ms2/micons/postoffice-us.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/postoffice-us.shadow.png

警察

https://maps.gstatic.com/mapfiles/ms2/micons/police.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/police.shadow.png

晴朗

https://maps.gstatic.com/mapfiles/ms2/micons/sunny.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/sunny.shadow.png

局部阴天

https://maps.gstatic.com/mapfiles/ms2/micons/partly_cloudy.png

Shadow: https : //maps.gstatic.com/mapfiles/ms2/micons/partly_cloudy.shadow.png

火山

https://maps.gstatic.com/mapfiles/ms2/micons/volcano.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/volcano.shadow.png

相机

https://maps.gstatic.com/mapfiles/ms2/micons/camera.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/camera.shadow.png

摄像头

https://maps.gstatic.com/mapfiles/ms2/micons/webcam.png

阴影: https : //maps.gstatic.com/mapfiles/ms2/micons/webcam.shadow.png


marker.setIcon(null)将放置标准阴影的默认图标…

不过,我仍然会错过一些“正式”的图标列表和它们的URL ,或者像G_DEFAULT_ICON这样的常量来完成这个任务。

我发现的最好的是在这个职位:

带有VisualRefresh的Google Map图标

我还在另一篇文章中发现了这些[ Google Maps Default Icons ]

https://www.google.com/fusiontables/DataSource?dsrcid=308519#map:id=3

另请参阅:

https://support.google.com/fusiontables/answer/2679986