[mapguide-users] Ajax viewer, URL in Properties Pane

RenoSun renolionheart at gmail.com
Mon Feb 6 09:43:28 PST 2017


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.


More information about the mapguide-users mailing list