Hi MARTIJN:
This is my code:
private void processMap(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
MapRequestHandler map =
(MapRequestHandler)hsMaps.get((String)request.getSession().getId());
com.bbn.openmap.proj.LLXY llxyAux =
(com.bbn.openmap.proj.LLXY)map.getDefaultProjection();
llxyAux.setScale(llxyAux.getScale()-1000000);
hsMaps.put((String)request.getSession().getId(),
(MapRequestHandler)map);
response.sendRedirect("http://localhost:8080/gis/index.jsp");
}
I have a MapRequestHandler object for each session and I store them in a
Hashtable indexed by Session ID. I obtain the object and then from it I
recover the LLXY projection. Then I try to set the new Scale (now as I am in
tests, just downsizing it) and then I overwrite (to avoid possible fails
here) again in the hashtable. After this I redirect the flow to a JSP wich
has a img tag calling the servlet, and then it will execute this code:
MapRequestHandler map =
(MapRequestHandler)hsMaps.get((String)request.getSession().getId());
response.setContentType("image/gif");
response.getOutputStream().write(map.createImage(map.getDefaultProjection())
);
response.flushBuffer();
Thanks in advance for your help
-----Original Message-----
From: MARTIJN VAN DER PAUW [mailto:martijnp@meteocon.nl]
Sent: viernes, 02 de agosto de 2002 13:17
To: Williams, Leonidas (IndSys, GEPC); owner-openmap-users@bbn.com
Subject: Re: Hi to everyone
Could you show me some code. After a setScale();
I am using the
.getMapImage(Projection); on the imageserver
method. That works fine. It returns a byte array that you can write
to the outputstream. So, in my servlet app I use the imageserver.
If you have further questions, you could ask me those.
Martijn
Op 2 Aug 02, om 14:20, Williams, Leonidas (IndSys, GEPC)
schreef:
> Hi to everyone:
>
> I am implementing a servlet version with OpenMap. I have the servlet that
> builds the image and send it to the HTML page, so all is working fine.
>
> My problem is that I am not able to execute a ZoomIn operation. I tried to
> modify the Scale attribute in the projection object in the
> MapRequestHandler, but no change is produced. What am I doing bad?? Should
> I use the WMSPlugIn?? How should I setup this plugin??
>
> Any help would be thank a lot.
>
> Thank you to everybody and regards
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
Martijn van der Pauw, internetontwikkelaar.
Meteo Consult
martijn@weer.nl
tel: 0317 - 399800
fax: 0317 - 423164
http://www.weer.nl
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Fri Aug 2 09:28:05 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT