Devextreme local file not working on device

Hello I have a geojson file in this folder.

I try this and It works on emulator. There is no problem.

 Create_Map_Layer('Map_1', '../../views/map/factory.geojson');

But when I build this and run at device the map doesn't seem. I try different options for file like this 在这里输入图像描述

But it doesn't work on device. How can I solve this?

EDIT

If I use online data like this https://openlayers.org/en/v4.2.0/examples/data/geojson/countries.geojson there is no problem. It works on emulator and device.

EDIT-2

I use JQuery and I check local file

 $.get('../../views/map/factory.geojson')
  .done(function () {
      alert('ok');
  }).fail(function () {
      alert('error');
  })

In the emulator it gives me 'ok' but on device it gives me 'error'

I guess the problem is local data or file extensions. But I can't find the solution yet.


I solved the problem interestingly. I copy my geojson file under map.Shared. And It works.

链接地址: http://www.djcxy.com/p/31036.html

上一篇: Devextreme网格远程分组Sql查询形成

下一篇: Devextreme本地文件无法在设备上工作