UPDATE: This add-on no longer works because Google has deprecated the Google Maps API v2. All users should migrate to the newer version ASAP. More info: https://vaadin.com/forum#!/thread/3802318
Use this thread from now on when discussing the map addon.
I just updated the
Google map addon to version 0.9.2. It includes the following enhancements implemented by Petri Heinonen:
[list]
[]
Added methods for removing a single marker and all markers
[]
Added handler to catch marker move events that fires when a marker has been dragged to a new location. The coordinates are also available at server side from the Marker object. (feature sponsored by Propentus Oy)
[*]
Added handler to catch marker click events, works only if marker has information window content for now.
[/list]Please give it a spin and report any problems on this thread.
I’m afraid that there is no schedule for the missing features, and I don’t know when someone will have the time to work on them. However, if you need the feature quickly, could your company consider sponsoring it? Contact ville.ingman@itmill.com for more information and a quote.
hey henry, where can i download the latest version? I’ve checked the official svn repo but coulndt find it.
do you also knwo that the since today an error about the api key is displayed?
I’ve got an idea, I would like to update a position on the map, initialted by the server (aka server push). is this possible with the current map plugin?
You can find both the ZIP package and source link from the
Directory page for the add-on.
The API key is required to deploy to a production server. If the key is missing a warning message is displayed when the page is loaded, but the map should work just fine. I’m not aware of any recent change to this, and the
live demo seems to work.
If you want to get rid of the message just get a API key for your domain, specify it in the widgetset XML and recompile the widgetset.
I’m afraid Vaadin does not (yet) include a server push mechanism, but you can easily get similar functionality using the
refresher add-on.
I’ve just finished trying your add-on just two minutes ago. For me there is no joy with any of the add-ons, if on GlassFish/Liferay. :unsure: Everything looks as same as in
this post that I’ve made for a while ago with the only difference that I am no more getting pop-up alert, but built-in nag-screen, as follows on the screen-shot below.
And by the way, any support of their usage in NetBeans instead of Eclipse, please? :smug:
But I’m noob with Widgets, so I tried a lot of things to make your component work, but nothing works.
Could you give me a help?
Is there any demo source? Tutorial? Steps?
I’m using eclipse with the vaadin plugin.
thanks.
I have already put the JARs in the WEB-INF/lib. And when I click the button “Compile Vaadin Widgets” I have this message:
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:883)
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.updateWidgetSet(WidgetSetBuilder.java:60)
at com.vaadin.tools.WidgetsetCompiler$1.run(WidgetsetCompiler.java:56)
at java.lang.Thread.run(Thread.java:619)
As there is no widgetset in your project, the widgetset builder tries to create one. This fails due to one of two possible reasons: the source directory is not writable or the widgetset is being created in the wrong directory. Also the web.xml file needs to be writable when creating a widgetset, but according to the stack trace the execution wasn’t that far yet.
If you suspect the latter might be the issue, try moving your main source path first on your classpath and retry.
If all else fails, create a MyWidgetset.gwt.xml with the e.g. contents given below (also an almost empty XML file with just the root “xml” element should work) at the location of your choice within your source tree. Note that any custom widgets you may develop in the future will be in subpackages of that location. Then select the file in Eclipse and click the compile button again. This way, you are explicitly saying where the widgetset is.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<!--
Uncomment the following to compile the widgetset for one browser only.
This can reduce the GWT compilation time significantly when debugging.
The line should be commented out before deployment to production
environments.
Multiple browsers can be specified for GWT 1.7 as a comma separated
list. The supported user agents at the moment of writing were:
ie6,ie8,gecko,gecko1_8,safari,opera
The value gecko is used for Firefox 3 and later, gecko1_8 is for
Firefox 2 and safari is used for webkit based browsers including
Google Chrome.
-->
<!-- <set-property name="user.agent" value="gecko"/> -->
</module>
For a very brief tutorial (which does more or less what you did), see
here .
I could noticed that the gwt.xml file is being created, although the error in the stack trace seems to be in creating it,
there I could see that the INHERITS for the GoogleMap widgetset is not inserted:
“”
I think it couldn’t edit the file, but I took all the precautions you told.
So I decided to try it in new Vaadin project and it has worked fine.
Don’t no why in my main project it doesn’t work, have a clue?
I tried with a lot of new Vaadin Projects, to find out what is the error,
and it seems to get this error when the project package is too big. Like:
br.com.uniblanc.client.vaadin
I tried with uniblanc.vaadin" and it works. Both were new projects. :wacko:
hi everyone!
i’v a interesting problem when i use the marker draggable function:
BasicMarker.setDraggable(boolean);
when i first set marker draggable true ,and then set draggable false, all are correct,but
when i first set marker draggable false, and then set draggable true,the marker cann’t move.i must refresh the browser to get the correct result.
do you meet the problem?or mybe i 'v do something wrong?