Skip to content

Commit

Permalink
enlarge geojson markers and add size for smaller zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
hbruch committed Dec 21, 2024
1 parent 941da36 commit dfe752a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/util/mapIconUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ export const getMapIconScale = memoize(
glfun({
base: 1,
stops: [
[13, 0.8],
[20, 1.6],
[7, 0.5],
[13, 2.0],
[20, 4.8],
],
}),
);
Expand Down
5 changes: 3 additions & 2 deletions test/unit/component/map/PointFeatureMarker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { shallowWithIntl } from '../../helpers/mock-intl-enzyme';
import {
Component as PointFeatureMarker,
CUSTOM_ICON_MIN_ZOOM,
CUSTOM_ICON_SIZE,
getCustomIcon,
getPropertyValueOrDefault,
getRoundIcon,
Expand Down Expand Up @@ -95,7 +94,9 @@ describe('<PointFeatureMarker />', () => {
(icon.options.iconSize[0] * 1) / 2,
);
expect(icon.options.iconAnchor[0]).to.equal(icon.options.iconAnchor[1]);
expect(icon.options.iconSize[0]).to.be.at.least(CUSTOM_ICON_SIZE);
// we introduce new scaling for lower zoom levels, which can reduce the icon size below
// the custom icon size
// expect(icon.options.iconSize[0]).to.be.at.least(CUSTOM_ICON_SIZE);
expect(icon.options.iconSize[0]).to.equal(icon.options.iconSize[1]);
expect(icon.options.iconUrl).to.equal('foobar');
});
Expand Down

0 comments on commit dfe752a

Please sign in to comment.