Can map content show by default?

2591
7
01-13-2012 03:05 AM
New Contributor
Hi,

Is there a way to show the map contents control (legend) within the map web part when the sharepoint page loads? We want it to be always visible rather than asking our user to click the 'Map Content' to see the legend.

Any idea on how this can be approached will be useful.

Thanks!
Reply
0 Kudos
7 Replies
Occasional Contributor II
Same request here.  Thanks.
Reply
0 Kudos
New Contributor II
Same request here too!
Reply
0 Kudos
Esri Esteemed Contributor
Hi Suja,

Is there a way to show the map contents control (legend) within the map web part when the sharepoint page loads? We want it to be always visible rather than asking our user to click the 'Map Content' to see the legend.


If you want this functionality enabled for a select number of Map Web Parts in a site collection, then you will need to develop your own custom behavior with the ArcGIS Extensibility SDK for Silverlight 2.4.

If you want this functionality enabled for all Map Web Parts in a site collection, then yes, this is possible. You will have to edit the DefaultLayout.xaml file in the ArcGIS Mapping Configuration Files folder. The items that need to be changed in the file are documented in the attached MS Word doc to this post.

Please note:

  1. This is for ArcGIS for SharePoint 2.1 Final release only.

  2. The change will apply to all Map Web Parts in a site collection.

  3. With this change, it will not be possible to exclude Map Contents from the run mode of a Map Web Part.


Hope this helps,
Reply
0 Kudos
New Contributor II
Thanks Derek,

in terms of creating a behaviour, I can't see any public properties in the SDK for controlling the visibility of the Map Contents control. Could you provide any hints for how this can be triggered using a behaviour?

Best wishes,
Chris
Reply
0 Kudos
New Contributor III
This is extremely helpful - wish there was documentation like this already provided.
One issue:
When you do this, (which works great), the other toolbar elements go away (like browse, edit, etc.).
How do you create a small toolbar with those elements on the top right of the map so the functions can remain.
Permanent dock for those tools.
Thanks!
Reply
0 Kudos
New Contributor III
Here are a couple simple questions:

1) location of close button - the close button is in the middle of the side panel.  how do you get it to justify right?  I altered the margin, but that seems like that could be a bad way to do it (dependant on resolution)?  seems like aligning it to the right would be the proper way.

2) how do you change the width of the sidepanel?  what tag should I be looking for?

Thanks!

<edit: I was able to get the width of the sidepanel to dynamically change by simply doing the following:
Instead of:         <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>

Do This:            <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>

Now I just need to figure out how to get the close button to dynamically change with it!  Currently it is in a static location

<edit> the close button was fixed simply by Aligning Left


This process brought up one key question.
When reopening the sidebar after closing, the sidebar is much too small.
Have been trying to figure out how to have it auto resize the same way it does on loading the page.
The only solutions I have found are:
In <sdk:TabControl x:Name="SidePanelContainer".....
A) Grid.ColumnSpan="2"  ---turns out to be much too big
B) <Grid>
        <Grid.ColumnDefinitions>
             <ColumnDefiinition Width="*"/>  --have also tried "Auto" and "100"
        </Grid.ColumnDefinitions>
     </Grid>
  ---just doesn't work and creates blank page

Some help here would be much appreciated!!!
Reply
0 Kudos
Esri Esteemed Contributor
Hi Garrett,

... This process brought up one key question.
When reopening the sidebar after closing, the sidebar is much too small.
Have been trying to figure out how to have it auto resize the same way it does on loading the page.
The only solutions I have found are:
In <sdk:TabControl x:Name="SidePanelContainer".....
A) Grid.ColumnSpan="2"  ---turns out to be much too big
B) <Grid>
        <Grid.ColumnDefinitions>
             <ColumnDefiinition Width="*"/>  --have also tried "Auto" and "100"
        </Grid.ColumnDefinitions>
     </Grid>
  ---just doesn't work and creates blank page

Some help here would be much appreciated!!!


Unfortunately, I am not a developer, so I can't assist with your issue. I did get some advice from a developer:

"There are many interdependent elements in the layout �?? grid columns, animations, converters, etc. The user needs to find everything that�??s interacting with the SidePanelContainer and trace the sequence of events until they understand exactly what�??s going on. I would suggest that the user start with the Viewer�??s Visual Studio template for layout customization, editing the Glass layout in the Layouts project. That provides a much better editing/debugging environment. Note that the current Map Web Part layout is based on Viewer�??s Glass layout."

Hope this helps,
Reply
0 Kudos