MapViewer Bean Legend Issue in 10.1.3.1
409679Dec 21 2006 — edited Dec 22 2006We are unable to get a legend-only requests to work with the latest version of MapViewer (10.1.3.1). The problem seems to be that the inclusion of a <box> bounds element causes MapViewer to assume that a map is being requested, not just a legend. Further, there doesn't seem to be a way to force the MapViewer Bean to dispose of its current bounds, so once a MapViewer bean has its bounds specified, all future requests generated from that instance will have bounds.
Below is a standalone MapViewer legend request, including the <box> element. For us, this request brings back some random geometry (perhaps left over from an old request?). If the <box> element is removed, the legend returns as expected.
Any suggestions on a way to work around this?
Thanks,
--ee
- - - - - - - - - - Sample MapViewer XML Request - - - - - - - - - - - - - -
<?xml version="1.0" standalone="yes"?>
<map_request datasource="sparrow" srid="8307" width="740" height="405" bgcolor="#ffffff"
antialiase="true" format="PNG_STEAM">
<box>
<coordinates>-126.0,20.381081081081078 -66.0,53.21891891891892</coordinates>
</box>
<legend bgstyle="fill:#fffff8;fill-opacity:255;stroke:#000000" position="SOUTH_WEST"
profile="MEDIUM">
<column>
<entry style="sparrow_style1_leg" />
</column>
<column>
<entry style="sparrow_styledataaxis01_leg" />
</column>
</legend>
<styles>
<style name="sparrow_styledataaxis01_sub0_leg"> <svg> <g class="marker" style="stroke:#010101;fill:#010101;width=10;height=10"> <rect points="0,0, 16,16" /> </g> </svg> </style>
<style name="sparrow_style1_leg"> <AdvancedStyle> <BucketStyle> <Buckets> <CollectionBucket seq="0" label="Legacy" style="sparrow_style_sub0_leg"> LEGACY</CollectionBucket> <CollectionBucket seq="1" label="Modern" style="sparrow_style_sub1_leg"> MODERN</CollectionBucket> <CollectionBucket seq="2" label="NWIS" style="sparrow_style_sub2_leg"> NWIS</CollectionBucket> </Buckets> </BucketStyle> </AdvancedStyle> </style>
<style name="sparrow_styledataaxis01_sub3_leg"> <svg> <g class="marker" style="stroke:#984ea3;fill:#984ea3;width=10;height=10"> <rect points="0,0, 16,16" /> </g> </svg> </style>
<style name="sparrow_style_sub2_leg"> <svg> <g class="marker" style="stroke:#000000;fill:#000000;width=10;height=10"> <rect points="0,0, 16,16" /> </g> </svg> </style>
<style name="sparrow_styledataaxis01_leg"> <AdvancedStyle> <BucketStyle> <Buckets> <RangedBucket seq="0" label="Not Detected" low="-9.9999998E12" high="1.0E-13" style="sparrow_styledataaxis01_sub0_leg" /> <RangedBucket seq="1" label="0 - 1.0" low="1.0E-13" high="1.0" style="sparrow_styledataaxis01_sub1_leg" /> <RangedBucket seq="2" label="1.0 - 2.0" low="1.0" high="2.0" style="sparrow_styledataaxis01_sub2_leg" /> <RangedBucket seq="3" label="2.0 - 4.0" low="2.0" high="4.0" style="sparrow_styledataaxis01_sub3_leg" /> <RangedBucket seq="4" label="4.0 - 62.0" low="4.0" high="62.0" style="sparrow_styledataaxis01_sub4_leg" /> </Buckets> </BucketStyle> </AdvancedStyle> </style>
<style name="sparrow_styledataaxis01_sub2_leg"> <svg> <g class="marker" style="stroke:#4daf4a;fill:#4daf4a;width=10;height=10"> <rect points="0,0, 16,16" /> </g> </svg> </style>
<style name="sparrow_style_sub1_leg"> <svg> <g class="marker" style="stroke:#000000;fill:#000000;width=10;height=10"> <circle r="8" /> </g> </svg> </style>
<style name="sparrow_styledataaxis01_sub1_leg"> <svg> <g class="marker" style="stroke:#e31a1c;fill:#e31a1c;width=10;height=10"> <rect points="0,0, 16,16" /> </g> </svg> </style>
<style name="sparrow_style_sub0_leg"> <svg> <g class="marker" style="stroke:#000000;fill:#000000;width=10;height=10"> <polygon points="7,0, 14,14, 0,14, 7,0" /> </g> </svg> </style>
<style name="sparrow_styledataaxis01_sub4_leg"> <svg> <g class="marker" style="stroke:#ff7f00;fill:#ff7f00;width=10;height=10"> <rect points="0,0, 16,16" /> </g> </svg> </style>
</styles>
</map_request>
- - - - - - - - - - - - - - - - - - -