// API)
if (mCurrentLocation== null) {
mCurrentLocation=new Location (»»);
mCurrentLocation.setLatitude (41.90533734214473d);
mCurrentLocation.setLongitude (2.565848038959814d);
}
sharedWorld.setGeoPosition(mCurrentLocation.getLatitude(),mCurrentLocation.getLongitude ());
// Create an object with an image in the app resources.
// And the same goes for the app assets
GeoObject go = new GeoObject (1l);
go.setGeoPosition(mCurrentLocation.getLatitude()+0.00005,mCurrentLocation.getLongitude () -0.0001);
go.setImageUri("assets://creature_7.png»);
go.setName («Image from assets»);
// Add the GeoObjects to the world
sharedWorld.addBeyondarObject (go);
return sharedWorld;
}
}
import android.content.pm.PackageManager;
import android. location. Location;
import android. os. Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.widget.Toast;
import com.beyondar.android.plugin. googlemap. GoogleMapWorldPlugin;
import com.beyondar.android.world.GeoObject;
import com.beyondar.android. world. World;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common. api. GoogleApiClient;
import com.google.android.gms. location. LocationListener;
import com.google.android.gms. location. LocationRequest;
import com.google.android.gms. location. LocationServices;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps. GoogleMap;
import com.google.android.gms.maps. GoogleMap. OnMarkerClickListener;
import com.google.android.gms.maps. OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.Marker;
public class GoogleMapActivity extends FragmentActivity implements OnMarkerClickListener, OnMapReadyCallback, LocationListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient. OnConnectionFailedListener {
private GoogleMap mMap;
private GoogleMapWorldPlugin mGoogleMapPlugin;
private World mWorld;
GoogleApiClient mGoogleApiClient;
Location mCurrentLocation;
LocationRequest mLocationRequest;
@Override
protected void onCreate (Bundle savedInstanceState) {
super. onCreate (savedInstanceState);