You are right. They replaced Icon more or less with MarkerImage. MarkerImages give us a lot more control than we simply had with Icons, but it does require us to change things up quite a bit as the changes can be rather different between setting the old Icon display properties and that of the MarkerImage.
What I was trying to get at is if you create a marker myMarker and set its properties and then later use myMarker again, it is going to retain the size properties that you had defined earlier, so you need to ensure you are in fact creating unique markers when you create them. I like to read my markers from some sort of data, I'm using a database that I am reading from my c++ code but xml is great as well, and then push those markers into an array that I can then keep tabs of them on and make adjustments, etc. What you should do is read your xml style information for the markers that you are wanting to create and create individual MarkerImages based on the different types of images/styles you will be wanting to use. Then create a marker and set its Icon to the MarkerImage you had defined, and you should be up and going. As I've said MarkerImage and Icon are different but they are similar enough that if you read through the documentation you should pick up on it rather quickly. On Thu, Jun 17, 2010 at 11:43 AM, PaulG <[email protected]> wrote: > > Are you using the same marker and just different images with different > image > > sizes for the marker or are they different markers entirely? I say this > b/c > > when you create a marker and set its image size property, the image size > for > > that marker is set, this has been like this since api v2. > > Thanks for replying, I am defining the icon in the kml file. > > I find this a very clean way of packaging and managing several layers > of data along with their associated icons and descriptive data - and > is the avenue I would prefer to go down. > > I am sorry but I am not following your other comments because - In my > head - I am setting some "style rules" for my icons which look for all > the world like css styles, but in fact are just packaged instructions > which are zipped off to Google to make sense of, cache for a while and > to send back along with the tiles. > > My understanding it that those icons are no longer available for me to > intercept or fiddle around with in JS in the way I would do in v2, and > I understand that is one of the prices to pay for all the other > simplicity and goodness that Gmaps V3 + kml can bring. > > Is my perception wrong? > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-js-api-v3%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
