Products / Location Finder / Docs

Evergreen Location Finder

A searchable list of your locations with a map, for any website. Visitors search by city or ZIP, press Near me to see the closest locations first, and tap Directions.

Keep your locations in a Google Sheet (or paste them into the page). Add a row and the finder updates, map pin included.

What's in the download

File or folderWhat it's for
INSTALL.mdStep-by-step setup for Squarespace (every plan), WordPress, Wix, Webflow, Shopify, Ghost, Carrd and plain HTML
templates/locations-template.csvSpreadsheet template. Open it in Google Sheets or Excel.
apps-script/Geocode.gsThe GEOCODE formula for Google Sheets: turns addresses into map coordinates
embed/Ready-to-paste snippets. Start here.
evergreen-locations.zipThe WordPress plugin. Upload it under Plugins → Add New → Upload Plugin.
dist/location-finder.min.jsThe compact script. Use it if you upload the file to your site.
dist/location-finder.jsThe readable script, for anyone who wants to look inside
vendor/leaflet/The map library (Leaflet), if you'd rather host it yourself
demo/index.htmlDouble-click to try it (the map needs an internet connection)
LICENSE.txtWhat your license allows

The whole idea in two lines

<div data-location-finder data-src="YOUR-PUBLISHED-GOOGLE-SHEET-CSV-LINK"></div>
<script src="location-finder.min.js" defer></script>

Every option is another data- attribute on that div. See Options in INSTALL.md.

For developers

EvergreenLocations.init();                    // start any new finders on the page
finderDiv.__elf.select("downtown-pantry", "list"); // highlight a location and show it on the map
window.EvergreenLocationsConfig = {           // set before the script loads
  leafletJs: "/assets/leaflet.js",            // host Leaflet yourself instead of the CDN
  leafletCss: "/assets/leaflet.css",
  tiles: "https://tiles.example.com/{z}/{x}/{y}.png",
  attribution: "© Example Maps"
};

Questions or installation help: use the contact page at evergreencode.store.

Installation

Every install has the same three parts:

  1. Your locations: a Google Sheet (recommended) or rows pasted into the snippet.
  2. Map coordinates: a latitude and longitude for each location, so it gets a pin. The GEOCODE formula fills these in for you.
  3. The snippet: one of the files in embed/, pasted where the finder should appear.

Step 1: List your locations

Open templates/locations-template.csv in Google Sheets (File → Import → Upload) or Excel. One row per location:

ColumnWhat goes in it
Name (required)The location's name, like Downtown Pantry
Address, City, State, ZipThe street address. Shown in the list and used for directions.
Phone, Website, EmailOptional. Shown as Call, Website and Email links.
HoursOptional. Press Ctrl+Enter (Mac: ⌘+Enter) inside the cell for a new line.
CategoryOptional type, like Food pantry or Clinic. Several? Separate them with commas. Types become filter buttons.
DescriptionOptional short note
Latitude, LongitudeWhere the pin goes. See step 2.

Column names aren't picky: "Location", "Postal code", "Tel", "URL" and "Type" also work. You can also use one Coordinates column with values like 35.4676, -97.5164 (the format Google Maps copies).

A location without coordinates still appears in the list, just not on the map.

Step 2: Add map coordinates

The easy way: the GEOCODE formula (Google Sheets)

  1. In your sheet, click Extensions → Apps Script.
  2. Delete what's there, paste the whole contents of apps-script/Geocode.gs, and click Save (the disk icon). Close the tab.
  3. In the first Latitude cell (L2 in the template), type: `` =GEOCODE(B2&", "&C2&", "&D2&" "&E2) `` It fills in Latitude and Longitude. The first time, Google asks you to allow the script: click Allow (it only reads the addresses you give it).
  4. Copy the formula down for every row.

It uses Google's own address lookup through your Google account, which has a generous free daily limit. Once your list is final, you can freeze the results: select the two columns, copy, then Edit → Paste special → Values only.

If a cell says Address not found, check the address or type the coordinates yourself.

By hand

In Google Maps, right-click the spot and click the numbers at the top of the menu to copy them (like 35.4676, -97.5164). Paste the first number into Latitude and the second into Longitude, or paste both into a Coordinates column.

Step 3: Publish your sheet

  1. Click File → Share → Publish to web.
  2. Under Link, choose your sheet tab, change "Web page" to Comma-separated values (.csv), and click Publish.
  3. Copy the link it shows. It contains /pub? and ends in output=csv.

Use this link, not the address in your browser bar. A link ending in /edit won't work, and the finder tells you so if you paste one by mistake. Changes in the sheet appear on your site within about 5 minutes.

