我是传单的新手,我正在尝试显示标记.这些教程似乎对我不起作用.地图显示正常,但我只是无法显示标记.下面是我的示例代码:
wax.tilejson('http://localhost:8888/v2/DigitalHumanities.json',
function(tilejson) {
var map = new L.Map('map-div')
.addLayer(new wax.leaf.connector(tilejson))
.setView(new L.LatLng(-17.1828,137.4609), 4);
var markers = new L.marker(-17.1828,137.4609);
map.addLayer(markers);
var markerx = new L.marker(137.4609,-17.1828);
map.addLayer(markerx);
});
Run Code Online (Sandbox Code Playgroud)
我试着在教程的样本,即:.addTo(map);,map.addLayer(markers);等等.