Skip to content

as icon set to be inside; the icon is not correctly displayed #10

@yichunzhao

Description

@yichunzhao

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.

image

`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());

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions