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 ; }); }, } }) ();