GWT OpenLayers new website and showcase

1,937 views
Skip to first unread message

Frank

unread,
Aug 2, 2012, 2:41:26 PM8/2/12
to google-we...@googlegroups.com
Just a quick note that we put some work in the website, and especially in a new showcase for GWT-Openlayers (a GWT wrapper for the great OpenLayers library) :


Feel free to make use of this library in your projects :-)

Giuseppe La Scaleia

unread,
Aug 2, 2012, 3:19:14 PM8/2/12
to google-we...@googlegroups.com, google-we...@googlegroups.com
Cool

Inviato da iPhone
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/wZdTFunOsL8J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Rob

unread,
Aug 3, 2012, 7:18:13 PM8/3/12
to google-we...@googlegroups.com
Awesome, nice demos.

Frank

unread,
Oct 30, 2012, 2:45:26 PM10/30/12
to google-we...@googlegroups.com
You can check out our IRC channel 

Or just ask your questions in this thread.

Op dinsdag 30 oktober 2012 09:48:56 UTC+1 schreef Asimov het volgende:
Hi Frank,

I have been using the demo project and they have been a great help! Still I have some questions. Do you know what is the best place to ask for help on using gwt-openlayers?

Op donderdag 2 augustus 2012 20:41:26 UTC+2 schreef Frank het volgende:

Asimov

unread,
Oct 30, 2012, 4:16:33 PM10/30/12
to google-we...@googlegroups.com
I am trying to read in several kml features in a VectorLayer. The kml features are shown as a small dot at an totally wrong position on the map. In short I have done as follows:

(... create a map with some google maps v3 layers ...)

shapeLayer = new Vector("ShapeLayer");
map.addLayer(tpmShapeLayer);

String shapeData = "<string with valid kml>";
KML kml = new KML();
VectorFeature[] vfa = kml.read(shapeData);
VectorFeature vf = vfa[0];
shapeLayer.addFeature(vf);

As said the feature is not shown correct, I can see something is added on the layer, but it is far to small and at the wrong position. I think I have to transform the kml feature to the maps projection but don't know how to do that with gwt-openlayers. I have seen the FormatOptions class but how do I use this class?

Thanks!

Asimov

unread,
Oct 31, 2012, 9:59:09 AM10/31/12
to google-we...@googlegroups.com
I just saw this ticket: 
Add transform(source, destination) to Geometry  http://sourceforge.net/apps/trac/gwt-openlayers/ticket/19

That might be the sollution, what do you think?  I will try tonight.

Op dinsdag 30 oktober 2012 21:16:33 UTC+1 schreef Asimov het volgende:

Frank

unread,
Nov 7, 2012, 4:48:34 AM11/7/12
to google-we...@googlegroups.com
Maybe VectorOptions.setProjection(String projection)  can help you out ?

This guy had the same problem in normal OL and solved it using that method : http://stackoverflow.com/questions/1671293/openlayers-google-maps-projection-problem-w-kml

I am guessing you need to set it to the Google projection (being GOOGLE in hacker-script thus ESG:900913)

You can also have look at our KML example, but this does nothing with projection stuff though : http://demo.gwt-openlayers.org/gwt_ol_showcase/GwtOpenLayersShowcase.html?example=KML%20example

Frank

Op dinsdag 30 oktober 2012 21:16:33 UTC+1 schreef Asimov het volgende:

Frank

unread,
Nov 7, 2012, 4:49:08 AM11/7/12
to google-we...@googlegroups.com
ESG:900913 should be EPSG:900913

Thomas Holmes

unread,
Dec 17, 2012, 3:26:27 PM12/17/12
to google-we...@googlegroups.com
I'm not a bitbucket user, but I am trying to get the source code for the showcase, and I don't know how I can download the showcase code.

There are a handful of great examples, and I'd like to incorporate some of that into an app I am working on.

When I get the selectfeatureexample, it seems incomplete, I don't have the contentPanel and I don't have the AbstractExample class.
I also get a nasty error with the way some of the code is written:  
      rbDrawPoint.addValueChangeHandler(new ValueChangeHandler<,Boolean>() {
            public void onValueChange(ValueChangeEvent<,Boolean> event) {
                activateControls();
            }
        });

I did try the demo, and I think there might have been some bugs with this example, but not 100% sure.

One of the other things I'd like to do is save my point, line or polygon to my database which is MySQL right now.
Can I do this?   Is there an example on how to do this?  

I am sure I will have a lot more questions about this later on as well.

FYI ... I usually like to create SmartGWT 2.5 projects, with Hibernate/JPA, and Spring 3.1, with GWT-RPC.
I am moving away from GWT-RPC, and will be doing web-services soon.

Thanks for any help in advance!!!!

Frank

unread,
Dec 18, 2012, 1:37:48 AM12/18/12
to google-we...@googlegroups.com
The easiest way to download is to go to https://bitbucket.org/gwtopenlayers/gwt-openlayers and click on the download link (in the bottom of the square at the right).
Then just unzip the download and open readme.txt to see how to run the showcase.

You don't need to have the contentPanel or the AbstractExample class. These are just part of the complete example framework but not needed if you want to duplicate a single example.
Instead of the contentPanel just create a panel that you add to your RootPanel. And remove the extends AbstractExample.

Saving to a DB can be done using WFS-T. For this you will need to setup a WFS-T compliant server and configure your database in this server. I always use geoserver for this.

We have no example in which you can actually save data to the server. But for example this example http://demo.gwt-openlayers.org/gwt_ol_showcase/GwtOpenLayersShowcase.html?example=WMS%20with%20an%20editable%20WFS%20overlay has the code you need to add to save data in comment.

According to me the http://demo.gwt-openlayers.org/gwt_ol_showcase/GwtOpenLayersShowcase.html?example=WFS%20Select%20Feature%20Control%20Examples is working but sometimes very slow (I think due to slow server). I also empties all attributes if I remember correclty, that is why you don't see any attributes.

Frank





Op maandag 17 december 2012 21:26:27 UTC+1 schreef Thomas Holmes het volgende:
Reply all
Reply to author
Forward
0 new messages