我正在尝试绘制标记,但出现此错误: 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: