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/';