-
Notifications
You must be signed in to change notification settings - Fork 887
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
834 additions
and
186 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Bug report in v5 | ||
about: Report a bug in v5 | ||
--- | ||
|
||
## Bug report in v5 | ||
|
||
**Before** opening an issue, make sure to read the [contributing guide](https://github.com/PaulLeCam/react-leaflet/blob/master/CONTRIBUTING.md) and understand this is a bug tracker, not a support platform. | ||
|
||
Please make sure to check the following boxes before submitting an issue.\ | ||
**Issues opened without using this template will be closed unless they have a good reason not to follow this template.** | ||
|
||
- [ ] All peer dependencies are installed: React, ReactDOM and Leaflet. | ||
- [ ] Using the latest RC version of React and ReactDOM v19. | ||
- [ ] Using the supported version of Leaflet (v1.9.0 minimum) and its corresponding CSS file is loaded. | ||
- [ ] Using the [latest v5 RC version of React-Leaflet](https://github.com/PaulLeCam/react-leaflet/releases). | ||
- [ ] The issue has not already been reported. | ||
- [ ] Make sure you have followed the [quick start guide](https://leafletjs.com/examples/quick-start.html) for Leaflet. | ||
- [ ] Make sure you have fully read the [documentation](https://react-leaflet.js.org/docs/start-introduction) and that you understand the [limitations](https://react-leaflet.js.org/docs/start-introduction#limitations). | ||
|
||
### Expected behavior | ||
|
||
Please describe. | ||
|
||
### Actual behavior | ||
|
||
Please describe. | ||
|
||
### Steps to reproduce | ||
|
||
Please provide the simplest example possible to reproduce the issue, based on [this StackBlitz](https://stackblitz.com/edit/react-leaflet-v5?file=src/App.tsx). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules | ||
lib | ||
coverage | ||
.turbo | ||
.vercel |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"formatter": { | ||
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"ignore": [], | ||
"attributePosition": "auto", | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineWidth": 80 | ||
}, | ||
"javascript": { | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"arrowParentheses": "always", | ||
"bracketSameLine": true, | ||
"bracketSpacing": true, | ||
"jsxQuoteStyle": "double", | ||
"quoteProperties": "asNeeded", | ||
"quoteStyle": "single", | ||
"quoteStyle": "single", | ||
"semicolons": "asNeeded", | ||
"trailingComma": "all" | ||
} | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"ignore": ["lib/**", "__tests__/**"], | ||
"rules": { | ||
"recommended": true | ||
} | ||
} | ||
"linter": { | ||
"enabled": true, | ||
"ignore": ["__tests__/**"], | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"useIgnoreFile": true | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react' | ||
import { MapContainer, Marker, Popup, TileLayer } from 'react-leaflet' | ||
|
||
const position = [51.505, -0.09] | ||
|
||
export default function App() { | ||
return ( | ||
<MapContainer center={position} zoom={13} scrollWheelZoom={false}> | ||
<TileLayer | ||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' | ||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" | ||
/> | ||
<Marker position={position}> | ||
<Popup> | ||
A pretty CSS3 popup. <br /> | ||
</Popup> | ||
</Marker> | ||
</MapContainer> | ||
) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.leaflet-container { | ||
height: 400px; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | ||
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" | ||
crossorigin=""/> | ||
<title>React-Leaflet example</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
|
||
import App from './App.tsx' | ||
import './index.css' | ||
|
||
// biome-ignore lint/style/noNonNullAssertion: DOM root exists | ||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "react-leaflet-example", | ||
"private": true, | ||
"version": "1.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"start": "vite" | ||
}, | ||
"dependencies": { | ||
"react": "rc", | ||
"react-dom": "rc", | ||
"react-leaflet": "workspace:^" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "npm:types-react@rc", | ||
"@types/react-dom": "npm:types-react-dom@rc", | ||
"@vitejs/plugin-react": "^4.3.0", | ||
"typescript": "^5.4.5", | ||
"vite": "^5.2.11" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,19 @@ | |
"version": "1.0.0", | ||
"private": true, | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"lint": "biome check --apply ./packages", | ||
"lint:ci": "biome ci ./packages", | ||
"test": "jest", | ||
"build": "turbo run build:clean && pnpm run -r build:types && turbo run build:js" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.7.2", | ||
"@biomejs/biome": "^1.7.3", | ||
"@skypack/package-check": "^0.2.2", | ||
"@swc/cli": "^0.3.12", | ||
"@swc/core": "^1.3.37", | ||
"@swc/core": "^1.5.7", | ||
"@swc/jest": "^0.2.24", | ||
"@testing-library/react": "^15.0.5", | ||
"@testing-library/react": "^15.0.7", | ||
"@types/jest": "^29.4.0", | ||
"@types/leaflet": "^1.9.1", | ||
"@types/warning": "^3.0.0", | ||
|
@@ -24,23 +24,21 @@ | |
"jest": "^29.4.3", | ||
"jest-environment-jsdom": "^29.4.3", | ||
"leaflet": "^1.9.3", | ||
"react": "beta", | ||
"react-dom": "beta", | ||
"react": "rc", | ||
"react-dom": "rc", | ||
"ts-jest-resolver": "^2.0.0", | ||
"turbo": "^1.8.3", | ||
"typescript": "^5.4.5" | ||
}, | ||
"pnpm": { | ||
"overrides": { | ||
"@types/react": "npm:types-react@beta", | ||
"@types/react-dom": "npm:types-react-dom@beta", | ||
"react": "beta", | ||
"react-dom": "beta" | ||
"@types/react": "npm:types-react@rc", | ||
"@types/react-dom": "npm:types-react-dom@rc", | ||
"react": "rc", | ||
"react-dom": "rc" | ||
} | ||
}, | ||
"jest": { | ||
"projects": [ | ||
"<rootDir>/packages/*" | ||
] | ||
"projects": ["<rootDir>/packages/*"] | ||
} | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.