dev
RekHoto 2 years ago
parent 7292ee5089
commit e225498af9

@ -9,7 +9,7 @@ import {transliterate} from "../../utils.js";
import {useUpdateLayerCounter} from "../../stores/useUpdateLayerCounter.js"; import {useUpdateLayerCounter} from "../../stores/useUpdateLayerCounter.js";
export const Layers = ({ postGroups, otherGroups }) => { export const Layers = ({ postGroups, otherGroups }) => {
const { updatePVZLayer } = useUpdateLayerCounter(); const { updateCounter, updatePVZLayer } = useUpdateLayerCounter();
return ( return (
<> <>
@ -45,7 +45,7 @@ export const Layers = ({ postGroups, otherGroups }) => {
<Source <Source
id="pvz" id="pvz"
key={`pvz-${updatePVZLayer}`} key={`pvz-${updateCounter}-${updatePVZLayer}`}
type="vector" type="vector"
tiles={[`${BASE_URL}/martin/public.service_post_and_pvz/{z}/{x}/{y}.pbf`]} tiles={[`${BASE_URL}/martin/public.service_post_and_pvz/{z}/{x}/{y}.pbf`]}
> >
@ -62,7 +62,7 @@ export const Layers = ({ postGroups, otherGroups }) => {
<Source <Source
id="other" id="other"
key={`other-${updatePVZLayer}`} key={`other-${updateCounter}-${updatePVZLayer}`}
type="vector" type="vector"
tiles={[`${BASE_URL}/martin/public.service_otherobjects/{z}/{x}/{y}.pbf`]} tiles={[`${BASE_URL}/martin/public.service_otherobjects/{z}/{x}/{y}.pbf`]}
> >

@ -9,7 +9,7 @@ import { CancelledPoints } from "./CancelledPoints";
import { useEffect } from "react"; import { useEffect } from "react";
export const Points = () => { export const Points = () => {
const { updateCounter, toggleUpdateCounter } = useUpdateLayerCounter(); const { updateCounter, toggleUpdateCounter, updatePVZLayer } = useUpdateLayerCounter();
const layer = useSourceLayerName(); const layer = useSourceLayerName();
useEffect(() => { useEffect(() => {
toggleUpdateCounter(); toggleUpdateCounter();
@ -20,7 +20,7 @@ export const Points = () => {
<Source <Source
id="points" id="points"
type="vector" type="vector"
key={`points-${updateCounter}`} key={`points-${updateCounter}-${updatePVZLayer}`}
tiles={[ tiles={[
`${BASE_URL}/martin/${layer}/{z}/{x}/{y}.pbf`, `${BASE_URL}/martin/${layer}/{z}/{x}/{y}.pbf`,
]} ]}

Loading…
Cancel
Save