From: Farrukh N. <fa...@we...> - 2009-03-21 20:15:25
Attachments:
OptionsBase-patch.txt
|
I could not use the mapOptions.setAttribute calls as they were protected not public. Is there a good reason for not making them public or is it just an oversight? Attached is a suggested patch to make the methods public. Please let me know if it makes sense to commit it. Thanks. Curtis Jensen wrote: > zIndexes are how CSS defines what div blocks appear on top of > overlapping div blocks. It's the normal concept of 3D space > coordinates, where the z axis is perpendicular to the screen. The > highest zIndex will be on top. I'm not expert either, this is the > basics of what I know. > > It's isn't difficult to change the default zIndexes of OpenLayers (but > is was difficult for me figure it out). It is very likely that > someone else knows a better way. In my case, I was actually trying to > make the map go lower in the z ordering. You may want yours to go > higher. I used FireBug (Firefox plugin) to find the zIndex of the > objects that were conflicting with my map. It took me a little while > to find where OpenLayers was setting it's z indexes. They have a set > of base indexes, and then build from there. If you over write the > defaults, you can modify the z ordering of OpenLayers objects. > > This is the code I used: > > // OpenLayers default Z bases are 1000, 250, 750, 2000 > private native JSObject getLowerMapZBase() /*-{ > return { BaseLayer: -1000, Overlay: -750, Popup: -500, Control: 0 }; > }-*/; > > MapOptions mapOptions = new MapOptions(); > mapOptions.setAttribute("Z_INDEX_BASE", getLowerMapZBase()); > > > -- Regards, Farrukh Web: http://www.wellfleetsoftware.com |
From: Farrukh N. <fa...@we...> - 2009-03-23 12:26:05
|
Edwin Commandeur wrote: > Hi Farrukh, > > MapOptions extends OptionsBase, which intentionally hides the > setAttribute methods for non-children (see the Javadoc on > OptionsBase). The idea behind this is that XxxOptions objects should > only have setters for options that can actually be set on them. Also > the setAttribute methods clutter the code suggestions by the IDE for > the available setters (another option to prevent code suggestion > clutter would be to have a IMapOptions interface with limited setters > and let that be extended by a MapOptions class that extends Options). > > If it makes sense to support setting the Z-Index I would argue that > there should be a public setZIndex method, but if others feel that it > makes more sense to expose the setAttribute methods than we should > consider making all classes that extend OptionsBase extend Options > instead (as in GWT-OL 0.2). > Hi Edwin, I agree with your rationale. +1 on adding setZIndex(int zIndex) and getZIndex() methods. I think it would be better if you could do it as you are more familiar with code base. Please let me know if I can help. When its committed I will test it out. Thanks. -- Regards, Farrukh Web: http://www.wellfleetsoftware.com |
From: Farrukh N. <fa...@we...> - 2009-03-23 12:27:49
|
Farrukh Najmi wrote: > Edwin Commandeur wrote: > >> Hi Farrukh, >> >> MapOptions extends OptionsBase, which intentionally hides the >> setAttribute methods for non-children (see the Javadoc on >> OptionsBase). The idea behind this is that XxxOptions objects should >> only have setters for options that can actually be set on them. Also >> the setAttribute methods clutter the code suggestions by the IDE for >> the available setters (another option to prevent code suggestion >> clutter would be to have a IMapOptions interface with limited setters >> and let that be extended by a MapOptions class that extends Options). >> >> If it makes sense to support setting the Z-Index I would argue that >> there should be a public setZIndex method, but if others feel that it >> makes more sense to expose the setAttribute methods than we should >> consider making all classes that extend OptionsBase extend Options >> instead (as in GWT-OL 0.2). >> >> > > Hi Edwin, > > I agree with your rationale. > > +1 on adding setZIndex(int zIndex) and getZIndex() methods. > > I think it would be better if you could do it as you are more familiar > with code base. > > Please let me know if I can help. When its committed I will test it out. > Thanks. > > Actually, perhaps the methods should be get/setZIndexBase() since they wouldset the base for a set of zindexes. -- Regards, Farrukh Web: http://www.wellfleetsoftware.com |
From: Edwin C. <com...@gm...> - 2009-03-23 13:06:07
|
Hi Farrukh, I will be adding the getter and setter for setZIndexBase(). It does bug me a bit that the options objects don't have a setProperty method for advanced users who want to set properties not yet supported by the API. I will try to come up with a single method that allows setting properties of multiple types. At present I am thinking of sth like: setProperty(String name, PropertyValue value) Where PropertyValue can be of different types. Greetings, Edwin 2009/3/23 Farrukh Najmi <fa...@we...> > Farrukh Najmi wrote: > >> Edwin Commandeur wrote: >> >> >>> Hi Farrukh, >>> >>> MapOptions extends OptionsBase, which intentionally hides the >>> setAttribute methods for non-children (see the Javadoc on OptionsBase). The >>> idea behind this is that XxxOptions objects should only have setters for >>> options that can actually be set on them. Also the setAttribute methods >>> clutter the code suggestions by the IDE for the available setters (another >>> option to prevent code suggestion clutter would be to have a IMapOptions >>> interface with limited setters and let that be extended by a MapOptions >>> class that extends Options). >>> >>> If it makes sense to support setting the Z-Index I would argue that there >>> should be a public setZIndex method, but if others feel that it makes more >>> sense to expose the setAttribute methods than we should consider making all >>> classes that extend OptionsBase extend Options instead (as in GWT-OL 0.2). >>> >>> >>> >> >> Hi Edwin, >> >> I agree with your rationale. >> >> +1 on adding setZIndex(int zIndex) and getZIndex() methods. >> >> I think it would be better if you could do it as you are more familiar >> with code base. >> >> Please let me know if I can help. When its committed I will test it out. >> Thanks. >> >> >> > Actually, perhaps the methods should be get/setZIndexBase() since they > wouldset the base for a set of zindexes. > > > -- > Regards, > Farrukh > > Web: http://www.wellfleetsoftware.com > > > |
From: Edwin C. <com...@gm...> - 2009-03-23 16:33:50
|
Hi Curtis, I haven't been at my laptop that is set up for programming, but I saw from the CVS that you did not commit the modifications to the CVS. It is confusing in the current situation as there is an Options object and an OptionsBase object. The latter I have introduced to hide setAttribute methods for specific Options objects. I will think about how we can make this less confusing and make the Options objects more powerful. The simplest possibility is to remove OptionsBase and let Options objects extend Options. Are you using GWT-OpenLayers with plain GWT widgets? I am using GWT-OpenLayers with plain GWT widgets for the showcase and with Ext-GWT for several applications but I have never experience the Z-Index problem you are describing. The MapWidget is very minimalistic. It only creates a div which OpenLayers can use to put the map in. The MapWidget itself does not do anything with z-indexes of that div, that is all OpenLayers. Possibly the problem is also solved if you create a div within the Panel you are using and let the MapWidget use that div. Currently this is not possible, but there is some commented out code in MapWidget that you can uncomment to test if this works in principle. Greetings, Edwin P.S. 2009/3/23 Curtis Jensen <cur...@gm...> > Hello, > > Sorry I haven't jumped in earlier. Me and the family got sick (I > still am). I hate winter. > > I had forgotten that I did modify the source to expose the the > setAttribute methods. > > Yes, it would be nice for me to have a setZIndexBase method. I kinda > would like the setAttribute method exposed too for the advanced needs. > If something comes up other than ZIndex or if ZIndex accessors are > never added, how else would we set the properties that aren't > explicitly in the API? > > Does anyone else have a problem with the OpenLayers map being hid by > other widgets? Or the map hiding other widgets? > If I create a popup panel, the map will be above the popup panel and I > can't see the popup. This only happens in Firefox. IE puts the popup > on top of the map. After looking at the zIndexes of the widgets, I > think that the map should cover the popup panel. Even though I want > the popup on top, it is incorrect to render it on top. > > -- > Curtis > > > > On Mon, Mar 23, 2009 at 6:05 AM, Edwin Commandeur > <com...@gm...> wrote: > > Hi Farrukh, > > > > I will be adding the getter and setter for setZIndexBase(). > > > > It does bug me a bit that the options objects don't have a setProperty > > method for advanced users who want to set properties not yet supported by > > the API. I will try to come up with a single method that allows setting > > properties of multiple types. At present I am thinking of sth like: > > > > setProperty(String name, PropertyValue value) > > > > Where PropertyValue can be of different types. > > > > Greetings, > > Edwin > > > > 2009/3/23 Farrukh Najmi <fa...@we...> > >> > >> Farrukh Najmi wrote: > >>> > >>> Edwin Commandeur wrote: > >>> > >>>> > >>>> Hi Farrukh, > >>>> > >>>> MapOptions extends OptionsBase, which intentionally hides the > >>>> setAttribute methods for non-children (see the Javadoc on > OptionsBase). The > >>>> idea behind this is that XxxOptions objects should only have setters > for > >>>> options that can actually be set on them. Also the setAttribute > methods > >>>> clutter the code suggestions by the IDE for the available setters > (another > >>>> option to prevent code suggestion clutter would be to have a > IMapOptions > >>>> interface with limited setters and let that be extended by a > MapOptions > >>>> class that extends Options). > >>>> > >>>> If it makes sense to support setting the Z-Index I would argue that > >>>> there should be a public setZIndex method, but if others feel that it > makes > >>>> more sense to expose the setAttribute methods than we should consider > making > >>>> all classes that extend OptionsBase extend Options instead (as in > GWT-OL > >>>> 0.2). > >>>> > >>>> > >>> > >>> Hi Edwin, > >>> > >>> I agree with your rationale. > >>> > >>> +1 on adding setZIndex(int zIndex) and getZIndex() methods. > >>> > >>> I think it would be better if you could do it as you are more familiar > >>> with code base. > >>> > >>> Please let me know if I can help. When its committed I will test it > out. > >>> Thanks. > >>> > >>> > >> > >> Actually, perhaps the methods should be get/setZIndexBase() since they > >> wouldset the base for a set of zindexes. > >> > >> -- > >> Regards, > >> Farrukh > >> > >> Web: http://www.wellfleetsoftware.com > >> > >> > > > > > > > ------------------------------------------------------------------------------ > > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > > easily build your RIAs with Flex Builder, the Eclipse(TM)based > development > > software that enables intelligent coding and step-through debugging. > > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > > _______________________________________________ > > Gwt-openlayers-devl mailing list > > Gwt...@li... > > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-devl > > > > > |
From: Curtis J. <cu...@th...> - 2009-03-23 18:01:29
|
Below is an example of a popup (DialogBox) being hidden by the map. With this code every thing looks fine in Hosted mode and IE. When the page is loaded with Firefox and you drag the dialog box over the map, the map will be on top. Or if the page loads with the dialog already overlapping with the map, I don't see the dialog at all. private Widget getMapWidget() { MapOptions mapOptions = new MapOptions(); mapOptions.setControls(new JObjectArray(new JSObject[] {})); mapOptions.setNumZoomLevels(16); mapOptions.setProjection("EPSG:4326"); MapWidget mapWidget = new MapWidget("400px", "400px", mapOptions); Map map = mapWidget.getMap(); WMSParams wmsParams = new WMSParams(); wmsParams.setLayers("landsat7"); WMS wmsLayer = new WMS("WMS Layer", "http://t1.hypercube.telascience.org/cgi-bin/landsat7", wmsParams); map.addLayers(new Layer[] {wmsLayer}); map.addControl(new PanZoomBar()); map.addControl(new MouseToolbar()); LonLat center = new LonLat(-73.99, 40.73); map.setCenter(center, 13); return mapWidget; } public void onModuleLoad() { VerticalPanel mainPanel = new VerticalPanel(); mainPanel.setSize("100%", "100%"); mainPanel.add(getMapWidget()); RootPanel.get().add(mainPanel); DialogBox simplePopup = new DialogBox(); simplePopup.setText("I am simple"); simplePopup.add(new Label("Can you see me?")); simplePopup.center(); simplePopup.show(); } On Mon, Mar 23, 2009 at 9:33 AM, Edwin Commandeur <com...@gm...> wrote: > Hi Curtis, > > I haven't been at my laptop that is set up for programming, but I saw from > the CVS that you did not commit the modifications to the CVS. > > It is confusing in the current situation as there is an Options object and > an OptionsBase object. The latter I have introduced to hide setAttribute > methods for specific Options objects. I will think about how we can make > this less confusing and make the Options objects more powerful. The simplest > possibility is to remove OptionsBase and let Options objects extend Options. > > Are you using GWT-OpenLayers with plain GWT widgets? > > I am using GWT-OpenLayers with plain GWT widgets for the showcase and with > Ext-GWT for several applications but I have never experience the Z-Index > problem you are describing. > > The MapWidget is very minimalistic. It only creates a div which OpenLayers > can use to put the map in. The MapWidget itself does not do anything with > z-indexes of that div, that is all OpenLayers. Possibly the problem is also > solved if you create a div within the Panel you are using and let the > MapWidget use that div. Currently this is not possible, but there is some > commented out code in MapWidget that you can uncomment to test if this works > in principle. > > Greetings, > Edwin > > P.S. > > > > > 2009/3/23 Curtis Jensen <cur...@gm...> >> >> Hello, >> >> Sorry I haven't jumped in earlier. Me and the family got sick (I >> still am). I hate winter. >> >> I had forgotten that I did modify the source to expose the the >> setAttribute methods. >> >> Yes, it would be nice for me to have a setZIndexBase method. I kinda >> would like the setAttribute method exposed too for the advanced needs. >> If something comes up other than ZIndex or if ZIndex accessors are >> never added, how else would we set the properties that aren't >> explicitly in the API? >> >> Does anyone else have a problem with the OpenLayers map being hid by >> other widgets? Or the map hiding other widgets? >> If I create a popup panel, the map will be above the popup panel and I >> can't see the popup. This only happens in Firefox. IE puts the popup >> on top of the map. After looking at the zIndexes of the widgets, I >> think that the map should cover the popup panel. Even though I want >> the popup on top, it is incorrect to render it on top. >> >> -- >> Curtis >> >> >> >> On Mon, Mar 23, 2009 at 6:05 AM, Edwin Commandeur >> <com...@gm...> wrote: >> > Hi Farrukh, >> > >> > I will be adding the getter and setter for setZIndexBase(). >> > >> > It does bug me a bit that the options objects don't have a setProperty >> > method for advanced users who want to set properties not yet supported >> > by >> > the API. I will try to come up with a single method that allows setting >> > properties of multiple types. At present I am thinking of sth like: >> > >> > setProperty(String name, PropertyValue value) >> > >> > Where PropertyValue can be of different types. >> > >> > Greetings, >> > Edwin >> > >> > 2009/3/23 Farrukh Najmi <fa...@we...> >> >> >> >> Farrukh Najmi wrote: >> >>> >> >>> Edwin Commandeur wrote: >> >>> >> >>>> >> >>>> Hi Farrukh, >> >>>> >> >>>> MapOptions extends OptionsBase, which intentionally hides the >> >>>> setAttribute methods for non-children (see the Javadoc on >> >>>> OptionsBase). The >> >>>> idea behind this is that XxxOptions objects should only have setters >> >>>> for >> >>>> options that can actually be set on them. Also the setAttribute >> >>>> methods >> >>>> clutter the code suggestions by the IDE for the available setters >> >>>> (another >> >>>> option to prevent code suggestion clutter would be to have a >> >>>> IMapOptions >> >>>> interface with limited setters and let that be extended by a >> >>>> MapOptions >> >>>> class that extends Options). >> >>>> >> >>>> If it makes sense to support setting the Z-Index I would argue that >> >>>> there should be a public setZIndex method, but if others feel that it >> >>>> makes >> >>>> more sense to expose the setAttribute methods than we should consider >> >>>> making >> >>>> all classes that extend OptionsBase extend Options instead (as in >> >>>> GWT-OL >> >>>> 0.2). >> >>>> >> >>>> >> >>> >> >>> Hi Edwin, >> >>> >> >>> I agree with your rationale. >> >>> >> >>> +1 on adding setZIndex(int zIndex) and getZIndex() methods. >> >>> >> >>> I think it would be better if you could do it as you are more familiar >> >>> with code base. >> >>> >> >>> Please let me know if I can help. When its committed I will test it >> >>> out. >> >>> Thanks. >> >>> >> >>> >> >> >> >> Actually, perhaps the methods should be get/setZIndexBase() since they >> >> wouldset the base for a set of zindexes. >> >> >> >> -- >> >> Regards, >> >> Farrukh >> >> >> >> Web: http://www.wellfleetsoftware.com >> >> >> >> >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >> > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >> > easily build your RIAs with Flex Builder, the Eclipse(TM)based >> > development >> > software that enables intelligent coding and step-through debugging. >> > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >> > _______________________________________________ >> > Gwt-openlayers-devl mailing list >> > Gwt...@li... >> > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-devl >> > >> > > > |
From: Curtis <je...@us...> - 2009-03-26 20:32:19
|
Below is an example of a popup (DialogBox) being hidden by the map. With this code every thing looks fine in Hosted mode and IE. When the page is loaded with Firefox and you drag the dialog box over the map, the map will be on top. Or if the page loads with the dialog already overlapping with the map, I don't see the dialog at all. private Widget getMapWidget() { MapOptions mapOptions = new MapOptions(); mapOptions.setControls(new JObjectArray(new JSObject[] {})); mapOptions.setNumZoomLevels(16); mapOptions.setProjection("EPSG:4326"); MapWidget mapWidget = new MapWidget("400px", "400px", mapOptions); Map map = mapWidget.getMap(); WMSParams wmsParams = new WMSParams(); wmsParams.setLayers("landsat7"); WMS wmsLayer = new WMS("WMS Layer", "http://t1.hypercube.telascience.org/cgi-bin/landsat7", wmsParams); map.addLayers(new Layer[] {wmsLayer}); map.addControl(new PanZoomBar()); map.addControl(new MouseToolbar()); LonLat center = new LonLat(-73.99, 40.73); map.setCenter(center, 13); return mapWidget; } public void onModuleLoad() { VerticalPanel mainPanel = new VerticalPanel(); mainPanel.setSize("100%", "100%"); mainPanel.add(getMapWidget()); RootPanel.get().add(mainPanel); DialogBox simplePopup = new DialogBox(); simplePopup.setText("I am simple"); simplePopup.add(new Label("Can you see me?")); simplePopup.center(); simplePopup.show(); } On Mon, Mar 23, 2009 at 9:33 AM, Edwin Commandeur <com...@gm...> wrote: > Hi Curtis, > > I haven't been at my laptop that is set up for programming, but I saw from > the CVS that you did not commit the modifications to the CVS. > > It is confusing in the current situation as there is an Options object and > an OptionsBase object. The latter I have introduced to hide setAttribute > methods for specific Options objects. I will think about how we can make > this less confusing and make the Options objects more powerful. The simplest > possibility is to remove OptionsBase and let Options objects extend Options. > > Are you using GWT-OpenLayers with plain GWT widgets? > > I am using GWT-OpenLayers with plain GWT widgets for the showcase and with > Ext-GWT for several applications but I have never experience the Z-Index > problem you are describing. > > The MapWidget is very minimalistic. It only creates a div which OpenLayers > can use to put the map in. The MapWidget itself does not do anything with > z-indexes of that div, that is all OpenLayers. Possibly the problem is also > solved if you create a div within the Panel you are using and let the > MapWidget use that div. Currently this is not possible, but there is some > commented out code in MapWidget that you can uncomment to test if this works > in principle. > > Greetings, > Edwin > > P.S. > > > > > 2009/3/23 Curtis Jensen <cur...@gm...> >> >> Hello, >> >> Sorry I haven't jumped in earlier. Me and the family got sick (I >> still am). I hate winter. >> >> I had forgotten that I did modify the source to expose the the >> setAttribute methods. >> >> Yes, it would be nice for me to have a setZIndexBase method. I kinda >> would like the setAttribute method exposed too for the advanced needs. >> If something comes up other than ZIndex or if ZIndex accessors are >> never added, how else would we set the properties that aren't >> explicitly in the API? >> >> Does anyone else have a problem with the OpenLayers map being hid by >> other widgets? Or the map hiding other widgets? >> If I create a popup panel, the map will be above the popup panel and I >> can't see the popup. This only happens in Firefox. IE puts the popup >> on top of the map. After looking at the zIndexes of the widgets, I >> think that the map should cover the popup panel. Even though I want >> the popup on top, it is incorrect to render it on top. >> >> -- >> Curtis >> >> >> >> On Mon, Mar 23, 2009 at 6:05 AM, Edwin Commandeur >> <com...@gm...> wrote: >> > Hi Farrukh, >> > >> > I will be adding the getter and setter for setZIndexBase(). >> > >> > It does bug me a bit that the options objects don't have a setProperty >> > method for advanced users who want to set properties not yet supported >> > by >> > the API. I will try to come up with a single method that allows setting >> > properties of multiple types. At present I am thinking of sth like: >> > >> > setProperty(String name, PropertyValue value) >> > >> > Where PropertyValue can be of different types. >> > >> > Greetings, >> > Edwin >> > >> > 2009/3/23 Farrukh Najmi <fa...@we...> >> >> >> >> Farrukh Najmi wrote: >> >>> >> >>> Edwin Commandeur wrote: >> >>> >> >>>> >> >>>> Hi Farrukh, >> >>>> >> >>>> MapOptions extends OptionsBase, which intentionally hides the >> >>>> setAttribute methods for non-children (see the Javadoc on >> >>>> OptionsBase). The >> >>>> idea behind this is that XxxOptions objects should only have setters >> >>>> for >> >>>> options that can actually be set on them. Also the setAttribute >> >>>> methods >> >>>> clutter the code suggestions by the IDE for the available setters >> >>>> (another >> >>>> option to prevent code suggestion clutter would be to have a >> >>>> IMapOptions >> >>>> interface with limited setters and let that be extended by a >> >>>> MapOptions >> >>>> class that extends Options). >> >>>> >> >>>> If it makes sense to support setting the Z-Index I would argue that >> >>>> there should be a public setZIndex method, but if others feel that it >> >>>> makes >> >>>> more sense to expose the setAttribute methods than we should consider >> >>>> making >> >>>> all classes that extend OptionsBase extend Options instead (as in >> >>>> GWT-OL >> >>>> 0.2). >> >>>> >> >>>> >> >>> >> >>> Hi Edwin, >> >>> >> >>> I agree with your rationale. >> >>> >> >>> +1 on adding setZIndex(int zIndex) and getZIndex() methods. >> >>> >> >>> I think it would be better if you could do it as you are more familiar >> >>> with code base. >> >>> >> >>> Please let me know if I can help. When its committed I will test it >> >>> out. >> >>> Thanks. >> >>> >> >>> >> >> >> >> Actually, perhaps the methods should be get/setZIndexBase() since they >> >> wouldset the base for a set of zindexes. >> >> >> >> -- >> >> Regards, >> >> Farrukh >> >> >> >> Web: http://www.wellfleetsoftware.com >> >> >> >> >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >> > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >> > easily build your RIAs with Flex Builder, the Eclipse(TM)based >> > development >> > software that enables intelligent coding and step-through debugging. >> > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >> > _______________________________________________ >> > Gwt-openlayers-devl mailing list >> > Gwt...@li... >> > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-devl >> > >> > > > |
From: Edwin C. <com...@gm...> - 2009-03-22 12:09:35
|
Hi Farrukh, MapOptions extends OptionsBase, which intentionally hides the setAttribute methods for non-children (see the Javadoc on OptionsBase). The idea behind this is that XxxOptions objects should only have setters for options that can actually be set on them. Also the setAttribute methods clutter the code suggestions by the IDE for the available setters (another option to prevent code suggestion clutter would be to have a IMapOptions interface with limited setters and let that be extended by a MapOptions class that extends Options). If it makes sense to support setting the Z-Index I would argue that there should be a public setZIndex method, but if others feel that it makes more sense to expose the setAttribute methods than we should consider making all classes that extend OptionsBase extend Options instead (as in GWT-OL 0.2). Greetings, Edwin 2009/3/21 Farrukh Najmi <fa...@we...> > > I could not use the mapOptions.setAttribute calls as they were protected > not public. > Is there a good reason for not making them public or is it just an > oversight? > > Attached is a suggested patch to make the methods public. Please let me > know if it makes sense to commit it. > Thanks. > > Curtis Jensen wrote: > >> zIndexes are how CSS defines what div blocks appear on top of overlapping >> div blocks. It's the normal concept of 3D space coordinates, where the z >> axis is perpendicular to the screen. The highest zIndex will be on top. >> I'm not expert either, this is the basics of what I know. >> >> It's isn't difficult to change the default zIndexes of OpenLayers (but is >> was difficult for me figure it out). It is very likely that someone else >> knows a better way. In my case, I was actually trying to make the map go >> lower in the z ordering. You may want yours to go higher. I used FireBug >> (Firefox plugin) to find the zIndex of the objects that were conflicting >> with my map. It took me a little while to find where OpenLayers was setting >> it's z indexes. They have a set of base indexes, and then build from there. >> If you over write the defaults, you can modify the z ordering of OpenLayers >> objects. >> >> This is the code I used: >> >> // OpenLayers default Z bases are 1000, 250, 750, 2000 >> private native JSObject getLowerMapZBase() /*-{ >> return { BaseLayer: -1000, Overlay: -750, Popup: -500, Control: 0 }; >> }-*/; >> >> MapOptions mapOptions = new MapOptions(); >> mapOptions.setAttribute("Z_INDEX_BASE", getLowerMapZBase()); >> >> >> >> > > -- > Regards, > Farrukh > > Web: http://www.wellfleetsoftware.com > > > > Index: src/main/java/com/eg/gwt/openLayers/client/util/OptionsBase.java > =================================================================== > RCS file: > /cvsroot/gwt-openlayers/gwt-openlayers/src/main/java/com/eg/gwt/openLayers/client/util/OptionsBase.java,v > retrieving revision 1.1 > diff -u -r1.1 OptionsBase.java > --- src/main/java/com/eg/gwt/openLayers/client/util/OptionsBase.java 27 > Feb 2009 08:33:08 -0000 1.1 > +++ src/main/java/com/eg/gwt/openLayers/client/util/OptionsBase.java 21 > Mar 2009 19:36:53 -0000 > @@ -43,83 +43,83 @@ > //super((JSObject) JSObject.createObject()); //should work > } > > - protected void setAttribute(String attr, boolean value) > + public void setAttribute(String attr, boolean value) > { > ElementHelper.setAttribute(getJSObject(), attr, value); > } > > - protected void setAttribute(String attr, int value) > + public void setAttribute(String attr, int value) > { > ElementHelper.setAttribute(getJSObject(), attr, value); > } > > - protected void setAttribute(String attr, int[] value) > + public void setAttribute(String attr, int[] value) > { > setAttribute(attr, new JIntArray(value).getJSObject()); > } > > - protected void setAttribute(String attr, double value) > + public void setAttribute(String attr, double value) > { > ElementHelper.setAttribute(getJSObject(), attr, value); > } > > - protected void setAttribute(String attr, String value) > + public void setAttribute(String attr, String value) > { > ElementHelper.setAttribute(getJSObject(), attr, value); > } > > - protected void setAttribute(String attr, Element value) > + public void setAttribute(String attr, Element value) > { > ElementHelper.setAttribute(getJSObject(), attr, value); > } > > - protected void setAttribute(String attr, JSObject value) > + public void setAttribute(String attr, JSObject value) > { > ElementHelper.setAttribute(getJSObject(), attr, value); > } > > - protected void setAttribute(String attr, JObjectArray value) > + public void setAttribute(String attr, JObjectArray value) > { > ElementHelper.setAttribute(getJSObject(), attr, > value.getJSObject()); > } > > - protected String getAttribute(String attr) > + public String getAttribute(String attr) > { > return ElementHelper.getAttribute(getJSObject(), attr); > } > > - protected boolean getAttributeAsBoolean(String attr) > + public boolean getAttributeAsBoolean(String attr) > { > return ElementHelper.getAttributeAsBoolean(getJSObject(), > attr); > } > > - protected double getAttributeAsDouble(String attr) > + public double getAttributeAsDouble(String attr) > { > return ElementHelper.getAttributeAsDouble(getJSObject(), > attr); > } > > - protected Element getAttributeAsElement(String attr) > + public Element getAttributeAsElement(String attr) > { > return ElementHelper.getAttributeAsElement(getJSObject(), > attr); > } > > - protected JSObject getAttributeAsJSObject(String attr) > + public JSObject getAttributeAsJSObject(String attr) > { > return ElementHelper.getAttributeAsJSObject(getJSObject(), > attr); > } > > - protected int getAttributeAsInt(String attr) > + public int getAttributeAsInt(String attr) > { > return ElementHelper.getAttributeAsInt(getJSObject(), attr); > } > > //TODO Perhaps move these back to helper methods > - protected int[] getAttributeAsIntArray(String attr) > + public int[] getAttributeAsIntArray(String attr) > { > return > JIntArray.narrowToJIntArray(getAttributeAsJSObject(attr)).toArray(); > } > > - protected String[] getAttributes() > + public String[] getAttributes() > { > JSObject attributes = > ElementHelper.getAttributes(getJSObject()); > > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Gwt-openlayers-devl mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-devl > > |