Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mariusandra/pigeon-maps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 409b924ef3bc313bae23cb95c3df10d97ef31f26
Choose a base ref
...
head repository: mariusandra/pigeon-maps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 69f54459e2fe8a8252ca89525fa6a31deeeae5f8
Choose a head ref
Loading
44 changes: 41 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,45 @@
{
"presets": [["es2015", {"modules": false, "loose": true}], "stage-0", "react"],
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"loose": true
}
],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
["transform-react-remove-prop-types", { "mode": "unsafe-wrap" }],
"transform-babel-env-inline"
"transform-babel-env-inline",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind",
["@babel/plugin-proposal-private-methods", { "loose": false }],
["@babel/plugin-proposal-private-property-in-object", { "loose": false }]
]
}
18 changes: 0 additions & 18 deletions .eslintrc

This file was deleted.

26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
'react/prop-types': 'off',
},
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
}
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@ node_modules
npm-debug.log
lib
.idea
yarn-error.log
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"printWidth": 120,
}
80 changes: 63 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,18 +7,78 @@ Once we reach 1.0 all deprecations will be removed and the project will switch t

## Uncommitted

## 0.21.3 - 2022-10-01
- Add `dir="ltr"` to map container div.

## 0.21.2 - 2022-09-18
- Support custom content as children of `<Marker><Icon /></Marker>`

## 0.21.1 - 2022-09-18
- Fix the usage of `<ZoomControl />` buttons inside `<form>` tags.

## 0.21.0 - 2022-03-13
- Add `GeoJson`, `GeoJsonLoader`, `GeoJsonFeature` by @baldulin #149

## 0.20.0 - 2022-01-29
- Add `tileComponent` prop, which lets you swap out the default `<img />` component for a custom one.

## 0.19.7 - 2021-07-04
- Improve `<Draggable />` for cases when controlling its location via `onDragMove`.

## 0.19.6 - 2021-05-29
- Minor change: the default value for `dpr` in `provider` functions now defaults to `1` (instead of `undefined`)

## 0.19.5 - 2021-03-20
- Draggable: Set the cursor to `grab` and`grabbing` by default

## 0.19.4 - 2021-03-20
- Center align the tiles and overlays when the pre-rendered map is not the same size as on the final rendered page.

## 0.19.3 - 2021-03-20
- Add `maptiler` to providers

## 0.19.0 - 2021-03-19
- Add `<Draggable />` overlay

## 0.18.1 - 2021-03-19
- Support `import { osm, ... } from 'pigeon-maps/providers'`

## 0.18.0 - 2021-03-17
- Remove default export of `Map`. You must now do `import { Map } from 'pigeon-maps'`.
- Add `<ZoomControl />`
- Add `mapProps` and `setCenterZoom` to the props given to child components
- Set the default provider to OSM again (from stamenToner)

## 0.17.3 - 2021-03-16
- With `metaWheelZoom` you can now also scroll with the CTRL key (#120 by olehmaksym)

## 0.17.2 - 2021-03-16
- Use a `ResizeObserver` to update the size even when the window doesn't resize (#125 by @mischnic)
- Add classes `pigeon-tile-box`, `pigeon-tiles`, `pigeon-overlays` and `pigeon-overlay-warning` to internal divs.

## 0.17.1 - 2021-02-13
- Fixes faulty types for `Marker` and `Overlay`

## 0.17.0 - 2020-12-03
- Add `Marker` and `Overlay` components to the pigeon-maps "standard library"
- Fix a bug with mousewheel scroll when width & height present (#117 by @roux1max)

## 0.16.1 - 2020-08-28
- Add empty ALT attribute to map tiles

## 0.16.0 - 2020-08-10
- Rewritten in TypeScript without changing any functionality
- Attribution links now open in a new tab

## 0.15.0 - 2020-03-03
### Changes
- Changed the default tile provider from the broken Wikimedia to OSM
- Add more information about setting up your own tile provider
- Add lazy loading for tiles (#87 by @maxsteenbergen)

## 0.14.0 - 2019-08-31
### Changes:
- React 16.8 support by removing deprecated componentWillReceiveProps and replacing it with componentDidUpdate. #70 @JoaquimEsteves

## 0.13.0 - 2019-05-09
### Changes
- Add the `dprs` parameter to `<Map />` and `dpr` as the 4th argument for the `provider` functions.

Previously if you wanted to support HiDPI screens your `provider` function looked something like this:
@@ -47,56 +107,42 @@ The value of `dpr` will be `undefined` for the default tile (`<img src>`) which
If you don't need server rendering, then the old approach of having no `dprs` array and figuring out the `dpr` from the `window` inside `provider` will continue to work fine.

## 0.12.1 - 2019-03-26
### Fixes
- Fix 100% height issue. #48 and #4

## 0.12.0 - 2019-03-26
### Changes
- Removed inferno support, which reportedly didn't even work (#39).
- Started using rollup and babel loose mode to reduce the size even more. #59 @markusenglund (a [~8% reduction!](https://bundlephobia.com/result?p=pigeon-maps@0.12.0))

## 0.11.11 - 2018-11-16
### Fixes
- Fix wheel/touchpad scrolling on Chrome 73+, which requires non-passive event handlers for wheel events. [See also this](https://github.com/facebook/react/issues/14856).

## 0.11.8 - 2018-11-16
### Fixes
- Another edge case bug with animation and changing the center before the animation had time to finish.

## 0.11.7 - 2018-11-16
### Fixes
- Bug when animating between screens and forced to jump to a far away screen, it would freeze instead of jumping.

## 0.11.6 - 2018-11-05
### Fixes
- The `pigeon-drag-block` class also works with touch events

## 0.11.5 - 2018-10-18
### Changes
- Fixes "0 0 0 0" appearing if the map has no size. #46 @PofMagicfingers

## 0.11.4 - 2018-10-18
### Changes
- Added an undocumented feature `limitBounds`. If defaults to `center`, but if set to `edge`, we will try show as much map as possible. See issue #45 for details.

## 0.11.3 - 2018-10-17
### Changes
- Added a polyfill for `window.requestAnimationFrame`
- Updated attribution URL to https://pigeon-maps.js.org/

## 0.11.2 - 2018-10-10
### Addition
- Added `boxClassname` props allowing you to apply css for the tiles div only #43 @sgerin

### Fix
- Fix bug zoom position when browser loses focus #41 @benrampon

## 0.11.1 - 2018-09-29
### Updates
- Explicitly set touch event listeners to use non-passive mode. Fixes iOS 11.3 dragging issue. #40 @Jercik

## 0.11.0 - 2018-09-19
### Updates
- Added `minZoom` and `maxZoom` to limit the zoom range
- Several small bugfixes

Loading