From: Andrew H. <ahh...@gm...> - 2010-02-17 06:18:14
|
Hi Guys, There is a (handy) OpenLayer's class that doesn't appear to be wrapped 'OpenLayers/Util.js': http://trac.openlayers.org/browser/tags/openlayers/release-2.8/lib/OpenLayers/Util.js I'd like to wrapping this with: org.gwtopenmaps.openlayers.client.Util.java and org.gwtopenmaps.openlayers.client.UtilImp.java There's a slight naming overlap with the org.gwtopenmaps.openlayers.client.util package. But is a minor issue. Anyone like to chip in on this one? Trac ticket e.t.c. I need this so I can fix those annoying pink tiles for missing map images. Like this.. OpenLayers.Util.onImageLoadError = function() { this.style.display="none";} This appears to be a singleton (same for us) and I'm not sure if this should 'extends OpenLayersObjectWrapper'. Some advice would be great. Cheers :) --AH |
From: Edwin C. <com...@gm...> - 2010-02-17 13:08:26
|
Hi Andrew, The Util class does indeed contain some handy functions that would be nice to wrap. The Util class should never be instantiated and should only have static methods in my opinion so both a Util and UtilImpl are not strictly necessary, but having both may give more flexibility and clarity than only a Util with static JSNI methods in it. If we mirror OL then Util is in the org.gwtopenmaps.client.openlayers.* namespace and not in org.gwtopenmaps.client.openlayers.util.* Example of usage: Util.extend(x:JSObjectWrapper, y:JSObjectWrapper) in Util: public static JSObjectWrapper extend(JSObjectWrapper destination, JSObjectWrapper source){ JSObject obj = UtilImpl.extend(destination.getJSObject(), source.getJSObject()); return destination.setJSObject(obj); } In UtilImpl public static JSObject extend(JSObject destination, JSObject source)/*-{ return $wnd.OpenLayers.Util.extend(destination, source); }-*/; The example you give is immediately an example for which plain JSNI seems the most appropriate, because you need to create a function that can be pretty broad. You could off course do sth similar as in setFormatOutput of MousePositionOptions, but plain JSNI is more straightfoward: public static void onImageLoadErrorDisplayNone()/*-{ $wnd.Openlayers.Util.onImageLoadError = function() {this.style.display ="none";} }-*/; Such a function could off course be added as a convenience to GWT-OL on the Util object. Greetings, Edwin On 17 February 2010 07:18, Andrew Hughes <ahh...@gm...> wrote: > Hi Guys, > There is a (handy) OpenLayer's class that doesn't appear to be wrapped > 'OpenLayers/Util.js': http://trac.openlayers.org/browser/tags/openlayers/release-2.8/lib/OpenLayers/Util.js > I'd like to wrapping this with: org.gwtopenmaps.openlayers.client.Util.java > and org.gwtopenmaps.openlayers.client.UtilImp.java > There's a slight naming overlap with > the org.gwtopenmaps.openlayers.client.util package. But is a minor issue. > Anyone like to chip in on this one? Trac ticket e.t.c. I need this so I can > fix those annoying pink tiles for missing map images. > Like this.. OpenLayers.Util.onImageLoadError = function() { > this.style.display="none";} > This appears to be a singleton (same for us) and I'm not sure if this should > 'extends OpenLayersObjectWrapper'. Some advice would be great. > Cheers :) > --AH > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Edwin C. <com...@gm...> - 2010-02-18 14:02:08
|
Hi Andrew, A pure GWT port of OpenLayers would be ideal, but that is also a lot more work than wrapping OpenLayers. Wrapping OL is still useful, because without a wrapping OpenLayers is not accessible to the parts of your application that are in GWT. If there were no wrapper library, then everbody would have to write all wrapper code themselves. A lot of hard work has gone into OpenLayers and it would take quite an effort to do a implementation in GWT (like OpenScales for Flex). It would be nice to provide a convenience method for setOnImageLoadErrorDisplayNone(). However, I would favor that on the Map object rather than on the MapWidget. Greetings, Edwin On 18 February 2010 00:15, Andrew Hughes <ahh...@gm...> wrote: > Thanks Edwin :) > I've got quite a bit of catching up to do on gwt-openlayers but hopefully > you can be patient with me :) apologies. > Agree on class/namespace and static method's only. > I don't like all this JSNI JavaScript (I'm guessing you don't either). It > would be so much nicer if this were pure GWT :'( It seems unavoidable. Given > that the implementation is most likely going to be defined in JSNI, then > why bother wrapping it at all? It's no different from doing the following: > public class MyMapWidget extends Composite{ > public MyMapWidget(){ > ...//stuff > MyMapWidget. setOnImageLoadErrorDisplayNone(); > ...//other stuff... > } > public static native void setOnImageLoadErrorDisplayNone()/*-{ > $wnd.Openlayers.Util.onImageLoadError = function(){this.style.display > ="none";} > }-*/; > } > What do you think? > Cheers > --AH > > On Wed, Feb 17, 2010 at 11:15 PM, Edwin Commandeur > <com...@gm...> wrote: >> >> Hi Andrew, >> >> The Util class does indeed contain some handy functions that would be >> nice to wrap. The Util class should never be instantiated and should >> only have static methods in my opinion so both a Util and UtilImpl are >> not strictly necessary, but having both may give more flexibility and >> clarity than only a Util with static JSNI methods in it. >> >> If we mirror OL then Util is in the >> org.gwtopenmaps.client.openlayers.* namespace and not in >> org.gwtopenmaps.client.openlayers.util.* >> >> Example of usage: >> >> Util.extend(x:JSObjectWrapper, y:JSObjectWrapper) >> >> in Util: >> >> public static JSObjectWrapper extend(JSObjectWrapper destination, >> JSObjectWrapper source){ >> JSObject obj = UtilImpl.extend(destination.getJSObject(), >> source.getJSObject()); >> return destination.setJSObject(obj); >> } >> >> In UtilImpl >> >> public static JSObject extend(JSObject destination, JSObject source)/*-{ >> return $wnd.OpenLayers.Util.extend(destination, source); >> }-*/; >> >> The example you give is immediately an example for which plain JSNI >> seems the most appropriate, because you need to create a function that >> can be pretty broad. You could off course do sth similar as in >> setFormatOutput of MousePositionOptions, but plain JSNI is more >> straightfoward: >> >> public static void onImageLoadErrorDisplayNone()/*-{ >> $wnd.Openlayers.Util.onImageLoadError = function() >> {this.style.display ="none";} >> }-*/; >> >> Such a function could off course be added as a convenience to GWT-OL >> on the Util object. >> >> Greetings, >> Edwin >> >> On 17 February 2010 07:18, Andrew Hughes <ahh...@gm...> wrote: >> > Hi Guys, >> > There is a (handy) OpenLayer's class that doesn't appear to be wrapped >> > >> > 'OpenLayers/Util.js': http://trac.openlayers.org/browser/tags/openlayers/release-2.8/lib/OpenLayers/Util.js >> > I'd like to wrapping this >> > with: org.gwtopenmaps.openlayers.client.Util.java >> > and org.gwtopenmaps.openlayers.client.UtilImp.java >> > There's a slight naming overlap with >> > the org.gwtopenmaps.openlayers.client.util package. But is a minor >> > issue. >> > Anyone like to chip in on this one? Trac ticket e.t.c. I need this so I >> > can >> > fix those annoying pink tiles for missing map images. >> > Like this.. OpenLayers.Util.onImageLoadError = function() { >> > this.style.display="none";} >> > This appears to be a singleton (same for us) and I'm not sure if this >> > should >> > 'extends OpenLayersObjectWrapper'. Some advice would be great. >> > Cheers :) >> > --AH >> > >> > ------------------------------------------------------------------------------ >> > SOLARIS 10 is the OS for Data Centers - provides features such as >> > DTrace, >> > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW >> > http://p.sf.net/sfu/solaris-dev2dev >> > _______________________________________________ >> > Gwt-openlayers-users mailing list >> > Gwt...@li... >> > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >> > >> > > > |
From: Dave <dav...@pi...> - 2010-03-25 09:55:02
|
hi List, I am bout to do some more work using openlayers, which version of Openlayers should I actual use ? 2.8(Stable), 2.9 or the latest 2.8 version from source archive with all the latest bug fixes! I am going to be doing some work with the google layers and code reprojection. Dave. |
From: Edwin C. <com...@gm...> - 2010-03-25 13:15:20
|
Hi Dave, GWT-OL is build against OL 2.8. I would tend to go with OL 2.8 (stable) unless you hit upon some bug that is fixed in the latest OL source code (which is 2.9 or 2.9+some extra stuff). OL 2.9 is not officially released, but seems to be almost there. When it comes out GWT-OL will be build against that version. As long as it is still OL 2.x then OL should be backwards compatible. Only in OL 3.x will there be breaking changes according to the info provided by OL. When OL 3.x comes out the development of GWT-OL will possibly need to be split in two branches. Greetings, Edwin On 25 March 2010 10:54, Dave <dav...@pi...> wrote: > hi List, > > I am bout to do some more work using openlayers, which version of > Openlayers should I actual use ? > 2.8(Stable), 2.9 or the latest 2.8 version from source archive with all > the latest bug fixes! > > I am going to be doing some work with the google layers and code > reprojection. > > Dave. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |