export const addPoint = (view: MapView, item: any, img: string) => { const { x, y } = item; let point = new Point({ x: y, y: x }); const symblo: any = { type: "picture-marker", url: img, width: 22, height: 22, }; let graphic = new Graphic({ geometry: point, symbol: symblo, attributes: item, }) return graphic; } export const addText = (view: MapView, item: any, img: string) => { const { x, y } = item; let point = new Point({ x: y, y: x }); let textSymbol = { type: "text", color: "#02ECE5", haloColor: "#333", haloSize: 1, backgroundColor: "#333", borderLineSize: 1, borderLineColor: "#333", text: item.cjmc, font: { size: 12, family: "Josefin Slab", }, yoffset: 15 }; let graphic = new Graphic({ geometry: point, symbol: textSymbol, attributes: item, }) return graphic; }
正文
arcgis api 4.x添加图片和文字标签
文章版权声明:除非注明,否则均为
譬如朝露_策温技术开发工作室博客原创文章,转载或复制请以超链接形式并注明出处。
发表评论
侧栏公告
寄语
譬如朝露博客是一个分享前端知识的网站,联系方式11523518。
热评文章
标签列表
热门文章
友情链接