Re: Printing map from web page



Here is how I did it:

I loaded the page into a web browser object.
I located the image, the HTML looks like this:

<img src="http://maps.google.com/mapdata?Point=b&;
Point.latitude_e6=41852681&Point.longitude_e6=4207123396&
Point.iconid=15&Point=e&latitude_e6=41852681&
longitude_e6=4207123396&zm=4800&w=600&h=400&cc=US&
min_priority=1"
border=1
width="600"
height="400">

I took the value of src and fed it into the DownloadFile API and
it downloaded a GIF file. I then reload the image file into an image
control and process it from there.

Regards
Saga

"Saga" <antiSPAM@xxxxxxxxxxx> wrote in message
news:unqamX9dGHA.3888@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,

I am in need of printing out a map from a web page. The map can be
from
mapquest, yahoo maps or google maps. My app is using the web browser
control. I navigate to the corect page and can see the map onscreen,
but I
can't get he image into my app to print it out.

I used Veign's GetStuff app to analyze the contents of the page and
discovered that the image is not a typical gif or jpg. Rather, the
"image"
is in reality a call to the Map API to generate the image.
Interestingly
enough, I can right click on the image and save it as a file.

For Google maps, I am using the output=html parameter in the URL to
generate an HTML page, rather than the default interactive one that is
displayed if this parameter is not given.

I found an example on the 'net to Print the Contents of a Web Page,
but this essentially was a screen capture that was "saved" in a
picture
object, then sent to the printer using this command:

printer.Paintpicture picX ...etc

I played around with it and got it to work, but its correct behavior
depends on a number of factors, such as not resizing the dialog and
keeping the dialog as the top window, both of which I can't garantee.

Ideally, I need to bring the image into my app and combine it with
other
data in the printed report. This might be possible by sending the
right
commands to IE to save the graphics file as a gif, then having my app
read the gif back in. I am using VB6+SP5. Any suggestions on how to
get the map image into my app are welcomed. Thanks for your time
and assistance :-)

Regards
Saga




.



Relevant Pages

  • Printing map from web page
    ... I am in need of printing out a map from a web page. ... yahoo maps or google maps. ... can't get he image into my app to print it out. ... discovered that the image is not a typical gif or jpg. ...
    (microsoft.public.vb.general.discussion)
  • Re: Printing map from web page
    ... I have had a look at the Maps API, although I did not see this ... I am in need of printing out a map from a web page. ... can't get he image into my app to print it out. ... discovered that the image is not a typical gif or jpg. ...
    (microsoft.public.vb.general.discussion)
  • Re: HELP! Mapped Drive and Services dont play nicely
    ... so you can map the drive, and run the app as a service, but the app doesn't ... The problem is that it is not using a mapped drive letter in the service. ... the service to run under an account that should have the drive mapping ...
    (microsoft.public.windows.server.general)
  • Re: Spaces - do you use it, and how?
    ... for moving all the windows of a selected app to the other space. ... your mail sits, OR do you have a space with a web browser, image editor ... Word Windows went missing for ...
    (uk.comp.sys.mac)
  • Re: [Help] Struts/JSP -- easy way associate an "ID" to a "Value"?
    ... Putting this kind of data in session scope is a bad idea. ... mapping shouldn't be changing across the lifetime of the app (or else you're ... available to your your view controller, your JSP, and any tiles without them ... Right now we just make the Map in an init servlet ...
    (comp.lang.java)

Quantcast