DoublEqual
Posts: 0
Joined: Tue Sep 16, 2014 11:10 pm

Need help with Map API from database

Hello!

I'm basically combining these two tutorials:
This to-do list one
AND
This map one.

So I'm adding addresses to a database list, and when I click on the address from the list, a pop-up comes up and asks if you want to Show on Map or Delete the item. Everything is functional except one thing -- I can't get the "Input" on top of the window to have the address text of the list item I've clicked on. I tried connecting the "address" column of the database to the "input" text in the list_service, but it doesn't update when I click a different item... it'll stay only on the address of the first item. Hopefully this makes sense, if not I'll try to explain further or make a video demo.

To boil it down, I want to match the list item text to an input (make it already say the text that the list item contains) in a popup so I can use that input text to "show on map" like the tutorial explains.

How should I go about doing this? If I have to use javascript, that's fine too. I was considering variables and changing the values but I can't figure it out. Thanks in advance.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Need help with Map API from database

Hello -

It's not clear where exactly you're placing an input element on your page, so please could you provide some screenshots of your app UI and mapping that you using.

DoublEqual
Posts: 0
Joined: Tue Sep 16, 2014 11:10 pm

Need help with Map API from database

Here you go, this is a short video explaining my problem visually. Hope it helps, thanks for the reply.

https://vimeo.com/106348320

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Need help with Map API from database

Hello,

Everything works as it should, you can't do the mapping as you do.
Instead of mapping in input you should bind the filling of the input on click on the list item (it is desirable to hang these actions of filling before action of open the popup menu)

You may fill input with the desired value using js and with the help of actions provided in Appery.io. This can be done with two actions
1) On click on the list item action "Set local storage variable", local storage variable to bind to label with the desired value
2) On click on the list item action "Set property" for input property Text to bind to a local variable storage created in 1.
This action must go after action from 1

Please see the screenshots for clarification Image
Image
Image

DoublEqual
Posts: 0
Joined: Tue Sep 16, 2014 11:10 pm

Need help with Map API from database

This worked, thank you very much!!

Return to “Issues”