[ka-Map-users] customizing ka-map

Alessio Di Lorenzo alessio.dilorenzo at gmail.com
Tue Aug 7 15:34:33 EDT 2007


YES!!!!!
Sam, you're right! It works!

In the next days I'll try to add all the other tools :)

At the moment the good working code is this:

<html>
    <head>
        <title>Customizing Ka-Map!</title>

        <script type="text/javascript" src="DHTMLapi.js"></script>
        <script type="text/javascript" src="xhr.js"></script>
      <script type="text/javascript" src="kaMap.js"></script>
        <script type="text/javascript" src=" kaTool.js"></script>
        <script type="text/javascript" src="kaLegend.js"></script>

        <script type="text/javascript">
                var myKaMap;
                var myKaNav;

                function myOnLoad() {
                    myKaMap = new kaMap( 'mapDiv' );
                    myKaMap.server =
' http://localhost/luoghidabruzzo/ka-map/htdocs/';
                    myKaMap.initialize();

                        myNav = new kaNavigator ( myKaMap );
                  myNav.activate ();

                  myKaLegend = new kaLegend( 'legend' );

                }

                </script>

    </head>
    <body onload="myOnLoad();">

                    <div id="mapDiv">
                    </div>

                    <div id="legend">legenda
                    </div>

    </body>
</html>

<style type="text/css">
    #mapDiv {
        position: relative;
        width: 640px;
        height: 480px;
        background-color:  white;
        border: 1px solid black;
    }
</style>


It's very very simple but I hope this could be helpful for someone who 
want to start the creation of his own ka-map interface.

Samuel, if you want you can put it in your wiki tutorial as a basic example.

Thanks a lot for your precious help!

Alessio



Samuel Hiatt ha scritto:
> Ok... I got your code working...
>
> All you need to do is add your kaMap object to the parameters of the 
> kaLegend call... so it should be:
>  myKaLegend = new kaLegend( myKaMap, 'legend' );
>
> 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.
>
> 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.
>
> Hope it works!
>
> Sam
>
>
> On 8/7/07, *Alessio Di Lorenzo* <alessio.dilorenzo at gmail.com 
> <mailto:alessio.dilorenzo at gmail.com>> wrote:
>
>
>     my code now is the following:
>
>     <html>
>         <head>
>             <title>Customizing Ka-Map!</title>
>
>             <script type="text/javascript" src="DHTMLapi.js"></script>
>             <script type="text/javascript" src="xhr.js"></script>
>           <script type="text/javascript" src="kaMap.js"></script>
>             <script type="text/javascript" src=" kaTool.js"></script>
>             <script type="text/javascript" src="kaLegend.js"></script>
>
>             <script type="text/javascript">
>                     var myKaMap;
>                     var myKaNav;
>
>                     function myOnLoad() {
>                         myKaMap = new kaMap( 'mapDiv' );
>                         myKaMap.server =
>     ' http://localhost/luoghidabruzzo/ka-map/htdocs/';
>                         myKaMap.initialize();
>
>                             myNav = new kaNavigator ( myKaMap );
>                       myNav.activate ();
>
>                       myKaLegend = new kaLegend( 'legend' );
>
>                     }
>
>                     </script>
>
>         </head>
>         <body onload="myOnLoad();">
>
>                         <div id="mapDiv">
>                         </div>
>
>                         <div id="legend">legenda
>                         </div>
>
>         </body>
>     </html>
>
>     <style type="text/css">
>         #mapDiv {
>             position: relative;
>             width: 640px;
>             height: 480px;
>             background-color:  white;
>             border: 1px solid black;
>         }
>     </style>
>
>
>
>     If you try to use it, you get something working? (including the
>     legend...)
>
>
>     Alessio
>
>



More information about the ka-Map-users mailing list