小编Dmi*_*kin的帖子

Openlayer 3坐标

我有一点经纬度.如何将其转换为OpenLayer 3地图坐标系?我的代码是:

...requiries...


    var coord = [55.7522200, 37.61556005];
    //coord =  ol.proj.transform(coord,'EPSG:4326', 'EPSG:3857');
    var vectorSource = new ol.source.GeoJSON(
         ({
          object: {
            'type': 'FeatureCollection',
            'crs': {
              'type': 'name',
              'properties': {
                'name': 'EPSG:3857'
              }
            },
            'features': [
              {
                'type': 'Feature',
                'geometry': {
                  'type': 'Point',
                  'coordinates': coord
                }
              }
            ]
          }
        }));

    ...
    var map = ...
Run Code Online (Sandbox Code Playgroud)

你能给我一个关于在JavaScript上转换var coords的例子?您可以在链接http://openlayers.org/en/v3.0.0/examples/geojson.html上看到此代码示例

map coordinates coordinate-systems openlayers-3

4
推荐指数
1
解决办法
1万
查看次数

有什么更好的方法来索引Lucene中的数据数组?

亲爱的程序员!
对于使用Apache Lucene的人,我有一个问题.
有什么更好的方法来索引Lucene中的数据数组?
我用

arr [i] = Field: "arr." + i + ".data"
Run Code Online (Sandbox Code Playgroud)

Java代码:

Field field = new StringField(
                "arr." + i + ".data",
                arr[i], Field.Store.YES);
doc.add(field);
Run Code Online (Sandbox Code Playgroud)

java apache lucene

1
推荐指数
1
解决办法
2193
查看次数