Discussion Forums  >  Uncategorized

Replies: 6    Views: 540

localoid
Code is Art
Profile
Posts: 3
Reg: Apr 17, 2011
West Virginia
30
04/21/11 11:46 PM (14 years ago)

Maps - KML (or other) support for polygons/paths

I searched the forums for this subject, but didn't find much, so thought I'd post this: I've been using the Google Maps Javascript API to create maps of hiking trails by using KmlLayer object that utilizes a KML file (see: http://en.wikipedia.org/wiki/Keyhole_Markup_Language) to draw the polygons for the path (trail). Using KMLs makes the creation of paths pretty quick and easy to do and they're easily updated, etc. A simple example can be seen here: http://newriverwv.com/Trails-near-Fayetteville.php Do buzztouch maps (in either 1.4 or 1.5) have the ability to a layer of polygons/paths atop a map? If so, what formats are supported? I could of course call a URL from buzztouch to load an html file that would draw a map (via the Javascript API), but being able to do this (via a KML file or otherwise), directly from within a buzztouch map, would have its advantages... Any info appreciated!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/22/11 12:09 AM (14 years ago)
you could type KML in the forum search box for some basic conversations about KML. We know NOTHING about KML - funny - aside from some basic reading it's a pretty cryptic thing for us but does seem to have huge benefits in regards to using the buzztouch control panel to configure, create, etc. So, v1.4 and v1.5 don't support any path formats but it makes tons of sense that they would. No idea when we'll get around to it? Q: What tools / software is used to create files like this?: http://newriverwv.com/Trails-Fayetteville-Final.kml I'm asking becuase it seems like lots and lots of data to produce a trail and it must be done using somthing entirely new to me. I look forward to understanding this more so I can figure out a way to get it included in buzztouch ;-)
 
localoid
Code is Art
Profile
Posts: 3
Reg: Apr 17, 2011
West Virginia
30
like
04/22/11 03:04 AM (14 years ago)
Re; producing the http://newriverwv.com/Trails-Fayetteville-Final.kml I'll have to document the process (on real or virtual paper). ;) It involves a couple of freeware utilities but unfortunately it's only documented in my head at the present time. I'll be glad to post something... it'll take a while, but something I'd planned to do anyway. Basically, the trails on that map started out as UTM NAD83 data obtained for public sources, which were converted via use of a freeware utilities then filtered and edited in Delorme's Topo program (commercial product, but very inexpensive), Google Earth, and Google's My Maps. The final map draws the paths/trails via a URL to a (KML) file hosted on a server (publicly accessible on the Net) _or_ it can be a direct link to the KMZ link for the map @ My Maps (My Maps automagically generates a KMZ/KML). If I'd used a link via My Maps, any updates/changes made there will be reflect on the map. This would allow me to update a given trailhead to warn hikers that the road to the trailhead was washed out from a rainstorm last night, for example, and the live map would show the warming, etc. When I use the map online, I'll likely link to My Maps for that reason (automagically updated). See: http://code.google.com/apis/maps/documentation/javascript/overlays.html#KMLLayers It probably all sounds like more work that it actually is... ;) Producing the KML/KMZ is pretty quick, once you have the process down -- turning this raw data into useful/valid information usually is the time consuming part. Often the trail names are incorrect or have changed, or show spur routes that aren't valid, or the trails might no longer be open to the public, etc. And of course no one writes good, short, concise descriptions of trails. ;) But there are many ways to create KMLs. On Android for example, there's several free programs that you simply run the app and then walk the path that you want to route, then save the path as a KMZ/KML. Or one can use a dedicated GPS unit and walk the trail. Google Earth will import path data from several different brands of GPS units, and will export the data as KMZ/KML. There's also a ton of data that's freely available, most of which can be converted to KML/KMZ. I like the fact that KML/KMZ files works in both My Maps and Google Earth and the format is fairly portable between many different mapping program. On the Android platform, I (or anyone with the URL to it) can load a map from My Maps and it'll show my location on the map, so I can better tell which trail to take at a junction that's labeled with a confusing sign (quite common locally). And it provides live track on my movement, as I move around, etc. I don't believe My Maps works (fully) on the iPhone platform -- at least I could never get it to work on my iPod touch. Google's My Maps is just a really easy way to quickly create driving routes, place markers, etc. that anyone can use... I can load the My Map version of that map on my Android phone and get live tracking of my location in relation to the map. Unfortunately, My Maps doesn't seem to play well with the iPhone platform -- at least I could never get it to work (fully) on my iPod touch. Any hacks I've tried run really slow and eventually crash and burn. The API version of the map (http://newriverwv.com/Trails-near-Fayetteville.php) does play well with iPhone or Android and will show full screen on either device, but there's no where I am? tracking. I could implement a form of it via passing a query string to the map of the user's long/lat, but that would only be valid for that moment in time -- if I walked a 1/4 mile, it would reflect my current position without refreshing, etc. Since the buzztouch maps are cross platform and do live tracking on maps, it'd be nice if one could draw paths on them (trails, for example). Knowing where I am on a map just make for easier navigation. It'd be really sweet if one could link to a KMZ/KML file or some other format that supports polygons/paths, etc. Dynamically generating KMLs, via PHP/MySQL, server side would be another potentially groovy thing (http://code.google.com/apis/kml/articles/phpmysqlkml.html). But of course there's so many things that can be done with buzztouch as it is now... enough to keep me busy for a quite a while. Thanks again for making those possibilities possible!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/22/11 05:50 PM (14 years ago)
Awesome post! Added tons of your notes to the 'list' of endless possibilites.
 
trailman
Aspiring developer
Profile
Posts: 280
Reg: Dec 10, 2010
Sedona, az
6,550
like
10/01/11 09:17 AM (14 years ago)
I also am creating a hiking app. I found this long lost link and I noticed that we have the opposite problems. I solved the iPhone issue with location on a map. But I'm still working on the Android version. Can we get in contact somehow. My email is bruce at sedona videos dot com.
 
Cari79
Lost but trying
Profile
Posts: 9
Reg: Nov 12, 2011
Eastpointe
390
like
04/23/12 05:02 PM (13 years ago)
Ugh, I see that these posts are at least 6 months old. I agree with trailman, the issue is solved with the iPhone but I am unable to get it to work for Android. Does anyone know if this issue has been solved or if there is a way to make it work? I was hoping that it was a simple change within the current .xml coding that may cure the problem.
 
Geo3d
Aspiring developer
Profile
Posts: 31
Reg: Apr 19, 2012
location unknow...
910
like
05/14/12 12:49 PM (13 years ago)
Yea found this lost link too - working with KML would be ideal but I've yet to solve the 'show location' problem with showing 'trails' via Android. If anyone willing to collaborate and brainstorm this issue - count me in.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.