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

[WIP] Traffic plugin #9

Merged
merged 44 commits into from
Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c668d1e
Added traffic layers
Aug 30, 2017
7fd48a7
Moved files, fixed import
Aug 30, 2017
2918d13
Added method to select layer
Aug 31, 2017
a152b6e
More refactoring of layer methods
Aug 31, 2017
40d9c89
Added ReadMe
Aug 31, 2017
a0c9bb5
Edited ReadMe
Aug 31, 2017
7705747
More ReadMe tweaks
Aug 31, 2017
f91405c
Added method documentation
Aug 31, 2017
4b40bfd
Added a comment.
Aug 31, 2017
5df3231
Refactored, added method to add traffic above a layer
Aug 31, 2017
9b67e32
Refactored, added method to add traffic above a layer
Aug 31, 2017
7b69be8
Edited ReadMe, project schemes
Aug 31, 2017
860a970
Edited ReadMe
Aug 31, 2017
cf8fb8f
Edited ReadMe, .gitignore
Aug 31, 2017
4f3aa6a
Reorganized project, updated ReadMe, LocalizationPlugin -> TrafficPl…
Sep 5, 2017
543c321
Added framework to podspec
Sep 5, 2017
d042115
Fixed typo, changed framework path
Sep 5, 2017
94a48c0
Changed Mapbox import
Sep 6, 2017
40e110f
updated import. again.
Sep 6, 2017
1bfac30
Updated podspec
Sep 7, 2017
0afafb1
Edited ReadMe
Sep 8, 2017
e1630d2
Added CONTRIBUTING.md
Sep 8, 2017
eb6e790
Edits to ReadMe and Contributing.md
Sep 8, 2017
4b923d9
Edited ReadMe
Sep 8, 2017
1b8af7b
Edited ReadMe
Sep 8, 2017
082f207
Split up ReadMe
Sep 8, 2017
8079053
Added Gif
jmkiley Sep 8, 2017
ee348aa
Started to address @1ec5's feedback.
Sep 9, 2017
bbad61a
Addressed @1ec5's feedback, edited gitignore
Sep 11, 2017
8ab9926
More edits, replaced gif
Sep 11, 2017
2d3c1cc
new -> array
Sep 11, 2017
e92db09
Edited method to remove traffic
Sep 11, 2017
720bebf
Edited podspec
Sep 12, 2017
b7851ad
Maps Plugins -> Mapbox Plugins
Sep 12, 2017
569c9e7
Edited ReadMe for Traffic Plugin
Sep 13, 2017
5617295
Started to address @friedbunny's feedback
Sep 14, 2017
b75e474
removed build, framework, mapbox_access_token
Sep 14, 2017
c55b5db
Addressed @1ec5's suggestions
Sep 15, 2017
c3619bf
Renamed some methods
Sep 16, 2017
1fd4ed6
Updated podspec
Sep 16, 2017
411fb28
updated screenshot URL
Sep 16, 2017
79d2755
Addressed @1ec5's feedback
Sep 18, 2017
c51c5d0
revisions, fixed typo
Sep 19, 2017
e5f966d
Bumped podspec
Sep 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.DS_Store

*.framework
*.build/*
xcuserdata
*.xccheckout
*.moved-aside
*.xcuserstate
*.xcscmblueprint
mapbox_access_token

Carthage/
Pods
*.xcworkspace
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

1 change: 0 additions & 1 deletion Cartfile.resolved

This file was deleted.

12 changes: 12 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contributing

We welcome contributions to Mapbox Plugins for iOS. In order to add a plugin, please open an issue outlining the plugin. This allow contributors to discuss the proposal and also ensure that there isn't already work being done on that feature.

If you are interested in reporting a bug, please open an issue that includes steps to reproduce the issue. Suggestions for how to improve existing plugins are also welcome.


# Code of conduct

Everyone is invited to participate in Mapbox’s open source projects and public discussions: we want to create a welcoming and friendly environment. Harassment of participants or other unethical and unprofessional behavior will not be tolerated in our spaces. The [Contributor Covenant](http://contributor-covenant.org) applies to all projects under the Mapbox organization and we ask that you please read [the full text](http://contributor-covenant.org/version/1/2/0/).

You can learn more about our open source philosophy on [mapbox.com](https://www.mapbox.com/about/open/).
2 changes: 1 addition & 1 deletion LocalizationPlugin/Info.plist → Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Localization</string>
<string>Traffic</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
13 changes: 13 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright © 2017, Mapbox

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
9 changes: 0 additions & 9 deletions LocalizationPlugin/LocalizationPlugin.h

This file was deleted.

6 changes: 0 additions & 6 deletions LocalizationPlugin/MBXLocalizationPlugin.h

This file was deleted.

63 changes: 0 additions & 63 deletions LocalizationPlugin/MBXLocalizationPlugin.m

This file was deleted.

15 changes: 0 additions & 15 deletions LocalizationPlugin/MGLVectorSource+MBXAdditions.h

This file was deleted.

53 changes: 0 additions & 53 deletions LocalizationPlugin/MGLVectorSource+MBXAdditions.m

This file was deleted.

47 changes: 47 additions & 0 deletions MapboxPlugins.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#

s.name = "MapboxPlugins"
s.version = "0.0.1"
s.summary = "Experimental plugins to supercharge your maps."

# This description is used to generate tags and improve search results.
s.description = "Add plugins to your Mapbox basemaps. Each plugin is packaged as a subspec. At the moment, the following plugin is available:
* “Traffic” adds traffic congestion layers to a map view.
Mapbox Plugins require version 3.6 of the Mapbox iOS SDK or higher."
s.homepage = "https://github.com/mapbox/mapbox-plugins-ios/"
Copy link
Contributor

Choose a reason for hiding this comment

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

We can specify trafficplugin.gif as s.screenshots, unless there’s a better screenshot to use here. s.screenshots requires a URL to an image that exists on a server. So we can use the raw URL to the image on GitHub, but make sure to use a permalink, ideally with the tag in the URL (example).

s.screenshot = 'https://github.com/mapbox/mapbox-plugins-ios/blob/master/TrafficPlugin/trafficplugin.gif'
Copy link
Contributor

Choose a reason for hiding this comment

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

This will need to be a URL to a raw image, not its HTML description page. I think it’ll be:

https://raw.githubusercontent.com/mapbox/mapbox-plugins-ios/master/TrafficPlugin/trafficplugin.gif

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, missed the previous feedback. Thanks!

# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

s.license = { :type => "ISC", :file => "LICENSE.md" }

# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

s.author = { "Mapbox" => "[email protected]" }
s.social_media_url = "https://twitter.com/mapbox"

# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#

s.platform = :ios, "8.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Believe it or not, I think the code in PluginKit and Traffic would also compile just fine on macOS with the Mapbox-macOS-SDK pod. Not sure if there’s a way to specify different dependencies based on the platform, though.


# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

s.source = { :git => "https://github.com/mapbox/mapbox-plugins-ios.git", :branch => "traffic-plugin" }

s.module_name = 'MapboxPlugins'

s.subspec 'PluginKit' do |core|
core.source_files = 'PluginKit/*.h'
core.dependency 'Mapbox-iOS-SDK'
Copy link
Contributor

Choose a reason for hiding this comment

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

We should specify a minimum version of any dependency. v3.6 is a reasonable minimum, given that the traffic plugin uses the camera and style function syntaxes introduced in that version.

end

s.subspec 'Traffic' do |traffic|
traffic.source_files = 'TrafficPlugin/*.{h,m}'
traffic.dependency 'MapboxPlugins/PluginKit'
end

end
Loading