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

Use Activity to initialize Google Map #449

Merged
merged 1 commit into from
Aug 31, 2016

Conversation

alvinthen
Copy link
Contributor

Update AirMapManager to use Activity obtained from ReactContextBaseJavaModule (part of update from RN v0.29.0)

This might address issues like #165

Note: Not tested for backward compatibility

@christopherdro
Copy link
Collaborator

/cc @felipecsl

@jeveloper
Copy link

This should resolve that problem of using multiple mapviews

@@ -57,7 +58,7 @@ protected AirMapView createViewInstance(ThemedReactContext context) {
reactContext = context;

try {
MapsInitializer.initialize(this.appContext);
MapsInitializer.initialize(new AirMapModule(this.appContext).getActivity());
Copy link
Contributor

Choose a reason for hiding this comment

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

nice hack

@felipecsl
Copy link
Contributor

lgtm. needs to be rebased though

@jeveloper
Copy link

hey @spikebrehm appreciate for your push on 0.8 :)

Mind looking into publishing this change

#453

It's a case where there is more than one mapview and one of the devs tested out a fix.

Thank you

@spikebrehm
Copy link

Great, we're happy to merge this, it just needs a rebase. Ping @alvinthen

@alvinthen
Copy link
Contributor Author

alvinthen commented Aug 31, 2016

Updated with rebased branch, if I did it correctly.

@spikebrehm
Copy link

Thanks!

@jeveloper
Copy link

Thanks @spikebrehm Thats awesome

@alvinthen alvinthen deleted the use-activity branch September 1, 2016 02:03
@rops
Copy link
Contributor

rops commented Sep 1, 2016

I think this change is conflicting with e77765d , as lib was removed, together with its gradle files. Either need to move this into main src or restore gradle files for lib

@spikebrehm
Copy link

@rops you're right! I'll fix it.

spikebrehm pushed a commit that referenced this pull request Sep 2, 2016
The PR that added `AirMapModule` (#449) was merged after the PR that
moved all the `lib/src/*` files to just `src/*` (#502). Fix it by moving
`AirMapModule` to `src/`.
@spikebrehm
Copy link

@rops the fix is here: #526

igrayson pushed a commit to JAStanton/react-native-maps that referenced this pull request Sep 2, 2016
@spikebrehm
Copy link

Just published 0.8.1 that includes this change.

@spikebrehm
Copy link

It turns out 0.8.1 was faulty, because my working directory had an additional example app containing the react-native node module, which got published as part of the NPM package (:facepalm:), causing a @providesModule error, so I've unpublished it and published 0.8.2. Use that instead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants