Reply To: Add pois via javascript

Home Forums MapPress Support Add pois via javascript Reply To: Add pois via javascript



The javascript code isn’t an API for external use – it’s not documented and subject to change at any time. And it seems like reinventing the wheel – mashups already query based on their bounds, center, set POIs, etc.

If you want to continue calling the javascript directly, you can use method ‘setPois’ to load POIs in bulk.

Instead, I’d suggest using filter mappress_query_filter. Set up a mashup with a query like this:
[mashup query="custom"]

Then use the filter to set the mashup’s POIs to whatever you like before they are returned from the AJAX call. The call will repeat each time the map is moved. You can see the filter in file ‘mappress_query.php’.