This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef } from 'react'; | |
import L from 'leaflet'; | |
import 'leaflet/dist/leaflet.css'; | |
import markerIconPng from 'leaflet/dist/images/marker-icon.png'; | |
import markShadowPng from 'leaflet/dist/images/marker-shadow.png'; | |
function App() { | |
const savedMap = useRef(); | |
const mapId = 'map'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef } from 'react'; | |
import L from 'leaflet'; | |
import 'leaflet/dist/leaflet.css'; | |
function App() { | |
const savedMap = useRef(); | |
const mapId = 'map'; | |
useEffect(() => { | |
if (savedMap.current) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from 'react'; | |
import L from 'leaflet'; | |
import 'leaflet/dist/leaflet.css'; | |
function App() { | |
const mapId = 'map'; | |
useEffect(() => { | |
const map = L.map(mapId, { | |
center: [37.774929, -122.419418], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react'; | |
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd'; | |
const options = [ | |
{ value: 'jack', label: 'Jack' }, | |
{ value: 'lucy', label: 'Lucy' }, | |
{ value: 'Yiminghe', label: 'yiminghe' }, | |
{ value: 'disabled', label: 'Disabled', disabled: true }, | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react'; | |
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd'; | |
const options = [ | |
{ value: 'jack', label: 'Jack' }, | |
{ value: 'lucy', label: 'Lucy' }, | |
{ value: 'Yiminghe', label: 'yiminghe' }, | |
{ value: 'disabled', label: 'Disabled', disabled: true }, | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react'; | |
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd'; | |
const options = [ | |
{ value: 'jack', label: 'Jack' }, | |
{ value: 'lucy', label: 'Lucy' }, | |
{ value: 'Yiminghe', label: 'yiminghe' }, | |
{ value: 'disabled', label: 'Disabled', disabled: true }, | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react'; | |
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd'; | |
const options = [ | |
{ value: 'jack', label: 'Jack' }, | |
{ value: 'lucy', label: 'Lucy' }, | |
{ value: 'Yiminghe', label: 'yiminghe' }, | |
{ value: 'disabled', label: 'Disabled', disabled: true }, | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react'; | |
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd'; | |
const options = [ | |
{ value: 'jack', label: 'Jack' }, | |
{ value: 'lucy', label: 'Lucy' }, | |
{ value: 'Yiminghe', label: 'yiminghe' }, | |
{ value: 'disabled', label: 'Disabled', disabled: true }, | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from 'react'; | |
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd'; | |
const options = [ | |
{ value: 'jack', label: 'Jack' }, | |
{ value: 'lucy', label: 'Lucy' }, | |
{ value: 'Yiminghe', label: 'yiminghe' }, | |
{ value: 'disabled', label: 'Disabled', disabled: true }, | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Button, ConfigProvider, Space, Select, theme } from 'antd'; | |
const options = [ | |
{ value: 'jack', label: 'Jack' }, | |
{ value: 'lucy', label: 'Lucy' }, | |
{ value: 'Yiminghe', label: 'yiminghe' }, | |
{ value: 'disabled', label: 'Disabled', disabled: true }, | |
]; | |
function App() { |