File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/visualization/types/Map Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,14 @@ const GeoPlot: FC<Props> = ({result, properties}) => {
5151 } )
5252
5353 useEffect ( ( ) => {
54- if ( CLOUD ) {
54+ const token = properties ?. layers ?. find (
55+ layer => layer ?. tileServerConfiguration ?. tileServerUrl
56+ )
57+ if ( CLOUD && token ) {
58+ setMapServiceError ( RemoteDataState . Done )
59+ setMapToken ( token . tileServerConfiguration ?. tileServerUrl )
60+ }
61+ if ( CLOUD && ! token ) {
5562 const getToken = async ( ) => {
5663 try {
5764 setMapServiceError ( RemoteDataState . Loading )
@@ -71,7 +78,7 @@ const GeoPlot: FC<Props> = ({result, properties}) => {
7178 }
7279 getToken ( )
7380 }
74- } , [ ] )
81+ } , [ properties . layers ] )
7582
7683 useEffect ( ( ) => {
7784 try {
@@ -132,6 +139,7 @@ const GeoPlot: FC<Props> = ({result, properties}) => {
132139 </ div >
133140 )
134141 }
142+
135143 const tileServerConfiguration = {
136144 tileServerUrl : getMapboxUrl ( ) ,
137145 bingKey : '' ,
You can’t perform that action at this time.
0 commit comments