<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Hi All,<BR>
&nbsp;<BR>
I am new to ka-maps and facing some problems can any body help me creating maps on fly,&nbsp;may I ignore the maps files and use my own mapscript instead, my mapscript code works fine and also draw maps, how can I&nbsp;handle my own <FONT><FONT>mapscript </FONT>to</FONT> config.<FONT>php</FONT> or to init.<FONT>php</FONT>, ,my code is as follow.<BR>
&nbsp;<BR>
&lt;?php<BR>include_once('admin/super/classes/Connection.php');<BR>
if (!extension_loaded("MapScript"))<BR>&nbsp;dl('php_mapscript_48.'.<FONT><FONT>PHP_SHLIB_SUFFIX</FONT></FONT>);<BR>&nbsp; <BR>
class MapHandler<BR>{<BR>
&nbsp;function getMyMaps($user_id)<BR>&nbsp;{<BR>$con= new Connection();<BR>$con-&gt;connect();<BR>$con-&gt;selectDatabase("blot");<BR>$myCon=$con-&gt;getConnectionReference();<BR>$count=0;<BR>$userMap=array();<BR>$userMaps=array();<BR>
$qry="SELECT * from maps where user_id=".$user_id;<BR>$rs=mysql_query($qry&nbsp;,$myCon) or die(mysql_error());<BR>
&nbsp;&nbsp;if(mysql_num_rows($rs) &gt; 0 )<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;while($row=mysql_fetch_array($rs))<BR>&nbsp;&nbsp;{<BR>&nbsp;$lot_id=$row['lot_id'];<BR>&nbsp;$lot_name=$row['lot_name'];<BR>&nbsp;$lot_width=$row['image_width'];<BR>&nbsp;$lot_height=$row['image_length'];<BR>&nbsp;$lot_image="admin".$row['image_location'];<BR>&nbsp;$myMap= ms_newMapObj("mapTest.map");<BR>
&nbsp;$myMap-&gt;set("name","lot".++$count);<BR>&nbsp;$myMap-&gt;set("width",$lot_width);<BR>&nbsp;$myMap-&gt;set("height",$lot_height);<BR>&nbsp;$myMap-&gt;setExtent(0.0,0.0,$lot_width,$lot_height);<BR>&nbsp;$myMap-&gt;selectOutputFormat("png");<BR>&nbsp;$myMap-&gt;outputformat-&gt;set("transparent", MS_ON );<BR>&nbsp;$myLayer = ms_newLayerObj($myMap);<BR>&nbsp;$myLayer-&gt;set( "name", "Lot");<BR>&nbsp;$myLayer-&gt;set( "type", MS_LAYER_RASTER);<BR>&nbsp;$myLayer-&gt;set( "status", MS_ON);<BR>&nbsp;$myLayer-&gt;set( "data",$lot_image);<BR>&nbsp;$myMap-&gt;web-&gt;set("imagepath","/ms4w/tmp/<FONT>ms_<FONT>tmp</FONT></FONT>/kacache/");<BR>&nbsp;$myMap-&gt;web-&gt;set("imageurl","/<FONT>ms_<FONT>tmp</FONT></FONT>/kacache/");<BR>&nbsp;$myMap-&gt;reference-&gt;set("width",($lot_width/4));<BR>&nbsp;$myMap-&gt;reference-&gt;set("height",($lot_height/4));<BR>&nbsp;$myMap-&gt;reference-&gt;set("image",$lot_image);<BR>&nbsp;$myMap-&gt;reference-&gt;set("status",MS_ON);&nbsp;<BR>&nbsp;//$myMap-&gt;reference-&gt;setextent(0, 0, 100,150);<BR>&nbsp;$rect= ms_newRectObj();<BR>&nbsp;$rect-&gt;setextent(0.0, 0.0, ($lot_width/4), ($lot_height/4));<BR>&nbsp;$userMaps['plot'.$count++] = $myMap;<BR>}<BR>&nbsp;&nbsp;$szMap = 'plot0';<BR>&nbsp;&nbsp;//$aszMapFiles=$userMaps;<BR>&nbsp;&nbsp;return $userMaps;<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}<BR>}<BR>?&gt;<BR>
&nbsp;<BR>
can I handover $userMaps to ka-map to deal with these maps only , what i have to do, <BR>
&nbsp;<BR>
Regards<BR>
Ghulam Muqtada<BR><br /><hr />Use Messenger to talk to your IM friends, even those on Yahoo! <a href='http://ideas.live.com/programpage.aspx?versionId=7adb59de-a857-45ba-81cc-685ee3e858fe' target='_new'>Talk now!</a></body>
</html>