What is the construct interface `google.maps.Icon`

后端 未结 2 716
悲哀的现实
悲哀的现实 2020-12-16 14:01

The docs of Google Maps V3 JS API does not seem to give the interface of the construct of google.maps.Icon. I found an example with MarkerImage, wh

2条回答
  •  余生分开走
    2020-12-16 14:28

    Hmm... Now, this answer is just wrong.

    You can't

    var icon = new google.maps.Icon({
        anchor: new Point(...),
        url: "myurl"
        // etc..
    });
    

    It's an object literal, which means that you can just use it like this:

    var icon = {
        anchor: new Point(...),
        url: "myurl"
        // etc..
    };
    

提交回复
热议问题