Napoleonic Political Magnificence
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

react-map-gl-stack-gl-overlay-example

0.3.0 • Public • Published

react-map-gl-stack-gl-overlay-example

An experiment in using stackGL in a react-map-gl overlay.

See a live demo on gh-pages

This demo uses data from http://www.andresmh.com/nyctaxitrips/

Usage

    render: function render() {
      return <MapGL ...viewportProps>
        <ExampleOverlay
          latitude={viewportProps.latitude}
          longitude={viewportProps.longitude}
          zoom={viewportProps.zoom}
          locations={locations} />
      </MapGL>;
    }

See example/main.js for a full example

Passing Tile Coordinates to GPU

This has evolved into a larger experiment in passing projected tile coordinates directly to the GPU as a performance optimization. It represents each tile coordinate as a double using two float values and uses the double-float functions from Andrew Thall's Extended-Precision Floating-Point Numbers for GPU Computation.

See also:

  1. Improving precision in your vertex transform
  2. Double Precision in OpenGL and WebGL
  3. Heavy computing with GLSL – Part 2: Emulated double precision

To install

npm install

To run

npm run start

This will start a budo server running on localhost:9966.

install

npm i react-map-gl-stack-gl-overlay-example

Downloadsweekly downloads

3

version

0.3.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar