Comments (11)
Hmmm, I think this has occurred before in one of the classes and I added a clear b/c the type null didn't pass correctly.
from gwt-maps-v3-api.
Working up the fix
from gwt-maps-v3-api.
I have a branch with the fix, but I'm going to look for any of the others.
from gwt-maps-v3-api.
Ah I remember where I did that, it was in Marker. If the fix I'm adding we can put something like this in place.
/**
* close the marker
*/
public final native void close() /*-{
this.setMap();
}-*/;
from gwt-maps-v3-api.
I pulled the fix #32
from gwt-maps-v3-api.
Merged with master. Waiting for CI to build and deploy. I'm going to close the issue, and if for some reason it still exists, please report it. Thanks for your help.
from gwt-maps-v3-api.
I see you ameliorated this with my workaround in each JSO.
public final void setMap(MapWidget mapWidget) {
if (mapWidget == null) {
setMapImpl(null);
} else {
setMapImpl(mapWidget.getJso());
}
}
Of course now boilerplate code is repeated, but these are JSO's, so having a simple HasMap interface and AbstractMapLayer is a no go.
However there was an archetype example (response 13) on the GWT Groups Forum today that might serve as a workaround to prevent this common problem from occurring again.
This would mean that layers could be treated with interfaces... like in Java! Noticed this annoyance last week when I could not just have a MapLayer[] to hold the currently displayed layers.
from gwt-maps-v3-api.
We could put this in a super class and inherit it into the sub classes that use the setMap. I've been doing that with some couchdb jso stuff.
from gwt-maps-v3-api.
By the way, I'm not sure this is working. B/c null isn't getting translated correctly when used.
I think will have to chage it to setMap() with no arguments in the jsni.
public final void setMap(MapWidget mapWidget) {
if (mapWidget == null) {
setMapImpl(null);
} else {
setMapImpl(mapWidget.getJso());
}
}
from gwt-maps-v3-api.
Odd, I had an example in the showcase (local, not committed) where for one of the custom layers I toggled it from setMap(map) and setMap(null) on button click. This made the layer appear and disappear over and over as expected.
Can you detail how I can reproduce that the failure to set null you're experiencing?
from gwt-maps-v3-api.
I think thats happened to me too, but I've had it happen twice and was thinking the same thing. First I think it happened in the Marker. Then recently in another class but I can't recall at the moment.
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
- Loading Map without loadMapApi() HOT 5
- 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.