Darren Ferguson - Weblog
Thursday, February 26, 2009
Umbraco Map/Place datatype available to Download
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 maps API 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 Umbraco GUI 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.
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!
Friday, February 27, 2009@9:05 AM
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
Tuesday, March 03, 2009@2:34 PM
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.
Thursday, February 26, 2009@10:28 PM
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.
Thursday, February 26, 2009@11:09 PM
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...
Friday, June 12, 2009@3:21 PM