Only the first syntax is supported.  Please see the reference docs for
more detail:
http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerImage

-Susannah

On Jun 23, 6:03 am, ELL Admin <[email protected]> wrote:
> Hi,
>
> newbie question:
>
> I'm trying to set options for my marker icon image. I found example
> code in this form:
>
> var iconimage = new google.maps.MarkerImage(icon,
>                 // Icon size (w, h)
>                 iconSize,
>                 // Origin
>                 new google.maps.Point(0, 0),
>                 // Anchor-point
>                 new google.maps.Point(0, 0.5 * iconSize.width),
>                 // Scaled size
>                 iconSize)
>
> (where 'iconsize' is a google.maps.Size object defined earlier in the
> function)
> which works fine.
>
> However, I'd prefer to the same thing in this format:
>
>         var MarkerImageOptions = {
>                 size: iconSize,
>                 origin: new google.maps.Point(0, 0),
>                 anchor: new google.maps.Point(0, 0),
>                 scaledSize: iconSize
>         }
>         var iconimage = new google.maps.MarkerImage(icon,
> MarkerImageOptions);
>
> which doesn't seem to work (my markers are no longer visible). I'm
> sure I'm making some kind of basic syntax error, but I can't spot it
> at the moment. I'd like to do it this way for consistency with the
> rest of my code, and because it eliminates the need for commenting.
> Also, I just think it looks nicer, and more readable.
>
> Any advice much appreciated,
>
> alx

-- 
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.

Reply via email to