OpenLayers Wrapper and intranet GIS solutions

Suitable for the OpenLayers Wrapper, whether intranet GIS solutions to its default configuration? :dry:
Revealed the following -
12041.png

In all likelihood, have to make changes in the wrapper? Apache License 2.0, seems to allow it … Perhaps there are alternative ways to solve this problem?
I would be grateful for the information!:smiley:

Cheers,
Thx

…and yes, of course, i welcome! :smiley:

Many *. gwt.xml contain external links, as well as the script itself OpenLayers.js also includes treatment in the Internet, for example -


OpenLayers.js


...
namespaces: {
	gml: "http://www.opengis.net/gml",
	xlink: "http://www.w3.org/1999/xlink",
	xsi: "http://www.w3.org/2001/XMLSchema-instance",
	wfs: "http://www.opengis.net/wfs"
}

...

…etc.

How to adapt the wrapper for use in an intranet?

It’ll do a version-script from the
org.vaadin.vol.demo
package?
Does anyone know? :smiley:

Matti Tahvonen, we need your help :vader:

Hi,

I use the openlayers wrapper with a locally hosted Openlayers.js file. You have to add the following to your widgetset config (same as in the demo):


  <inherits name="org.vaadin.vol.VolWidgetset" />

  <!-- self-hosted version of openlayers.js -->
  <script src="OpenLayers.js" />

Do not forget to put the OpenLayers.js into the public directory.
As vaadin will try to update your widgetset automatically (use the default VolWidgetsetWithHostedScript insted), you have to add also this to your widgetset:


  <!-- WS Compiler: manually edited -->

Thanks Thomas, an A grade answer!

cheers,
matti

I welcome you, Thomas Neidhart! I welcome you, Matti Tahvonen!

Thank you very much for your reply! :smiley:

But, I did everything you described, rebuilt the wrapper and got the following -


Widgetset does not contain implementation for org.vaadin.vol.OpenLayersMap. Check its @ClientWidget 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. Unrendered UIDL:

…and then -

[b]
org.vaadin.vol.OpenLayersMap(NO CLIENT IMPLEMENTATION FOUND) id=PID45 height=100.0% width=100.0% immediate=true projection=EPSG:4087 clon=100.6513 clat=55.69964 zoom=3 componentsPainted=true controls={0:LayerSwitcher,1:MousePosition, 2 : PanZoom,3:Navigation,4:Attribution,5:ArgParser, 6 : OverviewMap,7:TouchNavigation,8:ScaleLine,}

org.vaadin.vol.WebMapServiceLayer(NO CLIENT IMPLEMENTATION FOUND) id=PID46 uri=http://10.144.18.102:8082/geoserver/wms?service=wms type=wms layers=MapRZD display= isBaseLayer=true opacity=1 featureid= format=image/png transparent=true cqlFilter=

[/b]

With what may be the reason?

VolWidgetsetWithHostedScript.gwt.xml -


<?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>
<!-- WS Compiler: manually edited -->
<!--  USE THIS IF YOU WANT TO USE THE HOSTED OL API -->

<inherits name="org.vaadin.vol.VolWidgetset" />
	
<script src="OpenLayers.js"></script>
	
<!-- <set-property name="user.agent" value="gecko"/> -->

</module>

VolWidgetset.gwt.xml -



<?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>
	<!-- WS Compiler: manually edited -->
	<!--  USE THIS IF YOU DON'T WANT TO USE THE HOSTED OL API -->
	<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
	<script src="helpers.js"></script>

</module>

My application *.gwt.xml contains -



<?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>
<!-- WS Compiler: manually edited -->
	 
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<inherits name="org.vaadin.vol.VolWidgetsetWithHostedScript" />

</module>

If necessary, rebuild the wrapper? Folder “public” - meaning one that is in the package
org.vaadin.vol
?

All I knew…

Many thanks to all! :smiley:
12043.png

The code snippet I provided should be put into your own application widgetset. You should not update the widgetset from the openlayers addon.
The public directory is relative to the location of your application *.gwt.xml.

So your *.gwt.xml file should look like this:



<?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>
<!-- WS Compiler: manually edited -->
	 
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<inherits name="org.vaadin.vol.VolWidgetset" />

<script src="OpenLayers.js"/>

</module>

@matti: thanks to you for providing this addon :wink:

Yes, I had to guess a little later. :smiley:

Since the
VolWidgetset.gwt.xml
already contains an inclusion -


...
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
...

, my
*.gwt.xml
looks like this -


<?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>
	<!-- WS Compiler: manually edited -->	 
	
	<inherits name="org.vaadin.vol.VolWidgetset" />  	
	
	<!-- self-hosted version of openlayers.js -->  
	<script src="OpenLayers.js" />
</module>

After downloading the images and styles, all works fine!:smiley:
Thank you very much for your help!

Cheers,
Thx