[TASK] Upstream patches by surrim (sent via mail)
This commit is contained in:
parent
becc64d33f
commit
0fbd62dbe3
|
@ -1,3 +1,7 @@
|
|||
1.35 (surrim)
|
||||
----------------------------------
|
||||
* Supports using a space character for LAT/LNG separation (OsmAnd)
|
||||
|
||||
1.34 (surrim)
|
||||
----------------------------------
|
||||
* Pasting "lat,long" values into lan or long field will fill both fields (pattern: /^\s*(\d+(\.\d+))\s*[,/]\s*(\d+(\.\d+)?)\s*$/)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
|
||||
// Actual version of both plugins
|
||||
@define('PLUGIN_EVENT_GEOTAG_VERSION', '1.34');
|
||||
@define('PLUGIN_EVENT_GEOTAG_VERSION', '1.35');
|
||||
@define('PLUGIN_EVENT_GEOTAG_AUTHOR', 'Zoran Kovacevic, Grischa Brockhaus, Matthias Gutjahr, Martin Sewelies');
|
||||
|
|
|
@ -354,7 +354,7 @@ class serendipity_event_geotag extends serendipity_event
|
|||
function paste(event) {
|
||||
if (Math.abs(this.selectionEnd - this.selectionStart) === this.value.length) {
|
||||
const geo = event.clipboardData.getData('text/plain');
|
||||
const found = geo.match(/^\s*(\d+(\.\d+))\s*[,/]\s*(\d+(\.\d+)?)\s*$/);
|
||||
const found = geo.match(/^\s*(\d+(\.\d+))\s*[ ,/]\s*(\d+(\.\d+)?)\s*$/);
|
||||
if (found !== null) {
|
||||
this.value = found[1];
|
||||
document.getElementById(this.id === "properties_geo_lat" ? "properties_geo_long" : "properties_geo_lat").value = found[3];
|
||||
|
|
4
serendipity_event_osm/ChangeLog
Normal file
4
serendipity_event_osm/ChangeLog
Normal file
|
@ -0,0 +1,4 @@
|
|||
0.3:
|
||||
---
|
||||
|
||||
* Only show GPX records instead of all markers
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
@define('PLUGIN_EVENT_OSM_VERSION', '0.2');
|
||||
@define('PLUGIN_EVENT_OSM_VERSION', '0.3');
|
||||
@define('PLUGIN_EVENT_OSM_AUTHOR', 'Martin Sewelies');
|
||||
?>
|
||||
|
|
|
@ -41,7 +41,7 @@ window.onload = () => {
|
|||
fill: new ol.style.Fill({color: dateToColor(date)})
|
||||
})
|
||||
});
|
||||
},
|
||||
},
|
||||
zIndex: Infinity
|
||||
})
|
||||
];
|
||||
|
@ -51,13 +51,18 @@ window.onload = () => {
|
|||
url: upload.url,
|
||||
format: new ol.format.GPX()
|
||||
}),
|
||||
style: new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: dateToColor(new Date(upload.date * 1000)),
|
||||
width: 3,
|
||||
lineDash: upload.date * 1000 > Date.now() ? [3, 6] : undefined
|
||||
})
|
||||
})
|
||||
style: feature => {
|
||||
if (feature.getGeometry().getType() === "MultiLineString") {
|
||||
return new ol.style.Style({
|
||||
stroke: new ol.style.Stroke({
|
||||
color: dateToColor(new Date(upload.date * 1000)),
|
||||
width: 3,
|
||||
lineDash: upload.date * 1000 > Date.now() ? [3, 6] : undefined
|
||||
})
|
||||
});
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
});
|
||||
layers.push(layer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue