image.png

    1. var gaodeMapLayer = new ol.layer.Tile({
    2. title: "高德地图",
    3. source: new ol.source.XYZ({
    4. url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}',
    5. wrapX: false
    6. })
    7. });
    8. var map = new ol.Map({
    9. target: "map_container",
    10. layers: [gaodeMapLayer],
    11. view: new ol.View({
    12. projection: 'EPSG:4326',
    13. center: [0, 0],
    14. zoom: 4
    15. })
    16. })

    影像图层

    1. var image = new ol.layer.Tile({
    2. title: "高德地图",
    3. source: new ol.source.XYZ({
    4. url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=6&x={x}&y={y}&z={z}",
    5. wrapX: false
    6. })
    7. })

    注记图层

    1. var zhuji = new ol.layer.Tile({
    2. title: "高德地图",
    3. source: new ol.source.XYZ({
    4. url: "http://webst02.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=8",
    5. wrapX: false
    6. })
    7. })