function readFeatureByEsriJSON(esriJson, sourceCode, targetCode) {
try {
var view = map.getView();
if (!esriJson) {
return null;
}
var format = new ol.format.EsriJSON();
var feature = format.readFeatureFromObject(esriJson, {
featureProjection: targetCode || view.getProjection(),
dataProjection: sourceCode || view.getProjection(),
});
return feature;
} catch (e) {
return null;
}
}