Hi there, I have a number of OpenLayers maps, all using KML layers, that suddenly stopped working upon updating to 7.x-2.0-beta5. It seems as though the changes to the KML Add Layer/Edit Layer UI have caused these layers to break, but I managed to figure out how to fix them in the meantime. Now that KML layers can be uploaded through the module, the dropdown needs to be changed to "Provides a URL" (the field auto-populates) in order for it to work. As well, the 'Extract Tracks' box is now auto-checking -- though I turned this option off when these layers were created, as I have no tracks to extract, the box was checked for all existing layers since the module update.

I managed to get all of my layers to work again, but is there a way to prevent this from happening to KMLs with the next major module update?

Thanks in advance,
Jordan

CommentFileSizeAuthor
#7 kml-layer.png58.71 KBdrupalpal
#7 other-layers.png382.09 KBdrupalpal

Comments

pol’s picture

Hello Jordan,

Thanks for your feedback.
Indeed, now KML files upload are now handled by OpenLayers, it's quite new and I'm happy that someone is using it, so I can have feedback.
Can you try again with the latest dev version and report to me ? Some bug has been fixed in it and it should be fix those you are encountering.

Thanks, bye.

jordanclaire’s picture

I'll let you know when I'm back at work next week. Thanks for your help, Pol.

jordanclaire’s picture

Hi Pol, we updated to the latest dev version and the maps work fine. Thanks for your help!
Jordan

drupalpal’s picture

I had a similar problem even with the dev version, one thing to pay attention to is that the projection should be set to EPSG:4326 when using a KML layer according to http://www.gdal.org/ogr/drv_kml.html. After setting the projection to EPSG: 4326 the problem was solved.

pol’s picture

Status: Active » Fixed
jordanclaire’s picture

Drupalpal, can you be more specific about where 4326 should be set? I am back to having trouble getting new KML uploads to display -- we've set it in the layer and the display projection of the map (we need a more detailed basemap than the only one available to us when we set the projection of the map itself to 4326).

drupalpal’s picture

StatusFileSize
new382.09 KB
new58.71 KB

JordanClaire,

For the uploaded KML and the Google Maps/OpenStreetMap layer projection settings, please find attached the files below

Ok. I forgot to attach a third image: Projection for OpenStreetMap

jordanclaire’s picture

Thanks for that drupalpal!

Given that KMLs only work with EPSG:4326, is there a way that only that projection can be selected in the Add KML dialogue, or can it be set to default to 4326?

drupalpal’s picture

JordanClaire,

You welcome! I am not sure if there is such an option through the OL UI to do that. But since KML by specification uses only a single projection, EPSG:4326 , I believe that that the end-users should not be allowed to change it.

acbramley’s picture

I'm getting really frustrated that every time I update this module something breaks. I had 4 KML layers and when I updated to beta5 they all broke. After reading through this issue I realised it may have been the "Extract tracks" option. I did not develop this part of my site before so I was unsure whether it should've been enabled (it sounded like something that should be). Unticking it worked, but I also had to reenable "Provides an URL", after the update it was selecting the default option even though I had used the "Provide a URL" option before the update.

I really think better testing needs to be done with regards to version upgrades, it seems like this is something simple that should have been picked up.

pol’s picture

Hello acbramley,

In this case, I don't think you'll have the problem again, there were a problem when saving those layers and I think it's fixed once for all now.
But I agree with you, better testing should be done.

Right now, I'm focusing on providing a rock solid OpenLayers experience, I'll focus on tests when I'll have more time or if someone is willing to help.

acbramley’s picture

Thanks @Pol totally understandable, it's a monster of a module

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.