Comments (17)
This appears to be a defect. This will be rectified shortly and we'll update this Issue. Thanks for reporting this.
from gwt-maps-v3-api.
Fixed this partially in 3826880.
Noticed 3 OverlayView methods are not implemented by GMaps at all, but you need to implement then as prototypes in your JSO.
We need to add either handlers or a Callback wrapper so the users can set their own implementations for
OverlayView.draw()
OverlayView.onAdd()
OverlayView.onRemove()
I added tests for them in the spirit of TDD that will pass once we've got this in their.
Also, the following two methods fail in GWTTestCase. I don't know whey since the other two work fine. This needs further investigation.
MapCanvasProjection.fromContainerPixelToLatLng()
MapCanvasProjection.fromLatLngToDivPixel()
from gwt-maps-v3-api.
Nice. I can help take a look next week. I aim to get some more time in at working on some of these issues too. :)
from gwt-maps-v3-api.
Worth looking at how the autogenerated code did this....however, they did not do OverlayView. You can see their Overlay Solution.
from gwt-maps-v3-api.
That link didnt work. It looks like it points at our overlay.
from gwt-maps-v3-api.
Looking at OverlayView.onAdd() in more detail, I see that method in the master, are you thinking that should be different, or did you add those?
from gwt-maps-v3-api.
Oh I see, those functions are closures. Yeah, I see what we need to add. I think I wrote some callbacks like that in street view or somewhere else. I can't remember.
from gwt-maps-v3-api.
Saving this example to look at later: http://james.lin.net.nz/2012/05/24/google-map-v3-overlayview-code-sample/
from gwt-maps-v3-api.
Another handy example we could use for testing: http://blog.mridey.com/2009/09/label-overlay-example-for-google-maps.html
from gwt-maps-v3-api.
Brandon, see the Official Google OverlayView example.
Also, fixed that link to the overlay code in the generated project's Overlay code..
I'm just not sure if this won't cause a problem since it is an expected prototype, not just a callback. Would something like the following work?
public final void setOnAddCallback( Callback callback ) /*-{
this.onAddCallback = callback;
setOnAddCallbackImpl();
)-*/
public final native void setOnAddCallbackImpl() /*-{
this.prototype.onAdd = @this.onAddImpl()();
)-*/
private void onAddImpl() {
this.onAddCallback.run();
}
(pseudocode, too late to lookup the JNI syntax)
from gwt-maps-v3-api.
I'm not sure, I haven't done that way. I like to use a handler interface with the callback method. I use an anonymous function for this.onAdd() = anon func and then I use that function to call the interface handler method. But that might not be the best way, I'm just pulling off what I usually do.
from gwt-maps-v3-api.
My concern is why this is the only case of the Maps API specifying an interface rather than an implementation or callback. Perhaps these functions needed a higher performance? In that case, allowing the users to set a callback and then defining the function with it might be more inline with the original Maps API architecture.
from gwt-maps-v3-api.
Currently 5 (intentionally) failing tests due to this. Will try to finalize the callback handlers tonight so they pass.
from gwt-maps-v3-api.
Let me know if you need a hand on the handlers :)
from gwt-maps-v3-api.
I've started on the overlay view.
- created a ground overlay example
- working on a custom overlay example
- working on the proto in OverlayView
from gwt-maps-v3-api.
We already have a demo. You can add to that. See the moon/mars showcase demo.
from gwt-maps-v3-api.
Good point. I'll use it for testing then merge it into the other when I'm done. :)
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.