【发布时间】:2016-02-27 08:39:14
【问题描述】:
我目前正在编写一个 GeoJson 图层,并且标记在正确的纬度和经度上显示良好。虽然,如果我单击标记,我添加的属性不会显示。
{
"type": "FeatureCollection",
"features":
[
{
"type": "Feature",
"properties":
{
"marker-color": "#7e7e7e",
"marker-size": "medium",
"marker-symbol": "",
"title": "this is a test marker"
},
"geometry":
{
"type": "Point",
"coordinates":
[
-0.07659316062927246,
51.50809472930477
]
}
}
]
}
以上是我尝试使用的 GeoJson 代码示例,该点出现在正确的位置,但当我单击标记或任何其他方式时,它不显示标题。
有人有什么建议吗?
【问题讨论】:
-
有人知道吗?我只能使用: GeoJsonPointStyle pointStyle = layer.getDefaultPointStyle(); pointStyle.setDraggable(true); pointStyle.setTitle(“你好,世界!”); pointStyle.setSnippet(“我是一个可拖动的标记”);为了让它工作,但它会为每个标记显示,例如如果我输入 hello world 它将转到每个标记,我只希望它显示在一个标记上!
标签: android json google-maps geojson