Java 类com.google.android.gms.maps.model.GroundOverlayOptions 实例源码
项目:hypertrack-live-android
文件:Home.java
private void addPulseRing(LatLng latLng) {
GradientDrawable d = new GradientDrawable();
d.setShape(GradientDrawable.OVAL);
d.setSize(500, 500);
d.setColor(ContextCompat.getColor(this, R.color.pulse_color));
Bitmap bitmap = Bitmap.createBitmap(d.getIntrinsicWidth()
, d.getIntrinsicHeight()
, Bitmap.Config.ARGB_8888);
// Convert the drawable to bitmap
Canvas canvas = new Canvas(bitmap);
d.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
d.draw(canvas);
// Radius of the circle
final int radius = 100;
// Add the circle to the map
circle = mMap.addGroundOverlay(new GroundOverlayOptions()
.position(latLng, 2 * radius).image(BitmapDescriptorFactory.fromBitmap(bitmap)));
}
项目:Bloop
文件:BootprintMapFragment.java
private void placeBootprint(LatLng latLng, float direction) {
if (mMap != null) {
final BitmapDescriptor bootprint;
// pick left/right print
if (mTotalSteps++ % 2 == 0) {
bootprint = mLeftBootprint;
} else {
bootprint = mRightBootprint;
}
final GroundOverlay overlay = mMap.addGroundOverlay(
new GroundOverlayOptions().position(
latLng,
BOOTPRINT_SIZE_METERS
).bearing(
(float) (direction / Math.PI * 180d)
).image(bootprint)
);
mBootprintLocations.add(overlay);
removeAndUpdateBootprints();
}
}
项目:Google-I-O-extended
文件:MapFragment.java
private void showFloorOne(){
googlemap.clear();
if(overlay!=null) {
overlay.remove();
}
LatLng NEWARK = new LatLng(-16.500461, -68.134270);
GroundOverlayOptions newarkMap = new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromResource(R.drawable.cncp1))
.position(NEWARK, 30f, 30f);
overlay = googlemap.addGroundOverlay(newarkMap);
Marker marker = googlemap.addMarker(new MarkerOptions()
.position(new LatLng(-16.500495, -68.134284))
.title("Auditorio Principal")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker_map)));
if(type!=0){
if(type==1){
marker.showInfoWindow();
type =0;
}
}
}
项目:android-sdk-examples
文件:MapsOverlayActivity.java
/**
* Sets bitmap of floor plan as ground overlay on Google Maps
*/
private void setupGroundOverlay(IAFloorPlan floorPlan, Bitmap bitmap) {
if (mGroundOverlay != null) {
mGroundOverlay.remove();
}
if (mMap != null) {
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap);
IALatLng iaLatLng = floorPlan.getCenter();
LatLng center = new LatLng(iaLatLng.latitude, iaLatLng.longitude);
GroundOverlayOptions fpOverlay = new GroundOverlayOptions()
.image(bitmapDescriptor)
.zIndex(0.0f)
.position(center, floorPlan.getWidthMeters(), floorPlan.getHeightMeters())
.bearing(floorPlan.getBearing());
mGroundOverlay = mMap.addGroundOverlay(fpOverlay);
}
}
项目:AndroidMarkerClusteringMaps
文件:KmlRenderer.java
/**
* Adds ground overlays from a given URL onto the map
*
* @param groundOverlayUrl url of ground overlay
* @param groundOverlays hashmap of ground overlays to add to the map
*/
private void addGroundOverlayToMap(String groundOverlayUrl,
HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays, boolean containerVisibility) {
BitmapDescriptor groundOverlayBitmap = BitmapDescriptorFactory
.fromBitmap(mImagesCache.get(groundOverlayUrl));
for (KmlGroundOverlay kmlGroundOverlay : groundOverlays.keySet()) {
if (kmlGroundOverlay.getImageUrl().equals(groundOverlayUrl)) {
GroundOverlayOptions groundOverlayOptions = kmlGroundOverlay.getGroundOverlayOptions()
.image(groundOverlayBitmap);
GroundOverlay mapGroundOverlay = mMap.addGroundOverlay(groundOverlayOptions);
if (containerVisibility == false) {
mapGroundOverlay.setVisible(false);
}
groundOverlays.put(kmlGroundOverlay, mapGroundOverlay);
}
}
}
项目:QuizUpWinner
文件:GoogleMap.java
public final GroundOverlay addGroundOverlay(GroundOverlayOptions paramGroundOverlayOptions)
{
try
{
com.google.android.gms.maps.model.internal.c localc = this.Br.addGroundOverlay(paramGroundOverlayOptions);
if (localc != null)
{
GroundOverlay localGroundOverlay = new GroundOverlay(localc);
return localGroundOverlay;
}
return null;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
项目:android-maps-utils
文件:KmlRenderer.java
/**
* Adds ground overlays from a given URL onto the map
*
* @param groundOverlayUrl url of ground overlay
* @param groundOverlays hashmap of ground overlays to add to the map
*/
private void addGroundOverlayToMap(String groundOverlayUrl,
HashMap<KmlGroundOverlay, GroundOverlay> groundOverlays, boolean containerVisibility) {
BitmapDescriptor groundOverlayBitmap = BitmapDescriptorFactory
.fromBitmap(getImagesCache().get(groundOverlayUrl));
for (KmlGroundOverlay kmlGroundOverlay : groundOverlays.keySet()) {
if (kmlGroundOverlay.getImageUrl().equals(groundOverlayUrl)) {
GroundOverlayOptions groundOverlayOptions = kmlGroundOverlay.getGroundOverlayOptions()
.image(groundOverlayBitmap);
GroundOverlay mapGroundOverlay = attachGroundOverlay(groundOverlayOptions);
if (!containerVisibility) {
mapGroundOverlay.setVisible(false);
}
groundOverlays.put(kmlGroundOverlay, mapGroundOverlay);
}
}
}
项目:blook8r
文件:MapActivity.java
private void setUpMap() {
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(PLACE, 18));
mGroundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromResource(R.drawable.floorplan39)).anchor(0.5f, 0.5f)
.position(PLACE, 60f, 60f)
.bearing(10f));
mMap.setOnMapLongClickListener(this);
mTransparencyBar.setOnSeekBarChangeListener(this);
if (mLatitude != null)
{
LatLng point = new LatLng(mLatitude, mLongitude);
mMap.addMarker(new MarkerOptions()
.position(point)
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE))
.title(mDescription != null ? mDescription : "Target"));
}
}
项目:Nibo
文件:BaseNiboFragment.java
public void addOverlay(LatLng place) {
GroundOverlay groundOverlay = mMap.addGroundOverlay(new
GroundOverlayOptions()
.position(place, 100)
.transparency(0.5f)
.zIndex(3)
.image(BitmapDescriptorFactory.fromBitmap(drawableToBitmap(getActivity().getResources().getDrawable(R.drawable.map_overlay)))));
startOverlayAnimation(groundOverlay);
}
项目:richmaps
文件:RichLayer.java
public void refresh() {
CameraPosition cameraPosition = map.getCameraPosition();
if (cameraPosition.zoom >= MINIMUM_ZOOM_LEVEL) {
Projection projection = map.getProjection();
prepareBitmap();
draw(bitmap, projection);
float mapWidth = (float) SphericalUtil.computeDistanceBetween(
projection.getVisibleRegion().nearLeft,
projection.getVisibleRegion().nearRight);
if (overlay == null) {
GroundOverlayOptions background = new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromBitmap(bitmap))
.position(cameraPosition.target, mapWidth)
.bearing(cameraPosition.bearing)
.zIndex(zIndex);
overlay = map.addGroundOverlay(background);
} else {
overlay.setImage(BitmapDescriptorFactory.fromBitmap(bitmap));
overlay.setPosition(cameraPosition.target);
overlay.setDimensions(mapWidth);
overlay.setBearing(cameraPosition.bearing);
}
} else {
if (overlay != null) {
overlay.remove();
overlay = null;
}
}
}
项目:Google-I-O-extended
文件:MapFragment.java
private void showFloorTwo(){
googlemap.clear();
if(overlay!=null) {
overlay.remove();
}
LatLng NEWARK = new LatLng(-16.500461, -68.134270);
GroundOverlayOptions newarkMap = new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromResource(R.drawable.cncp2))
.position(NEWARK, 30f, 30f);
overlay = googlemap.addGroundOverlay(newarkMap);
Marker marker = googlemap.addMarker(new MarkerOptions()
.position(new LatLng(-16.500425, -68.134262))
.title("Auditorio 2")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker_map)));
if(type!=0){
if(type==2){
marker.showInfoWindow();
type =0;
}
}
marker = googlemap.addMarker(new MarkerOptions()
.position(new LatLng(-16.500501, -68.134340))
.title("Ambiente 1")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker_map)));
if(type!=0){
if(type==3){
marker.showInfoWindow();
type =0;
}
}
}
项目:Android-GoogleMaps-Part1
文件:MapFragment.java
private void drawOverlay( LatLng location, int width, int height ) {
GroundOverlayOptions options = new GroundOverlayOptions();
options.position(location, width, height);
options.image( BitmapDescriptorFactory
.fromBitmap( BitmapFactory
.decodeResource( getResources(), R.mipmap.ic_launcher ) ) );
getMap().addGroundOverlay(options);
}
项目:AndroidMarkerClusteringMaps
文件:KmlGroundOverlay.java
/**
* Creates a new Ground Overlay
*
* @param imageUrl url of the ground overlay image
* @param latLonBox bounds of the image
* @param drawOrder z index of the image
* @param visibility true if visible, false otherwise
* @param properties properties hashmap
* @param rotation rotation of image
*/
/* package */ KmlGroundOverlay(String imageUrl, LatLngBounds latLonBox, float drawOrder,
int visibility, HashMap<String, String> properties, float rotation) {
mGroundOverlayOptions = new GroundOverlayOptions();
mImageUrl = imageUrl;
mProperties = properties;
if (latLonBox == null) {
throw new IllegalArgumentException("No LatLonBox given");
}
mLatLngBox = latLonBox;
mGroundOverlayOptions.positionFromBounds(latLonBox);
mGroundOverlayOptions.bearing(rotation);
mGroundOverlayOptions.zIndex(drawOrder);
mGroundOverlayOptions.visible(visibility != 0);
}
项目:QuizUpWinner
文件:IGoogleMapDelegate.java
public c addGroundOverlay(GroundOverlayOptions paramGroundOverlayOptions)
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate");
if (paramGroundOverlayOptions != null)
{
localParcel1.writeInt(1);
paramGroundOverlayOptions.writeToParcel(localParcel1, 0);
}
else
{
localParcel1.writeInt(0);
}
this.dU.transact(12, localParcel1, localParcel2, 0);
localParcel2.readException();
c localc = c.a.al(localParcel2.readStrongBinder());
return localc;
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
项目:CUMtd
文件:GetStopResponseListener.java
@UiThread
protected void addIcon(String text, LatLng position) {
GroundOverlayOptions groundOverlay = new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromBitmap(mIconGenerator.makeIcon(text)))
.position(position, 80);
final GroundOverlay marker = mMap.addGroundOverlay(groundOverlay);
mBusMarkers.add(marker);
}
项目:XamarinAdmobTutorial
文件:GroundOverlayDemoActivity.java
private void setUpMap() {
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(NEWARK, 11));
mImages.clear();
mImages.add(BitmapDescriptorFactory.fromResource(R.drawable.newark_nj_1922));
mImages.add(BitmapDescriptorFactory.fromResource(R.drawable.newark_prudential_sunny));
mCurrentEntry = 0;
mGroundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions()
.image(mImages.get(mCurrentEntry)).anchor(0, 1)
.position(NEWARK, 8600f, 6500f));
mTransparencyBar.setOnSeekBarChangeListener(this);
}
项目:SelectableMapFragment
文件:SelectableMapFragment.java
public void showSelectionBox() {
if (mDraggableOverlayBoxOptions == null) {
Bitmap bm = OverlayUtils.makeSquareOverlayBitmap(getActivity());
LatLng startPosition = mGoogleMap.getCameraPosition().target;
mDraggableOverlayBoxOptions = new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromBitmap(bm))
.zIndex(1)
.position(startPosition, sBaseOverlaySquareSize);
}
mDraggableOverlayBox = mGoogleMap.addGroundOverlay(mDraggableOverlayBoxOptions);
mDraggableOverlayBox.setPosition(mGoogleMap.getCameraPosition().target);
}
项目:SelectableMapFragment
文件:SupportSelectableMapFragment.java
public void showSelectionBox() {
if (mDraggableOverlayBoxOptions == null) {
Bitmap bm = OverlayUtils.makeSquareOverlayBitmap(getActivity());
LatLng startPosition = mGoogleMap.getCameraPosition().target;
mDraggableOverlayBoxOptions = new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromBitmap(bm))
.zIndex(1)
.position(startPosition, sBaseOverlaySquareSize);
}
mDraggableOverlayBox = mGoogleMap.addGroundOverlay(mDraggableOverlayBoxOptions);
mDraggableOverlayBox.setPosition(mGoogleMap.getCameraPosition().target);
}
项目:HereAStory-Android
文件:GroundOverlayDemoActivity.java
private void setUpMap() {
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(NEWARK, 11));
mImages.clear();
mImages.add(BitmapDescriptorFactory.fromResource(R.drawable.newark_nj_1922));
mImages.add(BitmapDescriptorFactory.fromResource(R.drawable.newark_prudential_sunny));
mCurrentEntry = 0;
mGroundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions()
.image(mImages.get(mCurrentEntry)).anchor(0, 1)
.position(NEWARK, 8600f, 6500f));
mTransparencyBar.setOnSeekBarChangeListener(this);
}
项目:GoogleMapsV2Demo
文件:GroundOverlayDemoActivity.java
private void setUpMap() {
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(NEWARK, 11));
mGroundOverlay = mMap.addGroundOverlay(new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromResource(R.drawable.newark_nj_1922)).anchor(0, 1)
.position(NEWARK, 8600f, 6500f));
mTransparencyBar.setOnSeekBarChangeListener(this);
}
项目:android-maps-utils
文件:KmlGroundOverlay.java
/**
* Creates a new Ground Overlay
*
* @param imageUrl url of the ground overlay image
* @param latLonBox bounds of the image
* @param drawOrder z index of the image
* @param visibility true if visible, false otherwise
* @param properties properties hashmap
* @param rotation rotation of image
*/
/* package */ KmlGroundOverlay(String imageUrl, LatLngBounds latLonBox, float drawOrder,
int visibility, HashMap<String, String> properties, float rotation) {
mGroundOverlayOptions = new GroundOverlayOptions();
mImageUrl = imageUrl;
mProperties = properties;
if (latLonBox == null) {
throw new IllegalArgumentException("No LatLonBox given");
}
mLatLngBox = latLonBox;
mGroundOverlayOptions.positionFromBounds(latLonBox);
mGroundOverlayOptions.bearing(rotation);
mGroundOverlayOptions.zIndex(drawOrder);
mGroundOverlayOptions.visible(visibility != 0);
}
项目:ingress-indonesia-dev
文件:f.java
public final dd a(GroundOverlayOptions paramGroundOverlayOptions)
{
Parcel localParcel1 = Parcel.obtain();
Parcel localParcel2 = Parcel.obtain();
try
{
localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IGoogleMapDelegate");
if (paramGroundOverlayOptions != null)
{
localParcel1.writeInt(1);
paramGroundOverlayOptions.writeToParcel(localParcel1, 0);
}
while (true)
{
this.a.transact(12, localParcel1, localParcel2, 0);
localParcel2.readException();
dd localdd = de.a(localParcel2.readStrongBinder());
return localdd;
localParcel1.writeInt(0);
}
}
finally
{
localParcel2.recycle();
localParcel1.recycle();
}
}
项目:projectindoorapp
文件:MapActivity.java
private void setFloorMap(int floorId) {
int resource;
switch (floorId) {
case -2:
resource = R.drawable.floor_map_u2;
break;
case -1:
resource = R.drawable.floor_map_u1;
break;
case 0:
resource = R.drawable.floor_map_0;
break;
case 1:
resource = R.drawable.floor_map_1;
break;
case 2:
resource = R.drawable.floor_map_2;
break;
case 3:
resource = R.drawable.floor_map_3;
break;
case 4:
resource = R.drawable.floor_map_4;
break;
case 5:
resource = R.drawable.floor_map_5;
break;
case 6:
resource = R.drawable.floor_map_6;
break;
default:
resource = R.drawable.floor_map_4;
break;
}
hftMap = new GroundOverlayOptions()
.image(BitmapDescriptorFactory.fromResource(resource))
.bearing(64 + 180)
.position(hftPosition, 58f, 35f);
mMap.addGroundOverlay(hftMap);
}
项目:referendum_1o_android
文件:GoogleMapWrapper.java
@Override
public final GroundOverlay addGroundOverlay(GroundOverlayOptions options) {
return map.addGroundOverlay(options);
}
项目:PhoneChat
文件:PluginGroundOverlay.java
private void _createGroundOverlay(final JSONObject opts, final CallbackContext callbackContext) throws JSONException {
GroundOverlayOptions options = new GroundOverlayOptions();
if (opts.has("anchor")) {
JSONArray anchor = opts.getJSONArray("anchor");
options.anchor((float)anchor.getDouble(0), (float)anchor.getDouble(1));
}
if (opts.has("bearing")) {
options.bearing((float)opts.getDouble("bearing"));
}
if (opts.has("opacity")) {
options.transparency(1 - (float)opts.getDouble("opacity"));
}
if (opts.has("zIndex")) {
options.zIndex((float)opts.getDouble("zIndex"));
}
if (opts.has("visible")) {
options.visible(opts.getBoolean("visible"));
}
if (opts.has("bounds") == true) {
JSONArray points = opts.getJSONArray("bounds");
LatLngBounds bounds = PluginUtil.JSONArray2LatLngBounds(points);
options.positionFromBounds(bounds);
}
// Load image
String url = opts.getString("url");
_setImage(url, options, new PluginAsyncInterface() {
@Override
public void onPostExecute(Object object) {
GroundOverlay groundOverlay = (GroundOverlay)object;
String id = "groundOverlay_" + groundOverlay.getId();
PluginGroundOverlay.this.objects.put(id, groundOverlay);
JSONObject result = new JSONObject();
try {
result.put("hashCode", groundOverlay.hashCode());
result.put("id", id);
PluginGroundOverlay.this.objects.put("gOverlay_property_" + groundOverlay.getId(), opts);
} catch (Exception e) {}
callbackContext.success(result);
}
@Override
public void onError(String errorMsg) {
callbackContext.error(errorMsg);
}
});
}
项目:neo4art
文件:PluginGroundOverlay.java
private void _createGroundOverlay(final JSONObject opts, final CallbackContext callbackContext) throws JSONException {
GroundOverlayOptions options = new GroundOverlayOptions();
if (opts.has("anchor")) {
JSONArray anchor = opts.getJSONArray("anchor");
options.anchor((float)anchor.getDouble(0), (float)anchor.getDouble(1));
}
if (opts.has("bearing")) {
options.bearing((float)opts.getDouble("bearing"));
}
if (opts.has("opacity")) {
options.transparency(1 - (float)opts.getDouble("opacity"));
}
if (opts.has("zIndex")) {
options.zIndex((float)opts.getDouble("zIndex"));
}
if (opts.has("visible")) {
options.visible(opts.getBoolean("visible"));
}
if (opts.has("bounds") == true) {
JSONArray points = opts.getJSONArray("bounds");
LatLngBounds bounds = PluginUtil.JSONArray2LatLngBounds(points);
options.positionFromBounds(bounds);
}
// Load image
String url = opts.getString("url");
_setImage(url, options, new PluginAsyncInterface() {
@Override
public void onPostExecute(Object object) {
GroundOverlay groundOverlay = (GroundOverlay)object;
String id = "groundOverlay_" + groundOverlay.getId();
PluginGroundOverlay.this.objects.put(id, groundOverlay);
JSONObject result = new JSONObject();
try {
result.put("hashCode", groundOverlay.hashCode());
result.put("id", id);
PluginGroundOverlay.this.objects.put("gOverlay_property_" + groundOverlay.getId(), opts);
} catch (Exception e) {}
callbackContext.success(result);
}
@Override
public void onError(String errorMsg) {
callbackContext.error(errorMsg);
}
});
}
项目:neo4art
文件:PluginGroundOverlay.java
private void _createGroundOverlay(final JSONObject opts, final CallbackContext callbackContext) throws JSONException {
GroundOverlayOptions options = new GroundOverlayOptions();
if (opts.has("anchor")) {
JSONArray anchor = opts.getJSONArray("anchor");
options.anchor((float)anchor.getDouble(0), (float)anchor.getDouble(1));
}
if (opts.has("bearing")) {
options.bearing((float)opts.getDouble("bearing"));
}
if (opts.has("opacity")) {
options.transparency(1 - (float)opts.getDouble("opacity"));
}
if (opts.has("zIndex")) {
options.zIndex((float)opts.getDouble("zIndex"));
}
if (opts.has("visible")) {
options.visible(opts.getBoolean("visible"));
}
if (opts.has("bounds") == true) {
JSONArray points = opts.getJSONArray("bounds");
LatLngBounds bounds = PluginUtil.JSONArray2LatLngBounds(points);
options.positionFromBounds(bounds);
}
// Load image
String url = opts.getString("url");
_setImage(url, options, new PluginAsyncInterface() {
@Override
public void onPostExecute(Object object) {
GroundOverlay groundOverlay = (GroundOverlay)object;
String id = "groundOverlay_" + groundOverlay.getId();
PluginGroundOverlay.this.objects.put(id, groundOverlay);
JSONObject result = new JSONObject();
try {
result.put("hashCode", groundOverlay.hashCode());
result.put("id", id);
PluginGroundOverlay.this.objects.put("gOverlay_property_" + groundOverlay.getId(), opts);
} catch (Exception e) {}
callbackContext.success(result);
}
@Override
public void onError(String errorMsg) {
callbackContext.error(errorMsg);
}
});
}
项目:neo4art
文件:PluginGroundOverlay.java
private void _createGroundOverlay(final JSONObject opts, final CallbackContext callbackContext) throws JSONException {
GroundOverlayOptions options = new GroundOverlayOptions();
if (opts.has("anchor")) {
JSONArray anchor = opts.getJSONArray("anchor");
options.anchor((float)anchor.getDouble(0), (float)anchor.getDouble(1));
}
if (opts.has("bearing")) {
options.bearing((float)opts.getDouble("bearing"));
}
if (opts.has("opacity")) {
options.transparency(1 - (float)opts.getDouble("opacity"));
}
if (opts.has("zIndex")) {
options.zIndex((float)opts.getDouble("zIndex"));
}
if (opts.has("visible")) {
options.visible(opts.getBoolean("visible"));
}
if (opts.has("bounds") == true) {
JSONArray points = opts.getJSONArray("bounds");
LatLngBounds bounds = PluginUtil.JSONArray2LatLngBounds(points);
options.positionFromBounds(bounds);
}
// Load image
String url = opts.getString("url");
_setImage(url, options, new PluginAsyncInterface() {
@Override
public void onPostExecute(Object object) {
GroundOverlay groundOverlay = (GroundOverlay)object;
String id = "groundOverlay_" + groundOverlay.getId();
PluginGroundOverlay.this.objects.put(id, groundOverlay);
JSONObject result = new JSONObject();
try {
result.put("hashCode", groundOverlay.hashCode());
result.put("id", id);
PluginGroundOverlay.this.objects.put("gOverlay_property_" + groundOverlay.getId(), opts);
} catch (Exception e) {}
callbackContext.success(result);
}
@Override
public void onError(String errorMsg) {
callbackContext.error(errorMsg);
}
});
}
项目:tvm
文件:MapUtilities.java
@TargetApi(Build.VERSION_CODES.M)
public static void initializeMap(Context ctx, App app) {
MapUtilities.googleMap.getUiSettings().setZoomControlsEnabled(false);
MapUtilities.googleMap.setOnMarkerClickListener(
new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker marker) {
LatLng to = marker.getPosition();
moveMapFromLocationToLocation(to, 50, 100, MEDIUM_ZOOM, 22);
return false;
}
});
googleMap.clear(); // remove any routes, markers, etc
googleMap.getUiSettings().setTiltGesturesEnabled(false);
googleMap.setPadding(5, 200, 0, 0);
app.layoutTopMessages.setBackgroundColor(ctx.getColor(R.color.teal600));
BitmapDescriptor image =
BitmapDescriptorFactory.fromBitmap(
BitmapFactory.decodeResource(
app.getResources(), R.drawable.cs_floor2)); // get an image.
// Ucy building
ucyBuildingGroundOverlay =
googleMap.addGroundOverlay(
new GroundOverlayOptions()
.image(image)
.anchor(0, 0)
.bearing(51.3f)
.transparency(0.4f)
.position(App.CS_UCY_0_0, 76.5f, 39.75f));
if (ActivityCompat.checkSelfPermission(
(Activity) ctx, Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED
&& ActivityCompat.checkSelfPermission(
(Activity) ctx, Manifest.permission.ACCESS_COARSE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(
(Activity) ctx,
new String[] {Manifest.permission.ACCESS_COARSE_LOCATION},
REQUEST_PERMISSION_COARSE_LOCATION);
ActivityCompat.requestPermissions(
(Activity) ctx,
new String[] {Manifest.permission.ACCESS_FINE_LOCATION},
REQUEST_PERMISSION_FINE_LOCATION);
} else {
centerMapInCoarseLocation(app);
}
}
项目:android_packages_apps_GmsCore
文件:GoogleMapImpl.java
@Override
public IGroundOverlayDelegate addGroundOverlay(GroundOverlayOptions options)
throws RemoteException {
Log.d(TAG, "not yet usable: addGroundOverlay");
return new GroundOverlayImpl(options); // TODO
}
项目:HereAStory-Android
文件:GoogleMapWrapper.java
@Override
public final GroundOverlay addGroundOverlay(GroundOverlayOptions options) {
return map.addGroundOverlay(options);
}
项目:mtransit-for-android
文件:GoogleMapWrapper.java
@Override
public final GroundOverlay addGroundOverlay(GroundOverlayOptions options) {
return map.addGroundOverlay(options);
}
项目:AndroidMarkerClusteringMaps
文件:KmlGroundOverlay.java
/**
* Gets the ground overlay option of the ground overlay on the map
*
* @return GroundOverlayOptions
*/
/* package */ GroundOverlayOptions getGroundOverlayOptions() {
return mGroundOverlayOptions;
}
项目:android_packages_apps_GmsCore
文件:GroundOverlayImpl.java
public GroundOverlayImpl(GroundOverlayOptions options) {
}
项目:android-maps-utils
文件:Renderer.java
/**
* Adds a ground overlay to the map
*
* @param groundOverlayOptions GroundOverlay style options to be added to the map
* @return new GroundOverlay object created from the given GroundOverlayOptions
*/
public GroundOverlay attachGroundOverlay(GroundOverlayOptions groundOverlayOptions) {
return mMap.addGroundOverlay(groundOverlayOptions);
}
项目:android-maps-utils
文件:KmlGroundOverlay.java
/**
* Gets the ground overlay option of the ground overlay on the map
*
* @return GroundOverlayOptions
*/
/* package */ GroundOverlayOptions getGroundOverlayOptions() {
return mGroundOverlayOptions;
}
项目:referendum_1o_android
文件:IGoogleMap.java
GroundOverlay addGroundOverlay(GroundOverlayOptions options);
项目:FMTech
文件:ffd.java
public abstract fjk a(GroundOverlayOptions paramGroundOverlayOptions);
项目:QuizUpWinner
文件:IGoogleMapDelegate.java
public abstract c addGroundOverlay(GroundOverlayOptions paramGroundOverlayOptions);
项目:HereAStory-Android
文件:IGoogleMap.java
GroundOverlay addGroundOverlay(GroundOverlayOptions options);