[ms4w-users] routing aplication not appear on Gmap
ari sutanto
arisutanto_jogja at yahoo.co.id
Wed Aug 29 09:37:47 EDT 2007
Hi list, I have any problems about Gmap.
i have a routing aplication, like this:
<?php
dl("php_mapscript.dll");
define("MAPFILE","../maps/routing.map");
$start=0;
$end=0;
$cx1=0;
$cy1=0;
$cx2=0;
$cy2=0;
if($HTTP_GET_VARS["start"])
$start=$HTTP_GET_VARS["start"];
if($HTTP_GET_VARS["end"])
$end=$HTTP_GET_VARS["end"];
if($HTTP_GET_VARS["cx1"])
$cx1=$HTTP_GET_VARS["cx1"];
if($HTTP_GET_VARS["cx2"])
$cx2=$HTTP_GET_VARS["cx2"];
if($HTTP_GET_VARS["cy1"])
$cy1=$HTTP_GET_VARS["cy1"];
if($HTTP_GET_VARS["cy2"])
$cy2=$HTTP_GET_VARS["cy2"];
$delta=0.01;
$map_file=MAPFILE;
$map=ms_newMapObj($map_file);
$l=$map->getLayerByName("network");
if($l) {
if($l && $start!=0 && $end!=0) {
if($cx1!=0 && $cy1!=0 && $cx2!=0 && $cy2!=0 &&
$cx1!=$cx2 && $cy1!=$cy2) {
$minx = min($cx1,$cx2)-$delta;
$miny = min($cy1,$cy2)-$delta;
$maxx = max($cx1,$cx2)+$delta;
$maxy = max($cy1,$cy2)+$delta;
$map->setextent($minx,$miny,$maxx,$maxy);
$rectobj = $map->extent;
$ll_x = $rectobj->minx;
$ll_y = $rectobj->miny;
$ur_x = $rectobj->maxx;
$ur_y = $rectobj->maxy;
$sql="the_geom from (select gid, the_geom from "."shortest_path_astar2_as_geometry_internal_id_directed('tercepat', ".$start.", ".$end.", ".$ll_x.", ".$ll_y.", ".$ur_x.", ".$ur_y.", false, true)) as g using unique gid using SRID=-1";
$l->set('data', $sql);
$l->set('status', MS_ON);
}
}
else {
$l->set('status', MS_OFF);
}
}
$image=$map->draw();
$image_url=$image->saveWebImage();
?>
I put into Gmap template in gmap75.phtml, why the result of this doesn't come up in map display? but actually the case appear in tmp folder..
Regards,
Ari Sutanto
---------------------------------
Bergabunglah dengan orang-orang yang berwawasan, di bidang Anda di Yahoo! Answers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20070829/b2fdf0d1/attachment.html
More information about the ms4w-users
mailing list