Using Geolocator Custom Component

Zombie thread time!

I’m trying to replicate the get location above - I can get the clones working fine, but when I try and write my own simple version of the where am I it just doesn’t do anything - I’ve added the dependency on the geolocator, added the custom component to my where am I form, and I get a map but no location. Anyone have any thoughts on what I’m missing?

clone link:
https://anvil.works/build#clone:POUZEGODDOW5WVOV=PMBIQ34NSYP5R3RRYLGHL7LT

Similar to this thread:

you’ll need to do the equivalent for the GeoLocator component and hook up the event in the design view.

There you go, always a simple answer! I’ll give it a try.

Feature thought - it’d be useful to be able to bring all of those settings etc in with the custom component!

OK, I’ve added the component and hooked it up. Inevitably it’s not working. Error below:

TypeError: geolocator_1_update_location() missing 2 required arguments: ‘lat’, ‘lng’. Did you initialise all data binding sources before initialising this component?

at

Form1, line 16.

Order of the code is the same in mine as per the example, I’ve checked for data bindings in the components on the form and can’t see any, so clearly I’m missing something on this.

You’ve hooked up the wrong event

This is what your form events hooked up look like to me:

This should have the method hooked up

This should not have anything hooked up

I’m just having one of those days where I can’t see the wood for the trees. Thanks Stu, much appreciated.