0.1.84 • Published 6 years ago

milsymbol-library v0.1.84

Weekly downloads
33
License
MIT
Repository
github
Last release
6 years ago

milsymbol-library

Installation

To install this library, run:

$ npm install milsymbol --save
$ npm install leaflet --save
$ npm install milsymbol-library --save

Consuming your library

Once you have download the two libraries, you need to add milsymbol in .angular-cli.json:

...
"styles": [
  "../node_modules/leaflet/dist/leaflet.css",
],
"scripts": [
    "../node_modules/milsymbol/dist/milsymbol.js",
    "../node_modules/leaflet/dist/leaflet.js"
],
...

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { MilsymbolModule } from 'milsymbol-library';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    MilsymbolModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its two components :

For Milsymbol component :

<!-- You can now use your library component in app.component.html -->
<h1>
  {{title}}
</h1>
<milsymbol sidc="SFG-UCI----D" size="40" uniqueDesignation="Hello World"></milsymbol>

For MapMilsymbolComponent :

In your component (typescript):

import { MilitarySymbol } from 'milsymbol-library';
...
private symbols: MilitarySymbol[] = new Array();
...

let symbol1 : MilitarySymbol = new MilitarySymbol('SFGPUCI----GFR-', 47.47801, 3.09211, '1RGTINF');
this.symbols.push(symbol1);

And in your template (HTML):

<map-milsymbol [symbols]="symbols"></map-milsymbol>

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT © Mileem

0.1.84

6 years ago

0.1.83

6 years ago

0.1.82

6 years ago

0.1.81

6 years ago

0.1.80

6 years ago

0.1.79

6 years ago

0.1.78

6 years ago

0.1.77

6 years ago

0.1.76

6 years ago

0.1.75

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago