Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing KML namespace? #149

Open
tthoeye opened this issue Mar 11, 2013 · 5 comments
Open

Missing KML namespace? #149

tthoeye opened this issue Mar 11, 2013 · 5 comments
Assignees

Comments

@tthoeye
Copy link

tthoeye commented Mar 11, 2013

I'm having trouble posting a KML file. Getting complaints about a missing id:
Undefined offset: 0 on line 214 in file /nfs/webroot/domains/datatank.gent.be/public_html/custom/strategies/KML.class.php.

Replacing

$id = $placemark->xpath('@id');

with

$id = $placemark->xpath('kml:@id');

in KML.class.php:214 seems to do the trick

@ghost ghost assigned coreation Mar 11, 2013
@pietercolpaert
Copy link
Member

Thanks for this bug report! Apparently this is only for some KML files. @coreation , can you look into this?

@coreation
Copy link
Member

We've already discussed this via e-mail @pietercolpaert , so I'm aware of this issue. I'll look into the issue as soon as I find the time for it. Might re-endulge myself first into the wonderous world of KML first ;).

@tthoeye
Copy link
Author

tthoeye commented Mar 11, 2013

Thanks for the quick response guys. Will let you know if this fix works at
@digipolis

On 11 March 2013 15:23, Jan Vansteenlandt [email protected] wrote:

We've already discussed this via e-mail @pietercolpaerthttps://github.com/pietercolpaert, so I'm aware of this issue. I'll look into the issue as soon as I find
the time for it. Might re-endulge myself first into the wonderous world of
KML first ;).


Reply to this email directly or view it on GitHubhttps://github.com//issues/149#issuecomment-14715643
.

@tthoeye
Copy link
Author

tthoeye commented Mar 12, 2013

Sorry, but my suggestion was completely misguided. The problem is simply that we are missing an "id" attribute in the Placemark nodes themselves.

However, i would argue that it's quite harsh to have this as a strict requirement, we have a bunch of KML files lying around that don't have these attributes. Is it absolutely necessary to have a PK for each placemark? Can we make the ID optional or otherwise default to a simple auto increment?

@coreation
Copy link
Member

I think a check can be built in if an id exists, if not it will assume that no id exists in any of the placemarks, and that you can create your own id's by auto-increment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants