I use wpgmp_marker_source filter to query an external database. I change my query parameters based on the map id. This works very well. But when I get a few hundred markers the performance declines dramatically.

I can query my database and then insert rows directly into table ‘map_locations’ but I would need to remove the filter for that map id. Can you advise the proper way to do that?

Well it appears if the apply_filters doesn't receive an array of markers then it defaults to using the locations for that map. That's perfect for my needs. I only looked for a few minutes, so I will need some more time to figure out how to insert 500 or more location rows into the database. It looks like I may need to insert the locations into one table and then a corresponding JSON in the map row. I am going to assume there's no tutorial article on this. :)

Please login or Register to Submit Answer