f/通讯与导航 2014-07-17 02:01

界面上有很多选择项的图源要怎么写啊?

先上图

http://map.openseamap.org/weather.php
例如我想把这个网站上的海浪线弄到MOBAC里去,可上面有好几个时间选择,不知道要怎么写了,望各路大神赐教。。

已归档
点赞 0
31 评论
共 31 条评论
帖子已归档
Avatar
epic 2014-07-17 13:42

打开网页的源文件, 有几个有关的url

http://www.openportguide.org/tiles/actual/significant_wave_height/5/
..
http://www.openportguide.org/tiles/actual/significant_wave_height/27

再看清楚

arrayTimeValues[0] = "17.7.2014 6:00 UTC";
arrayTimeValues[1] = "17.7.2014 12:00 UTC";
arrayTimeValues[2] = "17.7.2014 18:00 UTC";
arrayTimeValues[3] = "18.7.2014 0:00 UTC";
arrayTimeValues[4] = "18.7.2014 12:00 UTC";
arrayTimeValues[5] = "19.7.2014 0:00 UTC";
arrayTimeValues[6] = "19.7.2014 12:00 UTC";
arrayTimeValues[7] = "20.7.2014 0:00 UTC";
 

相信是一一对应.
余下的自己搅掂.

Avatar
y82824 OP epic 2014-07-19 14:37

arrayTimeValues[0] = "17.7.2014 6:00 UTC";
arrayTimeValues[1] = "17.7.2014 12:00 UTC";
arrayTimeValues[2] = "17.7.2014 18:00 UTC";
arrayTimeValues[3] = "18.7.2014 0:00 UTC";
arrayTimeValues[4] = "18.7.2014 12:00 UTC";
arrayTimeValues[5] = "19.7.2014 0:00 UTC";
arrayTimeValues[6] = "19.7.2014 12:00 UTC";
arrayTimeValues[7] = "20.7.2014 0:00 UTC";
 [/quote]
这些参数哪里找到的嘛,我怎么看不到这个啊

Avatar
y82824 OP 2014-07-18 11:37

我只是个新手啊,MOBAC现有的图源里没有这种的吧,能不能写两个完整的给我参考下啊,在此先谢谢了:blush:

Avatar
epic 2014-07-18 13:00

如何添加Mobile Atlas Creator的自定义地图源
http://www.doyouhike.net/forum/comm_nav/936233,0,0,0.html
http://miocool.com/forums/viewtopic.php?f=16&t=251

8个URL中选你所要的时间对应的URL就成了.
新人慢慢学.

Avatar
y82824 OP epic 2014-07-19 00:49

epic大神用的什么工具分析网页URL的,我现在所知道的是3种:

1.360浏览器极速模式下右键的审查元素;
2.ChromeCacheView;
3.HttpAnalyzerStdV7;

大神用的哪种方法啊?

Avatar
epic 2014-07-19 15:00

没看见2楼的回复吗? 打开网页的源文件就可以看见. (不要问我怎样打开).
重点是那8个 URL 与网页上的8个时间是一一对应.
其他自己搅掂. bye.

Avatar
y82824 OP epic 2014-07-21 00:50

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customMultiLayerMapSource>

<name>海浪-今天6点</name>

<tileType>png</tileType>

<layers>

<customMapSource>

<name>Y1-OSM海图18</name>

<minZoom>0</minZoom>

<maxZoom>18</maxZoom>

<tileType>PNG</tileType>

<tileUpdate>None</tileUpdate>

