react-native-baidumap-sdk icon indicating copy to clipboard operation
react-native-baidumap-sdk copied to clipboard

Geocode 地理编码/逆编码模块 有病发次数限制吗?

Open sej1228 opened this issue 6 years ago • 9 comments

sej1228 avatar Oct 26 '18 03:10 sej1228

不能并发,同一时间只能有一个请求

qiuxiang avatar Oct 26 '18 04:10 qiuxiang

不能并发,同一时间只能有一个请求

我在一个页面的生命周期里调用里逆编码,一秒钟之内近两次这个页面,第二次就会请求失败? 我该怎么处理这种情况/

sej1228 avatar Oct 26 '18 04:10 sej1228

因为返回的是 promise,你可以 await

qiuxiang avatar Oct 26 '18 05:10 qiuxiang

因为返回的是 promise,你可以 await

this.setState({detail: data, isLoading: false}, async ()=>{ const {location} = data const {latitude,longitude} = location const reverseResult = await Geocode.reverse({ latitude, longitude }) this.setState({address:reverseResult.address}) } );

sej1228 avatar Oct 26 '18 05:10 sej1228

因为返回的是 promise,你可以 await 经纬度返回的这种数据5e-324,是哪里出了错呢?

sej1228 avatar Oct 26 '18 05:10 sej1228

是否可提供一段可以直接运行的,可重现的代码

qiuxiang avatar Oct 29 '18 08:10 qiuxiang

5e-324 是不是权限

PL-SQL avatar Nov 09 '18 02:11 PL-SQL

对的,获取位置权限

                            宋恩骥
                        
                
                    
                        
                                邮箱:[email protected]
                        
                    
            
        
    签名由 网易邮箱大师 定制

在2018年11月09日 10:51,PL-SQL 写道: 5e-324 是不是权限

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/qiuxiang/react-native-baidumap-sdk","title":"qiuxiang/react-native-baidumap-sdk","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/qiuxiang/react-native-baidumap-sdk"}},"updates":{"snippets":[{"icon":"PERSON","message":"@PL-SQL in #137: 5e-324 是不是权限"}],"action":{"name":"View Issue","url":"https://github.com/qiuxiang/react-native-baidumap-sdk/issues/137#issuecomment-437232523"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/qiuxiang/react-native-baidumap-sdk/issues/137#issuecomment-437232523", "url": "https://github.com/qiuxiang/react-native-baidumap-sdk/issues/137#issuecomment-437232523", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [qiuxiang/react-native-baidumap-sdk] Geocode 地理编码/逆编码模块 有病发次数限制吗? (#137)", "sections": [ { "text": "", "activityTitle": "PL-SQL", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@PL-SQL", "facts": [

] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "IssueComment",\n"repositoryFullName": "qiuxiang/react-native-baidumap-sdk",\n"issueId": 137,\n"IssueComment": "{{IssueComment.value}}"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "IssueClose",\n"repositoryFullName": "qiuxiang/react-native-baidumap-sdk",\n"issueId": 137\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/qiuxiang/react-native-baidumap-sdk/issues/137#issuecomment-437232523" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "MuteNotification",\n"threadId": 401464487\n}" } ], "themeColor": "26292E" } ]

sej1228 avatar Nov 09 '18 03:11 sej1228

因为没有拿到经纬度

                            宋恩骥
                        
                
                    
                        
                                邮箱:[email protected]
                        
                    
            
        
    签名由 网易邮箱大师 定制

在2018年11月09日 11:01,enji_song 写道: 对的,获取位置权限

                            宋恩骥
                        
                
                    
                        
                                邮箱:[email protected]
                        
                    
            
        
    签名由 网易邮箱大师 定制

在2018年11月09日 10:51,PL-SQL 写道: 5e-324 是不是权限

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/qiuxiang/react-native-baidumap-sdk","title":"qiuxiang/react-native-baidumap-sdk","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/qiuxiang/react-native-baidumap-sdk"}},"updates":{"snippets":[{"icon":"PERSON","message":"@PL-SQL in #137: 5e-324 是不是权限"}],"action":{"name":"View Issue","url":"https://github.com/qiuxiang/react-native-baidumap-sdk/issues/137#issuecomment-437232523"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/qiuxiang/react-native-baidumap-sdk/issues/137#issuecomment-437232523", "url": "https://github.com/qiuxiang/react-native-baidumap-sdk/issues/137#issuecomment-437232523", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [qiuxiang/react-native-baidumap-sdk] Geocode 地理编码/逆编码模块 有病发次数限制吗? (#137)", "sections": [ { "text": "", "activityTitle": "PL-SQL", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@PL-SQL", "facts": [

] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "IssueComment",\n"repositoryFullName": "qiuxiang/react-native-baidumap-sdk",\n"issueId": 137,\n"IssueComment": "{{IssueComment.value}}"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "IssueClose",\n"repositoryFullName": "qiuxiang/react-native-baidumap-sdk",\n"issueId": 137\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/qiuxiang/react-native-baidumap-sdk/issues/137#issuecomment-437232523" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "MuteNotification",\n"threadId": 401464487\n}" } ], "themeColor": "26292E" } ]

sej1228 avatar Nov 09 '18 03:11 sej1228