# Map filter+zoom questions

**URL:** <https://community.citystrides.com/t/map-filter-zoom-questions/21834>\
**Category:** Support\
**Created:** [November 1, 2020, 9:21pm UTC](https://community.citystrides.com/t/map-filter-zoom-questions/21834 "2020-11-01T21:21:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehershey](https://community.citystrides.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ehershey](https://community.citystrides.com/u/ehershey)\
**Post date:** [November 1, 2020, 9:21pm UTC](https://community.citystrides.com/t/map-filter-zoom-questions/21834/1 "2020-11-01T21:21:26Z")

</div>

1. When I try to filter on my lifemap for activities on a certain date, they don’t show up unless I set the end date to two days afterwards. Maybe a time zone issue?
2. Entering an invalid filter date is confusing.
3. Would it be possible to not reset the map view when toggling between street and satellite views?

re 1: For example if I filter with start=2015-06-30 and end=2015-07-02 I expect this activity from 2015-07-01 to show up but it doesn’t: [E Hershey's Activity on July 1, 2015 - CityStrides](https://citystrides.com/activities/16435348)  
The start date in UTC is on 2015-07-02 so is the problem maybe that the end date filter is exclusive and it’s going by UTC date? I’m used to filtering with a margin so maybe a fix would be to just make the filter include the end date? To further illustrate, I’m attaching a screenshot showing the 07-01 activity displayed when I set the filter to show from 07-02 to 07-03, which seems extra weird.

re 2: When I was playing around with #1, if I try to filter with start=2015-06-31 (not a real date), end=2015-07-02, the map does exclude some things but still shows almost everything. It took me a while to realize I was messing up the start date. Would it be possible to show an error message if a date in the filter fields is invalid?

re 3: Often after navigating to a missing node or a street I’ve completed but don’t remember details of, I want to change to/from the satellite view to help identify the location or get more details about it. When the map resets I have to re-navigate to the view I was on previously which would be nice to not have to do.

Sorry for multiple posts in the support category without selecting a sub-category. I’m not sure if this and [Website flapping](https://community.citystrides.com/t/website-flapping/21829) belong in the activity/sync or city/street/node sub-cateogires. Maybe there should be a ‘connectivity’ or ‘website’ sub-category?

Thanks again for the site and all the user support, @JamesChevalier!

---

<div class="post-metadata">

**Author:** ![JamesChevalier](https://community.citystrides.com/user_avatar/community.citystrides.com/jameschevalier/32/2_2.png) [@JamesChevalier](https://community.citystrides.com/u/JamesChevalier)\
**Post date:** [November 3, 2020, 3:26pm UTC](https://community.citystrides.com/t/map-filter-zoom-questions/21834/2 "2020-11-03T15:26:12Z")

</div>

> [@ehershey](#):
>
> When I try to filter on my lifemap for activities on a certain date, they don’t show up unless I set the end date to two days afterwards. Maybe a time zone issue?

Yeah, I was misusing `Date.parse` so all the form-entered dates were being set to UTC. The next release will include a fix that’ll set those to the browser’s time zone.  
I’m concerned about the _activity time_ that I’m using, though, so I’m going to add the time to the activity pages. 😅 I’m fearing/expecting that these are all going to be Eastern Time (not local time). 😅

> [@ehershey](#):
>
> Entering an invalid filter date is confusing.

🤔 This might be a browser issue that I need to account for. In Firefox on a Mac, I’ve got a fairly heavy-handed date picker. It glows red if I manage to enter a bad date.

 ![Screen Shot 2020-11-03 at 9.40.06 AM](https://d25dflut6m8e53.cloudfront.net/original/2X/e/e445a5d33ad7d8fa8022241a4dd12a48a4517228.jpeg)  
It looks like the underlying code is currently treating bad dates as no date, which for this screen shot would filter to display “everything before December 31, 2020”. 🤔 I’m going to have to play around in that code to figure out how to handle that better.

> [@ehershey](#):
>
> Would it be possible to not reset the map view when toggling between street and satellite views?

This is odd - I thought I fixed this in the latest release. 🤔 I must have more instances of that failure. I’ll have a run through the maps across the site to see where I’ve missed this.

**Update 1** ugh 😖 it looks like this issue has been in Mapbox for [~3 years](https://github.com/mapbox/mapbox-gl-js/issues/4000) … changing the style to satellite view _also_ removes all of the other data layers (city outlines, nodes, LifeMap, etc) so I have to figure out a way to save all my existing data layers → change the style → re-add all the layers back.

**Update 2** oh ok 😄 that actually wasn’t too bad - [this helped](https://stackoverflow.com/a/52031177/359957) quite a bit. A fix will be in the next release.

> [@ehershey](#):
>
> Sorry for multiple posts in the support category without selecting a sub-category.

The general #Support category is fine. No worries.
