Simple KML parser for Swift.
- AEXML via cocoapods
- UIColor-Hex-Swift includes
- Style
- StyleMap
- PolyStyle
- LineStyle
- MultiGeometry
- Polygon
- LineString
- Point
- Folder
- Placemark
MIT
Simple kml parser for swift
License: MIT License
Simple KML parser for Swift.
MIT
I can read the data from KML file now and its showing current coordinate like i provided.But,I can't show the image using groundOverlay on Map?Any Help? Or did I do something wrong?
Here is the project source : https://www.dropbox.com/s/pak5ti45e9th91f/Kml.swift-master%202.zip?dl=0
Here is the extract of kmz : https://www.dropbox.com/s/fjfbgj4kea4pxps/My%20Whole%20Region%202.zip?dl=0
Thanks for delivering such a great support parsing library for kml.
It'd be great if you published to Cocoapods
Hi! Thank you for this library. Could you plan to add icon support for placemarks?
Hi,
It's a nice work but is it possible to support the "innerBoundaryIs Polygon" on kml file? It isn't seem to work when i render a map.
I keep getting this error which I cant understand, could you possibly assist?
Kml.swift-master/Source/KML.swift:401:33: Type 'AEXMLElement' has no member 'errorElementName'
Cheers,
Damien K
Looking at a KML that was generated from the web version of google earth I see the following tag that causes a crash in the style parsing:
<name>Google Earth Web KML FILE web</name>
<gx:CascadingStyle kml:id="__managed_style_0318E6AFC5265754105B">
<Style>
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>https://earth.google.com/earth/rpc/cc/icon?color=1976d2&id=2000&scale=4</href>
</Icon>
<hotSpot x="64" y="128" xunits="pixels" yunits="insetPixels"/>
</IconStyle>
<LabelStyle>
</LabelStyle>
<LineStyle>
<color>ff2dc0fb</color>
<width>4.8</width>
</LineStyle>
<PolyStyle>
<color>40ffffff</color>
</PolyStyle>
<BalloonStyle>
<displayMode>hide</displayMode>
</BalloonStyle>
</Style>
</gx:CascadingStyle>
<gx:CascadingStyle kml:id="__managed_style_1B1AB55863265754105A">
<Style>
<IconStyle>
<Icon>
<href>https://earth.google.com/earth/rpc/cc/icon?color=1976d2&id=2000&scale=4</href>
</Icon>
<hotSpot x="64" y="128" xunits="pixels" yunits="insetPixels"/>
</IconStyle>
<LabelStyle>
</LabelStyle>
<LineStyle>
<color>ff2dc0fb</color>
<width>3.2</width>
</LineStyle>
<PolyStyle>
<color>40ffffff</color>
</PolyStyle>
<BalloonStyle>
<displayMode>hide</displayMode>
</BalloonStyle>
</Style>
</gx:CascadingStyle>
<StyleMap id="__managed_style_01024CD06B265754105A">
<Pair>
<key>normal</key>
<styleUrl>#__managed_style_1B1AB55863265754105A</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#__managed_style_0318E6AFC5265754105B</styleUrl>
</Pair>
</StyleMap>
Is there a good way to set style on the polygons and lines yielded from the KML document? I would like to override fill colors and stroke colors.
I think this goes without sayng, but this library is awesome! Thanks for creating it. One issue I'm getting though is a crash inside of KML.swift for some KML files:
private extension String { func subString(_ from: Int) -> String { return self.substring(from: self.characters.index(self.startIndex, offsetBy: from)) }
The crash is due to the method not handling when a String has no characters in it. If I use something like this, this issue is resolved:
private extension String { func subString(_ from: Int) -> String { if 0 < self.characters.count { return self.substring(from: self.characters.index(self.startIndex, offsetBy: from)) } else { return "" } } }
(Sorry about the formatting of this code above, but I'm unfamiliar with how to make it prettier.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.