restruct/silverstripe-latlongfield

There is no license information available for the latest version (1.0.5) of this package.

Stand-alone latlong field, abstracted from mappable or a comparable module

Installs: 516

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 2

Open Issues: 0

Language:JavaScript

Type:silverstripe-vendormodule

1.0.5 2022-01-06 11:12 UTC

This package is auto-updated.

Last update: 2024-11-06 17:13:25 UTC


README

Screenshot 2021-02-27 at 16 22 59

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" />