You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
initWithFrame - style, and access token (will add to MapView constructor?)
initWithFrame - style, and access token (will add to MapView constructor?)
initWithFrame - access token only - default style (will add to MapView constructor?)
initWithFrame - no params - throws exception about needing api key (will add to MapView constructor?)
setAccessToken
viewControllerForLayoutGuides - dont think we need it in Android?
zoomEnabled/isZoomEnabled - turn into set/get is?
scrollEnabled/isScrollEnabled - turn into set/get is?
rotateEnabled/isRotateEnabled - turn into set/get is?
centerCoordinate - no animation setter/getter?
setCenterCoordinate - with coordinate and boolean animated params
zoomLevel - no animation setter/getter?
setZoomLevel - with coordinate and boolean animated params
setCenterCoordinate - with zoom level
direction - no animation setter/getter?
setDirection - with coordinate and boolean animated params
resetNorth
setStyleJSON - @incanus how does this work? i thought we werent allowed to directly set the JSON now? (also should validate JSON before passing to native in case it causes a crash)
getRawStyle - need way to map to a Java like JSON object
toggleStyle - only TODO comment
set/getStyleOrderedLayerNames - only TODO comment
getAllStyleClasses - only TODO comment
getStyleDescriptionForLayer - only TODO comment
setStyleDescription - only TODO comment
set/getAppliedStyleClasses
I also wouldn't worry about these — the styling API originally was for demo/potential purposes and will change dramatically in future. Just setting/getting a whole stylesheet is enough for now.
These all come from an effort to mirror Apple's MKMapViewDelegate protocol, which lets the dev setup a listener of sorts that gets pinged on major map change events. These are only really necessary on Android if those sorts of lifecycle events are important to devs. This is the reason behind notify_map_change.
Activity
ljbade commentedon Nov 20, 2014
Add missing methods and properties here:
initWithFrame - style, and access token (will add to MapView constructor?)initWithFrame - style, and access token (will add to MapView constructor?)initWithFrame - access token only - default style (will add to MapView constructor?)initWithFrame - no params -throws exception about needing api key (will add to MapView constructor?)viewControllerForLayoutGuides- dont think we need it in Android?setStyleJSON - @incanus how does this work? i thought we werent allowed to directly set the JSON now? (also should validate JSON before passing to native in case it causes a crash)getRawStyle - need way to map to a Java like JSON objectsetRawStylebundledStyleNames - this requires JSON processinguseBundledStyleNamedEvents: @incanus how do these work?
ljbade commentedon Nov 22, 2014
I have also added extras (most of them leftover from June - may have copied from iOS back then):
toggleStyle - only TODO commentset/getStyleOrderedLayerNames - only TODO commentgetAllStyleClasses - only TODO commentgetStyleDescriptionForLayer - only TODO commentsetStyleDescription - only TODO commentAlso @incanus there are these files in iOS - what are they for?:
MGLTypesMGLStyleFunctionValueNSArray+MGLAdditionsNSDictionary+MGLAdditionsUIColor+MGLAdditions[-]Feature parity on android with ios[/-][+]Feature parity on Android with iOS[/+]incanus commentedon Nov 24, 2014
Styling-related; don't worry about this. This API is in flux and this was only a preview.
These are how you extend core libraries (
NS/UIprefix) with Objective-C categories. Not applicable to other platforms.incanus commentedon Nov 24, 2014
I also wouldn't worry about these — the styling API originally was for demo/potential purposes and will change dramatically in future. Just setting/getting a whole stylesheet is enough for now.
ljbade commentedon Nov 24, 2014
OK will remove style stuff for the moment.
ljbade commentedon Nov 25, 2014
@incanus what were the events I have listed above for?
incanus commentedon Nov 25, 2014
These all come from an effort to mirror Apple's
MKMapViewDelegateprotocol, which lets the dev setup a listener of sorts that gets pinged on major map change events. These are only really necessary on Android if those sorts of lifecycle events are important to devs. This is the reason behindnotify_map_change.ljbade commentedon Nov 26, 2014
@incanus that will be handy I think, for developers to be able to set up event listeners for that stuff, will look into it
ljbade commentedon Nov 30, 2014
I already have a generic listener for notify map change, and another one for passing back FPS count.
I will expand this into a more general listener that implements similar events to the delegate stuff.
incanus commentedon Dec 1, 2014
When you get into this @ljbade keep in back of mind ideas of good tests. We have some pretty wordy testing of this on iOS already:
https://github.com/mapbox/mapbox-gl-cocoa/blob/aa64e7d30ad3bb5e1b164762e40231053e8ce285/test/MapViewTests.m#L298-L345
Which basically:
ljbade commentedon Dec 1, 2014
Yeah once I get Android stable I want to add unit tests for the public API
jfirebaugh commentedon Jul 2, 2015
Closing here; this is old and should be covered in individual tickets.