[ka-Map-users] customizing ka-map

Samuel Hiatt samhiatt at gmail.com
Tue Aug 7 17:29:38 EDT 2007


I am very glad I could help out.  I'm excited to see what you come up with!

Sam


On 8/7/07, Alessio Di Lorenzo <alessio.dilorenzo at gmail.com> wrote:
>
> 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
> >
> >
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20070807/3eed76e2/attachment.html


More information about the ka-Map-users mailing list