无效的GeoJson对象onemap传单

时间:2018-10-29 06:54:08

标签: javascript leaflet

我正在尝试绘制标记,但出现此错误: onemap-leaflet.js:8未捕获的错误:无效的GeoJSON对象。

我是传单的新手,我尝试按照本教程进行操作 https://maptimeboston.github.io/leaflet-intro/

修改后,这就是我的代码:

// Calls the sqlcmd
ProcessStartInfo info = new ProcessStartInfo("sqlcmd", @" -S .\sqlexpress -i C:\YourFileName.sql");

//  Indicades if the Operative System shell is used, in this case it is not
info.UseShellExecute = false;

//No new window is required
info.CreateNoWindow = true;

//The windows style will be hidden
info.WindowStyle = ProcessWindowStyle.Hidden;

//The output will be read by the starndar output process
info.RedirectStandardOutput = true;

Process proc = new Process();

proc.StartInfo = info;

//Start the process
proc.Start();
{
  "SrchResults": [
    {
      "NAME": "ETU",
      "DESCRIPTION": "AXS LOBBY @ SULTAN LINK,MOHAMED SULTAN ROAD,SINGAPORE 239001",
      "AXS_ID": "EXP001",
      "LATITUDE": "1.291962028",
      "LONGITUDE": "103.8396301",
      "Type": "Point",
      "LatLng": "1.29196202805265,103.839630100376",
      "ICON_NAME": "redETU.png"
    },
    {
      "NAME": "ETU",
      "DESCRIPTION": "PPT LODGE 1A - STN 1 ,SELETAR NORTH LINK,SINGAPORE 799455",
      "AXS_ID": "EXP075",
      "LATITUDE": "1.416694999",
      "LONGITUDE": "103.8949814",
      "Type": "Point",
      "LatLng": "1.41669499865432,103.8949813996",
      "ICON_NAME": "redETU.png"
    },
    {
      "NAME": "ETU",
      "DESCRIPTION": "PPT LODGE 1A STN 2,SELETAR NORTH LINK,SINGAPORE 797455",
      "AXS_ID": "EXP076",
      "LATITUDE": "1.4190009829999999",
      "LONGITUDE": "103.8965302",
      "Type": "Point",
      "LatLng": "1.41900098286188,103.896530200297",
      "ICON_NAME": "redETU.png"
    }
  ]
}

有人知道怎么了吗?是我使用的json数据格式错误还是其他原因?我不知道这是如何工作的。

正在检索的数据的URL:

https://developers.onemap.sg/publicapi/themeapi/retrieveTheme?queryName=axs_express_topup&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjMsInVzZXJfaWQiOjMsImVtYWlsIjoicHVibGljQXBpUm9sZUBzbGEuZ292LnNnIiwiZm9yZXZlciI6ZmFsc2UsImlzcyI6Imh0dHA6XC9cL29tMi5kZmUub25lbWFwLnNnXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNTQwNzE1NTI1LCJleHAiOjE1NDExNDc1MjUsIm5iZiI6MTU0MDcxNTUyNSwianRpIjoiMjJhOTM5YTQ0ZDIxNmE2YTVjZjNlY2U5ZDI2Yzc1NTkifQ.yfaIk6ieJ8di6PSWVjqx8hj5d56sB8qXxSFI7WUcT9w

0 个答案:

没有答案