There is currently one filter hook in the maps plugin.
os_map_post
This filter is applied after the map has been generated and allows you to add your own content below the map. Typical use is to allow a custom sorted listed of markers to appear below the map, perhaps using data in the JSON file which is not used to generate the map itself.
The filter function can take up to 6 arguments:
my_filter( $html, $mapid, $args, $marker_list, $gpx_list, $kml_list )
html
is the HTML code generated from the map. You need to return this with whatever additions you need.
mapid
is an integer identifying the map on the page. The first map has mapid=1
args
is the array of shortcode arguments after the plugin has parsed them
marker_list
is the array of markers. Each array item will itself be an array consisting of at least [‘location’], [‘layer’], [‘color’] and [‘desc’]. If you have used a JSON file then there may be additional keys too.
gpx_list
is the array of gpx files in the same format as the marker array. Here location refers to the URL of the file.
kml_list
is the array of KML files, formatted in the same way as GPX files.