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

网站平台专题如何制作php论坛网站源码下载

网站平台专题如何制作,php论坛网站源码下载,商城网站怎么做优化,2016企业网站建设合同配置凭据 注册并导航到Account页面。你将需要#xff1a; 公共访问令牌#xff1a; 从帐户的tokens页面#xff0c;你可以复制默认的公共令牌或单击create a token按钮来创建新的公共令牌。 带有Downloads:Read范围的秘密访问令牌#xff1a; 从你帐户的t…配置凭据 注册并导航到Account页面。你将需要 公共访问令牌 从帐户的tokens页面你可以复制默认的公共令牌或单击create a token按钮来创建新的公共令牌。 带有Downloads:Read范围的秘密访问令牌 从你帐户的tokens页面中单击create a token按钮。 在创建令牌页面上为你的令牌命名并确保Downloads:Read范围旁边的框被选中。 单击页面底部的create token按钮以创建你的令牌。 你创建的令牌是一个秘密令牌这意味着你将只有一次机会将其复制到安全的地方。 配置秘密令牌 你的秘密令牌允许你直接从Mapbox下载SDK。 要使用你的秘密令牌你需要将其存储在主目录而不是项目文件夹的.netrc文件中。 为.netrc配置0600权限 chmod 0600 ~/.netrc 要设置下载SDK所需的凭据请将以下条目添加到你的.netrc文件中 machine api.mapbox.com login mapbox password YOUR_SECRET_MAPBOX_ACCESS_TOKEN 配置公共令牌 要配置你的公共访问令牌请打开项目的Info.plist文件并添加一个MBXAccessToken密钥其值是你的公共访问令牌。 添加依赖项 Mapbox Maps可以通过Swift Package ManagerSPM使用。要使用SPM添加Mapbox Maps SDK你需要配置你的环境以从Mapbox下载它请确保你已将秘密令牌添加到你的.netrc文件中。 打开Xcode项目然后转到File Swift Packages Add Package Dependency输入https://github.com/mapbox/mapbox-maps-ios.git作为URL按Enter键拉入软件包然后单击Add Package。 在代码中可以用import MapboxMaps引入依赖包。 隐私和权限 用户必须先授予您的应用程序权限然后才能访问有关其位置的信息。添加下列配置到Info.plist。 向用户简要说明应用程序将如何使用其位置数据进行临时访问 keyNSLocationWhenInUseUsageDescription/key stringYour precise location is used to calculate turn-by-turn directions, show your location on the map, and help improve the map./string 添加LocationAccuracyAuthorizationDescription作为NSLocationTemporaryUsageDescriptionDictionary字典的元素为用户提供简要解释为什么应用程序中的功能需要其确切位置 keyNSLocationTemporaryUsageDescriptionDictionary/key dictkeyLocationAccuracyAuthorizationDescription/keystringPlease enable precise location. Turn-by-turn directions only work when precise location data is available./string /dict 添加地图 import UIKit import MapboxMapsclass MapViewController: UIViewController {internal var mapView: MapView!override public func viewDidLoad() {super.viewDidLoad()let myResourceOptions ResourceOptions(accessToken: your_public_access_token)let myMapInitOptions MapInitOptions(resourceOptions: myResourceOptions)mapView MapView(frame: view.bounds, mapInitOptions: myMapInitOptions)mapView.autoresizingMask [.flexibleWidth, .flexibleHeight]self.view.addSubview(mapView)} }在地图上添加标记 let coordinate CLLocationCoordinate2DMake(latitude, longitude)// Initialize a point annotation with a geometry (coordinate in this case) var pointAnnotation PointAnnotation(coordinate: coordinate)// Make the annotation show a red pin pointAnnotation.image .init(image: UIImage(named: red_pin)!, name: red_pin) pointAnnotation.iconAnchor .center pointAnnotation.iconSize 0.5 //icon image scale// Create the PointAnnotationManager which will be responsible for handling this annotation let pointAnnotationManager mapView.annotations.makePointAnnotationManager()// Add the annotation to the manager in order to render it on the map. pointAnnotationManager.annotations [pointAnnotation] 在地图上添加路线 // Define two or more geographic coordinates to connect with a line. // Line from New York City, NY to Washington, D.C. let lineCoordinates [CLLocationCoordinate2DMake(40.7128, -74.0060),CLLocationCoordinate2DMake(38.9072, -77.0369) ]// Create the line annotation. var lineAnnotation PolylineAnnotation(lineCoordinates: lineCoordinates) lineAnnotation.lineColor StyleColor(.blue)// Create the PolylineAnnotationManager which will be responsible for handling this annotation let lineAnnnotationManager mapView.annotations.makePolylineAnnotationManager()// Add the annotation to the manager. lineAnnnotationManager.annotations [lineAnnotation] 设置相机位置 Maps SDK的相机是指用户在地图上方的观测点。 相机的位置和行为由其属性定义 center相机指向的经度和纬度。bearing地图的视觉旋转。轴承值是相机指向的指南针方向以向用户显示哪个方向是“向上”。例如90°的方位将地图定向使东面朝上。pitch地图的视觉倾斜。0°的间距垂直于表面直视地图而60°等更大值则朝向地平线。zoom缩放级别指定相机与所查看功能的距离。在缩放级别0时视口显示大陆和海洋。11的中间值显示城市级别的细节在更高的缩放级别地图开始显示建筑物和兴趣点。padding地图每个边缘的插图。影响渲染center的位置。anchor地图坐标系中关于应应用zoom和bearing的点。与center相互排斥。 在地图初始化时设置相机 // Define center coord, zoom, pitch, bearing let cameraOptions CameraOptions(center: CLLocationCoordinate2D(latitude: 40.7135, longitude: -74.0066),zoom: 15.5,bearing: -17.6,pitch: 45) // Pass camera options to map init options let options MapInitOptions(cameraOptions: cameraOptions) // Pass options when initializing the map mapView MapView(frame: view.bounds, mapInitOptions: options) 地图初始化后设置相机 let coordinate CLLocationCoordinate2DMake(latitude, longitude) let options CameraOptions(center: coordinate, zoom: 10) //不带动画 mapView.mapboxMap.setCamera(to: options) //带动画 mapView.camera.fly(to: options, duration: 3) 根据设备位置设置相机 if let locationCoordinate self.mapView?.location.latestLocation?.coordinate {mapView.mapboxMap.setCamera(to: CameraOptions(center: locationCoordinate, zoom: 15)) }
http://www.w-s-a.com/news/329121/

