restruct / silverstripe-latlongfield
Stand-alone latlong field, abstracted from mappable or a comparable module
Installs: 541
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 0
Language:JavaScript
Type:silverstripe-vendormodule
Requires
- ext-json: *
README
CMS editor can type street address, then click search. A (draggable) pointer will be shown on a map and the field's content will be replaced with the LatLong code. Originally abstracted from the mappable module (I think).Requirements
SilverStripe 4.0 or higher SS3-4 upgrade: moved LatLongField::google_maps_api_key to environment var (see Config below)
Config
.env:
GMAPS_API_KEY="..."
GMAPS_BROWSER_KEY="..." (optional secondary 'public' key to use in the browser)
Provides global $GMapsApiKey
template variable
<img src="//maps.googleapis.com/maps/api/staticmap?center=Leiden+NL&size=600x600&key=$GMapsApiKey" />