[ka-Map-users] addObjectGeo error
Paul Spencer
pspencer at dmsolutions.ca
Wed Jan 18 22:22:10 EST 2006
Harry,
lat and lon are a bit misleading. They should be in whatever units
your map projection is in. If you happen to be using a latlong
projection then they would be in decimal degrees. I'm pretty sure
that you can find an algorithm to convert degrees/minutes/seconds to
decimal degrees, I don't happen to have one handy (would it be as
simple as d + m/60 + s/60?).
myKaMap should be declared somewhere as a global variable (its in
startUp.js in the default interface) and assigned a new instance of
kaMap in the onload event of the window. If you've been stripping
index.html then you likely removed startUp.js :)
Cheers
Paul
On 18-Jan-06, at 7:33 PM, harry at politistaten.dk wrote:
> Hello again
>
> I've got this in my ka-Map HTML file:
>
> 123 <script type="text/javascript">
> 124 var canvas = myKaMap.createDrawingCanvas( 5000 ); //zindex=500
> 125 var img = document.createElement( 'img' );
> 126 img.src = 'images/valid-html401.png';
> 127 myKaMap.addObjectGeo( canvas, 10061392, 56442166, img );
> 128 </script
>
> But Firefox Javascript-console gives me this error:
>
> Error: myKaMap has no properties
> Line: 124
>
> Also, i am not sure my lat/lon are right, what is the format, if the
> coordinate is 10°06'13.92"N 56°44'21.66"E ?
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the ka-Map-users
mailing list