diff --git a/docs/components/LImageOverlay.md b/docs/components/LImageOverlay.md index e4cdc8c8..cf1861aa 100644 --- a/docs/components/LImageOverlay.md +++ b/docs/components/LImageOverlay.md @@ -59,7 +59,6 @@ export default { | visible | | boolean | - | true | | interactive | | boolean | - | false | | bubblingMouseEvents | | boolean | - | true | -| url | | string | - | | | bounds | | | - | | | opacity | | number | - | 1.0 | | alt | | string | - | '' | @@ -68,6 +67,7 @@ export default { | zIndex | | number | - | 1 | | className | | string | - | '' | | options | Leaflet options to pass to the component constructor | object | - | {} | +| url | | string | - | null | ## Events diff --git a/src/components/LImageOverlay.vue b/src/components/LImageOverlay.vue index c9789884..842352da 100644 --- a/src/components/LImageOverlay.vue +++ b/src/components/LImageOverlay.vue @@ -10,6 +10,13 @@ import { imageOverlay, DomEvent } from 'leaflet'; export default { name: 'LImageOverlay', mixins: [ImageOverlayMixin, Options], + props: { + url: { + type: String, + custom: true, + default: null + } + }, mounted() { const options = optionsMerger(this.imageOverlayOptions, this); this.mapObject = imageOverlay(this.url, this.bounds, options); diff --git a/src/mixins/ImageOverlay.js b/src/mixins/ImageOverlay.js index e78c3162..797a8a57 100644 --- a/src/mixins/ImageOverlay.js +++ b/src/mixins/ImageOverlay.js @@ -4,10 +4,6 @@ import InteractiveLayer from './InteractiveLayer'; export default { mixins: [Layer, InteractiveLayer], props: { - url: { - type: String, - custom: true - }, bounds: { custom: true }, diff --git a/types/index.d.ts b/types/index.d.ts index 110d9280..ce5efc56 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -71,10 +71,6 @@ declare module "vue2-leaflet" { } class ImageOverlay extends Mixins(Layer, InteractiveLayer) { // props - url: string; - /** - * @default true - */ bounds: boolean; /** * @default 1.0 @@ -489,6 +485,13 @@ declare module "vue2-leaflet" { setImagePath(newVal: string, oldVal?: string): void; } class LImageOverlay extends Mixins(ImageOverlay) { + // props + /** + * @default null + */ + url: string | null; + + // data mapObject: L.ImageOverlay; parentContainer: any; }