Reply To: Hide shapes on mashup

Home Forums MapPress Support Hide shapes on mashup Reply To: Hide shapes on mashup



There are at least two ways:
1. KML files are suppressed by default, so you could draw the shapes in Google Earth or another KML editor, and then add that file as a POI.

2. You can use filter mappress_query_filter to filter out the POIs you don’t want. This is called just after the mashup query, but before display. POIs that represent shapes will have poi->type set to one of [‘circle’, ‘rectangle’, ‘polyline’ or ‘poly’]. All shapes also have poi->poly set.

Here’s an example of a filter you could add to functions.php to remove all shapes:

function myfilter($map) {
	$pois = array();

	foreach($map->pois as $poi) {
		if (!$poi->poly)
			$pois[] = $poi;
	$map->pois = $pois;
	return $map;
add_filter('mappress_query_filter', 'myfilter');