Hello,
I have implemented a LegendAdornmentLayer, since i have a long list of category, the layer is short or if i increase the height it doesn’t look good. any alternative way to show map legend? please see attached file.
thanks,
rhandy
003_snapshot.png (78.3 KB)
Map Legend, any alternative?
Hi Rhandy,
Thanks for your post, I think to set legendItem1.Height to a smaller value should be able work it out. In the "LegendItemHeightSmall.png" the legenditem is smaller than the one in "LegendItemHeightBig.png"
Hope it helps
Best Regards
Summer
Hi Summer,
Thanks for the reply, i was hoping a legend that is not part of a layer, at least an independent entity, that is why i was asking for alternative.
Regards,
Rhandy
Hi Rhandy,
Maybe there are two options to try. Both of the options need to define a new div to contain the legend and then float the div over the map via CSS.
Option one:
Using the pure html and css, which means all the legend items are Html elements to emulator the Map Legend. After designing all the items, just put the items into the Legend container mentioned above.
Option two:
Add a new empty map control in the legend container and then only add the LegendAdornmentLayer. As a result, there are two maps in the page, one is the original map without the legend, and the other is the map only legend.
Hope one of the options could fit help it.
Thanks,
Summer
Hello Summer,
Thanks for the reply, I’ve done option two before and i did not know that you will recommend it but option one i did not get it, how are you going to draw the legend item/s without map component?
Regards,
Rhandy
Hi Rhandy,
Thanks for your query, actually option one means that, having the image and lable information, we could write independent . that way the div could be a independent component.
if you have any more question, please feel free to let us know.
Best Regards
Summer