diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-09-05 08:33:53 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-09-05 08:33:53 +0200 |
commit | c8383c697ac9108b195696a5ca371e79d224225f (patch) | |
tree | 1e799fa158ba07ea264785f19635708855ac557c /public/static/js/map-refresh.min.js | |
parent | 8bf1dd3575bf58f1a50b28747f12f65a26b5a281 (diff) | |
parent | 37c510b2d351ea0c1c50ecceec21452de89afebf (diff) |
Merge branch 'master' of git.finalrewind.org:var/git_root/db-fakedisplay into master3.1.3
Diffstat (limited to 'public/static/js/map-refresh.min.js')
-rw-r--r-- | public/static/js/map-refresh.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/public/static/js/map-refresh.min.js b/public/static/js/map-refresh.min.js new file mode 100644 index 0000000..802d376 --- /dev/null +++ b/public/static/js/map-refresh.min.js @@ -0,0 +1 @@ +function dbf_map_parse(){$("#jdata").each(function(){j_reqid=$(this).data("req");var a=$(this).data("poly");if(a){a=a.split("|"),j_positions=[];for(var e in a){var i=a[e].split(";");i[0]=parseFloat(i[0]),i[1]=parseFloat(i[1]),j_positions.push(i)}}})}function dbf_anim_coarse(){if(j_positions.length){var a=marker.getLatLng(),e=a.lat,i=a.lng,_=j_positions.shift(),t=_[0],r=_[1];j_frame_i=200,j_frame=[];for(var f=1;f<=60;f++){var n=f/60;j_frame.push([e+(t-e)*n,i+(r-i)*n])}j_frame_i=0}}function dbf_anim_fine(){j_frame[j_frame_i]&&marker.setLatLng(j_frame[j_frame_i++])}function dbf_map_reload(){$.get("/_ajax_mapinfo/"+j_reqid,function(a){$("#infobox").html(a),dbf_map_parse(),setTimeout(dbf_map_reload,61e3)}).fail(function(){setTimeout(dbf_map_reload,5e3)})}var j_reqid,j_positions=[],j_frame=[],j_frame_i=[];$(document).ready(function(){$("#infobox").length&&(dbf_map_parse(),setInterval(dbf_anim_coarse,2e3),setInterval(dbf_anim_fine,33),setTimeout(dbf_map_reload,61e3))}); |