update links in docs and examples

This commit is contained in:
Xintong Xia 2019-03-14 11:11:49 +08:00
parent 4bddb0f376
commit 917d46bf0f
48 changed files with 52 additions and 52 deletions

View File

@ -78,4 +78,4 @@ Implement this method to render the content of this component. `this._context` i
## Source
[base-control.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/components/base-control.js)
[base-control.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/base-control.js)

View File

@ -19,5 +19,5 @@ import ReactMapGL, {FlyToInterpolator} from 'react-map-gl';
## Source
[viewport-fly-to-interpolator.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/utils/transition/viewport-fly-to-interpolator.js)
[viewport-fly-to-interpolator.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/utils/transition/viewport-fly-to-interpolator.js)

View File

@ -31,5 +31,5 @@ class Map extends Component {
Like its Mapbox counterpart, this control relies on the mapbox-gl stylesheet to work properly. Make sure to add the stylesheet to your page.
## Source
[fullscreen-control.js](https://github.com/uber/react-map-gl/tree/master/src/components/fullscreen-control.js)
[fullscreen-control.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/fullscreen-control.js)

View File

@ -72,4 +72,4 @@ Like its Mapbox counterpart, this control relies on the mapbox-gl stylesheet to
## Source
[geolocate-control.js](https://github.com/uber/react-map-gl/tree/master/src/components/geolocate-control.js)
[geolocate-control.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/geolocate-control.js)

View File

@ -330,5 +330,5 @@ Inherit the following methods from [StaticMap](/docs/components/static-map.md):
## Source
[interactive-map.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/components/interactive-map.js)
[interactive-map.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/interactive-map.js)

View File

@ -24,5 +24,5 @@ Parameters:
## Source
[linear-interpolator.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/utils/transition/linear-interpolator.js)
[linear-interpolator.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/utils/transition/linear-interpolator.js)

View File

@ -69,4 +69,4 @@ Invoke `onViewportChange` callback with a new map state.
## Source
[map-controller.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/utils/map-controller.js)
[map-controller.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/utils/map-controller.js)

View File

@ -76,5 +76,5 @@ Stop propagation of dblclick event to the map component. Can be used to stop map
Like its Mapbox counterpart, this control relies on the mapbox-gl stylesheet to work properly. Make sure to add the stylesheet to your page.
## Source
[marker.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/components/marker.js)
[marker.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/marker.js)

View File

@ -49,5 +49,5 @@ Stop propagation of dblclick event to the map component. Can be used to stop map
Like its Mapbox counterpart, this control relies on the mapbox-gl stylesheet to work properly. Make sure to add the stylesheet to your page.
## Source
[navigation-control.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/components/navigation-control.js)
[navigation-control.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/navigation-control.js)

View File

@ -77,5 +77,5 @@ Stop propagation of dblclick event to the map component. Can be used to stop map
Like its Mapbox counterpart, this control relies on the mapbox-gl stylesheet to work properly. Make sure to add the stylesheet to your page.
## Source
[popup.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/components/popup.js)
[popup.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/popup.js)

View File

@ -211,4 +211,4 @@ const viewport = new WebMercatorViewport({width: 800, height: 600})
## Source
[static-map.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/components/static-map.js)
[static-map.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/static-map.js)

View File

@ -73,7 +73,7 @@ import {SVGOverlay, HTMLOverlay, CanvasOverlay} from 'react-map-gl';
### Example Overlays
There are a couple of [additional overlays](https://github.com/uber/react-map-gl/tree/master/examples/additional-overlays) in the examples folder that can be copied into applications `ScatterplotOverlay`, `DraggablePointsOverlay`, `ChoroplethOverlay`.
There are a couple of [additional overlays](https://github.com/uber/react-map-gl/tree/4.1-release/examples/additional-overlays) in the examples folder that can be copied into applications `ScatterplotOverlay`, `DraggablePointsOverlay`, `ChoroplethOverlay`.
### Third-party Overlays
@ -91,4 +91,4 @@ import cities from 'example-cities';
</MapGL>
```
Want to create and share your own overlay? Check the [examples/additional-overlays](https://github.com/uber/react-map-gl/tree/master/examples/additional-overlays) folder for examples.
Want to create and share your own overlay? Check the [examples/additional-overlays](https://github.com/uber/react-map-gl/tree/4.1-release/examples/additional-overlays) folder for examples.

View File

@ -59,10 +59,10 @@ import 'mapbox-gl/dist/mapbox-gl.css';
* `browserify` - react-map-gl is extensively tested with `browserify` and works without configuration.
* `webpack 2` - Most of the provided react-map-gl examples use webpack 2. For a minimal example, look at the [exhibit-webpack](https://github.com/uber/react-map-gl/tree/master/examples/exhibit-webpack) folder, demonstrating a working demo using `webpack 2`.
* `webpack 2` - Most of the provided react-map-gl examples use webpack 2. For a minimal example, look at the [exhibit-webpack](https://github.com/uber/react-map-gl/tree/4.1-release/examples/exhibit-webpack) folder, demonstrating a working demo using `webpack 2`.
* `create-react-app` - react-map-gl is compatible with [create-react-app](https://github.com/facebook/create-react-app).
* `create-react-app-typescript` - react-map-gl is compatible with [create-react-app-typescript](https://github.com/wmonk/create-react-app-typescript). You can see an example [here](https://github.com/zackhsi/react-map-gl-typescript).
There's many other ready-to-run [examples](https://github.com/uber/react-map-gl/blob/master/examples) you can take a look at if you need more inspiration.
There's many other ready-to-run [examples](https://github.com/uber/react-map-gl/tree/4.1-release/examples) you can take a look at if you need more inspiration.

View File

@ -29,5 +29,5 @@ Stop propagation of dblclick event to the map component. Can be used to stop map
## Source
[canvas-overlay.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/overlays/canvas-overlay.js)
[canvas-overlay.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/overlays/canvas-overlay.js)

View File

@ -20,7 +20,7 @@ class MyCustomOverlay extends BaseControl {
}
```
Here's an example of using the [ScatterplotOverlay](https://github.com/uber/react-map-gl/blob/master/examples/additional-overlays/src/scatterplot-overlay.js):
Here's an example of using the [ScatterplotOverlay](https://github.com/uber/react-map-gl/tree/4.1-release/examples/additional-overlays/src/scatterplot-overlay.js):
```jsx
<MapGL {...viewport} mapStyle={mapStyle}>
@ -35,4 +35,4 @@ Here's an example of using the [ScatterplotOverlay](https://github.com/uber/reac
</MapGL>
```
There are more examples in the [examples/additional-overlays](https://github.com/uber/react-map-gl/tree/master/examples/additional-overlays) folder of this repo.
There are more examples in the [examples/additional-overlays](https://github.com/uber/react-map-gl/tree/4.1-release/examples/additional-overlays) folder of this repo.

View File

@ -31,4 +31,4 @@ Stop propagation of click event to the map component. Can be used to stop map fr
Stop propagation of dblclick event to the map component. Can be used to stop map from zooming when this component is double clicked.
## Source
[html-overlay.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/overlays/html-overlay.js)
[html-overlay.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/overlays/html-overlay.js)

View File

@ -31,4 +31,4 @@ Stop propagation of click event to the map component. Can be used to stop map fr
Stop propagation of dblclick event to the map component. Can be used to stop map from zooming when this component is double clicked.
## Source
[svg-overlay.js](https://github.com/uber/react-map-gl/tree/3.2-release/src/overlays/svg-overlay.js)
[svg-overlay.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/overlays/svg-overlay.js)

View File

@ -88,11 +88,11 @@ Release date: July 27th, 2017
### [InteractiveMap (New, MapGL replacement)](/#/Documentation/api-reference/interactive-map)
This is a wrapper on top of `StaticMap`. It takes all the props of `StaticMap` and additional ones such as `onViewportChange`, `scrollZoom`, `dragRotate`, etc. to control interactivity on the map. See [Source Code](https://github.com/uber/react-map-gl/blob/master/src/components/interactive-map.js) for more information.
This is a wrapper on top of `StaticMap`. It takes all the props of `StaticMap` and additional ones such as `onViewportChange`, `scrollZoom`, `dragRotate`, etc. to control interactivity on the map. See [Source Code](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/interactive-map.js) for more information.
### [StaticMap (New)](/#/Documentation/api-reference/static-map)
This is the React wrapper around `Mapbox GL JS` and takes in viewport properties such as `width`, `height`, `latitude`, `longitude`. Style diffing and updating logic also live here. See [Source Code](https://github.com/uber/react-map-gl/blob/master/src/components/static-map.js) for more information.
This is the React wrapper around `Mapbox GL JS` and takes in viewport properties such as `width`, `height`, `latitude`, `longitude`. Style diffing and updating logic also live here. See [Source Code](https://github.com/uber/react-map-gl/tree/4.1-release/src/components/static-map.js) for more information.
### Overlays

View File

@ -12,7 +12,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -6,7 +6,7 @@
"dependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -12,7 +12,7 @@ export default class ControlPanel extends PureComponent {
<p>Map showing top 20 most populated cities of the United States. Click on a marker to learn more.</p>
<p>Data source: <a href="https://en.wikipedia.org/wiki/List_of_United_States_cities_by_population">Wikipedia</a></p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/controls" target="_new">View Code </a>
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/controls" target="_new">View Code </a>
</div>
</Container>
);

View File

@ -6,7 +6,7 @@
"dependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -27,7 +27,7 @@ export default class ControlPanel extends PureComponent {
<h3>Custom Controller</h3>
<p>Override default event handling logic.</p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/4.0-release/examples/custom-controller" target="_new">
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/custom-controller" target="_new">
View Code
</a>
</div>

View File

@ -6,7 +6,7 @@
"dependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -64,7 +64,7 @@ export default class StyleControls extends PureComponent {
<h3>Custom Cursor</h3>
<p>Customize the cursor based on interactivity.</p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/custom-cursor" target="_new">
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/custom-cursor" target="_new">
View Code
</a>
</div>

View File

@ -13,7 +13,7 @@
"probe.gl": "2.0.0-beta.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -6,7 +6,7 @@
"dependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -6,7 +6,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"babel-preset-es2015": "^6.18.0",

View File

@ -6,7 +6,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -7,7 +7,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -13,7 +13,7 @@ export default class ControlPanel extends PureComponent {
<h3>Highlight Features Containing Similar Data</h3>
<p>Hover over counties to highlight counties that share the same name.</p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/filter" target="_new">View Code </a>
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/filter" target="_new">View Code </a>
</div>
</Container>
);

View File

@ -7,7 +7,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -11,7 +11,7 @@ export default class ControlPanel extends PureComponent {
<h3>Animated GeoJSON</h3>
<p>Render animation by updating GeoJSON data source.</p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/geojson-animation"
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/geojson-animation"
target="_new">
View Code
</a>

View File

@ -9,7 +9,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -14,7 +14,7 @@ export default class ControlPanel extends PureComponent {
Hover over a state to see details.</p>
<p>Data source: <a href="www.census.gov">US Census Bureau</a></p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/geojson" target="_new">View Code </a>
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/geojson" target="_new">View Code </a>
</div>
<hr />

View File

@ -7,7 +7,7 @@
"d3-request": "^1.0.5",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -52,7 +52,7 @@ export default class ControlPanel extends PureComponent {
< hr />
<p>Data source: <a href="https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson">earthquakes.geojson</a></p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/4.0-release/examples/heatmap" target="_new">View Code </a>
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/heatmap" target="_new">View Code </a>
</div>
</Container>
);

View File

@ -6,7 +6,7 @@
"dependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -61,7 +61,7 @@ export default class ControlPanel extends PureComponent {
<h3>Limit Map Interaction</h3>
<p>Turn interactive features off/on.</p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/interaction" target="_new">View Code </a>
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/interaction" target="_new">View Code </a>
</div>
<hr />

View File

@ -7,7 +7,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -111,7 +111,7 @@ export default class StyleControls extends PureComponent {
<h3>Dynamic Styling</h3>
<p>Dynamically show/hide map layers and change color with Immutable map style.</p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/layers" target="_new">
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/layers" target="_new">
View Code
</a>
</div>

View File

@ -7,7 +7,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -15,7 +15,7 @@
"immutable": "^3.8.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0",

View File

@ -6,7 +6,7 @@
"dependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -6,7 +6,7 @@
"dependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -26,7 +26,7 @@ export default class ControlPanel extends PureComponent {
<h3>Camera Transition</h3>
<p>Smooth animate of the viewport.</p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/viewport-animation" target="_new">View Code </a>
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/viewport-animation" target="_new">View Code </a>
</div>
<hr />

View File

@ -7,7 +7,7 @@
"@turf/bbox": "^6.0.1",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"react-map-gl": "^4.0.0"
"react-map-gl": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",

View File

@ -11,7 +11,7 @@ export default class ControlPanel extends PureComponent {
<h3>Zoom to Bounding Box</h3>
<p>Click on a San Fransisco Neighborhood to zoom in.</p>
<div className="source-link">
<a href="https://github.com/uber/react-map-gl/tree/3.2-release/examples/zoom-to-bounds" target="_new">View Code </a>
<a href="https://github.com/uber/react-map-gl/tree/4.1-release/examples/zoom-to-bounds" target="_new">View Code </a>
</div>
</Container>
);