Hi Alessandro,
just note that if you need the last position of vehicle change the query that
select x,y from table where select max (time) from table order by asc (time);
if you need j2me code of tracking vehicle a will send  to you ?




2006/7/4, [EMAIL PROTECTED] <[EMAIL PROTECTED] >:
Send Cartoweb-users mailing list submissions to
         [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.maptools.org/mailman/listinfo/cartoweb-users
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cartoweb-users digest..."


Today's Topics:

   1. Re: Error in      HowToDisplayOnTheMapAPointFromADatabaseQuery
      (Alexandre Saunier)
   2. maximum number of layers reached ([EMAIL PROTECTED] )


----------------------------------------------------------------------

Message: 1
Date: Mon, 03 Jul 2006 12:31:40 +0200
From: Alexandre Saunier < [EMAIL PROTECTED]>
Subject: Re: [Cartoweb-users] Error in
        HowToDisplayOnTheMapAPointFromADatabaseQuery
To: Alessandro Simplicio <[EMAIL PROTECTED] >
Cc: CartoWeb Users <[email protected]>
Message-ID: <[EMAIL PROTECTED] >
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello,

you may check in your mapfile that you have a layer for outlining points.

If you have
pointLayer = cartoweb_point_outline
in your project server-side outline.ini, you should have something like

LAYER
   NAME "cartoweb_point_outline"
   TYPE POINT

     CLASS
       STYLE
         COLOR 0 255 0
         SYMBOL "circle"
         SIZE 10
       END
    END
END

in your mapfile.

A tutorial on how to write plugins is available in the doc:
http://cartoweb.org/doc/cw3.2/xhtml/dev.newplugin.html

AS



Alessandro Simplicio wrote:
> Alex
>
> I tried to use your code, only using client in folder vehiclePosition
> (new plugin). The program function, but it's don't show the point. Why?
>
> <?php
>
> // plugin is named, say, "vehiclePosition"
>
> class ClientVehiclePosition extends ClientOutline {
>
>     /**
>      * @see PluginManager::replacePlugin()
>      */
>     public function replacePlugin() {
>         return 'outline';
>     }
>
>     /**
>      * @see ClientOutline::buildRequest()
>      */
>     public function buildRequest() {
>         $vehiclePositions = $this->getVehiclePositions();
>         $shapes = array();
>         if ($vehiclePositions) {
>             foreach ($vehiclePositions as $pos) {
>                 $shape = new StyledShape;
>                 $shape->shape = new Point($pos->x, $pos->y);
>                 $shapes[] = $shape;
>             }
>         }
>         $this->outlineState->shapes = $shapes;
>         return parent::buildRequest();
>     }
>
>     function getDb()     {
>         $dsn = "pgsql://demo:[EMAIL PROTECTED]/demo_plugins";
>             if (!$dsn)
>             {
>                 throw new CartoclientException('Search database DSN not
> found');
>             }
>             $this->db = DB::connect($dsn);
>             //check for db connection error, throw exception if needed
>             Utils::checkDbError($dsn," ");     // erro aqui - faltavam
> parametros do checkdberror ($db e $msg) - pascoal
>         return $this->db;
>     }
>
>     protected function getVehiclePositions() {
>         $this->vehiclePositions = array();
>         // get coord from db
>         $db = $this->getDb();
>         $sql = "SELECT x, y FROM s_ocr_geo_rel WHERE gid = 5062";
> //ocorrrencia no bairro guaira rua alagoas - Pascoal
>         $result = $db->query($sql);
>         if (DB::isError($result))
>         {
>             throw new CartoclientException($result->getMessage());
>         }
>         $row = NULL;
>         while ($result->fetchInto($row, DB_FETCHMODE_ASSOC))
>         {
>             $this->vehiclePositions['x'] = $row['x'];
>             $this->vehiclePositions['y'] = $row['y'];
>             print $this->vehiclePositions['x']."<br>";
>             print $this->vehiclePositions['y'];
>         }
>     }
> }
> ?>
>
> Thank you
>
> Alessandro


------------------------------

Message: 2
Date: Tue, 4 Jul 2006 17:28:12 +0200
From: [EMAIL PROTECTED]
Subject: [Cartoweb-users] maximum number of layers reached
To: [email protected]
Message-ID: <[EMAIL PROTECTED] >
Content-Type: text/plain; charset="iso-8859-1"

Hi,
I've imported a numer of 13 levels x 40 maps + 34 other layers and I got the
error : "maximum number of layers reached". is there the way in order to
increase the numbers of layers? To me, there could be such a constant where
I can set the default maximum number, I tryed to find it but I can't to do.
In the actual version mapserver seems to be able to support 200 layers, is
it true ?
Thanks in advantage and best regards

Giu
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Refill s.r.l. - Cartucce compatibili e kit di ricarica per tutti i modelli
di stampante. Acquista al telefono o online: consegna in tutta Italia in 48
ore!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5190&d=20060704




------------------------------

_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users


End of Cartoweb-users Digest, Vol 15, Issue 2
*********************************************



--
"Qui allume sa bougie à la mienne reçoit de la lumière sans me plonger dans l'obscurité…"
                                                 ' Thomas Jefferson'
_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to