Documentation
¶
Overview ¶
Package googlemaps shows Google Maps inside your screen.
nimbus native plugin add google-maps -key YOUR_API_KEY
googlemaps.Map{
Center: googlemaps.LatLng{Latitude: 18.53, Longitude: 73.89}, Zoom: 14,
Markers: []googlemaps.Marker{{ID: "cafe", At: cafe, Title: "Monsoon Coffee"}},
OnMarker: open,
Style: ui.Style{Grow: 1},
}
The key goes in the app, where anyone can read it: in Google Cloud, limit it to your app and to the Maps SDKs. There are no maps on the web yet.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LatLng ¶
type LatLng struct {
Latitude float64 `json:"lat"` // in degrees
Longitude float64 `json:"lng"` // in degrees
}
LatLng is a place.
type Map ¶
type Map struct {
Center LatLng // where it looks
Zoom float32 // 0 means 12
Markers []Marker // the pins
Lines []Polyline // routes and other lines
MyLocation bool // the blue dot; needs the location permission
OnTap func(LatLng) // the map itself
OnMarker func(id string) // a pin
OnMove func(LatLng, float32) // after a pan or zoom ends, with the zoom
Style ui.Style // the map's size and place on the screen
}
Map is a map. Changing Center or Zoom moves it there; panning by hand doesn't change them, and OnMove says where it stopped.
Click to show internal directories.
Click to hide internal directories.