Giter Club home page Giter Club logo

sound-of-nature's People

Contributors

jasonbernert avatar

sound-of-nature's Issues

Trouble requesting data from the xeno-canto (bird) API

When calling the the xeno-canto API with jQuery's .getJSON() method it returns a XMLHttpRequest error.

Example:
XMLHttpRequest cannot load http://www.xeno-canto.org/api/2/recordings?query=box:45.5,-122.0,46.0,-121.0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.

When requesting the data with the JSONP method adding the callback=? to the call, there is a syntax error.

Example
Uncaught SyntaxError: Unexpected token :

I assume the API needs to be called with a different method or I'm not using JSONP correctly.

Exploring outside the bounds of Web Mercator projection

Currently, it's possible to explore "outside the bounds" of web mercator (from −180° to 180° longitude, and 85.05° north and south). Leaflet is generating lat/lon coordinates past these bounds (ex: [89, -240]). Coordinates outside these bounds create an invalid query and won't return any data from any API.

A possible solution is to used leaflets maxBounds when creating the map. But that will apply to the edge of the map and not the map's center (where we're defining coordinates).

The problem is to find a method that allows the user to see outside the bounds, but still submit coordinates between the Web Mercator max bounds: [[85, -180],[-85, 180]].

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.