Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Google Maps: What is the current status ?

    Hi,

    Have you been able to successfully integrate Google Maps in SmartGWT (including all use cases: resize, hide & show, etc) ?

    If so, could you share your ideas on it ?

    Thanks in advance,

    #2
    Hi,
    This has been resolved in SVN and you should have no issues integrating Google Maps in SmartGWT. We'll look into adding a Showcase sample for this.

    Comment


      #3
      That's really GREAT ! I'm going to check out the latest SVN version and I'll let you know.

      Just a question: does this also means that we can use other standard GWT components ?

      Thanks !
      Last edited by juan.medin; 11 Aug 2009, 02:49.

      Comment


        #4
        Originally posted by juan.medin
        Just a question: does this also means that we can use other standard GWT components ?
        Yes, integration with standard GWT components should work well now. We've resolved this and verified some testcases that users provided in the past. See issue 212.

        Ofcourse, if you run into any issues, please do report them. We're hoping to do a new release of SmartGWT pretty soon as it has a lot of significant improvements like GWT integration, as well as the highly requested ResultSet API.

        Comment


          #5
          I understand that we must still handle the resize events, right ?

          So, you'd need something like this:

          Code:
          final MapWidget mapWidget = new MapWidget();
          mapWidget.setDoubleClickZoom( true );
          mapWidget.setScrollWheelZoomEnabled( true );
          mapWidget.setZoomLevel( 3 );
          mapWidget.setSize( "100%", "100%" );
          
          final Canvas c = new Canvas();
          c.setSize( "100%", "100%" );
          c.setBackgroundColor( "blue" );
          c.addResizedHandler( new ResizedHandler()
          {
          	public void onResized( ResizedEvent e )
          	{
          		mapWidget.setSize( c.getWidth().toString(), c.getHeight().toString() );
          	}
          } );
          c.addChild( mapWidget );
          
          RootPanel.get().add( c );
          Can you confirm it ?

          Comment


            #6
            Yes, you'll need to handle resize events yourself because GWT widgets do not participate in the SmartGWT layout management.

            Comment


              #7
              Ok, thank you.

              On the other hand, I've the following simple code to add a MapWidget and a label to a canvas:

              Code:
              final MapWidget mapWidget = new MapWidget();
              mapWidget.setSize( "100%", "100%" );
              
              final Canvas c = new Canvas();
              c.setSize( "100%", "100%" );
              c.setBackgroundColor( "blue" );
              c.addChild( mapWidget );
              c.addChild( new Label( "Test Google Maps" ) );
              Well, in my context if I add that canvas *nothing* is rendered, not even the blue color. If I remove the "c.addChild( mapWidget );" the blue color and the label are rendered without problems. The canvas is being added to a HLayout.

              I don't even know where to look for the problem (no exceptions, no errors in the console). I've spent a long time with a trial-and-error approach, but I'm not closer to find the solution.

              Do you know what can be happening or, better yet, where can I look for the root of the problem?
              Last edited by juan.medin; 12 Aug 2009, 07:41.

              Comment


                #8
                If nothing is rendered (aka white space), then that's the MapWidget rendering white over the blue background of the Label.

                Does the MapWidget work on it's own, without being added to the Label?

                If it does, when you compare the DOM between the MapWidget in the Label and the MapWidget working independently (using eg Firebug), is there an obvious difference?

                Comment


                  #9
                  No, nothing is rendered, neither the map or the label: only a white panel.

                  Just to test (I'm becoming paranoid), I removed the map and added a complex canvas, with all kind of SmartGWT components and it's rendered without problems.

                  In the same application, just to discard library issues, if I add the map at the beginning, in the EntryPoint, it is shown without problems.

                  Comment


                    #10
                    We'll try to write a standalone sample using your code to reproduce the issue and get back to you on this.

                    Comment


                      #11
                      juan medin,
                      Can you please create an issue in tracker for this so that it is not lost.

                      Thanks,
                      Sanjiv

                      Comment

                      Working...
                      X