-
Notifications
You must be signed in to change notification settings - Fork 918
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
getFocusedBuilding() #219
Comments
It's too large task currently. I accept your feature request, but let me pending for a while. |
I don't really know how to use git and pull requests so here's some quick code I wrote to implement it. import com.google.android.gms.maps.model.IndoorBuilding;
import com.google.android.gms.maps.model.IndoorLevel; private void getFocusedBuilding(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
IndoorBuilding focusedBuilding = map.getFocusedBuilding();
JSONObject result = new JSONObject();
if (focusedBuilding != null) {
JSONArray levels = new JSONArray();
for(IndoorLevel level : focusedBuilding.getLevels()){
JSONObject levelInfo = new JSONObject();
levelInfo.put("name",level.getName());
levelInfo.put("shortName",level.getShortName());
levels.put(levelInfo);
}
result.put("activeLevelIndex",focusedBuilding.getActiveLevelIndex());
result.put("defaultLevelIndex",focusedBuilding.getDefaultLevelIndex());
result.put("levels",levels);
result.put("underground",focusedBuilding.isUnderground());
callbackContext.success(result);
} else {
callbackContext.success(result);
}
} App.prototype.getFocusedBuilding = function(callback) {
var self = this;
cordova.exec(callback, this.errorHandler, PLUGIN_NAME, 'getFocusedBuilding', []);
}; |
Thank you for your code, but I don't implement without iOS code. |
Fair enough. At least it's here if anyone else wants to edit it in themselves. I'll write the iOS code in the future as well if you don't have the chance since I'll eventually need it too. |
Sorry for inconvenience. In order to send a pull request, folk this repository at once, then add the code on your repository. |
No worries! I'll do a pull request in the near future. |
Thank you. |
…mented #219 by it. Thank you for sending the grateful pull request, @meetshawn. You save my time 👍
|
It would be great to have access to this since indoor functionality isn't available on the javascript api yet.
The text was updated successfully, but these errors were encountered: