I thought I'd seen a separate forum for API questions but can't find it again. Please do redirect me there if it exists!
I've been playing around a bit with the APIs as I wanted to create a map that highlighted who owned what zones in a given area. The first thing I noticed was that I can't get the same information from the API as the main site (unless I set the origin to turfgame.com which isn't going to work in a browser). For example, I can't get the zone polygons and the area for which I can retrieve zones is smaller. Is this deliberate?
I got something working locally though but when I tried hosting it I'm now running into CORS issues. I'm no web developer but I'm seeing a "PreflightMissingAllowOriginHeader" in Chrome which I think is because the API server is not returning an "Access-Control-Allow-Origin" header. Is this something that could be addressed or is it not the intention that the APIs can be used from other sites?
Thanks
mower
API Questions
Re: API Questions
Something like this? http://turf-aoi.matb.se/
Running the third-party project https://turfbridge.com
Re: API Questions
Thanks for the reply - yes, that's the sort of thing. I see that it's proxying the APIs though. Would the developers consider opening them up for direct access from other origins?
Re: API Questions
There is no public api to get polygons and I think it's deliberate to keep the traffic low.