Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Fix bug which prevented marker layer from loading #782

Merged
merged 1 commit into from
Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed
- Fix a bug which prevented the facility claims dashboard page header from loading [#778](https://github.com/open-apparel-registry/open-apparel-registry/pull/778)
- Fix a bug which prevented the vector tile marker layer from rendering [#782](https://github.com/open-apparel-registry/open-apparel-registry/pull/782)

## [2.10.0] - 2019-08-22
### Added
Expand Down
4 changes: 2 additions & 2 deletions src/app/src/components/VectorTileFacilitiesLayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ function mapStateToProps({
vectorTileLayer: { key },
}) {
const querystring = createQueryStringFromSearchFilters(filters);
const tileCacheKey = createTileCacheKeyWithEncodedFilters(querystring, key);
const tileURL = createTileURLWithQueryString(filters, tileCacheKey);
const tileCacheKey = createTileCacheKeyWithEncodedFilters(filters, key);
const tileURL = createTileURLWithQueryString(querystring, tileCacheKey, false);

return {
tileURL,
Expand Down
6 changes: 4 additions & 2 deletions src/app/src/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@ export const getContributorFromQueryString = (qs) => {
return parseInt(contributor, 10);
};

export const createTileURLWithQueryString = (qs, key) =>
`/tile/facilitygrid/${key}/{z}/{x}/{y}.pbf`.concat(isEmpty(qs) ? '' : `?${qs}`);
export const createTileURLWithQueryString = (qs, key, grid = true) =>
`/tile/${grid ? 'facilitygrid' : 'facilities'}/${key}/{z}/{x}/{y}.pbf`.concat(
isEmpty(qs) ? '' : `?${qs}`,
);

export const createTileCacheKeyWithEncodedFilters = (filters, key) =>
`${key}-${hash(filters).slice(0, 8)}`;
Expand Down