Hello,

My goal is to load custom images as marker icon, and resize them (the
images are different).

Code :

        var icone = "http://www.site.com/image_xyz.jpg";
        var scale = 0.33 ;

        // create a js image object
        var ti=new Image();
        ti.src=icone;

        // get cur size
        var ih=ti.height;
        var iw=ti.width;

        // create the scale obj
        scale = new google.maps.Size(iw*scale,ih*scale) ;

        // create the icon obj
        icone = new google.maps.MarkerImage(icone, null, null, null,
scale) ;

At first load the image are shown in 'normal' size (1:1), and are not
resized.

After if I refresh the page, the images are perfect resized.

All help will be appreciate.

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