Hi Alessandro,<br>
just note that if you need the last position of vehicle change the query that <br>
select x,y from table where select max (time) from table order by asc (time);<br>
if you need j2me code of tracking vehicle a will send to you ?<br>
<br>
<br>
<br><br><div><span class="gmail_quote">2006/7/4, <a href="mailto:cartoweb-users-request@lists.maptools.org">cartoweb-users-request@lists.maptools.org</a> <<a href="mailto:cartoweb-users-request@lists.maptools.org">cartoweb-users-request@lists.maptools.org
</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send Cartoweb-users mailing list submissions to<br> <a href="mailto:cartoweb-users@lists.maptools.org">
cartoweb-users@lists.maptools.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br> <a href="http://lists.maptools.org/mailman/listinfo/cartoweb-users">http://lists.maptools.org/mailman/listinfo/cartoweb-users
</a><br>or, via email, send a message with subject or body 'help' to<br> <a href="mailto:cartoweb-users-request@lists.maptools.org">cartoweb-users-request@lists.maptools.org</a><br><br>You can reach the person managing the list at
<br> <a href="mailto:cartoweb-users-owner@lists.maptools.org">cartoweb-users-owner@lists.maptools.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Cartoweb-users digest..."
<br><br><br>Today's Topics:<br><br> 1. Re: Error in HowToDisplayOnTheMapAPointFromADatabaseQuery<br> (Alexandre Saunier)<br> 2. maximum number of layers reached (<a href="mailto:giuseppe.derossi@email.it">giuseppe.derossi@email.it
</a>)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Mon, 03 Jul 2006 12:31:40 +0200<br>From: Alexandre Saunier <<a href="mailto:alexandre.saunier@camptocamp.com">
alexandre.saunier@camptocamp.com</a>><br>Subject: Re: [Cartoweb-users] Error in<br> HowToDisplayOnTheMapAPointFromADatabaseQuery<br>To: Alessandro Simplicio <<a href="mailto:alessandrosimplicio@gmail.com">alessandrosimplicio@gmail.com
</a>><br>Cc: CartoWeb Users <<a href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a>><br>Message-ID: <<a href="mailto:44A8F20C.9070003@camptocamp.com">44A8F20C.9070003@camptocamp.com
</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Hello,<br><br>you may check in your mapfile that you have a layer for outlining points.<br><br>If you have<br>pointLayer = cartoweb_point_outline
<br>in your project server-side outline.ini, you should have something like<br><br>LAYER<br> NAME "cartoweb_point_outline"<br> TYPE POINT<br><br> CLASS<br> STYLE<br> COLOR 0 255 0<br> SYMBOL "circle"
<br> SIZE 10<br> END<br> END<br>END<br><br>in your mapfile.<br><br>A tutorial on how to write plugins is available in the doc:<br><a href="http://cartoweb.org/doc/cw3.2/xhtml/dev.newplugin.html">http://cartoweb.org/doc/cw3.2/xhtml/dev.newplugin.html
</a><br><br>AS<br><br><br><br>Alessandro Simplicio wrote:<br>> Alex<br>><br>> I tried to use your code, only using client in folder vehiclePosition<br>> (new plugin). The program function, but it's don't show the point. Why?
<br>><br>> <?php<br>><br>> // plugin is named, say, "vehiclePosition"<br>><br>> class ClientVehiclePosition extends ClientOutline {<br>><br>> /**<br>> * @see PluginManager::replacePlugin()
<br>> */<br>> public function replacePlugin() {<br>> return 'outline';<br>> }<br>><br>> /**<br>> * @see ClientOutline::buildRequest()<br>> */<br>> public function buildRequest() {
<br>> $vehiclePositions = $this->getVehiclePositions();<br>> $shapes = array();<br>> if ($vehiclePositions) {<br>> foreach ($vehiclePositions as $pos) {<br>> $shape = new StyledShape;
<br>>
$shape->shape = new Point($pos->x, $pos->y);<br>> $shapes[] = $shape;<br>> }<br>> }<br>> $this->outlineState->shapes = $shapes;<br>> return parent::buildRequest();
<br>> }<br>><br>> function getDb() {<br>> $dsn = "pgsql://demo:demo@localhost/demo_plugins";<br>> if (!$dsn)<br>> {<br>>
throw new CartoclientException('Search database DSN not<br>> found');<br>> }<br>> $this->db = DB::connect($dsn);<br>>
//check for db connection error, throw exception if needed<br>>
Utils::checkDbError($dsn," "); // erro aqui -
faltavam<br>> parametros do checkdberror ($db e $msg) - pascoal<br>> return $this->db;<br>> }<br>><br>> protected function getVehiclePositions() {<br>> $this->vehiclePositions = array();
<br>> // get coord from db<br>> $db = $this->getDb();<br>> $sql = "SELECT x, y FROM s_ocr_geo_rel WHERE gid = 5062";<br>> //ocorrrencia no bairro guaira rua alagoas - Pascoal
<br>> $result = $db->query($sql);<br>> if (DB::isError($result))<br>> {<br>> throw new CartoclientException($result->getMessage());<br>> }<br>> $row = NULL;
<br>> while ($result->fetchInto($row, DB_FETCHMODE_ASSOC))<br>> {<br>> $this->vehiclePositions['x'] = $row['x'];<br>> $this->vehiclePositions['y'] = $row['y'];<br>
> print $this->vehiclePositions['x']."<br>";<br>> print $this->vehiclePositions['y'];<br>> }<br>> }<br>> }<br>> ?><br>><br>> Thank you<br>
><br>> Alessandro<br><br><br>------------------------------<br><br>Message: 2<br>Date: Tue, 4 Jul 2006 17:28:12 +0200<br>From: <a href="mailto:giuseppe.derossi@email.it">giuseppe.derossi@email.it</a><br>Subject: [Cartoweb-users] maximum number of layers reached
<br>To: <a href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a><br>Message-ID: <<a href="mailto:85319d3169325a1fc0bda6a8e63b9ec7@164.129.1.39">85319d3169325a1fc0bda6a8e63b9ec7@164.129.1.39
</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi,<br>I've imported a numer of 13 levels x 40 maps + 34 other layers and I got the<br>error : "maximum number of layers reached". is there the way in order to
<br>increase the numbers of layers? To me, there could be such a constant where<br>I can set the default maximum number, I tryed to find it but I can't to do.<br>In the actual version mapserver seems to be able to support 200 layers, is
<br>it true ?<br>Thanks in advantage and best regards<br><br>Giu<br> --<br> <a href="http://Email.it">Email.it</a>, the professional e-mail, gratis per te: <a href="http://www.email.it/f">http://www.email.it/f</a><br><br>
Sponsor:<br> Refill s.r.l. - Cartucce compatibili e kit di ricarica per tutti i modelli<br>di stampante. Acquista al telefono o online: consegna in tutta Italia in 48<br>ore!<br> Clicca qui: <a href="http://adv.email.it/cgi-bin/foclick.cgi?mid=5190&d=20060704">
http://adv.email.it/cgi-bin/foclick.cgi?mid=5190&d=20060704</a><br><br><br><br><br>------------------------------<br><br>_______________________________________________<br>Cartoweb-users mailing list<br><a href="mailto:Cartoweb-users@lists.maptools.org">
Cartoweb-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/cartoweb-users">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a><br><br><br>End of Cartoweb-users Digest, Vol 15, Issue 2
<br>*********************************************<br></blockquote></div><br><br clear="all"><br>-- <br>"Qui allume sa bougie à la mienne reçoit de la lumière sans me plonger dans l'obscurité…"<br>
' Thomas Jefferson'