首页 \ 问答 \ 在原生反应中使用Mapbox上的以下视图呈现自定义注释(Rendering custom annotation with following view on Mapbox in react native)

在原生反应中使用Mapbox上的以下视图呈现自定义注释(Rendering custom annotation with following view on Mapbox in react native)

地图盒上的自定义注释

我如何使用React Native中的Mapbox和Annotations来实现这一点。 我试图嵌套注释,渲染为折线,但没有得到所需的结果。 任何人都可以帮助解决这个问题吗?


Custom annotation on mapbox

How can I achieve this using Mapbox and Annotations in React Native. I have tried nesting the annotations, rendering as polyline but am not getting the desired result. Can anyone help with resolving this?


原文:https://stackoverflow.com/questions/45590951
更新时间:2024-04-22 07:04

最满意答案

几个脸掌心后,这一切都归结为缺乏这一行代码:

self.definesPresentationContext = YES;

将表示上下文设置为YES表示当视图控制器显示UISearchController时应该覆盖视图控制器的视图。


After several face palms, it all came down to the lack of this line of code:

self.definesPresentationContext = YES;

Setting the presentation context to YES indicates that the view controller's view should be covered when the view controller presents the UISearchController.

相关问答

更多
  • 您可以通过在iOS7 SDK中实现一个名为edgesForExtendedLayout的新属性来实现此目的。 请添加以下代码来实现这一点, if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) self.edgesForExtendedLayout = UIRectEdgeNone; 您需要在-(void)viewDidLoad方法中添加以上内容。 iOS 7为您的UI布局和自定义外观带来了几个更改。 视图控制器布 ...
  • 几个脸掌心后,这一切都归结为缺乏这一行代码: self.definesPresentationContext = YES; 将表示上下文设置为YES表示当视图控制器显示UISearchController时应该覆盖视图控制器的视图。 After several face palms, it all came down to the lack of this line of code: self.definesPresentationContext = YES; Setting the presentat ...
  • 将android:fitsSystemWindows="true"到布局的根,即CoordinatorLayout 大多数情况下,您的应用程序不需要在状态栏或导航栏下绘制,但如果您这样做:您需要确保交互式元素(如按钮)不会隐藏在它们下面。 这就是android:fitsSystemWindows =“true”属性的默认行为:它设置View的填充以确保内容不会覆盖系统窗口。 在这里阅读更多内容。 Add android:fitsSystemWindows="true" to the root of your ...
  • UITableView是UIScrollView的扩展,UITableViewDelegate是UIScrollViewDelegate的扩展。 UIScrollViewDelegate可以实现此方法: - (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView 那将允许你拦截它。 您也可以使用tableview的“scrollsToTop”属性将其关闭。 如果您只是想知道它何时发生,您可以使用此委托方法: - (void)scrollVi ...
  • 如果没有任何code您的问题很难猜测。我相信当您在Apple Music应用程序中提到的tableview内容滚动时,您会尝试实现半透明的状态栏。 在你的viewdidLoad方法中尝试下面的代码。 第1步:隐藏navigation bar 。 如果你的controller嵌入了navigationController 。 navigationController?.navigationBar.isHidden = true 第2步:将一个statusBar大小的UIView放置到您的控制器中,以充当具有 ...
  • 该问题的解决方案如下: 在frameworks/base/services/java/com/android/server/status/StatusBarService.java Gravity.TOP Gravity.BOTTOM更改为Gravity.BOTTOM 。 frameworks/policies/base/phone/com/android/internal/policy/impl/PhoneWindowManager.java替换mDockTop = mContentTop = mCurT ...
  • 您可以使状态栏透明以保留空间,而不是使用prefersStatusBarHidden 。 在间距方面,这对iPhone X没有影响。 let statusBarWindow = application.value(forKey: "statusBarWindow") as? UIWindow statusBarWindow.alpha = 0.0 "statusBarWindow"实际上是私有API,因此最好像"status" + "BarWindow"类的那样将它拉开。 You could make t ...
  • 在创建这种结构(表+其他元素)时,最好的方法是实际拥有一个包含TableView和其他元素(如导航)的ViewController 。 不要试图将不属于表本身的元素放在表中。 这是一个结构示例,我有意将自定义视图(在您的情况下是导航)着色为橙色。 如你所见,它在桌子之外。 这样,表的显示和滚动与其他元素完全分离。 When creating this kind of structure (table + other elements), the best approach is to actually ha ...
  • 你可以通过在viewDidLoad方法甚至viewWillAppear设置它来解决这个问题: self.view.frame = [[UIScreen mainScreen] applicationFrame]; 另外,我猜你最初是在隐藏你的状态栏? 或者你有它总是显示? You can fix this by setting this in your viewDidLoad method or even the viewWillAppear: self.view.frame = [[UIScreen m ...
  • 请添加此方法 - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { [[self navigationController] setNavigationBarHidden:YES animated:YES]; } 迅速 func scrollViewWillBeginDecelerating(scrollView: UIScrollView) { } please add this method - (void)s ...

相关文章

更多

最新问答

更多
  • 带有简单redis应用程序的Node.js抛出“未处理的错误”(Node.js with simple redis application throwing 'unhandled error')
  • 高考完可以去做些什么?注意什么?
  • Allauth不会保存其他字段(Allauth will not save additional fields)
  • Flask中的自定义中止映射/异常(Custom abort mapping/exceptions in Flask)
  • sed没有按预期工作,从字符串中间删除特殊字符(sed not working as expected, removing special character from middle of string)
  • 怎么在《我的世界》游戏里面编程
  • .NET可移植可执行文件VS .NET程序集(.NET Portable Executable File VS .NET Assembly)
  • 搜索字符串从视图中键入两个字段的“名字”和“姓氏”组合(Search Strings Typed from View for Two Fields 'First Name' and 'Last Name' Combined)
  • 我可以通过配置切换.Net缓存提供程序(Can I switch out .Net cache provider through configuration)
  • 在鼠标悬停或调整浏览器大小之前,内容不会加载(Content Does Not Load Until Mouse Hover or Resizing Browser)
  • 未捕获的TypeError:auth.get不是函数(Uncaught TypeError: auth.get is not a function)
  • 如何使用变量值创建参数类(How to create a parameter class with variant value)
  • 在std :: deque上并行化std :: replace(Parallelizing std::replace on std::deque)
  • 单元测试返回Connection对象的方法(Unit Test for a method that returns a Connection object)
  • rails:上传图片时ios中的服务器内部错误(rails: server internal error in ios while uploading image)
  • 如何在Android中构建应用程序警报[关闭](How build an application Alarm in Android [closed])
  • 以编程方式连接到Windows Mobile上的蓝牙耳机(Programmatically connect to bluetooth headsets on Windows Mobile)
  • 在两个不同的SharedPreference中编写并获得相同的结果(Writing in two different SharedPreference and getting the same result)
  • CSS修复容器和溢出元素(CSS Fix container and overflow elements)
  • 在'x','y','z'迭代上追加数组(Append array on 'x', 'y', 'z' iteration)
  • 我在哪里可以看到使用c ++源代码的UML方案示例[关闭](Where I can see examples of UML schemes with c++ source [closed])
  • SQL多个连接在与where子句相同的表上(SQL Multiple Joins on same table with where clause)
  • 位字段并集的大小,其成员数多于其大小(Size of bit-field union which has more members than its size)
  • 我安装了熊猫,但它不起作用(I installed pandas but it is not working)
  • Composer - 更改它在env中使用的PHP版本(Composer - Changing the version of PHP it uses in the env)
  • 使用JavaFX和Event获取鼠标位置(Getting a mouse position with JavaFX and Event)
  • 函数调用可以重新排序(Can function calls be reordered)
  • 关于“一对多”关系的NoSQL数据建模(NoSQL Data Modeling about “one to many” relationships)
  • 如何解释SBT错误消息(How to interpret SBT error messages)
  • 调试模式下的Sqlite编译器错误“初始化程序不是常量”(Sqlite compiler errors in Debug mode “initializer is not a constant”)