Skip to content

Commit

Permalink
Fixed problem on click in obtain_action
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfandringa committed Apr 28, 2015
1 parent 3beae2d commit 3ea1dde
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Elevation.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ def get_elevation(self,point):
QMessageBox.warning(self.iface.mainWindow(), 'Elevation', 'JSON decode failed: '+str(jsonresult), QMessageBox.Ok, QMessageBox.Ok)

def obtain_action(self, point) :
epsg4326 = QgsCoordinateReferenceSystem(4326, QgsCoordinateReferenceSystem.EpsgCrsId)
self.reprojectgeographic = QgsCoordinateTransform(self.iface.mapCanvas().mapRenderer().destinationCrs(), epsg4326)
pt = self.reprojectgeographic.transform(point)
elevation = self.get_elevation(point)
if elevation == None:
QMessageBox.warning(self.iface.mainWindow(), 'Elevation', 'Failed to get elevation.', QMessageBox.Ok, QMessageBox.Ok)
Expand Down

0 comments on commit 3ea1dde

Please sign in to comment.