Lo que muestras no indica si estas añadiendo el LinearLayout "B" al Activity correctamente. Porque no lo haces en XML?
On Thu, Jun 18, 2015 at 5:49 AM, Jefferson Delgado P. <[email protected]> wrote: > Buenos días, > > Llevo ya un par de días peleándome e intentando mostrar un mapa de google > al vuelo, es decir, en base a lo que me venga del servidor, tengo que > pintar un mapa, un select o lo que toque, y con el mapa no lo he > conseguido. He estado mirando varias opciones y la que he visto más > factible, ha sido la siguiente: > > LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( > LayoutParams.MATCH_PARENT, > LayoutParams.WRAP_CONTENT); > LinearLayout B = new LinearLayout(mContext); > B.setOrientation(LinearLayout.VERTICAL); > > > GoogleMapOptions options = new GoogleMapOptions(); > options.camera(new CameraPosition(new LatLng(0, 0), 1, 0, 0)); > MapView mMapFragment = new MapView(mContext, options); > params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 200); > mMapFragment.setLayoutParams(params); > > B.addView(mMapFragment); > > > He probado con distintas variantes y no consigo que el mapa se vea, ni en > gris, ni amago ni nada de nada, aunque eso si, el espacio de 200px me lo > respeta y se ve un gran cuadro en blanco. > > Lo intenté con un SupportMapFragment en lugar de MapView pero nunca llegué > a poder siquiera ejecutarlo. > > Si alguno me puede arrojar algo de luz, se lo agradecería. > > Muchas gracias. > > > Un saludo > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

