[mapserver-users] CGI controls - Symbol

Steve Lime Steve.Lime at dnr.state.mn.us
Mon Jul 14 13:54:31 EDT 2008


Looking at the code I see why referencing another named symbol won't work either. Same reason
as with an image. If you reference the symbol by index then you'll have a shot at making this work
as the code sits now...

Steve

>>> On 7/14/2008 at 11:57 AM, in message <487B858A.8000306 at refractions.net>, Ben
Brehmer <bbrehmer at refractions.net> wrote:
> Thanks Steve,
> 
> Just tried creating a symbol image in my mapfile and referencing that 
> through the URL with no luck.
> 
> I've created a ticket for this: http://trac.osgeo.org/mapserver/ticket/2700 
> 
> Cheers,
> 
> Ben
> 
> Steve Lime wrote:
>> I wonder if this is related to using an image. If you define another named 
> symbol in your
>> mapfile, e.g.:
>>
>> SYMBOL
>>   TYPE PIXMAP
>>   NAME 'blue_star'
>>   IMAGE ./blue_star.gif
>> END
>>
>> and then try to reference it:
>>
>>   ...&map.layer[0].CLASS[0].STYLE[0]=SYMBOL+'blue_star'&...
>>
>> Does that work? Might be a reasonable workaround.
>>
>> MapServer resolves symbol names at the end of mapfile parsing and that's 
> probably not 
>> happening in this case. The reason we wait until the end is because symbols 
> and symbolsets 
>> can be anywhere in the file. This is probably a bug if you'd please file a 
> ticket...
>>
>> Steve
>>
>>
>>   
>>>>> On 7/11/2008 at 6:03 PM, in message <4877E6A5.5040903 at refractions.net>, Ben
>>>>>         
>> Brehmer <bbrehmer at refractions.net> wrote:
>>   
>>> Dear All,
>>>
>>> Just wondering if there are any known problems when trying to modify a 
>>> symbol via the URL in Mapserver 5.0.3.
>>>
>>> I am trying to do on-the-fly symbol changes with the CGI variables as 
>>> follows:
>>>
>>> ...&map.layer[0].CLASS[0].STYLE[0]=SYMBOL+'./blue_star.gif'&...
>>>
>>>
>>> The above produces no errors and a blank image. Seems to me as though 
>>> the symbol is simply ignored in the URL because when I assign a color 
>>> (map.layer[0].class[0].style[0]=COLOR+151+151+151) I get a whole whack 
>>> of points back. Predefining the SYMBOL in the mapfile (SYMBOL 
>>> "./blue_star.gif") also works perfectly fine.
>>>
>>>
>>> Not sure if I'm doing something wrong, but I've tried pretty much every 
>>> combination including using using non-image symbols, playing around with 
>>> the mapfile, and pulling out my hair. Note that I am also using the DATA 
>>> CGI var to supply dynamic data content in the same URL (not sure if this 
>>> would make a difference).
>>>
>>> Any ideas/suggestions would be greatly appreciated.
>>>
>>> Thanks,
>>>
>>> Ben Brehmer
>>>
>>>
>>>
>>>
>>> The mapfile is pretty straight forward:
>>> .
>>> ..
>>> ...
>>> DATAPATTERN ".*"
>>>
>>> LAYER
>>>     NAME "pointlayer"
>>>     DATA ""
>>>     CONNECTIONTYPE postgis
>>>     CONNECTION "host=localhost user=postgres port=5432 dbname=name 
>>> password=pass"
>>>     CLASSITEM "point_id"
>>>     CLASS
>>>       NAME ""
>>>       STYLE
>>>       END
>>>     END
>>> ...
>>> ..
>>> .
>>>
>>> Mapserver is compiled with the following options:
>>> MapServer version 5.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
>>> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
>>> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT 
>>> SUPPORTS=FASTCGI INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
>>> INPUT=SHAPEFILE
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org 
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users 
>>>     
>>
>>   
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list