Locate Me Example

Install

npm i -S @deepmap/hdm-web-map-sdk @deepmap/control-locate

code

            
<div style="height: 50%" id="deepMap-locate-me"></div>
            
            
            
import '@deepmap/hdm-web-map-sdk/styles/index.scss';
import '@deepmap/control-locate/styles/control-locate.scss';
            
                    
import {DeepMapFactory} from '@deepmap/hdm-web-map-sdk';
import {ControlLocate} from '@deepmap/control-locate';

const config = {
    projectName: 'mathematikon_basemap',
    mapServiceUrl: 'https://ssp.deepmap.de/geo',
    target: 'deepMap-locate-me'
};

const locateMeControl = new ControlLocate();
const map = DeepMapFactory.bootstrap(config);

map.setMapViewControllerDidStart(function () {
    map.addControl(locateMeControl);
});