Coder Social home page Coder Social logo

tokml's Introduction

MapHubs

MapHubs is a collaborative platform for sharing and organzing mapping data, and telling stories with maps.

MapHubs is a modern open-source web mapping stack, built with Mapbox GL graphics-based map rendering using vector tiles (https://www.mapbox.com/maps/), PostGIS (https://postgis.net/) and GDAL (https://gdal.org/) for data storage/processing, and Next.js (https://nextjs.org/) and React (https://reactjs.org/) for the web application, along with many other smaller open-source libraries including CKEditor (https://ckeditor.com/ckeditor-5/) for the story editor

FOSSA Status

Status

Web: Docker Repository on Quay

Assets: Docker Repository on Quay

Database: Docker Repository on Quay

Running MapHubs

MapHubs runs as a stack of Docker containers (see list below) using either docker-compose or Docker Cloud

Development

Installing dependencies

git clone [email protected]:maphubs/maphubs.git
cd maphubs
npm install

Local configuration

Before running maphubs locally, you will need to update the environment config variables

  • In env/dev/secret copy each of the sample files

MapHubs is made of multiple components: a database, the web application (this project), a vector tile server, and a screenshot service. The easiest way to run everything is with Docker.

Database

The db-server directory contains instructions on running your own postgresql database with the appropriate table schema using Docker.

Vector Tile Server

https://github.com/maphubs/maphubs-tileserver

Screenshot Service

https://github.com/openmaphub/manet-dockerfile

Running

To run the server, use the following command:

npm start

License

GPL-v2 see LICENSE.txt

FOSSA Status

Previous versions of this code (< v0.8.x) contained a fork of Macrocosm https://github.com/developmentseed/macrocosm licensed under GPL-v2

tokml's People

Contributors

chopj avatar jfirebaugh avatar kellybigley avatar kriscarle avatar tmcw avatar tyrasd avatar vincentsels avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tokml's Issues

ESM import works, but with warnings

When using esm (via vite) the following warning is printed:

▲ [WARNING] Converting "require" to "esm" is currently not supported [unsupported-require-call]

    node_modules/@maphubs/tokml/index.js:1:10:
      1 │ var esc = require('./lib/xml-escape')
        ╵           ~~~~~~~

I actually did import the package like documented in README:

import tokml from "@maphubs/tokml"

and it seem to work. However, I don't like warnings and would very much appreciate to use a really ESM compatible module.

Uncaught TypeError: string.replace is not a function

Hi,

Thanks for working on this. I just migrated from the Mapbox version and my geoJSON is failing to process with

TypeError: string.replace is not a function
at escape (...\node_modules\xml-escape\index.js:11:17)
at timestamp (...\node_modules@maphubs\tokml\index.js:103:64)
at ...\node_modules@maphubs\tokml\index.js:61:13

This was fine with the Mapbox version.

Here's a minimal geoJSON that fails to process:

{
  "type": "FeatureCollection",
  "crs": {
    "type": "name",
    "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" }
  },
  "features": [
    {
      "type": "Feature",
      "properties": {
        "source": "dji-srt-parser",
        "timestamp": [
          "2017-07-29T05:48:50.000Z",
          "2017-07-29T05:48:51.000Z"
        ],
        "name": "sample2",
        "HOME_LATITUDE": -25.2088,
        "HOME_LONGITUDE": 131.166,
        "ISO": 100,
        "SHUTTER": 60,
        "FNUM": 2.2
      },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [131.16599999999997, -25.2088, 497.9759216308594],
          [131.16599999999997, -25.2088, 497.9759216308594]
        ]
      }
    }
  ]
}

ESM compability

Using this library fork (which seems to be the most up-to-date one) with Vite / ESM leads to a warning at console:

rebuilt dependencies successfully

  VITE v4.0.3  ready in 1251 ms

  ➜  Local:   http://127.0.0.1:8080/
  ➜  Network: use --host to expose
  ➜  press h to show help
▲ [WARNING] Converting "require" to "esm" is currently not supported [unsupported-require-call]

    node_modules/@maphubs/tokml/index.js:1:10:
      1 │ var esc = require('./lib/xml-escape')

Nonetheless the lib works.

Adding:

{ 
   "type": "module",
 }

...should solve this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.