[SPAM][PROB=81%] Re: [UMN_MAPSERVER-USERS] dynamic annotation

Oliver Lichte lichte at ICBM.DE
Sat Feb 4 11:49:43 EST 2006


Hello,

>   kindly send ur advise, sorry for the trouble.
please post to the list, since someone else could need this information, too, 
and doesn't matter there's no trouble for me :-)

You wrote you are using PHPMapscript 4.2. That's an rather older version 
(current 4.8.1.). I guess the number of args differ for settext in it (can 
anybody confirm?). I'd propose you should either read the README of your 
issue for details or upgrade to >=4.4.1 ( the one I have got experiences ).

Best regards,
Oliver



Am Samstag, 4. Februar 2006 08:22 schrieben Sie:
> hi Oliver
>
>   thanks for the reply i had tried with settext() i am getting the
> following error my code is :
>   $tlay=$map->GetLayer(2); // this is getting exact layer
> $tname=$tlay->getclass(0); // this also working
> $tname->settext( "NewTitle" );
>   Warning: Wrong parameter count for settext()
>
>   kindly send ur advise, sorry for the trouble.
>
>
>   regards
>   N Dhanasekar
>
>
> Oliver Lichte <lichte at icbm.de> wrote:
>   Hi,
>
> try something like this:
>
> where, $map:mapObj
>
> ...
> $lay = $map->getLayerByName( "NICHEAD2" );
>
> $cls = $lay->getClass(0); // works only if the class is the first defined
> $cls->setText( "Your new text" );
> ...
>
> You may get problems with the alignment of the text in the image but other
> attributes of the classObj can be changed similar.
>
>
> Cheers,
> Oliver
>
> Am Freitag, 3. Februar 2006 09:08 schrieb N Dhanasekar:
> > hi to all
> >
> > i am trying to generate online map as per user requirement, so i want put
> > a dynamic annotation layer on map. i am using php_mapscript4.2, any one
> > can help me how to add a dynamic annotation layer or change the text
> > string in my annotation layer dynamically
> >
> > my .map contain a annotation layer like this
> > LAYER
> > NAME "NICHEAD2"
> > STATUS ON
> > TRANSFORM FALSE
> > TYPE ANNOTATION
> > FEATURE
> > # POINTS 0.045164250 0.030654
> > POINTS 300 50
> > END
> > END
> > CLASS
> > TEXT "Severe Mal-Nourished Children"
> > LABEL
> > TYPE TRUETYPE
> > FONT arial-bold
> > SIZE 15
> > ANTIALIAS TRUE
> > COLOR 255 204 0
> > POSITION UR
> > FORCE TRUE
> > END
> > END
> > END
> >
> > i want to chage the text dynamically
> > thanks
> >
> > nds
> >
> >
> >
> > ---------------------------------
> > Brings words and photos together (easily) with
> > PhotoMail - it's free and works with Yahoo! Mail.

-- 
Junior Research Group IMPULSE 
ICBM * Carl-v.-Ossietzky University of Oldenburg
PO-Box 2503 * 26111 Oldenburg - Germany - http://www.icbm.de/impulse
room: W15-2-239 * fon:+49-441-798-3622 * fax:+49-441-798-3404 



More information about the mapserver-users mailing list