Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
# Conflicts:
#	dist/react-leaflet.js
#	dist/react-leaflet.min.js
#	lib/GridLayer.js
#	lib/Map.js
#	lib/MultiPolygon.js
#	lib/MultiPolyline.js
#	lib/Popup.js
#	lib/TileLayer.js
#	lib/WMSTileLayer.js
#	package.json
  • Loading branch information
PaulLeCam committed Nov 14, 2016
2 parents 1e8fc1e + eae472d commit d7ba094
Show file tree
Hide file tree
Showing 91 changed files with 4,494 additions and 3,222 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"extends": ["standard", "standard-react"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": 7,
"jsx": true,
"sourceType": "module"
},
Expand All @@ -15,6 +15,7 @@
],
"rules": {
"comma-dangle": [1, "always-multiline"],
"jsx-quotes": [2, "prefer-single"],
"no-duplicate-imports": [0],
"no-unused-vars": [2, { "varsIgnorePattern": "^_" }],
"space-infix-ops": [0]
Expand Down
3 changes: 3 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[ignore]
.*/node_modules/fbjs/.*

[include]
./node_modules/react

[libs]

[options]
esproposal.class_instance_fields=enable
esproposal.class_static_fields=enable
unsafe.enable_getters_and_setters=true
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ sudo: false
language: node_js
node_js:
- 6
cache:
directories:
- node_modules
64 changes: 63 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
## v1.0.0 (2016-11-14)

Changes from v0.12.3:

- [BREAKING] Updated Leaflet dependency requirement to v1.0.0.
- [BREAKING] Renamed `GeoJson` to `GeoJSON` to match Leaflet's change.
- [BREAKING] Removed `MultiPolygon` and `MultiPolyline`, now supported by `Polygon` and `Polyline` respectively.
- [BREAKING] Removed `CanvasTileLayer`, replaced by `GridLayer`. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#gridlayer).
- [BREAKING] Removed `getLeafletElement()` method in `MapComponent` and `MapControl`, deprecated since v0.12.0.
- [BREAKING] Removed `setIconDefaultImagePath()` helper, set `Leaflet.Icon.Default.imagePath` directly using Leaflet if you need.
- `Leaflet.Icon.Default.imagePath` is no longer set by default, as per Leaflet v1.0.0 it should be auto-detected.
- The `Map` component no longer creates an unique ID for its container if none is provided.
- Added `useFlyTo: bool` property to `Map` to use `flyTo` instead of `setView` and `flyToBounds` instead of `fitBounds` when changing the map's view or bounds ([PR #148](https://github.com/PaulLeCam/react-leaflet/pull/192) by *jgimbel*).
- Added `GridLayer`.
- Added `Pane` component introduced in Leaflet v1. ([PR #227](https://github.com/PaulLeCam/react-leaflet/pull/227) by *rjdestigter*).
- Added `Tooltip` component introduced in Leaflet v1. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#tooltip) for usage.
- Added support for IE9 and IE10 ([PR #235](https://github.com/PaulLeCam/react-leaflet/pull/235) by *dettier*).
- Updated `WMSTileLayer` to support dynamic `url` and parameters.
- [internal] Fixed Flow errors ([PR #251](https://github.com/PaulLeCam/react-leaflet/pull/251) by *joeyrosztoczy*).
- [internal] Updated `MapLayer` to only create divs when necessary.
- [internal] Removed `BaseTileLayer`, replaced by `GridLayer`.
- [internal] Removed `bower.json` file.

## v1.0.0-rc.3 (2016-11-04)

Updated `WMSTileLayer` to support dynamic `url` property.

## v1.0.0-rc.2 (2016-10-20)

- Added `Pane` component introduced in Leaflet v1. ([PR #227](https://github.com/PaulLeCam/react-leaflet/pull/227) by *rjdestigter*).
- Added support for IE9 and IE10 ([PR #235](https://github.com/PaulLeCam/react-leaflet/pull/235) by *dettier*).
- Updated `WMSTileLayer` to support dynamic parameters.

## v1.0.0-rc.1 (2016-09-28)

- [BREAKING] Removed `setIconDefaultImagePath()` helper, set `Leaflet.Icon.Default.imagePath` directly using Leaflet if you need.
- Updated Leaflet dependency requirement to v1.0.0.
- `Leaflet.Icon.Default.imagePath` is no longer set by default, as per Leaflet v1.0.0 it should be auto-detected.

## v1.0.0-beta.3 (2016-08-26)

Fixed `Tooltip` removal handling.

## v1.0.0-beta.2 (2016-08-20)

- Added `Tooltip` component introduced in Leaflet v1.0.0-rc.2. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#tooltip) for usage.
- Updated Leaflet dependency to v1.0.0-rc.3.
- Reverted basing components on `React.PureComponent`, they are now based on `React.Component`.

## v1.0.0-beta.1 (2016-07-30)

- [BREAKING] Renamed `GeoJson` to `GeoJSON` to match Leaflet's change.
- [BREAKING] Removed `MultiPolygon` and `MultiPolyline`, now supported by `Polygon` and `Polyline` respectively.
- [BREAKING] Removed `CanvasTileLayer`, replaced by `GridLayer`. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#gridlayer).
- [BREAKING] Removed `getLeafletElement()` method in `MapComponent` and `MapControl`, deprecated since v0.12.0.
- Removed `BaseTileLayer`, replaced by `GridLayer`.
- Removed `bower.json` file.
- The `Map` component no longer creates an unique ID for its container if none is provided.
- All components now extend from `React.PureComponent` instead of `React.Component`, as such React v15.3.0+ is now required.
- Added `GridLayer`.
- Added `useFlyTo: bool` property to `Map` to use `flyTo` instead of `setView` and `flyToBounds` instead of `fitBounds` when changing the map's view or bounds ([PR #148](https://github.com/PaulLeCam/react-leaflet/pull/192) by *jgimbel*).

## v0.12.3 (2016-09-21)

Fixed events bindind in UMD build.
Expand All @@ -20,7 +82,7 @@ Fixed events bindind in UMD build.

## v0.11.7 (2016-06-14)

- Fixed removing layers from `LayersControl`.
Fixed removing layers from `LayersControl`.

## v0.11.6 (2016-06-09)

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ However, please **do not** send pull requests to add features that are not suppo
## Features requests

This library aims only to support the features provided by Leaflet. If any of these features is not implemented yet, please submit a feature request to add it.
If you are looking for implementations of features provided by plugins, they will not be provided by this library. Please read the [creating custom components](#creating-custom-components) section of the documentation to see how to implement plugins in your own code.
If you are looking for implementations of features provided by plugins, they will not be provided by this library. Please read the [extending](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/Extending.md) section of the documentation to see how to implement plugins in your own code.

## Other issues

Expand Down
10 changes: 7 additions & 3 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
Please make sure to check the following boxes before submitting an issue. Thanks!

- [ ] Check that all peer dependencies are installed: React, ReactDOM and Leaflet.
- [ ] Check that you are using a supported version of React (v0.14 or v15).
- [ ] Check that you are using a supported version of Leaflet (v.0.7)
- [ ] Check that you are using a supported version of React and ReactDOM (v15.0.0+).
- [ ] Check that you are using the supported version of Leaflet (v.1.0.0) and its corresponding CSS file is loaded.
- [ ] Make sure you have followed the [quick start guide](http://leafletjs.com/examples/quick-start.html) for Leaflet.
- [ ] Make sure you have fully read the [documentation](https://github.com/PaulLeCam/react-leaflet/blob/master/README.md) and that you understand the [technical considerations](https://github.com/PaulLeCam/react-leaflet/blob/master/README.md#technical-considerations).
- [ ] Make sure you have fully read the [documentation](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/README.md) and that you understand the [technical considerations](https://github.com/PaulLeCam/react-leaflet/blob/next/docs/How%20it%20works.md#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 jsfiddle](https://jsfiddle.net/paul_lecam/q2v7t59h/).
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# React-Leaflet [![Build Status](https://img.shields.io/travis/PaulLeCam/react-leaflet/master.svg)](https://travis-ci.org/PaulLeCam/react-leaflet) [![npm version](https://img.shields.io/npm/v/react-leaflet.svg)](https://www.npmjs.com/package/react-leaflet)
# React-Leaflet [![Build Status](https://img.shields.io/travis/PaulLeCam/react-leaflet/next.svg)](https://travis-ci.org/PaulLeCam/react-leaflet) [![npm version](https://img.shields.io/npm/v/react-leaflet.svg)](https://www.npmjs.com/package/react-leaflet)

React components for Leaflet maps.

## [Documentation](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/README.md)
## Disclaimer

- [Getting started](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/Getting%20started.md)
- [How it works](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/How%20it%20works.md)
- [API](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/API.md)
- [Extending](https://github.com/PaulLeCam/react-leaflet/blob/master/docs/Extending.md)
This is a development branch in preparation for a future v1 release. Code can be unstable and APIs can be changed between releases without other warnings than the [CHANGELOG](CHANGELOG.md). Please try it and report any issue you have upgrading, but be aware it should not be considered stable in any way.

## [Documentation](docs/README.md)

- [Getting started](docs/Getting%20started.md)
- [How it works](docs/How%20it%20works.md)
- [API](docs/API.md)
- [Extending](docs/Extending.md)

## Changes

See the [CHANGELOG](https://github.com/PaulLeCam/react-leaflet/blob/master/CHANGELOG.md) and [UPGRADING](https://github.com/PaulLeCam/react-leaflet/blob/master/UPGRADING.md) files.
See the [CHANGELOG](CHANGELOG.md) and [UPGRADING](UPGRADING.md) files.

## Contributing

See [CONTRIBUTING](https://github.com/PaulLeCam/react-leaflet/blob/master/CONTRIBUTING.md) file.
See [CONTRIBUTING](CONTRIBUTING.md) file.

## Support

Expand All @@ -24,4 +28,4 @@ Please **do not** use GitHub issues for support, but instead post your questions
## License

MIT
See [LICENSE](https://github.com/PaulLeCam/react-leaflet/blob/master/LICENSE) file.
See [LICENSE](LICENSE) file.
15 changes: 15 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Upgrading

## v1.0

React-Leaflet v1 requires Leaflet v1.0.0 and therefore contains breaking changes from v0.12, based on Leaflet v0.7.
Make sure to update your Leaflet dependency to v1.0.0, as well as its CSS file.

The following list includes breaking changes upgrading to React-Leaflet v1.0 from v0.12, it may not be exhaustive:

- Renamed `GeoJson` to `GeoJSON` to match Leaflet's change.
- Removed `MultiPolygon` and `MultiPolyline`, now supported by `Polygon` and `Polyline` respectively.
- Removed `CanvasTileLayer`, replaced by `GridLayer`. See [Leaflet's documentation](http://leafletjs.com/reference-1.0.0.html#gridlayer).
- Removed `getLeafletElement()` method in `MapComponent` and `MapControl`, deprecated since v0.12.0.
- Removed `setIconDefaultImagePath()` helper, set `Leaflet.Icon.Default.imagePath` directly using Leaflet if you need.

Read the [changelog](CHANGELOG.md) for more details about these changes.

## v0.12.0

**Drop support for IE <= 10** as explained in [this comment](https://github.com/PaulLeCam/react-leaflet/issues/215#issuecomment-243996907).
Expand Down
8 changes: 4 additions & 4 deletions __tests__/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Map', () => {
const component = <Map><TestComponent /></Map>
const html = renderToStaticMarkup(component)

expect(html).toBe('<div id="map1"></div>')
expect(html).toBe('<div></div>')
})

it('sets center and zoom props', () => {
Expand All @@ -35,7 +35,7 @@ describe('Map', () => {
const bounds = [[0, 0], [2, 2]]
const map = renderIntoDocument(<Map bounds={bounds} />)
const mapBounds = map.leafletElement.getBounds()
expect(mapBounds).toBe(bounds)
expect(mapBounds).toEqual(bounds)
})

it('updates center and zoom props', () => {
Expand Down Expand Up @@ -101,8 +101,8 @@ describe('Map', () => {
const component = renderIntoDocument(<TestComponent />)
const mapLeaflet = component.getLeafletMap()

expect(mapLeaflet.getBounds()).toBe(firstBounds)
expect(mapLeaflet.getBounds()).toEqual(firstBounds)
component.updatePosition()
expect(mapLeaflet.getBounds()).toBe(secondBounds)
expect(mapLeaflet.getBounds()).toEqual(secondBounds)
})
})
29 changes: 0 additions & 29 deletions bower.json

This file was deleted.

Loading

0 comments on commit d7ba094

Please sign in to comment.