Replacing with updated code
32
.eslintrc
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
"rules": {
|
|
||||||
"camelcase": 0,
|
|
||||||
"quotes": [2, "single", "avoid-escape"],
|
|
||||||
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
|
|
||||||
"space-before-function-paren": 2,
|
|
||||||
"space-in-parens": 2,
|
|
||||||
"object-curly-spacing": [2, "never"],
|
|
||||||
"array-bracket-spacing": 2,
|
|
||||||
"computed-property-spacing": 2,
|
|
||||||
"space-before-blocks": 2,
|
|
||||||
"keyword-spacing": 2,
|
|
||||||
"no-lonely-if": 2,
|
|
||||||
"comma-style": 2,
|
|
||||||
"no-underscore-dangle": 0,
|
|
||||||
"no-constant-condition": 0,
|
|
||||||
"no-multi-spaces": 0,
|
|
||||||
"strict": 0,
|
|
||||||
"key-spacing": 0,
|
|
||||||
"no-shadow": 0,
|
|
||||||
"no-unused-vars": 2
|
|
||||||
},
|
|
||||||
"globals": {
|
|
||||||
"L": true,
|
|
||||||
"module": false,
|
|
||||||
"define": false,
|
|
||||||
"require": true
|
|
||||||
},
|
|
||||||
"env": {
|
|
||||||
"browser": true
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +1,6 @@
|
||||||
/nbproject/
|
################################################################################
|
||||||
*.clpprj
|
# Il file gitignore è stato creato automaticamente da Microsoft(R) Visual Studio.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
/.vs
|
||||||
|
node_modules
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"commitMessage": "version %s",
|
|
||||||
"tagName": "%s",
|
|
||||||
"scripts": {
|
|
||||||
"postcommit": "git push && git push --tags && npm publish"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
.fullscreen-icon { background-image: url(icon-fullscreen.png); }
|
|
||||||
.leaflet-retina .fullscreen-icon { background-image: url(icon-fullscreen-2x.png); background-size: 26px 26px; }
|
|
||||||
/* one selector per rule as explained here : http://www.sitepoint.com/html5-full-screen-api/ */
|
|
||||||
.leaflet-container:-webkit-full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
|
||||||
.leaflet-container:-ms-fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
|
||||||
.leaflet-container:full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
|
||||||
.leaflet-container:fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
|
||||||
.leaflet-pseudo-fullscreen { position: fixed !important; width: 100% !important; height: 100% !important; top: 0px !important; left: 0px !important; z-index: 99999; }
|
|
|
@ -1,202 +0,0 @@
|
||||||
(function () {
|
|
||||||
|
|
||||||
L.Control.FullScreen = L.Control.extend({
|
|
||||||
options: {
|
|
||||||
position: 'topleft',
|
|
||||||
title: 'Full Screen',
|
|
||||||
titleCancel: 'Exit Full Screen',
|
|
||||||
forceSeparateButton: false,
|
|
||||||
forcePseudoFullscreen: false,
|
|
||||||
fullscreenElement: false
|
|
||||||
},
|
|
||||||
|
|
||||||
onAdd: function (map) {
|
|
||||||
var className = 'leaflet-control-zoom-fullscreen', container, content = '';
|
|
||||||
|
|
||||||
if (map.zoomControl && !this.options.forceSeparateButton) {
|
|
||||||
container = map.zoomControl._container;
|
|
||||||
} else {
|
|
||||||
container = L.DomUtil.create('div', 'leaflet-bar');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.options.content) {
|
|
||||||
content = this.options.content;
|
|
||||||
} else {
|
|
||||||
className += ' fullscreen-icon';
|
|
||||||
}
|
|
||||||
|
|
||||||
this._createButton(this.options.title, className, content, container, this.toggleFullScreen, this);
|
|
||||||
|
|
||||||
this._map.on('enterFullscreen exitFullscreen', this._toggleTitle, this);
|
|
||||||
|
|
||||||
return container;
|
|
||||||
},
|
|
||||||
|
|
||||||
_createButton: function (title, className, content, container, fn, context) {
|
|
||||||
this.link = L.DomUtil.create('a', className, container);
|
|
||||||
this.link.href = '#';
|
|
||||||
this.link.title = title;
|
|
||||||
this.link.innerHTML = content;
|
|
||||||
|
|
||||||
L.DomEvent
|
|
||||||
.addListener(this.link, 'click', L.DomEvent.stopPropagation)
|
|
||||||
.addListener(this.link, 'click', L.DomEvent.preventDefault)
|
|
||||||
.addListener(this.link, 'click', fn, context);
|
|
||||||
|
|
||||||
L.DomEvent
|
|
||||||
.addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
|
|
||||||
.addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
|
|
||||||
.addListener(container, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context);
|
|
||||||
|
|
||||||
L.DomEvent
|
|
||||||
.addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
|
|
||||||
.addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
|
|
||||||
.addListener(document, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context);
|
|
||||||
|
|
||||||
return this.link;
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleFullScreen: function () {
|
|
||||||
var map = this._map;
|
|
||||||
map._exitFired = false;
|
|
||||||
if (map._isFullscreen) {
|
|
||||||
if (fullScreenApi.supportsFullScreen && !this.options.forcePseudoFullscreen) {
|
|
||||||
fullScreenApi.cancelFullScreen();
|
|
||||||
} else {
|
|
||||||
L.DomUtil.removeClass(this.options.fullscreenElement ? this.options.fullscreenElement : map._container, 'leaflet-pseudo-fullscreen');
|
|
||||||
}
|
|
||||||
map.fire('exitFullscreen');
|
|
||||||
map._exitFired = true;
|
|
||||||
map._isFullscreen = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (fullScreenApi.supportsFullScreen && !this.options.forcePseudoFullscreen) {
|
|
||||||
fullScreenApi.requestFullScreen(this.options.fullscreenElement ? this.options.fullscreenElement : map._container);
|
|
||||||
} else {
|
|
||||||
L.DomUtil.addClass(this.options.fullscreenElement ? this.options.fullscreenElement : map._container, 'leaflet-pseudo-fullscreen');
|
|
||||||
}
|
|
||||||
map.fire('enterFullscreen');
|
|
||||||
map._isFullscreen = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_toggleTitle: function () {
|
|
||||||
this.link.title = this._map._isFullscreen ? this.options.title : this.options.titleCancel;
|
|
||||||
},
|
|
||||||
|
|
||||||
_handleFullscreenChange: function () {
|
|
||||||
var map = this._map;
|
|
||||||
map.invalidateSize();
|
|
||||||
if (!fullScreenApi.isFullScreen() && !map._exitFired) {
|
|
||||||
map.fire('exitFullscreen');
|
|
||||||
map._exitFired = true;
|
|
||||||
map._isFullscreen = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
L.Map.addInitHook(function () {
|
|
||||||
if (this.options.fullscreenControl) {
|
|
||||||
this.fullscreenControl = L.control.fullscreen(this.options.fullscreenControlOptions);
|
|
||||||
this.addControl(this.fullscreenControl);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
L.control.fullscreen = function (options) {
|
|
||||||
return new L.Control.FullScreen(options);
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
Native FullScreen JavaScript API
|
|
||||||
-------------
|
|
||||||
Assumes Mozilla naming conventions instead of W3C for now
|
|
||||||
|
|
||||||
source : http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin/
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
var
|
|
||||||
fullScreenApi = {
|
|
||||||
supportsFullScreen: false,
|
|
||||||
isFullScreen: function () { return false; },
|
|
||||||
requestFullScreen: function () {},
|
|
||||||
cancelFullScreen: function () {},
|
|
||||||
fullScreenEventName: '',
|
|
||||||
prefix: ''
|
|
||||||
},
|
|
||||||
browserPrefixes = 'webkit moz o ms khtml'.split(' ');
|
|
||||||
|
|
||||||
// check for native support
|
|
||||||
if (typeof document.exitFullscreen !== 'undefined') {
|
|
||||||
fullScreenApi.supportsFullScreen = true;
|
|
||||||
} else {
|
|
||||||
// check for fullscreen support by vendor prefix
|
|
||||||
for (var i = 0, il = browserPrefixes.length; i < il; i++) {
|
|
||||||
fullScreenApi.prefix = browserPrefixes[i];
|
|
||||||
if (typeof document[fullScreenApi.prefix + 'CancelFullScreen'] !== 'undefined') {
|
|
||||||
fullScreenApi.supportsFullScreen = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (typeof document['msExitFullscreen'] !== 'undefined') {
|
|
||||||
fullScreenApi.prefix = 'ms';
|
|
||||||
fullScreenApi.supportsFullScreen = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// update methods to do something useful
|
|
||||||
if (fullScreenApi.supportsFullScreen) {
|
|
||||||
if (fullScreenApi.prefix === 'ms') {
|
|
||||||
fullScreenApi.fullScreenEventName = 'MSFullscreenChange';
|
|
||||||
} else {
|
|
||||||
fullScreenApi.fullScreenEventName = fullScreenApi.prefix + 'fullscreenchange';
|
|
||||||
}
|
|
||||||
fullScreenApi.isFullScreen = function () {
|
|
||||||
switch (this.prefix) {
|
|
||||||
case '':
|
|
||||||
return document.fullscreen;
|
|
||||||
case 'webkit':
|
|
||||||
return document.webkitIsFullScreen;
|
|
||||||
case 'ms':
|
|
||||||
return document.msFullscreenElement;
|
|
||||||
default:
|
|
||||||
return document[this.prefix + 'FullScreen'];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
fullScreenApi.requestFullScreen = function (el) {
|
|
||||||
switch (this.prefix) {
|
|
||||||
case '':
|
|
||||||
return el.requestFullscreen();
|
|
||||||
case 'ms':
|
|
||||||
return el.msRequestFullscreen();
|
|
||||||
default:
|
|
||||||
return el[this.prefix + 'RequestFullScreen']();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
fullScreenApi.cancelFullScreen = function () {
|
|
||||||
switch (this.prefix) {
|
|
||||||
case '':
|
|
||||||
return document.exitFullscreen();
|
|
||||||
case 'ms':
|
|
||||||
return document.msExitFullscreen();
|
|
||||||
default:
|
|
||||||
return document[this.prefix + 'CancelFullScreen']();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// jQuery plugin
|
|
||||||
if (typeof jQuery !== 'undefined') {
|
|
||||||
jQuery.fn.requestFullScreen = function () {
|
|
||||||
return this.each(function () {
|
|
||||||
var el = jQuery(this);
|
|
||||||
if (fullScreenApi.supportsFullScreen) {
|
|
||||||
fullScreenApi.requestFullScreen(el);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// export api
|
|
||||||
window.fullScreenApi = fullScreenApi;
|
|
||||||
})();
|
|
19
LICENSE
|
@ -1,19 +0,0 @@
|
||||||
Copyright (c) 2013, Bruno Bergot
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
|
@ -1,27 +0,0 @@
|
||||||
.leaflet-marker-photo {
|
|
||||||
border: 2px solid #fff;
|
|
||||||
box-shadow: 3px 3px 10px #888;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-marker-photo div {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-marker-photo b {
|
|
||||||
position: absolute;
|
|
||||||
top: -7px;
|
|
||||||
right: -11px;
|
|
||||||
color: #555;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 8px;
|
|
||||||
height: 12px;
|
|
||||||
min-width: 12px;
|
|
||||||
line-height: 12px;
|
|
||||||
text-align: center;
|
|
||||||
padding: 3px;
|
|
||||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
|
@ -1,83 +0,0 @@
|
||||||
L.Photo = L.FeatureGroup.extend({
|
|
||||||
options: {
|
|
||||||
icon: {
|
|
||||||
iconSize: [40, 40]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
initialize: function (photos, options) {
|
|
||||||
L.setOptions(this, options);
|
|
||||||
L.FeatureGroup.prototype.initialize.call(this, photos);
|
|
||||||
},
|
|
||||||
|
|
||||||
addLayers: function (photos) {
|
|
||||||
if (photos) {
|
|
||||||
for (var i = 0, len = photos.length; i < len; i++) {
|
|
||||||
this.addLayer(photos[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
addLayer: function (photo) {
|
|
||||||
L.FeatureGroup.prototype.addLayer.call(this, this.createMarker(photo));
|
|
||||||
},
|
|
||||||
|
|
||||||
createMarker: function (photo) {
|
|
||||||
var marker = L.marker(photo, {
|
|
||||||
icon: L.divIcon(L.extend({
|
|
||||||
html: '<div style="background-image: url(' + photo.thumbnail + ');"></div>',
|
|
||||||
className: 'leaflet-marker-photo'
|
|
||||||
}, photo, this.options.icon)),
|
|
||||||
title: photo.caption || ''
|
|
||||||
});
|
|
||||||
marker.photo = photo;
|
|
||||||
return marker;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
L.photo = function (photos, options) {
|
|
||||||
return new L.Photo(photos, options);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (L.MarkerClusterGroup) {
|
|
||||||
|
|
||||||
L.Photo.Cluster = L.MarkerClusterGroup.extend({
|
|
||||||
options: {
|
|
||||||
featureGroup: L.photo,
|
|
||||||
maxClusterRadius: 100,
|
|
||||||
showCoverageOnHover: false,
|
|
||||||
iconCreateFunction: function(cluster) {
|
|
||||||
return new L.DivIcon(L.extend({
|
|
||||||
className: 'leaflet-marker-photo',
|
|
||||||
html: '<div style="background-image: url(' + cluster.getAllChildMarkers()[0].photo.thumbnail + ');"></div><b>' + cluster.getChildCount() + '</b>'
|
|
||||||
}, this.icon));
|
|
||||||
},
|
|
||||||
icon: {
|
|
||||||
iconSize: [40, 40]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
initialize: function (options) {
|
|
||||||
options = L.Util.setOptions(this, options);
|
|
||||||
L.MarkerClusterGroup.prototype.initialize.call(this);
|
|
||||||
this._photos = options.featureGroup(null, options);
|
|
||||||
},
|
|
||||||
|
|
||||||
add: function (photos) {
|
|
||||||
this.addLayer(this._photos.addLayers(photos));
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
clear: function () {
|
|
||||||
this._photos.clearLayers();
|
|
||||||
this.clearLayers();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
L.photo.cluster = function (options) {
|
|
||||||
return new L.Photo.Cluster(options);
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
.marker-cluster-small {
|
|
||||||
background-color: rgba(181, 226, 140, 0.6);
|
|
||||||
}
|
|
||||||
.marker-cluster-small div {
|
|
||||||
background-color: rgba(110, 204, 57, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.marker-cluster-medium {
|
|
||||||
background-color: rgba(241, 211, 87, 0.6);
|
|
||||||
}
|
|
||||||
.marker-cluster-medium div {
|
|
||||||
background-color: rgba(240, 194, 12, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.marker-cluster-large {
|
|
||||||
background-color: rgba(253, 156, 115, 0.6);
|
|
||||||
}
|
|
||||||
.marker-cluster-large div {
|
|
||||||
background-color: rgba(241, 128, 23, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* IE 6-8 fallback colors */
|
|
||||||
.leaflet-oldie .marker-cluster-small {
|
|
||||||
background-color: rgb(181, 226, 140);
|
|
||||||
}
|
|
||||||
.leaflet-oldie .marker-cluster-small div {
|
|
||||||
background-color: rgb(110, 204, 57);
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .marker-cluster-medium {
|
|
||||||
background-color: rgb(241, 211, 87);
|
|
||||||
}
|
|
||||||
.leaflet-oldie .marker-cluster-medium div {
|
|
||||||
background-color: rgb(240, 194, 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .marker-cluster-large {
|
|
||||||
background-color: rgb(253, 156, 115);
|
|
||||||
}
|
|
||||||
.leaflet-oldie .marker-cluster-large div {
|
|
||||||
background-color: rgb(241, 128, 23);
|
|
||||||
}
|
|
||||||
|
|
||||||
.marker-cluster {
|
|
||||||
background-clip: padding-box;
|
|
||||||
border-radius: 20px;
|
|
||||||
}
|
|
||||||
.marker-cluster div {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
margin-left: 5px;
|
|
||||||
margin-top: 5px;
|
|
||||||
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 15px;
|
|
||||||
font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
.marker-cluster span {
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
|
|
||||||
-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
|
|
||||||
-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
|
|
||||||
-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
|
|
||||||
transition: transform 0.3s ease-out, opacity 0.3s ease-in;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-cluster-spider-leg {
|
|
||||||
/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
|
|
||||||
-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
|
|
||||||
-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
|
|
||||||
-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
|
|
||||||
transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
|
|
||||||
}
|
|
389
README.md
|
@ -1,389 +0,0 @@
|
||||||
# WP GPX Maps
|
|
||||||
|
|
||||||
Contributors: bastianonm, Stephan Klein, Michel Selerin, TosattoSimonePio, Kniebremser
|
|
||||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd_s-xclick&hosted_button_id=8VHWLRW6JBTML
|
|
||||||
Tags: maps, gpx, gps, graph, chart, leaflet, track, garmin, image, nextgen-gallery, nextgen, exif, OpenStreetMap, OpenCycleMap, Hike&Bike, heart rate, heartrate, cadence
|
|
||||||
Requires at least: 4.6.0
|
|
||||||
Tested up to: 5.2.2
|
|
||||||
Requires PHP: 5.6.20
|
|
||||||
Stable tag: 1.7.00
|
|
||||||
|
|
||||||
Draws a GPX track with altitude graph. You can also display your nextgen gallery images in the map.
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
This plugin has, as input, the GPX file with the track you've made and as output it shows the map of the track and an interactive altitude graph (where available).
|
|
||||||
|
|
||||||
Fully configurable:
|
|
||||||
|
|
||||||
- Custom colors
|
|
||||||
- Custom icons
|
|
||||||
- Multiple language support
|
|
||||||
|
|
||||||
Supported charts:
|
|
||||||
|
|
||||||
- Altitude
|
|
||||||
- Speed
|
|
||||||
- Heart rate
|
|
||||||
- Temperature
|
|
||||||
- Cadence
|
|
||||||
- Grade
|
|
||||||
|
|
||||||
NextGen Gallery Integration:
|
|
||||||
|
|
||||||
Display your NextGen Gallery images inside the map!
|
|
||||||
Even if you don't have a GPS camera, this plugin can retrive the image position starting from the image date and your GPX file.
|
|
||||||
|
|
||||||
Post Attachments Integration:
|
|
||||||
|
|
||||||
This version is extended by: <a href"https://klein-gedruckt.de/2015/03/wordpress-plugin-wp-gpx-maps/" target="_blank" rel="noopener noreferrer">Stephan Klein</a> and supports displaying all images attached to a post without using NGG.
|
|
||||||
|
|
||||||
Try this plugin: <a href"https://devfarm.it/wp-gpx-maps-demo/" target="_blank" rel="noopener noreferrer">https://devfarm.it/wp-gpx-maps-demo/</a>
|
|
||||||
|
|
||||||
Support:
|
|
||||||
|
|
||||||
If you need help, please use: <a href"http://www.devfarm.it/forums/forum/wp-gpx-maps/" target="_blank" rel="noopener noreferrer">www.devfarm.it Support Forum</a>
|
|
||||||
|
|
||||||
Would you like to help fix bugs or further develop the plugin? On <a href"https://github.com/devfarm-it/wp-gpx-maps" target="_blank" rel="noopener noreferrer">Github</a> you can contribuite easly with your code.
|
|
||||||
|
|
||||||
Translations:
|
|
||||||
|
|
||||||
Translators are welcome to contribute to the plugin. Please use the <a href"https://translate.wordpress.org/projects/wp-plugins/wp-gpx-maps/)" target="_blank" rel="noopener noreferrer">WordPress translation website</a>.
|
|
||||||
|
|
||||||
The language files in the plugin contain 18 translatable texts for 13 languages:
|
|
||||||
|
|
||||||
- Catalan ca
|
|
||||||
- Dutch nl_NL
|
|
||||||
- English (default)
|
|
||||||
- French fr_FR
|
|
||||||
- Hungarian hu_HU
|
|
||||||
- Italian it_IT
|
|
||||||
- Norwegian nb_NO
|
|
||||||
- Polish pl_PL
|
|
||||||
- Portuguese (Brazilian) pt_BR
|
|
||||||
- Russian ru_RU
|
|
||||||
- Spanish es_ES
|
|
||||||
- Swedish sv_SE
|
|
||||||
- Turkish tr_TR
|
|
||||||
- Bulgarian bg_BG
|
|
||||||
- Slovak cs_CZ
|
|
||||||
- Norwegian nb_NO
|
|
||||||
- Japanese ja_JP
|
|
||||||
|
|
||||||
(Many thanks to all guys who helped me with the translations)
|
|
||||||
|
|
||||||
Currently are 230 texts are translatable in the plugin.
|
|
||||||
|
|
||||||
With your help, the plugin can be translated into any language. For updating the language file you no longer need to wait for a new version of the plugin.
|
|
||||||
Are 95% WordPress generates a new language file for your language.
|
|
||||||
If the translation is available via WP Translate, the language file will be deleted in the next version of the plugin.
|
|
||||||
Please also help with the translation of the readme. The more languages that are available, the wider the spread of the plugin will be.
|
|
||||||
|
|
||||||
Supported GPX namespaces are:
|
|
||||||
|
|
||||||
1. http://www.topografix.com/GPX/1/0
|
|
||||||
|
|
||||||
1. <a href"http://www.topografix.com/GPX/1/1" target="_blank" rel="noopener noreferrer">www.topografix.com/GPX/1/1</a>
|
|
||||||
|
|
||||||
1. http://www.garmin.com/xmlschemas/GpxExtensions/v3
|
|
||||||
|
|
||||||
1. http://www.garmin.com/xmlschemas/TrackPointExtension/v1
|
|
||||||
|
|
||||||
Thanks to: <a href"http://www.securcube.net/" target="_blank" rel="noopener noreferrer">www.securcube.net</a>, <a href="http://www.devfarm.it/" target="_blank" rel="noopener noreferrer">www.devfarm.it</a>
|
|
||||||
|
|
||||||
Icons made by <a href"https://www.freepik.com/" target="_blank" rel="noopener noreferrer">Freepik</a> from <a href="https://www.flaticon.com/" target="_blank" rel="noopener noreferrer">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" target="_blank" rel="noopener noreferrer">Creative Commons BY 3.0</a>
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
1. Use the classic wordpress plugin installer or copy the plugins folder to the `/wp-content/plugins/` directory
|
|
||||||
|
|
||||||
1. Activate the plugin through the 'Plugins' menu in WordPress
|
|
||||||
|
|
||||||
1. Add the shortcode [sgpx gpx">relative path to your gpx<"] or [sgpx gpx=">http://somesite.com/files/yourfile.gpx<"]
|
|
||||||
|
|
||||||
## Frequently Asked Questions
|
|
||||||
|
|
||||||
### Which shortcode attributes are available?
|
|
||||||
|
|
||||||
You can use the following shortcodes:
|
|
||||||
|
|
||||||
1. gpx: Relative path to the GPX file
|
|
||||||
1. width: Map width (value in percent)
|
|
||||||
1. mheight: Map height (value in pixeln)
|
|
||||||
1. gheight: Graph height (value in pixeln)
|
|
||||||
1. skipcache: Do not use cache. If TRUE might be very slow (default is false)
|
|
||||||
1. download: Allow users to download your GPX file (default is false)
|
|
||||||
1. summary: Print summary details of your GPX track (default is false)
|
|
||||||
1. summarytotlen: Print total distance in summary table (default is false)
|
|
||||||
1. summarymaxele: Print max elevation in summary table (default is false)
|
|
||||||
1. summaryminele: Print min Elevation in summary table (default is false)
|
|
||||||
1. summaryeleup: Print total climbing in summary table (default is false)
|
|
||||||
1. summaryeledown: Print total descent in summary table (default is false)
|
|
||||||
1. summaryavgspeed: Print average Speed in summary table (default is false)
|
|
||||||
1. summarytotaltime: Print total time in summary table (default is false)
|
|
||||||
1. mtype: Map available types are: HYBRID, ROADMAP, SATELLITE, TERRAIN, OSM1 (Open Street Map), OSM2 (Open Cycle Map), OSM4 (Open Cycle Map - Transport), OSM5 (Open Cycle Map - Landscape), OSM6 (MapToolKit - Terrain), OSM7 (Open Street Map - Humanitarian map style), OSM 9 (Hike & Bike), OSM10 (Open Sea Map)
|
|
||||||
1. mlinecolor: Map line color (default is #3366cc)
|
|
||||||
1. zoomonscrollwheel: Zoom on map when mouse scroll wheel (default is false)
|
|
||||||
1. waypoints: Print the gpx waypoints inside the map (default is false)
|
|
||||||
1. startIcon: Start track icon
|
|
||||||
1. endIcon: End track icon
|
|
||||||
1. currentIcon: Current position icon (when mouse hover)
|
|
||||||
1. waypointicon: Custom waypoint icon
|
|
||||||
1. showele: Show elevation data inside the chart (default is true)
|
|
||||||
1. uom: Distance/altitude possible unit of measure (0 meters, 1 = feet/miles, 2 = meters/kilometers, 3 = meters/nautical miles, 4 = meters/miles, 5 = feet/nautical miles)
|
|
||||||
1. glinecolor: Altitude line color (default is #3366cc)
|
|
||||||
1. chartFrom1: Minimun value for altitude chart
|
|
||||||
1. chartTo1: Maxumin value for altitude chart
|
|
||||||
1. showspeed: Show speed inside the chart (default is false)
|
|
||||||
1. glinecolorspeed: Speed line color (default is #ff0000)
|
|
||||||
1. uomspeed: Unit of measure for speed (0 m/s, 1 = km/h, 2 = miles/h, 3 = min/km, 4 = min/miles, 5 = Nautical Miles/Hour (Knots), 6 = min/100 meters)
|
|
||||||
1. chartFrom2: Minimun value for speed chart
|
|
||||||
1. chartTo2: Maxumin value for speed chart
|
|
||||||
1. showhr: Show heart rate inside the chart (default is false)
|
|
||||||
1. glinecolorhr: Heart rate line color (default is #ff77bd)
|
|
||||||
1. showatemp: Show temperature inside the chart (default is false)
|
|
||||||
1. glinecoloratemp: Temperature line color (default is #ff77bd)
|
|
||||||
1. showcad: Show cadence inside the chart (default is false)
|
|
||||||
1. glinecolorcad: Cadence line color (default is #beecff)
|
|
||||||
1. showgrade: Show grade inside the chart (default is false)
|
|
||||||
1. glinecolorgrade: Grade line color (default is #beecff)
|
|
||||||
1. nggalleries: NextGen Gallery id or a list of Galleries id separated by a comma
|
|
||||||
1. ngimages: NextGen Image id or a list of Images id separated by a comma
|
|
||||||
1. attachments: Show all images that are attached to post (default is false)
|
|
||||||
1. dtoffset: The difference (in seconds) between your gpx tool date and your camera date
|
|
||||||
1. pointsoffset: Skip points closer than XX meters (default is 10)
|
|
||||||
1. donotreducegpx: Print all the point without reduce it (default is false)
|
|
||||||
|
|
||||||
### What happening if I've a very large GPX files?
|
|
||||||
|
|
||||||
This plugin will print a small amout of points to speedup javascript and pageload.
|
|
||||||
|
|
||||||
### Is it free?
|
|
||||||
|
|
||||||
Yes!
|
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
1. Simple GPX
|
|
||||||
1. GPX with waypoints
|
|
||||||
1. Admin area - List of tracks
|
|
||||||
1. Admin area - Settings
|
|
||||||
1. Altitude & Speed
|
|
||||||
1. Altitude & Speed & Heart rate
|
|
||||||
|
|
||||||
## Changelog
|
|
||||||
|
|
||||||
### X.X.XX
|
|
||||||
* Added: PHP version notices, WordPress 5.3 requires PHP 5.6.20
|
|
||||||
* Added: Missing entries for add and delete options
|
|
||||||
* Changed: Style for output moved in a seperate file
|
|
||||||
* Tweak: Small design optimizations in the admin area
|
|
||||||
* Tweak: Small code adjustments (WPCS)
|
|
||||||
* Upgrade: bootstrap-table to 1.13.2
|
|
||||||
* Removed: german language file (now over translate.wordpress.org)
|
|
||||||
### 1.7.00
|
|
||||||
* Added: Authors can upload GPX tracks in a folder called as *your user name*, inside [../wp-upload dir/gpx/[*your user name*] (thanks to wildcomputations)
|
|
||||||
* Added: Authors an Admins can see the current values for shortcodes in help tab
|
|
||||||
* Added: Button to instant copy the shortcode of the selected GPX file in the tab track
|
|
||||||
* Added: different size logos for the plugin store (icon.svg, icon128x128.png and icon256x256.png) [inside ../plugins/wp-gpx-maps/assets]
|
|
||||||
* Changed: Settings tab is for non-Admin users is not more visible
|
|
||||||
* Tweak: Help tab is easier to read
|
|
||||||
* Tweak: Plugin is now complete translatable (Backend + Frontend)
|
|
||||||
* Tweak: WordPress coding standards
|
|
||||||
* Upgrade: Leaflet to 1.5.1
|
|
||||||
* Upgrade: leaflet.fullscreen to 1.4.5
|
|
||||||
* Upgrade: Chart.min.js to 2.8.0
|
|
||||||
### 1.6.07
|
|
||||||
* resolve admin error
|
|
||||||
### 1.6.06
|
|
||||||
* Added average values under the graph (thanks to cyclinggeorgian)
|
|
||||||
### 1.6.04
|
|
||||||
* NGG gallery is working
|
|
||||||
* Getting HR, Cad and Temp working again (thanks to cyclinggeorgian)
|
|
||||||
* Fix javascript errors
|
|
||||||
* Fix multiple traks gpx
|
|
||||||
### 1.6.03
|
|
||||||
* Fix syntax error causing graph not to display (thanks to nickstabler)
|
|
||||||
### 1.6.02
|
|
||||||
* Resolved errors with start and end icons
|
|
||||||
### 1.6.01
|
|
||||||
* Removed Gogole maps. Leafletjs instead.
|
|
||||||
* -- NextGen Gallery is not working, due next gen image format changed -- I'll fix soon
|
|
||||||
### 1.5.05
|
|
||||||
* renamed javascript functions to avoid collision with other plugins
|
|
||||||
* reduced chart line thickness
|
|
||||||
### 1.5.04
|
|
||||||
* fix uom
|
|
||||||
* fix file not found
|
|
||||||
### 1.5.03
|
|
||||||
* fix random error
|
|
||||||
### 1.5.02
|
|
||||||
* Security improvements
|
|
||||||
### 1.5.01
|
|
||||||
* Improved security
|
|
||||||
* Included javascript
|
|
||||||
* Multiple file upload
|
|
||||||
* Implemented sorting in file list
|
|
||||||
* Renamed internal function to improve wp compatibility
|
|
||||||
### 1.5.00
|
|
||||||
* replaced highcharts with chartjs. This is a forced choice due highcharts license issue, view: https://devfarm.it/wordpress-plugin/wordpress-plugin-directory-notice-wp-gpx-maps-temporarily-disabled/
|
|
||||||
### 1.3.16
|
|
||||||
* Added Norwegian nb_NO translation (thanks to thordivel)
|
|
||||||
* Added Japanese ja_JP translation (thanks to dentos)
|
|
||||||
### 1.3.15
|
|
||||||
* Switched to HTTPS where possible (thanks to delitestudio)
|
|
||||||
### 1.3.14
|
|
||||||
* Added Thunderforest Api Key on settings: for OpenCycleMap
|
|
||||||
### 1.3.13
|
|
||||||
* Added google maps api key on settings
|
|
||||||
* Removed parameter 'sensor' on google maps js
|
|
||||||
* Added unit of measure of speed for swimmers: min/100 meters
|
|
||||||
### 1.3.12
|
|
||||||
* Fix incompatibility with Debian PHP7 (thanks to phbaer) https://github.com/devfarm-it/wp-gpx-maps/pull/5
|
|
||||||
### 1.3.10
|
|
||||||
* Improved german translations (thanks to Konrad) http://tadesse.de/7882/2015-wanderung-ostrov-tisa-ii/
|
|
||||||
### 1.3.9
|
|
||||||
* Retrieve waypoints in JSON, possibility to add a custom marker (Changed by Michel Selerin)
|
|
||||||
### 1.3.8
|
|
||||||
* Improved Google Maps visualization
|
|
||||||
### 1.3.7
|
|
||||||
* NextGen Gallery's Attachment support. Thanks to Stephan Klein (https://klein-gedruckt.de/2015/03/wordpress-plugin-wp-gpx-maps/)
|
|
||||||
### 1.3.6
|
|
||||||
* Fix: remote file download issue
|
|
||||||
* Fix: download file link with WPML
|
|
||||||
* Improved cache with filetime (thanks to David)
|
|
||||||
### 1.3.5
|
|
||||||
* Fix: Garmin cadence again
|
|
||||||
* Fix: WP Tabs
|
|
||||||
### 1.3.4
|
|
||||||
* Fix: Garmin cadence
|
|
||||||
* Infowindows closing on mouseout
|
|
||||||
### 1.3.3
|
|
||||||
* Add feet/Nautical Miles units (thanks to elperepat)
|
|
||||||
* Update OpenStreetMaps Credits
|
|
||||||
* WP Tabs fix
|
|
||||||
### 1.3.2
|
|
||||||
* fix: left axis not visible (downgrade highcharts to v3.0.10)
|
|
||||||
* fix: fullscreen map js error
|
|
||||||
### 1.3.1
|
|
||||||
* fix: http/https javascript registration
|
|
||||||
* fix: full screen map css issue
|
|
||||||
### 1.3.0
|
|
||||||
* Speed improvement
|
|
||||||
* Rewritten js classes
|
|
||||||
* Added Temperature chart
|
|
||||||
* Added HTML5 Gps position (you can now follow the gpx with your mobile phone/tablet/pc)
|
|
||||||
### 1.2.6
|
|
||||||
* Speed improvement
|
|
||||||
### 1.2.5
|
|
||||||
* Added Catalan translation, thanks to Edgar
|
|
||||||
* Updated Spanish translation, thanks to Dani
|
|
||||||
* Added different types of distance: Normal, Flat (don't consider altitude) and Climb distance
|
|
||||||
### 1.2.4
|
|
||||||
* Added Bulgarian translation, thanks to Svilen Savov
|
|
||||||
* Added possibility to hide the elevation chart
|
|
||||||
### 1.2.2
|
|
||||||
* Smaller map type selector
|
|
||||||
* New map: MapToolKit - Terrain
|
|
||||||
* Fix: Google maps exception for NextGen Gallery
|
|
||||||
### 1.2.1
|
|
||||||
* Fix: NextGen Gallery 1.9 compatibility
|
|
||||||
### 1.2.0
|
|
||||||
* NextGen Gallery 2 support
|
|
||||||
* NextGen Gallery Pro support
|
|
||||||
### 1.1.46
|
|
||||||
* Added meters/miles chart unit of measure
|
|
||||||
* Added Russian translation, thanks to G.A.P
|
|
||||||
### 1.1.45
|
|
||||||
* Added nautical miles as distance (Many thanks to Anders)
|
|
||||||
### 1.1.44
|
|
||||||
* Added Chart zoom feature
|
|
||||||
* Some small bug fixes
|
|
||||||
### 1.1.43
|
|
||||||
* Added Portuguese (Brazilian) translation, thanks to André Ramos
|
|
||||||
* new map: Open Cycle Map - Transport
|
|
||||||
* new map: Open Cycle Map - Landscape
|
|
||||||
### 1.1.42
|
|
||||||
* qTranslate compatible
|
|
||||||
### 1.1.41
|
|
||||||
* Added Polish translation, thanks to Sebastian
|
|
||||||
* Fix: Spanish translation
|
|
||||||
* Minor javascript improvement
|
|
||||||
### 1.1.40
|
|
||||||
* Improved italian translation
|
|
||||||
* Added grade chart (beta)
|
|
||||||
### 1.1.39
|
|
||||||
* Added French translation, thanks to Hervé
|
|
||||||
* Added Nautical Miles per Hour (Knots) unit of measure
|
|
||||||
### 1.1.38
|
|
||||||
* Fix: garmin gpx cadence and heart rate
|
|
||||||
* Updated Turkish translation, thanks to Edip
|
|
||||||
* Added Hungarian translation, thanks to Tami
|
|
||||||
### 1.1.36
|
|
||||||
* Even Editor and Author users can upload their own gpx. Administrators can see all the administrators gpx. The other users can see only their uploads
|
|
||||||
### 1.1.35
|
|
||||||
* Fix: In the post list, sometime, the maps was not displaying correctly ( the php rand() function was not working?? )
|
|
||||||
* Various improvements for multi track gpx. Thanks to GPSracks.tv
|
|
||||||
* Summary table is now avaiable even without chart. Thanks to David
|
|
||||||
### 1.1.34
|
|
||||||
* 2 decimals for unit of measure min/km and min/mi
|
|
||||||
* translation file updated (a couple of phrases added)
|
|
||||||
* File list reverse order (from the newer to the older)
|
|
||||||
* nggallery integration: division by zero fixed
|
|
||||||
### 1.1.33
|
|
||||||
* Decimals reducted to 1 for unit of measure min/km and min/mi
|
|
||||||
* map zoom and center position is working with waypoints only files
|
|
||||||
* automatic scale works again (thanks to MArkus)
|
|
||||||
### 1.1.32
|
|
||||||
* You can exclude cache (slower and not recommended)
|
|
||||||
* You can decide what show in the summary table
|
|
||||||
* German translation (thanks to Ali)
|
|
||||||
### 1.1.31
|
|
||||||
* Fixed fullscreen map image slideshow
|
|
||||||
### 1.1.30
|
|
||||||
* Multi track gpx support
|
|
||||||
* Next Gen Gallery images positions derived from date. You can adjust the date with the shortcode attribute dtoffset
|
|
||||||
* If you set Chart Height (shortcode gheight) 0 means hide the graph
|
|
||||||
* Fix: All images should work, independent from browser cache
|
|
||||||
### 1.1.29
|
|
||||||
* Decimal separator is working with all the browsers
|
|
||||||
* minutes per mile and minutes per kilometer was wrong
|
|
||||||
### 1.1.28
|
|
||||||
* Decimal and thousand separator derived from browser language
|
|
||||||
* Added summary table (see settings): Total distance, Max elevation, Min elevation, Total climbing, Total descent, Average speed
|
|
||||||
* Added 2 speed units of measure: minutes per mile and minutes per kilometer
|
|
||||||
### 1.1.26
|
|
||||||
* Multilanguage implementation (only front-end). I've implemented the italian one, I hope somebody will help me with other languages..
|
|
||||||
* Map Full screen mode (I'm sure it's not working in ie6. don't even ask!)
|
|
||||||
* Added waypoint custom icon
|
|
||||||
### 1.1.25
|
|
||||||
* Added possibility to download your gpx
|
|
||||||
### 1.1.23
|
|
||||||
* Security fix, please update!
|
|
||||||
### 1.1.22
|
|
||||||
* enable map zoom on scroll wheel (check settings)
|
|
||||||
* test attributes in get params
|
|
||||||
### 1.1.21
|
|
||||||
* google maps images fixed (templates with bad css)
|
|
||||||
* upgrade to google maps 3.9
|
|
||||||
### 1.1.20
|
|
||||||
* google maps images fixed in <a href"http://wordpress.org/extend/themes/yoko">Yoko theme</a>
|
|
||||||
### 1.1.19
|
|
||||||
* include jQuery if needed
|
|
||||||
### 1.1.17
|
|
||||||
* Remove zero values from cadence and heart rate charts
|
|
||||||
* nextgen gallery improvement
|
|
||||||
### 1.1.16
|
|
||||||
* Cadence chart (where available)
|
|
||||||
* minor bug fixes
|
|
||||||
### 1.1.15
|
|
||||||
* migration from google chart to highcharts. Highcharts are much better than google chart! This is the base for a new serie of improvements. Stay in touch for the next releases!
|
|
||||||
* heart rate chart (where available)
|
|
||||||
### 1.1.14
|
|
||||||
* added css to avoid map bars display issue
|
|
||||||
### 1.1.13
|
|
||||||
* added new types of maps: Open Street Map, Open Cycle Map, Hike & Bike.
|
|
||||||
* fixed nextgen gallery caching problem
|
|
||||||
### 1.1.12
|
|
||||||
* nextgen gallery display bug fixes
|
|
||||||
|
|
||||||
## Upgrade Notice
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"commitMessage": "version %s",
|
|
||||||
"tagName": "%s",
|
|
||||||
"scripts": {
|
|
||||||
"postcommit": "git push && git push --tags && npm publish"
|
|
||||||
}
|
|
||||||
}
|
|
1507
WP-GPX-Maps.js
|
@ -1,62 +0,0 @@
|
||||||
/**
|
|
||||||
* This file contains the style definitions for the admin area
|
|
||||||
*
|
|
||||||
* Content:
|
|
||||||
* --------
|
|
||||||
* 1. Over the Tabs
|
|
||||||
* 2. Tab: Tracks
|
|
||||||
* 3. Tab: Settings
|
|
||||||
* 4. Tab: Help
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1.0 Over the Tabs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 2.0 Tab: Tracks
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 3.0 Tab: Settings
|
|
||||||
*/
|
|
||||||
.wpgpxmaps-container-tab-settings {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 20px 1px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 4.0 Tab: Tracks
|
|
||||||
*/
|
|
||||||
.wpgpxmaps-container-tab-faq {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 20px 1px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpgpxmaps-tab-faq {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 20px 10px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpgpxmaps-container-tab-faq table.widefat {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-bottom: none;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpgpxmaps-container-tab-faq table.widefat tbody tr:hover {
|
|
||||||
background:#eeeeee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpgpxmaps-container-tab-faq table.widefat th,
|
|
||||||
.wpgpxmaps-container-tab-faq table.widefat td {
|
|
||||||
padding: 4px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpgpxmaps-container-tab-faq table.widefat thead tr th {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wpgpxmaps-container-tab-faq table.widefat td {
|
|
||||||
width: 200px;
|
|
||||||
}
|
|
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 14 KiB |
|
@ -1 +0,0 @@
|
||||||
<svg height="512pt" viewBox="0 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m452 122c-27.601562 0-50 22.402344-50 50v280h100v-280c0-27.609375-22.390625-50-50-50zm0 0" fill="#ececf1"/><path d="m60 122c-27.601562 0-50 22.402344-50 50v280h100c0-10.460938 0-266.328125 0-280 0-27.609375-22.390625-50-50-50zm0 0" fill="#ececf1"/><path d="m260 322h142c0-54.882812 0-108.527344 0-120h-268s91.441406 87.089844 126 120zm0 0" fill="#7fe881"/><path d="m110 262v190c0-27.609375-22.390625-50-50-50s-50 22.390625-50 50c0 29.078125 25.246094 50 52.851562 50h47.148438l126-120zm0 0" fill="#76e2f8"/><path d="m465.320312 403.71875c-33.359374-8.617188-63.320312 16.332031-63.320312 48.28125 0-7.824219 0-35.589844 0-70h-86l-120 120h256c27.621094 0 50-22.378906 50-50 0-24.109375-16.308594-43.019531-36.679688-48.28125zm0 0" fill="#76e2f8"/><path d="m402 322v60h-86l-120 120h-86l126-120-126-120v-60h24s91.441406 87.089844 126 120zm0 0" fill="#fed2a4"/><path d="m256 10c49.710938 0 90 40.289062 90 90 0 24.488281-21.828125 66.089844-43.988281 102-22.832031 37.019531-46.011719 68-46.011719 68s-23.179688-30.980469-46.011719-68c-22.160156-35.910156-43.988281-77.511719-43.988281-102 0-49.710938 40.289062-90 90-90zm0 0" fill="#ff637b"/><path d="m256 60c22.058594 0 40 17.941406 40 40s-17.941406 40-40 40-40-17.941406-40-40 17.941406-40 40-40zm0 0" fill="#ececf1"/><path d="m452 112c-33.144531 0-60 26.847656-60 60v20h-72.3125c24.097656-41.210938 36.3125-72.117188 36.3125-92 0-55.140625-44.859375-100-100-100s-100 44.859375-100 100c0 19.882812 12.214844 50.792969 36.3125 92-8.117188 0-65.292969 0-72.3125 0v-20c0-33.085938-26.914062-60-60-60-33.144531 0-60 26.847656-60 60v56c0 5.523438 4.476562 10 10 10s10-4.476562 10-10v-56c0-22.09375 17.902344-40 40-40 22.054688 0 40 17.945312 40 40v235.316406c-10.621094-9.519531-24.648438-15.316406-40-15.316406-15.355469 0-29.375 5.804688-40 15.328125v-99.328125c0-5.523438-4.476562-10-10-10s-10 4.476562-10 10v144c0 34.308594 29.617188 60 62.851562 60h389.148438c33.085938 0 60-26.914062 60-60v-280c0-33.085938-26.914062-60-60-60zm-40 60c0-22.09375 17.902344-40 40-40 22.054688 0 40 17.945312 40 40v235.042969c-6.875-6.121094-15.152344-10.675781-24.179688-13.003907-20.042968-5.183593-40.664062-.304687-55.820312 13.230469 0-8.550781 0-223.265625 0-235.269531zm-20 140h-128c-33.511719-31.910156-97.515625-92.871094-104.996094-100h45.429688c21.832031 34.875 43.335937 63.691406 43.558594 63.992188 1.890624 2.523437 4.855468 4.007812 8.007812 4.007812s6.117188-1.484375 8.007812-4.007812c.222657-.300782 21.730469-29.117188 43.558594-63.992188h84.433594zm-136-292c44.113281 0 80 35.886719 80 80 0 37.128906-58.570312 122.988281-80 152.988281-21.765625-30.476562-80-116.199219-80-152.988281 0-44.113281 35.886719-80 80-80zm-236 432c0-22.054688 17.945312-40 40-40s40 17.945312 40 40c0 5.523438 4.476562 10 10 10s10-4.476562 10-10v-166.667969l101.5 96.667969-115.5 110h-43.148438c-22.425781 0-42.851562-16.761719-42.851562-40zm222.894531-62.757812c1.984375-1.890626 3.105469-4.507813 3.105469-7.242188s-1.121094-5.355469-3.105469-7.242188l-122.894531-117.042968v-45.714844h10c.683594.652344 118.339844 112.707031 123.105469 117.242188 1.859375 1.769531 4.328125 2.757812 6.894531 2.757812h132v40h-76c-2.652344 0-5.195312 1.054688-7.070312 2.929688l-117.074219 117.070312h-56.855469zm209.105469 102.757812h-231.855469l100-100h71.855469v60c0 5.523438 4.476562 10 10 10s10-4.476562 10-10c0-25.863281 24.21875-45.46875 50.820312-38.597656 16.238282 4.195312 29.179688 19.191406 29.179688 38.597656 0 22.054688-17.945312 40-40 40zm0 0"/><path d="m256 150c27.570312 0 50-22.429688 50-50s-22.429688-50-50-50-50 22.429688-50 50 22.429688 50 50 50zm0-80c16.542969 0 30 13.457031 30 30s-13.457031 30-30 30-30-13.457031-30-30 13.457031-30 30-30zm0 0"/><path d="m10 278c5.519531 0 10-4.480469 10-10s-4.480469-10-10-10-10 4.480469-10 10 4.480469 10 10 10zm0 0"/></svg>
|
|
Before Width: | Height: | Size: 3.8 KiB |
|
@ -0,0 +1,102 @@
|
||||||
|
interface Waypoint {
|
||||||
|
lat: number;
|
||||||
|
lon: number;
|
||||||
|
sym?: string;
|
||||||
|
type?: string;
|
||||||
|
img?: string;
|
||||||
|
name?: string;
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Params {
|
||||||
|
targetId: string;
|
||||||
|
mapType: string;
|
||||||
|
mapData: any[];
|
||||||
|
graphDist: any[];
|
||||||
|
graphEle: any[];
|
||||||
|
graphSpeed: any[];
|
||||||
|
graphHr: any[];
|
||||||
|
graphAtemp: any[];
|
||||||
|
graphCad: any[];
|
||||||
|
graphGrade: any[];
|
||||||
|
waypoints: Waypoint[];
|
||||||
|
unit: string;
|
||||||
|
unitspeed: string;
|
||||||
|
color1: string[];
|
||||||
|
color2: string;
|
||||||
|
color3: string;
|
||||||
|
color4: string;
|
||||||
|
color5: string;
|
||||||
|
color6: string;
|
||||||
|
color7: string;
|
||||||
|
chartFrom1: string;
|
||||||
|
chartTo1: string;
|
||||||
|
chartFrom2: string;
|
||||||
|
chartTo2: string;
|
||||||
|
startIcon: string;
|
||||||
|
waypointIcon: string;
|
||||||
|
endIcon: string;
|
||||||
|
currentIcon: string;
|
||||||
|
zoomOnScrollWheel: string;
|
||||||
|
langs: any;
|
||||||
|
pluginUrl: string;
|
||||||
|
usegpsposition: string;
|
||||||
|
currentpositioncon: string;
|
||||||
|
TFApiKey: string;
|
||||||
|
MapBoxApiKey: string;
|
||||||
|
MapBoxMapType: string;
|
||||||
|
MapBoxMapCustomType: string;
|
||||||
|
MapBox3dTerrain: boolean;
|
||||||
|
MapBoxFog: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface LangTranslation {
|
||||||
|
altitude: string,
|
||||||
|
currentPosition: string,
|
||||||
|
speed: string,
|
||||||
|
grade: string,
|
||||||
|
heartRate: string,
|
||||||
|
atemp: string,
|
||||||
|
cadence: string,
|
||||||
|
goFullScreen: string,
|
||||||
|
exitFullFcreen: string,
|
||||||
|
hideImages: string,
|
||||||
|
showImages: string,
|
||||||
|
backToCenter: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ChartUom {
|
||||||
|
suf: string;
|
||||||
|
dec: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ChartLabels {
|
||||||
|
label_x: ChartUom;
|
||||||
|
label_y: ChartUom;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type LatLng = [number, number];
|
||||||
|
|
||||||
|
interface MapEngine<T> {
|
||||||
|
|
||||||
|
map: T | null;
|
||||||
|
|
||||||
|
Bounds: Array<number[]> | null;
|
||||||
|
|
||||||
|
EventSelectChart: null | Function;
|
||||||
|
|
||||||
|
init(targetElement: HTMLElement, mapType: string, scrollWheelZoom: boolean, ApiKey: string | null | undefined, otherParams: any): void;
|
||||||
|
|
||||||
|
AppPolylines(mapData: Array<[number, number] | null>, colors: string[], currentIcon: string | null, startIcon: string | null, endIcon: string | null): void;
|
||||||
|
|
||||||
|
AddWaypoints(waypoints: any, waypointIcon: string | null): void;
|
||||||
|
|
||||||
|
MoveMarkerToPosition(LatLon: [number, number], updateChart: boolean): void;
|
||||||
|
|
||||||
|
SetCurrentGPSPosition(LatLon: [number, number], currentpositioncon: string, lng: LangTranslation): void;
|
||||||
|
|
||||||
|
AddPhotos(photos: any[]): void;
|
||||||
|
|
||||||
|
CenterMap(): void;
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
export const WPGPXMAPS = {
|
||||||
|
Utils: {
|
||||||
|
DividePolylinesPoints(mapData: any[]): any[] {
|
||||||
|
let lastCut = 0;
|
||||||
|
const result: any[] = [];
|
||||||
|
const _len = mapData.length;
|
||||||
|
|
||||||
|
for (let i = 0; i < _len; i++) {
|
||||||
|
if (mapData[i] === null) {
|
||||||
|
result.push(mapData.slice(lastCut === 0 ? 0 : lastCut + 1, i));
|
||||||
|
lastCut = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((_len - 1) !== lastCut) {
|
||||||
|
result.push(mapData.slice(lastCut));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
GetItemFromArray(arr: Array<[number,number]|null>, index: number): [number,number] | null {
|
||||||
|
try {
|
||||||
|
return arr[index];
|
||||||
|
} catch (e) {
|
||||||
|
return [0, 0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
|
@ -0,0 +1,877 @@
|
||||||
|
/*
|
||||||
|
Plugin Name: WP-GPX-Maps
|
||||||
|
Plugin URI: http://www.devfarm.it/
|
||||||
|
Description: Draws a gpx track with altitude graph
|
||||||
|
Version: 1.6.02
|
||||||
|
Author: Bastianon Massimo
|
||||||
|
Author URI: http://www.devfarm.it/
|
||||||
|
*/
|
||||||
|
|
||||||
|
import './../../css/admin-style.css';
|
||||||
|
import './../../css/bootstrap-table.css';
|
||||||
|
import './../../css/wp-gpx-maps-output.css';
|
||||||
|
|
||||||
|
import { ActiveElement, Chart, ScaleOptions, LinearScale, ChartConfiguration, registerables, ActiveDataPoint } from 'chart.js'
|
||||||
|
import { WPGPXMAPS } from './Utils/Utils';
|
||||||
|
|
||||||
|
import { LeafletMapEngine } from './maps-engines/LeafletMapEngine';
|
||||||
|
|
||||||
|
import { MapBoxMapEngine } from './maps-engines/MapBoxMapEngine';
|
||||||
|
|
||||||
|
const wpgpxmaps_FEET_MILES = "1";
|
||||||
|
const wpgpxmaps_METERS_KILOMETERS = "2";
|
||||||
|
const wpgpxmaps_METERS_NAUTICALMILES = "3";
|
||||||
|
const wpgpxmaps_METER_MILES = "4";
|
||||||
|
const wpgpxmaps_FEET_NAUTICALMILES = "5";
|
||||||
|
const wpgpxmaps_MINUTES_PER_100METERS = "6";
|
||||||
|
const wpgpxmaps_KNOTS = "5";
|
||||||
|
const wpgpxmaps_MINUTES_PER_MILES = "4";
|
||||||
|
const wpgpxmaps_MINUTES_PER_KM = "3";
|
||||||
|
const wpgpxmaps_MILES_PER_HOURS = "2";
|
||||||
|
const wpgpxmaps_KM_PER_HOURS = "1";
|
||||||
|
|
||||||
|
export class WPGPXMaps {
|
||||||
|
private params: Params;
|
||||||
|
|
||||||
|
public map : MapEngine<any>|null = null;
|
||||||
|
|
||||||
|
public myChart: Chart|null = null;
|
||||||
|
|
||||||
|
constructor(params: Params) {
|
||||||
|
this.params = params;
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
private init() {
|
||||||
|
let {
|
||||||
|
targetId,
|
||||||
|
mapType,
|
||||||
|
mapData,
|
||||||
|
graphDist,
|
||||||
|
graphEle,
|
||||||
|
graphSpeed,
|
||||||
|
graphHr,
|
||||||
|
graphAtemp,
|
||||||
|
graphCad,
|
||||||
|
graphGrade,
|
||||||
|
waypoints,
|
||||||
|
unit,
|
||||||
|
unitspeed,
|
||||||
|
color1,
|
||||||
|
color2,
|
||||||
|
color3,
|
||||||
|
color4,
|
||||||
|
color5,
|
||||||
|
color6,
|
||||||
|
color7,
|
||||||
|
chartFrom1,
|
||||||
|
chartTo1,
|
||||||
|
chartFrom2,
|
||||||
|
chartTo2,
|
||||||
|
startIcon,
|
||||||
|
waypointIcon,
|
||||||
|
endIcon,
|
||||||
|
currentIcon,
|
||||||
|
zoomOnScrollWheel,
|
||||||
|
langs,
|
||||||
|
pluginUrl,
|
||||||
|
usegpsposition,
|
||||||
|
currentpositioncon,
|
||||||
|
TFApiKey,
|
||||||
|
} = this.params;
|
||||||
|
|
||||||
|
var _formats: ChartLabels[] = [];
|
||||||
|
|
||||||
|
/* Unit of measure settings. */
|
||||||
|
var l_s: ChartUom = { suf: '', dec: 0 };
|
||||||
|
var label_x: ChartUom = { suf: '', dec: 0 };
|
||||||
|
var label_y: ChartUom = { suf: '', dec: 0 };
|
||||||
|
var l_grade: ChartUom = { suf: '%', dec: 1 };
|
||||||
|
var l_hr: ChartUom = { suf: '', dec: 0 };
|
||||||
|
var l_cad: ChartUom = { suf: '', dec: 0 };
|
||||||
|
|
||||||
|
var el = document.getElementById('wpgpxmaps_' + targetId);
|
||||||
|
var el_map = document.getElementById('map_' + targetId);
|
||||||
|
var el_chart = document.getElementById('chart_' + targetId);
|
||||||
|
var el_report = document.getElementById('report_' + targetId);
|
||||||
|
var el_osm_credits = document.getElementById('wpgpxmaps_' + targetId + '_osm_footer');
|
||||||
|
|
||||||
|
if (el_map == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let _this = this;
|
||||||
|
|
||||||
|
if (this.params.MapBoxApiKey && this.params.MapBoxApiKey.length>20)
|
||||||
|
{
|
||||||
|
this.map = new MapBoxMapEngine();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.map = new LeafletMapEngine();
|
||||||
|
}
|
||||||
|
|
||||||
|
//map.lng = lng;
|
||||||
|
this.map.init(
|
||||||
|
el_map,
|
||||||
|
mapType,
|
||||||
|
('true' == zoomOnScrollWheel),
|
||||||
|
TFApiKey,
|
||||||
|
this.params
|
||||||
|
);
|
||||||
|
|
||||||
|
this.map.EventSelectChart = function (LatLon: LatLng) {
|
||||||
|
|
||||||
|
if (_this.myChart) {
|
||||||
|
var l1 = LatLon[0];
|
||||||
|
var l2 = LatLon[1];
|
||||||
|
var ci = _this.getClosestIndex(mapData, l1, l2);
|
||||||
|
var activeElements: any[] = [];
|
||||||
|
var seriesLen = (_this.myChart as any)._metasets.length;
|
||||||
|
for (var i = 0; i < seriesLen; i++) {
|
||||||
|
activeElements.push(((_this.myChart as any)._metasets[i] as any).data[ci]);
|
||||||
|
}
|
||||||
|
if (activeElements.length > 0) {
|
||||||
|
|
||||||
|
let _active = _this.myChart.tooltip?.getActiveElements();
|
||||||
|
if (_active == undefined || _active.length == 0) {
|
||||||
|
_this.myChart.tooltip?.setActiveElements([{
|
||||||
|
datasetIndex: 0,
|
||||||
|
index: ci,
|
||||||
|
}], {
|
||||||
|
x: activeElements[0].x,
|
||||||
|
y: activeElements[0].y
|
||||||
|
});
|
||||||
|
}
|
||||||
|
(_this.myChart.tooltip as any).setActiveElements(activeElements);
|
||||||
|
//(_this.myChart.tooltip as any).draw();
|
||||||
|
_this.myChart.draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// var bounds = new google.maps.LatLngBounds();
|
||||||
|
|
||||||
|
if ('true' == usegpsposition) {
|
||||||
|
|
||||||
|
/* Try HTML5 geolocation. */
|
||||||
|
if (navigator.geolocation) {
|
||||||
|
navigator.geolocation.watchPosition(function (position) {
|
||||||
|
var radius = position.coords.accuracy / 2;
|
||||||
|
|
||||||
|
/* User position. */
|
||||||
|
var pos = [position.coords.latitude, position.coords.longitude];
|
||||||
|
|
||||||
|
this.map.SetCurrentGPSPosition([pos[0], pos[1]], currentpositioncon, langs);
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
function (e) {
|
||||||
|
|
||||||
|
// Some errors.
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
enableHighAccuracy: false,
|
||||||
|
timeout: 5000,
|
||||||
|
maximumAge: 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print WayPoints. */
|
||||||
|
if (waypoints != null && waypoints.length > 0) {
|
||||||
|
this.map.AddWaypoints(waypoints, waypointIcon);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print Images. */
|
||||||
|
|
||||||
|
let nggEl = document.getElementById("ngimages_" + targetId);
|
||||||
|
|
||||||
|
nggEl?.setAttribute("style", "display:block;position:absolute;left:-50000px");
|
||||||
|
|
||||||
|
var nggImages = nggEl?.querySelectorAll("span");
|
||||||
|
|
||||||
|
if (nggImages && nggImages.length > 0) {
|
||||||
|
var photos = [];
|
||||||
|
|
||||||
|
for (var i = 0; i < nggImages.length; i++) {
|
||||||
|
|
||||||
|
var ngg_span = nggImages[i];
|
||||||
|
var ngg_span_a = ngg_span.children[0];
|
||||||
|
|
||||||
|
var pos = [
|
||||||
|
Number(ngg_span.getAttribute('lat')),
|
||||||
|
Number(ngg_span.getAttribute('lon'))
|
||||||
|
];
|
||||||
|
|
||||||
|
this.map.Bounds.push(pos);
|
||||||
|
|
||||||
|
photos.push({
|
||||||
|
'lat': pos[0],
|
||||||
|
'lng': pos[1],
|
||||||
|
'name': ngg_span_a.children[0].getAttribute('alt'),
|
||||||
|
'image_id': ngg_span_a.getAttribute('data-image-id'),
|
||||||
|
'url': ngg_span_a.getAttribute('href'),
|
||||||
|
'thumbnail': ngg_span_a.children[0].getAttribute('src')
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (photos.length > 0) {
|
||||||
|
|
||||||
|
this.map.AddPhotos(photos);
|
||||||
|
|
||||||
|
/*
|
||||||
|
var showHideImagesCustomControl = L.Control.extend({
|
||||||
|
|
||||||
|
options: {
|
||||||
|
position: 'topleft'
|
||||||
|
//control position - allowed: 'topleft', 'topright', 'bottomleft', 'bottomright'
|
||||||
|
},
|
||||||
|
|
||||||
|
onAdd: function (map) {
|
||||||
|
|
||||||
|
var container = document.createElement('img');
|
||||||
|
container.class= "leaflet-bar leaflet-control leaflet-control-custom"
|
||||||
|
container.style.backgroundColor = 'white';
|
||||||
|
container.style.width = '30px';
|
||||||
|
container.style.height = '30px';
|
||||||
|
container.src = pluginUrl + "/wp-gpx-maps/img/hideImages.png";
|
||||||
|
container.style.cursor = 'pointer';
|
||||||
|
container.title = lng.hideImages;
|
||||||
|
|
||||||
|
container.onclick = function(){
|
||||||
|
|
||||||
|
var isImagesHidden = (controlUIhi.isImagesHidden == true);
|
||||||
|
var mapDiv = map.getDiv();
|
||||||
|
var center = map.getCenter();
|
||||||
|
|
||||||
|
if (isImagesHidden)
|
||||||
|
{
|
||||||
|
for (var i=0; i<ngImageMarkers.length; i++) {
|
||||||
|
ngImageMarkers[i].setMap(map);
|
||||||
|
}
|
||||||
|
controlUIhi.src = pluginUrl + "/wp-gpx-maps/img/hideImages.png";
|
||||||
|
controlUIhi.title = lng.hideImages;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (var i=0; i<ngImageMarkers.length; i++) {
|
||||||
|
ngImageMarkers[i].setMap(null);
|
||||||
|
}
|
||||||
|
controlUIhi.src = pluginUrl + "/wp-gpx-maps/img/showImages.png";
|
||||||
|
controlUIhi.title = lng.showImages;
|
||||||
|
}
|
||||||
|
controlUIhi.isImagesHidden = !isImagesHidden;
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return container;
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
map.map.addControl(new showHideImagesCustomControl());
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
// Nextgen Pro Lightbox FIX
|
||||||
|
var _xx = jQuery("#ngimages_" + targetId + " .nextgen_pro_lightbox");
|
||||||
|
if (_xx.length > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
var rnd1 = Math.random().toString(36).substring(7);
|
||||||
|
var rnd2 = Math.random().toString(36).substring(7);
|
||||||
|
|
||||||
|
//get first gallery without images
|
||||||
|
for (var _temp in galleries) {
|
||||||
|
var _gal = galleries[_temp];
|
||||||
|
|
||||||
|
if (_gal.source == "random_images" && _gal.wpgpxmaps != true )
|
||||||
|
{
|
||||||
|
|
||||||
|
_gal.source == "galleries";
|
||||||
|
_gal.wpgpxmaps = true;
|
||||||
|
_transient_id = _temp.replace("gallery_","")
|
||||||
|
_gal["entity_ids"] = [];
|
||||||
|
_gal["image_ids"] = [];
|
||||||
|
_gal["gallery_ids"] = [96];
|
||||||
|
for (var i=0;i<_xx.length;i++)
|
||||||
|
{
|
||||||
|
var __xx = jQuery(_xx[i]);
|
||||||
|
__xx.attr("data-nplmodal-gallery-id", _transient_id);
|
||||||
|
_gal["image_ids"].push(__xx.attr("data-image-id"));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Print Track. */
|
||||||
|
if (mapData) {
|
||||||
|
this.map.AppPolylines(mapData, color1, currentIcon, startIcon, endIcon);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
map.setCenter(bounds.getCenter());
|
||||||
|
map.fitBounds(bounds);
|
||||||
|
*/
|
||||||
|
|
||||||
|
var contextMap = this.map;
|
||||||
|
|
||||||
|
// Fix post tabs. */
|
||||||
|
let _tab: HTMLElement | null = null;
|
||||||
|
let _p = el?.parentElement;
|
||||||
|
while (_p != null) {
|
||||||
|
if (_p.classList.contains("wordpress-post-tabs") && _p.classList.contains("tab-pane")) {
|
||||||
|
_tab = _p;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
_p = _p.parentElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_tab) {
|
||||||
|
var tabResized = false;
|
||||||
|
|
||||||
|
var FixMapSize = function (e: any) {
|
||||||
|
setTimeout(function (e: any) {
|
||||||
|
|
||||||
|
// google.maps.event.trigger(map, 'resize');
|
||||||
|
contextMap.map?.invalidateSize();
|
||||||
|
contextMap.CenterMap();
|
||||||
|
tabResized = true;
|
||||||
|
}, 300);
|
||||||
|
};
|
||||||
|
|
||||||
|
document.querySelector(".wpsm_nav-tabs a")?.addEventListener("click", FixMapSize, false);
|
||||||
|
_tab.querySelector("div > ul > li > a")?.addEventListener("click", FixMapSize, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
var graphh = el_chart?.style.height;
|
||||||
|
|
||||||
|
if (graphDist && (graphEle || graphSpeed || graphHr || graphAtemp || graphCad) && graphh != '0px') {
|
||||||
|
|
||||||
|
var valLen = graphDist.length;
|
||||||
|
|
||||||
|
if (wpgpxmaps_FEET_MILES == unit) {
|
||||||
|
|
||||||
|
/* feet / miles */
|
||||||
|
label_x = { suf: 'mi', dec: 1 };
|
||||||
|
label_y = { suf: 'ft', dec: 0 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_METERS_KILOMETERS == unit) {
|
||||||
|
|
||||||
|
/* meters / kilometers */
|
||||||
|
label_x = { suf: 'km', dec: 1 };
|
||||||
|
label_y = { suf: 'm', dec: 2 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_METERS_NAUTICALMILES == unit) {
|
||||||
|
|
||||||
|
/* meters / nautical miles */
|
||||||
|
label_x = { suf: 'NM', dec: 1 };
|
||||||
|
label_y = { suf: 'm', dec: 0 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_METER_MILES == unit) {
|
||||||
|
|
||||||
|
/* meters / miles */
|
||||||
|
label_x = { suf: 'mi', dec: 1 };
|
||||||
|
label_y = { suf: 'm', dec: 0 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_FEET_NAUTICALMILES == unit) {
|
||||||
|
|
||||||
|
/* feet / nautical miles */
|
||||||
|
label_x = { suf: 'NM', dec: 1 };
|
||||||
|
label_y = { suf: 'ft', dec: 0 };
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/* meters / meters */
|
||||||
|
label_x = { suf: 'm', dec: 0 };
|
||||||
|
label_y = { suf: 'm', dec: 0 };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var nn = 1111.1;
|
||||||
|
var _nn = nn.toLocaleString();
|
||||||
|
var _nnLen = _nn.length;
|
||||||
|
var decPoint = _nn.substring(_nnLen - 2, _nnLen - 1);
|
||||||
|
var thousandsSep = _nn.substring(1, 2);
|
||||||
|
|
||||||
|
if ('1' == decPoint)
|
||||||
|
decPoint = '.';
|
||||||
|
|
||||||
|
if ('1' == thousandsSep)
|
||||||
|
thousandsSep = '';
|
||||||
|
|
||||||
|
// trik per caricare tutti imoduli di chart.js
|
||||||
|
Chart.register(...registerables);
|
||||||
|
|
||||||
|
/* Define the options. */
|
||||||
|
var hoptions: ChartConfiguration = {
|
||||||
|
type: 'line',
|
||||||
|
data: {
|
||||||
|
datasets: []
|
||||||
|
},
|
||||||
|
//borderWidth: 1,
|
||||||
|
options: {
|
||||||
|
animation: {
|
||||||
|
|
||||||
|
// duration: 0,
|
||||||
|
// general animation time
|
||||||
|
},
|
||||||
|
hover: {
|
||||||
|
|
||||||
|
// animationDuration: 0,
|
||||||
|
// duration of animations when hovering an item
|
||||||
|
},
|
||||||
|
interaction: {
|
||||||
|
intersect: false,
|
||||||
|
mode: 'index',
|
||||||
|
},
|
||||||
|
// responsiveAnimationDuration: 0,
|
||||||
|
// animation duration after a resize
|
||||||
|
//customLine: {
|
||||||
|
// color: 'gray'
|
||||||
|
//},
|
||||||
|
scales: {
|
||||||
|
xAxe: {
|
||||||
|
type: 'linear',
|
||||||
|
min: 0,
|
||||||
|
max: graphDist[graphDist.length - 1],
|
||||||
|
ticks: {
|
||||||
|
|
||||||
|
/* Include a dollar sign in the ticks. */
|
||||||
|
callback: function (value, index, values) {
|
||||||
|
return parseFloat(value + "").toFixed(label_x.dec) + label_x.suf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
|
||||||
|
tooltip: {
|
||||||
|
position: 'average',
|
||||||
|
mode: 'index',
|
||||||
|
intersect: false,
|
||||||
|
callbacks: {
|
||||||
|
title: function (tooltipItems) {
|
||||||
|
|
||||||
|
/* Return value for title: */
|
||||||
|
var label_x = _formats[0].label_x;
|
||||||
|
var x_pos = tooltipItems[0].element.x as number;
|
||||||
|
var x_dec = label_x.dec;
|
||||||
|
var x_unit = label_x.suf;
|
||||||
|
return x_pos.toFixed(x_dec) + x_unit;
|
||||||
|
},
|
||||||
|
label: function (tooltipItem) {
|
||||||
|
|
||||||
|
/* Format list values: */
|
||||||
|
var label = tooltipItem.label || '';
|
||||||
|
var label_y = _formats[tooltipItem.datasetIndex].label_y;
|
||||||
|
var y_dec = label_y.dec;
|
||||||
|
var y_unit = label_y.suf;
|
||||||
|
var y_pos = tooltipItem.element.y as number;
|
||||||
|
if (label) {
|
||||||
|
label += ': ';
|
||||||
|
}
|
||||||
|
label += y_pos.toFixed(y_dec) + y_unit;
|
||||||
|
return label;
|
||||||
|
},
|
||||||
|
footer: function (tooltipItem: any) {
|
||||||
|
|
||||||
|
/* Move the point in map. */
|
||||||
|
var i = tooltipItem[0].dataIndex;
|
||||||
|
var point = WPGPXMAPS.Utils.GetItemFromArray(mapData, i);
|
||||||
|
if (point)
|
||||||
|
contextMap.MoveMarkerToPosition(point, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
decimation: {
|
||||||
|
beforeEvent: function (chart, args, options) {
|
||||||
|
if ((args.event.type === 'mousemove' && args.event.x)
|
||||||
|
&& (args.event.x >= chart.chartArea.left)
|
||||||
|
&& (args.event.x <= chart.chartArea.right)
|
||||||
|
) {
|
||||||
|
chart.options.customLine.x = args.event.x;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
afterDraw: function (chart, args, opt) {
|
||||||
|
var ctx = chart.ctx;
|
||||||
|
var chartArea = chart.chartArea;
|
||||||
|
var x = chart.options.customLine.x;
|
||||||
|
if (!isNaN(x)) {
|
||||||
|
ctx.save();
|
||||||
|
ctx.strokeStyle = chart.options.customLine.color;
|
||||||
|
ctx.moveTo(chart.options.customLine.x, chartArea.bottom);
|
||||||
|
ctx.lineTo(chart.options.customLine.x, chartArea.top);
|
||||||
|
ctx.stroke();
|
||||||
|
ctx.restore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
//labels: graphDist
|
||||||
|
};
|
||||||
|
|
||||||
|
let yAxeCount = 1;
|
||||||
|
|
||||||
|
if (graphEle && graphEle.length > 0) {
|
||||||
|
var myData = this.mergeArrayForChart(graphDist, graphEle);
|
||||||
|
|
||||||
|
let _min: number, _max: number
|
||||||
|
|
||||||
|
if (chartFrom1 != '') {
|
||||||
|
|
||||||
|
_min = parseFloat(chartFrom1);
|
||||||
|
//yaxe.startOnTick = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
_min = myData.Min;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chartTo1 != '') {
|
||||||
|
|
||||||
|
_max = parseFloat(chartTo1);
|
||||||
|
//yaxe.endOnTick = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
_max = myData.Max;
|
||||||
|
}
|
||||||
|
var _id = 'yaxis' + yAxeCount++;
|
||||||
|
|
||||||
|
var yaxe: ScaleOptions = {
|
||||||
|
type: 'linear',
|
||||||
|
max: _max,
|
||||||
|
min: _min,
|
||||||
|
ticks: {
|
||||||
|
callback(tickValue, index, ticks) {
|
||||||
|
return parseFloat(tickValue + "").toFixed(label_y.dec) + label_y.suf;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
(hoptions.options?.scales as any)[_id] = yaxe;
|
||||||
|
_formats.push({ "label_x": label_x, "label_y": label_y });
|
||||||
|
hoptions.data.datasets.push(this.wpgpxmapsGetDataset(langs.altitude, myData.Items, color2, _id));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (graphSpeed && graphSpeed.length > 0) {
|
||||||
|
|
||||||
|
|
||||||
|
if (wpgpxmaps_MINUTES_PER_100METERS == unitspeed) {
|
||||||
|
|
||||||
|
/* min/100 meters */
|
||||||
|
l_s = { suf: 'min/100m', dec: 2 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_KNOTS == unitspeed) {
|
||||||
|
|
||||||
|
/* knots */
|
||||||
|
l_s = { suf: 'knots', dec: 2 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_MINUTES_PER_MILES == unitspeed) {
|
||||||
|
|
||||||
|
/* min/miles */
|
||||||
|
l_s = { suf: 'min/mi', dec: 2 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_MINUTES_PER_KM == unitspeed) {
|
||||||
|
|
||||||
|
/* min/km */
|
||||||
|
l_s = { suf: 'min/km', dec: 2 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_MILES_PER_HOURS == unitspeed) {
|
||||||
|
|
||||||
|
/* miles/h */
|
||||||
|
l_s = { suf: 'mi/h', dec: 0 };
|
||||||
|
|
||||||
|
} else if (wpgpxmaps_KM_PER_HOURS == unitspeed) {
|
||||||
|
|
||||||
|
/* km/h */
|
||||||
|
l_s = { suf: 'km/h', dec: 0 };
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/* dafault m/s */
|
||||||
|
l_s = { suf: 'm/s', dec: 0 };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var myData = this.mergeArrayForChart(graphDist, graphSpeed);
|
||||||
|
let yaxe: ScaleOptions = {
|
||||||
|
type: 'linear',
|
||||||
|
ticks: {
|
||||||
|
|
||||||
|
/* Include a dollar sign in the ticks. */
|
||||||
|
callback(tickValue, index, ticks) {
|
||||||
|
return parseFloat(tickValue + "").toFixed(l_s.dec) + l_s.suf;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
position: 'right',
|
||||||
|
//scalePositionLeft: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (chartFrom2 != '') {
|
||||||
|
|
||||||
|
yaxe.min = parseFloat(chartFrom2);
|
||||||
|
//yaxe.startOnTick = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
yaxe.min = myData.Min;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chartTo2 != '') {
|
||||||
|
|
||||||
|
yaxe.max = parseFloat(chartTo2);
|
||||||
|
//yaxe.endOnTick = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
yaxe.max = myData.Max;
|
||||||
|
}
|
||||||
|
|
||||||
|
_formats.push( { label_x: _formats[0].label_x , label_y : l_s});
|
||||||
|
|
||||||
|
var _id = 'yaxis' + yAxeCount++;
|
||||||
|
(hoptions.options?.scales as any)[_id] = yaxe;
|
||||||
|
|
||||||
|
hoptions.data.datasets.push(this.wpgpxmapsGetDataset(langs.speed, myData.Items, color3, _id));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (graphHr && graphHr.length > 0) {
|
||||||
|
var myData = this.mergeArrayForChart(graphDist, graphHr);
|
||||||
|
var yaxe: ScaleOptions = {
|
||||||
|
type: 'linear',
|
||||||
|
ticks: {
|
||||||
|
|
||||||
|
/* Include a dollar sign in the ticks. */
|
||||||
|
callback(tickValue, index, ticks) {
|
||||||
|
return parseFloat(tickValue + "").toFixed(l_hr.dec) + l_hr.suf;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
position: 'right',
|
||||||
|
//scalePositionLeft: false,
|
||||||
|
};
|
||||||
|
var _id = 'yaxis' + yAxeCount++;
|
||||||
|
(hoptions.options?.scales as any)[_id] = yaxe;
|
||||||
|
hoptions.data.datasets.push(this.wpgpxmapsGetDataset(langs.heartRate, myData.Items, color4, _id));
|
||||||
|
_formats.push( { label_x: _formats[0].label_x , label_y : l_hr});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (graphAtemp && graphAtemp.length > 0) {
|
||||||
|
var myData = this.mergeArrayForChart(graphDist, graphAtemp);
|
||||||
|
var yaxe: ScaleOptions = {
|
||||||
|
type: 'linear',
|
||||||
|
ticks: {
|
||||||
|
|
||||||
|
/* Include a dollar sign in the ticks. */
|
||||||
|
callback(tickValue, index, ticks) {
|
||||||
|
return parseFloat(tickValue + "").toFixed(1) + "°C";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
position: 'right',
|
||||||
|
//scalePositionLeft: false,
|
||||||
|
};
|
||||||
|
var _id = 'yaxis' + yAxeCount++;
|
||||||
|
(hoptions.options?.scales as any)[_id] = yaxe;
|
||||||
|
hoptions.data.datasets.push(this.wpgpxmapsGetDataset(langs.atemp, myData.Items, color7, _id));
|
||||||
|
_formats.push( { label_x: _formats[0].label_x , label_y : { suf: '°C', dec: 1 }});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (graphCad && graphCad.length > 0) {
|
||||||
|
|
||||||
|
var myData = this.mergeArrayForChart(graphDist, graphCad, true);
|
||||||
|
var yaxe: ScaleOptions = {
|
||||||
|
type: 'linear',
|
||||||
|
ticks: {
|
||||||
|
|
||||||
|
// Include a dollar sign in the ticks.
|
||||||
|
callback(tickValue, index, ticks) {
|
||||||
|
return parseFloat(tickValue + "").toFixed(l_cad.dec) + l_cad.suf;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
position: 'right',
|
||||||
|
//scalePositionLeft: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
var _id = 'yaxis' + yAxeCount++;
|
||||||
|
(hoptions.options?.scales as any)[_id] = yaxe;
|
||||||
|
hoptions.data.datasets.push(this.wpgpxmapsGetDataset(langs.cadence, myData.Items, color5, _id));
|
||||||
|
_formats.push( { label_x: _formats[0].label_x , label_y : l_cad});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (graphGrade && graphGrade.length > 0) {
|
||||||
|
|
||||||
|
var myData = this.mergeArrayForChart(graphDist, graphGrade);
|
||||||
|
var yaxe : ScaleOptions = {
|
||||||
|
type: 'linear',
|
||||||
|
ticks: {
|
||||||
|
|
||||||
|
// Include a dollar sign in the ticks.
|
||||||
|
callback: function (value, index, values) {
|
||||||
|
return parseFloat(value+"").toFixed(l_grade.dec) + l_grade.suf;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
position: 'right',
|
||||||
|
//scalePositionLeft: false,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
_formats.push( { label_x: _formats[0].label_x , label_y : l_grade});
|
||||||
|
|
||||||
|
var _id = 'yaxis' + yAxeCount++;
|
||||||
|
(hoptions.options?.scales as any)[_id] = yaxe;
|
||||||
|
hoptions.data.datasets.push(this.wpgpxmapsGetDataset(langs.grade, myData.Items, color6, _id));
|
||||||
|
}
|
||||||
|
|
||||||
|
var ctx = (document.getElementById('myChart_' + targetId) as HTMLCanvasElement)?.getContext('2d');
|
||||||
|
if (ctx)
|
||||||
|
this.myChart = new Chart(ctx, hoptions);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
el_chart?.style.setProperty("display", "none");
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
private mergeArrayForChart(distArr: any[], dataArr: any[], setZerosAsNull?: boolean) {
|
||||||
|
const l = distArr.length;
|
||||||
|
const items = new Array(l);
|
||||||
|
let min = 10000;
|
||||||
|
let max = -10000;
|
||||||
|
|
||||||
|
for (let i = 0; i < l; i++) {
|
||||||
|
if (distArr[i] != null) {
|
||||||
|
let _item = dataArr[i];
|
||||||
|
|
||||||
|
if (setZerosAsNull === true && _item === 0) {
|
||||||
|
_item = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
items[i] = {
|
||||||
|
x: distArr[i],
|
||||||
|
y: _item
|
||||||
|
};
|
||||||
|
if (_item > max) max = _item;
|
||||||
|
if (_item < min) min = _item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
Items: items,
|
||||||
|
Min: min,
|
||||||
|
Max: max
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private wpgpxmapsGetDataset(name: string, data: any[], color: string, id: string) {
|
||||||
|
return {
|
||||||
|
label: name,
|
||||||
|
data: data,
|
||||||
|
borderColor: color,
|
||||||
|
backgroundColor: this.hexToRgbA(color, 0.3),
|
||||||
|
pointRadius: 0,
|
||||||
|
borderWidth: 1,
|
||||||
|
pointHoverRadius: 1,
|
||||||
|
yAxisID: id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private hexToRgbA(hex: string, a: number) {
|
||||||
|
let c: any;
|
||||||
|
if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {
|
||||||
|
c = hex.substring(1).split('');
|
||||||
|
if (c.length == 3) {
|
||||||
|
c = [c[0], c[0], c[1], c[1], c[2], c[2]];
|
||||||
|
}
|
||||||
|
c = '0x' + c.join('');
|
||||||
|
return 'rgba(' + [(c >> 16) & 255, (c >> 8) & 255, c & 255].join(',') + ',' + a + ')';
|
||||||
|
}
|
||||||
|
throw new Error('Bad Hex');
|
||||||
|
}
|
||||||
|
|
||||||
|
private getItemFromArray(arr: any[], index: number) {
|
||||||
|
try {
|
||||||
|
return arr[index];
|
||||||
|
} catch (e) {
|
||||||
|
return [0, 0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private getClosestIndex(points: any[], lat: number, lon: number) {
|
||||||
|
let dd = 10000;
|
||||||
|
let ii = 0;
|
||||||
|
for (let i = 0; i < points.length; i++) {
|
||||||
|
if (points[i] === null) continue;
|
||||||
|
|
||||||
|
const d = this.wpgpxmapsDist(points[i][0], points[i][1], lat, lon);
|
||||||
|
if (d < dd) {
|
||||||
|
ii = i;
|
||||||
|
dd = d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ii;
|
||||||
|
}
|
||||||
|
|
||||||
|
private getClosestImage(lat: number, lon: number, targetId: string) {
|
||||||
|
let dd = 10000;
|
||||||
|
let img;
|
||||||
|
const divImages = document.getElementById("ngimages_" + targetId);
|
||||||
|
if (divImages == null)
|
||||||
|
return;
|
||||||
|
const img_spans = divImages.getElementsByTagName("span");
|
||||||
|
for (let i = 0; i < img_spans.length; i++) {
|
||||||
|
let imageLat = img_spans[i].getAttribute('lat');
|
||||||
|
let imageLon = img_spans[i].getAttribute('lon');
|
||||||
|
|
||||||
|
if (imageLat == null || imageLon == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
imageLat = imageLat.replace(",", ".");
|
||||||
|
imageLon = imageLon.replace(",", ".");
|
||||||
|
|
||||||
|
const d = this.wpgpxmapsDist(parseFloat(imageLat), parseFloat(imageLon), lat, lon);
|
||||||
|
if (d < dd) {
|
||||||
|
img = img_spans[i];
|
||||||
|
dd = d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
private isNumeric(input: string) {
|
||||||
|
const RE = /^-{0,1}\d*\.{0,1}\d+$/;
|
||||||
|
return RE.test(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
private wpgpxmapsDist(lat1: number, lon1: number, lat2: number, lon2: number) {
|
||||||
|
const dLat = (lat2 - lat1);
|
||||||
|
const dLon = (lon2 - lon1);
|
||||||
|
return Math.sqrt(dLat * dLat + dLon * dLon);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,601 @@
|
||||||
|
import L, { Layer, Map, Marker, Polyline, Polygon } from 'leaflet';
|
||||||
|
import 'leaflet.fullscreen/Control.FullScreen.js';
|
||||||
|
import 'leaflet.fullscreen';
|
||||||
|
import 'leaflet.markercluster';
|
||||||
|
import { WPGPXMAPS } from '../Utils/Utils';
|
||||||
|
|
||||||
|
import 'leaflet.markercluster/dist/MarkerCluster.css';
|
||||||
|
import 'leaflet/dist/leaflet.css';
|
||||||
|
import 'leaflet.fullscreen/Control.FullScreen.css';
|
||||||
|
|
||||||
|
class ClusterPhotos {
|
||||||
|
|
||||||
|
map: Map | null = null;
|
||||||
|
|
||||||
|
shownLayer: Layer | null = null;
|
||||||
|
polygon: Polygon | null = null;
|
||||||
|
markers: any | null = null;
|
||||||
|
|
||||||
|
options: {
|
||||||
|
icon: {
|
||||||
|
iconSize: [40, 40],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
constructor(map: Map) {
|
||||||
|
|
||||||
|
this.map = map;
|
||||||
|
|
||||||
|
//Custom radius and icon create function
|
||||||
|
this.markers = (L as any).markerClusterGroup({
|
||||||
|
maxClusterRadius: 120,
|
||||||
|
iconCreateFunction: function (cluster) {
|
||||||
|
return new L.DivIcon(
|
||||||
|
L.extend(
|
||||||
|
{
|
||||||
|
className: "leaflet-marker-photo",
|
||||||
|
html:
|
||||||
|
'<div style="background-image: url(' +
|
||||||
|
cluster.getAllChildMarkers()[0].photo.thumbnail +
|
||||||
|
');"></div><b>' +
|
||||||
|
cluster.getChildCount() +
|
||||||
|
"</b>",
|
||||||
|
},
|
||||||
|
this.icon
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
//Disable all of the defaults:
|
||||||
|
spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false
|
||||||
|
});
|
||||||
|
|
||||||
|
this.markers.on('click', function (evt: any) {
|
||||||
|
var photo = evt.layer.photo;
|
||||||
|
var template = '<img src="{url}" /></a><p>{name}</p>';
|
||||||
|
evt.layer.bindPopup(L.Util.template(template, photo), {
|
||||||
|
minWidth: 'auto'
|
||||||
|
}).openPopup();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.markers.on('clustermouseover', function (a) {
|
||||||
|
this.removePolygon();
|
||||||
|
|
||||||
|
a.layer.setOpacity(0.2);
|
||||||
|
this.shownLayer = a.layer;
|
||||||
|
this.polygon = L.polygon(a.layer.getConvexHull());
|
||||||
|
this.map.addLayer(this.polygon);
|
||||||
|
});
|
||||||
|
this.markers.on('clustermouseout', this.removePolygon);
|
||||||
|
this.map.on('zoomend', this.removePolygon);
|
||||||
|
|
||||||
|
this.map.addLayer(this.markers);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
populate(images: any[]) {
|
||||||
|
|
||||||
|
for (const photo of images) {
|
||||||
|
|
||||||
|
var m = L.marker(L.latLng(photo.lat, photo.lng), {
|
||||||
|
icon: L.divIcon(
|
||||||
|
L.extend(
|
||||||
|
{
|
||||||
|
html:
|
||||||
|
'<div style="background-image: url(' +
|
||||||
|
photo.thumbnail +
|
||||||
|
');"></div>',
|
||||||
|
className: "leaflet-marker-photo",
|
||||||
|
},
|
||||||
|
photo,
|
||||||
|
{
|
||||||
|
iconSize: [40, 40],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
),
|
||||||
|
title: photo.caption || "",
|
||||||
|
});
|
||||||
|
this.markers.addLayer(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private removePolygon() {
|
||||||
|
if (this.shownLayer) {
|
||||||
|
(this.shownLayer as any).setOpacity(1);
|
||||||
|
this.shownLayer = null;
|
||||||
|
}
|
||||||
|
if (this.polygon) {
|
||||||
|
this.map.removeLayer(this.polygon);
|
||||||
|
this.polygon = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export class LeafletMapEngine implements MapEngine<Map> {
|
||||||
|
|
||||||
|
Bounds: Array<number[]> = [];
|
||||||
|
lng: LangTranslation | null = null;
|
||||||
|
map: Map | null = null;
|
||||||
|
EventSelectChart: null | Function = null;
|
||||||
|
Polylines: Array<Polyline> = [];
|
||||||
|
CurrentPositionMarker: Marker | null = null;
|
||||||
|
CurrentGPSPositionMarker: Marker | null = null;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
|
||||||
|
init(targetElement: HTMLElement, mapType: string, scrollWheelZoom: boolean, ThunderforestApiKey: string | null | undefined, otherParams: any): void {
|
||||||
|
|
||||||
|
this.map = L.map(targetElement,
|
||||||
|
{
|
||||||
|
scrollWheelZoom: scrollWheelZoom
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// create fullscreen control.
|
||||||
|
var fsControl = new (L as any).Control.FullScreen();
|
||||||
|
|
||||||
|
// Add fullscreen control to the map.
|
||||||
|
this.map.addControl(fsControl);
|
||||||
|
|
||||||
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
|
attribution: 'Data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
|
}).addTo(this.map);
|
||||||
|
|
||||||
|
var hasThunderforestApiKey = (ThunderforestApiKey + '').length > 0;
|
||||||
|
|
||||||
|
var baseMaps: any = {};
|
||||||
|
|
||||||
|
var overlayMaps = {};
|
||||||
|
|
||||||
|
var defaultMpaLayer = null;
|
||||||
|
|
||||||
|
if (hasThunderforestApiKey) {
|
||||||
|
|
||||||
|
/* Map type: Thunderforest - OpenCycleMap with API key */
|
||||||
|
baseMaps['Thunderforest - Cycle'] = L.tileLayer('https://a.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=' + ThunderforestApiKey, {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://www.thunderforest.com/">Thunderforest</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/* Map type: Open Cycle Map - Cycle */
|
||||||
|
baseMaps['Open Cycle Map'] = L.tileLayer('http://a.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png', {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://www.thunderforest.com/">Thunderforest</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map type: Thunderforest - Outdoors with API key */
|
||||||
|
baseMaps['Thunderforest - Outdoors'] = L.tileLayer('https://a.tile.thunderforest.com/outddors/{z}/{x}/{y}.png?apikey=' + ThunderforestApiKey, {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://www.thunderforest.com/">Thunderforest</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Map type: Thunderforest - Transport with API key */
|
||||||
|
baseMaps['Thunderforest - Transport'] = L.tileLayer('https://a.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=' + ThunderforestApiKey, {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://www.thunderforest.com/">Thunderforest</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Map type: Thunderforest - Landscape with API key */
|
||||||
|
baseMaps['Thunderforest - Landscape'] = L.tileLayer('https://a.tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=' + ThunderforestApiKey, {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://www.thunderforest.com/">Thunderforest</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Map type: Open Street Map */
|
||||||
|
baseMaps['Open Street Map'] = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
///* Map type: MapToolKit - Terrain */
|
||||||
|
//baseMaps['MapToolKit - Terrain'] = L.tileLayer( 'https://tile2.maptoolkit.net/terrain/{z}/{x}/{y}.png', {
|
||||||
|
// maxZoom: 18,
|
||||||
|
// attribution: 'Maps © <a href="https://www.maptoolkit.net/">Maptoolkit</a> contributors, ' +
|
||||||
|
// '<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
// 'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
//});
|
||||||
|
|
||||||
|
/* Map type: Open Street Map - Humanitarian Map Style */
|
||||||
|
baseMaps['Humanitarian Map Style'] = L.tileLayer('https://a.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
Map type: Open Ski Map
|
||||||
|
baseMaps['Open Ski Map'] = L.tileLayer( 'http://tiles.skimap.org/openskimap/{z}/{x}/{y}.png', {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Map type: Hike & Bike */
|
||||||
|
baseMaps['Hike & Bike'] = L.tileLayer('http://toolserver.org/tiles/hikebike/{z}/{x}/{y}.png', {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://hikebikemap.org/">Hike & Bike Map</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Map type: Open Sea Map */
|
||||||
|
baseMaps['Open Sea Map'] = L.tileLayer('http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png', {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: 'Maps © <a href="https://www.openseamap.org/">OpenSeaMap</a> contributors, ' +
|
||||||
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
baseMaps['GSI Map (Japan)'] = L.tileLayer('https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png', {
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: '© <a href="https://maps.gsi.go.jp/development/ichiran.html" target="_blank">国土地理院</a>, ' +
|
||||||
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'
|
||||||
|
});
|
||||||
|
|
||||||
|
switch (mapType) {
|
||||||
|
|
||||||
|
/* Map type: Open Street Map */
|
||||||
|
case 'OSM1': {
|
||||||
|
baseMaps['Open Street Map'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map type: Thunderforest - Open Cycle Maps with API key */
|
||||||
|
case 'OSM2': {
|
||||||
|
baseMaps['Thunderforest - Cycle'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map type: Thunderforest - Outdoors with API key */
|
||||||
|
case 'OSM3': {
|
||||||
|
baseMaps['Thunderforest - Outdoors'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map type: Thunderforest - Landscape with API key */
|
||||||
|
case 'OSM4': {
|
||||||
|
baseMaps['Thunderforest - Transport'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map type: Thunderforest - Landscape with API key */
|
||||||
|
case 'OSM5': {
|
||||||
|
baseMaps['Thunderforest - Landscape'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
///* Map type: MapToolKit - Terrain */
|
||||||
|
//case 'OSM6': {
|
||||||
|
// baseMaps['MapToolKit - Terrain'].addTo( this.map );
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
|
|
||||||
|
/* Map type: Open Street Map - Humanitarian Map Style*/
|
||||||
|
case 'OSM7': {
|
||||||
|
baseMaps['Humanitarian Map Style'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Map type: Open Ski Map
|
||||||
|
case 'OSM8': {
|
||||||
|
baseMaps['Open Ski Map'].addTo( this.map );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Map type: Hike & Bike */
|
||||||
|
case 'OSM9': {
|
||||||
|
baseMaps['Hike & Bike'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map type: Open Sea Map */
|
||||||
|
case 'OSM10': {
|
||||||
|
baseMaps['Open Sea Map'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'OSM11': {
|
||||||
|
baseMaps['GSI Map (Japan)'].addTo(this.map);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Map type: Open Street Map */
|
||||||
|
default: {
|
||||||
|
baseMaps['Open Street Map'].addTo(this.map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
L.control.layers(baseMaps, overlayMaps).addTo(this.map);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
AppPolylines(mapData: Array<[number, number] | null>, colors: string[], currentIcon: string | null, startIcon: string | null, endIcon: string | null): void {
|
||||||
|
|
||||||
|
if (null == this.map) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var first = WPGPXMAPS.Utils.GetItemFromArray(mapData, 0);
|
||||||
|
|
||||||
|
if (null == first) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('' == currentIcon || null == currentIcon) {
|
||||||
|
currentIcon = 'https://maps.google.com/mapfiles/kml/pal4/icon25.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
var CurrentPositionMarker = L.marker(L.latLng(first), {
|
||||||
|
icon: L.icon({
|
||||||
|
iconUrl: currentIcon,
|
||||||
|
iconSize: [32, 32], // Size of the icon.
|
||||||
|
iconAnchor: [16, 16] // Point of the icon which will correspond to marker's location.
|
||||||
|
}),
|
||||||
|
title: this.lng?.currentPosition
|
||||||
|
|
||||||
|
});
|
||||||
|
CurrentPositionMarker.addTo(this.map);
|
||||||
|
|
||||||
|
this.CurrentPositionMarker = CurrentPositionMarker;
|
||||||
|
|
||||||
|
var pointsArray = WPGPXMAPS.Utils.DividePolylinesPoints(mapData);
|
||||||
|
|
||||||
|
var lng = this.lng;
|
||||||
|
var EventSelectChart = this.EventSelectChart;
|
||||||
|
|
||||||
|
this.Bounds = mapData.filter(o => o != null);
|
||||||
|
|
||||||
|
this.CenterMap();
|
||||||
|
|
||||||
|
for (let i = 0; i < pointsArray.length; i++) {
|
||||||
|
let color = '';
|
||||||
|
if (i < colors.length) {
|
||||||
|
color = colors[i];
|
||||||
|
} else {
|
||||||
|
color = colors[colors.length - 1];
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let polyline = L.polyline(pointsArray[i], { color: color }).addTo(this.map);
|
||||||
|
this.Polylines.push(polyline);
|
||||||
|
|
||||||
|
let context = this;
|
||||||
|
|
||||||
|
this.Polylines[i].on('mousemove', function (e: any) {
|
||||||
|
context.MoveMarkerToPosition([e.latlng.lat, e.latlng.lng], true);
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (startIcon != '') {
|
||||||
|
|
||||||
|
let ll = mapData[0];
|
||||||
|
|
||||||
|
if (ll != null) {
|
||||||
|
|
||||||
|
let startMarker = L.marker(L.latLng(ll), {
|
||||||
|
icon: L.icon({
|
||||||
|
iconUrl: startIcon + "",
|
||||||
|
iconSize: [32, 32], // Size of the icon.
|
||||||
|
iconAnchor: [16, 16] // Point of the icon which will correspond to marker's location.
|
||||||
|
}),
|
||||||
|
title: 'Start'
|
||||||
|
});
|
||||||
|
|
||||||
|
startMarker.addTo(this.map);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (endIcon != '' && mapData[mapData.length - 1] != null) {
|
||||||
|
|
||||||
|
let ll = mapData[mapData.length - 1];
|
||||||
|
|
||||||
|
if (ll != null) {
|
||||||
|
|
||||||
|
var endMarker = L.marker(L.latLng(ll), {
|
||||||
|
icon: L.icon({
|
||||||
|
iconUrl: endIcon + "",
|
||||||
|
iconSize: [32, 32], // size of the icon
|
||||||
|
iconAnchor: [16, 16] // point of the icon which will correspond to marker's location
|
||||||
|
}),
|
||||||
|
title: 'End'
|
||||||
|
});
|
||||||
|
endMarker.addTo(this.map);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SetCurrentGPSPosition(pos: [number, number], currentpositioncon: string, lng: LangTranslation): void {
|
||||||
|
|
||||||
|
if (null == this.CurrentGPSPositionMarker) {
|
||||||
|
if ('' == currentpositioncon) {
|
||||||
|
currentpositioncon = 'https://maps.google.com/mapfiles/kml/pal4/icon25.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.map != null) {
|
||||||
|
|
||||||
|
this.CurrentGPSPositionMarker = L.marker(pos, {
|
||||||
|
icon: L.icon({
|
||||||
|
iconUrl: currentpositioncon,
|
||||||
|
iconSize: [32, 32], // Size of the icon.
|
||||||
|
iconAnchor: [16, 16] // Point of the icon which will correspond to marker's location.
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.addTo(this.map)
|
||||||
|
.bindPopup(lng.currentPosition)
|
||||||
|
.openPopup();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.CurrentGPSPositionMarker.setLatLng(pos);
|
||||||
|
}
|
||||||
|
this.Bounds.push(pos);
|
||||||
|
this.CenterMap();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
AddWaypoints(waypoints: any, waypointIcon: string | null): void {
|
||||||
|
|
||||||
|
var icon = L.icon({
|
||||||
|
iconUrl: 'https://maps.google.com/mapfiles/ms/micons/flag.png',
|
||||||
|
iconSize: [32, 32], // Size of the icon.
|
||||||
|
iconAnchor: [16, 16] // Point of the icon which will correspond to marker's location.
|
||||||
|
});
|
||||||
|
|
||||||
|
if (waypointIcon != '') {
|
||||||
|
icon = L.icon({
|
||||||
|
iconUrl: 'waypointIcon',
|
||||||
|
iconSize: [32, 32], // Size of the icon.
|
||||||
|
iconAnchor: [16, 16] // Point of the icon which will correspond to marker's location.
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < waypoints.length; i++) {
|
||||||
|
var wpt = waypoints[i];
|
||||||
|
|
||||||
|
this.Bounds.push([wpt.lat, wpt.lon]);
|
||||||
|
|
||||||
|
var lat = wpt.lat;
|
||||||
|
var lon = wpt.lon;
|
||||||
|
var sym = wpt.sym;
|
||||||
|
var typ = wpt.type;
|
||||||
|
|
||||||
|
if (wpt.img) {
|
||||||
|
(icon as any).iconUrl = wpt.img + "";
|
||||||
|
//wsh = '';
|
||||||
|
}
|
||||||
|
var marker = L.marker([lat, lon], { icon: icon });
|
||||||
|
var cnt = '';
|
||||||
|
|
||||||
|
if (wpt.name == '') {
|
||||||
|
cnt = "<div>" + unescape(wpt.desc) + "</div>";
|
||||||
|
} else {
|
||||||
|
cnt = "<div><b>" + wpt.name + "</b><br />" + unescape(wpt.desc) + "</div>";
|
||||||
|
}
|
||||||
|
cnt += "<br /><p><a href='https://maps.google.com?daddr=" + lat + "," + lon + "' target='_blank'>Itinéraire</a></p>";
|
||||||
|
|
||||||
|
if (this.map != null)
|
||||||
|
marker.addTo(this.map).bindPopup(cnt);
|
||||||
|
}
|
||||||
|
this.CenterMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
MoveMarkerToPosition(LatLon: [number, number], updateChart: boolean): void {
|
||||||
|
if (null == this.CurrentPositionMarker)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.CurrentPositionMarker.setLatLng(LatLon);
|
||||||
|
|
||||||
|
if (this.lng)
|
||||||
|
this.CurrentPositionMarker.setTooltipContent(this.lng.currentPosition);
|
||||||
|
//this.CurrentPositionMarker.title = this.lng.currentPosition;
|
||||||
|
|
||||||
|
if (true == updateChart && this.EventSelectChart)
|
||||||
|
this.EventSelectChart(LatLon);
|
||||||
|
}
|
||||||
|
|
||||||
|
CenterMap(): void {
|
||||||
|
try {
|
||||||
|
|
||||||
|
if (this.Bounds && this.Bounds.length > 0) {
|
||||||
|
|
||||||
|
let bounds = {
|
||||||
|
minLat: Number.POSITIVE_INFINITY,
|
||||||
|
maxLat: Number.NEGATIVE_INFINITY,
|
||||||
|
minLng: Number.POSITIVE_INFINITY,
|
||||||
|
maxLng: Number.NEGATIVE_INFINITY
|
||||||
|
};
|
||||||
|
|
||||||
|
this.Bounds.forEach(coord => {
|
||||||
|
if (!Array.isArray(coord) || coord.length !== 2) {
|
||||||
|
throw new Error("Each coordinate must be an array with [latitude, longitude].");
|
||||||
|
}
|
||||||
|
|
||||||
|
const [lat, lng] = coord;
|
||||||
|
bounds.minLat = Math.min(bounds.minLat, lat);
|
||||||
|
bounds.maxLat = Math.max(bounds.maxLat, lat);
|
||||||
|
bounds.minLng = Math.min(bounds.minLng, lng);
|
||||||
|
bounds.maxLng = Math.max(bounds.maxLng, lng);
|
||||||
|
});
|
||||||
|
|
||||||
|
var southWest = new L.LatLng(bounds.minLat, bounds.minLng),
|
||||||
|
northEast = new L.LatLng(bounds.maxLat, bounds.maxLng);
|
||||||
|
|
||||||
|
this.map?.fitBounds(new L.LatLngBounds(southWest, northEast));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AddPhotos(photos: any[]): void {
|
||||||
|
|
||||||
|
for (const photo of photos) {
|
||||||
|
let m = L.marker(photo, {
|
||||||
|
icon: L.divIcon(
|
||||||
|
L.extend(
|
||||||
|
{
|
||||||
|
html:
|
||||||
|
'<div style="background-image: url(' +
|
||||||
|
photo.thumbnail +
|
||||||
|
');"></div>',
|
||||||
|
className: "leaflet-marker-photo",
|
||||||
|
},
|
||||||
|
photo,
|
||||||
|
{
|
||||||
|
iconSize: [40, 40],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
),
|
||||||
|
title: photo.caption || "",
|
||||||
|
});
|
||||||
|
|
||||||
|
m.bindPopup('<img src="' + photo.url + '" /></a><p>' + photo.name + '</p>', { minWidth: 500 });
|
||||||
|
|
||||||
|
m.addTo(this.map);
|
||||||
|
//this.map.addLayer(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
//new ClusterPhotos(this.map).populate(photos)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LeafletMapEngine;
|
|
@ -0,0 +1,458 @@
|
||||||
|
import { WPGPXMAPS } from '../Utils/Utils';
|
||||||
|
import { MapboxStyleDefinition, MapboxStyleSwitcherOptions, MapboxStyleSwitcherControl } from "mapbox-gl-style-switcher";
|
||||||
|
import mapboxgl, { ControlPosition, GeoJSONSource, IControl, LngLatBounds, Map, Marker } from 'mapbox-gl';
|
||||||
|
import * as turf from '@turf/turf';
|
||||||
|
|
||||||
|
import 'mapbox-gl/dist/mapbox-gl.css';
|
||||||
|
import "mapbox-gl-style-switcher/styles.css";
|
||||||
|
|
||||||
|
class AnumationControl implements IControl {
|
||||||
|
|
||||||
|
container: HTMLElement;
|
||||||
|
|
||||||
|
start: number = 0.0;
|
||||||
|
animationDuration: number = 80000;
|
||||||
|
cameraAltitude: number = 1000;
|
||||||
|
|
||||||
|
targetRoute: Array<number[]> = [];
|
||||||
|
cameraRoute: Array<number[]> = [];
|
||||||
|
|
||||||
|
map: Map;
|
||||||
|
|
||||||
|
iconDefault: string = '/wp-content/plugins/wp-gpx-maps/img/map-play-svgrepo-com.svg';
|
||||||
|
iconStop: string = '/wp-content/plugins/wp-gpx-maps/img/stop-svgrepo-com.svg';
|
||||||
|
|
||||||
|
routeDistance: number = 0.0;
|
||||||
|
cameraRouteDistance: number = 0.0;
|
||||||
|
|
||||||
|
isPlaying: boolean = false;
|
||||||
|
|
||||||
|
onAdd(map: Map): HTMLElement {
|
||||||
|
|
||||||
|
this.map = map;
|
||||||
|
|
||||||
|
this.container = document.createElement('div');
|
||||||
|
this.container.className = 'mapboxgl-ctrl mapboxgl-ctrl-group mapboxgl-wp-gpx-maps';
|
||||||
|
this.container.innerHTML = `<button style='background-image: url(${this.iconDefault});'> </div>`;
|
||||||
|
this.container.onclick = () => {
|
||||||
|
// Your custom logic here
|
||||||
|
|
||||||
|
if (this.isPlaying == false) {
|
||||||
|
this.isPlaying = true;
|
||||||
|
this._playAnimation();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.isPlaying = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return this.container;
|
||||||
|
}
|
||||||
|
|
||||||
|
_animationFrame(time) {
|
||||||
|
|
||||||
|
if (this.isPlaying == false) {
|
||||||
|
this.start = 0.0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.start) this.start = time;
|
||||||
|
// phase determines how far through the animation we are
|
||||||
|
const phase = (time - this.start) / this.animationDuration;
|
||||||
|
|
||||||
|
// phase is normalized between 0 and 1
|
||||||
|
// when the animation is finished, reset start to loop the animation
|
||||||
|
if (phase > 1) {
|
||||||
|
// wait 1.5 seconds before looping
|
||||||
|
setTimeout(() => {
|
||||||
|
this.start = 0.0;
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
|
||||||
|
// use the phase to get a point that is the appropriate distance along the route
|
||||||
|
// this approach syncs the camera and route positions ensuring they move
|
||||||
|
// at roughly equal rates even if they don't contain the same number of points
|
||||||
|
const alongRoute = turf.along(
|
||||||
|
turf.lineString(this.targetRoute),
|
||||||
|
this.routeDistance * phase
|
||||||
|
).geometry.coordinates;
|
||||||
|
|
||||||
|
const alongCamera = turf.along(
|
||||||
|
turf.lineString(this.cameraRoute),
|
||||||
|
this.cameraRouteDistance * phase
|
||||||
|
).geometry.coordinates;
|
||||||
|
|
||||||
|
const camera = this.map.getFreeCameraOptions();
|
||||||
|
|
||||||
|
// set the position and altitude of the camera
|
||||||
|
camera.position = mapboxgl.MercatorCoordinate.fromLngLat(
|
||||||
|
{
|
||||||
|
lng: alongCamera[0],
|
||||||
|
lat: alongCamera[1]
|
||||||
|
},
|
||||||
|
this.cameraAltitude
|
||||||
|
);
|
||||||
|
|
||||||
|
// tell the camera to look at a point along the route
|
||||||
|
camera.lookAtPoint({
|
||||||
|
lng: alongRoute[0],
|
||||||
|
lat: alongRoute[1]
|
||||||
|
});
|
||||||
|
|
||||||
|
this.map.setFreeCameraOptions(camera);
|
||||||
|
|
||||||
|
window.requestAnimationFrame((time) => this._animationFrame(time));
|
||||||
|
}
|
||||||
|
|
||||||
|
_stopAnimation() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
_playAnimation() {
|
||||||
|
|
||||||
|
this.cameraRouteDistance = turf.lineDistance(
|
||||||
|
turf.lineString(this.cameraRoute)
|
||||||
|
);
|
||||||
|
|
||||||
|
this.routeDistance = turf.lineDistance(
|
||||||
|
turf.lineString(this.targetRoute)
|
||||||
|
);
|
||||||
|
|
||||||
|
window.requestAnimationFrame((time) => this._animationFrame(time));
|
||||||
|
}
|
||||||
|
|
||||||
|
onRemove(map: Map) {
|
||||||
|
this.container.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
getDefaultPosition?: () => ControlPosition;
|
||||||
|
_setLanguage?: (language?: string | string[]) => void;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MapBoxMapEngine implements MapEngine<Map> {
|
||||||
|
|
||||||
|
map: Map;
|
||||||
|
Bounds: Array<number[]> = [];
|
||||||
|
EventSelectChart: null | Function = null;
|
||||||
|
CurrentLocationMarker: mapboxgl.Marker | null = null;
|
||||||
|
|
||||||
|
animationControl: AnumationControl | null = null;
|
||||||
|
otherParams: any;
|
||||||
|
|
||||||
|
animateLineOptions: any = {
|
||||||
|
SpeedFactor: 30, // number of frames per longitude degree
|
||||||
|
Animation: null, // to store and cancel the animation
|
||||||
|
StartTime: 0,
|
||||||
|
Progress: 0, // progress = timestamp - startTime
|
||||||
|
ResetTime: false // indicator of whether time reset is needed for the animation
|
||||||
|
}
|
||||||
|
|
||||||
|
init(targetElement: HTMLElement, mapType: string, scrollWheelZoom: boolean, MapBoxApiKey: string | null | undefined, otherParams: any): void {
|
||||||
|
|
||||||
|
this.otherParams = otherParams;
|
||||||
|
|
||||||
|
this.map = new mapboxgl.Map({
|
||||||
|
container: targetElement,
|
||||||
|
style: 'mapbox://styles/mapbox/streets-v11',
|
||||||
|
accessToken: "pk.eyJ1Ijoic2VjdXJjdWJlbWF4IiwiYSI6ImNsbW94MzRodjE4YjEya3BuM3liZXl6MXYifQ.db3c6nnAcFwFm5jD2NCg6w", // MapBoxApiKey ??
|
||||||
|
center: [0, 0],
|
||||||
|
zoom: 1,
|
||||||
|
scrollZoom: scrollWheelZoom
|
||||||
|
});
|
||||||
|
|
||||||
|
this.animationControl = new AnumationControl();
|
||||||
|
|
||||||
|
this.map.addControl(new mapboxgl.NavigationControl());
|
||||||
|
this.map.addControl(new mapboxgl.FullscreenControl());
|
||||||
|
|
||||||
|
const styles: MapboxStyleDefinition[] = [
|
||||||
|
{ uri: 'mapbox://styles/mapbox/standard', title: 'Standard' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/standard-satellite', title: 'Standard Satelite' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/streets-v12', title: 'Streets' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/outdoors-v12', title: 'Outdoors' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/light-v11', title: 'Light' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/dark-v11', title: 'Dark' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/satellite-v9', title: 'Satellite' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/satellite-streets-v12', title: 'Satellite Streets' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/navigation-day-v1', title: 'Navigation Day' },
|
||||||
|
{ uri: 'mapbox://styles/mapbox/navigation-night-v1', title: 'Navigation Night' }
|
||||||
|
];
|
||||||
|
|
||||||
|
// Pass options (optional)
|
||||||
|
const options: MapboxStyleSwitcherOptions = {
|
||||||
|
defaultStyle: "Satellite Streets",
|
||||||
|
eventListeners: {
|
||||||
|
// return true if you want to stop execution
|
||||||
|
// onOpen: (event: MouseEvent) => boolean;
|
||||||
|
// onSelect: (event: MouseEvent) => boolean;
|
||||||
|
// onChange: (event: MouseEvent, style: string) => boolean;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.map.addControl(new MapboxStyleSwitcherControl() as IControl, 'top-left');
|
||||||
|
this.map.addControl(this.animationControl);
|
||||||
|
|
||||||
|
this.map.on('style.load', async () => {
|
||||||
|
|
||||||
|
if (otherParams.MapBoxFog) {
|
||||||
|
|
||||||
|
// Add daytime fog
|
||||||
|
this.map.setFog({
|
||||||
|
'range': [-1, 2],
|
||||||
|
'horizon-blend': 0.3,
|
||||||
|
'color': 'white',
|
||||||
|
'high-color': '#add8e6',
|
||||||
|
'space-color': '#d8f2ff',
|
||||||
|
'star-intensity': 0.0
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (otherParams.MapBox3dTerrain) {
|
||||||
|
|
||||||
|
// 3d terrain
|
||||||
|
this.map.addSource('mapbox-dem', {
|
||||||
|
'type': 'raster-dem',
|
||||||
|
'url': 'mapbox://mapbox.mapbox-terrain-dem-v1',
|
||||||
|
'tileSize': 512,
|
||||||
|
'maxzoom': 14
|
||||||
|
});
|
||||||
|
|
||||||
|
// add the DEM source as a terrain layer with exaggerated height
|
||||||
|
this.map.setTerrain({ 'source': 'mapbox-dem', 'exaggeration': 1.5 });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
_addMarker(ll: [number, number], icon: string | null, popup: Function | null): Marker {
|
||||||
|
|
||||||
|
// Create a DOM element for each marker.
|
||||||
|
const el = document.createElement('div');
|
||||||
|
const width = 32;
|
||||||
|
const height = 32;
|
||||||
|
el.className = 'marker';
|
||||||
|
el.style.backgroundImage = `url(${icon})`;
|
||||||
|
el.style.width = `${width}px`;
|
||||||
|
el.style.height = `${height}px`;
|
||||||
|
el.style.backgroundSize = '100%';
|
||||||
|
|
||||||
|
el.addEventListener('click', (e) => {
|
||||||
|
popup?.call(this, e);
|
||||||
|
});
|
||||||
|
|
||||||
|
return new mapboxgl.Marker(el).setLngLat([ll[1], ll[0]]).addTo(this.map);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
AppPolylines(mapData: Array<[number, number] | null>, colors: string[], currentIcon: string | null, startIcon: string | null, endIcon: string | null): void {
|
||||||
|
|
||||||
|
this.Bounds = mapData.filter(o => o != null);
|
||||||
|
|
||||||
|
this.map.on('style.load', async () => {
|
||||||
|
|
||||||
|
const pointsArray = WPGPXMAPS.Utils.DividePolylinesPoints(mapData);
|
||||||
|
|
||||||
|
const LngLatRute = this.Bounds.map((point) => [point[1], point[0]]);
|
||||||
|
this.animationControl.cameraRoute = LngLatRute;
|
||||||
|
this.animationControl.targetRoute = LngLatRute;
|
||||||
|
|
||||||
|
this.map.addSource('route', {
|
||||||
|
'type': 'geojson',
|
||||||
|
'data': {
|
||||||
|
'type': 'FeatureCollection',
|
||||||
|
'features': pointsArray.map((points, i) => {
|
||||||
|
|
||||||
|
return ({
|
||||||
|
'type': 'Feature',
|
||||||
|
'properties': {
|
||||||
|
color: (i < colors.length ? colors[i] : colors[colors.length - 1])
|
||||||
|
},
|
||||||
|
'geometry': {
|
||||||
|
'type': 'LineString',
|
||||||
|
'coordinates': points.map((point) => [point[1], point[0]])
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.map.addLayer({
|
||||||
|
'id': 'route',
|
||||||
|
'type': 'line',
|
||||||
|
'source': 'route',
|
||||||
|
'layout': {
|
||||||
|
'line-join': 'round',
|
||||||
|
'line-cap': 'round'
|
||||||
|
},
|
||||||
|
'paint': {
|
||||||
|
'line-color': ['get', 'color'],
|
||||||
|
'line-width': 3
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if ('' == currentIcon || null == currentIcon) {
|
||||||
|
currentIcon = 'https://maps.google.com/mapfiles/kml/pal4/icon25.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CurrentLocationMarker = this._addMarker(mapData[0], currentIcon, (e) => {
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (startIcon != '') {
|
||||||
|
|
||||||
|
let ll = mapData[0];
|
||||||
|
|
||||||
|
if (ll != null) {
|
||||||
|
this._addMarker(ll, startIcon, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (endIcon != '' && mapData[mapData.length - 1] != null) {
|
||||||
|
|
||||||
|
let ll = mapData[mapData.length - 1];
|
||||||
|
|
||||||
|
if (ll != null) {
|
||||||
|
this._addMarker(ll, endIcon, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CenterMap();
|
||||||
|
|
||||||
|
|
||||||
|
if (this.otherParams.MapBoxAnimateOnLoading == '1') {
|
||||||
|
|
||||||
|
this.animateLineOptions.StartTime = performance.now();
|
||||||
|
this.animateLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
AddWaypoints(waypoints: any, waypointIcon: string | null): void {
|
||||||
|
//throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
MoveMarkerToPosition(LatLon: [number, number], updateChart: boolean): void {
|
||||||
|
|
||||||
|
this.CurrentLocationMarker?.setLngLat([LatLon[1], LatLon[0]]);
|
||||||
|
|
||||||
|
//throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
SetCurrentGPSPosition(LatLon: [number, number], currentpositioncon: string, lng: LangTranslation): void {
|
||||||
|
///throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
CenterMap(): void {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
if (this.Bounds && this.Bounds.length > 0) {
|
||||||
|
|
||||||
|
let bounds = {
|
||||||
|
minLat: Number.POSITIVE_INFINITY,
|
||||||
|
maxLat: Number.NEGATIVE_INFINITY,
|
||||||
|
minLng: Number.POSITIVE_INFINITY,
|
||||||
|
maxLng: Number.NEGATIVE_INFINITY
|
||||||
|
};
|
||||||
|
|
||||||
|
this.Bounds.forEach(coord => {
|
||||||
|
if (!Array.isArray(coord) || coord.length !== 2) {
|
||||||
|
throw new Error("Each coordinate must be an array with [latitude, longitude].");
|
||||||
|
}
|
||||||
|
|
||||||
|
const [lat, lng] = coord;
|
||||||
|
bounds.minLat = Math.min(bounds.minLat, lat);
|
||||||
|
bounds.maxLat = Math.max(bounds.maxLat, lat);
|
||||||
|
bounds.minLng = Math.min(bounds.minLng, lng);
|
||||||
|
bounds.maxLng = Math.max(bounds.maxLng, lng);
|
||||||
|
});
|
||||||
|
|
||||||
|
const sw = new mapboxgl.LngLat(bounds.minLng, bounds.minLat);
|
||||||
|
const ne = new mapboxgl.LngLat(bounds.maxLng, bounds.maxLat);
|
||||||
|
|
||||||
|
this.map?.fitBounds(new mapboxgl.LngLatBounds(sw, ne), { padding: 30, animate: false });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
//throw new Error('Method not implemented.');
|
||||||
|
}
|
||||||
|
|
||||||
|
AddPhotos(photos: any[]): void {
|
||||||
|
|
||||||
|
const width = 40;
|
||||||
|
const height = 40;
|
||||||
|
|
||||||
|
for (const photo of photos) {
|
||||||
|
let _m = this._addMarker([photo.lat, photo.lng], photo.thumbnail, (e) => {
|
||||||
|
let _selector = `a[data-image-id='${photo.image_id}']`;
|
||||||
|
let galleryEl = document.querySelector(_selector);
|
||||||
|
(galleryEl as HTMLAnchorElement)?.click()
|
||||||
|
});
|
||||||
|
_m._element.classList.add('wp-gpx-maps-photo-marker');
|
||||||
|
_m._element.style.width = `${width}px`;
|
||||||
|
_m._element.style.height = `${height}px`;
|
||||||
|
//_m.setPopup(new mapboxgl.Popup({ maxWidth: "900px"}).setHTML(`<img src='${photo.url}' alt='${photo.name}' />`));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//new ClusterPhotos(this.map).populate(photos)
|
||||||
|
}
|
||||||
|
|
||||||
|
// animated in a circle as a sine wave along the map.
|
||||||
|
animateLine(timestamp: number | null = null) {
|
||||||
|
|
||||||
|
if (timestamp == null) {
|
||||||
|
// fist call
|
||||||
|
var geojson = (this.map.getSource('route') as GeoJSONSource)._data;
|
||||||
|
this.animateLineOptions.ruteJeoJson = geojson;
|
||||||
|
this.animateLineOptions.ruteCoordinates = (geojson as any).features[0].geometry.coordinates;
|
||||||
|
(geojson as any).features[0].geometry.coordinates = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.animateLineOptions.ResetTime) {
|
||||||
|
// resume previous progress
|
||||||
|
this.animateLineOptions.sta = performance.now() - this.animateLineOptions.Progress;
|
||||||
|
this.animateLineOptions.ResetTime = false;
|
||||||
|
} else {
|
||||||
|
this.animateLineOptions.Progress = timestamp - this.animateLineOptions.StartTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.animateLineOptions.Progress < 0)
|
||||||
|
this.animateLineOptions.Progress = 0;
|
||||||
|
|
||||||
|
// restart if it finishes a loop
|
||||||
|
if (this.animateLineOptions.Progress > this.animateLineOptions.SpeedFactor * 360) {
|
||||||
|
this.animateLineOptions.startTime = timestamp;
|
||||||
|
|
||||||
|
// stop the animation
|
||||||
|
return;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
let len = this.animateLineOptions.ruteCoordinates.length;
|
||||||
|
let slice = Math.floor(len * this.animateLineOptions.Progress / (this.animateLineOptions.SpeedFactor * 360));
|
||||||
|
|
||||||
|
this.animateLineOptions.ruteJeoJson.features[0].geometry.coordinates =
|
||||||
|
this.animateLineOptions.ruteCoordinates.slice(0, slice);
|
||||||
|
|
||||||
|
// then update the map
|
||||||
|
var s = (this.map.getSource('route') as GeoJSONSource).setData(this.animateLineOptions.ruteJeoJson);
|
||||||
|
}
|
||||||
|
// Request the next frame of the animation.
|
||||||
|
this.animateLineOptions.animation = requestAnimationFrame((time) => this.animateLine(time));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
BIN
backToCenter.png
Before Width: | Height: | Size: 3.1 KiB |
33
bower.json
|
@ -1,33 +0,0 @@
|
||||||
{
|
|
||||||
"name": "leaflet.fullscreen",
|
|
||||||
"version": "1.4.5",
|
|
||||||
"homepage": "https://github.com/brunob/leaflet.fullscreen",
|
|
||||||
"license": "MIT",
|
|
||||||
"authors": [
|
|
||||||
"brunob <brunobergot@gmail.com>"
|
|
||||||
],
|
|
||||||
"description": "Leaflet.Control.FullScreen for Leaflet",
|
|
||||||
"main": [
|
|
||||||
"Control.FullScreen.js",
|
|
||||||
"Control.FullScreen.css",
|
|
||||||
"icon-fullscreen.png",
|
|
||||||
"icon-fullscreen-2x.png"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"eslint": "2.3.0"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"leaflet",
|
|
||||||
"plugins",
|
|
||||||
"maps",
|
|
||||||
"fullscreen"
|
|
||||||
],
|
|
||||||
"ignore": [
|
|
||||||
"**/.*",
|
|
||||||
"node_modules",
|
|
||||||
"bower_components",
|
|
||||||
"test",
|
|
||||||
"tests",
|
|
||||||
"index.html"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -3,30 +3,50 @@
|
||||||
*
|
*
|
||||||
* Content:
|
* Content:
|
||||||
* --------
|
* --------
|
||||||
* 1. Over the Tabs
|
* 1. Admin Body
|
||||||
* 2. Tab: Tracks
|
* 2. Over The Tabs
|
||||||
|
* 3. Tab: Tracks
|
||||||
* 3. Tab: Settings
|
* 3. Tab: Settings
|
||||||
* 4. Tab: Help
|
* 4. Tab: Help
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1.0 Over the Tabs
|
* 1.0 Admin Body
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2.0 Tab: Tracks
|
* 2.0 Over The Tabs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
h1.header-title {
|
||||||
|
padding-top:15px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3.0 Tab: Tracks
|
||||||
|
*/
|
||||||
|
|
||||||
|
.tablenav-top {
|
||||||
|
clear: both;
|
||||||
|
height: 30px;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
margin-left: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#table tbody tr:hover {
|
#table tbody tr:hover {
|
||||||
background: #eee;
|
background: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 3.0 Tab: Settings
|
* 4.0 Tab: Settings
|
||||||
*/
|
*/
|
||||||
.wpgpxmaps-container-tab-settings {
|
.wpgpxmaps-container-tab-settings {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 5px 20px 1px 20px;
|
padding: 5px 10px 1px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wpgpxmaps-container-tab-settings table.form-table input[type="checkbox"] {
|
.wpgpxmaps-container-tab-settings table.form-table input[type="checkbox"] {
|
||||||
|
@ -43,16 +63,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4.0 Tab: Tracks
|
* 5.0 Tab: Administration
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6.0 Tab: Help
|
||||||
*/
|
*/
|
||||||
.wpgpxmaps-container-tab-faq {
|
.wpgpxmaps-container-tab-faq {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 5px 20px 1px 20px;
|
padding: 5px 10px 1px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wpgpxmaps-tab-faq {
|
.wpgpxmaps-tab-faq {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 5px 20px 10px 20px;
|
padding: 5px 10px 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wpgpxmaps-container-tab-faq table.widefat {
|
.wpgpxmaps-container-tab-faq table.widefat {
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
|
|
||||||
.bootstrap-table .table {
|
.bootstrap-table .table {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
border-bottom: 1px solid #dddddd;
|
border-bottom: 1px solid #ddd;
|
||||||
border-collapse: collapse !important;
|
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
|
border-collapse: collapse !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .table:not(.table-condensed),
|
.bootstrap-table .table:not(.table-condensed),
|
||||||
|
@ -34,12 +34,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-container {
|
.fixed-table-container {
|
||||||
position: relative;
|
|
||||||
clear: both;
|
clear: both;
|
||||||
border: 1px solid #dddddd;
|
position: relative;
|
||||||
border-radius: 4px;
|
border: 1px solid #ddd;
|
||||||
-webkit-border-radius: 4px;
|
-webkit-border-radius: 4px;
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-container.table-no-bordered {
|
.fixed-table-container.table-no-bordered {
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-footer {
|
.fixed-table-footer {
|
||||||
border-top: 1px solid #dddddd;
|
border-top: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-body {
|
.fixed-table-body {
|
||||||
|
@ -67,9 +67,9 @@
|
||||||
|
|
||||||
.fixed-table-container thead th {
|
.fixed-table-container thead th {
|
||||||
height: 0;
|
height: 0;
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-left: 1px solid #dddddd;
|
padding: 0;
|
||||||
|
border-left: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-container thead th:focus {
|
.fixed-table-container thead th:focus {
|
||||||
|
@ -78,26 +78,26 @@
|
||||||
|
|
||||||
.fixed-table-container thead th:first-child:not([data-not-first-th]) {
|
.fixed-table-container thead th:first-child:not([data-not-first-th]) {
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-top-left-radius: 4px;
|
|
||||||
-webkit-border-top-left-radius: 4px;
|
-webkit-border-top-left-radius: 4px;
|
||||||
-moz-border-radius-topleft: 4px;
|
-moz-border-radius-topleft: 4px;
|
||||||
|
border-top-left-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-container thead th .th-inner,
|
.fixed-table-container thead th .th-inner,
|
||||||
.fixed-table-container tbody td .th-inner {
|
.fixed-table-container tbody td .th-inner {
|
||||||
|
overflow: hidden;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-container thead th .sortable {
|
.fixed-table-container thead th .sortable {
|
||||||
cursor: pointer;
|
|
||||||
background-position: right;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-container thead th .both {
|
.fixed-table-container thead th .both {
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-container tbody td {
|
.fixed-table-container tbody td {
|
||||||
border-left: 1px solid #dddddd;
|
border-left: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-container tbody tr:first-child td {
|
.fixed-table-container tbody tr:first-child td {
|
||||||
|
@ -174,13 +174,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-pagination .pagination-info {
|
.fixed-table-pagination .pagination-info {
|
||||||
line-height: 34px;
|
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
line-height: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-pagination .btn-group {
|
.fixed-table-pagination .btn-group {
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,9 +202,9 @@
|
||||||
|
|
||||||
.fixed-table-toolbar .columns label {
|
.fixed-table-toolbar .columns label {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 3px 20px;
|
|
||||||
clear: both;
|
clear: both;
|
||||||
font-weight: normal;
|
padding: 3px 20px;
|
||||||
|
font-weight: 400;
|
||||||
line-height: 1.428571429;
|
line-height: 1.428571429;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,26 +217,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-pagination li.disabled a {
|
.fixed-table-pagination li.disabled a {
|
||||||
pointer-events: none;
|
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-loading {
|
.fixed-table-loading {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
z-index: 99;
|
||||||
top: 42px;
|
top: 42px;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 99;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-body .card-view .title {
|
.fixed-table-body .card-view .title {
|
||||||
font-weight: bold;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 30%;
|
min-width: 30%;
|
||||||
|
font-weight: 700;
|
||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,15 +245,16 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table th, .table td {
|
.table th,
|
||||||
vertical-align: middle;
|
.table td {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-toolbar .dropdown-menu {
|
.fixed-table-toolbar .dropdown-menu {
|
||||||
text-align: left;
|
|
||||||
max-height: 300px;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
max-height: 300px;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-table-toolbar .btn-group > .btn-group {
|
.fixed-table-toolbar .btn-group > .btn-group {
|
||||||
|
@ -276,8 +277,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .table > thead > tr > th {
|
.bootstrap-table .table > thead > tr > th {
|
||||||
vertical-align: bottom;
|
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .table > thead.thead-dark > tr > th {
|
.bootstrap-table .table > thead.thead-dark > tr > th {
|
||||||
|
@ -286,8 +287,8 @@
|
||||||
|
|
||||||
/* support bootstrap 3 */
|
/* support bootstrap 3 */
|
||||||
.bootstrap-table .table thead > tr > th {
|
.bootstrap-table .table thead > tr > th {
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .fixed-table-footer tbody > tr > td {
|
.bootstrap-table .fixed-table-footer tbody > tr > td {
|
||||||
|
@ -295,9 +296,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .fixed-table-footer .table {
|
.bootstrap-table .fixed-table-footer .table {
|
||||||
|
padding: 0 !important;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: 0 !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table .pull-right .dropdown-menu {
|
.bootstrap-table .pull-right .dropdown-menu {
|
||||||
|
@ -312,26 +313,27 @@ p.fixed-table-scroll-inner {
|
||||||
}
|
}
|
||||||
|
|
||||||
div.fixed-table-scroll-outer {
|
div.fixed-table-scroll-outer {
|
||||||
|
visibility: hidden;
|
||||||
|
overflow: hidden;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
visibility: hidden;
|
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for get correct heights */
|
/* for get correct heights */
|
||||||
.fixed-table-toolbar:after, .fixed-table-pagination:after {
|
.fixed-table-toolbar:after,
|
||||||
content: "";
|
.fixed-table-pagination:after {
|
||||||
display: block;
|
display: block;
|
||||||
clear: both;
|
clear: both;
|
||||||
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
.bootstrap-table.fullscreen {
|
.bootstrap-table.fullscreen {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
z-index: 1050;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 1050;
|
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
background: #FFF;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
line-height :120;
|
line-height :120;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wpgpxmaps .gmnoprint div:first-child { }
|
|
||||||
|
|
||||||
.wpgpxmaps .wpgpxmaps_osm_footer {
|
.wpgpxmaps .wpgpxmaps_osm_footer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
@ -63,3 +61,37 @@
|
||||||
background: #fff;
|
background: #fff;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.wpgpxmaps .leaflet-marker-photo {
|
||||||
|
border: 2px solid #fff;
|
||||||
|
box-shadow: 3px 3px 10px #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wpgpxmaps .leaflet-marker-photo div {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wpgpxmaps .leaflet-marker-photo b {
|
||||||
|
position: absolute;
|
||||||
|
top: -7px;
|
||||||
|
right: -11px;
|
||||||
|
color: #555;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
height: 12px;
|
||||||
|
min-width: 12px;
|
||||||
|
line-height: 12px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 3px;
|
||||||
|
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mapboxgl-wp-gpx-maps{
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
Before Width: | Height: | Size: 3.1 KiB |
BIN
expand.png
Before Width: | Height: | Size: 1.5 KiB |
BIN
goFullScreen.png
Before Width: | Height: | Size: 3.1 KiB |
BIN
hideImages.png
Before Width: | Height: | Size: 3.0 KiB |
BIN
icon-128x128.png
Before Width: | Height: | Size: 7.1 KiB |
BIN
icon-256x256.png
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 139 B |
1
icon.svg
|
@ -1 +0,0 @@
|
||||||
<svg height="512pt" viewBox="0 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m452 122c-27.601562 0-50 22.402344-50 50v280h100v-280c0-27.609375-22.390625-50-50-50zm0 0" fill="#ececf1"/><path d="m60 122c-27.601562 0-50 22.402344-50 50v280h100c0-10.460938 0-266.328125 0-280 0-27.609375-22.390625-50-50-50zm0 0" fill="#ececf1"/><path d="m260 322h142c0-54.882812 0-108.527344 0-120h-268s91.441406 87.089844 126 120zm0 0" fill="#7fe881"/><path d="m110 262v190c0-27.609375-22.390625-50-50-50s-50 22.390625-50 50c0 29.078125 25.246094 50 52.851562 50h47.148438l126-120zm0 0" fill="#76e2f8"/><path d="m465.320312 403.71875c-33.359374-8.617188-63.320312 16.332031-63.320312 48.28125 0-7.824219 0-35.589844 0-70h-86l-120 120h256c27.621094 0 50-22.378906 50-50 0-24.109375-16.308594-43.019531-36.679688-48.28125zm0 0" fill="#76e2f8"/><path d="m402 322v60h-86l-120 120h-86l126-120-126-120v-60h24s91.441406 87.089844 126 120zm0 0" fill="#fed2a4"/><path d="m256 10c49.710938 0 90 40.289062 90 90 0 24.488281-21.828125 66.089844-43.988281 102-22.832031 37.019531-46.011719 68-46.011719 68s-23.179688-30.980469-46.011719-68c-22.160156-35.910156-43.988281-77.511719-43.988281-102 0-49.710938 40.289062-90 90-90zm0 0" fill="#ff637b"/><path d="m256 60c22.058594 0 40 17.941406 40 40s-17.941406 40-40 40-40-17.941406-40-40 17.941406-40 40-40zm0 0" fill="#ececf1"/><path d="m452 112c-33.144531 0-60 26.847656-60 60v20h-72.3125c24.097656-41.210938 36.3125-72.117188 36.3125-92 0-55.140625-44.859375-100-100-100s-100 44.859375-100 100c0 19.882812 12.214844 50.792969 36.3125 92-8.117188 0-65.292969 0-72.3125 0v-20c0-33.085938-26.914062-60-60-60-33.144531 0-60 26.847656-60 60v56c0 5.523438 4.476562 10 10 10s10-4.476562 10-10v-56c0-22.09375 17.902344-40 40-40 22.054688 0 40 17.945312 40 40v235.316406c-10.621094-9.519531-24.648438-15.316406-40-15.316406-15.355469 0-29.375 5.804688-40 15.328125v-99.328125c0-5.523438-4.476562-10-10-10s-10 4.476562-10 10v144c0 34.308594 29.617188 60 62.851562 60h389.148438c33.085938 0 60-26.914062 60-60v-280c0-33.085938-26.914062-60-60-60zm-40 60c0-22.09375 17.902344-40 40-40 22.054688 0 40 17.945312 40 40v235.042969c-6.875-6.121094-15.152344-10.675781-24.179688-13.003907-20.042968-5.183593-40.664062-.304687-55.820312 13.230469 0-8.550781 0-223.265625 0-235.269531zm-20 140h-128c-33.511719-31.910156-97.515625-92.871094-104.996094-100h45.429688c21.832031 34.875 43.335937 63.691406 43.558594 63.992188 1.890624 2.523437 4.855468 4.007812 8.007812 4.007812s6.117188-1.484375 8.007812-4.007812c.222657-.300782 21.730469-29.117188 43.558594-63.992188h84.433594zm-136-292c44.113281 0 80 35.886719 80 80 0 37.128906-58.570312 122.988281-80 152.988281-21.765625-30.476562-80-116.199219-80-152.988281 0-44.113281 35.886719-80 80-80zm-236 432c0-22.054688 17.945312-40 40-40s40 17.945312 40 40c0 5.523438 4.476562 10 10 10s10-4.476562 10-10v-166.667969l101.5 96.667969-115.5 110h-43.148438c-22.425781 0-42.851562-16.761719-42.851562-40zm222.894531-62.757812c1.984375-1.890626 3.105469-4.507813 3.105469-7.242188s-1.121094-5.355469-3.105469-7.242188l-122.894531-117.042968v-45.714844h10c.683594.652344 118.339844 112.707031 123.105469 117.242188 1.859375 1.769531 4.328125 2.757812 6.894531 2.757812h132v40h-76c-2.652344 0-5.195312 1.054688-7.070312 2.929688l-117.074219 117.070312h-56.855469zm209.105469 102.757812h-231.855469l100-100h71.855469v60c0 5.523438 4.476562 10 10 10s10-4.476562 10-10c0-25.863281 24.21875-45.46875 50.820312-38.597656 16.238282 4.195312 29.179688 19.191406 29.179688 38.597656 0 22.054688-17.945312 40-40 40zm0 0"/><path d="m256 150c27.570312 0 50-22.429688 50-50s-22.429688-50-50-50-50 22.429688-50 50 22.429688 50 50 50zm0-80c16.542969 0 30 13.457031 30 30s-13.457031 30-30 30-30-13.457031-30-30 13.457031-30 30-30zm0 0"/><path d="m10 278c5.519531 0 10-4.480469 10-10s-4.480469-10-10-10-10 4.480469-10 10 4.480469 10 10 10zm0 0"/></svg>
|
|
Before Width: | Height: | Size: 3.8 KiB |
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg width="800px" height="800px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--gis" preserveAspectRatio="xMidYMid meet"><path d="M65.809 5a2.5 2.5 0 0 0-1.03.232L34.166 19.453L3.553 5.233A2.5 2.5 0 0 0 0 7.5v70.29a2.5 2.5 0 0 0 1.447 2.267l31.666 14.71A2.5 2.5 0 0 0 34.19 95a2.5 2.5 0 0 0 1.032-.232l30.613-14.221l30.613 14.22A2.5 2.5 0 0 0 100 92.5V22.21a2.5 2.5 0 0 0-1.447-2.267L66.887 5.233A2.5 2.5 0 0 0 65.809 5zm1.142 5.775L95 23.805v64.777L67.322 75.725l-.37-64.95zm-2.998.354l.37 64.605l-28.677 13.323l-.369-64.606L63.953 11.13zM5 11.418l27.275 12.67l.371 64.95L5 76.192V11.418z" fill="#000000" fill-rule="evenodd"></path><path d="M50 24a26 26 0 0 0-26 26a26 26 0 0 0 26 26a26 26 0 0 0 26-26a26 26 0 0 0-26-26zm-6.979 9.502a1.526 1.5 0 0 1 1 .299l20.348 15a1.526 1.5 0 0 1 0 2.398l-20.348 15A1.526 1.5 0 0 1 41.581 65V35a1.526 1.5 0 0 1 1.44-1.498z" fill="#000000"></path></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<title>stop</title>
|
||||||
|
<path d="M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z"></path>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 450 B |
51
index.html
|
@ -1,51 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset='utf-8'>
|
|
||||||
<title>Leaflet.Control.FullScreen Demo</title>
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" />
|
|
||||||
<style type="text/css">
|
|
||||||
#map { width: 700px; height: 433px; }
|
|
||||||
.fullscreen-icon { background-image: url(icon-fullscreen.png); }
|
|
||||||
/* one selector per rule as explained here : http://www.sitepoint.com/html5-full-screen-api/ */
|
|
||||||
#map:-webkit-full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
|
||||||
#map:-ms-fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
|
||||||
#map:full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
|
||||||
#map:fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
|
||||||
.leaflet-pseudo-fullscreen { position: fixed !important; width: 100% !important; height: 100% !important; top: 0px !important; left: 0px !important; z-index: 99999; }
|
|
||||||
</style>
|
|
||||||
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
|
|
||||||
<script src="Control.FullScreen.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div id="map"></div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var base = new L.TileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
|
||||||
maxZoom: 19,
|
|
||||||
subdomains: 'abcd',
|
|
||||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
|
||||||
});
|
|
||||||
|
|
||||||
var map = new L.Map('map', {
|
|
||||||
layers: [base],
|
|
||||||
center: new L.LatLng(48.5, -4.5),
|
|
||||||
zoom: 5,
|
|
||||||
fullscreenControl: true,
|
|
||||||
fullscreenControlOptions: { // optional
|
|
||||||
title:"Show me the fullscreen !",
|
|
||||||
titleCancel:"Exit fullscreen mode"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// detect fullscreen toggling
|
|
||||||
map.on('enterFullscreen', function(){
|
|
||||||
if(window.console) window.console.log('enterFullscreen');
|
|
||||||
});
|
|
||||||
map.on('exitFullscreen', function(){
|
|
||||||
if(window.console) window.console.log('exitFullscreen');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,988 @@
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: wp-gpx-maps\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2019-12-13 15:05+0900\n"
|
||||||
|
"PO-Revision-Date: 2019-12-13 16:25+0900\n"
|
||||||
|
"Last-Translator: Taisuke Shimamoto <dentostar@gmail.com>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: ja_JP\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x;_ex;_nx\n"
|
||||||
|
"X-Poedit-Basepath: .\n"
|
||||||
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
|
"X-Generator: Poedit 2.2.4\n"
|
||||||
|
"X-Poedit-SearchPath-0: ..\n"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:55 ../wp-gpx-maps_admin.php:50
|
||||||
|
#: ../wp-gpx-maps_admin.php:102
|
||||||
|
msgid "Settings"
|
||||||
|
msgstr "設定"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:752
|
||||||
|
msgid "Altitude"
|
||||||
|
msgstr "標高"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:753
|
||||||
|
msgid "Current position"
|
||||||
|
msgstr "現在位置"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:754
|
||||||
|
msgid "Speed"
|
||||||
|
msgstr "ペース"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:755
|
||||||
|
msgid "Grade"
|
||||||
|
msgstr "グレード"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:756
|
||||||
|
msgid "Heart rate"
|
||||||
|
msgstr "心拍数"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:757
|
||||||
|
msgid "Temperature"
|
||||||
|
msgstr "気温"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:758
|
||||||
|
msgid "Cadence"
|
||||||
|
msgstr "ケイデンス"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:759
|
||||||
|
msgid "Go full screen"
|
||||||
|
msgstr "全画面表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:760
|
||||||
|
msgid "Exit full screen"
|
||||||
|
msgstr "全画面を閉じる"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:761
|
||||||
|
msgid "Hide images"
|
||||||
|
msgstr "画像を非表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:762
|
||||||
|
msgid "Show images"
|
||||||
|
msgstr "画像を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:763
|
||||||
|
msgid "Back to center"
|
||||||
|
msgstr "中心に戻る"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:776
|
||||||
|
msgid "Total distance"
|
||||||
|
msgstr "合計距離"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:780
|
||||||
|
msgid "Max elevation"
|
||||||
|
msgstr "最高点の標高"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:782
|
||||||
|
msgid "Min elevation"
|
||||||
|
msgstr "最低点の標高"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:784
|
||||||
|
msgid "Total climbing"
|
||||||
|
msgstr "累積標高(上り)"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:786
|
||||||
|
msgid "Total descent"
|
||||||
|
msgstr "累積標高(下り)"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:789
|
||||||
|
msgid "Average speed"
|
||||||
|
msgstr "平均ペース"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:792
|
||||||
|
msgid "Average cadence"
|
||||||
|
msgstr "平均ケイデンス"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:795
|
||||||
|
msgid "Average heart rate"
|
||||||
|
msgstr "平均心拍数"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:798
|
||||||
|
msgid "Average temperature"
|
||||||
|
msgstr "平均気温"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:802
|
||||||
|
msgid "Total time"
|
||||||
|
msgstr "総所要時間"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps.php:816 ../wp-gpx-maps_admin_tracks.php:183
|
||||||
|
msgid "Download"
|
||||||
|
msgstr "ダウンロード"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin.php:49 ../wp-gpx-maps_admin.php:56
|
||||||
|
msgid "Tracks"
|
||||||
|
msgstr "GPS軌跡"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin.php:51 ../wp-gpx-maps_admin.php:57
|
||||||
|
msgid "Help"
|
||||||
|
msgstr "ヘルプ"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin.php:116
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Can not create the folder %1s for GPX files. Please create the folder and "
|
||||||
|
"make it writable! If not, you will must update the files manually!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin.php:133
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Can not create the cache folder %1s for the GPX files. Please create the "
|
||||||
|
"folder and make it writable! If not, you will must update the files manually!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:62 ../wp-gpx-maps_help.php:69
|
||||||
|
msgid "General"
|
||||||
|
msgstr "一般設定"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:68
|
||||||
|
msgid "Map width:"
|
||||||
|
msgstr "地図の横幅(px):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:77
|
||||||
|
msgid "Map height:"
|
||||||
|
msgstr "地図の高さ(px):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:86
|
||||||
|
msgid "Graph height:"
|
||||||
|
msgstr "グラフの高さ(px):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:95
|
||||||
|
msgid "Distance type:"
|
||||||
|
msgstr "距離の計算:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:99
|
||||||
|
msgid "Normal (default)"
|
||||||
|
msgstr "デフォルト (地形に従う)"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:100
|
||||||
|
msgid "Flat → (Only flat distance, don’t take care of altitude)"
|
||||||
|
msgstr "平面 → (上り下りを含まない水平距離)"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:101
|
||||||
|
msgid "Climb ↑ (Only climb distance)"
|
||||||
|
msgstr "登りのみ ↑"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:108
|
||||||
|
msgid "Cache:"
|
||||||
|
msgstr "キャッシュ:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:115
|
||||||
|
msgid "Do not use cache"
|
||||||
|
msgstr "データをキャッシュしない"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:123
|
||||||
|
msgid "GPX Download:"
|
||||||
|
msgstr "ダウンロード:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:130 ../wp-gpx-maps_help.php:139
|
||||||
|
msgid "Allow users to download your GPX file"
|
||||||
|
msgstr "GPXファイルのダウンロードを許可"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:138
|
||||||
|
msgid "Use browser GPS position:"
|
||||||
|
msgstr "ブラウザのGPS位置情報を使用:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:145
|
||||||
|
msgid ""
|
||||||
|
"Allow users to use browser GPS in order to display their current position on "
|
||||||
|
"map"
|
||||||
|
msgstr "ブラウザのGPSを利用した現在地表示を許可"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:153
|
||||||
|
msgid "Thunderforest API Key (Open Cycle Map):"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:161
|
||||||
|
msgid ""
|
||||||
|
"Go to <a href=\"%1$1s\" %2&2s>Thunderforest API Key</a> and signing in to "
|
||||||
|
"your Thunderforest account."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:175 ../wp-gpx-maps_admin_settings.php:359
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:535 ../wp-gpx-maps_admin_settings.php:754
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:823
|
||||||
|
msgid "Save Changes"
|
||||||
|
msgstr "変更を保存"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:186 ../wp-gpx-maps_help.php:693
|
||||||
|
msgid "Summary table"
|
||||||
|
msgstr "サマリー表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:192
|
||||||
|
msgid "Summary table:"
|
||||||
|
msgstr "サマリー表示:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:199 ../wp-gpx-maps_help.php:715
|
||||||
|
msgid "Print summary details of your GPX track"
|
||||||
|
msgstr "GPX軌跡データのサマリーを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:207
|
||||||
|
msgid "Total distance:"
|
||||||
|
msgstr "合計距離:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:214
|
||||||
|
msgid "Print total distance"
|
||||||
|
msgstr "合計距離を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:222
|
||||||
|
msgid "Max elevation:"
|
||||||
|
msgstr "最高点の標高:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:229
|
||||||
|
msgid "Print max elevation"
|
||||||
|
msgstr "最高点の標高を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:237
|
||||||
|
msgid "Min elevation:"
|
||||||
|
msgstr "最低点の標高:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:244
|
||||||
|
msgid "Print min elevation"
|
||||||
|
msgstr "最低点の標高を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:252
|
||||||
|
msgid "Total climbing:"
|
||||||
|
msgstr "累積標高(上り):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:259
|
||||||
|
msgid "Print total climbing"
|
||||||
|
msgstr "累積標高(上り)を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:267
|
||||||
|
msgid "Total descent:"
|
||||||
|
msgstr "累積標高(下り):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:274
|
||||||
|
msgid "Print total descent"
|
||||||
|
msgstr "累積標高(下り)を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:281
|
||||||
|
msgid "Average speed:"
|
||||||
|
msgstr "平均ペース:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:288
|
||||||
|
msgid "Print average speed"
|
||||||
|
msgstr "平均ペースを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:296
|
||||||
|
msgid "Average cadence:"
|
||||||
|
msgstr "平均ケイデンス:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:303
|
||||||
|
msgid "Print average cadence"
|
||||||
|
msgstr "平均ケイデンスを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:311
|
||||||
|
msgid "Average heart rate:"
|
||||||
|
msgstr "平均心拍数:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:318
|
||||||
|
msgid "Print average heart rate"
|
||||||
|
msgstr "平均心拍数を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:326
|
||||||
|
msgid "Average temperature:"
|
||||||
|
msgstr "平均気温:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:333
|
||||||
|
msgid "Print average temperature"
|
||||||
|
msgstr "平均気温を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:341
|
||||||
|
msgid "Total time:"
|
||||||
|
msgstr "総所要時間:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:348
|
||||||
|
msgid "Print total time"
|
||||||
|
msgstr "総所要時間を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:370 ../wp-gpx-maps_help.php:177
|
||||||
|
msgid "Map"
|
||||||
|
msgstr "地図"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:377
|
||||||
|
msgid "Default map type:"
|
||||||
|
msgstr "デフォルトの地図:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:383 ../wp-gpx-maps_help.php:204
|
||||||
|
msgid "Open Street Map"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:389 ../wp-gpx-maps_help.php:206
|
||||||
|
msgid "Open Cycle Map"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:395 ../wp-gpx-maps_help.php:208
|
||||||
|
msgid "Open Cycle Map - Transport"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:401 ../wp-gpx-maps_help.php:210
|
||||||
|
msgid "Open Cycle Map - Landscape"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:407 ../wp-gpx-maps_help.php:212
|
||||||
|
msgid "MapToolKit - Terrain"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:413 ../wp-gpx-maps_help.php:214
|
||||||
|
msgid "Open Street Map - Humanitarian map style"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:419 ../wp-gpx-maps_help.php:216
|
||||||
|
msgid "Hike & Bike"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:425 ../wp-gpx-maps_help.php:218
|
||||||
|
msgid "Open Sea Map"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:433
|
||||||
|
msgid "Map line color:"
|
||||||
|
msgstr "地図上のGPX軌跡色:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:442
|
||||||
|
msgid "On mouse scroll wheel:"
|
||||||
|
msgstr "マウスのスクロール:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:449
|
||||||
|
msgid "Enable zoom"
|
||||||
|
msgstr "ズームを有効にする"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:457
|
||||||
|
msgid "Waypoints support:"
|
||||||
|
msgstr "地点データ:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:464
|
||||||
|
msgid "Show waypoints"
|
||||||
|
msgstr "地点データを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:472
|
||||||
|
msgid "Start track icon:"
|
||||||
|
msgstr "スタート地点のアイコン指定:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:477 ../wp-gpx-maps_admin_settings.php:489
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:501 ../wp-gpx-maps_admin_settings.php:513
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:525
|
||||||
|
msgid "(URL to image) Leave empty to hide."
|
||||||
|
msgstr "(画像URL) 非表示の場合は空欄."
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:484
|
||||||
|
msgid "End track icon:"
|
||||||
|
msgstr "ゴール地点のアイコン指定:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:496
|
||||||
|
msgid "Current position icon:"
|
||||||
|
msgstr "現在位置のアイコン:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:508
|
||||||
|
msgid "Current GPS position icon:"
|
||||||
|
msgstr "現在位置(GPS)のアイコン:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:520
|
||||||
|
msgid "Custom waypoint icon:"
|
||||||
|
msgstr "地点データのアイコン指定:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:546
|
||||||
|
msgid "Chart"
|
||||||
|
msgstr "チャート"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:553
|
||||||
|
msgid "Altitude:"
|
||||||
|
msgstr "標高:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:560
|
||||||
|
msgid "Show altitude"
|
||||||
|
msgstr "標高グラフを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:569
|
||||||
|
msgid "Altitude line color:"
|
||||||
|
msgstr "標高推移線の色:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:578
|
||||||
|
msgid "Unit of measure:"
|
||||||
|
msgstr "長さの単位 (標高 / 距離):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:582 ../wp-gpx-maps_help.php:378
|
||||||
|
msgid "meters / meters"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:583 ../wp-gpx-maps_help.php:380
|
||||||
|
msgid "feet / miles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:584 ../wp-gpx-maps_help.php:382
|
||||||
|
msgid "meters / kilometers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:585 ../wp-gpx-maps_help.php:384
|
||||||
|
msgid "meters / nautical miles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:586 ../wp-gpx-maps_help.php:386
|
||||||
|
msgid "meters / miles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:587 ../wp-gpx-maps_help.php:388
|
||||||
|
msgid "feet / nautical miles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:594
|
||||||
|
msgid "Altitude display offset:"
|
||||||
|
msgstr "標高誤差オフセット:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:597 ../wp-gpx-maps_admin_settings.php:645
|
||||||
|
msgid "From"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:599 ../wp-gpx-maps_admin_settings.php:647
|
||||||
|
msgid "to"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:601 ../wp-gpx-maps_admin_settings.php:649
|
||||||
|
msgid "(leave empty for auto scale)"
|
||||||
|
msgstr "(空欄で自動調整されます)"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:607
|
||||||
|
msgid "Speed:"
|
||||||
|
msgstr "ペース:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:610
|
||||||
|
msgid "Show speed"
|
||||||
|
msgstr "ペースを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:616
|
||||||
|
msgid "Speed line color:"
|
||||||
|
msgstr "ペース推移線の色:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:625
|
||||||
|
msgid "Speed unit of measure:"
|
||||||
|
msgstr "ペースの単位:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:629 ../wp-gpx-maps_help.php:453
|
||||||
|
msgid "m/s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:630 ../wp-gpx-maps_help.php:455
|
||||||
|
msgid "km/h"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:631 ../wp-gpx-maps_help.php:457
|
||||||
|
msgid "miles/h"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:632 ../wp-gpx-maps_help.php:459
|
||||||
|
msgid "min/km"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:633 ../wp-gpx-maps_help.php:461
|
||||||
|
msgid "min/miles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:634 ../wp-gpx-maps_help.php:463
|
||||||
|
msgid "Knots (nautical miles / hour)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:635 ../wp-gpx-maps_help.php:465
|
||||||
|
msgid "min/100 meters"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:642
|
||||||
|
msgid "Speed display offset:"
|
||||||
|
msgstr "ペース誤差オフセット:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:655
|
||||||
|
msgid "Heart rate (where aviable):"
|
||||||
|
msgstr "心拍数(データがある場合):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:662
|
||||||
|
msgid "Show heart rate"
|
||||||
|
msgstr "心拍数を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:670
|
||||||
|
msgid "Heart rate line color:"
|
||||||
|
msgstr "心拍数グラフ推移線の色:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:679
|
||||||
|
msgid "Temperature (where aviable):"
|
||||||
|
msgstr "気温(データがある場合):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:686
|
||||||
|
msgid "Show temperature"
|
||||||
|
msgstr "気温を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:694
|
||||||
|
msgid "Temperature line color:"
|
||||||
|
msgstr "気温推移線の色:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:703
|
||||||
|
msgid "Cadence (where aviable):"
|
||||||
|
msgstr "ケイデンス(データがある場合):"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:710
|
||||||
|
msgid "Show cadence"
|
||||||
|
msgstr "ケイデンスを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:718
|
||||||
|
msgid "Cadence line color:"
|
||||||
|
msgstr "ケイデンス推移線の色:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:727
|
||||||
|
msgid "Grade:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:734
|
||||||
|
msgid ""
|
||||||
|
"Show grade - BETA (Grade values depends on your GPS accuracy. If you have a "
|
||||||
|
"poor GPS accuracy they might be totally wrong!)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:742
|
||||||
|
msgid "Grade line color:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:765
|
||||||
|
msgid "Advanced Options"
|
||||||
|
msgstr "詳細設定"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:768
|
||||||
|
msgid "(Do not edit if you don’t know what you are doing!)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:775
|
||||||
|
msgid "Skip GPX points closer than:"
|
||||||
|
msgstr "隣接したGPS位置座標:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:782
|
||||||
|
msgid "meters"
|
||||||
|
msgstr "m未満を間引き"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:790
|
||||||
|
msgid "Reduce GPX:"
|
||||||
|
msgstr "GPXの自動縮小:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:797
|
||||||
|
msgid "Do not reduce GPX"
|
||||||
|
msgstr "GPXを自動縮小しない"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:805
|
||||||
|
msgid "User upload:"
|
||||||
|
msgstr "アップロード:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_settings.php:812
|
||||||
|
msgid "Allow registered user to upload GPX files"
|
||||||
|
msgstr "登録ユーザーにGPXアップロードを許可"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:30
|
||||||
|
msgid "Cache is now empty!"
|
||||||
|
msgstr "キャッシュは空です!"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:45
|
||||||
|
msgid "Choose a file to upload:"
|
||||||
|
msgstr "ファイルを選択:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:57
|
||||||
|
#, php-format
|
||||||
|
msgid "The file %1s has been successfully uploaded."
|
||||||
|
msgstr "%1s はアップロード完了しました."
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:63
|
||||||
|
msgid "There was an error uploading the file, please try again!"
|
||||||
|
msgstr "アップロード中にエラーが発生したため、もう一度お試し下さい!"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:68
|
||||||
|
msgid "The file type is not supported!"
|
||||||
|
msgstr "ファイルの拡張子がサポート対象外です!"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:77
|
||||||
|
msgid "Clear Cache"
|
||||||
|
msgstr "キャッシュを空にする"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:94
|
||||||
|
#, php-format
|
||||||
|
msgid ""
|
||||||
|
"Your folder for GPX files %1s is not writable. Please change the folder "
|
||||||
|
"permissions."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:121
|
||||||
|
#, php-format
|
||||||
|
msgid "The file %1s has been successfully deleted."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:129
|
||||||
|
#, php-format
|
||||||
|
msgid "The file %1s could not be deleted."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:167
|
||||||
|
msgid "Uploading file..."
|
||||||
|
msgstr "ファイルをアップロード中…"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:175
|
||||||
|
msgid "File"
|
||||||
|
msgstr "ファイル"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:181
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "削除"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:185
|
||||||
|
msgid "Copy shortcode"
|
||||||
|
msgstr "ショートコードをコピー"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:185
|
||||||
|
msgid "Shortcode:"
|
||||||
|
msgstr "ショートコード:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:191
|
||||||
|
msgid "Last modified"
|
||||||
|
msgstr "最終更新"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:199
|
||||||
|
msgid "File size"
|
||||||
|
msgstr "サイズ"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_admin_tracks.php:209
|
||||||
|
msgid "Are you sure you want to delete the file?"
|
||||||
|
msgstr "削除してよろしいですか?"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:7
|
||||||
|
msgid "FAQ"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:10
|
||||||
|
msgid "How can I upload the GPX files?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:13
|
||||||
|
msgid ""
|
||||||
|
"1. Method: Upload the GPX file using the uploader in the tab \"Tracks\"."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:18
|
||||||
|
msgid "2. Method: Upload the GPX file via FTP to your upload folder:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:24
|
||||||
|
msgid "How can I use the GPX files?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:27
|
||||||
|
msgid ""
|
||||||
|
"Go to the tab \"Tracks\" and copy the shortcode from the list and paste it "
|
||||||
|
"in the page or post."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:32
|
||||||
|
msgid ""
|
||||||
|
"You can manually set the relative path to your GPX file. Please use this "
|
||||||
|
"scheme:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:38
|
||||||
|
msgid "Can I also integrate GPX files from other sites?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:43
|
||||||
|
msgid "Yes, it’s possible. Please use this scheme:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:49
|
||||||
|
msgid "Can I change the attributes for each GPX shortcode?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:52
|
||||||
|
msgid ""
|
||||||
|
"Yes, it’s possible. These changes ignore the default settings for each "
|
||||||
|
"attribute."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:57
|
||||||
|
msgid ""
|
||||||
|
"The Full set of optional attributes can be found below. Please use this "
|
||||||
|
"scheme:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:60
|
||||||
|
msgid "read below all the optional attributes"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:74 ../wp-gpx-maps_help.php:182
|
||||||
|
#: ../wp-gpx-maps_help.php:326 ../wp-gpx-maps_help.php:633
|
||||||
|
#: ../wp-gpx-maps_help.php:698 ../wp-gpx-maps_help.php:902
|
||||||
|
msgid "Shortcode"
|
||||||
|
msgstr "ショートコード"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:77 ../wp-gpx-maps_help.php:185
|
||||||
|
#: ../wp-gpx-maps_help.php:329 ../wp-gpx-maps_help.php:636
|
||||||
|
#: ../wp-gpx-maps_help.php:701 ../wp-gpx-maps_help.php:905
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "説明"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:80 ../wp-gpx-maps_help.php:188
|
||||||
|
#: ../wp-gpx-maps_help.php:332 ../wp-gpx-maps_help.php:639
|
||||||
|
#: ../wp-gpx-maps_help.php:704 ../wp-gpx-maps_help.php:908
|
||||||
|
msgid "Possible values"
|
||||||
|
msgstr "入力可能値"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:83 ../wp-gpx-maps_help.php:191
|
||||||
|
#: ../wp-gpx-maps_help.php:335 ../wp-gpx-maps_help.php:707
|
||||||
|
#: ../wp-gpx-maps_help.php:911
|
||||||
|
msgid "Current value"
|
||||||
|
msgstr "現在値"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:91
|
||||||
|
msgid "relative path to the GPX file"
|
||||||
|
msgstr "gpxファイルへの相対パス"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:103
|
||||||
|
msgid "Map width"
|
||||||
|
msgstr "地図の横幅"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:106
|
||||||
|
msgid "Value in percent"
|
||||||
|
msgstr "値(%)"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:115
|
||||||
|
msgid "Map height"
|
||||||
|
msgstr "地図の高さ"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:118 ../wp-gpx-maps_help.php:130
|
||||||
|
msgid "Value in pixels"
|
||||||
|
msgstr "値(px)"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:127
|
||||||
|
msgid "Graph height"
|
||||||
|
msgstr "グラフの高さ"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:143 ../wp-gpx-maps_help.php:159
|
||||||
|
#: ../wp-gpx-maps_help.php:231 ../wp-gpx-maps_help.php:247
|
||||||
|
#: ../wp-gpx-maps_help.php:263 ../wp-gpx-maps_help.php:347
|
||||||
|
#: ../wp-gpx-maps_help.php:363 ../wp-gpx-maps_help.php:422
|
||||||
|
#: ../wp-gpx-maps_help.php:438 ../wp-gpx-maps_help.php:499
|
||||||
|
#: ../wp-gpx-maps_help.php:515 ../wp-gpx-maps_help.php:530
|
||||||
|
#: ../wp-gpx-maps_help.php:546 ../wp-gpx-maps_help.php:562
|
||||||
|
#: ../wp-gpx-maps_help.php:578 ../wp-gpx-maps_help.php:594
|
||||||
|
#: ../wp-gpx-maps_help.php:610 ../wp-gpx-maps_help.php:669
|
||||||
|
#: ../wp-gpx-maps_help.php:719 ../wp-gpx-maps_help.php:735
|
||||||
|
#: ../wp-gpx-maps_help.php:751 ../wp-gpx-maps_help.php:767
|
||||||
|
#: ../wp-gpx-maps_help.php:783 ../wp-gpx-maps_help.php:799
|
||||||
|
#: ../wp-gpx-maps_help.php:815 ../wp-gpx-maps_help.php:831
|
||||||
|
#: ../wp-gpx-maps_help.php:847 ../wp-gpx-maps_help.php:863
|
||||||
|
#: ../wp-gpx-maps_help.php:879 ../wp-gpx-maps_help.php:923
|
||||||
|
#: ../wp-gpx-maps_help.php:939
|
||||||
|
msgid "Default is:"
|
||||||
|
msgstr "デフォルト:"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:155
|
||||||
|
msgid "Do not use cache. If TRUE might be very slow"
|
||||||
|
msgstr "キャッシュ不使用 (注)重くなる可能性があります"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:199
|
||||||
|
msgid "Map type"
|
||||||
|
msgstr "地図の選択"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:227
|
||||||
|
msgid "Map line color"
|
||||||
|
msgstr "GPX軌跡線の色"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:243
|
||||||
|
msgid "Zoom on map when mouse scroll wheel"
|
||||||
|
msgstr "スクロールでズーム"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:259
|
||||||
|
msgid "Print the GPX waypoints inside the map"
|
||||||
|
msgstr "GPX地点データを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:275
|
||||||
|
msgid "Start track icon"
|
||||||
|
msgstr "スタート地点のアイコン"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:285
|
||||||
|
msgid "End track icon"
|
||||||
|
msgstr "ゴール地点のアイコン"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:295
|
||||||
|
msgid "Current position icon (when mouse hover)"
|
||||||
|
msgstr "現在地のアイコン"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:305
|
||||||
|
msgid "Custom waypoint icon"
|
||||||
|
msgstr "地点データのアイコン"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:321
|
||||||
|
msgid "Diagram"
|
||||||
|
msgstr "ダイアグラム"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:343
|
||||||
|
msgid "Show elevation data inside the chart"
|
||||||
|
msgstr "標高チャートを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:359
|
||||||
|
msgid "Altitude line color"
|
||||||
|
msgstr "標高推移線の色"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:375
|
||||||
|
msgid "Distance / Altitude unit of measure"
|
||||||
|
msgstr "距離 / 標高 の単位"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:398
|
||||||
|
msgid "Minimum value for altitude chart"
|
||||||
|
msgstr "標高チャートの最低値"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:408
|
||||||
|
msgid "Maximum value for altitude chart"
|
||||||
|
msgstr "標高チャートの最高値"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:418
|
||||||
|
msgid "Show speed inside the chart"
|
||||||
|
msgstr "ペースチャートを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:434
|
||||||
|
msgid "Speed line color"
|
||||||
|
msgstr "ペース推移線の色"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:450
|
||||||
|
msgid "Speed unit of measure"
|
||||||
|
msgstr "ペースの単位"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:475
|
||||||
|
msgid "Minimum value for speed chart"
|
||||||
|
msgstr "ペースチャートの最低値"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:485
|
||||||
|
msgid "Maximum value for speed chart"
|
||||||
|
msgstr "ペースチャートの最高値"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:495
|
||||||
|
msgid "Show heart rate inside the chart"
|
||||||
|
msgstr "心拍数チャートを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:511
|
||||||
|
msgid "Heart rate line color"
|
||||||
|
msgstr "心拍数推移線の色"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:526
|
||||||
|
msgid "Show temperature inside the chart"
|
||||||
|
msgstr "気温チャートを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:542
|
||||||
|
msgid "Temperature line color"
|
||||||
|
msgstr "気温推移線の色"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:558
|
||||||
|
msgid "Show cadence inside the chart"
|
||||||
|
msgstr "ケイデンスチャートを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:574
|
||||||
|
msgid "Cadence line color"
|
||||||
|
msgstr "ケイデンス推移線の色"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:590
|
||||||
|
msgid "Show grade inside the chart"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:606
|
||||||
|
msgid "Grade line color"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:628
|
||||||
|
msgid "Pictures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:647
|
||||||
|
msgid "NextGen Gallery"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:650
|
||||||
|
msgid "Gallery ID or a list of Galleries ID separated by a comma"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:656
|
||||||
|
msgid "NextGen Image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:659
|
||||||
|
msgid "Image ID or a list of Images ID separated by a comma"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:665
|
||||||
|
msgid "Show all images that are attached to post"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:678
|
||||||
|
msgid "The difference between your GPX tool date and your camera date"
|
||||||
|
msgstr "カメラ撮影時刻の時差調整"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:681
|
||||||
|
msgid "Value in seconds"
|
||||||
|
msgstr "秒単位"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:731
|
||||||
|
msgid "Print total distance in summary table"
|
||||||
|
msgstr "サマリーに合計距離を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:747
|
||||||
|
msgid "Print max. elevation in summary table"
|
||||||
|
msgstr "サマリーに最高点の標高を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:763
|
||||||
|
msgid "Print min. elevation in summary table"
|
||||||
|
msgstr "サマリーに最低点の標高を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:779
|
||||||
|
msgid "Print total climbing in summary table"
|
||||||
|
msgstr "サマリーに累積標高(上り)を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:795
|
||||||
|
msgid "Print total descent in summary table"
|
||||||
|
msgstr "サマリーに累積標高(下り)を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:811
|
||||||
|
msgid "Print average speed in summary table"
|
||||||
|
msgstr "サマリーに平均ペースを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:827
|
||||||
|
msgid "Print average cadence in summary table"
|
||||||
|
msgstr "サマリーに平均ケイデンスを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:843
|
||||||
|
msgid "Print average heart rate in summary table"
|
||||||
|
msgstr "サマリーに平均心拍数を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:859
|
||||||
|
msgid "Print average temperature in summary table"
|
||||||
|
msgstr "サマリーに平均気温を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:875
|
||||||
|
msgid "Print total time in summary table"
|
||||||
|
msgstr "サマリーに総所要時間を表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:897
|
||||||
|
msgid "Advanced"
|
||||||
|
msgstr "詳細"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:919
|
||||||
|
msgid "Skip GPX points closer than XX meters"
|
||||||
|
msgstr "2地点間の距離が XX m未満のGPS座標を間引き"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:935
|
||||||
|
msgid "Print all the GPX waypoints without reduce it"
|
||||||
|
msgstr "間引きせず全てのGPX地点データを表示"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_help.php:954
|
||||||
|
msgid "Bugs, problems, thanks and anything else here!"
|
||||||
|
msgstr "バグ、動作不具合その他全てはこちらへ!"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_utils.php:150
|
||||||
|
msgid "WP GPX Maps Error: GPX file not found!"
|
||||||
|
msgstr "エラー:GPXファイルが見つかりません!"
|
||||||
|
|
||||||
|
#: ../wp-gpx-maps_utils.php:539
|
||||||
|
msgid "WP GPX Maps Error: Can’t parse xml file!"
|
||||||
|
msgstr "エラー:XMLファイルをパース出来ません!"
|
BIN
layers-2x.png
Before Width: | Height: | Size: 1.2 KiB |
BIN
layers.png
Before Width: | Height: | Size: 696 B |
13926
leaflet-src.esm.js
14020
leaflet-src.js
640
leaflet.css
|
@ -1,640 +0,0 @@
|
||||||
/* required styles */
|
|
||||||
|
|
||||||
.leaflet-pane,
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow,
|
|
||||||
.leaflet-tile-container,
|
|
||||||
.leaflet-pane > svg,
|
|
||||||
.leaflet-pane > canvas,
|
|
||||||
.leaflet-zoom-box,
|
|
||||||
.leaflet-image-layer,
|
|
||||||
.leaflet-layer {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-user-drag: none;
|
|
||||||
}
|
|
||||||
/* Prevents IE11 from highlighting tiles in blue */
|
|
||||||
.leaflet-tile::selection {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
|
||||||
.leaflet-safari .leaflet-tile {
|
|
||||||
image-rendering: -webkit-optimize-contrast;
|
|
||||||
}
|
|
||||||
/* hack that prevents hw layers "stretching" when loading new tiles */
|
|
||||||
.leaflet-safari .leaflet-tile-container {
|
|
||||||
width: 1600px;
|
|
||||||
height: 1600px;
|
|
||||||
-webkit-transform-origin: 0 0;
|
|
||||||
}
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
|
||||||
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
|
||||||
.leaflet-container .leaflet-overlay-pane svg,
|
|
||||||
.leaflet-container .leaflet-marker-pane img,
|
|
||||||
.leaflet-container .leaflet-shadow-pane img,
|
|
||||||
.leaflet-container .leaflet-tile-pane img,
|
|
||||||
.leaflet-container img.leaflet-image-layer,
|
|
||||||
.leaflet-container .leaflet-tile {
|
|
||||||
max-width: none !important;
|
|
||||||
max-height: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-container.leaflet-touch-zoom {
|
|
||||||
-ms-touch-action: pan-x pan-y;
|
|
||||||
touch-action: pan-x pan-y;
|
|
||||||
}
|
|
||||||
.leaflet-container.leaflet-touch-drag {
|
|
||||||
-ms-touch-action: pinch-zoom;
|
|
||||||
/* Fallback for FF which doesn't support pinch-zoom */
|
|
||||||
touch-action: none;
|
|
||||||
touch-action: pinch-zoom;
|
|
||||||
}
|
|
||||||
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
|
|
||||||
-ms-touch-action: none;
|
|
||||||
touch-action: none;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
-webkit-tap-highlight-color: transparent;
|
|
||||||
}
|
|
||||||
.leaflet-container a {
|
|
||||||
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
|
|
||||||
}
|
|
||||||
.leaflet-tile {
|
|
||||||
filter: inherit;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-tile-loaded {
|
|
||||||
visibility: inherit;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
z-index: 800;
|
|
||||||
}
|
|
||||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
|
||||||
.leaflet-overlay-pane svg {
|
|
||||||
-moz-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-pane { z-index: 400; }
|
|
||||||
|
|
||||||
.leaflet-tile-pane { z-index: 200; }
|
|
||||||
.leaflet-overlay-pane { z-index: 400; }
|
|
||||||
.leaflet-shadow-pane { z-index: 500; }
|
|
||||||
.leaflet-marker-pane { z-index: 600; }
|
|
||||||
.leaflet-tooltip-pane { z-index: 650; }
|
|
||||||
.leaflet-popup-pane { z-index: 700; }
|
|
||||||
|
|
||||||
.leaflet-map-pane canvas { z-index: 100; }
|
|
||||||
.leaflet-map-pane svg { z-index: 200; }
|
|
||||||
|
|
||||||
.leaflet-vml-shape {
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
.lvml {
|
|
||||||
behavior: url(#default#VML);
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* control positioning */
|
|
||||||
|
|
||||||
.leaflet-control {
|
|
||||||
position: relative;
|
|
||||||
z-index: 800;
|
|
||||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
.leaflet-top,
|
|
||||||
.leaflet-bottom {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1000;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.leaflet-top {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-right {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
.leaflet-bottom {
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.leaflet-left {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control {
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
.leaflet-top .leaflet-control {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* zoom and fade animations */
|
|
||||||
|
|
||||||
.leaflet-fade-anim .leaflet-tile {
|
|
||||||
will-change: opacity;
|
|
||||||
}
|
|
||||||
.leaflet-fade-anim .leaflet-popup {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity 0.2s linear;
|
|
||||||
-moz-transition: opacity 0.2s linear;
|
|
||||||
transition: opacity 0.2s linear;
|
|
||||||
}
|
|
||||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-animated {
|
|
||||||
-webkit-transform-origin: 0 0;
|
|
||||||
-ms-transform-origin: 0 0;
|
|
||||||
transform-origin: 0 0;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
|
||||||
will-change: transform;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
|
||||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-tile,
|
|
||||||
.leaflet-pan-anim .leaflet-tile {
|
|
||||||
-webkit-transition: none;
|
|
||||||
-moz-transition: none;
|
|
||||||
transition: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* cursors */
|
|
||||||
|
|
||||||
.leaflet-interactive {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.leaflet-grab {
|
|
||||||
cursor: -webkit-grab;
|
|
||||||
cursor: -moz-grab;
|
|
||||||
cursor: grab;
|
|
||||||
}
|
|
||||||
.leaflet-crosshair,
|
|
||||||
.leaflet-crosshair .leaflet-interactive {
|
|
||||||
cursor: crosshair;
|
|
||||||
}
|
|
||||||
.leaflet-popup-pane,
|
|
||||||
.leaflet-control {
|
|
||||||
cursor: auto;
|
|
||||||
}
|
|
||||||
.leaflet-dragging .leaflet-grab,
|
|
||||||
.leaflet-dragging .leaflet-grab .leaflet-interactive,
|
|
||||||
.leaflet-dragging .leaflet-marker-draggable {
|
|
||||||
cursor: move;
|
|
||||||
cursor: -webkit-grabbing;
|
|
||||||
cursor: -moz-grabbing;
|
|
||||||
cursor: grabbing;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* marker & overlays interactivity */
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow,
|
|
||||||
.leaflet-image-layer,
|
|
||||||
.leaflet-pane > svg path,
|
|
||||||
.leaflet-tile-container {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-marker-icon.leaflet-interactive,
|
|
||||||
.leaflet-image-layer.leaflet-interactive,
|
|
||||||
.leaflet-pane > svg path.leaflet-interactive,
|
|
||||||
svg.leaflet-image-layer.leaflet-interactive path {
|
|
||||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* visual tweaks */
|
|
||||||
|
|
||||||
.leaflet-container {
|
|
||||||
background: #ddd;
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container a {
|
|
||||||
color: #0078A8;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-active {
|
|
||||||
outline: 2px solid orange;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
border: 2px dotted #38f;
|
|
||||||
background: rgba(255,255,255,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general typography */
|
|
||||||
.leaflet-container {
|
|
||||||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general toolbar styles */
|
|
||||||
|
|
||||||
.leaflet-bar {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #fff;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
width: 26px;
|
|
||||||
height: 26px;
|
|
||||||
line-height: 26px;
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-position: 50% 50%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:hover {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:first-child {
|
|
||||||
border-top-left-radius: 4px;
|
|
||||||
border-top-right-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:last-child {
|
|
||||||
border-bottom-left-radius: 4px;
|
|
||||||
border-bottom-right-radius: 4px;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.leaflet-bar a.leaflet-disabled {
|
|
||||||
cursor: default;
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-bar a {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-bar a:first-child {
|
|
||||||
border-top-left-radius: 2px;
|
|
||||||
border-top-right-radius: 2px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-bar a:last-child {
|
|
||||||
border-bottom-left-radius: 2px;
|
|
||||||
border-bottom-right-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* zoom control */
|
|
||||||
|
|
||||||
.leaflet-control-zoom-in,
|
|
||||||
.leaflet-control-zoom-out {
|
|
||||||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
|
||||||
text-indent: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* layers control */
|
|
||||||
|
|
||||||
.leaflet-control-layers {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers.png);
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
}
|
|
||||||
.leaflet-retina .leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers-2x.png);
|
|
||||||
background-size: 26px 26px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers-toggle {
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers .leaflet-control-layers-list,
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded {
|
|
||||||
padding: 6px 10px 6px 6px;
|
|
||||||
color: #333;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-scrollbar {
|
|
||||||
overflow-y: scroll;
|
|
||||||
overflow-x: hidden;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-selector {
|
|
||||||
margin-top: 2px;
|
|
||||||
position: relative;
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers label {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-separator {
|
|
||||||
height: 0;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
margin: 5px -10px 5px -6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Default icon URLs */
|
|
||||||
.leaflet-default-icon-path {
|
|
||||||
background-image: url(images/marker-icon.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* attribution and scale controls */
|
|
||||||
|
|
||||||
.leaflet-container .leaflet-control-attribution {
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.7);
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution,
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
padding: 0 5px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
.leaflet-container .leaflet-control-attribution,
|
|
||||||
.leaflet-container .leaflet-control-scale {
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control-scale {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control-scale {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
border: 2px solid #777;
|
|
||||||
border-top: none;
|
|
||||||
line-height: 1.1;
|
|
||||||
padding: 2px 5px 1px;
|
|
||||||
font-size: 11px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.5);
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child) {
|
|
||||||
border-top: 2px solid #777;
|
|
||||||
border-bottom: none;
|
|
||||||
margin-top: -2px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
|
||||||
border-bottom: 2px solid #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-attribution,
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
border: 2px solid rgba(0,0,0,0.2);
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* popup */
|
|
||||||
|
|
||||||
.leaflet-popup {
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper {
|
|
||||||
padding: 1px;
|
|
||||||
text-align: left;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content {
|
|
||||||
margin: 13px 19px;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content p {
|
|
||||||
margin: 18px 0;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip-container {
|
|
||||||
width: 40px;
|
|
||||||
height: 20px;
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -20px;
|
|
||||||
overflow: hidden;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
width: 17px;
|
|
||||||
height: 17px;
|
|
||||||
padding: 1px;
|
|
||||||
|
|
||||||
margin: -10px auto 0;
|
|
||||||
|
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
-moz-transform: rotate(45deg);
|
|
||||||
-ms-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
background: white;
|
|
||||||
color: #333;
|
|
||||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
padding: 4px 4px 0 0;
|
|
||||||
border: none;
|
|
||||||
text-align: center;
|
|
||||||
width: 18px;
|
|
||||||
height: 14px;
|
|
||||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
|
||||||
color: #c3c3c3;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
.leaflet-popup-scrolled {
|
|
||||||
overflow: auto;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
|
||||||
zoom: 1;
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
width: 24px;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
|
||||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip-container {
|
|
||||||
margin-top: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-control-zoom,
|
|
||||||
.leaflet-oldie .leaflet-control-layers,
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
border: 1px solid #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* div icon */
|
|
||||||
|
|
||||||
.leaflet-div-icon {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Tooltip */
|
|
||||||
/* Base styles for the element that has a tooltip */
|
|
||||||
.leaflet-tooltip {
|
|
||||||
position: absolute;
|
|
||||||
padding: 6px;
|
|
||||||
background-color: #fff;
|
|
||||||
border: 1px solid #fff;
|
|
||||||
border-radius: 3px;
|
|
||||||
color: #222;
|
|
||||||
white-space: nowrap;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
pointer-events: none;
|
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
.leaflet-tooltip.leaflet-clickable {
|
|
||||||
cursor: pointer;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top:before,
|
|
||||||
.leaflet-tooltip-bottom:before,
|
|
||||||
.leaflet-tooltip-left:before,
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
position: absolute;
|
|
||||||
pointer-events: none;
|
|
||||||
border: 6px solid transparent;
|
|
||||||
background: transparent;
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Directions */
|
|
||||||
|
|
||||||
.leaflet-tooltip-bottom {
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top {
|
|
||||||
margin-top: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-bottom:before,
|
|
||||||
.leaflet-tooltip-top:before {
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top:before {
|
|
||||||
bottom: 0;
|
|
||||||
margin-bottom: -12px;
|
|
||||||
border-top-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-bottom:before {
|
|
||||||
top: 0;
|
|
||||||
margin-top: -12px;
|
|
||||||
margin-left: -6px;
|
|
||||||
border-bottom-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left {
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-right {
|
|
||||||
margin-left: 6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left:before,
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
top: 50%;
|
|
||||||
margin-top: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left:before {
|
|
||||||
right: 0;
|
|
||||||
margin-right: -12px;
|
|
||||||
border-left-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
left: 0;
|
|
||||||
margin-left: -12px;
|
|
||||||
border-right-color: #fff;
|
|
||||||
}
|
|
Before Width: | Height: | Size: 2.4 KiB |
BIN
marker-icon.png
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 618 B |
37
package.json
|
@ -1,25 +1,24 @@
|
||||||
{
|
{
|
||||||
"name": "leaflet.fullscreen",
|
"name": "wp-gpx-maps",
|
||||||
"version": "1.4.5",
|
"version": "1.0.0",
|
||||||
"description": "Simple plugin for Leaflet that adds fullscreen button to your maps.",
|
|
||||||
"main": "Control.FullScreen.js",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "eslint --config .eslintrc Control.FullScreen.js"
|
"dev": "vite",
|
||||||
|
"build": "vite build",
|
||||||
|
"serve": "vite preview"
|
||||||
},
|
},
|
||||||
"repository": {
|
"dependencies": {
|
||||||
"type": "git",
|
"@turf/turf": "^6.5.0",
|
||||||
"url": "git://github.com/brunob/leaflet.fullscreen.git"
|
"chart.js": "^4.4.7",
|
||||||
|
"leaflet": "^1.9.4",
|
||||||
|
"leaflet.fullscreen": "^3.0.2",
|
||||||
|
"leaflet.markercluster": "^1.5.3",
|
||||||
|
"mapbox-gl": "^3.9.4",
|
||||||
|
"mapbox-gl-style-switcher": "^1.0.11"
|
||||||
},
|
},
|
||||||
"keywords": [
|
|
||||||
"leaflet",
|
|
||||||
"plugins",
|
|
||||||
"maps",
|
|
||||||
"fullscreen"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "2.3.0"
|
"@types/leaflet": "^1.9.16",
|
||||||
},
|
"@types/leaflet.fullscreen": "^3.0.2",
|
||||||
"author": "b_b",
|
"typescript": "^4.0.0",
|
||||||
"license": "MIT License",
|
"vite": "^4.0.0"
|
||||||
"readmeFilename": "README.md"
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,436 @@
|
||||||
|
=== WP GPX Maps ===
|
||||||
|
|
||||||
|
Contributors: bastianonm, Stephan Klein, Michel Selerin, TosattoSimonePio, Kniebremser
|
||||||
|
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VHWLRW6JBTML
|
||||||
|
Tags: maps, gpx, gps, graph, chart, leaflet, track, garmin, image, nextgen-gallery, nextgen, exif, OpenStreetMap, OpenCycleMap, Hike&Bike, heart rate, heartrate, cadence
|
||||||
|
Requires at least: 6.2.0
|
||||||
|
Tested up to: 6.7.1
|
||||||
|
Requires PHP: 7.3+
|
||||||
|
Stable tag: 1.7.11
|
||||||
|
License: GPLv2 or later
|
||||||
|
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
|
Draws a GPX track with altitude graph. You can also display your nextgen gallery images in the map.
|
||||||
|
|
||||||
|
== Description ==
|
||||||
|
|
||||||
|
This plugin has, as input, the GPX file with the track you've made and as output it shows the map of the track and an interactive altitude graph (where available).
|
||||||
|
|
||||||
|
<strong>Fully configurable:</strong>
|
||||||
|
|
||||||
|
- Custom colors
|
||||||
|
- Custom icons
|
||||||
|
- Multiple language support
|
||||||
|
|
||||||
|
<strong>Supported charts:</strong>
|
||||||
|
|
||||||
|
- Altitude
|
||||||
|
- Speed
|
||||||
|
- Heart rate
|
||||||
|
- Temperature
|
||||||
|
- Cadence
|
||||||
|
- Grade
|
||||||
|
|
||||||
|
<strong>NextGen Gallery Integration:</strong>
|
||||||
|
|
||||||
|
Display your NextGen Gallery images inside the map!
|
||||||
|
Even if you don't have a GPS camera, this plugin can retrive the image position starting from the image date and your GPX file.
|
||||||
|
|
||||||
|
<strong>Post Attachments Integration:</strong>
|
||||||
|
|
||||||
|
This version is extended by: <a href="https://klein-gedruckt.de/2015/03/wordpress-plugin-wp-gpx-maps/" target="_blank" rel="noopener noreferrer">Stephan Klein</a> and supports displaying all images attached to a post without using NGG.
|
||||||
|
|
||||||
|
Try this plugin: <a href="https://devfarm.it/wp-gpx-maps-demo/" target="_blank" rel="noopener noreferrer">https://devfarm.it/wp-gpx-maps-demo/</a>
|
||||||
|
|
||||||
|
<strong>Support:</strong>
|
||||||
|
|
||||||
|
If you need help, please use: <a href="http://www.devfarm.it/forums/forum/wp-gpx-maps/" target="_blank" rel="noopener noreferrer">www.devfarm.it Support Forum</a>
|
||||||
|
|
||||||
|
Would you like to help fix bugs or further develop the plugin? On <a href="https://github.com/devfarm-it/wp-gpx-maps" target="_blank" rel="noopener noreferrer">Github</a> you can contribuite easly with your code.
|
||||||
|
|
||||||
|
<strong>Translations:</strong>
|
||||||
|
|
||||||
|
Translators are welcome to contribute to the plugin. Please use the <a href="https://translate.wordpress.org/projects/wp-plugins/wp-gpx-maps/)" target="_blank" rel="noopener noreferrer">WordPress translation website</a>.
|
||||||
|
|
||||||
|
The language files in the plugin contain 18 translatable texts for 13 languages:
|
||||||
|
|
||||||
|
- Catalan ca
|
||||||
|
- Dutch nl_NL
|
||||||
|
- English (default)
|
||||||
|
- French fr_FR
|
||||||
|
- Hungarian hu_HU
|
||||||
|
- Italian it_IT
|
||||||
|
- Norwegian nb_NO
|
||||||
|
- Polish pl_PL
|
||||||
|
- Portuguese (Brazilian) pt_BR
|
||||||
|
- Russian ru_RU
|
||||||
|
- Spanish es_ES
|
||||||
|
- Swedish sv_SE
|
||||||
|
- Turkish tr_TR
|
||||||
|
- Bulgarian bg_BG
|
||||||
|
- Slovak cs_CZ
|
||||||
|
- Norwegian nb_NO
|
||||||
|
- Japanese ja_JP
|
||||||
|
|
||||||
|
(Many thanks to all guys who helped me with the translations)
|
||||||
|
|
||||||
|
<strong>Supported GPX namespaces are:</strong>
|
||||||
|
|
||||||
|
1. http://www.topografix.com/GPX/1/0
|
||||||
|
|
||||||
|
1. <a href="http://www.topografix.com/GPX/1/1" target="_blank" rel="noopener noreferrer">www.topografix.com/GPX/1/1</a>
|
||||||
|
|
||||||
|
1. http://www.garmin.com/xmlschemas/GpxExtensions/v3
|
||||||
|
|
||||||
|
1. http://www.garmin.com/xmlschemas/TrackPointExtension/v1
|
||||||
|
|
||||||
|
Thanks to: <a href="http://www.securcube.net/" target="_blank" rel="noopener noreferrer">www.securcube.net</a>, <a href="http://www.devfarm.it/" target="_blank" rel="noopener noreferrer">www.devfarm.it</a>
|
||||||
|
|
||||||
|
Icons made by <a href="https://www.freepik.com/" target="_blank" rel="noopener noreferrer">Freepik</a> from <a href="https://www.flaticon.com/" target="_blank" rel="noopener noreferrer">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" target="_blank" rel="noopener noreferrer">Creative Commons BY 3.0</a>
|
||||||
|
|
||||||
|
== Installation ==
|
||||||
|
|
||||||
|
1. Use the classic wordpress plugin installer or copy the plugins folder to the `/wp-content/plugins/` directory
|
||||||
|
|
||||||
|
1. Activate the plugin through the 'Plugins' menu in WordPress
|
||||||
|
|
||||||
|
1. Add the shortcode [sgpx gpx=">relative path to your gpx<"] or [sgpx gpx=">http://somesite.com/files/yourfile.gpx<"]
|
||||||
|
|
||||||
|
== Frequently Asked Questions ==
|
||||||
|
|
||||||
|
= Which map types are available? =
|
||||||
|
|
||||||
|
You can use the following map types:
|
||||||
|
|
||||||
|
1. <strong>OSM1</strong> = Open Street Map (Default setting)
|
||||||
|
1. <strong>OSM2</strong> = Open Cycle Map / Thunderforest - Open Cycle Map (API Key required)
|
||||||
|
1. <strong>OSM3</strong> = Thunderforest - Outdoors (API Key required)
|
||||||
|
1. <strong>OSM4</strong> = Thunderforest - Transport (API Key required)
|
||||||
|
1. <strong>OSM5</strong> = Thunderforest - Landscape (API Key required)
|
||||||
|
1. <strong>OSM7</strong> = Open Street Map - Humanitarian map style
|
||||||
|
1. <strong>OSM9</strong> = Hike & Bike
|
||||||
|
1. <strong>OSM10</strong> = Open Sea Map
|
||||||
|
|
||||||
|
If you use the OpenCycleMap without the API key, a watermark appears on the card: "API Key required".
|
||||||
|
|
||||||
|
The Thunderforest maps Outdoors, Transport and Landscape are only displayed with an API Key.
|
||||||
|
|
||||||
|
= Which shortcode attributes are available? =
|
||||||
|
|
||||||
|
You can use the following shortcodes:
|
||||||
|
|
||||||
|
1. <strong>gpx:</strong> Relative path to the GPX file
|
||||||
|
1. <strong>width:</strong> Map width (Value in percent)
|
||||||
|
1. <strong>mheight:</strong> Map height (Value in pixeln)
|
||||||
|
1. <strong>gheight:</strong> Graph height (Value in pixeln)
|
||||||
|
1. <strong>skipcache:</strong> Do not use cache. If TRUE might be very slow (Default is false)
|
||||||
|
1. <strong>download:</strong> Allow users to download your GPX file (Default is false)
|
||||||
|
1. <strong>summary:</strong> Print summary details of your GPX track (Default is false)
|
||||||
|
1. <strong>summarytotlen:</strong> Print total distance in summary table (Default is false)
|
||||||
|
1. <strong>summarymaxele:</strong> Print max elevation in summary table (Default is false)
|
||||||
|
1. <strong>summaryminele:</strong> Print min Elevation in summary table (Default is false)
|
||||||
|
1. <strong>summaryeleup:</strong> Print total climbing in summary table (Default is false)
|
||||||
|
1. <strong>summaryeledown:</strong> Print total descent in summary table (Default is false)
|
||||||
|
1. <strong>summaryavgspeed:</strong> Print average Speed in summary table (Default is false)
|
||||||
|
1. <strong>summarytotaltime:</strong> Print total time in summary table (Default is false)
|
||||||
|
1. <strong>mtype:</strong> Map types
|
||||||
|
1. <strong>mlinecolor:</strong> Map line color (Default is #3366cc)
|
||||||
|
1. <strong>zoomonscrollwheel:</strong> Zoom on map when mouse scroll wheel (Default is false)
|
||||||
|
1. <strong>waypoints:</strong> Print the gpx waypoints inside the map (Default is false)
|
||||||
|
1. <strong>startIcon:</strong> Start track icon
|
||||||
|
1. <strong>endIcon:</strong> End track icon
|
||||||
|
1. <strong>currentIcon:</strong> Current position icon (when mouse hover)
|
||||||
|
1. <strong>waypointicon:</strong> Custom waypoint icon
|
||||||
|
1. <strong>showele:</strong> Show elevation data inside the chart (Default is true)
|
||||||
|
1. <strong>uom:</strong> Distance/altitude unit of measure
|
||||||
|
1. 0 = meters/meters (Default setting)
|
||||||
|
1. 1 = feet/miles
|
||||||
|
1. 2 = meters/kilometers
|
||||||
|
1. 3 = meters/nautical miles
|
||||||
|
1. 4 = meters/miles
|
||||||
|
1. 5 = feet/nautical miles
|
||||||
|
1. <strong>glinecolor:</strong> Altitude line color (Default is #3366cc)
|
||||||
|
1. <strong>chartFrom1:</strong> Minimun value for altitude chart
|
||||||
|
1. <strong>chartTo1:</strong> Maxumin value for altitude chart
|
||||||
|
1. <strong>showspeed:</strong> Show speed inside the chart (Default is false)
|
||||||
|
1. <strong>glinecolorspeed:</strong> Speed line color (Default is #ff0000)
|
||||||
|
1. <strong>uomspeed:</strong> Unit of measure for speed
|
||||||
|
1. 0 = m/s (Default setting)
|
||||||
|
1. 1 = km/h
|
||||||
|
1. 2 = miles/h
|
||||||
|
1. 3 = min/km
|
||||||
|
1. 4 = min/miles
|
||||||
|
1. 5 = Nautical Miles/Hour (Knots)
|
||||||
|
1. 6 = min/100 meters
|
||||||
|
1. <strong>chartFrom2:</strong> Minimun value for speed chart
|
||||||
|
1. <strong>chartTo2:</strong> Maxumin value for speed chart
|
||||||
|
1. <strong>showhr:</strong> Show heart rate inside the chart (Default is false)
|
||||||
|
1. <strong>glinecolorhr:</strong> Heart rate line color (Default is #ff77bd)
|
||||||
|
1. <strong>showatemp:</strong> Show temperature inside the chart (Default is false)
|
||||||
|
1. <strong>glinecoloratemp:</strong> Temperature line color (Default is #ff77bd)
|
||||||
|
1. <strong>showcad:</strong> Show cadence inside the chart (Default is false)
|
||||||
|
1. <strong>glinecolorcad:</strong> Cadence line color (Default is #beecff)
|
||||||
|
1. <strong>showgrade:</strong> Show grade inside the chart (Default is false)
|
||||||
|
1. <strong>glinecolorgrade:</strong> Grade line color (Default is #beecff)
|
||||||
|
1. <strong>nggalleries:</strong> NextGen Gallery id or a list of Galleries id separated by a comma
|
||||||
|
1. <strong>ngimages:</strong> NextGen Image id or a list of Images id separated by a comma
|
||||||
|
1. <strong>attachments:</strong> Show all images that are attached to post (Default is false)
|
||||||
|
1. <strong>dtoffset:</strong> The difference (in seconds) between your gpx tool date and your camera date
|
||||||
|
1. <strong>pointsoffset:</strong> Skip points closer than XX meters (Default is 10)
|
||||||
|
1. <strong>donotreducegpx:</strong> Print all the point without reduce it (Default is false)
|
||||||
|
|
||||||
|
= What happening if I've a very large GPX files? =
|
||||||
|
|
||||||
|
This plugin will print a small amout of points to speedup javascript and pageload.
|
||||||
|
|
||||||
|
= Is it free? =
|
||||||
|
|
||||||
|
Yes!
|
||||||
|
|
||||||
|
== Screenshots ==
|
||||||
|
1. Simple GPX
|
||||||
|
1. GPX with waypoints
|
||||||
|
1. Admin area - List of tracks
|
||||||
|
1. Admin area - Settings
|
||||||
|
1. Altitude & Speed
|
||||||
|
1. Altitude & Speed & Heart rate
|
||||||
|
|
||||||
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.8.00 =
|
||||||
|
* MapBox provider: needs ApiKey and brings a lot of new cool features like 3d maps and much more
|
||||||
|
= 1.7.10 =
|
||||||
|
* Fix security issues
|
||||||
|
= 1.7.06 =
|
||||||
|
* Fix vulnerability
|
||||||
|
= 1.7.05 =
|
||||||
|
* Fix NextGen warnings
|
||||||
|
= 1.7.04 =
|
||||||
|
* Fix php8+ errors
|
||||||
|
= 1.7.03 =
|
||||||
|
* fix download file link
|
||||||
|
* fix error with images exif parsing
|
||||||
|
= 1.7.02 =
|
||||||
|
* fix admin error
|
||||||
|
= 1.7.01 =
|
||||||
|
* General: Removed Maptoolkit (code OSM6) map provider. Requested by H.F. (Maptoolkit Managing director)
|
||||||
|
* General: Added new map type "Thunderforest - Outddors" (OSM3)
|
||||||
|
* Admin: Added admin notices in the dashboard
|
||||||
|
* Settings Tab: In the map selection changed to the correct maps provider from "Open Cycle Map"* Settings Tab: to "Thunderforest"
|
||||||
|
* Administration Tab: New Tab with the settings "Editor & Author upload" and "Show update notice"
|
||||||
|
* Help Tab: In the map selection changed to the correct maps provider from "Open Cycle Map" to "Thunderforest"
|
||||||
|
* Output: In the map selection changed to the correct maps provider from "Open Cycle Map" to "Thunderforest"
|
||||||
|
* Output: Fixed in map footer for each map, the corresponding map provider is displayed with URL
|
||||||
|
* Code: Added PHP version notices, WordPress 5.3 requires PHP 5.6.20
|
||||||
|
* Code: Added Missing entries for add and delete options
|
||||||
|
* Code: Style for output moved in a seperate CSS file
|
||||||
|
* Code: Adjustments a la WPCS
|
||||||
|
* Code: Small CSS design optimizations for the tabs
|
||||||
|
* Code: Upgrade bootstrap-table to 1.13.2
|
||||||
|
* Code: Removed german language file (now over translate.wordpress.org)
|
||||||
|
= 1.7.00 =
|
||||||
|
* Added: Authors can upload GPX tracks in a folder called as *your user name*, inside [../wp-upload dir/gpx/[*your user name*] (thanks to wildcomputations)
|
||||||
|
* Added: Authors an Admins can see the current values for shortcodes in help tab
|
||||||
|
* Added: Button to instant copy the shortcode of the selected GPX file in the tab track
|
||||||
|
* Added: different size logos for the plugin store (icon.svg, icon128x128.png and icon256x256.png) [inside ../plugins/wp-gpx-maps/assets]
|
||||||
|
* Changed: Settings tab is for non-Admin users is not more visible
|
||||||
|
* Tweak: Help tab is easier to read
|
||||||
|
* Tweak: Plugin is now complete translatable (Backend + Frontend)
|
||||||
|
* Tweak: WordPress coding standards
|
||||||
|
* Upgrade: Leaflet to 1.5.1
|
||||||
|
* Upgrade: leaflet.fullscreen to 1.4.5
|
||||||
|
* Upgrade: Chart.min.js to 2.8.0
|
||||||
|
= 1.6.07 =
|
||||||
|
* resolve admin error
|
||||||
|
= 1.6.06 =
|
||||||
|
* Added average values under the graph (thanks to cyclinggeorgian)
|
||||||
|
= 1.6.04 =
|
||||||
|
* NGG gallery is working
|
||||||
|
* Getting HR, Cad and Temp working again (thanks to cyclinggeorgian)
|
||||||
|
* Fix javascript errors
|
||||||
|
* Fix multiple traks gpx
|
||||||
|
= 1.6.03 =
|
||||||
|
* Fix syntax error causing graph not to display (thanks to nickstabler)
|
||||||
|
= 1.6.02 =
|
||||||
|
* Resolved errors with start and end icons
|
||||||
|
= 1.6.01 =
|
||||||
|
* Removed Gogole maps. Leafletjs instead.
|
||||||
|
* -- NextGen Gallery is not working, due next gen image format changed -- I'll fix soon
|
||||||
|
= 1.5.05 =
|
||||||
|
* renamed javascript functions to avoid collision with other plugins
|
||||||
|
* reduced chart line thickness
|
||||||
|
= 1.5.04 =
|
||||||
|
* fix uom
|
||||||
|
* fix file not found
|
||||||
|
= 1.5.03 =
|
||||||
|
* fix random error
|
||||||
|
= 1.5.02 =
|
||||||
|
* Security improvements
|
||||||
|
= 1.5.01 =
|
||||||
|
* Improved security
|
||||||
|
* Included javascript
|
||||||
|
* Multiple file upload
|
||||||
|
* Implemented sorting in file list
|
||||||
|
* Renamed internal function to improve wp compatibility
|
||||||
|
= 1.5.00 =
|
||||||
|
* replaced highcharts with chartjs. This is a forced choice due highcharts license issue, view: https://devfarm.it/wordpress-plugin/wordpress-plugin-directory-notice-wp-gpx-maps-temporarily-disabled/
|
||||||
|
= 1.3.16 =
|
||||||
|
* Added Norwegian nb_NO translation (thanks to thordivel)
|
||||||
|
* Added Japanese ja_JP translation (thanks to dentos)
|
||||||
|
= 1.3.15 =
|
||||||
|
* Switched to HTTPS where possible (thanks to delitestudio)
|
||||||
|
= 1.3.14 =
|
||||||
|
* Added Thunderforest Api Key on settings: for OpenCycleMap
|
||||||
|
= 1.3.13 =
|
||||||
|
* Added google maps api key on settings
|
||||||
|
* Removed parameter 'sensor' on google maps js
|
||||||
|
* Added unit of measure of speed for swimmers: min/100 meters
|
||||||
|
= 1.3.12 =
|
||||||
|
* Fix incompatibility with Debian PHP7 (thanks to phbaer) https://github.com/devfarm-it/wp-gpx-maps/pull/5
|
||||||
|
= 1.3.10 =
|
||||||
|
* Improved german translations (thanks to Konrad) http://tadesse.de/7882/2015-wanderung-ostrov-tisa-ii/
|
||||||
|
= 1.3.9 =
|
||||||
|
* Retrieve waypoints in JSON, possibility to add a custom marker (Changed by Michel Selerin)
|
||||||
|
= 1.3.8 =
|
||||||
|
* Improved Google Maps visualization
|
||||||
|
= 1.3.7 =
|
||||||
|
* NextGen Gallery's Attachment support. Thanks to Stephan Klein (https://klein-gedruckt.de/2015/03/wordpress-plugin-wp-gpx-maps/)
|
||||||
|
= 1.3.6 =
|
||||||
|
* Fix: remote file download issue
|
||||||
|
* Fix: download file link with WPML
|
||||||
|
* Improved cache with filetime (thanks to David)
|
||||||
|
= 1.3.5 =
|
||||||
|
* Fix: Garmin cadence again
|
||||||
|
* Fix: WP Tabs
|
||||||
|
= 1.3.4 =
|
||||||
|
* Fix: Garmin cadence
|
||||||
|
* Infowindows closing on mouseout
|
||||||
|
= 1.3.3 =
|
||||||
|
* Add feet/Nautical Miles units (thanks to elperepat)
|
||||||
|
* Update OpenStreetMaps Credits
|
||||||
|
* WP Tabs fix
|
||||||
|
= 1.3.2 =
|
||||||
|
* fix: left axis not visible (downgrade highcharts to v3.0.10)
|
||||||
|
* fix: fullscreen map js error
|
||||||
|
= 1.3.1 =
|
||||||
|
* fix: http/https javascript registration
|
||||||
|
* fix: full screen map css issue
|
||||||
|
= 1.3.0 =
|
||||||
|
* Speed improvement
|
||||||
|
* Rewritten js classes
|
||||||
|
* Added Temperature chart
|
||||||
|
* Added HTML5 Gps position (you can now follow the gpx with your mobile phone/tablet/pc)
|
||||||
|
= 1.2.6 =
|
||||||
|
* Speed improvement
|
||||||
|
= 1.2.5 =
|
||||||
|
* Added Catalan translation, thanks to Edgar
|
||||||
|
* Updated Spanish translation, thanks to Dani
|
||||||
|
* Added different types of distance: Normal, Flat (don't consider altitude) and Climb distance
|
||||||
|
= 1.2.4 =
|
||||||
|
* Added Bulgarian translation, thanks to Svilen Savov
|
||||||
|
* Added possibility to hide the elevation chart
|
||||||
|
= 1.2.2 =
|
||||||
|
* Smaller map type selector
|
||||||
|
* Fix: Google maps exception for NextGen Gallery
|
||||||
|
= 1.2.1 =
|
||||||
|
* Fix: NextGen Gallery 1.9 compatibility
|
||||||
|
= 1.2.0 =
|
||||||
|
* NextGen Gallery 2 support
|
||||||
|
* NextGen Gallery Pro support
|
||||||
|
= 1.1.46 =
|
||||||
|
* Added meters/miles chart unit of measure
|
||||||
|
* Added Russian translation, thanks to G.A.P
|
||||||
|
= 1.1.45 =
|
||||||
|
* Added nautical miles as distance (Many thanks to Anders)
|
||||||
|
= 1.1.44 =
|
||||||
|
* Added Chart zoom feature
|
||||||
|
* Some small bug fixes
|
||||||
|
= 1.1.43 =
|
||||||
|
* Added Portuguese (Brazilian) translation, thanks to André Ramos
|
||||||
|
* new map: Open Cycle Map - Transport
|
||||||
|
* new map: Open Cycle Map - Landscape
|
||||||
|
= 1.1.42 =
|
||||||
|
* qTranslate compatible
|
||||||
|
= 1.1.41 =
|
||||||
|
* Added Polish translation, thanks to Sebastian
|
||||||
|
* Fix: Spanish translation
|
||||||
|
* Minor javascript improvement
|
||||||
|
= 1.1.40 =
|
||||||
|
* Improved italian translation
|
||||||
|
* Added grade chart (beta)
|
||||||
|
= 1.1.39 =
|
||||||
|
* Added French translation, thanks to Hervé
|
||||||
|
* Added Nautical Miles per Hour (Knots) unit of measure
|
||||||
|
= 1.1.38 =
|
||||||
|
* Fix: garmin gpx cadence and heart rate
|
||||||
|
* Updated Turkish translation, thanks to Edip
|
||||||
|
* Added Hungarian translation, thanks to Tami
|
||||||
|
= 1.1.36 =
|
||||||
|
* Even Editor and Author users can upload their own gpx. Administrators can see all the administrators gpx. The other users can see only their uploads
|
||||||
|
= 1.1.35 =
|
||||||
|
* Fix: In the post list, sometime, the maps was not displaying correctly ( the php rand() function was not working?? )
|
||||||
|
* Various improvements for multi track gpx. Thanks to GPSracks.tv
|
||||||
|
* Summary table is now avaiable even without chart. Thanks to David
|
||||||
|
= 1.1.34 =
|
||||||
|
* 2 decimals for unit of measure min/km and min/mi
|
||||||
|
* translation file updated (a couple of phrases added)
|
||||||
|
* File list reverse order (from the newer to the older)
|
||||||
|
* nggallery integration: division by zero fixed
|
||||||
|
= 1.1.33 =
|
||||||
|
* Decimals reducted to 1 for unit of measure min/km and min/mi
|
||||||
|
* map zoom and center position is working with waypoints only files
|
||||||
|
* automatic scale works again (thanks to MArkus)
|
||||||
|
= 1.1.32 =
|
||||||
|
* You can exclude cache (slower and not recommended)
|
||||||
|
* You can decide what show in the summary table
|
||||||
|
* German translation (thanks to Ali)
|
||||||
|
= 1.1.31 =
|
||||||
|
* Fixed fullscreen map image slideshow
|
||||||
|
= 1.1.30 =
|
||||||
|
* Multi track gpx support
|
||||||
|
* Next Gen Gallery images positions derived from date. You can adjust the date with the shortcode attribute dtoffset
|
||||||
|
* If you set Chart Height (shortcode gheight) = 0 means hide the graph
|
||||||
|
* Fix: All images should work, independent from browser cache
|
||||||
|
= 1.1.29 =
|
||||||
|
* Decimal separator is working with all the browsers
|
||||||
|
* minutes per mile and minutes per kilometer was wrong
|
||||||
|
= 1.1.28 =
|
||||||
|
* Decimal and thousand separator derived from browser language
|
||||||
|
* Added summary table (see settings): Total distance, Max elevation, Min elevation, Total climbing, Total descent, Average speed
|
||||||
|
* Added 2 speed units of measure: minutes per mile and minutes per kilometer
|
||||||
|
= 1.1.26 =
|
||||||
|
* Multilanguage implementation (only front-end). I've implemented the italian one, I hope somebody will help me with other languages..
|
||||||
|
* Map Full screen mode (I'm sure it's not working in ie6. don't even ask!)
|
||||||
|
* Added waypoint custom icon
|
||||||
|
= 1.1.25 =
|
||||||
|
* Added possibility to download your gpx
|
||||||
|
= 1.1.23 =
|
||||||
|
* Security fix, please update!
|
||||||
|
= 1.1.22 =
|
||||||
|
* enable map zoom on scroll wheel (check settings)
|
||||||
|
* test attributes in get params
|
||||||
|
= 1.1.21 =
|
||||||
|
* google maps images fixed (templates with bad css)
|
||||||
|
* upgrade to google maps 3.9
|
||||||
|
= 1.1.20 =
|
||||||
|
* google maps images fixed in <a href="http://wordpress.org/extend/themes/yoko">Yoko theme</a>
|
||||||
|
= 1.1.19 =
|
||||||
|
* include jQuery if needed
|
||||||
|
= 1.1.17 =
|
||||||
|
* Remove zero values from cadence and heart rate charts
|
||||||
|
* nextgen gallery improvement
|
||||||
|
= 1.1.16 =
|
||||||
|
* Cadence chart (where available)
|
||||||
|
* minor bug fixes
|
||||||
|
= 1.1.15 =
|
||||||
|
* migration from google chart to highcharts. Highcharts are much better than google chart! This is the base for a new serie of improvements. Stay in touch for the next releases!
|
||||||
|
* heart rate chart (where available)
|
||||||
|
= 1.1.14 =
|
||||||
|
* added css to avoid map bars display issue
|
||||||
|
= 1.1.13 =
|
||||||
|
* added new types of maps: Open Street Map, Open Cycle Map, Hike & Bike.
|
||||||
|
* fixed nextgen gallery caching problem
|
||||||
|
= 1.1.12 =
|
||||||
|
* nextgen gallery display bug fixes
|
||||||
|
|
||||||
|
== Upgrade Notice ==
|
BIN
showImages.png
Before Width: | Height: | Size: 3.1 KiB |
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES5",
|
||||||
|
"module": "CommonJS",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"sourceMap": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"lib": ["ESNext", "es5", "es6", "DOM"],
|
||||||
|
"types" : ["node"],
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"assets/src/@types/types.ts",
|
||||||
|
"assets/src/*.ts",
|
||||||
|
"assets/src/**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
|
@ -1,2 +0,0 @@
|
||||||
bastianonm = bastianonm <bastianonm>
|
|
||||||
plugin-master = plugin-master <plugin-master>
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import { resolve } from "path";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
outDir: 'assets/dist',
|
||||||
|
sourcemap: true,
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, "assets/src/WP-GPX-Maps.ts"),
|
||||||
|
name: "WPGPXMaps",
|
||||||
|
fileName: (format) => `WP-GPX-Maps.${format}.js`,
|
||||||
|
formats: ["es", "umd"],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Settings Tab Administration
|
||||||
|
*
|
||||||
|
* Contains all administrative settings.
|
||||||
|
*
|
||||||
|
* @package WP GPX Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! current_user_can( 'manage_options' ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
add_action( 'admin_init', 'wpgpxmaps_register_settings' );
|
||||||
|
|
||||||
|
function wpgpxmaps__register_settings() {
|
||||||
|
|
||||||
|
register_setting( 'wpgpxmaps_group', 'wpgpxmaps_allow_users_upload' );
|
||||||
|
register_setting( 'wpgpxmaps_group', 'wpgpxmaps_show_notice' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- The First Div (for body) starts in wp-gpx-admin.php -->
|
||||||
|
|
||||||
|
<div class="wpgpxmaps-container-tab-settings">
|
||||||
|
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php wp_nonce_field( 'update-options' ); ?>
|
||||||
|
|
||||||
|
<h3 class="title">
|
||||||
|
<?php esc_html_e( 'User permissions', 'wp-gpx-maps' ); ?>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<table class="form-table">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<?php esc_html_e( 'Editor & Author upload:', 'wp-gpx-maps' ); ?>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<input name="wpgpxmaps_allow_users_upload" type="checkbox" value="1" <?php if ( get_option( 'wpgpxmaps_allow_users_upload' ) == 1) echo 'checked="checked"'; ?> />
|
||||||
|
<i>
|
||||||
|
<?php esc_html_e( 'Allow Editors & Authors to upload GPX files', 'wp-gpx-maps' ); ?>
|
||||||
|
</i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="hidden" name="action" value="update" />
|
||||||
|
<input name="page_options" type="hidden" value="wpgpxmaps_allow_users_upload" />
|
||||||
|
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php wp_nonce_field( 'update-options' ); ?>
|
||||||
|
|
||||||
|
<h3 class="title">
|
||||||
|
<?php esc_html_e( 'Notifications', 'wp-gpx-maps' ); ?>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<table class="form-table">
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<?php esc_html_e( 'Show update notice:', 'wp-gpx-maps' ); ?>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<input name="wpgpxmaps_show_notice" type="checkbox" value="1" <?php if ( get_option( 'wpgpxmaps_show_notice' ) == 1) echo 'checked="checked"'; ?> />
|
||||||
|
<i>
|
||||||
|
<?php esc_html_e( 'Displays the update notices for a new WP GPX Maps version', 'wp-gpx-maps' ); ?>
|
||||||
|
</i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="hidden" name="action" value="update" />
|
||||||
|
<input name="page_options" type="hidden" value="wpgpxmaps_show_notice" />
|
||||||
|
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
|
@ -0,0 +1,324 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Settings Tab
|
||||||
|
*
|
||||||
|
* Contains all settings for the output.
|
||||||
|
*
|
||||||
|
* @package WP GPX Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! current_user_can( 'manage_options' ) ){
|
||||||
|
echo '<div class="notice notice-error">No permission<p>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* General */
|
||||||
|
$distanceType = get_option( 'wpgpxmaps_distance_type' );
|
||||||
|
$skipcache = get_option( 'wpgpxmaps_skipcache' );
|
||||||
|
$download = get_option( 'wpgpxmaps_download' );
|
||||||
|
$usegpsposition = get_option( 'wpgpxmaps_usegpsposition' );
|
||||||
|
/* Print Summary Table */
|
||||||
|
$summary = get_option( 'wpgpxmaps_summary' );
|
||||||
|
$tot_len = get_option( 'wpgpxmaps_summary_tot_len' );
|
||||||
|
$max_ele = get_option( 'wpgpxmaps_summary_max_ele' );
|
||||||
|
$min_ele = get_option( 'wpgpxmaps_summary_min_ele' );
|
||||||
|
$total_ele_up = get_option( 'wpgpxmaps_summary_total_ele_up' );
|
||||||
|
$total_ele_down = get_option( 'wpgpxmaps_summary_total_ele_down' );
|
||||||
|
$avg_speed = get_option( 'wpgpxmaps_summary_avg_speed' );
|
||||||
|
$avg_cad = get_option( 'wpgpxmaps_summary_avg_cad' );
|
||||||
|
$avg_hr = get_option( 'wpgpxmaps_summary_avg_hr' );
|
||||||
|
$avg_temp = get_option( 'wpgpxmaps_summary_avg_temp' );
|
||||||
|
$total_time = get_option( 'wpgpxmaps_summary_total_time' );
|
||||||
|
/* Map */
|
||||||
|
$t = get_option( 'wpgpxmaps_map_type' );
|
||||||
|
$zoomonscrollwheel = get_option( 'wpgpxmaps_zoomonscrollwheel' );
|
||||||
|
$showW = get_option( 'wpgpxmaps_show_waypoint' );
|
||||||
|
|
||||||
|
/* MapBox */
|
||||||
|
$mapbox3dTerrain = get_option( 'wpgpxmaps_mapbox_3dterrain' );
|
||||||
|
$mapboxMapType = get_option( 'wpgpxmaps_mapbox_type' );
|
||||||
|
$mapboxCustomMapType = get_option( 'wpgpxmaps_mapbox_customtype' );
|
||||||
|
$mapboxFog = get_option( 'wpgpxmaps_mapbox_fog' );
|
||||||
|
$mapboxLoadAnimation = get_option( 'wpgpxmaps_mapbox_load_animation');
|
||||||
|
|
||||||
|
|
||||||
|
/* Diagram */
|
||||||
|
$showEle = get_option( 'wpgpxmaps_show_elevation' );
|
||||||
|
$uom = get_option( 'wpgpxmaps_unit_of_measure' );
|
||||||
|
$showSpeed = get_option( 'wpgpxmaps_show_speed' );
|
||||||
|
$uomSpeed = get_option( 'wpgpxmaps_unit_of_measure_speed' );
|
||||||
|
$showHr = get_option( 'wpgpxmaps_show_hr' );
|
||||||
|
$showAtemp = get_option( 'wpgpxmaps_show_atemp' );
|
||||||
|
$showCad = get_option( 'wpgpxmaps_show_cadence' );
|
||||||
|
$showGrade = get_option( 'wpgpxmaps_show_grade' );
|
||||||
|
/* Advanced */
|
||||||
|
$po = get_option( 'wpgpxmaps_pointsoffset' );
|
||||||
|
$donotreducegpx = get_option( 'wpgpxmaps_donotreducegpx' );
|
||||||
|
|
||||||
|
if ( empty( $showEle ) )
|
||||||
|
$showEle = 'true';
|
||||||
|
|
||||||
|
if ( ! ( $t ) )
|
||||||
|
$t = 'HYBRID';
|
||||||
|
|
||||||
|
if ( ! ( $po ) )
|
||||||
|
$po = 10;
|
||||||
|
|
||||||
|
function render_color_input($name, $label, $value, $style = 'width:50px;') {
|
||||||
|
echo "<tr>
|
||||||
|
<th scope='row'>".esc_html($label)."</th>
|
||||||
|
<td><input name='".esc_attr($name)."' type='color' id='".esc_attr($name)."' value='".esc_attr($value)."' style='".esc_attr($style)."' /></td>
|
||||||
|
</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function render_text_input($name, $label, $value, $style = 'width:50px;', $appendHtml = '') {
|
||||||
|
echo "<tr>
|
||||||
|
<th scope='row'>".esc_html($label)."</th>
|
||||||
|
<td><input name='".esc_attr($name)."' type='text' id='".esc_attr($name)."' value='".esc_attr($value)."' style='".esc_attr($style)."' />".esc_html($appendHtml)."</td>
|
||||||
|
</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
function render_checkbox($name, $label, $value) {
|
||||||
|
$checked = $value ? 'checked' : '';
|
||||||
|
echo "<tr>
|
||||||
|
<th scope='row'>".esc_html($label)."</th>
|
||||||
|
<td><input name='".esc_attr($name)."' type='checkbox' value='true' ".esc_attr($checked)." onchange='this.value = (this.checked)' />
|
||||||
|
<i>".esc_html($label)."</i></td>
|
||||||
|
</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
function render_radio($name, $label, $options, $checked) {
|
||||||
|
echo "<tr>
|
||||||
|
<th scope='row'>".esc_html($label)."</th>
|
||||||
|
<td>";
|
||||||
|
foreach ($options as $value => $text) {
|
||||||
|
$isChecked = $value == $checked ? 'checked' : '';
|
||||||
|
echo "<input type='radio' name='".esc_attr($name)."' id='".esc_attr($name.'-'.$value)."' value='".esc_attr($value)."' ".esc_attr($isChecked)." ><label for='".esc_attr($name.'-'.$value)."' /> ".esc_html( $text, 'wp-gpx-maps' )."</label> <br />";
|
||||||
|
//echo "<option value='$value' $isSelected>".esc_html($text)."</option>";
|
||||||
|
}
|
||||||
|
echo "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function render_select($name, $label, $options, $selected) {
|
||||||
|
echo "<tr>
|
||||||
|
<th scope='row'>".esc_html($label)."</th>
|
||||||
|
<td><select name='".esc_attr($name)."'>";
|
||||||
|
foreach ($options as $value => $text) {
|
||||||
|
$isSelected = $value == $selected ? 'selected' : '';
|
||||||
|
echo "<option value='".esc_attr($value)."' ".esc_attr($isSelected).">".esc_html($text)."</option>";
|
||||||
|
}
|
||||||
|
echo "</select></td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- The First Div (for body) starts in wp-gpx-admin.php -->
|
||||||
|
|
||||||
|
<div class="wpgpxmaps-container-tab-settings">
|
||||||
|
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php wp_nonce_field( 'update-options' ); ?>
|
||||||
|
|
||||||
|
<h3 class="title"><?php esc_html_e( 'General', 'wp-gpx-maps' ); ?></h3>
|
||||||
|
<table class="form-table">
|
||||||
|
<?php
|
||||||
|
render_text_input('wpgpxmaps_width', 'Map width:', get_option('wpgpxmaps_width'));
|
||||||
|
render_text_input('wpgpxmaps_height', 'Map height:', get_option('wpgpxmaps_height'));
|
||||||
|
render_text_input('wpgpxmaps_graph_height', 'Graph height:', get_option('wpgpxmaps_graph_height'));
|
||||||
|
render_select('wpgpxmaps_distance_type', 'Distance type:', [
|
||||||
|
'0' => 'Normal (default)',
|
||||||
|
'1' => 'Flat → (Only flat distance, don’t take care of altitude)',
|
||||||
|
'2' => 'Climb ↑ (Only climb distance)'
|
||||||
|
], $distanceType);
|
||||||
|
render_checkbox('wpgpxmaps_skipcache', 'Cache:', $skipcache);
|
||||||
|
render_checkbox('wpgpxmaps_download', 'GPX Download:', $download);
|
||||||
|
render_checkbox('wpgpxmaps_usegpsposition', 'Use browser GPS position:', $usegpsposition);
|
||||||
|
render_text_input('wpgpxmaps_openstreetmap_apikey', 'Thunderforest API Key (Open Cycle Map):', get_option('wpgpxmaps_openstreetmap_apikey'), 'width:400px');
|
||||||
|
render_text_input('wpgpxmaps_mapbox_apikey', 'Mapbox API Key:', get_option('wpgpxmaps_mapbox_apikey'), 'width:400px');
|
||||||
|
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="hidden" name="action" value="update" />
|
||||||
|
<input name="page_options" type="hidden" value="wpgpxmaps_height,wpgpxmaps_graph_height,wpgpxmaps_width,wpgpxmaps_download,wpgpxmaps_skipcache,wpgpxmaps_distance_type,wpgpxmaps_usegpsposition,wpgpxmaps_openstreetmap_apikey,wpgpxmaps_mapbox_apikey" />
|
||||||
|
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php wp_nonce_field( 'update-options' ); ?>
|
||||||
|
|
||||||
|
<h3 class="title"><?php esc_html_e( 'Summary table', 'wp-gpx-maps' ); ?></h3>
|
||||||
|
<table class="form-table">
|
||||||
|
<?php
|
||||||
|
render_checkbox('wpgpxmaps_summary', 'Summary table:', $summary);
|
||||||
|
render_checkbox('wpgpxmaps_summary_tot_len', 'Total distance:', $tot_len);
|
||||||
|
render_checkbox('wpgpxmaps_summary_max_ele', 'Max elevation:', $max_ele);
|
||||||
|
render_checkbox('wpgpxmaps_summary_min_ele', 'Min elevation:', $min_ele);
|
||||||
|
render_checkbox('wpgpxmaps_summary_total_ele_up', 'Total climbing:', $total_ele_up);
|
||||||
|
render_checkbox('wpgpxmaps_summary_total_ele_down', 'Total descent:', $total_ele_down);
|
||||||
|
render_checkbox('wpgpxmaps_summary_avg_speed', 'Average speed:', $avg_speed);
|
||||||
|
render_checkbox('wpgpxmaps_summary_avg_cad', 'Average cadence:', $avg_cad);
|
||||||
|
render_checkbox('wpgpxmaps_summary_avg_hr', 'Average heart rate:', $avg_hr);
|
||||||
|
render_checkbox('wpgpxmaps_summary_avg_temp', 'Average temperature:', $avg_temp);
|
||||||
|
render_checkbox('wpgpxmaps_summary_total_time', 'Total time:', $total_time);
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="hidden" name="action" value="update" />
|
||||||
|
<input name="page_options" type="hidden" value="wpgpxmaps_summary,wpgpxmaps_summary_tot_len,wpgpxmaps_summary_max_ele,wpgpxmaps_summary_min_ele,wpgpxmaps_summary_total_ele_up,wpgpxmaps_summary_total_ele_down,wpgpxmaps_summary_avg_speed,wpgpxmaps_summary_avg_cad,wpgpxmaps_summary_avg_hr,wpgpxmaps_summary_avg_temp,wpgpxmaps_summary_total_time" />
|
||||||
|
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php wp_nonce_field( 'update-options' ); ?>
|
||||||
|
|
||||||
|
<h3 class="title"><?php esc_html_e( 'Map', 'wp-gpx-maps' ); ?></h3>
|
||||||
|
<table class="form-table">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
render_radio('wpgpxmaps_map_type', 'Default map type:', [
|
||||||
|
'OSM1' => 'Open Street Map',
|
||||||
|
'OSM2' => 'Open Cycle Map / Thunderforest - Open Cycle Map (API Key required)',
|
||||||
|
'OSM3' => 'Thunderforest - Outdoors (API Key required)',
|
||||||
|
'OSM4' => 'Thunderforest - Transport (API Key required)',
|
||||||
|
'OSM5' => 'Thunderforest - Landscape (API Key required)',
|
||||||
|
'OSM6' => 'MapToolKit - Terrain',
|
||||||
|
'OSM7' => 'Open Street Map - Humanitarian map style',
|
||||||
|
'OSM9' => 'Hike & Bike',
|
||||||
|
'OSM10' => 'Open Sea Map',
|
||||||
|
'OSM11' => 'GSI Map (Japan)'
|
||||||
|
], $t);
|
||||||
|
|
||||||
|
render_radio('wpgpxmaps_mapbox_type', 'MapBox default style:', [
|
||||||
|
'standard' => 'Standard',
|
||||||
|
'standard-satellite' => 'Standard Satelite',
|
||||||
|
'streets-v12' => 'Streets',
|
||||||
|
'outdoors-v12' => 'Outdoors',
|
||||||
|
'light-v11' => 'Light',
|
||||||
|
'dark-v11' => 'Dark',
|
||||||
|
'satellite-v9' => 'Satellite',
|
||||||
|
'satellite-streets-v12' => 'Satellite Streets',
|
||||||
|
'navigation-day-v1' => 'Navigation Day',
|
||||||
|
'navigation-night-v1' => 'Navigation Night'
|
||||||
|
], $mapboxMapType);
|
||||||
|
|
||||||
|
render_text_input('wpgpxmaps_mapbox_customtype', 'Custom MapBox style:', $mapboxCustomMapType, 'width:400px;');
|
||||||
|
|
||||||
|
render_radio('wpgpxmaps_mapbox_load_animation', 'MapBox animation on load:', [
|
||||||
|
'0' => 'Disabled',
|
||||||
|
'1' => 'Draw line from start to end',
|
||||||
|
], $mapboxLoadAnimation);
|
||||||
|
|
||||||
|
render_checkbox('wpgpxmaps_mapbox_3dterrain', 'MapBox 3d terrain:', $mapbox3dTerrain);
|
||||||
|
render_checkbox('wpgpxmaps_mapbox_fog', 'MapBox fog:', $mapboxFog);
|
||||||
|
|
||||||
|
render_text_input('wpgpxmaps_map_line_color', 'Map line color:', get_option('wpgpxmaps_map_line_color'), 'width:100px;');
|
||||||
|
render_checkbox('wpgpxmaps_zoomonscrollwheel', 'On mouse scroll wheel:', $zoomonscrollwheel);
|
||||||
|
render_checkbox('wpgpxmaps_show_waypoint', 'Waypoints support:', $showW);
|
||||||
|
render_text_input('wpgpxmaps_map_start_icon', 'Start track icon:', get_option('wpgpxmaps_map_start_icon'), 'width:400px;');
|
||||||
|
render_text_input('wpgpxmaps_map_end_icon', 'End track icon:', get_option('wpgpxmaps_map_end_icon'), 'width:400px;');
|
||||||
|
render_text_input('wpgpxmaps_map_current_icon', 'Current position icon:', get_option('wpgpxmaps_map_current_icon'), 'width:400px;');
|
||||||
|
render_text_input('wpgpxmaps_currentpositioncon', 'Current GPS position icon:', get_option('wpgpxmaps_currentpositioncon'), 'width:400px;');
|
||||||
|
render_text_input('wpgpxmaps_map_waypoint_icon', 'Custom waypoint icon:', get_option('wpgpxmaps_map_waypoint_icon'), 'width:400px;');
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="hidden" name="action" value="update" />
|
||||||
|
<input name="page_options" type="hidden" value="wpgpxmaps_mapbox_load_animation,wpgpxmaps_mapbox_customtype,wpgpxmaps_mapbox_fog,wpgpxmaps_mapbox_type,wpgpxmaps_mapbox_3dterrain,wpgpxmaps_map_type,wpgpxmaps_map_line_color,wpgpxmaps_zoomonscrollwheel,wpgpxmaps_show_waypoint,wpgpxmaps_map_start_icon,wpgpxmaps_map_end_icon,wpgpxmaps_map_current_icon,wpgpxmaps_currentpositioncon,wpgpxmaps_map_waypoint_icon" />
|
||||||
|
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php wp_nonce_field( 'update-options' ); ?>
|
||||||
|
|
||||||
|
<h3 class="title"><?php esc_html_e( 'Chart', 'wp-gpx-maps' ); ?></h3>
|
||||||
|
<table class="form-table">
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?php esc_html_e( 'Altitude:', 'wp-gpx-maps' ); ?></th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" <?php if ( true == $showEle ) { echo( 'checked' ); } ?> onchange="wpgpxmaps_show_elevation.value = this.checked" onload="wpgpxmaps_show_elevation.value = this.checked" />
|
||||||
|
<i><?php esc_html_e( 'Show altitude', 'wp-gpx-maps' ); ?></i>
|
||||||
|
<input name="wpgpxmaps_show_elevation" type="hidden" value="<?php echo(esc_attr($showEle)) ?>">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
render_text_input('wpgpxmaps_graph_line_color', 'Altitude line color:', get_option('wpgpxmaps_graph_line_color'), 'width:100px;');
|
||||||
|
render_select('wpgpxmaps_unit_of_measure', 'Unit of measure:', [
|
||||||
|
'0' => 'meters / meters',
|
||||||
|
'1' => 'feet / miles',
|
||||||
|
'2' => 'meters / kilometers',
|
||||||
|
'3' => 'meters / nautical miles',
|
||||||
|
'4' => 'meters / miles',
|
||||||
|
'5' => 'feet / nautical miles'
|
||||||
|
], $uom);
|
||||||
|
render_text_input('wpgpxmaps_graph_offset_from1', 'Altitude display offset from:', get_option('wpgpxmaps_graph_offset_from1'));
|
||||||
|
render_text_input('wpgpxmaps_graph_offset_to1', 'Altitude display offset to:', get_option('wpgpxmaps_graph_offset_to1'));
|
||||||
|
render_checkbox('wpgpxmaps_show_speed', 'Speed:', $showSpeed);
|
||||||
|
render_text_input('wpgpxmaps_graph_line_color_speed', 'Speed line color:', get_option('wpgpxmaps_graph_line_color_speed'), 'width:100px;');
|
||||||
|
render_select('wpgpxmaps_unit_of_measure_speed', 'Speed unit of measure:', [
|
||||||
|
'0' => 'm/s',
|
||||||
|
'1' => 'km/h',
|
||||||
|
'2' => 'miles/h',
|
||||||
|
'3' => 'min/km',
|
||||||
|
'4' => 'min/miles',
|
||||||
|
'5' => 'Knots (nautical miles / hour)',
|
||||||
|
'6' => 'min/100 meters'
|
||||||
|
], $uomSpeed);
|
||||||
|
render_text_input('wpgpxmaps_graph_offset_from2', 'Speed display offset from:', get_option('wpgpxmaps_graph_offset_from2'));
|
||||||
|
render_text_input('wpgpxmaps_graph_offset_to2', 'Speed display offset to:', get_option('wpgpxmaps_graph_offset_to2'));
|
||||||
|
render_checkbox('wpgpxmaps_show_hr', 'Heart rate (where available):', $showHr);
|
||||||
|
render_text_input('wpgpxmaps_graph_line_color_hr', 'Heart rate line color:', get_option('wpgpxmaps_graph_line_color_hr'), 'width:100px;');
|
||||||
|
render_checkbox('wpgpxmaps_show_atemp', 'Temperature (where available):', $showAtemp);
|
||||||
|
render_text_input('wpgpxmaps_graph_line_color_atemp', 'Temperature line color:', get_option('wpgpxmaps_graph_line_color_atemp'), 'width:100px;');
|
||||||
|
render_checkbox('wpgpxmaps_show_cadence', 'Cadence (where available):', $showCad);
|
||||||
|
render_text_input('wpgpxmaps_graph_line_color_cad', 'Cadence line color:', get_option('wpgpxmaps_graph_line_color_cad'), 'width:100px;');
|
||||||
|
render_checkbox('wpgpxmaps_show_grade', 'Grade:', $showGrade);
|
||||||
|
render_text_input('wpgpxmaps_graph_line_color_grade', 'Grade line color:', get_option('wpgpxmaps_graph_line_color_grade'), 'width:100px;');
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="hidden" name="action" value="update" />
|
||||||
|
<input name="page_options" type="hidden" value="wpgpxmaps_show_elevation,wpgpxmaps_graph_line_color,wpgpxmaps_unit_of_measure,wpgpxmaps_show_speed,wpgpxmaps_graph_line_color_speed,wpgpxmaps_show_hr,wpgpxmaps_graph_line_color_hr,wpgpxmaps_unit_of_measure_speed,wpgpxmaps_graph_offset_from1,wpgpxmaps_graph_offset_to1,wpgpxmaps_graph_offset_from2,wpgpxmaps_graph_offset_to2,wpgpxmaps_graph_line_color_cad,wpgpxmaps_show_cadence,wpgpxmaps_show_grade,wpgpxmaps_graph_line_color_grade,wpgpxmaps_show_atemp,wpgpxmaps_graph_line_color_atemp" />
|
||||||
|
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php wp_nonce_field( 'update-options' ); ?>
|
||||||
|
|
||||||
|
<h3 class="title"><?php esc_html_e( 'Advanced Options', 'wp-gpx-maps' ); ?></h3>
|
||||||
|
<em><?php esc_html_e( '(Do not edit if you don’t know what you are doing!)', 'wp-gpx-maps' ); ?></em>
|
||||||
|
<table class="form-table">
|
||||||
|
<?php
|
||||||
|
render_text_input('wpgpxmaps_pointsoffset', 'Skip GPX points closer than:', $po);
|
||||||
|
render_checkbox('wpgpxmaps_donotreducegpx', 'Reduce GPX:', $donotreducegpx);
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="hidden" name="action" value="update" />
|
||||||
|
<input name="page_options" type="hidden" value="wpgpxmaps_donotreducegpx,wpgpxmaps_pointsoffset" />
|
||||||
|
<input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Changes', 'wp-gpx-maps' ); ?>" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
|
@ -0,0 +1,327 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Tracks Tab
|
||||||
|
*
|
||||||
|
* Content for Tab Tracks and Cache.
|
||||||
|
*
|
||||||
|
* @package WP GPX Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! ( is_admin() ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
$is_admin = current_user_can( 'publish_posts' );
|
||||||
|
|
||||||
|
if ( $is_admin != 1 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
$wpgpxmapsUrl = esc_url( get_admin_url() . 'admin.php?page=WP-GPX-Maps' );
|
||||||
|
$gpxRegEx = '/.gpx$/i';
|
||||||
|
|
||||||
|
if ( current_user_can( 'manage_options' ) ) {
|
||||||
|
|
||||||
|
$menu_root = 'options-general.php';
|
||||||
|
|
||||||
|
} elseif ( current_user_can( 'publish_posts' ) ) {
|
||||||
|
|
||||||
|
$menu_root = 'admin.php';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
global $wp_filesystem;
|
||||||
|
if (empty($wp_filesystem)) {
|
||||||
|
require_once (ABSPATH . '/wp-admin/includes/file.php');
|
||||||
|
WP_Filesystem();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override the default upload path.
|
||||||
|
*
|
||||||
|
* @param array $dir
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function wpgpxmaps_181088_upload_dir( $dir ) {
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'path' => $dir['basedir'] . '/gpx',
|
||||||
|
'url' => $dir['baseurl'] . '/gpx',
|
||||||
|
'subdir' => '/gpx',
|
||||||
|
) + $dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function wpgpxmaps_move_uploaded_file($uploadedfile)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Register our path override.
|
||||||
|
add_filter( 'upload_dir', 'wpgpxmaps_181088_upload_dir' );
|
||||||
|
|
||||||
|
$upload_overrides = array( 'test_form' => false, 'test_type' => false );
|
||||||
|
|
||||||
|
// Do our thing. WordPress will move the file to 'uploads/gpx'.
|
||||||
|
$result = wp_handle_upload( $uploadedfile , $upload_overrides);
|
||||||
|
|
||||||
|
// Set everything back to normal.
|
||||||
|
remove_filter( 'upload_dir', 'wpgpxmaps_181088_upload_dir' );
|
||||||
|
|
||||||
|
if ( $result && isset( $result['error'] ))
|
||||||
|
{
|
||||||
|
echo "<div class='notice notice-error'><p>". esc_html( $result['error'] )."</p></div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return ( $result && !isset( $result['error'] ));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* The First Div (for body) starts in wp-gpx-admin.php */
|
||||||
|
|
||||||
|
if ( isset( $_POST['clearcache'] ) ) {
|
||||||
|
|
||||||
|
if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( $_GET['_wpnonce'] ), 'wpgpx_clearcache_nonce' . $entry ) ) {
|
||||||
|
|
||||||
|
echo '<div class="notice notice-success"><p>';
|
||||||
|
esc_html_e( 'Cache is now empty!', 'wp-gpx-maps' );
|
||||||
|
echo '</p></div>';
|
||||||
|
wpgpxmaps_recursive_remove_directory( $cacheGpxPath, true );
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( is_writable( $realGpxPath ) ) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="tablenav-top">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo '<form enctype="multipart/form-data" method="POST" style="float:left; margin:5px 20px 0 0" action="' . esc_url( get_bloginfo( 'wpurl' ) . '/wp-admin/' . $menu_root . '?page=WP-GPX-Maps' ) . '">';
|
||||||
|
?>
|
||||||
|
<?php esc_html_e( 'Choose a file to upload:', 'wp-gpx-maps' ); ?>
|
||||||
|
<input name="wpgpxmapsuploadedfile[]" type="file" onchange="submitgpx(this);" multiple />
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (isset($_FILES['wpgpxmapsuploadedfile'])) {
|
||||||
|
|
||||||
|
$uploaded_files = $_FILES['wpgpxmapsuploadedfile'];
|
||||||
|
$upload_dir = wp_upload_dir();
|
||||||
|
$custom_dir = $upload_dir['basedir'] . '/gpx';
|
||||||
|
|
||||||
|
// Ensure the directory exists
|
||||||
|
if (!is_dir($custom_dir)) {
|
||||||
|
wp_mkdir_p($custom_dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loop through each uploaded file
|
||||||
|
foreach ($uploaded_files['name'] as $key => $value) {
|
||||||
|
if ($uploaded_files['name'][$key]) {
|
||||||
|
|
||||||
|
$file = array(
|
||||||
|
'name' => $uploaded_files['name'][$key],
|
||||||
|
'type' => $uploaded_files['type'][$key],
|
||||||
|
'tmp_name' => $uploaded_files['tmp_name'][$key],
|
||||||
|
'error' => $uploaded_files['error'][$key],
|
||||||
|
'size' => $uploaded_files['size'][$key]
|
||||||
|
);
|
||||||
|
|
||||||
|
$uploadingFileName = basename( $file['name'] );
|
||||||
|
if ( preg_match( $gpxRegEx, $uploadingFileName ) ) {
|
||||||
|
|
||||||
|
if ( wpgpxmaps_move_uploaded_file( $file ) ) {
|
||||||
|
|
||||||
|
echo '<div class="notice notice-success"><p>';
|
||||||
|
printf(
|
||||||
|
/* translators: %1s: GPX file name */
|
||||||
|
esc_html__( 'The file %1s has been successfully uploaded.', 'wp-gpx-maps' ),
|
||||||
|
'<span class="code"><strong>' . esc_html( $uploadingFileName ) . '</strong></span>'
|
||||||
|
);
|
||||||
|
echo '</p></div>';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
echo '<div class=" notice notice-error"><p>';
|
||||||
|
esc_html_e( 'There was an error uploading the file, please try again!', 'wp-gpx-maps' );
|
||||||
|
echo '</p></div>';
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
echo '<div class="notice notice-warning"><p>';
|
||||||
|
esc_html_e( 'The file type is not supported!', 'wp-gpx-maps' );
|
||||||
|
echo '</p></div>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the override to avoid affecting other uploads
|
||||||
|
remove_filter('upload_dir', 'custom_upload_dir');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form method="POST" style="float:left; margin:5px 20px 0 0" action="<?php echo esc_url( $wpgpxmapsUrl . '&_wpnonce=' . wp_create_nonce( 'wpgpx_clearcache_nonce' ) ); ?>" >
|
||||||
|
<input type="submit" name="clearcache" value="<?php esc_html_e( 'Clear Cache', 'wp-gpx-maps' ); ?>" />
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
echo '<div class=" notice notice-error"><p>';
|
||||||
|
printf(
|
||||||
|
/* translators: %1s: Relative path of the GPX folder */
|
||||||
|
esc_html__( 'Your folder for GPX files %1s is not writable. Please change the folder permissions.', 'wp-gpx-maps' ),
|
||||||
|
'<span class="code"><strong>' . esc_html( $relativeGpxPath ) . '</strong></span>'
|
||||||
|
);
|
||||||
|
echo '</p></div>';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
$myGpxFileNames = array();
|
||||||
|
if ( is_readable( $realGpxPath ) && $handle = opendir( $realGpxPath ) ) {
|
||||||
|
while ( false !== ( $entry = readdir( $handle ) ) ) {
|
||||||
|
if ( preg_match( $gpxRegEx, $entry ) ) {
|
||||||
|
if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( $_GET['_wpnonce'] ), 'wpgpx_deletefile_nonce_' . $entry ) ) {
|
||||||
|
if ( file_exists( $realGpxPath . '/' . $entry ) ) {
|
||||||
|
unlink( $realGpxPath . '/' . $entry );
|
||||||
|
|
||||||
|
echo '<div class="notice notice-success"><p>';
|
||||||
|
printf(
|
||||||
|
/* translators: %1s: GPX file name */
|
||||||
|
esc_html__( 'The file %1s has been successfully deleted.', 'wp-gpx-maps' ),
|
||||||
|
'<span class="code"><strong>' . esc_html( $entry ) . '</strong></span>'
|
||||||
|
);
|
||||||
|
echo '</p></div>';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
echo '<div class=" notice notice-error"><p>';
|
||||||
|
printf(
|
||||||
|
/* translators: %1s: GPX file name */
|
||||||
|
esc_html__( 'The file %1s could not be deleted.', 'wp-gpx-maps' ),
|
||||||
|
'<span class="code"><strong>' . esc_html( $entry ) . '</strong></span>'
|
||||||
|
);
|
||||||
|
echo '</p></div>';
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$myFile = $realGpxPath . '/' . $entry;
|
||||||
|
$myGpxFileNames[] = array(
|
||||||
|
'name' => $entry,
|
||||||
|
'size' => filesize( $myFile ),
|
||||||
|
'lastedit' => filemtime( $myFile ),
|
||||||
|
'nonce' => wp_create_nonce( 'wpgpx_deletefile_nonce_' . $entry ),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir( $handle );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( is_readable( $realGpxPath ) && $handle = opendir( $realGpxPath ) ) {
|
||||||
|
while ( false !== ( $entry = readdir( $handle ) ) ) {
|
||||||
|
if ( preg_match( $gpxRegEx, $entry ) ) {
|
||||||
|
$filenames[] = $realGpxPath . '/' . $entry;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir( $handle );
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table id="table" class="wp-list-table widefat plugins"></table>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function submitgpx(el){
|
||||||
|
var newEl = document.createElement('span');
|
||||||
|
newEl.innerHTML = '<?php esc_html_e( 'Uploading file...', 'wp-gpx-maps' ); ?>';
|
||||||
|
el.parentNode.insertBefore(newEl,el.nextSibling);
|
||||||
|
el.parentNode.submit()
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery('#table').bootstrapTable({
|
||||||
|
columns: [{
|
||||||
|
field: 'name',
|
||||||
|
title: '<?php esc_html_e( 'File', 'wp-gpx-maps' ); ?>',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
|
||||||
|
return [
|
||||||
|
'<b>' + row.name + '</b><br />',
|
||||||
|
'<a class="delete_gpx_row" href="<?php echo esc_url( $wpgpxmapsUrl ); ?>&_wpnonce=' + row.nonce + '" ><?php esc_html_e( 'Delete', 'wp-gpx-maps' ); ?></a>',
|
||||||
|
' | ',
|
||||||
|
'<a href="<?php echo esc_url( $relativeGpxPath ); ?>' + row.name + '"><?php esc_html_e( 'Download', 'wp-gpx-maps' ); ?></a>',
|
||||||
|
' | ',
|
||||||
|
'<a href="#" class="copy-shortcode" title="<?php esc_html_e( 'Copy shortcode', 'wp-gpx-maps' ); ?>"><?php esc_html_e( 'Shortcode:', 'wp-gpx-maps' ); ?></a> <span class="code"> [sgpx gpx="<?php echo esc_url( $relativeGpxPath ); ?>' + row.name + '"]</span>',
|
||||||
|
].join('')
|
||||||
|
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
field: 'lastedit',
|
||||||
|
title: '<?php esc_html_e( 'Last modified', 'wp-gpx-maps' ); ?>',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var d = new Date(value*1000);
|
||||||
|
return d.toLocaleDateString() + " " + d.toLocaleTimeString();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
field: 'size',
|
||||||
|
title: '<?php esc_html_e( 'File size', 'wp-gpx-maps' ); ?>',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index) { return humanFileSize(value); }
|
||||||
|
}],
|
||||||
|
sortName : 'lastedit',
|
||||||
|
sortOrder : 'desc',
|
||||||
|
data: <?php echo wp_json_encode( $myGpxFileNames ); ?>
|
||||||
|
});
|
||||||
|
|
||||||
|
jQuery('.delete_gpx_row').click(function(){
|
||||||
|
return confirm("<?php esc_html_e( 'Are you sure you want to delete the file?', 'wp-gpx-maps' ); ?>");
|
||||||
|
})
|
||||||
|
|
||||||
|
jQuery('.copy-shortcode').click(function(e){
|
||||||
|
var $temp = jQuery("<input>");
|
||||||
|
jQuery("body").append($temp);
|
||||||
|
var shortcode = jQuery(this).next().text().trim();
|
||||||
|
$temp.val(shortcode).select();
|
||||||
|
document.execCommand("copy");
|
||||||
|
$temp.remove();
|
||||||
|
e.preventDefault();
|
||||||
|
})
|
||||||
|
|
||||||
|
function humanFileSize(bytes, si) {
|
||||||
|
var thresh = si ? 1000 : 1024;
|
||||||
|
if(Math.abs(bytes) < thresh) {
|
||||||
|
return bytes + ' B';
|
||||||
|
}
|
||||||
|
var units = si
|
||||||
|
? ['kB','MB','GB','TB','PB','EB','ZB','YB']
|
||||||
|
: ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];
|
||||||
|
var u = -1;
|
||||||
|
do {
|
||||||
|
bytes /= thresh;
|
||||||
|
++u;
|
||||||
|
} while(Math.abs(bytes) >= thresh && u < units.length - 1);
|
||||||
|
return bytes.toFixed(1)+' '+units[u];
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</div>
|
|
@ -0,0 +1,240 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ( is_admin() ) {
|
||||||
|
add_action( 'admin_init', 'wpgpxmaps_admin_init' );
|
||||||
|
add_action( 'admin_menu', 'wpgpxmaps_admin_menu' );
|
||||||
|
}
|
||||||
|
|
||||||
|
function wpgpxmaps_admin_init() {
|
||||||
|
wpgpxmaps_plugin_upgrade();
|
||||||
|
|
||||||
|
if ( get_site_option( 'wpgpxmaps_show_notice' ) == 1 ) {
|
||||||
|
if ( is_multisite() ) {
|
||||||
|
add_action( 'network_admin_notices', 'wpgpxmaps_show_update_notice' );
|
||||||
|
} else {
|
||||||
|
add_action( 'admin_notices', 'wpgpxmaps_show_update_notice' );
|
||||||
|
}
|
||||||
|
add_action( 'wp_ajax_wpgpxmaps_dismiss_notice', 'wpgpxmaps_dismiss_notice' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Roles and capabilities
|
||||||
|
*
|
||||||
|
* Capabilities for each user role that are relevant to this plugin:
|
||||||
|
*
|
||||||
|
* Admin: Can manage settings. Can show, upload and delete all GPX files.
|
||||||
|
* Editor: Can not manage settings. Can show, upload and delete all GPX files.
|
||||||
|
* Author: Can not manage settings. Can show, upload and delete his only own files.
|
||||||
|
* Contributor: Do not have access to the plugin.
|
||||||
|
* Subscriber: Do not have access to the plugin.
|
||||||
|
*
|
||||||
|
* @see https://wordpress.org/support/article/roles-and-capabilities/
|
||||||
|
*/
|
||||||
|
function wpgpxmaps_admin_menu() {
|
||||||
|
if ( current_user_can( 'manage_options' ) ) {
|
||||||
|
// Access only for Super Administrators and Administrators
|
||||||
|
add_options_page( 'WP GPX Maps', 'WP GPX Maps', 'manage_options', 'WP-GPX-Maps', 'wpgpxmaps_html_page' );
|
||||||
|
} elseif ( current_user_can( 'publish_posts' ) ) {
|
||||||
|
// Access for Editors and Authors
|
||||||
|
if ( get_option( 'wpgpxmaps_allow_users_upload' ) == 1 ) {
|
||||||
|
add_menu_page( 'WP GPX Maps', 'WP GPX Maps', 'publish_posts', 'WP-GPX-Maps', 'wpgpxmaps_html_page' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper for the option 'wpgpxmaps_version'
|
||||||
|
*/
|
||||||
|
function wpgpxmaps_get_installed_version() {
|
||||||
|
return get_option( 'wpgpxmaps_version' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper for the defined constant WPGPXMAPS_CURRENT_VERSION
|
||||||
|
*/
|
||||||
|
function wpgpxmaps_get_current_version() {
|
||||||
|
return WPGPXMAPS_CURRENT_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin upgrade
|
||||||
|
*/
|
||||||
|
function wpgpxmaps_plugin_upgrade() {
|
||||||
|
$installed_version = wpgpxmaps_get_installed_version();
|
||||||
|
|
||||||
|
if ( wpgpxmaps_get_current_version() == $installed_version ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete_site_option( 'wpgpxmaps_version' );
|
||||||
|
update_option( 'wpgpxmaps_version', wpgpxmaps_get_current_version() );
|
||||||
|
|
||||||
|
delete_option( 'wpgpxmaps_show_notice', 0 );
|
||||||
|
update_site_option( 'wpgpxmaps_show_notice', 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the update notice
|
||||||
|
*/
|
||||||
|
function wpgpxmaps_show_update_notice() {
|
||||||
|
if ( ! current_user_can( 'manage_options' ) ) return;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="wpgpxmaps-notice" class="notice is-dismissible">
|
||||||
|
<p>
|
||||||
|
<strong>
|
||||||
|
<?php echo sprintf(
|
||||||
|
/* translators: %1s: Plugin versions number */
|
||||||
|
esc_html__( 'What‘s new in WP GPX Maps %1s', 'wp-gpx-maps' ),
|
||||||
|
esc_html__(WPGPXMAPS_CURRENT_VERSION)
|
||||||
|
) ?>
|
||||||
|
|
||||||
|
</strong>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
IMPORTANT! this plugin will mifrate to MapBox API.
|
||||||
|
<a href="https://console.mapbox.com/account/access-tokens/" target="_blank" rel="noopener noreferrer">
|
||||||
|
You need to create an account and get an API key.
|
||||||
|
</a>
|
||||||
|
This will enable beatifoul 3D maps and more features.
|
||||||
|
<em>
|
||||||
|
<a href="https://wordpress.org/plugins/wp-gpx-maps/#developers" target="_blank" rel="noopener noreferrer">
|
||||||
|
<?php echo esc_html__( 'You can find the complete changelog here.', 'wp-gpx-maps' ) ?>
|
||||||
|
</a>
|
||||||
|
</em>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<a id="wpgpxmaps-post-dismiss-notice" href="javascript:wpgpxmaps_dismiss_notice();">
|
||||||
|
<?php echo esc_html__( 'Dismiss this notice', 'wp-gpx-maps' ) ?>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
function wpgpxmaps_dismiss_notice() {
|
||||||
|
var data = {
|
||||||
|
'action': 'wpgpxmaps_dismiss_notice'
|
||||||
|
};
|
||||||
|
|
||||||
|
jQuery.post( ajaxurl, data, function( response ) {
|
||||||
|
jQuery( '#wpgpxmaps-notice' ).hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery( document ).ready( function() {
|
||||||
|
jQuery( 'body' ).on( 'click', '.notice-dismiss', function() {
|
||||||
|
wpgpxmaps_dismiss_notice();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dismiss the update notice
|
||||||
|
*/
|
||||||
|
function wpgpxmaps_dismiss_notice() {
|
||||||
|
if ( !current_user_can( 'manage_options' ) )
|
||||||
|
return null;
|
||||||
|
|
||||||
|
$result = update_site_option( 'wpgpxmaps_show_notice', 0 );
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function wpgpxmaps_ilc_admin_tabs( $current ) {
|
||||||
|
if ( current_user_can( 'manage_options' ) ) {
|
||||||
|
// Access for Super Administrators and Administrators
|
||||||
|
$tabs = array(
|
||||||
|
'tracks' => __( 'Tracks', 'wp-gpx-maps' ),
|
||||||
|
'settings' => __( 'Settings', 'wp-gpx-maps' ),
|
||||||
|
'administration' => __( 'Administration', 'wp-gpx-maps' ),
|
||||||
|
'help' => __( 'Help', 'wp-gpx-maps' ),
|
||||||
|
);
|
||||||
|
} elseif ( current_user_can( 'publish_posts' ) ) {
|
||||||
|
// Access for Editors and Authors
|
||||||
|
$tabs = array(
|
||||||
|
'tracks' => __( 'Tracks', 'wp-gpx-maps' ),
|
||||||
|
'help' => __( 'Help', 'wp-gpx-maps' ),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<h2 class="nav-tab-wrapper">';
|
||||||
|
foreach ( $tabs as $tab => $name ) {
|
||||||
|
$class = ( $tab == $current ) ? ' nav-tab-active' : '';
|
||||||
|
echo "<a class='nav-tab".esc_attr($class)."' href='?page=WP-GPX-Maps&tab=" . esc_attr($tab) . "'>".esc_html($name)."</a>";
|
||||||
|
}
|
||||||
|
echo '</h2>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function wpgpxmaps_html_page() {
|
||||||
|
$realGpxPath = gpxFolderPath();
|
||||||
|
$cacheGpxPath = gpxCacheFolderPath();
|
||||||
|
$relativeGpxPath = relativeGpxFolderPath();
|
||||||
|
$relativeGpxPath = str_replace( '\\', '/', $relativeGpxPath );
|
||||||
|
$relativeGpxCachePath = relativeGpxCacheFolderPath();
|
||||||
|
$relativeGpxCachePath = str_replace( '\\', '/', $relativeGpxCachePath );
|
||||||
|
|
||||||
|
$tab = array_key_exists('tab', $_GET) ? sanitize_text_field($_GET['tab']) : 'tracks';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="wrap">
|
||||||
|
|
||||||
|
<div id="icon-themes" class="icon32"> </div>
|
||||||
|
|
||||||
|
<h1 class="header-title">
|
||||||
|
<?php
|
||||||
|
printf(
|
||||||
|
/* translators: %1s: Plugin versions number */
|
||||||
|
esc_html__( 'WP GPX Maps %1s', 'wp-gpx-maps' ),
|
||||||
|
esc_attr(WPGPXMAPS_CURRENT_VERSION)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<!-- The First Div (for body) ends in the respective file for the corresponding tab -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ( file_exists( $realGpxPath ) && is_dir( $realGpxPath ) ) {
|
||||||
|
// Directory exists
|
||||||
|
} else {
|
||||||
|
if ( ! @mkdir( $realGpxPath, 0755, true ) ) {
|
||||||
|
echo '<div class=" notice notice-error"><p>';
|
||||||
|
printf(
|
||||||
|
/* translators: %1s: Relative path of the GPX folder */
|
||||||
|
esc_html__( 'Can‘t create the folder %1s for GPX files. Please create the folder and make it writable! If not, you will must update the files manually!', 'wp-gpx-maps' ),
|
||||||
|
'<span class="code"><strong>' . esc_html( $relativeGpxPath ) . '</strong></span>'
|
||||||
|
);
|
||||||
|
echo '</p></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( file_exists( $cacheGpxPath ) && is_dir( $cacheGpxPath ) ) {
|
||||||
|
// Directory exists
|
||||||
|
} else {
|
||||||
|
if ( ! @mkdir( $cacheGpxPath, 0755, true ) ) {
|
||||||
|
echo '<div class=" notice notice-error"><p>';
|
||||||
|
printf(
|
||||||
|
/* translators: %1s: Relative path of the GPX cache folder */
|
||||||
|
esc_html__( 'Can‘t create the cache folder %1s for the GPX files. Please create the folder and make it writable! If not, you will must update the files manually!', 'wp-gpx-maps' ),
|
||||||
|
'<span class="code"><strong>' . esc_html( $relativeGpxCachePath ) . '</strong></span>'
|
||||||
|
);
|
||||||
|
echo '</p></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wpgpxmaps_ilc_admin_tabs( $tab );
|
||||||
|
|
||||||
|
if ( 'tracks' == $tab ) {
|
||||||
|
include 'wp-gpx-maps-admin-tracks.php';
|
||||||
|
} elseif ( 'settings' == $tab ) {
|
||||||
|
include 'wp-gpx-maps-admin-settings.php';
|
||||||
|
} elseif ( 'administration' == $tab ) {
|
||||||
|
include 'wp-gpx-maps-admin-administration.php';
|
||||||
|
} elseif ( 'help' == $tab ) {
|
||||||
|
include 'wp-gpx-maps-help.php';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
|
@ -1,93 +0,0 @@
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: wp-gpx-maps\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2012-10-30 14:41+0100\n"
|
|
||||||
"PO-Revision-Date: 2013-11-16 23:13+0200\n"
|
|
||||||
"Last-Translator: Svilen Savov <svilen@svilen.org>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Poedit-KeywordsList: __;_e\n"
|
|
||||||
"X-Poedit-Basepath: .\n"
|
|
||||||
"X-Generator: Poedit 1.5.7\n"
|
|
||||||
"X-Poedit-SearchPath-0: ..\n"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:467
|
|
||||||
msgid "Altitude"
|
|
||||||
msgstr "Височина"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:468
|
|
||||||
msgid "Current Position"
|
|
||||||
msgstr "Текуща Позиция"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:469
|
|
||||||
msgid "Speed"
|
|
||||||
msgstr "Скорост"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:470
|
|
||||||
msgid "Heart rate"
|
|
||||||
msgstr "Пулс"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:471
|
|
||||||
msgid "Cadence"
|
|
||||||
msgstr "Ритъм"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:472
|
|
||||||
msgid "Go Full Screen"
|
|
||||||
msgstr "Покажи на цял екран"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:473
|
|
||||||
msgid "Exit Full Screen"
|
|
||||||
msgstr "Изход от цял екран"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:474
|
|
||||||
msgid "Hide Images"
|
|
||||||
msgstr "Скрий Снимките"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:475
|
|
||||||
msgid "Show Images"
|
|
||||||
msgstr "Покажи Снкмките"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:476
|
|
||||||
msgid "Back to center"
|
|
||||||
msgstr "Центрирай"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:489
|
|
||||||
msgid "Total distance"
|
|
||||||
msgstr "Обща дистанция"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:494
|
|
||||||
msgid "Max elevation"
|
|
||||||
msgstr "Максимална височина"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:496
|
|
||||||
msgid "Min elevation"
|
|
||||||
msgstr "Минимална височина"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:498
|
|
||||||
msgid "Total climbing"
|
|
||||||
msgstr "Общо изкачване"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:500
|
|
||||||
msgid "Total descent"
|
|
||||||
msgstr "Общо спускане"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:504
|
|
||||||
msgid "Average speed"
|
|
||||||
msgstr "Средна скорост"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:509
|
|
||||||
msgid "Total Time"
|
|
||||||
msgstr "Общо Време"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:525
|
|
||||||
msgid "Download"
|
|
||||||
msgstr "Свали"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:364
|
|
||||||
msgid "Save Changes"
|
|
||||||
msgstr "Запази Промените"
|
|
|
@ -1,93 +0,0 @@
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: wp-gpx-maps\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2012-10-30 14:41+0100\n"
|
|
||||||
"PO-Revision-Date: 2013-12-14 21:43+0100\n"
|
|
||||||
"Last-Translator: edgar <forced_to_confess@yahoo.com>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Poedit-KeywordsList: __;_e\n"
|
|
||||||
"X-Poedit-Basepath: .\n"
|
|
||||||
"X-Generator: Poedit 1.5.5\n"
|
|
||||||
"X-Poedit-SearchPath-0: ..\n"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:467
|
|
||||||
msgid "Altitude"
|
|
||||||
msgstr "Altitud"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:468
|
|
||||||
msgid "Current Position"
|
|
||||||
msgstr "Posició actual"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:469
|
|
||||||
msgid "Speed"
|
|
||||||
msgstr "Velocitat"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:470
|
|
||||||
msgid "Heart rate"
|
|
||||||
msgstr "Ritme cardíac"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:471
|
|
||||||
msgid "Cadence"
|
|
||||||
msgstr "Cadència"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:472
|
|
||||||
msgid "Go Full Screen"
|
|
||||||
msgstr "Anar a pantalla completa"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:473
|
|
||||||
msgid "Exit Full Screen"
|
|
||||||
msgstr "Sortir de pantalla completa"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:474
|
|
||||||
msgid "Hide Images"
|
|
||||||
msgstr "Amagar imatges"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:475
|
|
||||||
msgid "Show Images"
|
|
||||||
msgstr "Mostrar imatges"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:476
|
|
||||||
msgid "Back to center"
|
|
||||||
msgstr "Centrar"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:489
|
|
||||||
msgid "Total distance"
|
|
||||||
msgstr "Distància total"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:494
|
|
||||||
msgid "Max elevation"
|
|
||||||
msgstr "Altitud màxima"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:496
|
|
||||||
msgid "Min elevation"
|
|
||||||
msgstr "Altitud mínima"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:498
|
|
||||||
msgid "Total climbing"
|
|
||||||
msgstr "Ascensió total"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:500
|
|
||||||
msgid "Total descent"
|
|
||||||
msgstr "Descens total"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:504
|
|
||||||
msgid "Average speed"
|
|
||||||
msgstr "Velocitat mitjana"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:509
|
|
||||||
msgid "Total Time"
|
|
||||||
msgstr "Temps total"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:525
|
|
||||||
msgid "Download"
|
|
||||||
msgstr "Descarregar"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:364
|
|
||||||
msgid "Save Changes"
|
|
||||||
msgstr "Desar canvis"
|
|
|
@ -1,95 +0,0 @@
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: wp-gpx-maps\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2015-11-21 11:14+0100\n"
|
|
||||||
"PO-Revision-Date: 2015-11-21 11:18+0100\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Poedit-KeywordsList: __;_e\n"
|
|
||||||
"X-Poedit-Basepath: .\n"
|
|
||||||
"X-Generator: Poedit 1.8.6\n"
|
|
||||||
"Last-Translator: \n"
|
|
||||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
|
||||||
"Language: cs_CZ\n"
|
|
||||||
"X-Poedit-SearchPath-0: ..\n"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:467
|
|
||||||
msgid "Altitude"
|
|
||||||
msgstr "Nadmořská výška"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:468
|
|
||||||
msgid "Current Position"
|
|
||||||
msgstr "Aktuální pozice"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:469
|
|
||||||
msgid "Speed"
|
|
||||||
msgstr "Rychlost"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:470
|
|
||||||
msgid "Heart rate"
|
|
||||||
msgstr "Srdeční tep"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:471
|
|
||||||
msgid "Cadence"
|
|
||||||
msgstr "Kadence"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:472
|
|
||||||
msgid "Go Full Screen"
|
|
||||||
msgstr "Zvětšit"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:473
|
|
||||||
msgid "Exit Full Screen"
|
|
||||||
msgstr "Zmenšit"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:474
|
|
||||||
msgid "Hide Images"
|
|
||||||
msgstr "Skrýt obrázky"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:475
|
|
||||||
msgid "Show Images"
|
|
||||||
msgstr "Zobrazit obrázky"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:476
|
|
||||||
msgid "Back to center"
|
|
||||||
msgstr "Vycentrovat"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:489
|
|
||||||
msgid "Total distance"
|
|
||||||
msgstr "Celková vzdálenost"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:494
|
|
||||||
msgid "Max elevation"
|
|
||||||
msgstr "Max. výška"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:496
|
|
||||||
msgid "Min elevation"
|
|
||||||
msgstr "Min. výška"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:498
|
|
||||||
msgid "Total climbing"
|
|
||||||
msgstr "Celkem nastoupáno"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:500
|
|
||||||
msgid "Total descent"
|
|
||||||
msgstr "Celkem naklesáno"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:504
|
|
||||||
msgid "Average speed"
|
|
||||||
msgstr "Průměrná rychlost"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:509
|
|
||||||
msgid "Total Time"
|
|
||||||
msgstr "Celkový čas"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:525
|
|
||||||
msgid "Download"
|
|
||||||
msgstr "Stáhnout"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:364
|
|
||||||
msgid "Save Changes"
|
|
||||||
msgstr "Uložit změny"
|
|
1006
wp-gpx-maps-de_DE.po
|
@ -1,93 +0,0 @@
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: wp-gpx-maps\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2012-10-30 14:42+0100\n"
|
|
||||||
"PO-Revision-Date: 2013-12-14 21:43+0100\n"
|
|
||||||
"Last-Translator: edgar <forced_to_confess@yahoo.com>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Poedit-KeywordsList: __;_e\n"
|
|
||||||
"X-Poedit-Basepath: .\n"
|
|
||||||
"X-Generator: Poedit 1.5.5\n"
|
|
||||||
"X-Poedit-SearchPath-0: ..\n"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:467
|
|
||||||
msgid "Altitude"
|
|
||||||
msgstr "Altitud"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:468
|
|
||||||
msgid "Current Position"
|
|
||||||
msgstr "Posición actual"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:469
|
|
||||||
msgid "Speed"
|
|
||||||
msgstr "Velocidad"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:470
|
|
||||||
msgid "Heart rate"
|
|
||||||
msgstr "Ritmo cardíaco"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:471
|
|
||||||
msgid "Cadence"
|
|
||||||
msgstr "Cadencia"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:472
|
|
||||||
msgid "Go Full Screen"
|
|
||||||
msgstr "Ir a pantalla completa"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:473
|
|
||||||
msgid "Exit Full Screen"
|
|
||||||
msgstr "Salir de pantalla completa"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:474
|
|
||||||
msgid "Hide Images"
|
|
||||||
msgstr "Ocultar Imágenes"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:475
|
|
||||||
msgid "Show Images"
|
|
||||||
msgstr "Mostrar Imágenes"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:476
|
|
||||||
msgid "Back to center"
|
|
||||||
msgstr "Centrar"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:489
|
|
||||||
msgid "Total distance"
|
|
||||||
msgstr "Distancia total"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:494
|
|
||||||
msgid "Max elevation"
|
|
||||||
msgstr "Elevación máxima"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:496
|
|
||||||
msgid "Min elevation"
|
|
||||||
msgstr "Elevación mínima"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:498
|
|
||||||
msgid "Total climbing"
|
|
||||||
msgstr "Total ascendido"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:500
|
|
||||||
msgid "Total descent"
|
|
||||||
msgstr "Total descendido"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:504
|
|
||||||
msgid "Average speed"
|
|
||||||
msgstr "Velocidad media"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:509
|
|
||||||
msgid "Total Time"
|
|
||||||
msgstr "Tiempo total"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:525
|
|
||||||
msgid "Download"
|
|
||||||
msgstr "Descargar"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:364
|
|
||||||
msgid "Save Changes"
|
|
||||||
msgstr "Salvar cambios"
|
|
|
@ -1,81 +0,0 @@
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: wp-gpx-maps\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2012-08-01 13:41+0100\n"
|
|
||||||
"PO-Revision-Date: 2012-11-01 22:02+0100\n"
|
|
||||||
"Last-Translator: Hervé <herve.rieu@free.fr>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Poedit-KeywordsList: __;_e\n"
|
|
||||||
"X-Poedit-Basepath: .\n"
|
|
||||||
"X-Generator: Poedit 1.5.4\n"
|
|
||||||
"X-Poedit-SearchPath-0: ..\n"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:473
|
|
||||||
msgid "Altitude"
|
|
||||||
msgstr "Altitude"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:474
|
|
||||||
msgid "Current Position"
|
|
||||||
msgstr "Position actuelle"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:475
|
|
||||||
msgid "Speed"
|
|
||||||
msgstr "Vitesse"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:476
|
|
||||||
msgid "Heart rate"
|
|
||||||
msgstr "Fréquence cardiaque"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:477
|
|
||||||
msgid "Cadence"
|
|
||||||
msgstr "Cadence"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:478
|
|
||||||
msgid "Go Full Screen"
|
|
||||||
msgstr "Plein écran"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:479
|
|
||||||
msgid "Exit Full Screen"
|
|
||||||
msgstr "Sortir du plein écran"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:492
|
|
||||||
msgid "Total distance"
|
|
||||||
msgstr "Distance totale"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:497
|
|
||||||
msgid "Max elevation"
|
|
||||||
msgstr "Altitude maximum"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:499
|
|
||||||
msgid "Min elevation"
|
|
||||||
msgstr "Altitude minimum"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:501
|
|
||||||
msgid "Total climbing"
|
|
||||||
msgstr "Denivelé total positif "
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:503
|
|
||||||
msgid "Total descent"
|
|
||||||
msgstr "Denivelé total négatif"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:507
|
|
||||||
msgid "Average speed"
|
|
||||||
msgstr "Vitesse moyenne"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:512
|
|
||||||
msgid "Total Time"
|
|
||||||
msgstr "Durée totale"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:528
|
|
||||||
msgid "Download"
|
|
||||||
msgstr "Télécharger"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:364
|
|
||||||
msgid "Save Changes"
|
|
||||||
msgstr "Enregistrer"
|
|
|
@ -1,92 +0,0 @@
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: wp-gpx-maps\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2012-10-30 14:42+0100\n"
|
|
||||||
"PO-Revision-Date: 2012-10-30 14:43+0100\n"
|
|
||||||
"Last-Translator: Biró Tamás <tami@freemail.hu>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"X-Poedit-KeywordsList: __;_e\n"
|
|
||||||
"X-Poedit-Basepath: .\n"
|
|
||||||
"X-Poedit-SearchPath-0: ..\n"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:467
|
|
||||||
msgid "Altitude"
|
|
||||||
msgstr "Magasság"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:468
|
|
||||||
msgid "Current Position"
|
|
||||||
msgstr "Aktuális pozíció"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:469
|
|
||||||
msgid "Speed"
|
|
||||||
msgstr "Sebesség"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:470
|
|
||||||
msgid "Heart rate"
|
|
||||||
msgstr "Szívritmus"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:471
|
|
||||||
msgid "Cadence"
|
|
||||||
msgstr "Kadencia"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:472
|
|
||||||
msgid "Go Full Screen"
|
|
||||||
msgstr "Teljes képernyő BE"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:473
|
|
||||||
msgid "Exit Full Screen"
|
|
||||||
msgstr "Teljes képernyő KI"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:474
|
|
||||||
msgid "Hide Images"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:475
|
|
||||||
msgid "Show Images"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:476
|
|
||||||
msgid "Back to center"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:489
|
|
||||||
msgid "Total distance"
|
|
||||||
msgstr "Teljes távolság"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:494
|
|
||||||
msgid "Max elevation"
|
|
||||||
msgstr "Max magasság"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:496
|
|
||||||
msgid "Min elevation"
|
|
||||||
msgstr "Min magasság"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:498
|
|
||||||
msgid "Total climbing"
|
|
||||||
msgstr "Össz. emelkedés"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:500
|
|
||||||
msgid "Total descent"
|
|
||||||
msgstr "Össz. ereszkedés"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:504
|
|
||||||
msgid "Average speed"
|
|
||||||
msgstr "Átlagsebesség"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:509
|
|
||||||
msgid "Total Time"
|
|
||||||
msgstr "Teljes Idő"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps.php:525
|
|
||||||
msgid "Download"
|
|
||||||
msgstr "Letöltés"
|
|
||||||
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:83 ../wp-gpx-maps_admin_settings.php:151
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:229 ../wp-gpx-maps_admin_settings.php:333
|
|
||||||
#: ../wp-gpx-maps_admin_settings.php:364
|
|
||||||
msgid "Save Changes"
|
|
||||||
msgstr "Beállítások mentése"
|
|