Hi Robert,
Here's a strange one for you. I have an un-attributed, simple RGB raster image in a published service, and I want a small (~150x150 pixel) image showing an explanation to come up in the ID widget results when any pixel in the published raster is clicked on. Is this possible?
Best regards,
Barnaby
Solved! Go to Solution.
Robert,
I solved the issue by attributing the raster RGB file, which is in ERDAS Imagine format. I added a field called "Link" and filled it with the url of the legend image (legend.jpg) for every value in the raster (0-255). This ID widget XML then does the job.
<layer> | |||
<name>RGB raster layer</name> | |||
<id>41</id> | |||
<url>https://MyServer/arcgis/rest/services/Service1/MapServer</url> | |||
<fields> | |||
<field name="Red" alias="Mineral1 endmember (red)"/> | |||
<field name="Green" alias="Mineral2 endmember (green)"/> | |||
<field name="Blue" alias="Mineral3 endmember (blue)"/> | |||
<field name="Link" alias="" popuponly="true"/> | |||
</fields> | |||
<links> | |||
<link includeinresults="true" field="Link" tooltip="Link to explanation"> | |||
<linksuffix/> | |||
<iconfield/> | |||
<iconprefix>https://MyServer/images/legend.jpg</iconprefix> | |||
<iconsuffix/> | |||
</link> | |||
</links> | |||
<zoomscale>2000</zoomscale> | |||
<forcescale>true</forcescale> | |||
</layer> |
Barnaby,
The only way I can think of is to add some code to specifically look for the identify result with your layers name and then add a link entry to the links property of the IdResult so that the IdResultItemRenderer.mxml will display the image as if it were a link to an image.
Robert,
Interesting idea. Thanks!
Cheers,
Barnaby
Robert,
I solved the issue by attributing the raster RGB file, which is in ERDAS Imagine format. I added a field called "Link" and filled it with the url of the legend image (legend.jpg) for every value in the raster (0-255). This ID widget XML then does the job.
<layer> | |||
<name>RGB raster layer</name> | |||
<id>41</id> | |||
<url>https://MyServer/arcgis/rest/services/Service1/MapServer</url> | |||
<fields> | |||
<field name="Red" alias="Mineral1 endmember (red)"/> | |||
<field name="Green" alias="Mineral2 endmember (green)"/> | |||
<field name="Blue" alias="Mineral3 endmember (blue)"/> | |||
<field name="Link" alias="" popuponly="true"/> | |||
</fields> | |||
<links> | |||
<link includeinresults="true" field="Link" tooltip="Link to explanation"> | |||
<linksuffix/> | |||
<iconfield/> | |||
<iconprefix>https://MyServer/images/legend.jpg</iconprefix> | |||
<iconsuffix/> | |||
</link> | |||
</links> | |||
<zoomscale>2000</zoomscale> | |||
<forcescale>true</forcescale> | |||
</layer> |