Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B1G Harvest: many dynamic_map_layer calls fail to return thumbnail #2

Open
ewlarson opened this issue Mar 14, 2018 · 1 comment
Open

Comments

@ewlarson
Copy link
Member

Issue

Many dynamic_map_layer API calls fail to return a thumbnail. It's possible many of these ArcGIS instances/collections do not support thumbnails.

Examples

Of course, some work...

Resolution

  • Add better exception handling for the API calls that fail, and fallback to the doc format icon.
  • Capture the thumbnail processing state (success, failure, etc.) within the database for easier debugging
@Wiscmapper
Copy link

@ewlarson I've found that very few publishers take the time to create the thumbnails for their dynamic services. I'm not familiar with the logistics of how they would do so, but I understand it requires specific action(s) for them to take during the publishing process.

I've looked at the Esri REST API a bit to see if the "export" option might be useful here. For example, this call generates an image that could be utilized for a thumbnail:

https://dnrmaps.wi.gov/arcgis/rest/services/LF_DML/LF_AGOL_STAGING_WTM_Ext/MapServer/export?bbox=-91%2C42.25%2C-88.75%2C47&bboxSR=4152&size=800%2C800&format=png&transparent=false=&f=image

This shows a lot of promise, but some issues:

  1. I can't get it to work with FeatureService, only MapService. Not sure if that's a result of me not knowing proper syntax, or if it simply isn't possible.

  2. From a practical standpoint, it's very rare for govt agencies to stand up services containing a single theme (single layer). In most situations, many individual layers are bundled together into a one service to serve a specific application. This is relevant, because export only appears to work at the service level (unsure about Esri terminology here) versus layer level. In other words, this works:

https://dnrmaps.wi.gov/arcgis/rest/services/LF_DML/LF_AGOL_STAGING_WTM_Ext/MapServer/export

but not this:

https://dnrmaps.wi.gov/arcgis/rest/services/LF_DML/LF_AGOL_STAGING_WTM_Ext/MapServer/0/export (where 0 represents the first layer in the service)

Speaking only from the GeoData@WI experience, when we do reference services, we often link directly to the layer, like this:

https://dnrmaps.wi.gov/arcgis/rest/services/LF_DML/LF_AGOL_STAGING_WTM_Ext/MapServer/0/

...therefore it seems it would be very dicey to generate a general-purpose thumbnail generator using the export option. i.e., is it safe to assume that you can simply parse out the /0/ and the use that with "&layers=show:0" added to the api call?

Sharing this in case it spurs ideas that may help the status quo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants