English 中文(简体)
在谷歌地图上使用的KML习俗的托管秘密是什么?
原标题:What s the secret to hosting custom KML for use in Google Maps Mobile?

我是新来的,因此我在这里可能缺少一些非常基本的内容。

我正试图把KML的档案存放在我防火墙后的一个服务器上,并将这些KML文件显示在安乐器上。

首先,我撰写了一份简单的材料,其中使用Intent显示超支情况,并在地理上注明:0,0?q=。 这在推介器中发挥作用。

随后,我下载了KML文档,并将其贴在我的网络服务器上(FedoraApache 2.2)。 我增加了关于延长和重新启动住房和财产部的附加指示。

当我对我内部主办的KML档案表示简单的看法时,我发现“社区地图无法展示,因为它含有错误”。

我增加了一些法典,试图和下载KML档案,独立于KML,以便我能够检查身份线等等:

final HttpClient client = new DefaultHttpClient();
final HttpGet get = new HttpGet("http://mycompany.com/data/KML_Samples.kml");
try {
    final HttpResponse resp = client.execute(get);
    android.util.Log.e("MapOverlays", resp.toString());
} catch (Throwable t) {
    android.util.Log.e("MapOverlays", "Exception", t);
}

在第一个后勤信息线上有一个空白点,我可以检查结果:

现况 = “HTTP/1.1 200OK”

内容提要:申请/vnd.google-earth.kml+xml

The Intent I m using:

final Intent intent = new Intent(
android.content.Intent.ACTION_VIEW,
        Uri.parse("geo:0,0?q=http://mycompany.com/data/KML_Samples.kml"));
startActivity(intent);

因此,两个主要问题是:

  1. What do I need to do to get KML loaded from a private server?
  2. What tools are available (if any) to determine what is wrong with what I ve done (something more informative than "The community map...")?

增 编

问题回答

这些问题可能令人sil笑皆是,但我需要知道,你是否证实所涉的KML档案事实上是有效的KML。

您可能遇到的另一个问题是,你下载的KML文件含有网络链接,这些链接本身无法从您的安乐器中获取。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签