[Seaside] Google Maps center coordinates
James Foster
Smalltalk at JGFoster.net
Mon Mar 1 21:39:41 UTC 2010
Dario,
See GMUsingLatLong>>#'googleMap' for an example of a callback from the browser to Smalltalk. You could modify the callback so that it persists the arguments instead of simply generating an alert to display in the browser. Basically, you would send #'on:do:' to the map and use the 'moveend' event.
James
On Mar 1, 2010, at 9:04 AM, dtrussardi at tiscali.it wrote:
> Hi,
>
> i work with Google Maps into seaside based on http://seaside.gemstone.com/ss/GoogleMaps .
>
> I rendering the map and all work fine.
>
> The user can move the map with no problem.
>
> I'm interested, when user end the moving of the map, to sender the new center coordinates of the map, to my seaside application.
>
> It's possibly ?
>
> Into documentation i found this script:
>
>
> googleMap
>
> ^GoogleMap new
> setCenter: 45.5267 @ -122.8390 zoom: 11;
> setUIToDefault;
>
> addScript: 'GEvent.addListener(map, "moveend", function() { var center = map.getCenter(); alert(center.toString());});';
> yourself.
>
>
> It's work fine when the user end the move, it alert the new center coordinates.
>
>
> Now how i can send this data to my application ?
>
>
>
> Thanks for any considerations !!!
>
> Dario
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
More information about the seaside
mailing list