简体   繁体   English

Svg 用于 OpenLayers 中的图标

[英]Svg for icons in OpenLayers

Tell me please, how to use svg for icons in OpenLayers?请告诉我,如何将 svg 用于 OpenLayers 中的图标? And is it possible to use html for the icon?是否可以使用 html 作为图标?

Any information on working with text will be useful!任何有关处理文本的信息都会很有用!

You have to setup a style that has an Icon : Use SVG icon as marker in OpenLayers您必须设置具有Icon的样式: 使用 SVG 图标作为 OpenLayers 中的标记

When it comes to HTML you have to create a popup like this one: https://openlayers.org/en/latest/examples/popup.html except that you have to make it permanent instead of on hover or on click When it comes to HTML you have to create a popup like this one: https://openlayers.org/en/latest/examples/popup.html except that you have to make it permanent instead of on hover or on click

If you are using React, I suggest you consider https://github.com/mmomtchev/rlayers (of which I am the author), as it makes it far more easier to add these features.如果您使用 React,我建议您考虑https://github.com/mmomtchev/rlayers (我是其中的作者),因为它使添加这些功能更加容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM