Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
New Contributor
Posts: 2
Registered: ‎10-04-2017
Accepted Solution

Creating legend in custom application

I'm trying to make a custom application. The topic of the lab is to add MapView to a Form and create a legend in this MapView. So, i've added COM MapVIew to form and trying to create a legend on loading this form  as

ocxMapView.Legend = New PView.Legend

In debug mode i see, that legend has been created in MapView, but it doesn't show up. I even added some properties e.g. visible=true, height=60, etc. But it doesn't seem to work.


So, can you help me out on this issue.

Technical Evangelist
Posts: 549
Registered: ‎09-11-2015

Re: Creating legend in custom application

PView.Legend is no longer a visual object, it is rather a container to keep all the legend entries and other properties. If you want to visualize the legend, use the GMLegendView control and assign its Legend property to the same object as the MapView's Legend.