Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@nbai/nbmap-gl
Advanced tools
NBMap GL is a web map SDK for JavaScript that enables interactive maps with NextBillion's vector tiles and API services in your web apps.
Readme
NBMap GL is a web map SDK for JavaScript that enables interactive maps with NextBillion's vector tiles service in your web apps, basing on Maplibre.
Before start, please install Node.js
and yarn
to install dependencies.
yarn
You can start developing with this command:
yarn dev
You can build a minified version of the SDK with this command:
yarn build
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>NBMap GL Basic Example</title>
<style>
* {
margin: 0;
padding: 0;
}
#map {
width: 100vw;
height: 100vh;
}
</style>
<link rel="stylesheet" type="text/css" href="https://maps-gl.nextbillion.io/maps/v2/api/css"></link>
<script src="https://maps-gl.nextbillion.io/maps/v2/api/js"></script>
</head>
<body>
<div id="map"></div>
<script>
nextbillion.setApiKey('Your API key')
var nbmap = new nextbillion.maps.Map({
container: document.getElementById('map'),
style: 'https://api.nextbillion.io/maps/streets/style.json',
zoom: 11,
center: { lat: 34.08572, lng: -118.324569 },
})
nbmap.on('load', function () {
const marker = new nextbillion.maps.Marker().setLngLat({ lat: 34.08572, lng: -118.324569 }).addTo(nbmap.map)
})
</script>
</body>
</html>
import '@nbai/nbmap-gl/dist/nextbillion.css';
import nextbillion, { Map, Marker } from '@nbai/nbmap-gl';
nextbillion.setApiKey('Your API key');
const nbmap = new Map({
container: 'map',
style: 'https://api.nextbillion.io/maps/streets/style.json',
zoom: 11,
center: { lat: 34.08572, lng: -118.324569 },
});
nbmap.on('load', () => {
const marker: Marker = new Marker()
.setLngLat({ lat: 34.08572, lng: -118.324569 })
.addTo(nbmap.map);
})
FAQs
NBMap GL is a web map SDK for JavaScript that enables interactive maps with NextBillion's vector tiles and API services in your web apps.
The npm package @nbai/nbmap-gl receives a total of 188 weekly downloads. As such, @nbai/nbmap-gl popularity was classified as not popular.
We found that @nbai/nbmap-gl 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.