|
|
@@ -276,10 +276,6 @@ OpenLayers.ProxyHost = "index-ajax.php?_zasobID=<?php echo $this->_zasobID; ?>&_
|
|
|
title: "Twoja lokalizacja",
|
|
|
displayClass: "olControlUserLocation",
|
|
|
trigger: function() {
|
|
|
- if (!priv.isSelectedRecordId()) {
|
|
|
- alert('Najpierw wybierz rekord z tabeli, żeby móc narysować dla niego figurę.');
|
|
|
- return false;
|
|
|
- }
|
|
|
if (navigator.geolocation) {
|
|
|
navigator.geolocation.getCurrentPosition(drawFromUserLocation);
|
|
|
} else {
|
|
|
@@ -289,6 +285,10 @@ OpenLayers.ProxyHost = "index-ajax.php?_zasobID=<?php echo $this->_zasobID; ?>&_
|
|
|
var coords = position.coords;
|
|
|
console.log("Latitude: " + coords.latitude + "<br>Longitude: " + coords.longitude);
|
|
|
publ.zoomToExtent('POINT(' + coords.longitude + ' ' + coords.latitude + ')');
|
|
|
+ if (!priv.isSelectedRecordId()) {
|
|
|
+ alert('Najpierw wybierz rekord z tabeli, żeby móc narysować dla niego figurę.');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
setTimeout(function() {
|
|
|
var geometry = new OpenLayers.Geometry.Point(coords.longitude, coords.latitude);
|
|
|
var sourceProj = new OpenLayers.Projection("EPSG:4326");
|