评论管理
您当前的位置: 首页 > 评论管理 >在线留言
新材料 新能源 新生活
body { margin: 0; font: 13px/1.5 "Microsoft YaHei", "Helvetica Neue", "Sans-Serif"; min-height: 960px; min-width: 600px; } .my-map { margin: 0 auto; width: 1920px; height: 500px; } .my-map .icon { background: url(http://lbs.amap.com/console/public/show/marker.png) no-repeat; } .my-map .icon-cir { height: 31px; width: 28px; } .my-map .icon-cir-red { background-position: -11px -5px; } .amap-container{height: 100%;} !function(){ var infoWindow, map, level = 15, center = {lng: 104.788735, lat: 36.725933}, features = [{type: "Marker", name: "甘肃大象能源科技有限公司", desc: "电话:0943-36676190地址:甘肃省白银市平川区熙瑞路", color: "red", icon: "cir", offset: {x: -9, y: -31}, lnglat: {lng: 104.788735, lat: 36.725933}}]; 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: '' }); break; case "Polyline": for(j = 0, jl = data.lnglat.length, path = []; j < jl; j++){ path.push(new AMap.LngLat(data.lnglat[j].lng, data.lnglat[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.lnglat.length, path = []; j < jl; j++){ path.push(new AMap.LngLat(data.lnglat[j].lng, data.lnglat[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}); } var extData = e.target.getExtData(); infoWindow.setContent("" + extData.name + "" + extData.desc + ""); infoWindow.open(map, e.lnglat); } map = new AMap.Map("mapContainer", {center: new AMap.LngLat(center.lng, center.lat), level: level}); loadFeatures(); map.on('complete', function(){ map.plugin(["AMap.Scale"], function(){ map.addControl(new AMap.Scale); }); }) }();
页脚广告位
页脚广告位
CopyRights © All Rights Reserved 版权所有 甘肃大象能源科技有限公司 陇ICP备17005897号 公安备案甘公网安备 62040302000008号 法律声明 设计制作 宏点网络