React Here Maps

React Here Maps

  • Docs
  • API
  • Help
  • GitHub

›API Reference

Introduction

  • Installation

API Reference

  • <HEREMap />
  • <Marker />
  • <RouteLine />
  • <Circle />
  • usePlatform()

<RouteLine />

<RouteLine /> is the component used for displaying a Polyline representing a route between two or more points on the map given a shape of latitudes and longitudes.

Usage

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

export function Map() {
  const [shape, setShape] = React.useState([]);

  React.useEffect(() => {
    ...
    setShape([...]);
  });

  return (
    <HEREMap
      appId="my_app_id"
      appCode="my_app_code"
      center={{ lat: 10.998666, lng: -63.79841 }}
      zoom={12}
    >
      <Marker lat={10.998666} lng={-63.79841} />
      <Marker lat={10.998666} lng={-63.79841} />
      <RouteLine shape={shape} strokeColor="#48dad0" lineWidth={4} />
     </HEREMap>
  );
}

Props

Available

  • strokeColor?: string;
  • lineWidth?: number;
  • shape: string[];

To be implemented

  • style?: (H.map.SpatialStyle | H.map.SpatialStyle.Options);
  • arrows?: (H.map.ArrowStyle | H.map.ArrowStyle.Options);
  • visibility?: boolean;
  • zIndex?: number;
  • min?: number;
  • max?: number;
  • provider?: H.map.provider.Provider;
  • data?: any;

Reference

You can find more info about this types here.

Last updated on 8/15/2019 by Gustavo Ordaz
← <Marker /><Circle /> →
  • Usage
    • Props
    • Reference
React Here Maps
Docs
Getting Started
Community
Twitter
More
GitHubStar
Copyright © 2021 ordazgustavo