Does anyone know how to host a webmap (made with QGIS and Leaflet) on Google Cloud Storage publicaly, so that the HTML showing the webmap is accessible but the data driving the map is not. Bucket permsisions can be set for each object in the bucket however, the webmap does not load when access to the JSON data driving the map is not public also.

  • 1
    have you considered using a WMS server?
    – Ian Turton
    Commented Dec 23, 2019 at 11:13

1 Answer 1


If you only use Leaflet to serve your content, the source data will have to be public. Javascript runs clientside on users' web browsers, and everything it retrieves will have to be open to the browser and thus, the user.

If there are processing steps you need to perform on the data to only serve data selectively, you will have to do this serverside. You need some engine on the server to apply such changes (nodejs, PHP, any kind of geoserver...) to handle such a data request and apply the necessary filters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.