[Cartoweb-users] Howto highlight points on map based on results
returned from sql database
Max Ueda
mhanzo at yahoo.com
Thu Nov 30 13:54:21 EST 2006
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
More information about the Cartoweb-users
mailing list