Hi,
I'm having trouble trying to embbed a map from google map api v3 using SmartGwt at the same time.
The problem is that the PaneControl, as well as the Streetview button get hidden when I add SmartGwt support.
The version I'm using is "SmartClient Version: SC_SNAPSHOT-2011-08-02/LGPL Development Only (built 2011-08-02)"
I tried this both building my own map wrapper for gwt and using "the official" wrapper.
This situation happens in every browser I tested (mozilla firefox 32.0.2, chrome 37.0.2062.120 mand so on).
Map controls cannot be turned on by anymeans.
I need help into this subject.
Regards
Here is the code I used:
I'm having trouble trying to embbed a map from google map api v3 using SmartGwt at the same time.
The problem is that the PaneControl, as well as the Streetview button get hidden when I add SmartGwt support.
The version I'm using is "SmartClient Version: SC_SNAPSHOT-2011-08-02/LGPL Development Only (built 2011-08-02)"
I tried this both building my own map wrapper for gwt and using "the official" wrapper.
This situation happens in every browser I tested (mozilla firefox 32.0.2, chrome 37.0.2062.120 mand so on).
Map controls cannot be turned on by anymeans.
I need help into this subject.
Regards
Here is the code I used:
Code:
package com.paco.test.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.Scheduler; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.SimplePanel; import com.google.maps.gwt.client.GoogleMap; import com.google.maps.gwt.client.LatLng; import com.google.maps.gwt.client.MapOptions; /** * Entry point classes define <code>onModuleLoad()</code>. */ public class PruebaMapas0 implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { Button myB = new Button("prueba",new ClickHandler() { @Override public void onClick(ClickEvent event) { Scheduler.get().scheduleDeferred(new Command() { public void execute () { inicializa(); } }); } }); RootPanel.get().add(myB); } public GoogleMap theMap=null; protected void inicializa(){ MapOptions options = getMapOptions(); SimplePanel widg = new SimplePanel() ; widg.setSize("800px", "600px"); theMap = GoogleMap.create( widg.getElement(), options ) ; try{ RootPanel.get().add( widg ) ; } catch(Throwable t){ t.printStackTrace(); } } protected MapOptions getMapOptions(){ MapOptions opts = MapOptions.create(); opts.setCenter(LatLng.create(19.434568, -99.153223)); opts.setZoom(18); opts.setPanControl(true); return opts; } }
Comment