Can't add more than one location at a time in Map Tour with TinyDB

We used to be able to long press at point multiple times, but now even the older apps I saved will only allow users to add one location. After that, long press at point doesn't work any longer. We have to close the app and open it again to add another location

There are several versions of map tour out in the wild. The problem may be a simple as using the most recent Companion to compile your app.

Also, MIT is in the process of MOVING some users stored Projects to another server. They are moving one batch at a time. That could: be part of the issue. However we would have to test your aia as described below to know.

If you post the aia for one of your versions here, someone might take a look at it. or an image of your Blocks.

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

export_and_upload_aia

.

MorehtanNothinNortonTinyDBJB.aia (5.5 KB)

Oh I thought I attached it, but I forgot to!

I blame this sequence:
image

It allows the two lists (names and points) to get out of sync, adding more than one point per new name.

Instead of a text Notifier, try exposing a hidden Arrangement with the lat/long, a textbox for the new name, and an Enter button.

Prime the Arrangement with the lat/long in the LongPressAtPoint event, then check for nonblank name and save everything in the Enter button Click event.

(I see a Press and Hold ... button in the Designer, but it has no Click events. Was it meant for this?)

Ok thank you

We can try that. I was just wondering what had changed in the code to not allow multiple add locations in one session...

Oh also, the lists do not get out of sync... and we can close it and open it again and add another location - so just can't add multiple locations in one session

For lists stored in TinyDB, I prefer to use local variables instead of global variables.

This forces me to retrieve them immediately before updating them, keeping just one version of the truth.

Oh, other things do NOT work either. Did you notice you cannot change to the Road map. The Aerial and Terrain maps display but the Road does not.

@ewpatton This OSM issue is probably related to the bug that Tim and I pointed to in this link

Check the TinyDB contents.

Are the lengths of the lists increasing?

Are the names and locations distinct, or repeated?

TinyDB is updating okay.

Using the Companion, I was able to add destinations North and South Moose jaw.

However, they don't have map markers.
Is that the issue?

(I notice the app does not have any blocks to add new markers to the map, regardless of how many names and locations are in TinyDB. Is this just a mismatch of expectations vs implementation?)

1 Like

Adding a procedure to load Markers from TinyDB and calling it at startup and after marker change gives us all markers.
(Only one at a time gets its Infobox displayed, though.)
Sample run


MorehtanNothinNortonTinyDBJB.aia (6.9 KB)

@msmurphycs I expect this app has never been able to add additional Markers. It only has 3 Design markers. To show a 'new' location you either need to use Runtime Markers using code similar to what @ABG just posted. or have several Markers already handy to spot additional Markers initially set to Visible = false and set it to true when needed with it's coordinates etc. :wink: Alternatively, only use ONE Design time Marker at a time AND use it display whatever location you want to show by changing its coordinates.

...then provide code to hide the Runtime Markers when you Delete Locations

.