The same store locator with the ready-made locator tag: the form, the list and the map in one tag. The checkboxes of the categories and of the custom fields are made by the tag, with the number of stores per value, and are checked again after a search.
filters="services|brand": a group of checkboxes for theservicesfield (checkboxes) and thebrandfield (select), with the options of the field. A store needs one of the checked values of each field.filter:wheelchair="1": only stores with the toggle fieldwheelchairon, a fixed filter without checkboxes.label:filter:services: the legend of the group, by default the label of the field.
Template
<html>
<head>
{exp:reinos_maps:html_header}
</head>
<body>
{exp:reinos_maps_locator:locator
channel="stores"
category_group="3"
label:categories="Store type"
filters="services|brand"
label:filter:services="Services"
filter:wheelchair="1"
radius_options="10|25|50"
nearest="5"
}
{exp:reinos_maps:html_footer}
</body>
</html>Build it in your own site
What this example needs in ExpressionEngine, step by step.
- Install Maps Locator and Maps.
- Create the category group Store types with the categories Bike shop, E-bike specialist, Repair, Rental. The code uses its ID (
category_group="3"): change it to the ID of your group. - Create the fields, with these short names:
Short name Type Notes store_locationMaps Set the field setting Mode to Single location: one marker per store, placed with the search field. Maps Locator indexes that marker, so this one field is the location for the map and the search. servicesCheckboxes Options: wifi,parking,wheelchair.brandSelect Dropdown Options: urban,sport,cargo.wheelchairToggle - Create the channel
stores(Stores) and assign the fields and the category group Store types. - In the settings of Maps Locator, turn on Reverse geocoding: a marker of a Maps field is saved as a coordinate, the reverse geocoding looks up its address and city (the city pages and a search on a city need them).
- Put the code in a template.
- Add a few stores (the demo site has 34 bike stores in the Netherlands).
This example comes from the Maps Locator docs: the preview runs exactly the code above.