[Cartoweb-users] Howto highlight points on map based on resultsreturned from sql database

Max Ueda mhanzo at yahoo.com
Fri Dec 1 05:46:23 EST 2006


Oliver,

Thank you! It works!
Both options work, I was trying to use the Crosshair
parameter, but I mistyped the variable (showcrosshair
instead of show_crosshair).

Thanks again!

Regards,
Max


--- Oliver Christen <oliver.christen at camptocamp.com>
wrote:

> Hi Max
> 
> you need to add
> 
>    public function replacePlugin() {
>         return 'outline';
>     }
> 
> to your ClientPointDraw class, otherwise it will be
> ignored
> 
> or you could have simply used the 'show_crosshair'
> parameter
> $request->setValue('show_crosshair', 1);
> to display a cross symbol on the recenter point
> 
> regards
> Oliver
> 
> 
> 
> > Hi,
> >
> > I have the same problem as described above. I can
> > retrieve the informations and recenter with the
> > coordinates returned from my database (located in
> > another machine), but I can't draw the point in
> the
> > map.
> >
> > I've developed a recentering plugin, similar to
> the
> > one used as example found here:
> >
> >
>
http://www.cartoweb.org/cwiki/HowToWriteaRecenterPlugin
> >
> > Thus, I created a class inside the main file,
> using
> > the code mr. Alexandre posted:
> >
> > class ClientPointDraw extends ClientOutline{
> >
> >     public function setPointsCoords($pointsCoords)
> {
> >         $shapes = array();
> >         foreach ($pointsCoords as $point) {
> >             $shape = new StyledShape;
> >             $shape->shape = $point;
> >             $shapes[] = $shape;
> >         }
> >         $this->outlineState->shapes = $shapes;
> >     }
> > }
> >
> > The main class, makes the call of this function,
> and
> > although there is no sign of error (the
> recentering is
> > done normally), it doesn't draw anything.
> >
> > The main class:
> >
> > class ClientRecenterLatLong extends ClientPlugin
> >         implements GuiProvider, FilterProvider {
> > //Declarations, functions, etc.
> > public makeSearchNome($searchStringNome) {
> > //...
> >
> > //after retrieving all the values from the
> file.tpl
> > elseif (!empty($searchStringNome)){
> >  $latLon
> =$this->makeSearchNome($searchStringNome);
> >  if(!empty($latLon)){
> >    $eastNorthing =
> >          $this->converteLatEasting($latLon[0],
> >          $latLon[1]);
> >    //calling the function that would draw the
> point
> >   
> ClientPointDraw::setPointsCoords($eastNorthing);
> >
> >
> >   
> $request->setValue('recenter_x',$eastNorthing[0]);
> >    $request->setValue('recenter_y',
> > $eastNorthing[1]);
> > }
> >
> > What is wrong with the code? Why doesn't it draw
> the
> > recentered point?
> >
> > Thanks in advance,
> >
> > Max H. Ueda
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Cheap talk?
> > Check out Yahoo! Messenger's low PC-to-Phone call
> rates.
> > http://voice.yahoo.com
> > _______________________________________________
> > Cartoweb-users mailing list
> > Cartoweb-users at lists.maptools.org
> >
>
http://lists.maptools.org/mailman/listinfo/cartoweb-users
> > 
> 
> 



 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited


More information about the Cartoweb-users mailing list