dev
RekHoto 2 years ago
parent 7292ee5089
commit e225498af9

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

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

Loading…
Cancel
Save