more wind barbs problems

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


Thank you!

On Fri, 10 Jun 2005, Aaron Racicot wrote:

> Try:
> 
> $class->label->set("angle", 45);
> 
> You should check out the phpmapscript class guide which will show you
> data items and methods for all of the classes...
> 
> http://mapserver.gis.umn.edu/doc/phpmapscript-class-guide.html
> 
> Aaron
> 
> +----------------------------------------+
> | Aaron Racicot  | aaronr at ecotrust.org   |
> | GIS Programmer | 503.467.0759          |
> +----------------------------------------+
> | e c o t r u s t                        |
> | Jean Vollum Natural Capital Center     |
> | 721 NW Ninth Avenue                    |
> | Suite 200                              |
> | Portland, OR 97209                     |
> | www.ecotrust.org                       |
> +----------------------------------------+
> 
> 
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Nate Reed
> Sent: Friday, June 10, 2005 3:30 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] more wind barbs problems
> 
> 
> How do I set the angle of the wind barb character?
> 
> I tried 
> 
> $class = $layer->getClass(0);
> $class->label->angle = 45;
> ...
> $point->draw($this->map,$layer,$this->image,0,'ã');    
> $this->map->drawLabelCache($this->image);
> 
> The angle is unchanged.
> 
> Nate
> 
> On Fri, 10 Jun 2005, Nate Reed wrote:
> 
> > 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