아래의 해당 코드는 google map을 openlayer3 맵으로 불러오기 하는 코드입니다.

var googleLayerTile = new ol.layer.Tile({

name: 'Google',

    source: new ol.source.OSM({

        url: 'http://mt{0-3}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',

        attributions: [

            new ol.Attribution({ html: '© Google' }),

            new ol.Attribution({ html: '<a href="https://developers.google.com/maps/terms">Terms of Use.</a>' })

        ]

    })

});


아래의 해당 코드는 google의  google streetview를 사용 할 시에 항공 사진이 있는 위치를 지도상에 Point로 보여주는 코드 입ㄴ다.


var googleStreetTile = new ol.layer.Tile({

visible: false,    

name: 'Google_streetview',

zIndex: 3,   

source: new ol.source.OSM({

url: 'http://mt{0-3}.googleapis.com/vt?lyrs=svv|cb_client:apiv3&style=40,18&x={x}&y={y}&z={z}',

attributions: [

              new ol.Attribution({ html: '© Google' }),

              new ol.Attribution({ html: '<a href="https://developers.google.com/maps/terms">Terms of Use.</a>' })

              ]

})

});

Posted by 샤린냥
2016. 3. 31. 07:16

...

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2016. 3. 30. 09:54

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.