Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 26
Registered: ‎06-09-2013
My Device: N serial
My Carrier: NIM
Accepted Solution

how to parse polyline and polygon from KML file to Geographic data

HI,

from document, http://developer.blackberry.com/cascades/reference/bb__cascades__maps.html

Function convertKmlContentToDataProvider can be used to convert KML content,

but after testing, it only supports GeoLocation, but not GeoPolyline and GeoPolygon.

Any further for that?

Developer
Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: how to parse polyline and polygon from KML file to Geographic data

The documentation only mentions Placemarks, so you may have to do the parsing yourself.

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Highlighted
Contributor
Posts: 26
Registered: ‎06-09-2013
My Device: N serial
My Carrier: NIM

Re: how to parse polyline and polygon from KML file to Geographic data

Good news.

A open source lib for KML parsing : http://code.google.com/p/libkml/

 

Before I find it, I used bb::data::XmlDataAccess to parse the kml simplely, but it's hard-coding and not flexible.

Thanks to the developers.