Deployment
Deployment
- Deployment is divided into two modes: offline service authorization and confidential dog authorization.
- Offline service authorization deployment documents are provided with the download package.
- In the case of offline authorization, cross-domain request problems may occur. You can update the authorization deployment package or during map initialization.`expireTip`set tofalsesolve.
Offline service authorization
parameter
- Configured during map initialization
authConfigParameters, please refer toMapparameter.name type describe authConfig Object Requiredparameter Name Type Default Description authServiceAddress String RequiredAuthorized service address. authServiceUseSSL Boolean true OptionalWhether to use when connecting to the authorization serviceSSL。 pluginAddress String RequiredAuthorized plug-in address. authInfoPort Number 39026 OptionalAuthorization information port.
Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Display a map</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"/>
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
<script src="https://***/cdn/sdk/lite/v9.1.0/mapmost-lite-min.js"></script>
</head>
<body>
<div id="map"></div>
<script>
let map = new mapmost.Map({
container: 'map', // map container id
style: "https://***/cdn/styles/sample_data.json", // style file URL
center: [120.71923008473078, 31.29446443371741], // Map initial center point
zoom: 14.7, // Map initial level
// Intranet authorization parameters, among which IP Need to be replaced by deployment Mapmost SDK for WebGL Offline authorized server IP
authConfig: {
pluginAddress: 'http://IP:8085/sdk_auth_wasm_bg_opt.wasm',
authServiceAddress: 'IP:8083',
authServiceUseSSL: false,
},
userId:'***'// Authorization code
});
</script>
</body>
</html>
Dongle authorization
Installation and use of dongle
1. sense_shieldInstall
- newwindowsWhen using the dongle program for the first time in a workstation environment, you must install it first.exe,ShouldexeThe installation can be installed without plugging in the dongle.
(1)Double-click the deployment packagesense_shield_installer_pub_lcc_2.7.7.69413.exe

(2)Click to install now

(3)Just wait for the installation to complete

2. start upMapmost SDK Litedongle program
- ShouldexeDongle must be inserted to install
(1)Double-click the deployment packagewebgl-studio-month-backend-1.0.0.exe

- As shown in the picture,Indicates that authorization is already running in the background:

(2)Click to close the pop-up window without affecting use
3. Manually close the authorized dongle program
- 【task manager】-->【Details】-->Find the corresponding background process -->【Right click】【end task】

SDKAuthorize
parameter
- Configured during map initialization
authConfigParameters, please refer toMapparameter.name type describe authConfig Object Requiredparameter Name Type Default Description pluginAddress String RequiredAuthorized plug-in address. secretKey Boolean false OptionalWhether to enable dongle authorization code mode. pollingInterval String 30000 OptionalPolling interval, in milliseconds.
Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Display a map</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"/>
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
<script src="https://***/cdn/sdk/lite/v9.1.0/mapmost-lite-min.js"></script>
</head>
<body>
<div id="map"></div>
<script>
let map = new mapmost.Map({
container: 'map', // map container id
style: "https://***/cdn/styles/sample_data.json", // style file URL
center: [120.71923008473078, 31.29446443371741], // Map initial center point
zoom: 14.7, // Map initial level
// Dongle authorization parameters, where IP Need to be replaced with a server that starts the dongle program IP
authConfig: {
pluginAddress: 'http://IP:32312',
secretKey: true,
pollingInterval: '30000',
}
});
</script>
</body>
</html>