I have a question about SDK Google maps in Android
I have a Autocomplete Place that works perfectly. When i write some text in the input, google show me locations, and when i click on any print coordinates.
Question:
Is there any way to know if those coordinates are in a polygon of a Google my maps kml file?
I tried:
KmlLayer(map,id for local file, context)
Documentation: https://developers.google.com/maps/documentation/android-sdk/utility/kml
The problem is that i need the local kml file on my local repository. I need to get KML file from URL with a map id (https://www.google.com/maps/d/u/0/viewer?mid=XXXXrsxRFHqpMEmYXXXXX)
That "mid", can change, since sometimes I will need to use another kml file with a different url.
Also, Autocomplete documentation: https://developers.google.com/maps/documentation/places/android-sdk/autocomplete
Thank you everyone.
Any help would be greatly appreciated! Thanks
Related
I am trying to develop very basic GPS App and want to highlight path between two cities. I used the code in the following post
Answer : Draw path between two points using Google Maps Android API v2
by zeeshan0026.
And the code works fine but when you highlight path between two very far cities then it shows the straight kind of path. I think the problem with the number of LatLng points return by the decodepoly function i am trying to change the shift but nothing helps.
Please somebody help me in this regard.
Thanks in Advance
Directions API URLs are restricted to approximately 2000 characters, after URL Encoding. As some Directions API URLs may involve many locations along a path, be aware of this limit when constructing your URLs.
For more accurate path between very far cities, we need to use the polyutil.encode and decode functions.
I'm Developing an app with Google Maps. In which i need to show a layer of data from the shape file or imagery.
Do any one has an idea on how to do it, i have no idea how to project the layer over the Google maps in android.
Provide me with some API and sample codes if available else with any other suggestion.
There is no way to render .Shp file directly in Google Maps.
But if you really want to do then export .Shp to .Kml file using some QuantumGIS or ARC GIS and then Make XMLPullParser that can easily parse this .Kml file.
Refer this questions for more information
Does anyone know of a library in Java that can parse ESRI Shapefiles?
Android lib to read or parse shapefile
https://gis.stackexchange.com/questions/48191/how-to-display-esri-shapefile-in-android
https://gist.github.com/kiichi/6119073
With Google Maps Android API utility library you can display KML or GeoJSON data over a Google Maps MapView.
Now you only need to parse your shapefile and convert it to one of the previous mentioned formats.
The shapefile parsing process can be accomplished with one of the libraries mentioned in this question.
The conversion process (java objects to XML or JSON objects) will need to be programmatically handled by you.
I have a KML file which is created from maps.google.com. And i want to draw a route on google map.
I am using mapV_2 in my project. Also one more thing I read couple of threds here on SO saying that KML is no more working on google map One, Two. So is it really not working today for Android? Any othe way to get this done?
I want to development an application like this:
There is a csv file containing the coordinates as follow.
30.6674,36.8925
30.6651,36.8926
30.6649,36.8923
...
I want to route the way on google maps api by getting the coordinate information from csv file.
How do I do this, can you give sample link or any suggestion.
Thanks.
loading csv file content in an array:
http://www.webdeveloper.com/forum/showthread.php?t=225845
passing an array of addresses (or coordinates) to the API:
how to use the google maps api with greasemonkey to read a table of addresses and trace the route?
--- EDITED [28/10/2011] ---
here: Loading an array from a .txt file? (Android)
and here: https://stackoverflow.com/questions/5668507/trying-to-load-a-list-of-overlay-positions-from-file
i am creating an application in which i need to open the google map to show some nearby locations, the addresses are stored in my local DB.
can anybody suggest me what is the best way, or it will be very helpful if u share some demo code.
You might want to marshall your DB contents into a kml file and have the map view show that. This guy shows how to to do it in a previous post Adding a KML layer to an Android maps application