[Cartoweb-users] help

Damien Corpataux damien.corpataux at camptocamp.com
Mon Mar 26 02:47:41 EST 2007


Hello,

to manage map layers, you need to modify the following files (according
you're working on sampleProject):
- /projects/sampleProject/server_conf/sampleProject.map
- /projects/sampleProject/server_conf/layers.ini

See:
- How to setup layers: http://cartoweb.org/doc/cw3.3/xhtml/user.layers.html
- Mapfile reference: http://mapserver.gis.umn.edu/docs/reference/mapfile

Regards,
Damien


andreas mutota wrote:
> Hi list!
>
>
> I am looking for help on how to make mainmap displayed.
> As I have been fixing my first mapping application so far I managed to
> add some layers to the sampleProject but there is still a tricky
> connection I am failing to corner them up.
> The reference map is up but the main-Map is still fiancé, which I want
> remove and put mine. I am trying to use a quite deferent map as
> reference one but only the fiancé map is still navigated instead.
> I am seeing that there is a communication between mainmap.tpl and
> cartoclient.tpl where the mainmap.tpl kind of submitting the
> information to cartoclient.tpl by using {include file="mainmap.tpl"}
> thus the francs map comes up.
> Could someone pleasse help me out? How do I change francs map to my
> own mainmap in this application?
> I read through the cartoweb.manual (pdf) but I do not real see a page
> where it explains much regarding this matter.
> Best regards
> Andreas mutota.
>
>
>
>
>
>
>
>
>
>
>
> */cartoweb-users-request at lists.maptools.org/* wrote:
>
>     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: mapquery issue (zze-SIGALE PORTANERI F ext RD-BIZZ-SOP)
>     2. Re: mapOverlay cartoweb (Oliver Christen)
>     3. Help (MUTOTA)
>     4. IE problems and cms (Lauber Christoph)
>     5. Re: IE problems and cms (Oliver Christen)
>     6. Re: Help (Oliver Christen)
>
>
>     ----------------------------------------------------------------------
>
>     Message: 1
>     Date: Thu, 22 Mar 2007 18:43:36 +0100
>     From: "zze-SIGALE PORTANERI F ext RD-BIZZ-SOP"
>
>     Subject: [Cartoweb-users] RE: mapquery issue
>     To:
>     Message-ID:
>
>
>     Content-Type: text/plain; charset="iso-8859-1"
>
>     Just to add some new stuff here:
>
>     The mapfile layer definition defines :
>
>     METADATA
>     "id_attribute_string" "idcapt|string"
>     END
>
>     The Postgresql table is defined as follow:
>
>     CREATE TABLE capteurs
>     (
>     idcapt varchar NOT NULL,
>     geom geometry,
>     "type" varchar,
>     CONSTRAINT capteurs_pkey PRIMARY KEY (idcapt),
>     CONSTRAINT "SRID_GEOM_RULE" CHECK (srid(geom) = -1),
>     CONSTRAINT "TYPE_GEOM_RULE" CHECK (geometrytype(geom) =
>     'POINT'::text OR geom IS NULL)
>     )
>     WITH OIDS;
>
>     I notice that for capteurs element where the field "idcapt" is a
>     numeric value ('1', '400'...) , everything is OK
>     BUT if some alphanumeric apears in that field ('3F', 'F40'..), the
>     mapquery getShapes() query fails as described...
>
>     Any reason?
>
>     Franck
>
>     > _____________________________________________
>     > De : zze-SIGALE PORTANERI F ext RD-BIZZ-SOP
>     > Envoyé : jeudi 22 mars 2007 17:12
>     > À : 'cartoweb-users at lists.maptools.org'
>     > Cc : 'Sylvain Pasche'
>     > Objet : mapquery issue
>     >
>     >
>     > Hi,
>     >
>     > I have a mapquery plugin issue: While doing a queryByBbox()
>     request on a area where one element must be found, the cartoclient
>     display the following error:
>     >
>     > class CartocommonException { protected $message = 'Error [8,
>     Trying to get property of non-object,
>     /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php,
>     122] Backtrace: file: 200 -
>     /exec/applis/sglpgo/G01R00C02/cartoweb3/common/Common.php call:
>     Common::cartowebErrorHandler() file: 122 -
>     /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php
>     call: Common::cartowebErrorHandler() file: 122 -
>     /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php
>     call: ServerQuery::resultToTable() file: 227 -
>     > ...
>     >
>     > Adding traces to the log and trying to analyse it, it looks like
>     the serveurMapquery plugin found one element and the
>     extractResults $msLayer->getResult($i) return an object as follow:
>     >
>     > Thu Mar 22 16:25:22 2007,703 [30941] DEBUG ServerMapquery -
>     class stdClass {
>     > public $shapeindex = 1841530366;
>     > public $tileindex = -1;
>     > public $classindex = 6;
>     > }
>     >
>     > Which is return a shape to the ServerQuery plugin as follow:
>     >
>     > Thu Mar 22 16:25:22 2007,704 [30941] DEBUG ServerQuery -
>     resultshape=
>     > Thu Mar 22 16:25:22 2007,705 [30941] DEBUG ServerQuery - array (
>     > 0 => false,
>     > )
>     >
>     > Any clue?
>     >
>     >
>     > Thanks in advance,
>     > Franck
>     >
>     >
>     >
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070322/0f5802fa/attachment-0001.html
>
>     ------------------------------
>
>     Message: 2
>     Date: Fri, 23 Mar 2007 07:27:53 +0100
>     From: "Oliver Christen"
>     Subject: Re: [Cartoweb-users] mapOverlay cartoweb
>     To: "Luigi.marotta" ,
>
>     Message-ID: <020901c76d14$6808d010$15e3a8c0 at maunakea>
>     Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>     reply-type=original
>
>     Hi Luigi,
>
>     the error is certainly not in your client side.
>     see the last part of the error stack:
>
>     message: Error [8, Trying to get property of non-object,
>     C:\wamp\www\cartoweb3\server\Cartoserver.php, 229]
>
>     the problem happens on the server side.
>
>     now, to know what happen, you must try to see if the events in the
>     chain
>     happen correcty one after another.
>
>     put some print();
>     (http://ch2.php.net/manual/en/function.print.php) or
>     print_r(); (http://ch2.php.net/manual/en/function.print-r.php) at
>     each
>     steps: in handleHttpPostRequest, buildRequest, initializeRequest and
>     handlePreDrawing until you find exactly where the problem is.
>
>     regards
>     Oliver
>
>     >
>     > This erore is originated in:
>     >
>     > public function handleHttpPostRequest($request) {
>     > if (isset($request['specialactiontrigger'])) {
>     > $this->specialactiontrigger = true;
>     > }
>     > else {
>     > $this->specialactiontrigger = false;
>     > }
>     > }
>     >
>     > in Client part of my plugin, I suppose. You Can halp me again?
>     > Thanks
>     >
>     >
>     >
>     > --------- Original Message --------
>     > Da: Oliver Christen
>     > To: cartoweb-users at lists.maptools.org
>     > Oggetto: Re: [Cartoweb-users] mapOverlay cartoweb
>     > Data: 22/03/07 14:05
>     >
>     > >
>     >>
>     >>
>     >> hi Luigi
>     >>
>     >> first you need to recover the submit action. a simple
>     >> type="submit"
>     >
>     >> value="ok" /> as you set in your template will simply post the
>     form but
>     >> initiate no action.
>     >> give a name to you input
>     >> value="ok" />
>     >> if you dont give a name to your input they are simply ignored.
>     >>
>     >> next step is to recover the "specialactiontrigger" in the
>     client part
>     >>
>     >> declare the variable at the beginning of the plugin:
>     >>
>     >> protected $specialactiontrigger;
>     >>
>     >> to do so use the handleHttpPostRequest($request) function, like
>     this:
>     >>
>     >> handleHttpPostRequest($request) {
>     >> if (isset($request['specialactiontrigger']) {
>     >> $this->specialactiontrigger = true;
>     >> } else {
>     >> $this->specialactiontrigger = false;
>     >> }
>     >> }
>     >>
>     >> you need to put something in the buildRequest() { } function,
>     otherwise
>     > the
>     >> server part will not be called
>     >> something like :
>     >>
>     >> public function buildRequest() {
>     >> if ($this->specialactiontrigger) {
>     >> return $this->specialactiontrigger;
>     >> }
>     >>
>     >> }
>     >>
>     >> then, on the server part:
>     >>
>     >> protected $specialactiontrigger;
>     >>
>     >> public function initializeRequest($requ) {
>     >> if ($requ) {
>     >> $this->specialactiontrigger = $requ;
>     >> }
>     >> }
>     >>
>     >> and finally
>     >>
>     >> public function handlePreDrawing($request){
>     >> if (isset($this->specialactiontrigger ) {
>     >> $msMapObj = $this->serverContext->getMapObj();
>     >> $layer = new LayerOverlay();
>     >> $layer->action = BasicOverlay::ACTION_INSERT;
>     >> $layer->name = "mappa";
>     >> $layer->data = "images/cc_20050603.tif";
>     >> $mapOverlay = $this->serverContext->getPluginManager()->mapOverlay;
>     >> $mapOverlay = updateMap($layer);
>     >> $this->serverContext->getMapObj()->save('debug.map');
>     >> }
>     >> }
>     >>
>     >> you notice its like a chain of events:
>     >>
>     >
>     input->handleHttpPostRequest->buildRequest->//->initializeRequest->handlePreDrawing
>     >>
>     >> see http://www.cartoweb.org/doc/misc/plugins_diagram.pdf to
>     understand
>     >> the
>     >
>     >> flow of events in Cartoweb
>     >>
>     >> Regards
>     >> Oliver
>     >>
>     >> ----- Original Message -----
>     >> From: "Luigi.marotta"
>     >> To:
>     >> Sent: Thursday, March 22, 2007 8:04 AM
>     >> Subject: [Cartoweb-users] mapOverlay cartoweb
>     >>
>     >>
>     >> >
>     >> > Salve a tutti,
>     >> > sto usando CartoWeb ed ho la necessità di rendere
>     >> > modificabile, al volo, un raster. Ho implementato un plugin per
>     > modificare
>     >> > il campo "data" di un raster.
>     >> > Client:
>     >> > >> > /**
>     >> > * ClientDataMappa.php
>     >> > */
>     >> >
>     >> > class ClientDataMappa extends ClientPlugin
>     >> > implements GuiProvider, serverCaller {
>     >> >
>     >> > /**
>     >> > * GuiProvider methods
>     >> > */
>     >> > public function handleHttpPostRequest($request) {}
>     >> > public function handleHttpGetRequest($request) {}
>     >> >
>     >> > public function buildRequest() {}
>     >> > //public function renderForm(Smarty $template) {}
>     >> >
>     >> > protected function drawUserForm() {
>     >> > $smarty = new Smarty_Plugin($this->getCartoclient(), $this);
>     >> > return $smarty->fetch('dataInput.tpl');
>     >> > }
>     >> >
>     >> > public function renderForm(Smarty $template) {
>     >> > $template->assign('dataInput', $this->drawUserForm());
>     >> > }
>     >> >
>     >> > public function initializeResult ($request){}
>     >> > public function handleResult($request){}
>     >> >
>     >> >
>     >> > }
>     >> > ?>
>     >> >
>     >> > Template:
>     >> >
>     >> >
>     >> >
>     >> > Server:
>     >> > >> > class ServerDataMappa extends ClientResponderAdapter {
>     >> > //public function updateMap(BasicOverlay $overlay){
>     >> > public function handlePreDrawing($request){
>     >> > $msMapObj = $this->serverContext->getMapObj();
>     >> > $layer = new LayerOverlay();
>     >> > $layer->action = BasicOverlay::ACTION_INSERT;
>     >> > $layer->name = "mappa";
>     >> > $layer->data = "images/cc_20050603.tif";
>     >> > $mapOverlay =
>     $this->serverContext->getPluginManager()->mapOverlay;
>     >> > $mapOverlay = updateMap($layer);
>     >> > $this->serverContext->getMapObj()->save('debug.map');
>     >> > }
>     >> > }
>     >> > ?>
>     >> >
>     >> > Il template presenta solo un pulsante che dovrebbe richiamare
>     la parte
>     >> > server per modificare il raster ma non funziona ed anche se
>     lascio il
>     >> > campo
>     >> > data vuoto o vi inserisco un indirizzo inesistente non
>     ottengo nessun
>     >> > cambiamente. Dove sbaglio!
>     >> > Grazie a tutti anticipatamente
>     >> >
>     >> > Luigi
>     >> > --
>     >> > Email.it, the professional e-mail, gratis per te:
>     http://www.email.it/f
>     >> >
>     >> > Sponsor:
>     >> >
>     >> > Clicca qui:
>     http://adv.email.it/cgi-bin/foclick.cgi?mid=6119&d=20070322
>     >> >
>     >> >
>     >> > _______________________________________________
>     >> > Cartoweb-users mailing list
>     >> > Cartoweb-users at lists.maptools.org
>     >> > http://lists.maptools.org/mailman/listinfo/cartoweb-users
>     >> >
>     >>
>     >>
>     >>
>     >>
>     > --
>     > Email.it, the professional e-mail, gratis per te:
>     http://www.email.it/f
>     >
>     > Sponsor:
>     > CD-DVD Vergini. Ampia scelta tra le migliori marche: Verbatim,
>     Sony, Benq.
>     > Prezzi sotto costo, visita il sito
>     > Clicca qui:
>     http://adv.email.it/cgi-bin/foclick.cgi?mid=6120&d=20070322
>     >
>     >
>     >
>
>
>
>     ------------------------------
>
>     Message: 3
>     Date: Fri, 23 Mar 2007 11:33:03 +0100
>     From: "MUTOTA"
>     Subject: [Cartoweb-users] Help
>     To: cartoweb-users at lists.maptools.org
>     Message-ID: <20070323102408.M69952 at students.polytechnic.edu.na>
>     Content-Type: text/plain; charset=iso-8859-1
>
>     Hi list!
>
>     I got the far bellow information from Oliver christen but it
>     is uncclear enough.
>
>     I can get hold of christen or subscribing striaght to the list
>     member.
>
>     In the bellow info, there is talking about templates ,client and
>     server
>     should be edited at least. I want to fix my application as well
>     but those
>     files (templates ,client and server )are not real specified.
>     Please i fan idea direct me so that I will be able to display my
>     mainmap which
>     is refusing to show up.
>
>     (1) Which files do I have to edit to make my mainmap displayed?
>     (2) In which file as well I can edit
>     value="ok" /> TO
>     name="specialactiontrigger" value="ok" /> ?
>
>
>     Thank you very much for your help
>
>     Andreas Mutota
>
>
>
>     > first you need to
>     >recover the submit action. a simple type="submit"
>     > value="ok" /> as you set in your template will simply > post the
>     > form but initiate no action. give a name to you input >
>     > type="submit" name="specialactiontrigger" value="ok" /> if > you
>     > dont give a name to your input they are simply ignored. > >
>     > next step is to recover the "specialactiontrigger" in the client
>     > part >
>     >
>     > - Ignored:
>     > > declare the variable at the beginning of the plugin:
>     > >
>     > > protected $specialactiontrigger;
>     > >
>     > > to do so use the handleHttpPostRequest($request) function,
>     > like this: > > handleHttpPostRequest($request) { > if
>     > (isset($request['specialactiontrigger']) { > $this-
>     > >specialactiontrigger = true; > } else { > $this-
>     > >specialactiontrigger = false; > } > } > > you need
>     > to put something in the buildRequest() { } function, > otherwise
>     > the server part will not be called something like : > >
>     > public function buildRequest() { > if ($this-
>     > >specialactiontrigger) { > return $this->specialactiontrigger;
>     > > }
>     > >
>     > > }
>     > >
>     > > then, on the server part:
>     > >
>
>
>
>
>     ------------------------------
>
>     Message: 4
>     Date: Fri, 23 Mar 2007 12:02:43 +0100
>     From: "Lauber Christoph"
>     Subject: [Cartoweb-users] IE problems and cms
>     To:
>     Message-ID:
>     Content-Type: text/plain; charset="us-ascii"
>
>     Hi
>
>     Two of our clients got problems with the IE browser.
>     One got a bluescreen (not the systemcrash bluescreen) instead of the
>     image. He sees the map apearing, but then it is covered by the blue
>     image.
>     The other is automaticly loged out with the first action after the
>     login
>     (zoom, pan, search, etc.).
>     Both have none of these problems with Firefox!
>     Does anybody knows a solution? Some settings in the Internet
>     Options of
>     IE?
>
>     An other question concerns the graphical manipulation of CartoWeb.
>     Exists something like a content management system for CartoWeb? Or
>     does
>     anybody works with a graphical edittool for the mapfiles? I read
>     something about MapEdit of MapLab. Are there other recommendations?
>     Thanks for your hints.
>
>
>
>     Best regards
>
>
>     Christoph Lauber
>
>
>
>     ------------------------------
>
>     Message: 5
>     Date: Fri, 23 Mar 2007 12:23:48 +0100
>     From: "Oliver Christen"
>     Subject: Re: [Cartoweb-users] IE problems and cms
>     To: "Lauber Christoph" ,
>
>     Message-ID: <022501c76d3d$bc1eb470$15e3a8c0 at maunakea>
>     Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>     reply-type=original
>
>     Hi Christoph
>
>     the problems with IE are most certainly caused by a level of
>     security set
>     too high, which will prevent some parameter to be stored in
>     cookies and
>     other effects like thats.
>     tell your client to try to lower the security level (Internet
>     Options,
>     security) and test again.
>     If that solve the problem, maybe it would be then better to use
>     the Custom
>     Level and try to pinpoint exactly which settings should be changed.
>
>     About mapfile edition, maplab is a good tool, but it only work
>     with php4.
>     There are a few other work-in-progess project, like mapstorer, but
>     none that
>     are really useable sadely.
>     we have a project like that, that would be integrating Cartoweb
>     but we lack
>     funding for this and hence it's not a priority so dont expect
>     anything soon.
>
>     regards
>     Oliver
>
>     > Hi
>     >
>     > Two of our clients got problems with the IE browser.
>     > One got a bluescreen (not the systemcrash bluescreen) instead of the
>     > image. He sees the map apearing, but then it is covered by the blue
>     > image.
>     > The other is automaticly loged out with the first action after
>     the login
>     > (zoom, pan, search, etc.).
>     > Both have none of these problems with Firefox!
>     > Does anybody knows a solution? Some settings in the Internet
>     Options of
>     > IE?
>     >
>     > An other question concerns the graphical manipulation of CartoWeb.
>     > Exists something like a content management system for CartoWeb?
>     Or does
>     > anybody works with a graphical edittool for the mapfiles? I read
>     > something about MapEdit of MapLab. Are there other recommendations?
>     > Thanks for your hints.
>     >
>     >
>     >
>     > Best regards
>     >
>     >
>     > Christoph Lauber
>     >
>     > _______________________________________________
>     > Cartoweb-users mailing list
>     > Cartoweb-users at lists.maptools.org
>     > http://lists.maptools.org/mailman/listinfo/cartoweb-users
>     >
>
>
>
>     ------------------------------
>
>     Message: 6
>     Date: Fri, 23 Mar 2007 12:37:01 +0100
>     From: "Oliver Christen"
>     Subject: Re: [Cartoweb-users] Help
>     To: "MUTOTA" ,
>
>     Message-ID: <024501c76d3f$93d0f260$15e3a8c0 at maunakea>
>     Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>     reply-type=original
>
>     Hi Andreas
>
>     the texte you replied to was a response to Luigi Marotta question.
>     Do you
>     work with him?
>     if yes, you can see the answer there
>     http://lists.maptools.org/pipermail/cartoweb-users/2007-March/002239.html
>
>     otherwise I suppose I never received your question and some mix-up
>     happened
>     with your emails
>
>     regards
>     Oliver
>
>
>
>     ----- Original Message -----
>     From: "MUTOTA"
>     To:
>     Sent: Friday, March 23, 2007 11:33 AM
>     Subject: [Cartoweb-users] Help
>
>
>     > Hi list!
>     >
>     > I got the far bellow information from Oliver christen but it
>     > is uncclear enough.
>     >
>     > I can get hold of christen or subscribing striaght to the list
>     member.
>     >
>     > In the bellow info, there is talking about templates ,client and
>     server
>     > should be edited at least. I want to fix my application as well
>     but those
>     > files (templates ,client and server )are not real specified.
>     > Please i fan idea direct me so that I will be able to display my
>     mainmap
>     > which
>     > is refusing to show up.
>     >
>     > (1) Which files do I have to edit to make my mainmap displayed?
>     > (2) In which file as well I can edit
>     > value="ok" /> TO
>     > name="specialactiontrigger" value="ok" /> ?
>     >
>     >
>     > Thank you very much for your help
>     >
>     > Andreas Mutota
>     >
>     >
>     >
>     >> first you need to
>     >>recover the submit action. a simple type="submit"
>     >> value="ok" /> as you set in your template will simply > post the
>     >> form but initiate no action. give a name to you input >
>     >> type="submit" name="specialactiontrigger" value="ok" /> if > you
>     >> dont give a name to your input they are simply ignored. > >
>     >> next step is to recover the "specialactiontrigger" in the client
>     >> part >
>     >>
>     >> - Ignored:
>     >> > declare the variable at the beginning of the plugin:
>     >> >
>     >> > protected $specialactiontrigger;
>     >> >
>     >> > to do so use the handleHttpPostRequest($request) function,
>     >> like this: > > handleHttpPostRequest($request) { > if
>     >> (isset($request['specialactiontrigger']) { > $this-
>     >> >specialactiontrigger = true; > } else { > $this-
>     >> >specialactiontrigger = false; > } > } > > you need
>     >> to put something in the buildRequest() { } function, > otherwise
>     >> the server part will not be called something like : > >
>     >> public function buildRequest() { > if ($this-
>     >> >specialactiontrigger) { > return
>     >> >$this->specialactiontrigger;
>     >> > }
>     >> >
>     >> > }
>     >> >
>     >> > then, on the server part:
>     >> >
>     >
>     >
>     > _______________________________________________
>     > Cartoweb-users mailing list
>     > Cartoweb-users at lists.maptools.org
>     > http://lists.maptools.org/mailman/listinfo/cartoweb-users
>     >
>
>
>
>     ------------------------------
>
>     _______________________________________________
>     Cartoweb-users mailing list
>     Cartoweb-users at lists.maptools.org
>     http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
>
>     End of Cartoweb-users Digest, Vol 23, Issue 20
>     **********************************************
>
>
> ------------------------------------------------------------------------
> It's here! Your new message!
> Get new email alerts
> <http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>
> with the free Yahoo! Toolbar.
> <http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>   


-- 
Camptocamp SA
Damien Corpataux
PSE A
CH-1015 Lausanne
+41 21 619 10 22 (Direct)
+41 21 619 10 10 (Centrale)
+41 21 619 10 00 (Fax)
P Please consider the environment
Do you really need to print this email?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070326/fc0381b7/attachment-0001.html


More information about the Cartoweb-users mailing list