
Security News
/Research
Compromised Injective SDK npm Package Exfiltrates Wallet Keys and Mnemonics
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.
@maptalks/analysis
Advanced tools
maptalks.analysis a plugin to excute analysis task in maptalks.
npm install @maptalks/analysis.https://unpkg.com/@maptalks/analysis/dist/maptalks.analysis.js<script type="text/javascript" src="../maptalks.analysis.js"></script>
<script>
var map = new maptalks.Map("map",{
center : [0, 0],
zoom : 15
});
var groupLayer = new maptalks.GroupGLLayer('g', [], { sceneConfig }).addTo(map);
var center = map.getCenter();
var eyePos = [center.x + 0.01, center.y, 0];
var lookPoint = [center.x, center.y, 0];
var verticalAngle = 30;
var horizontalAngle = 20;
var viewshedAnalysis = new maptalks.ViewshedAnalysis({
eyePos,
lookPoint,
verticalAngle,
horizontalAngle
});
viewshedAnalysis.addTo(groupLayer);
</script>
import { ViewshedAnalysis } from '@maptalks/analysis';
const map = new maptalks.Map("map",{
center : [0, 0],
zoom : 15
});
const groupLayer = new maptalks.GroupGLLayer('g', [], { sceneConfig }).addTo(map);
const center = map.getCenter();
const eyePos = [center.x + 0.01, center.y, 0];
const lookPoint = [center.x, center.y, 0];
const verticalAngle = 30;
const horizontalAngle = 20;
const viewshedAnalysis = new maptalks.ViewshedAnalysis({
eyePos,
lookPoint,
verticalAngle,
horizontalAngle
});
viewshedAnalysis.addTo(groupLayer);
(inherited from maptalks.Eventable)ViewshedAnalysis's constructor.
| Parameter | Type | Default | Description |
|---|---|---|---|
eyePos | Array | null | position of eye, include longitude、latitude、altitude |
lookPoint | Array | null | position of look point |
verticalAngle | Number | 90 | vertical angle of viewer |
horizontalAngle | Number | 90 | horizontal angle of viewer |
add viewshed analysis to groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
groupgllayer | maptalks.GroupGLLayer | a groupgllayer to add |
returns :
ViewshedAnalysis: this
remove the viewshed analysis from groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
name | String | name of property | |
value | Any | value of property |
enable the analysis task
returns :
ViewshedAnalysis: return this
disable the analysis task, when disable the analysis task, it will be not available ViewshedAnalysis: return this
whether the analysis task is enable Boolean: true or false
(inherited from maptalks.Eventable)FloodAnalysis's constructor.
| Parameter | Type | Default | Description |
|---|---|---|---|
waterColor | Array | [0.1451, 0.2588, 0.4863] | the color of water |
waterHeight | Array | null | the depth of water |
add flood analysis to groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
groupgllayer | maptalks.GroupGLLayer | a groupgllayer to add |
returns :
FloodAnalysis: this
remove the flood analysis from groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
name | String | name of property | |
value | Any | value of property |
enable the analysis task
returns :
FloodAnalysis: return this
disable the analysis task, when disable the analysis task, it will be not available FloodAnalysis: return this
whether the analysis task is enable Boolean: true or false
(inherited from maptalks.Eventable)SkylineAnalysis's constructor.
| Parameter | Type | Default | Description |
|---|---|---|---|
lineColor | Array | [1, 0, 0] | the color of skyline |
lineWidth | Array | 1.0 | the width of skyline |
add skyline analysis to groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
groupgllayer | maptalks.GroupGLLayer | a groupgllayer to add |
returns :
SkylineAnalysis: this
remove the skyline analysis from groupgllayer
remove the skyline analysis from groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
save | Boolean | true | whether pop a file save dialog to save the export image |
filename | String | export | specify the file name, if options.save is true |
| Parameter | Type | Default | Description |
|---|---|---|---|
name | String | name of property | |
value | Any | value of property |
enable the analysis task
returns :
SkylineAnalysis: return this
disable the analysis task, when disable the analysis task, it will be not available SkylineAnalysis: return this
whether the analysis task is enable Boolean: true or false
(inherited from maptalks.Eventable)InsightAnalysis's constructor.
| Parameter | Type | Default | Description |
|---|---|---|---|
lineColor | Array | [1, 0, 0] | the color of Insight |
lineWidth | Array | 1.0 | the width of Insight |
add insight analysis to groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
groupgllayer | maptalks.GroupGLLayer | a groupgllayer to add |
returns :
InsightAnalysis: this
remove the insight analysis from groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
name | String | name of property | |
value | Any | value of property |
enable the analysis task
returns :
InsightAnalysis: return this
disable the analysis task, when disable the analysis task, it will be not available InsightAnalysis: return this
whether the analysis task is enable Boolean: true or false
(inherited from maptalks.Eventable)CutAnalysis's constructor.
| Parameter | Type | Default | Description |
|---|---|---|---|
position | Array | the position of helper parts | |
rotation | Array | the Euler angle of helper parts | |
scale | Array | the scale of helper parts |
add cut analysis to groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
groupgllayer | maptalks.GroupGLLayer | a groupgllayer to add |
returns :
CutAnalysis: this
remove the cut analysis from groupgllayer
| Parameter | Type | Default | Description |
|---|---|---|---|
name | String | name of property | |
value | Any | value of property |
enable the analysis task
returns :
CutAnalysis: return this
disable the analysis task, when disable the analysis task, it will be not available CutAnalysis: return this
whether the analysis task is enable Boolean: true or false
FAQs
a plugin to excute many analysis tasks
The npm package @maptalks/analysis receives a total of 624 weekly downloads. As such, @maptalks/analysis popularity was classified as not popular.
We found that @maptalks/analysis demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.

Security News
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.

Research
/Security News
Socket tracks the activity as Operation “Muck and Load”: a threat actor uses commit-farming workflows, public dead drops, and protected archives to stage Windows RAT and infostealer malware.