<url><![CDATA[http://osm1.wtnet.de/tiles/base/{$z}/{$x}/{$y}.png]]></url>

</customMapSource>

<customMapSource>

<name>海浪层</name>

<minZoom>4</minZoom>

<maxZoom>18</maxZoom>

<tileType>PNG</tileType>

<ignoreErrors>true</ignoreErrors>

<url><![CDATA[http://www.openportguide.org/tiles/actual/significant_wave_height/7/{$z}/{$x}/{$y}.png]]></url> 

<backgroundColor>#00000000</backgroundColor>   

</customMapSource>

<!-- http://www.openportguide.org/tiles/actual/significant_wave_height/7/6/33/20.png--> 

</layers>
</customMultiLayerMapSource>

昨天清空缓存也没用啊,今天打开那海浪线显示不出来了。

Avatar
地图加加 2014-07-19 15:02

分析地图源用Chrome自带的开发者工具就可以了,不需要额外的插件。

看看这个:http://miocool.com/forums/viewtopic.php?f=22&t=359
里面含一个视频:http://v.youku.com/v_show/id_XNzQxNDA4Njgw.html?f=22528638
虽然是地图加加的配置文件介绍,不过和MOBAC绝大部分是兼容的。

Avatar
y82824 OP 地图加加 2014-07-20 00:57

多谢,看到了视频帮助专辑,地图加加为什么没有安卓版的啊。

Avatar
epic 2014-07-21 13:47

<customMapSource>

<name>海浪层</name>

<minZoom>4</minZoom>
        <maxZoom>7</maxZoom>

<tileType>PNG</tileType>

<ignoreErrors>true</ignoreErrors>
        <tileUpdate>ETag</tileUpdate>

<url><![CDATA[http://www.openportguide.org/tiles/actual/significant_wave_height/7/{$z}/{$x}/{$y}.png]]></url> 

<backgroundColor>#00000000</backgroundColor>   
</customMapSource>

更改图源 URL 要清空缓存 (或删除 mobac\tilestore\db-海浪层)
若图源未变, HTTP 中的 ETag 会让 mobac 决定地图有没有更新.
这对有时效性的天气图非常重要.

Avatar
y82824 OP epic 2014-07-22 01:59

<customMapSource>

<name>海浪层</name>

<minZoom>4</minZoom>

<maxZoom>18</maxZoom>

<tileType>PNG</tileType>

<ignoreErrors>true</ignoreErrors>

<tileUpdate>ETag</tileUpdate>

<url><![CDATA[http://www.openportguide.org/tiles/actual/significant_wave_height/15/{$z}/{$x}/{$y}.png]]></url> 

<backgroundColor>#00000000</backgroundColor>   

</customMapSource>
已经按照你说的做了,两个不同时间段的图源显示的海浪线还是一样的啊,大神也试下这图源嘛:pinch:

Avatar
epic 2014-07-24 15:54

如果选项 <tileUpdate>...</tileUpdate> 不起作用. 
惟有强逼 mobac 每次从新下载瓦片. 可以

- 每次删除文件夹 mobac\tilestore\db-海浪层 (海浪层的本地缓存)

- 不允许 mobac 使用本地缓存

Avatar
地图加加 2014-07-24 15:59

先上图
http://map.openseamap.org/weather.php
例如我想把这个网站上的海浪线弄到MOBAC里去,可上面有好几个时间选择,不知道要怎么写了,望各路大神赐教。。[/quote]

首先,您一次只能导出一个时间,参见下面帖子的内容,您可以学会分析一个网站的URL。

分析后您会看到这个网站图片链接如下:
http://www.openportguide.org/tiles/actual/significant_wave_height/5/5/26/13.png

换一个时间,同一个区域,tile网址为:
http://www.openportguide.org/tiles/actual/significant_wave_height/15/5/26/13.png

可以看到,只有URL中标红色的部分变化了,所以您要下载哪个时间,只要把第一个数字设置为那个时间对应的数字可以了。
同时,这是个多图层合并,需要将海浪透明层和openstreetmap合并。而openstreet默认已经屏蔽了MOBAC,你还需要修改user-agent使其不被识别为MOBAC。

Avatar
y82824 OP 地图加加 2014-07-25 02:42

原来不可以把不同时间写成不同的图源放到MOBAC里去用吗?只能用一个?

Avatar
y82824 OP 地图加加 2014-07-26 14:09

按照你们说的取消掉了允许使用本地缓存后不同时间的显示正常了,我现在用的crazyq给的MOBAC个人修改版,谢谢crazyq,地图加加团队;)

Avatar
y82824 OP 2014-07-26 14:15

感谢热心助人的各位:wink:

Avatar
y82824 OP 2014-08-20 01:02

请问XML文件有没有不允许调用本地缓存的代码?

Avatar
epic y82824 2014-08-20 14:32

最简单是在 tilestore 内清空相应的缓存. 只保留 je.lck. 再把 je.lck 的属性改成唯读 (read-only).

Avatar
y82824 OP epic 2014-08-21 00:41

问题解决,多谢大仙侠义相助;)

Avatar
y82824 OP 2014-08-21 00:56

有没有直接写在XML文件里面的代码嘛,有的话请举例,谢谢:angel:

Avatar
y82824 OP 2014-08-22 13:46

原来选项上的时间也会改变的,这组和一开始的不一样了

Avatar
pirch 2014-09-19 07:08

http://here.com/explore/nearby

Nokia here 地图,图源好像不好分析。

Avatar
y82824 OP pirch 2014-09-24 00:39

我也是请教别人的,你可以去地图加加论坛,也许他们会帮你解决的:wink: