Best approach for map with markers and location info?

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Locked
10010110
Translator
Translator
Posts: 200
Joined: Tue Jan 22, 2008 9:57 am

Best approach for map with markers and location info?

Post by 10010110 »

I’m faced with a task that involves displaying a map with the outline of a country/state, and putting markers in places with information about the places. Now, I’m wondering what would be the best approach for this?

A bit of background info: this is a website displaying events and venues (among other info). The events are managed with CGCalendar (of course), and currently the venue names are added by using custom fields for each entry in CGCalendar.

Now, the map should show the venue locations and when clicking on a marker, it should display the events happening in that location, ideally with a link to the respective CGCalendar entry. The markers should be placed automatically when an event is created.

For the map itself I imagine the most logical thing would be an OpenStreetMap on the page. And as for managing the whole thing, I guess the best approach, usability wise, would be to create venues independent of CGCalendar (I imagine using LISE), but create a relationship between the venue and the event entry, so that whenever an event is created, the editor would select a venue from a list, or whatever.

Does that sound plausible? Does anyone have a different idea on how to approach this? Or is there already a module for that?

I’d be grateful for any constructive input.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Best approach for map with markers and location info?

Post by DIGI3 »

I recently used https://leafletjs.com/ for a project, might be worth checking out. I used LISE to defined the locations, your approach sounds like it makes sense.
Not getting the answer you need? CMSMS support options
10010110
Translator
Translator
Posts: 200
Joined: Tue Jan 22, 2008 9:57 am

Re: Best approach for map with markers and location info?

Post by 10010110 »

Thanks, but how would I create a relationship between a venue/location in LISE and an event in CGCalendar? Like, when adding/editing an event, to show a list of previously created venues in the edit form to select from (or create a new one right there and save it in LISE)?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Best approach for map with markers and location info?

Post by DIGI3 »

Unfortunately CGCalendar custom fields aren't Smarty templates, otherwise you could simply make a LISE template that creates a list of options. So you would probably need to make a 'Dropdown from UDT' field, then create a UDT that pulls the information from the LISE instance. (or offer a sponsorship to Calguy for converting custom fields to be Smarty templates - I've done this for some other of his modules and it's not that much)

Note: I just tried a dropdown from UDT field and I couldn't find where to choose the UDT. Perhaps a bug in the current version.
Not getting the answer you need? CMSMS support options
Locked

Return to “The Lounge”