npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mapicgc-gl-js

v0.0.79

Published

mapicgc-gl-js library

Downloads

1,568

Readme

MapICGC GL JS

🌠 Based on MapLibre GL JS version: 4.1.3

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, Config } from "mapicgc-gl-js";
    //import * as mapicgcgl from  "mapicgc-gl-js";
    
      async function initMap() {
          const data = await Config.getConfigICGC(); //load config
          const map = new Map({
            container: "map",
            style: data.Styles.LIGHT,
            center: [1.808, 41.618],
            zoom: 10,
            maxZoom: 19,
            hash: true,
            pitch: 0,
          });
      }
      initMap();
    </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>
       async function initMap() {
         const data = await  mapicgcgl.Config.getConfigICGC();
         const map = new mapicgcgl.Map({
           container: "map",
           style: data.Styles.TOPO, // <-- add style basemap here
           center: [2.1464, 41.306],
           zoom: 7.4,
           maxZoom: 19,
           hash: true,
           pitch: 0,
         });
     </script>

Result:

Dependencies

MapICGC GL JS integrates the following libraries:

  • @maplibre/maplibre-gl-compare
  • @maplibre/maplibre-gl-geocoder
  • @watergis/maplibre-gl-export

Developed by:

License

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