1. Home >
  2. Documentation >
  3. Map Types >
  4. imagemaptype
 

imagemaptype

This function allows to add a google.maps.ImageMapType.

Usage

Parameters

Example

This example add a ImageMapType.
Special thanks to D. Collins from Four Peaks Navigation to let us using its ressources.

$("#test").gmap3({
  map:{
    options:{
      center:[33, -111],
      zoom:10,
      mapTypeControlOptions: { 
        mapTypeIds: [google.maps.MapTypeId.ROADMAP, 
					google.maps.MapTypeId.SATELLITE,
					google.maps.MapTypeId.HYBRID,
					google.maps.MapTypeId.TERRAIN,
					"sectional"]
      }
    }
  },
  imagemaptype:{
    id: "sectional",
    options:{
      getTileUrl: function(coord, zoom) { 
    	 return "http://www.fourpeaksnavigation.com/sectionals/phx" + "/" + zoom + "/" + coord.x + "/" + coord.y + ".png";
      }, 
      tileSize: new google.maps.Size(256, 256), 
      isPng: true,
      name: "Chart",
      minZoom: 1,
      maxZoom: 111
    },
    callback: function(){
      $(this).gmap3("get").setMapTypeId("sectional");
    }
  }
}); 
Close