wiki:DocAdvancedJsSettings

TOC?

Advanced JavaScript options for js_config.php

Less usual settings are defined for the workspace of their respective object. They are defined the same way as the main configuration options in js_config.php

>> Base JavaScript settings

Dlg options

/** Define if dialog should be transparent on move/resize*/
PM.Dlg.transparentOnMoveResize = true;

/** Opacity if transparency enabled for dialog move/resize */
PM.Dlg.moveResizeOpacity = 0.9;

/** default options for help dialog */
PM.Dlg.helpDlgOptions = {width:350, height:500, left:100, top:50, resizeable:true, newsize:true, container:'pmDlgContainer', name:"help"};

/** default options for download dialog */
PM.Dlg.downloadDlgOptions = {width:260, height:220, left:200, top:200, resizeable:false, newsize:true, container:'pmDlgContainer', name:"download"};

/** default options for print dialog */
PM.Dlg.printDlgOptions = {width:350, height:280, left:200, top:200, resizeable:true, newsize:true, container:'pmDlgContainer', name:"print"};

/** Enable dialog roll up by double click on window bar */
PM.Dlg.enableRollup = true;

Map options

/**
 * Specifies how far (in pixels) a user needs to drag the mouse
 * to enable zoom to rectangle, otherwise zoom to point. (default: 10)
 * Should be set to >3
 */
PM.Map.zoomJitter = 10;

Query options

        
/** default options for query result dialog */
PM.Query.resultDlgOptions = {width:500, height:250, resizeable:true, newsize:false, container:'pmQueryContainer', name:"query"};


/**
 * Default template for query
 */
PM.Query.queryTpl = { 
    "table":
       {"queryHeader": "<div>",
        "queryFooter": "</div>",
        "layers": 
            {"#default":
               {"layerHeader":"<div class=\"pm-info-layerheader\">_p(Layer): ${description}</div><table class=\"sortable\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">",
                "theaderTop": "<tr>",
                "theader": "<th>@</th>",
                "theaderBottom": "</tr>",
                "tvaluesTop": "<tr>",
                "tvalues":
                    {"shplink": "<td class=\"zoomlink\"><a href=\"javascript:PM.Map.zoom2extent('$[0]','$[1]','$[2]','$[3]')\"><img src=\"images/zoomto.gif\" alt=\"zoomto\"></a></td>",
                     "hyperlink": "<td><a href=\"javascript:PM.Custom.openHyperlink('$[0]','$[1]','$[2]')\">$[3]</a></td>",
                     "#default": "<td>$</td>"
                    },
                "tvaluesBottom": "</tr>",
                "layerFooter":"</table>"
               }
            },
        "zoomall": 
            {"top": "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>",
             "center": "<td class=\"zoomlink\"><a href=\"javascript:PM.Map.zoom2extent(0,0,'${allextent}',1)\"><img src=\"images/zoomtoall.gif\"alt=\"za\"></a></td>",
             "bottom": "<td class=\"TDAL\">_p(Zoom to Selected Features)</td></tr></table>"
            },

        "callbackfunction": false
            
       },
       
    "tree":
       {"queryHeader": "<div><ul>",
        "queryFooter": "</div></ul>",
        "layers": 
            {"#default":
               {"layerHeader":"<li><span>${description}</span><ul>",
                "theaderTop": false,
                "theader": false,
                "theaderBottom": false,
                "tvaluesTop": '<li><span>$1</span><ul>',
                "tvalues":
                    {"shplink": "<li><a href=\"javascript:PM.Map.zoom2extent('$[0]','$[1]','$[2]','$[3]')\"><img src=\"images/zoomtiny.gif\" alt=\"zoomto\"> _p(Zoom)</a></li>",
                     "hyperlink": "<li>@: <a href=\"javascript:PM.Custom.openHyperlink('$[0]','$[1]','$[2]')\">$[3]</a></li>",
                     "#default": "<li>@: $</li>"
                    },
                "tvaluesBottom": '</ul></li>',
                "layerFooter":"</ul></li>"
               }
            },
        "zoomall": 
            {"top": "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>",
             "center": "<td class=\"zoomlink\"><a href=\"javascript:PM.Map.zoom2extent(0,0,'${allextent}',1)\"><img src=\"images/zoomtoall.gif\"alt=\"za\"></a></td>",
             "bottom": "<td class=\"TDAL\">_p(Zoom to Selected Features)</td></tr></table>"
            },

        "callbackfunction": false
            
       },
       
    "iquery":
       {"queryHeader": "<div>",
        "queryFooter": "</div>",
        "layers": 
            {"#default":
               {"layerHeader":"<table class=\"pm-iquery\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><th colspan=\"2\" class=\"pm-iquery-header\">${description}</th></tr>",
                "theaderTop": false,
                "theader": false,
                "theaderBottom": false,
                "tvaluesTop": false,
                "tvalues":
                    {"shplink": false,
                     "hyperlink": "<tr><th>@</th><td>$[3]</td></tr>",
                     "#default": "<tr><th>@</th><td>$</td></tr>"
                    },
                "tvaluesBottom": false,
                "layerFooter":"</table>"
               }
            },
        "nozoomparams": true
       }
};

ZoomBox options

//** Show coordinates durng mouse move */
PM.ZoomBox.showCoordinates = true;

/** Container for coordinates display */
PM.ZoomBox.xCoordCont = $('#xcoord');
PM.ZoomBox.yCoordCont = $('#ycoord');

/** Enbale zoom via mouse wheel  */
PM.ZoomBox.enableWheelZoom = true;

/**
 * Define if zoom with mouse wheel is always centered 
 * on pointer position (true = default setting) or on map center (false)
 */
PM.ZoomBox.wheelZoomPointerPosition = true;

/** Invert wheel zoom action to follow Google behaviour (default: false) */
PM.ZoomBox.wheelZoomGoogleStyle = false;

/**  Enaable map navigation with keys */
PM.ZoomBox.enableKeyNavigation = true;

/** Decide if SELECT/NQUERY includes also IQUERY/auto-identify (default: false)  */
PM.ZoomBox.combinedSelectIquery = false;
   
/** Minimal width until to show refBox; below threshold switches to refCross */
PM.ZoomBox.rBoxMinW = 8;

/** offset for reference map cross, depends on image size */
PM.ZoomBox.rOffs = 13;
   
   

Last modified 9 years ago Last modified on Aug 8, 2009, 11:50:22 AM