聯(lián)系我們
聯(lián)系方式
深圳佑申電子有限公司
深圳市佐申電子有限公司
地址:深圳市寶安區(qū)松崗街道江邊社區(qū)工業(yè)中心大道11號(hào)3棟
東莞地址:東莞市橋頭鎮(zhèn)橋常路南一街6號(hào)
聯(lián)系人:程先生(13322938362)
!function(){ var infoWindow, map, level = 18, center = {lng: 113.80, lat: 22.77}, features = [{"icon":"cir","color":"red","name":"深圳佑申電子有限公司","desc":"地址:深圳市寶安區(qū)松崗街道江邊社區(qū)工業(yè)中心大道11號(hào)3棟","lnglat":{"Q":22.682100545684076,"R":114.28293269634247,"lng":113.80,"lat":22.77},"offset":{"x":-9,"y":-31},"type":"Marker"}]; function loadFeatures(){ for(var feature, data, i = 0, len = features.length, j, jl, path; i < len; i++){ data = features[i]; switch(data.type){ case "Marker": feature = new AMap.Marker({ map: map, position: new AMap.LngLat(data.lnglat.lng, data.lnglat.lat), zIndex: 3, extData: data, offset: new AMap.Pixel(data.offset.x, data.offset.y), title: data.name, content: '<div class="icon icon-' + data.icon + ' icon-'+ data.icon +'-' + data.color +'"></div>' }); break; case "Polyline": for(j = 0, jl = data.path.length, path = []; j < jl; j++){ path.push(new AMap.LngLat(data.path[j].lng, data.path[j].lat)); } feature = new AMap.Polyline({ map: map, path: path, extData: data, zIndex: 2, strokeWeight: data.strokeWeight, strokeColor: data.strokeColor, strokeOpacity: data.strokeOpacity }); break; case "Polygon": for(j = 0, jl = data.path.length, path = []; j < jl; j++){ path.push(new AMap.LngLat(data.path[j].lng, data.path[j].lat)); } feature = new AMap.Polygon({ map: map, path: path, extData: data, zIndex: 1, strokeWeight: data.strokeWeight, strokeColor: data.strokeColor, strokeOpacity: data.strokeOpacity, fillColor: data.fillColor, fillOpacity: data.fillOpacity }); break; default: feature = null; } if(feature){ AMap.event.addListener(feature, "click", mapFeatureClick); } } } function mapFeatureClick(e){ if(!infoWindow){ infoWindow = new AMap.InfoWindow({autoMove: true,isCustom: false}); } var extData = e.target.getExtData(); infoWindow.setContent("<div class='myinfowindow'><h5>" + extData.name + "</h5><div>" + extData.desc + "</div></div>"); infoWindow.open(map, e.lnglat); } map = new AMap.Map("mapContainer", {center: new AMap.LngLat(center.lng, center.lat), level: level, keyboardEnable:true, dragEnable:true, scrollWheel:true, doubleClickZoom:true}); loadFeatures(); map.on('complete', function(){ map.plugin(["AMap.ToolBar", "AMap.OverView", "AMap.Scale"], function(){ map.addControl(new AMap.ToolBar({ruler: true, direction: true, locate: false})); map.addControl(new AMap.OverView({isOpen: true})); map.addControl(new AMap.Scale); }); }) }();