Custom graphic for Google maps polyline

I’ve been looking into the question wether or not it is possible to use a custom graphic for polylines (and/or polygons) in Google Maps. The result so far is very promissing and the answer is yes!

Click to launch

NOTE: right click and save as.. then run, as the gmaps API key used is not for this domain.

The feet are taken from a MovieClip and repeated for the length of the line.

I’ve achieved this by implementing the IPolyLine and IOverLay Interface. It took quite some figuring out to determine what each function was meant to do.

TBC…

TODO:

  1. Multi point line
  2. Exact line fill
  3. Flag for toggling image stretching / repeating
  4. Fixing a bug with Event dispatching