Google Maps for Vaadin 7

Umm… Haven’t tried that, but can you open that kind of image urls in your browser? The Google Maps API probably wants a proper http/https URL even if a browser can handle that kind of uris.

Yes, it does open in my browser. So it might be impossible to do then ?

Yup, just tried that and it seems that the maps wants a proper URL for the image. Why don’t you just add the image to your theme?

I have database which contains paths to image files, longitudes and latitudes, that I have to display on the map.

Guess you’ll have to provide the images using a web server - just set up an Apache or something and let it provide the images.

Hi Tapio,
I need use a map that have markers, I need want to open a infoWindow when i click a one of this markers. how i can detect the selected markers.

thinks for help

https://dev.vaadin.com/svn/contrib/GoogleMapWidget/src/org/vaadin/hezamu/googlemapwidget/GoogleMap.java

You can use GoogleMapMarkerClickListeners. There’s an example of using one to upen info windows in
GitHub
.

0.9.0 is out! No new features this time, just bubbling under. I’ve changed the Maps JavaScript API GWT wrapper from
official Maps v3 bindings
to
GWT-Maps-V3-Api
. Reason for this is simple, the official bindings have been in prerelease state for over two years (last release in March 2012) while GWT-Maps-V3-Api is still continously updated (last update a week ago). This should make development easier since there have been some annoying bugs in the official APIs.

Also, the add-on naturally now uses Vaadin 7.2.2.

Please test this new version and report here (or to the issue tracker) if you notice something weird going on. Most things are used similarry in both APIs but there are some minor differences.

Tapio,
This add-on is great, but I need to integrate a few extensions that exist for google maps in a relatively short timeframe.
How hard would it currently be to integrate the “Styled Marker” and/or “Marker With Label” or even “Rich Marker” from
http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries
? What are the major steps that are required?
You mentioned earlier you would make it easier to add extensions to the add-on, how far are you from a releasing those changes?

Alternatively, are there currently any other options for displaying a number in / under / close to the marker, except InfoWindows (those really don’t look so great).

Thanks
Herman

Hi!

Is there a possibility to close all InfoWindows at once? For example when clicking anywhere on the Map.

Hi Tapio,
I installed 0.9.0 and I am using Vaadin 7.2.3.

Everything seems to work normally and markers are shown at the right location.

I get however the warning below
every time
the user moves (i.e. drags) the Map in the Browser.

WARNING: Ignoring RPC call to com.vaadin.tapio.googlemaps.client.GoogleMapMovedRpc.mapMoved in connector com.vaadin.tapio.googlemaps.GoogleMap(153) as no RPC implementation is registered
Jul 13, 2014 7:36:53 AM com.vaadin.server.communication.ServerRpcHandler parseServerRpcInvocation

PS: I added a MapMoveEvent as well just to ensure/check if Map moves Events would be detected , but these are fully ignored.

Any Hints ?

Tx (and again … excellent add on)
Fabio

[quote=Herman Bovens]
How hard would it currently be to integrate the “Styled Marker” and/or “Marker With Label” or even “Rich Marker” from
http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries
? What are the major steps that are required?
You mentioned earlier you would make it easier to add extensions to the add-on, how far are you from a releasing those changes?
[/quote]That looks bit hard with the current architecture of the add-on since it doesn’t follow the internal logic of Google Maps; it tries to ‘Vaadinize’ it. I’ve done some work with the extension support (as can be seen in the Github) but it’s far from being completed mainly because the approach I tried first isn’t really working.

What I’ve been thinking now is that there should be some kind of AbstractGoogleMapExtension (based on the component extension system of Vaadin 7) and after that everything (including stuff that is currently firmly integrated like markers and info windows) would be extensions.

That would make the main class less bloatish and it should be quite easy to implement virtually any feature to the add-on.

But that’s far from being completed and I can’t give you any promises about any release dates since I don’t know when I’ll have time to actually implement the system.

[quote]
Alternatively, are there currently any other options for displaying a number in / under / close to the marker, except InfoWindows (those really don’t look so great).
[/quote]I’m not aware of any alternative approaches.

I’d implement that using a MapClickListener.

[quote=Fabio Trentini]
I get however the warning below
every time
the user moves (i.e. drags) the Map in the Browser.

WARNING: Ignoring RPC call to com.vaadin.tapio.googlemaps.client.GoogleMapMovedRpc.mapMoved in connector com.vaadin.tapio.googlemaps.GoogleMap(153) as no RPC implementation is registered
Jul 13, 2014 7:36:53 AM com.vaadin.server.communication.ServerRpcHandler parseServerRpcInvocation

[/quote]Took a quick look and I can’t find any real reason why that specific RPC would be broken. They’re all initialized in the same way in the same place.

What I’ve done is integrate Google Maps API v3 myself as a pure javascript component, with only direct support for the features I need (such as markers with labels on them and zooming in on a region). This turned out to be quite simple. Except that I’ll now have to integrate each additional needed feature myself, I’m not sure what I’m missing out on by not having it as a GWT-based component.

Great Addon. Very Useful…

Hello Thanks for your effort but. I have an error I can not solve. I get this error

Search took 8ms
Done.
Starting GWT compiler
Aug 14, 2014 11:14:52 PM java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.
Loading inherited module ‘com.example.mapss.widgetset.MapssWidgetset’
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(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:294)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

Can you list the dependency for this great plugin because i get the

Widgetset ‘com.vaadin.DefaultWidgetSet’ does not contain implementation for com.vaadin.tapio.googlemaps.GoogleMap. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.

thanks

This doesn’t sound like you’re missing a dependency. You probably didn’t add a custom widgetset.
You have to add a custom client-side widgetset, define it in your ServletConfiguration annotations or in your web.xml and then compile it.