branflake2267 / GWT-Maps-V3-Api

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

OverlayView no setMap(MapWidget map) method #110

Closed ihurst closed 11 years ago

ihurst commented 11 years ago

In v.3.8.1 of this API the OverlayView class had a setMap(MapWidget map) method which I was planning on using to add but more importantly remove custom overlays from the map. This is no longer availble in v.3.9.0-alpha-16 which I believe has more OverlayView support.

How should I go about adding/removing Customer Overlays from my map?

Using the constructor for OverlayView will add the ovelary to the map, but how should I remove it?

Great work on this API.

branflake2267 commented 11 years ago

Hmm, Good question, I'll revisit that and double check.

ihurst commented 11 years ago

Working a lot on Custom overlays at the moment and trying to work out how to incorporate the new Callback mechanism into my architecture.

Would be interested to know why you chose to use/create the OverlayViewMethods class and pass it as a Parameter in the callbacks rather than leaving these methods directly in the OverlayView class.

Once again thanks for all your great work on this, I'm learning alot from this code :)

branflake2267 commented 11 years ago

Good question and I tried. I wasn't able to do it b/c of the prototype has to be instantiated at the beginning. The jso object is available at the end, so you could wrap it with another class and use a set map in that. I'll have to add a setmap.

branflake2267 commented 11 years ago

If you find something that you want in the source, you could link to the source, tweak it and then request a pull so I so I could merge it :)

branflake2267 commented 11 years ago

adding setMap https://github.com/branflake2267/GWT-Maps-V3-Api/pull/112

branflake2267 commented 11 years ago

added setMap to example

branflake2267 commented 11 years ago

Just released v16... https://github.com/branflake2267/GWT-Maps-V3-Api - has this fix