mapicgc-gl-js 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,12 +4,15 @@
4
4
  <p align="center">
5
5
  <img src="https://betaserver.icgc.cat/cdn/mapicgc-gl-js/images/JS-logo.svg" width="20px">
6
6
  <img src="https://betaserver.icgc.cat//cdn/mapicgc-gl-js/images/TS-logo.svg" width="20px">
7
- <img src="https://img.shields.io/npm/v/@unitatgeostart/mapicgc-gl-js"></img>
8
- <img src="https://img.shields.io/twitter/follow/icgcat?style=social"></img>
7
+ <img src="https://badge.fury.io/js/mapicgc-gl-js.svg"></img>
8
+ <a href="https://twitter.com/icgcat" target="_blank"><img src="https://img.shields.io/twitter/follow/icgcat?style=social"></img></a>
9
9
  </p>
10
10
 
11
+
11
12
  <br>
12
- Version 0.0.25
13
+
14
+ Version 0.0.26
15
+
13
16
 
14
17
  # What and why?
15
18
  The MapICGC GL JS library builds upon the MapLibre GL JS framework, 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.
@@ -34,49 +37,52 @@ In addition to the details and examples provided in this readme, check out:
34
37
 
35
38
 
36
39
 
37
- ### Com afegir la biblioteca a un projecte propi?
38
-
39
- 1. Instal·lar la biblioteca:
40
+ # First steps
40
41
 
42
+ 1. Import the library:
43
+ - NPM
41
44
  ```bash
42
45
  npm i mapicgc-gl-js
43
46
  ```
47
+ - CDN
44
48
 
45
- 2. Afegir les següents línies de codi JS i CSS a l'encapçalament del teu HTML:
49
+ ```html
50
+ <script src="https://betaserver.icgc.cat/cdn/mapicgc-gl-js/mapicgc-gl.js"></script>
51
+ <link href="https://betaserver.icgc.cat/cdn/mapicgc-gl-js/mapicgc-gl.css" rel="stylesheet" />
52
+ ```
46
53
 
47
- ```html
48
-
49
- <script src="https://www.unpkg.com/@watergis/maplibre-gl-export@3.0.1/dist/maplibre-gl-export.umd.js"></script>
54
+ 2. In the document body script, declare the map as follows:
50
55
 
51
- <link href="https://www.unpkg.com/@watergis/maplibre-gl-export@3.0.1/dist/maplibre-gl-export.css" rel="stylesheet" />
52
- ```
53
-
54
- 3. En el script del cos del document, declarar el mapa de la següent manera:
55
-
56
- ```javascript
57
- import { Map } from 'mapicgc-gl-js';
58
-
59
- const map = (window.map = new Map({
60
- style: "topografic",
61
- }));
62
- ```
56
+ ```html hl_lines="35"
57
+ <div id="map"></div>
58
+ <script>
59
+ import { Map } from 'mapicgc-gl-js';
63
60
 
64
- ### Funcionalitats
61
+ const map = Map({
62
+ container: 'map',
63
+ style: "Style.Topografic", // style from mapicgc library
64
+ center: [2.1464, 41.306], // starting position [lng, lat]
65
+ zoom: 7.4, //starting zoom
66
+ });
67
+ </script>
68
+ ```
65
69
 
66
- - Mapa per defecte: Topogràfic ICGC
67
- - Fons de mapes: Topogràfic, Orto, Híbrid, Gris, Fosc
68
70
 
69
- - Afegir capes GeoJson i WMS
71
+ <p class="codepen" data-height="500" data-theme-id="light" data-slug-hash="eYXWyqd" data-editable="true" data-user="unitatgeostart" style="height: 500px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 0px; margin: 1em 0; padding: 1em;">
72
+ <span>See the Pen <a href="https://codepen.io/unitatgeostart/pen/eYXWyqd">
73
+ example-map-001</a> by unitatgeostart (<a href="https://codepen.io/unitatgeostart">@unitatgeostart</a>)
74
+ on <a href="https://codepen.io">CodePen</a>.</span>
75
+ </p>
76
+ <script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>
70
77
 
71
- - Markers
72
78
 
73
- - Control Basemaps
79
+ # Documentation
74
80
 
75
- - Control atribució
81
+ Full documentation for this library is <a href="https://autogitlab.icgc.local/geostarters/icgc/mapicgc/mapicgc-doc" target="_blank">available here</a>.
76
82
 
77
- - Control Capes
83
+ Check out the features through <a href="https://codepen.io/collection/mrvVZd" target="_blank">examples</a>.
78
84
 
79
- - Control print
80
85
 
81
- - Popups
82
86
 
87
+ # License
88
+ **MAPICGC GL JS** is licensed under the [3-Clause BSD license](./LICENSE.md).