Hi Chris. I’m using custom fields to automatically generate a map for my Posts. Specifically, I’m using the Address Line 1 to input a custom field with a “lat, long” value.
Is there any possible way I can use multiple “lat, long” values to automatically generate multiple POIs?
I know that I can manually add POIs after the map has been automatically created, but this project involves importing about a thousand Posts from an XML file, and it would be great if I could do the multi-POI maps automatically.
The automatic map generation is really designed to create 1 post per POI. However, you can combine the posts in any combination using a mashup. For example, try assigning the posts to a taxonomy (like categories or tags) to group them. Then it’s possible to do mashups based on the taxonomy terms – there are some examples here: http://mappresspro.com/mappress-documentation
I don’t support generating multiple POIs per post and the code will eventually be deprecated. But there is still some older code in the current version that might do what you want if you’re doing a 1-time load.
To try it:
1. Configure a single field for the ‘address’ in the MapPress settings.
2. Edit a post and enter multiple values for that custom field. Use a separate for each POI, and format the rows as a shortcode. For example, for two POIs, enter:
address = "200 el camino real" title = "title 1" body = "body 1" iconid = "blue-dot"
address = "300 el camino real" title="title2" body="body 2" iconid="green-dot"
You should also be able to use lat,lng – for example: