8000 test adding an option to use country borderlines from a UN geojson dataset for geo subplots by archmoj · Pull Request #7327 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

test adding an option to use country borderlines from a UN geojson dataset for geo subplots #7327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
handle empty latlon
  • Loading branch information
archmoj committed Dec 30, 2024
commit 00232af5150c195ceea3faddefa58420b39cd768
4 changes: 4 additions & 0 deletions src/plots/geo/geo.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,8 @@ proto._render = function() {
var k;

function translatePoints(d) {
if(!d.lonlat) return null;

var lonlatPx = projection(d.lonlat);
return lonlatPx ?
strTranslate(lonlatPx[0], lonlatPx[1]) :
Expand Down Expand Up @@ -685,6 +687,8 @@ function getProjection(geoLayout) {
}

projection.isLonLatOverEdges = function(lonlat) {
if(!lonlat) return false;

if(projection(lonlat) === null) {
return true;
}
Expand Down
0