jasonbernert / sound-of-nature Goto Github PK
View Code? Open in Web Editor NEWAn attempt to hear what any place on earth would sound like without human interference.
Home Page: https://jasonbernert.github.io/sound-of-nature/
An attempt to hear what any place on earth would sound like without human interference.
Home Page: https://jasonbernert.github.io/sound-of-nature/
I commented on the xeno-canto API article page, as suggested by its twitter account, to see if enabling CORS is in the road map.
If it is, I'll ditch the proxy server all together. If not, I'll see if I can a solution based off the work of loco-xeno-canto.
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.
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]]
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.