2014년 12월 5일 금요일

I can't figure out how to load multiple points on Google Maps in Android 4.4.2


I'm trying to display more than one point on google maps in Android 4.4.2.

As far as I can tell the best way to accomplish this is by using a KML file. I've tried this in various ways. It seems that when I use a KML file located on the web that only files stored on https servers will work. I'm assuming this because if I access one of Google sample files on their https server it works however if I cut and paste their code into a file on my http server it won't work.

I've also tried storing the kml file locally on the sdcard of my phone. The file loads but the points are not displayed. It appears that google maps is doing some sort of search based on the kml file rather than just loading the points from the kml file.

I've really wrestled with this and have scoured the web and have not come up with a solution. 

Thanks in advance for any assistance/advice you might have.

--
probably the Static Maps API is sufficient for you?
see this App Inventor Classic snippet 

--
Taifun describes one method using an AI Classic example.  

 Did you know that you can load a kml file directly into a Fusion Table and have it display a map?

There is no simple way to display multiple pins on a standard Google Map.  The standard map will normally allow only two points,  your users location (or other location defined as the origin location)  and a destination location.  Use the example described by Taifun allows you to plot many pins, as long as the length of the total url string does not exceed 2048 characters.

--

댓글 없음:

댓글 쓰기