Google Maps API. Projection
<p>I'm trying to drag <code>ImageView</code> to google map and drop it as a marker.
Map is in <code>FrameLayout</code>:</p>

<pre><code>   &lt;FrameLayout
        android:id="@+id/map_frg"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="2"&gt;
</code></pre>

<p>I've set to this <code>FrameLayout</code> <code>OnDragListener</code>:</p>

<pre><code>private class PinDragListener implements View.OnDragListener {

        private GoogleMap map;

        public PinDragListener(GoogleMap map) {
            this.map = map;
        }

        @Override
        public boolean onDrag(View v, DragEvent event) {
            switch (event.getAction()) {
                case DragEvent.ACTION_DROP:
                    MarkerOptions markerOptions = new MarkerOptions()
                            .draggable(true)
                            .anchor(0.0f, 1.0f);
                    int[] coords = new int[2];
                    v.getLocationOnScreen(coords);
                    Projection projection = map.getProjection();
                    LatLng latLng = projection.fromScreenLocation(new Point(coords[0], coords[1]));
                    markerOptions.position(latLng);
                    markerOptions.visible(true);
                    map.addMarker(markerOptions);
                    break;
                default:
                    break;
            }
            return true;
        }
    }
</code></pre>

<p>But when image was dropped somewhere marker placed in the left corner again and again. What can be wrong?
<a href="https://i.stack.imgur.com/Ziz6W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ziz6W.png" alt=""></a></p>

<p><strong>UPDATE:</strong></p>

<p>I've passed dragged view via listener</p>

<pre><code>private class PinTouchListener implements OnTouchListener {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            if (event.getAction() == MotionEvent.ACTION_DOWN) {
                ClipData data = ClipData.newPlainText("", "");
                DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(v);
                v.startDrag(data, shadowBuilder, v, 0);
                dragPinListener.onViewTouched(v);
                return true;
            } else {
                return false;
            }
        }
    }
</code></pre>

<p>and I've got such coordinates every time I dropped marker</p>

<pre><code>x = 0 | y = 1234
 Lat = 65.96291676309829 | Lng = -18.548969998955727
</code></pre>