-
Notifications
You must be signed in to change notification settings - Fork 5
Description
The following is a screen dump; you can see the search icon of location input text field was moved to the left bottom corner now.
`final private LocationTextField ltf = new LocationTextField<>(GoogleGeocoder.getInstance());
final private Button find = new Button("Find");
final private CssLayout findByLocation = new CssLayout(ltf, find);
final private GoogleMap googleMap = new GoogleMap(apiKey, null, null);
final private Panel mapPanel = new Panel(googleMap);
@Autowired
private YardService yardService;
public FindView() {
super.setSizeFull();
super.setMargin(true);
super.setSpacing(true);
super.addComponents(findByLocation, mapPanel);
mapPanel.setSizeFull();
setLtf();
setMap();
}
private void setLtf() {
//ltf.setCaption("Find a shared Yard closing to you");
ltf.setWidth("400px");
ltf.setInputPrompt("Insert an location: ");
ltf.setStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
ltf.setIcon(VaadinIcons.SEARCH);
ltf.addLocationValueChangeListener((HasValue.ValueChangeEvent<GeocodedLocation> e) -> {
googleMap.clearMarkers();
LatLon ll = new LatLon(e.getValue().getLat(), e.getValue().getLon());
setMapCenter(ll);
setMapMarker(ll);
});
ltf.setDelay(800);
ltf.setLocation(new GeocodedLocation());
}`
