support for HiDPI

Open
#53 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

Start by reproducing the behavior with the provided config.json and the /toner and /toner-http @2x URLs. Compare the module with the modifications proposed in the linked node-tilejson pull request. Done means the /toner/6/11/26@2x.png endpoint returns the expected 512x512 image rather than 256x256.

Written by the indexing model from the issue text.

Description

The module doesn't seem to works with HiDPI screens like Retina.

Example:
save following under config.json, then run /usr/bin/nodejs /usr/bin/tessera -c . -p 28089

{
 "/toner": {
   "source": "tilejson+http://staging.tile.stamen.com/toner-background/index.json"
  },
 "/toner-http": {
   "source": "http://toner-elb-3vaew2i23b6d-1666871272.us-east-1.elb.amazonaws.com/toner-background/{z}/{x}/{y}.png"
  }
}

http://127.0.0.1:28089/toner-http/6/11/26@2x.png returns a 512x512 image. Fine.

http://toner-elb-3vaew2i23b6d-1666871272.us-east-1.elb.amazonaws.com/toner-background/6/11/26@2x.png returns a 512x512 image (it's the link described in the tilejson file). Fine.

http://127.0.0.1:28089/toner/6/11/26@2x.png returns a 256x256 image. Wrong :-(.

The solution is probably as simple as integrating the modifications proposed in https://github.com/mapbox/node-tilejson/pull/26/files.

Dominant language
JavaScript
Stars
33
Forks
23
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/node-tilejson

All issues in mapbox/node-tilejson

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.