maplace.js

A Google Maps Javascript plugin for jQuery.

Github星跟蹤圖

Maplace.js Build Status

Helps you to embed Google Maps into your website, quickly create markers and controls menu for the locations on map.

Demo

See demo website

Setup

Download the latest version of Maplace.js and include the Google Maps API v3 along with jQuery.

JS

new Maplace({
	locations: data,
	controls_type: 'list',
	controls_on_map: false
}).Load();

HTML

<div id="controls"></div>
<div id="gmap" style="with:300px;height:250px;"></div>

Locations Array

var data = [{
	    lat: 45.9,
	    lon: 10.9,
	    title: 'Title A1',
	    html: '<h3>Content A1</h3>',
	    zoom: 8,
	    icon: 'http://www.google.com/mapfiles/markerA.png'
	},{
	    lat: 44.8,
	    lon: 1.7,
	    title: 'Title B1',
	    html: '<h3>Content B1</h3>',
	    show_infowindow: false
	}
];

Options

Methods

Events

</tbody>

Requirements

Maplace.js requires jQuery and Google Maps Library v3.

Source code

All efforts have been made to keep the source as clean and readable as possible.
Maplace.js is released under an MIT License.

Changelog

v0.2.10

  • Fixed afterRoute not passing status or location with draggable #147 and #139
  • Added listener for 'insert_at' polygon events #164

v0.2.9

  • Fixed #137
  • All event functions are now scoped to the current Maplace instance object

v0.2.8

  • Fixed #161
  • Fixed #160

v0.2.7

  • Fixed #132
  • Fixed #127

v0.2.0

  • Updated to jQuery ~2.1
  • Source directory for the build moved from "src" to "dist"
  • Use Grunt tasks to generate distribution artifacts
  • Changed default border color for in-map menu panel to match with Google Maps new UI
  • Updated package.json and bower.js

v0.1.3

  • Added circles support allowing mixed markers/circles
  • Removed 'hide_marker' option for consistency with "visible"
  • Added support to set the initial center position and zoom of the Map
  • Improved editable polyline and polygon when visible markers
  • Added drag events between markers, circles, polyline and polygon
  • Return "this" for public functions to allow method chaining
  • Renamed property 'commons' to 'shared' now overridden by location specific options
  • Added external reference to Snazzy Maps website for Google Map styling
  • Changed debug strategy
  • General fixes and enhancements

v0.1.2

  • General fixes and enhancements

v0.1.0

  • Initial release

主要指標

概覽
名稱與所有者danielemoraschi/maplace.js
主編程語言JavaScript
編程語言JavaScript (語言數: 4)
平台
許可證MIT License
所有者活动
創建於2013-02-17 04:03:17
推送於2020-05-25 22:54:13
最后一次提交2020-05-25 23:54:13
發布數12
最新版本名稱0.2.10 (發布於 )
第一版名稱v0.1.2 (發布於 2014-01-07 23:45:18)
用户参与
星數1k
關注者數63
派生數190
提交數213
已啟用問題?
問題數178
打開的問題數39
拉請求數14
打開的拉請求數3
關閉的拉請求數3
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?