3D mapping can significantly improve GNSS positioning accuracy in dense urban areas by predicting which signals are directly visible and which are blocked by the buildings. Many different 3D-mapping-aided (3DMA) GNSS techniques have been demonstrated in the last few years. Some use pseudo-range measurements, whereas others use signal-to-noise ratio. Some assume the position is already known, while others can handle large initial position uncertainties. Some compute position epoch-byepoch, while others implement filtered solutions using measurements from multiple epochs. Finally, some approaches are efficient enough to run in real time on a mobile device, whereas others are too computationally intensive. Previously, UCL has demonstrated that real-time single-epoch 3DMA GNSS using both pseudo-range and signal-to-noise measurements can reduce position errors in dense urban areas from tens of meters to a few meters. Here, we extend this to multi-epoch positioning by using a grid filter. Filtering reduces the impact of noise-like errors on the position solution, bringing a further improvement in accuracy. This is the first time that a grid filter has been applied to 3DMA GNSS as other authors have used a particle filter. Both filters can represent nonlinear position likelihood distributions using a set of candidate position hypotheses. The key difference is that a particle filter's hypotheses have equal likelihood and an irregular distribution whereas the grid filter's hypotheses are regularly distributed, forming a grid, but with unequal likelihoods. The grid-based approach better represents the physics of the problem. Position hypothesis spacing of less than a meter brings no significant performance benefit as the GNSS signal Fresnel zones are about this size in urban areas. Conversely, a spacing of more than 5 meters does not capture the variation of the environment sufficiently and can lead to 3DMA GNSS failing. The grid-based approach is also compatible with UCL's use of pre-computed building boundary files to minimize the real-time processing load. These enable satellite visibility across an array of candidate positions to be predicted quickly simply by comparing the satellite elevation with that of each building boundary at the corresponding azimuth. Versions of the grid filter with different state propagation algorithms have been implemented for static, pedestrian and vehicle applications. Using static, pedestrian and vehicle GNSS data collected in central London using a u-blox EVK 8MT receiver, these new algorithms have been compared with single-epoch 3DMA GNSS and multi-epoch conventional GNSS using a basic extended Kalman filter with innovation-based outlier detection. In all cases, best positioning accuracy was obtained using the multi-epoch 3DMA GNSS algorithm. This achieved an RMS horizontal position error of 2.2m in the static tests, 3.9m in the pedestrian tests and 4.3m in the vehicle tests. Compared with single-epoch 3DMA, this represents a factor of 2.2 improvement for the static tests, a factor of 1.55 improvement for the pedestrian tests and a factor of 1.8 improvement for the vehicle tests. For all test scenarios, multi-epoch 3DMA GNSS was a factor of 4 more accurate than multi-epoch conventional GNSS positioning.