Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Typo fixes, added line to MGLStyleLayer initializer description #7759

Merged
merged 4 commits into from Jan 18, 2017

Conversation

jmkiley
Copy link
Contributor

@jmkiley jmkiley commented Jan 17, 2017

  • Corrected typos in MGLMapView.h and MGLMapCamera.h
  • Removed line from MGLShapeCollection.h
  • Inserted a reminder in MGLStyleLayer.h initializer description to remind user not to initialize MGLStyleLayer directly

@mention-bot
Copy link

@jmkiley, thanks for your PR! By analyzing this pull request, we identified @1ec5, @friedbunny and @incanus to be potential reviewers.

@@ -28,9 +28,6 @@ NS_ASSUME_NONNULL_BEGIN
convenient to use an `MGLPointCollection`, `MGLMultiPolyline`, or
`MGLMultiPolygon` object, respectively.

A multipolyline is known as a
<a href="https://tools.ietf.org/html/rfc7946#section-3.1.8">GeometryCollection</a>
geometry in GeoJSON.
Copy link
Contributor

Choose a reason for hiding this comment

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

This sentence was correct except for the inclusion of “multipolyline” instead of “shape collection”.

`-[MGLStyle insertLayer:belowLayer:]` method. Should not be used to create an
instance of MGLStyleLayer directly. Instead, create instances of
`MGLBackgroundStyleLayer` and the concrete subclasses of
`MGLForegroundStyleLayer`.
Copy link
Contributor

Choose a reason for hiding this comment

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

This change will get overwritten the next time someone runs make style-code-darwin. This documentation is defined in style-spec-overrides-v8.json.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, this is the one layer file that isn’t autogenerated, so you can put the additional text directly in here. Sorry for the confusion.

@jmkiley jmkiley added documentation iOS Mapbox Maps SDK for iOS labels Jan 17, 2017
@jmkiley
Copy link
Contributor Author

jmkiley commented Jan 17, 2017

Removed the change to MGLStyleLayer.h, edited the line in MGLShapeCollection.h. cc @1ec5

@1ec5
Copy link
Contributor

1ec5 commented Jan 17, 2017

Did you still want to point this out?

Should not be used to create an instance of MGLStyleLayer directly. Instead, create instances of MGLBackgroundStyleLayer and the concrete subclasses of MGLForegroundStyleLayer.

You can do that in style-spec-overrides-v8.json, then run make style-code-darwin. You should see the line magically reappear in the header as a result.

Regarding this note, I’d say something like the following, so developers know they can use this initializer, just not on MGLStyleLayer itself:

The default implementation of this initializer in MGLStyleLayer creates an invalid style layer. Call this initializer on MGLBackgroundStyleLayer or one of the concrete subclasses of MGLForegroundStyleLayer to create a valid style layer.

@boundsj boundsj added this to the ios-v3.4.0 milestone Jan 17, 2017
@jmkiley
Copy link
Contributor Author

jmkiley commented Jan 18, 2017

Inserted the line @1ec5 wrote into the MGLStyleLayer initializer method.

@jmkiley jmkiley merged commit e38216d into release-ios-v3.4.0 Jan 18, 2017
@jmkiley jmkiley deleted the jmkiley-docs-edits branch January 18, 2017 04:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants