Add Google “My Maps” Layer to Google Maps Javascript API

后端 未结 3 1350
暖寄归人
暖寄归人 2021-01-01 12:53

I want to put a Google Maps map on our website.

I know that custom markers can be added to a map with Javascript, but I\'d rather use Google\'s MyMaps service instea

3条回答
  •  失恋的感觉
    2021-01-01 13:21

    You can use GGeoXml to add My Maps content to your API map.

    In your My Map there's a "View in Google Earth" link, use the URL of that link as your GGeoXml URL.

    The link generates an indirect "network link" reference to the data, so the map on your page will reflect the latest changes made to the My Map.

    The downside is that there's a limit to how many markers you can place on one page of a My Map, and the "View in Google Earth" link only returns data for the current My Maps page.

提交回复
热议问题