Skip to content

LionsMouthDigital/Statamic-Naxi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Naxi

Do map stuff!

Setup

Get a Mapbox access token and add it to your settings at /cp/addons/naxi/settings.

Usage

Use tags to access all available info.

{{ naxi:geocode address="400 N Ervay, Dallas, TX" }}
  [{{ features:0:geometry:coordinates:0 }}, {{ features:0:geometry:coordinates:1 }}]
{{ /naxi:geocode }}

…or use the modifier to get the coordinates for the best match (great for Vue components and other stuff).

{{ address | naxi }}

Both of these result in [-96.79825, 32.783822], a JavaScript array with longitude and latitude (the standard order in web-based libraries for some reason).