Skip to content

Commit

Permalink
[android] mapbox#2588 - Moving InfoWindow classes to annotations package
Browse files Browse the repository at this point in the history
  • Loading branch information
bleege committed Oct 10, 2015
1 parent 79c7bdb commit 048894e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mapbox.mapboxsdk.views;
package com.mapbox.mapboxsdk.annotations;

import android.content.Context;
import android.graphics.PointF;
Expand All @@ -7,9 +7,8 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.views.MapView;

/**
* A tooltip view
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mapbox.mapboxsdk.views;
package com.mapbox.mapboxsdk.annotations;

import android.content.Context;
import android.graphics.Canvas;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import android.view.View;
import com.mapbox.mapboxsdk.R;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.views.InfoWindow;
import com.mapbox.mapboxsdk.views.MapView;

public class Marker extends Annotation {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import com.almeros.android.multitouch.gesturedetectors.TwoFingerGestureDetector;
import com.mapbox.mapboxsdk.R;
import com.mapbox.mapboxsdk.annotations.Annotation;
import com.mapbox.mapboxsdk.annotations.InfoWindow;
import com.mapbox.mapboxsdk.annotations.Marker;
import com.mapbox.mapboxsdk.annotations.MarkerOptions;
import com.mapbox.mapboxsdk.annotations.Polygon;
Expand Down Expand Up @@ -1882,8 +1883,13 @@ private List<Marker> getMarkersInBounds(@NonNull BoundingBox bbox) {
return new ArrayList<>(annotations);
}

// Used by InfoWindow
double getTopOffsetPixelsForAnnotationSymbol(@NonNull String symbolName) {
/**
* Get Top Offset for the annotation symbol.
* Used by InfoWindow
* @param symbolName Annotation Symbol
* @return Top Offset in pixels
*/
public double getTopOffsetPixelsForAnnotationSymbol(@NonNull String symbolName) {
return mNativeMapView.getTopOffsetPixelsForAnnotationSymbol(symbolName);
}

Expand All @@ -1901,8 +1907,11 @@ public double getMetersPerPixelAtLatitude(@FloatRange(from = -180, to = 180) dou
return mNativeMapView.getMetersPerPixelAtLatitude(latitude, getZoomLevel());
}

// Used by InfoWindow
float getScreenDensity() {
/**
* Get ScreenDensity of device
* @return Screen Density ratio
*/
public float getScreenDensity() {
return mScreenDensity;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
android:visibility="gone"/>
</LinearLayout>

<com.mapbox.mapboxsdk.views.InfoWindowTipView
<com.mapbox.mapboxsdk.annotations.InfoWindowTipView
android:layout_width="fill_parent"
android:layout_height="10dp"/>

Expand Down

0 comments on commit 048894e

Please sign in to comment.