Ok... I got your code working...<br><br>All you need to do is add your kaMap object to the parameters of the kaLegend call... so it should be:<br> myKaLegend = new kaLegend( myKaMap, 'legend' );<br><br>kaLegend.js does say that all you need to do is add the name of the div, but apparently it is wrong. You gotta make sure to reference which map the legend is for.
<br><br>Take a look at the kaExplorer startUp.js (probably located at /tools/kaExplorer/startUp.js)... it adds a legend with some additional parameters that set the legend options.<br><br>Hope it works!<br><br>Sam<br><br>
<br><div><span class="gmail_quote">On 8/7/07, <b class="gmail_sendername">Alessio Di Lorenzo</b> <<a href="mailto:alessio.dilorenzo@gmail.com">alessio.dilorenzo@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>my code now is the following:<br><br><html><br> <head><br> <title>Customizing Ka-Map!</title><br><br> <script type="text/javascript" src="DHTMLapi.js"></script>
<br> <script type="text/javascript" src="xhr.js"></script><br> <script type="text/javascript" src="kaMap.js"></script><br> <script type="text/javascript" src="
kaTool.js"></script><br> <script type="text/javascript" src="kaLegend.js"></script><br><br> <script type="text/javascript"><br> var myKaMap;
<br> var myKaNav;<br><br> function myOnLoad() {<br> myKaMap = new kaMap( 'mapDiv' );<br> myKaMap.server =<br>'<a href="http://localhost/luoghidabruzzo/ka-map/htdocs/">
http://localhost/luoghidabruzzo/ka-map/htdocs/</a>';<br> myKaMap.initialize();<br><br> myNav = new kaNavigator ( myKaMap );<br> myNav.activate ();<br><br> myKaLegend = new kaLegend( 'legend' );
<br><br> }<br><br> </script><br><br> </head><br> <body onload="myOnLoad();"><br><br> <div id="mapDiv"><br> </div>
<br><br> <div id="legend">legenda<br> </div><br><br> </body><br></html><br><br><style type="text/css"><br> #mapDiv {<br> position: relative;
<br> width: 640px;<br> height: 480px;<br> background-color: white;<br> border: 1px solid black;<br> }<br></style><br><br><br><br>If you try to use it, you get something working? (including the legend...)
<br><br><br>Alessio<br><br></blockquote></div><br>