Blog

Fix mapquest javascript map gear problem

So I've been using the mapquest API for a project and I ran into an annoying bug. I was working on implementing a map through mapquest's open javascript api and I couldn't get it to work from the start. I literally copied their 'getting started' code straight into my project and was only getting grey gears on the map. I would scroll and the tiles never updated, I simply just kept getting grey gears. To add to my frustration when I was using firefox it didn't work but when I loaded up chrome the problem was gone!

A bit of snooping around on the internet and I found out that the problem was a conflict with twitter bootstrap and the maps css. The solution is to override twitter bootstraps img styles.

Bootstrap original CSS:

img{max-width:100%}

Fix:

img{max-width:none}

Source: http://developer.mapquest.com/web/products/forums/-/message_boards/view_message/310242