Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.gravitas.myapplication;
- /**
- * Created by gravitas on 3/29/2015.
- */
- import android.app.AlertDialog;
- import android.content.DialogInterface;
- import android.os.Bundle;
- import android.support.v4.app.FragmentActivity;
- import android.util.Log;
- import android.view.View;
- import android.widget.LinearLayout;
- import android.widget.TimePicker;
- import android.widget.Toast;
- import com.google.android.gms.maps.CameraUpdateFactory;
- import com.google.android.gms.maps.GoogleMap;
- import com.google.android.gms.maps.SupportMapFragment;
- import com.google.android.gms.maps.model.LatLng;
- import com.google.android.gms.maps.model.MarkerOptions;
- import com.google.android.gms.maps.GoogleMap.OnMapClickListener;
- public class SetCoords extends FragmentActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- }
- public void setUpMap(float x, float y) {
- Log.w("SETUPINGGGGGGGGGGGG", "!!!!!!");
- //setContentView(R.layout.activity_maps);
- GoogleMap mMap;
- mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
- .getMap();
- mMap.addMarker(new MarkerOptions().position(new LatLng(x,y)).title("Рейтинг: 1"));
- mMap.addMarker(new MarkerOptions().position(new LatLng(56.840093,60.596549)).title("ПОЛУЧИЛОСЬ"));
- mMap.addMarker(new MarkerOptions().position(new LatLng(56.843944,60.653595)).title("Рейтинг: 4"));
- mMap.addMarker(new MarkerOptions().position(new LatLng(56.843944,60.653565)).title("Рейтинг: 3"));
- mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(56.840093,60.596549), 15));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement