Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps API V3 "Overview" option

Tags:

google-maps

Google Maps API V3 doesn't support the V2 GOverviewMapControl option, yet. I've come across a piece of code at http://dl.google.com/io/2009/pres/Th_1045_Maps_API_Mobile.pdf , silde 19, that gives the code to display the smaller map, but not the draggable, semi-transparent blue box that you generally see here. It's possible, but unofrtunately the code is 'ellided'. Anyone have any ideas how to generate this? Thanks

like image 792
eclipse31 Avatar asked Mar 01 '23 03:03

eclipse31


1 Answers

This is how it works out of the box in Maps v3:

function initialize() {
  var mapOptions = {
    zoom: 8,
    center: new google.maps.LatLng(-34.397, 150.644),
    mapTypeId: google.maps.MapTypeId.ROADMAP
    overviewMapControl: true,
    overviewMapControlOptions: {opened: true}
  }
  var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
}

Please note the last two properties of the mapOptions object. They do the trick.

like image 160
Jpsy Avatar answered Mar 08 '23 12:03

Jpsy