|
||||
[maplab-users] Refresh of the map with query buttonPaolo noti@ciaoweb.itMon, 8 Sep 2003 18:12:15 +0200
|
This is a multi-part message in MIME format. ------=_NextPart_000_0014_01C37634.BBC67BB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Paul, I''m trying... At the moment I allowed the query only for a single layer choosen by the = user in combo box and saved in a cookie file on the client PC. The string to pass to query.phtml is something like this: http://192.168.1.1/path/query.phtml?PrevStateKey=3DBBOX=3D1113224,4034000= ,2512776,5241000|SRS=3D|MAPSIZE=3D580,500| LAYERS=3D0,2,4,5,6,7,9&INPUT_COORD=3D121,112&ACTIVE_LAYER=3DRegion I added the ACTIVE_LAYER parameter in order to pass the layer to a = slightly modified query.phtml file In this case, I have to retrieve two parameters: BBOX and INPUT_COORD. For INPUT_COORD, I tried with the following code but something doesn't = work...: *************************************************************************= * //this is the code that retrieve coordinates inside the applet area. //I placed applet with absolute position css so numbers in the code //referred only to my applet position <SCRIPT language=3D"JavaScript"> function init() { document.onmousedown=3DgetMouseXY; } function getMouseXY() { var tempX =3D 0; var tempY =3D 0; // grab the x-y pos.s if browser is IE tempX =3D event.clientX + document.body.scrollLeft; tempY =3D event.clientY + document.body.scrollTop; if (tempX > 115 && tempX < 695 && tempY > 80 && tempY < 580) { if (tempX < 0){tempX =3D 0;} if (tempY < 0){tempY =3D 0;} var X =3D tempX - 115; var Y =3D tempY - 80; alert (X + "," + Y); } return true; } </script> ************************************************************** //this is the code in PHP file: echo "<param name=3D\"TB_BUT_TEST_JSACTION\" ". "value=3D\"init();\">\n"; ************************************************************** These javascript functions work very well in a normal html page but when = I try to get mouse position inside the rosa applet area nothing happens... tried also to comment different rows in getMouse function but no alert with coordinates appears. Thank you very much Paolo ----- Original Message -----=20 From: "Paul Spencer" <pagameba@magma.ca> To: "Paolo" <noti@ciaoweb.it> Cc: <maplab-users@dmsolutions.ca> Sent: Sunday, September 07, 2003 9:55 PM Subject: Re: [maplab-users] Refresh of the map with query button > Paolo, >=20 :> it is probably possible but not something we have actually tried to = do=20 > with GMapFactory applications. You should check the ROSA = documentation=20 > on http://www.maptools.org/. I would try adding >=20 > TB_BUT_QUERY_JSACTION >=20 > and writing a javascript function that would popup a query page = directly=20 > rather than submit the page. >=20 > It is likely possible to have it popup the existing query page but the = > trick would be to pass the query location and session id in the = correct=20 > way. You will have to jump into the code and see what it does if you=20 > use the existing query page. >=20 > If you ge tthis to work, please let me know and I will incorporate the = > change into an upcoming release of MapLab. >=20 > Cheers, >=20 > Paul >=20 > Paolo wrote: >=20 > >Hi, > >a question about a GMap application with rosa applet: > >is it possible to avoid refresh of the map (or refresh of the entire = page) when I use the query button in order to display data in a separate = windows. In other words I'd like the query button open the new database = windows without reloading the map in the applet area. > >I tried changing TB_BUT_QUERY_INPUT parameter (submit) but I don't = know how to operate and if I have to change php code in other files. > >Thanks in advance. > > > >Paolo > > =20 > > >=20 > --=20 > -- > Paul Spencer > Applications and Software Development > DM Solutions Group Inc. > http://www.dmsolutions.ca >=20 >=20 > ------=_NextPart_000_0014_01C37634.BBC67BB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff background=3D""> <DIV><FONT face=3DArial size=3D2>Paul,<BR>I''m trying...</FONT></DIV> <DIV><FONT face=3DArial size=3D2>At the moment I allowed the query = only for a=20 single layer choosen by the user in combo box and saved in a cookie file = on the=20 client PC.<BR>The string to pass to query.phtml is something like=20 this:<BR><BR>http://192.168.1.1/path/query.phtml?PrevStateKey=3DBBOX=3D11= 13224,4034000,2512776,5241000|SRS=3D|MAPSIZE=3D580,500|<BR>LAYERS=3D0,2,4= ,5,6,7,9&INPUT_COORD=3D121,112&ACTIVE_LAYER=3DRegion<BR><BR>I=20 added the ACTIVE_LAYER parameter in order to pass the layer to a = slightly=20 modified query.phtml file<BR>In this case, I have to retrieve two = parameters:=20 BBOX and INPUT_COORD.<BR><BR>For INPUT_COORD, I tried with the following = code=20 but something doesn't work...:</FONT></DIV> <DIV><FONT face=3DArial=20 size=3D2>****************************************************************= **********</FONT></DIV> <DIV><FONT face=3DArial size=3D2>//this is the code that retrieve = coordinates inside=20 the applet area.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>//I placed applet with absolute = position css so=20 numbers in the code</FONT></DIV> <DIV><FONT face=3DArial size=3D2>//referred only to my applet = position</FONT></DIV> <DIV><FONT face=3DArial size=3D2><SCRIPT = language=3D"JavaScript"><BR>function=20 init() {<BR>document.onmousedown=3DgetMouseXY;<BR>}<BR>function = getMouseXY()=20 {<BR>var tempX =3D 0;<BR>var tempY =3D 0;<BR>// grab the x-y pos.s if = browser is=20 IE<BR>tempX =3D event.clientX + document.body.scrollLeft;<BR>tempY =3D = event.clientY=20 + document.body.scrollTop;<BR>if (tempX > 115 && tempX < = 695=20 && tempY > 80 && tempY < 580)<BR>{<BR>if (tempX = <=20 0){tempX =3D 0;}<BR>if (tempY < 0){tempY =3D 0;}<BR>var X =3D tempX - = 115;<BR>var Y=20 =3D tempY - 80;<BR>alert (X + "," + Y);<BR>}<BR>return=20 true;<BR>}<BR></script><BR>****************************************= **********************<BR>//this=20 is the code in PHP file:</FONT></DIV> <DIV><FONT face=3DArial size=3D2>echo "<param = name=3D\"TB_BUT_TEST_JSACTION\"=20 ".<BR>"value=3D\"init();\">\n";</FONT></DIV> <DIV><FONT face=3DArial=20 size=3D2>**************************************************************</= FONT><BR></DIV> <DIV><FONT face=3DArial size=3D2>These javascript functions work = very well in a=20 normal html page but when I try</FONT></DIV> <DIV><FONT face=3DArial size=3D2>to get mouse position inside the rosa = applet area=20 nothing happens...</FONT></DIV> <DIV><FONT face=3DArial size=3D2>tried also to comment different rows in = getMouse=20 function but</FONT></DIV> <DIV><FONT face=3DArial size=3D2>no alert with coordinates = appears.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Thank you very much</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Paolo</FONT></DIV> <DIV><BR><FONT face=3DArial size=3D2>----- Original Message ----- = <BR>From: "Paul=20 Spencer" <pagameba@magma.ca><BR>To: "Paolo" = <noti@ciaoweb.it><BR>Cc:=20 <maplab-users@dmsolutions.ca><BR>Sent: Sunday, September 07, 2003 = 9:55=20 PM<BR>Subject: Re: [maplab-users] Refresh of the map with query=20 button<BR><BR><BR>> Paolo,<BR>> <BR>:> it is probably possible = but not=20 something we have actually tried to do <BR>> with GMapFactory=20 applications. You should check the ROSA documentation <BR>> on=20 http://www.maptools.org/. I would try adding<BR>> <BR>>=20 TB_BUT_QUERY_JSACTION<BR>> <BR>> and writing a javascript function = that=20 would popup a query page directly <BR>> rather than submit the = page.<BR>>=20 <BR>> It is likely possible to have it popup the existing query page = but the=20 <BR>> trick would be to pass the query location and session id in the = correct=20 <BR>> way. You will have to jump into the code and see what it = does if=20 you <BR>> use the existing query page.<BR>> <BR>> If you ge = tthis to=20 work, please let me know and I will incorporate the <BR>> change into = an=20 upcoming release of MapLab.<BR>> <BR>> Cheers,<BR>> <BR>>=20 Paul<BR>> <BR>> Paolo wrote:<BR>> <BR>> >Hi,<BR>> = >a=20 question about a GMap application with rosa applet:<BR>> >is it = possible=20 to avoid refresh of the map (or refresh of the entire page) when I use = the query=20 button in order to display data in a separate windows. In other words = I'd like=20 the query button open the new database windows without reloading the map = in the=20 applet area.<BR>> >I tried changing TB_BUT_QUERY_INPUT = parameter=20 (submit) but I don't know how to operate and if I have to change php = code in=20 other files.<BR>> >Thanks in advance.<BR>> ><BR>>=20 >Paolo<BR>> > <BR>> ><BR>> <BR>> -- <BR>>=20 --<BR>> Paul Spencer<BR>> Applications and Software = Development<BR>> DM=20 Solutions Group Inc.<BR>> http://www.dmsolutions.ca<BR>> <BR>> = <BR>>=20 </FONT></DIV></BODY></HTML> ------=_NextPart_000_0014_01C37634.BBC67BB0--
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |