There are a few possibilities to diminish the code. I can think of these three at the moment:
1. Use the documented copy constructor http://code.google.com/apis/maps/documentation/overlays.html#Custom_Icons 2. Define a helper function that assigns all necessary properties for the icons. 3. Use a helper function (like createMarker) to create the icons with its necessary properties. On Nov 28, 11:06 am, Jake <[email protected]> wrote: > My maps use custom marker exclusively. > > I repeat this format for each market type: > > icon[1] = new GIcon(); > icon[1].image = "/images/markers_2/clothing.png"; > icon[1].iconSize = new GSize(20, 34); > icon[1].iconAnchor = new GPoint(10, 34); > icon[1].shadow = "/images/markers_2/shadow.png"; > icon[1].shadowSize = new GSize(37, 34); > icon[1].transparent = "/images/markers_2/transparent.png"; > icon[1].infoWindowAnchor = new GPoint(10, 2); > > So with a dozen markers, that's a lot of code. > > Is this the proper way to do this? Is there a better / more > appropriate / more elegant way to load up the special markers? -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
