当前位置: 首页 > news >正文

seo做的好的网站有哪些东莞最新招聘

seo做的好的网站有哪些,东莞最新招聘,拥有自己的网站 如何做推广,把做的网站放到互联网上看过的知识不等于学会。唯有用心总结、系统记录,并通过温故知新反复实践,才能真正掌握一二 作为一名摸爬滚打三年的前端开发,开源社区给了我饭碗,我也将所学的知识体系回馈给大家,助你少走弯路! OpenLayers…

看过的知识不等于学会。唯有用心总结、系统记录,并通过温故知新反复实践,才能真正掌握一二
作为一名摸爬滚打三年的前端开发,开源社区给了我饭碗,我也将所学的知识体系回馈给大家,助你少走弯路!
OpenLayers、Leaflet 快速入门 ,每周保持更新 2 个案例
Cesium 快速入门,每周保持更新 4 个案例

OpenLayers 快速入门(一)Map对象
OpenLayers 快速入门(二)Layer 对象
OpenLayers 快速入门(三)Source 对象补充
OpenLayers 快速入门(四)View 对象
OpenLayers 快速入门(五)Controls 对象
OpenLayers 快速入门(六)Interaction 对象
OpenLayers 快速入门(七)矢量数据
OpenLayers 快速入门(八)事件系统
OpenLayers 快速入门(九)Extent 介绍
OpenLayers 快速入门(十)常用 API 补充

Controls 对象

Controls 是 OpenLayers 中提供用户交互界面的 UI 组件,用于展示地图信息和操作地图功能。

控件类型一览

控件类型引入路径功能描述默认启用
Zoomol/control/Zoom缩放按钮 (+/-)✔️
Rotateol/control/Rotate旋转复位按钮✔️
Attributionol/control/Attribution版权信息展示✔️
FullScreenol/control/FullScreen全屏切换按钮
ScaleLineol/control/ScaleLine比例尺指示器
MousePositionol/control/MousePosition鼠标坐标显示
OverviewMapol/control/OverviewMap鹰眼图(小地图)
ZoomSliderol/control/ZoomSlider缩放滑块
ZoomToExtentol/control/ZoomToExtent区域定位按钮

默认控件集合

ol/control/defaults类中定义了默认控件集合。

  • attribution:包含 Attribution 控件,默认为 true
  • attributionOptions:Attribution 控件的选项,默认 undefined
  • rotate:包含 Rotate 控件,默认为 true
  • rotateOptions:Rotate 控件的选项,默认 undefined
  • zoom:包含 Zoom 控件,默认为 true
  • zoomOptions:Zoom 控件的选项,默认 undefined

禁用所有默认控件

import { defaults } from "ol/control/defaults";new Map({controls: defaults({attribution: false,rotate: false,zoom: false,}),
});

Zoom - 缩放控件

接下来每个控件在代码注释中写明所有配置项

import Zoom from "ol/control/Zoom.js";new Zoom({duration: 250, // 默认值为 250,动画持续时间(毫秒)className: "ol-zoom", // 默认为 'ol-zoom',自定义CSS类zoomInClassName: "ol-zoom-in", // 默认为 className + '-in',放大按钮的自定义CSS类zoomOutClassName: "ol-zoom-out", // 默认为 className + '-out',缩小按钮的自定义CSS类zoomInLabel: "+", // 默认为'+',放大按钮文本,可以为HTMLElement元素zoomOutLabel: "-", // 默认为 '–',缩小按钮文本,可以为HTMLElement元素zoomInTipLabel: "Zoom in", // 默认为 'Zoom in',按钮提示的文本标签zoomOutTipLabel: "Zoom out", // 默认为 'Zoom out',按钮提示的文本标签delta: 1, // 默认值为 1,每次点击的缩放变化值target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素
});

在这里插入图片描述

Rotate - 旋转控件

import Rotate from "ol/control/Rotate.js";new Rotate({duration: 250, // 默认值为 250,动画持续时间(毫秒)className: "ol-rotate", // 默认值为'ol-rotate',自定义CSS类compassClassName: "ol-compass", // 默认为 'ol-compass',指南针的 CSS 类名tipLabel: "Reset rotation", // 默认为 'Reset rotation',旋转提示的文本标签label: "⇧", // 默认为 '⇧',旋转按钮的文本标签autoHide: true, // 默认为 true,角度为0时是否隐藏resetNorth: "function" | undefined, // 控件被点击时调用的函数target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素
});

按住 alt+shift+左键旋转地图,出现复位按钮,点击复位按钮可以将地图旋转角度重置为 0。

在这里插入图片描述

FullScreen - 全屏控件

import FullScreen from "ol/control/FullScreen";new FullScreen({className: "ol-full-screen", // 默认为 'ol-full-screen',自定义CSS类label: "\u2922", // 默认为 '\u2922',按钮的文本标签,可以为HTMLElement元素labelActive: "\u00d7", // 默认为 '\u00d7',全屏激活时按钮的文本标签,可以为HTMLElement元素tipLabel: "Toggle full-screen", // 默认为'Toggle full-screen',按钮提示的文本标签keys: false, // 默认为 false,是否允许使用键盘快捷键activeClassName: "ol-full-screen-true", //默认为 className + '-true,全屏激活时按钮的 CSS 类名inactiveClassName: "ol-full-screen-false", //默认为 className + '-false,全屏激活时按钮的 CSS 类名target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素source: HTMLElement | string | undefined, //用于全屏显示的元素。如果未提供,将全屏显示包含地图视口的元素
});

