Coder Social home page Coder Social logo

gavinr / geojson-viewer Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 4.0 32 KB

View GeoJSON from a URL (with permalinks)

Home Page: https://gavinr.github.io/geojson-viewer/

HTML 28.57% JavaScript 51.45% CSS 19.98%
geojson geojson-viewer maps mapping arcgis-js-api arcgis-js-api-4 hacktoberfest javascript

geojson-viewer's Introduction

GeoJSON Viewer

View GeoJSON based on a URL param

Usage

Pass a GeoJSON url to the parameter in the form https://gavinr.github.io/geojson-viewer/?url=________

Examples:

Advanced Usage

Some additional URL parameters you can use:

  • color=<color> - set the layer color. Example
  • swipeLayer=<url> - second layer to show as a swipe. Example
  • swipeLayerColor=<color> - set the swipe layer color. Example

Technologies

geojson-viewer's People

Contributors

gavinr avatar gavinr-maps avatar gavreh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

geojson-viewer's Issues

Deal with non-CORS URLs

If the url is not sending a CORS: * header, then we cannot map it. Maybe think about using a public proxy for these urls or some other solution.

At least give an error explaining the situation.

Zoom extent - sometimes does not buffer enough

I've recently enabled the tool as a layer preview for dataset pages that the Open Water Foundation publishes. Thanks for providing this tool because other tools require interactive submission of the layer, which does not work for integration. Below is an example page:

https://data.openwaterfoundation.org/country/us/usgs/huc-basins/

I've noticed that some layers when viewed do not result in a sufficient buffer around the layer's features, for example:

https://gavinr.github.io/geojson-viewer/?url=https://data.openwaterfoundation.org/country/us/usgs/huc-basins/huc4-basin-1020-platte.geojson

This requires the user to zoom to see the whole layer. The behavior seems sporadic, as if the zoom level is remembered between different uses?

Also, it would be great if the viewer allowed changing the background layer. We often use the USGS topo map.

Thanks again for publishing this tool. It has allowed us to move forward with other development without having to build our own viewer.

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.