【问题标题】:Google Maps Web (Nov 2017 New UI) Marker IconsGoogle Maps Web(2017 年 11 月新 UI)标记图标
【发布时间】:2017-12-24 07:41:35
【问题描述】:

Google Maps Web 中查看新的“平面”样式标记图标。

谁知道我在哪里可以获得图片资源的链接?我正在做一些自定义的 Google 地图网络工作,现在想使用新图标。

【问题讨论】:

    标签: google-maps-markers


    【解决方案1】:

    好的,通过检查新的 Google 地图网络并使用他们的资产找到了答案:

    var imageBlue = 'https://maps.gstatic.com/mapfiles/ms2/micons/blue-dot.png';
      var imageRed = 'https://maps.gstatic.com/mapfiles/ms2/micons/red-dot.png';
      var imageGreen = 'https://maps.gstatic.com/mapfiles/ms2/micons/green-dot.png';
      var imageLtBlue = 'https://maps.gstatic.com/mapfiles/ms2/micons/ltblue-dot.png';
      var imageYellow = 'https://maps.gstatic.com/mapfiles/ms2/micons/yellow-dot.png';
      var imagePurple = 'https://maps.gstatic.com/mapfiles/ms2/micons/purple-dot.png';
      var imagePink = 'https://maps.gstatic.com/mapfiles/ms2/micons/pink-dot.png';
      // Custom images below taken from source images URLs of new Google Maps
      // Can change HEX color values, scale=1 is small, scale=2 is bigger, scale=3 is biggest
      var scale = 1;
      var imageCustomPinSpotlight = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/spotlight/spotlight_pin_v2_shadow-1-small.png,assets/icons/spotlight/spotlight_pin_v2-1-small.png,assets/icons/spotlight/spotlight_pin_v2_dot-1-small.png,assets/icons/spotlight/spotlight_pin_v2_accent-1-small.png&highlight=ff000000,ea4335,960a0a,ffffff&color=ff000000?scale=' + scale;
      var imageCustomAirport = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/airport_pinlet-1-small.png&highlight=ff000000,10bdff,ffffff&color=ff000000?scale=' + scale;
      var imageCustomHospital = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/hospital_H_pinlet-1-small.png&highlight=ff000000,f88181,ffffff&color=ff000000?scale=' + scale;
      var imageCustomHospitalLite = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/hospital_H_pinlet-1-small.png&highlight=ff000000,F5AFAF,ffffff&color=ff000000?scale=' + scale;
      var imageCustomDotLtGreen = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/dot_pinlet-1-small.png&highlight=ff000000,4db546,ffffff&color=ff000000?scale=' + scale;
      var imageCustomDotRCBSRed = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/dot_pinlet-1-small.png&highlight=ff000000,E42313,ffffff&color=ff000000?scale=' + scale;
      var imageCustomStar = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet_outline-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/constellation_star_pinlet-1-small.png&highlight=ff000000,ffffff,fbc02d,ffffff&color=ff000000?scale=' + scale;
      var imageCustomHeart = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet_outline-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/heart_pinlet-1-small.png&highlight=ff000000,ffffff,fa507d,ffffff&color=ff000000?scale=' + scale;
      var imageCustomFlag = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow-1-small.png,assets/icons/poi/tactile/pinlet_outline-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/nickname_pinlet-1-small.png&highlight=ff000000,ffffff,4285f4,ffffff&color=ff000000?scale=' + scale;
      var imageCustomHome = 'https://www.google.com.au/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_outline-1-small.png,assets/icons/poi/tactile/pinlet-1-small.png,assets/icons/poi/quantum/pinlet/home_pinlet-1-small.png&highlight=ffffff,4285f4,ffffff&color=ff000000?scale=' + scale;
    

    【讨论】:

    • scale=4 是最大的:)
    • 很棒的清单!谢谢!
    • 是否可以修改imageCustomPinSpotlight上的URL参数创建蓝色变体?
    猜你喜欢
    • 2015-11-04
    • 2013-12-28
    • 2011-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-03
    • 2023-03-03
    • 2011-10-30
    相关资源
    最近更新 更多