[Cartoweb-users] GEoloco coordiantese selectable

Valerio Noti valerionoti at yahoo.it
Thu Sep 4 03:11:14 EDT 2008


Hi Oliver,this is an old thread about geoloc plugin. I followed your
instructions but after inserting:
X = <span id="geo_x">{$geo_x}</span> Y = <span id="geo_y">{$geo_y}</span> in
cartoclient.tpl
{$geo_x} and {$geo_y} are not updated (need to refresh the page).
I use cartoweb3.4 with ajax on.

Furthermore, where can I write javascript window.open statement? directly
in renderFormPrepare function?


Thank you very much


Valerio


2008/6/18 Oliver Christen <oliver.christen at camptocamp.com>

>  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 <mannobug at gmail.com>
> *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
>
> ------------------------------
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080904/cb30d2d8/attachment.html


More information about the Cartoweb-users mailing list