The support forum is temporarily read-only. For urgent requests, please email contact[at]psyberia.net

[closed] kml waypoint color

Any question about the app? Ask it here
Post Reply
JohnL
Posts: 6
Joined: Sun Jul 21, 2013 6:49 pm

[closed] kml waypoint color

Post by JohnL »

I have a kml file from google maps with many waypoints of different colors. I would like to import or display it in AQ and preserve the color, or icon type. Is this possible ? I can write a script to convert if I know what to output. The kml file encodes the color here (I think) <styleUrl>#icon-503-DB4436</styleUrl>, but also sometimes as <color>ff000000</color>. With both occuring even within the same file exported from google maps.

When I display the kml file in AQ, the color information is currently lost. I was looking for some way to export AQ wpt files to kml so that I could see how the color is encoded, but could not find this.

Thanks, John
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: kml waypoint color

Post by Psyberia-Support »

AlpineQuest can read KML colours, both within styles (with <styleUrl>) or inline (with <color>). At least, all the KML files I have read until now worked fine, but it may exist particular cases not tested (see example below of the KML export of http://www.cablemap.info/).

To open a KML file, just click on it to load it. You can use the 'Display contents' button to display all items in the file at once (it may take some time).

If you don't succeed is displaying colours, it would be great if you can send me an example file (not containing any sensitive data), so I can have a look at it and check what's wrong. You can also check the apps log (main menu -> More... -> Report errors and then click on the file icon) to see is something is displayed (like colours failing to be decoded).

Best regards
device-2014-08-18-174154.jpg
(117.13 KiB) Downloaded 5268 times
Do you like AlpineQuest ? Leave a small comment on Google Play !
JohnL
Posts: 6
Joined: Sun Jul 21, 2013 6:49 pm

Re: kml waypoint color

Post by JohnL »

I accidentally sent the log. Anyway, I looked at it and there are no errors when displaying the kml file.
Just now, I made a google maps layer with two pins, one blue, one yellow. I exported it to kml. I opened
it with 'explore landmarks'. Both show in the correct position, with correct names, but both are purple,
like all the others. I am attaching the kml file. Thanks for the prompt repsonse!
John
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: kml waypoint color

Post by Psyberia-Support »

It seems the file hasn't been attached, could you send it by email? (http://www.alpinequest.net/#contact_and_support)
Do you like AlpineQuest ? Leave a small comment on Google Play !
JohnL
Posts: 6
Joined: Sun Jul 21, 2013 6:49 pm

Re: kml waypoint color

Post by JohnL »

Emailed it. Now I see it says "The extension kml is not allowed."
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: kml waypoint color

Post by Psyberia-Support »

Thanks for the file.
So you're right the colours are not displayed.
I had a look, and this is because the colour styles are used before being defined (they're all defined at the end of the file).

Google Earth exports all styles at the beginning of the file, so it works fine, but Google Maps exports the styles at the end, although the KML specification suggests that the styles must be defined at the beginning:
If you define a Style at the beginning of a KML Document and also define an ID for it, you can use this style in Geometry, Placemarks, and Overlays that are defined elsewhere in the Document.
I'll try to improve the KML support to handle this case. Until it's done, the only way to display your colours is to somehow create a KML file with styles defined before being referenced (you may open your file with Google Earth and then export it again in KML).
Sorry about that.
Do you like AlpineQuest ? Leave a small comment on Google Play !
JohnL
Posts: 6
Joined: Sun Jul 21, 2013 6:49 pm

Re: kml waypoint color

Post by JohnL »

I had a presentiment that google was violating their own standard (well, not quite a standard) I will try with google earth, or something. Thanks for the investigation. John
JohnL
Posts: 6
Joined: Sun Jul 21, 2013 6:49 pm

Re: kml waypoint color

Post by JohnL »

My google earth is broken (I use linux, so it is usually broken). I copied the style definitions to the front of the kml file by hand, and now the colors are displayed correctly by AQ. Thanks for the help.
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: kml waypoint color

Post by Psyberia-Support »

Ok thanks for the feedback.
I've made the changes, the next version will be able to use styles at the end of the files.
Best regards
Do you like AlpineQuest ? Leave a small comment on Google Play !
Edd

Re: kml waypoint color

Post by Edd »

I'm experiencing the same behaviour even when saving from google earth, not just google maps, is there a workaround please?
Psyberia-Support
Site Admin
Posts: 6407
Joined: Wed Apr 14, 2010 9:41 pm

Re: kml waypoint color

Post by Psyberia-Support »

Hi again,
The only workaround right now is to edit the file and put the styles at the beginning, but this is a bit technical.
As said above, the next version will handle these colors, unfortunately I cannot give you a release data right now.
Best regards
Do you like AlpineQuest ? Leave a small comment on Google Play !
Post Reply