npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng2-leaf

v1.3.4

Published

an angular.io (2) component collection for leaflet

Downloads

11

Readme

Angular2.leaflet.component

my own attemp on creating an Angular 2 leaflet v1.x component

Live examples

  • base example https://elasticrash.github.io/Angular.io.MapViewer/example/
  • multi-map example https://elasticrash.github.io/Angular.io.MapViewer/example/#/mm-map
  • star map using L.CRS.Simple https://elasticrash.github.io/Angular.io.MapViewer/example/#/simple
  • custom CRS using leaflet https://elasticrash.github.io/Angular.io.MapViewer/example/#/prj
  • a simple genetic algorithm trying to solve the Travelling salesman problem https://elasticrash.github.io/Angular.io.MapViewer/example/#/random

all examples sources code can be found here

Bare in mind that I just started developing this and I don't have much time to plan things ahead mainly due to not enough free time, so I am making changes as I go

Install

npm install angular2.leaflet.components

in SystemJs use the following configuration

    transpiler: 'typescript',
    map: {
        'angular2.leaflet.components': 'npm:angular2.leaflet.components',
    },
    packages: {
              'angular2.leaflet.components': {
        main: './index',
        defaultExtension: 'js',
        meta: {
          "format": "register"
        }
      }
    },
    "ts": {
        "main": "plugin.js"
      },
      "typescript": {
        "main": "typescript.js",
        "meta": {
          "lib/typescript.js": {
            "exports": "ts"
          }
        }
      }

I haven't tested it with other transpilers save for typescript, thats why I am including it on the SystemJs config

then on you app module include this

import { CandTLeafletComponent  } from 'angular2.leaflet.components';
import { CandTLeafletService } from 'angular2.leaflet.components';
import { AppComponent } from './components/app.component';

@NgModule({
  imports: [... ],
  declarations: [..., CandTLeafletComponent],
  providers: [CandTLeafletService],
  bootstrap: [AppComponent]
})

Leaflet stylesheet is not included, so you need to add it yourself

for usage check the wiki

https://github.com/elasticrash/Angular2.leaflet.component/wiki

If anyone wants to help in any way feel free to do a fork and a pull request