How can I Refresh Google Map WebViewer When I change the Coordinates?

The application registers a list of customers in Spinner List and stores each customer’s data in the database. It also records the coordinates of each customer’s location and shows it on the map.

I displayed Google Maps through WebViewer


The problem

The coordinates are actually saved for each client

But the problem is that the map does not automatically move to the location according to the coordinates of each client when selecting the client from the spinner list.

The map remains fixed to the old location even if you change clients and change coordinates

I don't know what the reason is,it need to refreshed or what?

Where is the step where you extract the lat and long from the TinyDB result and insert it into the Maps URL?

1 Like

Where are you setting the lat/lon values from the clients data in tinydb ?

1 Like

There is a button to save all entered data in the tinnydb

Everything is saved well and the application works well. The problem is that the map just does not move to the coordinate for each client

Which is lovely, but you do not appear to set the lat/lon values from the client data in the tinydb to the two textboxes (labels) that are used in the webviewer url ?


I registered the coordinates and they actually appear in their textboxes

But where are the Select Item From List blocks to reload the GUI from that awfully long list?

Your button11 click event is storing values to the tinydb, not retrieving them.

Third time lucky ?

button 11 save data in tinnydb tag = Clinet name

When I select client name from spinner list

All data for each client is restored to its place

where ?
when ?

I can only guess it is after you call the google map in the webviewer, which will be before you have set the values in the textboxes...

No I moved the block to the top just so it would be clear when I included it here in the post, but in fact I showed the coordinates first before the map block.

Well that wasted 9 posts of our time didn't it, and your blocks show you directly adding the selected list items instead of the textboxes

Imagine counting 91 items down in a list.

What torture!

Time to learn how to store a dictionary in TinyDB.

With keys and tags you don't have to worry about being one off and ruining the count.

I haven't studied dictionaries yet, but it's in the plan

Sorry for the misunderstanding

Just ran a quick test and it works OK for me, suggest you check the values being applied

Could it be that I put the WebViewer inside Arrangement to be displayed with the Custom Dialog extension?

Why not test without the custom dialog. Does it work then ?

There could be a timing issue?
Try placing the webviewer call block in a clock timer which is called after you set your 91 items to textboxes