Reply To: Copying Maps or Mashup by map id

Home Forums MapPress Support Copying Maps or Mashup by map id Reply To: Copying Maps or Mashup by map id



I’m not sure if I fully understand the details of how your data is stored, so let me know if I’m off base. It sounds like you have many maps in a single post.

Usually it works better to use a separate post for each location: i.e. create a post for each festival location with 1 map per post. Then the queries are easy: you can just tag the posts as ‘2013’ or ‘2014’ and do a mashup for each year.

To avoid copying the maps manually, you can edit the map database tables using PHPMyAdminin or a similar tool (make sure to take a database backup first).

The maps are stored in table mappress_maps, and their association with the posts is stored in table mappress_posts.

To split up the existing maps into separate posts, with 1 map per post:
1. Create a new blank post for each location
2. Re-assign the existing map IDs to the new post IDs in table mappress_posts.
3. Assign the posts to a ‘2013’ or ‘2014’ tag or category, and use a mashup based on that.


To copy all the existing maps to a single (new) post:
1. Duplicate the maps in mappress_maps
2. Associate the new map IDs to the new post ID in mappress_posts.
3. Use a mashup like the existing one, that selects only a single post.