• 剪刀
    
  • 信息
    
  • 圆形
    
  • circle-hollow
    
  • 右箭头
    
  • 左箭头
    
  • sync-green
    
  • plus
    
  • paint-brush
    
  • minus
    
  • 层_line
    
  • 设置
    
  • 面型图标1_涂鸦
    
  • 编辑
    
  • 叠加分析
    
  • 复制
    
  • 长度测量
    
  • 多边形
    
  • 应急标绘
    
  • 影响对比
    
  • 全图
    
  • E
    
  • S
    
  • T
    
  • clear
    
  • draw_click
    
  • line
    
  • 取消顶置
    
  • self-analysis
    
  • export-excel
    
  • iconfont-export
    
  • 垃圾桶_块
    
  • compare
    
  • sync-disabled
    
  • 灯光指示
    
  • 框选
    
  • 定位
    
  • iconfont-export
    
  • 路径分析
    
  • rectangle
    
  • 放大
    
  • 垃圾桶
    
  • 高级查询
    
  • 面积测量
    
  • 标记
    
  • 剪刀
    
  • edit-brush
    
  • 缩放,看,探索,查看,搜索,放大镜,优化,线性,扁平,填充,单色,简约,圆润
    
  • 线标绘
    
  • hand
    
  • 缩小
    
  • 地球
    
  • 图例
    
  • g
    
  • 粘贴
    
  • 箭头
    
  • full screen
    
  • layers
    
  • 分时对比-icon
    
  • marker
    
  • 置顶
    
  • hand
    
  • 搜索
    
  • database
    
  • 饼图
    
  • 显示
    
  • 皮肤
    
  • picture
    
  • 打印
    
  • edit
    
  • 箭头
    
  • 灯标
    
  • 面标绘
    
  • 长度
    
  • D
    
  • zoomin
    
  • 宽度扩展图
    
  • 不显示
    
  • icon_宽度
    
  • 涂鸦
    
  • shexiangtou
    
  • compare
    
  • 面积
    
  • bookmark
    
  • ManagePaths
    
  • trajectory path
    

Unicode 引用


Unicode 是字体在网页端最原始的应用方式,特点是:

  • 兼容性最好,支持 IE6+,及所有现代浏览器。
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。

注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式

Unicode 使用步骤如下:

第一步:拷贝项目下面生成的 @font-face

@font-face {
  font-family: 'iconfont';
  src: url('iconfont.eot');
  src: url('iconfont.eot?#iefix') format('embedded-opentype'),
      url('iconfont.woff2') format('woff2'),
      url('iconfont.woff') format('woff'),
      url('iconfont.ttf') format('truetype'),
      url('iconfont.svg#iconfont') format('svg');
}

第二步:定义使用 iconfont 的样式

.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

第三步:挑选相应图标并获取字体编码,应用于页面

<span class="iconfont">&#x33;</span>

"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

  • 剪刀
    .icon-screen-shot
  • 信息
    .icon-info-query
  • 圆形
    .icon-draw-circle
  • circle-hollow
    .icon-draw-circlemarker
  • 右箭头
    .icon-arrow-right
  • 左箭头
    .icon-arrow-left
  • sync-green
    .icon-sync
  • plus
    .icon-plus
  • paint-brush
    .icon-draw-old2
  • minus
    .icon-minus
  • 层_line
    .icon-layers-line
  • 设置
    .icon-settingbar
  • 面型图标1_涂鸦
    .icon-freedraw-0
  • 编辑
    .icon-draw-edit
  • 叠加分析
    .icon-overlay_analysis
  • 复制
    .icon-copy
  • 长度测量
    .icon-measure-length_bak
  • 多边形
    .icon-draw-polygon
  • 应急标绘
    .icon-plot
  • 影响对比
    .icon-layer-compare-old
  • 全图
    .icon-full-map
  • E
    .icon-e
  • S
    .icon-s
  • T
    .icon-t
  • clear
    .icon-clear
  • draw_click
    .icon-draw-old
  • line
    .icon-draw-polyline
  • 取消顶置
    .icon-clear-gotop
  • self-analysis
    .icon-overlay_analysis_4
  • export-excel
    .icon-excel
  • iconfont-export
    .icon-import
  • 垃圾桶_块
    .icon-draw-remove
  • compare
    .icon-side-by-side
  • sync-disabled
    .icon-sync-disabled
  • 灯光指示
    .icon-search-lightxxx
  • 框选
    .icon-region
  • 定位
    .icon-set-location
  • iconfont-export
    .icon-export
  • 路径分析
    .icon-my-path
  • rectangle
    .icon-draw-rectangle
  • 放大
    .icon-zoom-in
  • 垃圾桶
    .icon-clearall
  • 高级查询
    .icon-advanced_search
  • 面积测量
    .icon-measure-area_bak
  • 标记
    .icon-draw-marker
  • 剪刀
    .icon-screen-shot-old
  • edit-brush
    .icon-draw
  • 缩放,看,探索,查看,搜索,放大镜,优化,线性,扁平,填充,单色,简约,圆润
    .icon-filter
  • 线标绘
    .icon-plot-line
  • hand
    .icon-hand-old
  • 缩小
    .icon-zoom-out
  • 地球
    .icon-globe
  • 图例
    .icon-legend
  • g
    .icon-g
  • 粘贴
    .icon-paste
  • 箭头
    .icon-plot-arrow-up
  • full screen
    .icon-fullscreen
  • layers
    .icon-layers
  • 分时对比-icon
    .icon-layer-compare
  • marker
    .icon-marker
  • 置顶
    .icon-gotop
  • hand
    .icon-hand
  • 搜索
    .icon-search
  • database
    .icon-database
  • 饼图
    .icon-pie
  • 显示
    .icon-show
  • 皮肤
    .icon-change-skin
  • picture
    .icon-main-map
  • 打印
    .icon-print
  • edit
    .icon-edit
  • 箭头
    .icon-plot-arrow-down
  • 灯标
    .icon-search-light
  • 面标绘
    .icon-plot-fill
  • 长度
    .icon-measure-length
  • D
    .icon-d
  • zoomin
    .icon-zoomToLayer-copy
  • 宽度扩展图
    .icon-search-light-length
  • 不显示
    .icon-not-show
  • icon_宽度
    .icon-search-light-lengthxx
  • 涂鸦
    .icon-freedraw-1
  • shexiangtou
    .icon-camera
  • compare
    .icon-side-by-side-vertical
  • 面积
    .icon-measure-area
  • bookmark
    .icon-bookmark
  • ManagePaths
    .icon-manage-path
  • trajectory path
    .icon-compute-path

