04.02.2018, 19:34
Hi Uwe,
Create a frame and give it the additional class "position" and create 3 objects where your LON, LAT and ZOOM variables are written to and create this custom JS:
This will update the URL in the frame as soon as one of the 3 object values are changing, it happens client side so no refresh of the client is needed.
BR,
Erwin
Create a frame and give it the additional class "position" and create 3 objects where your LON, LAT and ZOOM variables are written to and create this custom JS:
Code:
$(function(){
if (typeof grp != 'undefined') {
grp.listen('40/1/15', function(object, state) {
var LON = grp.getvalue('40/1/15') || 0;
var LAT = grp.getvalue('40/1/16') || 0;
var ZOOM = grp.getvalue('40/1/17') || 15;
$('.position').find('iframe').attr('src', 'http://osmand.net/go.html?lat=' + LAT + '&lon=' + LON + '&z=' + ZOOM)
}, true);
}
});
$(function(){
if (typeof grp != 'undefined') {
grp.listen('40/1/16', function(object, state) {
var LON = grp.getvalue('40/1/15') || 0;
var LAT = grp.getvalue('40/1/16') || 0;
var ZOOM = grp.getvalue('40/1/17') || 15;
$('.position').find('iframe').attr('src', 'http://osmand.net/go.html?lat=' + LAT + '&lon=' + LON + '&z=' + ZOOM)
}, true);
}
});
$(function(){
if (typeof grp != 'undefined') {
grp.listen('40/1/17', function(object, state) {
var LON = grp.getvalue('40/1/15') || 0;
var LAT = grp.getvalue('40/1/16') || 0;
var ZOOM = grp.getvalue('40/1/17') || 15;
$('.position').find('iframe').attr('src', 'http://osmand.net/go.html?lat=' + LAT + '&lon=' + LON + '&z=' + ZOOM)
}, true);
}
});
This will update the URL in the frame as soon as one of the 3 object values are changing, it happens client side so no refresh of the client is needed.
BR,
Erwin