A little while back an anonymous monk asked about perl support for Google maps API: Google maps and Perl. He was specifically asking about draggable markers. The replies generally pointed him to javascript which is of course correct. However there is a certain amount of server side work, and I had just written a private module to handle that, which I expected to use very often going forward. However I was unsure whether this amounted to something worth publishing to CPAN. However since I could see how my stuff could be used in such applications I felt pushed to publish it: Geo::Google::MapObject. I covered the original specific question http://search.cpan.org/~silasmonk/Geo-Google-MapObject-0.02/lib/Geo/Google/MapObject.pm#Taking_it_further. My test website http://testmaps.periapt.co.uk/ is also available for viewing, where you control where on earth three little alien creatures next visit.

I think my underlying approach is worth stating to see if anyone has good reasons for alternatives.

  1. The solution must degrade gracefully from a javascript enabled environment to a javascript free environment.
  2. The solution must make as few assumptions about the surrounding framework as possible.
  3. The data should be concentrated in a single place.
  4. I don't like perl code that generates javascript or CSS. That seems messy and would prevent caching of what should be static resources.

Anyway so I published the module because I find it useful and I had some evidence that others might too. Still the fact that perl forms such a small part of the solution makes me feel quite odd. It is almost as if the following conversation took place (with me as the shopkeeper).

  1. Hungry Monk Excuse me kind shopkeeper. Could you sell me some tools for making ham sandwiches?
  2. shopkeeper Hmm. Ham sandwiches. Well that's more of an agricultural thing really. I mean we do sell breadknives, butter knives and knives for cutting meat. But that forms such a tiny part of the overall process of making a ham sandwich.
  3. Hungry Monk I'll buy it. I'm really hungry.
  4. Shopkeeper Okay let’s start with the documentation. The shopkeeper places on the counter several large volumes: “Ham sandwich making, Volume 1: Ham from farm to butcher” and “Ham sandwich making: Volume 2: bread from farm to baker”, “Ham sandwich making: Volume 3: Butter from grass to dairy.” And finally a slim pamphlet: “Your first ham sandwich – putting it altogether.”


In reply to RFC: Geo::Google::MapObject by SilasTheMonk

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.