vibrog / quicklook-gpx

QuickLook plugin for GPX files
MIT License
18 stars 1 forks source link

Additional formats (OpenLayers) #4

Open vibrog opened 7 years ago

vibrog commented 7 years ago

Add support for additional formats supported by OpenLayers, e.g. KML, GeoJSON, TopoJSON, OSM-XML

vibrog commented 7 years ago
// Test URL
+ (instancetype)attributesForItemAtURL:(NSURL *)aURL {
  if ([aURL.lastPathComponent isEqualToString:@".kml"]) {
    // Choose template-kml.html
  }
  if ([aURL.lastPathComponent isEqualToString:@".geojson"]) {
    // Choose template-geojson.html
  }
  if ([aURL.lastPathComponent isEqualToString:@".topojson"]) {
    // Choose template-topojson.html
  }
  if ([aURL.lastPathComponent isEqualToString:@".osm"]) {
    // Choose template-osm.html
  }
  if ([aURL.lastPathComponent isEqualToString:@".osm.gz"]) {
    // Decompress
    // Choose template-osm.html
  }
}