Skip to main content

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 initializationauthConfigParameters, please refer toMapparameter.
    nametypedescribe
    authConfigObjectRequiredparameter
    NameTypeDefaultDescription
    authServiceAddressStringRequiredAuthorized service address.
    authServiceUseSSLBooleantrueOptionalWhether to use when connecting to the authorization serviceSSL。
    pluginAddressStringRequiredAuthorized plug-in address.
    authInfoPortNumber39026OptionalAuthorization 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
show
(2)Click to install now
show
(3)Just wait for the installation to complete
show

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
show
  • As shown in the picture,Indicates that authorization is already running in the background:
show
(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】
show

SDKAuthorize

parameter

  • Configured during map initializationauthConfigParameters, please refer toMapparameter.
    nametypedescribe
    authConfigObjectRequiredparameter
    NameTypeDefaultDescription
    pluginAddressStringRequiredAuthorized plug-in address.
    secretKeyBooleanfalseOptionalWhether to enable dongle authorization code mode.
    pollingIntervalString30000OptionalPolling 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>