I've created an API for a personal project, which returns some GeoJSON data.
Currently, this data is basically returned to the client to be displayed on a map. However, the client has (obviously) a full access to the returned data, and it must implement itself the necessary Javascript to display it.
Something like :
$.ajax({
url: "url/to/my/api",
type: "POST",
data: JSON.stringify({ /* some parameters */ }),
contentType: 'application/json',
}).done(function(data) {
data.addTo(map);
//data contains all the geo-coordinates, visible in browser console, that I'd like to hide
});
Question : Is there any way to "obfuscate" the data in order to let the client display it on a map but deny him the right to look at the data ?
For example, Google Maps API implements some traffic layer and we can't look at the data that make up the subway lines, just display it :
var transitLayer = new google.maps.TransitLayer();
transitLayer.setMap(map);
How to implement something similar, to "hide" the returned data to the client and just let him the possibility to display it on a map ?
Thank you