Skip to content

Documentation / geoverse / createMap

Function: createMap()

ts
function createMap(options?): IGMap;

Defined in: index.ts:22

同步创建统一地图。options.engine 选择渲染引擎(默认 'ol')。

ts
import { createMap } from 'geoverse';
const map = createMap({ engine: 'libre', base: 'osm', center: [120, 30], zoom: 12 });
const layer = map.createVectorLayer({ id: 'pts' });
layer.addFeature(map.createMarker({ position: [120, 30] }));
map.addLayer(layer);

Parameters

options?

UnifiedMapOptions = {}

Returns

IGMap