Darren Ferguson - Weblog

26 February 2009

Umbraco Map/Place datatype available to Download

Filed under: Umbraco - by Darren Ferguson @ 18:50

My Umbraco map/place dataype that I've blogged about previously is available for download here. The datatype is distributed as an Umbraco package.

Note: This is an Umbraco v4 datatype only. I may update it to support version 3 if there is the demand.

Important: You will need a Google mapsAPI key to use this datatype.  The key can be obtained from this site and needs to be placed in the configuration file /umbraco/plugins/FergusonMoriyama/place/place.config.

There are a couple of known issues, which I believe are issues with Canvas, but I'm happy to be corrected if wrong. First, the first time you click on a map location to edit - in IE only - the map doesn't render, subsequent edits work fine. The second issue is that if you edit one map on a canvas page and then edit another map before saving the document then the second map you edit gets the value of the first. I'm hoping to communicate with Ruben and figure out what happens.

I'll treat this as a beta release, please install, test and send feedback. I'll make any modifications needed and release again next week. Feel free to suggest any additional features.

I'll follow up with a couple of blog posts on how to render static and dynamic maps in Umbraco templates.

Finally, you'll notice the datatype renders a link to my site - only visible in canvas or the UmbracoGUI not on the front end of your published site. I've thought long and hard about this, and I figure that If you can't live with the credit link you can make a donation to me and I'll send you a version minus the link.

7 comments for “Umbraco Map/Place datatype available to Download” Comments RSS

  1. Murray says:

    Gravatar of MurrayHi Darren,
    Looks excelent,
    The config looks very close to what I've already written for the web.config, I assume If I put multiple domin nodes into it will auto detect which key to use.

    I don't know how, but it would be great if I didn't have to store the keys in multiple places? :-)

    Cheers.
    Murray.

  2. Murray says:

    Gravatar of MurrayHi Darren,

    Great work, it will make the content loader's time lots easier...
    I've found a few improvements you could make, and one bug. (I think)
    the bug is the default_location doesn't seem to work.

    The improvements are to the place.config file, you'll see why when you see mine, here it is:

    <?xml version="1.0" encoding="utf-8" ?>
    <config>
    <domains>
    <domain name="localhost">
    <gmaps_api_key>xxxx</gmaps_api_key>
    <default_location>-43.531637,172.636645,7</default_location>
    </domain>
    <domain name="www.___.dev.terabyte.co.nz">
    <gmaps_api_key>xxxx</gmaps_api_key>
    <default_location>-43.531637,172.636645,7</default_location>
    </domain>
    <domain name="www.___.test.terabyte.co.nz">
    <gmaps_api_key>xxxx</gmaps_api_key>
    <default_location>-43.531637,172.636645,7</default_location>
    </domain>
    </domains>
    </config>

    If the domain name attribute were a regex or even a substring match then I can use one config line for all our internal servers (they use the same key)

    Also I've had to duplicate the default location for each domain, where in this case I don't have different default locations.

  3. Darren Ferguson says:

    Gravatar of Darren Ferguson@murray - Thanks for the feedback.

    I'll change things so that you can use wildcards in domain names.

    The default location isn't actually implemented. It didn't quite make the cut for this beta release!

  4. David Conlisk says:

    Gravatar of David ConliskNice work Darren!

    I've just downloaded the package and I'm creating my first document types using the place datatype. Dead easy to use - will definitely be using this one on any sites that require the storage of GPS co-ordinates.

    David

  5. Nik says:

    Gravatar of NikVery nice work!

    I'm missing an option for removing the coordinates (should be a button clearing the textfield) - this is quite important for document types where the map option is only used every now and then...

  6. Murray says:

    Gravatar of MurrayHi Darren,
    Are there any plans to update this to the new Google Maps API v3. which does not require a key?

  7. Darren says:

    Gravatar of Darren@murray - there are no plans to update the package unless development is sponsored.

Leave a comment