[Cartoweb-users] Remove cookie and get actual extent

christophe at beve.org christophe at beve.org
Mon Oct 22 06:35:33 EDT 2007


Hi,  

Thanks for the quick reply.
Problem solved, my hidden fields was badly removed with JS.

I get extent client side and send it to server with buildRequest as you
said, perfect.

Christophe


On Mon, 22 Oct 2007 08:37:44 +0200, "Oliver Christen"  wrote:    
Hi       if your plugin call buildPostRequest then the content of the 
form is sent. If what you receive is not what you expect, then
something is  wrong before it is sent.   you can see the content of
the request in the JSTrace debugger  windows. also, if you are in
development mode, add in your main template the  code to display
developpers message (copy it from the demoCW3  cartoclient.tpl, it is
the only one with the id attribute needed)       for the extent on
server side, I dont think there is already a  function for that, as I
dont see any accessor in the location coreplugin on  server side.  
but you can easily get it on client side and simply send it to  your
plugin server part via the buildRequest() function.   $bbox = 
$plugins->getPlugin('location')->getLocation();       regards   Oliver
       ----- Original Message -----    From:  christophe at beve.org [1] 
  To: cartoweb-users at lists.maptools.org [2]    Sent: Monday, October
22, 2007 12:12  AM   Subject: [Cartoweb-users] Remove cookie  and get
actual extent   
 Hello list,   

 I'm writing a plugin to search into a database and display mixed
icons on  the map.   

 I use ajax to send vars to the client side of the plugin, no problem
with  that. But when i remove items with JS (hidden fields) and send
new query the  old vars are send (cookie i think).   

 What can i do to cleanup that ?   

 Another question, how can i get the current extent in the server
side ?  $this->getServerContext()->getMapObj()->extent give me the
extent of  the mapfile, not the current extent.   

 You can view the plugin (it do nothing server side actually) here: 
http://cartoweb.localix.org/ in the DBSearch tab.   

 It's in early stage of development but source code can be accessed 
here:  http://cwdbsearch.googlecode.com/svn/trunk/ . Some parts are
ugly  and for testing purpose only, sql request are not in the config
file and  directly in the code actually. It's my firt steps with
cartoweb :)   

 Thanks,   

 Christophe   
-------------------------
    _______________________________________________
 Cartoweb-users  mailing  list
 Cartoweb-users at lists.maptools.org
 http://lists.maptools.org/mailman/listinfo/cartoweb-users
  

Links:
------
[1] mailto:christophe at beve.org
[2] mailto:cartoweb-users at lists.maptools.org




More information about the Cartoweb-users mailing list