I have big KML file to a native Android application, please check the following details and give an advice.
KML file details:
Android app details:
Issue:
What is the best practice to implement the above details with good performance?
please advise.
Open Google My Maps. Create a new map. Press import. Open your KML file or drag your KML file into the import window.
You can import map features like lines, shapes, and places to your map from KML files, spreadsheets and other files.
KML can include both raster and vector data, and the file includes symbolization. KML files are like HTML, and only contains links to icons and raster layers. A KMZ file combines the images with the KML into a single zipped file.
Best practice is doing long time operation in background (for example, on separate thread) and split complex tasks into small parts. So you can:
1) create and start load KML layer as soon as possible (e.g. on app create) and than just show it;
2) instead of one kml file with 500 elements and 1000 polygons, use 50 kml files with 10 elements and 100 polygons and load to layer only necessary files (for example you can split it by area location, or by semantic information, or by something else criteria);
3) combine 1 and 2 points;
4) precisely for google maps it's possible to create tiles with information from kml files and use TileProvider.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With