ArcIms / Javascript Question
Mark Howard
mhoward at AKIMEKA.COM
Fri Nov 18 17:19:56 PST 2005
This is really an ArcIMS web programming question. I have a STRUTS
HTML/javascript application that has an inbedded map. The jsp page has a
form:
<form action="map.do" method="post" name="Main" id="Main">
Inside the form is the map:
<input type="image" id="map" src="<%=
((com.esri.aims.mtier.model.map.Map)request.getAttribute("theMap")).getM
apOutput().getURL() %>
When the map is acted on (clickec...) -- the Map.do action calls a java
app to build a new map and then the whole page is reloaded -- with the
new map. Of course this is a pain because all the control states have to
persisted, and the refresh is annoying. ESRI solves this by using a form
for the map with it's own URL. I'd like to try to use a DIV or something
similar to hold the map -- and trap the map requests -- and just refresh
the map (change the src when the map has been generated). I've done this
already by opening a new window with the new URL -- and switching the
src.
newwin=window.open(theNewURL, "NewWin", width=1000,height=500");
document.getElementById('map').src=newwin.document.getElementById('map')
.src;
2 problems.
Problem 1 is that (of course) I have to create a window open for the
request to run.
Problem 2 is that I have to wait until the request is finished so that I
get the new map ULR instead of the old one.
I can solve problem 1 with a URL grabber routine. If you have such a
beast I'd appreciate it if you would share! #2 I'm not so sure of -
however #1 involves streaming, so #2 could be called after #1 is
complete.
Any ideas????
TIA!!!!!
Mark
More information about the MapServer-users
mailing list