Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yichunzhao opened this issue Sep 27, 2017 · 1 comment
Open

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

yichunzhao opened this issue Sep 27, 2017 · 1 comment

Comments

@yichunzhao
Copy link

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

}`

@markathomas
Copy link
Owner

markathomas commented Sep 29, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants