Changeset 5717 in spip-zone
- Timestamp:
- Sep 26, 2006, 8:27:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/_dev_/spipcarto/spipcarto_fonctions.php
r5139 r5717 307 307 return "left: ".$y/$i."px;top: ".$x/$i."px;"; 308 308 } 309 function wkt2coords_htmlzone($wktGeomType,$wktGeom,$ImgHeight,$ImgWidth,$GeoHeight,$GeoWidth,$rgeo,$callage,$mot_desc){ 310 // Pour obtenir des objets HTML/DIV ... 311 // Pour les polygones, la moyenne des valeurs 312 // Pour les points, la valeur 313 $coordpair = explode (',',$wktGeom); 314 $x=''; 315 $y=''; 316 for ($i=0; $i<sizeof($coordpair); $i++) 317 { 318 $coord[$i] = explode(' ',$coordpair[$i]); 319 $coord[$i][0] = ($coord[$i][0]-$callage['top_left']['x'])/$GeoWidth*$ImgWidth; 320 $coord[$i][1] = ($callage['bottom_right']['y']-$coord[$i][1])/$GeoHeight*$ImgHeight; // Calcul de l'Y par rapport au coin inferieur 321 if (($x>$coord[$i][1])||($x=='')) $x = $coord[$i][1]; 322 if (($y>$coord[$i][0])||($y=='')) $y = $coord[$i][0]; 323 } 324 return "left: ".$y."px;top: ".$x."px;"; 325 } 309 326 310 327 ///////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.