@@ -8,7 +8,7 @@ import MapGL, {
8
8
Popup ,
9
9
FeatureState ,
10
10
} from "@urbica/react-map-gl" ;
11
- import Geocoder from "react-map-gl-geocoder" ;
11
+ // import Geocoder from "react-map-gl-geocoder";
12
12
import MapScorecard from "./MapScorecard" ;
13
13
import PopupPrompt from "../../../components/Prompts/PopupPrompt" ;
14
14
import ReadonlySignupPrompt from "../../../components/Prompts/ReadonlySignupPrompt" ;
@@ -28,10 +28,10 @@ const pastLayer = {
28
28
id : "past" ,
29
29
type : "circle" ,
30
30
paint : {
31
- "circle-radius" : 5 ,
31
+ "circle-radius" : 4 ,
32
32
"circle-color" : "rgba(203, 118, 120, 0.75)" ,
33
33
"circle-stroke-color" : "rgba(203, 118, 120, 0.25)" ,
34
- "circle-stroke-width" : 6 ,
34
+ "circle-stroke-width" : 4 ,
35
35
} ,
36
36
filter : [ "==" , "icon" , "0" ] ,
37
37
} ;
@@ -46,24 +46,34 @@ const pastCountryLayer = {
46
46
filter : [ "==" , "icon" , "0" ] ,
47
47
} ;
48
48
49
- const futureLayer = {
50
- id : "future " ,
51
- type : "circle " ,
49
+ const futureCountryLayer = {
50
+ id : "futureCountries " ,
51
+ type : "fill " ,
52
52
paint : {
53
- "circle-radius" : 5 ,
54
- "circle-color" : "rgba(115, 167, 195, 0.75)" ,
55
- "circle-stroke-color" : "rgba(115, 167, 195, 0.25)" ,
56
- "circle-stroke-width" : 6 ,
53
+ "fill-color" : "rgba(100, 100, 220, 0.25)" ,
54
+ "fill-outline-color" : "rgba(0, 0, 255, 0.25)" ,
57
55
} ,
58
56
filter : [ "==" , "icon" , "1" ] ,
59
57
} ;
60
58
61
- const futureCountryLayer = {
62
- id : "futureCountries " ,
59
+ const liveCountryLayer = {
60
+ id : "liveCountries " ,
63
61
type : "fill" ,
64
62
paint : {
65
- "fill-color" : "rgba(100, 100, 200, 0.25)" ,
66
- "fill-outline-color" : "rgba(0, 0, 255, 0.25)" ,
63
+ "fill-color" : "rgba(100, 200, 100, 0.25)" ,
64
+ "fill-outline-color" : "rgba(0, 255, 0, 0.25)" ,
65
+ } ,
66
+ filter : [ "==" , "icon" , "2" ] ,
67
+ } ;
68
+
69
+ const futureLayer = {
70
+ id : "future" ,
71
+ type : "circle" ,
72
+ paint : {
73
+ "circle-radius" : 4 ,
74
+ "circle-color" : "rgba(115, 167, 195, 0.75)" ,
75
+ "circle-stroke-color" : "rgba(115, 167, 195, 0.25)" ,
76
+ "circle-stroke-width" : 4 ,
67
77
} ,
68
78
filter : [ "==" , "icon" , "1" ] ,
69
79
} ;
@@ -72,23 +82,14 @@ const liveLayer = {
72
82
id : "live" ,
73
83
type : "circle" ,
74
84
paint : {
75
- "circle-radius" : 5 ,
85
+ "circle-radius" : 4 ,
76
86
"circle-color" : "rgba(150, 177, 168, 0.75)" ,
77
87
"circle-stroke-color" : "rgba(150, 177, 168, 0.25)" ,
78
- "circle-stroke-width" : 6 ,
88
+ "circle-stroke-width" : 4 ,
79
89
} ,
80
90
filter : [ "==" , "icon" , "2" ] ,
81
91
} ;
82
92
83
- const liveCountryLayer = {
84
- id : "liveCountries" ,
85
- type : "fill" ,
86
- paint : {
87
- "fill-color" : "rgba(100, 200, 100, 0.25)" ,
88
- "fill-outline-color" : "rgba(0, 255, 0, 0.25)" ,
89
- } ,
90
- filter : [ "==" , "icon" , "2" ] ,
91
- } ;
92
93
93
94
function FriendReadonlyCity ( props ) {
94
95
const [ viewport , handleViewport ] = useState ( {
@@ -195,23 +196,23 @@ function FriendReadonlyCity(props) {
195
196
handleViewport ( { ...viewport , ...newViewport } ) ;
196
197
}
197
198
198
- function handleOnResult ( typedCity ) {
199
- let newHoveredCityArray = [ ] ;
200
- if ( typedCity . result . properties . wikidata !== undefined ) {
201
- newHoveredCityArray = clickedCityArray . filter (
202
- ( city ) =>
203
- city . cityId ===
204
- parseFloat ( typedCity . result . properties . wikidata . slice ( 1 ) , 10 )
205
- ) ;
206
- } else {
207
- newHoveredCityArray = clickedCityArray . filter (
208
- ( city ) =>
209
- city . cityId === parseFloat ( typedCity . result . id . slice ( 10 , 16 ) , 10 )
210
- ) ;
211
- }
212
- handleActivePopup ( true ) ;
213
- handleHoveredCityArray ( newHoveredCityArray ) ;
214
- }
199
+ // function handleOnResult(typedCity) {
200
+ // let newHoveredCityArray = [];
201
+ // if (typedCity.result.properties.wikidata !== undefined) {
202
+ // newHoveredCityArray = clickedCityArray.filter(
203
+ // (city) =>
204
+ // city.cityId ===
205
+ // parseFloat(typedCity.result.properties.wikidata.slice(1), 10)
206
+ // );
207
+ // } else {
208
+ // newHoveredCityArray = clickedCityArray.filter(
209
+ // (city) =>
210
+ // city.cityId === parseFloat(typedCity.result.id.slice(10, 16), 10)
211
+ // );
212
+ // }
213
+ // handleActivePopup(true);
214
+ // handleHoveredCityArray(newHoveredCityArray);
215
+ // }
215
216
216
217
function handleLoadedCities ( data ) {
217
218
let pastCount = tripTimingCounts [ 0 ] ;
@@ -468,7 +469,7 @@ function FriendReadonlyCity(props) {
468
469
"liveCountries" ,
469
470
] }
470
471
>
471
- < Geocoder
472
+ { /* <Geocoder
472
473
mapRef={mapRef}
473
474
onResult={handleOnResult}
474
475
mapboxApiAccessToken={
@@ -477,7 +478,7 @@ function FriendReadonlyCity(props) {
477
478
position="top-left"
478
479
types={"place"}
479
480
placeholder={"Type a city..."}
480
- />
481
+ /> */ }
481
482
< Source type = "geojson" id = "route2" data = { countryJson } > </ Source >
482
483
< FeatureState id = "route2" source = "route2" />
483
484
< Source type = "geojson" id = "route" data = { geojson } > </ Source >
0 commit comments