Or paste the rows

Use embed/2-pasted-data-embed.html and replace the example rows between the two script tags with your own (the first row is the column names). If a cell contains a comma or a line break, wrap it in "double quotes". The template shows how.

Step 4: Choose a snippet

File in embed/Use it when
1-google-sheet-embed.htmlOne paste that does everything: your sheet link plus the script. Easiest.
2-pasted-data-embed.htmlYou'd rather type your locations into the snippet than use a sheet.
3-site-wide-script.htmlYour builder has a site-wide footer code box. Paste it there once.
4-finder-only.htmlThe script is already loaded (by file 3 or the hosted file) and you're adding a finder.
5-hosted-file-embed.htmlYou can upload files to your site and want the shortest code.

Most builders only run custom code on the published page. If you see a blank box or code while editing, check the live page or preview.

Squarespace

Works on Squarespace 7.1 and 7.0, in any template, on every plan.

Core, Plus or Advanced plans (legacy Business and Commerce)

Add a Code Block where the finder should go and paste embed/1-google-sheet-embed.html (with your sheet link) or embed/2-pasted-data-embed.html (with your rows).

Basic plan (legacy Personal): no upgrade needed

Basic and Personal plans don't run Code Blocks or Code Injection, but Markdown Blocks accept HTML on every plan.

This is a widely used workaround, but Squarespace doesn't officially support it and could change how Markdown Blocks behave in the future.

  1. Upload the script file. Edit any text block, highlight a word, click the link icon, then File → Upload file, and upload dist/location-finder.min.js. Remove the temporary link afterward. The file is now at /s/location-finder.min.js.
  2. Load it from your footer. Click Edit, hover over the footer, click Edit Footer, add a Markdown block and paste: ``html <script src="/s/location-finder.min.js" defer></script> `` If your site has no footer, put this line in a Markdown block on the locations page instead.
  3. Add the finder. Add a Markdown block where the finder should go and paste the line from embed/4-finder-only.html with your Google Sheet link. Keep it on one line.

Use the Google Sheet method with Markdown blocks. Don't paste rows or the whole script into a Markdown block, because Markdown can change symbols in them.

WordPress

  1. Go to Plugins → Add New → Upload Plugin, choose evergreen-locations.zip, click Install Now, then Activate.
  2. Add a Shortcode block and use either a sheet link: `` [evergreen_locations src="YOUR-PUBLISHED-CSV-LINK"] ` or paste rows between the tags, column names first: ` [evergreen_locations] Name,Address,City,State,Zip,Phone,Latitude,Longitude Main Office,123 Main St,Springfield,IL,62701,(217) 555-0100,39.799,-89.644 [/evergreen_locations]

Shortcode options: search, filters, near_me, map, map_position, units, radii, zoom, height, accent, pin, start, show_category, tiles, attribution, class (same as the options below, with _ instead of -).

[evergreen_locations src="…" units="km" height="600" accent="#7b2cbf"]

The plugin includes the map library, so nothing loads from a code CDN. The script only loads on pages that have a finder. If a caching or speed plugin breaks it, exclude location-finder.min.js and leaflet.js from its "delay JavaScript" or "combine JS" settings.

Wix

Add Embed Code → Embed HTML, paste embed/1-google-sheet-embed.html or embed/2-pasted-data-embed.html, and drag the element tall enough (about 700 pixels). Wix shows embeds in a frame, and Near me may not work inside it on every browser.

Webflow

Paste embed/3-site-wide-script.html into Site settings → Custom code → Footer code once, then add an Embed element with embed/4-finder-only.html. Custom code needs a paid site plan.

Shopify

Online Store 2.0 themes: add a Custom Liquid section and paste embed/1-google-sheet-embed.html or embed/2-pasted-data-embed.html.

Ghost

Add an HTML card and paste embed/1-google-sheet-embed.html or embed/2-pasted-data-embed.html.

Carrd

Add an Embed element, set its type to Code, and paste embed/1-google-sheet-embed.html. Embeds need a Carrd Pro plan.

Any website (HTML)

Upload dist/location-finder.min.js and use embed/5-hosted-file-embed.html.

Options

Add any of these to the <div data-location-finder …> tag:

