Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Refactor MapView code to be more maintainable. Implement JavaDocs up to rotation. #2478

Merged
merged 1 commit into from
Oct 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion android/java/MapboxGLAndroidSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,14 @@ android.libraryVariants.all { variant ->
destinationDir = new File(destinationDir, variant.baseName)
source = files(variant.javaCompile.source)
classpath = files(variant.javaCompile.classpath.files) + files(android.bootClasspath)
options.windowTitle("Mapbox Android SDK")
options.docTitle("Mapbox Android SDK")
options.header("<b>Mapbox Android SDK</b>")
options.bottom("&copy; 2015 Mapbox. All rights reserved.")
options.links("http://docs.oracle.com/javase/7/docs/api/")
// TODO this will fail as package-list file not online, need to use offline
options.links("http://d.android.com/reference/")
exclude '**/R.html', '**/R.*.html'
// TODO exclude generated R, BuildConfig, com.almeros.*
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.graphics.Point;
import android.view.View;
import com.mapbox.mapboxgl.geometry.LatLng;
import com.mapbox.mapboxgl.views.InfoWindow;
import com.mapbox.mapboxgl.views.R;

public class Marker extends Annotation {
Expand Down Expand Up @@ -138,6 +139,10 @@ public void setSprite(String sprite) {
this.sprite = sprite;
}

public String getSprite() {
return sprite;
}

public void setTitle(String title) {
this.title = title;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxgl.views;

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

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

/**
* A tooltip view
Expand Down Expand Up @@ -85,7 +86,7 @@ public InfoWindow open(Marker object, LatLng position, int offsetX, int offsetY)
mView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);

PointF coords = mMapView.toScreenLocation(position);
double y = mMapView.getTopOffsetPixelsForAnnotationSymbol(object.sprite);
double y = mMapView.getTopOffsetPixelsForAnnotationSymbol(object.getSprite());
y = y * mMapView.getScreenDensity();

// Flip y coordinate as Android view origin is upper left corner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mapbox.mapboxgl.annotations;
package com.mapbox.mapboxgl.views;

import android.content.Context;
import android.graphics.Canvas;
Expand Down
Loading