diff --git a/geoexport.js b/geoexport.js
index 09102b1..7b92d28 100644
--- a/geoexport.js
+++ b/geoexport.js
@@ -190,6 +190,54 @@ function gpxForQuery(query, name, options, callback) {
});
}
+ // Styles for KML export
+ // FIXME: use icons from a sotl.as server!
+ const KML_STYLES = `
+
+
+
+
+
+
+`;
+
+
function getStyle(points) {
if (points === 10) {
return 'red';
@@ -244,51 +292,7 @@ function kmlForAssociation(associationCode, options, callback) {
`;
// add styles for placemarks
// FIXME: use options to enable/disable styles??
- // FIXME: use icons from a sotl.as server!
- kml += `
-
-
-
-
-
-
-`;
+ kml += KML_STYLES;
association.regions.forEach(region => {
kml += `
@@ -342,6 +346,10 @@ function kmlForRegion(associationCode, regionCode, options, callback) {
`;
+ // add styles for placemarks
+ // FIXME: use options to enable/disable styles??
+ kml += KML_STYLES;
+
association.regions.forEach(region => {
if (regionCode && region.code !== regionCode) {
return;