質問編集履歴

1

地図描画コード追記

2020/09/07 22:45

投稿

DaisukeMori
DaisukeMori

スコア226

test CHANGED
File without changes
test CHANGED
@@ -66,7 +66,39 @@
66
66
 
67
67
  return(<>
68
68
 
69
+ <ReactMapGL
70
+
71
+ {...viewport}
72
+
73
+ onViewportChange={nextViewport => setViewport(nextViewport)}
74
+
75
+ mapboxApiAccessToken={MAPBOX_ACCESS_TOKEN}
76
+
77
+ mapStyle="mapbox://styles/mapbox/light-v9"
78
+
79
+ >
80
+
81
+ <Marker latitude={ 35.650184 } longitude={ 139.701269 }>
82
+
83
+ <a
84
+
85
+ href={`http://maps.google.com/maps?q=35.650184,139.701269`}
86
+
87
+ rel="noopener noreferrer"
88
+
89
+ target="_blank"
90
+
91
+ >
92
+
93
+ <img src={LocateIcon} alt="locate" />
94
+
95
+ </a>
96
+
97
+ </Marker>
98
+
99
+ </ReactMapGL>
100
+
69
- {/* jsx省略 */}
101
+ {/* 省略 */}
70
102
 
71
103
  </>);
72
104