0

I am using Google Store Locator for to list a locations, I have a use case where some of the locations have special events. I want a small map next to each listing.

I've added some items to the Store Location content type to select if that location is having an event with some other fields relevant to the event.

With that, I've created a view that shows everything I need, except for a small map of the location next to the event listing. You can see what I'm going for here: Views listing with small map example

I'm stuck on how to add the map. I know I have the location information I need in the content type, but there doesn't seem to be any "map" format I can use in the view. I'm assuming I'll need another module or something custom.Looking at OpenLayers, it looks like it adds multiple markers to one map like a lot of the other solutions, anyone know if it can do what I'm asking?

The map doesn't need to be interactive, I'd take a static image that linked out the the location in Google maps.

  • For performance reasons you might want to reconsider your approach - having a single map with multiple markers will use substantially less resources (comparatively speaking) – Clive Dec 8 '15 at 15:23
0

I was able to use the Address Field Static Map module to get this taken care of.

Since I was already capturing the address in the content type, after installing the Address Field Static Map Module, I could add another 'location' field to my View and select the 'Address Field Static Map' field formatter and customize as needed from there. The module even provided an option for linking out to the location in Google Maps.

To use this, the Address Field Module is a dependency.

This gave me the exact thing I needed.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.