Can't resize markerimage

192 views
Skip to first unread message

Chowdotya Raito

unread,
Oct 25, 2011, 10:49:42 PM10/25/11
to google-map...@googlegroups.com
today i'm find out that google.maps.MarkerImage(url:string, size?:Size, origin?:Point, anchor?:Point, scaledSize?:Size) doesn't work on resizing my icon...

can anyone help me? thanks

geoco...@gmail.com

unread,
Oct 25, 2011, 11:16:09 PM10/25/11
to Google Maps JavaScript API v3
On Oct 25, 7:49 pm, Chowdotya Raito <knightxen...@gmail.com> wrote:
> today i'm find out that google.maps.MarkerImage(url:string, size?:Size<http://code.google.com/apis/maps/documentation/javascript/3.5/referen...>,
> origin?:Point<http://code.google.com/apis/maps/documentation/javascript/3.5/referen...>,
> anchor?:Point<http://code.google.com/apis/maps/documentation/javascript/3.5/referen...>,
> scaledSize?:Size<http://code.google.com/apis/maps/documentation/javascript/3.5/referen...>)
> doesn't work on resizing my icon...
>
> can anyone help me? thanks

Where is your map that exhibits the problem? A link that we can debug
in a browser would be useful.

("it doesn't work" is hard to fix when we can't see what "it" is)

-- Larry

Chowdotya Raito

unread,
Oct 25, 2011, 11:31:41 PM10/25/11
to google-map...@googlegroups.com
sorry, i was so panic back there... :)

i have house icon 32x32px.
and this is my script :
    var image = new google.maps.MarkerImage("image/house.png", new google.maps.Size(24,24), new google.maps.Point(0,0), new google.maps.Point(12, 24), new google.maps.Size(24,24));
   
    var shape = {
        coord: [1, 1, 1, 24, 24, 24, 24, 1],
        type: 'poly'
    };
   
    var target = new google.maps.LatLng(latitudebase, longitudebase) ;
    var markerb = new google.maps.Marker({position: target, map: map, icon: image, shape: shape, title: namabasev}) ;


yesterday, this function can resize my icon.. but today it can't...

anyway, i have solved this problem by resizing house icon to 24x24px directly, without MarkerImage function..

*sorry for my bad english
Reply all
Reply to author
Forward
0 new messages