[Mapserver-users] HELP PLEASE URGENT!!, draw point in map

Lowell Filak lfilak at medinaco.org
Tue Jan 13 10:09:18 EST 2004


I'm not positive on the syntax but I don't think the second $map->draw
is required because the point data is not actually bound as a data
source to the reddot layer and by doing the $map->draw after drawing the
point it is actually overrendering(word?) what $testpt->draw constructs.
Hopefully the syntax in:
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35ex2
can be useful.

HTH

Lowell

The following message was sent by =?iso-8859-1?q?Ezequiel=20Bertone?=
<ezeklinux at yahoo.com.ar> on Mon, 12 Jan 2004 19:43:59 -0300 (ART).

> Hello
> 
> I need draw a point in the map in coordinates XY. 
> The problem is that only draw the map without the
> point. Where is the problem?
> The coordinates XY is correct?
> 
> Thank you for you help.
> 
> I have the following map file an php file.
> ---- Php file
> <?php
> dl('php_mapscript.so');
> $map_path="/var/www/html/";
> $map=ms_newMapObj($map_path. "easu4.map");
> 
> $testlayer = $map->getLayerByName("reddot");
>       $testlayer->set("status", 1);
> $testpt = ms_newPointObj();
> $testpt->setXY(431,7195);
> 
>  $image=$map->draw();
>       $testpt->draw($map, $testlayer, $image, 0, " ");
> $image=$map->draw();
> $image_url=$image->saveWebImage(MS_PNG,1,1,0);
> ?>
> 
> <HTML>
> <HEAD>
> <TITLE>Esto es una prueba de Mapas </title>
> </head>
> <BODY>
> <img SRC=<?php echo $image_url; ?>> 
> </body>
> </html>
> 
> 
> -- Map file
> MAP
>   IMAGETYPE      JPEG
>   EXTENT         430.0622899324  7194.39117490898 449.
>  418992570303 7210.068359375
>   SIZE          1200 1200
>   SHAPEPATH      "data"
>   IMAGECOLOR     255 255 255
> 
>   PROJECTION
>     "proj=utm"
>     "ellps=clrk66"        
>     "datum=WGS84"
>   END
> 
>   # Start of LAYER DEFINITIONS
> ---------------------------------------------
> 
> SYMBOL
>    NAME "circle"
>    TYPE ellipse
>    FILLED true
>    POINTS
>      1 1 1
>    END
> END
> 
> LAYER
>    NAME "reddot"
>    TYPE POINT
>    STATUS off
>    CLASS
>      Name "reddot2"
>      COLOR 255 0 0
>      SYMBOL "circle"
>      SIZE 40
>    END  # CLASS
> END  # LAYER
> 
> LAYER # States polygon layer begins here
>     NAME         au01
>     DATA         asu01
>     STATUS       DEFAULT
>     TYPE         LINE
>     CLASS
>       COLOR        0 0 0
>       OUTLINECOLOR 32 32 32
>     END
> END # States polygon layer ends here
> 
> END # end of map file/object
> 
> ------------
> Los mejores usados y las más tentadoras 
> ofertas de 0km están en Yahoo! Autos.
> Comprá o vendé tu auto en
> http://autos.yahoo.com.ar
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list