Load kml extendeddata into variable with Geoxml3

后端 未结 1 1508
一生所求
一生所求 2020-12-11 10:44

I understand that Geoxml3 has a built in feature to load kml extendeddata into variables (from its source code - see bellow), but I couldn\'t find the way to access

相关标签:
1条回答
  • 2020-12-11 10:58

    In the kmz branch version of geoxml3, the extended data is stored in placemark.vars.val

    name: "Alvarães"
    percentil: "29.8"
    total: "1699"
    

    So, this should work:

        var contentString = '<div class="maptab">'+
            '<h1>'+placemark.name+'</h1>'+
            'fora da escola: '+placemark.vars.val.total+'<br>'
            'percentual: '+placemark.vars.val.percentil+
            '</div>';
        polygonMouseover(placemark.polygon,contentString);
    
    0 讨论(0)
提交回复
热议问题