Load kml extendeddata into variable with Geoxml3

后端 未结 1 1522
一生所求
一生所求 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 = '
    '+ '

    '+placemark.name+'

    '+ 'fora da escola: '+placemark.vars.val.total+'
    ' 'percentual: '+placemark.vars.val.percentil+ '
    '; polygonMouseover(placemark.polygon,contentString);

    0 讨论(0)
提交回复
热议问题