wind barbs

Nate Reed nate at SEASTAR.JPL.NASA.GOV
Fri Jun 10 14:38:26 PDT 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1118439316193731.png
Type: image/png
Size: 16220 bytes
Desc: map
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050610/14f90391/attachment.png>


More information about the MapServer-users mailing list