You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets you record a precise location using latitude/longitude fields to a DataObject.
4
+
Lets you record a precise location using latitude/longitude/zoom fields to a DataObject.
5
5
6
6
Displays a map using the Google Maps API. The user may then choose where to place the marker; the landing coordinates are then saved.
7
7
8
8
You can also search for locations using the search box, which uses the Google Maps Geocoding API.
9
9
10
-
Use the 2.4 branch for SilverStripe 2.4.
11
-
12
-
13
10
### Usage
14
11
15
12
##### `__construct` options
16
13
17
14
|Option|Default|Description|
18
15
|------|-------|-----------|
19
-
|`fieldNames`|See `GoogleMapField::$defaults`|A map of what your object's latitude/longitude fields are. Defaults to `Lat` for `lat` and `Lng` for `lng`.|
16
+
|`field_names`|See `GoogleMapField.yml`'s `default_options.field_names`|A map of field names to save the map data into your object.|
20
17
21
18
##### `Field` options
22
19
23
20
|Option|Default|Description|
24
21
|------|-------|-----------|
25
22
|`coords`|Your object's latitude and longitude|The intial coordinates of the map - note: this is not the default value if no object exists|
26
-
|`map`|Zoom of 8, map type of ROADMAP|A [google.maps.MapOptions](https://developers.google.com/maps/documentation/javascript/reference?csw=1#MapOptions) object|
23
+
|`map`|Zoom of 14, map type of ROADMAP|A [google.maps.MapOptions](https://developers.google.com/maps/documentation/javascript/reference?csw=1#MapOptions) object|
0 commit comments