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 
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, 

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">
         <RowDefinition Height="25*" />
         <RowDefinition Height="75*" />
        <ColumnDefinition Width="2*"/>
        <ColumnDefinition Width="1*"/>
        <ColumnDefinition Width="1*"/>

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):


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):



Please also check this tutorial for few more details:





Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

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,