wms

package
v0.0.8-a Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package diglet/wms is an HTTP Tile Server that also support JSON-RPC & WebSocket requests. Tile subscriptions are also available to support real-time map applications with large feature sets.

Index

Constants

View Source
const (
	GetTile         string = "get_tile"
	GetRawTile      string = "get_raw_tile"
	GetTileset      string = "get_tileset"
	ListTilesets    string = "list_tilesets"
	SubscribeTile   string = "subscribe_tile"
	UnsubscribeTile string = "unsubscribe_tile"
)
View Source
const CacheName = ".diglet.cache"

Variables

This section is empty.

Functions

func MBTServer

func MBTServer(mbtPath string, port string) *dig.App

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func InitCache

func InitCache(path string) (cache *Cache, err error)

func (*Cache) Close

func (c *Cache) Close()

func (*Cache) Destroy

func (c *Cache) Destroy()

func (*Cache) DropBucket

func (c *Cache) DropBucket(bucket string) (ok bool)

func (*Cache) Get

func (c *Cache) Get(bucket, key string) (value []byte, ok bool)

func (*Cache) Map

func (c *Cache) Map(bucket string, fn func(value []byte) ([]byte, error)) (err error)

func (*Cache) Put

func (c *Cache) Put(bucket, key string, value []byte) (err error)

type IoHub

type IoHub struct {
	// contains filtered or unexported fields
}

func NewHub

func NewHub(tilesets *TilesetIndex) (h *IoHub)

type TileCache

type TileCache struct {
	*Cache
}

func InitTileCache

func InitTileCache(path string) (cache *TileCache, err error)

func (*TileCache) GetTile

func (c *TileCache) GetTile(tileset, key string) (tile *mbtiles.Tile, ok bool)

func (*TileCache) MapTiles

func (c *TileCache) MapTiles(tileset string, fn func(value *mbtiles.Tile) (*mbtiles.Tile, error)) (err error)

func (*TileCache) PutTile

func (c *TileCache) PutTile(tileset, key string, tile *mbtiles.Tile) (err error)

type TileXYZ

type TileXYZ struct {
	Tileset string `json:"tileset"`
	X       int    `json:"x"`
	Y       int    `json:"y"`
	Z       int    `json:"z"`
}

func (TileXYZ) String

func (xyz TileXYZ) String() string

type TilesetIndex

type TilesetIndex struct {
	Path     string
	Tilesets map[string]*mbtiles.Tileset
	Events   chan TsEvent
	// contains filtered or unexported fields
}

TilesetIndex is a container for tilesets loaded from disk

func NewTilesetIndex

func NewTilesetIndex(mbtilesDir string) (tsi *TilesetIndex)

NewTilesetIndex creates a new tileset index, but does not read the tile tilesets from disk

func ReadTilesets

func ReadTilesets(mbtilesDir string) (tsi *TilesetIndex)

ReadTilesets create a new tilesetindex and read the tilesets contents from disk It spawns goroutine that will refresh Tilesets from disk on changes

type TilesetTopic

type TilesetTopic struct {
	// contains filtered or unexported fields
}

hub maintains the set of active connections and broadcasts messages to the connections.

type TsEvent

type TsEvent struct {
	Name string
	Op   TsOp
}

func (*TsEvent) String

func (tse *TsEvent) String() string

type TsOp

type TsOp uint32
const (
	Upsert TsOp = 1 << iota
	Remove
)

Jump to

Keyboard shortcuts

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