zooming

after canvas zoom with pivot point, x- and y- coordinates are wrong

家住魔仙堡 提交于 2019-11-30 17:46:39
问题 I am trying to implement zooming on a canvas which should focus on a pivot point. Zooming works fine, but afterwards the user should be able to select elements on the canvas. The problem is, that my translation values seem to be incorrect, because they have a different offset, than the ones where I don't zoom to the pivot point (zoom without pivot point and dragging works fine). I used some code from this example. The relevant code is: class DragView extends View { private static float MIN

Is it possible to set dimensions to a groundOverlay that is independent of the map zoom level?

邮差的信 提交于 2019-11-30 17:14:42
问题 I have a GroundOverlay on my GoogleMap and I want that its dimensions to not change when I zoom in/out on map. Exact like default map markers that always keep their dimensions. I have tried with both forms of the GroundOverlay.setDimensions() but the image is still resize on zoom. Here is my code: Bitmap btm = BitmapFactory.decodeResource(getResources(), R.drawable.map_arrow); BitmapDescriptor arrow = BitmapDescriptorFactory.fromBitmap(btm); float w = btm.getWidth(); float h = btm.getHeight()

How to disable doubletap zoom in android webview?

走远了吗. 提交于 2019-11-30 08:53:00
问题 How to disable the doubletap zoom in android webview . I have tried many things but it haven't worked. Please suggest me the right solution to achieve this . Actually I am loading an image from custom html . I have to disable complete zooming for that. I have tried the below things, webview.getSettings().setSupportZoom(false); and even I kept meta tag in html and I make it as userscalable= no . Even it doesn't worked for me. And I tried using GestureDetector.SimpleOnGestureListener Please let

How to add zoom effect into dc.geoChoroplethChart?

自作多情 提交于 2019-11-30 05:43:32
问题 I started to use dc.js Library to create all kinds of graphs and I bumped into a problem when I was trying to create a Geo Choropleth map using dc.js and couldn't add the ability to zoom and move the map. All the examples I saw were using d3 and svg.. but once I used those examples, I couldn't use the data of dc.dimention and all the crossfilter calculations. for example my code is: d3.json("world-countries.json", function (statesJson) { geoChart.width(1000) .height(600) .dimension(countryDim

Adding an extra zoom levels in Leaflet Maps

僤鯓⒐⒋嵵緔 提交于 2019-11-30 05:41:04
问题 Im using leaflet to create a photo map, with my own tiles, which works as expected. Im trying to work out how I can prevent the zoom from following this Quadtree type pattern: Zoom Level 0 - Entire map width = 256px; Zoom Level 1 - Entire map width = 512px; Zoom Level 2 - Entire map width = 1024px; And so on... I would like to be able to zoom in say increments of 25% or 100px. An example of 100px increments: Zoom Level 0 - Entire map width = 200px; Zoom Level 1 - Entire map width = 300px;

JavaFX 8 Dynamic Node scaling

不想你离开。 提交于 2019-11-30 04:02:46
问题 I'm trying to implement a scene with a ScrollPane in which the user can drag a node around and scale it dynamically. I have the dragging and scaling with the mouse wheel working as well as a reset zoom, but I'm having trouble with the calculations to fit the node to the width of the parent. Here is my code as an sscce. (works) Mouse wheel will zoom in and out around the mouse pointer (works) Left or right mouse press to drag the rectangle around (works) Left double-click to reset the zoom

How to zoom whole activity on multi touch?

被刻印的时光 ゝ 提交于 2019-11-29 22:54:22
Problem: It's easy to zoom images and web views. But I want to zoom a whole activity. How can I do this? Here, I provide wire-frame: From this you can understand, what I want to do. Request If you have any solution of this, then please share. Thank you. You can simulate zooming in and out by scaling the root activity view. Here's some starter code: View v = findViewById(android.R.id.content); // get reference to root activity view v.setOnClickListener(new OnClickListener() { float zoomFactor = 1.5f; boolean zoomedOut = false; @Override public void onClick(View v) { if(zoomedOut) { // now zoom

set Android ZoomButtonsController alignment?

喜欢而已 提交于 2019-11-29 17:37:39
Im implementing a ZoomButtonsController in my custom View and have been trying to figure out how to align it to the bottom right hand corner of the screen (it aligns to the bottom middle by default) but havent had any luck. ZoomButtonsController can be defined in XML files and can be positioned accordingly , for eg. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ZoomControls android:id="@+id/zoomControls1" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout

Double Tap Zoom in GoogleMaps Activity [duplicate]

☆樱花仙子☆ 提交于 2019-11-29 12:14:55
Possible Duplicate: Double Tap -> Zoom on Android MapView? I am newbie Android developer. I am developing an application in which I am using GoogleMaps. I have to implement double tap zoom in GoogleMaps. When I double click on the map it should zoom in. Kindly if it is possible provide a sample code. I have written the following code but I dont know what to add more. public class Maps extends MapActivity implements OnGestureListener, OnDoubleTapListener { private GestureDetector detector; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

zooming image in viewflipper

青春壹個敷衍的年華 提交于 2019-11-29 08:48:45
I have created a image slideshow using ViewFlipper. I have used imageFrame.setOnTouchListener(gestureListener); to listen user touch events like single tap,long tap But now i want to zoom in/out on current image in slideshow (ViewFlipper) ,on doubletap by user.I have searched internet for this but wasn't able to find a solution.Please help me out. There are a number of ways you can do this, but a simple way is to use the platform's ZoomControls widget , which is a simple widget consisting of a +/- button. You can attach onZoomInClickListener and an onZoomOutClickListener to handle touches to