More correctly to use some DIV element, f.e. with name 'mapstraction',
and
use such code:
...
JavaScriptObject jso = getMap(DOM.getElementById("mapstraction"));
...

protected native JavaScriptObject getMap(Element element)/*-{
                 var m = new $wnd.Mapstraction(element, 'google');
                 m.resizeTo(400,400);
                 return m;
}-*/

But it is not solves the problem. Just gray rectangle on the screen,
400x400 px.
Does anybody know what is the reason of such map behavior?

Best regards

On 8 сент, 19:59, anglers <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> I have some problem.
> I`m trying to get Mapstraction functionality in my GWT application.
>
> In my main module I use this code:
> ...
> VerticalPanel ccc = new VerticalPanel();
> ccc.setWidth("500px");
> ccc.setHeight("500px");
> JavaScriptObject jso = getMap( ccc.getElement());
> RootPanel.get().add(ccc);
> ...
>
> And JSNI function is:
>
> protected native JavaScriptObject getMap(Element element)/*-{
>                 var m = new $wnd.Mapstraction(element, 'google');
>                 m.resizeTo(400,400);
>                 return m;
>
> }-*/;
>
> In result I have grey rectangle on the screen, "Powered by Google" and
> "Terms of use" labels below.
> Map is not loaded, just grey area
>
> Does anybody know what`s problem? Help me please to resolve this
>
> Best regards
> Sergey
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to