Amit
Amit

Reputation: 3990

google maps kml

i am generating a kml out of the posts created by users... but it may so happen that for a new user the kml will be empty... in this case the map does not show. any fixes for this?

Upvotes: 0

Views: 481

Answers (1)

Martin Zeitler
Martin Zeitler

Reputation: 76679

You can check the KML with an XML-Parser (e.g. with PHP simplexml_load_file), if there are any Placemarks/Polygons - and only load the map if there's at least one.

Alternatively you could check the database instead of the KML (if one can check there).

Upvotes: 1

Related Questions