Skip to content

Commit

Permalink
Version 2.0.2
Browse files Browse the repository at this point in the history
New icons from c:geo (open source)
  • Loading branch information
Surfoo committed Apr 24, 2014
1 parent 423ce4c commit bd90898
Show file tree
Hide file tree
Showing 75 changed files with 129 additions and 118 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2012 - Surfoo
Copyright 2014 - Surfoo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
gc-gpx-viewer is a web app to display your caches from a gpx file on google maps.
Geocaching GPX Viewer is a web app to display your caches from a gpx file on a map.
It can be very useful for a roadbook. Take multiple screenshots, and use gimp/photoshop/whatever to create a big map.

gc-gpx-viewer use HTML5, FileReader, FullScreen API, App cache but you should use a browser wich support these features (Firefox, Chrome, Safari)

Icons come from [c:geo](https://github.com/cgeo/cgeo)

Get the source
--------------

Expand Down
51 changes: 31 additions & 20 deletions cache.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CACHE MANIFEST

# date: 2014-04-24
# version: 2.0.1
# version: 2.0.2

CACHE:
gcgpxviewer.min.css
Expand All @@ -19,25 +19,36 @@ images/locate_alt.svg
images/locate.svg
images/locate_touch.png
img/ajax-loader.gif
img/2.gif
img/3.gif
img/4.gif
img/5.gif
img/6.gif
img/8.gif
img/9.gif
img/11.gif
img/12.gif
img/13.gif
img/137.gif
img/453.gif
img/1304.gif
img/1858.gif
img/3653.gif
img/3773.gif
img/3774.gif
img/4738.gif
img/7005.gif
img/type_ape.map.png
img/type_ape.png
img/type_cito.map.png
img/type_cito.png
img/type_earth.map.png
img/type_earth.png
img/type_event.map.png
img/type_event.png
img/type_giga.map.png
img/type_giga.png
img/type_hq.map.png
img/type_hq.png
img/type_letterbox.map.png
img/type_letterbox.png
img/type_mega.map.png
img/type_mega.png
img/type_multi.map.png
img/type_multi.png
img/type_mystery.map.png
img/type_mystery.png
img/type_traditional.map.png
img/type_traditional.png
img/type_unknown.map.png
img/type_unknown.png
img/type_virtual.map.png
img/type_virtual.png
img/type_webcam.map.png
img/type_webcam.png
img/type_wherigo.map.png
img/type_wherigo.png
js/gcgpxviewer.min.js

NETWORK:
Expand Down
93 changes: 46 additions & 47 deletions docs/gcgpxviewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ <h1>gcgpxviewer.js</h1>
<div class="content"><div class='highlight'><pre>(<span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(_)</span> {</span>
<span class="hljs-comment">/*'use strict';*/</span>
<span class="hljs-keyword">var</span> typeCaches, sizeCaches, objOptionLabel, objOptionPerimeter, circleList, polylineList, markers,
map, parser, doc, circle, control;
<span class="hljs-keyword">var</span> circleOpacity = <span class="hljs-number">0.8</span>, circleColor = <span class="hljs-string">'#c11414'</span>, circleFillOpacity = <span class="hljs-number">0.25</span>;
<span class="hljs-keyword">var</span> unitType = [<span class="hljs-string">'o'</span>, <span class="hljs-string">'Ko'</span>, <span class="hljs-string">'Mo'</span>, <span class="hljs-string">'Go'</span>];</pre></div></div>
map, parser, doc, circle, control,
circleOpacity = <span class="hljs-number">0.8</span>,
circleColor = <span class="hljs-string">'#c11414'</span>,
circleFillOpacity = <span class="hljs-number">0.25</span>,
unitType = [<span class="hljs-string">'o'</span>, <span class="hljs-string">'Ko'</span>, <span class="hljs-string">'Mo'</span>, <span class="hljs-string">'Go'</span>];</pre></div></div>

</li>

Expand All @@ -46,67 +48,64 @@ <h1>gcgpxviewer.js</h1>
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Id and types of geocaches from geocaching.com</p>
<p>Types of geocaches from geocaching.com</p>

</div>

<div class="content"><div class='highlight'><pre> typeCaches = [{
<span class="hljs-string">'id'</span>: <span class="hljs-number">2</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Traditional Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Traditional Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_traditional'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">3</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Multi-cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Multi-cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_multi'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">4</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Virtual Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Virtual Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_virtual'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">5</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Letterbox Hybrid'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Letterbox Hybrid'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_letterbox'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">6</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Event Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Event Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_event'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">8</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Unknown Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Unknown Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_mystery'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">9</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Project APE Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Project APE Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_ape'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">11</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Webcam Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Webcam Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_webcam'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">12</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Locationless (Reverse) Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Cache In Trash Out Event'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_cito'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">13</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Cache In Trash Out Event'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Earthcache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_earth'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">137</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Earthcache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Mega-Event Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_mega'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">453</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Mega-Event Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'GPS Adventures Exhibit'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_event'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">1304</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'GPS Adventures Exhibit'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Wherigo Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_wherigo'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">1858</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Wherigo Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Lost and Found Event Caches'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_event'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">3653</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Lost and Found Event Caches'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Groundspeak HQ'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_hq'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">3773</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Groundspeak HQ'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Groundspeak Lost and Found Celebration'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_event'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">3774</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Groundspeak Lost and Found Celebration'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Groundspeak Block Party'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_event'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">4738</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Groundspeak Block Party'</span>
}, {
<span class="hljs-string">'id'</span>: <span class="hljs-number">7005</span>,
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Giga-Event Cache'</span>
<span class="hljs-string">'type'</span>: <span class="hljs-string">'Giga-Event Cache'</span>,
<span class="hljs-string">'filename'</span>: <span class="hljs-string">'type_giga'</span>
}];</pre></div></div>

</li>
Expand Down Expand Up @@ -225,9 +224,9 @@ <h1>gcgpxviewer.js</h1>
<span class="hljs-keyword">for</span> (j = <span class="hljs-number">0</span>, nbTypeCaches = typeCaches.length; j &lt; nbTypeCaches; ++j) {
<span class="hljs-keyword">if</span> (typeCaches[j].type === match[<span class="hljs-number">1</span>]) {
icon = L.icon({
iconSize: [<span class="hljs-number">16</span>, <span class="hljs-number">16</span>],
iconUrl: <span class="hljs-string">'img/ct'</span> + typeCaches[j].id + <span class="hljs-string">'.png'</span>,
iconPopin: <span class="hljs-string">'img/'</span> + typeCaches[j].id + <span class="hljs-string">'.gif'</span>
iconSize: [<span class="hljs-number">22</span>, <span class="hljs-number">22</span>],
iconUrl: <span class="hljs-string">'img/'</span> + typeCaches[j].filename + <span class="hljs-string">'.map.png'</span>,
iconPopin: <span class="hljs-string">'img/'</span> + typeCaches[j].filename + <span class="hljs-string">'.png'</span>
});
<span class="hljs-keyword">break</span>;
}
Expand Down Expand Up @@ -283,7 +282,7 @@ <h1>gcgpxviewer.js</h1>
<div class="content"><div class='highlight'><pre> infoContent = <span class="hljs-string">'&lt;div class="infowindow"&gt;'</span>;
infoContent += <span class="hljs-string">'&lt;div class="code"&gt;'</span> + wpt.getElementsByTagName(<span class="hljs-string">'name'</span>)[<span class="hljs-number">0</span>].childNodes[<span class="hljs-number">0</span>].nodeValue + <span class="hljs-string">'&lt;/div&gt;'</span>;
infoContent += <span class="hljs-string">' &lt;h4&gt;'</span>;
infoContent += <span class="hljs-string">' &lt;img src="'</span> + icon.options.iconPopin + <span class="hljs-string">'" width="16" alt="" /&gt;'</span>;
infoContent += <span class="hljs-string">' &lt;img src="'</span> + icon.options.iconPopin + <span class="hljs-string">'" width="20" alt="" /&gt;'</span>;
infoContent += <span class="hljs-string">' &lt;a href="http://coord.info/'</span> + wpt.getElementsByTagName(<span class="hljs-string">'name'</span>)[<span class="hljs-number">0</span>].childNodes[<span class="hljs-number">0</span>].nodeValue + <span class="hljs-string">'" onclick="window.open(this.href);return false;"&gt;'</span> + elmName[<span class="hljs-number">0</span>].childNodes[<span class="hljs-number">0</span>].nodeValue + <span class="hljs-string">'&lt;/a&gt;'</span>;
infoContent += <span class="hljs-string">' &lt;/h4&gt;'</span>;
infoContent += <span class="hljs-string">' &lt;dl style="float:left;margin-right:2em;width:50%;"&gt;'</span>;
Expand Down
Binary file removed img/11.gif
Binary file not shown.
Binary file removed img/12.gif
Binary file not shown.
Binary file removed img/13.gif
Binary file not shown.
Binary file removed img/1304.gif
Binary file not shown.
Binary file removed img/137.gif
Binary file not shown.
Binary file removed img/1858.gif
Binary file not shown.
Binary file removed img/2.gif
Binary file not shown.
Binary file removed img/3.gif
Binary file not shown.
Binary file removed img/3653.gif
Binary file not shown.
Binary file removed img/3773.gif
Binary file not shown.
Binary file removed img/3774.gif
Binary file not shown.
Binary file removed img/4.gif
Binary file not shown.
Binary file removed img/453.gif
Binary file not shown.
Binary file removed img/4738.gif
Binary file not shown.
Binary file removed img/5.gif
Binary file not shown.
Binary file removed img/6.gif
Binary file not shown.
Binary file removed img/7005.gif
Binary file not shown.
Binary file removed img/8.gif
Binary file not shown.
Binary file removed img/9.gif
Binary file not shown.
Binary file added img/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/ct11.png
Binary file not shown.
Binary file removed img/ct12.png
Binary file not shown.
Binary file removed img/ct13.png
Binary file not shown.
Binary file removed img/ct1304.png
Binary file not shown.
Binary file removed img/ct137.png
Binary file not shown.
Binary file removed img/ct1858.png
Diff not rendered.
Binary file removed img/ct2.png
Diff not rendered.
Binary file removed img/ct3.png
Diff not rendered.
Binary file removed img/ct3653.png
Diff not rendered.
Binary file removed img/ct3773.png
Diff not rendered.
Binary file removed img/ct3774.png
Diff not rendered.
Binary file removed img/ct4.png
Diff not rendered.
Binary file removed img/ct453.png
Diff not rendered.
Binary file removed img/ct4738.png
Diff not rendered.
Binary file removed img/ct5.png
Diff not rendered.
Binary file removed img/ct6.png
Diff not rendered.
Binary file removed img/ct7005.png
Diff not rendered.
Binary file removed img/ct8.png
Diff not rendered.
Binary file removed img/ct9.png
Diff not rendered.
Binary file added img/type_ape.map.png
Binary file added img/type_ape.png
Binary file added img/type_cito.map.png
Binary file added img/type_cito.png
Binary file added img/type_earth.map.png
Binary file added img/type_earth.png
Binary file added img/type_event.map.png
Binary file added img/type_event.png
Binary file added img/type_giga.map.png
Binary file added img/type_giga.png
Binary file added img/type_hq.map.png
Binary file added img/type_hq.png
Binary file added img/type_letterbox.map.png
Binary file added img/type_letterbox.png
Binary file added img/type_mega.map.png
Binary file added img/type_mega.png
Binary file added img/type_multi.map.png
Binary file added img/type_multi.png
Binary file added img/type_mystery.map.png
Binary file added img/type_mystery.png
Binary file added img/type_traditional.map.png
Binary file added img/type_traditional.png
Binary file added img/type_unknown.map.png
Binary file added img/type_unknown.png
Binary file added img/type_virtual.map.png
Binary file added img/type_virtual.png
Binary file added img/type_webcam.map.png
Binary file added img/type_webcam.png
Binary file added img/type_wherigo.map.png
Binary file added img/type_wherigo.png
93 changes: 46 additions & 47 deletions js/gcgpxviewer.js
Original file line number Diff line number Diff line change
@@ -1,68 +1,67 @@
(function(_) {
/*'use strict';*/
var typeCaches, sizeCaches, objOptionLabel, objOptionPerimeter, circleList, polylineList, markers,
map, parser, doc, circle, control;
var circleOpacity = 0.8, circleColor = '#c11414', circleFillOpacity = 0.25;
var unitType = ['o', 'Ko', 'Mo', 'Go'];
map, parser, doc, circle, control,
circleOpacity = 0.8,
circleColor = '#c11414',
circleFillOpacity = 0.25,
unitType = ['o', 'Ko', 'Mo', 'Go'];

// Id and types of geocaches from geocaching.com
// Types of geocaches from geocaching.com
typeCaches = [{
'id': 2,
'type': 'Traditional Cache'
'type': 'Traditional Cache',
'filename': 'type_traditional'
}, {
'id': 3,
'type': 'Multi-cache'
'type': 'Multi-cache',
'filename': 'type_multi'
}, {
'id': 4,
'type': 'Virtual Cache'
'type': 'Virtual Cache',
'filename': 'type_virtual'
}, {
'id': 5,
'type': 'Letterbox Hybrid'
'type': 'Letterbox Hybrid',
'filename': 'type_letterbox'
}, {
'id': 6,
'type': 'Event Cache'
'type': 'Event Cache',
'filename': 'type_event'
}, {
'id': 8,
'type': 'Unknown Cache'
'type': 'Unknown Cache',
'filename': 'type_mystery'
}, {
'id': 9,
'type': 'Project APE Cache'
'type': 'Project APE Cache',
'filename': 'type_ape'
}, {
'id': 11,
'type': 'Webcam Cache'
'type': 'Webcam Cache',
'filename': 'type_webcam'
}, {
'id': 12,
'type': 'Locationless (Reverse) Cache'
'type': 'Cache In Trash Out Event',
'filename': 'type_cito'
}, {
'id': 13,
'type': 'Cache In Trash Out Event'
'type': 'Earthcache',
'filename': 'type_earth'
}, {
'id': 137,
'type': 'Earthcache'
'type': 'Mega-Event Cache',
'filename': 'type_mega'
}, {
'id': 453,
'type': 'Mega-Event Cache'
'type': 'GPS Adventures Exhibit',
'filename': 'type_event'
}, {
'id': 1304,
'type': 'GPS Adventures Exhibit'
'type': 'Wherigo Cache',
'filename': 'type_wherigo'
}, {
'id': 1858,
'type': 'Wherigo Cache'
'type': 'Lost and Found Event Caches',
'filename': 'type_event'
}, {
'id': 3653,
'type': 'Lost and Found Event Caches'
'type': 'Groundspeak HQ',
'filename': 'type_hq'
}, {
'id': 3773,
'type': 'Groundspeak HQ'
'type': 'Groundspeak Lost and Found Celebration',
'filename': 'type_event'
}, {
'id': 3774,
'type': 'Groundspeak Lost and Found Celebration'
'type': 'Groundspeak Block Party',
'filename': 'type_event'
}, {
'id': 4738,
'type': 'Groundspeak Block Party'
}, {
'id': 7005,
'type': 'Giga-Event Cache'
'type': 'Giga-Event Cache',
'filename': 'type_giga'
}];

// Size list geocaches
Expand Down Expand Up @@ -132,9 +131,9 @@
for (j = 0, nbTypeCaches = typeCaches.length; j < nbTypeCaches; ++j) {
if (typeCaches[j].type === match[1]) {
icon = L.icon({
iconSize: [16, 16],
iconUrl: 'img/ct' + typeCaches[j].id + '.png',
iconPopin: 'img/' + typeCaches[j].id + '.gif'
iconSize: [22, 22],
iconUrl: 'img/' + typeCaches[j].filename + '.map.png',
iconPopin: 'img/' + typeCaches[j].filename + '.png'
});
break;
}
Expand Down Expand Up @@ -166,7 +165,7 @@
infoContent = '<div class="infowindow">';
infoContent += '<div class="code">' + wpt.getElementsByTagName('name')[0].childNodes[0].nodeValue + '</div>';
infoContent += ' <h4>';
infoContent += ' <img src="' + icon.options.iconPopin + '" width="16" alt="" />';
infoContent += ' <img src="' + icon.options.iconPopin + '" width="20" alt="" />';
infoContent += ' <a href="http://coord.info/' + wpt.getElementsByTagName('name')[0].childNodes[0].nodeValue + '" onclick="window.open(this.href);return false;">' + elmName[0].childNodes[0].nodeValue + '</a>';
infoContent += ' </h4>';
infoContent += ' <dl style="float:left;margin-right:2em;width:50%;">';
Expand Down
2 changes: 1 addition & 1 deletion js/gcgpxviewer.min.js

Large diffs are not rendered by default.

0 comments on commit bd90898

Please sign in to comment.