[Cartoweb-users] Remove cookie and get actual extent

Oliver Christen oliver.christen at camptocamp.com
Mon Oct 22 02:37:44 EDT 2007


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 
  To: cartoweb-users at lists.maptools.org 
  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20071022/6a605950/attachment.html


More information about the Cartoweb-users mailing list