我的网络服务器上有一个使用log4jv 1.2.17 ( log4j-1.2.17.jar) 的地理服务器。
我已经从log4j 下载站点下载了最新(安全?)版本(2.15.0)并对下载进行了校验。
我现在很困惑.jar我应该尝试使用哪个?
我网站上的版本叫做log4j-1.2.17.jar,但是.jar下载中的 s 都被称为例如log4j-web-2.15.0.jar
地理服务器的网络服务器是jetty如果这有什么区别的话。
该怎么办?
我用sequelize-auto提取了一些PostGis图层的模型,给出:
module.exports = function(sequelize, DataTypes) {
return sequelize.define('table', {
id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true
},
geom: {
type: DataTypes.GEOMETRY('POINT', 4326),
allowNull: true,
},
...
Run Code Online (Sandbox Code Playgroud)
在GET上,sequelize将geom作为GeoJSON发送给客户端:
{
"type":"Point",
"coordinates":[11.92164103734465,57.67219297300486]
}
Run Code Online (Sandbox Code Playgroud)
当我尝试将此Posgis错误保存为:
ERROR: Geometry SRID (0) does not match column SRID (4326)
Run Code Online (Sandbox Code Playgroud)
这个答案给出了如何添加SRID的神的指示(如何在Sequelize ORM中插入PostGIS几何点?),
var point = {
type: 'Point',
coordinates: [39.807222,-76.984722],
crs: { type: 'name', properties: { name: 'EPSG:4326'} }
};
User.create({username: 'username', geometry: point }).then(function(newUser) {
...
});
Run Code Online (Sandbox Code Playgroud)
我知道SRID曾经是从sequelize中删除的功能(https://github.com/sequelize/sequelize/issues/4054).
有没有人知道一种方法来挂钩Sequelize,以便将srid添加到发送给PostGis的GeoJson?在哪里放?在模型的设定者?
当我在 Openlayers 中加载超过 500 个矢量特征时,平板电脑和手机上的性能会严重下降。我的解决方案是清除地图moveend事件的来源。这可行,但会导致恼人的闪烁,大概是在清除和重新加载源之间。
早期针对此“闪烁”的解决方案不再起作用,它会导致对 WFS 的递归调用。
这是我当前的代码:
import {GeoJSON} from 'ol/format';
import {bbox as bboxStrategy} from 'ol/loadingstrategy.js';
import VectorSource from 'ol/source/Vector.js';
import VectorLayer from 'ol/layer/Vector';
var vectorSource = new VectorSource({
format: new GeoJSON({ dataProjection: layerProjection }),
loader: function(extent, resolution, projection) {
var proj = projection.getCode();
var url = 'https://xxx.xxx/geoserver/wfs?service=WFS' +
'&version=1.1.0&request=GetFeature&typename=' + layer +
'&maxFeatures=200&outputFormat=application/json&srsname=' + proj +
'&bbox=' + extent.join(',') + ',' + proj;
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
var onError = …Run Code Online (Sandbox Code Playgroud) 在将vue-i18n集成到我的应用程序时遇到问题。使用此页面为灵感。
<b-navbar-nav class="ml-auto" >
<b-nav-item-dropdown :text="display_name" right>
<b-dropdown-item disabled>{{ $t('username') }}: {{ username }}</b-dropdown-item>
<b-dropdown-item disabled>Organisation: {{ organisation }}</b-dropdown-item>
</b-nav-item-dropdown>
</b-navbar-nav>
Run Code Online (Sandbox Code Playgroud)
给出错误:Cannot read property '_t' of undefined at Proxy.Vue.$t
在Chrome devtools中跟踪错误使我进入vue-i18n.esm.js的第149行(返回语句):
Vue.prototype.$t = function (key) {
var values = [], len = arguments.length - 1;
while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];
var i18n = this.$i18n;
return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))
};
Run Code Online (Sandbox Code Playgroud)
我正在使用vue-cli-3 webpack配置并从npm安装了vue-i18n并用作插件。 …
尝试使Bootstrap Vue与REST api一起玩,该api返回一页数据和记录总数(基于此):
<template>
</div>
<b-pagination
v-on:change="onPageChange"
:total-rows="totalRows"
:per-page="perPage"
v-model="currentPage" />
<b-table responsive striped hover show-empty
stacked="md"
:items="items"
:fields="fields"
:current-page="currentPage"
:per-page="perPage"
:filter="filter"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
:sort-direction="sortDirection"
@filtered="onFiltered">
</b-table>
</div>
</template>
<script>
...
export default {
name: 'TableList',
data() {
return {
module: null,
title: 'Table',
items: [],
fields: [],
errors: [],
currentPage: 1,
perPage: 15,
totalRows: 0,
pageOptions: [ 5, 10, 15 ],
sortBy: null,
sortDesc: false,
sortDirection: 'asc',
filter: null,
}
},
created() {
...
this.fetch();
},
methods: …Run Code Online (Sandbox Code Playgroud) 我已经使用 sequelize-auto 生成了模型,并且需要使用 beforeSave 钩子(请参阅此处)。据我所知,钩子没有开火。sequelize 版本 ^4.20.1,sequelize-auto 版本 ^0.4.29,express 版本 ~4.15.5。任何人都可以帮忙吗?
module.exports = function(sequelize, DataTypes) {
return sequelize.define('trad', {
id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true
},
geom: {
type: DataTypes.GEOMETRY('POINT', 4326),
allowNull: true
},
...
}, {
hooks: {
beforeSave: (instance, options) => {
console.log('Saving geom: ' + instance.geom);
if (instance.geom && !instance.geom.crs) {
instance.geom.crs = {
type: 'name',
properties: {
name: 'EPSG:4326'
}
};
}
}
},
tableName: 'trad',
timestamps: false,
});
}; …Run Code Online (Sandbox Code Playgroud) postgis ×2
sequelize.js ×2
vue.js ×2
bootstrap-4 ×1
geojson ×1
geoserver ×1
jetty ×1
log4j ×1
logging ×1
node.js ×1
openlayers ×1
openlayers-5 ×1
postgresql ×1
vue-i18n ×1
vuejs2 ×1