Commit Graph

67 Commits

Author SHA1 Message Date
Bryan Housel 70d0a68c6d Use context.asset() to generate path to Mapillary image sprite 2017-06-09 10:53:48 -04:00
Bryan Housel 274552205d Merge pull request #4050 from mapillary/mapillary-api-v3
Update to Mapillary API v3 and add new traffic signs
2017-06-09 10:37:30 -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 14ebd273b5 Make opening_hours a combo
see:  https://github.com/openstreetmap/iD/issues/974#issuecomment-296665907
2017-04-24 09:51:12 -04:00
Bryan Housel 06caeb87b7 Correct lodash _.omit usage
(closes #3965)
2017-04-22 23:05:15 -04:00
Bryan Housel 108150faf9 Don't re-request inflight nominatim requests 2017-04-20 14:45:22 -04:00
Bryan Housel 43b8ab1754 Set debounce wait to 500ms, still feels responsive 2017-04-20 14:13:10 -04:00
Bryan Housel 02688a1fcf Check cache for shortened query that returns fewer than max results 2017-04-20 14:08:38 -04:00
Bryan Housel 62d0bc0bf5 Debounce should debounce all requests even cached, fix tests
(see https://github.com/openstreetmap/iD/pull/3975#issue-222747308)
2017-04-19 13:13:12 -04:00
Bryan Housel 494dd979a9 Never reset the taginfo cache
The data on taginfo is refreshed once per day, so there's no reason to
reissue those API calls during a normal editing session.

reset() gets called after the user saves their changes to OSM
2017-04-19 09:25:09 -04:00
Bryan Housel c2d6c84aee Exclude popular keys from values lookups..
see #3955
2017-04-18 23:29:01 -04:00
Bryan Housel b44bd7a427 Increase debounce threshold for taginfo 2017-04-18 21:15:47 -04:00
Bryan Housel e1a9e7e74d Don't try to force opening-hours value lookups to lowercase
(closes #3629)
2017-03-20 23:02:35 -04:00
Bryan Housel 24d0d6f66e Add brand and grape_variety to uppercase tag exception list 2017-03-17 12:39:59 -04:00
Bryan Housel 1a8cfcc8b1 Changeset refactor
(closes #2633)

* move osmChangeJXON from osm service to osmChangeset
* cleanup putChangeset for code clarity
* adjust params for callbacks (pass changeset around instead of changeset_id)
* add commit.reset() to reset changeset object after successful save
* improve checks for changeset tags (trim whitespace, etc)
2017-03-15 11:03:43 -04:00
Bryan Housel d1aac857a4 Ignore server changesets with missing comment tag or empty comment 2017-03-11 14:28:30 -05:00
Bryan Housel a1323e482e Change putChangeset to create osmChangeset and asJXON 2017-03-11 14:12:34 -05:00
Bryan Housel e0157f48ac Merge pull request #3871 from mstn/3208-cant-create-a-new-master-relation
Order to-be-created relations by dependencies in the changeset
2017-03-11 01:05:11 -05:00
mstn 05e5cf9030 add type information to references 2017-03-02 11:26:14 +01:00
mstn 3205650798 order to-be-created relations by dependencies in a changeset 2017-03-02 09:17:08 +01:00
Bryan Housel be07dcccdf Always access OSM over https now
If you were logged in before, you might need to logout with
`id.connection().logout()` or delete the OAuth data from localStorage
2017-03-02 00:54:24 -05:00
Bryan Housel bc39bbf2d6 Object.assign not supported on IE11 or PhantomJS, use _.assign 2017-02-02 16:00:19 -05:00
Bryan Housel 0419230321 Use common apibase for search and countryCode 2017-02-02 15:55:52 -05:00
Bryan Housel 3246ca176f Eagerly load user's details and changesets
(closes #3787)

Also, don't redo authentication in save.js if user is already authenticated
2017-01-22 12:43:39 -05:00
Kushan Joshi 781f4540e0 Add a pluggable geocoder 2017-01-13 15:42:03 +05:30
Milad Karbasizadeh 3ef1103c3a Remove signs of real_name ever existed. 2017-01-03 21:57:29 +03:30
Milad Karbasizadeh 5da7d83fe9 Modify railways arabic/persian names 2017-01-03 16:34:57 +03:30
Nick Doiron 94ee7d4916 move changes to svg display name 2017-01-03 18:18:18 +08:00
Milad Karbasizadeh af1ac89df7 Rename fix-string.js and fixTextForSvg function name to a more readable name.
User regex to detect arabic characters.

Fix editing bugs.
2017-01-02 14:48:22 +03:30
Milad Karbasizadeh 92b5ce133d fix persian characters on chrome and safari 2017-01-01 15:41:47 +03:30
Bryan Housel a7ac44f6e8 Refactor imageryBlacklists so it can be called without triggering a GET
Previous code was problematic because we need the function to
to properly blacklist custom imagery passed in through the url hash,
before iD is completely initialized.  Triggering GET causes tests to
break because osm service testing has side effects :-/
2016-12-04 21:35:55 -05:00
Bryan Housel b9888e45e4 Add imageryBlacklists function to get blacklists from OSM API
(for #3623)
2016-12-03 19:25:07 -05:00
Bryan Housel 941d026b7c Adjust max Mapillary pages fetched per zoom, min viewfield zoom
For performance around densely mapped areas like SF
2016-11-17 12:07:14 -05:00
Bryan Housel 9bf6c25bde Clear saved rate limit error when calling reset() 2016-11-09 17:58:25 -05:00
Bryan Housel 16ada1f29a Better error handling for common osm api error conditions
* if 509 Bandwidth Exceeded / 429 Too Many Requests, prompt for login
(closes #2262)
* if 400 Bad Request / 401 Unauthorized / 403 Forbidden - logout and retry
(closes #3546)
2016-11-08 21:43:27 -05:00
Bryan Housel a8f12173ac Multikeys filter should allow nested names, ignore alt prefixes 2016-10-31 15:06:17 -04: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 cf11c95354 Fix Mapillary sign placement on Chrome, Safari 10 2016-10-29 00:59:51 -04:00
Bryan Housel 5c5e90c411 Upgrades for mapillary 2.0.0 2016-10-28 14:23:21 -04:00
Bryan Housel 6597a6e108 Don't cache browser detection anymore in Mapillary service
This means we can mock the useragent and test signsSupported
2016-10-25 21:41:34 -04:00
Bryan Housel a601ccc0c9 Use osm-auth 1.0.1, make authenticated OSM API calls
(re: #2262)
2016-10-24 18:40:52 -04:00
Bryan Housel 45d85e04c5 Make authenticated api calls if possible 2016-10-24 01:21:38 -04:00
Bryan Housel e81b6e626a WIP: authenticate OSM API calls if user is logged in 2016-10-22 12:17:52 -04:00
Bryan Housel b5c95af3b7 Refactor from coreConnection to serviceOsm
(closes #3497)
2016-10-19 09:25:34 -04:00
Bryan Housel efd9e6df4b Memoize and avoid extra calls to utilDetect() 2016-10-18 21:48:39 -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
npmcdn-to-unpkg-bot 3df007a9f4 Replace npmcdn.com with unpkg.com 2016-10-11 09:01:45 -04:00
Bryan Housel c4724d7ae7 Allow network, genus, taxon, species lookups to expect uppercase values
(closes #3377)

In most cases we prefer taginfo value results with lowercase letters.
A few OSM keys expect values to contain uppercase values
This is not an exhaustive list (e.g. `name` also has uppercase values)
but these are the fields where taginfo value lookup is most useful.
2016-10-09 15:48:23 -04:00
Bryan Housel 3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Bryan Housel 4a94474a3a Better guard code around wiki services, always call callbacks 2016-09-28 14:42:30 -04:00