|
#1
|
|||
|
|||
|
I was wondering if anyone has done a SmartGWT wrapper for OpenLayers mapping service.
Even better would be something like Mapstraction from GWT-Ext. Does SmartClient have any plans in this area? Thanks. |
|
#2
|
|||
|
|||
|
There is one project gwt-openlayers at http://sourceforge.net/projects/gwt-openlayers. I'm use it inside smartGWT's widgets. This is (still partial) wrap opelayer's javascript API and with my patch openstreet API also.
Use from CVS. Just (from 11.00 to 19.00 by Moscow) you can look example of using gwt-openlayers with openstreetmap at my book here: http://gwt.stkurier.ru/site.Site/Site.html#map Last edited by gev : 26th Feb 2009 at 01:03. |
|
#3
|
|||
|
|||
|
I have not used straight GWT components with SmartGWT. Since openlayer-gwt is straight GWT project I am wondering if there are any special tricks I need to be aware of. Thanks for sharing.
|
|
#4
|
|||
|
|||
|
Here is what I have learned...
There is an error I encounter at the end and would be grateful if gev or someone else could help me understand the cause of that. Is there someplace I can read how to integrate GWT widgets with SmartGWT. The gwt-integration sample does not provide any details. I needed to use latest CVS bits because released version does not support GWT 1.5.x. Note I also had to modify the pom.xml file with following patch: Code:
I tried the following for integrating the latest CVS bits of openlayers_gwt in my maven project. Added following to my pom: [code] <dependency> <groupId>com.eg.gwt.openLayers</groupId> <artifactId>openlayers_gwt</artifactId> <version>0.3.1-SNAPSHOT</version> </dependency> [/CODE Added following to my Application.gwt.xml module decsriptor: Code:
I then coded the following Canvas sub-class that creates a MapWidget as its child per tutorial here: Code:
I then get the following error when I run the app in GWT shell. Code:
Thanks for any tips on how to fix above error. Last edited by farrukh_najmi : 26th Feb 2009 at 08:15. |
|
#5
|
|||
|
|||
|
Hi,
I added the FileUpload widget from GWT to my smartGWT app. All I did was added the GWT widget as a member to existing smartGWT vStack. What I find difficult to understand is that it works fine in Chrome but doesnt show up in Firefox. I faced similar issues previously too with firefox nt displaying some smartgwt functionality and never found a way around it. Hope this helps. Cheers! |
|
#6
|
|||
|
|||
|
farrukh_najmi, had you added in your aplicationt's gwt module html openlayer/openstreetmap's script?
|
|
#7
|
|||
|
|||
|
Aah! That must be the problem. Thanks gev.
It appears that gwt-openlayers does not automatically include OpenLayers.js. Could this not be fixed in the pom.xml for gwt-openlayers? I would be glad to help. What list can I post to about that project? gev, do you know where I can find pom/jar for openlayers for maven projects? Thanks again for your help. |
|
#8
|
|||
|
|||
|
I'm don't use maven and not is specialist in the ant/maven, sorry (only use them for build projects). For gwt-oprnlayers use ant.
|
|
#9
|
|||
|
|||
|
Adding the following in my Application.html file just before the close of body tag worked:
Code:
Now I have one last question which is specific to using OpenLayers with SmartGWT. The following code from the tutorial needs to be fixed for SmartGWT not using RootPanel: Code:
Can you please tell me what to replace it with. At present I am getting NPE. Thanks very much for all your help. |
|
#10
|
|||
|
|||
|
The fix to my last problem was to use no arg constructors as follows:
Code:
I am all set now but for the questions: What is the correct mailing list /forum for gwt-openlayers project. Thanks again. |