Multiple Map entriesBrowser Info Environment
I am experimenting with this one a little but I don't seem to get out what I need.
What I would like to achieve:
Having a parent page "Events" with subpages "Location 1", "Location 2" etc...
The subpages have a page attribute which is an adress.
Now I would like to display a SorcerersMap on "Events"-Page, displaying markers for all the geolocations of the "Location" Page Types. So that in the end, the user would see a map with markers for all the Events happening...
I havent found any symbol for "child page", how would i do that?
First, the good news.
To list child pages, there are all sorts of symbols along the lines of LIST_PAGES and variations.
PAGE LIST_PAGES 20 APPLY_EACH ATTRIBUTE "map_loaction_atttribute_name" END_APPLY_EACH
Would create a list of attributes for up to 20 direct children of the current page.
There are plenty of examples in the docs and a forum thread about doing so for blog pages at:
Now the bad news.
Sorcerer's Map is only designed to show one location. So while you could easily show a list of child page location attributes, you cant currently show a map with all of them and you cant show a map with popups/links next to each location.
What you could do instead is show a list of thumbnail maps using Uber List, with one child location for each item in the list. Imagine some of the Uber List examples that show a series of 'cards' showing a series of map cards. For longer lists this would be a good application for the Page List template version of Uber List, so each list would be paginated through php (and so avoid the list generation from getting too long).
Another thought about a solution, and getting back to your original map, it may be possible to create a Magic Data enabled template for one of the existing multiple entry map blocks such as the dealer locator. It may also be possible to write a custom template for Uber List that shows the list on a map. However, maps code is not straight forward as it usually involves a combination of both php and jquery.
I suppose I wont put 250$ into this, then rather adding everything to a standard Google map... Or could this be done by adding layers in the view.php output? Like Layer 1 -> Map, Layer 2->Location1, with z-indexes adding up...
I would love to automate this, as the whole attribute-based-display-thingy offers so much possibilities. How much would you quote for extending this functionality?
The only way to do it would be through the google maps api.
I have had a quick through the various map addons to see if there would be an easy integration route. You need to be careful with maps addons because some of them are quite old and are a bit flakey with the current c5 ui (I did the pull request on the core maps block to fix it for c5.6).
The Dealer Locater addon gets its list of dealer addresses by importing a csv file. So a way of automating everything could be to use Magic Job to create a list of addresses from page attributes for all pages beneath your index page and write that to a csv, then import that csv into dealer locator.
It wouldn't quite be fully automated, because you would need to manually go to the dealer locator dashboard and tell it to import a new csv each time you updated everything.
I am not sure if it lets you have links within the tips that attach to map pins.
That gives a way to test things without writing new code.
To fully automate it, I have had a quick look at the database spec for dealer locater and it should be fairly straight forward to integrate from sorcerer's map so it would insert/update in dealer locater whenever the map was viewed, so viewing a sorcerer's map block would then update the dealer locater database and hence the dealer locater block that sat on the index page. I could even make that a checkbox option in the sorcerers map edit dialog to switch this on and off.
If dealer locator fits your index page requirement, I expect I could add the customisation in 1/2 a day or so, so £150 (GB) to make the change to sorcerer's map so that it would automatically update the database in dealer locater.