[Maps] use higher resolution icons with larger fixed sizes (#55596)

* [Maps] use higher resolution icons with larger fixed sizes

* [Maps] use higher resolution icons with larger fixed sizes
This commit is contained in:
Nathan Reese 2020-01-22 16:09:11 -05:00 committed by GitHub
parent 2e6f821d3f
commit 89e90648d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,8 @@ export class StaticSizeProperty extends StaticStyleProperty {
syncIconImageAndSizeWithMb(symbolLayerId, mbMap, symbolId) {
const iconPixels =
this._size >= HALF_LARGE_MAKI_ICON_SIZE ? LARGE_MAKI_ICON_SIZE : SMALL_MAKI_ICON_SIZE;
this._options.size >= HALF_LARGE_MAKI_ICON_SIZE ? LARGE_MAKI_ICON_SIZE : SMALL_MAKI_ICON_SIZE;
mbMap.setLayoutProperty(symbolLayerId, 'icon-image', `${symbolId}-${iconPixels}`);
const halfIconPixels = iconPixels / 2;
mbMap.setLayoutProperty(symbolLayerId, 'icon-size', this._options.size / halfIconPixels);