Script and makefile adjustments for updating extlib
[larjonas-mediagoblin.git] / extlib / leaflet / src / layer / marker / Marker.Popup.js
blob4c5cad0479a99503140a7b2b5723fa0eaf67526d
1 /*
2 * Popup extension to L.Marker, adding openPopup & bindPopup methods.
3 */
5 L.Marker.include({
6 openPopup: function() {
7 this._popup.setLatLng(this._latlng);
8 this._map.openPopup(this._popup);
10 return this;
13 closePopup: function() {
14 if (this._popup) {
15 this._popup._close();
19 bindPopup: function(content, options) {
20 options = L.Util.extend({offset: this.options.icon.popupAnchor}, options);
22 this._popup = new L.Popup(options);
23 this._popup.setContent(content);
24 this.on('click', this.openPopup, this);
26 return this;
28 });