Accessing OpenStreetMapLayer and googleStreetMaplayer using openlayers

I am using openlayers wrapper version 0.9.2-SNAPSHOT with vaadin 6.7.3. I compiled the openlayers-wrapper-0.9.2-SNAPSHOT.jar file with vaadin 6.7.3 jar to get the widgetset directory and gwt.xml file in eclipse. The generated gwt uses hosted script like this

I copied the widgetset directory and the gwt.xml to my vaadin application and to liferay’s vaadin folder.
But when i tried to access OpenStreetMaplayer and GoogleStreetMapLayer in my code and add them to OpenlayersMap as base layers, the map is empty. As the gwt uses the hosted script, so i think it should use the required OpenStreetMap.js and google script from hosted site , so i dont need to mention the url’s in the gwt.xml file.

Can somebody pls tell me why the OpenStreetmap and googlestreetmap is empty? How to get them?



There are many ways to do that but you can for example use GWT to load the third party javascripts like in this example:

With latest version of the add-on you shouldn’t need third party script for OSM layers.


Now, i added the scripts manually to gwt.xml file and my gwt looks like this now.

<?xml version="1.0" encoding="UTF-8"?>

I have kept my gwt.xml file under source folder under a package with name “com.example.openlayersproject.widgetset.OpenlayersprojectWidgetset” and my java code to create OpenLayersmap and other base layers like OSM and GSM layer is under package “”.

Still the code is not able to use the scripts mentioned in the gwt.xml file. When i see the JS files downloaded from internet (using firebug) when i browse my application in firefox, then i can see only helpers.js and OpenLayers.js is downloaded. I cant see the scripts mentioned in the gwt.xml file getting downloaded.

Am i missing any other settings like is the gwt in correct place to be read by application? Please help me regarding this issue.

The latest version of addon i.e openlayers-wrapper-1.0.0 uses what version of vaadin and gwt ? Is it compatible with vaadin 6.7.3 and gwt 2.3.0 which I am using in my project or do i need to upgrade to newer version of vaadin? As you have mentioned the latest version of addon doesnot need third party script for OSM layers. So only copying the widgetset under VADDIN/widgetsets directory will make it work ?