Darren Ferguson - Blog

23 January 2009 at 08:00

Teaser screenshots of new Umbraco ‘place’ datatype

Tags: Health Medical Pharma
Author: Darren Ferguson

I’m working on an Umbraco datatype that lets you lookup a place. The data stored is the latitude/longtitude of the chosen place as well as the name.

It is all working pretty well to date, I just need to ensure that multiple instances can be placed in a document type and that my use of jQuery won’t clash with any other instances that have already been loaded.

place datatype teaser

place datatype teaser

Written by: Darren Ferguson

Comments

  1. Aaron Powell says:

    Gravatar of Aaron PowellNice, where are you reading the google map key from, web.config? That could pose a problem if you have multiple websites in the 1 umbraco instance. Would it be possible to have it as part of the data when configuring the data type (if not that could be a way to make it even cooler ;).

    How much control do you provide over the things like:
    - default zoom level
    - icon used
    - bubble text

  2. Darren Ferguson says:

    Gravatar of Darren FergusonHi, Thanks for the info. API keys are stored based on the domain of the request so it already works as you suggest. No control over the other items you mention as yet, though the map will size and centre itself based on the distribution of your search results.

  3. Soeren Sprogoe says:

    Gravatar of Soeren SprogoeSweet!

    I've been meaning to do one just like this for a while now, just never got around to it.

    Will it be available for download sometime in the future?

  4. Darren Ferguson (1) says:

    Gravatar of Darren Ferguson (1)@Soeren yep - I'll make it available soon.

  5. Aaron Powell (1) says:

    Gravatar of Aaron Powell (1)How are you doing the settings, I've just done a multi-domain umbraco build which has umbraco-stored config options which was a real pain to code up!

  6. Darren Ferguson (2) says:

    Gravatar of Darren Ferguson (2)I used an XML file keyed on domain in /umbraco/plugins/myplugin

  7. Soeren Sprogoe (1) says:

    Gravatar of Soeren Sprogoe (1)Could you store a map zoom level also, together with the long./latt.?

  8. Darren says:

    Gravatar of Darren@Soeren - Not sure why I'd want to. The Maps API can figure that out by itself.

  9. Soeren Sprogoe (2) says:

    Gravatar of Soeren Sprogoe (2)Here's an example of what I want to use it for:
    http://www.rejstil-mallorca.dk/sevaerdigheder/mallorcas-bjerge.aspx

    It's a sightseeing database over attractions on Mallorca. I want the webmaster to be able to easily create a new location, find it on the Google Maps DT, and it then stores the long/latt of the spot he picked, along with the zoom level of the map. That way it can be displayed in exactly the same way on the frontend.

    Hope it makes sense.

  10. David Conlisk says:

    Gravatar of David ConliskHi Darren - how's this coming along? I'm dying to get my mitts on it!

Leave a comment