function initAMap() { try { // 更新为完整地址 const address = '广东省深圳市南山区粤海街道麻岭社区麻雀岭工业区M-6栋中钢大厦5A010'; const companyName = '深圳汉晶电子信息有限公司'; // 创建地图实例 let map = null; // 地址解析 AMap.plugin('AMap.Geocoder', function() { const geocoder = new AMap.Geocoder({ city: "深圳", radius: 1000 }); geocoder.getLocation(address, function(status, result) { if (status === 'complete' && result.info === 'OK') { const lnglat = result.geocodes[0].location; map = new AMap.Map('mapContainer', { zoom: 16, center: [lnglat.lng, lnglat.lat], viewMode: '3D', resizeEnable: true, pitch: 40, mapStyle: 'amap://styles/normal' }); // 更新标记信息 const marker = new AMap.Marker({ position: [lnglat.lng, lnglat.lat], title: companyName, animation: 'AMAP_ANIMATION_DROP', offset: new AMap.Pixel(-13, -30) }); map.add(marker); // 更新信息窗体内容 const content = `
地址:${address}
电话:13420976989
Email:fu.bin@hjsilicon.com