angular2-baidu-map | Angular2 component for Baidu map | Map library
kandi X-RAY | angular2-baidu-map Summary
kandi X-RAY | angular2-baidu-map Summary
Angular2 component for Baidu map
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of angular2-baidu-map
angular2-baidu-map Key Features
angular2-baidu-map Examples and Code Snippets
Community Discussions
Trending Discussions on angular2-baidu-map
QUESTION
In an app I'm developing with Ionic 3, I'm using the npm package angular2-baidu-map for showing maps of China mainland.
I have got an API key for Baidu Maps (for the JS API), and the map is working fine in a browser (i.e. ionic serve -l
), but once compiled and installed on a real device, the map isn't showing up.
After doing some debugging, it turns out that the API sends requests to file://api.map.baidu.com
, no matter what I set in the protocol
map init option.
For instance, the Safari developer tools' console logs some a lot of messages like:
The requested URL was not found on this server. file://api.map.baidu.com/api?v=2.0&ak=...&callback=baidumapinit&s=0 Failed to load resource: The requested URL was not found on this server.
Edit: added code
Basically I just tried this plugin with the demo code. But, for the sake of completeness, here it is.
HTML code
...ANSWER
Answered 2017-Sep-08 at 10:58Ok I had a look at the sourcecode and this is how the component decides which protocol to use:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angular2-baidu-map
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page