在这里插入图片描述

Attribution - 版权信息控件

import Attribution from "ol/control/Attribution.js";new Attribution({className: "ol-attribution", // 默认为 'ol-attribution',自定义CSS类collapsible: boolean | undefined, // 指定归属信息是否可以折叠collapsed: true, // 默认为 true,初始是否折叠tipLabel: "Attributions", // 默认为 'Attributions',用于按钮提示的文本标签label: "i", // 默认为 'i',折叠按钮的文本标签collapseLabel: "›", // 默认为 '›',展开按钮的文本标签target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素attributions: "@xxxxx版权信息", // 可选的归属信息
});

在这里插入图片描述

ScaleLine - 比例尺控件

import ScaleLine from "ol/control/ScaleLine.js";new ScaleLine({className: "ol-scale-line", // 默认为 'ol-scale-line',自定义CSS类minWidth: 64, // 默认为 64,比例尺最小宽度(像素)maxWidth: number | undefined, // 最大像素宽度// metric:千米// us:美制// imperial:英制// degrees:度// nautical:海里units: "metric", // 默认为 'metric',可选 'degrees', 'imperial', 'us', 'nautical'bar: false, // 默认为 false,是否显示条形比例尺steps: 4, // 默认为 4,条形比例尺的分段数text: false, // 默认为 false,是否显示文本target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素
});

在这里插入图片描述

MousePosition - 鼠标位置控件

import MousePosition from "ol/control/MousePosition.js";new MousePosition({className: "ol-mouse-position", // 默认为 'ol-mouse-position',自定义CSS类coordinateFormat: undefined, // 坐标格式化函数projection: "EPSG:4326", // 默认是视图投影target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素
});

在这里插入图片描述

OverviewMap - 概览图控件

import OverviewMap from "ol/control/OverviewMap.js";new OverviewMap({className: "ol-overviewmap", // 默认为 'ol-overviewmap',自定义CSS类collapsed: true, // 默认为 true,初始是否折叠collapsible: true, // 默认为 true,是否可折叠label: "›", // 默认为 '›',折叠按钮的文本标签collapseLabel: "‹", // 默认为'‹',展开按钮的文本标签tipLabel: "Overview map", // 默认为 'Overview map',按钮提示的文本标签layers: [], // 概览图中的图层集合rotateWithView: false, // 默认为 false,控件视图是否应与主地图视图一起旋target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素
});

在这里插入图片描述

ZoomSlider - 滑动缩放控件

import ZoomSlider from "ol/control/ZoomSlider.js";new ZoomSlider({className: "ol-zoomslider", // 默认为 'ol-zoomslider',自定义CSS类duration: 200, // 默认为 200,动画持续时间(毫秒)target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素
});

在这里插入图片描述

ZoomToExtent - 缩放到范围控件

一个按钮控件,当按下时,会将地图视图切换到特定范围

import ZoomToExtent from "ol/control/ZoomToExtent.js";new ZoomToExtent({className: "ol-zoom-extent", // 默认为 'ol-zoom-extent',自定义CSS类label: "E", // 默认为 'E',按钮的文本标签tipLabel: "Zoom to extent", // 默认为 'Zoom to extent',按钮提示的文本标签extent: [minX, minY, maxX, maxY], // 指定缩放到的范围target: HTMLElement | string | undefined, //控件在地图视口之外渲染的HTMLElement元素
});

在这里插入图片描述

禁用默认控件

new Map({ controls: [] })禁用默认控件

new Map({controls: [],// 其他配置...
});

控件管理方法

// 添加控件
map.addControl(scaleLineControl);// 移除控件
map.removeControl(fullScreenControl);// 获取所有控件
const controls = map.getControls();// 查找特定控件
const zoomControl = map.getControls().array_.find((ctrl) => ctrl instanceof Zoom);
http://www.dtcms.com/a/525535.html

相关文章:

  • seo网站优化多少钱全球咨询公司排名
  • ElementPlus 如何支持移动端
  • 家庭服务器分享
  • xv6 第二章_操作系统架构
  • 创建网站要多长时间网站链接只显示到文件夹怎么做的
  • 写出网站开发的基本流程wordpress nova 汉化
  • 1024~
  • 选图片的网站网站引流.
  • Java的内部类介绍
  • 企业自建服务器网站建设流程建设网站需要注意事项
  • 描述性统计 vs 推断性统计:观察与判断的区别
  • Power BI 10 月功能更新全解析
  • C语言解决轮转数组
  • 网站备案 上线app网站开发住房公积金
  • 网站建设后期需要做什么提供营销网站建设公司
  • 开发运维警示录-《论日志和监控的重要性》_20251024
  • 跨境电商代采:1688商品采集要用到的API列表分享
  • SAP SD交货单批导功能分享
  • 网站栏目设计网站做哪块简单
  • 怎么给网站做二维码龙岗网站建设公司效果
  • 网站建设开题报告网站建站工具有哪些
  • 电话交换机软件3CX安全访问实践:屏蔽IP访问,仅允许域名访问
  • Linux系统中配置history命令显示时间、IP、账号和操作命令
  • springboot3 uuid 唯一标识入门与实战
  • P1041 [NOIP 2003 提高组] 传染病控制
  • 武进建设局网站和业务多一样的平台
  • eclipse可以做门户网站嘛公司建设网站的 计划书
  • Linux小课堂: 从IPv4到IPv6、主机名解析及网络接口管理
  • ant design vue使用date组件,判断要清空却失效的问题
  • 百度seo搜索百度推广优化技巧