Merge pull request #14520 from jefbarn/leaflet-option-fix

Fix leaflet marker options and bindPopup arguments.
This commit is contained in:
Arthur Ozga
2017-02-09 11:03:49 -08:00
committed by GitHub
2 changed files with 11 additions and 5 deletions
+5 -5
View File
@@ -406,7 +406,7 @@ declare namespace L {
getPane(name?: string): HTMLElement;
// Popup methods
bindPopup(content: (layer: Layer) => Content | Content | Popup, options?: PopupOptions): this;
bindPopup(content: ((layer: Layer) => Content) | Content | Popup, options?: PopupOptions): this;
unbindPopup(): this;
openPopup(latlng?: LatLngExpression): this;
closePopup(): this;
@@ -416,7 +416,7 @@ declare namespace L {
getPopup(): Popup;
// Tooltip methods
bindTooltip(content: (layer: Layer) => Content | Tooltip | Content, options?: TooltipOptions): this;
bindTooltip(content: ((layer: Layer) => Content) | Tooltip | Content, options?: TooltipOptions): this;
unbindTooltip(): this;
openTooltip(latlng?: LatLngExpression): this;
closeTooltip(): this;
@@ -1098,7 +1098,7 @@ declare namespace L {
getLatLng(): LatLng;
setLatLng(latlng: LatLngExpression): this;
getContent(): Content;
setContent(htmlContent: (source: Layer) => Content | Content): this;
setContent(htmlContent: ((source: Layer) => Content) | Content): this;
getElement(): HTMLElement;
update(): void;
isOpen(): boolean;
@@ -1129,7 +1129,7 @@ declare namespace L {
getLatLng(): LatLng;
setLatLng(latlng: LatLngExpression): this;
getContent(): Content;
setContent(htmlContent: (source: Layer) => Content | Content): this;
setContent(htmlContent: ((source: Layer) => Content) | Content): this;
getElement(): HTMLElement;
update(): void;
isOpen(): boolean;
@@ -1464,7 +1464,7 @@ declare namespace L {
riseOnHover?: boolean;
riseOffset?: number;
options: DivIconOptions;
options?: DivIconOptions;
}
export class Marker extends Layer {
+6
View File
@@ -434,3 +434,9 @@ export class MyNewControl extends L.Control {
});
}
}
L.marker([1, 2], {
icon: L.icon({
iconUrl: 'my-icon.png'
})
}).bindPopup('<p>Hi</p>');