DotMap Addon Issues

Hi,
Thanks to Marc for putting the sources and a highlight with code samples, following my rating on the Addon page. I’m still running into problems getting even the DotMap demo App running.

I’ve done the following:

  • Downloaded the dotmap.jar
  • copied the themes info from the SVN site into my VAADIN themes directory
  • Recompiled my client side scripts
  • Copied the DotmapApp demo source and configured my web.xml

I’m now stuck. I’ve done all that appears necessary to get the DotMap demo and the addon itself working, but I’m getting zip! :frowning:

If I leave the demo app as is, I get a white blank page, If I comment out the “addComponent(map);” line, I get the normal Vaadin grey background, but no other components show. I’ve even added a test label to see if that shows, and it doesn’t. I’ve used the DotmapApp source “as is” other than adding the Label.

I like the abstract representation of the map and would really much rather not use this, over the other mapping plugins for my application.

Any pointers or hellp would be much appreciated.
Regards,
Anthony

Made some progress. Downloading all the source from the SVN site, I’ve got the DotmapApp running. But still cannot include the DotMap in another project. I’ve even removed the JAR and copied all the source from the working project into the other project.

Still no dice. there are no error messages in the Console, so any suggestions would be welcome as to what I am doing wrong.
Thanks in advance.
Anthony

Finally figured out the problem.

The main issue seemed to be that the “dotmap.gif” is
not being loaded
from the DotMap jar file. You need to explicitly tell it to load the image. I’ve put the images needed in my theme image directory.

The code below now works:


      DotMap map = new DotMap() ;
      map.setWidth ("750px") ;
      map.setHeight ("578px") ;
      map.setDotColor("white") ;
      map.setTopCrop (87) ;   // Based on the settings in the demo application.
      map.setMapImage(new ThemeResource ("images/dotmap/dotmap.gif")) ;
      map.setHighlightImage(new ThemeResource("images/dotmap/blue.png"));
      ...

For those unfamiliar with the whole theme thing, create a
VAADIN
directory in your WebContent (
or whatever name you gave it
) directory. In there create a theme
see the tutorial
for instructions. create an
images
sub-directory within your theme. Copy the relevant images in there.

Hi,

I have just published a new version that should work “out of the box” without explicitly loading the map and highlight images. Thanks for reporting!
The only other thing I fixed was a cut&paste -type bug that I noticed while I was at it.

Have you found any other issues?

Otherwise the plan is to start working on the Vaadin 7 version - well, actually it’s already working, so I can start thinking about making it better with the new features in 7 :slight_smile:

Best Regards,
Marc

Hi Marc,
Sorry for the (very) delayed reply. No other issues, but I was only prototyping an application which the client later abandoned, so I did not get a chance to really get my teeth into it
Thanks,
Anthony