testing tile overlay
This commit is contained in:
@@ -294,7 +294,7 @@ public final class PolygonRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
static void drawOver(Matrices m) {
|
||||
public static void drawOver(Matrices m) {
|
||||
if (GLState.useProgram(polygonProgram)) {
|
||||
|
||||
GLState.enableVertexArrays(hPolygonVertexPosition, -1);
|
||||
|
||||
@@ -106,7 +106,14 @@ public class CustomOverlay extends RenderOverlay {
|
||||
/* apply view and projection matrices */
|
||||
// set mvp (tmp) matrix relative to mMapPosition
|
||||
// i.e. fixed on the map
|
||||
setMatrix(pos, m);
|
||||
|
||||
float ratio = 1f / mMapView.getWidth();
|
||||
|
||||
m.mvp.setScale(ratio, ratio, 1);
|
||||
m.mvp.multiplyMM(m.proj, m.mvp);
|
||||
|
||||
|
||||
// setMatrix(pos, m);
|
||||
m.mvp.setAsUniform(hMatrixPosition);
|
||||
|
||||
// Draw the triangle
|
||||
|
||||
@@ -38,12 +38,15 @@ import org.oscim.generator.JobTile;
|
||||
import org.oscim.generator.MapWorker;
|
||||
import org.oscim.generator.TileGenerator;
|
||||
import org.oscim.overlay.BuildingOverlay;
|
||||
import org.oscim.overlay.GenericOverlay;
|
||||
import org.oscim.overlay.LabelingOverlay;
|
||||
import org.oscim.overlay.Overlay;
|
||||
import org.oscim.overlay.OverlayManager;
|
||||
import org.oscim.renderer.GLRenderer;
|
||||
import org.oscim.renderer.GLView;
|
||||
import org.oscim.renderer.TileManager;
|
||||
import org.oscim.renderer.overlays.CustomOverlay;
|
||||
import org.oscim.renderer.overlays.TileOverlay;
|
||||
import org.oscim.theme.ExternalRenderTheme;
|
||||
import org.oscim.theme.InternalRenderTheme;
|
||||
import org.oscim.theme.RenderTheme;
|
||||
@@ -193,8 +196,9 @@ public class MapView extends RelativeLayout {
|
||||
mOverlayManager.add(new BuildingOverlay(this));
|
||||
mOverlayManager.add(new LabelingOverlay(this));
|
||||
|
||||
//mOverlayManager.add(new GenericOverlay(this, new TestLineOverlay(this)));
|
||||
//mOverlayManager.add(new GenericOverlay(this, new TestOverlay(this)));
|
||||
mOverlayManager.add(new GenericOverlay(this, new TileOverlay(this)));
|
||||
|
||||
mOverlayManager.add(new GenericOverlay(this, new CustomOverlay(this)));
|
||||
|
||||
// if (testRegionZoom)
|
||||
// mRegionLookup = new RegionLookup(this);
|
||||
|
||||
Reference in New Issue
Block a user