Skip to content
Dimitris Krestos edited this page May 30, 2017 · 10 revisions

Table of Contents

Default Options

$('#map_canvas').mapit({
  latitude:    37.970996,
  longitude:   23.730542,
  zoom:        16,
  type:        'ROADMAP',
  scrollwheel: false,
  marker: {
    latitude:   37.970996,
    longitude:  23.730542,
    icon:       '',
    title:      '',
    open:       false,
    center:     true
  },
  address:   '',
  styles:    'GRAYSCALE',
  locations: [],
  origins:   []
});

General map options

"latitude" option

  • Set the latitude of the map
  • options: coord
$('#map_canvas').mapit({
  latitude: 37.970996
});

"longitude" option

  • Set the longitude of the map
  • options: coord
$('#map_canvas').mapit({
  longitude: 23.730542
});

"zoom" option

  • Set the zoom level of the map
  • options: number
$('#map_canvas').mapit({
  zoom: 16
});

"type" option

  • Set the map type
  • options: ROADMAP, SATELLITE, HYBRID, TERRAIN
$('#map_canvas').mapit({
  type: 'ROADMAP'
});

"scrollwheel" option

  • Enable/disable zoom by mouse wheel
  • options: true, false
$('#map_canvas').mapit({
  scrollwheel: false
});

Marker options

"latitude" option

  • Set the latitude of the main map
  • options: coord
$('#map_canvas').mapit({
  latitude: 37.970996
});

"longitude" option

  • Set the longitude of the main map
  • options: coord
$('#map_canvas').mapit({
  longitude: 23.730542
});

"icon" option

  • Set the icon of the main marker
  • options: image filename
$('#map_canvas').mapit({
  icon: 'images/marker_red.png'
});

Clone this wiki locally