Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Libraries / Coyote / CGGOOGLEMAPWIDGET__DEFINE

CGGOOGLEMAPWIDGET__DEFINE

CGGOOGLEMAPWIDGET__DEFINE
  This is a compound widget object that obtains a Google static map from Google Maps
  and displays it in the program's draw widget window. It can be used either as a
  stand-alone program or to create a map image in draw widget in a larger widget program.
 
  This program implements a subset of the Google Static Map API, which can be found in
  more detail here: https://developers.google.com/maps/documentation/staticmaps/. The
  program works by building a URL for a map image. A connection to the Internet is
  required to then request a map image (in JPEG or PNG format) to be returned from
  Goggle Maps. The returned image is then read and loaded into a draw widget window
  of the right size for the returned map image. The default is to delete the image file
  that is created, but user can also set keywords to retain the image that is downloaded
  from Google Maps. Users are able to control button and motion events in the resulting
  draw widget with their own event handler module. A cgMap coordinate object is created
  to establish a map reference coordinate system on top of the returned map image, allowing
  other map information to be drawn on top of the returned map image.
 

Categories


    Graphics
   
   

Examples


    Used to put two markers on a map of Fort Collins, Colorado, in a stand-alone window::
        PRO cgGoogleMapWidget_Test
            marker1 = {cgGOOGLEMAPMARKER, 'normal', 'dodger blue', 'A', Ptr_New(40.600), Ptr_New(-105.100)}
            marker2 = {cgGOOGLEMAPMARKER, 'normal', 'purple', 'B', Ptr_New(40.605), Ptr_New(-105.105)}
            googleObject = Obj_New('cgGoogleMapWidget', MARKERS=[marker1, marker2], MAPTYPE='Terrain')
        END
     

Author


    FANNING SOFTWARE CONSULTING::
      David W. Fanning
      1645 Sheely Drive
      Fort Collins, CO 80526 USA
      Phone: 970-221-0438
      E-mail: david@idlcoyote.com
      Coyote's Guide to IDL Programming: http://www.idlcoyote.com

History


    Change History::
        Written, 25 June 2012. DWF.
        Set the RETAIN keyword on the draw widget for UNIX machines. 28 June 2012. DWF.
        Beefed up and changed error handling when failing to obtain a map from Google Maps. 28 June 2012. DWF.
        Added NoForwardFix keyword to call to cgMap to allow better drawing of markers. 29 June 2012. DWF.
        Added the ability to turn markers on or off with VisibleMarkers keyword and property. 29 June 2012. DWF.
        Added a WID keyword to the GetProperty method to all the user to obtain the Goggle Map
            window index number. 29 Aug 2012. DWF.
        Goggle appreciates lat/lon values to six decimal points, so now passing all of it. 19 Feb 2015. DWF.
           

Copyright


    Copyright (c) 2012, Fanning Software Consulting, Inc.



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us