相关文章:

  • 企业网站有必要做吗?网站平均停留时间
  • 蘑菇街的网站建设凡科网站建设网页怎么建
  • 中国光大国际建设工程公司网站论坛是做网站还是app好
  • 地产集团网站建设高德是外国公司吗?
  • 天津市网站建站制作网站建设新报价图片欣赏
  • 怎么样在百度搜到自己的网站高端房产网站建设
  • 邯郸做移动网站多少钱ui设计好就业吗
  • 共享虚拟主机普惠版做网站产品推广包括哪些内容
  • 广州市网站建站免费咨询医生有问必答
  • app网站建设制作哪个网站可以做魔方图片
  • 教育培训网站建设方案模板下载网站文风
  • 电龙网站建设wordpress文章两端对齐
  • 做外单网站亚马逊免费的网站加速器
  • 英文网站推广工作一个虚拟主机可以做几个网站吗
  • 微网站 合同重庆电力建设设计公司网站
  • 网站怎么设置支付网站源码下载后怎么布置
  • 广州市公需课在哪个网站可以做手机商城软件下载
  • app网站建设需要什么长治网站建设公司
  • 网站模板平台广告宣传网站
  • cc域名的网站做网站放太多视频
  • 让公司做网站要注意什么建设工程公司企业文化
  • 佛山搭建建网站哪家好微信如何建立自己的公众号
  • 联想公司网站建设现状广州建网站兴田德润团队
  • 网站开发的技术有网页设计实训报告工作内容和步骤
  • 视频做网站长沙网站制作平台
  • js网站建设北京seo公司优化网络可见性
  • 付款网站源码建网站卖东西
  • 用php做的录入成绩的网站wordpress等级插件
  • 网站运营优化方案广西桂林公司
  • 快递网站策划怎么做ppt长春建设信息网站