Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@maplibre/ngx-maplibre-gl
Advanced tools
Changelog
17.4.3 (2024-04-09)
Readme
Angular wrapper for maplibre-gl. It exposes a bunch of components meant to be simple to use with Angular.
Can be found here (based on the generated gh-pages in this repo): https://maplibre.org/ngx-maplibre-gl/
This is a fork of ngx-mapbox-gl and I would like to thank the maintainers there for thier amazing work to build this up. It's truely a great piece of sotware!
npm install @maplibre/ngx-maplibre-gl maplibre-gl
yarn add @maplibre/ngx-maplibre-gl maplibre-gl
There might be a need to add the following configuration to tsconfig.json
file
"compilerOptions": {
...
"strictNullChecks": false,
"skipLibCheck": true,
}
Load the CSS of maplibre-gl
For example, with angular-cli add this in angular.json
:
"styles": [
...,
"./node_modules/maplibre-gl/dist/maplibre-gl.css"
],
Or in the global CSS file (called styles.css
for example in angular-cli):
@import '~maplibre-gl/dist/maplibre-gl.css';
Add this in your polyfill.ts file (https://github.com/Wykks/ngx-mapbox-gl/issues/136#issuecomment-496224634):
(window as any).global = window;
Then, in your app's main module (or in any other module), import the MapComponent
:
import { Component } from '@angular/core';
import { MapComponent } from '@maplibre/ngx-maplibre-gl';
@NgModule({
template: `
<mgl-map
[style]="'https://demotiles.maplibre.org/style.json'"
[zoom]="[9]"
[center]="[-74.5, 40]"
>
</mgl-map>
`,
styles: [
`
mgl-map {
height: 100%;
width: 100%;
}
`,
],
standalone: true,
imports: [MapComponent],
})
export class AppComponent {}
FAQs
A Angular binding of maplibre-gl
The npm package @maplibre/ngx-maplibre-gl receives a total of 1,630 weekly downloads. As such, @maplibre/ngx-maplibre-gl popularity was classified as popular.
We found that @maplibre/ngx-maplibre-gl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
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.