WebGIS Discussions

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Super Contributor
Posts: 301
Registered: ‎02-09-2016

Custom size for Map control in Portal printing template

Hi team,

 

Our client has WebMap 2016Ep02 installed. They also use portal and external print service. We customize the printing template to fit their need. I just wonder whether we can adjust the size of the mapcontrol component to the extent that we want or there is a ratio that we need to follow, also whether any side affect of doing that such as causing issue for map printing scale or resolution.

 

Appreciate all ideas and suggestions.

 

Kind regards, 

Highlighted
Technical Evangelist
Posts: 1,308
Registered: ‎09-11-2015

Re: Custom size for Map control in Portal printing template

Hi Bob,

 

The map control component is being sized dynamically by its parent container. By default, the controls are positioned using Grid container which allows to define relative sizes of its children. For instance, this would be the main Grid in the document:

<Grid Margin="0.5cm">
    <Grid.RowDefinitions>
         <RowDefinition Height="25*" />
         <RowDefinition Height="75*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="2*"/>
        <ColumnDefinition Width="1*"/>
        <ColumnDefinition Width="1*"/>
    </Grid.ColumnDefinitions>

Which means that the overal Grid size is defined by page size (+- margins, paddings etc.). And it defines a table of child controls like:

  • 2 rows distributed as 25% and 75% of the grid
  • 3 columns distributed as 50%, 25% and 25% of the grid

The printing engine will calculate the map window size based on the template definition and Portal will draw the printing preview box accordingly. The map scale will be dependend on the paper size, DPI and map scale defined in the printing dialog.

 

This is when I leave the map control size unchanged (dynamically calculated based on grid space):

dynamic.PNG

This when I force the map control size to 400 x 400 <el:MapControl x:Name="MapControl1" Width="400" Height="400" />
(notice there are no pixels in WPF):

4x4.PNG

 

Please also check this tutorial for few more details:

http://community.hexagongeospatial.com/t5/WebGIS-Tutorials/How-to-customize-printing-templates-used-...

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Super Contributor
Posts: 301
Registered: ‎02-09-2016

Re: Custom size for Map control in Portal printing template

Thanks Jan. Very helpful informative as always. Now I feel more relaxing to customize the printing template.

 

Kind regards,