2017-05-17 17 views

답변

1

솔루션 (맵 퀘스트 웹 페이지에서 API의 Mapbox 웹 페이지에서 키가 아닌 사용) MapboxAccountManager에 의해 MapQuestAccountManager을 변경하고 된 setContentView (R.layout.activity_main_mr)를 호출하지 않는 것입니다; MapboxAccountManager

public class MainActivityMR extends Activity { 
private MapboxMap mMap; 
private MapView mMapView; 
private String linkid =""; 
private String evento =""; 
String latpass; 
String lonpass; 
String vod; 
@Override 
protected void onCreate(Bundle savedInstanceState) 
{ 
    super.onCreate(savedInstanceState); 
    //setContentView(R.layout.activity_main_mr); 

    //MapQuestAccountManager.start(getApplicationContext()); 
    //MapboxAccountManager.start(this, getString(R.string.access_token)); 
    MapboxAccountManager.start(getApplicationContext(), getString(R.string.access_token)); 
    setContentView(R.layout.activity_main_mr); 

전에 것은 https://www.mapbox.com/studio/account/tokens/ 에서 API 키를 얻을 strings.xml의이 행을 추가

<string name="access_token">YOUR_API_KEY</string>