54 Commits

Author SHA1 Message Date
Martin Raifer
5c721808c6 change variables for better readability, closes #11022 2025-05-06 11:25:32 +02:00
Martin Raifer
19957d0e39 keep photo viewer state on reset, properly clean up active marker
when switching between photos from different providers

fixes #10987
2025-04-29 09:38:18 +02:00
Wouter van der Plas
5305b4fb46 removed formatting 2021-10-25 00:50:53 +02:00
Wouter van der Plas
e7d9e050cf Mapillary 2021-10-23 17:50:18 +02:00
Nikola Pleša
7a0d8adb7b Switch to Mapillary API v4 2021-06-15 10:13:07 +02:00
Nikola Pleša
6cd17713fa Use Mapillary vector tiles for images, sequences and map features 2021-03-01 10:19:41 +01:00
Quincy Morgan
a33ab44e81 Merge branch 'develop' into photo-filter-temp
# Conflicts:
#	css/80_app.css
#	modules/services/mapillary.js
2020-10-12 16:16:32 -04:00
Nikola Plesa
8993cd2a29 fix: update unit tests 2020-08-07 12:48:51 +02:00
Nikola Plesa
fe1aabbf31 fix: unit tests 2020-08-03 14:08:10 +02:00
Nikola Plesa
22bc5121a4 feat: date and username filtering for photo overlay layers 2020-07-27 09:42:59 +02:00
Quincy Morgan
a7ce956e1f Don't use global selectors in street-level photo services (re: #7445) 2020-03-29 11:04:38 -07:00
Bryan Housel
e19bcb77d5 Require init() call before coreContext starts doing things
(closes #7304)
2020-01-29 19:27:12 -05:00
Quincy Morgan
0d5bd8b277 Store selected mapillary image by its key rather than its object
Properly sort selected mapillary signs and features above unselected ones
2019-12-11 17:15:36 -05:00
Bryan Housel
1c97e29b5d No idea why this test keeps failing.. 2019-05-19 22:55:41 -04:00
Bryan Housel
d68c49e66d Async tests running on dodgy Travis containers are not my friends
(closes #6391)

Default timeout of 2000 regularly exceeded, causing spurious test failures.
Even a random garbage collection pause can take more than 2 seconds.
2019-05-19 21:35:16 -04:00
Bryan Housel
0a4e2c03a3 Extend timeouts on slow async mapillary tests
Trying to avoid false test failures.  Default timeout is 2sec, and we can't
be sure slow async tests will finish in that time esp. in a CI environment
2019-04-30 09:59:51 -04:00
Bryan Housel
e981cd5dd5 Switch mapillary and openstreetcam tests to work async
- can't reliably use sinon.spy to tell whether a thing has been called,
  so we listen for events instead and check server.requests()
- make sure to request the next page before dispatching `loadedImages` so
  we can `server.respond()` to the request in the event handler if we want to
- also moves `localeDateString` in the openstreetcam service from parsing
  code to display code, because it's very slow (we can just do this for the
  images we look at, instead of all images we fetch)
2019-04-29 15:31:08 -04:00
Bryan Housel
452eb8b43a Bump timeouts on streetlevel loadimage-type tests
This isn't perfect but might avoid spurious test failures.
2019-04-27 17:41:58 -04:00
Bryan Housel
d0452e6be4 Convert fakeServer tests to use fakeFetch
- Many text expects are now wrapped in setTimeout, as the fetch
  promises settle async now.
- This makes the tests somewhat brittle, and we should maybe consider
  reworking some of them. For example it is very hard to perform
  a test like `expect(spy).to.have.not.been.called` in an async way.
  (We could instead inspect the fakeServer requests() to know this.)
- Also includes some trickery for osm.js, which uses d3-xml (fetch)
  now for unauthenticated calls and osmauth (xhr) for authenticated calls
2019-04-26 22:29:48 -04:00
Bryan Housel
492bb5b37e Eliminate magic scale numbers from tests, add loadNotes test xml 2019-02-07 11:31:32 -05:00
Bryan Housel
71b2d2c6b7 Upgrade legacy symbols in tests
- iD.Context -> iD.coreContext
- iD.Graph -> iD.coreGraph
- iD.Node -> iD.osmNode
- iD.Way -> iD.osmWay
- iD.Relation -> iD.osmRelation
2019-01-30 15:43:02 -05:00
Bryan Housel
1731ce4651 Partition viewport by tiles, not by pixels
(closes #4297)

The previous approach split the viewport up by pixels, but each time the view
moved, the pixels would change, so it was not a stable selection of the
streetview data, and the markers would fight for position as the user moved
around.

This approach uses utilTiler to partition the view into stable tiles.
2018-11-14 14:48:42 -05:00
Bryan Housel
b7df3eda38 Use new Mapillary API calls for map_features, image_detections
(closes #5374)
2018-11-07 23:09:11 -05:00
Bryan Housel
4cd442e09d Restore mapillary.js line endings back from CRLF -> CR, fix tests 2018-10-11 13:58:57 -04:00
Thomas Hervey
db1c896ef2 removed: user mocks from image service test specs 2018-06-22 14:00:52 -04:00
Bryan Housel
e149c6be8e Remove old Mapillary signs code and assets
(closes #4145)
2018-06-07 01:35:12 -04:00
Bryan Housel
b7997d3c64 Begin replacing mapillary signs html with svg spritesheet
(re: #4145)
2018-06-06 23:16:49 -04:00
Bryan Housel
1dd437a1f2 Hide mapillary-js attribution and just handle it in iD
(closes #4526)

What we were doing before was d3.selecting the attribution line and
inserting the capture date into it. This was confusing the viewer
(which updates asynchronously) so that the sitelink would never update.
To make things easier, we'll just hide the viewer's built in attribution
and construct the attribution line the way we want it.
2017-11-14 11:32:42 -05:00
Bryan Housel
4571fd0563 Highlight selected/hovered streetview tracks, fade unselected
Also some code cleanups and nitpicky variable renames
More consistency in Mapillary/OpenStreetCam services
2017-11-08 00:35:44 -05:00
Bryan Housel
2947dcc2fb Add tests for Openstreetcam service and Mapillary sequences 2017-11-06 23:11:00 -05:00
Bryan Housel
99a3741b0c Better isolation of services, to avoid hitting network during test runs
1. All services are disabled in testing now to prevent network accesses
2. Only services are enabled when needed to test something
3. Many changes throughout code to allow iD to run with services disabled
   (e.g. check for osm service instead of assuming context.connection() will work)
4. Actually export the services so we can disable and enable them
2017-08-09 22:04:09 -04:00
Bryan Housel
bde4d6510f Update mapillary tests 2017-07-14 00:53:44 -04:00
Bryan Housel
70d0a68c6d Use context.asset() to generate path to Mapillary image sprite 2017-06-09 10:53:48 -04:00
Nikola Plesa
9c772a1058 Update to Mapillary API v3, use traffic signs from Mapillary sprites 2017-05-17 11:18:46 +02:00
Bryan Housel
f800e5afbc Remove unnecessary window parameter to Context 2016-11-10 15:19:03 -05:00
Bryan Housel
9ee790c1cc Don't need to pass dimensions to sublayers.. use projection.clipExtent
(the dimensions call to layers is to set width/height on svg surface element)
2016-10-30 22:40:11 -04:00
Bryan Housel
b2c8f72c95 no-native-reassign -> no-global-assign 2016-10-29 14:42:04 -04:00
Bryan Housel
cf11c95354 Fix Mapillary sign placement on Chrome, Safari 10 2016-10-29 00:59:51 -04:00
Bryan Housel
1d03414b80 Allow forced utilDetect(), useful for testing 2016-10-18 21:56:24 -04:00
Bryan Housel
053074d076 Export live binding for services in iD.services, fix init/reset
(closes #3324)

Previously we allowed devs to swap out services that they didn't need.
This became difficult now that ES6 exports are immutable bindings.
But we can wrap the immutable bindings themselves in a live object,
to get back the flexibility that we used to have.

This change also drops the `taginfo` accessor on Context, since devs who want
to swap out taginfo service with something else can now do so through the live
binding.  `iD.services.taginfo = myTaginfo()`
2016-10-14 10:38:09 -04:00
Bryan Housel
87950fd472 Fix lib export, flatten names in tests and docs 2016-10-04 21:56:09 -04:00
Bryan Housel
482b4d7cbe mock userAgents in a way that works in both Phantom and real browsers 2016-09-09 14:59:55 -04:00
Bryan Housel
7ca6d06254 Replace iD global with iD.Context() module (#3254) 2016-07-19 10:15:32 -04:00
Kushan Joshi
fc680a2e9a external modules for services 2016-07-06 14:39:58 -04:00
Bryan Housel
5e6a1bdee5 Fix rbush tests.. Disable tests that fail because of sinon.spy issue 2016-07-02 21:59:36 -04:00
Bryan Housel
03558c7e40 Bump dependencies, fix tests
(commented out 2 failing tests in mapillary service related to sinon spy)
2016-06-25 00:50:20 -04:00
Kushan Joshi
3f3b287d62 Remove linting errors spec/services 2016-06-15 18:26:11 +05:30
Bryan Housel
e364b7ec30 Show loading spinner in loadchanged, update selection in nodechanged 2016-05-31 17:16:17 -04:00
Bryan Housel
e57914d77e WIP: preload viewer when layer enabled, still bad issues with slow load timing 2016-05-30 03:20:43 -04:00
Bryan Housel
a99f54b83b WIP: simplify code, attempt to preload viewer 2016-05-29 15:00:46 -04:00