@pnnl/react-bingmaps
React components for Microsoft Maps v8 map control
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