Published on April 7, 2015 by Jan Haderka
I’d like to show you something exciting today. I can’t take the credit for all of the work, though...
Tthe development was originally started by my son Martin, then picked up by my colleague Jaroslav. I’ve really just added a few finishing touches to make the module releasable. So voilà: I present to you the Google Places module! It’s an integration of Magnolia and Google Maps and Places done a little differently from what you might expect.
All the places you’ll ever need
What you typically want when you deploy Magnolia in your organization is to take maximum advantage of its UI. What you typically get when you ask devs to place a map in your website is a fixed size map, perhaps with some text file or direct html access where you can edit a list of markers. This changes with Magnolia: now you have one pretty Magnolia-style app that your editors can use to load, edit, categorize and sort all the markers they use on one or different maps across their site.
Using marker categories
Every marker can be assigned one or more categories. When putting together a map, you then pull in the relevant category or categories. One marker can therefore be used in multiple maps, depending on how many categories it’s relevant in. This allows the editor to organize the markers according to type, but then re-use them on many different maps according to category. To make that sample little bit more interesting, we’ll deliver the module with set-up markers showing locations of Magnolia’s offices and those of all partners around the world. So for example, if you want to assemble a map with all Magnolia partners, just tell the map to draw in all markers categorized as “Partner”. Boom!
If you already have a list of locations saved in a spreadsheet, save it as an Excel file and get it imported into the app directly.
While you can (and really should) specify exact locations using latitude and longitude for each marker, you can also just leave in the address - the exact position will be retrieved on the fly using the Google Places API. Due to the limitations in the free usage of the API, you should not do that for too many markers, or you should buy unlimited access if you need to do that.
Download, use, contribute
Now for the best part - the module is already released and ready for you to use. Feel free to contribute more functions and improvements to it, if you like it.
Jan is Magnolia's Chief Technology Officer. He has been developing software since 1995. On this blog, he'll write about Magnolia's connectors, integrations and coding ...with the odd Magnolia usability and development tip thrown in for good measure. He lives in the Czech Republic with his wife and three children. Follow him on Twitter @rah003.
See all posts on Jan Haderka