[Cartoweb-users] Re: Cartoweb-users Digest, Vol 15, Issue 2

Baroudi Malek baroudi.malek at gmail.com
Wed Jul 5 05:49:57 EDT 2006


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, cartoweb-users-request at lists.maptools.org <
cartoweb-users-request at lists.maptools.org>:
>
> Send Cartoweb-users mailing list submissions to
>         cartoweb-users at lists.maptools.org
>
> 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
>         cartoweb-users-request at lists.maptools.org
>
> You can reach the person managing the list at
>         cartoweb-users-owner at lists.maptools.org
>
> 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 (giuseppe.derossi at email.it)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 03 Jul 2006 12:31:40 +0200
> From: Alexandre Saunier <alexandre.saunier at camptocamp.com>
> Subject: Re: [Cartoweb-users] Error in
>         HowToDisplayOnTheMapAPointFromADatabaseQuery
> To: Alessandro Simplicio <alessandrosimplicio at gmail.com>
> Cc: CartoWeb Users <cartoweb-users at lists.maptools.org>
> Message-ID: <44A8F20C.9070003 at camptocamp.com>
> 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:demo@localhost/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: giuseppe.derossi at email.it
> Subject: [Cartoweb-users] maximum number of layers reached
> To: cartoweb-users at lists.maptools.org
> Message-ID: <85319d3169325a1fc0bda6a8e63b9ec7 at 164.129.1.39>
> 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
> Cartoweb-users at lists.maptools.org
> 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'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20060705/3344d52b/attachment-0001.html


More information about the Cartoweb-users mailing list