google flash maps, more marker headroom

A quick note on google flash maps. Somewhere in the vicinity of a few thousand markers, initialization time starts to slow down perceptibly; this is not unexpected mind you.. In the maps application I was working on, a  minority of pages passed that mark – enough to look into options, but not enough to rethink “the metaphor”. It turns out getting more headroom in flash maps is really easy. The first thing to do is to create a custom marker to replace the google pin (a movie clip asset will do) using the MarkerOptions icon property. Now the important move – cache the clip as a bitmap (marker_icon.cacheAsBitmap = true;), and pass it into the overlay as the icon. Finally make sure shadow rendering is off (MarkerOptions hasShadow property).

Caching a custom marker as a bitmap and disabling shadow isn’t going solve all your issues if you’re looking to put too many more markers in the map, but it can at least triple the marker threshold before the map becomes unusable, which if you’re dealing with a few wild fringe cases can come in handy..

5 Responses to “google flash maps, more marker headroom”

  1. Russ Cobb says:

    Hey Ben,

    Just perusing your webstie before sending you an email about tonight. I’ve been struggling with the Google Maps API for a while now, mostly because I’m not a real programmer. But one awesome example of the API with Flash is the Tufts University maps site. Check it out.

    http://campusmaps.tufts.edu/medford/

    RC

  2. SECRETS OF YOGA…

    SECRETS OF Yoga Awakening Meditation Collection 21-day Trial Now!!!…

  3. Free and Fast Easy Health Weight Loss Diet Ideas…

    How To Fast Easy Health Weight Loss and good Ideas for Diet,Let’s Go Start Losing Weight Now!…

  4. Health Weight Loss Diet…

    How To Fast Easy Health Weight Loss and good Ideas for Diet,Let’s Go Start Losing Weight Now!…

  5. Fast Weight Loss Tips – A Great Start To A Slimmer You…

    [……]I am reading your blog post,I want to link it[……]…

Leave a Reply