comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Google Static Maps in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Google Static Maps in IDL [message #80768] Wed, 11 July 2012 08:38 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

As long as I am talking about updating your Coyote Library
distribution this morning, let me give you another reason
to do so.

I have built a pretty nifty MABEL lidar browser recently
that you can download from an SVN repository if you are
interested in this new photon counting lidar data.
Complete directions are available in the Wiki you will
find on the MABEL project page.

http://sourceforge.net/projects/mabelidl/

In addition to the zooming/panning capability that I
built into cgZPlot, I wanted the user to be able to
see the lidar track on a map. If the map showed the
topography of the location that would be a HUGE plus
for me. And, of course, I wanted to be able to annotate
the map with features that were pertinent to the lidar
flight.

To this end, I built a small object that exposes quite
a bit of the Google Static Map API:

https://developers.google.com/maps/documentation/staticmaps/

Static maps are actually images that come back from Google.
You can't interact with them in the same way you can with
a Google map in a web browser. There are definite limitations.
For example the image that returns can be no larger than
640x640 pixels. But, you can set the zoom level and the
type of map you want: terrain, satellite, roadmap, or hybrid.
You can also add Google markers to the map.

Displaying the image is straightforward, of course. The tricky
part was figuring out how to set up the map coordinates to be
able to navigate the map and annotate it myself. (The images
are returned in GIF, JPEG, or PNG formats, but NOT in the
more useful GeoTiff format. That can't really be an oversight!)

All this to say that is built a compound widget/object
named cgGoogleMapWidget to retrieve and work with these static
Google map images. I have added this to the most recent version
of the library.

I have put a picture of the MabelBrowser here so you can see
how the map can be used:

http://www.idlcoyote.com/misc/mabelbrowser.png

The window at the top allows me to zoom into and pan to
the relevant lidar location. The window at the bottom is
the cgGoogleMapWidget compound widget, shown here as a terrain
map. As you can see, buttons allow you to choose different
map and marker types to display on the map, and I have annotated
the map with box axes and grid lines. (I am displaying
user-defined markers, rather than Google markers on this map.)
Both the zoom/pan plot and the map can be saved as high-quality
raster and PostScript output should you want to make slides
of them, etc.

There is a delay when the map is updated, comparable to the
delay you would experience with function graphics, while I
go out to the Internet and get a new map from Google,
but it is not bad, and it allows me to center the map at
a location where I click, etc. If I click near a map marker,
it will update the zoom/pan plot to that marker location.

If you are just interested in the cgGoogleMapWidget program itself,
you can run the program to see where Coyote lives. If it is not
passed the identifier of a parent widget, it will create it's
own top-level base.

IDL> object = cgGoogleMapWidget()

You can find all the necessary programs in the latest version
of the Coyote Library:

http://www.idlcoyote.com/programs/zip_files/coyoteprograms.z ip

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: compilation strangeness
Next Topic: Use of /APPEND keyword

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:17:09 PDT 2025

Total time taken to generate the page: 0.00385 seconds