Heat maps aren’t currently supported but adding them should be easy. Just create a new layer type (GoogleMapHeatmapLayer) and use it like KML layers are used currently. Api reference available
here .
I was wondering what would be best approach to add support for WMS layers (I know kml are supported but unfortunately can’t get thosei n kml format). Example in javascript could be found at http://www.gisdoctor.com/v3/wms_single_complete.html . Is there a way to get a hold of google maps object and add those via javascript in Vaadin?
I’ll add those to the features as enchancement requests to the
issue list . I’ll take a look on those as soon as I have time but if you’ll be able to take a look and implement those before, it would be really great if you would contribute to the project and add them as a pull request. Then also I could take a look on those and probably fix/comment if there’s something implemented in a weird way.
You should be able to create a native method either directly to the widget or to the connector
public native void doWMS(MapWidget map)
/*-{
//apply here your native JS stuff to the widget, just use variable map
}-*/;
If I ever get the extension system ready, I’ll also create an example about JavaScript extensions.
I would like to thank you for the amazing add-on, I’ve been using it a lot and it it is really helpful. Also, I was wondering if there’s support for mark clusterers, or if it is planned for the future. It would be a really useful feature.
Any feature can be added if it’s simple enough, it’s just that I can’t give any promises since I have no idea when I’ll have time to develope the add-on any further.
Anyway, please make an enhancement request to the
issue tracker . If you also add links to the APIs or any other implementation details to the ticket I can promise you that I’ll most likely will take a look on that feature when I have time
I am getting a similar problem and here are the details…
Got eclipse 4.4 and the latest Vaadin plugin. downloaded and added the googlemaps-0.9.0.jar to my project WEB-INF/lib directory and hit ‘compile plugin’ button but getting the following track trace…
can anyone help me please?
Starting GWT compiler
Loading inherited module ‘org.strathfield.tamil.terry.widgetset.TerryWidgetset’
Loading inherited module ‘com.vaadin.tapio.googlemaps.Widgetset’
[ERROR]
Line 3: Unexpected exception while processing element ‘inherits’
java.lang.NullPointerException
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:324)
at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:502)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
.
.
.
.
If you’re not using automatic dependency management (as it seems), have you copied manually the GWT API jar to your project? From the infos of the add-on:
Hi Tapio!
Thank you for this very useful add-on! It works fine!
My question:
For me it would be important to handle events on the polyline. Do you have some suggestions for extending the add-on for this case?
Javascript Workaround:
Try to call the Google Maps Javascript API “isLocationOnEdge(point:LatLng, poly:Polygon|Polyline, tolerance?:number)” where “point” is the current lat/lng mouse position.
I’ve tried to use the Javascript code directly within the init() method of MyProjectUI class:
com.vaadin.ui.JavaScript.eval("function initialize(){var myPosition = new google.maps.LatLng(43.0, -125.9, 10e-7); ... }")
…but I received the error: “google is not defined”.
Well, I also tried to insert the annotation “@JavaScript”
@Theme("myproject")
@JavaScript({"https://maps.googleapis.com/maps/api/js?key=MY_API_KEY"})
public class MyProjectUI extends UI {
.....
}
…but I received the error below from “my.package.web.widgetset.MyProjectWidgetset-0.js:10185”
SEVERE: (TypeError) : undefined is not a functioncom.google.gwt.core.client.JavaScriptException: (TypeError) : undefined is not a function