We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I handle selection markers by myself. When user zoom in and selects a marker, then map resets zoom and go to full-size mode (scale = 1).
There are appropriate functions.
onMarkerClick={(e, index) => { const isNew = !shownLabelIndexes.includes(index); const newArray = isNew ? [...shownLabelIndexes, index] : shownLabelIndexes.filter(el => el !== index); setShownLabelIndexes(newArray); // map.setScale(markerSelectionZoom); map.scale = markerSelectionZoom; }} onViewportChange={(e, scale) => { if (map && scale !== 1) { markerSelectionZoom = scale; map.scale = scale; } }}
and here my variables and state in components:
const [shownLabelIndexes, setShownLabelIndexes] = useState([]); const [ref, { width }] = useDimensions(); const mapRef = useRef(null); const map = mapRef.current && mapRef.current.getMapObject(); let markerSelectionZoom = 1;
The text was updated successfully, but these errors were encountered:
Closing for inactivity.
Sorry, something went wrong.
No branches or pull requests
I handle selection markers by myself. When user zoom in and selects a marker, then map resets zoom and go to full-size mode (scale = 1).
There are appropriate functions.
and here my variables and state in components:
The text was updated successfully, but these errors were encountered: