0
votes

I could not find any answer to my issue, so I hope someone has an easy explanation ;)

I'm trying to create my own geocoding database, so that I can replace the default API of MapBox (https://api.mapbox.com/geocoding/v5/mapbox.places/). I want to plot transit data - and I have my own GTFS feeds/database for that. Currently I have a directory on my wordpress site containing numerous .json files for searching geocode information (I'm thinking in a similar style as the Mapbox api). However, the javascript is perfectly able to search through the api mapbox data, but not my directory in wordpress. Anyone knows what I need to do?

Links:
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-directions/ (search works)
https://api.mapbox.com/geocoding/v5/mapbox.places/Amsterdam.json?access_token=
https://api.mapbox.com/geocoding/v5/mapbox.places/
http://travelingonrails.com/test2/ (search doesn't work)
http://travelingonrails.com/wp-content/uploads/2017/05/Stations/Amsterdam.json
http://travelingonrails.com/wp-content/uploads/2017/05/Stations/

The whole javascript can be found here: https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-directions/v3.1.1/mapbox-gl-directions.js I'm trying:

//var API = 'https://api.mapbox.com/geocoding/v5/mapbox.places/';
var API = 'http://travelingonrails.com/wp-content/uploads/2017/05/Stations/';
1

1 Answers

0
votes

Im getting 403 forbidden

http://travelingonrails.com/wp-content/uploads/2017/05/Stations/

You need to ensure your folder has the right access permissions.

If its doing this because it cant find a index page, then I could be wrong. In this case you need to check in your browser you are getting 200 OK status codes when you try and hit the files in your code - if it does then its a mapbox issue if not it's a problem with your server.