* 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

Many thanks to Kniebremser for its help
This commit is contained in:
bastianonm 2019-06-18 07:09:56 +00:00
parent fd8b314a70
commit b684a1031e
52 changed files with 35275 additions and 18104 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,636 +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;
}
/* 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 {
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;
-o-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);
-o-transition: -o-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;
-o-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;
}
.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;
}
/* 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 {
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);
-o-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;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 696 B

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 618 B

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,640 @@
/* 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;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +0,0 @@
{
"browser": true,
"curly": true,
"eqeqeq": true,
"undef": true,
"quotmark": "single",
"trailing": true,
"globals": {
"L": true,
"jQuery": true
}
}

View File

@ -1,4 +0,0 @@
.leaflet-control-zoom-fullscreen { background-image: url(icon-fullscreen.png); }
.leaflet-retina .leaflet-control-zoom-fullscreen { background-image: url(icon-fullscreen-2x.png); background-size: 26px 26px; }
.leaflet-container:-webkit-full-screen { 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; }

View File

@ -1,164 +0,0 @@
(function() {
L.Control.FullScreen = L.Control.extend({
options: {
position: 'topleft',
title: 'Full Screen',
forceSeparateButton: false,
forcePseudoFullscreen: false
},
onAdd: function (map) {
var className = 'leaflet-control-zoom-fullscreen', container;
if (map.zoomControl && !this.options.forceSeparateButton) {
container = map.zoomControl._container;
} else {
container = L.DomUtil.create('div', 'leaflet-bar');
}
this._createButton(this.options.title, className, container, this.toggleFullScreen, this);
return container;
},
_createButton: function (title, className, container, fn, context) {
var link = L.DomUtil.create('a', className, container);
link.href = '#';
link.title = title;
L.DomEvent
.addListener(link, 'click', L.DomEvent.stopPropagation)
.addListener(link, 'click', L.DomEvent.preventDefault)
.addListener(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._handleEscKey, context);
L.DomEvent
.addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
.addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
.addListener(document, fullScreenApi.fullScreenEventName, this._handleEscKey, context);
return link;
},
toggleFullScreen: function () {
var map = this._map;
map._exitFired = false;
if (map._isFullscreen) {
if (fullScreenApi.supportsFullScreen && !this.options.forcePseudoFullscreen) {
fullScreenApi.cancelFullScreen(map._container);
} else {
L.DomUtil.removeClass(map._container, 'leaflet-pseudo-fullscreen');
}
map.invalidateSize();
map.fire('exitFullscreen');
map._exitFired = true;
map._isFullscreen = false;
}
else {
if (fullScreenApi.supportsFullScreen && !this.options.forcePseudoFullscreen) {
fullScreenApi.requestFullScreen(map._container);
} else {
L.DomUtil.addClass(map._container, 'leaflet-pseudo-fullscreen');
}
map.invalidateSize();
map.fire('enterFullscreen');
map._isFullscreen = true;
}
},
_handleEscKey: function () {
var map = this._map;
if (!fullScreenApi.isFullScreen(map) && !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;
}
}
}
// update methods to do something useful
if (fullScreenApi.supportsFullScreen) {
fullScreenApi.fullScreenEventName = fullScreenApi.prefix + 'fullscreenchange';
fullScreenApi.isFullScreen = function() {
switch (this.prefix) {
case '':
return document.fullScreen;
case 'webkit':
return document.webkitIsFullScreen;
default:
return document[this.prefix + 'FullScreen'];
}
};
fullScreenApi.requestFullScreen = function(el) {
return (this.prefix === '') ? el.requestFullscreen() : el[this.prefix + 'RequestFullScreen']();
};
fullScreenApi.cancelFullScreen = function(el) {
return (this.prefix === '') ? document.exitFullscreen() : 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;
})();

View File

@ -1,22 +0,0 @@
Copyright (c) 2013, Bruno Bergot
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

View File

@ -1,48 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Leaflet.Control.FullScreen Demo</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<style type="text/css">
#map { width: 700px; height: 433px; }
.leaflet-control-zoom-fullscreen { background-image: url(icon-fullscreen.png); }
/* on 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:-moz-full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
#map:full-screen { 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="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<script src="Control.FullScreen.js"></script>
</head>
<body>
<div id="map"></div>
<script>
var base = new L.TileLayer('http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</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 !"
}
});
// 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>

View File

@ -0,0 +1,32 @@
{
"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
}
}

View File

@ -0,0 +1,7 @@
{
"commitMessage": "version %s",
"tagName": "%s",
"scripts": {
"postcommit": "git push && git push --tags && npm publish"
}
}

View File

@ -0,0 +1,8 @@
.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; }

View File

@ -0,0 +1,202 @@
(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;
})();

View File

@ -0,0 +1,19 @@
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.

View File

@ -37,6 +37,8 @@ If your map have a zoomControl the fullscreen button will be added at the bottom
If your map doesn't have a zoomContron the fullscreen button will be added to topleft corner of the map (same as the zoomcontrol).
If you want to use the plugin on a map embedded in an iframe, don't forget to set `allowfullscreen` attribute on your iframe.
__Events and options__:
``` js
@ -44,8 +46,11 @@ __Events and options__:
L.control.fullscreen({
position: 'topleft', // change the position of the button can be topleft, topright, bottomright or bottomleft, defaut topleft
title: 'Show me the fullscreen !', // change the title of the button, default Full Screen
titleCancel: 'Exit fullscreen mode', // change the title of the button when fullscreen is on, default Exit Full Screen
content: null, // change the content of the button, can be HTML, default null
forceSeparateButton: true, // force seperate button to detach from zoom buttons, default false
forcePseudoFullscreen: true // force use of pseudo full screen even if full screen API is available, default false
forcePseudoFullscreen: true, // force use of pseudo full screen even if full screen API is available, default false
fullscreenElement: false // Dom element to render in full screen, false by default, fallback to map._container
}).addTo(map);
// events are fired when entering or exiting fullscreen.

View File

@ -1,7 +1,8 @@
{
"name": "leaflet.fullscreen",
"version": "1.1.4",
"version": "1.4.5",
"homepage": "https://github.com/brunob/leaflet.fullscreen",
"license": "MIT",
"authors": [
"brunob <brunobergot@gmail.com>"
],
@ -12,13 +13,15 @@
"icon-fullscreen.png",
"icon-fullscreen-2x.png"
],
"devDependencies": {
"eslint": "2.3.0"
},
"keywords": [
"leaflet",
"plugins",
"maps",
"fullscreen"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

View File

@ -0,0 +1,51 @@
<!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: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <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>

View File

@ -1,10 +1,10 @@
{
"name": "leaflet.fullscreen",
"version": "1.1.4",
"version": "1.4.5",
"description": "Simple plugin for Leaflet that adds fullscreen button to your maps.",
"main": "Control.FullScreen.js",
"scripts": {
"test": "jshint Control.FullScreen.js"
"test": "eslint --config .eslintrc Control.FullScreen.js"
},
"repository": {
"type": "git",
@ -17,7 +17,7 @@
"fullscreen"
],
"devDependencies": {
"jshint": "2.5.0"
"eslint": "2.3.0"
},
"author": "b_b",
"license": "MIT License",

BIN
assets/icon-128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
assets/icon-256x256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

1
assets/icon.svg Normal file
View File

@ -0,0 +1 @@
<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>

After

Width:  |  Height:  |  Size: 3.8 KiB

62
css/admin-style.css Normal file
View File

@ -0,0 +1,62 @@
/**
* 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;
}

13
js/Chart.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: wp-gpx-maps\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-30 14:41+0100\n"
"POT-Creation-Date: 2019-06-12 18:57+0200\n"
"PO-Revision-Date: 2012-10-30 14:41+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -11,82 +12,945 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e\n"
"X-Poedit-Basepath: .\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../wp-gpx-maps.php:467
#: ../wp-gpx-maps.php:53 ../wp-gpx-maps_admin.php:50
#: ../wp-gpx-maps_admin.php:102
msgid "Settings"
msgstr ""
#: ../wp-gpx-maps.php:737
msgid "Altitude"
msgstr ""
#: ../wp-gpx-maps.php:468
msgid "Current Position"
#: ../wp-gpx-maps.php:738
msgid "Current position"
msgstr ""
#: ../wp-gpx-maps.php:469
#: ../wp-gpx-maps.php:739
msgid "Speed"
msgstr ""
#: ../wp-gpx-maps.php:470
#: ../wp-gpx-maps.php:740
msgid "Grade"
msgstr ""
#: ../wp-gpx-maps.php:741
msgid "Heart rate"
msgstr ""
#: ../wp-gpx-maps.php:471
#: ../wp-gpx-maps.php:742
msgid "Temperature"
msgstr ""
#: ../wp-gpx-maps.php:743
msgid "Cadence"
msgstr ""
#: ../wp-gpx-maps.php:472
msgid "Go Full Screen"
#: ../wp-gpx-maps.php:744
msgid "Go full screen"
msgstr ""
#: ../wp-gpx-maps.php:473
msgid "Exit Full Screen"
#: ../wp-gpx-maps.php:745
msgid "Exit full screen"
msgstr ""
#: ../wp-gpx-maps.php:474
msgid "Hide Images"
#: ../wp-gpx-maps.php:746
msgid "Hide images"
msgstr ""
#: ../wp-gpx-maps.php:475
msgid "Show Images"
#: ../wp-gpx-maps.php:747
msgid "Show images"
msgstr ""
#: ../wp-gpx-maps.php:476
#: ../wp-gpx-maps.php:748
msgid "Back to center"
msgstr ""
#: ../wp-gpx-maps.php:489
#: ../wp-gpx-maps.php:761
msgid "Total distance"
msgstr ""
#: ../wp-gpx-maps.php:494
#: ../wp-gpx-maps.php:765
msgid "Max elevation"
msgstr ""
#: ../wp-gpx-maps.php:496
#: ../wp-gpx-maps.php:767
msgid "Min elevation"
msgstr ""
#: ../wp-gpx-maps.php:498
#: ../wp-gpx-maps.php:769
msgid "Total climbing"
msgstr ""
#: ../wp-gpx-maps.php:500
#: ../wp-gpx-maps.php:771
msgid "Total descent"
msgstr ""
#: ../wp-gpx-maps.php:504
#: ../wp-gpx-maps.php:774
msgid "Average speed"
msgstr ""
#: ../wp-gpx-maps.php:509
msgid "Total Time"
#: ../wp-gpx-maps.php:777
msgid "Average cadence"
msgstr ""
#: ../wp-gpx-maps.php:525
#: ../wp-gpx-maps.php:780
msgid "Average heart rate"
msgstr ""
#: ../wp-gpx-maps.php:783
msgid "Average temperature"
msgstr ""
#: ../wp-gpx-maps.php:787
msgid "Total time"
msgstr ""
#: ../wp-gpx-maps.php:801 ../wp-gpx-maps_admin_tracks.php:183
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
#: ../wp-gpx-maps_admin.php:49 ../wp-gpx-maps_admin.php:56
msgid "Tracks"
msgstr ""
#: ../wp-gpx-maps_admin.php:51 ../wp-gpx-maps_admin.php:57
msgid "Help"
msgstr ""
#. translators: Relative path of the GPX folder
#: ../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 ""
#. translators: Relative path of the GPX cache folder
#: ../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:56 ../wp-gpx-maps_help.php:64
msgid "General"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:62
msgid "Map width:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:71
msgid "Map height:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:80
msgid "Graph height:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:89
msgid "Distance type:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:93
msgid "Normal (default)"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:94
msgid "Flat &#8594; (Only flat distance, don&#8217;t take care of altitude)"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:95
msgid "Climb &#8593; (Only climb distance)"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:102
msgid "Cache:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:109
msgid "Do not use cache"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:117
msgid "GPX Download:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:124 ../wp-gpx-maps_help.php:119
msgid "Allow users to download your GPX file"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:132
msgid "Use browser GPS position:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:139
msgid "Allow users to use browser GPS in order to display their current position on map"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:147
msgid "Thunderforest API Key (Open Cycle Map):"
msgstr ""
#. translators: 1: Link to documentation of Thunderforest API Key's 2: Additional link attribute
#: ../wp-gpx-maps_admin_settings.php:155
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:169 ../wp-gpx-maps_admin_settings.php:353
#: ../wp-gpx-maps_admin_settings.php:529 ../wp-gpx-maps_admin_settings.php:747
#: ../wp-gpx-maps_admin_settings.php:815
msgid "Save Changes"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:180 ../wp-gpx-maps_help.php:547
msgid "Summary table"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:186
msgid "Summary table:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:193 ../wp-gpx-maps_help.php:566
msgid "Print summary details of your GPX track"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:201
msgid "Total distance:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:208
msgid "Print total distance"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:216
msgid "Max elevation:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:223
msgid "Print max elevation"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:231
msgid "Min elevation:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:238
msgid "Print min elevation"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:246
msgid "Total climbing:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:253
msgid "Print total climbing"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:261
msgid "Total descent:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:268
msgid "Print total descent"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:275
msgid "Average speed:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:282
msgid "Print average speed"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:290
msgid "Average cadence:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:297
msgid "Print average cadence"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:305
msgid "Average heart rate:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:312
msgid "Print average heart rate"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:320
msgid "Average temperature:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:327
msgid "Print average temperature"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:335
msgid "Total time:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:342
msgid "Print total time"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:364 ../wp-gpx-maps_help.php:148
msgid "Map"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:371
msgid "Default map type:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:377 ../wp-gpx-maps_help.php:172
msgid "Open Street Map"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:383 ../wp-gpx-maps_help.php:174
msgid "Open Cycle Map"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:389 ../wp-gpx-maps_help.php:176
msgid "Open Cycle Map - Transport"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:395 ../wp-gpx-maps_help.php:178
msgid "Open Cycle Map - Landscape"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:401 ../wp-gpx-maps_help.php:180
msgid "MapToolKit - Terrain"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:407 ../wp-gpx-maps_help.php:182
msgid "Open Street Map - Humanitarian map style"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:413 ../wp-gpx-maps_help.php:184
msgid "Hike & Bike"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:419 ../wp-gpx-maps_help.php:186
msgid "Open Sea Map"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:427
msgid "Map line color:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:436
msgid "On mouse scroll wheel:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:443
msgid "Enable zoom"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:451
msgid "Waypoints support:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:458
msgid "Show waypoints"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:466
msgid "Start track icon:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:471 ../wp-gpx-maps_admin_settings.php:483
#: ../wp-gpx-maps_admin_settings.php:495 ../wp-gpx-maps_admin_settings.php:507
#: ../wp-gpx-maps_admin_settings.php:519
msgid "(URL to image) Leave empty to hide."
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:478
msgid "End track icon:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:490
msgid "Current position icon:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:502
msgid "Current GPS position icon:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:514
msgid "Custom waypoint icon:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:539
msgid "Chart"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:546
msgid "Altitude:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:553
msgid "Show altitude"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:562
msgid "Altitude line color:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:571
msgid "Unit of measure:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:575 ../wp-gpx-maps_help.php:311
msgid "meters / meters"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:576 ../wp-gpx-maps_help.php:313
msgid "feet / miles"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:577 ../wp-gpx-maps_help.php:315
msgid "meters / kilometers"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:578 ../wp-gpx-maps_help.php:317
msgid "meters / nautical miles"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:579 ../wp-gpx-maps_help.php:319
msgid "meters / miles"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:580 ../wp-gpx-maps_help.php:321
msgid "feet / nautical miles"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:587
msgid "Altitude display offset:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:590 ../wp-gpx-maps_admin_settings.php:638
msgid "From"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:592 ../wp-gpx-maps_admin_settings.php:640
msgid "to"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:594 ../wp-gpx-maps_admin_settings.php:642
msgid "(leave empty for auto scale)"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:600
msgid "Speed:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:603
msgid "Show speed"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:609
msgid "Speed line color:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:618
msgid "Speed unit of measure:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:622 ../wp-gpx-maps_help.php:371
msgid "m/s"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:623 ../wp-gpx-maps_help.php:373
msgid "km/h"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:624 ../wp-gpx-maps_help.php:375
msgid "miles/h"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:625 ../wp-gpx-maps_help.php:377
msgid "min/km"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:626 ../wp-gpx-maps_help.php:379
msgid "min/miles"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:627 ../wp-gpx-maps_help.php:381
msgid "Knots (nautical miles / hour)"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:628 ../wp-gpx-maps_help.php:383
msgid "min/100 meters"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:635
msgid "Speed display offset:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:648
msgid "Heart rate (where aviable):"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:655
msgid "Show heart rate"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:663
msgid "Heart rate line color:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:672
msgid "Temperature (where aviable):"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:679
msgid "Show temperature"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:687
msgid "Temperature line color:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:696
msgid "Cadence (where aviable):"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:703
msgid "Show cadence"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:711
msgid "Cadence line color:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:720
msgid "Grade:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:727
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:735
msgid "Grade line color:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:757
msgid "Advanced Options"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:760
msgid "(Do not edit if you don&#8217;t know what you are doing!)"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:767
msgid "Skip GPX points closer than:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:774
msgid "meters"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:782
msgid "Reduce GPX:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:789
msgid "Do not reduce GPX"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:797
msgid "User upload:"
msgstr ""
#: ../wp-gpx-maps_admin_settings.php:804
msgid "Allow registered user to upload GPX files"
msgstr ""
#: ../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 ""
#. translators: GPX file name
#: ../wp-gpx-maps_admin_tracks.php:57
#, php-format
msgid "The file %1s has been successfully uploaded."
msgstr ""
#: ../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 ""
#. translators: Relative path of the GPX folder
#: ../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 ""
#. translators: GPX file name
#: ../wp-gpx-maps_admin_tracks.php:121
#, php-format
msgid "The file %1s has been successfully deleted."
msgstr ""
#. translators: GPX file name
#: ../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:4
msgid "FAQ"
msgstr ""
#: ../wp-gpx-maps_help.php:8
msgid "How can I upload the GPX files?"
msgstr ""
#: ../wp-gpx-maps_help.php:11
msgid "1. Method: Upload the GPX file using the uploader in the tab \"Tracks\"."
msgstr ""
#: ../wp-gpx-maps_help.php:16
msgid "2. Method: Upload the GPX file via FTP to your upload folder:"
msgstr ""
#: ../wp-gpx-maps_help.php:22
msgid "How can I use the GPX files?"
msgstr ""
#: ../wp-gpx-maps_help.php:25
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:30
msgid "You can manually set the relative path to your GPX file. Please use this scheme:"
msgstr ""
#: ../wp-gpx-maps_help.php:36
msgid "Can I also integrate GPX files from other sites?"
msgstr ""
#: ../wp-gpx-maps_help.php:41
msgid "Yes, it&#8217s possible. Please use this scheme:"
msgstr ""
#: ../wp-gpx-maps_help.php:47
msgid "Can I change the attributes for each GPX shortcode?"
msgstr ""
#: ../wp-gpx-maps_help.php:50
msgid "Yes, it&#8217s possible. These changes ignore the default settings for each attribute."
msgstr ""
#: ../wp-gpx-maps_help.php:55
msgid "The Full set of optional attributes can be found below. Please use this scheme:"
msgstr ""
#: ../wp-gpx-maps_help.php:58
msgid "read below all the optional attributes"
msgstr ""
#: ../wp-gpx-maps_help.php:71 ../wp-gpx-maps_help.php:155
#: ../wp-gpx-maps_help.php:270 ../wp-gpx-maps_help.php:492
#: ../wp-gpx-maps_help.php:554 ../wp-gpx-maps_help.php:719
msgid "Shortcode"
msgstr ""
#: ../wp-gpx-maps_help.php:74 ../wp-gpx-maps_help.php:158
#: ../wp-gpx-maps_help.php:273 ../wp-gpx-maps_help.php:495
#: ../wp-gpx-maps_help.php:557 ../wp-gpx-maps_help.php:722
msgid "Description"
msgstr ""
#: ../wp-gpx-maps_help.php:77 ../wp-gpx-maps_help.php:161
#: ../wp-gpx-maps_help.php:276 ../wp-gpx-maps_help.php:498
#: ../wp-gpx-maps_help.php:560 ../wp-gpx-maps_help.php:725
msgid "Possible values"
msgstr ""
#: ../wp-gpx-maps_help.php:83
msgid "relative path to the GPX file"
msgstr ""
#: ../wp-gpx-maps_help.php:92
msgid "Map width"
msgstr ""
#: ../wp-gpx-maps_help.php:95 ../wp-gpx-maps_help.php:104
#: ../wp-gpx-maps_help.php:113
msgid "Value in pixels"
msgstr ""
#: ../wp-gpx-maps_help.php:101
msgid "Map height"
msgstr ""
#: ../wp-gpx-maps_help.php:110
msgid "Graph height"
msgstr ""
#: ../wp-gpx-maps_help.php:123 ../wp-gpx-maps_help.php:136
#: ../wp-gpx-maps_help.php:197 ../wp-gpx-maps_help.php:210
#: ../wp-gpx-maps_help.php:223 ../wp-gpx-maps_help.php:286
#: ../wp-gpx-maps_help.php:299 ../wp-gpx-maps_help.php:346
#: ../wp-gpx-maps_help.php:359 ../wp-gpx-maps_help.php:408
#: ../wp-gpx-maps_help.php:421 ../wp-gpx-maps_help.php:434
#: ../wp-gpx-maps_help.php:447 ../wp-gpx-maps_help.php:460
#: ../wp-gpx-maps_help.php:473 ../wp-gpx-maps_help.php:526
#: ../wp-gpx-maps_help.php:570 ../wp-gpx-maps_help.php:583
#: ../wp-gpx-maps_help.php:596 ../wp-gpx-maps_help.php:609
#: ../wp-gpx-maps_help.php:622 ../wp-gpx-maps_help.php:635
#: ../wp-gpx-maps_help.php:648 ../wp-gpx-maps_help.php:661
#: ../wp-gpx-maps_help.php:674 ../wp-gpx-maps_help.php:687
#: ../wp-gpx-maps_help.php:700 ../wp-gpx-maps_help.php:735
#: ../wp-gpx-maps_help.php:748
msgid "Default is:"
msgstr ""
#: ../wp-gpx-maps_help.php:132
msgid "Do not use cache. If TRUE might be very slow"
msgstr ""
#: ../wp-gpx-maps_help.php:167
msgid "Map type"
msgstr ""
#: ../wp-gpx-maps_help.php:193
msgid "Map line color"
msgstr ""
#: ../wp-gpx-maps_help.php:206
msgid "Zoom on map when mouse scroll wheel"
msgstr ""
#: ../wp-gpx-maps_help.php:219
msgid "Print the GPX waypoints inside the map"
msgstr ""
#: ../wp-gpx-maps_help.php:232
msgid "Start track icon"
msgstr ""
#: ../wp-gpx-maps_help.php:239
msgid "End track icon"
msgstr ""
#: ../wp-gpx-maps_help.php:246
msgid "Current position icon (when mouse hover)"
msgstr ""
#: ../wp-gpx-maps_help.php:253
msgid "Custom waypoint icon"
msgstr ""
#: ../wp-gpx-maps_help.php:263
msgid "Diagram"
msgstr ""
#: ../wp-gpx-maps_help.php:282
msgid "Show elevation data inside the chart"
msgstr ""
#: ../wp-gpx-maps_help.php:295
msgid "Altitude line color"
msgstr ""
#: ../wp-gpx-maps_help.php:308
msgid "Distance / Altitude unit of measure"
msgstr ""
#: ../wp-gpx-maps_help.php:328
msgid "Minimum value for altitude chart"
msgstr ""
#: ../wp-gpx-maps_help.php:335
msgid "Maximum value for altitude chart"
msgstr ""
#: ../wp-gpx-maps_help.php:342
msgid "Show speed inside the chart"
msgstr ""
#: ../wp-gpx-maps_help.php:355
msgid "Speed line color"
msgstr ""
#: ../wp-gpx-maps_help.php:368
msgid "Speed unit of measure"
msgstr ""
#: ../wp-gpx-maps_help.php:390
msgid "Minimum value for speed chart"
msgstr ""
#: ../wp-gpx-maps_help.php:397
msgid "Maximum value for speed chart"
msgstr ""
#: ../wp-gpx-maps_help.php:404
msgid "Show heart rate inside the chart"
msgstr ""
#: ../wp-gpx-maps_help.php:417
msgid "Heart rate line color"
msgstr ""
#: ../wp-gpx-maps_help.php:430
msgid "Show cadence inside the chart"
msgstr ""
#: ../wp-gpx-maps_help.php:443
msgid "Cadence line color"
msgstr ""
#: ../wp-gpx-maps_help.php:456
msgid "Show grade inside the chart"
msgstr ""
#: ../wp-gpx-maps_help.php:469
msgid "Grade line color"
msgstr ""
#: ../wp-gpx-maps_help.php:485
msgid "Pictures"
msgstr ""
#: ../wp-gpx-maps_help.php:504
msgid "NextGen Gallery"
msgstr ""
#: ../wp-gpx-maps_help.php:507
msgid "Gallery ID or a list of Galleries ID separated by a comma"
msgstr ""
#: ../wp-gpx-maps_help.php:513
msgid "NextGen Image"
msgstr ""
#: ../wp-gpx-maps_help.php:516
msgid "Image ID or a list of Images ID separated by a comma"
msgstr ""
#: ../wp-gpx-maps_help.php:522
msgid "Show all images that are attached to post"
msgstr ""
#: ../wp-gpx-maps_help.php:535
msgid "The difference between your GPX tool date and your camera date"
msgstr ""
#: ../wp-gpx-maps_help.php:538
msgid "Value in seconds"
msgstr ""
#: ../wp-gpx-maps_help.php:579
msgid "Print total distance in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:592
msgid "Print max. elevation in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:605
msgid "Print min. elevation in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:618
msgid "Print total climbing in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:631
msgid "Print total descent in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:644
msgid "Print average speed in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:657
msgid "Print average cadence in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:670
msgid "Print average heart rate in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:683
msgid "Print average temperature in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:696
msgid "Print total time in summary table"
msgstr ""
#: ../wp-gpx-maps_help.php:712
msgid "Advanced"
msgstr ""
#: ../wp-gpx-maps_help.php:731
msgid "Skip GPX points closer than XX meters"
msgstr ""
#: ../wp-gpx-maps_help.php:744
msgid "Print all the GPX waypoints without reduce it"
msgstr ""
#: ../wp-gpx-maps_help.php:760
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 ""
#: ../wp-gpx-maps_utils.php:539
msgid "WP GPX Maps Error: Can&#8217;t parse xml file!"
msgstr ""

View File

@ -1,31 +1,29 @@
=== WP GPX Maps ===
=== WP GPX Maps ===
Contributors: bastianonm, Stephan Klein, Michel Selerin
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: 2.0.0
Tested up to: 4.9.8
Stable tag: 1.6.07
Requires at least: 4.6.0
Tested up to: 5.2.1
Stable tag: 1.7.00
Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map.
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).
Now on github: https://github.com/devfarm-it/wp-gpx-maps
On github you can contribuite easly with your code
Fully configurable:
- Custom colors
- Custom icons
- Multiple language support
Supported charts:
- Altitude
- Speed
- Heart Rate
- Heart rate
- Temperature
- Cadence
- Grade
@ -33,13 +31,24 @@ Supported charts:
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 you gpx file.
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 Stephan Klein (https://klein-gedruckt.de/2015/03/wordpress-plugin-wp-gpx-maps/) and supports displaying all images attached to a post without using NGG.
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.
Translated into 14 languages:
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 19 translatable texts for 14 languages:
- Catalan ca
- Dutch nl_NL
@ -60,25 +69,28 @@ Translated into 14 languages:
- Norwegian nb_NO
- Japanese ja_JP
(many thanks to all guys who helped me with the translations)
(Many thanks to all guys who helped me with the translations)
- iphone/ipad/ipod Compatible
Currently are 222 texts are translatable in the plugin.
Try this plugin: <a href="https://devfarm.it/wp-gpx-maps-demo/">https://devfarm.it/wp-gpx-maps-demo/</a>
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.
<a href="http://www.devfarm.it/forums/forum/wp-gpx-maps/">Support Forum</a>
Supported gpx namespaces are:
Supported GPX namespaces are:
1. http://www.topografix.com/GPX/1/0
1. http://www.topografix.com/GPX/1/1
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/">www.securcube.net</a>, <a href="http://www.devfarm.it/">www.devfarm.it</a>
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 ==
@ -90,58 +102,63 @@ Thanks to: <a href="http://www.securcube.net/">www.securcube.net</a>, <a href="h
== Frequently Asked Questions ==
= what are all available shortcode attributes? =
= Which shortcode attributes are available? =
The attributes are:
You can use the following shortcodes:
1. gpx: relative path to gpx
1. width: width in pixels
1. mheight: map height
1. gheight: graph height
1. mtype: map available types are: HYBRID, ROADMAP, SATELLITE, TERRAIN, OSM1 (Open Street Map), OSM2 (Open Cycle Map), OSM3 (Hike & Bike), OSM4 (Open Cycle Map - Transport), OSM5 (Open Cycle Map - Landscape), OSM6 (MapToolKit - Terrain)
1. waypoints: print the gpx waypoints inside the map (default is FALSE)
1. donotreducegpx: print all the point without reduce it (default is FALSE)
1. pointsoffset: skip points closer than XX meters(default is 10)
1. uom: distance/altitude possible unit of measure are: 0, 1, 2, 3, 4, 5 (0 = meters, 1 = feet/miles, 2 = meters/kilometers, 3 = meters/nautical miles, 4 = meters/miles, 5 = feet/nautical miles)
1. mlinecolor: map line color (default is #3366cc)
1. glinecolor: altitude line color (default is #3366cc)
1. showspeed: show speed inside the chart (default is FALSE)
1. showhr: show heart rate inside the chart (default is FALSE)
1. showele: show elevation data inside the chart (default is TRUE)
1. showcad: show cadence inside the chart (default is FALSE)
1. showgrade: show grade inside the chart (default is FALSE)
1. glinecolorspeed: speed line color (default is #ff0000)
1. glinecolorhr: heart rate line color (default is #ff77bd)
1. glinecolorcad: cadence line color (default is #beecff)
1. glinecolorgrade: grade line color (default is #beecff)
1. uomspeed: unit of measure for speed are: 0, 1, 2, 3, 4, 5 (0 = m/s, 1 = km/h, 2 = miles/h, 3 = min/km, 4 = min/miles, 5 = Nautical Miles/Hour (Knots))
1. chartFrom1: minimun value for altitude chart
1. chartTo1: maxumin value for altitude chart
1. chartFrom2: minimun value for speed chart
1. chartTo2: maxumin value for speed chart
1. gpx: Relative path to the GPX file
1. width: Width in pixels
1. mheight: Map height
1. gheight: Graph height
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: waypoint custom icon
1. waypointicon: Waypoint custom 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. dtoffset: the difference (in seconds) between your gpx tool date and your camera date
1. zoomonscrollwheel: zoom on map when mouse scroll wheel
1. download: Allow users to download your GPX file
1. skipcache: Do not use cache. If TRUE might be very slow (default is FALSE)
1. summary: Print summary details of your GPX (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. 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? =
= What happening if I've a very large gpx? =
This plugin will print a small amout of points to speedup javascript and pageload.
= Is it free? =
Yes!
== Screenshots ==
@ -150,9 +167,22 @@ Yes!
1. Admin area - List of tracks
1. Admin area - Settings
1. Altitude & Speed
1. Altitude & Speed & Hearth rate
1. Altitude & Speed & Heart rate
== Changelog ==
= 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 =

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,9 @@
if ( is_admin() ){
if ( is_admin() ) {
add_action('admin_menu', 'wpgpxmaps_admin_menu');
add_action( 'admin_menu', 'wpgpxmaps_admin_menu' );
}
@ -12,15 +12,28 @@ if ( is_admin() ){
function wpgpxmaps_admin_menu() {
if ( current_user_can('manage_options') ){
/*
add_options_page('WP GPX Maps', 'WP GPX Maps', 'manage_options', 'WP-GPX-Maps', 'WP_GPX_Maps_html_page');
All roles/capabilities:
https://wordpress.org/support/article/roles-and-capabilities/
*/
if ( current_user_can( 'manage_options' ) ) {
/* Only Administrators and Super Administrators */
add_options_page( 'WP GPX Maps', 'WP GPX Maps', 'manage_options', 'WP-GPX-Maps', 'WP_GPX_Maps_html_page' );
}
elseif ( current_user_can( 'publish_posts' ) ) {
/* Contributor Authors and */
else if ( current_user_can('publish_posts') ) {
$allow_users_upload = get_option( 'wpgpxmaps_allow_users_view' ) === "true";
add_menu_page('WP GPX Maps', 'WP GPX Maps', 'publish_posts', 'WP-GPX-Maps', 'WP_GPX_Maps_html_page');
if ($allow_users_upload == 1)
{
add_menu_page( 'WP GPX Maps', 'WP GPX Maps', 'publish_posts', 'WP-GPX-Maps', 'WP_GPX_Maps_html_page' );
}
}
@ -30,35 +43,32 @@ function wpgpxmaps_admin_menu() {
function wpgpxmaps_ilc_admin_tabs( $current ) {
if ( current_user_can( 'manage_options' ) ) {
$tabs = array(
'tracks' => __( 'Tracks', 'wp-gpx-maps' ),
'settings' => __( 'Settings', 'wp-gpx-maps' ),
'help' => __( 'Help', 'wp-gpx-maps' ),
);
} elseif ( current_user_can( 'publish_posts' ) ) {
if (current_user_can('manage_options'))
$tabs = array(
'tracks' => __( 'Tracks', 'wp-gpx-maps' ),
'help' => __( 'Help', 'wp-gpx-maps' ),
);
}
{
echo '<h2 class="nav-tab-wrapper">';
$tabs = array( 'tracks' => 'Tracks', 'settings' => 'Settings', 'help' => "help" );
foreach ( $tabs as $tab => $name ) {
$class = ( $tab == $current ) ? ' nav-tab-active' : '';
echo "<a class='nav-tab$class' href='?page=WP-GPX-Maps&tab=$tab'>$name</a>";
}
else if ( current_user_can('publish_posts') ) {
$tabs = array( 'tracks' => 'Tracks', 'help' => "help" );
}
echo '<h2 class="nav-tab-wrapper">';
foreach( $tabs as $tab => $name ){
$class = ( $tab == $current ) ? ' nav-tab-active' : '';
echo "<a class='nav-tab$class' href='?page=WP-GPX-Maps&tab=$tab'>$name</a>";
}
echo '</h2>';
echo '</h2>';
}
@ -72,252 +82,72 @@ function WP_GPX_Maps_html_page() {
$relativeGpxPath = relativeGpxFolderPath();
$relativeGpxPath = str_replace("\\","/", $relativeGpxPath);
$relativeGpxPath = str_replace( "\\","/", $relativeGpxPath );
$relativeGpxCachePath = relativeGpxCacheFolderPath();
$relativeGpxCachePath = str_replace( "\\","/", $relativeGpxCachePath );
$tab = $_GET['tab'];
if ($tab == '')
if ( $tab == '' )
$tab = 'tracks';
?>
?>
<div id="icon-themes" class="icon32"><br></div>
<h2>WP GPX Settings</h2>
<h2><?php _e( 'Settings', 'wp-gpx-maps' ); ?></h2>
<?php
<?php
if ( file_exists( $realGpxPath ) && is_dir( $realGpxPath ) ) {
/* Directory exist! */
if(file_exists($realGpxPath) && is_dir($realGpxPath))
{
//dir exsist!
}
else
{
if (!@mkdir($realGpxPath,0755,true)) {
echo '<div class="error" style="padding:10px">
Can\'t create <b>'.$realGpxPath.'</b> folder. Please create it and make it writable!<br />
If not, you will must update the file manually!
</div>';
} else {
if ( ! @mkdir( $realGpxPath, 0755, true ) ) {
echo '<div class=" notice notice-error"><p>';
printf(
/* translators: Relative path of the GPX folder */
__( '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!', 'wp-gpx-maps' ),
'<span class="code"><strong>' . esc_html( $relativeGpxPath ) . '</strong></span>'
);
echo '</p></div>';
}
}
if ( file_exists( $cacheGpxPath ) && is_dir( $cacheGpxPath ) ) {
/* Directory exist! */
if(file_exists($cacheGpxPath) && is_dir($cacheGpxPath))
{
//dir exsist!
}
else
{
if (!@mkdir($cacheGpxPath,0755,true)) {
echo '<div class="error" style="padding:10px">
Can\'t create <b>'.$cacheGpxPath.'</b> folder. Please create it and make it writable!<br />
If not, cache will not created and your site could be slower!
</div>';
} else {
if ( ! @mkdir( $cacheGpxPath, 0755, true ) ) {
echo '<div class=" notice notice-error"><p>';
printf(
/* translators: Relative path of the GPX cache folder */
__( '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!', 'wp-gpx-maps' ),
'<span class="code"><strong>' . esc_html( $relativeGpxCachePath ) . '</strong></span>'
);
echo '</p></div>';
}
}
wpgpxmaps_ilc_admin_tabs( $tab );
wpgpxmaps_ilc_admin_tabs($tab);
if ($tab == "tracks")
{
if ( $tab == 'tracks' ) {
include 'wp-gpx-maps_admin_tracks.php';
}
else if ($tab == "settings")
{
} elseif ( $tab == 'settings' ) {
include 'wp-gpx-maps_admin_settings.php';
} elseif ( $tab == 'help' ) {
include 'wp-gpx-maps_help.php';
}
else if ($tab == "help")
{
?>
<div style="padding:10px;">
<b>The fastest way to use this plugin:</b><br /> upload the file using the uploader in the first tab, than copy the shortcode from the list and paste it in the pages/posts.
<p>You can manually set the relative path to your gpx: <b>[sgpx gpx="<?php echo $relativeGpxPath; ?>&lt gpx file name &gt"]</b>.</p>
<p>You can also use gpx from other sites: <b>[sgpx gpx="http://www.someone.com/somewhere/somefile.gpx"]</b></p>
<hr />
<p>
<i>Full set of attributes:</i> <b>[sgpx gpx="<?php echo $relativeGpxPath; ?>&lt gpx file name &gt" </b>
&nbsp;&nbsp;&nbsp;<em>&gt&gt read below all the optional attributes &lt&lt</em>&nbsp;&nbsp;&nbsp;
<b>]</b>
<ul>
<li><b>gpx</b>: relative path to gpx
</li><li><b>width</b>: width in pixels
</li><li><b>mheight</b>: map height
</li><li><b>gheight</b>: graph height
</li><li><b>mtype</b>: map available types are: HYBRID, ROADMAP, SATELLITE, TERRAIN, OSM1 (Open Street Map), OSM2 (Open Cycle Map), OSM3 (Hike & Bike), OSM4 (Open Cycle Map - Transport), OSM5 (Open Cycle Map - Landscape), OSM6 (MapToolKit - Terrain)
</li><li><b>waypoints</b>: print the gpx waypoints inside the map (default is FALSE)
</li><li><b>donotreducegpx</b>: print all the point without reduce it (default is FALSE)
</li><li><b>pointsoffset</b>: skip points closer than XX meters(default is 10)
</li><li><b>uom</b>: distance/altitude possible unit of measure are: 0, 1, 2, 3, 4, 5 (0 = meters, 1 = feet/miles, 2 = meters/kilometers, 3 = meters/nautical miles, 4 = meters/miles, 5 = feet/nautical miles)
</li><li><b>mlinecolor</b>: map line color (default is #3366cc)
</li><li><b>glinecolor</b>: altitude line color (default is #3366cc)
</li><li><b>showspeed</b>: show speed inside the chart (default is FALSE)
</li><li><b>showhr</b>: show heart rate inside the chart (default is FALSE)
</li><li><b>showele</b>: show elevation data inside the chart (default is TRUE)
</li><li><b>showcad</b>: show cadence inside the chart (default is FALSE)
</li><li><b>showgrade</b>: show grade inside the chart (default is FALSE)
</li><li><b>glinecolorspeed</b>: speed line color (default is #ff0000)
</li><li><b>glinecolorhr</b>: heart rate line color (default is #ff77bd)
</li><li><b>glinecolorcad</b>: cadence line color (default is #beecff)
</li><li><b>glinecolorgrade</b>: grade line color (default is #beecff)
</li><li><b>uomspeed</b>: unit of measure for speed are: 0, 1, 2, 3, 4, 5 (0 = m/s, 1 = km/h, 2 = miles/h, 3 = min/km, 4 = min/miles, 5 = Nautical Miles/Hour (Knots), 6 = min/100 meters)
</li><li><b>chartFrom1</b>: minimun value for altitude chart
</li><li><b>chartTo1</b>: maxumin value for altitude chart
</li><li><b>chartFrom2</b>: minimun value for speed chart
</li><li><b>chartTo2</b>: maxumin value for speed chart
</li><li><b>startIcon</b>: Start track icon
</li><li><b>endIcon</b>: End track icon
</li><li><b>currentIcon</b>: Current position icon (when mouse hover)
</li><li><b>waypointicon</b>: waypoint custom icon
</li><li><b>nggalleries</b>: NextGen Gallery id or a list of Galleries id separated by a comma
</li><li><b>ngimages</b>: NextGen Image id or a list of Images id separated by a comma
</li><li><b>dtoffset</b>: the difference (in seconds) between your gpx tool date and your camera date
</li><li><b>zoomonscrollwheel</b>: zoom on map when mouse scroll wheel
</li><li><b>download</b>: Allow users to download your GPX file
</li><li><b>skipcache</b>: Do not use cache. If TRUE might be very slow (default is FALSE)
</li><li><b>summary</b>: Print summary details of your GPX (default is FALSE)
</li><li><b>summarytotlen</b>: Print Total distance in summary table (default is FALSE)
</li><li><b>summarymaxele</b>: Print Max Elevation in summary table (default is FALSE)
</li><li><b>summaryminele</b>: Print Min Elevation in summary table (default is FALSE)
</li><li><b>summaryeleup</b>: Print Total climbing in summary table (default is FALSE)
</li><li><b>summaryeledown</b>: Print Total descent in summary table (default is FALSE)
</li><li><b>summaryavgspeed</b>: Print Average Speed in summary table (default is FALSE)
</li><li><b>summaryavgcad</b>: Print Average Cadence in summary table (default is FALSE)
</li><li><b>summaryavghr</b>: Print Average Heart Rate in summary table (default is FALSE)
</li><li><b>summaryavgtemp</b>: Print Average Temperature in summary table (default is FALSE)
</li><li><b>summarytotaltime</b>: Print Total time in summary table (default is FALSE) </li>
</ul>
<p>
<a href="http://devfarm.it/forums/forum/wp-gpx-maps/">Bugs, problems, thanks and anything else here!</a>
</p>
</p>
</div>
<?php
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,130 +1,159 @@
<?php
if ( !(is_admin()) )
return;
if ( ! ( is_admin() ) )
return;
$is_admin = current_user_can( 'manage_options' );
$is_admin = current_user_can( 'publish_posts' );
if ( $is_admin != 1 )
return;
if ( $is_admin != 1 )
return;
$gpxRegEx = '/.gpx$/i';
$allow_users_upload = get_option( 'wpgpxmaps_allow_users_view' ) === "true";
if ( isset($_POST['clearcache']) )
{
$wpgpxmapsUrl = get_admin_url() . "admin.php?page=WP-GPX-Maps";
if ( isset($_GET['_wpnonce'])
&&
wp_verify_nonce( $_GET['_wpnonce'], 'wpgpx_clearcache_nonce' . $entry )
)
{
echo "Cache is now empty!";
wpgpxmaps_recursive_remove_directory($cacheGpxPath, true);
}
$gpxRegEx = '/.gpx$/i';
if ( current_user_can( 'manage_options' ) ) {
$menu_root = 'options-general.php';
} elseif ( current_user_can( 'publish_posts' ) ) {
$menu_root = 'admin.php';
}
if ( isset( $_POST['clearcache'] ) ) {
if ( isset( $_GET['_wpnonce'] )
&&
wp_verify_nonce( $_GET['_wpnonce'], 'wpgpx_clearcache_nonce' . $entry )
) {
echo '<div class="notice notice-success"><p>';
_e( 'Cache is now empty!', 'wp-gpx-maps' );
echo '</p></div>';
wpgpxmaps_recursive_remove_directory( $cacheGpxPath, true );
}
}
if ( is_writable ( $realGpxPath ) ){
if ( is_writable( $realGpxPath ) ) {
?>
<div class="tablenav top">
<form enctype="multipart/form-data" method="POST" style="float:left; margin:5px 20px 0 0" action="/wp-admin/options-general.php?page=WP-GPX-Maps">
Choose a file to upload: <input name="uploadedfile[]" type="file" onchange="submitgpx(this);" multiple />
<?php
if ( isset($_FILES['uploadedfile']) )
{
$total = count($_FILES['uploadedfile']['name']);
for($i=0; $i<$total; $i++) {
$uploadingFileName = basename( $_FILES['uploadedfile']['name'][$i]);
$target_path = $realGpxPath ."/". $uploadingFileName;
if (preg_match($gpxRegEx, $target_path))
{
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'][$i], $target_path)) {
echo "<br />File <b>". $uploadingFileName . "</b> has been uploaded";
} else{
echo "<br />There was an error uploading the file, please try again!";
}
}
else
{
echo "file not supported!";
}
}
<?php
echo '<form enctype="multipart/form-data" method="POST" style="float:left; margin:5px 20px 0 0" action="' . get_bloginfo( 'wpurl' ) . '/wp-admin/' . $menu_root . '?page=WP-GPX-Maps">';
?>
<?php _e( 'Choose a file to upload:', 'wp-gpx-maps' ); ?> <input name="uploadedfile[]" type="file" onchange="submitgpx(this);" multiple />
<?php
if ( isset( $_FILES['uploadedfile'] ) ) {
$total = count( $_FILES['uploadedfile']['name'] );
for ( $i = 0; $i < $total; $i++ ) {
$uploadingFileName = basename( $_FILES['uploadedfile']['name'][$i] );
$target_path = $realGpxPath . "/" . $uploadingFileName;
if ( preg_match( $gpxRegEx, $target_path ) ) {
if ( move_uploaded_file( $_FILES['uploadedfile']['tmp_name'][$i], $target_path ) ) {
echo '<div class="notice notice-success"><p>';
printf(
/* translators: GPX file name */
__( '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>';
_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>';
_e( 'The file type is not supported!', 'wp-gpx-maps' );
echo '</p></div>';
}
}
}
?>
</form>
<form method="POST" style="float:left; margin:5px 20px 0 0" action="/wp-admin/options-general.php?page=WP-GPX-Maps&_wpnonce=<?php echo wp_create_nonce( 'wpgpx_clearcache_nonce' ) ?>" >
<input type="submit" name="clearcache" value="Clear Cache" />
<form method="POST" style="float:left; margin:5px 20px 0 0" action="<?php echo $wpgpxmapsUrl; ?>&_wpnonce=<?php echo wp_create_nonce( 'wpgpx_clearcache_nonce' ); ?>" >
<input type="submit" name="clearcache" value="<?php _e( 'Clear Cache', 'wp-gpx-maps' ); ?>" />
</form>
</div>
<?php
}
else
{
?>
<br />
<br />
<p style='font-size:2em;'>please make <b><?php echo $realGpxPath ?></b> folder writable. </p>
} else {
?>
<br />
<?php echo '<div class=" notice notice-error"><p>'; ?>
<p style='font-size:2em;'>
<?php
printf(
/* translators: Relative path of the GPX folder */
__( 'Your folder for GPX files %1s is not writable. Please change the folder permissions.', 'wp-gpx-maps' ),
'<span class="code">' . esc_html( $relativeGpxPath ) . '</span>'
);
?>
</p>
<?php 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 ( is_readable ( $realGpxPath ) && $handle = opendir( $realGpxPath ) ) {
while ( false !== ( $entry = readdir( $handle ) ) ) {
if ( preg_match( $gpxRegEx, $entry ) ) {
if ( isset($_GET['_wpnonce'])
&&
wp_verify_nonce( $_GET['_wpnonce'], 'wpgpx_deletefile_nonce_' . $entry )
) {
if ( file_exists($realGpxPath ."/". $entry) )
{
unlink($realGpxPath ."/". $entry);
echo "<br/><b>$entry has been deleted.</b>";
}
else {
echo "<br/><b>Can't delete $entry.</b>";
}
}
else
{
$myFile = $realGpxPath . "/" . $entry;
$myGpxFileNames[] = array(
'name' => $entry,
'size' => filesize( $myFile ),
'lastedit' => filemtime( $myFile ),
'nonce' => wp_create_nonce( 'wpgpx_deletefile_nonce_' . $entry ),
);
if ( file_exists( $realGpxPath . "/" . $entry ) ) {
unlink( $realGpxPath . "/" . $entry );
echo '<div class="notice notice-success"><p>';
printf(
/* translators: GPX file name */
__( '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: GPX file name */
__( '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);
}
closedir( $handle );
}
if ( is_readable ( $realGpxPath ) && $handle = opendir($realGpxPath)) {
while (false !== ($entry = readdir($handle))) {
if (preg_match($gpxRegEx,$entry ))
{
$filenames[] = $realGpxPath . "/" . $entry;
}
}
closedir($handle);
if ( is_readable ( $realGpxPath ) && $handle = opendir( $realGpxPath ) ) {
while ( false !== ($entry = readdir( $handle ) ) ) {
if ( preg_match( $gpxRegEx, $entry ) ) {
$filenames[] = $realGpxPath . "/" . $entry;
}
}
$wpgpxmaps_gpxRelativePath = get_site_url(null, '/wp-content/uploads/gpx/');
closedir( $handle );
}
?>
@ -134,32 +163,32 @@
function submitgpx(el)
{
var newEl = document.createElement('span');
newEl.innerHTML = 'Uploading file...';
el.parentNode.insertBefore(newEl,el.nextSibling);
el.parentNode.submit()
var newEl = document.createElement('span');
newEl.innerHTML = '<?php _e( 'Uploading file...', 'wp-gpx-maps' ); ?>';
el.parentNode.insertBefore(newEl,el.nextSibling);
el.parentNode.submit()
}
jQuery('#table').bootstrapTable({
columns: [{
field: 'name',
title: 'File',
title: '<?php _e( 'File', 'wp-gpx-maps' ); ?>',
sortable: true,
formatter: function(value, row, index) {
return [
'<b>' + row.name + '</b><br />',
'<a class="delete_gpx_row" href="/wp-admin/options-general.php?page=WP-GPX-Maps&_wpnonce=' + row.nonce + '" >Delete</a>',
'<a class="delete_gpx_row" href="<?php echo $wpgpxmapsUrl; ?>&_wpnonce=' + row.nonce + '" ><?php _e( 'Delete', 'wp-gpx-maps' ); ?></a>',
' | ',
'<a href="<?php echo $wpgpxmaps_gpxRelativePath ?>' + row.name + '">Download</a>',
'<a href="<?php echo $relativeGpxPath; ?>' + row.name + '"><?php _e( 'Download', 'wp-gpx-maps' ); ?></a>',
' | ',
'Shortcode: [sgpx gpx="<?php echo $relativeGpxPath ?>' + row.name + '"]',
'<a href="#" class="copy-shortcode" title="<?php _e( 'Copy shortcode', 'wp-gpx-maps' ); ?>"><?php _e( 'Shortcode:', 'wp-gpx-maps' ); ?></a> <span class="code"> [sgpx gpx="<?php echo $relativeGpxPath ?>' + row.name + '"]</span>',
].join('')
}
}, {
field: 'lastedit',
title: 'Last modified',
title: '<?php _e( 'Last modified', 'wp-gpx-maps' ); ?>',
sortable: true,
formatter: function(value, row, index) {
var d = new Date(value*1000);
@ -167,17 +196,17 @@
}
}, {
field: 'size',
title: 'File size',
title: '<?php _e( 'File size', 'wp-gpx-maps' ); ?>',
sortable: true,
formatter: function(value, row, index) { return humanFileSize(value); }
}],
sortName : 'lastedit',
sortOrder : 'desc',
data: <?php echo json_encode( $myGpxFileNames ) ?>
data: <?php echo wp_json_encode( $myGpxFileNames ); ?>
});
jQuery('.delete_gpx_row').click(function(){
return confirm("Are you sure you want to delete?");
return confirm("<?php _e( 'Are you sure you want to delete the file?', 'wp-gpx-maps' ); ?>");
})
function humanFileSize(bytes, si) {
@ -196,6 +225,18 @@
return bytes.toFixed(1)+' '+units[u];
}
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();
});
</script>

957
wp-gpx-maps_help.php Normal file
View File

@ -0,0 +1,957 @@
<div id="wpgpxmaps-tab-faq">
<div class="wpgpxmaps-container-tab-faq">
<div class="wpgpxmaps-tab-faq">
<h3 class="title"><?php _e( 'FAQ', 'wp-gpx-maps' ); ?></h3>
<p>
<strong><?php _e( 'How can I upload the GPX files?', 'wp-gpx-maps' ); ?></strong>
</p>
<p>
&nbsp; <?php _e( '1. Method: Upload the GPX file using the uploader in the tab "Tracks".', 'wp-gpx-maps' ); ?>
</p>
<p>
&nbsp;
<?php
_e( '2. Method: Upload the GPX file via FTP to your upload folder:', 'wp-gpx-maps' );
echo ' ';
?>
<code><strong> <?php echo $relativeGpxPath; ?> </strong></code>
</p>
<p>
<strong><?php _e( 'How can I use the GPX files?', 'wp-gpx-maps' ); ?></strong>
</p>
<p>
&nbsp; <?php _e( 'Go to the tab "Tracks" and copy the shortcode from the list and paste it in the page or post.', 'wp-gpx-maps' ); ?>
</p>
<p>
&nbsp;
<?php
_e( 'You can manually set the relative path to your GPX file. Please use this scheme:', 'wp-gpx-maps' );
echo ' ';
?>
<code><strong>[sgpx gpx="<?php echo $relativeGpxPath; ?>yourgpxfile.gpx"]</strong></code>
</p>
<p>
<strong><?php _e( 'Can I also integrate GPX files from other sites?', 'wp-gpx-maps' ); ?></strong>
</p>
<p>
&nbsp;
<?php
_e( 'Yes, it&#8217s possible. Please use this scheme:', 'wp-gpx-maps' );
echo ' ';
?>
<code><strong>[sgpx gpx="http://www.someone.com/somewhere/somefile.gpx"]</strong></code>
</p>
<p>
<strong><?php _e( 'Can I change the attributes for each GPX shortcode?', 'wp-gpx-maps' ); ?></strong>
</p>
<p>
&nbsp; <?php _e( 'Yes, it&#8217s possible. These changes ignore the default settings for each attribute.', 'wp-gpx-maps' ); ?>
</p>
<p>
&nbsp;
<?php
_e( 'The Full set of optional attributes can be found below. Please use this scheme:', 'wp-gpx-maps' );
echo ' ';
?>
<code><strong>[sgpx gpx="<?php echo $relativeGpxPath; ?>yourgpxfile.gpx &lt; <?php _e( 'read below all the optional attributes', 'wp-gpx-maps' ); ?> &gt;"]</strong></code>
</p>
</div>
<table class="widefat">
<thead>
<tr>
<th colspan="4">
<strong><?php _e( 'General', 'wp-gpx-maps' ); ?></strong>
</th>
</tr>
<tr>
<th scope="col">
<?php _e( 'Shortcode', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Description', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Possible values', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Current value', 'wp-gpx-maps' ); ?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>gpx</td>
<td>
<?php _e( 'relative path to the GPX file', 'wp-gpx-maps' ); ?>
</td>
<td>
<code><strong>gpx="/wp-upload dir/gpx/yourgpxfile.gpx"</strong></code>
</td>
<td>
<code><strong>gpx="<?php echo $relativeGpxPath; ?>yourgpxfile.gpx"</strong></code>
</td>
</tr>
<tr>
<td>width</td>
<td>
<?php _e( 'Map width', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php _e( 'Value in percent', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_width' ); ?>
</td>
</tr>
<tr>
<td>mheight</td>
<td>
<?php _e( 'Map height', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php _e( 'Value in pixels', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_height' ); ?>
</td>
</tr>
<tr>
<td>gheight</td>
<td>
<?php _e( 'Graph height', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php _e( 'Value in pixels', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_height' ); ?>
</td>
</tr>
<tr>
<td>download</td>
<td>
<?php _e( 'Allow users to download your GPX file', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_download' ); ?>
</td>
</tr>
<tr>
<td>skipcache</td>
<td>
<?php _e('Do not use cache. If TRUE might be very slow', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_skipcache' ); ?>
</td>
</tr>
</tbody>
</table>
<br />
<table class="widefat">
<thead>
<tr>
<th colspan="4">
<strong><?php _e( 'Map', 'wp-gpx-maps' ); ?></strong>
</th>
</tr>
<tr>
<th scope="col">
<?php _e( 'Shortcode', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Description', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Possible values', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Current value', 'wp-gpx-maps' ); ?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>mtype</td>
<td>
<?php _e( 'Map type', 'wp-gpx-maps' ); ?>
</td>
<td>
<strong>HYBRID, ROADMAP, SATELLITE, TERRAIN</strong>
<br />
<strong>OSM1</strong> = <?php _e( 'Open Street Map', 'wp-gpx-maps' ); ?>
<br />
<strong>OSM2</strong> = <?php _e( 'Open Cycle Map', 'wp-gpx-maps' ); ?>
<br />
<strong>OSM4</strong> = <?php _e( 'Open Cycle Map - Transport', 'wp-gpx-maps' ); ?>
<br />
<strong>OSM5</strong> = <?php _e( 'Open Cycle Map - Landscape', 'wp-gpx-maps' ); ?>
<br />
<strong>OSM6</strong> = <?php _e( 'MapToolKit - Terrain', 'wp-gpx-maps' ); ?>
<br />
<strong>OSM7</strong> = <?php _e( 'Open Street Map - Humanitarian map style', 'wp-gpx-maps' ); ?>
<br />
<strong>OSM9</strong> = <?php _e( 'Hike & Bike', 'wp-gpx-maps' ); ?>
<br />
<strong>OSM10</strong> = <?php _e( 'Open Sea Map', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_map_type' ); ?>
</td>
</tr>
<tr>
<td>mlinecolor</td>
<td>
<?php _e( 'Map line color', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>#3366cc</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_map_line_color' ); ?>
</td>
</tr>
<tr>
<td>zoomonscrollwheel</td>
<td>
<?php _e( 'Zoom on map when mouse scroll wheel', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_zoomonscrollwheel' ); ?>
</td>
</tr>
<tr>
<td>waypoints</td>
<td>
<?php _e( 'Print the GPX waypoints inside the map', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_show_waypoint' ); ?>
</td>
</tr>
<tr>
<td>startIcon</td>
<td>
<?php _e( 'Start track icon', 'wp-gpx-maps' ); ?>
</td>
<td></td>
<td>
<?php echo get_option( 'wpgpxmaps_map_start_icon' ); ?>
</td>
</tr>
<tr>
<td>endIcon</td>
<td>
<?php _e( 'End track icon', 'wp-gpx-maps' ); ?>
</td>
<td></td>
<td>
<?php echo get_option( 'wpgpxmaps_map_end_icon' ); ?>
</td>
</tr>
<tr>
<td>currentIcon</td>
<td>
<?php _e( 'Current position icon (when mouse hover)', 'wp-gpx-maps' ); ?>
</td>
<td></td>
<td>
<?php echo get_option( 'wpgpxmaps_map_current_icon' ); ?>
</td>
</tr>
<tr>
<td>waypointicon</td>
<td>
<?php _e( 'Custom waypoint icon', 'wp-gpx-maps' ); ?>
</td>
<td></td>
<td>
<?php echo get_option( 'wpgpxmaps_map_waypoint_icon' ); ?>
</td>
</tr>
</tbody>
</table>
<br />
<table class="widefat">
<thead>
<tr>
<th colspan="4">
<strong><?php _e( 'Diagram', 'wp-gpx-maps' ); ?></strong>
</th>
</tr>
<tr>
<th scope="col">
<?php _e( 'Shortcode', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Description', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Possible values', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Current value', 'wp-gpx-maps' ); ?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>showele</td>
<td>
<?php _e( 'Show elevation data inside the chart', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>true</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_show_elevation' ); ?>
</td>
</tr>
<tr>
<td>glinecolor</td>
<td>
<?php _e( 'Altitude line color', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>#3366cc</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_line_color' ); ?>
</td>
</tr>
<tr>
<td>uom</td>
<td>
<?php _e( 'Distance / Altitude unit of measure', 'wp-gpx-maps' ); ?>
</td>
<td>
<strong>0</strong> = <?php _e( 'meters / meters', 'wp-gpx-maps' ); ?>
<br />
<strong>1</strong> = <?php _e( 'feet / miles', 'wp-gpx-maps' ); ?>
<br />
<strong>2</strong> = <?php _e( 'meters / kilometers', 'wp-gpx-maps' ); ?>
<br />
<strong>3</strong> = <?php _e( 'meters / nautical miles', 'wp-gpx-maps' ); ?>
<br />
<strong>4</strong> = <?php _e( 'meters / miles', 'wp-gpx-maps' ); ?>
<br />
<strong>5</strong> = <?php _e( 'feet / nautical miles', 'wp-gpx-maps' ); ?>
<br />
</td>
<td>
<?php echo get_option( 'wpgpxmaps_unit_of_measure' ); ?>
</td>
</tr>
<tr>
<td>chartFrom1</td>
<td>
<?php _e( 'Minimum value for altitude chart', 'wp-gpx-maps' ); ?>
</td>
<td></td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_offset_from1' ); ?>
</td>
</tr>
<tr>
<td>chartTo1</td>
<td>
<?php _e( 'Maximum value for altitude chart', 'wp-gpx-maps' ); ?>
</td>
<td></td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_offset_to1' ); ?>
</td>
</tr>
<tr>
<td>showspeed</td>
<td>
<?php _e( 'Show speed inside the chart', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_show_speed' ); ?>
</td>
</tr>
<tr>
<td>glinecolorspeed</td>
<td>
<?php _e( 'Speed line color', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>#ff0000</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_line_color_speed' ); ?>
</td>
</tr>
<tr>
<td>uomspeed</td>
<td>
<?php _e( 'Speed unit of measure', 'wp-gpx-maps' ); ?>
</td>
<td>
<strong>0</strong> = <?php _e( 'm/s', 'wp-gpx-maps' ); ?>
<br />
<strong>1</strong> = <?php _e( 'km/h', 'wp-gpx-maps' ); ?>
<br />
<strong>2</strong> = <?php _e( 'miles/h', 'wp-gpx-maps' ); ?>
<br />
<strong>3</strong> = <?php _e( 'min/km', 'wp-gpx-maps' ); ?>
<br />
<strong>4</strong> = <?php _e( 'min/miles', 'wp-gpx-maps' ); ?>
<br />
<strong>5</strong> = <?php _e( 'Knots (nautical miles / hour)', 'wp-gpx-maps' ); ?>
<br />
<strong>6</strong> = <?php _e( 'min/100 meters', 'wp-gpx-maps' ); ?>
<br />
</td>
<td>
<?php echo get_option( 'wpgpxmaps_unit_of_measure_speed' ); ?>
</td>
</tr>
<tr>
<td>chartFrom2</td>
<td>
<?php _e( 'Minimum value for speed chart', 'wp-gpx-maps' ); ?>
</td>
<td></td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_offset_from2' ); ?>
</td>
</tr>
<tr>
<td>chartTo2</td>
<td>
<?php _e( 'Maximum value for speed chart', 'wp-gpx-maps' ); ?>
</td>
<td></td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_offset_to2' ); ?>
</td>
</tr>
<tr>
<td>showhr</td>
<td>
<?php _e( 'Show heart rate inside the chart', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_show_hr' ); ?>
</td>
</tr>
<tr>
<td>glinecolorhr</td>
<td>
<?php _e( 'Heart rate line color', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>#ff77bd</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_line_color_hr' ); ?>
</td>
</tr>
<td>showatemp</td>
<td>
<?php _e( 'Show temperature inside the chart', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_show_atemp' ); ?>
</td>
</tr>
<tr>
<td>glinecoloratemp</td>
<td>
<?php _e( 'Temperature line color', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>#ff77bd</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_line_color_atemp' ); ?>
</td>
</tr>
<tr>
<td>showcad</td>
<td>
<?php _e( 'Show cadence inside the chart', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_show_cadence' ); ?>
</td>
</tr>
<tr>
<td>glinecolorcad</td>
<td>
<?php _e( 'Cadence line color', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>#beecff</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_line_color_cad' ); ?>
</td>
</tr>
<tr>
<td>showgrade</td>
<td>
<?php _e( 'Show grade inside the chart', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_show_grade' ); ?>
</td>
</tr>
<tr>
<td>glinecolorgrade</td>
<td>
<?php _e( 'Grade line color', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>#beecff</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_graph_line_color_grade' ); ?>
</td>
</tr>
</tbody>
</table>
<br />
<table class="widefat">
<thead>
<tr>
<th colspan="3">
<strong><?php _e( 'Pictures', 'wp-gpx-maps' ); ?></strong>
</th>
</tr>
<tr>
<th scope="col">
<?php _e( 'Shortcode', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Description', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Possible values', 'wp-gpx-maps' ); ?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>nggalleries</td>
<td>
<?php _e( 'NextGen Gallery', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php _e( 'Gallery ID or a list of Galleries ID separated by a comma', 'wp-gpx-maps' ); ?>
</td>
</tr>
<tr>
<td>ngimages</td>
<td>
<?php _e( 'NextGen Image', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php _e( 'Image ID or a list of Images ID separated by a comma', 'wp-gpx-maps' ); ?>
</td>
</tr>
<tr>
<td>attachments</td>
<td>
<?php _e( 'Show all images that are attached to post', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
</tr>
<tr>
<td>dtoffset</td>
<td>
<?php _e( 'The difference between your GPX tool date and your camera date', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php _e( 'Value in seconds', 'wp-gpx-maps' ); ?>
</td>
</tr>
</tbody>
</table>
<br />
<table class="widefat">
<thead>
<tr>
<th colspan="4">
<strong><?php _e( 'Summary table', 'wp-gpx-maps' ); ?></strong>
</th>
</tr>
<tr>
<th scope="col">
<?php _e( 'Shortcode', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Description', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Possible values', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Current value', 'wp-gpx-maps' ); ?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>summary</td>
<td>
<?php _e( 'Print summary details of your GPX track', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary' ); ?>
</td>
</tr>
<tr>
<td>summarytotlen</td>
<td>
<?php _e( 'Print total distance in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_tot_len' ); ?>
</td>
</tr>
<tr>
<td>summarymaxele</td>
<td>
<?php _e( 'Print max. elevation in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_max_ele' ); ?>
</td>
</tr>
<tr>
<td>summaryminele</td>
<td>
<?php _e( 'Print min. elevation in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_min_ele' ); ?>
</td>
</tr>
<tr>
<td>summaryeleup</td>
<td>
<?php _e( 'Print total climbing in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_total_ele_up' ); ?>
</td>
</tr>
<tr>
<td>summaryeledown</td>
<td>
<?php _e( 'Print total descent in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_total_ele_down' ); ?>
</td>
</tr>
<tr>
<td>summaryavgspeed</td>
<td>
<?php _e( 'Print average speed in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_avg_speed' ); ?>
</td>
</tr>
<tr>
<td>summaryavgcad</td>
<td>
<?php _e( 'Print average cadence in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_avg_cad' ); ?>
</td>
</tr>
<tr>
<td>summaryavghr</td>
<td>
<?php _e( 'Print average heart rate in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_avg_hr' ); ?>
</td>
</tr>
<tr>
<td>summaryavgtemp</td>
<td>
<?php _e( 'Print average temperature in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_avg_temp' ); ?>
</td>
</tr>
<tr>
<td>summarytotaltime</td>
<td>
<?php _e( 'Print total time in summary table', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_summary_total_time' ); ?>
</td>
</tr>
</tbody>
</table>
<br />
<table class="widefat">
<thead>
<tr>
<th colspan="4">
<strong><?php _e( 'Advanced', 'wp-gpx-maps' ); ?></strong>
</th>
</tr>
<tr>
<th scope="col">
<?php _e( 'Shortcode', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Description', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Possible values', 'wp-gpx-maps' ); ?>
</th>
<th scope="col">
<?php _e( 'Current value', 'wp-gpx-maps' ); ?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>pointsoffset</td>
<td>
<?php _e( 'Skip GPX points closer than XX meters', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>10</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_pointsoffset' ); ?>
</td>
</tr>
<tr>
<td>donotreducegpx</td>
<td>
<?php _e( 'Print all the GPX waypoints without reduce it', 'wp-gpx-maps' ); ?>
</td>
<td>
<?php
_e( 'Default is:', 'wp-gpx-maps' );
echo ' ';
?>
<strong>false</strong>
</td>
<td>
<?php echo get_option( 'wpgpxmaps_donotreducegpx' ); ?>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<a href="http://devfarm.it/forums/forum/wp-gpx-maps/" target="_blank" rel="noopener noreferrer"><?php _e( 'Bugs, problems, thanks and anything else here!', 'wp-gpx-maps' ); ?></a>
</p>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -1,149 +1,128 @@
<?php
function wpgpxmaps_isNGGalleryActive() {
if (!function_exists('is_plugin_active')) {
require_once(wp_gpx_maps_sitePath() . '/wp-admin/includes/plugin.php');
}
return is_plugin_active("nextgen-gallery/nggallery.php");
function wpgpxmaps_isNGGalleryActive() {
if ( ! function_exists( 'is_plugin_active' ) ) {
require_once( wp_gpx_maps_sitePath() . '/wp-admin/includes/plugin.php' );
}
return is_plugin_active( 'nextgen-gallery/nggallery.php' );
}
function wpgpxmaps_isNGGalleryProActive() {
if (!function_exists('is_plugin_active')) {
require_once(wp_gpx_maps_sitePath() . '/wp-admin/includes/plugin.php');
}
return is_plugin_active("nextgen-gallery-pro/nggallery-pro.php");
function wpgpxmaps_isNGGalleryProActive() {
if ( ! function_exists( 'is_plugin_active' ) ) {
require_once( wp_gpx_maps_sitePath() . '/wp-admin/includes/plugin.php' );
}
return is_plugin_active( 'nextgen-gallery-pro/nggallery-pro.php' );
}
function getNGGalleryImages( $ngGalleries, $ngImages, $dt, $lat, $lon, $dtoffset, &$error ) {
function getNGGalleryImages($ngGalleries, $ngImages, $dt, $lat, $lon, $dtoffset, &$error)
{
$result = array();
$galids = explode( ',', $ngGalleries );
$imgids = explode( ',', $ngImages );
$result = array();
$galids = explode(',', $ngGalleries);
$imgids = explode(',', $ngImages);
if ( ! wpgpxmaps_isNGGalleryActive() )
if (!wpgpxmaps_isNGGalleryActive())
return '';
try {
$pictures = array();
foreach ($galids as $g) {
$pictures = array_merge($pictures, nggdb::get_gallery($g));
}
foreach ($imgids as $i) {
array_push($pictures, nggdb::find_image($i));
}
// print_r ($pictures);
foreach ($pictures as $p) {
$item = array();
$item["data"] = $p->thumbHTML;
if (is_callable('exif_read_data'))
{
$exif = @exif_read_data($p->imagePath);
if ($exif !== false)
{
$item["lon"] = getExifGps($exif["GPSLongitude"], $exif['GPSLongitudeRef']);
$item["lat"] = getExifGps($exif["GPSLatitude"], $exif['GPSLatitudeRef']);
if (($item["lat"] != 0) || ($item["lon"] != 0))
{
return '';
try {
$pictures = array();
foreach ( $galids as $g ) {
$pictures = array_merge( $pictures, nggdb::get_gallery( $g ) );
}
foreach ( $imgids as $i ) {
array_push( $pictures, nggdb::find_image( $i ) );
}
foreach ( $pictures as $p ) {
$item = array();
$item['data'] = $p->thumbHTML;
if ( is_callable( 'exif_read_data' ) ) {
$exif = @exif_read_data( $p->imagePath );
if ( $exif !== false ) {
$item['lon'] = getExifGps( $exif['GPSLongitude'], $exif['GPSLongitudeRef'] );
$item['lat'] = getExifGps( $exif['GPSLatitude'], $exif['GPSLatitudeRef'] );
if ( ( $item['lat'] != 0 ) || ( $item['lon'] != 0 ) ) {
$result[] = $item;
} elseif ( isset( $p->imagedate ) ) {
$_dt = strtotime( $p->imagedate ) + $dtoffset;
$_item = findItemCoordinate( $_dt, $dt, $lat, $lon );
if ( $_item != null ) {
$item['lat'] = $_item['lat'];
$item['lon'] = $_item['lon'];
$result[] = $item;
}
else if (isset($p->imagedate))
{
$_dt = strtotime($p->imagedate) + $dtoffset;
$_item = findItemCoordinate($_dt, $dt, $lat, $lon);
if ($_item != null)
{
$item["lat"] = $_item["lat"];
$item["lon"] = $_item["lon"];
$result[] = $item;
}
}
}
}
else
{
$error .= "Sorry, <a href='http://php.net/manual/en/function.exif-read-data.php' target='_blank' >exif_read_data</a> function not found! check your hosting..<br />";
}
} else {
$error .= "Sorry, <a href='https://php.net/manual/en/function.exif-read-data.php' target='_blank' rel='noopener noreferrer'>exif_read_data</a> function not found! check your hosting..<br />";
}
}
/* START FIX NEXT GEN GALLERY 2.x */
if ( class_exists( 'C_Component_Registry' ) ) {
$renderer = C_Component_Registry::get_instance()->get_utility( 'I_Displayed_Gallery_Renderer' );
$params['gallery_ids'] = $ngGalleries;
$params['image_ids'] = $ngImages;
$params['display_type'] = NEXTGEN_GALLERY_BASIC_THUMBNAILS;
$params['images_per_page'] = 999;
/* Salso add js references to get the gallery working */
$dummy = $renderer->display_images( $params, $inner_content );
/* START FIX NEXT GEN GALLERY PRO */
/* START FIX NEXT GEN GALLERY 2.x */
if ( class_exists("C_Component_Registry") )
{
$renderer = C_Component_Registry::get_instance()->get_utility('I_Displayed_Gallery_Renderer');
$params['gallery_ids'] = $ngGalleries;
$params['image_ids'] = $ngImages;
$params['display_type'] = NEXTGEN_GALLERY_BASIC_THUMBNAILS;
$params['images_per_page'] = 999;
// also add js references to get the gallery working
$dummy = $renderer->display_images($params, $inner_content);
/* START FIX NEXT GEN GALLERY PRO */
if (preg_match("/data-nplmodal-gallery-id=[\"'](.*?)[\"']/", $dummy, $m))
{
$galid = $m[1];
if ($galid)
{
for($i = 0; $i < count($result); ++$i)
{
$result[$i]["data"] = str_replace("%PRO_LIGHTBOX_GALLERY_ID%", $galid, $result[$i]["data"]);
}
if ( preg_match( "/data-nplmodal-gallery-id=[\"'](.*?)[\"']/", $dummy, $m ) ) {
$galid = $m[1];
if ( $galid ) {
for( $i = 0; $i < count( $result ); ++$i ) {
$result[$i]['data'] = str_replace( '%PRO_LIGHTBOX_GALLERY_ID%', $galid, $result[$i]['data'] );
}
}
/* END FIX NEXT GEN GALLERY PRO */
}
/* END FIX NEXT GEN GALLERY 2.x */
} catch (Exception $e) {
$error .= 'Error When Retrieving NextGen Gallery galleries/images: $e <br />';
/* END FIX NEXT GEN GALLERY PRO */
}
/* END FIX NEXT GEN GALLERY 2.x */
return $result;
} catch ( Exception $e ) {
$error .= 'Error When Retrieving NextGen Gallery galleries/images: $e <br />';
}
return $result;
}
function findItemCoordinate($imgdt, $dt, $lat, $lon)
{
foreach(array_keys($dt) as $i)
{
if ($i!=0 && $imgdt >= $dt[$i-1] && $imgdt <= $dt[$i])
{
if ($lat[$i] != 0 && $lon[$i] != 0)
return array( "lat" => $lat[$i], "lon" => $lon[$i] );
}
function findItemCoordinate( $imgdt, $dt, $lat, $lon ) {
foreach ( array_keys( $dt ) as $i ) {
if ( $i!=0 && $imgdt >= $dt[$i-1] && $imgdt <= $dt[$i] ) {
if ( $lat[$i] != 0 && $lon[$i] != 0 )
return array( 'lat' => $lat[$i], 'lon' => $lon[$i] );
}
return null;
}
return null;
}
function getExifGps($exifCoord, $hemi)
{
$degrees = count($exifCoord) > 0 ? gps2Num($exifCoord[0]) : 0;
$minutes = count($exifCoord) > 1 ? gps2Num($exifCoord[1]) : 0;
$seconds = count($exifCoord) > 2 ? gps2Num($exifCoord[2]) : 0;
$flip = ($hemi == 'W' or $hemi == 'S') ? -1 : 1;
return $flip * ($degrees + $minutes / 60 + $seconds / 3600);
}
function getExifGps( $exifCoord, $hemi ) {
function gps2Num($coordPart)
{
$parts = explode('/', $coordPart);
if (count($parts) <= 0)
return 0;
if (count($parts) == 1)
return $parts[0];
$lat = floatval($parts[0]);
$lon = floatval($parts[1]);
if ($lon == 0)
return $lat;
return $lat / $lon;
}
$degrees = count( $exifCoord ) > 0 ? gps2Num( $exifCoord[0] ) : 0;
$minutes = count( $exifCoord ) > 1 ? gps2Num( $exifCoord[1] ) : 0;
$seconds = count( $exifCoord ) > 2 ? gps2Num( $exifCoord[2] ) : 0;
$flip = ( $hemi == 'W' or $hemi == 'S' ) ? -1 : 1;
return $flip * ( $degrees + $minutes / 60 + $seconds / 3600);
}
function gps2Num( $coordPart ) {
$parts = explode( '/', $coordPart );
if ( count( $parts ) <= 0 )
return 0;
if ( count( $parts ) == 1 )
return $parts[0];
$lat = floatval( $parts[0] );
$lon = floatval( $parts[1] );
if ($lon == 0 )
return $lat;
return $lat / $lon;
}
?>