reference map with php

Sandeep Bashyal gis at UNDPHAIS.ORG.NP
Thu Nov 4 03:05:00 EST 2004


On Thu, 4 Nov 2004 09:13:09 +0200, temiz <temiz at DEPREM.GOV.TR> wrote:

> hello
>
> I need to have an example php code concerning with reference map'
> implementation.
> I will appreciate if anyone supplies it.
>
> kind regards
>
>
> Ahmet Temiz
> TURKEY
>
>
> ______________________________________
> Inflex - installed on mailserver for domain @deprem.gov.tr
> Queries to: postmaster at deprem.gov.tr
>
> ______________________________________
> The views and opinions expressed in this e-mail message are the sender's
> own
> and do not necessarily represent the views and the opinions of
> Earthquake Research Dept.
> of General Directorate of Disaster Affairs.
>
> Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal
> olarak T.C.
> B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici
> nitelikte degildir.
>

Your map file:

#Symbol definition
   # square
   SYMBOL
        NAME 'square'
        TYPE VECTOR
        FILLED TRUE
        POINTS
                0 1
                0 0
                1 0
                1 1
                0 1
        END # end points
   END # end symbol

#start of reference map
   REFERENCE
     IMAGE /path/to/your/reference/map/image.png
     # extent of your reference map image
     EXTENT 368020 2882713 1256300 3414991
     SIZE 250 150
     STATUS ON
     MINBOXSIZE 5
     MAXBOXSIZE 150
     COLOR 239 239 239
     OUTLINECOLOR 150 150 150
     MARKERSIZE 8
     MARKER 'square'
   END  # end reference map

Your PHP file:

//create map object
$map = ms_newMapObj($map_path.$map_file);

//draw map and save image
$image=$map->draw();
$image_url=$image->saveWebImage();

//create reference map
$referencemap=$map->drawReferenceMap();
$referencemap_url=$referencemap->saveWebImage();

Regards.
--
Sandeep Bashyal
--
   National GIS Officer
   Humanitarian Assistance Information System (HAIS)
   United Nations (NEP/01/008)
   UN House, Pulchowk
   G.P.O. Box 107
   Kathmandu, Nepal
   Tel: (+977) 01 5543957
        (+977) 01 5554304
   Cell:(+977) 9841270854
   Fax: (+977) 01 5528059
--------------------------------------------------
mailto:gis at undphais.org.np
mailto:sandeep at earthmapping.com
http://www.undp.org.np



More information about the mapserver-users mailing list