|
@@ -24,32 +24,32 @@ export default class Mapbox extends React.Component{
|
|
|
render() {
|
|
|
const position = [this.state.longitude, this.state.latitude]
|
|
|
return (
|
|
|
- <Map
|
|
|
- style="mapbox://styles/mapbox/streets-v9"
|
|
|
- containerStyle={{
|
|
|
- height: mapHeight,
|
|
|
- width: mapWidth
|
|
|
- }}
|
|
|
- center={position}
|
|
|
- zoom={this.state.zoom}
|
|
|
- >
|
|
|
- <Layer type="symbol" id="marker" layout={{ 'icon-image': 'marker-15' }}>
|
|
|
- <Feature coordinates={position} />
|
|
|
- </Layer>
|
|
|
-
|
|
|
- <Marker
|
|
|
- coordinates={position}
|
|
|
- anchor="bottom"
|
|
|
- >
|
|
|
- <svg height={20} viewBox="0 0 24 24" style={{fill: "#343a40", stroke: "none"}}>
|
|
|
- <path d={markerIcon} />
|
|
|
- </svg>
|
|
|
- </Marker>
|
|
|
-
|
|
|
- <ZoomControl position={"bottom-right"}/>
|
|
|
- <ScaleControl position={"bottom-right"}/>
|
|
|
- <RotationControl position={"bottom-right"}/>
|
|
|
- </Map>
|
|
|
+ <Map
|
|
|
+ style="mapbox://styles/mapbox/streets-v9"
|
|
|
+ containerStyle={{
|
|
|
+ height: mapHeight,
|
|
|
+ width: mapWidth
|
|
|
+ }}
|
|
|
+ center={position}
|
|
|
+ zoom={this.state.zoom}
|
|
|
+ >
|
|
|
+ <Layer type="symbol" id="marker" layout={{ 'icon-image': 'marker-15' }}>
|
|
|
+ <Feature coordinates={position} />
|
|
|
+ </Layer>
|
|
|
+
|
|
|
+ <Marker
|
|
|
+ coordinates={position}
|
|
|
+ anchor="bottom"
|
|
|
+ >
|
|
|
+ <svg height={20} viewBox="0 0 24 24" style={{fill: "#343a40", stroke: "none"}}>
|
|
|
+ <path d={markerIcon} />
|
|
|
+ </svg>
|
|
|
+ </Marker>
|
|
|
+
|
|
|
+ <ZoomControl position={"bottom-right"}/>
|
|
|
+ <ScaleControl position={"bottom-right"}/>
|
|
|
+ <RotationControl position={"bottom-right"}/>
|
|
|
+ </Map>
|
|
|
);
|
|
|
}
|
|
|
}
|