Révision f524783f
Ajouté par Marc Souviron il y a environ 11 ans
js/pano.js | ||
---|---|---|
8 | 8 |
if (ref_points == undefined) var ref_points = new Array(); |
9 | 9 |
if (image_loop == undefined) var image_loop = true; |
10 | 10 |
|
11 |
var pt_alt; |
|
12 |
var pt_lat; |
|
13 |
var pt_lon; |
|
11 | 14 |
|
12 | 15 |
var debug_mode = false; |
13 | 16 |
var canvas; |
... | ... | |
173 | 176 |
|
174 | 177 |
function insert_drawn_point(lat, lon, alt) { |
175 | 178 |
var rt = 6371; // Rayon de la terre |
176 |
var alt1 = document.getElementById('pos_alt').childNodes[0].nodeValue;
|
|
177 |
var lat1 = document.getElementById('pos_lat').childNodes[0].nodeValue*Math.PI/180;
|
|
178 |
var lon1 = document.getElementById('pos_lon').childNodes[0].nodeValue*Math.PI/180;
|
|
179 |
var alt1 = pt_alt;
|
|
180 |
var lat1 = pt_lat*Math.PI/180;
|
|
181 |
var lon1 = pt_lon*Math.PI/180;
|
|
179 | 182 |
var alt2 = alt; |
180 | 183 |
var lat2 = lat*Math.PI/180; |
181 | 184 |
var lon2 = lon*Math.PI/180; |
... | ... | |
713 | 716 |
var sel_pt = document.getElementById('sel_point'); |
714 | 717 |
var do_insert = document.getElementById('do-insert'); |
715 | 718 |
var do_delete = document.getElementById('do-delete'); |
719 |
var show_cap = document.getElementById('show-cap'); |
|
716 | 720 |
var pos_x = nmodulo(last.x + e.pageX - canvas_pos.x - canvas.width/2, zm.im.width); |
717 | 721 |
var pos_y = last.y + e.pageY - canvas_pos.y - canvas.height/2; |
718 | 722 |
for(var i = 0; i < zm.pt_list.length; i++) { |
... | ... | |
724 | 728 |
} |
725 | 729 |
do_delete.onclick = function() {delete_ref_point(insrt)}; |
726 | 730 |
do_insert.onclick = function() {insert_ref_point(insrt, e.pageX-canvas_pos.x, e.pageY-canvas_pos.y)}; |
731 |
var res = zm.get_cap_ele(pos_x, zm.im.height/2 - pos_y); |
|
732 |
show_cap.onclick = function() {window.open("show_capline.php?cap="+res.cap+'&org_lat='+pt_lat+'&org_lon='+pt_lon)}; |
|
727 | 733 |
return false; |
728 | 734 |
} |
729 | 735 |
|
... | ... | |
815 | 821 |
} |
816 | 822 |
|
817 | 823 |
window.onload = function() { |
824 |
pt_alt = document.getElementById('pos_alt').childNodes[0].nodeValue; |
|
825 |
pt_lat = document.getElementById('pos_lat').childNodes[0].nodeValue; |
|
826 |
pt_lon = document.getElementById('pos_lon').childNodes[0].nodeValue; |
|
827 |
|
|
818 | 828 |
localisation = document.getElementById("locadraw"); |
819 | 829 |
adding = document.getElementById("adding"); |
820 | 830 |
canvas = document.getElementById("mon-canvas"); |
Formats disponibles : Unified diff
permet la visualisation d'axes horizontaux via OSM