Select to view content in your preferred language

Auto generated QR codes for map layouts

2351
5
03-24-2023 08:45 PM
Status: Open
Labels (1)
DamianSmith
Regular Contributor

@GisbertWhile we have the ability to share maps via QR. provided we have an access to online storage location, we don't neccesarily have readt access to that funtion  when sharing maps. We have to designate and generate the QR code ourselves.
Having ArcPro automatically generate a QR as part of the regular part of the layout, and storing the pdf version in AGOL or ArcGIS Server location.

CalTopo has this feature and working with other people I have found it a very useful feature of their standard layout. The user doesn’t need to even provide a file path or storage location. The software handles it. 
The lack of QR codes or readily available storage location that works in a multi-agency environment, means having the software generate the QR code and designate where it’s stored online and easily facilitates sharing and simplifies the process for users. 

 

5 Comments
Gisbert

It´s nice that you value my opinion. We don´t use QR codes for sharing maps at the moment.
Do you think there will be many users who benefit from this solution?

DamianSmith
There are definitely users who would benefit. In the Wildland Fire community, we use QR codes for doing a  lot of sharing. We use it for sharing maps all the time. Thousands of wildland firefighters use it every year. The main problem with ESRI current QR implementation is it requires the map maker to generate the QR code and provide the online storage.
Meanwhile, in CalTopo the user makes the map and the software automatically generates the QR code as part of the normal layout and uploads it a location where it can be shared. 
It allows you to print a handful of maps and use the QR code to import into Avenza Maps
Gisbert

Sorry for the name confusion, my screen name @ESRI conflicted with the terms of use so I had to change it. Seems like a convenient feature - you got my kudos 🙂

MarshallMoniuk

I make maps for Saskatchewan Public Safety Agency. I make lots of maps for things like wildfires, flooding, search and rescue, helicopter navigation maps and many others. Having QR codes generate from Arc Pro would be a really handy tool for distribution. Please make this a feature @ESRI

Scott_McGee

Assuming your ArcGIS Pro project is set up to generate a spatial map series, you can easily have Pro generate the QR code and insert it into each page of your map series. The key is to use http://api.qrserver.com to automatically generate the QR code and then use the generated QR code as a dynamic picture object in the layout.

So for example:

URL of QR code generator: http://api.qrserver.com/v1/create-qr-code/?data=

URL of your online map: https://www.SomeWebsite.com/SomeMap.pdf

QR Code size:        &size=250x250  (or whatever size you want)

Complete URL to generate QR code: http://api.qrserver.com/v1/create-qr-code/?data=https://www.SomeWebsite.com/SomeMap.pdf&size=250x250

 

You don't actually have to pre-generate the QR codes. You simply specify the complete URL as a parameter of a dynamic picture object in your ArcPro map series. Then each page of your map series will automatically create the correct QR code for each map page.

The key to making this work in a dynamic fashion is to use an Arcade expression to replace a hard-coded map URL with a field in your map series index layer that contains the URL of where your online maps are located. So in my use case, here's what I did to make all this work:

1) In my ArcPro spatial map series project, click Insert > Graphics and Text > Picture.

2) Browse to a raster file on your system. It doesn't matter which file you use. It could be a JPG, PNG, etc. I just used one of our company's logo files in JPG format. Click Ok.

3) Click on your layout where you want to place the picture file.

4) In the Contents pane, double-click the newly-added picture element to display its properties in the Elements pane.

5) In the Picture section of the Elements pane, click Dynamic.

6) Click the little X icon to the right of where it says [expression].

7) In the Expression Builder, make sure Language = Arcade (it's the only choice).

For the Expression, enter the complete URL to generate the QR code as shown above. For example, here's the Arcade expression for the URL that I used in my situation:

"http://api.qrserver.com/v1/create-qr-code/?data=" + $feature.URL + "&size=195x195"

Be sure to replace $feature.URL in the above URL with the field in your feature class that contains the URL of the map/file that you want to generate a QR code for. This is the key to making the QR code dynamic for each page in your map series.

9) You now have a dynamic URL associated with the picture object in your layout. For each page in your map series, the appropriate QR code will be automatically generated on-the-fly and it will be displayed on your map pages.

10) If necessary, you can tweak the size and position of the dynamic QR code on your map page by changing the settings in the Elements pane for the QR code.

The above process is the simplest way I've found to place automatically-generated QR codes into each page of a map series in ArcGIS Pro. The great benefit of this method is that you don't have to manually create QR codes and store them as a file somewhere, and you don't have to manually insert them on each page of your map series. It's all automatic. This has saved me a ton of time, but unfortunately I discovered all of this only after I figured out a way to do it with Python, so all my time writing the Python scripts was wasted. But this complete ArcPro solution is much, much simpler and cleaner!