Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Save KML for offline use #2084

Merged
merged 5 commits into from
Jan 28, 2015
Merged

Save KML for offline use #2084

merged 5 commits into from
Jan 28, 2015

Conversation

oterral
Copy link
Contributor

@oterral oterral commented Jan 15, 2015

Fix #1839 #1647

Wait for openlayers/openlayers#3128

Test

Missing some tests and translations

@kandre
Copy link
Contributor

kandre commented Jan 15, 2015

Nice !! and tough mtb test !

@ponceta
Copy link
Contributor

ponceta commented Jan 15, 2015

No worry

image

We'll get this fine!

@oterral oterral changed the title [WIP] Save KML for offline use Save KML for offline use Jan 22, 2015
@oterral
Copy link
Contributor Author

oterral commented Jan 22, 2015

good for review

  • Add missing translations

@@ -395,6 +420,18 @@
var layer = layers[i];
layersIds.push(layer.id);
layersOpacity.push(layer.invertedOpacity);

// if the layer is a KML
if (gaKml.isKmlLayer(layer) && /http/.test(layer.url)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would make sense to also check for https here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

httpis include inhttps but I can improve a bit the regex to be sure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dummy, of course. Improvement might still be a good idea. Can we use ^ and :// ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i'll do that

@ponceta
Copy link
Contributor

ponceta commented Jan 27, 2015

KML Drawing Saving is broken
Go test branch / draw something / try to dl it.

@oterral
Copy link
Contributor Author

oterral commented Jan 27, 2015

@ponceta you're insane !!!!! it's only for imported KML.;) . You can draw then import and then save :)

Update: misunderstanding what you want. Good catch i try to fix this.

@ponceta
Copy link
Contributor

ponceta commented Jan 27, 2015

<3 sorry for catching bugs ;)

@oterral oterral force-pushed the teo_kml_offline branch 4 times, most recently from ddb1819 to 0c319f2 Compare January 27, 2015 16:07
@oterral
Copy link
Contributor Author

oterral commented Jan 27, 2015

Good for final review/test

if (!kmlString) {
kmlString = new XMLSerializer().serializeToString(node);
}
kmlString = new ol.format.KML().writeFeatures(exportFeatures);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ol3 now take care of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes OL3 returns a string now

@gjn
Copy link
Contributor

gjn commented Jan 28, 2015

Code looks very good.

Just a small thing: when loading the kml in off-line mode, I don't get the start and end symbols (I get the track). Am I doing something wrong or is this problematic?

@gjn
Copy link
Contributor

gjn commented Jan 28, 2015

Ok, it's normal (icons are from extern and we don't safe those).

gjn pushed a commit that referenced this pull request Jan 28, 2015
@gjn gjn merged commit 01acef1 into master Jan 28, 2015
@gjn gjn deleted the teo_kml_offline branch January 28, 2015 10:00
@gjn gjn mentioned this pull request Jan 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DEV APPCACHE] KML save offline
4 participants