PhpMapScript given extend for the map
Eijnden, Bart van den (AGI)
b.vdeijnden at AGI.RWS.MINVENW.NL
Wed Sep 20 23:54:23 PDT 2006
Use:
$oMap->setExtent($nMinX, $nMinY, $nMaxX, $nMaxY);
before you call draw.
Best regards,
Bart
-----Oorspronkelijk bericht-----
Van: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]Namens Murat BEYHAN
Verzonden: donderdag 21 september 2006 8:52
Aan: MAPSERVER-USERS at LISTS.UMN.EDU
Onderwerp: [UMN_MAPSERVER-USERS] PhpMapScript given extend for the map
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.
Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
informeren. Wij adviseren u om bij twijfel over de juistheid of de
volledigheid van de mail contact met afzender op te nemen.
This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************
More information about the MapServer-users
mailing list