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

Split marker protocol #250

Merged
merged 6 commits into from
Apr 4, 2017
Merged

Split marker protocol #250

merged 6 commits into from
Apr 4, 2017

Conversation

sarahsnow1
Copy link
Member

Overview

This work splits the GenericMarker protocol into several smaller, more specific protocols. It also creates base implementations for each protocol. In addition, it adds style properties which prevented polygons and lines from showing on the map.

Proposed Changes

  • There are now 6 marker classes
    • PointMarker, PolylineMarker, PolygonMarker, SystemPointMarker, SelectableSystemPointMarker, and SystemPolylineMarker
  • SystemPointMarker supports current location, route location, and dropped pin points
  • SelectableSystemPointMarker supports search pins, route start pins, and route destination pins

Note: PolygonMarkers do not support having a "fill color" different from the stroke color. If this effect is wanted, the developer will have to create a PolylineMarker and overlay it above the PolygonMarker

Future work will add support for more system markers such as: transit stops, shields, transit lines, and default polygons (#249)

@sarahsnow1 sarahsnow1 force-pushed the split-marker-protocol branch from 47d0759 to e09b847 Compare April 3, 2017 16:27
Copy link
Member

@msmollin msmollin left a comment

Choose a reason for hiding this comment

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

Couple minor nitpicks.

src/Marker.swift Outdated
if !userUpdatedSize { return generateBasicStyleString() }
return "{ style: '\(PointMarker.kPointStyle)', color: '\(backgroundColor.hexValue())', size: [\(size.width)px, \(size.height)px], collide: false, interactive: \(interactive) }"
}

Copy link
Member

Choose a reason for hiding this comment

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

nitpick - carriage return.

src/Marker.swift Outdated
func updateStyleString() {
// override in subclass
}

Copy link
Member

Choose a reason for hiding this comment

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

nitpick: whitespace

@sarahsnow1 sarahsnow1 merged commit 1f9558c into master Apr 4, 2017
@sarahsnow1 sarahsnow1 deleted the split-marker-protocol branch April 4, 2017 19:25
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.

3 participants