这是indexloc提供的服务,不要输入任何密码
Skip to content

fix to get the pan up/down not reversed #27

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

Merged
merged 5 commits into from
Aug 12, 2015

Conversation

timelyportfolio
Copy link
Collaborator

This does multiple things to "improve" tmap2svg

  1. add a step to add a non-transformed g for svgPanZoom to use as its target viewport. Now, the pan works as expected.
  2. adds height and width parameters to tmap2svg that allows height and width separate from tmap while retaining the same aspect ratio.
  3. removes some of the SVG elements that don't work well in the htmlwidget context, such as the rect surrounding the map.

Note: need the dev/0.3.0 branch of `svgPanZoom, so

devtools::install_github("timelyportfolio/svgPanZoom@dev/0.3.0")

Here is a working example http://bl.ocks.org/timelyportfolio/e2effb970b3cbe2f4e84.

mtennekes added a commit that referenced this pull request Aug 12, 2015
fix to get the pan up/down not reversed
@mtennekes mtennekes merged commit 2231a6c into r-tmap:master Aug 12, 2015
@mtennekes
Copy link
Member

Great, thanks! I'll have a look at it soon.

There is still a minor, but hard problem to solve: the scale bar (if drawn) needs to be adjusted each time the user zooms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants