Add Baidu Map coordinate pickup note in jquery boxy

Source: Internet
Author: User

  This article mainly introduced in the jquery boxy add Baidu Map coordinate pickup attention flow, the need for friends can refer to the following

As a beginner of development, this thing is only as a personal backup, if it can help is also good (I developed PHP, but this is JS does not have much impact on itself)     here to illustrate a few issues:    1.boxy called page can not appear in the Script label otherwise can not show     2.boxy call to pay attention to the process, to first load out the boxy and then to render the map to the boxy page     3. Baidu Map loading JS should be placed in the pop-up boxy of that page     Note process: Boxy page in fact, a separate page is only used in Ajax $.get ('/index.php?r=comm/map_coordinate ', function (data) {} method to call the page     Key Trigger JS follows:    code as follows: (function () {  $ (document). Ready (function () {    $ ("#Mechine_ Mec_points "). Click (function () {    __MC. Map_coordinate.getcorrdinate ();   }); });    __MC. Map_coordinate = {  getcorrdinate:function () {    $.get ('/index.php?r=comm/map_coordinate ', function ( Data {///call Boxy corresponding page, the page is only a id=allmap of div        New Boxy (data,{//on the outside already loaded good Baidu map AIP js  ' Title ': ' Map coordinates pickup ',  ' modal ':true,  ' draggable ':false,  ' unloadonhide ': true,  ' aftershow ': function () {      var map = new Bmap.map ("Allmap");  Map.centerandzOom (New Bmap.point (106.566872, 29.536861),;  map.enablescrollwheelzoom (); Enable wheel zoom out, default disable   Map.enablecontinuouszoom (); Enable map inertia drag and drop, default disable   function Showinfo (e) {  $ ("#Mechine_mec_points"). Val (e.point.lng + "," + E.point.lat);  }  Map.addeventlistener ("click", Showinfo);   }//aftershow end  });    return False ; });   }, } }) ();   

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.