如题,原来用得好好的,一月之前,也就是谷歌被屏蔽之后没多久,无法使用,大家遇到了吗,是opencyclemap改变了什么,还是别的问题,有解决的途径吗,谢谢!
源码:
<?xml version="1.0" encoding="UTF-8" ?>
- <customMultiLayerMapSource>
<name>OCM10M等高地形天地地标图</name>
- <layers>
- <customMapSource>
<name>Open Cycle Map1</name>
<minZoom>1</minZoom>
<maxZoom>18</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>None</tileUpdate>
<url>http://{$serverpart}.tile3.opencyclemap.org/landscape/{$z}/{$x}/{$y}.png</url>
<serverParts>a b c</serverParts>
</customMapSource>
- <customMapSource>
<name>tiandidibiao1</name>
<minZoom>3</minZoom>
<maxZoom>18</maxZoom>
<tileType>PNG</tileType>
<ignoreErrors>true</ignoreErrors>
- <url>
- <![CDATA[
http://t{$serverpart}.tianditu.cn/DataServer?T=cia_w&X={$x}&Y={$y}&L={$z}
]]>
</url>
<serverParts>0 1 2 3 5 6 7</serverParts>
<backgroundColor>#00000000</backgroundColor>
</customMapSource>
</layers>
</customMultiLayerMapSource>
困惑的是,opencycle网站依然可以访问,网站文档关于引用地图的句法依然如前,在orux中的在线地图中opencycle+天地地标仍然可用
<name>OCM+Landscape地形图</name>
- <url>
- <![CDATA[
http://{$s}.tile3.opencyclemap.org/landscape/{$z}/{$x}/{$y}.png
]]>
</url>
<minzoom>0</minzoom>
<maxzoom>19</maxzoom>
<projection>MERCATORESFERICA</projection>
<servers>a,b,c</servers>
似乎 opencyclemap.org 限制了 mobac 直接下载.
解决办法是令 opencyclemap.org 以为你是普通的浏览器 (修改 User-Agent header).
可参考 bsh 图源的设置.
谢谢epic指点,能否贴出具体的代码
打开任何一个天地图bsh图源
http://www.doyouhike.net/forum/comm_nav/2/585383,0,0,6.html#post128
有个 addHeaders 函数.
User-Agent
http://www.useragentstring.com/pages/Chrome/
http://www.useragentstring.com/pages/Firefox/
http://www.useragentstring.com/pages/Internet%20Explorer/
这些函数可以用到XML文件里吗
谢谢epic
User-Agent
http://www.useragentstring.com/pages/Chrome/
http://www.useragentstring.com/pages/Firefox/
http://www.useragentstring.com/pages/Internet%20Explorer/
请问这段代码写在XML的什么位置?或者把opencyclemap的图源代码贴出来给我看看嘛,谢谢了。
可以直接在setting.xml中设置userAgent,不需要更改图源
已经可以用了,谢谢
谢谢各位,在setting中,就有useragent段落,填入浏览器代码即可。
你好,我想问问填入的代码是这个吗?http://{$serverpart}.tile3.opencyclemap.org/landscape/{$z}/{$x}/{$y}.png
代码位置填在哪些字符之间啊? <userAgent>MOBAC/1.9.16</userAgent>
可以直接在setting.xml中设置userAgent? 怎样找到setting.xm?谢谢
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<settings>
<atlasFormatSpecificSettings>
<garminCustomMaxMapCount>100</garminCustomMaxMapCount>
</atlasFormatSpecificSettings>
<bandwidthLimit>0</bandwidthLimit>
<coordinateNumberFormat>DEG_LOCAL</coordinateNumberFormat>
<customProxyHost></customProxyHost>
<customProxyPassword></customProxyPassword>
<customProxyPort></customProxyPort>
<customProxyUserName></customProxyUserName>
<customTileSize>false</customTileSize>
<devMode>false</devMode>
<directories/>
<downloadRetryCount>1</downloadRetryCount>
<downloadThreadCount>2</downloadThreadCount>
<elementName>Layer</elementName>
<googleLanguage>en</googleLanguage>
<gpxFileChooserDir></gpxFileChooserDir>
<httpConnectionTimeout>10</httpConnectionTimeout>
<httpReadTimeout>10</httpReadTimeout>
<ignoreDlErrors>false</ignoreDlErrors>
<localeCountry>CN</localeCountry>
<localeLanguage>zh</localeLanguage>
<mainWindow>
<size>800/590</size>
<position>0/0</position>
<maximized>true</maximized>
<leftPanelVisible>true</leftPanelVisible>
<rightPanelVisible>true</rightPanelVisible>
<collapsedPanels>
<collapsedPanel>Coordinates</collapsedPanel>
</collapsedPanels>
</mainWindow>
<mapOverlapTiles>0</mapOverlapTiles>
<mapSourcesDisabled/>
<mapSourcesEnabled/>
<MapSourcesUpdate/>
<mapviewCenterCoordinate lat="50.064191736659104" lon="8.96484375"/>
<mapviewGridZoom>-1</mapviewGridZoom>
<mapviewMapSource>OpenSeaMap</mapviewMapSource>
<mapviewZoom>11</mapviewZoom>
<maxMapSize>65536</maxMapSize>
<osmHikingTicket></osmHikingTicket>
<paperAtlas>
<compression>6</compression>
<crop>15</crop>
<dpi>96</dpi>
<marginBottom>22.6</marginBottom>
<marginLeft>22.6</marginLeft>
<marginRight>22.6</marginRight>
<marginTop>22.6</marginTop>
<overlap>28.2</overlap>
<compass>true</compass>
<pageNumbers>true</pageNumbers>
<scaleBar>true</scaleBar>
<wgsEnabled>true</wgsEnabled>
<paperSize>A4</paperSize>
<wgsDensity>SECOND_1</wgsDensity>
</paperAtlas>
<placeBookmarks/>
<proxyType>CUSTOM</proxyType>
<selectedZoomLevels/>
<tileDefaultExpirationTime>2419200000</tileDefaultExpirationTime>
<tileImageFormat>PNG</tileImageFormat>
<tileMaxExpirationTime>31536000000</tileMaxExpirationTime>
<tileMinExpirationTime>432000000</tileMinExpirationTime>
<tileSize>256/256</tileSize>
<tileStoreEnabled>true</tileStoreEnabled>
<unitSystem>Metric</unitSystem>
<userAgent>http://www.useragentstring.com/pages/Firefox/</userAgent>
<version>1.9.16</version>
<wgsGrid>
<color>#0000ff</color>
<compressLabels>false</compressLabels>
<density>SECOND_1</density>
<enabled>false</enabled>
<font>SansSerif-PLAIN-12</font>
<width>1.0</width>
</wgsGrid>
</settings>