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.


In reply to Re: Google maps and Perl by SilasTheMonk
in thread Google maps and Perl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.