Git Product home page Git Product logo

nodemap's Introduction

This is an extremely naive proof-of-concept. It will render polygons and lines
from GeoJSON files into 256x256px mercator tiles suitable for overlaying on
Google Maps (or Bing Maps, MapQuest, Yahoo Maps, OpenLayers or Tile5 or 
Polymaps or Modest Maps).

There is no spatial indexing so every feature is drawn for every tile.

Node.js is single-threaded so without workers or child processes this can
only render one tile at a time. Go ahead, laugh.

Data is loaded from GeoJSON files so large data sources aren't possible
(v8 doesn't like evaling or JSON.parsing 100MB files)

I'm experimenting with simple caching to disk which currently seems to
break (but not straight away). Contributions welcome!

It would probably tidy this up a lot to factor out the rendering into its 
own reusable file and handle URL matching, static files etc with Connect 
or Express.

For reasons that aren't entirely clear to me, I didn't use my existing
javascript canvas map rendering code [1]. It would be nice to integrate these
two projects and have some code that could work on client or server depending 
on your needs. My hacky JS shapefile project [2] might also be relevant, there
are a few more canvas rendering ideas in there.

1. https://github.com/RandomEtc/js-vector-maps
2. https://github.com/RandomEtc/shapefile-js 

This is the first time I've used npm to manage a project, it's not published 
yet though, I'm still digesting everything it can do:
http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm-could-do

nodemap's People

Contributors

randometc avatar

Watchers

James Cloos avatar

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.