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

here-maps-react-hardforked

v0.1.4

Published

React components library for HERE Maps

Downloads

2

Readme

here-maps-react NPM

React components library for HERE Maps

Easily integrate HERE Maps into your app with a set of React components.

Full TypeScript support!

Tree shakeable!

Install

npm install --save here-maps-react

Usage

Map

import React from 'react'
import HEREMap from 'here-maps-react'

class Map extends React.Component {
  render() {
    return (
      <HEREMap
        appId="my_app_id"
        appCode="my_app_code"
        center={{ lat: -12.0464, lng: -77.0428 }}
        zoom={12}
      />
    )
  }
}

Props

| Property | Type | Optional | Description | | ------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | appId | string | false | The App Id you got after registering to HERE | | appCode | string | false | The App Code you got after registering to HERE | | center | object | true | Initial map coordinates { lat, lng } | | zoom | number | true | Initial zoom level | | animateCenter | boolean | true | Animate center prop change | | animateZoom | boolean | true | Animate zoom level change | | hidpi | boolean | true | Whether to use high quality map tiles or not | | interactive | boolean | true | Whether to use static or interactive maps | | secure | boolean | true | If true, here-maps-react will load the HTTPS HERE api | | setLayer | object | true | An object that can be used to set the map style { layer, mapType }. You can find available configurations HERE |

Marker

import React from 'react'
import HEREMap, { Marker } from 'here-maps-react'

class Map extends React.Component {
  render() {
    return (
      <HEREMap
        appId="my_app_id"
        appCode="my_app_code"
        center={{ lat: -12.0464, lng: -77.0428 }}
        zoom={12}
      >
        <Marker
          lat={-12.1199408}
          lng={-77.037241}
          draggable
          onDragEnd={e => {...}}
        />
      </HEREMap>
    )
  }
}

Props

| Property | Type | Optional | Description | | ----------- | --------------- | -------- | ---------------------------------------------- | | bitmap | string | true | An image to be used as a marker | | lat | number | false | The latitude to place the marker | | lng | number | false | The longitude to place the marker | | children | JSX.Element | true | You can use markup to put elements on the map | | draggable | boolean | true | Flag to enable drag events on the marker | | onDragStart | (event) => void | true | Function to listen to HERE's dragstart event | | onDrag | (event) => void | true | Function to listen to HERE's drag event | | onDragEnd | (event) => void | true | Function to listen to HERE's dragend event |

RouteLine

import React from 'react'
import HEREMap, { Marker, RouteLine } from 'here-maps-react'

class Map extends React.Component {
  render() {
    return (
      <HEREMap
        appId="my_app_id"
        appCode="my_app_code"
        center={{ lat: -12.0464, lng: -77.0428 }}
        zoom={12}
      >
        <Marker lat={-12.1199408} lng={-77.037241} />
        <Marker lat={-12.1261171} lng={-77.02060549999999} />
        <RouteLine
          shape={this.state.shape}
          strokeColor="#48dad0"
          lineWidth={4}
        />
      </HEREMap>
    )
  }
}

Props

| Property | Type | Optional | Description | | ----------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | shape | string[] | false | An array of latitudes and longitudes obtained using the HERE Routing API | | strokeColor | number | true | An optional (HEX, RGB, HSL...) color | | lineWidth | number | true | A number representing the width of the route line |

This library is based on the original react-here-maps, updated to conform to React StrictMode, as well as, adding new components.

License

MIT © ordazgustavo