Esempio n. 1
0
 getRemote(this.url_).then((response) => {
   if (!isNullOrEmpty(response.text)) {
     const features = this.format_.read(response.text, {
       featureProjection: projection,
     });
     success.call(this, [features]);
   } else {
     Exception('No hubo respuesta del servicio');
   }
 });
Esempio n. 2
0
 getRemote(url).then((response) => {
   if (!isNullOrEmpty(response.text) && response.text.indexOf('ServiceExceptionReport') < 0) {
     const features = this.format_.read(response.text, projection);
     success(features);
   } else if (response.code === 401) {
     Dialog.error('Ha ocurrido un error al cargar la capa: Usuario no autorizado.');
   } else if (response.text.indexOf('featureId and cql_filter') >= 0) {
     Dialog.error('FeatureID y CQL son mutuamente excluyentes. Indicar sólo un tipo de filtrado.');
   } else {
     Exception('No hubo respuesta en la operación GetFeature');
   }
 });
Esempio n. 3
0
  /**
   * @public
   * @function
   * @param {Document} data Document.
   * @return {Object} parsed object.
   * @api stable
   */
  read(data) {
    let dataVariable = data;
    if (isString(data)) {
      dataVariable = olXMLParse(data);
    }

    if (dataVariable.nodeType !== 9) {
      Exception('doc.nodeType should be DOCUMENT');
    }

    const context = {};
    this.readRoot(context, dataVariable);
    return context;
  }