Global Mapper v25.0

Scripting in an automatic zoom level when importing a KML file?

Currently I'm running a start-up Global Mapper work space script that loads online world imagery and then importing an overlaying track-line as a KML file.  Is it possible to add a zoom command to view and center the map over the imported KML?  Or a way to bound the view to the imported KML file? And yes, I want to zoom into the KML track no matter the size of the layer compared to the base map. Thanks!

Answers

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    Use the SET_VIEW command with the LAYER_BOUNDS parameter set to your KML file name.

    Cheers,
    Bob
  • Thanks for the input!  That would've been perfect but it seems the layer bounding options are not available to the general IMPORT command (they are available only to a few import commands: IMPORT_OSM_TILE, IMPORT_SPATIAL_DB and IMPORT_WMS).  Thus I'm still working on a work around to this problem.   Any other ideas? Thanks again!