Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author webaware

    (@webaware)

    G’day popsantiago,

    Your KML file isn’t valid XML, it has é entities in it — my guess is that you’re using something like htmlspecialchars() to encode your KML file. Don’t do that! ??

    Best way to generate a XML (KML) file is to use an XML writer, like… XMLWriter. It correctly handles character encoding for XML, not HTML. Here’s a randomly selected tutorial. For some of your elements, with namespaces, you’ll need to use startElementNS().

    Quickest way to get your map working right now is to replace é with e in your content, then you can work on rewriting your KML code.

    NB: you have that page cached, which means it will always have the same time for the KML map, and thus always load the same version — Google will cache that map for a period. It’ll clear the cache after a while (seems to clear fairly quickly these days) but bear that in mind when you’re testing changes to your code.

    cheers,
    Ross

    Plugin Author webaware

    (@webaware)

    Oh, and to demonstrate that it’s the é entity mucking it up, here’s your KML file with that entity replaced with the é character instead — map works.

    https://webaware.com.au/maps/nos-checkins-fix.kml

    cheers,
    Ross

    Thread Starter popsantiago

    (@popsantiago)

    Hey @webaware
    Thx for your reply, that works now ??
    For the kml structure, i will wait a better time and greater connection ??
    Pop (from Buenos Aires for now ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘KML doesn't Work…’ is closed to new replies.