How to prepopulate the text box?
In my scenario, I load <gmpx-place-picker> inside a sandbox page inside an iframe inside a Chrome extension content script
After the user selects a location, he will close the pop-up injected into the content script
How do I make sure that the next time he loads up, <gmpx-place-picker> is prepopulated with the value he selected earlier?
Good question, there isn't a way to do this right now. Are you looking to pre-populate the text box purely for display purposes? Or would you need to pre-populate placePicker.value (i.e. the Place instance) as well?
For display purposes, yes
For data consistency I would love to be able to set placePicker.value and have the form widget prefilled with the place details
+1 for this. I'm currently working around this limitation by setting the placeholder to the formatted_address to give the user some feedback about a previously selected location.
Has anyone found a workaround?