0.8.2 • Published 5 years ago

ngx-map-renderer v0.8.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

npm.io npm.io

Map Renderer for Angular

This library provides Angular components for rendering geographical data. It relies on the GeoJSON format and D3 for rendering the data.

Installing

Using npm, you can install the library with:

npm install --save ngx-map-renderer

Using yarn, you can install the library with:

yarn add ngx-map-renderer

Usage

1. Import the MapRendererModule

import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {MapRendererModule} from 'ngx-map-renderer';

@NgModule({
    imports: [
        BrowserModule,
        MapRendererModule.forRoot()
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

2. Use the MapRendererComponent

<ngx-map-renderer [mapData]="mapData" [locations]="locations"></ngx-map-renderer>

API

MapRendererComponent ()

mapData

The mapData attribute expects a JavaScript object, which contains GeoJSON-encoded data. This is rendered within the component. GeoJSON data can be found all around the web, for example here.

locations

The locations attribute expects an array of LocationWithLabel objects. This are rendered as circles with corresponding labels on the map. In order to render locations, mapData must be provided.

Location

TODO

LocationWithLabel

TODO

0.8.2

5 years ago

0.8.0

5 years ago

0.7.4

5 years ago

0.7.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.0.3

5 years ago

0.0.2-x

5 years ago

0.0.1

5 years ago