这里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
最满意答案
这通常被称为“内联事件”,并且只是在
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 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 thesender
, and thee
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!"); }
相关问答
更多-
如果我要用python制作一个小游戏,应该做什么准备工作?[2023-06-20]
e -
取整函数E(x),是什么意思????[2023-09-28]
就是向下取整数,取出不大于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 ...
-
实现Monad(( - >)e)`(Implementing `Monad ((->) e)`)[2023-09-13]
这里有一些语法技巧。 如果我们写作, (->) 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中的0x2e2e2e2e回溯?(0x2e2e2e2e in GDB backtrace?)[2022-06-17]
当你损坏堆栈并覆盖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 ...