-
Notifications
You must be signed in to change notification settings - Fork 24
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
Conversation
47d0759
to
e09b847
Compare
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.
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) }" | ||
} | ||
|
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.
nitpick - carriage return.
src/Marker.swift
Outdated
func updateStyleString() { | ||
// override in subclass | ||
} | ||
|
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.
nitpick: whitespace
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
PointMarker
,PolylineMarker
,PolygonMarker
,SystemPointMarker
,SelectableSystemPointMarker
, andSystemPolylineMarker
SystemPointMarker
supports current location, route location, and dropped pin pointsSelectableSystemPointMarker
supports search pins, route start pins, and route destination pinsNote:
PolygonMarker
s do not support having a "fill color" different from the stroke color. If this effect is wanted, the developer will have to create aPolylineMarker
and overlay it above thePolygonMarker
Future work will add support for more system markers such as: transit stops, shields, transit lines, and default polygons (#249)