php_mapscript - showing polygon and point/annotation layers
Mike Reilly
mikereilly2 at GMAIL.COM
Wed Aug 24 12:36:07 PDT 2005
Confirming for posterity that I subsequently tried this again to no avail.
Still getting no symbol drawn on the map, just the label. I also tried with
$currentlayer->set("status",MS_OFF) and then turning selected layers on with
set("status",MS_ON) with no joy.
I wonder if there's something to do with my symbol path that is a problem
when using mapscript that doesn't show up when using cgi-mapserver?
On 8/24/05, Mike Reilly <mikereilly2 at gmail.com> wrote:
>
> Robert:
>
> Thanks for your prompt reply. I'd tried something similar:
>
> /* for($a=0;$a<count($layers);$a++){
> echo $layers[$a];
> $currentlayer=$mymap->getLayerByName($layers[$a]);
> $currentlayer->status=MS_OFF;
> echo $currentlayer->status."<br>";
> echo
> }
> */
>
> but for some reason I still got all the layers displayed. I'll give it
> another run and double check tho!
>
> On 8/24/05, robert fritz <robert-fritz at web.de> wrote:
> >
> > Hi Mike,
> >
> > If you want to draw some specific layers you can try this ::
> >
> > 1) Switch off all Layers
> > function setAllLayerOff($MapObject)
> > {
> > $layers = $MapObject->getAllLayerNames();
> > for($a=0;$a<count($layers);$a++)
> > {
> > $tmp = $MapObject->getlayerbyname($layers[$a]);
> > $tmp->set("status",0);
> > }
> > }
> >
> > 2) Switch on the layers you want to see in your map
> >
> > ....
> > $layer_on = $MapObject->getlayerbyname($layername);
> > $layer_on->set("status",1);
> >
> > ......
> >
> >
> > 3) Draw the map and save it
> >
> > $objImage=$objMap->draw();
> > $image_url=$objImage->saveWebImage();
> >
> >
> > Mit der Gruppen-SMS von WEB.DE <http://WEB.DE> FreeMail können Sie eine
> > SMS an alle
> > Freunde gleichzeitig schicken: *http://freemail.web.de/features/?mc=021179
> > * <http://freemail.web.de/features/?mc=021179>
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050824/a9eb51a3/attachment.htm>
More information about the MapServer-users
mailing list