Select Original Serial Example

Install

Included in Web SDK

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

code

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

const map = DeepMapFactory.bootstrap(config);

const callback: () => void = () => {
    const callback: () => void = function () {
        const originalSerial = "heidelberg";

        // Only select a feature
        map.selectFeatureByOriginalSerial(originalSerial, true, true);

        // First load a feature, then select it
        // map.getFeatureByOriginalSerial(originalSerial).then(function (feature) {
        //     feature && map.select(feature, true, true).then(function () {
        //         console.log(originalSerial + " highlighted");
        //     });
        // }).catch(function (error) {
        //     console.error(error);
        // });

        // Only highlight a feature
        // map.highlightFeatureByOriginalSerial(originalSerial, {zoomTo: true, animated: true});

        // First load a feature, then highlight it
        // map.getFeatureByOriginalSerial(originalSerial).then(function (feature) {
        //     feature && map.highlightByFeatures([feature], {animated: false, zoomTo: true});
        // }).catch(function (error) {
        //     console.error(error);
        // });
    };
};
map.setMapViewControllerDidStart(callback)