Google maps, PHP and KML

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ankhmor
Forum Newbie
Posts: 12
Joined: Fri Jul 13, 2007 4:45 pm

Google maps, PHP and KML

Post by ankhmor »

I'm having trouble loading this kind of KML with PHP
http://code.google.com/apis/maps/docume ... ngFeatures
example

Code: Select all

<atom:entry xmlns='http://www.opengis.net/kml/2.2'
    xmlns:atom='http://www.w3.org/2005/Atom'
    xmlns:batch='http://schemas.google.com/gdata/batch'
    xmlns:gd='http://schemas.google.com/g/2005'>
  <atom:id>
  http://maps.google.com/maps/feeds/features/userID/mapID/full/featureID</atom:id>
  <atom:published>2008-08-14T17:46:06.462Z</atom:published>
  <atom:updated>2008-08-14T18:12:31.589Z</atom:updated>
  <atom:category scheme='http://schemas.google.com/g/2005#kind' 
.....
it seems like the column in atom:entry, etc is causing this.

$response = simplexml_load_string($response);
print_r($response);

the above just gives an empty SimpleXMLElement Object()

Any ideas
Post Reply