hi all,<br><br>can someone help me solve this problem? my layer switcher and hover handler won&#39;t work, I don&#39;t know why.<br>Below is my code:<br><br><br>&lt;html xmlns=&quot;<a href="http://www.9media.co.nr">http://www.9media.co.nr</a>&quot;&gt;<br>
  &lt;head&gt;<br>    &lt;title&gt;Minahasa Utara&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;<a href="http://localhost/openlayers/theme/default/style.css">http://localhost/openlayers/theme/default/style.css</a>&quot; type=&quot;text/css&quot; /&gt;<br>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; /&gt;<br>    &lt;style type=&quot;text/css&quot;&gt;<br>            #map {<br>                width: 100%;<br>                height: 100%;<br>
                border: 1px solid black;<br>            }<br>            #controlToggle li {<br>                list-style: none;<br>            }            <br>                textarea.output {<br>                text-align: left;<br>
                font-size: 12em;<br>                overflow: auto;<br>            }<br>            <br>    &lt;/style&gt;        <br>    &lt;script src=&quot;<a href="http://localhost/openlayers/lib/Firebug/firebug.js">http://localhost/openlayers/lib/Firebug/firebug.js</a>&quot;&gt;&lt;/script&gt;<br>
    &lt;script src=&quot;<a href="http://localhost/openlayers/lib/OpenLayers.js">http://localhost/openlayers/lib/OpenLayers.js</a>&quot;&gt;&lt;/script&gt;<br>    &lt;script defer=&quot;defer&quot; script type=&quot;text/javascript&quot;&gt;<br>
