PhpMapScript given extend for the map

Murat BEYHAN beyhan at DEPREM.GOV.TR
Thu Sep 21 02:51:42 EDT 2006


Dear Friends;

I'm new on PhpMapScripting.

I would like to draw map by given exten.
In php I read the point from mysql than I calculate 
minx, miny,maxx and maxy by considering point.

Then I draw map by following 


 $map_path="/var/www/html/zone/";
        
 $map = ms_newMapObj($map_path."epicenters.map");
 
 $image=$map->draw();
 
 $image_url=$image->saveWebImage();
    

print "   <HTML>
   <HEAD>
     <TITLE>Example 1: Displaying a map</TITLE>
  </HEAD>
  <BODY>
      <IMG SRC=$image_url>
  </BODY>
 </HTML>";




But I couldnt fix mapextend by given extend
Because at the beginning of the map file we are giving map extend by EXTENT 26
45 36 42 something like that so the map always use this extent values.this
means whole Turkey will draw each time. But I would like to draw the map by
given extent values.

Onthe web  I have found these inforemation are following but I couldn't write
code for that.

 Parmeters are :
  - oPixelExt (rect object) : Pixel Extents, with (0,0) at the top-left
          The rectangle contains the coordinates of the LL and UR coordinates
          in pixel. (the maxy in the rect object should be < miny value)

          ------- UR (values in the rect object : maxx, maxy)
          |     | 
          |     |
          |     |
          ------
        LL (values in the rectobject minx, miny)                      

        - Width : width in pixel of the current image.
        - Height : Height in pixel of the current image. 
        - Georef extent (rectObj) : current georef extents.

Please give me the point where I have to start to fix mapextend by giving
value in php.

regards...
Murat
--
Open WebMail Project (http://openwebmail.org)


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the mapserver-users mailing list