list item scroll and in view

edited May 2014 in Newbie Questions
i'm using a google map with markers, and i have a list of locations. i'd like the list to auto-scroll using some animation method, and only want to show markers for the list items that are in the users view. if the user takes over scrolling, auto-scroll ends but as the user scrolls through the list the map markers would continuously update to only show markers for the list items in view. would this be easy/difficult to achieve? i'm not sure how to get the list to auto-scroll, or how to know what is in view. i feel like i've seen a post on this about a year or so ago, i just can't find it in the history. i can update the markers based on the list items in view.

update: i found and remember the part about what's in view, so i have that working with no issues. just looking for some help on how to animate the list scrolling with something like this.$.list.scrollTo with a setTimeout???


  • I believe only scrollToIndex is exposed from our standard delegates for lists, so you may need to create a custom delegate that extends one of these delegates to expose scrollTo. That way you could potentially use setTimeout to scroll a certain number of pixels per tick (depending on how fast you wanted the scrolling to be), and should be more smoothly instead of jumping from item to item with scrollToIndex + setTimeout (i.e.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!