font-class 引用


font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

与 Unicode 使用方式相比,具有如下特点:

  • 兼容性良好,支持 IE8+,及所有现代浏览器。
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • 不过因为本质上还是使用的字体,所以多色图标还是不支持的。

使用步骤如下:

第一步:引入项目下面生成的 fontclass 代码:

<link rel="stylesheet" href="./iconfont.css">

第二步:挑选相应图标并获取类名,应用于页面:

<span class="iconfont icon-xxx"></span>

" iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

  • 剪刀
    #icon-screen-shot
  • 信息
    #icon-info-query
  • 圆形
    #icon-draw-circle
  • circle-hollow
    #icon-draw-circlemarker
  • 右箭头
    #icon-arrow-right
  • 左箭头
    #icon-arrow-left
  • sync-green
    #icon-sync
  • plus
    #icon-plus
  • paint-brush
    #icon-draw-old2
  • minus
    #icon-minus
  • 层_line
    #icon-layers-line
  • 设置
    #icon-settingbar
  • 面型图标1_涂鸦
    #icon-freedraw-0
  • 编辑
    #icon-draw-edit
  • 叠加分析
    #icon-overlay_analysis
  • 复制
    #icon-copy
  • 长度测量
    #icon-measure-length_bak
  • 多边形
    #icon-draw-polygon
  • 应急标绘
    #icon-plot
  • 影响对比
    #icon-layer-compare-old
  • 全图
    #icon-full-map
  • E
    #icon-e
  • S
    #icon-s
  • T
    #icon-t
  • clear
    #icon-clear
  • draw_click
    #icon-draw-old
  • line
    #icon-draw-polyline
  • 取消顶置
    #icon-clear-gotop
  • self-analysis
    #icon-overlay_analysis_4
  • export-excel
    #icon-excel
  • iconfont-export
    #icon-import
  • 垃圾桶_块
    #icon-draw-remove
  • compare
    #icon-side-by-side
  • sync-disabled
    #icon-sync-disabled
  • 灯光指示
    #icon-search-lightxxx
  • 框选
    #icon-region
  • 定位
    #icon-set-location
  • iconfont-export
    #icon-export
  • 路径分析
    #icon-my-path
  • rectangle
    #icon-draw-rectangle
  • 放大
    #icon-zoom-in
  • 垃圾桶
    #icon-clearall
  • 高级查询
    #icon-advanced_search
  • 面积测量
    #icon-measure-area_bak
  • 标记
    #icon-draw-marker
  • 剪刀
    #icon-screen-shot-old
  • edit-brush
    #icon-draw
  • 缩放,看,探索,查看,搜索,放大镜,优化,线性,扁平,填充,单色,简约,圆润
    #icon-filter
  • 线标绘
    #icon-plot-line
  • hand
    #icon-hand-old
  • 缩小
    #icon-zoom-out
  • 地球
    #icon-globe
  • 图例
    #icon-legend
  • g
    #icon-g
  • 粘贴
    #icon-paste
  • 箭头
    #icon-plot-arrow-up
  • full screen
    #icon-fullscreen
  • layers
    #icon-layers
  • 分时对比-icon
    #icon-layer-compare
  • marker
    #icon-marker
  • 置顶
    #icon-gotop
  • hand
    #icon-hand
  • 搜索
    #icon-search
  • database
    #icon-database
  • 饼图
    #icon-pie
  • 显示
    #icon-show
  • 皮肤
    #icon-change-skin
  • picture
    #icon-main-map
  • 打印
    #icon-print
  • edit
    #icon-edit
  • 箭头
    #icon-plot-arrow-down
  • 灯标
    #icon-search-light
  • 面标绘
    #icon-plot-fill
  • 长度
    #icon-measure-length
  • D
    #icon-d
  • zoomin
    #icon-zoomToLayer-copy
  • 宽度扩展图
    #icon-search-light-length
  • 不显示
    #icon-not-show
  • icon_宽度
    #icon-search-light-lengthxx
  • 涂鸦
    #icon-freedraw-1
  • shexiangtou
    #icon-camera
  • compare
    #icon-side-by-side-vertical
  • 面积
    #icon-measure-area
  • bookmark
    #icon-bookmark
  • ManagePaths
    #icon-manage-path
  • trajectory path
    #icon-compute-path

Symbol 引用


这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

  • 支持多色图标了,不再受单色限制。
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • 浏览器渲染 SVG 的性能一般,还不如 png。

使用步骤如下:

第一步:引入项目下面生成的 symbol 代码:

<script src="./iconfont.js"></script>

第二步:加入通用 CSS 代码(引入一次就行):

<style>
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>

第三步:挑选相应图标并获取类名,应用于页面:

<svg class="icon" aria-hidden="true">
  <use xlink:href="#icon-xxx"></use>
</svg>