I have a CPT where people can enter up to 2 locations for their office addresses.
Visiters can filter businesspersosn by category and can see all the locations. Not problem so far.
Bu on a single CPT I would like both locations of the specific post to be shown in a small Google Maps. I tried it with a View, but I cant find the right things to do.
I have read online documentation and asked for help from collegues, no success so far.
Can you help me with this topic?
Hi, how are the two locations stored in your custom post type - are they separate custom fields, or is it one repeating custom field, or are they in a repeatable field group?
Also, do you want the maps to be interactive, so the site visitor can zoom in, pan around, and click the marker in the maps, or do you want simple map images that are not interactive?
Hi Christian,
Thanks for your time.
They are two seperate custom fields (repeating option was not possible with the first Google Maps adress field).
The two fields dont have to be interactive; just displaying in the same map together. Zoom option would be nice. You can see the bigger map with filer here: hidden link You can see a single post here: hidden link
Sometimes a second adres is used, sometimes just one. When someone hs two adresses I would like to show them together in a map on a single post.
Please tell me if you need more information.
Okay I don't think you need a View here. You can use a map shortcode and two marker shortcodes in your single post Content Template. Place your cursor in the Content Template, then click "Fields and Views" to show the popup. Click "map" here to insert a map. Make sure to use a unique map ID. When you finish, the system will generate the map shortcode for you.
Then click Fields and Views again, and this time click "marker". In the configurations, set the map ID you just created, then choose the custom field as the source of the marker. When you finish, the system will generate the map marker shortcode for you.
Then click Fields and Views again, and repeat the marker process for the second custom field.
Let me know if you have trouble implementing this map.
My issue is resolved now. Thank you!