AlfaTeK
AlfaTeK

Reputation: 7765

Add Marker Icon with Symbol and gif image?

Is it possible to use as a Marker Icon a Symbol (SVG) plus a gif image? From the docs it's not clear if that's not supported or if there is any trick to achieve that.

I tried this with no success:

marker = new google.maps.Marker({
            position:new google.maps.LatLng(38.742588, -9.230097),
            icon:{
                path:google.maps.SymbolPath.CIRCLE,
                scale:1,
                url: 'http://icons.iconarchive.com/icons/icons-land/vista-map-markers/16/Map-Marker-Bubble-Azure-icon.png'
            },
            draggable:true,
            map:map
        });

Upvotes: 0

Views: 1334

Answers (1)

Maksim Aniskov
Maksim Aniskov

Reputation: 371

It's possible using shadow option.

  var marker = new google.maps.Marker({
        position:new google.maps.LatLng(38.742588, -9.230097),
        icon:{
            url: 'http://icons.iconarchive.com/icons/icons-land/vista-map-markers/16/Map-Marker-Bubble-Azure-icon.png'
        },
        shadow:{
            path:google.maps.SymbolPath.CIRCLE,
            scale: 10
        },
        draggable:true,
        map:map
    });

Upvotes: 1

Related Questions