Directory

← Back

paper-input-place component

Integration of paper-input-place (Google autocomplete place API) component for Vaadin 17

Author

Rating

Popularity

<100

Integration of paper-input-place component for Vaadin 17, using the autocomplete places java script API.

Sample code

      FlexLayout div = new FlexLayout();
        div.getStyle().set("flex-direction", "column");
        div.add(new Label("Paper input place by google api"));
        
        PaperInputPlace inputPlace = new PaperInputPlace("API-KEY");
        inputPlace.setCountry("DE");
        final Label selectedValueLabel = new Label("place selected");
        div.add(inputPlace, selectedValueLabel);
        
        inputPlace.addChangePlacejsonCompleteEventListener(e -> {
            selectedValueLabel.setText(e.getSource().getPlace());
            //e.getSource().getPlace() == { "place": {"name":"Korschenbroicher Straße 605, Mönchengladbach, Germany","latLng":{"lat":51.1949039 ,"long":6.4862356}}}
        });
        
        add(div);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2021-09-28
Maturity
STABLE
License
MIT License

Compatibility

Framework
Vaadin 17+
Browser
Firefox
Google Chrome
Microsoft Edge

paper-input-place component - Vaadin Add-on Directory

Integration of paper-input-place (Google autocomplete place API) component for Vaadin 17 paper-input-place component - Vaadin Add-on Directory
Integration of paper-input-place component for Vaadin 17, using the autocomplete places java script API.
Online