« ClaimId - OK As C.V., But Could Be Better | Main | MapBuilder: Google Maps Made Easier »

Jun 1
Google Maps API: Read the Documentation & Stay Away from Books
After much trial and error, and a valuable lesson learned, I finally got the Google Map API figured out to the point that I could create my own map of Yakima Valley wineries. 

All I wanted to do was create a Google map with markers for all of the wineries in the Yakima Valley.  The markers would be clickable and the data would be conveyed via XML. I'm an intermediate coder when it comes to PHP/Javascript/XML - I know enough to work through more complex functions, but it takes me a lot of time.  This project, however, wasn't supposed to be complex at all.
I'd just picked up a couple of books, O'Reilly's Ajax Hacks and SAMS XML in 24 Hours, showing exactly how to create a custom Google map using the API and some XML.

Unfortunately, both books used API functions that were discontinued in the newest version of Google Maps.  About 4 hours was wasted on this - mostly because I wasn't sure if it was the code, the geocoordinates, or my XML that was truly the problem.  It was a bit of each.

I kept my XML to the absolute basics to make sure it was perfect.  I got a map with markers in the wrong places.

I'd looked up latitude and longitude at Geocoder.us, but the coordinates were wrong.  Instead of being right downtown, one winery was shown as being 25 miles up in the Cascades.

I ended up using MapBuilder.net to get the coordinates.  When the map finally worked, it seemed pretty accurate for the wineries that I knew cross-streets for, but I'm still going to check each one manually over the summer.  Unfortunately, the first time I plugged in MapBuilder's lat and long, the marker was still off.

Finally, I erased a substantial part of the code and built it from scratch, using Google's own examples.  That only took an hour and I should have trusted my abilities to work right from Google's documentation to begin with.  It worked perfectly, with some trial and error on including HTML formatting within the XML document.

On the bright side, I fully understand everything in the code!  I've also learned to use the book provided code as an example, but work from the API to confirm.



1 Comments/Trackbacks




» MapBuilder: Google Maps Made Easier from DoRealTime
I mentioned MapBuilder.net in my last post.  It is used quite a bit by Realtors, but can be used for free by anyone.  Just create an account, start adding addresses and text for the popup boxes and you have a... [Read More]

Comments/Trackbacks are closed for maintenance.


« ClaimId - OK As C.V., But Could Be Better | Main | MapBuilder: Google Maps Made Easier »

Advertise



Related Resources

sponsored ads



topics

subscribe


Prefer Email?
Subscribe below-

Enter your Email:


Powered by FeedBlitz What's this?

Current News

Support This Blog

business social media

Use these fast growing business social media sites to promote your business, feature your products, spotlight your business leaders, create links, and drive traffic back to your company site, all for free!

BIZZlogos - Add your logo - free link to your site
BIZZphotos - Add photos of your products and people
BIZZprofiles - Submit your profile and build your online visibility
BIZZspotlight - Spotlight your business with free links
BIZZvideos - Videos about businesses, products and business people.
BIZZbites - "Digg" for Business - Submit your articles and posts

know more media network

View Network Map

Network Feed List (OPML)

Know More Media Network
Feed


we support unitus

PRWeb

Influencer



DoRealTime is a member of the Know More Media network of business related blogs.

Here are some current headlines from some of our business publications:

ProductivityGoal

CallCenterScript

AdHurl

TheBizofKnowledge

LandingTheDeal

CustomersAreAlways

HealthCareVox

BrainBasedBusiness

TheInsurancePolicy

MarketingBlurb