Skip to content

feat: show features without border & ability to add a custom marker#159

Merged
jessicamcinchak merged 2 commits intomainfrom
jess/style-updates
Jul 5, 2022
Merged

feat: show features without border & ability to add a custom marker#159
jessicamcinchak merged 2 commits intomainfrom
jess/style-updates

Conversation

@jessicamcinchak
Copy link
Copy Markdown
Member

two styling features to help clarify how we highlight addresses:

  • boolean property featureBorderNone to control whether or not to show a border when highlighting an OS Feature that intersects with a point
    <my-map zoom="20" showFeaturesAtPoint featureFill="#fff" featureBorderNone />
    Screenshot from 2022-07-05 12-58-22

  • boolean property showMarker to show a marker on the map (defaults to center latitude & longitude), with optional number properties markerLatitude, markerLongitude to specify a custom latitude & longitude to place the marker at. The marker will default to a black dot, but you can pass a custom hex code or CSS color name to markerColor.
    <my-map zoom="20" showMarker />
    Screenshot from 2022-07-05 13-50-53

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 5, 2022

Deploy Preview for oslmap ready!

Name Link
🔨 Latest commit fa32965
🔍 Latest deploy log https://app.netlify.com/sites/oslmap/deploys/62c42821e60e490009f5e5b3
😎 Deploy Preview https://deploy-preview-159--oslmap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@jessicamcinchak
Copy link
Copy Markdown
Member Author

@jessicamcinchak jessicamcinchak requested a review from a team July 5, 2022 12:04
featureFill = false;

@property({ type: Boolean })
featureBorderNone = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I tend to favor positive naming schemes (e.g. featureBorder = true) as to avoid double negation (e.g. featureBorderNone = false).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #37 - had originally defaulted to positive naming schemes for boolean properties, but then learned overtime that it doesn't play so nice with Lit so now consistently declaring all boolean props false by default.

@jessicamcinchak jessicamcinchak merged commit 3d2edb4 into main Jul 5, 2022
@jessicamcinchak jessicamcinchak deleted the jess/style-updates branch July 5, 2022 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants