
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@skymapglobal/map-3d
Advanced tools
Cesium wrapper for modularity.
yarn add @skymapglobal/map-3d
const webpack = require("webpack");
module.exports = {
assetsDir: "static",
configureWebpack: {
output: {
// Needed to compile multiline strings in Cesium
sourcePrefix: ""
},
amd: {
// Enable webpack-friendly use of require in Cesium
toUrlUndefined: true
},
node: {
// Resolve node module use of fs
fs: "empty"
},
module: {
unknownContextCritical: false
// Uncomment for release
// rules: [
// {
// // Remove pragmas
// test: /\.js$/,
// enforce: "pre",
// include: path.resolve(__dirname, "node_modules/cesium/Source"),
// sideEffects: false,
// use: [
// {
// loader: "strip-pragma-loader",
// options: {
// pragmas: {
// debug: false
// }
// }
// }
// ]
// }
// ]
},
plugins: [
new webpack.DefinePlugin({
// Define relative base path in cesium for loading assets
CESIUM_BASE_URL: JSON.stringify("./static/libs/cesium/")
})
]
}
};
# Copy Cesium Assets
Copy-Item .\node_modules\cesium\Source\Assets .\public\static\libs\cesium\Assets -Recurse -Force
Copy-Item .\node_modules\cesium\Source\Widgets .\public\static\libs\cesium\Widgets -Recurse -Force
Copy-Item .\node_modules\cesium\Source\ThirdParty\Workers .\public\static\libs\cesium\ThirdParty\Workers -Recurse -Force
Copy-Item .\node_modules\cesium\Build\Cesium\Workers .\public\static\libs\cesium\Workers -Recurse -Force
Or
mkdir public/static/libs
mkdir public/static/libs/cesium
mkdir public/static/libs/cesium/ThirdParty
cp -R ./node_modules/cesium/Source/Assets public/static/libs/cesium/Assets
cp -R ./node_modules/cesium/Source/Widgets public/static/libs/cesium/Widgets
cp -R ./node_modules/cesium/Source/ThirdParty/Workers public/static/libs/cesium/ThirdParty/Widgets
cp -R ./node_modules/cesium/Build/Cesium/Workers public/static/libs/cesium/Workers
Create .gitignore in public/static/libs
Edit .gitignore
cesium
<template>
<div id="app">
<Map>
<BaseMapControl position="top-right" />
</Map>
</div>
</template>
<script>
import { Map, BaseMapControl } from "@skymapglobal/map-3d";
export default {
name: "App",
components: {
Map,
BaseMapControl,
},
};
</script>
<style>
html,
body,
#app {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>
<template>
<div id="app">
<Map>
<ZoomControl />
<HomeControl />
<BaseMapControl />
<FullScreenControl position="bottom-right" />
<MouseCoordinatesControl position="bottom-right" />
</Map>
</div>
</template>
<script>
import { Map, BaseMapControl, FullScreenControl, ZoomControl, HomeControl, MouseCoordinatesControl } from "@skymapglobal/map-3d";
export default {
name: "App",
components: {
Map,
BaseMapControl,
FullScreenControl,
HomeControl,
ZoomControl,
MouseCoordinatesControl
}
};
</script>
<style>
html,
body,
#app {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
</style>
<template>
<ModuleContainer>
<!-- Children modules -->
<slot />
</ModuleContainer>
</template>
<script>
import { ModuleMixin } from "@skymapglobal/map-3d";
export default {
mixins: [ModuleMixin],
methods: {
// Init
onInit() {
// Use this.map to access Cesium.Viewer instance
// Use this.onMapEvent(event, callback) or this.onMapEvent(event, entityIdOrEntity, callback) for listening on event
// Current event support: 'zoomend', 'click', 'dblclick'
// Use this.onceMapEvent(event, callback), this.onceMapEvent(event, entityIdOrEntity, callback) for listening once
// Use this.offMapEvent(event, callback) for removing event listener
},
// Destroy
onDestroy() {
}
}
};
</script>
<template>
<ModuleContainer>
<DraggablePopup
v-bind="$attrs"
:top="top"
:right="right"
:title="title"
:width="width"
:height="height"
:visible.sync="popup.visible"
>
My Module
</DraggablePopup>
<!-- Children modules -->
<slot />
</ModuleContainer>
</template>
<script>
import { ModuleMixin, ButtonGroupControl, DraggablePopup } from "@skymapglobal/map-3d";
export default {
mixins: [ModuleMixin],
components: {
DraggablePopup
},
props: {
top: {
type: Number,
default: 10
},
right: {
type: Number,
default: 50
},
height: {
type: String,
default: "10vh"
},
width: {
type: String,
default: "30vw"
},
title: {
type: String,
default: "My Module"
},
controlIcon: {
type: String,
default: "mdi mdi-information"
}
},
data() {
return {
popup: {
visible: false
}
};
},
methods: {
// Init
onInit() {
// Use this.map to access Cesium.Viewer instance
this.addControl(
ButtonGroupControl.create([
{
title: this.title,
icon: this.controlIcon,
onClick: () => {
this.popup.visible = !this.popup.visible;
}
}
])
);
},
// Destroy
onDestroy() {
}
}
};
</script>
<style scoped>
</style>
loaded: Boolean - whether map is loaded
map: mapboxgl.Map - Mapbox GL instance
control: mapboxgl.Control - Mapbox GL control instance
bus: EventBus - internal event bus
addControl(control) - add control to map
removeControl() - remove added control
getControl() - get added control
onMapEvent(event: string, callback: ({ lngLat: { lng: number, lat: number } }) => void)
onMapEvent(event: string, target: String|Object, callback: ({ lngLat: { lng: number, lat: number } }) => void) - target is entity id or entity
onMapEvent(event: string, callback: ({ lngLat: { lng: number, lat: number } }) => void)
onMapEvent(event: string, target: String|Object, callback: ({ lngLat: { lng: number, lat: number } }) => void) - target is entity id or entity
offMapevent(event: string, callback?)
onInit() - fired when map is ready to use
onDestroy() - fired when module has been destroyed
FAQs
Cesium wrapper for modularity.
We found that @skymapglobal/map-3d demonstrated a not healthy version release cadence and project activity because the last version was released 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.