How to publish your public map on Google Cloud Storage
Rationale and Premises
By default your map is always based on a private (.json) file in your Google Drive and only you, the owner of the map can share it with others
Some users make a map public (shared with anyone with the link) for access without a Google account and available in their website, either by link or embedded
For those cases you have to publish your - already public - map on Google Cloud Storage
Google Cloud Storage is an online file storage web service with high performance and scalability
In addition to a higher reliability, loading a large map from Google Cloud Storage could be several times faster than from Google Drive
For high traffic maps you might be required to get and use your own Maps Api key, but only in case of non-compliance with our fair usage policy
Publishing on Google Cloud Storage
Publishing a public map on Google Cloud Storage (GCS) is a 3-step procedure as listed and explained below
1. Build
If there is a map for this datasheet (VIEW button enabled) you can skip to the next step
You click BUILD to get a map for this specific datasheet
The Publish option will remain unavailable as your map is still private
You will need to share your map to anyone with the link to proceed
(1) Not available yet
2. Share
Share the map with "anyone with the link can view" (Viewer)
Then reopen the add-on sidebar so the Publish option becomes available and enabled (clickable)
Select the checkbox to enable the Publish option for this datasheet map
Then click BUILD again to actually publish your public map on Google Storage
(2) Available and enabled, no published map yet
3. Publish
When the BUILD action is completed the map json file is saved in both storage
The VIEW (blue) button would open the map from the file in Google Drive
The View icon (the arrow above the VIEW button) will open the map from the file in Google Cloud Storage
So far there is no automatic option for removing a published map. You will need to contact us for that.
*** Ensure you use the published map's GCS Url if you include your map (embedded or by link) in your website
(3) Published and map link available
TL;DR
How is it done?
The Publisher app has no access to any user's restricted files in order to guarantee that only an actual public map that you have shared with anyone with the link can be published.
The publishing 4-step workflow is listed below and shown in the diagram on the side
On BUILD, the add-on saves the json file map in Google Drive
Then the add-on calls the Publisher app
The Publisher app fetches the json file if public, and uploads it to Google Storage
Finally the Mapping app can load the map from either storage locations
Other notes
The links to the maps from both Google Drive and Google Storage are different
https://mapping.thexs.app/map.html?fid=<fid>&fn=<file-name>
https://mapping.thexs.app/map.html?host=<bucket>&fid=<uid/fid>
Ensure you use the Google Storage link (second) for public access
We use our own public Google Cloud Storage bucket to host the public maps
That storage bucket is managed using Google Firebase web SDK
References
Wikipedia page on Google Cloud Storage
How to share your map (.json file) with others post
How to get and use my own Maps Api key post
Background notes
Since January 2024, after a change made by Google started blocking the authorization workflow between the Browser and Google Drive (likely based on Google's cookies before that)
The option to Publish on Google Cloud Storage was enabled for all the users whenever their map is public (shared for view to anyone with the link)
We also removed the previous requisite of having the user's own Maps Api key
In the future, we might limit this feature to premium users, however we will always keep the access for already published maps regardless of the user's plan