Giter Club home page Giter Club logo

react-bingmaps's Introduction

@pnnl/react-bingmaps

React components for Microsoft Maps v8 map control

NPM JavaScript Style Guide

Install

npm install --save @pnnl/react-bingmaps

Usage

import React from 'react'
import PropTypes from 'prop-types'

import Microsoft from '@pnnl/react-bingmaps'
import '@pnnl/react-bingmaps/dist/index.css'

const Example = ({
  width,
  height,
  location,
}) => {
  return (
    <div style={{ width, height, }}>
      <Microsoft.Maps.Map center={location}>
        <Microsoft.Maps.Layer>
          <Microsoft.Maps.Pushpin location={location} />
        </Microsoft.Maps.Layer>
      </Microsoft.Maps.Map>
    </div>
  )
}

Example.propTypes = {
  width: PropTypes.number.isRequired,
  height: PropTypes.number.isRequired,
  location: PropTypes.shape({
    latitude: PropTypes.number.isRequired,
    longitude: PropTypes.number.isRequired,
  }).isRequired,
}

Example.defaultProps = {
  width: 600,
  height: 400,
  location: {
    latitude: 47.60995,
    longitude: -122.34009
  },
}

const App = () => {
  return (
    <Microsoft.Maps.Api apiKey={process.env.REACT_APP_BING_MAPS_API_KEY}>
      <Example />
    </Microsoft.Maps.Api>
  )
}

Coverage

Map Control API

  • Microsoft
    • Maps
      • getIsBirdseyeAvailable Static Method
      • loadModule Static Method
      • moduleLoaded Static Method
      • registerModule Static Method
      • AnimatedTileLayer Class
      • AnimatedTileLayerOptions Object
      • AnimatedFrameEventArgs Object
      • Color Class
        • clone Static Method
        • fromHex Static Method
      • CustomOverlay Class
      • CustomOverlayOptions Object
      • EntityCollection Class
      • Events Class
        • addHandler Static Method
        • addOne Static Method
        • addThrottledHandler Static Method
        • hasHandler Static Method
        • invoke Static Method
        • removeHandler Static Method
      • GroundOverlay Class
      • GroundOverlayOptions Object
      • Heading Enumeration
      • Infobox Class
      • InfoboxActions Object
      • InfoboxEventArgs Object
      • InfoboxOptions Object
      • IPrimitive Class
      • IPrimitiveChangedEventArgs Object
      • LabelOverlay Enumeration
      • Layer Class
      • LayerCollection Class
      • Location Class
        • areEqual Static Method
        • normalizeLongitude Static Method
        • parseLatLong Static Method
      • LocationRect Class
        • fromCorners Static Method
        • fromEdges Static Method
        • fromLocations Static Method
        • fromShapes Static Method
        • fromString Static Method
      • Map Class
        • getClosestPanorama Static Method
        • getVersion Static Method
      • MapOptions Object
      • MapTypeEventArgs Object
      • MapTypeId Enumeration
      • ModuleOptions Object
      • MouseEventArgs Object
      • NavigationBarMode Enumeration
      • NavigationBarOrientation Enumeration
      • OverviewMapMode Enumeration
      • PanoramaInfo Object
      • PixelReference Enumeration
      • Point Object
      • PointCompression Class
        • decode Static Method
        • encode Static Method
      • Polygon Class
      • PolygonOptions Object
      • Polyline Class
      • PolylineOptions Object
      • Pushpin Class
      • PushpinOptions Object
      • PyramidTileId Class
      • Range Object
      • StreetsideOptions Object
      • StylesOptions Object
      • TestDataGenerator Class
        • getColor Static Method
        • getLocations Static Method
        • getPushpins Static Method
        • getPolylines Static Method
        • getPolygons Static Method
      • TileLayer Class
      • TileLayerOptions Object
      • TileSource Class
      • TileSourceOptions Object
      • ViewOptions Object

Modules

Autosuggest

  • Microsoft
    • Maps
      • Address Object
      • AutosuggestManager Class
      • AutosuggestOptions Object
      • SuggestionResult Object

Clustering

Contour

DataBinning

Directions

DrawingTools

  • Microsoft
    • Maps
      • DrawingTools Class
        • DrawingBarAction Enumeration
        • DrawingManager Class
        • DrawingManagerOptions Object
        • DrawingMode Enumeration
        • DrawingModeChangedData Object
        • ShapeType Enumeration

GeoJson

GeoXml

HeatMap

Search

  • Microsoft
    • Maps
      • Address Object
      • Search
        • GeocodeLocation Object
        • GeocodeRequestOptions Object
        • GeocodeResult Object
        • MatchCode Enumeration
        • MatchConfidence Enumeration
        • PlaceResult Object
        • ReverseGeocodeRequestOptions Object
        • SearchManager Class

SpatialDataService

SpatialMath

  • Microsoft
    • Maps
      • SpatialMath
        • convertArea Static Method
        • convertDistance Static Method
        • getCardinalSpline Static Method
        • getDestination Static Method
        • getDistanceTo Static Method
        • getEarthRadius Static Method
        • getGeodesicPath Static Method
        • getHeading Static Method
        • getLengthOfPath Static Method
        • getLocationAlongPath Static Method
        • getRegularPolygon Static Method
        • interpolate Static Method
        • locationRectToPolygon Static Method
        • toDegMinSec Static Method
        • tryParseDegMinSec Static Method
        • AreaUnits Enumeration
        • BufferEndCap Enumeration
        • DistanceUnits Enumeration
        • Geometry
          • area Static Method
          • bounds Static Method
          • buffer Static Method
          • calculateLength Static Method
          • centroid Static Method
          • concaveHull Static Method
          • contains Static Method
          • convexHull Static Method
          • delaunayTriangles Static Method
          • difference Static Method
          • distance Static Method
          • intersection Static Method
          • intersects Static Method
          • isValid Static Method
          • makeValid Static Method
          • nearestLocations Static Method
          • reduce Static Method
          • rotate Static Method
          • shortestLineTo Static Method
          • snapLocationsToShape Static Method
          • snapShapeToShape Static Method
          • symDifference Static Method
          • union Static Method
          • unionAggregate Static Method
          • voronoiDiagram Static Method
        • Tiles
          • getTilesInBounds Static Method
          • globalPixelToLocation Static Method
          • globalPixelToTile Static Method
          • groundResolution Static Method
          • locationToGlobalPixel Static Method
          • mapSize Static Method
          • tileToGlobalPixel Static Method
          • tileToLocationRect Static Method

Traffic

WellKnownText

  • Microsoft
    • Maps
      • WellKnownText
        • read Static Method
        • write Static Method

VenueMaps

License

Copyright © 2021, Battelle Memorial Institute

See LICENSE in LICENSE.txt

react-bingmaps's People

Contributors

devcentral-pnnl avatar markborkum avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.