谷歌地图api自定义符号

时间:2015-05-08 08:50:31

标签: javascript google-maps google-maps-api-3 symbols

我需要在谷歌地图上使用自定义符号。我知道我可以使用标记然后我不能旋转它(我想?)这是我的代码:

    <script>
    function initialize() {
        var mapProp = {
            center: new google.maps.LatLng(51.508742,-0.120850),
            zoom: 4,
            minZoom: 2,
            mapTypeId:google.maps.MapTypeId.ROADMAP
        };
        var map=new google.maps.Map(document.getElementById("map"),mapProp);
        var myLatlng = new google.maps.LatLng(-51.508742,-0.120850);

        var image = 'http://www2.psd100.com/ppp/2013/11/0601/Aircraft-flag-icon-1106140439.png';
        var marker = new google.maps.Marker({
            position:myLatlng,
            icon: {
                icon: image,
                scale: 10,
                rotation: 50
            },

            map: map
        });
    }
    google.maps.event.addDomListener(window, 'load', initialize);
</script>

当我这样做时,标记/符号不显示..

0 个答案:

没有答案