Remote Sensing Tools

Control over reality.™

IKONOS 4,3,2 false-color composite, converted to pseudo natural-color using the CIR to Naturaltone plug-in. Image courtesy of GeoEye.
cheap pfizer viagraviagra for pebuy low price viagrais shellfish like viagrasafe maximum viagra dosageviagra healty improve prolong

Exporting Google Maps, Global Mapper

December 5th, 2007 · No Comments · Trackback/Ping · Share This

The release of Global Mapper 9.01 includes an option to export any loaded data to Google Maps tiles. The process is very simple — just load your vector or imagery data (or all the layers you want to include), click through Tools → Configuration → Projection and choose the Mercator projection and the Google Maps (Sphere Radius) datum. Your data-set will reproject to the Google-specified projection — and from there you can create an area feature for the extents to be exported to Google Maps tiles.

In the following example, I’ve slightly altered the XHTML file by adding a CSS class for the body to set the margin attribute to 0 — which allows me to embed the Google Map that was generated here in an iframe. This allows me to publish custom imagery examples right here on my site!

Additionally, I’ve customized the scale and copyright text by adding the getTextColor definition to the script, to change the color to white so that it’s more readable over the darker satellite imagery (reference the Google Maps API scripting documentation). The definition is colored purple here in relation to placement within the script.:

// Create our custom map layer
var custommap = new GMapType(tilelayers, new GMercatorProjection(22), "© 2007 D. Denk, USGS", GMapTypeOptions);

custommap.getTextColor = function() {return "#fff";};
map.addMapType(custommap);
map.setCenter( new GLatLng(28.7648155, -81.2109375), 10, custommap );

Note: It’s not necessary to reproject prior to exporting to Google Maps tiles. Global Mapper will reproject any loaded data, regardless of projection, to the Mercator (Google Maps Sphere Radius) projection using this export function. (The same is true for the Google Earth KML/KMZ export function, which reprojects data to the appropriate Geographic projection on export.)

Update

Mike just sent me a note that he turned around a new build including the getTextColor definition in the exported script. From there, all you’ll have to do is change the color for your needs.

Image information: The source for this image overlay is from the Landsat 7 ETM+ pan-sharpened 7,4,2 world mosaic, available through the USGS GloVis portal. The imagery was processed from false-color to natural-color by me, using Remote Sensing Tools.

Categories: Demonstrations · Software · Tutorials
Tags: , ,

Advertisement

0 responses so far ↓

  • There are currently no comments.

Respond to “Exporting Google Maps, Global Mapper”