Commit 3a884fcd by niuxiaolin

latest

parent fe2a780a
......@@ -4,7 +4,11 @@
"scripts": {
"ng": "ng",
"start": "ng serve --proxy--config proxy.json",
"build": "ng build",
"build": "ng build --prod --build-optimizer && npm run remove-to && npm run create && npm run copy-to",
"remove-to": "rd /s /q D:\\projects\\supervise\\src\\main\\resources\\static",
"create": "mkdir D:\\projects\\supervise\\src\\main\\resources\\static",
"copy-to": " powershell -command \" Copy-Item D:\\projects\\map\\dist\\map\\* -Destination D:\\projects\\supervise\\src\\main\\resources\\static\\ -Recurse \"",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
......
......@@ -4,13 +4,16 @@ import { MainComponent } from './main/main.component';
import { VideoComponent } from './video/video.component';
const routes: Routes = [
{path:"",redirectTo:"./home",pathMatch:'full'},
{path:"",redirectTo:"home",pathMatch:'full'},
{path:'home',component:MainComponent},
{path:'video',component:VideoComponent},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
imports: [RouterModule.forRoot(routes,{
useHash:true
})],
exports: [RouterModule]
})
export class AppRoutingModule { }
......@@ -10,6 +10,7 @@ import { FormsModule } from '@angular/forms';
import { ModalComponent } from './modal/modal.component';
import { ApiModule } from './api';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule } from '@angular/router';
@NgModule({
declarations: [
AppComponent,
......@@ -18,9 +19,12 @@ import { HttpClientModule } from '@angular/common/http';
ModalComponent
],
imports: [
HttpClientModule,
BrowserModule,
AppRoutingModule,
FormsModule,
ApiModule,
BaiduMapModule.forRoot({ ak: 'KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6' })
......
......@@ -3,7 +3,7 @@
<div class="left">
<section>
<div *ngIf="debug">
<select [(ngModel)]="type">
<option value="0">project</option>
<option value="1">course</option>
......@@ -12,8 +12,9 @@
<select [(ngModel)]="currentCouseId">
<option *ngFor="let c of courses" [value]="c.id" >{{c.name}}</option>
</select>
</div>
<!-- <button (click)="openDialog('custom-modal-1')" >新增项目</button> -->
<button (click)="toHighWay()">高速公路</button>
<button [ngClass]="{focus:highShow}" (click)="toHighWay()">高速公路</button>
<div *ngIf="!highShow">
<label>项目总数:{{staticHighWay.total}}个</label>
<label>总建设里程:{{staticHighWay.mileage}}Km </label>
......@@ -21,12 +22,12 @@
</div>
<section *ngIf="highShow" class="sub">
<label (click)="changePolyline(prj)" *ngFor="let prj of projects">{{prj.name}}
<label (click)="highLight(i,prj)" *ngFor="let prj of projects;let i=index">{{prj.name}}
</label>
</section>
</section>
<section>
<button (click)='toNormal()'>普通干线
<button [ngClass]="{focus:normalShow}" (click)='toNormal()'>普通干线
</button>
<div *ngIf="!normalShow">
......@@ -36,7 +37,7 @@
</div>
<section *ngIf="normalShow" class="sub">
<label (click)="changePolyline(prj)" *ngFor="let prj of normalProjects">{{prj.name}}
<label (click)="highLight(i,prj)" *ngFor="let prj of normalProjects;let i=index">{{prj.name}}
</label>
</section>
</section>
......@@ -45,8 +46,7 @@
<div class="map">
<div id="polylineLength"></div>
<div id="result"></div>
<!-- <polyline *ngFor="let poly of polys" [points]="poly.points" [options]="poly.polylineOptions" (loaded)="polylineLoaded($event)" (clicked)="polylineClicked($event)"></polyline>
-->
<baidu-map #map [options]="opts" >
<polyline [points]="points" [options]="polylineOptions" (loaded)="polylineLoaded($event)" (clicked)="polylineClicked($event)"></polyline>
......@@ -57,35 +57,28 @@
<button>视频监管
</button>
<label>项目总数:**个</label>
<label>总建设里程:***Km </label>
<label>总投资:**亿</label>
<label>监管项目:**个</label>
<label>监控点总计:***Km </label>
</section>
<section>
<button>建设程序监管
</button>
<label>项目总数:**个</label>
<label>总建设里程:***Km </label>
<label>总投资:**亿</label>
</section>
<section>
<button>质量安全监管
</button>
<label>项目总数:**个</label>
<label>总建设里程:***Km </label>
<label>总投资:**亿</label>
<button>质量安全监管 </button>
<label>年度累计完成产值:</label>
<label>年度总目标产值: </label>
</section>
<section>
<button>造价监管
</button>
<label>项目总数:**个</label>
<label>总建设里程:***Km </label>
<label>总投资:**亿</label>
<label></label>
<label> </label>
<label></label>
</section>
</div>
</div>
......
......@@ -9,13 +9,14 @@
border: 4px solid #3885b3;
button{
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
background: #ea262d96;
color:white;
background: #43a5dd;
color: white;
border-radius: 4px;
width: 100px;
height: 30px;
width: 130px;
height: 39px;
display: block;
margin: 0.3em;
font-size: initial;
}
label{
display: block;
......@@ -45,3 +46,6 @@
}
}
.focus{
background: #ea262d96!important;
}
\ No newline at end of file
......@@ -9,18 +9,20 @@ import { DefaultService, Project, Course, Scetion } from '../api';
import { HttpClient, HttpParams } from '@angular/common/http';
import { timer } from 'rxjs';
import { timeInterval, pluck, take} from 'rxjs/operators';
declare var drawingManager:any;
declare var map:any;
declare var BMap:any;
const enum CordType{
import { timeInterval, pluck, take } from 'rxjs/operators';
import { ActivatedRoute } from '@angular/router';
declare var map: any;
declare var BMap: any;
declare var BMapLib: any;
const enum CordType {
PROJ,
COURSE,
SECTION
}
const enum markType{
HIGHWAY=1,
NORMAL
const enum markType {
HIGHWAY = 1,
NORMAL
}
export interface DialogData {
animal: string;
......@@ -33,76 +35,82 @@ export interface DialogData {
})
export class MainComponent implements OnInit {
courses=[];
highShow=false;
normalShow=false;
courses = [];
highShow = false;
normalShow = false;
public opts: MapOptions
public points: Array<Point>=[];
public points: Array<Point> = [];
public polylineOptions: PolylineOptions;
public projects=[
public projects = [
]
polys=[];
proj:Project={delFlag:0};
course:Course = {delFlag:0};
section:Scetion = {delFlag:0};
type=1;
_this =this;
currentCouseId:any;
staticHighWay:any={};
staticNormal:any={};
normalProjects:any=[];
debug=true;
toPoints(points:Array<Point>){
polys = [];
proj: Project = { delFlag: 0 };
course: Course = { delFlag: 0 };
section: Scetion = { delFlag: 0 };
type = 1;
_this = this;
currentCouseId: any;
staticHighWay: any = {};
staticNormal: any = {};
normalProjects: any = [];
debug = false;
toPoints(points: Array<Point>) {
if (!points) {
return []
}
return points.map(p => {
return new window.BMap.Point(p.lng, p.lat)
})
}
}
addPoly(cords:string){
var points = JSON.parse(cords).map(c=>({lng:c[0],lat:c[1]}));
var newPolyLine = new window.BMap.Polyline(this.toPoints(points));
addPoly(proj: Project) {
var points = JSON.parse(proj.coordinate).map(c => ({ lng: c[0], lat: c[1] }));
var newPolyLine = new window.BMap.Polyline(this.toPoints(points), { strokeColor: proj.lineStyle, strokeWeight: proj.lineWidth });
map.addOverlay(newPolyLine);
}
ngOnInit(): void {
this.http.get<any>(this.s.basePath+`/project/total`).subscribe(res=>{
this.staticHighWay=res.data[0];
this.route.queryParamMap.subscribe(queryParams => {
this.debug =Boolean( queryParams.get("debug"))
})
this.http.get<any>(this.s.basePath + `/project/total`).subscribe(res => {
this.staticHighWay = res.data[0];
});
this.http.get<any>(this.s.basePath+`/project/total2`).subscribe(res=>{
this.staticNormal=res.data[0];
this.http.get<any>(this.s.basePath + `/project/total2`).subscribe(res => {
this.staticNormal = res.data[0];
});
this.http.get<any>(this.s.basePath+"/course/list").subscribe(res=>{
this.courses=res.data;
this.http.get<any>(this.s.basePath + "/course/list").subscribe(res => {
this.courses = res.data;
});
}
toHighWay(){
this.highShow=!this.highShow;
let params = new HttpParams();
params.append('mark',markType.HIGHWAY.toString());
this.http.get<any>(this.s.basePath+`/project/list/${markType.HIGHWAY}`).subscribe(res=>{
this.projects=res.data;
toHighWay() {
this.highShow = !this.highShow;
if(this.highShow){
map.clearOverlays();
this.http.get<any>(this.s.basePath + `/project/list/${markType.HIGHWAY}`).subscribe(res => {
this.projects = res.data;
var allPoints = [];
res.data.forEach(poly => {
this.addPoly(poly.coordinate);
this.addPoly(poly);
allPoints = allPoints.concat(JSON.parse(poly.coordinate));
});
map.setViewport(allPoints.map(p=>({lng:p[0],lat:p[1]})));
map.setViewport(allPoints.map(p => ({ lng: p[0], lat: p[1] })));
});
}
}
toNormal(){
this.normalShow=!this.normalShow;
let params = new HttpParams();
params.append('mark',markType.HIGHWAY.toString());
this.http.get<any>(this.s.basePath+`/project/list/${markType.NORMAL}`).subscribe(res=>{
this.normalProjects=res.data;
toNormal() {
map.clearOverlays();
this.normalShow = !this.normalShow;
this.http.get<any>(this.s.basePath + `/project/list/${markType.NORMAL}`).subscribe(res => {
this.normalProjects = res.data;
});
......@@ -112,7 +120,7 @@ toPoints(points:Array<Point>){
}
constructor(private cd:ChangeDetectorRef,private http:HttpClient, private dynamicScriptLoader: DynamicScriptLoaderService,private modalService: ModalService,private s:DefaultService) {
constructor(private route:ActivatedRoute, private cd: ChangeDetectorRef, private http: HttpClient, private dynamicScriptLoader: DynamicScriptLoaderService, private modalService: ModalService, private s: DefaultService) {
//定位山西省地图
this.opts = {
centerAndZoom: {
......@@ -127,67 +135,63 @@ toPoints(points:Array<Point>){
this.polylineOptions = {
strokeColor: 'red',
strokeColor: 'yellow',
strokeWeight: 10
}
}
changePolyline(proj){
this.polylineOptions = {strokeColor:proj.lineStyle,strokeWeight:proj.lineWidth}
this.triggerFlash();
this.points = Object.assign([],JSON.parse(proj.coordinate)).map(r=>({lat:Number(r[1]),lng:Number(r[0])}));
map.setViewport(this.points)
}
// 切换线条的闪烁
private triggerFlash() {
var originColor = this.polylineOptions.strokeColor;
corToPoint(json:string){
return JSON.parse(json).map(r=>({lng:r[0],lat:r[1]}));
}
highLight(i:number,proj:Project) {
var overlays = map.getOverlays();
timer(0, 200)
.pipe(timeInterval(), pluck('interval'), take(6)).subscribe(index => {
if (this.polylineOptions.strokeColor == "#fff") {
this.polylineOptions = { strokeColor: originColor };
}
else {
this.polylineOptions = { strokeColor: "#fff" };
if(overlays[i].isVisible()){
overlays[i].hide();
}else{
overlays[i].show();
}
});
map.setViewport(this.corToPoint(proj.coordinate))
}
addCourse(course:Course){
this.http.post<Course>(this.s.basePath+"/course/add",this.course).subscribe(res=>{
addCourse(course: Course) {
this.http.post<Course>(this.s.basePath + "/course/add", this.course).subscribe(res => {
this.modalService.close('custom-modal-2');
})
}
addSection(section:Scetion){
}
addSection(section: Scetion) {
this.http.post<Scetion>(this.s.basePath+"/scetion/add",section).subscribe(res=>{
this.http.post<Scetion>(this.s.basePath + "/scetion/add", section).subscribe(res => {
this.modalService.close('custom-modal-3');
})
}
addProj(proj:Project){
this.http.post(this.s.basePath+"/project/add",proj).subscribe(res=>{
}
addProj(proj: Project) {
this.http.post(this.s.basePath + "/project/add", proj).subscribe(res => {
console.log(res)
});
}
}
public polylineLoaded(polyline: BPolyline): void {
(window as any).map= polyline.getMap();
(window as any).map = polyline.getMap();
this.setBound();
(window as any).map.setMapStyleV2({styleJson:theme});
this.dynamicScriptLoader.load('drawing','geouti').then(data => {
(window as any).map.setMapStyleV2({ styleJson: theme });
this.dynamicScriptLoader.load('drawing', 'geouti').then(data => {
map.enableScrollWheelZoom(true);
// Script Loaded Successfully
drawingManager.addEventListener("mousedown",e=>{
console.log(e);
if(this.debug){
var drawingManager = this.initDrawingTool();
drawingManager.addEventListener("mousedown", e => {
alert(e)
});
drawingManager.addEventListener('overlaycomplete', e=>{
drawingManager.addEventListener('overlaycomplete', e => {
var overlay = e.overlay;
if(!e.overlay.getBounds){
if (!e.overlay.getBounds) {
return;
}
var bounds = e.overlay.getBounds();
......@@ -198,7 +202,7 @@ addProj(proj:Project){
var neMc = mercatorProjection.lngLatToPoint(ne);
var swMc = mercatorProjection.lngLatToPoint(sw);
var pathStr = "";
var geojsonStr ={};
var geojsonStr = {};
var pathmcStr = "";
var path = overlay.getPath();
var coordinates = [];
......@@ -222,17 +226,17 @@ addProj(proj:Project){
};
}
if(this.type==CordType.PROJ){
this.proj.course=this.currentCouseId;
this.proj.coordinate =JSON.stringify(coordinates);
if (this.type == CordType.PROJ) {
this.proj.course = this.currentCouseId;
this.proj.coordinate = JSON.stringify(coordinates);
this.modalService.open('custom-modal-1');
}else if(this.type==CordType.COURSE){
} else if (this.type == CordType.COURSE) {
this.course.coordinate = JSON.stringify(coordinates);
this.modalService.open('custom-modal-2');
}else if(this.type==CordType.SECTION){
} else if (this.type == CordType.SECTION) {
this.section.coordinate = JSON.stringify(coordinates);
this.modalService.open('custom-modal-3');
}
......@@ -244,6 +248,7 @@ addProj(proj:Project){
});
}
}).catch(error => console.log(error));
console.log('polyline loaded', polyline)
......@@ -253,16 +258,16 @@ addProj(proj:Project){
console.log('polyline clicked', polyline)
}
overlaycomplete(e){
overlaycomplete(e) {
};
closeModal(id: string) {
};
closeModal(id: string) {
this.modalService.close(id);
}
setBound(){
}
setBound() {
var project = map.getMapType().getProjection();
var getPathStr=function(overlay) {
var getPathStr = function (overlay) {
var pathStr = "";
var path = overlay.getPath();
for (var i = 0; i < path.length; i++) {
......@@ -270,22 +275,22 @@ setBound(){
}
pathStr = pathStr.substr(0, pathStr.length - 1);
return pathStr;
}
}
var bdary = new BMap.Boundary();
bdary.get('山西' , function(rs){ //获取行政区域
bdary.get('山西', function (rs) { //获取行政区域
//map.clearOverlays(); //清除地图覆盖物
var count = rs.boundaries.length; //行政区域的点有多少个
if (count === 0) {
alert('未能获取当前输入行政区域');
return ;
return;
}
var pointArray = [];
var pathArr = [];
for (var i = 0; i < count; i++) {
var ply = new BMap.Polygon(rs.boundaries[i], {strokeWeight: 1, fillOpacity: 0.05, strokeColor: "#f0f"}); //建立多边形覆盖物
var ply = new BMap.Polygon(rs.boundaries[i], { strokeWeight: 1, fillOpacity: 0.05, strokeColor: "#f0f" }); //建立多边形覆盖物
(function(ply){
ply.addEventListener('click', function() {
(function (ply) {
ply.addEventListener('click', function () {
// showResult(ply);
});
})(ply);
......@@ -304,8 +309,42 @@ setBound(){
map.setViewport(pointArray); //调整视野
map.setMinZoom(8);
});
}
});
}
initDrawingTool():any {
var styleOptions = {
strokeColor: "red", //边线颜色。
fillColor: "red", //填充颜色。当参数为空时,圆形将没有填充效果。
strokeWeight: 3, //边线的宽度,以像素为单位。
strokeOpacity: 0.8, //边线透明度,取值范围0 - 1。
fillOpacity: 0.6, //填充的透明度,取值范围0 - 1。
strokeStyle: 'solid' //边线的样式,solid或dashed。
}
var mapOptions = {
enableMapClick: true
}
//实例化鼠标绘制工具
var drawingManager = new BMapLib.DrawingManager(map, {
isOpen: true, //是否开启绘制模式
enableDrawingTool: true, //是否显示工具栏
drawingToolOptions: {
// anchor: BMAP_ANCHOR_TOP_RIGHT, //位置
offset: new BMap.Size(5, 5), //偏离值
scale: 0.8 //工具栏缩放比例
},
circleOptions: styleOptions, //圆的样式
polylineOptions: styleOptions, //线的样式
polygonOptions: styleOptions, //多边形的样式
rectangleOptions: styleOptions //矩形的样式
});
return drawingManager;
}
}
......@@ -6,166 +6,166 @@ export const theme =[{
"visibility": "on",
"color": "#0d142dff"
}
}, {
}, {
"featureType": "water",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#0d142dff"
}
}, {
}, {
"featureType": "building",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#02081eff"
}
}, {
}, {
"featureType": "building",
"elementType": "geometry.stroke",
"stylers": {
"visibility": "on",
"color": "#000005ff"
}
}, {
}, {
"featureType": "water",
"elementType": "geometry",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "village",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "town",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "district",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "country",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "city",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "continent",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "poilabel",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "poilabel",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "scenicspotslabel",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "scenicspotslabel",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "transportationlabel",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "transportationlabel",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "airportlabel",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "airportlabel",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "road",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#4c8ec1ff"
}
}, {
}, {
"featureType": "road",
"elementType": "geometry.stroke",
"stylers": {
"visibility": "on",
"color": "#2e6b99ff"
}
}, {
}, {
"featureType": "road",
"elementType": "geometry",
"stylers": {
"weight": "3"
}
}, {
}, {
"featureType": "green",
"elementType": "geometry",
"stylers": {
"visibility": "on",
"color": "#0e182dff"
}
}, {
}, {
"featureType": "scenicspots",
"elementType": "geometry",
"stylers": {
"visibility": "on",
"color": "#0d142dff"
}
}, {
}, {
"featureType": "scenicspots",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "scenicspots",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -173,7 +173,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "continent",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -181,7 +181,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "country",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -189,7 +189,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "city",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -197,13 +197,13 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "city",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "scenicspotslabel",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -211,7 +211,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "airportlabel",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -219,7 +219,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "transportationlabel",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -227,73 +227,73 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "railway",
"elementType": "geometry",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "subway",
"elementType": "geometry",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "highwaysign",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "nationalwaysign",
"elementType": "labels",
"stylers": {
"visibility": "off"
"visibility": "on"
}
}, {
}, {
"featureType": "nationalwaysign",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
"visibility": "on"
}
}, {
}, {
"featureType": "provincialwaysign",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "provincialwaysign",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "tertiarywaysign",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "tertiarywaysign",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "subwaylabel",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "subwaylabel",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "road",
"elementType": "labels.text.fill",
"stylers": {
......@@ -301,7 +301,7 @@ export const theme =[{
"color": "#65a8d1ff",
"weight": "90"
}
}, {
}, {
"featureType": "road",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -309,78 +309,78 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "shopping",
"elementType": "geometry",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "scenicspots",
"elementType": "labels",
"stylers": {
"visibility": "on"
}
}, {
}, {
"featureType": "scenicspotslabel",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "manmade",
"elementType": "geometry",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "manmade",
"elementType": "labels",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "highwaysign",
"elementType": "labels.icon",
"stylers": {
"visibility": "off"
}
}, {
}, {
"featureType": "water",
"elementType": "labels.text.stroke",
"stylers": {
"visibility": "on",
"color": "#0e182d00"
}
}, {
}, {
"featureType": "road",
"stylers": {
"level": "6",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"stylers": {
"level": "7",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"stylers": {
"level": "8",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"stylers": {
"level": "9",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "geometry",
"stylers": {
......@@ -389,7 +389,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "geometry",
"stylers": {
......@@ -398,7 +398,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "geometry",
"stylers": {
......@@ -407,7 +407,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "geometry",
"stylers": {
......@@ -416,7 +416,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "labels",
"stylers": {
......@@ -425,7 +425,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "labels",
"stylers": {
......@@ -434,7 +434,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "labels",
"stylers": {
......@@ -443,7 +443,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "labels",
"stylers": {
......@@ -452,13 +452,13 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "road",
"elementType": "labels.text",
"stylers": {
"fontsize": "24"
}
}, {
}, {
"featureType": "highway",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -466,158 +466,158 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1.2"
}
}, {
}, {
"featureType": "highway",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#b0e614f5"
"visibility": "on"
}
}, {
}, {
"featureType": "highway",
"elementType": "geometry.stroke",
"stylers": {
"color": "#860df1ff"
}
}, {
}, {
"featureType": "highway",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
"color": "#5c1f7aff"
}
}, {
}, {
"featureType": "highway",
"elementType": "geometry",
"stylers": {
"weight": "4.2"
"weight": "4.2",
"visibility": "on"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#4c8ec1ff"
"color": "#27860cff"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "geometry.stroke",
"stylers": {
"color": "#1c4f7eff"
"color": "#59864fff"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
"color": "#cf5151ff"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "labels.text.stroke",
"stylers": {
"visibility": "on",
"color": "#ffffffff",
"weight": "1"
"weight": 1.6,
"color": "#1d5e9bff"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "geometry",
"stylers": {
"weight": "3"
"weight": 6.2
}
}, {
}, {
"featureType": "provincialway",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#abc14cff"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#4c8ec1ff"
}
}, {
}, {
"featureType": "arterial",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#4c8ec1ff"
}
}, {
}, {
"featureType": "tertiaryway",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#4a90e2ff"
}
}, {
}, {
"featureType": "fourlevelway",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#4c8ec1ff"
}
}, {
}, {
"featureType": "local",
"elementType": "geometry.fill",
"stylers": {
"visibility": "on",
"color": "#4c8ec1ff"
}
}, {
}, {
"featureType": "provincialway",
"elementType": "geometry.stroke",
"stylers": {
"visibility": "on",
"color": "#2e6b99ff"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "geometry.stroke",
"stylers": {
"visibility": "on",
"color": "#2e6b99ff"
}
}, {
}, {
"featureType": "arterial",
"elementType": "geometry.stroke",
"stylers": {
"visibility": "on",
"color": "#2e6b99ff"
}
}, {
}, {
"featureType": "tertiaryway",
"elementType": "geometry.stroke",
"stylers": {
"visibility": "on",
"color": "#2e6b99ff"
}
}, {
}, {
"featureType": "fourlevelway",
"elementType": "geometry.stroke",
"stylers": {
"visibility": "on",
"color": "#2e6b99ff"
}
}, {
}, {
"featureType": "local",
"elementType": "geometry.stroke",
"stylers": {
"visibility": "on",
"color": "#2e6b99ff"
}
}, {
}, {
"featureType": "local",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "local",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -625,42 +625,42 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "fourlevelway",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "tertiaryway",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "arterial",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "provincialway",
"elementType": "labels.text.fill",
"stylers": {
"visibility": "on",
"color": "#65a8d1ff"
}
}, {
}, {
"featureType": "provincialway",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -668,7 +668,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -676,7 +676,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "arterial",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -684,7 +684,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "tertiaryway",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -692,7 +692,7 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "fourlevelway",
"elementType": "labels.text.stroke",
"stylers": {
......@@ -700,71 +700,72 @@ export const theme =[{
"color": "#ffffffff",
"weight": "1"
}
}, {
}, {
"featureType": "fourlevelway",
"elementType": "geometry",
"stylers": {
"weight": "1"
}
}, {
}, {
"featureType": "tertiaryway",
"elementType": "geometry",
"stylers": {
"weight": "1"
}
}, {
}, {
"featureType": "local",
"elementType": "geometry",
"stylers": {
"weight": "1"
}
}, {
}, {
"featureType": "provincialway",
"elementType": "geometry",
"stylers": {
"weight": "3"
"weight": "3",
"visibility": "off"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "geometry",
"stylers": {
"weight": "3"
}
}, {
}, {
"featureType": "arterial",
"elementType": "geometry",
"stylers": {
"weight": "3"
}
}, {
}, {
"featureType": "highway",
"stylers": {
"level": "6",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"stylers": {
"level": "7",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"stylers": {
"level": "8",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"stylers": {
"level": "9",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"elementType": "geometry",
"stylers": {
......@@ -773,7 +774,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"elementType": "geometry",
"stylers": {
......@@ -782,7 +783,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"elementType": "geometry",
"stylers": {
......@@ -791,7 +792,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"elementType": "geometry",
"stylers": {
......@@ -800,7 +801,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"elementType": "labels",
"stylers": {
......@@ -809,7 +810,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"elementType": "labels",
"stylers": {
......@@ -818,7 +819,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"elementType": "labels",
"stylers": {
......@@ -827,7 +828,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "highway",
"elementType": "labels",
"stylers": {
......@@ -836,35 +837,35 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"stylers": {
"level": "6",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"stylers": {
"level": "7",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"stylers": {
"level": "8",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"stylers": {
"level": "9",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "geometry",
"stylers": {
......@@ -873,7 +874,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "geometry",
"stylers": {
......@@ -882,7 +883,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "geometry",
"stylers": {
......@@ -891,7 +892,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "geometry",
"stylers": {
......@@ -900,7 +901,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "labels",
"stylers": {
......@@ -909,7 +910,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "labels",
"stylers": {
......@@ -918,7 +919,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "labels",
"stylers": {
......@@ -927,7 +928,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "nationalway",
"elementType": "labels",
"stylers": {
......@@ -936,21 +937,21 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "provincialway",
"stylers": {
"level": "8",
"curZoomRegionId": "0",
"curZoomRegion": "8-10"
}
}, {
}, {
"featureType": "provincialway",
"stylers": {
"level": "9",
"curZoomRegionId": "0",
"curZoomRegion": "8-10"
}
}, {
}, {
"featureType": "provincialway",
"elementType": "geometry",
"stylers": {
......@@ -959,7 +960,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "8-10"
}
}, {
}, {
"featureType": "provincialway",
"elementType": "geometry",
"stylers": {
......@@ -968,7 +969,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "8-10"
}
}, {
}, {
"featureType": "provincialway",
"elementType": "labels",
"stylers": {
......@@ -977,7 +978,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "8-10"
}
}, {
}, {
"featureType": "provincialway",
"elementType": "labels",
"stylers": {
......@@ -986,35 +987,35 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "8-10"
}
}, {
}, {
"featureType": "cityhighway",
"stylers": {
"level": "6",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"stylers": {
"level": "7",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"stylers": {
"level": "8",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"stylers": {
"level": "9",
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "geometry",
"stylers": {
......@@ -1023,7 +1024,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "geometry",
"stylers": {
......@@ -1032,7 +1033,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "geometry",
"stylers": {
......@@ -1041,7 +1042,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "geometry",
"stylers": {
......@@ -1050,7 +1051,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "labels",
"stylers": {
......@@ -1059,7 +1060,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "labels",
"stylers": {
......@@ -1068,7 +1069,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "labels",
"stylers": {
......@@ -1077,7 +1078,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "cityhighway",
"elementType": "labels",
"stylers": {
......@@ -1086,14 +1087,14 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "6-9"
}
}, {
}, {
"featureType": "arterial",
"stylers": {
"level": "9",
"curZoomRegionId": "0",
"curZoomRegion": "9-9"
}
}, {
}, {
"featureType": "arterial",
"elementType": "geometry",
"stylers": {
......@@ -1102,7 +1103,7 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "9-9"
}
}, {
}, {
"featureType": "arterial",
"elementType": "labels",
"stylers": {
......@@ -1111,4 +1112,22 @@ export const theme =[{
"curZoomRegionId": "0",
"curZoomRegion": "9-9"
}
}]
\ No newline at end of file
}, {
"featureType": "nationalwaysign",
"elementType": "labels.text.fill",
"stylers": {
"color": "#f8e71cff"
}
}, {
"featureType": "nationalwaysign",
"elementType": "labels.text.stroke",
"stylers": {
"color": "#f7f3f3ff"
}
}, {
"featureType": "nationalwaysign",
"elementType": "labels.text",
"stylers": {
"fontsize": 31
}
}]
\ No newline at end of file
......@@ -1642,34 +1642,3 @@ var BMAP_DRAWING_MARKER = "marker", // 鼠标画点模式
})();
var styleOptions = {
strokeColor:"red", //边线颜色。
fillColor:"red", //填充颜色。当参数为空时,圆形将没有填充效果。
strokeWeight: 3, //边线的宽度,以像素为单位。
strokeOpacity: 0.8, //边线透明度,取值范围0 - 1。
fillOpacity: 0.6, //填充的透明度,取值范围0 - 1。
strokeStyle: 'solid' //边线的样式,solid或dashed。
}
var mapOptions = {
enableMapClick: true
}
//实例化鼠标绘制工具
var drawingManager = new BMapLib.DrawingManager(window.map, {
isOpen: true, //是否开启绘制模式
enableDrawingTool: true, //是否显示工具栏
drawingToolOptions: {
anchor: BMAP_ANCHOR_TOP_RIGHT, //位置
offset: new BMap.Size(5, 5), //偏离值
scale: 0.8 //工具栏缩放比例
},
circleOptions: styleOptions, //圆的样式
polylineOptions: styleOptions, //线的样式
polygonOptions: styleOptions, //多边形的样式
rectangleOptions: styleOptions //矩形的样式
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment