New GoogleMaps Example - will convert KML to GPX
"Wolfgang Fahl" <[email protected]> Fri, 02 May 2008 18:11:18 +0200
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Organization | BITPlan GmbH |
| Message-ID | <[email protected]> |
Dear httpunit developers,
Revision 952 has a new GoogleMaps example which even has
some usability for owners of Garmin GPS devices:
http://httpunit.svn.sourceforge.net/viewvc/httpunit?view=rev&revision=952
The example will take three command line parameters
representing the start and destination point and the
filename where to store the result.
The task is then to visit the Google Maps web site ask
for a route between the start and destination point -
get the result as a KML file and convert it to Garmin
GPX format.
Before this example it took me quite a bunch of tools to
get the same result. With httpunit it's less than 200
lines of code and my MapSource 6.13.7 will happily read
the resulting file and display the route (even if it's
from the other side of the world ...)
Enjoy!
One quirk I had to work around was the it's not possible
to set hidden input field/parameter values with the
current state of 1.7.
So
// request.setParameter("output", "kml");
in the example didn't work because it throws a
MissingParameterValueException so I commented it out.
I allowed for the following work around now:
FormParameter parameter = lookupForm.getParameter( "output" );
FormControl outputControl=parameter.getControl();
outputControl.setAttribute("value", "kml");
The necessary changes in visibility are an unwanted side
effect. I'd rather like to add a function for this like
"overrideHiddenParameterValue" ...
Any thoughts?
Yours
Wolfgang
BITPlan - smart solutions
Pater-Delp-Str. 1, D-47877 Willich Schiefbahn
Tel. +49 1805 - BITPLAN / +49 1805 248 752, Fax +49 2154 811-481
Web: http://www.bitplan.de
bitplan GmbH, Willich - HRB 6820 Krefeld, VAT-ID: 10258040548,
Geschäftsführer: Wolfgang Fahl
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop