Skip to content

Rewrite overlay types - #23

Merged
1ec5 merged 1 commit into
masterfrom
1ec5-overlay-struct
May 15, 2016
Merged

1ec5 merged 1 commit into
masterfrom
1ec5-overlay-struct

Conversation

@1ec5

@1ec5 1ec5 commented May 15, 2016

Copy link
Copy Markdown
Contributor

This PR rewrites Overlay.swift to be more idiomatic.

Overlay is now a protocol and its subclasses are now structs. Moved all string construction into interpolated strings in description properties. Marker and CustomMarker share a Point protocol. Renamed MarkerSize to Size and placed it under Marker. Restricted Marker.label to a new Label type that can be a Character, Int, or String. Assertions ensure valid values (although they can’t ensure valid Maki names). Renamed GeoJSON(string:) to GeoJSON(objectString:) and added a GeoJSON(object:) that takes structured data.

Added documentation throughout Overlay.swift.

Overlay is now a protocol and its subclasses are now structs. Moved all string construction into interpolated strings in description properties. Marker and CustomMarker share a Point protocol. Renamed MarkerSize to Size and placed it under Marker. Restricted Marker.label to a new Label type that can be a Character, Int, or String. Assertions ensure valid values (although they can’t ensure valid Maki names). Renamed GeoJSON(string:) to GeoJSON(objectString:) and added a GeoJSON(object:) that takes structured data.

Added documentation throughout Overlay.swift.
@1ec5 1ec5 self-assigned this May 15, 2016
@1ec5
1ec5 merged commit 8a9d50d into master May 15, 2016
@1ec5
1ec5 deleted the 1ec5-overlay-struct branch May 15, 2016 02:45
1ec5 added a commit that referenced this pull request May 15, 2016
@1ec5

1ec5 commented May 15, 2016

Copy link
Copy Markdown
Contributor Author

Updated the readme in efa59c9 (#24).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant