Click to See Complete Forum and Search --> : Clickable map


pjm
07-25-2004, 08:20 AM
Hello,

Does anyone know of a free script of a clickable map where the choosen coordinates can be inserted and retrieved from an access database ? Something like this one: http://www.aspandjavascript.co.uk/javascript/clickable_map/

It's in javascript but it uses "<%=Request.Form("submit.x")%>" and "<%=Request.Form("submit.y")%>" to retrieve the coordinates of the mouse-click. I already was able to insert the coordinates in the database, now the problem is how to use/retrieve it!. The relevant code (javascript), I believe, is this:

...
.
.
.
function test() {
var myPin = getStyleObject('pin');
menuTop = getElementTop('map');
x = getElementLeft('map');

myPin.top=menuTop + 221-4 + 'px';
myPin.left=x + 17-4 + 'px';

myPin.top=menuTop + <%=Request.Form("submit.y")%>-4;
myPin.left=x + <%=Request.Form("submit.x")%>-4;


Instead of <%=Request.Form("submit.x")%> how can I use my recordset <%=rs("cordx")%>, because it works if I directly write there my x and y values.

Maybe this is more javascript than ASP...
I've spent so many hours on this that I've already lost lucidity

Can anybody help me on this? Thank you.

simflex
07-26-2004, 01:47 PM
This is fairly complicated.

I did something similar using Aut***** Mapguide. It is a web map application that uses x/y coordinate pair to pinpoint a location of a point a print a report based the coordinate pair.

If you think you can rummage through my code and figure out what I did and modify it for your purpose, I can provide you with the code.

Yes, it is a combination of javascript and asp but requires solid understanding of digitizePoint() and OnDigitizedPoint() methods.

pjm
07-26-2004, 03:35 PM
Thanks for your reply. If you don't mind, please send me your code to (pjgdm at yahoo dot com). Maybe my code skills are not enough to deal with this, but at least I can try and probably get some ideas from your code.