AttributeWhat it doesExample
data-srcYour published Google Sheet (CSV) or CSV file linkdata-src="https://docs.google.com/…output=csv"
data-searchfalse to hide the search boxdata-search="false"
data-near-mefalse to hide the Near me buttondata-near-me="false"
data-filtersnone to hide the type buttonsdata-filters="none"
data-startThe type shown first (default All)data-start="Clinic"
data-mapfalse for a list with no map (and no outside requests)data-map="false"
data-map-positionleft to put the map left of the list on wide screensdata-map-position="left"
data-heightHeight of the map and list side by side (default 560)data-height="640"
data-unitskm for kilometres (default miles)data-units="km"
data-radiiDistances in the Within menu after Near medata-radii="5,10,25"
data-zoomHow close the map zooms to one location (default 14)data-zoom="12"
data-show-categorytrue to show each location's type in the listdata-show-category="true"
data-accentColor for buttons, links and pinsdata-accent="#1d5c45"
data-pinA different color for map pinsdata-pin="#c2410c"
data-text-searchSearch box placeholderdata-text-search="Search by town"
data-text-near-meRename the Near me buttondata-text-near-me="Closest to me"
data-text-allRename the All buttondata-text-all="Everything"
data-text-directionsRename the Directions linkdata-text-directions="Get directions"

How "Near me" works

When a visitor presses Near me, their browser asks whether to share their location. If they allow it, the list is sorted nearest first with distances, the map shows their position, and a Within menu appears for narrowing by distance. Their location stays in their browser: it isn't sent anywhere. It needs a secure (https) page, which Squarespace, WordPress hosts and the other builders all provide.

Searching by city, ZIP or name works without sharing a location.

About the map

Maps are drawn with Leaflet, a free open-source map library, using OpenStreetMap's free map images. The map shows the required "© OpenStreetMap contributors" credit in its corner. Keep it there.

OpenStreetMap's free map images are meant for ordinary websites. A site with very heavy traffic should switch to a map image provider; many have free plans. Set it with data-tiles and data-attribution:

<div data-location-finder data-src="…"
     data-tiles="https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}.png?api_key=YOUR-KEY"
     data-attribution="&copy; Stadia Maps &copy; OpenMapTiles &copy; OpenStreetMap contributors"></div>

The map library loads from unpkg.com, a public code CDN, with an integrity check. To host it yourself, upload the files in vendor/leaflet/ and see README.md.

Directions links open Google Maps with the location filled in, which opens the Maps app on phones.

Styling

Add to your site's custom CSS (Squarespace: Design → Custom CSS, available on every plan; WordPress: Appearance → Customize → Additional CSS):

[data-location-finder] {
  --elf-accent: #1d5c45;        /* buttons, links, selected card */
  --elf-on-accent: #ffffff;     /* text on buttons */
  --elf-pin: #1d5c45;           /* map pins */
  --elf-radius: 12px;           /* card and map corners */
  --elf-height: 560px;          /* map and list height side by side */
}

The finder uses your site's font and text color automatically. Side by side needs about 760 pixels of width; narrower spaces and phones show the map above the list.

Troubleshooting

"The locations couldn't load." On your live site this message stays general. Open the page in the Squarespace editor or WordPress preview, or your browser's console, to see the exact reason. Most often it's a Google Sheet link that isn't the Publish to web → CSV link.

A location says "Not on the map." Its Latitude or Longitude is empty or not a number. Check the GEOCODE cell for that row.

The map is blank or says it couldn't load. A content blocker or a strict site security setting may be blocking unpkg.com or the map images. The list still works. Host Leaflet yourself (see above) or allow those addresses.

Near me does nothing. The visitor declined to share their location, or the page isn't on https. A message appears under the search box.

Changes in my sheet don't show up. Google refreshes published sheets every few minutes. Wait, then reload.

Still stuck? Use the contact page at evergreencode.store. Installation help is included for 6 months.

Changelog

1.0.0 (2026-11-08)

First release.

  • A list of locations with a map, from a Google Sheet, a CSV file or rows pasted into the page.
  • Search by name, city, state or ZIP; type buttons built from your categories.
  • Near me: sorts by distance from the visitor, shows their position, and adds a "Within" distance filter (miles or kilometres).
  • Map pins in your accent color; clicking a name shows it on the map, clicking a pin highlights it in the list.
  • Call, Website, Email and Directions (Google Maps) links; hours and notes with line breaks.
  • Side by side on wide screens, map above the list on phones; list-only mode with data-map="false".
  • GEOCODE formula for Google Sheets (Apps Script) that turns addresses into coordinates.
  • Maps by Leaflet and OpenStreetMap, with options for your own map images or self-hosted Leaflet.
  • WordPress plugin: [evergreen_locations] with a sheet link or pasted rows; Leaflet bundled.
  • Install guides for Squarespace (every plan, including Basic/Personal via Markdown Blocks), WordPress, Wix, Webflow, Shopify, Ghost, Carrd and plain HTML.
  • Keyboard and screen-reader support; respects reduced motion; shielded from site-wide styles.