TileStream Layer Handler
The TileStream layer handler adds support for MBTiles tile sets served from TileStream to NPMap. MBTiles tile sets can be generated by the TileMill.
Base APIs
TileStream layers are currently supported by the following Base APIs:
Supported Operations
- Click
- Display
- Hover
- Routing (with route module)
Adding a Layer To Your Map
TileStream layers can be added via the baseLayers or layers property in your NPMap.config object. Here are the properties that can be set on a TileStream layer object:
| Property | Type | Required? | Description |
id
|
{String} | X |
id: 'nps.Battle_of_Beaver_Dam_Creek'
|
type
|
{String} | X |
type: 'TileStream'
|
name
|
{String} | X | The name of the layer. This will be used in the base layer selector and/or legend if they have been added to the map. |
zIndex
|
{Integer} |
The zIndex of this layer. If not specified, this will default to 0 if this layer is specified in the "baseLayers" config or null if specified in the "layers" config.
|
Example
Here is a working example:
{
id: 'nps.Battle_of_Beaver_Dam_Creek',
name: '1862',
type: 'TileStream'
}
To see this layer config object in context within the larger NPMap.config object, take a look at the examples section.