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

How to use with react? #95

Open
hafeez1042 opened this issue Nov 26, 2015 · 15 comments
Open

How to use with react? #95

hafeez1042 opened this issue Nov 26, 2015 · 15 comments
Labels

Comments

@hafeez1042
Copy link

I am using react as front end, is it possible to use with reactJS

@dburles
Copy link
Owner

dburles commented Dec 1, 2015

Did that help @hafeez1042 ?

@hafeez1042
Copy link
Author

thank you @dburles , Actually i didn't check that, i was busy with some other project. i will inform you after checking.

@fpaboim
Copy link

fpaboim commented Jan 8, 2016

I'm getting 'Uncaught InvalidValueError: GoogleMaps.initialize is not a function' on meteor 1.3, has anyone tried this with the new beta? tks!

@peterpetre
Copy link

@fpaboim got pretty much the same error
Uncaught TypeError: _dburlesGoogleMaps2.default.load is not a function

@dburles
Copy link
Owner

dburles commented Apr 27, 2016

Hey guys I can't reproduce any errors on 1.3 are you able to reproduce the error on a fresh application so I can take a look?

@peterpetre
Copy link

@dburles
Copy link
Owner

dburles commented Apr 27, 2016

You don't (yet) need to import GoogleMaps as it's global. I'm yet to update the package to support modules. Hope to do that soon.

@eljefejames
Copy link

Are there any more complex examples of this working in react? I'm trying to use it with flowrouter but not having much luck.(Meteor 1.3)

@lcrpt
Copy link

lcrpt commented Jun 20, 2016

Hey, I think you can not use this package directly with react, because you
need to use a Blaze template.

You can do it with both React Blaze components, check the Meteor guide.
Like for example you can do something like this

hope it helped you.

2016-06-15 13:14 GMT+02:00 eljefejames [email protected]:

Are there any more complex examples of this working in react? I'm trying
to use it with flowrouter but not having much luck.(Meteor 1.3)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#95 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ALm7LjGZDF7ubQQ-IDdKos81EYySRPy8ks5qL96sgaJpZM4Gpsik
.

@dburles
Copy link
Owner

dburles commented Jun 20, 2016

You don't have to use the blaze template. With React you can use the create method https://github.com/dburles/meteor-google-maps#create

@wiredots01
Copy link

do you have samples using react updating/adding new markers after render?

@dburles
Copy link
Owner

dburles commented Jan 16, 2017

@wiredots01 not specifically, however start with this example and you would place the logic here: https://github.com/dburles/meteor-google-maps-react-example/blob/master/imports/MyMap.js#L13-L16

To make it reactive, place a Tracker.autorun or use a cursor observe method inside of the GoogleMaps.ready. See here https://github.com/dburles/reactive-maps-example/blob/master/reactive-maps-example.js#L5-L37

@wiredots01
Copy link

ive tried fetching the data from external API when the button was clicked... but it didnt work when updating

@dburles
Copy link
Owner

dburles commented Jan 17, 2017

@wiredots01 going to need a little bit more info than that my friend!

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

No branches or pull requests

7 participants