On Oct 11, 10:36 am, ammu <[email protected]> wrote:
> Lets 
> sayhttp://icons.iconarchive.com/icons/deleket/halloween-avatars/icons-39...

http://icons.iconarchive.com/icons/deleket/halloween-avatars/icons-390.jpg
I see 6 things on that image, do you want all of them to appear?

That image is 390px × 260px;
each of the 6 "icons" appears to be 130px x 130px.

> I have that image. When I give the size I get a portion of the image.
> I want that whole image to be compressed and seen in the maps

If you want the whole image to be seen and be scaled down you need to
use the size and scaled size in the MarkerImage constuctor properly:
http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerImage

MarkerImage(url:string, size?:Size, origin?:Point, anchor?:Point,
scaledSize?:Size)       A structure representing a Marker icon or shadow
image.

size should be the size of the image: 390,260
scaled size should be the "compressed size" the size you want it to
appear on your map:
scaledSize      Size    The size of the entire image after scaling, if any.
Use this property to stretch/shrink an image or a sprite.

size    Size    The display size of the sprite or image. When using
sprites, you must specify the sprite size. If the size is not
provided, it will be set when the image loads.

Since this _might_ be a sprite (i.e. you only want to show one of the
six icons), you might need to play with the origin as well.

  -- Larry


>
> Am I clear in what I want to convey? Sorry if its kinda confusing.
>
> If I give new google.maps.Size(20, 32), as the size the left hand
> corner white portion is only getting displayed.
>
> On Oct 11, 12:25 pm, "[email protected]" <[email protected]>
> wrote:
>
>
>
>
>
>
>
> > On Oct 11, 9:22 am, ammu <[email protected]> wrote:
>
> > > Thanks Rossko. I did try this but what happens is if an image has
> > > white space around it and it has the exact image in the center the
> > > white part only gets displayed. I want to show the exact image that I
> > > have but in a smaller size.
>
> > > Can you please let me know if that can be done?
>
> > Sure.  If it is your custom icon, make the icon be what you want it to
> > be.  There are image editing programs available that will allow you to
> > resize images, crop images, etc.  If you mean there is a white
> > background that you want to make transparent, you need to do that with
> > an image editing program as well.
>
> >   -- Larry
>
> > > On Oct 10, 12:42 pm, Rossko <[email protected]> wrote:
>
> > > > > I am using a custom marker icon.Is there a way to compress the icon
> > > > > file? As it looks very huge on the maps.
>
> > > > You can specify the Size of 
> > > > iconshttp://code.google.com/apis/maps/documentation/javascript/overlays.ht...

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