Projet

Général

Profil

Révision 94abb8ac

Ajouté par Jocelyn Dealande il y a presque 10 ans

panorama.php

again, a lat/lon inverted

Voir les différences:

js/pano.js
162 162
    cntext.drawImage(img, ox, oy);
163 163
}
164 164

  
165
/** Draws the colored circles
166
 */
165 167
function drawDecorations(ox, oy, tx, ty, twidth, theight) {
166 168
    if (twidth) {
167 169
	cntext.save();
......
178 180
    cntext.fillRect(canvas.width/2-5, canvas.height/2-5, 10, 10);
179 181
    cntext.strokeRect(canvas.width/2-5, canvas.height/2-5, 10, 10);
180 182
    for(var i = 0; i < zm.pt_list.length; i++) {
181
	if (zm.pt_list[i]['type'] != 'unlocated') {
183
      if (zm.pt_list[i]['type'] != 'unlocated') {
182 184
	    cntext.fillStyle = 'rgba('+point_colors[zm.pt_list[i]['type']]+',0.5)';
183 185
	    var cx = nmodulo(zm.pt_list[i]['xc'] - ox, zm.im.width);
184 186
	    var cy = zm.pt_list[i]['yc'] - oy;
......
602 604
		    var lnk = point_list[i][4];
603 605
		    var typ = 'unlocated';
604 606
		    var rxy = this.get_pos_xy(cap, ele);
605
		    var is_visible = fmodulo(cap - alpha_domain.start, 360) <= fmodulo(alpha_domain.end - alpha_domain.start -0.0001, 360)+0.0001 && is_located;
607
		    var is_visible = (
608
			    fmodulo(cap - alpha_domain.start, 360) 
609
				    <= 
610
				    fmodulo(alpha_domain.end - 
611
				            alpha_domain.start -0.0001, 360)+0.0001 
612
				    && is_located);
606 613

  
607 614
		    this.pt_list[i] = new Array();
608 615
		    if (ref_points[lbl] != undefined) {
609 616
			    typ = 'ref_point';
610
			    if (!is_located) rxy = {x:ref_points[lbl].x*this.im.width, y:ref_points[lbl].y*this.im.height}
617
			    if (!is_located) { 
618
				    rxy = {
619
					    x:ref_points[lbl].x*this.im.width, 
620
					    y:ref_points[lbl].y*this.im.height
621
				    };
622
			    }
611 623
		    } else if(lnk == '' && is_visible && lbl != 'point temporaire') {
612 624
			    typ = 'loc_point';
613 625
		    }else if(is_visible && lbl =='point temporaire') {
panorama.php
105 105
   if ($pt->has_params()) {
106 106
     foreach (RefPoint::near_points($pt, MAX_SEEING_DISTANCE) as $ref) {
107 107
       $extra_names[] = $ref->name;
108
       list($dist, $cap, $ele) = $pt->coordsToCap($ref->lon, $ref->lat,
108
       list($dist, $cap, $ele) = $pt->coordsToCap($ref->lat, $ref->lon,
109 109
                                                  $ref->ele);
110 110
       $ref_names[$ref->name] = array($dist, $cap, $ele);
111 111
       printf('point_list[%d] = new Array("%s", %03lf, %03lf, %03lf, "");'."\n", $ipt++, $ref->name, $dist, $cap, $ele);

Formats disponibles : Unified diff