Comments (5)
I'm also having a problem with using LoadApi.go()
...if that's what you mean (although not the same problem that you describe). My issue is that the map does not appear when first loaded and doesn't show up until resizing the browser window. Anyway, I'll share what seems to work for me.
I've found that I can directly load the Maps API by including the <script>
tag from the Google Maps API tutorial in my html page. I'm not sure if there's a race condition with determining if onModuleLoad
happens before the script finishes loading. Might need to leave out the async
attribute.
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
async defer></script>
from gwt-maps-v3-api.
Hello,
I had the same problem once. I thought it was something with the GWT panels or the resize functions, so I tried many kinds of panels and the MapWidget.triggerResize() method but nothing worked for me.
Finally, I figured out that the map needs some time to load (until getting the Ajax callbacks answers) so I put the draw() method within a Timer instance and the problem was resolved.
Here is a snap of the way I did it:
Timer timer = new Timer() {
@OverRide
public void run() {
draw();
setContent(mapWidget);
}
};
timer.schedule(4000);
}
from gwt-maps-v3-api.
from gwt-maps-v3-api.
Okay. If you're using the loadMapApi() method, you just have to call it inside the Timer run() like I did, but instead the draw() method.
Please let me know if it fix the issue...
from gwt-maps-v3-api.
Hello again, actually there are some differences between testing on local and on a web server. For me, MapWidget.triggerResize() resolved the problem described by "dpdearing" above.
from gwt-maps-v3-api.
Related Issues (20)
- problems using set and get key-value pair of MVCObject HOT 1
- Error when hitting enter in Textbox in form which uses Autocomplete HOT 1
- Navigation controls broken in IE
- MapTypeStyler does not support color and weight options
- AutoComplete component restrictions
- place result with pagination search retuns only 60 results
- Invisible maps on Chrome HOT 7
- DirectionSevice
- Google Fusion Table Styling in GWT
- Google maps API access from China HOT 7
- Remove the sensor parameter HOT 8
- PlaceChangeMapEvent: All fields are undefined
- ```yaml HOT 1
- Google Map works on local host but doesn't work on web server HOT 2
- No API Keys HOT 3
- Error in AutoComplete
- Only suggestions , no autocomplete
- sdf.spatial.plot colors keep changing
- LatLng no more supported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-maps-v3-api.