Skip to content

Commit

Permalink
Handle proj4.js API change in Hover formatter (#472)
Browse files Browse the repository at this point in the history
* Handle proj4.js API change in Hover formatter

* Update travis
  • Loading branch information
philippjfr committed Sep 21, 2020
1 parent 2632874 commit 0e49d14
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
language: generic
sudo: false
language: python

os:
- linux

dist: xenial

env:
global:
- PYENV_VERSION=3.7
- PYTHON_VERSION=3.7
- PKG_TEST_PYTHON="--test-python=py37"
- CHANS_DEV="-c pyviz/label/dev -c bokeh"
Expand Down
6 changes: 5 additions & 1 deletion geoviews/plotting/bokeh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ class GeoRasterPlot(GeoPlot, RasterPlot):
var projections = Bokeh.require("core/util/projections");
var x = special_vars.x
var y = special_vars.y
var coords = projections.wgs84_mercator.inverse([x, y])
if (projections.wgs84_mercator.invert == null) {
var coords = projections.wgs84_mercator.inverse([x, y])
} else {
var coords = projections.wgs84_mercator.invert(x, y)
}
return "" + (coords[%d]).toFixed(4)
"""

Expand Down
6 changes: 5 additions & 1 deletion geoviews/plotting/bokeh/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ class GeoPlot(ProjectionPlot, ElementPlot):
var projections = Bokeh.require("core/util/projections");
var x = special_vars.data_x
var y = special_vars.data_y
var coords = projections.wgs84_mercator.inverse([x, y])
if (projections.wgs84_mercator.invert == null) {
var coords = projections.wgs84_mercator.inverse([x, y])
} else {
var coords = projections.wgs84_mercator.invert(x, y)
}
return "" + (coords[%d]).toFixed(4)
"""

Expand Down

0 comments on commit 0e49d14

Please sign in to comment.