Documentation
¶
Overview ¶
Package places is a native module of views: a map of the platform shown in native UI, and the system's share menu, anchored to what the window shows. Its implementation is the Swift package in swift/, with MapKit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map interface {
native.View
// Show centers the map on a place, span degrees across.
Show(p Place, span float64)
// Center returns the place at the center of the map.
Center() Place
// Pin puts a pin at p, titled with text and its language, which a of
// the native module language tells: the platform calls that module's
// object itself.
Pin(p Place, a language.Analyzer, text string)
// OnMove calls f with the center of the map once the user moved it,
// until the subscription is closed.
OnMove(f func(center Place)) io.Closer
}
Map shows a map, which ui.NativeView places in a window of native UI.
type Sharing ¶
type Sharing interface {
Share(win *mygo.Window, rect ui.Rect, text string)
ShareFrom(view native.View, text string)
}
Sharing shows the system's share menu.
func NewSharing ¶
NewSharing makes the implementation of Sharing on this platform. It returns errors.ErrUnsupported where the module has none, or the system lacks what it needs.