Sunday, December 16, 2007

And more problems with the Google Maps Interface

One of the things that I felt would be an integral part to my Social Locater project idea was local bus routes (especially those that I used most often). I obtained an ESRI shapefile of Asheville transit information and did a quick conversion to KML. The problem that I quickly discovered is that Google APIs have difficulty in understanding lines which overlap themselves.

After research on the issue I found that the KML work around for this problem is to was to create a series line segments for each route to prevent a single line from overlapping itself. This created another problem when attempting to upload the KML file into Google Maps in that the segments created a situation that was somewhat computationally intense and caused the interface to lock up on occasion. Additionally each segment of a line was considered a separate entity within the map and created a situation where the entire route may not be visible on the map.

The workaround for this issue was to manually edit the KML file and use the tag to make the numerous line segments appear as a single route. This worked extremely well in Google Earth, but the problem continued in Google Maps. I learned from the Google Maps API that the XML/KML parser that drives Google Maps does not understand the tag. If using the Google Maps engine with another parser this problem could be potentially avoided.

The screenshots below capture the problem. Look at the table of contents in the left of each application to see the division of routes.


No comments: