我目前正在实习,他们让我在基巴纳更好的地图上使用停车地图图片(.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"))
})
}问题是,传单是制作的,所以你有很多图片制作一个瓷砖。我想要做的只是简单地使用一张图片,当我更改到我的图片的路径时,我显然得到了我唯一的一张图片的一张瓷砖。
有人知道我怎么能简单地在传单上用一张本地图片吗?
提前谢谢。
发布于 2016-03-16 13:56:35
使用L.ImageOverlay。您可以检查一些传单代码示例,看看它是如何工作的。
https://stackoverflow.com/questions/36037287
复制相似问题