-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
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
[Maps] Load Maki icons from spritesheet #42499
Conversation
Finding this on Kibana startup
The maki object has a Anyway to resolve? |
I needed to update |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for switching the icon loading. This is great.
Can you also delete the server end point logic for /maps/sprite/maki
along with the constants SPRITE_PATH
and MAKI_SPRITE_PATH
since they are no longer used
import _ from 'lodash'; | ||
import assert from 'assert'; | ||
|
||
function createImage(image, { width, height }, channels, data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this map box code into its own file to keep isolated?
return a.href; | ||
} | ||
import { spritesheet } from '@elastic/maki'; | ||
import sprites from '@elastic/maki/dist/sprite@1.png'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to see if the device is retina display and load @2.png
if it is?
x-pack/legacy/plugins/maps/public/connected_components/map/mb/view.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also remove all of the server code for the paths no longer used?
https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/maps/server/routes.js#L274
and the static files themselves
https://github.com/elastic/kibana/tree/master/x-pack/legacy/plugins/maps/server/sprites
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Love the new arrow, boat and car-top icons. Thanks for getting all of this done
lgtm
code review, tested in chrome and firefox
Pinging @elastic/kibana-gis |
💚 Build Succeeded |
* Load Maki icons from spritesheet
This PR enables the use of @elastic/maki icons from a spritesheet. The spritesheet contains PNG icons generated from SVGs using a signed distance field algorithm.
This relies on elastic/maki#3 which creates the spritesheet. We should review and merge that PR first and create an @elastic/maki npm package.
@elastic/maki
npm package also includesarrow-es
,boat-es
, and,car-top-es
icons that will work great for directional pointingTODO