Questions tagged [node-js]

Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications

Filter by
Sorted by
Tagged with
1
vote
1answer
24 views

Add WMS to OpenLayers after click

I have a working WMS service under http://localhost:8080/geoserver/nis/wms?service=WMS&version=1.1.0&request=GetMap&layers=nis%3Atest Also I have a Node JS application with OpenLayers. In ...
0
votes
2answers
20 views

NodeJs library to convert ESRI point(x, y, wkid) to lat/lng

I use ArcGIS and get an array of ESRI points which I need to convert to lat/lng. I don't want to use the ArcGIS API, because it requires too many calls. Is there any library that can do the work for ...
2
votes
0answers
73 views

Earth Engine NodeJS API: Failed to load resource and CORS policy issue

I am developing a GEE nodeJS custom application. I have gone through the documentation and source(https://github.com/google/earthengine-api/tree/master/demos/server-auth-nodejs). I setup the service ...
1
vote
1answer
78 views

QWC2 first install

I'm trying to install QGIS Web Client 2 (QWC2) following instructions in "Quick start" documentation: https://github.com/qgis/qwc2-demo-app/blob/master/doc/QWC2_Documentation.md#quick-start So, I ...
-2
votes
1answer
111 views

Google Earth Engine API map deploy to a website

Can we convert Google Earth Engine code (i.e., which is written in GEE console) to JavaScript so that it can be viewed on a website/app? I have gone through the GEE API documentation (https://...
0
votes
0answers
10 views

Can i use esri/graphics on Node.js?

I'm looking for a way to use esri/graphic on node express server.. I need to build polygons and rotate/ move/ union/ intersect/ etc.. I can use a different npm package but I'd prefer to use the same ...
1
vote
1answer
47 views

Openlayers: Using PHP and npm

I've got a rather large MySQL database containing polygons (coordinates) and their additional properties (e. g. text labels in different languages). I would like to use PHP to connect to my database ...
0
votes
0answers
19 views

Incorporation the Ordnance Survey map to Sheetsee.js plugin for Leaflet/Mapbox

I am currently using this plugin: https://github.com/jlord/hack-spots which works really nice in conjunction with Google Sheets. My goal is to convert this site into my own purposes. One of the ...
1
vote
0answers
27 views

Finding boundary coordinates of user current location with a given radius

I have my current lat and lng details { "lat": 8.561032, "lng": 76.846333 } And from this I need to build a boundary around me with given radius. So How can I get the boundary ...
0
votes
0answers
53 views

Create map application with Node.js, MongoDB and Leaflet

Currently I am working on a webmap application which will be display thousands of points (probably canvas CircleMarkers) and I am a little bit confused about which solution is the proper for this. The ...
1
vote
1answer
40 views

Find a point in a polygon

How can I find all points in a polygon pass in queries: My column coord is a geometry point example, pseudo-code. select a.* from "table" as a where ST_WITHIN(a.coord, [lng1 lat1, lng2 lat2, lng3 ...
0
votes
0answers
16 views

Adding style to a published layer using GeoServer REST API with Node.js [duplicate]

Lets say I have a custom style in GeoServer and after I created a new layer, I want to add the style to that layer. I am using this link for documentation. function editLayerStyle(layerName, body) { ...
2
votes
1answer
103 views

Adding existing style while publishing a new layer in GeoServer using REST API

I have a function which publishes a layer in GeoServer with the REST API. Now I want to add an existing style in the layer while publishing it. Anyone has any idea where I write the style name or ...
0
votes
0answers
132 views

Transforming Alaska and Hawaii to be next to USA with TurfJS?

I'm working on an app that contains a map; right now, the map just includes the Continental US, but it would be great if Alaska and Hawaii could be included as well. So far, I've found shapefiles ...
1
vote
1answer
183 views

Creating and publishing a new layer in Geoserver using Geoserver Rest API

I want to publish a new layer in Geoserver. The layer seems unpublished and I get 'Undefined' error. const publish = function () { return new Promise((resolve, reject) => { const layer = ...
0
votes
1answer
61 views

Points in Polygon with ArcGIS-REST-JS library

I am trying to get the points in polygon with Node JS libraries. Using Simple JS, I can get using QueryTask. But there is no queryTask in Node lib. var queryFeat = require('@esri/arcgis-rest-feature-...
0
votes
0answers
210 views

Routing Engine written in JavaScript

I'm looking for a routing engine written completely in native JavaScript or Nodejs, which is distributed with an open source license So far the solutions I've found are implemented only in Java, C++ ...
0
votes
0answers
184 views

OL5 functions in JavaScript not working with NodeJS

So I made a weathermap with GeoServer and OpenLayers5. Works fine and all, but NodeJS keeps giving me a hard time. Does anybody know how this really works? Because I need input from the end-user, ...
0
votes
1answer
414 views

Function in OpenLayers 5 JavaScript does not work

I am making a weather application and it is essentially working. (It is my first GIS-application, so I am really glad with that!) It is just still very basic. I made de application with PostGIS, NPM ...
0
votes
1answer
195 views

NodeJS Geometry string from GPS coordinates before sending to DB?

I'm building an application that saves geographical data to the postgresql db with postgis extension. The data I'm saving is in EPSG 4326 WGS84 format, so I'm sending lat/lng coordinates to the ...
0
votes
1answer
899 views

CORS ERROR with own WMS GeoServer layers

I am building a weather application. For this I want to use OpenLayers as the base for my application and then I want to be able to add my own made layers from PostGIS with GeoServer to this ...
1
vote
1answer
592 views

Adding a position.watch and update feature to live map with leaflet.js?

I have an app working in node.js that locates a user and plots their location on a leaflet map. When others connect it shows them too. It keeps their marker live as long as they move the mouse. I ...
2
votes
1answer
403 views

LAS/LAZ parser for NodeJS

I cannot find any popular libraries for parsing (reading into memory) of LAS or LAZ (lidar data) files in NodeJS (desktop Javascript) https://github.com/yuyou/liblas4node/blob/master/lib/liblas.js ...
0
votes
1answer
127 views

Map tile not rendered on node-mapnik?

const mapnik = require('mapnik'); const sphericalmercator = require('@mapbox/sphericalmercator'); mapnik.register_default_fonts(); mapnik.register_default_input_plugins(); const TILE_HEIGHT = 256; ...
1
vote
0answers
170 views

Why does node Circle to Polygon module returns oval/ellipse instead of a shape like circle?

I'm using npm package circle-to-polygon and I wrote following code to return a polygon which is approximately like a circle. const circleToPolygon = require('circle-to-polygon'); let coordinates = [...
1
vote
1answer
1k views

Recommended starting point for an OpenLayers v5 (node.js and npm) project

I have a large monolithic OL4 js/php system that I have hacked together in the last year, that has lots of raster and vector functionality driven by json parameter files. I want to refactor/rewrite ...
2
votes
1answer
1k views

Is there a way to install leaflet search plugin without using npm?

I am not familiar with Node.js or npm at all, but my IT has told me node.js/npm is not compatible with our IIS, and the only search plugins to add on to leaflet are using npm to install them. I did a ...
0
votes
1answer
162 views

“print()” alternative for nodeJS

i need run this code in my nodeJS application: //Dates of Interest var start = ee.Date("2014-10-01"); var finish = ee.Date("2018-05-01"); ///--------------------- Landsat Collection -----------------...
0
votes
0answers
152 views

Get coordinates from web mercator projection to Lan & Lot (JavaScript/ node.js) [duplicate]

I have the WKT coordinates like below. LINESTRING (16139582.976129573 -4541142.959679384,16139974.715899538 -4540837.211566243) How can I get the Longitude and Latitude from that. I am using ...
0
votes
1answer
299 views

Is it possible to handle QGis server requests through nodejs

I have a nodejs based application server. I would also like to add qgis-server functionality to node. Something like this: expressapp.get(someAuthenticationMiddleware(), qgisServerRequestHandler()); ...
0
votes
0answers
98 views

Gdal Read Geodatabase Features Don't Show Object ID

I am using Gdal Node.js interface to read features of a layer from a Esri Geodatabase. My javascript code looks like this: var dataset = gdal.open(inputPath); var layer = dataset.layers.get(layerName)...
2
votes
3answers
815 views

Command line-tool to convert geojson file to line-delimited geojson

I'm loving the ndjson-cli tools for working with newline-delimited GeoJSON files. But I can't seem to find a tool that converts a standard GeoJSON (whether minified or prettified) ond converts it to ...
1
vote
1answer
1k views

Extracting data from hgt files?

SRTM3 .hgt files have 1201*1201 DEM elevation data, I extract .hgt files data elevation into file Elevation.json with index.js with the help from this GitHub project. Then I rename Elevation.json ...
1
vote
1answer
166 views

How can I project this data correctly in node-mapnik?

I'm trying to use node-mapnik to rasterize vector data into a transparent image and overlay it onto a basemap. I'm generating OpenStreetMap basemaps with tile-stitch. That's working well. I'm then ...
1
vote
0answers
111 views

Obtain the number of features in a Shapefile using NodeJS

I'm using the shapefile NPM library which works well, but it doesn't provide a count of the number of features in a Shapefile. Is there some other library which can access this information (other than ...
3
votes
1answer
3k views

Forming queries with node.js, PostGIS and GeoServer?

I am not sure If I got the overall web-mapping architecture right. I can easily find tutorials about each part, but nothing on how to connect them. I have openlayers in the front-end, node.js as a ...
1
vote
1answer
182 views

Get Mapbox tile-reduce up and running

I'm new to Mapbox tile-reduce library. I would like to process OSM tiles for Portugal. I've download the mbtiles from Portugal. I've installed tile-reduce with: npm ini npm install @mapbox/tile-...
2
votes
0answers
587 views

Failed…error: bind message supplies 3 parameters, but prepared statement “” requires 1

I am using node to capture gps data from my devices after every 30 seconds, i want to store the data into a table but when executing the query statement it throws an error Failed.........error: bind ...
3
votes
2answers
1k views

geojson to mapbox vector tile in nodejs

I'm looking for a way to transform geoJson (obtained from a query to potsgis) to mapbox vector format, serverside in nodejs, without using mapnik (I dont have access to the server and therefore cannot ...
1
vote
0answers
226 views

Storing point in PostGIS from web app?

I have a vectortile layer of points I added to PostGIS using ogr2ogr, which runs on a remote server. The points show nicely on my client in the browser. Now I would like to add a point from my clients'...
1
vote
0answers
726 views

How to create geojson Polygons from Lines?

Given a series of overlapping lines (MultiLineString) in Geojson how can I create polygons for those portions that form an enclosed a space? Sample data - https://gist.github.com/maphew/...
1
vote
2answers
14k views

Seeking offline map API like Google Maps for web? [closed]

I'm looking for an offline map API for web like Google maps (because I know I can't use this offline). I currently have a program (using js and node.js) that uses the google maps api and google roads ...
1
vote
1answer
128 views

cmv-app 2.0 connect.json is not a function

I am using the Dev branch of the cmv-app and having trouble getting up and running out of the box. It looks like I am unable to start the web server - error says connect.json is not a function. I ...
0
votes
1answer
484 views

Generating XYZ tiles in nodejs

I'm looking to create XYZ tiles for use in leafletjs with nodejs. Previously I've been creating my tiles using this python library (gdal2tiles). I was wondering if anyone had yet written a nodejs ...
0
votes
1answer
742 views

Error 404 when setting up web app builder (developer edition) on computer

I'm installing Web AppBuilder (Developer Edition) on my PC and running into an error. I successfully connected to my local host and got to the page where I specify my Portal for ArcGIS URL. I have ...
0
votes
0answers
107 views

Errors encountered executing: tessera tmstyle:///

I am trying to follow demo provided here. Tessera (a Tilelive implementation) is supposed to serve .tm2 files created in Mapbox Studio Classic to localhost using node js. The errors returned seem ...
4
votes
0answers
453 views

OpenLayers 3 unit test tips [closed]

I am trying to write some mocha/expect unit tests for my OpenLayers based app. I tried using jsdom to simulate the DOM, and ended up having to add also xmldom, canvas, and now it still won't work ...
2
votes
0answers
121 views

Can OpenLayers 3 run without browser or is it designed to be used only in browser?

I need to run OpenLayers app which will render some map into canvas and then I need url of that canvas ( Canvas.toDataUrl() ), I would use NodeJS and Node Canvas to get it done. I wonder can ...
2
votes
0answers
87 views

XML entities not working with node-mapnik

I'm not getting XML entities to work with node-mapnik. In the changelog for 1.4.4 I read: "Mapnik now build with rapidxml/ptree xml parser rather than libxml2 (meaning no xincludes or entities are ...
2
votes
1answer
3k views

Creating an OpenLayers map in Node.js View

I'm new to node.js and am attempting to put a simple OpenLayers map on a page. However, the map is not showing up. Code: app.js var express = require('express'); var app = express(); app.set('...