我目前正在实习,他们让我在Kibana bettermap上使用停车地图图片(.jpg)。 Bettermap正在使用Leaflet,我发现我可以在哪里更改图片链接:
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"))
})
}
问题在于制作了Leaflet,所以你有很多图片制作瓷砖。我想做的是简单地使用一张图片,当我改变我的图片的路径时,我显然得到了我唯一一张图片。
任何人都知道如何在Leaftlet上使用一张本地图片?
提前多多感谢。