mirror of https://gitee.com/antv-l7/antv-l7
parent
bf4d22513d
commit
57eb8a21ed
|
@ -15,7 +15,12 @@ scene.on('loaded', () => {
|
|||
zIndex: 1
|
||||
});
|
||||
baseLayer.source(
|
||||
'https://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
[
|
||||
'https://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
'https://webst03.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
'https://webst04.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}'
|
||||
],
|
||||
{
|
||||
parser: {
|
||||
type: 'rasterTile',
|
||||
|
|
|
@ -15,7 +15,10 @@ scene.on('loaded', () => {
|
|||
zIndex: 1
|
||||
});
|
||||
baseLayer.source(
|
||||
'https://t1.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',
|
||||
[
|
||||
'https://t1.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd',
|
||||
'https://t2.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=6557fd8a19b09d6e91ae6abf9d13ccbd'
|
||||
],
|
||||
{
|
||||
parser: {
|
||||
type: 'rasterTile',
|
||||
|
|
|
@ -153,7 +153,7 @@ export type MapboxVectorTile = {
|
|||
};
|
||||
|
||||
const getVectorTile = async (
|
||||
url: string,
|
||||
url: string | string[],
|
||||
tileParams: TileLoadParams,
|
||||
tile: Tile,
|
||||
coord: string,
|
||||
|
@ -213,7 +213,7 @@ const getVectorTile = async (
|
|||
};
|
||||
|
||||
export default function mapboxVectorTile(
|
||||
data: string,
|
||||
data: string | string[],
|
||||
cfg?: IRasterTileParserCFG,
|
||||
): IParserData {
|
||||
const coord = cfg?.coord || 'lnglat'; // lnglat - offset
|
||||
|
|
|
@ -14,7 +14,7 @@ const DEFAULT_CONFIG: Partial<TilesetManagerOptions> = {
|
|||
};
|
||||
|
||||
export default function rasterTile(
|
||||
data: string,
|
||||
data: string | string[],
|
||||
cfg?: IRasterTileParserCFG,
|
||||
): IParserData {
|
||||
const tileDataType: RasterTileType = cfg?.dataType || RasterTileType.IMAGE;
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
* @returns
|
||||
*/
|
||||
export const getTileBuffer = async (
|
||||
url: string,
|
||||
url: string | string[],
|
||||
tileParams: TileLoadParams,
|
||||
tile: Tile,
|
||||
rasterParser: any,
|
||||
|
@ -39,7 +39,7 @@ export const getTileBuffer = async (
|
|||
};
|
||||
|
||||
export const getTileImage = async (
|
||||
url: string,
|
||||
url: string | string[],
|
||||
tileParams: TileLoadParams,
|
||||
tile: Tile,
|
||||
): Promise<HTMLImageElement | ImageBitmap> => {
|
||||
|
|
|
@ -66,9 +66,12 @@ export default class RasterTile extends React.Component {
|
|||
});
|
||||
layer
|
||||
.source(
|
||||
'http://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
// 'http://rd1yhmrzc.hn-bkt.clouddn.com/Mapnik/{z}/{x}/{y}.png',
|
||||
// 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=get_your_own_key_rSw2Lu595oi7U6WngsFQ',
|
||||
[
|
||||
'http://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
'http://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
'http://webst03.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
'http://webst04.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
||||
],
|
||||
{
|
||||
parser: {
|
||||
type: 'rasterTile',
|
||||
|
|
Loading…
Reference in New Issue