[ka-Map-users] making object in map clickable while in navigator
mode?
Paul Spencer
pspencer at dmsolutions.ca
Thu Aug 17 07:41:25 EDT 2006
Donal,
you can add point data using:
var img = document.createElement('img');
img.src = 'images/marker.png';
img.style.cursor = 'help';
img.onclick = markerClicked;
//note you only need one drawing canvas normally, but you can use
more than one
var canvas = myKaMap.createDrawingCanvas(1000);
myKaMap.addObjectGeo(canvas, x, y, img);
function markerClicked() {
alert('clicked a marker');
}
You don't need to be in query mode to interact with basic overlays
like this.
Cheers
Paul
(note code untested)
On 17-Aug-06, at 1:25 AM, Donal Regan wrote:
> Hello.
>
> I have some data points belonging to one layer on my map that I
> represent with an icon. I want to click on one of these icons and
> then display some data asscociated with that point. Is there any
> way of telling the map that the icon is clickable?
>
> I see that I can have a control to toggle between kaNavigator and
> kaQuery so that if kaQuery is activated I can click on my icon and
> carry out my query. I would like to stay in navigator mode but be
> able to click on my icon. The cursor would change when mousing over
> the icon.
>
> Do I have to use an xmlOverlay?
>
> Thanks,
>
> Donal
>
>
> Now you can scan emails quickly with a reading pane. Get the new
> Yahoo! Mail.
> _______________________________________________
> 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