RV: [UMN_MAPSERVER-USERS] PhpMapScript reference map

Almudena Rueda Solache almudenarueda at INICIA.ES
Thu Nov 30 08:01:31 PST 2006


Hallo Murat

I´m having the same problem with the referenceMap. Have you find any solution?

Thanks in advance

Almudena

-----Mensaje original-----
De: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]En nombre
de Murat BEYHAN
Enviado el: jueves, 21 de septiembre de 2006 16:18
Para: MAPSERVER-USERS at LISTS.UMN.EDU
Asunto: [UMN_MAPSERVER-USERS] PhpMapScript reference map


Dear Friends 
I have created map by following codes in Php.
I have also created reference map for my study.
But the outline box doesn't appear on the reference map.
What is the wrong with my code.
I have using gmap demo gmap.php.inc and gmap.php for develop my study.
the reference map on the map file as follows

 REFERENCE
    IMAGE ../mapdata/zone.png # The reference image
    SIZE 200 150 # The size of the reference image in pixels
#    EXTENT 201621.496941 -294488.285333 1425518.020722 498254.511514 #
The
extent of the reference image in map units
    EXTENT 26 35 45 43

    STATUS ON
    MINBOXSIZE 10 # How small can the reference box be before it gets drawn
as
a point, in pixels
    MAXBOXSIZE 150 # The maximum size of the reference box, in pixels
    COLOR -1 -1 -1 # The reference box fill color, negative numbers mean
transparent
    OUTLINECOLOR 0 255 255 # The reference box outline color
    MARKERSIZE 8 # The size of the point marker
    MARKER 'star' # The marker symbol
  END




PHP codes are here...................................

function IsHtmlMode()
{
    GLOBAL $gbIsHtmlMode;
    return $gbIsHtmlMode;
}

if (strpos( ms_GetVersion(), "OUTPUT=GIF") > 0 )
{
  $gAppletImgFmt = MS_GIF;
  $gImagesFmt = MS_GIF;
}
else
{ 
  $gAppletImgFmt = MS_JPEG;
  $gImagesFmt = MS_PNG;
}

function GMapDrawKeyMap()
{
    GLOBAL      $map;
    GLOBAL $gAppletImgFmt, $gImagesFmt;
	
    }
 $map_path="/var/www/html/zone/";
        
 $map = ms_newMapObj($map_path."zone.map");
 $imgref = $map->drawreferencemap();
 $urlref = $imgref->saveWebImage($gImagesFmt, 0, 0, -1);

 $map->setExtent($nMinX, $nMinY, $nMaxX, $nMaxY); 
 $image=$map->draw();

 
 
 
 $image_url=$image->saveWebImage();
    
//$gpoMap = ms_newMapObj("gmap75_key.map");

/* --------------------------------------------------------------------
*/
/*      extents set in the .map file.                                  
*/
/*                                                                     
*/
/*      max extents are 10% of the map.                                
*/
/* --------------------------------------------------------------------
*/
  
  print "   <HTML>
   <HEAD>
     <TITLE>Harita</TITLE>
  </HEAD><br><br>
  <table border = '1'>
  <tr><td >
  <BODY>
      <IMG SRC=$image_url></td>
        <td>
	<IMG width='350' height='260' SRC=$urlref>
  </BODY>
  </tr></td>
  </table>
 </HTML>";
 

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

Descubre Tiscali Empresas
La solución más inteligente para tu negocio
http://www.tiscali.es/empresas/



More information about the MapServer-users mailing list