gMap | Examples
Google Maps Plugin for jQuery
Simple map with marker
Displays a simple map with controls and adds one marker. The viewport gets centered automatically.
$("#map1").gMap({ markers: [{ latitude: 47.660937,
longitude: 9.569803 }] });
Different map type
Changes the map type to physical view.
Please note: Available since version 1.0.1
$("#map2").gMap({ maptype: G_PHYSICAL_MAP });
Map with marker and info window
Same as example above but with info window that pops up.
$("#map3").gMap({ markers: [{ latitude: 47.660937,
longitude: 9.569803,
html: "Tettnang, Germany",
popup: true }] });
Extended usage
Map without controls, custom marker images, multiple markers, custom viewport position and zoom.
$("#map4").gMap({ controls: false,
scrollwheel: false,
markers: [{ latitude: 47.670553,
longitude: 9.588479,
icon: { image: "images/gmap_pin_orange.png",
iconsize: [26, 46],
iconanchor: [12,46],
infowindowanchor: [12, 0] } },
{ latitude: 47.65197522925437,
longitude: 9.47845458984375 },
{ latitude: 47.594996,
longitude: 9.600708,
icon: { image: "images/gmap_pin_grey.png",
iconsize: [26, 46],
iconanchor: [12,46],
infowindowanchor: [12, 0] } }],
icon: { image: "images/gmap_pin.png",
iconsize: [26, 46],
iconanchor: [12, 46],
infowindowanchor: [12, 0] },
latitude: 47.58969,
longitude: 9.473413,
zoom: 10 });