Client-side library for Google Maps API and Leaflet
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
data
dist
scripts
src
styles
.gitignore
.npmignore
Jakefile.js
LICENSE
README.md
TODO.md
gmaps-popup.html
gmaps.html
index.html
leaflet-popup.html
leaflet.html
package.json

README.md

GeoReactor JS

GeoReactor is an experimental library for creating interactive, mobile-responsive maps.

  • Place your data on top of Google Maps or OpenStreetMap
  • Developer-friendly presets, user-friendly UI for different datasets
  • See it on desktop, mobile, and embedded maps
  • Update your data and refresh the map

Examples

A basic Google Map

Include the common GeoReactor Client library, and the GeoReactor Google Maps (gmaps) extension (the extension loads the Google Maps API library).

Send an array of data URLs to the library to download and display that data.

<div id='map'></div>
...
<script src='dist/georeactor-client-gmaps.js'></script>
<script>
  georeactor({
    div: 'map',
    API_KEY: 'AAAAA',
    data: ['data/link.geojson']
  })
</script>

A custom Leaflet map

Include LeafletJS, the common GeoReactor Client library, and the GeoReactor Leaflet extension.

Send an array of data URLs to the library to download and display that data.

You can set your background tile layers.

<div id='custom-div-id'></div>
...
<script src='dist/georeactor-client-leaflet.js'></script>
<script>
  georeactor({
    div: 'custom-div-id',
    data: ['data/link.geojson'],
    // optional custom tiles (Leaflet and Google modes)
    tiles: ['//{s}.example.com/{z}/{x}/{y}.png']
  })
</script>

A React table UI

Show information about map features using a ReactJS table. Control your data's appearance in the display.

<div id='map'></div>
...
<script src='react.min.js'></script>
<script src='dist/georeactor-client-leaflet.js'></script>
<script type='text/jsx' src='georeactor-detail.js'></script>
<script>
  georeactor({
    div: 'map',
    data: ['data/link.geojson'],

    /* data transform options */
    attributes: {
      _order: ['Title', 'AUTHOR', 'Description'],
      AUTHOR: {
        label: 'Author',
        value: 'Created by #{AUTHOR}'
      },
      Description: {
        value: function (key, val) {
          return val.substring(0, 100);
        }
      }
    }
  })
</script>

License

MIT license