[mapserver-users] pix2geo

2008-08-22 Thread ramya srinivasan
hello,
iam new to mapservers and iam trying to display the selected point in  terms
of lat-long. i get errors in the code which i tried to implement
if ( isset($HTTP_POST_VARS[mapa_x])  isset($HTTP_POST_VARS[mapa_y])
   ) {
  $my_point = ms_newpointObj();
  $my_point-setXY($HTTP_POST_VARS[mapa_x],$HTTP_POST_VARS[mapa_y]);

  $reference_click = pix2geo($mapa_x,$mapa_y,$map-extent,
$map-width,$mapobj-height);

function pix2geo($pix_x,$pix_y,$extent,$width,$height) {

$pix_x_geo_x = ($extent-maxx - $extent-minx)
 / ($width - 1);
$pix_x_geo_y = ($extent-maxy - $extent-miny)
/ ($height - 1);
$geo_x = $extent-minx + $pix_x_geo_x*$pix_x;
$geo_y = $extent-maxy - $pix_x_geo_y*$pix_y;
$my_point = ms_newPointObj();
$my_point-setXY($geo_x,$geo_y);
return $my_point;
}
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Pix2geo

2008-08-19 Thread ramya srinivasan
Hi,
Can u get me an exaple for pix2geo function implementation?how to display
the user given co-ordinates on the map?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users