<br>//Hover<br>            OpenLayers.Control.Hover = OpenLayers.Class(OpenLayers.Control, {                <br>                defaultHandlerOptions: {<br>                    &#39;delay&#39;: 400,<br>                    &#39;pixelTolerance&#39;: null,<br>
                    &#39;stopMove&#39;: false<br>                },<br><br>                initialize: function(options) {<br>                    this.handlerOptions = OpenLayers.Util.extend(<br>                        {}, this.defaultHandlerOptions<br>
                    );<br>                    OpenLayers.Control.prototype.initialize.apply(<br>                        this, arguments<br>                    ); <br>                    this.handler = new OpenLayers.Handler.Hover(<br>
                        this,<br>                        {&#39;pause&#39;: this.onPause, &#39;move&#39;: this.onMove},<br>                        this.handlerOptions<br>                    );<br>                }, <br><br>
                onPause: function(evt) {<br>                    var output = document.getElementById(this.key + &#39;Output&#39;);<br>                    var msg = &#39;pause &#39; + evt.xy;<br>                    output.value = output.value + msg + &quot;\r\n&quot;;<br>
                },<br>            });    <br><br>//Map            <br>        //var lon = 5;<br>        //var lat = 5;<br>        //var zoom = 5;<br>        var map, controls, drawControls, layer_desa, layer_jalan, layer_atm, layer_bank, layer_polisi, layer_rs, layer_term, layer_uni, layer_ow, layer_htl;<br>
        <br>        function init(){<br>            var options = {<br>                projection: &quot;EPSG:4326&quot;,<br>                units: &quot;m&quot;,<br>                maxResolution: 156543.0339,<br>                maxExtent: new OpenLayers.Bounds(659950, 140743,<br>
                                                 776058, 210476)<br>            };        <br>            <br>            map = new OpenLayers.Map(&#39;map&#39;, options);<br>                                                                <br>
            layer_desa = new OpenLayers.Layer.WMS( &quot;Desa&quot;,<br>                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>
             {layers: &#39;desa&#39;,  <br>             transparent: &quot;false&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true},<br>             {isBaseLayer: true});<br>             <br>            layer_jalan = new OpenLayers.Layer.WMS( &quot;Jalan&quot;,<br>
                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>             {layers: &#39;jalan&#39;,  <br>
             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});             <br>             <br>            layer_atm = new OpenLayers.Layer.WMS( &quot;ATM&quot;,<br>                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;, <br>
             {layers: &#39;atm&#39;,<br>             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});<br>            <br>            layer_bank = new OpenLayers.Layer.WMS( &quot;Bank&quot;,<br>
                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>             {layers: &#39;bank&#39;,  <br>
             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});<br>             <br>            layer_polisi = new OpenLayers.Layer.WMS( &quot;Polisi&quot;,<br>                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>
             {layers: &#39;polisi&#39;,  <br>             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});<br>             <br>            layer_rs = new OpenLayers.Layer.WMS( &quot;Rumah Sakit&quot;,<br>
                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>             {layers: &#39;rumah sakit&#39;,  <br>
             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});<br>             <br>            layer_term = new OpenLayers.Layer.WMS( &quot;Terminal&quot;,<br>                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>
             {layers: &#39;terminal&#39;,  <br>             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});             <br>             <br>            layer_uni = new OpenLayers.Layer.WMS( &quot;Universitas&quot;,<br>
                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>             {layers: &#39;universitas&#39;,  <br>
             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});<br>             <br>            layer_ow = new OpenLayers.Layer.WMS( &quot;Objek Wisata&quot;,<br>                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>
             {layers: &#39;objek wisata&#39;,  <br>             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});<br>             <br>            layer_htl = new OpenLayers.Layer.WMS( &quot;Hotel&quot;,<br>
                &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map">http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/apps/Skripsi/coba.map</a>&quot;,<br>             {layers: &#39;hotel&#39;,  <br>
             transparent: &quot;true&quot;, format: &quot;image/png&quot;},<br>             {singleTile: true});        <br>                              <br>            map.addLayer(layer_desa);                 <br>            map.addLayer(layer_jalan);<br>
            map.addLayer(layer_atm);<br>            map.addLayer(layer_bank);<br>            map.addLayer(layer_polisi);<br>              map.addLayer(layer_rs);<br>            map.addLayer(layer_term);<br>            map.addLayer(layer_uni);<br>
            map.addLayer(layer_ow);<br>            map.addLayer(layer_htl);<br>                <br>                controls = {<br>                    &#39;short&#39;: new OpenLayers.Control.Hover({<br>                        handlerOptions: {<br>
                            &#39;delay&#39;: 100<br>                        }<br>                    }),<br>                };<br>                var props = document.getElementById(&quot;props&quot;);<br>                var control;<br>
                for(var key in controls) {<br>                    control = controls[key];<br>                    control.key = key;<br>                    map.addControl(control);<br>                }<br>// map controls            <br>
            map.addControl(new OpenLayers.Control.MousePosition());<br>            map.addControl(new OpenLayers.Control.LayerSwitcher());<br>            map.addControl(new OpenLayers.Control.ScaleLine());<br>            map.addControl(new OpenLayers.Control.PanZoomBar());<br>
            map.setCenter(new OpenLayers.LonLat(0, 0), 0);<br>            map.zoomToMaxExtent();    <br>//get layer details on click<br>            map.events.register(&#39;click&#39;, map, function (e) {<br>                OpenLayers.Util.getElement(&#39;nodeList&#39;).innerHTML = &quot;Detail: Loading...&quot;;<br>
                var url =  layer_desa.getFullRequestString({<br>                            REQUEST: &quot;GetFeatureInfo&quot;,<br>                            EXCEPTIONS: &quot;application/vnd.ogc.se_xml&quot;,<br>                            BBOX: layer_desa.map.getExtent().toBBOX(),<br>
                            X: e.xy.x,<br>                            Y: e.xy.y,<br>                            INFO_FORMAT: &#39;text/html&#39;,<br>                            QUERY_LAYERS: layer_desa.params.LAYERS,<br>                            WIDTH: layer_desa.map.size.w,<br>
                            HEIGHT: layer_desa.map.size.h});<br>                OpenLayers.loadURL(url, &#39;&#39;, this, setHTML);<br>                OpenLayers.Event.stop(e);<br>            });<br><br>            drawControls = {<br>
                selecthover: new OpenLayers.Control.SelectFeature(<br>                    layer_desa,<br>                    {<br>                        multiple: false, hover: true,<br>                        toggleKey: &quot;ctrlKey&quot;, <br>
                        multipleKey: &quot;shiftKey&quot; <br>                    }<br>                )<br>            };<br>            <br>        }<br>        function toggle(key) {<br>                var control = controls[key];<br>
                if(control.active) {<br>                    control.deactivate();<br>                } else {<br>                    control.activate();<br>                }<br>                var status = document.getElementById(key + &quot;Status&quot;);<br>
                status.innerHTML = control.active ? &quot;on&quot; : &quot;off&quot;;<br>                var output = document.getElementById(key + &quot;Output&quot;);<br>                output.value = &quot;on&quot;;<br>
        }    <br>        function setHTML(response) {<br>            OpenLayers.Util.getElement(&#39;nodeList&#39;).innerHTML = response.responseText;<br>        }        <br>                <br>    &lt;/script&gt;<br>  &lt;/head&gt;<br>
  &lt;body onload=&quot;init()&quot;&gt;<br>    &lt;div id=&quot;map&quot; class=&quot;smallmap&quot;&gt;&lt;/div&gt;    <br>    &lt;div id=&quot;nodeList&quot;&gt;Detail:  &lt;/div&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;<br>
<br>