Skip to main content

Layer_MMGSLayer

#3DGS service layer (MMGSLayer)

method

flyToSelf

When adding a 3DGS service, it can automatically locate the perspective of the model to avoid the situation where the model cannot be seen or found after loading.

Parameters
NameTypeDescription
optionsObjectRequiredparameter
nametypedefault valuedescription
bearingNumber0.0optionalThe azimuth angle of the camera after the flight, measured in degrees clockwise from north.
pitchNumber0.0optionalThe pitch angle of the camera after the flight ends.
durationNumber1000optionalFlight duration, in milliseconds.

Case

    map.addLayer({
id:'gs-3d-layer',
type:'MMGS',
url:'http://***/models/15-18_level_splat/mmgs.json',
maximumScreenSpaceError:1
callback: function (group, layer) {
layer.flyToSelf({
pitch: 60, // tilt angle
duration: 3000, // flight time
});
},
});

Refer to Example.