Skip to content

Commit ee99b8e

Browse files
committed
Fix links for new URL
1 parent cbeab69 commit ee99b8e

File tree

23 files changed

+80
-82
lines changed

23 files changed

+80
-82
lines changed

.storybook/main.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ const config: StorybookConfig = {
2828
docs: {},
2929
staticDirs: ['./static'],
3030
viteFinal: async (config, { configType }) => {
31-
console.log('configType');
32-
console.log(configType);
3331
if (configType === 'PRODUCTION') {
3432
config.base = '/ee-react-map-demos/';
3533
}

src/stories/Alternatives.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import { Meta } from '@storybook/blocks';
6969

7070
## Map tile layers
7171

72-
#### [Amsterdam Base Layer](../?path=/docs/alternatives--docs)
72+
#### [Amsterdam Base Layer](./?path=/docs/alternatives--docs)
7373

7474
#### [NL Maps](https://nlmaps.nl/)
7575

src/stories/Intro.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For each demo we also try to include documentation with following structure:
5555
/>
5656
<h4 className="sb-section-item-heading">Amsterdam Base Layer</h4>
5757
<p className="sb-section-item-paragraph">How to implement a Leaflet map using the Amsterdam base tile layer.</p>
58-
<a href="../?path=/docs/react-baselayer--docs">Learn more<RightArrow /></a>
58+
<a href="./?path=/docs/react-baselayer--docs">Learn more<RightArrow /></a>
5959
</div>
6060
<div className="sb-section-item">
6161
<img
@@ -64,14 +64,14 @@ For each demo we also try to include documentation with following structure:
6464
/>
6565
<h4 className="sb-section-item-heading">Marker</h4>
6666
<p className="sb-section-item-paragraph">How to implement a Leaflet point marker.</p>
67-
<a href="../?path=/docs/react-marker--docs">Learn more<RightArrow /></a>
67+
<a href="./?path=/docs/react-marker--docs">Learn more<RightArrow /></a>
6868
</div>
6969
<div className="sb-section-item">
7070
<img src={Intro02} alt="An example of GeoJSON map layer" />
7171
<div>
7272
<h4 className="sb-section-item-heading">GeoJSON</h4>
7373
<p className="sb-section-item-paragraph">Learn about the format and powers of the GeoJSON layer.</p>
74-
<a href="../?path=/docs/react-geojson--docs">Learn more<RightArrow /></a>
74+
<a href="./?path=/docs/react-geojson--docs">Learn more<RightArrow /></a>
7575
</div>
7676
</div>
7777
</div>
@@ -86,25 +86,25 @@ For each demo we also try to include documentation with following structure:
8686
<img src={Intro03} alt="A screenshot showing the multiple marker selection demo" />
8787
<h4 className="sb-section-item-heading">Multiple Marker Selection</h4>
8888
<p className="sb-section-item-paragraph">Learn how to display and select Amsterdam taxi stand locations in a Leaflet map with the help of React's context.</p>
89-
<a href="../?path=/docs/react-context-examples-multimarkerselect--docs">Learn more<RightArrow /></a>
89+
<a href="./?path=/docs/react-context-examples-multimarkerselect--docs">Learn more<RightArrow /></a>
9090
</div>
9191
<div className="sb-grid-item">
9292
<img src={Intro04} alt="A screenshot showing a marker cluster demo" />
9393
<h4 className="sb-section-item-heading">Marker Clustering</h4>
9494
<p className="sb-section-item-paragraph">Learn how to handle large numbers of markers through clustering.</p>
95-
<a href="../?path=/docs/react-markerclusterspiderfy--docs">Learn more<RightArrow /></a>
95+
<a href="./?path=/docs/react-markerclusterspiderfy--docs">Learn more<RightArrow /></a>
9696
</div>
9797
<div className="sb-grid-item">
9898
<img src={Intro05} alt="A screenshot showing a Leaflet map combined with elements from Amsterdam Design System" />
9999
<h4 className="sb-section-item-heading">Zoom Controls + Amsterdam Design System</h4>
100100
<p className="sb-section-item-paragraph">Learn how to implement custom zoom controls and wrap a Leaflet map with components from Amsterdam Design System</p>
101-
<a href="../?path=/docs/react-context-examples-zoomcontrolsfullscreen--docs">Learn more<RightArrow /></a>
101+
<a href="./?path=/docs/react-context-examples-zoomcontrolsfullscreen--docs">Learn more<RightArrow /></a>
102102
</div>
103103
<div className="sb-grid-item">
104104
<img src={Intro06} alt="A screenshot of an Amsterdam WFS layer" />
105105
<h4 className="sb-section-item-heading">WFS Layer</h4>
106106
<p className="sb-section-item-paragraph">Learn how to connect with a WFS endpoint and show the buildings of Amsterdam on a Leaflet map.</p>
107-
<a href="../?path=/docs/react-wfslayer--docs">Learn more<RightArrow /></a>
107+
<a href="./?path=/docs/react-wfslayer--docs">Learn more<RightArrow /></a>
108108
</div>
109109
</div>
110110
</div>

src/stories/Layers.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Markers can be customized with icons, popups, and tooltips to provide additional
5050
The Marker examples show how to create a simple map with markers at specific locations.
5151
See:
5252

53-
- Example: [Marker (React + Leaflet)](../?path=/docs/react-marker--docs)
54-
- Example: [Marker (React + React-leaflet)](../?path=/docs/react-leaflet-marker--docs)
53+
- Example: [Marker (React + Leaflet)](./?path=/docs/react-marker--docs)
54+
- Example: [Marker (React + React-leaflet)](./?path=/docs/react-leaflet-marker--docs)
5555

5656
### Usage scenarios
5757

@@ -85,8 +85,8 @@ You can also create custom tile layers using your own tile server or by using a
8585
The TileLayer is used in the BaseLayer examples in this guide. The BaseLayer examples show how to create a simple map with a tile layer as the base layer.
8686
See:
8787

88-
- Example: [BaseLayer (React + Leaflet)](../?path=/docs/react-baselayer--docs)
89-
- Example: [BaseLayer (React + React-leaflet)](../?path=/docs/react-leaflet-baselayer--docs)
88+
- Example: [BaseLayer (React + Leaflet)](./?path=/docs/react-baselayer--docs)
89+
- Example: [BaseLayer (React + React-leaflet)](./?path=/docs/react-leaflet-baselayer--docs)
9090

9191
## VideoOverlay
9292

@@ -104,8 +104,8 @@ The WMS examples show how to create a simple map with a WMS layer.
104104

105105
See:
106106

107-
- Example: [WMSLayer (React + Leaflet)](../?path=/docs/react-wmslayer--docs)
108-
- Example: [WMSLayer (React + React-leaflet)](../?path=/docs/react-leaflet-wmslayer--docs)
107+
- Example: [WMSLayer (React + Leaflet)](./?path=/docs/react-wmslayer--docs)
108+
- Example: [WMSLayer (React + React-leaflet)](./?path=/docs/react-leaflet-wmslayer--docs)
109109

110110
### Usage scenarios
111111

@@ -140,8 +140,8 @@ A **Polyline** in Leaflet is used to draw a series of connected line segments on
140140

141141
See:
142142

143-
- Example: [PolylineLayer (React + Leaflet)](../?path=/docs/react-polylinelayer--docs)
144-
- Example: [PolylineLayer (React + React-leaflet)](../?path=/docs/react-leaflet-polylinelayer--docs)
143+
- Example: [PolylineLayer (React + Leaflet)](./?path=/docs/react-polylinelayer--docs)
144+
- Example: [PolylineLayer (React + React-leaflet)](./?path=/docs/react-leaflet-polylinelayer--docs)
145145

146146
### Usage Scenarios
147147

@@ -159,8 +159,8 @@ The Polygon layer in Leaflet is similar to a [Polyline](#polyline) but it forms
159159

160160
See:
161161

162-
- Example: [PolygonLayer (React + Leaflet)](../?path=/docs/react-polygonlayer--docs)
163-
- Example: [PolygonLayer (React + React-leaflet)](../?path=/docs/react-leaflet-polygonlayer--docs)
162+
- Example: [PolygonLayer (React + Leaflet)](./?path=/docs/react-polygonlayer--docs)
163+
- Example: [PolygonLayer (React + React-leaflet)](./?path=/docs/react-leaflet-polygonlayer--docs)
164164

165165
### Usage Scenarios
166166

@@ -190,8 +190,8 @@ GeoJSON layers can be used to display points, lines, polygons, and other vector
190190

191191
The GeoJSON examples show how to create a simple map with a GeoJSON layer.
192192

193-
- Example: [GeoJSON (React + Leaflet)](../?path=/docs/react-geojson--docs)
194-
- Example: [GeoJSON (React + React-leaflet)](../?path=/docs/react-leaflet-geojsonlayer--docs)
193+
- Example: [GeoJSON (React + Leaflet)](./?path=/docs/react-geojson--docs)
194+
- Example: [GeoJSON (React + React-leaflet)](./?path=/docs/react-leaflet-geojsonlayer--docs)
195195

196196
## MVT (Mapbox Vector Tiles)
197197

@@ -211,5 +211,5 @@ The WFS examples show how to create a simple map with a WFS layer. (without the
211211

212212
See:
213213

214-
- Example: [WFSLayer (React + Leaflet)](../?path=/docs/react-wfslayer--docs)
215-
- Example: [WFSLayer (React + React-leaflet)](../?path=/docs/react-leaflet-wfslayer--docs)
214+
- Example: [WFSLayer (React + Leaflet)](./?path=/docs/react-wfslayer--docs)
215+
- Example: [WFSLayer (React + React-leaflet)](./?path=/docs/react-leaflet-wfslayer--docs)

src/stories/MarkerClustering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ Makes it easier for users to identify areas with high concentrations of markers.
3030
- [Supercluster](https://github.com/mapbox/supercluster)
3131
- [Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster)
3232

33-
*We recommend the Supercluster library. The [clustering examples](../?path=/docs/react-markercluster--docs) in this project use Supercluster. This [blog post](https://blog.mapbox.com/clustering-millions-of-points-on-a-map-with-supercluster-272046ec5c97) explains the improved performance from [Supercluster](https://github.com/mapbox/supercluster).*
33+
*We recommend the Supercluster library. The [clustering examples](./?path=/docs/react-markercluster--docs) in this project use Supercluster. This [blog post](https://blog.mapbox.com/clustering-millions-of-points-on-a-map-with-supercluster-272046ec5c97) explains the improved performance from [Supercluster](https://github.com/mapbox/supercluster).*

src/stories/pages/Context/Context.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ Often with React and Leaflet, you may find the need to communicate/interact with
1818

1919
This is when <a href="https://react.dev/learn/passing-data-deeply-with-context" target="_blank">React context</a> can help, these examples demonstrate various mapping solutions using React's context.
2020

21-
#### [Multiple Marker Select](../?path=/docs/react-context-examples-multimarkerselect--docs) *(Advanced)*
21+
#### [Multiple Marker Select](./?path=/docs/react-context-examples-multimarkerselect--docs) *(Advanced)*
2222

2323
Using Amsterdam taxi stands from the [Parkeervakken (Parking Spaces) API](https://api.data.amsterdam.nl/v1/parkeervakken/), you can select multiple layers. The context stores the selected layer IDs.
2424

25-
#### [Position](../?path=/docs/react-context-examples-position--docs) *(Simple)*
25+
#### [Position](./?path=/docs/react-context-examples-position--docs) *(Simple)*
2626

27-
Using the Amsterdam [BaseLayer](../?path=/docs/react-baselayer--docs) we display the map center point coordinates, including when the map moves.
27+
Using the Amsterdam [BaseLayer](./?path=/docs/react-baselayer--docs) we display the map center point coordinates, including when the map moves.
2828

29-
#### [Single marker select](../?path=/docs/react-context-examples-singlemarkerselect--docs) *(Advanced)*
29+
#### [Single marker select](./?path=/docs/react-context-examples-singlemarkerselect--docs) *(Advanced)*
3030

31-
Similar to the [MultiMarkerSelect example](../?path=/story/react-context-examples-multimarkerselect--default) this is using locations of glass disposal points from the [Afvalwijzer (Waste guide) API](https://api.data.amsterdam.nl/v1/afvalwijzer). You can select a single marker. The context stores the selected marker ID.
31+
Similar to the [MultiMarkerSelect example](./?path=/story/react-context-examples-multimarkerselect--default) this is using locations of glass disposal points from the [Afvalwijzer (Waste guide) API](https://api.data.amsterdam.nl/v1/afvalwijzer). You can select a single marker. The context stores the selected marker ID.
3232

33-
#### [Zoom controls](../?path=/docs/react-context-examples-zoom-controls--docs) *(Simple)*
33+
#### [Zoom controls](./?path=/docs/react-context-examples-zoom-controls--docs) *(Simple)*
3434

3535
This demonstrates custom control buttons (from the [Amsterdam design system](https://designsystem.amsterdam.nl/)) that control the map zoom levels. It uses context to interact directly with the Leaflet map object.
3636

37-
#### [Full-screen zoom controls](../?path=/docs/react-context-examples-full-screen-zoom-controls--docs) *(Simple)*
37+
#### [Full-screen zoom controls](./?path=/docs/react-context-examples-full-screen-zoom-controls--docs) *(Simple)*
3838

3939
Wrapped in components from the [Amsterdam design system](https://designsystem.amsterdam.nl/), this demonstrates custom control buttons that control the map zoom levels in an Amsterdam style webpage. It uses context to interact directly with the Leaflet map object.
4040

@@ -67,7 +67,7 @@ If the answer to any of the following is **no**, context probably isn't useful f
6767

6868
## Advanced structure tips
6969

70-
- Setup a 'Provider' component, to setup the initial state. Wrap this `Provider` component around all components that should inherit context state and methods. [See example](../?path=/docs/react-context-examples-multimarkerselect--docs#--mapprovidertsx).
70+
- Setup a 'Provider' component, to setup the initial state. Wrap this `Provider` component around all components that should inherit context state and methods. [See example](./?path=/docs/react-context-examples-multimarkerselect--docs#--mapprovidertsx).
7171

7272
- When combined with TypeScript, definitions and undefined/null properties can make things confusing. This is where TypeScript's [`NonNullable`](https://www.typescriptlang.org/docs/handbook/utility-types.html#nonnullabletype) is useful. For example:
7373

src/stories/pages/Context/Position/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import mapStyles from '@/pages/ContextExamples/map.module.css?raw';
2222

2323
## Description
2424

25-
This is a simple Context example using the Amsterdam [BaseLayer](../?path=/docs/react-baselayer--docs) to display the map center point coordinates, including when the map moves.
25+
This is a simple Context example using the Amsterdam [BaseLayer](./?path=/docs/react-baselayer--docs) to display the map center point coordinates, including when the map moves.
2626

2727
In the `Map.tsx` component after creating the new Leaflet map (line #21) we add an event listener for `mapmove` (line #47). In this callback we update the position context state:
2828

src/stories/pages/React/BaseLayer/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import getCrsRd from '@/utils/getCrsRd?raw';
88

99
# BaseLayer
1010

11-
**[Background](../?path=/docs/leaflet-layers--docs#tilelayer)** | **<a href="https://github.com/Amsterdam/ee-react-map-demos/tree/main/src/pages/BaseLayer" target="_blank">GitHub Repo URL</a>**
11+
**[Background](./?path=/docs/leaflet-layers--docs#tilelayer)** | **<a href="https://github.com/Amsterdam/ee-react-map-demos/tree/main/src/pages/BaseLayer" target="_blank">GitHub Repo URL</a>**
1212

1313
#### Table of Contents
1414

@@ -20,7 +20,7 @@ import getCrsRd from '@/utils/getCrsRd?raw';
2020

2121
## Requirements
2222

23-
- [See global requirements list](../?path=/docs/global-requirements--docs)
23+
- [See global requirements list](./?path=/docs/global-requirements--docs)
2424
- CRS handling ([utils/getCrsRd.ts](#1-getcrsrdts))
2525

2626
## Description
@@ -33,7 +33,7 @@ This is the Amsterdam base/tile layer on a plain Leaflet map.
3333

3434
A <a href="https://leafletjs.com/reference.html#tilelayer" target="_blank">TileLayer</a> is composed of images, such as satellite imagery, that are composed of square tiles mosaicked together in columns and rows, giving the layer the appearance that it is one continuous image. These layers have several levels of detail (LOD) that permit users to zoom in to any region of the map and load additional tiles that depict features in higher resolution at larger map scales.
3535

36-
The datateam Geo makes various reference maps based on reference data from team BenK (Basis- en Kernregistraties). They are available in [various reference systems (Rijksdriehoek and Web Mercator)](../?path=/docs/coordinate-reference-systems-crs--docs) and the following visualizations:
36+
The datateam Geo makes various reference maps based on reference data from team BenK (Basis- en Kernregistraties). They are available in [various reference systems (Rijksdriehoek and Web Mercator)](./?path=/docs/coordinate-reference-systems-crs--docs) and the following visualizations:
3737

3838
- Standard (standaard)
3939
- Black and white (zwart-wit)

src/stories/pages/React/GeoJSONLayer/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import data from '@/pages/GeoJSONLayer/data.json?raw';
2020

2121
## Requirements
2222

23-
- This example is built upon the [BaseMap component example](../?path=/docs/react-baselayer--docs).
24-
- [See global requirements list](../?path=/docs/global-requirements--docs)
23+
- This example is built upon the [BaseMap component example](./?path=/docs/react-baselayer--docs).
24+
- [See global requirements list](./?path=/docs/global-requirements--docs)
2525

2626
## Description
2727

src/stories/pages/React/Marker/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import icon from '@/assets/icons/map-marker.svg?raw';
99

1010
# Marker
1111

12-
**[Background and use cases](../?path=/docs/leaflet-layers--docs#marker)** | **<a href="https://github.com/Amsterdam/ee-react-map-demos/tree/main/src/pages/Marker" target="_blank">GitHub Repo URL</a>**
12+
**[Background and use cases](./?path=/docs/leaflet-layers--docs#marker)** | **<a href="https://github.com/Amsterdam/ee-react-map-demos/tree/main/src/pages/Marker" target="_blank">GitHub Repo URL</a>**
1313

1414
#### Table of Contents
1515

@@ -20,14 +20,14 @@ import icon from '@/assets/icons/map-marker.svg?raw';
2020

2121
## Requirements
2222

23-
- [See global requirements list](../?path=/docs/global-requirements--docs)
24-
- This example is built upon the [BaseMap component example](../?path=/docs/react-baselayer--docs).
23+
- [See global requirements list](./?path=/docs/global-requirements--docs)
24+
- This example is built upon the [BaseMap component example](./?path=/docs/react-baselayer--docs).
2525

2626
## Description
2727

2828
A marker is used to display a location on a map. By default, a marker is a HTML image element rendered inside the parent map DOM element. This marker element can be configured, extended and (like in this example) replaced with another icon.
2929

30-
In this code example, the default Leaflet marker (<a href="https://leafletjs.com/examples/layers-control/" target="_blank">example</a>) is replaced with the `L.icon` (<a href="https://leafletjs.com/reference.html#icon" target="_blank">docs</a>); another alternative to this is the `L.divIcon` (<a href="https://leafletjs.com/reference.html#divicon" target="_blank">docs</a>). [Read more Leaflet icons here](../?path=/docs/icons--docs).
30+
In this code example, the default Leaflet marker (<a href="https://leafletjs.com/examples/layers-control/" target="_blank">example</a>) is replaced with the `L.icon` (<a href="https://leafletjs.com/reference.html#icon" target="_blank">docs</a>); another alternative to this is the `L.divIcon` (<a href="https://leafletjs.com/reference.html#divicon" target="_blank">docs</a>). [Read more Leaflet icons here](./?path=/docs/icons--docs).
3131

3232
The primary code in regards to creating a Leaflet marker, is lines 50-59:
3333

0 commit comments

Comments
 (0)