branflake2267 / GWT-Maps-V3-Api

GWT Maps V3 Javascript Bindings
Other
144 stars 113 forks source link

Suggested Methods and Bugs #123

Closed wikiro closed 11 years ago

wikiro commented 11 years ago
  1. no method "setCenter(lng, zoom)" in class MapWidget
  2. setMap(null) -> two methods in class (conflict) com\google\gwt\maps\client\overlays\Marker.java
  3. Circle - no method "setCenter(lng)"
public void setCenter(LatLng center) {  <--- doesn't work this method
        CircleOptions options = CircleOptions.newInstance();
        options.setFillColor(FILL_COLOR);
        options.setCenter(center);
        options.setStrokeWeight(4);
        options.setStrokeColor(LINE_COLOR);
        options.setRadius(circle.getRadius());
        circle.setOptions(options);       
    }
  1. Polyline - there is no event like "addPolylineLineUpdatedHandler" (when vertex was moved to some place while editing)
branflake2267 commented 11 years ago

Thanks for reporting! I'll get on this asap. :)

branflake2267 commented 11 years ago

For marker instead of using setMap(null) try marker.close() or marker.clear()

Yeah, setMap((MapWidget) null) might be needed. I'll see if there is another option.

wikiro commented 11 years ago

ok. thank you. if i find another bugs i will post here.

twistedpair commented 11 years ago

FYI, since Java needs to know the parameter type for method overloading, the following works as well:

MapWidget widget = null;
myObj.setMap(widget);

Also, some of the proposed methods are not in the Official JS API such as setCenter(lng, zoom). Generally, this project is a wrapper to GWT access to the JS API, so it mirrors the methods available there, rather than adding new ones, unless there is a JS/Java language impedance mismatch.

wikiro commented 11 years ago

twistedpair, why you think so? i think we should add all usefull methods. In version gwt maps api 2 there were a lot of like this

twistedpair commented 11 years ago

@evmx Good point. You are correct that Google has deprecated some functionality from V2. I merely mean that we try to keep up with the official release notes and API so that we know when we're done.

wikiro commented 11 years ago

Polyline - there is no event like "addPolylineLineUpdatedHandler" (when vertex was moved to some place while editing)

how create this event, help me please

branflake2267 commented 11 years ago

Would it be possible to have you start a new issue for that question?

wikiro commented 11 years ago

ok. here is it https://github.com/branflake2267/GWT-Maps-V3-Api/issues/132

branflake2267 commented 11 years ago

I won't add the setCenter(lng, zoom) b/c those methods exists individually and its my goal to follow the js api as close as possible due to time and bandwidth I have. I'm always open to fork and pull request with modifications and would consider the add.

I fixing circle and poloyline has its own issue.

The setMap(null) has method overloading and type designation fixes overloading with null.

Closing this issue b/c the items either exist or have there own issue.