A suite of frontend JavaScript libraries designed to accelerate the development of web-GIS applications using NextGIS software and services as a backend. NextGIS Frontend supports three major open-source GIS frameworks with unified interfaces.
- Live Examples & Documentation
- API Documentation
- GitHub Repository
- Vue2 GitHub Repository
- Related Article
- Tutorial Repository
- NextGIS Official Website
- NextGIS Web
- Cloud Pricing Plans
- On-Premise Pricing
- Telegram Chat
- Add layer from NextGIS Web
- Add webmap from NextGIS Web
- Zoom to NextGIS Web layer feature, partial data load
- Highlight features from NextGIS Web webmap
- Expression paint
- Layer properties filters
- BBOX strategy for vector layer
- Custom layers control
- Events
- Data management in the vector layer
- GeoJSON data
- Toggle button control
- Vector selection
- Vector popup
- Web map feature identification
- Web map bookmarks
Single-file bundles for rapid deployment of web-gis applications with NextGIS services
- ngw-leaflet – for Leaflet;
- ngw-ol – for OpenLayers;
- ngw-maplibre-gl – for Maplibre GL JS;
Bricks for build custom Web GIS frontend
- webmap – universal map constructor;
- leaflet-map-adapter – webmap adapter to use Leaflet GIS framework;
- maplibre-gl-map-adapter – webmap adapter to use Maplibre GL JS framework;
- ol-map-adapter – webmap adapter to use OpenLayers GIS framework;
- qms-kit – build webmap with NextGIS QMS baselayer;
- icons – simple svg icons pack to display on the map;
- dialog – utility to work with modal windows;
- control-container – placing control elements in the corners of the map container;
- paint – working with the style of vector layers;
- properties-filter – filtering objects by its properties using JSON-serializable expressions;
- url-runtime-params – writing and reading URL parameters;
- item – hierarchical layers control;
- geocoder - modern geocoder on async generators. May use different data providers.
Map-free libraries to interaction with NextGIS Web
- ngw-connector – module to interact with NextGIS Web REST API;
- ngw-kit – build webmap with NextGIS Web instance. Lots of useful utilities for interacting with the NextGIS Web API;
- ngw-orm – NextGIS Web Object-Relational Mapping;
- ngw-uploader – library providing tools for uploading data to nextgis.com cloud;
- ngw-map – abstract map to simplify work with NextGIS services;
Map-free tools for common purpose
- utils – common development tools;
- cache - caching for asynchronous functions;
- cancelable-promise – a promise you can stop;
- dom – collection of libraries for working with the DOM;
Explore how NextGIS frontend libraries are utilized in actual projects:
- nglink (LIVE) – Server side - express.js with ngw-uploader; client - webpack, typescript, ngw-map.
- russia-history – Russia history live web map (LIVE). Maplibre GL JS, NextGIS Web MTV api, layer load event listener. Webpacj and typescript.
- clear_horizon_frontend – Clear horizon frontend. NextGIS Web auth system, leaflet typescript based webpack project.
- webpack-template – Webpack based JavaScript template project.
- walrus-ais – NgwMaplibreGL map with React.
- wwf-oilspill – Emergency situations with oil spills (LIVE), minimal dependency typescript project with Leaflet.
- oralhistory (LIVE) – Typescript, Vuetify, Maplibre GL JS and properties filter usage example.
- petro2020 (LIVE). Native JavaScript for leaflet and Maplibre-gl-gs in one project.
- nextgisweb_viewer – Service for viewing map resources from NextGIS Web (LIVE). Vuetify, typescript (outdated).
- ngw_frontend_boilerplate. Parcel build (outdated).
Download and include with a script tag. [Package] will be registered as a global variable.
<script src="./lib/[package].global.js"></script>
<script>
var package = new Package(options);
</script>
<script type="module">
import Package from 'https://unpkg.com/@nextgis/[package]/lib/[package].esm-browser.prod.js';
</script>
Choose between unpkg
:
<script src="https://unpkg.com/@nextgis/[package]"></script>
<script src="https://unpkg.com/@nextgis/[package]@[version]"></script>
<script src="https://unpkg.com/@nextgis/[package]@[version]/lib/[file]"></script>
and jsdelivr
<script src="https://cdn.jsdelivr.net/npm/@nextgis/[package]"></script>
<script src="https://cdn.jsdelivr.net/npm/@nextgis/[package]@[version]/lib/[file]"></script>
[file]
- [package].[format].prod.js
[format]
:
global
- browser scriptcjs
- node moduleesm-browser
- browser moduleesm-bundler
- module for bundler systems
We recommend linking to a specific [version]
number that you can update manually
npm install @nextgis/[package]
then import the [package] in the project modules
import Package from '@nextgis/[package]';
// or
import { Component, utility } from '@nextgis/[package]';
const package = new Package(options);
import { NgwMap } from '@nextgis/ngw-map';
import './leaflet-style-override.css';
import MapAdapter from '@nextgis/leaflet-map-adapter';
// OR
// import 'ol/ol.css';
// import MapAdapter from '@nextgis/ol-map-adapter';
// OR
// import 'maplibre-gl/dist/maplibre-gl.css';
// import MapAdapter from '@nextgis/maplibre-gl-map-adapter';
const ngwMap = new NgwMap(new MapAdapter(), {
target: "map",
qmsId: 448,
baseUrl: "https://demo.nextgis.com",
resources: [2011, { resource: 222, fit: true }, { resource: "keyname" }],
});
ngwMap.onLoad().then(() => {
// do something
});
// from resource id
ngwMap.addNgwLayer({ resource: 2011 });
// by keyname
ngwMap.addNgwLayer({ resource: "keyname" });
// add vector layer from style resource
ngwMap.addNgwLayer({ resource: "style_keyname", adapter: "GEOJSON" });
// add first style from vector resource (if available)
ngwMap.addNgwLayer({ resource: "vector_keyname", adapter: "TILE" });
The resource
can be id or keyname.
Examples
Add different NextGIS Web resource
First install Yarn
# Clone git through ssh
git clone git@github.com:nextgis/nextgis_frontend.git
cd ./nextgis_frontend
# Install dependencies
yarn install
# Prepare packages
yarn run bootstrap
# Build all packages
yarn run prod
# Build demo app
yarn run demo
To copy the pages of universal examples from the demo/examples into the corresponding examples of frontend libraries run
yarn run examples
# Go to package directory (for example webmap)
cd ./packages/webmap
# Run build command
yarn run dev
# or
yarn run prod
# Run watch source files changes command
yarn run watch
Before publishing you should execute prod
script
lerna run prod
To publish new version to git and npm run
lerna publish
When publishing, you will need to select a new version number. It is the same for all libraries. Dependencies between packages are solved automatically.
To publish a new package, run the following command in the package folder
npm publish --access=public
The tests are launched from the root project directory. Testing is performed for all packages.
npm t # run all test with coverage
npm run karma # run karma test in watch mode for development
Need to fix a bug or add a feature to NextGIS Frontend? We provide custom development and support for this software. Contact us to discuss options!