Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1 #196

Merged
merged 33 commits into from
Nov 14, 2016
Merged

v1 #196

merged 33 commits into from
Nov 14, 2016

Conversation

PaulLeCam
Copy link
Owner

Future release of React-Leaflet.
Not ready to be merged yet, only used to track changes.

PatrickKing and others added 18 commits February 2, 2016 11:09
* Set source argument in Popup creation

* v0.10.1

* Animate panning and zooming

* v0.10.2

* Lint 'object destructuring filter' consistently

The pattern ```const { map, url, ...props } = this.props``` usually
failed during linting, because the ```map``` variable is defined but
not used.

After adding the ```"varsIgnorePattern": "^_"``` option to the
```no-unused-vars``` rule, unused properies can be marked as:
```const { map: _, url, ...props } = this.props```.

I also updated the eslint and babel-eslint dependencies, because of
some relevant bugfixes.

* Add babel-plugin-lodash

* Introduce the concept of 'layer container', as a unified interface for L.Map and L.LayerGroup.

* v0.11 - new LayersControl

* Component-based LayersControl
* Deprecate `onLeaflet...` format for events
* React v15

* LayersControl does not pass map props to children (#142)

* v0.11.1

* v0.11.2

* Add dynamic draggable props to Marker (#148)

* expose ability to toggle marker's draggable status

* fix indentation

* v0.11.3
* Set source argument in Popup creation

* v0.10.1

* Animate panning and zooming

* v0.10.2

* Lint 'object destructuring filter' consistently

The pattern ```const { map, url, ...props } = this.props``` usually
failed during linting, because the ```map``` variable is defined but
not used.

After adding the ```"varsIgnorePattern": "^_"``` option to the
```no-unused-vars``` rule, unused properies can be marked as:
```const { map: _, url, ...props } = this.props```.

I also updated the eslint and babel-eslint dependencies, because of
some relevant bugfixes.

* Add babel-plugin-lodash

* Introduce the concept of 'layer container', as a unified interface for L.Map and L.LayerGroup.

* v0.11 - new LayersControl

* Component-based LayersControl
* Deprecate `onLeaflet...` format for events
* React v15

* LayersControl does not pass map props to children (#142)

* v0.11.1

* v0.11.2

* Add dynamic draggable props to Marker (#148)

* expose ability to toggle marker's draggable status

* fix indentation

* v0.11.3

* Changes removeFrom to remove in MapControl

* Removes MultiPolyline; multipolylines are now supported by Polyline

* Removes MultiPolygon; multipolygons are now supported by Polygon

* Removes CanvasTileLayer, which has been removed from leaflet

* Updates Circle instantiator to use new format
# Conflicts:
#	.babelrc
#	.eslintrc.json
#	CHANGELOG.md
#	README.md
#	__tests__/LayersControl.js
#	__tests__/MapComponent.js
#	__tests__/MapLayer.js
#	__tests__/Marker.js
#	bower.json
#	dist/react-leaflet.js
#	dist/react-leaflet.min.js
#	example/components/animate.js
#	example/components/custom-component.js
#	example/components/draggable-marker.js
#	example/components/index.js
#	example/components/layers-control.js
#	lib/AttributionControl.js
#	lib/CanvasTileLayer.js
#	lib/Circle.js
#	lib/CircleMarker.js
#	lib/FeatureGroup.js
#	lib/GeoJson.js
#	lib/ImageOverlay.js
#	lib/LayerGroup.js
#	lib/LayersControl.js
#	lib/Map.js
#	lib/MapComponent.js
#	lib/MapControl.js
#	lib/MapLayer.js
#	lib/Marker.js
#	lib/MultiPolygon.js
#	lib/MultiPolyline.js
#	lib/Path.js
#	lib/Polygon.js
#	lib/Polyline.js
#	lib/Popup.js
#	lib/Rectangle.js
#	lib/ScaleControl.js
#	lib/TileLayer.js
#	lib/WMSTileLayer.js
#	lib/ZoomControl.js
#	lib/types/index.js
#	package.json
#	src/CanvasTileLayer.js
#	src/Circle.js
#	src/CircleMarker.js
#	src/FeatureGroup.js
#	src/GeoJson.js
#	src/ImageOverlay.js
#	src/LayerGroup.js
#	src/LayersControl.js
#	src/Map.js
#	src/MapComponent.js
#	src/MapControl.js
#	src/MapLayer.js
#	src/Marker.js
#	src/MultiPolygon.js
#	src/MultiPolyline.js
#	src/Path.js
#	src/Polygon.js
#	src/Polyline.js
#	src/Popup.js
#	src/Rectangle.js
#	src/TileLayer.js
#	src/WMSTileLayer.js
#	src/index.js
#	src/types/children.js
#	src/types/index.js
#	src/types/layerContainer.js
# Conflicts:
#	CHANGELOG.md
#	dist/react-leaflet.min.js
#	package.json
* add useFlyTo, flyToBounds, and flyTo

* fix tests, use uniqueId from lodash

* deconstruct in alphabetical order

* add documentation for flyTo

* set default value for useFlyTo

* remove custom id generator.
@PaulLeCam PaulLeCam mentioned this pull request Jul 28, 2016
PaulLeCam and others added 6 commits September 27, 2016 20:37
# Conflicts:
#	CHANGELOG.md
#	__tests__/Map.js
#	__tests__/Marker.js
#	__tests__/Popup.js
#	bower.json
#	dist/react-leaflet.js
#	dist/react-leaflet.min.js
#	lib/CanvasTileLayer.js
#	lib/GeoJson.js
#	lib/GridLayer.js
#	lib/Map.js
#	lib/MultiPolygon.js
#	lib/MultiPolyline.js
#	lib/Popup.js
#	lib/ScaleControl.js
#	package.json
#	src/MultiPolygon.js
* MapPane implements Leaflet panes.

* Added MapPane to index.js

* Helper function 'getInstanceOptions' to pass options + possible pane from context.

* Implemented possible pane context into appropriate items.

* Added MapPane to docs and examples.

* Added to docs/API

* Typo fix

* Typo fix

* Initial commit for MapPane component.

* Allow overriding pane name through props.

* Allow nested panes.

* Renamed 'MapPane' to 'Pane'

* Renamed 'getInstanceOptions' to 'getOptions'

* Renamed MapPane.js to Pane.js

* Removed paneType

* Renamed MapPane to Pane in documentation and examples.

* Removed _isMounted, Moved this._name to this.state.name

* Bugfix missing 'PropTypes'

* componentWillMount moved to componentDidMount

* Removed paneType export from types/index

* Added Pane export in index to alphabetical order.

* Updated docs and example.

* Comments, className, removed zIndex.

* Updated pane docs and example.

* Removed deprecated lines in createPane.

* Disallow default pane names.

* Updated docs

* Removed 'cloneElement' for children, Bugfix removing pane.
# Conflicts:
#	dist/react-leaflet.js
#	dist/react-leaflet.min.js
#	lib/CanvasTileLayer.js
#	lib/Circle.js
#	lib/CircleMarker.js
#	lib/FeatureGroup.js
#	lib/GeoJSON.js
#	lib/GridLayer.js
#	lib/ImageOverlay.js
#	lib/LayerGroup.js
#	lib/LayersControl.js
#	lib/Map.js
#	lib/MapComponent.js
#	lib/MapControl.js
#	lib/Marker.js
#	lib/MultiPolygon.js
#	lib/MultiPolyline.js
#	lib/Path.js
#	lib/Polygon.js
#	lib/Polyline.js
#	lib/Popup.js
#	lib/Rectangle.js
#	lib/TileLayer.js
#	lib/WMSTileLayer.js
#	lib/index.js
#	package.json
@albandiguer
Copy link

<3

@@ -15,4 +16,10 @@ export default class WMSTileLayer extends GridLayer {
const { url, ...props } = this.props
this.leafletElement = tileLayer.wms(url, this.getOptions(props))
}

componentDidUpdate (prevProps: Object) {
if (!isEqual(this.props, prevProps)) {
Copy link

@sunny-g sunny-g Nov 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PaulLeCam Would it possible to make the url prop dynamic as well, something like before this conditional:

if (!isEqual(this.props.url, prevProps.url)) {
  this.leafletElement.setUrl(this.props.url); // potentially noRedraw set to true to reduce over-redraws
}

This could make it significantly easier to hide/show the layers without having to resort to the imperative Leaflet API for adding/removing layers.

PaulLeCam and others added 4 commits November 4, 2016 07:54
* Update `eslint-plugin-promise` dependency

* reduce flow errors to 0

* update with next
@PaulLeCam PaulLeCam merged commit 956eca0 into master Nov 14, 2016
@PaulLeCam PaulLeCam deleted the next branch September 9, 2017 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants