Javascript 单张图片

Javascript 单张图片,javascript,angularjs,leaflet,kibana,Javascript,Angularjs,Leaflet,Kibana,我目前正在实习,他们让我在Kibana bettermap上使用停车地图图片(.jpg)。Bettermap正在使用传单,我找到了可以更改图片链接的地方: function e() { b.css({ height : a.panel.height || a.row.height }), a.require(["./leaflet

我目前正在实习,他们让我在Kibana bettermap上使用停车地图图片(.jpg)。Bettermap正在使用传单,我找到了可以更改图片链接的地方:

function e() {
                    b.css({
                        height : a.panel.height || a.row.height
                    }),
                    a.require(["./leaflet/plugins"], function () {
                        a.panelMeta.loading = !1,
                        d.Icon.Default.imagePath = "app/panels/bettermap/leaflet/images",
                        c.isUndefined(f) ? (f = d.map(a.$id, {
                                    scrollWheelZoom : !1,
                                    center : [40, -86],
                                    zoom : 10
                                }), d.tileLayer("**http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg**", {
                                attribution : "Data, imagery and map information provided by MapQuest, OpenStreetMap <http://www.openstreetmap.org/copyright> and contributors, ODbL",
                                maxZoom : 18,
                                minZoom : 2
                            }).addTo(f), g = new d.MarkerClusterGroup({
                                    maxClusterRadius : 30
                                })) : g.clearLayers();
                        var b = [];
                        c.each(a.data, function (a) {
                            b.push(c.isUndefined(a.tooltip) || "" === a.tooltip ? d.marker(a.coordinates) : d.marker(a.coordinates).bindLabel(c.isArray(a.tooltip) ? a.tooltip[0] : a.tooltip))
                        }),
                        g.addLayers(b),
                        g.addTo(f),
                        f.fitBounds(c.pluck(a.data, "coordinates"))
                    })
                }
函数e(){
b、 css({
高度:a.panel.height | | a.row.height
}),
a、 需要([“/”单张/插件“]),函数(){
a、 panelMeta.loading=!1,
d、 Icon.Default.imagePath=“app/panels/bettermap/传单/images”,
c、 isUndefined(f)?(f=d.map(a.$id{
滚轮缩放:!1,
中间:[40,-86],
缩放:10
}),d.Tillelayer(“**http://otile1.mqcdn.com/tiles/1.0.0/map/{z} /{x}/{y}.jpg**“{
属性:“MapQuest、OpenStreetMap和贡献者提供的数据、图像和地图信息,ODbL”,
maxZoom:18,
最小缩放:2
}).addTo(f),g=新的d.MarkerClusterGroup({
最大群集半径:30
})):g.透明层();
var b=[];
c、 每个(a)数据、功能(a){
b、 push(c.isUndefined(a.tooltip)| |“”==a.tooltip?d.marker(a.coordinates):d.marker(a.coordinates)。bindLabel(c.isArray(a.tooltip)?a.tooltip[0]:a.tooltip))
}),
g、 添加层(b),
g、 加至(f),
f、 fitBounds(c.Pull(a.data,“坐标”))
})
}
问题是传单是制作的,所以你有很多图片制作瓷砖。我想做的是简单地使用一张图片,当我改变图片的路径时,我显然得到了我仅有的一张图片的平铺

有人知道我如何在Leaftlet上使用一张本地图片吗


事先非常感谢。

使用
L.ImageOverlay
。您可以检查一些,看看它是如何工作的