[mapguide-users] Ajax viewer, URL in Properties Pane
Gord McKenzie
gord.mckenzie at canam.com
Mon Feb 6 11:04:02 PST 2017
OK. That code solution fits my scenario. When I paste these two functions into "propertyctrl.templ", replacing the original versions, my map viewer window freezes up. I imagine there is a problem properly loading the propertyctrl.templ file and it freezes the map window load.
-----Original Message-----
From: mapguide-users [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of RenoSun
Sent: Monday, February 06, 2017 10:43 AM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] Ajax viewer, URL in Properties Pane
No problem. The solution for Ajax viewer is similar. Please modify the following codes.
C:\Program Files\MapGuide\www\viewerfiles\propertyctrl.templ
function SetProperties(count, properties) {
var code;
propCount = count;
if(count != 1)
{
var text;
if(count == 0)
{
text = "__#PROPERTIESNONE#__";
GetMapFrame().SetPropertyPaneToolbarVisibility(false);
}
else
{
text = GetMainFrame().FormatMessage("__#PROPERTIESITEMSEL#__",
new Array(count, "unused"));
GetMapFrame().SetPropertyPaneToolbarVisibility(true);
}
code = '
' + text + '
';
}
else
{
code = '
__#PROPERTIESNAME#__ __#PROPERTIESVALUE#__';
for(var i=0; i < properties.length; i++)
code += '
' + properties[i].name + ' ' + HtmlDecode(properties[i].value) + '';
code += '
';
GetMapFrame().SetPropertyPaneToolbarVisibility(true);
}
SetContent(code);
}
.............
var _el = null; //Our "parser" element
function HtmlDecode(input)
{
if (input == null || input == "")
return input;
if (_el == null)
_el = document.createElement('div');
_el.innerHTML = input;
return _el.childNodes[0].nodeValue;
}
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Ajax-viewer-URL-in-Properties-Pane-tp5306236p5306550.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list