Locations Engine - Addons
A map of your search results with member photos as pins, groups for busy areas, and a card with each member's details when a visitor taps a pin.
What it does
Locations Engine puts your search results on a map. Each member shows as a pin with their photo, nearby members gather into a group with a count, and tapping a pin opens a card with that member's details and buttons.
The map follows the visitor's search. When they search a city or a category, the map shows those results, and Search this area runs the search again for wherever they have moved the map.
Where it lives
In your DirectoryCustomize plugin admin: Plugins then DirectoryCustomize then My Widgets then Locations Engine, then Configure.
What we built and what the map provider supplies
A map on your page is made of three layers:
- The street map pictures. The map underneath: roads, water, place names. These arrive as small square images from a map service's servers.
- The map viewer. The code in the visitor's browser that shows those pictures and lets them drag and zoom.
- Everything on top of the map. The photo pins, the groups with counts, the heatmap, the member card, Search this area, Prev and Next, Find Near Me and Fullscreen. This is the part Locations Engine adds, and it works the same with either map choice below.
The Map setting decides who provides the first two layers:
- Google Maps: Google provides both the viewer and the street map pictures. It uses the Google key already in your site settings, and any Google map charges go to that key.
- Leaflet: Leaflet is a free map viewer. The street map pictures come from OpenStreetMap unless you set a different map tiles address.
Where the street map pictures come from (Leaflet)
With Leaflet, the map pictures load from OpenStreetMap's free servers by default. They are a good fit for a small directory. OpenStreetMap runs them on a best effort basis for everyone, so a busy site should use a map tile service instead.
To use one, sign up with a map tile service, copy the tile address it gives you, and paste it into Map tiles address (Leaflet only) in the Advanced section. Leave the box empty to keep using OpenStreetMap.
Satellite view
In full screen, the map has a Map and Satellite switch at the top. Satellite shows aerial photos under the pins, so visitors can see the buildings, roads and land around each member.
- With Google Maps, the switch is there as soon as Show the Map/Satellite switch in full screen is on.
- With Leaflet, the satellite photos come from Esri and need a free Esri key. Without one, the free map shows no Satellite button.
The words on the switch can be changed with Satellite switch words.
How do I get an Esri key for satellite view?
- Create a free account at location.arcgis.com/sign-up and activate it from the email Esri sends you.
- Sign in, open the Developer credentials tab, and click Create developer credentials. The form opens in a new tab.
- For the credential type, choose API key credentials, then Next.
- For where you will use it, choose Public application, then Next.
- For item access, leave No item access selected, then Next.
- Under Location services, turn on the Basemaps switch, then Next.
- Pick an expiration date. It starts about three months out and can be set up to one year. You can leave Referrer URLs empty, or add your site's address so the key only works on your site. Then Next.
- Give it a title, such as "Map satellite", then Next.
- On the summary, click Next, choose Generate the API key and go to item details page, and click Next again.
- Copy the key right away. Esri only shows it this one time.
- In the Locations Engine settings, paste it into Esri key for Satellite.
Open your map in full screen and click Satellite to check it.
What happens when my Esri key expires?
The Satellite view stops loading photos. The street map and the pins keep working. Make a new key in your Esri account with the same steps and paste it into Esri key for Satellite. Changing the expiration date on an existing key stops that key working, so put a reminder in your calendar a week before it runs out.
Why does the satellite map show an Esri credit line?
The photos come from Esri and its partners, so the map names them in the corner while Satellite is on.
Map look
Map look changes the colors of the street map. Same as your site follows the Google Map Theme in your site design settings, so this map matches your other maps. You can also pick Classic, Apple, Modern, Midnight, Black and white, Gray, or paste your own Google map style.
With Leaflet, only Classic and Gray are available. The other looks are grayed out.
The member card
Tapping a pin opens a card with the same details as that member's search result: company, verified badge, star rating, city, a short description and their buttons. You choose:
- Card layout: a strip along the bottom of the map, a card down the side, or a pop-up next to the pin.
- Open the card when a visitor: clicks a pin, or moves the mouse over it. On phones and tablets a tap always opens the card.
- Picture on the card: fill the space, show the whole picture, or show the whole picture in your picture shape.
- What shows on the card: switch each detail on or off, separately for members and for posts.
- Opening hours on the card: with Directory Hours, show Open or Closed under the name, beside the buttons, or as a larger box beside the buttons.
When the map shows
When the map shows sets whether the map loads only when a visitor clicks the map icon, or sits beside the results all the time. Loading only on click means a map is only drawn for visitors who ask for one.
How members show on the map can be photo pins, or a heatmap that colors each area by how many members are there and switches to photo pins when a visitor zooms in.
Pictures on the pins
Each pin shows the member's map photo if they added one, then their profile photo, then their company logo. For members with none, choose their initials, your site logo, or a picture you pick.
Pin animation makes each pin drop or pop onto the map once, the first time it shows. Pins already on the map do not move again when the visitor drags or zooms. Visitors who have turned off motion on their device see the pins without it.
Pin movement keeps the pins gently moving the whole time the map is open: Float, Bounce, Pulse, Wiggle or Glow, at a slow, normal or fast speed. Each pin starts at a different point, so they never move in step. A pin rule can give its own pins a movement, so you can set only your featured members to glow while everyone else stays still. A pin stops moving while the mouse is over it, and visitors who have turned off motion on their device see still pins.