This package has been deprecated

Author message:

This package is no longer mentained. Use @tilecloud/embed.

@tilecloud/js

0.2.5 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @tilecloud/js

Weekly Downloads

1

Version

0.2.5

License

MIT

Unpacked Size

819 kB

Total Files

31

Last publish

Collaborators

  • kamataryo
  • miya0001