Sunday, April 1, 2012

Google Maps


As visitors may know and often use, the Mt. Rainier photo guide uses a lot of Google maps for the presentation of information about Mt. Rainier NP and your visit. I'm a spatial and visual person so maps are what and how I understand information, especially geographic information.

It's why I use them on the guide because the guide is both for NP visitors to have the information for their trip and any hikes and for myself to understand the NP in a way I think. It's as much for myself to learn and understand as it is for visitor who visit the Web pages and use the information.

The problem with the maps is that they were originally developed using Google map API version 2 and Google announced it was deprecated this version for version 3 in 2010 and may discontinue version 2 as early as 2013. This is important in that the base maps in version 2 were registered with Google and have a key which contains all the map properties.

Version 3 does not require map registration and provides map developers greater flexibility and latitude with maps on Web pages. This mean I can develop more and better maps for the NP with the photo guide, specifically maps for each quadrant not requiring users to zoom into the area to enlarge the map. The map would already be enlarged for that area.

That said, however, Google decided not to make version 2 forward compatible with version 3 maps or make version 3 backward compatible with version 2 maps. Yeah, it's a wholesale conversion or nothing. The truth is that it took me a month to learn version 2 code and develop my first Google map.

And it often took another week or more to learn who to add features to the maps such as the information window with the markers and the NP boundary which Google dropped from their map. The reference manual and documentation for Google map API isn't suited for someone like me who learns using examples which they don't provide outside the few provided by developers.

So now I'm faced with two tasks. The first is learning version 3 code, namely the changes from version 2 and the new organization of the blocks of code. The second is learning how to import the XML files I use to store the NP boundary point data converted to lines on the map and the marker locations and information displayed in the popup information window on the map for each marker.

Under version 2 XML was a straght-forward and easy way to update information and read it for the map. The same is true for version 3 if I can write new javascript for the map API version 3 to read the XML files, but so far it's not proving successful, so while I'm looking at the option to hire someone to convert the code I also have other options, which are as follows.

1.--Write the XML files information directly into the Web page map API javascript code. I do this with the list for the different types of information (lakes, waterfalls, etc.), that's because it's a one time deal and easy to update for new locations, but it tediously burdens the code with the extensive javascript code for the information.

2.--Use other formats such as KML or Google's Fusion tables. Using KML format files would import directly into other map applications and using Fusion tables opens the information to Google's other on-line tools. Both, howerver, would requires transcribing all the XML information into the new format or tables and learning version 3 code for those formats.

3.--Use a another program language to read the XML files and import into the map API code. There are several which will do that but it entails learning those languages along with version 3 code to interface the other code. This is really the last option since my knowledge of javascript is basic and other languages would be a lot harder.

4.--Keep the XML file and trudge on the learning curve. I know I will get there, likely with help from somewhere or someone, and this allows me to keep the current files to update and change. And XML is still a often-used format so it's not going away anytime soon.

So that's the situation, and as always, I'll wander along with option 4 while looking at the other options and looking for someone to do the work if it's affordable and actually helps. Yeah, lots of people will take the money for the work, but the key is if and how they will do the work and if the end product actually does what I need and want.

And so the photo kinda' explains how I feel right now, slightly in the dark and snowed in, surrounded by unknowns and a lot of knowns I have to learn. In the end, though, I'll dig myself out and you'll see new maps.

No comments: