Project

General

Profile

« Previous | Next » 

Revision a9953a70

IDa9953a70abf0052ae818b0e122886378fe672bba
Parent ed5e83c5
Child 73fd5477

Added by Marc Souviron over 9 years ago

correction de bug relatif è la visualisation d'un axe sur OSM

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences

Changesets

js/pano.js
7 7
if (cap_min == undefined) var cap_min = cap;
8 8
if (cap_max == undefined) var cap_max = cap_min+360;
9 9
if (ref_points == undefined) var ref_points = new Array();
10
if (image_loop == undefined) var image_loop = true;
11

  
12
var pt_alt;
13
var pt_lat;
14
var pt_lon;
10
if (image_loop == undefined) var image_loop = false;
15 11

  
16 12
var debug_mode = false;
17 13
var canvas;
......
122 118
	}
123 119
    }
124 120
    drawDecorations(ox, oy);
125
    var cap_ele = zm.get_cap_ele(last.x, last.y);
121
    var cap_ele = zm.get_cap_ele(last.x, zm.im.height/2-last.y);
126 122
    angle_control.value = cap_ele.cap.toFixed(2);
127 123
    elvtn_control.value = cap_ele.ele.toFixed(2);
128 124
}
......
173 169

  
174 170
function insert_drawn_point(lat, lon, alt) {
175 171
    var rt = 6371;  // Rayon de la terre
172
    var pt_alt = document.getElementById('pos_alt').childNodes[0].nodeValue;
173
    var pt_lat = document.getElementById('pos_lat').childNodes[0].nodeValue;
174
    var pt_lon = document.getElementById('pos_lon').childNodes[0].nodeValue;
175

  
176 176
    var alt1 = pt_alt;
177 177
    var lat1 = pt_lat*Math.PI/180;
178 178
    var lon1 = pt_lon*Math.PI/180;
......
726 726
    do_delete.onclick = function() {delete_ref_point(insrt)};
727 727
    do_insert.onclick = function() {insert_ref_point(insrt, e.pageX-canvas_pos.x, e.pageY-canvas_pos.y)};
728 728
    var res = zm.get_cap_ele(pos_x, zm.im.height/2 - pos_y);
729
    show_cap.onclick = function() {window.open('show_capline.php?title='+encodeURIComponent(title)+'&cap='+res.cap+'&org_lat='+pt_lat+'&org_lon='+pt_lon)};
729
    var pt_lat = document.getElementById('pos_lat').childNodes[0].nodeValue;
730
    var pt_lon = document.getElementById('pos_lon').childNodes[0].nodeValue;
731
    show_cap.onclick = function() {
732
	window.open('show_capline.php?title='+encodeURIComponent(btoa(title))+'&cap='+res.cap+'&org_lat='+pt_lat+'&org_lon='+pt_lon+'&dist=120000');
733
    };
730 734
    return false;
731 735
}
732 736

  
......
817 821
 
818 822
}
819 823

  
820
window.onload = function() {	
821
    pt_alt = document.getElementById('pos_alt').childNodes[0].nodeValue;
822
    pt_lat = document.getElementById('pos_lat').childNodes[0].nodeValue;
823
    pt_lon = document.getElementById('pos_lon').childNodes[0].nodeValue;
824

  
824
window.onload = function() {
825 825
    localisation = document.getElementById("locadraw");
826 826
    adding = document.getElementById("adding");
827 827
    canvas = document.getElementById("mon-canvas");
show_capline.php
13 13
  $complete = false;
14 14
}
15 15
if (isset($_REQUEST['title'])) {
16
  $pt_comment = htmlspecialchars($_REQUEST['title']);
16
  $pt_comment = htmlentities(base64_decode($_REQUEST['title']), ENT_QUOTES);
17 17
} else {
18 18
  $pt_comment = 'Le point de départ';
19 19
}