Skip to content

Commit

Permalink
StaticDatasets: rename pmtilesUrl() to createPmtilesUrl()
Browse files Browse the repository at this point in the history
  • Loading branch information
elsueno committed Jun 5, 2024
1 parent 144e5e4 commit 7a239bd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { Layer, Source } from 'react-map-gl/maplibre'
import { useRegionSlug } from 'src/app/regionen/[regionSlug]/_components/regionUtils/useRegionSlug'
import { pmtilesUrl } from './utils/pmtilesUrl'
import { createPmtilesUrl } from './utils/createPmtilesUrl'

export const SourcesLayersRegionMask: React.FC = () => {
const regionSlug = useRegionSlug()
Expand All @@ -14,7 +14,7 @@ export const SourcesLayersRegionMask: React.FC = () => {
if (!regionSlug) return null

return (
<Source id="mask" key={`source:${id}`} type="vector" url={pmtilesUrl(url)}>
<Source id="mask" key={`source:${id}`} type="vector" url={createPmtilesUrl(url)}>
<Layer
id="mask-buffer"
type="fill"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '../../utils/sourceKeyUtils/sourceKeyUtilsStaticDataset'
import { layerVisibility } from '../utils/layerVisibility'
import { wrapFilterWithAll } from './utils/filterUtils/wrapFilterWithAll'
import { pmtilesUrl } from './utils/pmtilesUrl'
import { createPmtilesUrl } from './utils/createPmtilesUrl'

export const SourcesLayersStaticDatasets: React.FC = () => {
const { dataParam: selectedDatasetIds } = useDataParam()
Expand All @@ -31,7 +31,7 @@ export const SourcesLayersStaticDatasets: React.FC = () => {
id={datasetSourceId}
key={datasetSourceId}
type={type}
url={pmtilesUrl(url)}
url={createPmtilesUrl(url)}
attribution={attributionHtml}
>
{layers.map((layer) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const createPmtilesUrl = (url: string) => {
return `pmtiles://${url}`
}

This file was deleted.

0 comments on commit 7a239bd

Please sign in to comment.