mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Create source switcher in ui() loaded callback
This commit is contained in:
36
index.html
36
index.html
@@ -22,24 +22,26 @@
|
||||
.imagery(iD.dataImagery)
|
||||
.assetPath('dist/');
|
||||
|
||||
id.ui()(document.getElementById('id-container'));
|
||||
id.ui()(document.getElementById('id-container'), function() {
|
||||
iD.d3.select('#about-list')
|
||||
.insert('li', '.user-list')
|
||||
.attr('class', 'source-switch')
|
||||
.call(iD.uiSourceSwitch(id)
|
||||
.keys([
|
||||
{
|
||||
'urlroot': 'http://www.openstreetmap.org',
|
||||
'oauth_consumer_key': '5A043yRSEugj4DJ5TljuapfnrflWDte8jTOcWLlT',
|
||||
'oauth_secret': 'aB3jKq1TRsCOUrfOIZ6oQMEDmv2ptV76PA54NGLL'
|
||||
},
|
||||
{
|
||||
'urlroot': 'http://api06.dev.openstreetmap.org',
|
||||
'oauth_consumer_key': 'zwQZFivccHkLs3a8Rq5CoS412fE5aPCXDw9DZj7R',
|
||||
'oauth_secret': 'aMnOOCwExO2XYtRVWJ1bI9QOdqh1cay2UgpbhA6p'
|
||||
}
|
||||
])
|
||||
);
|
||||
});
|
||||
|
||||
iD.d3.select('#about-list')
|
||||
.insert('li', '.user-list')
|
||||
.attr('class', 'source-switch')
|
||||
.call(iD.uiSourceSwitch(id)
|
||||
.keys([
|
||||
{
|
||||
'urlroot': 'http://www.openstreetmap.org',
|
||||
'oauth_consumer_key': '5A043yRSEugj4DJ5TljuapfnrflWDte8jTOcWLlT',
|
||||
'oauth_secret': 'aB3jKq1TRsCOUrfOIZ6oQMEDmv2ptV76PA54NGLL'
|
||||
},
|
||||
{
|
||||
'urlroot': 'http://api06.dev.openstreetmap.org',
|
||||
'oauth_consumer_key': 'zwQZFivccHkLs3a8Rq5CoS412fE5aPCXDw9DZj7R',
|
||||
'oauth_secret': 'aMnOOCwExO2XYtRVWJ1bI9QOdqh1cay2UgpbhA6p'
|
||||
}
|
||||
]));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user