Skip to content

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

License

Notifications You must be signed in to change notification settings

restruct/silverstripe-latlongfield

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Silverstripe Latlong Field

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 66.3%
  • PHP 29.7%
  • Scheme 3.1%
  • CSS 0.9%