This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//set headers to NOT cache a page | |
header("Cache-Control: no-cache, must-revalidate"); //HTTP 1.1 | |
header("Pragma: no-cache"); //HTTP 1.0 | |
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past | |
//or, if you DO want a file to cache, use: | |
header("Cache-Control: max-age=2592000"); //30days (60sec * 60min * 24hours * 30days) | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import com.mapbox.mapboxsdk.geometry.BoundingBox; | |
import com.mapbox.mapboxsdk.geometry.LatLng; | |
import com.mapbox.mapboxsdk.overlay.GpsLocationProvider; | |
import com.mapbox.mapboxsdk.overlay.PathOverlay; | |
import com.mapbox.mapboxsdk.overlay.UserLocationOverlay; | |
import com.mapbox.mapboxsdk.views.MapView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mMapView.setAccessToken("pk.eyJ1IjoibW9zZWxheW1kIiwiYSI6ImNpZjNzYzZsejAwbGJzdmx2OHg3bjd4aXEifQ.g4tCt7lO9sgKphV6hcWBgQ"); | |
// Main World Map | |
mMapView.setTileSource(new MapboxTileLayer("moselaymd.cif3sc6e400m2stlylfe3q8nb")); | |
// Max Bounds | |
mMapView.setScrollableAreaLimit(new BoundingBox(new LatLng(30.01926989644603, 31.413833498954773), new LatLng(30.017535041023624, 31.411263942718506))); | |
// My Indoor Map Layer | |
MapTileLayerBase overlayTileLayer = new MapTileLayerBasic(mapView.getContext(), new MapboxTileLayer("moselaymd.la9yhkt9"), mapView); | |
TilesOverlay tilesOverlay = new TilesOverlay(overlayTileLayer); | |
tilesOverlay.setLoadingBackgroundColor(Color.TRANSPARENT); | |
tilesOverlay.setDrawLoadingTile(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.res.Resources; | |
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.BitmapFactory; | |
import android.graphics.BitmapFactory.Options; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String decodeFile(String path,int DESIREDWIDTH, int DESIREDHEIGHT) { | |
String strMyImagePath = null; | |
Bitmap scaledBitmap = null; | |
try { | |
// Part 1: Decode image | |
Bitmap unscaledBitmap = ScalingUtilities.decodeFile(path, DESIREDWIDTH, DESIREDHEIGHT, ScalingLogic.FIT); | |
if (!(unscaledBitmap.getWidth() <= DESIREDWIDTH && unscaledBitmap.getHeight() <= DESIREDHEIGHT)) { | |
// Part 2: Scale image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.media.ExifInterface; | |
import android.os.Environment; | |
import android.util.Log; | |
import java.io.File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 8, | |
"sources": { | |
"base-layer": { | |
"type": "raster", | |
"url": "mapbox://moselaymd.cif3sc6e400m2stlylfe3q8nb", | |
"tileSize": 256 | |
}, | |
"first-layer": { | |
"type": "raster", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String styleUrl = "asset://mapbox/basewithground.json"; | |
mMapView.setStyleUrl(styleUrl); | |
mMapView.setVisibleCoordinateBounds(new CoordinateBounds(new LatLng(30.017535041023624, 31.411263942718506) | |
, new LatLng(30.01926989644603, 31.413833498954773))); | |
mMapView.setCenterCoordinate(new LatLng(30.01833860567525, 31.412964463233948)); | |
mMapView.setZoomLevel(18,true); | |
mMapView.setZoomEnabled(false); | |
mMapView.setScrollEnabled(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"assignedTo":[ | |
{ | |
"name":"Contractor", | |
"id":5 | |
} | |
], | |
"category":"Toilets", | |
"comment":"Comment", |
OlderNewer