meteor-google-maps
meteor-google-maps copied to clipboard
How to use with react?
I am using react as front end, is it possible to use with reactJS
Yes! https://github.com/dburles/meteor-google-maps#examples https://github.com/dburles/meteor-google-maps-react-example
Did that help @hafeez1042 ?
thank you @dburles , Actually i didn't check that, i was busy with some other project. i will inform you after checking.
I'm getting 'Uncaught InvalidValueError: GoogleMaps.initialize is not a function' on meteor 1.3, has anyone tried this with the new beta? tks!
@fpaboim got pretty much the same error
Uncaught TypeError: _dburlesGoogleMaps2.default.load is not a function
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?
https://github.com/peterpetre/meteor-test-google-maps
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.
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)
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 https://github.com/dburles/meteor-google-maps/issues/95#issuecomment-226158032, or mute the thread https://github.com/notifications/unsubscribe/ALm7LjGZDF7ubQQ-IDdKos81EYySRPy8ks5qL96sgaJpZM4Gpsik .
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
do you have samples using react updating/adding new markers after render?
@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
ive tried fetching the data from external API when the button was clicked... but it didnt work when updating
@wiredots01 going to need a little bit more info than that my friend!