コード例 #1
0
ファイル: wms.py プロジェクト: imclab/mapproxy
 def get_info(self, query):
     if self.supported_srs and query.srs not in self.supported_srs:
         query = self._get_transformed_query(query)
     resp = self._retrieve(query)
     info_format = resp.headers.get('Content-type', None)
     if not info_format:
         info_format = query.info_format
     return create_featureinfo_doc(resp.read(), info_format)
コード例 #2
0
ファイル: wms.py プロジェクト: JohnPurviance/mapproxy
 def get_info(self, query):
     if self.supported_srs and query.srs not in self.supported_srs:
         query = self._get_transformed_query(query)
     resp = self._retrieve(query)
     info_format = resp.headers.get('Content-type', None)
     if not info_format:
         info_format = query.info_format
     return create_featureinfo_doc(resp.read(), info_format)
コード例 #3
0
    def get_info(self, query):
        if self.supported_srs and query.srs not in self.supported_srs:
            query = self._get_transformed_query(query)
        resp = self._retrieve(query)

        # use from template if available
        info_format = self.request_template.params.get('info_format')
        if not info_format:
            # otherwise from response
            info_format = resp.headers.get('Content-type', None)
        if not info_format:
            # otherwise from query
            info_format = query.info_format
        return create_featureinfo_doc(resp.read(), info_format)
コード例 #4
0
ファイル: arcgis.py プロジェクト: mo-tucker/mapproxy
 def get_info(self, query):
     if self.supported_srs and query.srs not in self.supported_srs:
         query = self._get_transformed_query(query)
     resp = self._retrieve(query)
     # always use query.info_format and not content-type from response (even esri example server aleays return text/plain)
     return create_featureinfo_doc(resp.read(), query.info_format)