Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion packages/map-template/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.97.0] - 2026-03-23
## [1.96.15] - 2026-03-24

### Fixed

- States when location is both highlighted and selected.

## [1.96.14] - 2026-03-23

### Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ function MapTemplate({ apiKey, gmApiKey, mapboxAccessToken, venue, locationId, p
const miSdkApiTag = document.createElement('script');
miSdkApiTag.setAttribute('type', 'text/javascript');
// Remember to update the root index.html with the same version / integrity
miSdkApiTag.setAttribute('src', 'https://app.mapsindoors.com/mapsindoors/js/sdk/4.55.0/mapsindoors-4.55.0.js.gz');
miSdkApiTag.setAttribute('integrity', 'sha384-oW7TEiuEViUPGMgbrtXn96vWoBrrtrT+tYYCaVNll6KZTr8GWS5dqjV0sdJOcyhk');
miSdkApiTag.setAttribute('crossorigin', 'anonymous');
miSdkApiTag.setAttribute('src', 'http://localhost:3001/build/index.js');
// miSdkApiTag.setAttribute('integrity', 'sha384-oW7TEiuEViUPGMgbrtXn96vWoBrrtrT+tYYCaVNll6KZTr8GWS5dqjV0sdJOcyhk');
// miSdkApiTag.setAttribute('crossorigin', 'anonymous');
document.body.appendChild(miSdkApiTag);
miSdkApiTag.onload = () => {
resolve();
Expand Down Expand Up @@ -588,6 +588,7 @@ function MapTemplate({ apiKey, gmApiKey, mapboxAccessToken, venue, locationId, p
if (currentLocation && currentLocation.id !== kioskOriginLocationId) {
if (mapsIndoorsInstance?.selectLocation) {
mapsIndoorsInstance.selectLocation(currentLocation);
mapsIndoorsInstance.highlight?.([]);
}
} else {
if (mapsIndoorsInstance?.deselectLocation) {
Expand Down
6 changes: 4 additions & 2 deletions packages/map-template/src/components/Search/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,6 @@ function Search({ onSetSize, isOpen, onOpenChat }) {
* @param {object} location
*/
function onLocationClicked(location) {
setCurrentLocation(location);

// Set the current venue to be the selected location venue.
if (location.properties.venueId.toLowerCase() !== currentVenueName.toLowerCase()) {
setCurrentVenueName(location.properties.venueId);
Expand All @@ -388,6 +386,10 @@ function Search({ onSetSize, isOpen, onOpenChat }) {
mapsIndoorsInstance.setFloor(locationFloor);
}

setTimeout(() => {
setCurrentLocation(location);
}, 500);

Promise.all([getBottomPadding(), getLeftPadding()]).then(([bottomPadding, leftPadding]) => {
mapsIndoorsInstance.goTo(location, {
maxZoom: 22,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ function ListItemLocation({ location, locationClicked, icon, isHovered, disableH
const showExternalIDs = useRecoilValue(showExternalIDsState);

useEffect(() => {
const clickHandler = customEvent => locationClicked(customEvent.detail);
const clickHandler = customEvent => {
mapsIndoorsInstance.unhoverLocation();
locationClicked(customEvent.detail);
};
const hoverHandler = debounce(() => {
// Skip hover functionality if disabled (e.g., during routing to prevent dual pins)
if (disableHover) return;
Expand All @@ -43,7 +46,7 @@ function ListItemLocation({ location, locationClicked, icon, isHovered, disableH
if (location.properties.locationSettings?.selectable !== false) {
mapsIndoorsInstance.hoverLocation(location);
}
}, 150);
});
const unhoverHandler = debounce(() => {
// Skip unhover functionality if disabled
if (disableHover) return;
Expand All @@ -52,7 +55,7 @@ function ListItemLocation({ location, locationClicked, icon, isHovered, disableH
if (location.properties.locationSettings?.selectable !== false) {
mapsIndoorsInstance.unhoverLocation(location);
}
}, 150);
});

// Add a "non-selectable" class to the non-selectable locations.
if (location.properties.locationSettings?.selectable === false) {
Expand Down