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) and available in their website, either by link or embedded
That works fine in most cases, however on a high traffic map, concurrent calls can fail sometimes when fetching the map file from Google Drive
Google Drive is a highly reliable storage but it is not intended for too many concurrent fetch calls
For those extreme cases we are providing an option 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
First loading could be 2-3 times faster and then from the cache (if the map has not changed) it could be 20 times faster
Assuming this feature is only for high traffic public maps, you will be required to get and use your own Maps Api key
Please contact us if you need to use this feature for your public map(s)
Disclaimer: This feature is only available upon request or by invitation (as part of the early access program)
Publishing on Google Cloud Storage
Publishing a public map on Google Cloud Storage is a 4-step procedure as listed and explained below
- Get access to the Publish feature
We enable access to the publish feature for your account
You get and set your own Maps Api key under the add-on Preferences
Then you will see an extra option in the add-on sidebar footer as shown in the image
The Publish option will show up as disabled if there is no map yet for this datasheet
(1) Available but disabled, no map yet
2. 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 disabled as your map is still private
You will need to share your map to anyone with the link to proceed
(2) Available but disabled, no public map yet
3. Share
Shared the map with "anyone with the link can view" (Viewer)
Then reopen the add-on sidebar so the Publish option becomes 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
(3) Available and enabled, no published map yet
4. Publish
When the BUILD action is completed the map json file is saved in both storage
The VIEW 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.
(4) Published and map link available
TL;DR
How is it done?
To guarantee we only publish an actual public map that you have shared to anyone with the link, the Publisher is a separate web app with no access to any user's restricted files.
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>
https://mapping.thexs.app/map.html?host=<bucket>&fid=<uid/fid>
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