React components for Microsoft Maps v8 map control
npm install --save @pnnl/react-bingmapsimport 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>
)
}MicrosoftMaps-
getIsBirdseyeAvailableStatic Method -
loadModuleStatic Method -
moduleLoadedStatic Method -
registerModuleStatic Method -
AnimatedTileLayerClass -
AnimatedTileLayerOptionsObject -
AnimatedFrameEventArgsObject -
ColorClass-
cloneStatic Method -
fromHexStatic Method
-
-
CustomOverlayClass -
CustomOverlayOptionsObject -
EntityCollectionClass -
EventsClass-
addHandlerStatic Method -
addOneStatic Method -
addThrottledHandlerStatic Method -
hasHandlerStatic Method -
invokeStatic Method -
removeHandlerStatic Method
-
-
GroundOverlayClass -
GroundOverlayOptionsObject -
HeadingEnumeration -
InfoboxClass -
InfoboxActionsObject -
InfoboxEventArgsObject -
InfoboxOptionsObject -
IPrimitiveClass -
IPrimitiveChangedEventArgsObject -
LabelOverlayEnumeration -
LayerClass -
LayerCollectionClass -
LocationClass-
areEqualStatic Method -
normalizeLongitudeStatic Method -
parseLatLongStatic Method
-
-
LocationRectClass-
fromCornersStatic Method -
fromEdgesStatic Method -
fromLocationsStatic Method -
fromShapesStatic Method -
fromStringStatic Method
-
-
MapClass-
getClosestPanoramaStatic Method -
getVersionStatic Method
-
-
MapOptionsObject -
MapTypeEventArgsObject -
MapTypeIdEnumeration -
ModuleOptionsObject -
MouseEventArgsObject -
NavigationBarModeEnumeration -
NavigationBarOrientationEnumeration -
OverviewMapModeEnumeration -
PanoramaInfoObject -
PixelReferenceEnumeration -
PointObject -
PointCompressionClass-
decodeStatic Method -
encodeStatic Method
-
-
PolygonClass -
PolygonOptionsObject -
PolylineClass -
PolylineOptionsObject -
PushpinClass -
PushpinOptionsObject -
PyramidTileIdClass -
RangeObject -
StreetsideOptionsObject -
StylesOptionsObject -
TestDataGeneratorClass-
getColorStatic Method -
getLocationsStatic Method -
getPushpinsStatic Method -
getPolylinesStatic Method -
getPolygonsStatic Method
-
-
TileLayerClass -
TileLayerOptionsObject -
TileSourceClass -
TileSourceOptionsObject -
ViewOptionsObject
-
MicrosoftMaps-
AddressObject -
AutosuggestManagerClass -
AutosuggestOptionsObject -
SuggestionResultObject
-
MicrosoftMaps-
DrawingToolsClass-
DrawingBarActionEnumeration -
DrawingManagerClass -
DrawingManagerOptionsObject -
DrawingModeEnumeration -
DrawingModeChangedDataObject -
ShapeTypeEnumeration
-
-
MicrosoftMaps-
AddressObject Search-
GeocodeLocationObject -
GeocodeRequestOptionsObject -
GeocodeResultObject -
MatchCodeEnumeration -
MatchConfidenceEnumeration -
PlaceResultObject -
ReverseGeocodeRequestOptionsObject -
SearchManagerClass
-
-
MicrosoftMapsSpatialMath-
convertAreaStatic Method -
convertDistanceStatic Method -
getCardinalSplineStatic Method -
getDestinationStatic Method -
getDistanceToStatic Method -
getEarthRadiusStatic Method -
getGeodesicPathStatic Method -
getHeadingStatic Method -
getLengthOfPathStatic Method -
getLocationAlongPathStatic Method -
getRegularPolygonStatic Method -
interpolateStatic Method -
locationRectToPolygonStatic Method -
toDegMinSecStatic Method -
tryParseDegMinSecStatic Method -
AreaUnitsEnumeration -
BufferEndCapEnumeration -
DistanceUnitsEnumeration Geometry-
areaStatic Method -
boundsStatic Method -
bufferStatic Method -
calculateLengthStatic Method -
centroidStatic Method -
concaveHullStatic Method -
containsStatic Method -
convexHullStatic Method -
delaunayTrianglesStatic Method -
differenceStatic Method -
distanceStatic Method -
intersectionStatic Method -
intersectsStatic Method -
isValidStatic Method -
makeValidStatic Method -
nearestLocationsStatic Method -
reduceStatic Method -
rotateStatic Method -
shortestLineToStatic Method -
snapLocationsToShapeStatic Method -
snapShapeToShapeStatic Method -
symDifferenceStatic Method -
unionStatic Method -
unionAggregateStatic Method -
voronoiDiagramStatic Method
-
Tiles-
getTilesInBoundsStatic Method -
globalPixelToLocationStatic Method -
globalPixelToTileStatic Method -
groundResolutionStatic Method -
locationToGlobalPixelStatic Method -
mapSizeStatic Method -
tileToGlobalPixelStatic Method -
tileToLocationRectStatic Method
-
-
MicrosoftMapsWellKnownText-
readStatic Method -
writeStatic Method
-
Copyright © 2021, Battelle Memorial Institute
See LICENSE in LICENSE.txt