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

ang-google-map

v1.0.0

Published

[![npm version](https://img.shields.io/npm/v/ang-google-map.svg)](https://www.npmjs.com/package/ang-google-map)

Downloads

22

Readme

Angular 2/4/6/8 Google Map

npm version

Angular 2+ Google Map Component.

Getting Started

Installation

  • Google map package is published on the npm Registry.
  • Install the package : npm install ang-google-map --save

-Generate google map api key from google developer site Link

-Once installed Add

  <script src="http://maps.googleapis.com/maps/api/js?key=<API_KEY>"> </script> 

to your index.html file head tag

  • import AngularGoogleMapModule from the installed package into your module as follows:

Usage

Import AngularGoogleMapModule into NgModule in app.module.ts. CommonModule is also required.

import { AngularGoogleMapModule } from 'ang-google-map';
import { CommonModule } from '@angular/common';

@NgModule({
  // ...
  imports: [
    AngularGoogleMapModule,
    CommonModule
  ]
  // ...
})

Add the following component tag in you template (no properties)

<ang-google-map [mapSettings]='settings' [width]="'100%'" [height]="'400px'" [padding]="'0'" [margin] ="'0'"></ang-google-map>

Full properties

  settings = {
    zoomValue: 15,
    isGeolocation: false,
    customStyles: [],
    latitude: 40.7128,
    longitude: 74.0060,
    enableGestureHandling: 'none',
    disableDefaultUI: true,
    isSatelliteView: false,
    isZoomControl: true,
    isStreetViewControl: false,
    showPixelAndCoordinates: true,
    address : {
      filed1: 'Bruce wayne',
      filed2: 'Wayne manor',
      filed3: '1007 Mountain Drive',
      filed4: 'Gotham',
      filed5: 'United States',
    },
    isDarkTheme: true,
    enableMarker: [{
      isEnable: true,
      isDragable: true,
      animation: true,
      clickToggle: true,
      lat: 0,
      lng: 0
    },{
      isEnable: true,
      isDragable: true,
      animation: true,
      clickToggle: true,
      lat: 0,
      lng: 0
    }]
  }

Properties

The following list of properties are supported by the component.

| Property |Type | Description | Default Value | options | |:--- |:--- |:--- |:--- |:---| | width | String | Width of the map | '100%' | none | | height | String | Height of the map | '400px | none | | padding | String | Padding of the to map | '0' | none | | margin | String | margin of the to map | '0' | none | | zoomValue | Number | Map's initial zoom value | 15 | none | | isGeolocation | Boolean | Take user's location | false | none | | customStyles | Array | Add custom styles to map | [] | style options | | latitude | Number | Latitude of the location | 40.7128 | none | | longitude | Number | Longitude of the location | 74.0060 | none | | enableGestureHandling | String | control zoom, page scrolling | none | cooperative, greedy, details | | disableDefaultUI | Boolean | Enables/disables all default UI. May be overridden individually | true | none | | isSatelliteView | Boolean | Enable Satellite View of the map | false | none | | isZoomControl | Boolean | Enable UI for map zooming option (+ & -) | true | none | | isStreetViewControl | Boolean | The initial enabled/disabled state of the Street View Pegman control | false | none | | showPixelAndCoordinates | Boolean | World coordinates, which reference a point on the map uniquely. | true | none | address | Object | Show informations | { filed1: 'Bruce wayne', filed2: 'Wayne manor', filed3: '1007 Mountain Drive', filed4: 'Gotham',filed5: 'United States'} | none | | isDarkTheme | Boolean | Enable dark theme | true | none | | enableMarker | Array | Mark places to map | [{ isEnable: true, isDragable: true, animation: true, clickToggle: true, lat: 0, lng: 0 }] | none |

Run locally

  • Clone the repository or downlod the .zip,.tar files.
  • Run npm install
  • Run ng serve for a dev server
  • Navigate to http://localhost:4200/

License

MIT License.