[mapguide-commits] r7454 - in trunk/MgDev: Common/Schema Web/src/WebApp Web/src/mapviewerjava Web/src/mapviewernet Web/src/mapviewerphp Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Apr 8 03:46:34 PDT 2013
Author: jng
Date: 2013-04-08 03:46:33 -0700 (Mon, 08 Apr 2013)
New Revision: 7454
Added:
trunk/MgDev/Common/Schema/WebLayout-2.6.0.xsd
Modified:
trunk/MgDev/Web/src/WebApp/WebLayout.cpp
trunk/MgDev/Web/src/WebApp/WebLayout.h
trunk/MgDev/Web/src/mapviewerjava/common.jsp
trunk/MgDev/Web/src/mapviewerjava/mainframe.jsp
trunk/MgDev/Web/src/mapviewerjava/mapframe.jsp
trunk/MgDev/Web/src/mapviewernet/common.aspx
trunk/MgDev/Web/src/mapviewernet/mainframe.aspx
trunk/MgDev/Web/src/mapviewernet/mapframe.aspx
trunk/MgDev/Web/src/mapviewerphp/common.php
trunk/MgDev/Web/src/mapviewerphp/mainframe.php
trunk/MgDev/Web/src/mapviewerphp/mapframe.php
trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
trunk/MgDev/Web/src/viewerfiles/framesetnotaskbar.templ
trunk/MgDev/Web/src/viewerfiles/framesettaskbar.templ
trunk/MgDev/Web/src/viewerfiles/mainframe.templ
Log:
Merge in RFC128 implementation from sandbox. Originally targeted for 2.5, this submission makes necessary changes to re-target for 2.6, namely WebLayout-2.5.0.xsd has been changed to WebLayout-2.6.0.xsd
Added: trunk/MgDev/Common/Schema/WebLayout-2.6.0.xsd
===================================================================
--- trunk/MgDev/Common/Schema/WebLayout-2.6.0.xsd (rev 0)
+++ trunk/MgDev/Common/Schema/WebLayout-2.6.0.xsd 2013-04-08 10:46:33 UTC (rev 7454)
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name="WebLayout" type="WebLayoutType"/>
+ <xs:complexType name="WebLayoutType">
+ <xs:sequence>
+ <xs:element name="Title" type="xs:string"/>
+ <xs:element name="Map" type="MapType"/>
+ <xs:element name="EnablePingServer" type="xs:boolean" minOccurs="0" />
+ <xs:element name="SelectionColor" type="xs:string" minOccurs="0" />
+ <xs:element name="PointSelectionBuffer" type="xs:integer" minOccurs="0" />
+ <xs:element name="MapImageFormat" type="xs:string" minOccurs="0" />
+ <xs:element name="SelectionImageFormat" type="xs:string" minOccurs="0" />
+ <xs:element name="StartupScript" type="xs:string" minOccurs="0" />
+ <xs:element name="ToolBar" type="ToolBarType"/>
+ <xs:element name="InformationPane" type="InformationPaneType"/>
+ <xs:element name="ContextMenu" type="ContextMenuType"/>
+ <xs:element name="TaskPane" type="TaskPaneType"/>
+ <xs:element name="StatusBar" type="StatusBarType"/>
+ <xs:element name="ZoomControl" type="ZoomControlType"/>
+ <xs:element name="CommandSet" type="CommandSetType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ResourceReferenceType">
+ <xs:sequence>
+ <xs:element name="ResourceId" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="MapType">
+ <xs:complexContent>
+ <xs:extension base="ResourceReferenceType">
+ <xs:sequence>
+ <xs:element name="InitialView" type="MapViewType" minOccurs="0"/>
+ <xs:element name="HyperlinkTarget" type="TargetType"/>
+ <xs:element name="HyperlinkTargetFrame" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="WebLayoutControlType">
+ <xs:sequence>
+ <xs:element name="Visible" type="xs:boolean"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="WebLayoutResizableControlType">
+ <xs:complexContent>
+ <xs:extension base="WebLayoutControlType">
+ <xs:sequence>
+ <xs:element name="Width" type="xs:int"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ToolBarType">
+ <xs:complexContent>
+ <xs:extension base="WebLayoutControlType">
+ <xs:sequence>
+ <xs:element name="Button" type="UIItemType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ContextMenuType">
+ <xs:complexContent>
+ <xs:extension base="WebLayoutControlType">
+ <xs:sequence>
+ <xs:element name="MenuItem" type="UIItemType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="StatusBarType">
+ <xs:complexContent>
+ <xs:extension base="WebLayoutControlType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ZoomControlType">
+ <xs:complexContent>
+ <xs:extension base="WebLayoutControlType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="InformationPaneType">
+ <xs:complexContent>
+ <xs:extension base="WebLayoutResizableControlType">
+ <xs:sequence>
+ <xs:element name="LegendVisible" type="xs:boolean"/>
+ <xs:element name="PropertiesVisible" type="xs:boolean"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TaskPaneType">
+ <xs:complexContent>
+ <xs:extension base="WebLayoutResizableControlType">
+ <xs:sequence>
+ <xs:element name="TaskBar" type="TaskBarType"/>
+ <xs:element name="InitialTask" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TaskButtonType">
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="Tooltip" type="xs:string" minOccurs="0"/>
+ <xs:element name="Description" type="xs:string" minOccurs="0"/>
+ <xs:element name="ImageURL" type="xs:string" minOccurs="0"/>
+ <xs:element name="DisabledImageURL" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="TaskBarType">
+ <xs:complexContent>
+ <xs:extension base="WebLayoutControlType">
+ <xs:sequence>
+ <xs:element name="Home" type="TaskButtonType"/>
+ <xs:element name="Forward" type="TaskButtonType"/>
+ <xs:element name="Back" type="TaskButtonType"/>
+ <xs:element name="Tasks" type="TaskButtonType"/>
+ <xs:element name="MenuButton" type="UIItemType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CommandSetType">
+ <xs:sequence>
+ <xs:element name="Command" type="CommandType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="MapViewType">
+ <xs:sequence>
+ <xs:element name="CenterX" type="xs:double"/>
+ <xs:element name="CenterY" type="xs:double"/>
+ <xs:element name="Scale" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="UIItemType">
+ <xs:sequence>
+ <xs:element name="Function" type="UIItemFunctionType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="UIItemFunctionType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Separator"/>
+ <xs:enumeration value="Command"/>
+ <xs:enumeration value="Flyout"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="FlyoutItemType">
+ <xs:complexContent>
+ <xs:extension base="UIItemType">
+ <xs:sequence>
+ <xs:element name="Label" type="xs:string"/>
+ <xs:element name="Tooltip" type="xs:string" minOccurs="0"/>
+ <xs:element name="Description" type="xs:string" minOccurs="0"/>
+ <xs:element name="ImageURL" type="xs:string" minOccurs="0"/>
+ <xs:element name="DisabledImageURL" type="xs:string" minOccurs="0"/>
+ <xs:element name="SubItem" type="UIItemType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="SeparatorItemType">
+ <xs:complexContent>
+ <xs:extension base="UIItemType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CommandItemType">
+ <xs:complexContent>
+ <xs:extension base="UIItemType">
+ <xs:sequence>
+ <xs:element name="Command" type="xs:string"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CommandType" abstract="true">
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="Label" type="xs:string"/>
+ <xs:element name="Tooltip" type="xs:string" minOccurs="0"/>
+ <xs:element name="Description" type="xs:string" minOccurs="0"/>
+ <xs:element name="ImageURL" type="xs:string" minOccurs="0"/>
+ <xs:element name="DisabledImageURL" type="xs:string" minOccurs="0"/>
+ <xs:element name="TargetViewer" type="TargetViewerType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="BasicCommandActionType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Pan"/>
+ <xs:enumeration value="PanUp"/>
+ <xs:enumeration value="PanDown"/>
+ <xs:enumeration value="PanRight"/>
+ <xs:enumeration value="PanLeft"/>
+ <xs:enumeration value="Zoom"/>
+ <xs:enumeration value="ZoomIn"/>
+ <xs:enumeration value="ZoomOut"/>
+ <xs:enumeration value="ZoomRectangle"/>
+ <xs:enumeration value="ZoomToSelection"/>
+ <xs:enumeration value="FitToWindow"/>
+ <xs:enumeration value="PreviousView"/>
+ <xs:enumeration value="NextView"/>
+ <xs:enumeration value="RestoreView"/>
+ <xs:enumeration value="Select"/>
+ <xs:enumeration value="SelectRadius"/>
+ <xs:enumeration value="SelectPolygon"/>
+ <xs:enumeration value="ClearSelection"/>
+ <xs:enumeration value="Refresh"/>
+ <xs:enumeration value="CopyMap"/>
+ <xs:enumeration value="About"/>
+ <xs:enumeration value="MapTip"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="BasicCommandType">
+ <xs:complexContent>
+ <xs:extension base="CommandType">
+ <xs:sequence>
+ <xs:element name="Action" type="BasicCommandActionType"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:simpleType name="TargetViewerType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Dwf"/>
+ <xs:enumeration value="Ajax"/>
+ <xs:enumeration value="All"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="CustomCommandType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="CommandType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TargetedCommandType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="CustomCommandType">
+ <xs:sequence>
+ <xs:element name="Target" type="TargetType"/>
+ <xs:element name="TargetFrame" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:simpleType name="TargetType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="TaskPane"/>
+ <xs:enumeration value="NewWindow"/>
+ <xs:enumeration value="SpecifiedFrame"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="SearchCommandType">
+ <xs:complexContent>
+ <xs:extension base="TargetedCommandType">
+ <xs:sequence>
+ <xs:element name="Layer" type="xs:string"/>
+ <xs:element name="Prompt" type="xs:string"/>
+ <xs:element name="ResultColumns" type="ResultColumnSetType"/>
+ <xs:element name="Filter" type="xs:string" minOccurs="0"/>
+ <xs:element name="MatchLimit" type="xs:integer"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="InvokeURLCommandType">
+ <xs:complexContent>
+ <xs:extension base="TargetedCommandType">
+ <xs:sequence>
+ <xs:element name="URL" type="xs:string"/>
+ <xs:element name="LayerSet" type="LayerSetType" minOccurs="0"/>
+ <xs:element name="AdditionalParameter" type="ParameterPairType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="DisableIfSelectionEmpty" type="xs:boolean"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="BufferCommandType">
+ <xs:complexContent>
+ <xs:extension base="TargetedCommandType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="SelectWithinCommandType">
+ <xs:complexContent>
+ <xs:extension base="TargetedCommandType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="PrintCommandType">
+ <xs:complexContent>
+ <xs:extension base="CustomCommandType">
+ <xs:sequence>
+ <xs:element name="PrintLayout" type="ResourceReferenceType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="GetPrintablePageCommandType">
+ <xs:complexContent>
+ <xs:extension base="TargetedCommandType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="MeasureCommandType">
+ <xs:complexContent>
+ <xs:extension base="TargetedCommandType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ViewOptionsCommandType">
+ <xs:complexContent>
+ <xs:extension base="TargetedCommandType"/>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="HelpCommandType">
+ <xs:complexContent>
+ <xs:extension base="TargetedCommandType">
+ <xs:sequence>
+ <xs:element name="URL" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="InvokeScriptCommandType">
+ <xs:complexContent>
+ <xs:extension base="CustomCommandType">
+ <xs:sequence>
+ <xs:element name="Script" type="xs:string"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ParameterPairType">
+ <xs:sequence>
+ <xs:element name="Key" type="xs:string"/>
+ <xs:element name="Value" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="LayerSetType">
+ <xs:sequence>
+ <xs:element name="Layer" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ResultColumnType">
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="Property" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="ResultColumnSetType">
+ <xs:sequence>
+ <xs:element name="Column" type="ResultColumnType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
Modified: trunk/MgDev/Web/src/WebApp/WebLayout.cpp
===================================================================
--- trunk/MgDev/Web/src/WebApp/WebLayout.cpp 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/WebApp/WebLayout.cpp 2013-04-08 10:46:33 UTC (rev 7454)
@@ -23,7 +23,12 @@
MgWebLayout::MgWebLayout(MgResourceService* resourceService, MgResourceIdentifier* webLayoutId)
: m_scale(-1.0),
m_hyperlinkTarget(MgWebTargetType::TaskPane),
- m_zoomControlVisible(true)
+ m_zoomControlVisible(true),
+ m_selectionColor(L"0000FFFF"), //NOXLATE
+ m_pointPixelBuffer(2),
+ m_mapImageFormat(MgImageFormats::Png),
+ m_selectionImageFormat(MgImageFormats::Png),
+ m_startupScript(L"") //NOXLATE
{
MG_TRY()
@@ -82,6 +87,66 @@
}
///////////////////////////////////////////////////////////////////////////
+/// <summary>
+/// Returns the selection color in HTML RGBA format
+/// </summary>
+/// <returns>
+/// The selection color in HTML RGBA format
+/// </returns>
+STRING MgWebLayout::GetSelectionColor()
+{
+ return m_selectionColor;
+}
+
+///////////////////////////////////////////////////////////////////////////
+/// <summary>
+/// Returns the point selection buffer size in pixels
+/// </summary>
+/// <returns>
+/// The point selection buffer size in pixels
+/// </returns>
+INT32 MgWebLayout::GetPointSelectionBuffer()
+{
+ return m_pointPixelBuffer;
+}
+
+///////////////////////////////////////////////////////////////////////////
+/// <summary>
+/// Returns the map image format
+/// </summary>
+/// <returns>
+/// The map image format
+/// </returns>
+STRING MgWebLayout::GetMapImageFormat()
+{
+ return m_mapImageFormat;
+}
+
+///////////////////////////////////////////////////////////////////////////
+/// <summary>
+/// Returns the selection overlay image format
+/// </summary>
+/// <returns>
+/// The selection overlay image format
+/// </returns>
+STRING MgWebLayout::GetSelectionImageFormat()
+{
+ return m_selectionImageFormat;
+}
+
+///////////////////////////////////////////////////////////////////////////
+/// <summary>
+/// Returns the startup script code that is executed when the viewer has loaded
+/// </summary>
+/// <returns>
+/// The startup script code
+/// </returns>
+STRING MgWebLayout::GetStartupScript()
+{
+ return m_startupScript;
+}
+
+///////////////////////////////////////////////////////////////////////////
// Returns the initial scale of the view. Return -1. if scale is not set
//
double MgWebLayout::GetScale()
@@ -255,12 +320,32 @@
{
ParseMapProperties(elt);
}
- else if(strName == L"EnablePingServer")
+ else if(strName == L"EnablePingServer") //NOXLATE
{
m_enablePingServer = GetBooleanFromElement(elt);
}
- else if(strName == L"InformationPane")
+ else if(strName == L"SelectionColor") //NOXLATE
{
+ m_selectionColor = GetStringFromElement(elt);
+ }
+ else if(strName == L"PointSelectionBuffer") //NOXLATE
+ {
+ m_pointPixelBuffer = GetIntegerFromElement(elt);
+ }
+ else if(strName == L"MapImageFormat") //NOXLATE
+ {
+ m_mapImageFormat = GetStringFromElement(elt);
+ }
+ else if(strName == L"SelectionImageFormat") //NOXLATE
+ {
+ m_selectionImageFormat = GetStringFromElement(elt);
+ }
+ else if(strName == L"StartupScript") //NOXLATE
+ {
+ m_startupScript = GetStringFromElement(elt);
+ }
+ else if(strName == L"InformationPane") //NOXLATE
+ {
ParseInformationPane(elt);
}
else if (strName == L"StatusBar") // NOXLATE
Modified: trunk/MgDev/Web/src/WebApp/WebLayout.h
===================================================================
--- trunk/MgDev/Web/src/WebApp/WebLayout.h 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/WebApp/WebLayout.h 2013-04-08 10:46:33 UTC (rev 7454)
@@ -64,6 +64,51 @@
///////////////////////////////////////////////////////////////////////////
/// <summary>
+ /// Returns the selection color in HTML RGBA format
+ /// </summary>
+ /// <returns>
+ /// The selection color in HTML RGBA format
+ /// </returns>
+ STRING GetSelectionColor();
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// <summary>
+ /// Returns the point selection buffer size in pixels
+ /// </summary>
+ /// <returns>
+ /// The point selection buffer size in pixels
+ /// </returns>
+ INT32 GetPointSelectionBuffer();
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// <summary>
+ /// Returns the map image format
+ /// </summary>
+ /// <returns>
+ /// The map image format
+ /// </returns>
+ STRING GetMapImageFormat();
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// <summary>
+ /// Returns the selection overlay image format
+ /// </summary>
+ /// <returns>
+ /// The selection overlay image format
+ /// </returns>
+ STRING GetSelectionImageFormat();
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// <summary>
+ /// Returns the startup script code that is executed when the viewer has loaded
+ /// </summary>
+ /// <returns>
+ /// The startup script code
+ /// </returns>
+ STRING GetStartupScript();
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// <summary>
/// Returns the initial scale of the view. Return -1. if scale is not set
/// </summary>
/// <returns>
@@ -382,6 +427,11 @@
STRING m_title;
STRING m_mapDefinition;
bool m_enablePingServer;
+ STRING m_mapImageFormat;
+ STRING m_selectionImageFormat;
+ INT32 m_pointPixelBuffer;
+ STRING m_selectionColor;
+ STRING m_startupScript;
INT32 m_hyperlinkTarget;
STRING m_hyperlinkTargetFrame;
double m_scale;
Modified: trunk/MgDev/Web/src/mapviewerjava/common.jsp
===================================================================
--- trunk/MgDev/Web/src/mapviewerjava/common.jsp 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewerjava/common.jsp 2013-04-08 10:46:33 UTC (rev 7454)
@@ -286,9 +286,14 @@
String ValidateColorString(String proposedColorString)
{
+ return ValidateColorString(proposedColorString, 6);
+}
+
+String ValidateColorString(String proposedColorString, int charCount)
+{
String validColorString = "000000";
if (proposedColorString != null &&
- Pattern.matches("^[A-Fa-f0-9]{6}$", proposedColorString))
+ Pattern.matches("^[A-Fa-f0-9]{" + charCount + "}$", proposedColorString))
{
validColorString = proposedColorString;
}
Modified: trunk/MgDev/Web/src/mapviewerjava/mainframe.jsp
===================================================================
--- trunk/MgDev/Web/src/mapviewerjava/mainframe.jsp 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewerjava/mainframe.jsp 2013-04-08 10:46:33 UTC (rev 7454)
@@ -33,6 +33,7 @@
String orgSessionId = "";
String username = "";
String password = "";
+String startupScriptCode = "";
String locale = "";
String mapName = "";
int curFlyout = 0;
@@ -103,6 +104,12 @@
MgWebTaskBar taskBar = taskPane.GetTaskBar();
String mapDef = webLayout.GetMapDefinition();
+ startupScriptCode = webLayout.GetStartupScript();
+ String selectionColor = webLayout.GetSelectionColor();
+ String mapImgFormat = webLayout.GetMapImageFormat();
+ String selImgFormat = webLayout.GetSelectionImageFormat();
+ int pointBuffer = webLayout.GetPointSelectionBuffer();
+
boolean showTaskPane = taskPane.IsVisible();
boolean showTaskBar = taskBar.IsVisible();
boolean showStatusbar = statusBar.IsVisible();
@@ -445,6 +452,10 @@
String.valueOf(webLayout.GetHyperlinkTarget()),
webLayout.GetHyperlinkTargetFrame(),
webLayout.IsZoomControlVisible()? "1": "0",
+ selectionColor,
+ mapImgFormat,
+ selImgFormat,
+ String.valueOf(pointBuffer),
sessionParam,
vpath + "formframe.jsp",
String.valueOf(taskBarHeight),
@@ -473,6 +484,10 @@
String.valueOf(webLayout.GetHyperlinkTarget()),
webLayout.GetHyperlinkTargetFrame(),
webLayout.IsZoomControlVisible()? "1": "0",
+ selectionColor,
+ mapImgFormat,
+ selImgFormat,
+ String.valueOf(pointBuffer),
sessionParam,
srcTaskFrame,
vpath + "formframe.jsp",
@@ -518,6 +533,7 @@
userCode,
taskItemTexts,
selAwareCmds,
+ startupScriptCode,
vpath + "quickplotpanel.jsp",
vpath + "measureui.jsp",
vpath + "searchprompt.jsp",
Modified: trunk/MgDev/Web/src/mapviewerjava/mapframe.jsp
===================================================================
--- trunk/MgDev/Web/src/mapviewerjava/mapframe.jsp 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewerjava/mapframe.jsp 2013-04-08 10:46:33 UTC (rev 7454)
@@ -35,6 +35,10 @@
String type;
String hlTgt;
String hlTgtName;
+String selectionColor;
+String mapImgFormat;
+String selImgFormat;
+int pointBufferSize;
%>
<%
@@ -178,6 +182,10 @@
locale,
vpath + "getselectedfeatures.jsp",
scaleCreationCode,
+ selectionColor,
+ mapImgFormat,
+ selImgFormat,
+ String.valueOf(pointBufferSize),
vpath + "ajaxviewerabout.jsp",
vpath + "legendctrl.jsp",
URLEncoder.encode(mapName, "UTF-8"),
@@ -203,5 +211,9 @@
showProperties = GetIntParameter(request, "SHOWPROP");
showSlider = GetIntParameter(request, "SHOWSLIDER");
type = GetParameter(request, "TYPE");
+ selectionColor = ValidateColorString(GetParameter(request, "SELCOLOR"), 8);
+ mapImgFormat = GetParameter(request, "MAPIMGFORMAT");
+ selImgFormat = GetParameter(request, "SELIMGFORMAT");
+ pointBufferSize = GetIntParameter(request, "POINTBUFFERSIZE");
}
%>
Modified: trunk/MgDev/Web/src/mapviewernet/common.aspx
===================================================================
--- trunk/MgDev/Web/src/mapviewernet/common.aspx 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewernet/common.aspx 2013-04-08 10:46:33 UTC (rev 7454)
@@ -278,9 +278,14 @@
String ValidateColorString(String proposedColorString)
{
+ return ValidateColorString(proposedColorString, 6);
+}
+
+String ValidateColorString(String proposedColorString, int charCount)
+{
String validColorString = "000000";
if (proposedColorString != null &&
- System.Text.RegularExpressions.Regex.IsMatch(proposedColorString, "^[A-Fa-f0-9]{6}$"))
+ System.Text.RegularExpressions.Regex.IsMatch(proposedColorString, "^[A-Fa-f0-9]{" + charCount + "}$"))
{
validColorString = proposedColorString;
}
Modified: trunk/MgDev/Web/src/mapviewernet/mainframe.aspx
===================================================================
--- trunk/MgDev/Web/src/mapviewernet/mainframe.aspx 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewernet/mainframe.aspx 2013-04-08 10:46:33 UTC (rev 7454)
@@ -32,6 +32,7 @@
String orgSessionId = "";
String username = "";
String password = "";
+String startupScriptCode = "";
String locale = "";
String mapName = "";
int curFlyout = 0;
@@ -102,6 +103,12 @@
MgWebTaskBar taskBar = taskPane.GetTaskBar();
String mapDef = webLayout.GetMapDefinition();
+ startupScriptCode = webLayout.GetStartupScript();
+ String selectionColor = webLayout.GetSelectionColor();
+ String mapImgFormat = webLayout.GetMapImageFormat();
+ String selImgFormat = webLayout.GetSelectionImageFormat();
+ int pointBuffer = webLayout.GetPointSelectionBuffer();
+
bool showTaskPane = taskPane.IsVisible();
bool showTaskBar = taskBar.IsVisible();
bool showStatusbar = statusBar.IsVisible();
@@ -449,6 +456,10 @@
webLayout.GetHyperlinkTarget().ToString(NumberFormatInfo.InvariantInfo),
webLayout.GetHyperlinkTargetFrame(),
webLayout.IsZoomControlVisible()? "1": "0",
+ selectionColor,
+ mapImgFormat,
+ selImgFormat,
+ pointBuffer.ToString(NumberFormatInfo.InvariantInfo),
sessionParam,
vpath + "formframe.aspx",
taskBarHeight.ToString(NumberFormatInfo.InvariantInfo),
@@ -476,6 +487,10 @@
webLayout.GetHyperlinkTarget().ToString(NumberFormatInfo.InvariantInfo),
webLayout.GetHyperlinkTargetFrame(),
webLayout.IsZoomControlVisible()? "1": "0",
+ selectionColor,
+ mapImgFormat,
+ selImgFormat,
+ pointBuffer.ToString(NumberFormatInfo.InvariantInfo),
sessionParam,
srcTaskFrame,
vpath + "formframe.aspx",
@@ -517,6 +532,7 @@
userCode,
taskItemTexts,
selAwareCmds,
+ startupScriptCode,
vpath + "quickplotpanel.aspx",
vpath + "measureui.aspx",
vpath + "searchprompt.aspx",
Modified: trunk/MgDev/Web/src/mapviewernet/mapframe.aspx
===================================================================
--- trunk/MgDev/Web/src/mapviewernet/mapframe.aspx 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewernet/mapframe.aspx 2013-04-08 10:46:33 UTC (rev 7454)
@@ -35,6 +35,10 @@
String type;
String hlTgt;
String hlTgtName;
+String selectionColor;
+String mapImgFormat;
+String selImgFormat;
+int pointBufferSize;
</script>
<%
@@ -180,6 +184,10 @@
locale,
vpath + "getselectedfeatures.aspx",
scaleCreationCode,
+ selectionColor,
+ mapImgFormat,
+ selImgFormat,
+ pointBufferSize.ToString(NumberFormatInfo.InvariantInfo),
vpath + "ajaxviewerabout.aspx",
vpath + "legendctrl.aspx",
HttpUtility.UrlEncode(mapName),
@@ -225,8 +233,13 @@
showProperties = GetIntParameter(parameters, "SHOWPROP");
showSlider = GetIntParameter(parameters, "SHOWSLIDER");
+ selectionColor = ValidateColorString(GetParameter(parameters, "SELCOLOR"), 8);
+ mapImgFormat = GetParameter(parameters, "MAPIMGFORMAT");
+ selImgFormat = GetParameter(parameters, "SELIMGFORMAT");
+ pointBufferSize = GetIntParameter(parameters, "POINTBUFFERSIZE");
+
mapDefinition = ValidateResourceId(GetParameter(parameters, "MAPDEFINITION"));
- }
+}
String IntToString(int number)
{
Modified: trunk/MgDev/Web/src/mapviewerphp/common.php
===================================================================
--- trunk/MgDev/Web/src/mapviewerphp/common.php 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewerphp/common.php 2013-04-08 10:46:33 UTC (rev 7454)
@@ -241,10 +241,10 @@
return $validMapName;
}
-function ValidateColorString($proposedColorString)
+function ValidateColorString($proposedColorString, $digits = 6)
{
$validColorString = "000000";
- if ($proposedColorString != null && preg_match('/^[A-Fa-f0-9]{6}$/', $proposedColorString))
+ if ($proposedColorString != null && preg_match('/^[A-Fa-f0-9]{'.$digits.'}$/', $proposedColorString))
{
$validColorString = $proposedColorString;
}
Modified: trunk/MgDev/Web/src/mapviewerphp/mainframe.php
===================================================================
--- trunk/MgDev/Web/src/mapviewerphp/mainframe.php 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewerphp/mainframe.php 2013-04-08 10:46:33 UTC (rev 7454)
@@ -28,6 +28,7 @@
$orgSessionId = '';
$username = '';
$password = '';
+$startupScriptCode = '';
$curFlyout = 0;
$cmds = array();
@@ -120,6 +121,12 @@
$infoPane = $webLayout->GetInformationPane();
$taskBar = $taskPane->GetTaskBar();
$mapDef = $webLayout->GetMapDefinition();
+
+ $startupScriptCode = $webLayout->GetStartupScript();
+ $selectionColor = $webLayout->GetSelectionColor();
+ $mapImgFormat = $webLayout->GetMapImageFormat();
+ $selImgFormat = $webLayout->GetSelectionImageFormat();
+ $pointBuffer = $webLayout->GetPointSelectionBuffer();
$showTaskPane = $taskPane->IsVisible();
$showTaskBar = $taskBar->IsVisible();
@@ -453,6 +460,10 @@
$locale,
$webLayout->GetHyperlinkTarget(), $webLayout->GetHyperlinkTargetFrame(),
$webLayout->IsZoomControlVisible()? 1: 0,
+ $selectionColor,
+ $mapImgFormat,
+ $selImgFormat,
+ $pointBuffer,
$sessionParam,
$vpath . "formframe.php",
$taskbarHeight+1, $srcTaskBar,
@@ -477,6 +488,10 @@
$webLayout->GetHyperlinkTarget(),
$webLayout->GetHyperlinkTargetFrame(),
$webLayout->IsZoomControlVisible()? 1: 0,
+ $selectionColor,
+ $mapImgFormat,
+ $selImgFormat,
+ $pointBuffer,
$sessionParam,
$srcTaskFrame,
$vpath . "formframe.php",
@@ -516,6 +531,7 @@
$userCode,
$taskItemTexts,
$selAwareCmds,
+ $startupScriptCode,
$vpath . "quickplotpanel.php",
$vpath . "measureui.php",
$vpath . "searchprompt.php",
Modified: trunk/MgDev/Web/src/mapviewerphp/mapframe.php
===================================================================
--- trunk/MgDev/Web/src/mapviewerphp/mapframe.php 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/mapviewerphp/mapframe.php 2013-04-08 10:46:33 UTC (rev 7454)
@@ -32,6 +32,10 @@
$hlTgt = '';
$hlTgtName = '';
$showSlider = true;
+$selectionColor = '0000FFFF';
+$mapImgFormat = 'PNG';
+$selImgFormat = 'PNG';
+$pointBufferSize = 2;
GetRequestParameters();
@@ -144,6 +148,10 @@
$locale,
$vpath . "getselectedfeatures.php",
$scaleCreationCode,
+ $selectionColor,
+ $mapImgFormat,
+ $selImgFormat,
+ $pointBufferSize,
$vpath . "ajaxviewerabout.php",
$vpath . "legendctrl.php",
urlencode($mapName),
@@ -166,8 +174,8 @@
global $mapDefinition, $type;
global $infoWidth, $showLegend, $showProperties, $sessionId;
global $locale, $hlTgt, $hlTgtName, $showSlider;
+ global $selectionColor, $mapImgFormat, $selImgFormat, $pointBufferSize;
-
$sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$hlTgt = ValidateHyperlinkTargetValue(GetParameter($params, 'HLTGT'));
@@ -178,6 +186,10 @@
$showSlider = (GetIntParameter($params, 'SHOWSLIDER') == 1);
$infoWidth = GetIntParameter($params, 'INFOWIDTH');
$type = GetParameter($params, 'TYPE');
+ $selectionColor = ValidateColorString(GetParameter($params, 'SELCOLOR'), 8);
+ $mapImgFormat = GetParameter($params, 'MAPIMGFORMAT');
+ $selImgFormat = GetParameter($params, 'SELIMGFORMAT');
+ $pointBufferSize = GetIntParameter($params, 'POINTBUFFERSIZE');
}
function GetRequestParameters()
Modified: trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ 2013-04-08 10:46:33 UTC (rev 7454)
@@ -339,15 +339,15 @@
var cancelTgt;
var locale = '%s';
var openHlinkText = macOS ? "__#OPENHYPERLINKMAC#__" : "__#OPENHYPERLINK#__";
-var selectionColor = '0x0000FFFF'; // Blue
var lastLegendScaleUpdate = curScale;
var featureRequestUrl = '%s';
%s
var isAlertShow = false;
-var mapImgFormat = "PNG";
-var selectionImgFormat = "PNG";
+var selectionColor = '0x%s';
+var mapImgFormat = "%s";
+var selectionImgFormat = "%s";
var queryVariant = "INTERSECTS";
-var bufferPx = 2;
+var bufferPx = %s;
var simulateCirclePoints = [];
var simulateCircleHalfPointNumber = 40;
Modified: trunk/MgDev/Web/src/viewerfiles/framesetnotaskbar.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/framesetnotaskbar.templ 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/viewerfiles/framesetnotaskbar.templ 2013-04-08 10:46:33 UTC (rev 7454)
@@ -1,7 +1,7 @@
<frameset rows="%s,*,%s" frameborder=0 border=0>
<frame name="tbFrame" %s noresize scrolling=no>
<frameset name="maparea" cols="*,%s,0,0" frameborder=0 border=0>
- <frame id="mapFrame" name="mapFrame" src="%s?MAPDEFINITION=%s&TYPE=%s&SHOWLEGEND=%s&SHOWPROP=%s&INFOWIDTH=%s&LOCALE=%s&HLTGT=%s&HLTGTNAME=%s&SHOWSLIDER=%s%s" noresize scrolling=no>
+ <frame id="mapFrame" name="mapFrame" src="%s?MAPDEFINITION=%s&TYPE=%s&SHOWLEGEND=%s&SHOWPROP=%s&INFOWIDTH=%s&LOCALE=%s&HLTGT=%s&HLTGTNAME=%s&SHOWSLIDER=%s&SELCOLOR=%s&MAPIMGFORMAT=%s&SELIMGFORMAT=%s&POINTBUFFERSIZE=%s%s" noresize scrolling=no>
<frame id="taskFrame" name="taskFrame" %s noresize frameborder=1 border=1 scrolling=no>
<frame id="formFrame" name="formFrame" noresize src="%s">
<frame id="scriptFrame" name="scriptFrame" src="../viewerfiles/blank.html" noresize>
Modified: trunk/MgDev/Web/src/viewerfiles/framesettaskbar.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/framesettaskbar.templ 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/viewerfiles/framesettaskbar.templ 2013-04-08 10:46:33 UTC (rev 7454)
@@ -2,7 +2,7 @@
<frameset id="mainappFrame" name="mainappFrame" cols="*,%s" frameborder=0 border=0>
<frameset id="maparea" name="maparea" rows="%s,*,0,0" frameborder=0 border=0>
<frame id="tbFrame" name="tbFrame" %s noresize scrolling=no>
- <frame id="mapFrame" name="mapFrame" src="%s?MAPDEFINITION=%s&TYPE=%s&SHOWLEGEND=%s&SHOWPROP=%s&INFOWIDTH=%s&LOCALE=%s&HLTGT=%s&HLTGTNAME=%s&SHOWSLIDER=%s%s" scrolling=no border=3>
+ <frame id="mapFrame" name="mapFrame" src="%s?MAPDEFINITION=%s&TYPE=%s&SHOWLEGEND=%s&SHOWPROP=%s&INFOWIDTH=%s&LOCALE=%s&HLTGT=%s&HLTGTNAME=%s&SHOWSLIDER=%s&SELCOLOR=%s&MAPIMGFORMAT=%s&SELIMGFORMAT=%s&POINTBUFFERSIZE=%s%s" scrolling=no border=3>
<frame id="formFrame" name="formFrame" noresize src="%s">
<frame id="scriptFrame" name="scriptFrame" src="../viewerfiles/blank.html" noresize>
</frameset>
Modified: trunk/MgDev/Web/src/viewerfiles/mainframe.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/mainframe.templ 2013-04-08 06:26:08 UTC (rev 7453)
+++ trunk/MgDev/Web/src/viewerfiles/mainframe.templ 2013-04-08 10:46:33 UTC (rev 7454)
@@ -169,6 +169,10 @@
var selectionAwareCmds = new Array();
%s
+function StartupFunc() {
+%s
+}
+
// public functions -----------------------------------------------
//
@@ -443,6 +447,7 @@
DisplayMapSize();
//ping server
pingServerFailTime = 0;
+ StartupFunc();
if(enablePingServer)
{
var pingServerInterval = serverSessionTimeout / 5 * 1000; //Ping server 5 times each period. Timeout is returned in seconds.
More information about the mapguide-commits
mailing list