Issue 504 in gwt-google-apis: gwt-google-apis-gwt-map-3-8-0-pre release 1 throws-javascriptexception-map-is-not-defined when attaching to a panel

2 views
Skip to first unread message

gwt-goo...@googlecode.com

unread,
Oct 2, 2012, 5:31:32 PM10/2/12
to galgwt-issue-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 504 by rtr...@gmail.com: gwt-google-apis-gwt-map-3-8-0-pre
release 1 throws-javascriptexception-map-is-not-defined when attaching to a
panel
http://code.google.com/p/gwt-google-apis/issues/detail?id=504

Found in Release:gwt-google-apis-gwt-map-3-8-0-pre release 1


Platform information (OS, Browser, GWT version). Does the issue exist on
other platforms? This issue is platform independant to the best of my
knowlede and limited testing.


Give a Detailed description of the problem. If possible, please include
some code that reproduces the problem and a verbatim copy of any error
messages you can find.

LatLng myLatLng = LatLng.create(39.571993, -104.998184);
MapOptions myOptions = MapOptions.create();
myOptions.setZoom(16.5);
myOptions.setCenter(myLatLng);
myOptions.setMapTypeId(MapTypeId.SATELLITE);
//com.google.gwt.dom.client.Element mapDiv =
Document.get().getElementById("map_canvas");
RootPanel root = RootPanel.get("MAP1_NetworkMapContainer");
//HTMLPanel mapPanel = HTMLPanel.wrap(mapDiv);
//mapPanel.setHeight("100%");
//map = GoogleMap.create(mapPanel.getElement(), options);

try {
root.add(mapPanel);
} catch (Exception e) {
Log.error("Received Exception ", e);
String error = e.toString();
}

Workaround if you have one: none found. any attempt to attach the div
generates the exception.


Links to the relevant Google Group posts:
http://stackoverflow.com/questions/12489880/gwt-google-apis-gwt-map-3-8-0-pre-throws-javascriptexception-map-is-not-define


gwt-goo...@googlecode.com

unread,
Nov 26, 2013, 5:24:42 PM11/26/13
to galgwt-issue-...@googlegroups.com

Comment #1 on issue 504 by lavrent...@gmail.com:
gwt-google-apis-gwt-map-3-8-0-pre release 1
throws-javascriptexception-map-is-not-defined when attaching to a panel
http://code.google.com/p/gwt-google-apis/issues/detail?id=504

Guys, try change any css file included to your application, for example
GwtUI.css. Just add block with map-canvas definition, like

#map-canvas { height: 300px; width:600px }

in java I've used

GoogleMap.create(Document.get().getElementById("map_canvas"), myOptions);

it's working for me without any additional changes


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages