Google Maps nüüd koos KML-toega

kaardimärk

Sellistel aegadel tean, et olen nohik! Täna Google'i koodi ajaveeb just teatas, et nad toetavad nüüd KML-faile.

"Doug, rahune maha", ütlete!

Ma ei saa! Mul on hull välja! Kui varem pidite kaardil programmeeritavalt punkte joonistama, saate nüüd lihtsalt KML-failile osutada ja Google Maps joonistab selle automaatselt nende kaardile.

"Jah, kindlasti", ütlete!

Siin on näide KML-failist:

 Doug Kas teadsite, et nad just siin Au Bon Paini avasid?


https://martech.zone/wp-content/uploads/1.0/8/me2.1.thumbnail.jpg


-2006

Google Mapsi abil suunan kaardi lihtsalt KML-faili päringu esitamiseks:

http://maps.google.com/maps?q=http://www.yourdomain.com/location.kml

“Wow”, ütlete lõpuks! (Ma loodan!)

Siin on, mis see välja näeb:
Dougi kaart Indianapolis

Tõsiselt inimesed. Kui XML on universaalne andmevahetusvorming, siis KML (mis is XML) on universaalne geograafilise andmevahetuse vorming. See on suurepärane samm edasi. Kasutades teisi GIS-programme, saavad inimesed KML-faile väljastada ja seejärel lihtsalt Google Mapsiga veebis avada.

13 Kommentaarid

  1. 1
  2. 2

    Tere Graydon,

    Good point! I’ll update the post with instructions, open up the KML file that I have posted and you’ll see the structure. The KML file is raw text. There are also KMZ files out there. Those are KML files that are zipped up for faster transfer (if you have a huge file).

    Doug

  3. 3
  4. 4
  5. 5

    See on tõesti vinge!

    Just wondering, why is the KML-file case sensitive. If you create the XML file with tags that have lower case starting letters. The XML/KML doesn’t work. (that’s what happend to me :D)

    • 6

      Aswin,

      I’ve noticed this as well. It’s the same with the geotag. I have no idea why they would actually impose uppercase letters in a standard. I’ve always thought it was safe for lowercase (rather than upper), but some of these services out there are really finicky.

      Aitäh!
      Doug

  6. 7

    I have found a way to get this working.

    I’ve found an little freeware program (xt.exe) that works with a XSL file that can transform the not-working XML to a working KML file.

    In the XSL file (a stylesheet) provides the base of a working a xml. I can transform the lowercase tags with upper case tags. With a rename action on the working xml-file (xml to kml) you get a working kml file 🙂

  7. 8

    if for some reason you didn’t see it, the new google mymaps thingy lets you build a map and export the kml file.

    and since the google api let’s you create a map on your site built from a hosted kml file… well it all becomes easier.

Mis sa arvad?

Sellel saidil kasutatakse rämpsposti vähendamiseks Akismetit. Vaadake, kuidas teie andmeid töödeldakse.