Skip to content

Commit

Permalink
Fix the Cluster, Heatmap and PinDrop examples (#192)
Browse files Browse the repository at this point in the history
* Update Heatmap.tsx

* Fix more examples
  • Loading branch information
ThenTech authored Oct 18, 2023
1 parent 2ba67c8 commit 28da0cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/Cluster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function Cluster(): JSX.Element {
return (
<React.Fragment>
<RMap className='example-map' initial={{center: fromLonLat([0, 0]), zoom: 1}}>
<RLayerStadia layer='toner' />
<RLayerStadia layer='stamen_toner' />
<RLayerCluster
ref={earthquakeLayer}
distance={distance}
Expand Down
2 changes: 1 addition & 1 deletion examples/Heatmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Heatmap(): JSX.Element {
return (
<React.Fragment>
<RMap className='example-map' initial={{center: fromLonLat([0, 0]), zoom: 1}}>
<RLayerStadia layer='toner' />
<RLayerStadia layer='stamen_toner' />
<RLayerHeatmap
blur={blur}
radius={radius}
Expand Down
2 changes: 1 addition & 1 deletion examples/PinDrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function PinDrop(): JSX.Element {
const coords = e.map.getCoordinateFromPixel(e.pixel);
e.target.setGeometry(new Point(coords));
// this stops OpenLayers from interpreting the event to pan the map
e.preventDefault();
e.disablePropagation();
return false;
}, [])}
onPointerDragEnd={useCallback((e) => {
Expand Down

0 comments on commit 28da0cb

Please sign in to comment.