0.2.5 • Published 6 years ago

@tilecloud/js v0.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

@tilecloud/js

Build Status npm version

JS API for Tilecloud service.

features

  • webGL vector map rendering
  • simple configuration
  • map lazy rendering

usage

zero config

Specify .tilecloud class for target elements. If you want to call the JS-API from external origin, please specify ?tilecloud=true query.

<!DOCTYPE html>
<html>
  <body>
    <div
      class="tilecloud"
      data-style="osm-bright" // 'osm-bright' is default
      data-lat="35.681"
      data-lng="139.767"
      data-zoom="12"
      data-hash="false"
    ></div>
    <script src="path/to/tilecloud.js?tilecloud=true&key=api-key"></script>
  </body>
</html>

Use as a module

$ yarn add @tilecloud/js # or npm install @tilecloud/js
import { preRender } from '@tilecloud/js'

const element = getElementById('map')
const style = 'https://tilecloud.io/path/to/style.json' // URL or Style object

preRender(element, style)

development

$ git clone git@github.com:tilecloud/tilecloud.js.git
$ cd tilecloud.js
$ yarn # or npm install

Run demo locally

$ npm start

build library

$ npm run build
# see ./lib

build tilecloud scripts to distribute from tilecloud endpoint

$ npm run build:tilecloud
# see ./dist

deploy demo site to GitHub pages

$ npm run deploy

publish package

$ npm version patch
$ git push origin v0.1.2 # specify new version to publish
0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago