wind barbs

Nate Reed nate at SEASTAR.JPL.NASA.GOV
Fri Jun 10 18:08:00 EDT 2005


I got the barb character to display by making the following changes:

- Changed "SIZE LARGE" to "SIZE 25"
- Changed "&#227" to "ã" (was missing the semicolon)

Thanks,
Nate

On Fri, 10 Jun 2005, Nate Reed wrote:

> Hello,
> 
> I'm hoping I can get some pointers on drawing windbarbs in PHP Mapscript 
> from this list.  
> 
> Currently, I'm able to draw a point on my map by using some code 
> that I found on the list archive and various other places on the net.  
> However, the character does not appear to be correct (I've attached the 
> map - it's that small black speck at -120,30).  
> 
> I have downloaded the ESRIWeather font and added it to my fontlist, and 
> aliased it with 'weather'. 
> 
> The layer definition looks like this:
> 
>   LAYER
>     NAME tt_symbol
>     STATUS ON
>     TYPE POINT
>     CLASS
>       NAME "0"
>       STYLE
>       END
>       LABEL
>         FORCE TRUE
> 	TYPE TRUETYPE
> 	FONT weather
> 	SIZE large
> 	ANTIALIAS true
> 	OUTLINECOLOR 0 0 0 
> 	COLOR 0 0 0 
> 	POSITION UC
> 	ANGLE 0	
> 	BUFFER 0
> 	PARTIALS TRUE
>       END
>     END
>   END
> 
> The code looks like this:
> 
>     $this->image = $this->map->draw();	
>     $layer = $this->map->getLayerByName('tt_symbol');    
>     $point = ms_newPointObj();
>     $point->setXY(-120,30);
>     $point->draw($this->map,$layer,$this->image,0,"&#227");    
>     $this->map->drawLabelCache($this->image);
> 
> I could use some help to improve the output.  One curious thing is if I
> remove the Style object from the Map file the character does not appear at
> all.  This suggests that perhaps something else is required in the layer
> or style objects?  
> 
> Thanks,
> Nate
> 

-- 
Nate Reed
Physical Oceanography DAAC
Jet Propulsion Lab / Raytheon ITSS
(626)744-5528  nate at seastar.jpl.nasa.gov



More information about the mapserver-users mailing list