Loading a local .kml file using google maps?
The KML can’t be accessed since it’s on your local machine and google can’t access that since it doesn’t know how to get to localhost:8080
The KML can’t be accessed since it’s on your local machine and google can’t access that since it doesn’t know how to get to localhost:8080
I like using (open source and gui friendly) Quantum GIS to convert the shapefile to kml. Google Maps API supports only a subset of the KML standard. One limitation is file size. To reduce your file size, you can Quantum GIS’s “simplify geometries” function. This “smooths” polygons. Then you can select your layer and do … Read more
Using Async task call when you want to download file : new DownloadFileFromURL().execute(file_url); public class MainActivity extends Activity { // Progress Dialog private ProgressDialog pDialog; public static final int progress_bar_type = 0; // File url to download private static String file_url = “http://www.qwikisoft.com/demo/ashade/20001.kml”; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new DownloadFileFromURL().execute(file_url); } /** … Read more
In above code, you don’t pass the kml data to your mapView anywhere in your code, as far as I can see. To display the route, you should parse the kml data i.e. via SAX parser, then display the route markers on the map. See the code below for an example, but it’s not complete … Read more