Zhenya
Zhenya

Reputation: 281

How to load new google maps with API v3

Classic My Maps on maps.google.com will no longer be available.

Now we must use new maps. I would like to embed them to the website, without iframe that google suggests.

Before this change I used simple kml layer:

var kmlLayer = new google.maps.KmlLayer('https://maps.google.com/maps/ms?ie=UTF8&t=m&authuser=0&msa=0&output=kml&msid=212840568890456843825.0004c1fba0c8371a81c2b');";
kmlLayer.setMap(gMap);

But during the automatic update of my maps it was broken, if I use the same link - I got empty icons. Here is the new map (converted by google), can I load it using API V3 as I did before?

https://www.google.com/maps/d/viewer?mid=zhJ_pzBRPGN8.kCI6hT4Kq0Ao


In other words: I want to create maps here: https://www.google.com/maps/d/ And to embed them using API v3, but where can I get a link to the layer? Central coordinate, zoom level?

Upvotes: 1

Views: 627

Answers (1)

Tyler Johnson
Tyler Johnson

Reputation: 21

Change the KML Layer link to: https://mapsengine.google.com/map/kml?mid=zhJ_pzBRPGN8.kCI6hT4Kq0Ao&lid=zhJ_pzBRPGN8.kZ0hfyeW-GtI

I grabbed this link from the "Share", "Download KML" URL on the Map that you linked to.

Upvotes: 2

Related Questions