npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

vec2-tile-layer

2.1.0

@dominictarr

npmHomeRepoSnykSocket
Downloads:15
$ npm install vec2-tile-layer
DailyWeeklyMonthlyYearly

vec2-tile-layer

A single layer of map tiles.

testling badge

used within vec2-map

Create a tile map at a given scale layer, with tiles as <img> tags. Currently defaults to using google maps tiles.

var Layer = require('../')
var Vec2 = require('vec2')

var l = new Layer({scale:2, width: 1000, height: 1000})
        .update(new Vec2(0, 0), new Vec2(1000, 1000), new Vec2(1, 1))

document.body.appendChild(l.div)

map coordinates are between 0 - 1000 in both X and Y, where 0,0 is in the top-left/north-west.

License

MIT