Draw point by using phpMapscript(3)

Murat BEYHAN beyhan at DEPREM.GOV.TR
Mon Sep 25 10:25:16 EDT 2006


SUCCESS!

I have spent one day But I got result finally
Thank you Pietro...
Murat


On Mon, 25 Sep 2006 15:38:58 +0200, Pietro Giannini wrote
> Hi Murat,
> I set the "color" property of the style:
> 
> 	$style->color->setRGB(250,50,0);
> 
> and works well: the point appears on the map
> 
> (I don't try, but you can also set the other appearance properties:
> outlinecolor, backgroundcolor ...)
> 
> regards
> Pietro
> 
> ________________
> Pietro Giannini
> Bytewise srl
> Area GIS
> 
> > Dear Charlton;
> > I have tried many example and also Tried your suggestion But Still I
> > couldn't
> > got result....
> >
> > Dear All;
> >
> > I'm asking to the mapserver specialist ' how can I draw point on the map
> > that
> > point value already variable in the php files
> > like $lon,$lat'.
> >
> > This following example is the third attempt but still the point doesn't
> > appearing on the map.
> > Please help me What is the code to draw point on the map by using PHP...
> > I have tried the following but still doesn't work. Just Drawing map
> > without point.
> >
> >  $map_path="/var/www/html/zone/";
> >  $map = ms_newMapObj($map_path."zone.map");
> >  $map->setExtent($nMinX, $nMinY, $nMaxX, $nMaxY);
> >
> >
> > // create a temp layer to hold our points
> > $point_layer = ms_newLayerObj($map);
> > $point_layer->set("name", "markers");
> > $point_layer->set("type", MS_LAYER_POINT);
> > $point_layer->set("status", MS_DEFAULT);
> > $point_layer->setProjection("proj=latlong",MS_TRUE);
> >
> > // create a class and style for this layer
> > $point_class = ms_newClassObj($point_layer);
> > $point_style = ms_newStyleObj($point_class);
> > $point_symbol = $map->getSymbolByName("cpoint");
> > $point_style->set("symbol", $point_symbol);
> > $point_style->set("size", 20);
> >
> > // draw our image without the points
> >  $ref = $map->drawreferencemap();
> >  $legend=$map->drawLegend();
> >
> > $image = $map->draw();
> >
> > // initialize our point and add it to the map
> > $point = ms_newPointObj();
> > $longitude=$lon;// comes from select queries from mysql as a result
> > $latitude=$lat;// comes from select queries from mysql as a result
> > $point->setXY($longitude, $latitude);
> > $point->draw($map, $point_layer, $image, 0, "");
> >
> >
> >   $map_url=$image->saveWebImage();
> >   $ref_url = $ref->saveWebImage();
> >   $legend_url=$legend->saveWebImage();
> >
> >
> >
> >
> >
> > On Mon, 25 Sep 2006 07:50:09 -0400, Charlton Purvis wrote
> >> > $point=ms_newPointObj($lat,  $lon);
> >>
> >> Perhaps try reversing the parameters,
> >>
> >> $point=ms_newPointObj($lon,  $lat);
> >>
> >> --
> >> This message has been scanned for viruses and
> >> dangerous content by MailScanner, and is
> >> believed to be clean.
> >
> >
> > --
> > Open WebMail Project (http://openwebmail.org)
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> >
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.


--
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