Add optional pin marker icon#165
Conversation
✅ Deploy Preview for oslmap ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
27bfd3c to
c63500d
Compare
- Add optional markerImage argument that defaults to 'circle'. - If 'pin' is shown render pin instead of circle.
f3dfaa8 to
46538c9
Compare
jessicamcinchak
left a comment
There was a problem hiding this comment.
Thanks, Kate!! A very welcome improvement on the basic circle 🌚
Left one comment/suggestion - happy to chat if anything is unclear!
| useScaleBarStyle = false; | ||
|
|
||
| @property({ type: String }) | ||
| markerImage = null; |
There was a problem hiding this comment.
Can markerImage have non-null default value here?
Lit doesn't natively support an "Enum" property type, but we have a couple other example properties (drawPointer is a good one I think) where we've defined a typescript type to act as a pseudo-enum for string property types, which improves error handling and dev experience with smarter code editor suggestions. I think markerImage could be a good fit for that pattern too if you don't mind tweaking?
There was a problem hiding this comment.
Done! I like this pattern - and I think will be especially nice if we introduce other marker icons!
What
markerImageargument that defaults to 'circle'.markerImage="pin"is set render pin instead of circle.Storycard
https://trello.com/c/FexsTSCa/1020-red-line-show-the-a-pin-for-the-identified-property-according-to-map-information
Screenshot