Arthur Teng
Arthur Teng

Reputation: 11

Extract coordinate data from embedded Google Maps pins

Thanks in advance.

I'm trying to get the coordinates for the pins in this embedded Google Map: http://www.tcatbus.com/learn/system-map

Is there any way? I looked into KMZ extraction but was unable to find the file. Any other suggestions?

Upvotes: 1

Views: 4528

Answers (1)

Clifford
Clifford

Reputation: 93556

The KMZ format is a zipped KML, and KML is in turn XML. A "pin" is represented by a <point> within a <placemark> tag in the mark-up as follows:

    <Placemark>
        <name>Pin Name</name>
        <description>Pin Description</description>
        <Point>
            <coordinates>-2.465543,51.280132,0 </coordinates>
        </Point>
    </Placemark>

You can extract the KML from a KMZ simply by unzipping it, or open in Google Earth and export as KML (the latter method has the advantage that it will validate the KMZ file in case what you have is not actually KMZ). A tutorial on KML is available here.

Upvotes: 1

Related Questions