├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── commit-convention.md ├── .gitignore ├── .npmignore ├── .prettierrc ├── .vscode ├── extensions.json └── settings.json ├── .yarnrc.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── demo ├── .dockerignore ├── .editorconfig ├── .eslintignore ├── .eslintrc.cjs ├── .gitignore ├── .npmrc ├── .prettierrc ├── .vscode │ ├── extensions.json │ └── settings.json ├── README.md ├── docker │ ├── Dockerfile │ └── nginx.conf ├── examples │ ├── custom-layer-controls │ │ ├── index.html │ │ └── index.json │ ├── events │ │ ├── index.html │ │ └── index.json │ ├── expression-paint-case │ │ ├── index.html │ │ └── index.json │ ├── expression-paint-interpolate │ │ ├── index.html │ │ └── index.json │ ├── expression-paint-match │ │ ├── index.html │ │ └── index.json │ ├── expression-paint-step │ │ ├── index.html │ │ └── index.json │ ├── expression-paint │ │ ├── index.html │ │ └── index.json │ ├── geojson-data │ │ ├── index.html │ │ └── index.json │ ├── geojson-layer │ │ ├── index.html │ │ └── index.json │ ├── icon_custom_svg │ │ ├── index.html │ │ └── index.json │ ├── icons │ │ ├── index.html │ │ └── index.json │ ├── ip-cameras-map │ │ ├── index.html │ │ ├── index.json │ │ ├── irkutsk-cameras.geojson │ │ └── kaliningrad-cameras.geojson │ ├── layers-opacity │ │ ├── index.html │ │ └── index.json │ ├── layers-update │ │ ├── index.html │ │ └── index.json │ ├── map-init │ │ ├── index.html │ │ └── index.json │ ├── nextgis-geoservices │ │ ├── index.html │ │ └── index.json │ ├── ngw-basemap │ │ ├── index.html │ │ └── index.json │ ├── ngw-bbox-plus-strategy │ │ ├── index.html │ │ └── index.json │ ├── ngw-bbox-strategy │ │ ├── index.html │ │ └── index.json │ ├── ngw-layer-filtering │ │ ├── index.html │ │ └── index.json │ ├── ngw-layer-legend │ │ ├── index.html │ │ └── index.json │ ├── ngw-layer-popup │ │ ├── index.html │ │ └── index.json │ ├── ngw-layer-properties-filters │ │ ├── index.html │ │ └── index.json │ ├── ngw-layer-select │ │ ├── index.html │ │ └── index.json │ ├── ngw-layers │ │ ├── index.html │ │ └── index.json │ ├── ngw-mvt-match-paint │ │ ├── index.html │ │ └── index.json │ ├── ngw-postgis-layer │ │ ├── index.html │ │ └── index.json │ ├── ngw-resources │ │ ├── index.html │ │ └── index.json │ ├── ngw-tile-no-cors │ │ ├── index.html │ │ └── index.json │ ├── ngw-tmsclient-layer │ │ ├── index.html │ │ └── index.json │ ├── ngw-tsm-layer-auth │ │ ├── index.html │ │ └── index.json │ ├── ngw-tsm-layer │ │ ├── index.html │ │ └── index.json │ ├── ngw-viewer │ │ ├── index.html │ │ └── index.json │ ├── ngw-webmap-bookmarks │ │ ├── index.html │ │ └── index.json │ ├── ngw-webmap-legend │ │ ├── index.html │ │ └── index.json │ ├── ngw-webmap-zoom-range │ │ ├── index.html │ │ └── index.json │ ├── ngw-webmap │ │ ├── index.html │ │ └── index.json │ ├── ngw-wms │ │ ├── index.html │ │ └── index.json │ ├── ngw-zoom-to-feature │ │ ├── index.html │ │ └── index.json │ ├── properties-paint │ │ ├── index.html │ │ └── index.json │ ├── tile-layer │ │ ├── index.html │ │ └── index.json │ ├── toggle-control │ │ ├── index.html │ │ └── index.json │ ├── vector-adapter-select │ │ ├── index.html │ │ └── index.json │ ├── vector-add-while-filtering │ │ ├── index.html │ │ └── index.json │ ├── vector-events-position-data │ │ ├── index.html │ │ └── index.json │ ├── vector-filtering │ │ ├── index.html │ │ └── index.json │ ├── vector-hover-selection │ │ ├── index.html │ │ └── index.json │ ├── vector-label-callback │ │ ├── index.html │ │ └── index.json │ ├── vector-label │ │ ├── index.html │ │ └── index.json │ ├── vector-line-arrow │ │ ├── index.html │ │ └── index.json │ ├── vector-mouse-events │ │ ├── index.html │ │ └── index.json │ ├── vector-paint │ │ ├── index.html │ │ └── index.json │ ├── vector-popup │ │ ├── index.html │ │ └── index.json │ ├── vector-selection │ │ ├── index.html │ │ └── index.json │ ├── vector-set-paint │ │ ├── index.html │ │ └── index.json │ ├── webmap-identification-disabled │ │ ├── index.html │ │ └── index.json │ ├── webmap-identification-multiply │ │ ├── index.html │ │ └── index.json │ ├── webmap-identification │ │ ├── index.html │ │ └── index.json │ └── webmap-layer-tree │ │ ├── index.html │ │ └── index.json ├── index.html ├── package.json ├── postcss.config.cjs ├── public │ ├── favicon.svg │ ├── icons │ │ ├── android-chrome-192x192.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── mstile-150x150.png │ │ ├── safari-pinned-tab.svg │ │ └── site.webmanifest │ └── logo_96x96.png ├── quasar.config.ts ├── scripts │ ├── changeHtmlMapAdapter.mjs │ ├── generateExamplesScheme.js │ └── updateDemoExamples.js ├── src │ ├── App.vue │ ├── assets │ │ └── quasar-logo-vertical.svg │ ├── components │ │ ├── CodeComponent.vue │ │ ├── HtmlExampleComponent.vue │ │ ├── HtmlExampleHeaderComponent.vue │ │ ├── HtmlExampleIframeComponent.vue │ │ ├── LogoComponent.vue │ │ ├── ReadmeComponent.vue │ │ └── SendToCodepen.vue │ ├── css │ │ ├── app.scss │ │ └── quasar.variables.scss │ ├── env.d.ts │ ├── global.d.ts │ ├── interfaces.ts │ ├── layouts │ │ └── MainLayout.vue │ ├── pages │ │ └── ErrorNotFound.vue │ ├── plugins │ │ └── highlight.ts │ ├── quasar.d.ts │ ├── router │ │ ├── index.ts │ │ └── routes.ts │ ├── services │ │ └── mdToHtml.ts │ ├── shims-vue.d.ts │ └── utils │ │ └── searchTags.ts ├── tsconfig.json ├── tsconfig.vue-tsc.json └── yarn.lock ├── docs ├── DEVELOPMENT.md ├── docker │ ├── Dockerfile │ └── nginx.conf ├── package.json ├── tsconfig.json ├── typedoc.js └── yarn.lock ├── lerna.json ├── package.json ├── packages ├── area │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── calculateArea.ts │ │ └── index.ts │ └── typedoc.json ├── build-tools │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── aliases.cjs │ │ ├── aliases.js │ │ ├── build.js │ │ ├── rollup.config.js │ │ ├── rollup.dts.config.js │ │ └── utils.js │ └── package.json ├── cache │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── Cache.ts │ │ └── index.ts │ └── typedoc.json ├── cancelable-promise │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── CancelError.ts │ │ ├── CancelablePromise.ts │ │ ├── PromiseControl.ts │ │ ├── TimeoutError.ts │ │ └── index.ts │ └── typedoc.json ├── cesium-map-adapter │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── CesiumMapAdapter.ts │ │ ├── controls │ │ │ └── MeasureControl.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── layer-adapters │ │ │ ├── BaseAdapter.ts │ │ │ ├── GeoJsonAdapter.ts │ │ │ ├── Model3DAdapter.ts │ │ │ ├── TerrainAdapter.ts │ │ │ ├── TileAdapter.ts │ │ │ └── Tileset3DAdapter.ts │ │ └── utils │ │ │ ├── TileAdapterOrderControl.ts │ │ │ ├── cartesian3ToLngLat.ts │ │ │ ├── getBoundsFromBoundingSphere.ts │ │ │ ├── getCameraFocus.ts │ │ │ ├── getDefaultTerrain.ts │ │ │ ├── getEntitiesBoundingSphere.ts │ │ │ ├── isFeature3D.ts │ │ │ ├── makeUrl.ts │ │ │ └── whenSampleTerrainMostDetailed.ts │ ├── tsconfig.json │ ├── typedoc.json │ └── webpack.config.js ├── control-container │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── ControlContainer.css │ │ ├── ControlContainer.ts │ │ ├── controls │ │ │ └── ZoomControl.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── svg │ │ │ ├── ctrl-zoom-in.svg │ │ │ └── ctrl-zoom-out.svg │ └── typedoc.json ├── dialog │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── dialog.css │ │ ├── dialog.ts │ │ ├── index.ts │ │ └── interfaces.ts │ └── typedoc.json ├── dom │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── dom.ts │ │ ├── index.ts │ │ └── loadScript.ts │ └── typedoc.json ├── eslint-config │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── expression │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── constants │ │ │ └── colors.ts │ │ ├── expression.ts │ │ ├── expressions │ │ │ ├── decisionExpressions.ts │ │ │ ├── interpolationExpressions │ │ │ │ ├── index.ts │ │ │ │ ├── interpolate.ts │ │ │ │ └── step.ts │ │ │ ├── lookupExpressions.ts │ │ │ ├── mathExpressions.ts │ │ │ ├── stringExpressions.ts │ │ │ └── typeExpressions.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── utils │ │ │ ├── color.ts │ │ │ ├── evaluateArgs.ts │ │ │ ├── fallback.ts │ │ │ └── tryConvert.ts │ └── typedoc.json ├── geocoder │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ └── ngw-geocoder │ │ │ ├── index.html │ │ │ └── index.json │ ├── index.js │ ├── package.json │ ├── src │ │ ├── BaseGeocoder.ts │ │ ├── Geocoder.ts │ │ ├── GeocoderOptions.ts │ │ ├── index.ts │ │ ├── providers │ │ │ ├── BaseProvider.ts │ │ │ ├── BaseProviderOptions.ts │ │ │ ├── NgwProvider.ts │ │ │ └── NominatimProvider.ts │ │ └── types │ │ │ ├── ResultItem.ts │ │ │ └── SearchItem.ts │ └── typedoc.json ├── global.d.ts ├── icons │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ └── icon_shapes │ │ │ ├── index.html │ │ │ └── index.json │ ├── package.json │ ├── src │ │ └── index.ts │ └── typedoc.json ├── item │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ └── tree │ │ │ └── index.html │ ├── index.js │ ├── package.json │ ├── src │ │ ├── Item.ts │ │ ├── TreeHelper.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── properties │ │ │ ├── BaseProperty.ts │ │ │ ├── CheckProperty.ts │ │ │ └── ItemProperties.ts │ └── typedoc.json ├── leaflet-map-adapter │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── LeafletMapAdapter.ts │ │ ├── controls │ │ │ ├── Attribution.ts │ │ │ ├── createButtonControl.ts │ │ │ └── createControl.ts │ │ ├── index.ts │ │ ├── layer-adapters │ │ │ ├── BaseAdapter.ts │ │ │ ├── GeoJsonAdapter │ │ │ │ ├── GeoJsonAdapter.ts │ │ │ │ ├── index.ts │ │ │ │ └── utils │ │ │ │ │ ├── GeoJsonEvents.ts │ │ │ │ │ └── GeojsonPaint.ts │ │ │ ├── ImageAdapter │ │ │ │ ├── ImageAdapter.ts │ │ │ │ ├── ImageLayer.ts │ │ │ │ ├── ImageOverlay.ts │ │ │ │ └── imageQueue.ts │ │ │ ├── OsmAdapter.ts │ │ │ ├── TileAdapter │ │ │ │ ├── TileAdapter.ts │ │ │ │ └── TileLayer.ts │ │ │ └── WmsAdapter │ │ │ │ ├── WmsAdapter.ts │ │ │ │ └── WmsLayer.ts │ │ ├── leaflet.d.ts │ │ └── utils │ │ │ ├── arrayToBoundsExpression.ts │ │ │ ├── boundsToArray.ts │ │ │ ├── callAjax.ts │ │ │ ├── convertMapClickEvent.ts │ │ │ ├── createMouseEvent.ts │ │ │ ├── detectType.ts │ │ │ ├── geometries.ts │ │ │ └── makeRemoteTileLayer.ts │ └── typedoc.json ├── logging │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── Logging.ts │ │ ├── engines │ │ │ ├── ConsoleEngine.ts │ │ │ └── NgLogEngine │ │ │ │ ├── NgLogEngine.ts │ │ │ │ └── utils │ │ │ │ └── generateSessionId.ts │ │ ├── index.ts │ │ └── interfaces.ts │ └── typedoc.json ├── maplibre-gl-map-adapter │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── MaplibreGLMapAdapter.ts │ │ ├── controls │ │ │ ├── AttributionControl.ts │ │ │ ├── CompassControl.ts │ │ │ ├── ZoomControl.ts │ │ │ ├── createButtonControl.ts │ │ │ └── createControl.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── layer-adapters │ │ │ ├── BaseAdapter.ts │ │ │ ├── BaseRasterAdapter.ts │ │ │ ├── GeoJsonAdapter.ts │ │ │ ├── ImageAdapter.ts │ │ │ ├── MvtAdapter.ts │ │ │ ├── OsmAdapter.ts │ │ │ ├── TileAdapter.ts │ │ │ ├── VectorAdapter.ts │ │ │ └── WmsAdapter.ts │ │ ├── maplibregl.d.ts │ │ └── utils │ │ │ ├── arrayToBoundsLike.ts │ │ │ ├── convertMapClickEvent.ts │ │ │ ├── convertZoomLevel.ts │ │ │ ├── geomType.ts │ │ │ ├── getCentroid.ts │ │ │ ├── getFeaturePosition.ts │ │ │ ├── imageIcons.ts │ │ │ ├── makeHtmlFromString.ts │ │ │ └── setupLayerTransformRequest.ts │ └── typedoc.json ├── ngw-cesium │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ └── cesium-map │ │ │ ├── index.html │ │ │ └── index.json │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.json │ ├── typedoc.json │ └── webpack.config.js ├── ngw-connector │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── abort-controller │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── auth │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── cancelable │ │ │ └── index.html │ │ ├── edit-vector-layer-fields │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── node-script │ │ │ └── connect.js │ │ ├── request-transform │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── resource-item │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── resource-table │ │ │ ├── index.html │ │ │ └── index.json │ │ └── search-resources │ │ │ ├── index.html │ │ │ └── index.json │ ├── index.js │ ├── package.json │ ├── scripts │ │ └── generator.js │ ├── src │ │ ├── NgwConnector.ts │ │ ├── ResourcesControl.ts │ │ ├── activeConnectors.ts │ │ ├── errors │ │ │ ├── InsufficientPermissionsError.ts │ │ │ ├── NetworkError.ts │ │ │ ├── NetworksResponseError.ts │ │ │ ├── NgwError.ts │ │ │ ├── ResourceNotFoundError.ts │ │ │ ├── extractError.ts │ │ │ └── isError.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── types │ │ │ ├── FeatureLayer.ts │ │ │ ├── RequestItemsParamsMap.ts │ │ │ ├── ResourceItem.ts │ │ │ └── ResourceStore.ts │ │ └── utils │ │ │ ├── apiRequest.ts │ │ │ ├── isObject.ts │ │ │ ├── loadData.ts │ │ │ ├── resourceCompare.ts │ │ │ ├── resourceToQuery.ts │ │ │ └── template.ts │ └── typedoc.json ├── ngw-kit │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── add-feature-attachment │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── featch-ngw-layer-items │ │ │ ├── index.html │ │ │ └── index.json │ │ └── select-ngw-layer-distinct │ │ │ ├── index.html │ │ │ └── index.json │ ├── index.js │ ├── package.json │ ├── src │ │ ├── BookmarkItem.ts │ │ ├── IdentifyItem.ts │ │ ├── NgwKit.ts │ │ ├── NgwResource.ts │ │ ├── NgwWebmapItem.ts │ │ ├── NgwWebmapLayerAdapter.ts │ │ ├── adapters │ │ │ ├── createAsyncAdapter.ts │ │ │ ├── createBasemapLayerAdapter.ts │ │ │ ├── createGeoJsonAdapter.ts │ │ │ ├── createNgwWebmapAdapter.ts │ │ │ ├── createOnFirstShowAdapter.ts │ │ │ ├── createOnFirstShowNgwAdapter.ts │ │ │ └── createRasterAdapter.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── utils │ │ │ ├── WebmapLayerOpacityPropertyHandler.ts │ │ │ ├── createPopupContent.ts │ │ │ ├── featureLayerUtils.ts │ │ │ ├── fetchNgwExtent.ts │ │ │ ├── fetchNgwLayerCount.ts │ │ │ ├── fetchNgwLayerFeature.ts │ │ │ ├── fetchNgwLayerFeatureCollection.ts │ │ │ ├── fetchNgwLayerFeatures.ts │ │ │ ├── fetchNgwLayerItem.ts │ │ │ ├── fetchNgwLayerItems.ts │ │ │ ├── getCompanyLogo.ts │ │ │ ├── getLayerFilterOptions.ts │ │ │ ├── identifyUtils.ts │ │ │ ├── mapFeatureDisplayName.ts │ │ │ ├── ngwApiToAdapterOptions.ts │ │ │ ├── parseDateFromNgw.ts │ │ │ ├── prepareFieldsToNgw.ts │ │ │ ├── prepareNgwFieldsToPropertiesFilter.ts │ │ │ ├── resourceIdFromLayerOptions.ts │ │ │ ├── selectNgwLayerDistinct.ts │ │ │ ├── uploadFeatureAttachment.ts │ │ │ └── utils.ts │ └── typedoc.json ├── ngw-leaflet │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── custom-layer-controls │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── events │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-case │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-interpolate │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-match │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-step │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── geojson-data │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── geojson-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── icon_custom_svg │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── icons │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ip-cameras-map │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── layers-opacity │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── layers-update │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── leaflet-geoman │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── map-init │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── nextgis-geoservices │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-basemap │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-bbox-plus-strategy │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-bbox-strategy │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-legend │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-popup │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-properties-filters │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-select │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layers │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-postgis-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-resources │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tile-no-cors │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tmsclient-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tsm-layer-auth │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tsm-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-viewer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-bookmarks │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-legend │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-zoom-range │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-wms │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-zoom-to-feature │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── properties-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── tile-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── toggle-control │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-adapter-select │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-add-while-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-events-position-data │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-label-callback │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-label │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-line-arrow │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-mouse-events │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-popup │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-selection │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-set-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification-disabled │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification-multiply │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification │ │ │ ├── index.html │ │ │ └── index.json │ │ └── webmap-layer-tree │ │ │ ├── index.html │ │ │ └── index.json │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── leaflet-style-override.css │ └── typedoc.json ├── ngw-map │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── NgwMap.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── utils │ │ │ ├── appendNgwResources.ts │ │ │ └── prepareWebMapOptions.ts │ ├── typedoc.json │ └── types │ │ └── reproject.d.ts ├── ngw-maplibre-gl │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── custom-layer-controls │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── events │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-case │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-interpolate │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-match │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-step │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── geojson-data │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── geojson-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── geojson-paint-cb │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── icon_custom_svg │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── icons │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ip-cameras-map │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── layers-opacity │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── layers-update │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── map-init │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── nextgis-geoservices │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── nextgis-map-vector │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-basemap │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-bbox-plus-strategy │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-bbox-strategy │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-legend │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-popup │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-properties-filters │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-select │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layers │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-mvt-match-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-mvt-native-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-mvt │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-postgis-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-resources │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tile-no-cors │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tmsclient-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tsm-layer-auth │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tsm-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-viewer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-bookmarks │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-legend │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-zoom-range │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-wms │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-zoom-to-feature │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── pin-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── properties-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── tile-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── toggle-control │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-adapter-select │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-add-while-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-events-position-data │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-label-callback │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-label │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-line-arrow │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-mouse-events │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-popup │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-selection │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-set-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification-disabled │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification-multiply │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification │ │ │ ├── index.html │ │ │ └── index.json │ │ └── webmap-layer-tree │ │ │ ├── index.html │ │ │ └── index.json │ ├── package.json │ ├── src │ │ └── index.ts │ └── typedoc.json ├── ngw-ol │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── custom-layer-controls │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── events │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-case │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-interpolate │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-match │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint-step │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── expression-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── geojson-data │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── geojson-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── icon_custom_svg │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── icons │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ip-cameras-map │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── layers-opacity │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── layers-update │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── map-init │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── nextgis-geoservices │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-basemap │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-bbox-plus-strategy │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-bbox-strategy │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-cog-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-legend │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-popup │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-properties-filters │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layer-select │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-layers │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-postgis-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-resources │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-srs-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tile-no-cors │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tmsclient-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tsm-layer-auth │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-tsm-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-viewer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-bookmarks │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-legend │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap-zoom-range │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-webmap │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-wms │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── ngw-zoom-to-feature │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── on-first-show-adapter-layer-control │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── properties-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── tile-layer │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── toggle control │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── toggle-control │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-adapter-select │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-add-while-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-events-position-data │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-filtering │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-label-callback │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-label │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-line-arrow │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-mouse-events │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-native-options │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-popup │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-selection │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── vector-set-paint │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification-disabled │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification-multiply │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── webmap-identification │ │ │ ├── index.html │ │ │ └── index.json │ │ └── webmap-layer-tree │ │ │ ├── index.html │ │ │ └── index.json │ ├── index.js │ ├── package.json │ ├── src │ │ └── index.ts │ └── typedoc.json ├── ngw-orm │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── common │ │ │ ├── DeepPartial.ts │ │ │ ├── ObjectLiteral.ts │ │ │ └── ObjectType.ts │ │ ├── connection │ │ │ ├── Connection.ts │ │ │ └── ConnectionOptions.ts │ │ ├── decorator │ │ │ ├── Column.ts │ │ │ └── NgwResource.ts │ │ ├── error │ │ │ ├── CannotConnectAlreadyConnectedError.ts │ │ │ ├── CannotExecuteNotConnectedError.ts │ │ │ ├── CannotExecuteResourceNotExistError.ts │ │ │ └── ColumnTypeUndefinedError.ts │ │ ├── find-options │ │ │ ├── FindConditions.ts │ │ │ ├── FindManyOptions.ts │ │ │ └── FindOneOptions.ts │ │ ├── index.ts │ │ ├── metadata-args │ │ │ ├── ColumnMetadataArgs.ts │ │ │ ├── MetadataArgsStorage.ts │ │ │ └── ResourceMetadataArgs.ts │ │ ├── ngw │ │ │ └── NgwResources.ts │ │ ├── options │ │ │ ├── ColumnOptions.ts │ │ │ ├── NgwResourceOptions.ts │ │ │ └── ToTypescriptOptions.ts │ │ ├── repository │ │ │ ├── BaseResource.ts │ │ │ ├── LineLayer.ts │ │ │ ├── PointLayer.ts │ │ │ ├── PolygonLayer.ts │ │ │ ├── ResourceGroup.ts │ │ │ ├── SyncOptions.ts │ │ │ ├── UpdateOptions.ts │ │ │ └── VectorLayer.ts │ │ ├── sync-items │ │ │ ├── ResourceSyncItem.ts │ │ │ ├── VectorResourceSyncItem.ts │ │ │ └── VectorResourceUpdateItem.ts │ │ ├── types │ │ │ ├── ColumnTypes.ts │ │ │ └── ValidateErrorType.ts │ │ └── vector-layer-utils │ │ │ ├── itemsToEntities.ts │ │ │ ├── saveVectorLayer.ts │ │ │ ├── toTypescript.ts │ │ │ └── vectorResourceToNgw.ts │ └── typedoc.json ├── ngw-uploader-input │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── create_wms │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── make_auth │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── make_auth_dialog │ │ │ ├── index.html │ │ │ └── index.json │ │ └── simple_input │ │ │ ├── index.html │ │ │ └── index.json │ ├── package.json │ ├── src │ │ ├── NgwUploaderInput.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── ngw-uploader.css │ │ └── utils │ │ │ ├── constants.ts │ │ │ ├── dialog.ts │ │ │ └── input.ts │ └── typedoc.json ├── ngw-uploader │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── custom_input │ │ │ ├── index.html │ │ │ └── index.json │ │ ├── node-script │ │ │ ├── buildings.shp.zip │ │ │ ├── railway.geojson │ │ │ ├── railway_stations.shp.zip │ │ │ └── uploader.js │ │ ├── proxy-wms-2 │ │ │ ├── index.html │ │ │ └── index.json │ │ └── proxy-wms │ │ │ ├── index.html │ │ │ └── index.json │ ├── index.js │ ├── package.json │ ├── src │ │ ├── NgwUploader.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── utils │ │ │ ├── createName.ts │ │ │ ├── createResourceOptions.ts │ │ │ ├── decorators.ts │ │ │ ├── mapserverStyle.ts │ │ │ └── template.ts │ └── typedoc.json ├── ol-map-adapter │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── OlMapAdapter.ts │ │ ├── controls │ │ │ ├── Attribution.ts │ │ │ ├── PanelControl.css │ │ │ ├── PanelControl.ts │ │ │ ├── ZoomControl.css │ │ │ ├── ZoomControl.ts │ │ │ ├── createButtonControl.css │ │ │ ├── createButtonControl.ts │ │ │ └── createControl.ts │ │ ├── index.ts │ │ ├── layer-adapters │ │ │ ├── BaseAdapter.ts │ │ │ ├── CogAdapter.ts │ │ │ ├── GeoJsonAdapter.ts │ │ │ ├── ImageAdapter.ts │ │ │ ├── OsmAdapter.ts │ │ │ ├── Popup.css │ │ │ ├── TileAdapter.ts │ │ │ └── WmsAdapter.ts │ │ └── utils │ │ │ ├── convertMapClickEvent.ts │ │ │ ├── createFeaturePositionOptions.ts │ │ │ ├── gerResolution.ts │ │ │ ├── getCentroid.ts │ │ │ ├── getUrlsWithSubdomains.ts │ │ │ ├── makeHtmlFromString.ts │ │ │ ├── setTileLoadFunction.ts │ │ │ ├── styleFunction.ts │ │ │ └── utils.ts │ └── typedoc.json ├── paint │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── fromPaintExpression.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── pinBuilder.ts │ │ ├── preparePaint.ts │ │ └── typeHelpers.ts │ └── typedoc.json ├── progress │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── Progress.ts │ │ ├── ProgressEvents.ts │ │ └── index.ts │ └── typedoc.json ├── properties-filter │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── propertiesFilter.ts │ └── typedoc.json ├── qms-kit │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── create-adapter │ │ │ ├── index.html │ │ │ └── index.json │ │ └── webmap-starter-kit │ │ │ ├── index.html │ │ │ └── index.json │ ├── index.js │ ├── package.json │ ├── src │ │ ├── QmsKit.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── utils │ │ │ ├── createQmsAdapter.ts │ │ │ ├── getSubmodulesFromOriginUrl.ts │ │ │ ├── loadJson.ts │ │ │ └── updateQmsOptions.ts │ └── typedoc.json ├── queue │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── Queue.ts │ │ └── index.ts │ └── typedoc.json ├── react-ngw-leaflet │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── src │ │ ├── ReactNgwLeaflet.ts │ │ └── index.ts ├── react-ngw-map │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── src │ │ ├── ButtonControl.ts │ │ ├── MapControl.ts │ │ ├── ReactNgwMap.ts │ │ ├── ToggleControl.tsx │ │ ├── component.ts │ │ ├── context.ts │ │ ├── control.ts │ │ ├── element.ts │ │ ├── generic.ts │ │ ├── hooks.ts │ │ ├── hooks │ │ ├── useMapElement.ts │ │ └── useNgwControl.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── utils │ │ └── shallowEqual.ts ├── react-ngw-maplibre-gl │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── src │ │ ├── ReactNgwMaplibreGL.ts │ │ └── index.ts ├── react-ngw-ol │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── src │ │ ├── ReactNgwOl.ts │ │ └── index.ts ├── tree │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src │ │ ├── Tree.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ └── treeFilter.ts │ └── typedoc.json ├── url-runtime-params │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── src │ │ ├── UrlRuntimeParams.ts │ │ ├── index.ts │ │ └── interfaces.ts │ └── typedoc.json ├── utils │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── clipboard-esm │ │ │ ├── index.html │ │ │ └── index.json │ │ └── clipboard │ │ │ ├── index.html │ │ │ └── index.json │ ├── index.js │ ├── package.json │ ├── src │ │ ├── Clipboard.ts │ │ ├── applyMixins.ts │ │ ├── array │ │ │ ├── arrayChunk.ts │ │ │ ├── arrayCompare.ts │ │ │ ├── arrayUnique.ts │ │ │ └── index.ts │ │ ├── debounce.ts │ │ ├── debug │ │ │ ├── debugLog.ts │ │ │ └── index.ts │ │ ├── deepmerge.ts │ │ ├── defined.ts │ │ ├── deprecated │ │ │ ├── deprecatedMapClick.ts │ │ │ ├── deprecatedWarn.ts │ │ │ └── index.ts │ │ ├── events.ts │ │ ├── flatten.ts │ │ ├── geom │ │ │ ├── checkExtent.ts │ │ │ ├── constants.ts │ │ │ ├── coordTransform.ts │ │ │ ├── eachCoordinates.ts │ │ │ ├── geom.ts │ │ │ ├── getBoundsPolygon.ts │ │ │ ├── getCirclePolygon.ts │ │ │ ├── getIdentifyRadius.ts │ │ │ ├── getSquarePolygon.ts │ │ │ ├── index.ts │ │ │ ├── interfaces.ts │ │ │ └── isLngLatBoundsArray.ts │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── number │ │ │ ├── index.ts │ │ │ └── round.ts │ │ ├── object │ │ │ ├── index.ts │ │ │ ├── objectAssign.ts │ │ │ ├── objectDeepEqual.ts │ │ │ └── objectRemoveEmpty.ts │ │ ├── platform.ts │ │ ├── re │ │ │ ├── index.ts │ │ │ └── reEscape.ts │ │ ├── sleep.ts │ │ ├── string │ │ │ ├── camelize.ts │ │ │ ├── capitalize.ts │ │ │ ├── index.ts │ │ │ └── numberWithSpaces.ts │ │ ├── tileJson │ │ │ ├── index.ts │ │ │ └── interfaces.ts │ │ ├── typeHelpers │ │ │ ├── DeepPartial.ts │ │ │ ├── Json.ts │ │ │ ├── Type.ts │ │ │ ├── index.ts │ │ │ └── isObjKey.ts │ │ ├── unflatten.ts │ │ └── url.ts │ └── typedoc.json └── webmap │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── examples │ └── basic_initialization │ │ ├── index.html │ │ └── index.json │ ├── index.js │ ├── package.json │ ├── src │ ├── WebMap.ts │ ├── WebMapControls.ts │ ├── WebMapLayers.ts │ ├── WebMapMain.ts │ ├── components │ │ ├── controls │ │ │ ├── createButtonControl.ts │ │ │ └── createToggleControl.ts │ │ ├── keys │ │ │ ├── Keys.ts │ │ │ └── KeysCodes.ts │ │ └── mapStates │ │ │ ├── CenterState.ts │ │ │ ├── StateItem.ts │ │ │ └── ZoomState.ts │ ├── container.ts │ ├── index.ts │ ├── interfaces │ │ ├── BaseTypes.ts │ │ ├── Events.ts │ │ ├── LayerAdapter.ts │ │ ├── LegendItem.ts │ │ ├── MapAdapter.ts │ │ ├── MapControl.ts │ │ ├── MapOptions.ts │ │ ├── MapState.ts │ │ ├── RuntimeParams.ts │ │ └── StarterKit.ts │ └── utils │ │ ├── clearObject.ts │ │ ├── decorators.ts │ │ ├── geometryTypes.ts │ │ ├── getDefaultControls.ts │ │ └── updateGeoJsonAdapterOptions.ts │ └── typedoc.json ├── scripts ├── aliases.js ├── findPackages.js ├── testBuild.mjs ├── testBuildCmd.mjs ├── updateExamples.mjs └── verifyCommit.mjs ├── tests ├── .eslintrc ├── CHANGELOG.md ├── helpers │ ├── classes │ │ ├── FakeGeojsonLayerAdapter.ts │ │ ├── FakeLayerAdapter.ts │ │ └── FakeMapAdapter.ts │ ├── mapHtml.ts │ ├── ngw-orm │ │ ├── SandboxGroup.ts │ │ ├── SandboxGroupNgwKit.ts │ │ ├── SandboxPointLayer.ts │ │ └── SandboxPointLayerSpecial.ts │ ├── universalTestCases │ │ ├── baseMapTests.ts │ │ ├── mapAdapterTests.ts │ │ ├── webMapLayersTests.ts │ │ └── webMapTests.ts │ └── utils │ │ └── asyncTimeout.ts ├── internet-specs │ ├── ngw-kit │ │ └── ngw-kit.fetch.spec.ts │ └── ngw-orm.spec.ts ├── karma.conf.cjs ├── package.json ├── specs │ ├── area.spec.ts │ ├── cache.spec.ts │ ├── cancelable-promise.spec.ts │ ├── expression.spec.ts │ ├── leaflet-map-adapter.spec.ts │ ├── mapboxgl-map-adapter.spec.ts │ ├── ol-map-adapter.spec.ts │ ├── properties-filter.spec.ts │ └── webmap.spec.ts ├── tsconfig.json ├── webpack.config.js └── yarn.lock ├── tsconfig.build.json ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | insert_final_newline = true 5 | indent_style = space 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | max_line_length = 80 9 | spaces_around_brackets = true 10 | end_of_line = lf 11 | 12 | [*{.ts,.js}] 13 | indent_size = 2 14 | quote_type = single 15 | 16 | [*{.scss,.less}] 17 | indent_style = tab 18 | 19 | [*.json] 20 | indent_style = space 21 | indent_size = 2 22 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/.eslintignore -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["./packages/eslint-config/index.js"] 3 | } 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "printWidth": 80, 4 | "semi": true, 5 | "trailingComma": "all", 6 | "arrowParens": "always" 7 | } 8 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint" 4 | ], 5 | "unwantedRecommendations": [ 6 | "ms-vscode.vscode-typescript-tslint-plugin" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": false, 3 | "tslint.enable": false, 4 | "typescript.tsdk": "node_modules\\typescript\\lib", 5 | "editor.codeActionsOnSave": { 6 | "source.fixAll.eslint": "explicit" 7 | }, 8 | "git.ignoreLimitWarning": true, 9 | "markdownlint.config": { 10 | "default": true, 11 | "MD033": { 12 | "allowed_elements": [ "summary", "details" ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | -------------------------------------------------------------------------------- /demo/.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .yarn 3 | dist 4 | examples 5 | .quasar 6 | node_modules 7 | -------------------------------------------------------------------------------- /demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /demo/.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /src-capacitor 3 | /src-cordova 4 | /.quasar 5 | /node_modules 6 | .eslintrc.cjs 7 | /quasar.config.*.temporary.compiled* 8 | -------------------------------------------------------------------------------- /demo/.npmrc: -------------------------------------------------------------------------------- 1 | # pnpm-related options 2 | shamefully-hoist=true 3 | strict-peer-dependencies=false 4 | # to get the latest compatible packages when creating the project https://github.com/pnpm/pnpm/issues/6463 5 | resolution-mode=highest 6 | -------------------------------------------------------------------------------- /demo/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": true, 4 | "singleAttributePerLine": false 5 | } 6 | -------------------------------------------------------------------------------- /demo/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "editorconfig.editorconfig", 6 | "vue.volar", 7 | "wayou.vscode-todo-highlight" 8 | ], 9 | "unwantedRecommendations": [ 10 | "octref.vetur", 11 | "hookyqr.beautify", 12 | "dbaeumer.jshint", 13 | "ms-vscode.vscode-typescript-tslint-plugin" 14 | ] 15 | } -------------------------------------------------------------------------------- /demo/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.bracketPairColorization.enabled": true, 3 | "editor.guides.bracketPairs": true, 4 | "editor.formatOnSave": true, 5 | "editor.defaultFormatter": "esbenp.prettier-vscode", 6 | "[vue]": { 7 | "editor.defaultFormatter": "esbenp.prettier-vscode", 8 | }, 9 | "editor.codeActionsOnSave": [ 10 | "source.fixAll.eslint" 11 | ], 12 | "eslint.validate": [ 13 | "javascript", 14 | "javascriptreact", 15 | "typescript", 16 | ], 17 | "typescript.tsdk": "node_modules/typescript/lib" 18 | } 19 | -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | # demo-app (@nextgis/demo-app) 2 | 3 | Demo site for NextGIS Frontend libraries 4 | 5 | ## Install the dependencies 6 | 7 | ```bash 8 | yarn 9 | ``` 10 | 11 | ### Start the app in development mode (hot-code reloading, error reporting, etc.) 12 | 13 | ```bash 14 | yarn start 15 | ``` 16 | 17 | ### Lint the files 18 | 19 | ```bash 20 | yarn lint 21 | ``` 22 | 23 | ### Format the files 24 | 25 | ```bash 26 | yarn format 27 | ``` 28 | 29 | ### Build the app for production 30 | 31 | ```bash 32 | yarn build 33 | ``` 34 | 35 | ### Docker 36 | 37 | ```bash 38 | yarn docker 39 | 40 | docker build -t nextgis-demo-app -f .\docker\Dockerfile . 41 | docker run -p 8080:80 nextgis-demo-app 42 | ``` 43 | -------------------------------------------------------------------------------- /demo/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM node:20 as build 3 | 4 | WORKDIR /app 5 | 6 | COPY package*.json ./ 7 | COPY yarn.lock ./ 8 | RUN yarn install 9 | COPY . . 10 | RUN yarn build 11 | 12 | 13 | FROM nginx:stable-alpine-slim as prod 14 | 15 | COPY --from=build /app/dist/spa /usr/share/nginx/html 16 | COPY docker/nginx.conf /etc/nginx/conf.d/default.conf 17 | 18 | EXPOSE 80 19 | 20 | CMD ["nginx", "-g", "daemon off;"] 21 | -------------------------------------------------------------------------------- /demo/examples/custom-layer-controls/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Custom layers control", 3 | "description": "Enhancing interactive web maps with custom controls for layer management and visibility toggling.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["custom controls", "layer management"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/events/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Events", 3 | "description": "Press `A` to add a random layer to the map; `H` to hide all layers from the map; `S` to restore visibility of all layers; `R` to remove all layers from map and memory. All these actions will call of events from a list in top left coner of the map.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/expression-paint-case/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with case","description":"Use case expressions to set paint", "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"]} 2 | -------------------------------------------------------------------------------- /demo/examples/expression-paint-interpolate/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Expression paint with interpolate", 3 | "description": "Use interpolate expressions to set paint", 4 | "ngwMaps": [ 5 | "ngw-leaflet", 6 | "ngw-ol", 7 | "ngw-maplibre-gl" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /demo/examples/expression-paint-match/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Expression paint with match", 3 | "description": "Use match expressions to set paint", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/expression-paint-step/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with step","description":"Use step expressions to set paint", "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"]} 2 | -------------------------------------------------------------------------------- /demo/examples/expression-paint/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Expression paint", 3 | "description": "Use expressions to set paint", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/geojson-data/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Set vector layer data", 3 | "description": "Click the + button in the input on the right side of the screen to add new point in vector layer on map. Press - button to remove point from layer.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/geojson-layer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "GeoJSON data", 3 | "description": "", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/icon_custom_svg/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Icons from SVG", 3 | "description": "Integration and customization of user-defined SVG icons", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/icons/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Icons", 3 | "description": "", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ip-cameras-map/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "IP cameras map", 3 | "description": "Display the stream from the ip camera in the location", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "onlyForDemo": false 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/layers-opacity/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Layers opacity", 3 | "description": "Set transparency with parameters and with method", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/layers-update/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Layers update", 3 | "description": "A NextGIS Web raster-style vector layer is added to the map. Clicks on the map place points in this layer, automatically updating and reloading its raster styling.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/map-init/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Initialize map", 3 | "description": "Initialize map with default parameters", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/nextgis-geoservices/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NextGIS Geoservices", 3 | "description": "Add map layers from NextGIS Geoservices", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["nextgis", "Geoservices"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/ngw-basemap/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW basemap resource", 3 | "description": "Connect basemap resource from NGW. Click on '>>' to switch basemaps layers", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-bbox-plus-strategy/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BBOX+ strategy for vector layer", 3 | "description": "Use BBOX+ strategy to show large vector data resource. Reposition the map to add new data in parts. Try to fetch all layer data and then loading will be stopped. Use minZoom, maxBounds and another limitation to avoid the situation with full data load on start", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-bbox-strategy/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BBOX strategy for vector layer", 3 | "description": "Use BBOX strategy to show large vector data resource. Change the position of the map to update of the vector layer.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-layer-filtering/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW layer filtering", 3 | "description": "Set the filter for NGW layer by features propery.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-layer-legend/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NextGIS Style Layer legend", 3 | "description": "Manually integrate a single NextGIS Web vector style layer into a map with an auto-generated legend.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | 7 | -------------------------------------------------------------------------------- /demo/examples/ngw-layer-popup/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW layer popup on select", 3 | "description": "", 4 | "ngwMaps": [ 5 | "ngw-leaflet", 6 | "ngw-maplibre-gl", 7 | "ngw-ol" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /demo/examples/ngw-layer-properties-filters/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW layer properties filters", 3 | "description": "Set the filter for NGW layer by features property with 'AND' and 'ANY' operations.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-layer-select/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW select", 3 | "description": "", 4 | "ngwMaps": [ 5 | "ngw-leaflet", 6 | "ngw-ol", 7 | "ngw-maplibre-gl" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /demo/examples/ngw-layers/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Add different NGW resource", 3 | "description": "Click on radio button in order to show on the map NGW resources by their ID. If the layer with adapter, related resource will be displayed automatic.", 4 | "ngwMaps": [ 5 | "ngw-leaflet", 6 | "ngw-ol", 7 | "ngw-maplibre-gl" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /demo/examples/ngw-mvt-match-paint/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Match paint for NGW MVT Layer", 3 | "description": "Use addNgwLayer to add MVT resources with attributes base paint", 4 | "ngwMaps": ["ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-postgis-layer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW PostGIS layer", 3 | "description": "Add a layer based on PostGIS connection to the WebMap", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["PostGIS", "DB"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/ngw-resources/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Multiple NGW layers", 3 | "description": "Add multiple resources (vector layers) from NextGIS Web to a map using config. Click on the beige polygon layer to perform identification.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-tile-no-cors/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW tile layer no CORS", 3 | "description": "Add a tile layer from NGW for guest user without CORS setup", 4 | "tags": ["tms", "tile", "CORS", "ngw"], 5 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/ngw-tmsclient-layer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW TMS Client layer", 3 | "description": "Add a tile layer from NGW tms connection layer", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["tms", "tile", "tmsclient_layer"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/ngw-tsm-layer-auth/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW TMS layer with auth", 3 | "description": "Add a tile layer from protected NGW resource to a Web map", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["tms", "tile"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/ngw-tsm-layer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NGW TMS layer", 3 | "description": "Add a tile layer from NGW resource to the WebMap", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["tms", "tile"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/ngw-viewer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ngw viewer", 3 | "description": "Navigate the resource tree and open the allowed layers map preview", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-webmap-bookmarks/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Web map bookmarks", 3 | "description": "Load and show bookmarks from NGW Web map resource", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-webmap-legend/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NextGIS Web Vector Style Legends Integration", 3 | "description": "Integrate symbols representing NextGIS Web vector style layers into map legends", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-webmap-zoom-range/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Toggle webmap by zoom levels", 3 | "description": "Show NGW webmap layer only between allowed zoom levels. Zoom in and out to see how the layer will behave", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-webmap/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Add webmap from NextGIS Web", 3 | "description": "Add webmap resource from NextGIS Web to the map", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-wms/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "WMS layer from NGW WMS", 3 | "description": "Show WMS layer or layers from NGW WMS service.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/ngw-zoom-to-feature/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Zoom to NGW layer feature", 3 | "description": "Show how to set map view from any NGW layer feature.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["zoom to", "go to", "fit", "paginate", "table", "list"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/properties-paint/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Properties paint", 3 | "description": "Use properties filter to set paint", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/tile-layer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Tile layer", 3 | "description": "Add a tile layer to a Web map", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/toggle-control/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Toggle button control", 3 | "description": "This is a two-state control button. Useful for switching modes of operation.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-adapter-select/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector adapter select", 3 | "description": "Use adapter methods to select features of vector layer. Press CTRL with click to add new features in selection", 4 | "ngwMaps": [ 5 | "ngw-leaflet", 6 | "ngw-ol", 7 | "ngw-maplibre-gl" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /demo/examples/vector-add-while-filtering/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector layer add data while filtering", 3 | "description": "Set the filter for the vector layer from the select in the top right corner. Try adding points by clicking on the colored buttons. If the color of the new point does not match the color of the selected filter, the point will be invisible.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-events-position-data/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector events position data", 3 | "description": "Getting the extent and center for feature from a vector layer event", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-filtering/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector layer filtering", 3 | "description": "Filter NGW layer by attribute", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-hover-selection/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector selection on hover", 3 | "description": "", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "onlyForDemo": true 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/vector-label-callback/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector label callback", 3 | "description": "This example demonstrates the use of the 'label' option in a vector layer adapter. It showcases a callback function that returns a string to dynamically generate labels.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["label", "tooltip"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/vector-label/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector label", 3 | "description": "Show label by vector layer attributes", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"], 5 | "tags": ["label", "tooltip"] 6 | } 7 | -------------------------------------------------------------------------------- /demo/examples/vector-line-arrow/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Line with mixed arrows", 3 | "description": "Connect two points with a line that has an arrow originating from the line at one end and an arrow from a marker at the other end.", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-mouse-events/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector layer mouse events", 3 | "description": "Various ways to track events on clicks and hovers on a vector layer", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-paint/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector painting", 3 | "description": "", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-popup/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector popup", 3 | "description": "Show popup on feature select", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-selection/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector selection", 3 | "description": "Light up the star, illuminati!", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/vector-set-paint/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vector set paint", 3 | "description": "Update paint of vector layer", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/webmap-identification-disabled/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Web Map Layer-Specific Feature Identification", 3 | "description": "If the NGW webmap layer item 'identifiable' setting is turned off, layers connected through 'addNgwLayer' will not be interactive in the frontend. This ensures that specific layers have identification disabled, preventing feature highlighting and event processing for these layers.", 4 | "ngwMaps": [ 5 | "ngw-leaflet", 6 | "ngw-ol", 7 | "ngw-maplibre-gl" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /demo/examples/webmap-identification-multiply/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Web map feature identification", 3 | "description": "Highlight and identify features on a Web map", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/webmap-identification/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Web map feature highlighting", 3 | "description": "Highlight first Web map feature on mouse click", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/examples/webmap-layer-tree/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Webmap layers tree", 3 | "description": "Create tree control to show and hide layers from webmap. Click on the checkboxes to switch the visibility of layers and groups. If you click on the group checkbox with pressed CTRL key, then the action will be propagate to all the nested layers of the group. Use the sliders to change the opacity hierarchically", 4 | "ngwMaps": ["ngw-leaflet", "ngw-ol", "ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /demo/public/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/demo/public/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /demo/public/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/demo/public/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /demo/public/icons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #2d89ef 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo/public/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/demo/public/icons/favicon-16x16.png -------------------------------------------------------------------------------- /demo/public/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/demo/public/icons/favicon-32x32.png -------------------------------------------------------------------------------- /demo/public/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/demo/public/icons/mstile-150x150.png -------------------------------------------------------------------------------- /demo/public/icons/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NextGIS Frontend", 3 | "short_name": "NextGIS Frontend", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "theme_color": "#ffffff", 12 | "background_color": "#ffffff", 13 | "display": "standalone" 14 | } 15 | -------------------------------------------------------------------------------- /demo/public/logo_96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/demo/public/logo_96x96.png -------------------------------------------------------------------------------- /demo/scripts/changeHtmlMapAdapter.mjs: -------------------------------------------------------------------------------- 1 | export default function changeHtmlMapAdapter(html, adapter, adapters) { 2 | if (typeof adapter !== 'string') { 3 | const reName = new RegExp(adapters.map((x) => x.name).join('|'), 'g'); 4 | const reVersion = new RegExp(adapters.map((x) => x.version).join('|'), 'g'); 5 | html = html.replace(reName, adapter.name); 6 | html = html.replace(reVersion, adapter.version); 7 | } else { 8 | const reName = new RegExp(adapters.map((x) => x).join('|'), 'g'); 9 | html = html.replace(reName, adapter); 10 | } 11 | return html; 12 | } 13 | -------------------------------------------------------------------------------- /demo/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /demo/src/css/app.scss: -------------------------------------------------------------------------------- 1 | // app global css in SCSS form 2 | -------------------------------------------------------------------------------- /demo/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | declare namespace NodeJS { 4 | interface ProcessEnv { 5 | NODE_ENV: string; 6 | VUE_ROUTER_MODE: 'hash' | 'history' | 'abstract' | undefined; 7 | VUE_ROUTER_BASE: string | undefined; 8 | } 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo/src/global.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | interface Package { 4 | name: string; 5 | version: string; 6 | main: string; 7 | } 8 | 9 | interface ExampleItem { 10 | id: string; 11 | name: string; 12 | page?: 'example' | 'readme' | 'api'; 13 | md?: string; 14 | html?: string; 15 | ngwMaps?: Package[]; 16 | tags?: string[]; 17 | description?: string; 18 | children?: ExampleItem[]; 19 | } 20 | 21 | declare var EXAMPLES: ExampleItem[]; 22 | -------------------------------------------------------------------------------- /demo/src/pages/ErrorNotFound.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /demo/src/quasar.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | // Forces TS to apply `@quasar/app-vite` augmentations of `quasar` package 4 | // Removing this would break `quasar/wrappers` imports as those typings are declared 5 | // into `@quasar/app-vite` 6 | // As a side effect, since `@quasar/app-vite` reference `quasar` to augment it, 7 | // this declaration also apply `quasar` own 8 | // augmentations (eg. adds `$q` into Vue component context) 9 | /// 10 | -------------------------------------------------------------------------------- /demo/src/router/routes.ts: -------------------------------------------------------------------------------- 1 | import type { RouteRecordRaw } from 'vue-router'; 2 | 3 | const routes: RouteRecordRaw[] = [ 4 | { 5 | path: '/:id?', 6 | props: true, 7 | component: () => import('layouts/MainLayout.vue'), 8 | children: [], 9 | }, 10 | 11 | // Always leave this as last one, 12 | // but you can also remove it 13 | { 14 | path: '/:catchAll(.*)*', 15 | component: () => import('pages/ErrorNotFound.vue'), 16 | }, 17 | ]; 18 | 19 | export default routes; 20 | -------------------------------------------------------------------------------- /demo/src/services/mdToHtml.ts: -------------------------------------------------------------------------------- 1 | import { Marked } from 'marked'; 2 | import { markedHighlight } from 'marked-highlight'; 3 | 4 | import { hljs } from '../plugins/highlight'; 5 | 6 | const marked = new Marked( 7 | markedHighlight({ 8 | langPrefix: 'hljs language-', 9 | highlight(code, lang) { 10 | const language = hljs.getLanguage(lang) ? lang : 'plaintext'; 11 | return hljs.highlight(code, { language }).value; 12 | }, 13 | }), 14 | ); 15 | 16 | export async function mdToHtml(md: string): Promise { 17 | return marked.parse(md); 18 | } 19 | -------------------------------------------------------------------------------- /demo/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /// 4 | 5 | // Mocks all files ending in `.vue` showing them as plain Vue instances 6 | declare module '*.vue' { 7 | import type { DefineComponent } from 'vue'; 8 | const component: DefineComponent<{}, {}, any>; 9 | export default component; 10 | } 11 | -------------------------------------------------------------------------------- /demo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@quasar/app-vite/tsconfig-preset", 3 | "compilerOptions": { 4 | "baseUrl": "." 5 | } 6 | } -------------------------------------------------------------------------------- /demo/tsconfig.vue-tsc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true 5 | } 6 | } -------------------------------------------------------------------------------- /docs/DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | # Docker 2 | 3 | ```bash 4 | docker build -t registry.nextgis.com/code-api-nextgis:latest -f docker/Dockerfile . && docker push registry.nextgis.com/code-api-nextgis:latest 5 | docker run -it -p 8080:80 --rm --name code-api-nextgis registry.nextgis.com/code-api-nextgis:latest 6 | ``` 7 | -------------------------------------------------------------------------------- /docs/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | COPY ./build/ /usr/share/nginx/html 3 | COPY docker/nginx.conf /etc/nginx/nginx.conf 4 | EXPOSE 80 5 | CMD ["nginx", "-g", "daemon off;"] 6 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nextgis/frontend_docs", 3 | "private": true, 4 | "version": "2.0.0", 5 | "scripts": { 6 | "doc": "node ./node_modules/typedoc/bin/typedoc", 7 | "build": "node ./node_modules/typedoc/bin/typedoc", 8 | "docker": "docmypkg -r harbor.nextgis.net -n frontend/code-api -l -d ./docker" 9 | }, 10 | "devDependencies": { 11 | "docmypkg": "^0.0.1", 12 | "typedoc": "^0.25.1" 13 | }, 14 | "license": "MIT", 15 | "packageManager": "yarn@3.6.3" 16 | } 17 | -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | /* Advanced Options */ 5 | "skipLibCheck": true, /* Skip type checking of declaration files. */ 6 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ 7 | }, 8 | "include": ["../packages/global.d.ts", "../packages/*/src"], 9 | "exclude": ["node_modules"] 10 | } 11 | -------------------------------------------------------------------------------- /docs/typedoc.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | const findPackages = require('../scripts/findPackages'); 3 | 4 | const allowPackages = findPackages().filter((x) => { 5 | return !x.name.includes('react') && !x.name.includes('cesium'); 6 | }); 7 | 8 | const entryPoints = allowPackages.map((x) => x.path); 9 | 10 | const config = { 11 | out: 'build', 12 | entryPoints, 13 | name: 'NextGIS Frontend', 14 | excludePrivate: true, 15 | includeVersion: false, 16 | entryPointStrategy: 'packages', 17 | }; 18 | module.exports = config; 19 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "packages/*" 4 | ], 5 | "npmClient": "yarn", 6 | "version": "2.5.3", 7 | "command": { 8 | "version": { 9 | "message": "chore(release): publish %s" 10 | }, 11 | "run": { 12 | "ignore": [ 13 | "@nextgis/demo-app", 14 | "@nextgis/build-tools", 15 | "@nextgis/eslint-config" 16 | ] 17 | }, 18 | "publish": { 19 | "ignoreChanges": [ 20 | "@nextgis/frontend_test", 21 | "@nextgis/demo-app" 22 | ] 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /packages/area/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/area.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/area.cjs.prod.js'); 7 | } 8 | //# sourceMappingURL=./lib/area.esm-bundler.js.map 9 | -------------------------------------------------------------------------------- /packages/area/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './calculateArea'; 2 | -------------------------------------------------------------------------------- /packages/area/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/build-tools/README.md: -------------------------------------------------------------------------------- 1 | # BUILD TOOLS 2 | 3 | this tool is in the design phase 4 | 5 | It will be needed to build code of libraries for browsers, and as `esm` modules. 6 | Will also help with creation of TypeScript Definition File. 7 | -------------------------------------------------------------------------------- /packages/build-tools/index.js: -------------------------------------------------------------------------------- 1 | import getAliases from './lib/aliases.js'; 2 | import buildModule from './lib/build.js'; 3 | 4 | export { getAliases }; 5 | export const build = () => buildModule; 6 | -------------------------------------------------------------------------------- /packages/cache/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/cache.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/cache.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/cache/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Cache } from './Cache'; 2 | 3 | export default Cache; 4 | -------------------------------------------------------------------------------- /packages/cache/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/cancelable-promise/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/cancelable-promise.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/cancelable-promise.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/cancelable-promise/src/CancelError.ts: -------------------------------------------------------------------------------- 1 | export class CancelError extends Error { 2 | name = 'CancelError'; 3 | 4 | constructor() { 5 | super(); 6 | Object.setPrototypeOf(this, CancelError.prototype); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/cancelable-promise/src/TimeoutError.ts: -------------------------------------------------------------------------------- 1 | export class TimeoutError extends Error { 2 | name = 'TimeoutError'; 3 | 4 | constructor() { 5 | super(); 6 | Object.setPrototypeOf(this, TimeoutError.prototype); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/cancelable-promise/src/index.ts: -------------------------------------------------------------------------------- 1 | import { CancelablePromise } from './CancelablePromise'; 2 | 3 | export default CancelablePromise; 4 | -------------------------------------------------------------------------------- /packages/cancelable-promise/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/controls/MeasureControl.ts: -------------------------------------------------------------------------------- 1 | import type { MapControl } from '@nextgis/webmap'; 2 | import type { Viewer } from 'cesium'; 3 | 4 | type M = Viewer; 5 | 6 | export class MeasureControl implements MapControl { 7 | onAdd(map?: M): HTMLElement | undefined { 8 | return undefined; 9 | } 10 | onRemove(map?: M): void { 11 | // 12 | } 13 | remove?(): void { 14 | // 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/index.ts: -------------------------------------------------------------------------------- 1 | import { CesiumMapAdapter } from './CesiumMapAdapter'; 2 | 3 | import type { MapAdapterOptions } from './CesiumMapAdapter'; 4 | 5 | export * from './interfaces'; 6 | 7 | export type { CesiumMapAdapter, MapAdapterOptions }; 8 | export default CesiumMapAdapter; 9 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/interfaces.ts: -------------------------------------------------------------------------------- 1 | import type { LngLatArray } from '@nextgis/utils'; 2 | import type { MapClickEvent } from '@nextgis/webmap'; 3 | import type { Cartesian2, Cartesian3 } from 'cesium'; 4 | 5 | export interface CesiumMapClickEvent { 6 | position: Cartesian2; 7 | } 8 | 9 | export interface CesiumAdapterMapClickEvent extends MapClickEvent { 10 | source: CesiumMapClickEvent & { 11 | pickedPosition?: Cartesian3; 12 | pickedPositionLngLat?: LngLatArray; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/utils/cartesian3ToLngLat.ts: -------------------------------------------------------------------------------- 1 | import { Math as CesiumMath, Ellipsoid } from 'cesium'; 2 | 3 | import type { LngLatArray } from '@nextgis/utils'; 4 | import type { Cartesian3 } from 'cesium'; 5 | 6 | export function cartesian3ToLngLat(position: Cartesian3): LngLatArray { 7 | const cartographic = Ellipsoid.WGS84.cartesianToCartographic(position); 8 | return [ 9 | CesiumMath.toDegrees(cartographic.longitude), 10 | CesiumMath.toDegrees(cartographic.latitude), 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/utils/getCameraFocus.ts: -------------------------------------------------------------------------------- 1 | import { Ellipsoid, IntersectionTests, Ray, defined } from 'cesium'; 2 | 3 | import type { Cartesian3, Scene } from 'cesium'; 4 | 5 | export function getCameraFocus(scene: Scene): Cartesian3 { 6 | const ray = new Ray(scene.camera.positionWC, scene.camera.directionWC); 7 | const intersections = IntersectionTests.rayEllipsoid(ray, Ellipsoid.WGS84); 8 | if (defined(intersections)) { 9 | return Ray.getPoint(ray, intersections.start); 10 | } 11 | // Camera direction is not pointing at the globe, so use the ellipsoid horizon point as 12 | // the focal point. 13 | return IntersectionTests.grazingAltitudeLocation(ray, Ellipsoid.WGS84); 14 | } 15 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/utils/getDefaultTerrain.ts: -------------------------------------------------------------------------------- 1 | import { EllipsoidTerrainProvider } from 'cesium'; 2 | 3 | export function getDefaultTerrain(): EllipsoidTerrainProvider { 4 | return new EllipsoidTerrainProvider(); 5 | } 6 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/utils/isFeature3D.ts: -------------------------------------------------------------------------------- 1 | import type { Feature, Geometry, Position } from 'geojson'; 2 | 3 | export function isFeature3D(feature: Feature): boolean { 4 | if ('coordinates' in feature.geometry) { 5 | let position: Position | Position[] | Position[][] | Position[][][] = 6 | feature.geometry.coordinates; 7 | while (Array.isArray(position)) { 8 | const next = position[0]; 9 | if (typeof next === 'number') { 10 | return position.length > 2; 11 | } else { 12 | position = next; 13 | } 14 | } 15 | } 16 | return false; 17 | } 18 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/utils/makeUrl.ts: -------------------------------------------------------------------------------- 1 | import { Resource } from 'cesium'; 2 | 3 | export function makeUrl( 4 | url: string, 5 | headers?: Record, 6 | ): string | Resource { 7 | if (headers) { 8 | return new Resource({ url, headers }); 9 | } 10 | return url; 11 | } 12 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/src/utils/whenSampleTerrainMostDetailed.ts: -------------------------------------------------------------------------------- 1 | import { EllipsoidTerrainProvider, sampleTerrainMostDetailed } from 'cesium'; 2 | 3 | import type { Cartographic, TerrainProvider } from 'cesium'; 4 | 5 | export function whenSampleTerrainMostDetailed( 6 | terrainProvider: TerrainProvider, 7 | positions: Cartographic[], 8 | callback: (e: any) => void, 9 | ): void { 10 | if (terrainProvider instanceof EllipsoidTerrainProvider) { 11 | positions.forEach((x) => (x.height = 0)); 12 | callback(positions); 13 | } else { 14 | sampleTerrainMostDetailed(terrainProvider, positions).then(callback); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | 4 | "include": [ 5 | "./src" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /packages/cesium-map-adapter/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/control-container/src/index.ts: -------------------------------------------------------------------------------- 1 | import { ControlContainer } from './ControlContainer'; 2 | 3 | export * from './interfaces'; 4 | 5 | export default ControlContainer; 6 | -------------------------------------------------------------------------------- /packages/control-container/src/interfaces.ts: -------------------------------------------------------------------------------- 1 | import type { MapAdapter } from '@nextgis/webmap'; 2 | 3 | export interface ControlContainerOptions { 4 | target?: string; 5 | classPrefix?: string; 6 | addClass?: string; 7 | map?: MapAdapter; 8 | } 9 | -------------------------------------------------------------------------------- /packages/control-container/src/svg/ctrl-zoom-in.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/control-container/src/svg/ctrl-zoom-out.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/control-container/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/dialog/src/dialog.css: -------------------------------------------------------------------------------- 1 | .dialog-component { 2 | border: 1px solid rgba(0, 0, 0, 0.3); 3 | box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); 4 | text-align: center; 5 | } 6 | 7 | .dialog-component::backdrop { 8 | position: fixed; 9 | top: 0; 10 | left: 0; 11 | right: 0; 12 | bottom: 0; 13 | background-color: rgba(0, 0, 0, 0.5); 14 | } 15 | 16 | .dialog-component__close { 17 | margin-top: -2px; 18 | float: right; 19 | line-height: 1; 20 | color: #000; 21 | text-shadow: 0 1px 0 #fff; 22 | filter: alpha(opacity=20); 23 | opacity: .2; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /packages/dialog/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Dialog } from './dialog'; 2 | 3 | import type { DialogAdapterOptions } from './interfaces'; 4 | 5 | export type { DialogAdapterOptions }; 6 | 7 | export default Dialog; 8 | -------------------------------------------------------------------------------- /packages/dialog/src/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface DialogAdapterOptions { 2 | template?: string | Node; 3 | openers?: HTMLElement[]; 4 | parent?: Node; 5 | closeBtn?: boolean; 6 | closeBtnTemplate?: string | Node; 7 | } 8 | 9 | export interface DialogAdapter { 10 | options: DialogAdapterOptions; 11 | show(): void; 12 | close(): void; 13 | updateContent(content?: string | Node): void; 14 | } 15 | -------------------------------------------------------------------------------- /packages/dialog/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/dom/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dom'; 2 | export * from './loadScript'; 3 | -------------------------------------------------------------------------------- /packages/dom/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/expression/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/expression.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/expression.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/expression/src/expressions/interpolationExpressions/index.ts: -------------------------------------------------------------------------------- 1 | import { interpolate } from './interpolate'; 2 | import { step } from './step'; 3 | 4 | import type { 5 | ExpressionFunc, 6 | InterpolationExpressionName, 7 | } from '../../interfaces'; 8 | 9 | export const interpolationExpressions: Record< 10 | InterpolationExpressionName, 11 | ExpressionFunc 12 | > = { 13 | step, 14 | interpolate, 15 | }; 16 | -------------------------------------------------------------------------------- /packages/expression/src/expressions/stringExpressions.ts: -------------------------------------------------------------------------------- 1 | import e from '../utils/evaluateArgs'; 2 | 3 | import type { ExpressionCbFunc, StringExpressionName } from '../interfaces'; 4 | 5 | export const stringExpressions: Record< 6 | StringExpressionName, 7 | ExpressionCbFunc 8 | > = { 9 | concat: e((args) => args.reduce((a, b) => String(a) + String(b), '')), 10 | downcase: e((args) => String(args[0]).toLowerCase()), 11 | upcase: e((args) => String(args[0]).toUpperCase()), 12 | }; 13 | -------------------------------------------------------------------------------- /packages/expression/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './interfaces'; 2 | export * from './expression'; 3 | -------------------------------------------------------------------------------- /packages/expression/src/utils/evaluateArgs.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | ExpressionCbFunc, 3 | ExpressionFunc, 4 | MapToCallback, 5 | SimpleType, 6 | } from '../interfaces'; 7 | 8 | export default function evaluateArgs< 9 | T extends SimpleType[] = SimpleType[], 10 | R = T[0], 11 | >(cb: ExpressionFunc): ExpressionCbFunc { 12 | return (args: MapToCallback, data) => { 13 | const unwrap = args.map((a) => a()) as T; 14 | return cb(unwrap, data); 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /packages/expression/src/utils/fallback.ts: -------------------------------------------------------------------------------- 1 | import { tryConvert } from './tryConvert'; 2 | 3 | import type { ExpressionFunc, SimpleType } from '../interfaces'; 4 | 5 | export default function fallback< 6 | T extends SimpleType[] = SimpleType[], 7 | R = T[0], 8 | >(cb: ExpressionFunc): ExpressionFunc { 9 | return (args: T[], data) => { 10 | for (const arg of args) { 11 | const result = tryConvert(cb, arg, data); 12 | if (result !== undefined) { 13 | return result; 14 | } 15 | } 16 | throw new Error(`Received a mismatched type`); 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /packages/expression/src/utils/tryConvert.ts: -------------------------------------------------------------------------------- 1 | export const tryConvert = ( 2 | converter: (arg: any, data: any) => any, 3 | arg: any, 4 | data: any, 5 | ): any => { 6 | try { 7 | const result = converter(arg, data); 8 | if (result !== undefined) { 9 | return result; 10 | } 11 | } catch { 12 | // ignore errors 13 | } 14 | return undefined; 15 | }; 16 | -------------------------------------------------------------------------------- /packages/expression/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/geocoder/examples/ngw-geocoder/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Geocoding by NGW vector layer", 3 | "description": "Show a list of unique values by fields from the resource of the NGV vector layer" 4 | } 5 | -------------------------------------------------------------------------------- /packages/geocoder/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/geocoder.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/geocoder.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/geocoder/src/GeocoderOptions.ts: -------------------------------------------------------------------------------- 1 | import type { BaseProvider } from './providers/BaseProvider'; 2 | 3 | /** 4 | * Defines the options for creating a Geocoder instance. 5 | */ 6 | export interface GeocoderOptions { 7 | /** 8 | * An array of providers to be used for geocoding. 9 | */ 10 | providers: BaseProvider[]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/geocoder/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Geocoder } from './Geocoder'; 2 | 3 | import type { GeocoderOptions } from './GeocoderOptions'; 4 | 5 | export { Geocoder, GeocoderOptions }; 6 | export { BaseProvider } from './providers/BaseProvider'; 7 | export { NgwProvider } from './providers/NgwProvider'; 8 | export { NominatimProvider } from './providers/NominatimProvider'; 9 | 10 | export * from './providers/BaseProviderOptions'; 11 | export * from './types/ResultItem'; 12 | export * from './types/SearchItem'; 13 | 14 | export function create(options: GeocoderOptions): Geocoder { 15 | return new Geocoder(options); 16 | } 17 | -------------------------------------------------------------------------------- /packages/geocoder/src/providers/BaseProviderOptions.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Options for initializing a basic search provider. 3 | */ 4 | export interface BaseProviderOptions { 5 | /** 6 | * URL endpoint for the search service. 7 | * This is where queries will be sent to obtain search results. 8 | */ 9 | searchUrl?: string; 10 | 11 | /** 12 | * Label to represent the provider. 13 | * This could be used for user interfaces to display the source of search results. 14 | */ 15 | label?: string; 16 | } 17 | -------------------------------------------------------------------------------- /packages/geocoder/src/types/ResultItem.ts: -------------------------------------------------------------------------------- 1 | import type { LngLatBoundsArray } from '@nextgis/utils'; 2 | import type { GeoJsonObject } from 'geojson'; 3 | 4 | export interface ResultItem { 5 | /** 6 | * Display text of the result item. 7 | */ 8 | text: string; 9 | 10 | /** 11 | * Bounding box of the result item in [west, south, east, north] format. 12 | */ 13 | extent: LngLatBoundsArray; 14 | 15 | /** 16 | * Optional GeoJSON geometry associated with this result item. 17 | */ 18 | geom?: GeoJsonObject; 19 | } 20 | -------------------------------------------------------------------------------- /packages/geocoder/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/global.d.ts: -------------------------------------------------------------------------------- 1 | // Global compile-time constants 2 | declare let __DEV__: boolean; 3 | declare let __TEST__: boolean; 4 | declare let __BROWSER__: boolean; 5 | declare let __GLOBAL__: boolean; 6 | declare let __ESM_BUNDLER__: boolean; 7 | declare let __ESM_BROWSER__: boolean; 8 | declare let __NODE_JS__: boolean; 9 | declare let __COMMIT__: string; 10 | declare let __VERSION__: string; 11 | 12 | declare module '*.png' { 13 | const value: any; 14 | export default value; 15 | } 16 | 17 | declare module '*.jpg' { 18 | const value: any; 19 | export default value; 20 | } 21 | 22 | declare module '*.svg' { 23 | const value: any; 24 | export default value; 25 | } 26 | -------------------------------------------------------------------------------- /packages/icons/examples/icon_shapes/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Icon props", 3 | "description": "" 4 | } 5 | -------------------------------------------------------------------------------- /packages/icons/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/item/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/item.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/item.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/item/src/Item.ts: -------------------------------------------------------------------------------- 1 | import { TreeHelper } from './TreeHelper'; 2 | import { ItemProperties } from './properties/ItemProperties'; 3 | 4 | import type { ItemOptions } from './interfaces'; 5 | 6 | let ID = 0; 7 | export class Item { 8 | options: O = {} as O; 9 | 10 | properties!: ItemProperties; 11 | tree: TreeHelper; 12 | id = ID; 13 | 14 | constructor(options?: O) { 15 | ID += 1; 16 | this.options = { ...options } as O; 17 | this.tree = new TreeHelper(this); 18 | } 19 | 20 | initProperties(): void { 21 | this.properties = new ItemProperties(this, this.options.properties); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/item/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Item } from './Item'; 2 | 3 | export * from './interfaces'; 4 | export * from './properties/BaseProperty'; 5 | export * from './properties/CheckProperty'; 6 | export * from './properties/ItemProperties'; 7 | 8 | export { Item }; 9 | -------------------------------------------------------------------------------- /packages/item/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/index.ts: -------------------------------------------------------------------------------- 1 | import { LeafletMapAdapter } from './LeafletMapAdapter'; 2 | 3 | export default LeafletMapAdapter; 4 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/layer-adapters/GeoJsonAdapter/index.ts: -------------------------------------------------------------------------------- 1 | export * from './GeoJsonAdapter'; 2 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/layer-adapters/ImageAdapter/imageQueue.ts: -------------------------------------------------------------------------------- 1 | import Queue from '@nextgis/queue'; 2 | 3 | const imageQueue = new Queue({ concurrency: 6, delay: 200 }); 4 | 5 | export default imageQueue; 6 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/layer-adapters/TileAdapter/TileLayer.ts: -------------------------------------------------------------------------------- 1 | import { TileLayer as TL } from 'leaflet'; 2 | 3 | import { makeRemote } from '../../utils/makeRemoteTileLayer'; 4 | 5 | import type { TileLayerOptions } from 'leaflet'; 6 | 7 | export type TileLayerOptionsExtended = TileLayerOptions & { 8 | headers?: Record; 9 | withCredentials?: boolean; 10 | setViewDelay?: number; 11 | }; 12 | 13 | class TileLayerBase extends TL { 14 | constructor(urlTemplate: string, options?: TileLayerOptionsExtended) { 15 | super(urlTemplate, options); 16 | Object.assign(this.options, options); 17 | } 18 | } 19 | 20 | export const TileLayer = makeRemote(TileLayerBase); 21 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/layer-adapters/WmsAdapter/WmsLayer.ts: -------------------------------------------------------------------------------- 1 | import { TileLayer } from 'leaflet'; 2 | 3 | import { makeRemote } from '../../utils/makeRemoteTileLayer'; 4 | 5 | import type { WMSOptions } from 'leaflet'; 6 | 7 | type LayerOptions = WMSOptions & { headers: any; withCredentials?: boolean }; 8 | 9 | class WmsLayerBase extends TileLayer.WMS { 10 | constructor(urlTemplate: string, options: LayerOptions) { 11 | super(urlTemplate, options); 12 | } 13 | } 14 | 15 | export const WmsLayer = makeRemote(WmsLayerBase); 16 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/leaflet.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace L { 2 | export interface Map { 3 | // _controlContainer: HTMLElement; 4 | // _addUnselectCb: (args: () => void) => void; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/utils/arrayToBoundsExpression.ts: -------------------------------------------------------------------------------- 1 | import type { LngLatBoundsArray } from '@nextgis/utils'; 2 | import type { LatLngBoundsExpression } from 'leaflet'; 3 | 4 | export function arrayToBoundsExpression( 5 | bounds: LngLatBoundsArray, 6 | ): LatLngBoundsExpression { 7 | const e = bounds; 8 | // top, left, bottom, right 9 | return [ 10 | [e[3], e[0]], 11 | [e[1], e[2]], 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/utils/boundsToArray.ts: -------------------------------------------------------------------------------- 1 | import type { LngLatBoundsArray } from '@nextgis/utils'; 2 | import type { LatLngBounds } from 'leaflet'; 3 | 4 | export function boundsToArray(bounds: LatLngBounds): LngLatBoundsArray { 5 | const ne = bounds.getNorthEast(); 6 | const sw = bounds.getSouthWest(); 7 | return [sw.lng, sw.lat, ne.lng, ne.lat]; 8 | } 9 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/src/utils/convertMapClickEvent.ts: -------------------------------------------------------------------------------- 1 | import type { MapClickEvent } from '@nextgis/webmap'; 2 | import type { LeafletMouseEvent } from 'leaflet'; 3 | 4 | export function convertMapClickEvent(evt: LeafletMouseEvent): MapClickEvent { 5 | const coord = evt.containerPoint; 6 | const latLng = evt.latlng; 7 | const { lat, lng } = latLng; 8 | return { 9 | latLng, 10 | lngLat: [lng, lat], 11 | pixel: { left: coord.x, top: coord.y }, 12 | source: evt, 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /packages/leaflet-map-adapter/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/logging/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/logging.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/logging.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/logging/src/engines/NgLogEngine/utils/generateSessionId.ts: -------------------------------------------------------------------------------- 1 | export function generateSessionId(length = 8) { 2 | const chars = 3 | 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 4 | let str = ''; 5 | for (let i = 0; i < length; i++) { 6 | str += chars.charAt(Math.floor(Math.random() * chars.length)); 7 | } 8 | return str; 9 | } 10 | -------------------------------------------------------------------------------- /packages/logging/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Logging } from './Logging'; 2 | import { ConsoleEngine } from './engines/ConsoleEngine'; 3 | import { NgLogEngine } from './engines/NgLogEngine/NgLogEngine'; 4 | 5 | export * from './interfaces'; 6 | 7 | export { Logging, ConsoleEngine, NgLogEngine }; 8 | -------------------------------------------------------------------------------- /packages/logging/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/controls/AttributionControl.ts: -------------------------------------------------------------------------------- 1 | // import { MapControl } from '@nextgis/webmap'; 2 | import { AttributionControl } from 'maplibre-gl'; 3 | 4 | export { AttributionControl }; 5 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/controls/CompassControl.ts: -------------------------------------------------------------------------------- 1 | import { NavigationControl } from 'maplibre-gl'; 2 | 3 | export function CompassControl(options: Record) { 4 | return new NavigationControl({ ...options, showZoom: false }); 5 | } 6 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/controls/ZoomControl.ts: -------------------------------------------------------------------------------- 1 | import { NavigationControl } from 'maplibre-gl'; 2 | 3 | import type { ZoomControlOptions } from '@nextgis/webmap'; 4 | 5 | export function ZoomControl(options: ZoomControlOptions) { 6 | return new NavigationControl({ ...options, showCompass: false }); 7 | } 8 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/index.ts: -------------------------------------------------------------------------------- 1 | import { MaplibreGLMapAdapter } from './MaplibreGLMapAdapter'; 2 | 3 | import type { MaplibreGLMapAdapterOptions } from './MaplibreGLMapAdapter'; 4 | 5 | export type { MaplibreGLMapAdapterOptions }; 6 | 7 | export default MaplibreGLMapAdapter; 8 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/interfaces.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | CircleLayerSpecification, 3 | FillLayerSpecification, 4 | LineLayerSpecification, 5 | SymbolLayerSpecification, 6 | } from 'maplibre-gl'; 7 | 8 | export type VectorLayerSpecification = 9 | | LineLayerSpecification 10 | | FillLayerSpecification 11 | | CircleLayerSpecification 12 | | SymbolLayerSpecification; 13 | 14 | export type SelectedFeaturesIds = (number | string)[]; 15 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/utils/arrayToBoundsLike.ts: -------------------------------------------------------------------------------- 1 | import type { LngLatBoundsArray } from '@nextgis/utils'; 2 | import type { LngLatBoundsLike } from 'maplibre-gl'; 3 | 4 | export function arrayToBoundsLike(bounds: LngLatBoundsArray): LngLatBoundsLike { 5 | const e = bounds; 6 | 7 | return [ 8 | [e[0], e[1]], 9 | [e[2], e[3]], 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/utils/convertMapClickEvent.ts: -------------------------------------------------------------------------------- 1 | import type { MapClickEvent } from '@nextgis/webmap'; 2 | import type { MapEventType, MapMouseEvent } from 'maplibre-gl'; 3 | 4 | export function convertMapClickEvent( 5 | evt: MapEventType['click'] & MapMouseEvent, 6 | ): MapClickEvent { 7 | const latLng = evt.lngLat; 8 | const { lng, lat } = latLng; 9 | const { x, y } = evt.point; 10 | return { 11 | latLng, 12 | lngLat: [lng, lat], 13 | pixel: { top: y, left: x }, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/utils/convertZoomLevel.ts: -------------------------------------------------------------------------------- 1 | export function convertZoomLevel(zoom: number) { 2 | return zoom - 1; 3 | } 4 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/src/utils/makeHtmlFromString.ts: -------------------------------------------------------------------------------- 1 | export function makeHtmlFromString(str: string): HTMLElement { 2 | const html = document.createElement('div'); 3 | html.innerHTML = str; 4 | return html; 5 | } 6 | -------------------------------------------------------------------------------- /packages/maplibre-gl-map-adapter/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-cesium/README.md: -------------------------------------------------------------------------------- 1 | # Ngw Cesium 2 | 3 | One file bundle for building [Cesium](https://cesium.com/) map interacting with NextGIS 4 | 5 | 6 | ## Commercial support 7 | 8 | Need to fix a bug or add a feature to `@nextgis/ngw-cesium`? We provide custom development and support for this software. [Contact us](http://nextgis.com/contact/) to discuss options! 9 | 10 | [![http://nextgis.com](https://nextgis.com/img/nextgis.png)](http://nextgis.com) 11 | -------------------------------------------------------------------------------- /packages/ngw-cesium/examples/cesium-map/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Show cesium map", 3 | "description": "" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-cesium/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | 4 | "include": [ 5 | "./src" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /packages/ngw-cesium/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-connector/examples/abort-controller/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Aborting requests", 3 | "description": "Different Ways to cancel requests" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-connector/examples/auth/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Authorization", 3 | "description": "" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-connector/examples/edit-vector-layer-fields/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Edit vector layer fields", 3 | "description": "Use PUT request to create update or delete NGW vector resource field" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-connector/examples/node-script/connect.js: -------------------------------------------------------------------------------- 1 | // const NgwConnector = require('@nextgis/ngw-connector'); 2 | const NgwConnector = require('../../lib/ngw-connector.cjs'); 3 | 4 | async function connect() { 5 | const connector = new NgwConnector({ baseUrl: 'https://demo.nextgis.com' }); 6 | try { 7 | console.log('start conection'); 8 | const route = await connector.connect(); 9 | console.log(route); 10 | } catch (er) { 11 | console.log(er); 12 | } 13 | } 14 | 15 | connect(); 16 | -------------------------------------------------------------------------------- /packages/ngw-connector/examples/request-transform/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Request transform", 3 | "description": "The ability to change each request at any time before sending" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-connector/examples/resource-item/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Get resource item from NGW", 3 | "description": "Use NGW connector to interact with Cloud api" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-connector/examples/resource-table/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Resource table", 3 | "description": "" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-connector/examples/search-resources/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Search resources", 3 | "description": "Use search API to get list of resources you need" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-connector/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/ngw-connector.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/ngw-connector.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/errors/InsufficientPermissionsError.ts: -------------------------------------------------------------------------------- 1 | import { NgwError } from './NgwError'; 2 | 3 | import type { NgwExceptions } from '../interfaces'; 4 | 5 | /** 6 | * Thrown when ... 7 | */ 8 | export class InsufficientPermissionsError extends NgwError { 9 | name = 'InsufficientPermissionsError'; 10 | exception: NgwExceptions = 11 | 'nextgisweb.core.exception.InsufficientPermissions'; 12 | 13 | constructor(obj: InsufficientPermissionsError) { 14 | super(obj); 15 | Object.setPrototypeOf(this, InsufficientPermissionsError.prototype); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/errors/NetworkError.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Thrown when... 3 | */ 4 | export class NetworkError extends Error { 5 | name = 'NetworkError'; 6 | 7 | constructor(url: string) { 8 | super(); 9 | Object.setPrototypeOf(this, NetworkError.prototype); 10 | this.message = `Unable to request ${url}. 11 | Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`; // /control-panel/cors 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/errors/NetworksResponseError.ts: -------------------------------------------------------------------------------- 1 | import { NgwError } from './NgwError'; 2 | 3 | /** 4 | * Thrown when ... 5 | */ 6 | export class NetworksResponseError extends NgwError { 7 | message = 8 | 'There is no response from the server or problem connecting to server.'; 9 | title = 'Network error'; 10 | detail = 'Check network connectivity and try again later.'; 11 | 12 | constructor(obj?: Partial) { 13 | super(obj); 14 | Object.setPrototypeOf(this, NetworksResponseError.prototype); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/errors/NgwError.ts: -------------------------------------------------------------------------------- 1 | import type { NgwExceptions } from '../interfaces'; 2 | 3 | /** 4 | * Thrown when... 5 | */ 6 | export class NgwError extends Error { 7 | name = 'NgwError'; 8 | 9 | title!: string; 10 | message!: string; 11 | detail!: string; 12 | exception!: NgwExceptions; 13 | status_code!: number | 404 | 500; 14 | data?: Record; 15 | guru_meditation!: string; 16 | 17 | constructor(er?: Partial) { 18 | super(); 19 | Object.assign(this, er); 20 | Object.setPrototypeOf(this, NgwError.prototype); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/errors/ResourceNotFoundError.ts: -------------------------------------------------------------------------------- 1 | import { NgwError } from './NgwError'; 2 | 3 | import type { NgwExceptions } from '../interfaces'; 4 | 5 | /** 6 | * Thrown when ... 7 | */ 8 | export class ResourceNotFoundError extends NgwError { 9 | name = 'ResourceNotFoundError'; 10 | exception: NgwExceptions = 'nextgisweb.resource.exception.ResourceNotFound'; 11 | 12 | constructor(obj?: ResourceNotFoundError) { 13 | super(obj); 14 | Object.setPrototypeOf(this, ResourceNotFoundError.prototype); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/errors/isError.ts: -------------------------------------------------------------------------------- 1 | import { isObject } from '@nextgis/utils'; 2 | 3 | export function isError(error: unknown): error is Error { 4 | if (isObject(error)) { 5 | return error.status_code && error.exception && error.title; 6 | } 7 | return false; 8 | } 9 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/index.ts: -------------------------------------------------------------------------------- 1 | import { NgwConnector } from './NgwConnector'; 2 | 3 | export * from './interfaces'; 4 | export * from './types/ResourceItem'; 5 | export * from './types/FeatureLayer'; 6 | export * from './types/RequestItemsParamsMap'; 7 | export * from './types/ResourceStore'; 8 | 9 | export default NgwConnector; 10 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/types/ResourceStore.ts: -------------------------------------------------------------------------------- 1 | export type ResourceStoreItemProperties = { [name: string]: any } | null; 2 | 3 | export type ResourceStoreItem< 4 | P extends ResourceStoreItemProperties = ResourceStoreItemProperties, 5 | > = ResourceStoreItemDefault & { data?: string } & P; 6 | 7 | export interface ResourceStoreItemDefault { 8 | [field: string]: string | number | boolean | null | Date; 9 | id: number; 10 | label: string; 11 | } 12 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/utils/isObject.ts: -------------------------------------------------------------------------------- 1 | export function isObject(val: unknown): val is Record { 2 | return Object.prototype.toString.call(val) === '[object Object]'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/utils/resourceCompare.ts: -------------------------------------------------------------------------------- 1 | import { objectDeepEqual } from '@nextgis/utils'; 2 | 3 | import type { Resource } from '../types/ResourceItem'; 4 | import type { DeepPartial } from '@nextgis/utils'; 5 | 6 | export function resourceCompare( 7 | res1: DeepPartial, 8 | res2: DeepPartial, 9 | ): boolean { 10 | return objectDeepEqual(res1, res2); 11 | } 12 | -------------------------------------------------------------------------------- /packages/ngw-connector/src/utils/template.ts: -------------------------------------------------------------------------------- 1 | // https://github.com/Leaflet/Leaflet/blob/b507e21c510b53cd704fb8d3f89bb46ea925c8eb/src/core/Util.js#L165 2 | const templateRe = /\{ *([\w_-]+) *\}/g; 3 | 4 | export function template(str: string, data: { [param: string]: any }): string { 5 | return str.replace(templateRe, (s, key) => { 6 | let value = data[key]; 7 | 8 | if (value === undefined) { 9 | throw new Error('No value provided for letiable ' + s); 10 | } else if (typeof value === 'function') { 11 | value = value(data); 12 | } 13 | return value; 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /packages/ngw-connector/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-kit/examples/add-feature-attachment/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Add attachment to feature", 3 | "description": "Add new attachment to feature in vector layer", 4 | "links": ["https://docs.nextgis.com/docs_ngweb_dev/doc/developer/create.html#add-attachment-to-feature"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-kit/examples/featch-ngw-layer-items/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Fetch NGW Layer items", 3 | "description": "Use NgwKit to load items from NGW vector layer" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-kit/examples/select-ngw-layer-distinct/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Select NGW Layer distinct", 3 | "description": "Show a list of unique values by fields from the resource of the NGV vector layer" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-kit/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/ngw-kit.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/ngw-kit.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/ngw-kit/src/constants.ts: -------------------------------------------------------------------------------- 1 | export const WEBMAP_BASELAYER_ID_PREFIX = 'webmap-baselayer'; 2 | -------------------------------------------------------------------------------- /packages/ngw-kit/src/utils/fetchNgwLayerCount.ts: -------------------------------------------------------------------------------- 1 | import type { FetchNgwLayerCountOptions } from '../interfaces'; 2 | import type CancelablePromise from '@nextgis/cancelable-promise'; 3 | 4 | export function fetchNgwLayerCount({ 5 | connector, 6 | resourceId, 7 | cache = true, 8 | }: FetchNgwLayerCountOptions): CancelablePromise { 9 | return connector 10 | .get( 11 | 'feature_layer.feature.count', 12 | { cache }, 13 | { 14 | id: resourceId, 15 | }, 16 | ) 17 | .then((resp) => { 18 | return resp.total_count; 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /packages/ngw-kit/src/utils/fetchNgwLayerFeature.ts: -------------------------------------------------------------------------------- 1 | import { createGeoJsonFeature } from './featureLayerUtils'; 2 | import { fetchNgwLayerItem } from './fetchNgwLayerItem'; 3 | 4 | import type { FetchNgwItemOptions } from '../interfaces'; 5 | import type CancelablePromise from '@nextgis/cancelable-promise'; 6 | import type { Feature, Geometry } from 'geojson'; 7 | 8 | export function fetchNgwLayerFeature< 9 | G extends Geometry = Geometry, 10 | P extends Record = Record, 11 | >(options: FetchNgwItemOptions

): CancelablePromise> { 12 | return fetchNgwLayerItem(options).then((item) => { 13 | return createGeoJsonFeature(item); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /packages/ngw-kit/src/utils/getLayerFilterOptions.ts: -------------------------------------------------------------------------------- 1 | import type { FilterOptions, GeoJsonAdapterOptions } from '@nextgis/webmap'; 2 | 3 | const filterOptionsKeys: (keyof FilterOptions)[] = [ 4 | 'fields', 5 | 'intersects', 6 | 'limit', 7 | 'orderBy', 8 | 'strategy', 9 | ]; 10 | 11 | export function getLayerFilterOptions( 12 | options: GeoJsonAdapterOptions, 13 | ): FilterOptions { 14 | const filterOptions: Record = {}; 15 | filterOptionsKeys.forEach((x) => { 16 | const opt = options[x]; 17 | if (opt !== undefined) { 18 | filterOptions[x] = opt; 19 | } 20 | }); 21 | return filterOptions as FilterOptions; 22 | } 23 | -------------------------------------------------------------------------------- /packages/ngw-kit/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/custom-layer-controls/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Custom layers control","description":"Enhancing interactive web maps with custom controls for layer management and visibility toggling.","tags":["custom controls","layer management"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/events/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Events","description":"Press `A` to add a random layer to the map; `H` to hide all layers from the map; `S` to restore visibility of all layers; `R` to remove all layers from map and memory. All these actions will call of events from a list in top left coner of the map."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/expression-paint-case/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with case","description":"Use case expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/expression-paint-interpolate/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with interpolate","description":"Use interpolate expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/expression-paint-match/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with match","description":"Use match expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/expression-paint-step/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with step","description":"Use step expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/expression-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint","description":"Use expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/geojson-data/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Set vector layer data","description":"Click the + button in the input on the right side of the screen to add new point in vector layer on map. Press - button to remove point from layer."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/geojson-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"GeoJSON data","description":""} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/icon_custom_svg/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Icons from SVG","description":"Integration and customization of user-defined SVG icons"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/icons/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Icons","description":""} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ip-cameras-map/index.json: -------------------------------------------------------------------------------- 1 | {"name":"IP cameras map","description":"Display the stream from the ip camera in the location","onlyForDemo":false} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/layers-opacity/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Layers opacity","description":"Set transparency with parameters and with method"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/layers-update/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Layers update","description":"A NextGIS Web raster-style vector layer is added to the map. Clicks on the map place points in this layer, automatically updating and reloading its raster styling."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/leaflet-geoman/index.json: -------------------------------------------------------------------------------- 1 | {"name":"GeoJSON data","description":""} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/map-init/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Initialize map","description":"Initialize map with default parameters"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/nextgis-geoservices/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Geoservices","description":"Add map layers from NextGIS Geoservices","tags":["nextgis","Geoservices"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-basemap/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW basemap resource","description":"Connect basemap resource from NGW. Click on '>>' to switch basemaps layers"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-bbox-plus-strategy/index.json: -------------------------------------------------------------------------------- 1 | {"name":"BBOX+ strategy for vector layer","description":"Use BBOX+ strategy to show large vector data resource. Reposition the map to add new data in parts. Try to fetch all layer data and then loading will be stopped. Use minZoom, maxBounds and another limitation to avoid the situation with full data load on start"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-bbox-strategy/index.json: -------------------------------------------------------------------------------- 1 | {"name":"BBOX strategy for vector layer","description":"Use BBOX strategy to show large vector data resource. Change the position of the map to update of the vector layer."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-layer-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer filtering","description":"Set the filter for NGW layer by features propery."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-layer-legend/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Style Layer legend","description":"Manually integrate a single NextGIS Web vector style layer into a map with an auto-generated legend."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-layer-popup/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer popup on select","description":""} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-layer-properties-filters/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer properties filters","description":"Set the filter for NGW layer by features property with 'AND' and 'ANY' operations."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-layer-select/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW select","description":""} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-layers/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Add different NGW resource","description":"Click on radio button in order to show on the map NGW resources by their ID. If the layer with adapter, related resource will be displayed automatic."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-postgis-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW PostGIS layer","description":"Add a layer based on PostGIS connection to the WebMap","tags":["PostGIS","DB"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-resources/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Multiple NGW layers","description":"Add multiple resources (vector layers) from NextGIS Web to a map using config. Click on the beige polygon layer to perform identification."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-tile-no-cors/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW tile layer no CORS","description":"Add a tile layer from NGW for guest user without CORS setup","tags":["tms","tile","CORS","ngw"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-tmsclient-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS Client layer","description":"Add a tile layer from NGW tms connection layer","tags":["tms","tile","tmsclient_layer"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-tsm-layer-auth/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS layer with auth","description":"Add a tile layer from protected NGW resource to a Web map","tags":["tms","tile"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-tsm-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS layer","description":"Add a tile layer from NGW resource to the WebMap","tags":["tms","tile"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-viewer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Ngw viewer","description":"Navigate the resource tree and open the allowed layers map preview"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-webmap-bookmarks/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map bookmarks","description":"Load and show bookmarks from NGW Web map resource"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-webmap-legend/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Web Vector Style Legends Integration","description":"Integrate symbols representing NextGIS Web vector style layers into map legends"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-webmap-zoom-range/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Toggle webmap by zoom levels","description":"Show NGW webmap layer only between allowed zoom levels. Zoom in and out to see how the layer will behave"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-webmap/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Add webmap from NextGIS Web","description":"Add webmap resource from NextGIS Web to the map"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-wms/index.json: -------------------------------------------------------------------------------- 1 | {"name":"WMS layer from NGW WMS","description":"Show WMS layer or layers from NGW WMS service."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/ngw-zoom-to-feature/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Zoom to NGW layer feature","description":"Show how to set map view from any NGW layer feature.","tags":["zoom to","go to","fit","paginate","table","list"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/properties-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Properties paint","description":"Use properties filter to set paint"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/tile-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Tile layer","description":"Add a tile layer to a Web map"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/toggle-control/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Toggle button control","description":"This is a two-state control button. Useful for switching modes of operation."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-adapter-select/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector adapter select","description":"Use adapter methods to select features of vector layer. Press CTRL with click to add new features in selection"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-add-while-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer add data while filtering","description":"Set the filter for the vector layer from the select in the top right corner. Try adding points by clicking on the colored buttons. If the color of the new point does not match the color of the selected filter, the point will be invisible."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-events-position-data/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector events position data","description":"Getting the extent and center for feature from a vector layer event"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer filtering","description":"Filter NGW layer by attribute"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-label-callback/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector label callback","description":"This example demonstrates the use of the 'label' option in a vector layer adapter. It showcases a callback function that returns a string to dynamically generate labels.","tags":["label","tooltip"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-label/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector label","description":"Show label by vector layer attributes","tags":["label","tooltip"]} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-line-arrow/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Line with mixed arrows","description":"Connect two points with a line that has an arrow originating from the line at one end and an arrow from a marker at the other end."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-mouse-events/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer mouse events","description":"Various ways to track events on clicks and hovers on a vector layer"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector painting","description":""} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-popup/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector popup","description":"Show popup on feature select"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-selection/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector selection","description":"Light up the star, illuminati!"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/vector-set-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector set paint","description":"Update paint of vector layer"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/webmap-identification-disabled/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web Map Layer-Specific Feature Identification","description":"If the NGW webmap layer item 'identifiable' setting is turned off, layers connected through 'addNgwLayer' will not be interactive in the frontend. This ensures that specific layers have identification disabled, preventing feature highlighting and event processing for these layers."} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/webmap-identification-multiply/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map feature identification","description":"Highlight and identify features on a Web map"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/webmap-identification/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map feature highlighting","description":"Highlight first Web map feature on mouse click"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/examples/webmap-layer-tree/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Webmap layers tree","description":"Create tree control to show and hide layers from webmap. Click on the checkboxes to switch the visibility of layers and groups. If you click on the group checkbox with pressed CTRL key, then the action will be propagate to all the nested layers of the group. Use the sliders to change the opacity hierarchically"} -------------------------------------------------------------------------------- /packages/ngw-leaflet/src/leaflet-style-override.css: -------------------------------------------------------------------------------- 1 | .ngw-map-container.leaflet-container { 2 | background: #fff; 3 | } 4 | 5 | .leaflet-pane .leaflet-popup-pane { 6 | z-index: 9999999999; 7 | } 8 | -------------------------------------------------------------------------------- /packages/ngw-leaflet/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-map/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/ngw-map.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/ngw-map.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/ngw-map/src/index.ts: -------------------------------------------------------------------------------- 1 | import { NgwMap } from './NgwMap'; 2 | 3 | import type { NgwMapOptions } from './interfaces'; 4 | 5 | export * from '@nextgis/webmap'; 6 | 7 | export * from './interfaces'; 8 | 9 | export { NgwMap }; 10 | 11 | export async function createNgwMap(options: NgwMapOptions): Promise { 12 | const ngwMap = new NgwMap(options); 13 | return ngwMap.onLoad(); 14 | } 15 | -------------------------------------------------------------------------------- /packages/ngw-map/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-map/types/reproject.d.ts: -------------------------------------------------------------------------------- 1 | import type { GeoJsonObject } from 'geojson'; 2 | 3 | export function detectCrs(geojson: GeoJsonObject, projs: any): any; 4 | export function reproject( 5 | geojson: GeoJsonObject, 6 | from: any, 7 | to: any, 8 | projs: any, 9 | ): GeoJsonObject; 10 | export function reverse(geojson: GeoJsonObject): GeoJsonObject; 11 | -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/custom-layer-controls/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Custom layers control","description":"Enhancing interactive web maps with custom controls for layer management and visibility toggling.","tags":["custom controls","layer management"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/events/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Events","description":"Press `A` to add a random layer to the map; `H` to hide all layers from the map; `S` to restore visibility of all layers; `R` to remove all layers from map and memory. All these actions will call of events from a list in top left coner of the map."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/expression-paint-case/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with case","description":"Use case expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/expression-paint-interpolate/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with interpolate","description":"Use interpolate expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/expression-paint-match/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with match","description":"Use match expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/expression-paint-step/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with step","description":"Use step expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/expression-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint","description":"Use expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/geojson-data/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Set vector layer data","description":"Click the + button in the input on the right side of the screen to add new point in vector layer on map. Press - button to remove point from layer."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/geojson-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"GeoJSON data","description":""} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/geojson-paint-cb/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Paint function for GeoJSON data", 3 | "description": "" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/icon_custom_svg/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Icons from SVG","description":"Integration and customization of user-defined SVG icons"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/icons/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Icons","description":""} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ip-cameras-map/index.json: -------------------------------------------------------------------------------- 1 | {"name":"IP cameras map","description":"Display the stream from the ip camera in the location","onlyForDemo":false} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/layers-opacity/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Layers opacity","description":"Set transparency with parameters and with method"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/layers-update/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Layers update","description":"A NextGIS Web raster-style vector layer is added to the map. Clicks on the map place points in this layer, automatically updating and reloading its raster styling."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/map-init/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Initialize map","description":"Initialize map with default parameters"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/nextgis-geoservices/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Geoservices","description":"Add map layers from NextGIS Geoservices","tags":["nextgis","Geoservices"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/nextgis-map-vector/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Map Vector tiles","description":"","_copiedFrom":"packages\\demo\\examples\\nextgis_map_vector"} 2 | -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-basemap/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW basemap resource","description":"Connect basemap resource from NGW. Click on '>>' to switch basemaps layers"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-bbox-plus-strategy/index.json: -------------------------------------------------------------------------------- 1 | {"name":"BBOX+ strategy for vector layer","description":"Use BBOX+ strategy to show large vector data resource. Reposition the map to add new data in parts. Try to fetch all layer data and then loading will be stopped. Use minZoom, maxBounds and another limitation to avoid the situation with full data load on start"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-bbox-strategy/index.json: -------------------------------------------------------------------------------- 1 | {"name":"BBOX strategy for vector layer","description":"Use BBOX strategy to show large vector data resource. Change the position of the map to update of the vector layer."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-layer-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer filtering","description":"Set the filter for NGW layer by features propery."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-layer-legend/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Style Layer legend","description":"Manually integrate a single NextGIS Web vector style layer into a map with an auto-generated legend."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-layer-popup/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer popup on select","description":""} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-layer-properties-filters/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer properties filters","description":"Set the filter for NGW layer by features property with 'AND' and 'ANY' operations."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-layer-select/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW select","description":""} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-layers/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Add different NGW resource","description":"Click on radio button in order to show on the map NGW resources by their ID. If the layer with adapter, related resource will be displayed automatic."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-mvt-match-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Match paint for NGW MVT Layer","description":"Use addNgwLayer to add MVT resources with attributes base paint"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-mvt-native-paint/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Native paint for NGW MVT Layer", 3 | "description": "Use maplibre-gl native style to paint MVT resource layer and its selection", 4 | "ngwMaps": ["ngw-maplibre-gl"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-mvt/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Add MVT NGW resource", 3 | "description": "" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-postgis-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW PostGIS layer","description":"Add a layer based on PostGIS connection to the WebMap","tags":["PostGIS","DB"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-resources/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Multiple NGW layers","description":"Add multiple resources (vector layers) from NextGIS Web to a map using config. Click on the beige polygon layer to perform identification."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-tile-no-cors/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW tile layer no CORS","description":"Add a tile layer from NGW for guest user without CORS setup","tags":["tms","tile","CORS","ngw"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-tmsclient-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS Client layer","description":"Add a tile layer from NGW tms connection layer","tags":["tms","tile","tmsclient_layer"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-tsm-layer-auth/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS layer with auth","description":"Add a tile layer from protected NGW resource to a Web map","tags":["tms","tile"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-tsm-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS layer","description":"Add a tile layer from NGW resource to the WebMap","tags":["tms","tile"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-viewer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Ngw viewer","description":"Navigate the resource tree and open the allowed layers map preview"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-webmap-bookmarks/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map bookmarks","description":"Load and show bookmarks from NGW Web map resource"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-webmap-legend/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Web Vector Style Legends Integration","description":"Integrate symbols representing NextGIS Web vector style layers into map legends"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-webmap-zoom-range/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Toggle webmap by zoom levels","description":"Show NGW webmap layer only between allowed zoom levels. Zoom in and out to see how the layer will behave"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-webmap/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Add webmap from NextGIS Web","description":"Add webmap resource from NextGIS Web to the map"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-wms/index.json: -------------------------------------------------------------------------------- 1 | {"name":"WMS layer from NGW WMS","description":"Show WMS layer or layers from NGW WMS service."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/ngw-zoom-to-feature/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Zoom to NGW layer feature","description":"Show how to set map view from any NGW layer feature.","tags":["zoom to","go to","fit","paginate","table","list"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/pin-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Properties paint","description":"Use properties filter to set paint","_copiedFrom":"packages\\demo\\examples\\pin_paint"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/properties-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Properties paint","description":"Use properties filter to set paint"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/tile-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Tile layer","description":"Add a tile layer to a Web map"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/toggle-control/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Toggle button control","description":"This is a two-state control button. Useful for switching modes of operation."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-adapter-select/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector adapter select","description":"Use adapter methods to select features of vector layer. Press CTRL with click to add new features in selection"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-add-while-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer add data while filtering","description":"Set the filter for the vector layer from the select in the top right corner. Try adding points by clicking on the colored buttons. If the color of the new point does not match the color of the selected filter, the point will be invisible."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-events-position-data/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector events position data","description":"Getting the extent and center for feature from a vector layer event"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer filtering","description":"Filter NGW layer by attribute"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-label-callback/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector label callback","description":"This example demonstrates the use of the 'label' option in a vector layer adapter. It showcases a callback function that returns a string to dynamically generate labels.","tags":["label","tooltip"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-label/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector label","description":"Show label by vector layer attributes","tags":["label","tooltip"]} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-line-arrow/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Line with mixed arrows","description":"Connect two points with a line that has an arrow originating from the line at one end and an arrow from a marker at the other end."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-mouse-events/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer mouse events","description":"Various ways to track events on clicks and hovers on a vector layer"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector painting","description":""} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-popup/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector popup","description":"Show popup on feature select"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-selection/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector selection","description":"Light up the star, illuminati!"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/vector-set-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector set paint","description":"Update paint of vector layer"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/webmap-identification-disabled/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web Map Layer-Specific Feature Identification","description":"If the NGW webmap layer item 'identifiable' setting is turned off, layers connected through 'addNgwLayer' will not be interactive in the frontend. This ensures that specific layers have identification disabled, preventing feature highlighting and event processing for these layers."} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/webmap-identification-multiply/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map feature identification","description":"Highlight and identify features on a Web map"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/webmap-identification/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map feature highlighting","description":"Highlight first Web map feature on mouse click"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/examples/webmap-layer-tree/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Webmap layers tree","description":"Create tree control to show and hide layers from webmap. Click on the checkboxes to switch the visibility of layers and groups. If you click on the group checkbox with pressed CTRL key, then the action will be propagate to all the nested layers of the group. Use the sliders to change the opacity hierarchically"} -------------------------------------------------------------------------------- /packages/ngw-maplibre-gl/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-ol/examples/custom-layer-controls/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Custom layers control","description":"Enhancing interactive web maps with custom controls for layer management and visibility toggling.","tags":["custom controls","layer management"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/events/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Events","description":"Press `A` to add a random layer to the map; `H` to hide all layers from the map; `S` to restore visibility of all layers; `R` to remove all layers from map and memory. All these actions will call of events from a list in top left coner of the map."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/expression-paint-case/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with case","description":"Use case expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/expression-paint-interpolate/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with interpolate","description":"Use interpolate expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/expression-paint-match/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with match","description":"Use match expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/expression-paint-step/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint with step","description":"Use step expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/expression-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Expression paint","description":"Use expressions to set paint"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/geojson-data/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Set vector layer data","description":"Click the + button in the input on the right side of the screen to add new point in vector layer on map. Press - button to remove point from layer."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/geojson-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"GeoJSON data","description":""} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/icon_custom_svg/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Icons from SVG","description":"Integration and customization of user-defined SVG icons"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/icons/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Icons","description":""} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ip-cameras-map/index.json: -------------------------------------------------------------------------------- 1 | {"name":"IP cameras map","description":"Display the stream from the ip camera in the location","onlyForDemo":false} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/layers-opacity/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Layers opacity","description":"Set transparency with parameters and with method"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/layers-update/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Layers update","description":"A NextGIS Web raster-style vector layer is added to the map. Clicks on the map place points in this layer, automatically updating and reloading its raster styling."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/map-init/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Initialize map","description":"Initialize map with default parameters"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/nextgis-geoservices/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Geoservices","description":"Add map layers from NextGIS Geoservices","tags":["nextgis","Geoservices"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-basemap/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW basemap resource","description":"Connect basemap resource from NGW. Click on '>>' to switch basemaps layers"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-bbox-plus-strategy/index.json: -------------------------------------------------------------------------------- 1 | {"name":"BBOX+ strategy for vector layer","description":"Use BBOX+ strategy to show large vector data resource. Reposition the map to add new data in parts. Try to fetch all layer data and then loading will be stopped. Use minZoom, maxBounds and another limitation to avoid the situation with full data load on start"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-bbox-strategy/index.json: -------------------------------------------------------------------------------- 1 | {"name":"BBOX strategy for vector layer","description":"Use BBOX strategy to show large vector data resource. Change the position of the map to update of the vector layer."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-cog-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW COG layer","description":"Add a COG GeoTIFF raster layer from NGW resource to the WebMap","tags":["cog","raster"]} 2 | -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-layer-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer filtering","description":"Set the filter for NGW layer by features propery."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-layer-legend/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Style Layer legend","description":"Manually integrate a single NextGIS Web vector style layer into a map with an auto-generated legend."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-layer-popup/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer popup on select","description":""} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-layer-properties-filters/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW layer properties filters","description":"Set the filter for NGW layer by features property with 'AND' and 'ANY' operations."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-layer-select/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW select","description":""} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-layers/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Add different NGW resource","description":"Click on radio button in order to show on the map NGW resources by their ID. If the layer with adapter, related resource will be displayed automatic."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-postgis-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW PostGIS layer","description":"Add a layer based on PostGIS connection to the WebMap","tags":["PostGIS","DB"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-resources/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Multiple NGW layers","description":"Add multiple resources (vector layers) from NextGIS Web to a map using config. Click on the beige polygon layer to perform identification."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-srs-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Ngw srs layer","description":"Eliminate reprojection errors for accurate measurements"} 2 | -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-tile-no-cors/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW tile layer no CORS","description":"Add a tile layer from NGW for guest user without CORS setup","tags":["tms","tile","CORS","ngw"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-tmsclient-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS Client layer","description":"Add a tile layer from NGW tms connection layer","tags":["tms","tile","tmsclient_layer"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-tsm-layer-auth/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS layer with auth","description":"Add a tile layer from protected NGW resource to a Web map","tags":["tms","tile"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-tsm-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NGW TMS layer","description":"Add a tile layer from NGW resource to the WebMap","tags":["tms","tile"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-viewer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Ngw viewer","description":"Navigate the resource tree and open the allowed layers map preview"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-webmap-bookmarks/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map bookmarks","description":"Load and show bookmarks from NGW Web map resource"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-webmap-legend/index.json: -------------------------------------------------------------------------------- 1 | {"name":"NextGIS Web Vector Style Legends Integration","description":"Integrate symbols representing NextGIS Web vector style layers into map legends"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-webmap-zoom-range/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Toggle webmap by zoom levels","description":"Show NGW webmap layer only between allowed zoom levels. Zoom in and out to see how the layer will behave"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-webmap/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Add webmap from NextGIS Web","description":"Add webmap resource from NextGIS Web to the map"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-wms/index.json: -------------------------------------------------------------------------------- 1 | {"name":"WMS layer from NGW WMS","description":"Show WMS layer or layers from NGW WMS service."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/ngw-zoom-to-feature/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Zoom to NGW layer feature","description":"Show how to set map view from any NGW layer feature.","tags":["zoom to","go to","fit","paginate","table","list"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/on-first-show-adapter-layer-control/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Take layer control in the OnFirstShowAdapter", 3 | "description": "The ability to access the layer in the OnFirstShowAdapter" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-ol/examples/properties-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Properties paint","description":"Use properties filter to set paint"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/tile-layer/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Tile layer","description":"Add a tile layer to a Web map"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/toggle control/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Toggle button control","description":"This is a two-state control button. Useful for switching certain modes of operation with the card.","_copiedFrom":"packages\\demo\\examples\\toggle control"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/toggle-control/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Toggle button control","description":"This is a two-state control button. Useful for switching modes of operation."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-adapter-select/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector adapter select","description":"Use adapter methods to select features of vector layer. Press CTRL with click to add new features in selection"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-add-while-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer add data while filtering","description":"Set the filter for the vector layer from the select in the top right corner. Try adding points by clicking on the colored buttons. If the color of the new point does not match the color of the selected filter, the point will be invisible."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-events-position-data/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector events position data","description":"Getting the extent and center for feature from a vector layer event"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-filtering/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer filtering","description":"Filter NGW layer by attribute"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-label-callback/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector label callback","description":"This example demonstrates the use of the 'label' option in a vector layer adapter. It showcases a callback function that returns a string to dynamically generate labels.","tags":["label","tooltip"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-label/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector label","description":"Show label by vector layer attributes","tags":["label","tooltip"]} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-line-arrow/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Line with mixed arrows","description":"Connect two points with a line that has an arrow originating from the line at one end and an arrow from a marker at the other end."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-mouse-events/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector layer mouse events","description":"Various ways to track events on clicks and hovers on a vector layer"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-native-options/index.json: -------------------------------------------------------------------------------- 1 | { "name": "Vector layer native options", "description": "" } 2 | -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector painting","description":""} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-popup/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector popup","description":"Show popup on feature select"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-selection/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector selection","description":"Light up the star, illuminati!"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/vector-set-paint/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Vector set paint","description":"Update paint of vector layer"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/webmap-identification-disabled/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web Map Layer-Specific Feature Identification","description":"If the NGW webmap layer item 'identifiable' setting is turned off, layers connected through 'addNgwLayer' will not be interactive in the frontend. This ensures that specific layers have identification disabled, preventing feature highlighting and event processing for these layers."} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/webmap-identification-multiply/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map feature identification","description":"Highlight and identify features on a Web map"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/webmap-identification/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Web map feature highlighting","description":"Highlight first Web map feature on mouse click"} -------------------------------------------------------------------------------- /packages/ngw-ol/examples/webmap-layer-tree/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Webmap layers tree","description":"Create tree control to show and hide layers from webmap. Click on the checkboxes to switch the visibility of layers and groups. If you click on the group checkbox with pressed CTRL key, then the action will be propagate to all the nested layers of the group. Use the sliders to change the opacity hierarchically"} -------------------------------------------------------------------------------- /packages/ngw-ol/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | throw new Error('No cjs module export for `@nextgis/ngw-ol` library'); 4 | -------------------------------------------------------------------------------- /packages/ngw-ol/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-orm/README.md: -------------------------------------------------------------------------------- 1 | # NextGIS Web ORM 2 | 3 | NextGIS Web Object-Relational Mapping 4 | 5 | ## Commercial support 6 | 7 | Need to fix a bug or add a feature to @nextgis/ngw-orm? We provide custom development and support for this software. [Contact us](http://nextgis.com/contact/) to discuss options! 8 | 9 | [![http://nextgis.com](https://nextgis.com/img/nextgis.png)](http://nextgis.com) 10 | -------------------------------------------------------------------------------- /packages/ngw-orm/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/ngw-orm.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/ngw-orm.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/common/DeepPartial.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Same as Partial but goes deeper and makes Partial all its properties and sub-properties. 3 | */ 4 | export type DeepPartial = { 5 | [P in keyof T]?: T[P] extends Array 6 | ? Array> 7 | : T[P] extends ReadonlyArray 8 | ? ReadonlyArray> 9 | : DeepPartial; 10 | }; 11 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/common/ObjectLiteral.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Interface of the simple literal object with any string keys. 3 | */ 4 | export interface ObjectLiteral { 5 | [key: string]: any; 6 | } 7 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/common/ObjectType.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/ban-types */ 2 | /** 3 | * Represents some Type of the Object. 4 | */ 5 | export type ObjectType = { new (): T } | Function; 6 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/connection/ConnectionOptions.ts: -------------------------------------------------------------------------------- 1 | import type { Credentials } from '@nextgis/ngw-connector'; 2 | 3 | /** 4 | * ConnectionOptions is an interface with settings and options for connection to NGW. 5 | */ 6 | export interface ConnectionOptions { 7 | baseUrl?: string; 8 | auth?: Credentials; 9 | cache?: boolean; 10 | } 11 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/decorator/NgwResource.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/ban-types */ 2 | import { getMetadataArgsStorage } from '..'; 3 | 4 | import type { ResourceMetadataArgs } from '../metadata-args/ResourceMetadataArgs'; 5 | import type { NgwResourceOptions } from '../options/NgwResourceOptions'; 6 | 7 | export function NgwResource(options: NgwResourceOptions): Function { 8 | return function (target: Function) { 9 | getMetadataArgsStorage().resources.push({ 10 | target, 11 | ...options, 12 | } as ResourceMetadataArgs); 13 | return target; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/error/CannotConnectAlreadyConnectedError.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Thrown when consumer tries to connect when he already connected. 3 | */ 4 | export class CannotConnectAlreadyConnectedError extends Error { 5 | name = 'CannotConnectAlreadyConnectedError'; 6 | 7 | constructor(connectionName: string) { 8 | super(); 9 | Object.setPrototypeOf(this, CannotConnectAlreadyConnectedError.prototype); 10 | this.message = `Cannot create a "${connectionName}" connection because connection to the NGW already established.`; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/error/CannotExecuteNotConnectedError.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Thrown when consumer tries to execute operation allowed only if connection is opened. 3 | */ 4 | export class CannotExecuteNotConnectedError extends Error { 5 | name = 'CannotExecuteNotConnectedError'; 6 | 7 | constructor() { 8 | super(); 9 | Object.setPrototypeOf(this, CannotExecuteNotConnectedError.prototype); 10 | this.message = `Cannot execute operation because connection is not yet established.`; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/error/CannotExecuteResourceNotExistError.ts: -------------------------------------------------------------------------------- 1 | import type { Connection } from '../connection/Connection'; 2 | 3 | export class CannotExecuteResourceNotExistError extends Error { 4 | name = 'CannotExecuteResourceNotExistError'; 5 | 6 | constructor(resource: string | number, connection: Connection) { 7 | super(); 8 | Object.setPrototypeOf(this, CannotExecuteResourceNotExistError.prototype); 9 | this.message = `Cannot find resource "${resource}" on "${connection.baseUrl}" connection.`; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/find-options/FindConditions.ts: -------------------------------------------------------------------------------- 1 | import type { Properties, PropertiesFilter } from '@nextgis/properties-filter'; 2 | 3 | export type FindConditions

= 4 | | PropertiesFilter

5 | | ObjectEqualConditions

; 6 | 7 | export type ObjectEqualConditions

= { 8 | [K in keyof P]?: any; 9 | }; 10 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/find-options/FindManyOptions.ts: -------------------------------------------------------------------------------- 1 | import type { FindOneOptions } from './FindOneOptions'; 2 | import type { Properties } from '@nextgis/properties-filter'; 3 | 4 | /** 5 | * Defines a special criteria to find specific entities. 6 | */ 7 | export interface FindManyOptions

8 | extends FindOneOptions

{ 9 | /** 10 | * Offset (paginated) where from entities should be taken. 11 | */ 12 | offset?: number; 13 | 14 | /** 15 | * Limit (paginated) - max number of entities should be taken. 16 | */ 17 | limit?: number; 18 | } 19 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/metadata-args/ColumnMetadataArgs.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/ban-types */ 2 | import type { ColumnOptions } from '../options/ColumnOptions'; 3 | 4 | /** 5 | * Arguments for ColumnMetadata class. 6 | */ 7 | export interface ColumnMetadataArgs { 8 | /** 9 | * Class to which column is applied. 10 | */ 11 | readonly target: Function | string; 12 | 13 | /** 14 | * Class's property name to which column is applied. 15 | */ 16 | readonly propertyName: string; 17 | 18 | /** 19 | * Extra column options. 20 | */ 21 | readonly options: ColumnOptions; 22 | } 23 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/metadata-args/ResourceMetadataArgs.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/ban-types */ 2 | import type { Connection } from '../connection/Connection'; 3 | import type { NgwResourceOptions } from '../options/NgwResourceOptions'; 4 | 5 | /** 6 | * Arguments for TableMetadata class, helps to construct an TableMetadata object. 7 | */ 8 | export interface ResourceMetadataArgs extends NgwResourceOptions { 9 | target?: Function | string; 10 | connection?: Connection; 11 | } 12 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/options/NgwResourceOptions.ts: -------------------------------------------------------------------------------- 1 | import type { ResourceCls } from '@nextgis/ngw-connector'; 2 | 3 | /** 4 | * Describes all resource's options. 5 | */ 6 | export interface NgwResourceOptions { 7 | type: ResourceCls; 8 | /** 9 | * Human readable name 10 | */ 11 | display_name: string; 12 | /** 13 | * Unique resource name. 14 | */ 15 | keyname?: string; 16 | description?: string; 17 | } 18 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/options/ToTypescriptOptions.ts: -------------------------------------------------------------------------------- 1 | export interface ToTypescript { 2 | model: string; 3 | interface: string; 4 | } 5 | 6 | export interface ToTypescriptOptions { 7 | name?: string; 8 | } 9 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/repository/LineLayer.ts: -------------------------------------------------------------------------------- 1 | import { VectorLayer } from './VectorLayer'; 2 | 3 | import type { GeometryType } from '@nextgis/ngw-connector'; 4 | import type { LineString } from 'geojson'; 5 | 6 | export class LineLayer extends VectorLayer { 7 | static geometryType: GeometryType = 'LINESTRING'; 8 | } 9 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/repository/PointLayer.ts: -------------------------------------------------------------------------------- 1 | import { VectorLayer } from './VectorLayer'; 2 | 3 | import type { GeometryType } from '@nextgis/ngw-connector'; 4 | import type { Point } from 'geojson'; 5 | 6 | export class PointLayer extends VectorLayer { 7 | static geometryType: GeometryType = 'POINT'; 8 | } 9 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/repository/PolygonLayer.ts: -------------------------------------------------------------------------------- 1 | import { VectorLayer } from './VectorLayer'; 2 | 3 | import type { GeometryType } from '@nextgis/ngw-connector'; 4 | import type { Polygon } from 'geojson'; 5 | 6 | export class PolygonLayer extends VectorLayer { 7 | static geometryType: GeometryType = 'POLYGON'; 8 | } 9 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/repository/ResourceGroup.ts: -------------------------------------------------------------------------------- 1 | import { BaseResource } from './BaseResource'; 2 | 3 | export class ResourceGroup extends BaseResource {} 4 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/repository/SyncOptions.ts: -------------------------------------------------------------------------------- 1 | import type { BaseResource } from './BaseResource'; 2 | import type { ResourceIdKeynameDef } from '@nextgis/ngw-connector'; 3 | 4 | export interface SyncOptions { 5 | parent: ResourceIdKeynameDef | typeof BaseResource; 6 | keyname?: string; 7 | display_name?: string; 8 | description?: string; 9 | } 10 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/sync-items/ResourceSyncItem.ts: -------------------------------------------------------------------------------- 1 | import type { Resource, ResourceCls } from '@nextgis/ngw-connector'; 2 | 3 | export type ResourceSyncItem< 4 | C extends Record = Record, 5 | > = BaseResourceSyncItem & { [key in ResourceCls]: C }; 6 | 7 | export interface BaseResourceSyncItem { 8 | resource: Resource; 9 | resmeta: { 10 | items: Record; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/sync-items/VectorResourceSyncItem.ts: -------------------------------------------------------------------------------- 1 | import type { BaseResourceSyncItem } from './ResourceSyncItem'; 2 | import type { FeatureResource, VectorLayer } from '@nextgis/ngw-connector'; 3 | 4 | export interface VectorResourceSyncItem extends BaseResourceSyncItem { 5 | vector_layer: VectorLayer & FeatureResource; 6 | } 7 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/sync-items/VectorResourceUpdateItem.ts: -------------------------------------------------------------------------------- 1 | import type { BaseResourceSyncItem } from './ResourceSyncItem'; 2 | import type { FeatureResource } from '@nextgis/ngw-connector'; 3 | 4 | export interface VectorResourceUpdateItem extends BaseResourceSyncItem { 5 | feature_layer: FeatureResource; 6 | } 7 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/types/ColumnTypes.ts: -------------------------------------------------------------------------------- 1 | import type { VectorFieldDatatype } from '@nextgis/ngw-connector'; 2 | 3 | /** 4 | * Any vector layer column type column can be. 5 | */ 6 | export type ColumnType = VectorFieldDatatype; 7 | -------------------------------------------------------------------------------- /packages/ngw-orm/src/types/ValidateErrorType.ts: -------------------------------------------------------------------------------- 1 | export interface ValidateErrorType { 2 | type: string; 3 | message: string; 4 | context?: string[]; 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-orm/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-uploader-input/examples/create_wms/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Create WMS service", 3 | "description": "Use of additional `createInput`-method parameters for processing the result, error and name formation. Demonstration of creating WMS service from style" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-uploader-input/examples/make_auth/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Raster upload after login", 3 | "description": "" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-uploader-input/examples/make_auth_dialog/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Raster upload after login (dialog)", 3 | "description": "" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-uploader-input/examples/simple_input/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Raster upload with createInput", 3 | "description": "A simple example showing how to use ngw-uploader-input to upload a GEOTIFF to the NextGIS Web cloud" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-uploader-input/src/index.ts: -------------------------------------------------------------------------------- 1 | import { NgwUploaderInput } from './NgwUploaderInput'; 2 | 3 | export * from './interfaces'; 4 | 5 | export default NgwUploaderInput; 6 | -------------------------------------------------------------------------------- /packages/ngw-uploader-input/src/ngw-uploader.css: -------------------------------------------------------------------------------- 1 | .ngw-uploader__login-dialog--form { 2 | text-align: left; 3 | line-height: 2rem; 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-uploader-input/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | import type { ImageTypes } from '@nextgis/ngw-uploader'; 2 | 3 | export const imageTypesAccept: { [format: string]: ImageTypes[] } = { 4 | tiff: ['image/tif', 'image/tiff', '.tif'], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ngw-uploader-input/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ngw-uploader/examples/custom_input/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Raster upload to map", 3 | "description": "This example shows how to add a newly created raster on the map" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-uploader/examples/node-script/buildings.shp.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/packages/ngw-uploader/examples/node-script/buildings.shp.zip -------------------------------------------------------------------------------- /packages/ngw-uploader/examples/node-script/railway_stations.shp.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextgis/nextgis_frontend/c13883ce8b5c8cb7e33ba2866b182ffa629053c7/packages/ngw-uploader/examples/node-script/railway_stations.shp.zip -------------------------------------------------------------------------------- /packages/ngw-uploader/examples/proxy-wms-2/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vendor param in WMS Layer", 3 | "description": "Create proxy WMS service from remote WMS layers with vendor parameters." 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-uploader/examples/proxy-wms/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Proxy external WMS service", 3 | "description": "This example create NextGIS Web WMS service which proxies external WMS service with selected layers" 4 | } 5 | -------------------------------------------------------------------------------- /packages/ngw-uploader/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/ngw-uploader.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/ngw-uploader.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/ngw-uploader/src/index.ts: -------------------------------------------------------------------------------- 1 | import { NgwUploader } from './NgwUploader'; 2 | 3 | export * from './interfaces'; 4 | 5 | export default NgwUploader; 6 | -------------------------------------------------------------------------------- /packages/ngw-uploader/src/utils/createResourceOptions.ts: -------------------------------------------------------------------------------- 1 | import { createResourceName } from './createName'; 2 | 3 | import type { ResourceCreateOptions } from '../interfaces'; 4 | import type { ResourceCls } from '@nextgis/ngw-connector'; 5 | 6 | export function createResourceOptions( 7 | cls: ResourceCls, 8 | opt: ResourceCreateOptions, 9 | ) { 10 | const name = createResourceName(opt); 11 | return { 12 | cls, 13 | parent: { 14 | id: opt.parentId !== undefined ? opt.parentId : opt.id, 15 | }, 16 | display_name: name, 17 | keyname: opt.keyname || null, 18 | description: opt.description || null, 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /packages/ngw-uploader/src/utils/template.ts: -------------------------------------------------------------------------------- 1 | // from leaflet Util.js 2 | const templateRe = /\{ *([\w_-]+) *\}/g; 3 | 4 | export function template(str: string, data: Record): string { 5 | return str.replace(templateRe, function (s, key) { 6 | let value = data[key]; 7 | 8 | if (value === undefined) { 9 | value = ''; 10 | } else if (typeof value === 'function') { 11 | value = value(data); 12 | } 13 | return value; 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /packages/ngw-uploader/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/src/controls/Attribution.ts: -------------------------------------------------------------------------------- 1 | import Attr from 'ol/control/Attribution'; 2 | 3 | import type { AttributionControlOptions } from '@nextgis/webmap'; 4 | 5 | const OPTIONS = { 6 | collapsible: false, 7 | }; 8 | 9 | export class Attribution extends Attr { 10 | constructor(options: AttributionControlOptions) { 11 | super({ ...OPTIONS, ...options }); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/src/controls/ZoomControl.css: -------------------------------------------------------------------------------- 1 | .ol-zoom button { 2 | font-size: 1.14em; 3 | font-weight: bold; 4 | color: black; 5 | } 6 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/src/controls/ZoomControl.ts: -------------------------------------------------------------------------------- 1 | import './ZoomControl.css'; 2 | 3 | import Zoom from 'ol/control/Zoom'; 4 | 5 | export class ZoomControl extends Zoom { 6 | constructor(...args: any[]) { 7 | super(...args); 8 | this.element.classList.remove('ol-control'); 9 | this.element.classList.add('webmap-ctrl-group'); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/src/controls/createButtonControl.css: -------------------------------------------------------------------------------- 1 | .custom-button-control { 2 | line-height: inherit!important; 3 | font-weight: normal!important; 4 | } 5 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/src/index.ts: -------------------------------------------------------------------------------- 1 | import { OlMapAdapter } from './OlMapAdapter'; 2 | 3 | export default OlMapAdapter; 4 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/src/layer-adapters/BaseAdapter.ts: -------------------------------------------------------------------------------- 1 | import type { AdapterOptions, MainLayerAdapter } from '@nextgis/webmap'; 2 | import type Map from 'ol/Map'; 3 | import type Base from 'ol/layer/Base'; 4 | 5 | export class BaseAdapter implements Partial { 6 | layer?: Base; 7 | 8 | constructor( 9 | public map: Map, 10 | public options: AdapterOptions, 11 | ) {} 12 | 13 | setOpacity(val: number): void { 14 | this.options.opacity = Number(val); 15 | if (this.layer && this.layer.setOpacity) { 16 | this.layer.setOpacity(this.options.opacity); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/src/utils/getUrlsWithSubdomains.ts: -------------------------------------------------------------------------------- 1 | export function getUrlsWithSubdomains( 2 | url: string, 3 | subdomains?: string | string[], 4 | ): string[] { 5 | const urls: string[] = []; 6 | const subdomains_: string[] | undefined = 7 | typeof subdomains === 'string' ? subdomains.split('') : subdomains; 8 | if (subdomains_?.length) { 9 | subdomains_.forEach((x) => { 10 | urls.push(url.replace(/{s}/, x)); 11 | }); 12 | } else { 13 | urls.push(url); 14 | } 15 | return urls; 16 | } 17 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/src/utils/makeHtmlFromString.ts: -------------------------------------------------------------------------------- 1 | export function makeHtmlFromString(str: string): HTMLElement { 2 | const html = document.createElement('div'); 3 | html.innerHTML = str; 4 | return html; 5 | } 6 | -------------------------------------------------------------------------------- /packages/ol-map-adapter/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/paint/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/paint.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/paint.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/paint/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './interfaces'; 2 | export * from './typeHelpers'; 3 | export * from './fromPaintExpression'; 4 | export * from './preparePaint'; 5 | -------------------------------------------------------------------------------- /packages/paint/src/pinBuilder.ts: -------------------------------------------------------------------------------- 1 | export interface FromMakiOptions { 2 | name: string; 3 | color?: string; 4 | size?: number; 5 | } 6 | 7 | export function fromMakiIcon(): void { 8 | // 9 | } 10 | -------------------------------------------------------------------------------- /packages/paint/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/progress/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/progress.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/progress.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/progress/src/ProgressEvents.ts: -------------------------------------------------------------------------------- 1 | export interface ProgressEvents { 2 | /** 3 | * @eventProperty 4 | */ 5 | add: any; 6 | /** 7 | * @eventProperty 8 | */ 9 | remove: any; 10 | /** 11 | * @eventProperty 12 | */ 13 | start: any; 14 | /** 15 | * @eventProperty 16 | */ 17 | stop: any; 18 | } 19 | -------------------------------------------------------------------------------- /packages/progress/src/index.ts: -------------------------------------------------------------------------------- 1 | import type { Progress } from './Progress'; 2 | 3 | export type * from './ProgressEvents'; 4 | 5 | export default Progress; 6 | -------------------------------------------------------------------------------- /packages/progress/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/properties-filter/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/properties-filter.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/properties-filter.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/properties-filter/src/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | checkIfPropertyFilter, 3 | propertiesFilter, 4 | isPropertyFilter, 5 | featureFilter, 6 | } from './propertiesFilter'; 7 | export type { 8 | Operation, 9 | Operations, 10 | Properties, 11 | PropertyFilter, 12 | PropertiesFilter, 13 | } from './interfaces'; 14 | -------------------------------------------------------------------------------- /packages/properties-filter/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/qms-kit/examples/create-adapter/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Create adapter","description":"Add baselayer from create qms adapter"} 2 | -------------------------------------------------------------------------------- /packages/qms-kit/examples/webmap-starter-kit/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Webmap starter kit","description":"Add baselayer as QMS webmap starter kit"} 2 | -------------------------------------------------------------------------------- /packages/qms-kit/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/qms-kit.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/qms-kit.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/qms-kit/src/index.ts: -------------------------------------------------------------------------------- 1 | import { QmsKit } from './QmsKit'; 2 | 3 | export * from './interfaces'; 4 | 5 | export * from './utils/createQmsAdapter'; 6 | export * from './utils/updateQmsOptions'; 7 | 8 | export { QmsKit }; 9 | -------------------------------------------------------------------------------- /packages/qms-kit/src/utils/getSubmodulesFromOriginUrl.ts: -------------------------------------------------------------------------------- 1 | export function getSubdomainsOriginUrl(originUrl: string): [string, string[]] { 2 | const submodules: string[] = []; 3 | originUrl = originUrl.replace(/{switch:(.*?)}/, (m, group) => { 4 | if (typeof group === 'string') { 5 | group.split(',').forEach((s) => submodules.push(s)); 6 | } 7 | return '{s}'; 8 | }); 9 | return [originUrl, submodules]; 10 | } 11 | -------------------------------------------------------------------------------- /packages/qms-kit/src/utils/loadJson.ts: -------------------------------------------------------------------------------- 1 | import { fixUrlStr } from '@nextgis/utils'; 2 | 3 | export function loadJson(url: string): Promise { 4 | return new Promise((resolve, reject) => { 5 | const xmlHttp = new XMLHttpRequest(); 6 | xmlHttp.onreadystatechange = () => { 7 | if (xmlHttp.readyState === 4 && xmlHttp.status === 200) { 8 | if (xmlHttp.responseText) { 9 | try { 10 | resolve(JSON.parse(xmlHttp.responseText)); 11 | } catch (er) { 12 | reject(er); 13 | } 14 | } 15 | } 16 | }; 17 | xmlHttp.open('GET', fixUrlStr(url), true); // true for asynchronous 18 | xmlHttp.send(); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /packages/qms-kit/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/queue/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/queue.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/queue.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/queue/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Queue } from './Queue'; 2 | 3 | export default Queue; 4 | -------------------------------------------------------------------------------- /packages/queue/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-ngw-leaflet/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/react-ngw-leaflet.esm-bundler.js'); 5 | } else { 6 | module.exports = require('./lib/react-ngw-leaflet.esm-bundler.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-ngw-leaflet/src/index.ts: -------------------------------------------------------------------------------- 1 | import { ReactNgwLeaflet } from './ReactNgwLeaflet'; 2 | 3 | export default ReactNgwLeaflet; 4 | -------------------------------------------------------------------------------- /packages/react-ngw-map/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/react-ngw-map.esm-bundler.js'); 5 | } else { 6 | module.exports = require('./lib/react-ngw-map.esm-bundler.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-ngw-map/src/component.ts: -------------------------------------------------------------------------------- 1 | import { forwardRef, useImperativeHandle } from 'react'; 2 | 3 | import { useNgwMapContext } from './context'; 4 | 5 | import type { ElementHook } from './element'; 6 | import type { Ref } from 'react'; 7 | 8 | export function createWebMapComponent(useElement: ElementHook) { 9 | function WebMapComponent(props: P, ref: Ref) { 10 | const context = useNgwMapContext(); 11 | const { instance } = useElement(props, context).current; 12 | useImperativeHandle(ref, () => instance); 13 | 14 | return null; 15 | } 16 | 17 | return forwardRef(WebMapComponent); 18 | } 19 | -------------------------------------------------------------------------------- /packages/react-ngw-map/src/context.ts: -------------------------------------------------------------------------------- 1 | import { createContext, useContext } from 'react'; 2 | 3 | import type { NgwMapContextInterface } from './interfaces'; 4 | 5 | export const NgwMapContext = createContext(null); 6 | 7 | export const NgwMapProvider = NgwMapContext.Provider; 8 | 9 | export function useNgwMapContext(): NgwMapContextInterface { 10 | const context = useContext(NgwMapContext); 11 | if (context === null) { 12 | throw new Error( 13 | 'No context provided: useNgwMapContext() can only be used in a descendant of ', 14 | ); 15 | } 16 | return context; 17 | } 18 | -------------------------------------------------------------------------------- /packages/react-ngw-map/src/hooks.ts: -------------------------------------------------------------------------------- 1 | import { useNgwMapContext } from './context'; 2 | 3 | import type { NgwMap } from '@nextgis/ngw-map'; 4 | 5 | export function useNgwMap(): NgwMap { 6 | return useNgwMapContext().ngwMap; 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-ngw-map/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './interfaces'; 2 | 3 | export { ReactNgwMap } from './ReactNgwMap'; 4 | export { MapControl } from './MapControl'; 5 | export { ButtonControl } from './ButtonControl'; 6 | export { ToggleControl } from './ToggleControl'; 7 | export { useNgwMapContext } from './context'; 8 | -------------------------------------------------------------------------------- /packages/react-ngw-map/src/utils/shallowEqual.ts: -------------------------------------------------------------------------------- 1 | export function shallowEqual( 2 | obj1: Record, 3 | obj2: Record, 4 | ) { 5 | const keys1 = Object.keys(obj1); 6 | const keys2 = Object.keys(obj2); 7 | 8 | if (keys1.length !== keys2.length) { 9 | return false; 10 | } 11 | 12 | for (const key of keys1) { 13 | if ( 14 | !Object.prototype.hasOwnProperty.call(obj2, key) || 15 | obj1[key] !== obj2[key] 16 | ) { 17 | return false; 18 | } 19 | } 20 | 21 | return true; 22 | } 23 | -------------------------------------------------------------------------------- /packages/react-ngw-maplibre-gl/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/react-ngw-maplibre-gl.esm-bundler.js'); 5 | } else { 6 | module.exports = require('./lib/react-ngw-maplibre-gl.esm-bundler.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-ngw-maplibre-gl/src/ReactNgwMaplibreGL.ts: -------------------------------------------------------------------------------- 1 | import MapAdapter from '@nextgis/maplibre-gl-map-adapter'; 2 | import { ReactNgwMap } from '@nextgis/react-ngw-map'; 3 | import { createElement } from 'react'; 4 | 5 | import type { MapContainerProps } from '@nextgis/react-ngw-map'; 6 | import type { Map } from 'maplibre-gl'; 7 | 8 | import 'maplibre-gl/dist/maplibre-gl.css'; 9 | 10 | export function ReactNgwMaplibreGL< 11 | Props extends MapContainerProps = MapContainerProps, 12 | >(props: Props) { 13 | const p = { ...props, mapAdapter: new MapAdapter() }; 14 | return createElement(ReactNgwMap, p); 15 | } 16 | -------------------------------------------------------------------------------- /packages/react-ngw-maplibre-gl/src/index.ts: -------------------------------------------------------------------------------- 1 | import { ReactNgwMaplibreGL } from './ReactNgwMaplibreGL'; 2 | 3 | export default ReactNgwMaplibreGL; 4 | -------------------------------------------------------------------------------- /packages/react-ngw-ol/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/react-ngw-ol.esm-bundler.js'); 5 | } else { 6 | module.exports = require('./lib/react-ngw-ol.esm-bundler.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/react-ngw-ol/src/ReactNgwOl.ts: -------------------------------------------------------------------------------- 1 | import MapAdapter from '@nextgis/ol-map-adapter'; 2 | import { ReactNgwMap } from '@nextgis/react-ngw-map'; 3 | import { createElement } from 'react'; 4 | 5 | import 'ol/ol.css'; 6 | 7 | import type { MapContainerProps } from '@nextgis/react-ngw-map'; 8 | import type Map from 'ol/Map'; 9 | 10 | export function ReactNgwOl< 11 | Props extends MapContainerProps = MapContainerProps, 12 | >(props: Props) { 13 | const p = { ...props, mapAdapter: new MapAdapter() }; 14 | return createElement(ReactNgwMap, p); 15 | } 16 | -------------------------------------------------------------------------------- /packages/react-ngw-ol/src/index.ts: -------------------------------------------------------------------------------- 1 | import { ReactNgwOl } from './ReactNgwOl'; 2 | 3 | export default ReactNgwOl; 4 | -------------------------------------------------------------------------------- /packages/tree/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/tree.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/tree.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/tree/src/index.ts: -------------------------------------------------------------------------------- 1 | import { Tree } from './Tree'; 2 | import { treeEvery, treeFilter, treeFind, treeSome } from './treeFilter'; 3 | 4 | export { treeEvery, treeFilter, treeFind, treeSome, Tree }; 5 | 6 | // shortcut to use like `Tree.find` from global scope 7 | export { 8 | treeEvery as every, 9 | treeFilter as filter, 10 | treeFind as find, 11 | treeSome as some, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/tree/src/interfaces.ts: -------------------------------------------------------------------------------- 1 | export type SelfFilter = (x: TREE_ITEM) => boolean; 2 | export type RelationFunction = ( 3 | x: TREE_ITEM, 4 | ) => TREE_ITEM | TREE_ITEM[] | undefined; 5 | export type TreeRelation = 6 | | RelationFunction 7 | | string; 8 | 9 | export type DefaultTreeItem = Record; 10 | 11 | export interface TreeOptions { 12 | relation?: TreeRelation; 13 | } 14 | -------------------------------------------------------------------------------- /packages/tree/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/url-runtime-params/README.md: -------------------------------------------------------------------------------- 1 | # UrlRuntimeParams 2 | 3 | ![size](https://img.shields.io/bundlephobia/minzip/@nextgis/url-runtime-params) ![version](https://img.shields.io/npm/v/@nextgis/url-runtime-params) 4 | 5 | Control of writing and reading URL parameters 6 | 7 | [![http://nextgis.com](https://nextgis.com/img/nextgis.png)](http://nextgis.com) 8 | -------------------------------------------------------------------------------- /packages/url-runtime-params/src/index.ts: -------------------------------------------------------------------------------- 1 | import { UrlRuntimeParams } from './UrlRuntimeParams'; 2 | 3 | export * from './interfaces'; 4 | 5 | export default UrlRuntimeParams; 6 | -------------------------------------------------------------------------------- /packages/url-runtime-params/src/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface StateData { 2 | state: { url: string; type?: 'remove'; params?: { [name: string]: string } }; 3 | url: string; 4 | } 5 | 6 | export interface Params { 7 | [paramName: string]: any; 8 | } 9 | -------------------------------------------------------------------------------- /packages/url-runtime-params/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/utils/examples/clipboard-esm/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Clipboard","description":""} 2 | -------------------------------------------------------------------------------- /packages/utils/examples/clipboard/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Clipboard","description":""} 2 | -------------------------------------------------------------------------------- /packages/utils/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/utils.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/utils.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/utils/src/array/arrayChunk.ts: -------------------------------------------------------------------------------- 1 | export function arrayChunk(arr: T[], size: number): T[][] { 2 | return Array.from({ length: Math.ceil(arr.length / size) }, (v, i) => 3 | arr.slice(i * size, i * size + size), 4 | ); 5 | } 6 | -------------------------------------------------------------------------------- /packages/utils/src/array/arrayUnique.ts: -------------------------------------------------------------------------------- 1 | export function arrayUnique(arr: T[]): T[] { 2 | return arr.filter((elem, pos, arr) => { 3 | return arr.indexOf(elem) == pos; 4 | }); 5 | } 6 | -------------------------------------------------------------------------------- /packages/utils/src/array/index.ts: -------------------------------------------------------------------------------- 1 | export { arrayCompare, arrayCompareStrict } from './arrayCompare'; 2 | export * from './arrayUnique'; 3 | export * from './arrayChunk'; 4 | -------------------------------------------------------------------------------- /packages/utils/src/debug/debugLog.ts: -------------------------------------------------------------------------------- 1 | export function debugLog(message?: string): boolean { 2 | // @ts-ignore 3 | if (__DEV__) { 4 | console.trace('DEBUG: ' + message); 5 | return true; 6 | } 7 | return false; 8 | } 9 | -------------------------------------------------------------------------------- /packages/utils/src/debug/index.ts: -------------------------------------------------------------------------------- 1 | export * from './debugLog'; 2 | -------------------------------------------------------------------------------- /packages/utils/src/deprecated/deprecatedWarn.ts: -------------------------------------------------------------------------------- 1 | /** @internal */ 2 | export function deprecatedWarn(message: string): void { 3 | console.warn(`DEPRECATED WARN: ${message}`); 4 | } 5 | -------------------------------------------------------------------------------- /packages/utils/src/deprecated/index.ts: -------------------------------------------------------------------------------- 1 | export * from './deprecatedMapClick'; 2 | export * from './deprecatedWarn'; 3 | -------------------------------------------------------------------------------- /packages/utils/src/geom/constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Radius of the earth in kilometers 3 | */ 4 | export const EARTHS_RADIUS = 6371; 5 | -------------------------------------------------------------------------------- /packages/utils/src/geom/geom.ts: -------------------------------------------------------------------------------- 1 | import type { LatLng, LngLatArray } from './interfaces'; 2 | 3 | export function latLngToLngLatArray(latLng: LatLng): LngLatArray { 4 | return [latLng.lng, latLng.lat]; 5 | } 6 | 7 | export function lngLatArrayToLatLng(coord: LngLatArray): LatLng { 8 | return { lat: coord[1], lng: coord[0] }; 9 | } 10 | -------------------------------------------------------------------------------- /packages/utils/src/geom/getIdentifyRadius.ts: -------------------------------------------------------------------------------- 1 | import type { LngLatArray } from '@nextgis/utils'; 2 | 3 | export function getIdentifyRadius( 4 | center: LngLatArray, 5 | zoom: number, 6 | pixelRadius: number, 7 | ): number { 8 | pixelRadius = pixelRadius ?? 10; 9 | const metresPerPixel = 10 | (40075016.686 * Math.abs(Math.cos((center[1] * 180) / Math.PI))) / 11 | Math.pow(2, zoom + 8); 12 | const radius = pixelRadius * metresPerPixel * 0.0005; 13 | return radius; 14 | } 15 | -------------------------------------------------------------------------------- /packages/utils/src/geom/index.ts: -------------------------------------------------------------------------------- 1 | export * from './interfaces'; 2 | export * from './geom'; 3 | export * from './constants'; 4 | export * from './getBoundsPolygon'; 5 | export * from './getCirclePolygon'; 6 | export * from './getSquarePolygon'; 7 | export * from './coordTransform'; 8 | export * from './eachCoordinates'; 9 | export * from './isLngLatBoundsArray'; 10 | export * from './getIdentifyRadius'; 11 | export * from './checkExtent'; 12 | -------------------------------------------------------------------------------- /packages/utils/src/geom/isLngLatBoundsArray.ts: -------------------------------------------------------------------------------- 1 | import type { LngLatBoundsArray } from '@nextgis/utils'; 2 | 3 | export function isLngLatBoundsArray( 4 | array: unknown, 5 | ): array is LngLatBoundsArray { 6 | return ( 7 | Array.isArray(array) && 8 | array.length === 4 && 9 | array.every((x) => typeof x === 'number') 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/utils/src/interfaces.ts: -------------------------------------------------------------------------------- 1 | import type { Feature } from 'geojson'; 2 | 3 | export type FeatureProperties = { [name: string]: any }; // GeoJsonProperties; 4 | 5 | export type FeatureProperties_ = F['properties']; 6 | 7 | export type ExtractFeatureProperties = 8 | FeatureProperties_ extends null ? FeatureProperties : FeatureProperties; 9 | -------------------------------------------------------------------------------- /packages/utils/src/number/index.ts: -------------------------------------------------------------------------------- 1 | export * from './round'; 2 | -------------------------------------------------------------------------------- /packages/utils/src/number/round.ts: -------------------------------------------------------------------------------- 1 | export function round(val: number, toFixed?: number): number { 2 | const n = toFixed ? Number('1e+' + toFixed) : 1; 3 | return Math.round((val + Number.EPSILON) * n) / n; 4 | } 5 | -------------------------------------------------------------------------------- /packages/utils/src/object/index.ts: -------------------------------------------------------------------------------- 1 | import { objectAssign } from './objectAssign'; 2 | import { objectDeepEqual } from './objectDeepEqual'; 3 | import { objectRemoveEmpty } from './objectRemoveEmpty'; 4 | 5 | export { objectDeepEqual, objectAssign, objectRemoveEmpty }; 6 | -------------------------------------------------------------------------------- /packages/utils/src/object/objectRemoveEmpty.ts: -------------------------------------------------------------------------------- 1 | export function objectRemoveEmpty>(obj: T): T { 2 | const newObj: Record = {} as T; 3 | Object.keys(obj).forEach((key) => { 4 | if (!(obj[key] instanceof Array) && obj[key] === Object(obj[key])) { 5 | newObj[key] = objectRemoveEmpty(obj[key]); 6 | } else if (obj[key] !== undefined) { 7 | newObj[key] = obj[key]; 8 | } 9 | }); 10 | return newObj; 11 | } 12 | -------------------------------------------------------------------------------- /packages/utils/src/platform.ts: -------------------------------------------------------------------------------- 1 | export const isBrowser = 2 | typeof window !== 'undefined' && typeof window.document !== 'undefined'; 3 | 4 | export const type: 'browser' | 'node' = isBrowser ? 'browser' : 'node'; 5 | 6 | export function getGlobalVariable(): any { 7 | if (isBrowser) { 8 | return window; 9 | } else { 10 | // NativeScript uses global, not window 11 | return global; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/utils/src/re/index.ts: -------------------------------------------------------------------------------- 1 | export * from './reEscape'; 2 | -------------------------------------------------------------------------------- /packages/utils/src/re/reEscape.ts: -------------------------------------------------------------------------------- 1 | export function reEscape(s: string): string { 2 | return s.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'); 3 | } 4 | -------------------------------------------------------------------------------- /packages/utils/src/sleep.ts: -------------------------------------------------------------------------------- 1 | export function sleep(delay = 0): Promise { 2 | return new Promise((resolve) => setTimeout(resolve, delay)); 3 | } 4 | -------------------------------------------------------------------------------- /packages/utils/src/string/capitalize.ts: -------------------------------------------------------------------------------- 1 | export function capitalize(str: string): string { 2 | str = String(str).toLowerCase(); 3 | return str[0].toUpperCase() + str.slice(1); 4 | } 5 | -------------------------------------------------------------------------------- /packages/utils/src/string/index.ts: -------------------------------------------------------------------------------- 1 | export * from './capitalize'; 2 | export * from './camelize'; 3 | export * from './numberWithSpaces'; 4 | -------------------------------------------------------------------------------- /packages/utils/src/string/numberWithSpaces.ts: -------------------------------------------------------------------------------- 1 | export function numberWithSpaces(x: number): string { 2 | const parts = x.toString().split('.'); 3 | parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ' '); 4 | return parts.join('.'); 5 | } 6 | -------------------------------------------------------------------------------- /packages/utils/src/tileJson/index.ts: -------------------------------------------------------------------------------- 1 | export * from './interfaces'; 2 | -------------------------------------------------------------------------------- /packages/utils/src/typeHelpers/DeepPartial.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Same as Partial but goes deeper and makes Partial all its properties and sub-properties. 3 | */ 4 | export type DeepPartial = { 5 | [P in keyof T]?: T[P] extends Array 6 | ? Array> 7 | : T[P] extends ReadonlyArray 8 | ? ReadonlyArray> 9 | : DeepPartial; 10 | }; 11 | -------------------------------------------------------------------------------- /packages/utils/src/typeHelpers/Type.ts: -------------------------------------------------------------------------------- 1 | export type Type = new (...args: any[]) => T; 2 | -------------------------------------------------------------------------------- /packages/utils/src/typeHelpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './DeepPartial'; 2 | export * from './Type'; 3 | export * from './Json'; 4 | export * from './isObjKey'; 5 | 6 | export function isObject(val: unknown): val is Record { 7 | return Object.prototype.toString.call(val) === '[object Object]'; 8 | } 9 | 10 | export function isArray(val: unknown): val is [] { 11 | return Object.prototype.toString.call(val) === '[object Array]'; 12 | } 13 | -------------------------------------------------------------------------------- /packages/utils/src/typeHelpers/isObjKey.ts: -------------------------------------------------------------------------------- 1 | type Obj = Record; 2 | 3 | export function isObjKey( 4 | obj: O, 5 | key: unknown, 6 | ): key is keyof O { 7 | if (typeof key === 'string' || typeof key === 'number') { 8 | return key in obj; 9 | } 10 | return false; 11 | } 12 | 13 | /** 14 | * 15 | * @deprecated - use isObjKey instead 16 | */ 17 | export function keyInObj( 18 | obj: O, 19 | key: unknown, 20 | ): key is keyof O { 21 | return isObjKey(obj, key); 22 | } 23 | -------------------------------------------------------------------------------- /packages/utils/src/unflatten.ts: -------------------------------------------------------------------------------- 1 | export function unflatten( 2 | data: Record | any[], 3 | ): Record { 4 | if (Object(data) !== data || Array.isArray(data)) return data; 5 | const regex = /\.?([^.[\]]+)|\[(\d+)\]/g; 6 | const flat: Record = {}; 7 | for (const p in data) { 8 | let cur = flat; 9 | let prop = ''; 10 | let m; 11 | while ((m = regex.exec(p))) { 12 | cur = cur[prop] || (cur[prop] = m[2] ? [] : {}); 13 | prop = m[2] || m[1]; 14 | } 15 | cur[prop] = data[p]; 16 | } 17 | return flat[''] || flat; 18 | } 19 | -------------------------------------------------------------------------------- /packages/utils/src/url.ts: -------------------------------------------------------------------------------- 1 | export function fixUrlStr(url: string): string { 2 | // remove double slash 3 | return url.replace(/([^:]\/)\/+/g, '$1'); 4 | } 5 | -------------------------------------------------------------------------------- /packages/utils/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/webmap/examples/basic_initialization/index.json: -------------------------------------------------------------------------------- 1 | {"name":"Basic initialization","description":"Webmap with adapter"} 2 | -------------------------------------------------------------------------------- /packages/webmap/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'development') { 4 | module.exports = require('./lib/webmap.cjs.js'); 5 | } else { 6 | module.exports = require('./lib/webmap.cjs.prod.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/webmap/src/components/controls/createButtonControl.ts: -------------------------------------------------------------------------------- 1 | import type { WebMap } from '../../WebMap'; 2 | import type { ButtonControlOptions } from '../../interfaces/MapControl'; 3 | 4 | /** 5 | * @param webMap - WebMap instance 6 | * @internal 7 | */ 8 | export function createButtonControl( 9 | webMap: WebMap, 10 | options: ButtonControlOptions, 11 | ): any { 12 | if (webMap.mapAdapter.createButtonControl) { 13 | return webMap.mapAdapter.createButtonControl(options); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/webmap/src/container.ts: -------------------------------------------------------------------------------- 1 | import type { WebMap } from './WebMap'; 2 | 3 | const WEB_MAP_CONTAINER: Record = {}; 4 | 5 | export function getWebMap(id: number): T { 6 | return WEB_MAP_CONTAINER[id]; 7 | } 8 | 9 | export function setWebMap(id: number, webMap: WebMap) { 10 | WEB_MAP_CONTAINER[id] = webMap; 11 | } 12 | -------------------------------------------------------------------------------- /packages/webmap/src/interfaces/MapState.ts: -------------------------------------------------------------------------------- 1 | import type { WebMapEvents } from './Events'; 2 | 3 | export interface MapStateItem { 4 | event: keyof WebMapEvents; 5 | name: string; 6 | getValue: () => V; 7 | toString: (data: V) => string; 8 | parse: (str: string) => V; 9 | } 10 | 11 | export type MapState = MapStateItem[]; 12 | -------------------------------------------------------------------------------- /packages/webmap/src/interfaces/RuntimeParams.ts: -------------------------------------------------------------------------------- 1 | export interface RuntimeParams { 2 | params(): { [paramName: string]: any }; 3 | get(name: string): any; 4 | set(name: string, value: any): void; 5 | remove(name: string): void; 6 | } 7 | -------------------------------------------------------------------------------- /packages/webmap/src/interfaces/StarterKit.ts: -------------------------------------------------------------------------------- 1 | import type { MapClickEvent } from './MapAdapter'; 2 | import type { MapOptions } from './MapOptions'; 3 | import type { LayerAdapter, WebMap } from '../index'; 4 | import type { Type } from '@nextgis/utils'; 5 | 6 | export interface LayerAdapterCreators { 7 | name: string; 8 | createAdapter: (webMap: WebMap) => Promise>; 9 | } 10 | 11 | export interface StarterKit { 12 | onLoadSync?(webMap: WebMap): Promise; 13 | 14 | getSettings?(webMap?: WebMap): Promise; 15 | getLayerAdapters?(): Promise; 16 | onMapClick?(evt: MapClickEvent, webMap?: WebMap): void; 17 | } 18 | -------------------------------------------------------------------------------- /packages/webmap/src/utils/clearObject.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @internal 3 | */ 4 | export function clearObject(obj: Record): void { 5 | for (const member in obj) { 6 | delete obj[member]; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/webmap/src/utils/getDefaultControls.ts: -------------------------------------------------------------------------------- 1 | export function getDefaultControls(): string[] { 2 | return ['ZOOM', 'ATTRIBUTION']; 3 | } 4 | -------------------------------------------------------------------------------- /packages/webmap/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "excludePrivate": true, 4 | "entryPoints": ["src/index.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /scripts/aliases.js: -------------------------------------------------------------------------------- 1 | export { getAliases } from '../packages/build-tools'; 2 | -------------------------------------------------------------------------------- /scripts/testBuildCmd.mjs: -------------------------------------------------------------------------------- 1 | import chalk from 'chalk'; 2 | 3 | import checkBuild from './testBuild.mjs'; 4 | 5 | const notValid = Object.entries(checkBuild()); 6 | if (notValid.length) { 7 | console.error( 8 | `${chalk.bgRed.white(' ERROR ')} ${chalk.red( 9 | `invalid build for packages:`, 10 | )}\n\n` + chalk.red(`${notValid.map((x) => x.join(', ')).join('\n')}`), 11 | ); 12 | process.exit(1); 13 | } else { 14 | console.log(chalk.green('No build error')); 15 | } 16 | -------------------------------------------------------------------------------- /tests/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | "extends": [ 6 | "../packages/eslint-config/index.js" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/helpers/classes/FakeGeojsonLayerAdapter.ts: -------------------------------------------------------------------------------- 1 | import { FakeLayerAdapter } from './FakeLayerAdapter'; 2 | import { 3 | VectorLayerAdapter, 4 | VectorAdapterOptions 5 | } from '../../../packages/webmap/src'; 6 | 7 | export class FakeGeoJsonLayerAdapter extends FakeLayerAdapter 8 | implements VectorLayerAdapter { 9 | async addLayer(options: VectorAdapterOptions) { 10 | this.options = { ...this.options, ...options }; 11 | return options.id; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/helpers/classes/FakeLayerAdapter.ts: -------------------------------------------------------------------------------- 1 | import { MainLayerAdapter, AdapterOptions } from '../../../packages/webmap/src'; 2 | import sleep from '../utils/asyncTimeout'; 3 | 4 | let ID = 0; 5 | 6 | export class FakeLayerAdapter implements MainLayerAdapter { 7 | options: AdapterOptions = { id: String(ID++) }; 8 | 9 | async addLayer(options: AdapterOptions): Promise { 10 | this.options = { ...this.options, ...options }; 11 | await sleep(100); 12 | return options.id; 13 | } 14 | 15 | showLayer(): void { 16 | // 17 | } 18 | 19 | removeLayer(): void { 20 | // 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/helpers/ngw-orm/SandboxGroup.ts: -------------------------------------------------------------------------------- 1 | import { ResourceGroup, NgwResource } from '../../../packages/ngw-orm/src'; 2 | 3 | @NgwResource({ 4 | type: 'resource_group', 5 | display_name: 'ngw-orm-tests', 6 | description: 7 | 'Automatically created resource group when running tests for @nextgis/ngw-orm', 8 | }) 9 | export class SandboxGroup extends ResourceGroup {} 10 | -------------------------------------------------------------------------------- /tests/helpers/ngw-orm/SandboxGroupNgwKit.ts: -------------------------------------------------------------------------------- 1 | import { ResourceGroup, NgwResource } from '../../../packages/ngw-orm/src'; 2 | 3 | @NgwResource({ 4 | type: 'resource_group', 5 | display_name: 'ngw-kit-tests', 6 | description: 7 | 'Automatically created resource group when running tests for @nextgis/ngw-kit', 8 | }) 9 | export class SandboxGroupNgwKit extends ResourceGroup {} 10 | -------------------------------------------------------------------------------- /tests/helpers/ngw-orm/SandboxPointLayer.ts: -------------------------------------------------------------------------------- 1 | import { Column, NgwResource, PointLayer } from '../../../packages/ngw-orm/src'; 2 | 3 | export interface ISandboxPointLayer { 4 | test: string | null; 5 | number: number | null; 6 | } 7 | 8 | @NgwResource({ 9 | type: 'vector_layer', 10 | display_name: 'ngw-orm-point-layer-tests', 11 | }) 12 | export class SandboxPointLayer 13 | extends PointLayer 14 | implements ISandboxPointLayer 15 | { 16 | @Column() 17 | test!: string; 18 | @Column() 19 | number!: number; 20 | } 21 | -------------------------------------------------------------------------------- /tests/helpers/utils/asyncTimeout.ts: -------------------------------------------------------------------------------- 1 | import { sleep } from '@nextgis/utils'; 2 | 3 | export { sleep }; 4 | 5 | export default sleep; 6 | -------------------------------------------------------------------------------- /tests/specs/leaflet-map-adapter.spec.ts: -------------------------------------------------------------------------------- 1 | import { LeafletMapAdapter } from '../../packages/leaflet-map-adapter/src/LeafletMapAdapter'; 2 | import { webMapTests } from '../helpers/universalTestCases/webMapTests'; 3 | import { mapAdapterTests } from '../helpers/universalTestCases/mapAdapterTests'; 4 | 5 | webMapTests(LeafletMapAdapter); 6 | mapAdapterTests(LeafletMapAdapter); 7 | -------------------------------------------------------------------------------- /tests/specs/mapboxgl-map-adapter.spec.ts: -------------------------------------------------------------------------------- 1 | // import 'maplibre-gl/dist/maplibre-gl.css'; 2 | 3 | // import { MaplibreGLMapAdapter } from '../../packages/maplibre-gl-map-adapter/src/MaplibreGLMapAdapter'; 4 | // import { webMapTests } from '../helpers/universalTestCases/webMapTests'; 5 | // import { mapAdapterTests } from '../helpers/universalTestCases/mapAdapterTests'; 6 | 7 | // webMapTests(MaplibreGLMapAdapter); 8 | // mapAdapterTests(MaplibreGLMapAdapter); 9 | -------------------------------------------------------------------------------- /tests/specs/ol-map-adapter.spec.ts: -------------------------------------------------------------------------------- 1 | import { OlMapAdapter } from '../../packages/ol-map-adapter/src/OlMapAdapter'; 2 | import { webMapTests } from '../helpers/universalTestCases/webMapTests'; 3 | import { mapAdapterTests } from '../helpers/universalTestCases/mapAdapterTests'; 4 | 5 | webMapTests(OlMapAdapter); 6 | mapAdapterTests(OlMapAdapter); 7 | -------------------------------------------------------------------------------- /tests/specs/webmap.spec.ts: -------------------------------------------------------------------------------- 1 | import { FakeMapAdapter } from '../helpers/classes/FakeMapAdapter'; 2 | import { webMapTests } from '../helpers/universalTestCases/webMapTests'; 3 | import { mapAdapterTests } from '../helpers/universalTestCases/mapAdapterTests'; 4 | 5 | webMapTests(FakeMapAdapter); 6 | mapAdapterTests(FakeMapAdapter); 7 | -------------------------------------------------------------------------------- /tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "experimentalDecorators": true, 5 | "types": ["node", "mocha"], 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declaration": true, 5 | "emitDeclarationOnly": true, 6 | "stripInternal": true 7 | }, 8 | "exclude": [ 9 | "tests", 10 | "node_modules", 11 | "@nextgis/build-tools", 12 | "@nextgis/eslint-config", 13 | "@nextgis/demo-app", 14 | ] 15 | } 16 | --------------------------------------------------------------------------------