Yahoo Map Markers Will Not Display

I realize this post doesn’t have a very creative title, but when you’re writing for Google, it helps to try and summarize the problem in a straightforward way, using keywords others afflicted with the similar problem might use when searching.

So, what is the problem I speak of? This morning, I learned about the Yahoo Maps API, which is very exciting, and which deserves its own post, at a later date. (Ok – one digression: what makes the Yahoo Maps API exciting? One word: geocoding.)

Like the Google Maps API, the Yahoo Maps API allows the placement of marker points. This is basic stuff, but, for some reason I was having difficulty getting the marker points to display. Even when using Yahoo’s basic example code, nothing would display. Undaunted, I decided that perhaps the problem was the website into which I was attempting to integrate the Yahoo map. I started stripping away HTML, CSS, and finally other JavaScript.

And that’s when I found the solution. I am using the very popularity prototype javascript library in this particular web application. Well, for whatever reason – and bonus points for someone with enough time to dig through both libraries and find the cause – loading the prototype library prior to loading the Yahoo Maps API will cause your points not to display. Simple fix? Disable prototype on pages where you’re embedding maps with marker points.

Due to the popularity of the prototype library, and coolness of the Yahoo Maps API, I imagine I won’t be the only one who encounters this problem. Hope this post helps someone else. Oh, and if you want, point to cool examples of your Yahoo maps web apps.