This package is no longer maintained.
To build this repo run npm install followed by npm run prepare-deploy.
This will place the Webpacked JavaScript file at out/dist/wxTiles.js and the documentation for the client library at out/docs/wxTiles.md.
Travis will publish these files to https://wxtiles.github.io/js/dist/wxTiles.js and https://wxtiles.github.io/js/docs/wxTiles.md
The documentation file is used by docs.wxtiles.com and is pretty formated at http://docs.wxtiles.com/wxtilesjs-docs/
WxTiles - JavaScript client for wx_tiles Make and explore beautiful, rapidly-refreshed weather maps with the WXTiles API This SDK is automatically generated by the Swagger Codegen project:
- API version: 3.0.0
- Package version: 3.0.0
- Build date: 2016-11-30T16:18:25.498+13:00
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
For Node.js
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install wx_tiles --saveIf the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --saveThe library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.jsThen include bundle.js in the HTML pages.
Please follow the installation instruction and execute the following JS code:
var WxTiles = require('wx_tiles');
var defaultClient = WxTiles.ApiClient.instance;
// Configure API key authorization: apiKeyQuery
var apiKeyQuery = defaultClient.authentications['apiKeyQuery'];
apiKeyQuery.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKeyQuery.apiKeyPrefix['apikey'] = "Token"
// Configure API key authorization: apiKeyHeader
var apiKeyHeader = defaultClient.authentications['apiKeyHeader'];
apiKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKeyHeader.apiKeyPrefix['apikey'] = "Token"
var api = new WxTiles.InstancesApi()
var ownerId = "ownerId_example"; // {String} The owner of the dataset.
var layerId = "layerId_example"; // {String} The id of the layer.
var instanceId = "instanceId_example"; // {String} The id of the instance.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getInstance(ownerId, layerId, instanceId, , callback);All URIs are relative to http://172.16.1.50/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| WxTiles.InstancesApi | getInstance | GET /{ownerId}/layer/{layerId}/instance/{instanceId}/ | Information about a particular (potentially non-persistant) instance of a layer |
| WxTiles.InstancesApi | getLevels | GET /{ownerId}/layer/{layerId}/instance/{instanceId}/levels/ | A collection of vertical levels for which data exists and can be requested (as tiles) for an instance of a layer. |
| WxTiles.InstancesApi | getTimes | GET /{ownerId}/layer/{layerId}/instance/{instanceId}/times/ | A collection of moments in time for which data exists and can be requested (as tiles) for an instance of a layer. |
| WxTiles.LayersApi | getLayer | GET /{ownerId}/layer/{layerId}/ | Information about a specific layer |
| WxTiles.LayersApi | getLayers | GET /{ownerId}/layer/ | Information about available WXTiles layers |
| WxTiles.LegendsApi | getPNGLegend | GET /{ownerId}/legend/{layerId}/{styleId}/{size}/{orientation}.png | A legend for PNG map tiles |
| WxTiles.LegendsApi | ownerIDLegendLayerIdStyleIdJsonGet | GET /{ownerID}/legend/{layerId}/{StyleId}.json | JSON represention of a style as implemented by a particular layer. Can be used for rendering custom a legend. |
| WxTiles.LevelsApi | getLevels | GET /{ownerId}/layer/{layerId}/instance/{instanceId}/levels/ | A collection of vertical levels for which data exists and can be requested (as tiles) for an instance of a layer. |
| WxTiles.StylesApi | getPNGLegend | GET /{ownerId}/legend/{layerId}/{styleId}/{size}/{orientation}.png | A legend for PNG map tiles |
| WxTiles.StylesApi | ownerIDLegendLayerIdStyleIdJsonGet | GET /{ownerID}/legend/{layerId}/{StyleId}.json | JSON represention of a style as implemented by a particular layer. Can be used for rendering custom a legend. |
| WxTiles.TilesApi | getInstance | GET /{ownerId}/layer/{layerId}/instance/{instanceId}/ | Information about a particular (potentially non-persistant) instance of a layer |
| WxTiles.TilesApi | getLayer | GET /{ownerId}/layer/{layerId}/ | Information about a specific layer |
| WxTiles.TilesApi | getLayers | GET /{ownerId}/layer/ | Information about available WXTiles layers |
| WxTiles.TilesApi | getLevels | GET /{ownerId}/layer/{layerId}/instance/{instanceId}/levels/ | A collection of vertical levels for which data exists and can be requested (as tiles) for an instance of a layer. |
| WxTiles.TilesApi | getTile | GET /{ownerId}/tile/{layerId}/{styleId}/{instanceId}/{time}/{level}/{z}/{x}/{y}.{extension} | A tiled map image, for use by map clients capable of consuming PNG map images in OGC TMS coordinate notation. |
| WxTiles.TilesApi | getTimes | GET /{ownerId}/layer/{layerId}/instance/{instanceId}/times/ | A collection of moments in time for which data exists and can be requested (as tiles) for an instance of a layer. |
| WxTiles.TimesApi | getTimes | GET /{ownerId}/layer/{layerId}/instance/{instanceId}/times/ | A collection of moments in time for which data exists and can be requested (as tiles) for an instance of a layer. |
- WxTiles.Bounds
- WxTiles.Dimension
- WxTiles.Error
- WxTiles.Instance
- WxTiles.Layer
- WxTiles.LayerDefaults
- WxTiles.Layers
- WxTiles.LegendResources
- WxTiles.Level
- WxTiles.Levels
- WxTiles.MaxNativeZoom
- WxTiles.MinNativeZoom
- WxTiles.PartialInstance
- WxTiles.Region
- WxTiles.Resources
- WxTiles.Style
- WxTiles.Tag
- WxTiles.Time
- WxTiles.Times
- Type: API key
- API key parameter name: apikey
- Location: URL query string
- Type: API key
- API key parameter name: apikey
- Location: HTTP header