Using the mapcontrol in table cells, Web control localization – Pitney Bowes MapXtreme User Manual

Page 101

Advertising
background image

Chapter 5: Web Applications, Controls, and Tools

Specialized Topics for Web Controls

MapXtreme v7.1

101

Developer Guide

' If the StateManager doesn't exist in the session put it in, else get
it.
If StateManager.GetStateManagerFromSession() Is Nothing Then

StateManager.PutStateManagerInSession(New AppStateManager())

End If

Using the MapControl in Table Cells

Due to HTML behavior, as soon as an element is dragged out of another element, it is resized to a
basic size (mainly 0). If you put a MapControl in a table cell you may have a problem when an
element does not have an absolute width and height in the HTML. When the element is dragged out
of the cell, it will collapse and therefore the cell size becomes 0.

To solve this issue, set the MapControl height and width, explicitly. The following sample shows how
to set the size in the HTML:

<table style="Z-INDEX: 101; LEFT: 32px; POSITION: absolute; TOP: 64px"
borderColor="#ff00ff" border="1">
<TR bordercolor="#ff3366">
<TD bordercolor="#0066ff">
<cc1:mapcontrol id="Mapcontrol2" runat="server" Width="300px"
Height="300px"></cc1:mapcontrol>
</TD>
</TR>
<TR>
<TD>
<cc1:pantool id="Pantool2" runat="server"
MapControlID="MapControl2"></cc1:pantool>
<cc1:zoomintool id="ZoomInTool1" runat="server"
MapControlID="Mapcontrol2"></cc1:zoomintool>
<cc1:zoomouttool id="ZoomOutTool1" runat="server"
MapControlID="Mapcontrol2"></cc1:zoomouttool>
</TD>
</TR>
</table>

Web Control Localization

MapXtreme provides a Visual Studio 2008 solution for developers who wish to translate text strings
associated with the web controls. This "localization kit" contains resource projects for all runtime
components of MapXtreme. No design-time resources are included.

Included in each project are the English resource strings for translating and a strong named key
(.snk) file. that will compile into an assembly that can be incorporated into your MapXtreme
application. The MapXtreme web controls are contained in the project called
MapInfo.WebControls.resources.

See

Appendix K: Localization Kit

for instructions on how to build a satellite assembly from

localized web control resources.

Advertising