-
Sencha Premium User
Anybody managed to use Google Maps v3 with GXT 2.x?
I've included gwt-maps.jar version 3.8.0, added theses entries to my gwt.xml file -
<inherits name="com.google.maps.gwt.GoogleMaps"/>
<script src="http://maps.google.com/maps/api/js?sensor=false" />
and this is a snippet of my test code -
MapOptions options = MapOptions.create();
options.setCenter(LatLng.create(39.509, -98.434));
options.setZoom(6);
options.setMapTypeId(MapTypeId.ROADMAP);
options.setDraggable(true);
options.setMapTypeControl(true);
options.setScaleControl(true);
options.setScrollwheel(true);
theMap = GoogleMap.create(container.getElement(), options) ;
Whilst this creates the map object ok I get a stack overflow further down the line. Increasing the stack size doesn't help.
Interestingly, the map works fine and I can interact with it as expected, but the other non-map panels fail to load.
Has anybody had any joy with this at all? Or even maps v2?
-
Sencha Premium User
Got this working now.
I had created an html div container and had hooked the map creation code to the onAfterLayout function.
Although I was checking that the container had rendered it still didn't work. Eventually moving this code to onLoad solved it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules