admin 管理员组文章数量: 887039
2024年1月12日发(作者:少儿编程学费)
2、创建style,添加source、style到layer var pointTypename="xcy:point"; var pointVectorSource = new ({ features:[feature] }); var fill = new ({ color: '#dd942e' }); var stroke = new ({ color: '#cc1000', width: 1.25 }); var stylePoint = [ new ({ image: new ({ fill: new ({ color: 'rgba(255,0,255,0.4)' }), stroke: new ({ color: '#cc3540', width: 1.25 }), radius: 5 }), fill: fill, stroke: stroke }) ]; /* var stylePoint = [ new ({ image:new rShape({ fill: fill, stroke: stroke, points: 3, radius: 10, //rotation: / 4, angle: 0 }) }) ];*/ /* var stylePoint = [ new ({ image:new (({ anchor: [0.5, 0], anchorOrigin: 'bottom-left', anchorXUnits: 'fraction', anchorYUnits: 'pixels', src: '/en/v3.20.1/examples/data/', scale: 0.45 }))
name: 'My Polyline' }); var featurepolygon= new e({ geometry:geomPolygon }); / var pointTypename="xcy:point"; var pointVectorSource = new ({ features:[feature] }); var fill = new ({ color: '#dd942e' }); var stroke = new ({ color: '#cc1000', width: 1.25 }); var stylePoint = [ new ({ image: new ({ fill: new ({ color: 'rgba(255,0,255,0.4)' }), stroke: new ({ color: '#cc3540', width: 1.25 }), radius: 5 }), fill: fill, stroke: stroke }) ]; /* var stylePoint = [ new ({ image:new rShape({ fill: fill, stroke: stroke, points: 3, radius: 10, //rotation: / 4, angle: 0 }) }) ];*/ /* var stylePoint = [ new ({ image:new (({ anchor: [0.5, 0], anchorOrigin: 'bottom-left', anchorXUnits: 'fraction', anchorYUnits: 'pixels', src: '/en/v3.20.1/examples/data/', scale: 0.45 })) }) ];*/ var pointVectorLayer = new ({ title:"点", source: pointVectorSource, //style: styleFunction, style:styleFunction, renderMode:'image' }); var polylineVectorSource = new ({ features:[featurepolyline]
font: '12px Calibri,sans-serif', fill: new ({ color: '#000' }), stroke: new ({ color: 'red', width: 3 }), //textAlign:"left", offsetX:"0" }) }); }