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

@wolfmatrix/react-here-maps

v0.0.2

Published

Repository for Here Maps component for React JS

Downloads

8

Readme

React Here Map

Installation

First, install library

  npm install --save @wolfmatrix/react-here-maps
  yarn add @wolfmatrix/react-here-maps

Usage & Configuration

Map

Example

  import { HereMap } from "@wolfmatrix/react-here-maps";
  export default class Map extends Component {
    render() {
      return (
          <HereMap
            initialCenter={{ lat: 27.710769, lng: 85.31014 }}
            appConfig={{
              appId: "",
              appCode: ""
            }}
          />     
      );
    }
  }

Addtional Map Props

zoom : This props sets the zoom level of the map. Every zoom level represents a different scale. The map at zoom level 2 is twice as large as the map at zoom level 1.

initialCenter : This props sets the center of the map.

style : This props takes CSS style object, commonly width and height.

 const style = {
   width: '100%',
   height: '100vh'
 }

liveTrafficEnable : This props displayed traffic information on the map.

setMinZoomOut : This props sets the minimum zoom level at which the given layer provides content.

appConfig : This props contains appId and appCode as a object.

Configuration

| Property | Default | Option | Example | | ------------- |-----------|---------|---------| | zoom | - | integer | zoom={10}| | initialCenter | -| object|initialCenter={{ lat: 27.710769, lng: 85.31014 }}| | style | - | object |style={{ width: "100%",height: "100vh"}}| | liveTrafficEnable| false| boolean| liveTrafficeEnable={true}| | setMinZoomOut | - | integer|setMinZoomOut={10}| | appConfig | - | object|appConfig={{appId="", appCode=""}}|

Circle

Example

  import { HereMap, Circle } from "@wolfmatrix/react-here-maps";

  const circleProps = [
    {
      lat: 27.710769,
      lng: 85.31014,
      radius: 200,
      style: {
        strokeColor: "rgba(55, 85, 170, 0.2)",
        lineWidth: 1,
        fillColor: "rgba(255, 0, 0, 0.3)"
      }
    },
    {
      lat: 27.7,
      lng: 85.312,
      radius: 300,
      style: {
        strokeColor: "rgba(55, 85, 170, 0.2)",
        lineWidth: 1,
        fillColor: "rgba(35, 19, 250, 0.3)"
      }
    },
    {
      lat: 27.717,
      lng: 85.312,
      radius: 300,
      style: {
        strokeColor: "rgba(55, 85, 170, 0.2)",
        lineWidth: 1,
        fillColor: "rgba(26, 243, 40, 0.3)"
      }
    }
  ];
  export default class Circle extends Component {
    render() {
      return (
        <HereMap 
          zoom={14} 
          initialCenter={{ lat: 27.710769, lng: 85.31014 }}
          appConfig={{
            appId: "",
            appCode: ""
          }}
          >
          <Circle circleProps={circleProps} />
        </HereMap>
      );
    }
  }

Additional Circle Props

circleProps : This props sets geopraphical center,radius of circle & style of circle.

bounds : This props adjust the center and zoom of the map.

Configuration

| Property | Default | Option | | ------------- |-----------|---------| | circleProps | - | Array | | bounds | false| object|

Marker

Example

  import { HereMap, Marker } from "@wolfmatrix/react-here-maps";
  const markerProps = [
    {
      lat: 27.710769,
      lng: 85.31014,
      title: "Kathmandu"
      img: "https://lh4.ggpht.com/Tr5sntMif9qOPrKV_UVl7K8A_V3xQDgA7Sw_qweLUFlg76d_vGFA7q1xIKZ6IcmeGqg=w40"
    },
    {
      lat: 22.710769,
      lng: 85.31014    
    }
  ];
  const style = {
    fontSize: "10px"
  };
  export default class Marker extends Component {
    render() {
      return (
          <HereMap
            zoom={10}
            initialCenter={{ lat: 27.710769, lng: 85.31014 }}
            appConfig={{
              appId: "",
              appCode: ""
            }}
          >
            <Marker infoBubbleStyle={style} markerProps={markerProps} bounds />
          </HereMap>
      );
    }
  }

Addtional Marker Props

markerProps : This props sets geopraphical center,bubble info,image in marker.

bounds : This props adjust the center and zoom of the map.

Configuration

| Property | Default | Option | | ------------- |-----------|---------| | markerProps | - | Array | | bounds | false| object|

Marker with Cirlce

Example

  import { HereMap, Marker,Circle } from "@wolfmatrix/react-here-maps";

  const markerProps = [
    {
      lat: 27.710769,
      lng: 85.31014,
      img:
        "https://lh4.ggpht.com/Tr5sntMif9qOPrKV_UVl7K8A_V3xQDgA7Sw_qweLUFlg76d_vGFA7q1xIKZ6IcmeGqg=w50"
    },
    {
      lat: 27.58287,
      lng: 85.50972,
    }
  ];
  const circleProps = [
    {
      lat: 27.710769,
      lng: 85.31014,
      radius: 9000,
      style: {
        strokeColor: "rgba(55, 85, 170, 0.2)",
        lineWidth: 1,
        fillColor: "rgba(255, 0, 0, 0.3)"
      }
    },
    {
      lat: 27.58287,
      lng: 85.50972,
      radius: 4000,
      style: {
        strokeColor: "rgba(55, 85, 170, 0.2)",
        lineWidth: 1,
        fillColor: "rgba(35, 19, 250, 0.3)"
      }
    }
  ];
  export default class MarkerWithCircle extends Component {
    render() {
      return (
        <HereMap
          zoom={10}
          style={style}
          initialCenter={{ lat: 27.710769, lng: 85.31014 }}
          appConfig={{
            appId: "",
            appCode: ""
          }}
        >
          <Circle circleProps={circleProps}/>
          <Marker markerProps={markerProps} />
      </HereMap>
      );
    }
  }