Skip to content

Commit

Permalink
fix(im): handle CSV import from Places tab
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh committed Feb 24, 2021
1 parent 469edbd commit 186701d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugin/file/csv/csvplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ plugin.file.csv.CSVPlugin.prototype.init = function() {
im.registerImportDetails('CSV', true);
im.registerImportUI(os.file.mime.csv.TYPE, new plugin.file.csv.ui.CSVImportUI());
im.registerParser(this.id, plugin.file.csv.CSVParser);
os.placesImportManager.registerImportDetails('CSV', true);
os.placesImportManager.registerImportUI(os.file.mime.csv.TYPE, new plugin.file.csv.ui.CSVImportUI());
os.placesImportManager.registerParser(this.id, plugin.file.csv.CSVParser);

// register the csv exporter
os.ui.exportManager.registerExportMethod(new plugin.file.csv.CSVExporter());
Expand Down
4 changes: 4 additions & 0 deletions src/plugin/file/geojson/geojsonplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ plugin.file.geojson.GeoJSONPlugin.prototype.init = function() {
im.registerImportUI(plugin.file.geojson.mime.TYPE, new plugin.file.geojson.GeoJSONImportUI());
im.registerParser(this.id, plugin.file.geojson.GeoJSONSimpleStyleParser);
im.registerParser(this.id + '-simplespec', plugin.file.geojson.GeoJSONSimpleStyleParser);
os.placesImportManager.registerImportDetails('GeoJSON', true);
os.placesImportManager.registerImportUI(plugin.file.geojson.mime.TYPE, new plugin.file.geojson.GeoJSONImportUI());
os.placesImportManager.registerParser(this.id, plugin.file.geojson.GeoJSONSimpleStyleParser);
os.placesImportManager.registerParser(this.id + '-simplespec', plugin.file.geojson.GeoJSONSimpleStyleParser);

// register the geojson exporter
os.ui.exportManager.registerExportMethod(new plugin.file.geojson.GeoJSONExporter());
Expand Down
3 changes: 3 additions & 0 deletions src/plugin/file/kml/kmlplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ plugin.file.kml.KMLPlugin.prototype.init = function() {
im.registerImportUI(plugin.file.kml.mime.KMZ_TYPE, new plugin.file.kml.ui.KMLImportUI());
im.registerParser(this.id, plugin.file.kml.KMLParser);
im.registerParser('kmlfeature', plugin.file.kml.KMLFeatureParser);
os.placesImportManager.registerImportDetails('KML/KMZ', true);
os.placesImportManager.registerParser(this.id, plugin.file.kml.KMLParser);
os.placesImportManager.registerParser('kmlfeature', plugin.file.kml.KMLFeatureParser);

// register the kml exporter
os.ui.exportManager.registerExportMethod(new plugin.file.kml.KMLExporter());
Expand Down
4 changes: 4 additions & 0 deletions src/plugin/file/shp/shpplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ plugin.file.shp.SHPPlugin.prototype.init = function() {
im.registerImportUI(plugin.file.shp.mime.TYPE, new plugin.file.shp.ui.SHPImportUI());
im.registerImportUI(plugin.file.shp.mime.ZIP_TYPE, new plugin.file.shp.ui.ZipSHPImportUI());
im.registerParser(this.id, plugin.file.shp.SHPParser);
os.placesImportManager.registerImportDetails('Shapefile (SHP/DBF or ZIP)', true);
os.placesImportManager.registerImportUI(plugin.file.shp.mime.TYPE, new plugin.file.shp.ui.SHPImportUI());
os.placesImportManager.registerImportUI(plugin.file.shp.mime.ZIP_TYPE, new plugin.file.shp.ui.ZipSHPImportUI());
os.placesImportManager.registerParser(this.id, plugin.file.shp.SHPParser);

// register the shp exporter
os.ui.exportManager.registerExportMethod(new plugin.file.shp.SHPExporter());
Expand Down

0 comments on commit 186701d

Please sign in to comment.