mapicgc-gl-js

0.0.62 • Public • Published

MapICGC Logo


MapICGC GL JS

🌠 MAPLIBRE GL JS version: 4.1.2

The MapICGC GL JS library builds upon the open-source library MapLibre GL JS, exposing its existing capabilities while introducing new features specific to the MapICGC ecosystem. This library is tailored to seamlessly integrate with the MapICGC Cloud service, offering a comprehensive set of data to enhance web mapping experiences, including vector tiles, satellite raster tiles, DEM with Terrain RGB, and customizable styles with an editor.

Our goal is to simplify the development process for MapICGC developers! With MapICGC GL JS, you won't need to load external plugins for basic functionalities, deal with complex data source URLs, or search for syntax to enable 3D terrain every time you embark on a project. All these features are either built-in, loaded dynamically when necessary, or accessible through straightforward functions.

Moreover, MapICGC GL JS provides well-documented and user-friendly wrapper functions for MapICGC Cloud API services, including geocoding, static maps, geolocation, and a coordinate reference system search engine for transforming coordinates between different CRSs.


Documentation

Full documentation for this library is available here.

Check out the features through examples.


Getting Started

NPM

  1. Install the library:
    npm i mapicgc-gl-js
    
  2. Import the library:
    <script>
      import { Map,Styles } from 'mapicgc-gl-js'; 
    
      const map = Map({
        container: 'map',
        style:  Styles.LIGHT, 
        center: [2.1464, 41.306], 
        zoom: 7.4, 
      });
    </script>

CDN

  1. Include the JavaScript and CSS files in the <head> of your HTML file.:

    <script src="https://tilemaps.icgc.cat/cdn/mapicgc-gl-js/mapicgc-gl.js"></script>
    <link href="https://tilemaps.icgc.cat/cdn/mapicgc-gl-js/mapicgc-gl.css" rel="stylesheet" />
  2. Include the following code in the <body> of your HTML file.:

     <div id="map"></div>
     <script>
       const map = mapicgcgl.Map({
         container: 'map',
         style:  mapicgcgl.Styles.LIGHT, 
         center: [2.1464, 41.306], 
         zoom: 7.4, 
       });
     </script>

Result:


Dependencies

MapICGC GL JS integrates the following libraries:


Developed by:

ICGC Logo

License

MAPICGC GL JS is licensed under the 3-Clause BSD license.

Package Sidebar

Install

npm i mapicgc-gl-js

Weekly Downloads

392

Version

0.0.62

License

BSD-3-Clause

Unpacked Size

5.44 MB

Total Files

47

Last publish

Collaborators

  • unitatgeostart