Index

  1. Home
  2. Docs
  3. Index
  4. Data Publisher
  5. Geolocation search

Geolocation search

To add geolocation range search to a publication, geolocation support has to be enabled first. Once enabled, it can be added using advanced table options.

Enable geolocation search

{
	"wpda_geo": {
		"show_map": true,
		"map_init": "open",
		"map_location": "user",
		"show_filter": true,
		"geo_filter": "before",
		"geo_marker_column": 1,
		"geo_marker_position": "after"
	}
}

Use option wpda_geo to enabled geolocation range search. The plugin uses the geolocation columns defined for the publication base table to search within the range. For a fixed range search the geolocation settings for the base table are used. For user range search the plugin will ask the user for permission to get access to her location.

Option wpda_geo supports the following nested options:

  • show_map (true = add map to publication | false = no map added)
  • map_init (open = show map on page load | otherwise user needs to click to show map )
  • map_location (user = user position | fixed = fixed position taken from geolocation settings)
  • show_filter (true = allow user to change search range)
  • geo_filter (before = show filter before search box | otherwise filter is shown after search box)
  • geo_marker_column (index of the column to which the marker is added)
  • geo_marker_position (before = marker is added before column content | otherwise after)

Please note that markers added to a publication are clickable.

Was this article helpful to you? Yes No

Leave a Reply

Your email address will not be published. Required fields are marked *

6 − 3 =