ArcGIS Online

Add Google Drive files to your ArcGIS Online maps and content

This blog article was originally published on January 4, 2023, and has been updated.

Google Drive is a cloud storage service that enables you to upload, save, and share various types of files to Google servers. Google Drive can serve as a storage solution to free up space on your device, as a backup for your files, or for collaborating with others. Anyone with a Google account has free storage available on Google Drive.

You can access and add Google Drive files using New item from Content, or using Add layer from file in Map Viewer. Follow the steps to learn how to use Google Drive to add map layers, content, and media to pop-ups.

 

Add Google Drive CSV files to your map

Step 1 — Sign in to your ArcGIS account and open Map Viewer. There are two ways to add Google Drive CSV files as layers from the Contents (dark) toolbar.

(1) Click Add, then Add layer from file.

Add layer from file

(2) From the Layers pane, choose Add layer from file from the Add drop-down list.

Add layer from file

A third way is to add Google Drive files using New Item in Content. If the file contains location data, a hosted feature layer can be published, then added to your map. The steps are similar to the Map Viewer workflow described here.

New item

Step 2 — In the Add Layers pane, click Google Drive.

Add layers

Step 3 — If needed, select your Google account and sign in. If prompted, Allow ArcGIS Online to access your Google Account.

Choose Google account

Step 4 — Select the CSV file you want to add to your map. Alternatively, you can use Search to find the file you want.

(a) – From the drop-down list of supported Google Drive files, select CSV. CSVs are filtered and presented in a list.

(b) – Choose the one you want to add to your map. The CSV will need to have lat/long coordinates or addresses to add to your map.

(c) – Click Next when finished.

Add Layer

Step 5 — A hosted feature layer will be created from the CSV. Select the fields that you want to include, then click Next.

Select fields

Step 6 — Choose the location fields in the file used to place features on the map. Locations can be:

If the CSV has no location data, the file will be added as a table. Click Next to continue.

Choose location fields

Step 7 — A hosted feature layer will be created and automatically added to your map. Specify the title, summary, tags, and other information for the hosted feature layer.

When finished, click Create and add to map.

Item details

Step 8 — Style and configure the layer as you would any other hosted feature layer.

 

Update hosted feature layers from Google Drive

Once a hosted feature layer is created from a Google Drive source, you can update the hosted feature layer from Google Drive by overwriting the entire feature layer. Note that this works best when you are only signed in to a single Google account, typically the one the file was originally accessed from.

Step 1 — In the Overview tab on the hosted feature layer item pages, click Update Data.

Update data

Step 2 — Choose Overwrite entire feature layer, then click Sign in and overwrite.

Overwrite hosted feature layer from Google Drive
View larger image

Once you sign in to your Google Drive account, the hosted feature layer will be automatically updated from the Google Drive source. Note that the file name and schema must be the same as the original file used to publish the hosted feature layer.

 

Add other Google Drive files to your map or contents

To add other supported Google Drive files to your map, simply select the file type from the drop-down menu. Shapefiles and geodatabases can be added as Zip Files, other supported formats include Excel spreadsheets, GeoJSON, and Google Sheets.

The file will be scanned to determine its contents. If there is no location data the file will be added as an item to My Content.

 

Add Google Drive images to your pop-ups

If you want to display photos or other images from Google Drive in pop-ups, you must first ensure that the image can be accessed by sharing it, then obtain the permalink URL to the image to use in the pop-up Image content block.

Step 1 — Change the General access sharing to Anyone with the link, then click Copy link.

Google Drive sharing

Step 2 — Obtain the file ID from the share link. Paste the link into any text editor, the ID will be found after d/ and before /view. Below, the ID is shown in bold text.

https://drive.google.com/file/d/14w-1uvBt20alkwbJ8Dxep1Kx0XfJRJja/view?usp=sharing

Step 3 — Create the permalink URL. Using the file ID obtained in the previous step, paste it after id= in the URL shown below, where <file ID> is the ID obtained above.

https://drive.google.com/thumbnail?id=<file ID>

https://drive.google.com/thumbnail?id=14w-1uvBt20alkwbJ8Dxep1Kx0XfJRJja&sz=s500

Use the URL parameter &sz=s<num> to specify a size for the photo or image, where <num> equals the width in pixels.

Step 4 — Use the link derived above to add an image to the image content block in a pop-up. As with other images, you can use a smaller image in the pop-ups and link to a larger version of the image.

Google Drive image in pop-up
View larger image

While you need the permalink URL to display a Google Drive image within the pop-up, the Google Drive share link can be used to open a larger version of the image or to view the image (or other documents) in the Google Drive viewer. See the Geography Matters sample map and view the pop-up configuration.

 

More information

For more information, see:

About the author

Corporate technology evangelist and advocate at Esri, focusing on ways to broaden access to geographic information and helping customers succeed with the ArcGIS system. On a good day I'm making a map, on a great day I'm on one. Email bszukalski@esri.com or connect on LinkedIn (https://www.linkedin.com/in/bernszukalski/).

Connect:

Next Article

Using Arcade to Translate Pop-Ups for Use in the ArcGIS Instant Apps

Read this article