diff --git a/API.md b/API.md index 9623b7aa89..fba53177b4 100644 --- a/API.md +++ b/API.md @@ -75,22 +75,6 @@ which makes hot code replacement tricky. (ES6 module exports are Because of this, the parts of Rapid which are designed for customization are exported as live bound objects that can be overridden at runtime _before initializing the Rapid context_. -### Services - -The `Rapid.services` object includes code that talks to other web services. - -To replace the OSM service with a custom service that exactly mimics the default OSM service: -```js -Rapid.services.osm = serviceMyOSM; -``` - -Some services may be removed entirely. For example, to remove the Mapillary service: -```js -Rapid.services.mapillary = undefined; -// or -delete Rapid.services.mapillary; -``` - ### Background Imagery diff --git a/data/intro_rapid_graph.json b/data/intro_rapid_graph.json index 7afb19c90d..ab2214cb9b 100644 --- a/data/intro_rapid_graph.json +++ b/data/intro_rapid_graph.json @@ -2,7 +2,7 @@ "n-2852": { "__fbid__": "-2852", "__origid__": "-2852", - "__service__": "fbml", + "__service__": "mapwithai", "__datasetid__": "rapid_intro_graph", "id": "n-2852", "loc": [-85.6297512, 41.9561476] @@ -10,7 +10,7 @@ "n-2805": { "__fbid__": "-2805", "__origid__": "-2805", - "__service__": "fbml", + "__service__": "mapwithai", "__datasetid__": "rapid_intro_graph", "id": "n-2805", "loc": [-85.6282000, 41.9561500] @@ -18,7 +18,7 @@ "n-5150": { "__fbid__": "-5150", "__origid__": "-5150", - "__service__": "fbml", + "__service__": "mapwithai", "__datasetid__": "rapid_intro_graph", "id": "n-5150", "loc": [-85.6281089, 41.9561288] @@ -26,7 +26,7 @@ "n-5151": { "__fbid__": "-5151", "__origid__": "-5151", - "__service__": "fbml", + "__service__": "mapwithai", "__datasetid__": "rapid_intro_graph", "id": "n-5151", "loc": [-85.6278017, 41.9560522] @@ -34,7 +34,7 @@ "n-5152": { "__fbid__": "-5152", "__origid__": "-5152", - "__service__": "fbml", + "__service__": "mapwithai", "__datasetid__": "rapid_intro_graph", "id": "n-5152", "loc": [-85.6272470, 41.9558580] @@ -42,7 +42,7 @@ "w-516": { "__fbid__": "-516", "__origid__": "-516", - "__service__": "fbml", + "__service__": "mapwithai", "__datasetid__": "rapid_intro_graph", "id": "w-516", "nodes": ["n-2852", "n-2805", "n-5150", "n-5151", "n-5152"], @@ -51,4 +51,4 @@ "name": "Tulip Lane" } } -} +} \ No newline at end of file diff --git a/dist/index.html b/dist/index.html index 8d7be73ef5..167f532962 100644 --- a/dist/index.html +++ b/dist/index.html @@ -41,20 +41,21 @@ container.style.padding = '20px'; } else { - var context = Rapid.coreContext() - .assetPath('') - .apiConnections([ - { - url: 'https://www.openstreetmap.org', - client_id: 'O3g0mOUuA2WY5Fs826j5tP260qR3DDX7cIIE2R2WWSc', - client_secret: 'b4aeHD1cNeapPPQTrvpPoExqQRjybit6JBlNnxh62uE' - }, { - url: 'https://api06.dev.openstreetmap.org', - client_id: 'zod4KxHLYtOOvr8LTdUIhZqeAtDxzHRoEsaNkMt2pBc', - client_secret: 'wnDUzUidx8CM948E5fgdk89_-IeOOyjfvDhtn0-mX6k' - } - ]) - .containerNode(container); + const context = new Rapid.Context(); + context.containerNode = container; + context.assetPath = ''; + context.apiConnections = [ + { + url: 'https://www.openstreetmap.org', + client_id: 'O3g0mOUuA2WY5Fs826j5tP260qR3DDX7cIIE2R2WWSc', + client_secret: 'b4aeHD1cNeapPPQTrvpPoExqQRjybit6JBlNnxh62uE' + }, { + url: 'https://api06.dev.openstreetmap.org', + client_id: 'zod4KxHLYtOOvr8LTdUIhZqeAtDxzHRoEsaNkMt2pBc', + client_secret: 'wnDUzUidx8CM948E5fgdk89_-IeOOyjfvDhtn0-mX6k' + } + ]; + context.init(); } } diff --git a/docs/statistics.html b/docs/statistics.html index aeaee6f92a..25ef4b699f 100644 --- a/docs/statistics.html +++ b/docs/statistics.html @@ -21,7 +21,7 @@