| 176 | } |
| 177 | |
| 178 | function positionOverlayOptions(currentPosition: MapPosition) { |
| 179 | const simulator = currentPosition.mode === "simulator"; |
| 180 | const color = simulator ? "#2563eb" : "#ef4444"; |
| 181 | const center = [currentPosition.lng, currentPosition.lat]; |
| 182 | return { |
| 183 | marker: { |
| 184 | center, |
| 185 | radius: simulator ? 8 : 7, |
| 186 | fillColor: color, |
| 187 | fillOpacity: 0.95, |
| 188 | strokeColor: "#ffffff", |
| 189 | strokeWeight: 3, |
| 190 | zIndex: 60, |
| 191 | }, |
| 192 | ring: { |
| 193 | center, |
| 194 | radius: simulator ? 14 : 12, |
| 195 | fillColor: color, |
| 196 | fillOpacity: 0.16, |
| 197 | strokeColor: color, |
| 198 | strokeOpacity: 0.5, |
| 199 | strokeWeight: 2, |
| 200 | zIndex: 58, |
| 201 | }, |
| 202 | }; |
| 203 | } |
| 204 | |
| 205 | export function ChallengeMap(props: MapProps) { |
| 206 | if (props.config?.has_amap) { |