我有很多地方可以通过。之前,我只是静态设置这些位置。现在,我创建了一个公司表,并创建了一个用于添加、删除和更新公司详细信息的界面。因此,我应该创建公司的那些位置,因为我创建了一个通行证。因此,我应该如何动态设置它们?我将这样的代码用于静态位置:
$pass->setJSON('{........... “地点”:[ { “经度”:104.89529371261597, “纬度”:11.576150037278605, "relevantText": "CamMob (dis. 1%)" }, { “经度”:104.89823341369629, “纬度”:11.570705493829758, "relevantText": "ITC (dis. 2%)" }, { “经度”:104.91380631923676, “纬度”:11.553425198985883, "relevantText": "Digi (dis. 10%)" }, { “经度”:104.92096781730652, “纬度”:11.569580835552655, "relevantText": "中央市场 (dis. 10%)" }, { “经度”:104.89310503005981, “纬度”:11.569444194519487, "relevantText": "IFL (dis. 20%)" }, { “经度”:104.89041209220886, “纬度”:11.568655879564044, "relevantText": "RUPP (dis. 5%)" }, { “经度”:104.89643096923828, “纬度”:11.568613836037402, "relevantText": "儿童医院 (dis. 50%)" }, { “经度”:104.89986419677734, “纬度”:11.566343476220418, "relevantText": "Santhormuk high school (dis. 15%)" }, { “经度”:104.89693522453308, “纬度”:11.573774631737194, "relevantText": "Royal ratanak 医院 (dis. 25%)" }, { “经度”:104.89693522453308, “纬度”:11.573774631737194, "relevantText": "AEU (dis. 30%)" }, { “经度”:104.8942369222641, “纬度”:11.561511017118434, "relevantText": "Moon Car Wash (dis. 10%)" }, { “经度”:104.92413818836212, “纬度”:11.553772076702026, "relevantText": "Auto Spa (dis. 10%)" }, { “经度”:104.9108076095581, “纬度”:11.545604569281316, "relevantText": "Penh Chet (dis. 5%)" }, { “经度”:104.89751189947128, “纬度”:11.590985354685541, "relevantText": "E-garage (dis. 5%)" }, { “经度”:104.91095378994942, “纬度”:11.562604174491218, "relevantText": "Futaba Garage (dis. 5%)" }, { “经度”:104.91638526320457, “纬度”:11.55557478276799, "relevantText": "豪爵摩托车 (dis. 3%)" }, { “经度”:104.90114092826843, “纬度”:11.545636104516502, "relevantText": "Ice City Skating Rink (dis. 20%)" }, { “经度”:104.93705168366432, “纬度”:11.5573354320172, "relevantText": "Galaxkate (dis. 10%)" }, { “经度”:104.92472290992737, “纬度”:11.553572359281521, "relevantText": "G-rise Photography (dis. 20%)" }, { “经度”:104.92827415466309, “纬度”:11.556431458262171, "relevantText": "Portor School International Kindergarten (dis. 5%)" }, { “经度”:104.92472290992737, “纬度”:11.553572359281521, "relevantText": "柬埔寨剑桥国际学校 (dis. 15%)" }, { “经度”:104.89523202180862, “纬度”:11.569042154169637, "relevantText": "EZECOM (dis. 35.5%)" } ] }');