terrabrasilis-api

API to build map and enable tools to use in Terrabrasilis webmap application

Usage no npm install needed!

<script type="module">
  import terrabrasilisApi from 'https://cdn.skypack.dev/terrabrasilis-api';
</script>

README

Instalations

Access NPM: https://www.npmjs.com/package/terrabrasilis-api


npm install --save terrabrasilis-api

Using the module

let overlayers = [{
     "title":"",
     "name":"",
     "host":"",
     "legend_color":"",
     "workspace":"",
     "active":true,
     "subdomains":null,
     "baselayer":false,
     "attribution":"",
     "opacity": 0.9
}]

In Node.js

var Terrabrasilis = require('terrabrasilis-api');

// just standard config
Terrabrasilis
    .map() 
    .addBaseLayers()
    .addOverLayers()
    .enableDrawFeatureTool()
    .enableLayersControlTool()
    .enableScaleControlTool()
    .enableGeocodingTool();
    
// mount a simple map 
Terrabrasilis
     .map(lat, lon, zoom, 'div to mount the map') 
     .addBaseLayers()
     .addOverLayers(overlayers)
     .hideStandardLayerControl(); // disable LayerControl

// mount GeoJson layers (example)
geojsonLayers = [{
           "type":"point",     
           "name":"cities",
           "active": true,
           "features":["all features points"]
     }];
Terrabrasilis
    .map()
    .addGeoJsonLayers(geojsonLayers);

Release History

Travis CI: Build Status

  • 0.0.1 Initial release
  • 0.0.2 release
  • ...
  • 0.0.26 release
  • 0.0.27 release
  • 0.0.28 release
  • 0.0.29 release
  • 0.1.0 release [latest]