【问题标题】:Get style attributes programmatically from kmlplacemark从 kmlplacemark 以编程方式获取样式属性
【发布时间】:2018-01-10 11:29:00
【问题描述】:

我正在解析谷歌地图上加载的 KML,例如:

Iterable<KmlPlacemark> placemarks = kmlLayer.getContainers().iterator().next().getPlacemarks();

for (KmlPlacemark placemark:placemarks){
//// HERE I WANT TO GET <style> VALUES OF placemark///////
}

我可以很好地获取地标,但是如何获取地标下标签的属性?例如地标的颜色。

【问题讨论】:

    标签: android google-maps kml


    【解决方案1】:

    我刚刚找到了解决方案:

        int lineColor = placemark.getInlineStyle().getPolylineOptions().getColor();
            if (lineColor == 0xffc0c0c0) {
    // Do your stuff
            }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-23
      • 1970-01-01
      • 2013-04-12
      • 1970-01-01
      相关资源
      最近更新 更多