[ka-Map-users] Does there exist any plotting funtions yet?
Paul Spencer
pspencer at dmsolutions.ca
Tue Sep 27 10:54:41 EDT 2005
Clark, its just an image. You can add an onclick if you like, its
nothing to do with ka-Map specifically.
img.onclick = myOnClick;
function myOnClick( e )
{
e = window.event?window.event:e;
alert( 'img clicked' );
}
other tricks would be:
img.style.cursor = 'help';
img.onmouseover = myMouseOver;
img.onmouseout = myMouseOut;
etc ...
If you want to make it work with partially transparent images, you
will need to create an imagemap and put the onclick in the imagemap.
That's just normal HTML stuff, I'm sure there are good tutorials on
the web for it.
re dialog boxes, you can design your own in a div and in the onclick
call the addobjectgeo to put it on the map. One thing I didn't
mention is that you can define an offset value to correctly align
images or other html elements
img.xOffset = -10;
img.yOffset = -10;
would anchor an image 10 pixels from the left and top edge. This is
important depending on your image design.
Cheers
Paul
On 27-Sep-05, at 10:42 AM, Clark Endrizzi wrote:
> Thanks, works great.
>
> I do wonder however if there is a way to add a mouse even function
> (like a single click) to one of my markers I would be very
> impressed if Ka Map has this already since that seems like that
> would be very hard.
>
> Google does this stuff pretty good: http://labs.google.com/
> ridefinder. In my case I don't really care about the pop up bubble
> windows (even though it's awesome) since when users click on my
> markers I would rather have it display the information in a side
> dialog box or something. However, if we could get a workable way
> of clicking on a marker than it appears that adding what google has
> wold be trivial since you can currently add and take away images.
>
> The thing that I'm impressed with is the dealing with transparency
> in the images so that the transparent part of the image is non-
> clickable. If Ka Map doesn't currently support any way of
> detecting clicks on images attached to a map then I would like to
> try doing this. If you have any pointers on the best way to do
> this I would be thankful since I would rather have this benefit
> everyone. I'm getting pretty far in my understanding of the code
> but I still have a ways to go so let me know.
>
> Thanks,
> Clark
>
> On 9/26/05, Paul Spencer <pspencer at dmsolutions.ca> wrote: Clark,
>
> you can do the following:
>
> var canvas = myKaMap.createDrawingCanvas( 500 ); //zindex=500
> var img = document.createElement( 'img' );
> img.src = 'images/myMarker.png';
> myKaMap.addObjectGeo( canvas, lon, lat, img );
>
> Cheers
>
> Paul
>
> On 26-Sep-05, at 6:04 PM, Clark Endrizzi wrote:
>
> > Just curious since I don't want to duplicate efforts. Basically,
> > much like you can do with google, I want to plot some places. I
> > haven't really seen this.
> >
> > If this hasn't been done then I would be curious to know if anyone
> > has any ideas on how to best do this?
> >
> > On a seperate issue, I got today's CVS stuff and am not sure how to
> > get the check boxes to disable layers (I saw that on at least one
> > page). That is very cool and I would like to try that. Got any
> > pointers?
> >
> > Thanks,
> > --
> > -Clark Endrizzi
> > _______________________________________________
> > 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/|
> +-----------------------------------------------------------------+
>
>
>
>
>
>
>
> --
> -Clark Endrizzi
> _______________________________________________
> 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