Skip to content

Commit

Permalink
More minor corrections. Bump v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
remillc committed Mar 8, 2021
1 parent 8d17132 commit a2c6f64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 3 additions & 1 deletion lib/kml.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ function getCoordinates(htmlPage, name) {
}
}

// else, check in link below the map

const $urls = $page.find('a[href *= "://maps.google."]').filter((i, node) => {
return /^https?:\/\/maps\.google\.[^\/]+\/maps/.test(node.href)
});
Expand All @@ -156,7 +158,7 @@ function getCoordinates(htmlPage, name) {
}
}

// Try the first 'location' in data object
// Try the first 'location' object in data object
if (data) {
if ('locations' in data && data.locations.length > 0) {
const coords = data.locations[0];
Expand Down
11 changes: 3 additions & 8 deletions lib/kml.template
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:gx="http://www.google.com/kml/ext/2.2"
xmlns:kml="http://www.opengis.net/kml/2.2"
xmlns:atom="http://www.w3.org/2005/Atom">
xmlns:gx="http://www.google.com/kml/ext/2.2">
<Document>
<name>Liste des sites de Scubapedia</name>
<name>Carte des sites de plongée de Scubapedia</name>
<open>1</open>
<description><![CDATA[<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><span property="dct:title" rel="cc:attributionURL">Carte des sites de plongées de Scubapedia v{{version}}</span> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://thousandislandsshipwrecks.ca/">Christian Rémillard <[email protected]>; Sylvain Marcotte</a> is licensed under <a href="http://creativecommons.org/licenses/by/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1"></a></p>]]></description>
<description><![CDATA[<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><span property="dct:title" rel="cc:attributionURL">Carte des sites de plongée de Scubapedia v{{version}}</span> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://thousandislandsshipwrecks.ca/">Christian Rémillard <[email protected]>; Sylvain Marcotte</a> is licensed under <a href="http://creativecommons.org/licenses/by/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1"></a></p>]]></description>
<LookAt>
<longitude>-69.21414220149677</longitude>
<latitude>46.20980311399416</latitude>
Expand All @@ -25,9 +23,6 @@
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<!--BalloonStyle>
<text><![CDATA[Carte des sites de plongées de Scubapedia by Christian Rémillard <[email protected]>; Sylvain Marcotte is licensed under CC BY 4.0 ]]></text>
</BalloonStyle-->
</Style>
<Style id="icon-highlight">
<IconStyle>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scubapedia-map",
"version": "1.0.2",
"version": "1.0.3",
"description": "Creates a .kmz file from Scubapedia.ca's dive sites.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit a2c6f64

Please sign in to comment.