Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [node-js]

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

0
votes
1answer
16 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
8 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
34 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
0answers
39 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 ...
0
votes
0answers
24 views

Leaflet.js geoJSON popup stopped working?

I have been developing a map that consumes geojson data and places markers on a map and creates popups. I have had this functionality working, but recently it has stopped working - I get the error "...
2
votes
1answer
40 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
36 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
30 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
284 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 ...
1
vote
1answer
199 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
51 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
33 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
106 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
41 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)...
0
votes
0answers
34 views

nodejs doesn't get result from postgres

my environment is PostgreSQL 9.6. my query needs to work with big data that has near 7million row and 11 GB disk. The problem is when I run a query, it just runs forever and no responding and no ...
0
votes
0answers
322 views

Specify a route and then get a list of (long,lat) by specifying a percentage of the route nodejs?

I need a function witch gets origin,destination and meters,it must specify a route and get coordinates of road origin + meters: In google maps we can solve problem in this way google.maps.LatLng....
0
votes
0answers
58 views

Serving a Web AppBuilder App from Heroku

My question: Is there a way to download the code for a Web AppBuilder app, push it to a repo (Github) and then to have it served from from a PaaS like Heroku (or AWS)? I built a mapping app using ESRI'...
1
vote
3answers
270 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
595 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
88 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
40 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 ...
0
votes
0answers
34 views

Node Packages in Tangram Library

I am currently working on tangram JS mapping library and I need to import a module (pngjs) from NPM to incorporate in my project. As of now the modules are imported and used in the following style ...
2
votes
1answer
1k 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
123 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
242 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 ...
2
votes
2answers
701 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 ...
0
votes
0answers
200 views

Having trouble connecting to my PostgreSQL database via sequelize

I have my PostgreSQL database set up and installed sequelize and its dependencies on my node.js project folder. When I try to migrate my model I keep receiving an error message: ...
1
vote
0answers
160 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
438 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
8k 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
106 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
354 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
555 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
91 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
341 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
102 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
69 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
2k 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('...
1
vote
0answers
94 views

Getting PNG map from PostGIS to Node and then jquery

Using Jquery, I am aiming to get png map from postGIS which has been created dynamically from node server in different port. I used jsonp to overcome cross domain issue in jquery. $.ajax( 'http://...
0
votes
0answers
170 views

Retrieving postgis image to nodejs?

I am trying to retrieve a PostGIS image generated with ST_AsPNG to nodejs-pg-promise then put it to respond. I have achieved the PostGIS side, but have failed on putting the resulting image to ...
1
vote
0answers
269 views

Get grid area from geographic coordinates

I have a list of geo coordinates. What I want is a list of grid areas and a number of geographic points in that area. By doing this I can get the information in which areas in the world the most ...
2
votes
1answer
141 views

mapbox vector tiles and data

What is the best way to access data I uploaded to mapbox with a click on tile. I'm working on a web site using Node.js. I need to display a local map, click on the tile for a property and return ...
1
vote
1answer
2k views

Converting Mapbox Vector Tiles To GeoJSON

I'm working on a project that needs to do some simple turf.js work on the client. I am using Mapbox to host my GeoJSON data. Mapbox serves the client this data as a vector tile set, which saves a lot ...
0
votes
1answer
192 views

On lower zoom polygons don't show

I'm working with Leaflet and nodejs and when a polygon layer is loaded when the map view is at world map, the polygon don't shows, I have to zoom in at approximately zoom 10 or 13 to show polygons. I ...
2
votes
1answer
1k views

dojo/request a png image array buffer using NodeJS, and return the image to the client

I am attempting to request a png image using NodeJS and dojo/request from an ArcGIS Server REST feed, and return the image to the client. I need nodeJS to add a token to the request as a query ...
3
votes
0answers
415 views

Upload .tif to GeoServer via Node.js

How do I upload a .tif file to my running GeoServer via Node.js? I'd like to upload a GeoTIFF to provide it as a WMS by the GeoServer. The GeoServer is responding with a 405, which I think is right (...
2
votes
1answer
263 views

POST to CartoDB Maps API via NodeJS

We are attempting to port a Python-based CartoDB authentication sample app to NodeJS: The example, "Basic auth middleware with CartoDB," was created by CartoDB labs. We have sucessfully replaced one ...
0
votes
2answers
864 views

Serving an image as a tile layer with node mapnik

I have an image that I get from a server, I need to then take that image and tile it on the fly and pass it back to the user. Everything I see keeps using stylesheets which is not what I want/need. Is ...
4
votes
0answers
658 views

Trilateration with error account or lack of precision

I am developing a node.js/javascript application where I would have dozens of beacons in a row (positions known), which gives me their distances to specific object (3 or 4 distances per object). The ...
3
votes
1answer
633 views

Node GDAL for ogr2ogr conversion

I currently have some scripts that use OGR2OGR to translate data form various source formats like ESRI Shapefile, GML etc to other file formats but especially to my PostGIS database. My normal ...