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

Map-Source AGS w/ WMS legend retrieval and display #855

Open
tchaddad opened this issue Apr 10, 2024 · 1 comment
Open

Map-Source AGS w/ WMS legend retrieval and display #855

tchaddad opened this issue Apr 10, 2024 · 1 comment

Comments

@tchaddad
Copy link
Collaborator

This is probably a minor "nice to have":

When working with AGS map-sources, legend support is a little annoying, so it might be nice to be able to retrieve a WMS legend for an AGS service that also supports WMS GetLegend request.

When accessing a WMS, a legend image can be retrieved via the GetLegend OnlineResource URL specified in the WMS GetCapabilities of the relevant service.

an example legend from a federal WMS served from an AGS server:
https://hazards.fema.gov/nfhl/services/public/NFHLWMS/MapServer/WMSServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=12

Seems like we could reference that legend like this:
<map-source name="fema-nfhl" type="ags">
<url>https://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export</url>
<param name="cross-origin" value="anonymous"/>
<layer name="SFHA" query-as="fema-nfhl-query/SFHA" >
<param name="layers" value="show:28"/>
<param name="FORMAT" value="image/png;bits=8"/>
<legend type="html"><![CDATA[ <img width="220" src="http://hazards.fema.gov/nfhl/services/public/NFHLWMS/MapServer/WMSServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=12"/>
]]>
</legend>
</layer>
</map-source>

Currently this does not seem to work, even though the specified URL does retrieve a valid Legend png file.

@tchaddad
Copy link
Collaborator Author

I see this may relate to #556 , but perhaps the suggestion here is a specific direction we could go in for services that happen to have both pathways available

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

1 participant