Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Google maps and Perl

by SilasTheMonk (Chaplain)
on Sep 26, 2009 at 21:08 UTC ( [id://797719]=note: print w/replies, xml ) Need Help??


in reply to Google maps and Perl

I think what you need to do is to override the dragend event of the GMarker class (http://code.google.com/apis/maps/documentation/reference.html#GMarker.dragend) to capture your move of the marker. Your function would need to make an AJAX style call to update the server of the move of the marker. So I would say about 50% of the problem is in javascript, about 20% in your markup and only about 30% in server side code (which could be perl). As such it is quite hard to encapsulate in perl. It can be done (and I was thinking of doing so for a much simpler problem) but you would have to supply a lot of javascript and HTML documentation to go along with it. You probably want to start by just making the dragend functon call "alert" before you start worring about AJAX and updating the server.

Edit: Thinking about it, something I wrote could be extended to provide support for this. It would work with HTML::Template::Plugin::Dot (and possibly other template frameworks). As I said above, only about 30% of it would actually be perl. The other would be docs and explanation. I am a bit busy now at the moment so I would like to ask what is your timeframe? What I could do is send a private email with an explanation of what I have done and how I would adapt it to meet your needs.

Edit 2: Also another question. You talk about "saving back to a perl variable". That does not make sense. You need to be saving back to some sort of persistent storage, though of course you might like to hide that behind a variable.

Edit 3:New development: RFC: Geo::Google::MapObject.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://797719]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found