如何在mapbox中添加自定义图标?
var map = L.mapbox.map('map', 'mapbox.streets').setView([0, 0], 1);
var geojson = { type: 'LineString', coordinates: value};
var start = value[0];
var end = value[value.length-1];
geojson.coordinates.push((start,end).slice());
// Add this gener
我想知道一个人怎么会用自己的图标在一个颤振-Mapbox插件的标记?
没有默认的标记图标(没有提供图标-没有标记),也没有足够的文档说明如何使用自定义图像。
添加符号(标记)如下:
mapController.addSymbol(
SymbolOptions(
geometry:LatLng(0.0, 0.0), // location is 0.0 on purpose for this example
iconImage: "pin"
)
);
而IconImage是一个字符串,它应该包含
我上传了一个svg,可以在mapbox地图中查看它,并可以使用mapbox显示带有股票图标的tileset。但是,当我尝试使用我的图标时,点不会画出来。背景仍在绘制,在代码下面使用CAFER-15绘制。
'icon-image': 'cafe-15', // stock symbol shows
'icon-image': 'boxy-hourglass', // my uploaded symbol - does not show
这是我的密码:
<!DOCTYPE html>
<html>
我生成了一个我想通过使用的Maki图标列表。
drawMarkers() {
let self = this;
const mapboxgl = require("mapbox-gl");
let data = this.draw.getAll();
data.features.forEach((feature) => {
if (feature.geometry.type == "Point") {
var icon = feature.properties.icon;
var title =
我希望能够隐藏和显示在Mapbox中的图层,就像Mapbox提供的这个例子.
我在Mapbox中保存了一些矢量数据,但我不知道在哪里可以找到URL,在下面的示例中显示为‘mapbox://mapbox.2op9hr’。有人能告诉我如何找到我自己的数据吗?
// Wait until the map has finished loading.
map.on('load', () => {
// Add a custom vector tileset source. This tileset contains
// point features representing mu