06.02.2018, 13:26
Hi Erwin,
I added this code, but unfortunately the behaviour doesn't change. Without changing the object values (in lon, lat or zoom) the frame shows an old position on opening the page with this frame in it.
When I open the page in edit mode the frames source URL is also the old one instead of the actual one.
It seems that the code changes the src (URL) only temporary.
Uwe
PS: the existing code:
I added this code, but unfortunately the behaviour doesn't change. Without changing the object values (in lon, lat or zoom) the frame shows an old position on opening the page with this frame in it.
When I open the page in edit mode the frames source URL is also the old one instead of the actual one.
It seems that the code changes the src (URL) only temporary.
Uwe
PS: the existing code:
Code:
$(function(){
if (typeof grp != 'undefined') {
var LON = grp.getvalue('10/4/2') || 0;
var LAT = grp.getvalue('10/4/0') || 0;
var ZOOM = grp.getvalue('10/4/3') || 15;
$('.position').find('iframe').attr('src', 'http://osmand.net/go.html?lat=' + LAT + '&lon=' + LON + '&z=' + ZOOM);
}
});
$(function(){
if (typeof grp != 'undefined') {
grp.listen('10/4/2', function(object, state) {
var LON = grp.getvalue('10/4/2') || 0;
var LAT = grp.getvalue('10/4/0') || 0;
var ZOOM = grp.getvalue('10/4/3') || 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('10/4/0', function(object, state) {
var LON = grp.getvalue('10/4/2') || 0;
var LAT = grp.getvalue('10/4/0') || 0;
var ZOOM = grp.getvalue('10/4/3') || 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('10/4/3', function(object, state) {
var LON = grp.getvalue('10/4/2') || 0;
var LAT = grp.getvalue('10/4/0') || 0;
var ZOOM = grp.getvalue('10/4/3') || 15;
$('.position').find('iframe').attr('src', 'http://osmand.net/go.html?lat=' + LAT + '&lon=' + LON + '&z=' + ZOOM)
}, true);
}
});