Baidu map JavaScript related bug Collection

Source: Internet
Author: User

One in the mobile phone with Baidu Map JS version to do WebApp bug set

1 before using the 2.0 version found that as long as the map added covering, no matter how many, the local map to zoom to a very small extent, will be stuck

1.1 Workaround: Reduce version to 1.5 version no more.

2 Add Click events when testing custom overlays today, Andorid can trigger a click event, but it doesn't trigger to kill in iOS.

2.1 Try to fix: Change the version back to 2.0 the problem remains

2.2 Instead of Touchstart event, the problem is resolved, reference post: http://bbs.lbsyun.baidu.com/forum.php?mod=viewthread&tid=105959&fromuid= 384187

2.3 The unexpected is when I change the version back to 2.0, the first problem seems to be absent, I think it is Baidu himself to fill in this lesson

Two Ios webview loading local files

2.1 Using the Loadreuest method: Copy the local HTM and the referenced JS CSS files to the resource folder and set the HTML file to be loaded as Bundleresource, then use the correct path in the program

The 2.2 code is as follows

NSBundle mainbundle = nsbundle.mainbundle; string ImagePath = Mainbundle.pathforresource (@ "html/baidu/index"@ " HTML " // The method means to load a file of the specified type with the specified name under the resource directory root, as the path is "Htm/baidu/index" control.loadrequest ( new Nsurlrequest (newfalse)));
View Code

2.3 Folder diagram

2.4 If the web path is loaded, use the Web address directly

Baidu map JavaScript related bug collection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.