Custom marker with dialog box

微笑、不失礼 提交于 2019-12-20 00:22:48

问题


How do I achieve dialog like those shown above. So far this is what I can do right now

map.addLayer({
    "id": "markers",
    "type": "symbol",
    "source": "markers",
    "interactive": true,
    "layout": {
        "text-field": "{price2}",
        "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
        "text-offset": [0, 0.6],
        "text-anchor": "top",
        "text-size": 12,
        "text-letter-spacing": 0.05,
        "icon-image": "marker-15"
    },
    "paint": {
        "text-color": "#fff",
        "text-halo-width": 2,
        "text-halo-color": "rgb(11, 148, 68)"
    }
});

Do I have to use studio to have such effect?


回答1:


The only way I see to do this is to use markers with a custom HTML Element. You won't be able to use a source though.



来源:https://stackoverflow.com/questions/38035655/custom-marker-with-dialog-box

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!