diff --git a/api_openlayers.js b/api_openlayers.js
index 3df53bd..228eff5 100755
--- a/api_openlayers.js
+++ b/api_openlayers.js
@@ -66,12 +66,20 @@ function init() {
'http://c.osm.trail.pl/osmapa.pl/${z}/${x}/${y}.png']);
map.addLayer(osmapa);
}
+ if (layer_ump==1) {
+ // UMP
+ var ump = new OpenLayers.Layer.OSM('UMP',
+ ['http://1.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
+ 'http://2.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png',
+ 'http://3.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png']);
+ map.addLayer(ump);
+ }
var position = new OpenLayers.LonLat(21.01,52.23).transform(wgs84, mercator);
var zoom = 8;
map.setCenter(position, zoom);
// init layers
- layerTrack = new OpenLayers.Layer.Vector( 'Track' );
- layerMarkers = new OpenLayers.Layer.Markers( 'Markers' );
+ layerTrack = new OpenLayers.Layer.Vector('Track');
+ layerMarkers = new OpenLayers.Layer.Markers('Markers');
}
function displayTrack(xml,update) {
altitudes.length = 0;
@@ -167,8 +175,8 @@ function setMarker(p,i,posLen) {
return function() {
// remove popups
if (map.popups.length>0) {
- for (var i = map.popups.length-1; i>=0; i-- ) {
- map.removePopup(map.popups[i])
+ for (var j = map.popups.length-1; j>=0; j-- ) {
+ map.removePopup(map.popups[j])
};
}
// show popup
diff --git a/auth.php b/auth.php
index ab4729c..c7d881b 100755
--- a/auth.php
+++ b/auth.php
@@ -18,6 +18,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
require_once("config.php");
+// if is set cookie overwrite config value
+if (isset($_COOKIE["phpTrackme_api"])) { $mapapi = $_COOKIE["phpTrackme_api"]; }
+if (isset($_COOKIE["phpTrackme_lang"])) { $lang = $_COOKIE["phpTrackme_lang"]; }
+if (isset($_COOKIE["phpTrackme_units"])) { $units = $_COOKIE["phpTrackme_units"]; }
+if (isset($_COOKIE["phpTrackme_interval"])) { $interval = $_COOKIE["phpTrackme_interval"]; }
require_once("lang.php");
$mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
if ($mysqli->connect_errno) {
diff --git a/config.php b/config.php
index 702f382..ae48a10 100755
--- a/config.php
+++ b/config.php
@@ -17,7 +17,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-$version = "2.1";
+$version = "2.2";
// default map drawing framework
// (gmaps = google maps, openlayers = openlayers/osm)
@@ -31,6 +31,8 @@ $layer_ocm = 1;
$layer_mq = 1;
// osmapa.pl (0 = no, 1 = yes)
$layer_osmapa = 1;
+// UMP (0 = no, 1 = yes)
+$layer_ump = 1;
// you may set your google maps api key
// this is not obligatory by now
diff --git a/index.php b/index.php
index 9919f8b..0a1da1c 100755
--- a/index.php
+++ b/index.php
@@ -71,13 +71,35 @@ $track_form .= '
$api_form = '
'.$lang_api.'