The method toggleSatellite() is undefined

閲覧: 55 回
最初の未読メッセージにスキップ

92

未読、
2010/07/06 3:52:152010/07/06
To: 日本Androidの会
method toggleSatellite()が未定義だとエラーが表示される状態が解消されません。
原因がよくわからない為、ご教授ください。


import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;


private MapView mapView;

~~~~~~~~

mapView = new MapView(this);
setContentView(mapView);

~~~~~~~~
public void onClick(View v){
if (v==buttonSatellite){
//mapView.toggleSatellite();
mapView.toggleSatellite();
                 if (mapView.isSatellite()){

buttonSatellite.setText("Satellite On");
                  }else{

buttonSatellite.setText("Satellite Off");
                 }
}
}

magpad

未読、
2010/07/06 4:16:182010/07/06
To: 日本Androidの会
こんにちは

setSatellite(boolean)はどうでしょうか?

http://code.google.com/intl/ja/android/add-ons/google-apis/reference/index.html

92

未読、
2010/07/06 23:27:362010/07/06
To: 日本Androidの会
アドバイスいただきました、setSatellite(boolean)でエラーが解消されました!
ありがとうございました、大変勉強になりました。

On 7月6日, 午後5:16, magpad <takashi.murama...@gmail.com> wrote:
> こんにちは
>
> setSatellite(boolean)はどうでしょうか?
>
> http://code.google.com/intl/ja/android/add-ons/google-apis/reference/...
>
> On 7月6日, 午後4:52, 92 <nwoznwnwo...@yahoo.co.jp> wrote:
>
>
>
> > method toggleSatellite()が未定義だとエラーが表示される状態が解消されません。
> > 原因がよくわからない為、ご教授ください。
>
> > import com.google.android.maps.MapActivity;
> > import com.google.android.maps.MapView;
>
> > private MapView mapView;
>
> > ~~~~~~~~
>
> > mapView = new MapView(this);
> > setContentView(mapView);
>
> > ~~~~~~~~
> > public void onClick(View v){
> > if (v==buttonSatellite){
> > //mapView.toggleSatellite();
> > mapView.toggleSatellite();
> >                  if (mapView.isSatellite()){
>
> > buttonSatellite.setText("Satellite On");
> >                   }else{
>
> > buttonSatellite.setText("Satellite Off");
> >                  }
> > }
> > }- 引用テキストを表示しない -
>
> - 引用テキストを表示 -
全員に返信
投稿者に返信
転送
新着メール 0 件