首页 \ 问答 \ 这里Map Tile API:从EPSG:3857坐标中检索地图平铺地址(Here Map Tile API: Retrieve Map tile address from EPSG:3857 coordinate)

这里Map Tile API:从EPSG:3857坐标中检索地图平铺地址(Here Map Tile API: Retrieve Map tile address from EPSG:3857 coordinate)

我必须将现有的openlayers 2应用程序的地图图块提供程序从OpenStreetMaps更改为Here maps。 为此,我尝试实现UsingCustomTiles中描述的类似方法。

现在我不知道如何将我的EPSG:3857坐标(边界)映射到正确的z / x / y平铺地址。 Map Tile API Developer's Guide中有一个计算示例来获取EPSG:4326坐标的正确平铺地址,我认为不需要重新投影我的坐标,因为地图和坐标是投影的mercator。

此外,我不确定在openlayers映射中为maxExtent和maxResolution设置什么值,也许这就是我的情况下UsingCustomTiles示例失败的原因。

有人可以提供一些提示吗?


I have to change the map tile provider of an existing openlayers 2 application from OpenStreetMaps to Here maps. To achieve that, i tried to implement a similar approach as described in UsingCustomTiles.

Now i don't know how to map my EPSG:3857 coordinates (bounds) to the correct z/x/y tile address. There is a calculation example in the Map Tile API Developer's Guide to get the correct tile address for an EPSG:4326 coordinate and i do not think it is required to reproject my coordinates, since map and coordinates are mercator projected.

Also i am not sure what values to set for maxExtent and maxResolution in the openlayers map, maybe that is the reason the UsingCustomTiles example failed in my case.

Can someone please provide a hint?


原文:https://stackoverflow.com/questions/29774318
更新时间:2022-08-06 10:08

最满意答案

这通常被称为“内联事件”,并且只是在OnSpeak事件触发时运行特定代码的另一种方式。

x.OnSpeak += (s, e) => Console.WriteLine("On Speak!");

ssendere是事件参数。

您可以像这样重写代码,这可能更熟悉:

x.OnSpeak += OnSpeakEvent;

private static void OnSpeakEvent(object s, CancelEventArgs e)
{
    Console.WriteLine("On Speak!");
}

This is often referred to as an "inline event", and is just another way of running particular code when the OnSpeak event fires.

x.OnSpeak += (s, e) => Console.WriteLine("On Speak!");

The s is the sender, and the e is the event arguments.

You could rewrite your code like this, which may be more familiar-looking:

x.OnSpeak += OnSpeakEvent;

private static void OnSpeakEvent(object s, CancelEventArgs e)
{
    Console.WriteLine("On Speak!");
}

相关问答

更多
  • 就是向下取整数,取出不大于x的最大那个整数 比如不大于5.8的最大的整数就是5 不大于-3.2的最大的整数是-4 根号13=3.几 不大于3.几的最大的整数就是3了
  • 这里, e是一个事件对象,如下定义: http : //api.jquery.com/category/events/event-object/ 是的,您可以将数据传递给处理程序,使用此表单作为点击功能: .click( [eventData], handler(eventObject) ) eventData A map of data that will be passed to the event handler. handler(eventObject) A functi ...
  • 你误解了表达式修饰符 - 单个/e 它导致替换字符串被视为Perl表达式,并且本质上是标准模式的替代方法,它将处理字符串,就像处理双引号一样 一般 my $x = 1; my $y = '12+34'; $y =~ s/(\d+)(.)(\d+)/\$x$2$2/; 产生一个等价于字符串qq{\$x$2$2}的替代品,即$x++ 如果添加/e则替换被视为Perl表达式,并且您收到错误,因为\$x$2$2无效Perl。 您可以通过使用获得与以前相同的结果 s/(\d+)(.)(\d+)/'$x' . $2 ...
  • 这里有一些语法技巧。 如果我们写作, (->) e可能更容易(e ->)或者更加清楚 type Arr a b = a -> b 然后(->) e与Arr e大致相同。 那么ret的类型是什么? 它最终成为 ret :: a -> (e -> a) 现在应该更容易解决。 There's something of a syntax trick going on here. It might be easier to think of (->) e as (e ->) or, even more clear ...
  • 当你损坏堆栈并覆盖gdb需要的东西时,你会得到这个。 听起来你已经溢出了一堆带有“......”字符的缓冲区。 像valgrind这样的工具可以更轻松地帮助您诊断此类问题。 You get this when you've corrupted the stack, and overwritten stuff that gdb needs. Sounds like you've overflown a buffer with a bunch of "...." characters. Tools like v ...
  • 这通常被称为“内联事件”,并且只是在OnSpeak事件触发时运行特定代码的另一种方式。 x.OnSpeak += (s, e) => Console.WriteLine("On Speak!"); s是sender , e是事件参数。 您可以像这样重写代码,这可能更熟悉: x.OnSpeak += OnSpeakEvent; private static void OnSpeakEvent(object s, CancelEventArgs e) { Console.WriteLine("On ...
  • 此代码以Lambda表达式的形式添加事件侦听器。 s代表发送者 , e代表EventArgs 。 Lambda for private void Listener(object s, EventArgs e) { } This is the way to attach an event handler using Lambda expression. For example: button.Click += new EventHandler(delegate (Object s, EventArgs e ...
  • 您说的是真的,网络模式仅用于诊断/测试目的,目前已被弃用。 它将在未来的FPGA版本中消失,因为FPGA的架构变化使其无法实现。 所以,无论如何,我认为你所看到的可能是正确的:网络守护进程正在等待来自主机PC的命令; 在启用E310功能的情况下运行完全相同版本的UHD应该可以连接到它。 请注意,在野外或作为二进制文件分发的UHD的默认配置都没有启用。 如果您需要网络客户端,则必须重新编译UHD,并确保编译/链接任何使用UHD的软件与您的特定UHD版本。 What you say is true, the n ...
  • 导致此错误的具体错误是符号(1 0) 。 这在Haskell中没有任何意义,它被解析为使得1是应用于0的函数,然后使用结果。 您显然意味着将1和0作为(初始)参数传递。 这就是我们所写的元组 (1,0) 。 现在,在尝试进行任何定义之前,我们应该明确我们需要什么类型并将其写出来。 总是从你的类型签名开始,他们引导你很多实际的定义应该看起来! enumber :: Double -- could also be a polymorphic number type, but let's keep it simp ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)