Skip to content
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

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

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

jessicamcinchak
Copy link
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

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
Member Author

@jessicamcinchak jessicamcinchak requested a review from a team July 5, 2022 12:04
@@ -85,9 +87,24 @@ export class MyMap extends LitElement {
@property({ type: Boolean })
featureFill = false;

@property({ type: Boolean })
featureBorderNone = false;
Copy link
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
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