You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
(17) |
Apr
|
May
|
Jun
(6) |
Jul
(10) |
Aug
(16) |
Sep
(4) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(5) |
Feb
(28) |
Mar
(35) |
Apr
(20) |
May
(13) |
Jun
(24) |
Jul
(14) |
Aug
(8) |
Sep
(19) |
Oct
(13) |
Nov
(16) |
Dec
(8) |
2011 |
Jan
(18) |
Feb
(10) |
Mar
(16) |
Apr
(14) |
May
(21) |
Jun
(20) |
Jul
(12) |
Aug
(18) |
Sep
(11) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
2012 |
Jan
(1) |
Feb
(2) |
Mar
(6) |
Apr
(1) |
May
|
Jun
|
Jul
(4) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Edwin C. <com...@gm...> - 2010-06-10 13:47:10
|
Are you perhaps trying to get the controls when there are no controls on the map? Or are you sure there are controls? I found the KMLTest to fail when it did not return any vectorfeatures. Looking at that now. Greetings, Edwin On 9 June 2010 10:00, Edwin Commandeur <com...@gm...> wrote: > Hi Andrew, > > I am not sure what goes wrong, but apparently it happens in the > getPropertyAsArray method. I hope to be able to look at it tomorrow > > The VectorFormat read method shows how an array can be retrieved > without the getPropertyAsArray method, so maybe that is an option. > > Greetings, > Edwin > > On 9 June 2010 02:15, Andrew Hughes <ahh...@gm...> wrote: >> I tried the following (in Map): >> /** >> * This will fetch all of the controls on the map. >> * @return the Controls or an empty array. >> */ >> public Control[] getControls(){ >> JSObject[] jsObjects = getJSObject().getPropertyAsArray("controls"); >> int count = jsObjects.length; >> Control[] controls = new Control[count]; >> for(int i =0; i < count ;i++){ >> controls[i] = Control.narrowToControl(jsObjects[i]); >> } >> return controls; >> } >> But this doesn't work, I'm out of my depth with JSNI... >> >> java.lang.IllegalArgumentException: Something other than a Java object was >> returned from JSNI method >> '@org.gwtopenmaps.openlayers.client.util.JSObjectHelper::getProperty(Lorg/gwtopenmaps/openlayers/client/util/JSObject;Ljava/lang/String;)': >> JS value of type int, expected java.lang.Object >> >> >> at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178) >> at >> com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:266) >> at >> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) >> >> >> at >> org.gwtopenmaps.openlayers.client.util.JSObjectHelper.getProperty(JSObjectHelper.java) >> at >> org.gwtopenmaps.openlayers.client.util.JSObject$.getProperty$(JSObject.java:100) >> at >> org.gwtopenmaps.openlayers.client.util.JSObject$.getPropertyAsArray$(JSObject.java:141) >> >> >> at org.gwtopenmaps.openlayers.client.Map.getControls(Map.java:124) >> >> Any help would be greatly appreciated :) >> >> On Tue, Jun 8, 2010 at 5:58 AM, Edwin Commandeur >> <com...@gm...> wrote: >>> >>> Hi Andrew, >>> >>> That would be easy to add as a method to the Map, and it seems to make >>> sense. Controls are stored in an array on the map. We need to get the >>> JSObjects, narrow them to controls and return them in a Collection. I >>> guess there is no method for that in OpenLayers because accessing the >>> controls array is so easy in Javascript. >>> >>> Greetings, >>> Edwin >>> >>> On 7 June 2010 09:01, Andrew Hughes <ahh...@gm...> wrote: >>> > Hi Guys, >>> > I need to be able to manipulate all the controls on a map, but I can't >>> > do >>> > anything like... map.getControls(); any ideas? >>> > Cheers >>> > --AH >>> > p.s. I really need to iterate over all controls and remove the ones I >>> > don't >>> > want. >>> > >>> > ------------------------------------------------------------------------------ >>> > ThinkGeek and WIRED's GeekDad team up for the Ultimate >>> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >>> > lucky parental unit. See the prize list and enter to win: >>> > http://p.sf.net/sfu/thinkgeek-promo >>> > _______________________________________________ >>> > Gwt-openlayers-users mailing list >>> > Gwt...@li... >>> > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >>> > >>> > >> >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> Gwt-openlayers-users mailing list >> Gwt...@li... >> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >> >> > |
From: Lukas J. <luk...@de...> - 2010-06-09 14:36:03
|
Anyone tested using 2.9 yet? Are there anything broken or does it work seamless? /Lukas |
From: Edwin C. <com...@gm...> - 2010-06-09 08:00:31
|
Hi Andrew, I am not sure what goes wrong, but apparently it happens in the getPropertyAsArray method. I hope to be able to look at it tomorrow The VectorFormat read method shows how an array can be retrieved without the getPropertyAsArray method, so maybe that is an option. Greetings, Edwin On 9 June 2010 02:15, Andrew Hughes <ahh...@gm...> wrote: > I tried the following (in Map): > /** > * This will fetch all of the controls on the map. > * @return the Controls or an empty array. > */ > public Control[] getControls(){ > JSObject[] jsObjects = getJSObject().getPropertyAsArray("controls"); > int count = jsObjects.length; > Control[] controls = new Control[count]; > for(int i =0; i < count ;i++){ > controls[i] = Control.narrowToControl(jsObjects[i]); > } > return controls; > } > But this doesn't work, I'm out of my depth with JSNI... > > java.lang.IllegalArgumentException: Something other than a Java object was > returned from JSNI method > '@org.gwtopenmaps.openlayers.client.util.JSObjectHelper::getProperty(Lorg/gwtopenmaps/openlayers/client/util/JSObject;Ljava/lang/String;)': > JS value of type int, expected java.lang.Object > > > at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178) > at > com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:266) > at > com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) > > > at > org.gwtopenmaps.openlayers.client.util.JSObjectHelper.getProperty(JSObjectHelper.java) > at > org.gwtopenmaps.openlayers.client.util.JSObject$.getProperty$(JSObject.java:100) > at > org.gwtopenmaps.openlayers.client.util.JSObject$.getPropertyAsArray$(JSObject.java:141) > > > at org.gwtopenmaps.openlayers.client.Map.getControls(Map.java:124) > > Any help would be greatly appreciated :) > > On Tue, Jun 8, 2010 at 5:58 AM, Edwin Commandeur > <com...@gm...> wrote: >> >> Hi Andrew, >> >> That would be easy to add as a method to the Map, and it seems to make >> sense. Controls are stored in an array on the map. We need to get the >> JSObjects, narrow them to controls and return them in a Collection. I >> guess there is no method for that in OpenLayers because accessing the >> controls array is so easy in Javascript. >> >> Greetings, >> Edwin >> >> On 7 June 2010 09:01, Andrew Hughes <ahh...@gm...> wrote: >> > Hi Guys, >> > I need to be able to manipulate all the controls on a map, but I can't >> > do >> > anything like... map.getControls(); any ideas? >> > Cheers >> > --AH >> > p.s. I really need to iterate over all controls and remove the ones I >> > don't >> > want. >> > >> > ------------------------------------------------------------------------------ >> > ThinkGeek and WIRED's GeekDad team up for the Ultimate >> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> > lucky parental unit. See the prize list and enter to win: >> > http://p.sf.net/sfu/thinkgeek-promo >> > _______________________________________________ >> > Gwt-openlayers-users mailing list >> > Gwt...@li... >> > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >> > >> > > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Andrew H. <ahh...@gm...> - 2010-06-09 01:16:16
|
I tried the following (in Map): /** * This will fetch all of the controls on the map. * @return the Controls or an empty array. */ public Control[] getControls(){ JSObject[] jsObjects = getJSObject().getPropertyAsArray("controls"); int count = jsObjects.length; Control[] controls = new Control[count]; for(int i =0; i < count ;i++){ controls[i] = Control.narrowToControl(jsObjects[i]); } return controls; } But this doesn't work, I'm out of my depth with JSNI... java.lang.IllegalArgumentException: Something other than a Java object was returned from JSNI method '@org.gwtopenmaps.openlayers.client.util.JSObjectHelper::getProperty(Lorg/gwtopenmaps/openlayers/client/util/JSObject;Ljava/lang/String;)': JS value of type int, expected java.lang.Object at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:266) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at org.gwtopenmaps.openlayers.client.util.JSObjectHelper.getProperty(JSObjectHelper.java) at org.gwtopenmaps.openlayers.client.util.JSObject$.getProperty$(JSObject.java:100) at org.gwtopenmaps.openlayers.client.util.JSObject$.getPropertyAsArray$(JSObject.java:141) at org.gwtopenmaps.openlayers.client.Map.getControls(Map.java:124) Any help would be greatly appreciated :) On Tue, Jun 8, 2010 at 5:58 AM, Edwin Commandeur <com...@gm... > wrote: > Hi Andrew, > > That would be easy to add as a method to the Map, and it seems to make > sense. Controls are stored in an array on the map. We need to get the > JSObjects, narrow them to controls and return them in a Collection. I > guess there is no method for that in OpenLayers because accessing the > controls array is so easy in Javascript. > > Greetings, > Edwin > > On 7 June 2010 09:01, Andrew Hughes <ahh...@gm...> wrote: > > Hi Guys, > > I need to be able to manipulate all the controls on a map, but I can't do > > anything like... map.getControls(); any ideas? > > Cheers > > --AH > > p.s. I really need to iterate over all controls and remove the ones I > don't > > want. > > > ------------------------------------------------------------------------------ > > ThinkGeek and WIRED's GeekDad team up for the Ultimate > > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > > lucky parental unit. See the prize list and enter to win: > > http://p.sf.net/sfu/thinkgeek-promo > > _______________________________________________ > > Gwt-openlayers-users mailing list > > Gwt...@li... > > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > > > > |
From: Edwin C. <com...@gm...> - 2010-06-07 20:29:00
|
Hi Andrew, That would be easy to add as a method to the Map, and it seems to make sense. Controls are stored in an array on the map. We need to get the JSObjects, narrow them to controls and return them in a Collection. I guess there is no method for that in OpenLayers because accessing the controls array is so easy in Javascript. Greetings, Edwin On 7 June 2010 09:01, Andrew Hughes <ahh...@gm...> wrote: > Hi Guys, > I need to be able to manipulate all the controls on a map, but I can't do > anything like... map.getControls(); any ideas? > Cheers > --AH > p.s. I really need to iterate over all controls and remove the ones I don't > want. > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Andrew H. <ahh...@gm...> - 2010-06-07 07:02:04
|
Hi Guys, I need to be able to manipulate all the controls on a map, but I can't do anything like... map.getControls(); any ideas? Cheers --AH p.s. I really need to iterate over all controls and remove the ones I don't want. |
From: Chitra C. <ach...@gm...> - 2010-05-26 07:53:20
|
Hi all, Libraries I Am Using --------------------------------- openlayers_gwt-0.4.jar smartgwt.jar Issue --------- I have a smartGWT Portal with many smartGWT Portlets. These Portlets contain smartGWT Canvasses. I am trying to add a MapWidget into a Portlet. The following is my code: public class MyWidget extends Canvas { private MapWidget mapWidget; private Map map; private WMS wmsLayer; private Markers markers; private Popup popup; public MyWidget () { // Create map widget and map objects mapWidget = new MapWidget("350px", "350px"); map = mapWidget.getMap(); //instantiates map TMSOptions tmsOptions = new TMSOptions(); tmsOptions.setFormat("image/png"); tmsOptions.setDisplayOutsideMaxExtent(false); tmsOptions.setProjection("EPSG:4392"); TMS tmsLayer = new TMS("OpenStreetMaps", " http://tile.openstreetmap.org/", tmsOptions); map.addLayers(new Layer[] {tmsLayer}); this.addChild(mapWidget); draw(); } } This MyWidget canvas is added into the Portlet by calling: portlet.addItem(new MyWidget()); When run, a map cannot be seen in my portlet. I can see the Portlet's <div> element. However, there is no map element within the <div>. Does anyone know why? Replicating the above behaviour ---------------------------------------------- Adding the MapWidget directly onto the RootPanel still produced the same behaviour as above - i.e. I can see the Portlet's <div> element but there is no map element within the <div>. My code is as follows: public void onModuleLoad() { DockPanel mainPanel = new DockPanel(); mainPanel.setHeight("100%"); mainPanel.setWidth("100%"); // let's create map options MapOptions mapOptions = new MapOptions(); mapOptions.setControls(new JObjectArray(new JSObject[] {})); mapOptions.setNumZoomLevels(16); mapOptions.setProjection("EPSG:4326"); MapWidget mapWidget = new MapWidget("350px","350px", mapOptions); Map map = mapWidget.getMap(); //Defining a WMSLayer and adding it to a Map WMSParams wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("basic"); wmsParams.setStyles(""); wmsParams.setMaxExtent(new Bounds(-74.047185, 40.679648, -73.907005, 40.882078)); WMS wmsLayer = new WMS( "Basic WMS", "http://labs.metacarta.com/wms/vmap0", wmsParams); mapWidget.getMap().addLayers(new Layer[] {wmsLayer}); mainPanel.add(new Label("hello"), DockPanel.EAST); mainPanel.add(mapWidget, DockPanel.CENTER); RootPanel.get("content").add(mainPanel); } Any ideas anyone? Thank you. Kind regards, Chitra |
From: Edwin C. <com...@gm...> - 2010-05-25 19:52:27
|
Hi Lukas, Just pushed your MapMoveEndListener support to the main repo. Thanks for contributing, Edwin On 25 May 2010 10:36, Lukas Johansson <luk...@de...> wrote: > Ok, here it goes. I'm not 100% sure that the patch file was created correctly as my mercurial didn't honor the .hgignore file. I was therefore forced to edit the patch file to remove changes in .project and .classpath. > > The patch is more or less just a copy of the existing moveEvent and I tested it in our application where it seems to work. Anything else I should do/know about? > > /Lukas > > -----Ursprungligt meddelande----- > Från: Edwin Commandeur [mailto:com...@gm...] > Skickat: den 24 maj 2010 21:50 > Till: Lukas Johansson > Kopia: gwt...@li... > Ämne: Re: [Gwt-openlayers-users] Event mapmoveend > > Hi Lukas, > > You seem to have it down. The classes you describe are all that are > needed and you can just look at the MapMoveListener. Management of > the listener happens via de EventListenerCollection on > OpenLayersEObjectWrapper :). > > A diff would be fine. Looking forward to your patch! > > Greetings, > Edwin > > On 24 May 2010 16:27, Lukas Johansson <luk...@de...> wrote: >> At http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html it is >> stated that three events exists concerting the movement of the map: >> >> # movestart triggered after the start of a drag, pan, or zoom >> # move triggered after each drag, pan, or zoom >> # moveend triggered after a drag, pan, or zoom completes >> >> As far as I understand only move has been wrapped in gwt-ol. If I were >> to wrap moveend (the one I need) am I correct in believing that I only >> need to: >> * create a interface MapMoveEndListener >> * add eventType to EventType.java >> * write a register method in Map.java >> >> How do I send the changeset to you? A diff of the project? >> Best Regards >> Lukas Johansson >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Gwt-openlayers-users mailing list >> Gwt...@li... >> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >> > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Edwin C. <com...@gm...> - 2010-05-25 13:30:04
|
Hi Lukas, Thanks for contributing the patch. No additional stuff is needed for providing the MapMoveEnd within GWT-OL. If the MapMoveEnd event object has additional properties (beyond source) then getters can be created on the MapMoveEndEvent inner class, but that is not a necessity and doesn't seem to apply here. I will get the patch in this week (hopefully tonight or otherwise thursday). Greetings, Edwin On 25 May 2010 10:36, Lukas Johansson <luk...@de...> wrote: > Ok, here it goes. I'm not 100% sure that the patch file was created correctly as my mercurial didn't honor the .hgignore file. I was therefore forced to edit the patch file to remove changes in .project and .classpath. > > The patch is more or less just a copy of the existing moveEvent and I tested it in our application where it seems to work. Anything else I should do/know about? > > /Lukas > > -----Ursprungligt meddelande----- > Från: Edwin Commandeur [mailto:com...@gm...] > Skickat: den 24 maj 2010 21:50 > Till: Lukas Johansson > Kopia: gwt...@li... > Ämne: Re: [Gwt-openlayers-users] Event mapmoveend > > Hi Lukas, > > You seem to have it down. The classes you describe are all that are > needed and you can just look at the MapMoveListener. Management of > the listener happens via de EventListenerCollection on > OpenLayersEObjectWrapper :). > > A diff would be fine. Looking forward to your patch! > > Greetings, > Edwin > > On 24 May 2010 16:27, Lukas Johansson <luk...@de...> wrote: >> At http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html it is >> stated that three events exists concerting the movement of the map: >> >> # movestart triggered after the start of a drag, pan, or zoom >> # move triggered after each drag, pan, or zoom >> # moveend triggered after a drag, pan, or zoom completes >> >> As far as I understand only move has been wrapped in gwt-ol. If I were >> to wrap moveend (the one I need) am I correct in believing that I only >> need to: >> * create a interface MapMoveEndListener >> * add eventType to EventType.java >> * write a register method in Map.java >> >> How do I send the changeset to you? A diff of the project? >> Best Regards >> Lukas Johansson >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Gwt-openlayers-users mailing list >> Gwt...@li... >> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >> > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Lukas J. <luk...@de...> - 2010-05-25 08:36:18
|
Ok, here it goes. I'm not 100% sure that the patch file was created correctly as my mercurial didn't honor the .hgignore file. I was therefore forced to edit the patch file to remove changes in .project and .classpath. The patch is more or less just a copy of the existing moveEvent and I tested it in our application where it seems to work. Anything else I should do/know about? /Lukas -----Ursprungligt meddelande----- Från: Edwin Commandeur [mailto:com...@gm...] Skickat: den 24 maj 2010 21:50 Till: Lukas Johansson Kopia: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Event mapmoveend Hi Lukas, You seem to have it down. The classes you describe are all that are needed and you can just look at the MapMoveListener. Management of the listener happens via de EventListenerCollection on OpenLayersEObjectWrapper :). A diff would be fine. Looking forward to your patch! Greetings, Edwin On 24 May 2010 16:27, Lukas Johansson <luk...@de...> wrote: > At http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html it is > stated that three events exists concerting the movement of the map: > > # movestart triggered after the start of a drag, pan, or zoom > # move triggered after each drag, pan, or zoom > # moveend triggered after a drag, pan, or zoom completes > > As far as I understand only move has been wrapped in gwt-ol. If I were > to wrap moveend (the one I need) am I correct in believing that I only > need to: > * create a interface MapMoveEndListener > * add eventType to EventType.java > * write a register method in Map.java > > How do I send the changeset to you? A diff of the project? > Best Regards > Lukas Johansson > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |
From: Edwin C. <com...@gm...> - 2010-05-24 20:40:27
|
Hi Nishant, In the latest sourcecode the getWidth and setWidth methods of Size have been implemented, so you migth take a look there. About the BBOX issue I do not currently have any idea what could be going wrong. Greetings, Edwin Commandeur On 24 May 2010 09:37, nishant verma <nis...@gm...> wrote: > Hi > I am finding a problem with using toBBOX() function. I will really > appreciate if you could please help me or give some suggestion. The problem > is as follows: > I am trying to add a functionality, where user should click on certain > area of the map, and he should get feature info about that area. I am using > WMS getFeatureInfo as of now, though I have also tried with WFS getFeature. > I have added a layer to geoserver, and I am rendering it as the base > layer in my map. I added a MapClickListener to the map which first > calculates some basic parameters from the map. The code snippet goes as > follows : > LonLat lonlat = eventObject.getLonLat(); > String SRS = eventObject.getSource().getProjection(); > String BBOX = eventObject.getSource().getExtent().toBBox(6); > String WIDTH = Float.toString(eventObject.getSource().getSize().getWidth()); > String HEIGHT = > Float.toString(eventObject.getSource().getSize().getHeight()); > String QUERY_LAYERS = eventObject.getSource().getLayers()[0].; > String X = new > Integer(eventObject.getSource().getPixelFromLonLat(lonlat).x()).toString(); > String Y = new > Integer(eventObject.getSource().getPixelFromLonLat(lonlat).y()).toString(); > String GEOSERVER_WMS_GETFEATUREINFO_REQUEST_URL = > ExampleConstants.GEOSERVER_WMS_URL + "?SERVICE=WMS&VERSION=1.1.1" + > "&REQUEST=GetFeatureInfo&SRS=" + SRS + > "&EXCEPTIONS=application/vnd.ogc.se_xml" + > "&BBOX=" + BBOX + "&WIDTH=" + 300 + "&HEIGHT=" + 300 + > "&INFO_FORMAT=text/plain" + > "&QUERY_LAYERS=" + "test:sld_cookbook_polygon" + > "&LAYERS=test:sld_cookbook_polygon" + "&X=" + X + "&Y=" + Y; > RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, > URL.encode(GEOSERVER_WMS_GETFEATUREINFO_REQUEST_URL)); > try { > String requestData = ""; //since this is a GET request, no request data need > to be sent > RequestCallback wfsCallback = new GeoServerWMSGetFeatureInfoHandler(); > Request wfsRequest = builder.sendRequest(requestData, wfsCallback); > } > catch (RequestException e){ > Window.alert(e.getMessage()); > } > There are two problems I am having with this code: > 1) the .getSize().getWidth() and getHeight() functions don't work. I looked > into .class files and found that implementation of these functions is of > type 'void' rather than 'return' type. > But for the time being, I am giving dummy value of 300. > 2) When I added this code to showcase code, and added my own layer (from > geoserver) it was returning correct BBOX bounds, but my callback Handler > (GeoServerWMSGetFeatureInfoHandler) was showing a status code 0 from the > server. But when I type the full URL > (GEOSERVER_WMS_GETFEATUREINFO_REQUEST_URL) in a browser, it gives me correct > features set!. That means I am getting correct values of BBOX. > On the other hand when I added this code to my project > code, the BBOX values that I get are unrealistic. I get -409.921875 > -194.4140625 409.921875 194.4140625 as BBOX. Due to this I get no features > at all from the server. I am not able to understand why I am getting such > values. > I will be highly grateful if you could suggest some solution to this > problem. > Thanks and Regards, > Nishant > OpenXdata Team |
From: Edwin C. <com...@gm...> - 2010-05-24 19:50:33
|
Hi Lukas, You seem to have it down. The classes you describe are all that are needed and you can just look at the MapMoveListener. Management of the listener happens via de EventListenerCollection on OpenLayersEObjectWrapper :). A diff would be fine. Looking forward to your patch! Greetings, Edwin On 24 May 2010 16:27, Lukas Johansson <luk...@de...> wrote: > At http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html it is > stated that three events exists concerting the movement of the map: > > # movestart triggered after the start of a drag, pan, or zoom > # move triggered after each drag, pan, or zoom > # moveend triggered after a drag, pan, or zoom completes > > As far as I understand only move has been wrapped in gwt-ol. If I were > to wrap moveend (the one I need) am I correct in believing that I only > need to: > * create a interface MapMoveEndListener > * add eventType to EventType.java > * write a register method in Map.java > > How do I send the changeset to you? A diff of the project? > Best Regards > Lukas Johansson > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |
From: Lukas J. <luk...@de...> - 2010-05-24 14:27:54
|
At http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html it is stated that three events exists concerting the movement of the map: # movestart triggered after the start of a drag, pan, or zoom # move triggered after each drag, pan, or zoom # moveend triggered after a drag, pan, or zoom completes As far as I understand only move has been wrapped in gwt-ol. If I were to wrap moveend (the one I need) am I correct in believing that I only need to: * create a interface MapMoveEndListener * add eventType to EventType.java * write a register method in Map.java How do I send the changeset to you? A diff of the project? Best Regards Lukas Johansson |
From: Edwin C. <com...@gm...> - 2010-05-21 07:32:26
|
Hi all, I had not looked well at the resize event. It appears it is only thrown in FF for window resizes. In IE it does work for elements (http://msdn.microsoft.com/en-us/library/ms536959%28VS.85%29.aspx). Maybe there are workarounds like the YUI resize utility: http://developer.yahoo.com/yui/resize/. However, I am not sure if this actually provides the ability to monitor resizes of any element. Within a specific GUI framework, such as Ext-GWT or SmartGWT the panels will throw resize events and then the application developer would be responible for listening to that event and calling updateSize. However, it would be nice if it would work in native GWT. Greetings, Edwin On 21 May 2010 06:18, Andrew Hughes <ahh...@gm...> wrote: > There isn't a browser event for the resizing of an element... this is less > than ideal but it does work.... > // update the map size every second (only way todo this) > Timer timer = new Timer() { > @Override > public void run() { > mapWidget.getMap().updateSize(); > } > }; > timer.scheduleRepeating(1000); > > If anyone has a better idea, I would love to hear it. > On Tue, Mar 2, 2010 at 8:07 PM, Mikael Couzic > <mik...@cl...> wrote: >> >> Forget it, it doesn't work... >> Last time I'll test it first ! >> >> 2010/3/2 Mikael Couzic <mik...@cl...> >>> >>> I've tried implementing the Map.updateSize() method in GWT-OL, and it >>> works. However, I had to call this method in my client code. >>> For more transparency, we could call updateSize() in the >>> MapWidget.getMap() method, which is responsible of the instanciation of Map >>> : >>> >>> public Map getMap() >>> { >>> //The preference here is lazy initalization >>> if (map == null) >>> { >>> if (options == null) >>> map = new Map(getElement()); >>> else >>> map = new Map(getElement(), options); >>> map.updateSize(); >>> } >>> return map; >>> } >>> >>> What do you think ? >>> >>> >>> 2010/3/2 dan twining <dan...@go...> >>>> >>>> Poul pointed me at a conversation on Nabble that discusses this very >>>> issue. It suggests calling map.updateSize(). This will update the map, but >>>> not if you call it during the entry point method, i.e. it won't work the >>>> first time the map is drawn. >>>> >>>> I suspect that the problem is that the the entry point method is getting >>>> called too early, and that GWT/the browser hasn't placed the map div on the >>>> screen correctly at the time updateSize() is called. >>>> >>>> It is possible to fix this for firefox only, if you add <body >>>> onload="map.updateSize()">, but this doesn't work in Safari, Chrome and IE, >>>> and I need my map to work render correctly when opened in all browsers. >>>> >>>> Does anyone have any other ideas? >>>> >>>> Thanks >>>> >>>> >>>> On 1 March 2010 21:52, dan twining <dan...@go...> wrote: >>>>> >>>>> If anyone's interested, I've put a couple of screenshots of the >>>>> not-quite-fullscreen map here: >>>>> http://dantwining.com/2010/03/01/gwt-openlayers-and-full-screen-maps/ >>>>> >>>>> On 1 March 2010 21:24, dan twining <dan...@go...> wrote: >>>>>> >>>>>> You can give "100%" as the width/height args. It works, but there's a >>>>>> bug in the way that the map initially renders. Or, at least, there's a bug >>>>>> when I try. You can check out my attempt here: >>>>>> >>>>>> https://code.google.com/p/dantwining/source/browse/#svn/trunk/FullScreenMap >>>>>> >>>>>> On 1 March 2010 12:42, David R Robison >>>>>> <drr...@op...> wrote: >>>>>>> >>>>>>> I have attached the MapWidget to the center section of a >>>>>>> DockLayoutPanel. The MapWidget takes two string arguments to define >>>>>>> its >>>>>>> height and width. What I would like to do is to automatically have >>>>>>> the >>>>>>> map expand to fill the available space in its section of the >>>>>>> DockLayoutPanel. This way if the browser is resized the map will >>>>>>> similarly resize. I'm sure this is not hard to do but I am new to >>>>>>> gwt-openlayers. Any thoughts on how to do this? Thanks, David >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> David R Robison >>>>>>> Open Roads Consulting, Inc. >>>>>>> 103 Watson Road, Chesapeake, VA 23320 >>>>>>> phone: (757) 546-3401 >>>>>>> e-mail: drr...@op... >>>>>>> web: http://openroadsconsulting.com >>>>>>> blog: http://therobe.blogspot.com >>>>>>> book: >>>>>>> http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 >>>>>>> >>>>>>> This e-mail communication (including any attachments) may contain >>>>>>> confidential and/or privileged material intended solely for the individual >>>>>>> or entity to which it is addressed. If you are not the intended recipient, >>>>>>> you should immediately stop reading this message and delete it from all >>>>>>> computers that it resides on. Any unauthorized reading, distribution, >>>>>>> copying or other use of this communication (or its attachments) is strictly >>>>>>> prohibited. If you have received this communication in error, please notify >>>>>>> us immediately. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> 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 >>>>>> >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>>> >>> >>> >>> >>> -- >>> Mikael Couzic >>> Pôle Business Intelligence >>> Groupe Cliris >> >> >> >> -- >> Mikael Couzic >> Pôle Business Intelligence >> Groupe Cliris >> >> >> ------------------------------------------------------------------------------ >> 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 >> > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Edwin C. <com...@gm...> - 2010-05-21 06:26:12
|
Hi Andrew, There may not be a native GWT resize event, but I looked up that there is a resize event: http://www.quirksmode.org/dom/events/resize.html This event will be available via JavaScript and therefore can be accessed in GWT with some work. Maybe it is possible to take a look at: http://api.jquery.com/resize/ (it is possible to wrap or port that) This is something a JSNI lib could do (still want to pull of the JSNI helper stuff out of GWT-OL and put it in a separate library)... Greetings, Edwin On 21 May 2010 06:18, Andrew Hughes <ahh...@gm...> wrote: > There isn't a browser event for the resizing of an element... this is less > than ideal but it does work.... > // update the map size every second (only way todo this) > Timer timer = new Timer() { > @Override > public void run() { > mapWidget.getMap().updateSize(); > } > }; > timer.scheduleRepeating(1000); > > If anyone has a better idea, I would love to hear it. > On Tue, Mar 2, 2010 at 8:07 PM, Mikael Couzic > <mik...@cl...> wrote: >> >> Forget it, it doesn't work... >> Last time I'll test it first ! >> >> 2010/3/2 Mikael Couzic <mik...@cl...> >>> >>> I've tried implementing the Map.updateSize() method in GWT-OL, and it >>> works. However, I had to call this method in my client code. >>> For more transparency, we could call updateSize() in the >>> MapWidget.getMap() method, which is responsible of the instanciation of Map >>> : >>> >>> public Map getMap() >>> { >>> //The preference here is lazy initalization >>> if (map == null) >>> { >>> if (options == null) >>> map = new Map(getElement()); >>> else >>> map = new Map(getElement(), options); >>> map.updateSize(); >>> } >>> return map; >>> } >>> >>> What do you think ? >>> >>> >>> 2010/3/2 dan twining <dan...@go...> >>>> >>>> Poul pointed me at a conversation on Nabble that discusses this very >>>> issue. It suggests calling map.updateSize(). This will update the map, but >>>> not if you call it during the entry point method, i.e. it won't work the >>>> first time the map is drawn. >>>> >>>> I suspect that the problem is that the the entry point method is getting >>>> called too early, and that GWT/the browser hasn't placed the map div on the >>>> screen correctly at the time updateSize() is called. >>>> >>>> It is possible to fix this for firefox only, if you add <body >>>> onload="map.updateSize()">, but this doesn't work in Safari, Chrome and IE, >>>> and I need my map to work render correctly when opened in all browsers. >>>> >>>> Does anyone have any other ideas? >>>> >>>> Thanks >>>> >>>> >>>> On 1 March 2010 21:52, dan twining <dan...@go...> wrote: >>>>> >>>>> If anyone's interested, I've put a couple of screenshots of the >>>>> not-quite-fullscreen map here: >>>>> http://dantwining.com/2010/03/01/gwt-openlayers-and-full-screen-maps/ >>>>> >>>>> On 1 March 2010 21:24, dan twining <dan...@go...> wrote: >>>>>> >>>>>> You can give "100%" as the width/height args. It works, but there's a >>>>>> bug in the way that the map initially renders. Or, at least, there's a bug >>>>>> when I try. You can check out my attempt here: >>>>>> >>>>>> https://code.google.com/p/dantwining/source/browse/#svn/trunk/FullScreenMap >>>>>> >>>>>> On 1 March 2010 12:42, David R Robison >>>>>> <drr...@op...> wrote: >>>>>>> >>>>>>> I have attached the MapWidget to the center section of a >>>>>>> DockLayoutPanel. The MapWidget takes two string arguments to define >>>>>>> its >>>>>>> height and width. What I would like to do is to automatically have >>>>>>> the >>>>>>> map expand to fill the available space in its section of the >>>>>>> DockLayoutPanel. This way if the browser is resized the map will >>>>>>> similarly resize. I'm sure this is not hard to do but I am new to >>>>>>> gwt-openlayers. Any thoughts on how to do this? Thanks, David >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> David R Robison >>>>>>> Open Roads Consulting, Inc. >>>>>>> 103 Watson Road, Chesapeake, VA 23320 >>>>>>> phone: (757) 546-3401 >>>>>>> e-mail: drr...@op... >>>>>>> web: http://openroadsconsulting.com >>>>>>> blog: http://therobe.blogspot.com >>>>>>> book: >>>>>>> http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 >>>>>>> >>>>>>> This e-mail communication (including any attachments) may contain >>>>>>> confidential and/or privileged material intended solely for the individual >>>>>>> or entity to which it is addressed. If you are not the intended recipient, >>>>>>> you should immediately stop reading this message and delete it from all >>>>>>> computers that it resides on. Any unauthorized reading, distribution, >>>>>>> copying or other use of this communication (or its attachments) is strictly >>>>>>> prohibited. If you have received this communication in error, please notify >>>>>>> us immediately. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> 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 >>>>>> >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>>> >>> >>> >>> >>> -- >>> Mikael Couzic >>> Pôle Business Intelligence >>> Groupe Cliris >> >> >> >> -- >> Mikael Couzic >> Pôle Business Intelligence >> Groupe Cliris >> >> >> ------------------------------------------------------------------------------ >> 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 >> > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Andrew H. <ahh...@gm...> - 2010-05-21 04:18:42
|
There isn't a browser event for the resizing of an element... this is less than ideal but it does work.... // update the map size every second (only way todo this) Timer timer = new Timer() { @Override public void run() { mapWidget.getMap().updateSize(); } }; timer.scheduleRepeating(1000); If anyone has a better idea, I would love to hear it. On Tue, Mar 2, 2010 at 8:07 PM, Mikael Couzic <mik...@cl... > wrote: > Forget it, it doesn't work... > Last time I'll test it first ! > > 2010/3/2 Mikael Couzic <mik...@cl...> > > I've tried implementing the Map.updateSize() method in GWT-OL, and it >> works. However, I had to call this method in my client code. >> For more transparency, we could call updateSize() in the >> MapWidget.getMap() method, which is responsible of the instanciation of Map >> : >> * >> public Map getMap() >> { >> //The preference here is lazy initalization >> if (map == null) >> { >> if (options == null) >> map = new Map(getElement()); >> else >> map = new Map(getElement(), options); >> map.updateSize(); >> } >> return map; >> }* >> >> What do you think ? >> >> >> 2010/3/2 dan twining <dan...@go...> >> >> Poul pointed me at a conversation on Nabble that discusses this very >>> issue<http://n2.nabble.com/GWt-Openlayers-problem-GOOGLE-layer-appears-in-left-corner-td4619582.html#a4619582>. >>> It suggests calling *map.updateSize()*. This *will *update the map, but >>> *not if you call it during the entry point method*, i.e. it won't work >>> the first time the map is drawn. >>> >>> I suspect that the problem is that the the entry point method is getting >>> called too early, and that GWT/the browser hasn't placed the map div on the >>> screen correctly at the time updateSize() is called. >>> >>> It is possible to fix this *for firefox only*, if you add <body >>> onload="map.updateSize()">, but this doesn't work in Safari, Chrome and IE, >>> and I need my map to work render correctly when opened in all browsers. >>> >>> Does anyone have any other ideas? >>> >>> Thanks >>> >>> >>> >>> On 1 March 2010 21:52, dan twining <dan...@go...> wrote: >>> >>>> If anyone's interested, I've put a couple of screenshots of the >>>> not-quite-fullscreen map here: >>>> >>>> http://dantwining.com/2010/03/01/gwt-openlayers-and-full-screen-maps/ >>>> >>>> >>>> On 1 March 2010 21:24, dan twining <dan...@go...> wrote: >>>> >>>>> You can give "100%" as the width/height args. It works, but there's a >>>>> bug in the way that the map initially renders. Or, at least, there's a bug >>>>> when I try. You can check out my attempt here: >>>>> >>>>> >>>>> https://code.google.com/p/dantwining/source/browse/#svn/trunk/FullScreenMap >>>>> >>>>> >>>>> On 1 March 2010 12:42, David R Robison < >>>>> drr...@op...> wrote: >>>>> >>>>>> I have attached the MapWidget to the center section of a >>>>>> DockLayoutPanel. The MapWidget takes two string arguments to define >>>>>> its >>>>>> height and width. What I would like to do is to automatically have the >>>>>> map expand to fill the available space in its section of the >>>>>> DockLayoutPanel. This way if the browser is resized the map will >>>>>> similarly resize. I'm sure this is not hard to do but I am new to >>>>>> gwt-openlayers. Any thoughts on how to do this? Thanks, David >>>>>> >>>>>> -- >>>>>> >>>>>> David R Robison >>>>>> Open Roads Consulting, Inc. >>>>>> 103 Watson Road, Chesapeake, VA 23320 >>>>>> phone: (757) 546-3401 >>>>>> e-mail: drr...@op... >>>>>> web: http://openroadsconsulting.com >>>>>> blog: http://therobe.blogspot.com >>>>>> book: >>>>>> http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 >>>>>> >>>>>> This e-mail communication (including any attachments) may contain >>>>>> confidential and/or privileged material intended solely for the individual >>>>>> or entity to which it is addressed. If you are not the intended recipient, >>>>>> you should immediately stop reading this message and delete it from all >>>>>> computers that it resides on. Any unauthorized reading, distribution, >>>>>> copying or other use of this communication (or its attachments) is strictly >>>>>> prohibited. If you have received this communication in error, please notify >>>>>> us immediately. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> 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 >>>>>> >>>>> >>>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >> >> >> -- >> Mikael Couzic >> Pôle Business Intelligence >> Groupe Cliris >> > > > > -- > Mikael Couzic > Pôle Business Intelligence > Groupe Cliris > > > ------------------------------------------------------------------------------ > 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 > > |
From: Andrew H. <ahh...@gm...> - 2010-05-21 04:14:52
|
This is really about css rules. I recommend you go take a look at <div> based layout in css and how they differ from (the abusive and evil use of) <table> based layout. Try and use div's, GWT 2.0's LayoutPanels were put there for this reason :) Then, when you run your app use firebug or chrome to peep at the html output of your app... you might find some <tables> where you expect to see <div> and you can also manually manipulate the css and html/elements at runtime to test/debug on the fly in the browser. Unfortunately these css problems are often a time sink, so be prepared. On Mon, Mar 8, 2010 at 1:39 PM, Christopher Navarro <cna...@gm...>wrote: > Is there a way to dynamically resize the Map in GWT-OL so that it takes up > all of the available browser window space? > > Thanks, > Chris > > > ------------------------------------------------------------------------------ > 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 > > |
From: Hans T. M. <han...@ho...> - 2010-05-19 14:50:02
|
Hi. I'm having some difficulties with displaying markers when using the OSM class as the base layer. When using a WMS layer it displays correctly, but when I change to OSM it don't get the coordinates and are then displayed at the center of the map. Can someone explain this? *Sample code from my project:* public class Tutorial1 implements EntryPoint { private MapOptions mapOptions; private MapWidget mapWidget; private Map map; private OSM osmLayer; private Markers markers; private Marker marker; private LonLat center; private LonLat markerPosition; private Size size; private Icon icon; private DockPanel dockPanel; public void onModuleLoad() { mapOptions = new MapOptions(); mapOptions.setControls(new JObjectArray(new JSObject[] {})); mapOptions.setProjection("EPSG:900913"); mapOptions.setDisplayProjection(new Projection("EPSG:4326")); mapOptions.setMaxExtent(new Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34)); mapOptions.setNumZoomLevels(19); mapOptions.setUnits("m"); mapWidget = new MapWidget("1000px", "500px", mapOptions); map = mapWidget.getMap(); map.addControl(new PanZoomBar()); map.addControl(new MousePosition()); map.addControl(new MouseToolbar()); map.addControl(new LayerSwitcher()); center = new LonLat(0, 0); map.setCenter(center, 3); osmLayer = OSM.Mapnik("OpenStreetMap"); markers = new Markers("marker layer"); map.addLayers(new Layer[] {osmLayer, markers}); markerPosition = new LonLat(-73.99112, 40.77060); size = new Size(10,17); icon = new Icon("img/marker.png", size); marker = new Marker(markerPosition, icon); markers.addMarker(marker); dockPanel = new DockPanel(); dockPanel.add(mapWidget, DockPanel.CENTER); dockPanel.setBorderWidth(1); RootPanel.get("map").add(dockPanel); } } Cheers, Hans |
From: Edwin C. <com...@gm...> - 2010-05-02 20:51:19
|
Hi Hans, Did you try the suggestions by Jon Britton? Appararently he got it working with the latest snapshot (see gwt-ol website for link). I found an older post by Carsten in the mailing list who got OSM working as well and gave some example code. The wrapper code is just a very thin, easy to understand layer (have a look at some of the Layer classes), so if you know how it works in Javascript it should be a small step to work out how it works in GWT, or how it should work in GWT. If I look at the OpenLayers code for a simple OSM map (http://openlayers.org/dev/examples/) it should be as easy to add an OSM layer to the map as: layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); map.addLayer(layer); However, if I look at the OSM implementation in GWT-OL it is returning an OSM layer like this: return new $wnd.OpenLayers.Layer.OSM.Mapnik(name) This is a constructor as it appears in http://www.openstreetmap.org/openlayers/OpenStreetMap.js, which calls the plain OSM constructor, but adds some extra (perhaps unwanted) options. It is unclear to me at this point, when to use or when not to use the 'OpenStreetMap.js' code. This dependency is not in any of the current OpenLayers examples I could find on http://openlayers.org/dev/examples/, and I always found it a bit murky why OSM is hosting their own little library on top of OpenLayers instead of contributing it to OL core. The advanced OSM examples of OpenLayers are not even using OSM for the rasters, but a WMS layer portraying OSM data. Possibly, this is necessary to do the advanced features, but even if you just want the OSM layers as background you could consider adding them as WMS layers as in the Advanced OSM example. If anybody knows what is the present best way to use OSM with OpenLayers please let me know. I guess we do not want to break code that already depends on the existing OSM, but we do want to get up-to-date. Greetings, Edwin Commandeur 2010/5/2 Hans Terje Møller <han...@ho...>: > Hi. > > I worte to you a few weeks ago about using OSM in gwt-openlayers. Do you > know about someone in your development group that could help me understand > how to use the OSM class? > If you do, please send me their e-mail adress. > > Thanks in advance! > > Regards, > Hans Terje Møller > |
From: Brad K. <br...@gm...> - 2010-04-23 12:33:42
|
The way I did this is probably not the best, but you can get the div of the marker (parent in code below),and add a child element to put the text in: DivElement datablock = com.google.gwt.dom.client.Document.get().createDivElement(); datablock.setClassName("matm-datablock"); // css style datablock.setId(uniqueID); datablock.setInnerText(this.toString()); parent.appendChild(datablock); The nice thing is then you can style it however you like. Brad - Show quoted text - On Fri, Apr 23, 2010 at 7:24 AM, Ron Zohar <rz...@gm...> wrote: > Hello, > > is there a way to set a label or a bubble as in google maps api ? > > -- Ron > -- > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > > ------------------------------------------------------------------------------ > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |
From: Ron Z. <rz...@gm...> - 2010-04-23 11:24:51
|
Hello, is there a way to set a label or a bubble as in google maps api ? -- Ron -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 |
From: Ron Z. <rz...@gm...> - 2010-04-23 11:23:57
|
Hello, i extended the MapExample.initMapWidget to use OSM as follows: Markers markers = new Markers(""); this.map.addLayer(markers); Layer osm = OSM.Mapnik(""); osm.setIsBaseLayer(true); map.addLayer(osm); add(mapWidget, DockPanel.CENTER); markers.addMarker(new Marker(new LonLat(-122.3235810559386, 47.59126434612684))); the marker is somewhere in Seattle USA. On the WMS layer the marker is correctly displayed. On the OSM layer it is displayed in Africa. What am i doing wrong ??? -- Ron -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 |
From: Jon B. <jon...@go...> - 2010-04-23 10:22:23
|
Hi Edwin, Thanks for this and the other update. I'll check them out now :-) Jon On 22 April 2010 22:58, Edwin Commandeur <com...@gm...> wrote: > Hi John, > > Check the Layer.addOptions method in the latest source: > > > http://gwt-openlayers.sourceforge.net/latest/openlayers_gwt-0.5-SNAPSHOT.jar > > Greetings, > Edwin > > On 20 April 2010 15:59, Jon Britton <jon...@go...> wrote: > > Hi, > > Currently the Layer.addOptions(..) method is not available in > > gwt-openlayers. I've created a ticket for this, but would really > appreciate > > any updates regarding this issue. > > Thanks! > > Jon > > > ------------------------------------------------------------------------------ > > 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 > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |
From: Edwin C. <com...@gm...> - 2010-04-22 21:58:23
|
Hi John, Check the Layer.addOptions method in the latest source: http://gwt-openlayers.sourceforge.net/latest/openlayers_gwt-0.5-SNAPSHOT.jar Greetings, Edwin On 20 April 2010 15:59, Jon Britton <jon...@go...> wrote: > Hi, > Currently the Layer.addOptions(..) method is not available in > gwt-openlayers. I've created a ticket for this, but would really appreciate > any updates regarding this issue. > Thanks! > Jon > ------------------------------------------------------------------------------ > 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 > > |
From: Edwin C. <com...@gm...> - 2010-04-22 21:57:54
|
Hi John, Check the OpenLayers.setImageReloadAttempts method in the latest source: http://gwt-openlayers.sourceforge.net/latest/openlayers_gwt-0.5-SNAPSHOT.jar Greetings, Edwin On 20 April 2010 16:36, Jon Britton <jon...@go...> wrote: > Hi, > How can I set the number of image reload attempts for WMS layers using > gwt-openlayers? > Cheers, > Jon > ------------------------------------------------------------------------------ > 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 > > |