[Cartoweb-users] GEoloco coordiantese selectable

Oliver Christen oliver.christen at camptocamp.com
Wed Jun 18 04:19:12 EDT 2008


Hi

all you need to do is to modify the geoloc plugin to output some template instead of using the actuel user message system.
there are plenty of examples in the wiki's "how to" and also in the mailing list about how to do that.

in short, 
remove/comment the line
$this->getCartoclient()->addMessage('geo_x='.$this->Geo_x.',geo_y='.$this->Geo_y);

modify the renderFormPrepare function:
return array('geoloc_active' => $this->pluginStatus,
                  'geo_x' => $this->Geo_x,
                  'geo_y' => $this->Geo_y);

modify your Cartoclient.tpl:
X = <span id="geo_x">{$geo_x}</span> Y = <span id="geo_y">{$geo_y}</span>

( the spans with an id are important because thats how the values placeholder are found and updated when using ajax)

regards
Oliver
  ----- Original Message ----- 
  From: mannobug mannobug 
  To: cartoweb-users at lists.maptools.org 
  Sent: Saturday, June 14, 2008 12:11 PM
  Subject: [Cartoweb-users] GEoloco coordiantese selectable


  Hi all,
  I downloaded geoloc.zip plugin and after installation it was everything ok.
  Clicking on my map I retrieve coordiantes vai addMessage(...) function call.
  I want to make the result of addMessage selectable, thus I like to add coordiantes in ad geoloc template but I'm really in trouble.
  I found on previups discussion in this mailing list some information (e.g. retrive coordinates from map, and so on, ...) but i'm still locked because no solution run for me :-(
  Can anyone show me how to do this , thus make selectable or writebale to clipboard coordinates retrived?
  It's really important, I must develop this in time for my thesis :-)
  Thanks all... Regards.
  Emmanuele


------------------------------------------------------------------------------


  _______________________________________________
  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/20080618/5a271368/attachment-0001.html


More information about the Cartoweb-users mailing list