gpt4 book ai didi

javascript - Globe API 的自定义标记图标

转载 作者:行者123 更新时间:2023-11-28 00:34:01 27 4
gpt4 key购买 nike

经过长时间的搜索,我发现没有选项可以自定义标记图标。我现在尝试用两种不同类型绘制我的标记。我需要通过使用两个单独的图标来清楚地可视化它,是否有任何选项可以在 Globe 中设置自定义标记图标。更快的响应将非常有帮助,因为我正处于截止日期的边缘。

我正在使用简单的 Globe api

    var earth = new WE.map('earth_div');
WE.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(earth);

{% for last_place_marker in last_place_markers %}
var marker = WE.marker([{{last_place_marker.destination_lat}}, {{last_place_marker.destination_longit}}]).addTo(earth);
marker.bindPopup("<b>{{last_place_marker.destinaton}}</b><br>{{last_place_marker.when}}<br /><span style='font-size:10px;color:#999'>{{last_place_marker.description}}</span>", {maxWidth: 150, closeButton: true});
//.openPopup()
{% endfor %}

{% for target_marker in target_markers %}
{% if target_marker.target_destination_lat %}

var marker = WE.marker([{{target_marker.target_destination_lat}}, {{target_marker.target_destination_longit}}]).addTo(earth);
marker.bindPopup("<b>{{target_marker.target}}</b><br>{{target_marker.when}}<br /><span style='font-size:10px;color:#999'>{{target_marker.description}}</span>", {maxWidth: 150, closeButton: true});
//.openPopup()
{% endif %}
{% endfor %}

earth.setView([25, 79], 2.5);

最佳答案

Globe API 是一个开源 API,不会提供自定义标记图标,打开谷歌地图将是更好的选择。

关于javascript - Globe API 的自定义标记图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28671704/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com