leaflet

package module
v0.0.0-...-32c1547 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 2 Imported by: 2

README

GoDoc Build Status

go-leaflet

Go-language bindings to leaflet.js using web assembly.

Documentation

Rendered for js/wasm

Overview

Package leaflet provides a (currently minimal) wrapper around leaflet.js for use with gopherjs. The bindings are currently for leaflet version 1.5.1.

Index

Constants

This section is empty.

Variables

L is the primary leaflet javascript object.

Functions

func Initialize

func Initialize()

Initialize this package dy loading the leaflet JS and CSS.

Types

type GridLayer

type GridLayer struct {
	Layer
}

GridLayer is a leaflet GridLayer: http://leafletjs.com/reference-1.5.0.html#gridlayer.

func NewGridLayer

func NewGridLayer() *GridLayer

NewGridLayer creates a new GridLayer.

type LatLng

type LatLng struct {
	js.Value
}

LatLng specifies a point in latitude and longitude

func NewLatLng

func NewLatLng(lat, lng float64) *LatLng

NewLatLng returns a new LatLng object.

type Layer

type Layer struct {
	js.Value
}

Layer is a leaflet layer object: http://leafletjs.com/reference-1.5.0.html#layer.

func (*Layer) AddTo

func (l *Layer) AddTo(m *Map)

AddTo add the receiver to the specified Map.

type Map

type Map struct {
	js.Value
}

Map is a leaflet map object: http://leafletjs.com/reference-1.5.1.html#map

func NewMap

func NewMap(div js.Value, options map[string]interface{}) *Map

NewMap creates a new map in the specified div with the specified options. Possible options are listed at: https://leafletjs.com/reference-1.5.0.html#map-factory.

func (*Map) CreatePane

func (m *Map) CreatePane(name string) *Pane

CreatePane creates a new Pane with the given name: http://leafletjs.com/reference-1.5.0.html#map-createpane

func (*Map) SetView

func (m *Map) SetView(center *LatLng, zoom int)

SetView sets the center and zoom level of the map.

type Pane

type Pane struct {
	js.Value
}

Pane is a leaflet pane.

func (*Pane) SetZIndex

func (p *Pane) SetZIndex(index int)

SetZIndex sets the Z index of the pane.

type Path

type Path struct {
	Layer
}

Path is a leaflet path object: http://leafletjs.com/reference-1.5.0.html#path.

func (*Path) SetStyle

func (p *Path) SetStyle(style map[string]interface{})

SetStyle sets the style of the receiver: http://leafletjs.com/reference-1.5.0.html#path-setstyle.

type Polygon

type Polygon struct {
	Polyline
}

Polygon is a leaflet polygon object: http://leafletjs.com/reference-1.5.0.html#polygon.

func NewPolygon

func NewPolygon(latlngs []*LatLng) *Polygon

NewPolygon creates a new polygon.

type Polyline

type Polyline struct {
	Path
}

Polyline is a leaflet polyline object: http://leafletjs.com/reference-1.5.0.html#polyline.

type TileLayer

type TileLayer struct {
	Layer
}

TileLayer is a leaflet TileLayer object: http://leafletjs.com/reference-1.5.0.html#tilelayer

func NewTileLayer

func NewTileLayer(urlTemplate string, options map[string]interface{}) *TileLayer

NewTileLayer creates a new TileLayer with the specified URL template and options.

Directories

Path Synopsis
plugin
glify
Package glify is a wrapper for the glify javascipt LeafletJS plugin, for use with gopherjs.
Package glify is a wrapper for the glify javascipt LeafletJS plugin, for use with gopherjs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL