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: Wigger T. <but...@ho...> - 2011-03-03 22:30:38
|
Dear List, In my web application using gwt-openlayers 0.5 and GWT 2.04 I am experiencing a rather annoying problem. When I initially load a WMS, it is visualized without a problem. When I zoom, however, the WMS is shifted, most of the time to the south east. After every pan/ zoom action the offset is difference. When I use firebug in firefox I see can see that the DIV that contains the image has a top and left offset as can be seen below: <div style="overflow: hidden; position: absolute; z-index: 1; left: 218px; top: 96px; width: 1004px; height: 496px;"><img id="OpenLayersDiv499" style="width: 1004px; height: 496px; position: relative;" class="olTileImage" src="xxxxxx/deegree/services?FORMAT=image%2Fpng&TRANSPARENT=TRUE&LAYERS=Lakes%20Rwanda&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&_OLSALT=0.7358005342568256&BBOX=3186029.3265993,-283703.63671876,3493000.4269411,-132052.57519532&WIDTH=1004&HEIGHT=496"></div> The image that is returned by Deegree is fine by the way. Does anyone have an idea what is going wrong and what I can do to solve it? Thanks in advance! Best,Willem |
From: John P. <byh...@gm...> - 2011-02-06 21:57:58
|
Hi All, Further to my problem, I have noticed that I can load and display WFS layers ok. The problem is really with the WMS layers. Can anyone say whether I would take a performance hit if I switched to using WFS layers with bounding boxes for my vector data (most of my data is vector) rather than WMS layers. John |
From: John P. <byh...@gm...> - 2011-02-06 14:46:17
|
Hi All, I have a gwt-openlayers application working well overlaying multiple wms layers (mapOptions.setAllOverlays(true)), each with a different projection, and setting the map projection to my local projection (EPSG:24200). Now I want to be able to add a google maps layer as another layer to use, but when I load it I get an image of the world spead out about 4 times, side by side. The code I'm using is below: // ========================================================================= // // Defining a WMS and adding it to the map WMSParams wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("WMSLayer1"); wmsParams.setIsTransparent(true); wmsParams.setStyles(""); WMSOptions wmsLayerParams = new WMSOptions(); wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE); wmsLayerParams.setBuffer(0); wmsLayerParams.setSingleTile(false); wmsLayerParams.setLayerOpacity(1.0); Bounds layerBounds = ProjectionUtilities.transform(new Bounds(100000,100000,350000,200000), "EPSG:24100", "EPSG:24200"); wmsLayerParams.setMaxExtent(layerBounds); // set the layer projection to the display projection so that // any necessary reprojection can be done on the server wmsLayerParams.setProjection("EPSG:24200"); WMS wmsLayer = new WMS("WMSLAyer1", "http://localhost/geoserver/wms", wmsParams, wmsLayerParams); // add layer projection for later use wmsLayer.getJSObject().setProperty("srs", "EPSG:24100"); // Add layer to open layers map map.addLayer(wmsLayer); wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("WMSLayer2"); wmsParams.setIsTransparent(true); wmsParams.setStyles(""); wmsLayerParams = new WMSOptions(); wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE); wmsLayerParams.setBuffer(0); wmsLayerParams.setSingleTile(false); wmsLayerParams.setLayerOpacity(1.0); layerBounds = ProjectionUtilities.transform(new Bounds(500000,500000,850000,700000), "EPSG:24200", "EPSG:24200"); wmsLayerParams.setMaxExtent(layerBounds); // set the layer projection to the display projection so that // any necessary reprojection can be done on the server wmsLayerParams.setProjection("EPSG:24200"); wmsLayer = new WMS("WMSLAyer2", "http://localhost/geoserver/wms", wmsParams, wmsLayerParams); // add layer projection for later use wmsLayer.getJSObject().setProperty("srs", "EPSG:24200"); // Add layer to open layers map map.addLayer(wmsLayer); GoogleOptions gOptions = new GoogleOptions(); gOptions.setSphericalMercator(true); gOptions.setDisplayInLayerSwitcher(false); gOptions.setDisplayOutsideMaxExtent(true); // gOptions.setNumZoomLevels(22); gOptions.setLayerOpacity(1.0); layerBounds = ProjectionUtilities.transform(new Bounds( Double.parseDouble(layer.getMinx()), Double.parseDouble(layer.getMiny()), Double.parseDouble(layer.getMaxx()), Double.parseDouble(layer.getMaxy())), "EPSG:900913", "EPSG:24200"); gOptions.setMaxExtent(layerBounds); gOptions.setIsBaseLayer(false); // GMapType gmapType = GMapType.G_SATELLITE_MAP; // gOptions.setType(gmapType); Google gLayer = new Google(layer.getTitle(), gOptions); // Add layer to open layers map map.addLayer(gLayer); map.setCenter(layerBounds.getCenterLonLat()); // ========================================================================= // I've tried setting the google maps layer to base layer but that changed nothing. If I load only the google maps layer it still displays the world multiple times side by side, and when I zoom to my location and then load one of the other layers, I don't see it so I guess the projection stuff isn't working. I have the following projection javascripts and definitions loaded: <script src="openlayers/proj4js/proj4js-compressed.js"></script> <script src="openlayers/proj4js/projCode/lcc.js"></script> <script src="openlayers/proj4js/projCode/merc.js"></script> <script src="openlayers/proj4js/projCode/tmerc.js"></script> <script src="openlayers/proj4js/defs/EPSG.js"></script> <script src="openlayers/OpenLayers.js"></script> where EPSG.js contains: Proj4js.defs["EPSG:24100"] = "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=167638.49597 +y_0=121918.90616 +a=6378249.144808011 +b=6356514.966204134 +to_meter=0.3047972654 +no_defs"; Proj4js.defs["EPSG:24200"] = "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=250000 +y_0=150000 +ellps=clrk66 +units=m +no_defs"; Proj4js.defs["EPSG:3448"] = "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=750000 +y_0=650000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"; Proj4js.defs["EPSG:32618"] = "+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"; Proj4js.defs["EPSG:900913"] = "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"; Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"; I've also tried setting my display projection to EPSG:900913 but the result is the same. Can anyone see what I'm doing wrong. John |
From: Jared E. <jar...@gm...> - 2011-02-04 00:56:17
|
Adding $wnd to new Array() expressions works for every browser but Safari: https://bugs.webkit.org/show_bug.cgi?id=17250 See this post for more information: http://forums.instantiations.com/viewtopic.php?f=11&t=1719&start=15#p6476 According to the previous link, the solution is use a function from the main window (e.g. $wnd.newArray()). Could we add the following function to org.gwtopenmaps.openlayers.public.js.gwt-openlayers.util.js: gwt_openlayers_util.newArray = function(){ return new Array(); } Jared On Feb 3, 2011, at 4:32 AM, Edwin Commandeur wrote: > Hi Alexander, > > That is a really useful improvement. Crazy enough I had never thought > about adding $wnd in a new Array() expression. There is a utility > function in GWT-OL to get around it, but your solution is much simpler > and much more elegant! > > Greetings, > Edwin > > On 3 February 2011 01:06, Alexander Solovets <aso...@gm...> wrote: >> I think I can tell about some tiny improvements here rather than send >> whole file with added 3-4 chars. So the first most important >> improvement - to prepend "new Array()", "new Object()", "new >> Function()" with "$wnd" in JSObjectHelper, then GWT won't break >> 'instanceof' operator =) I was working on let SelectFeature accept >> array of layers, when notice that 'instanceof' was broken. I tried >> JavaScriptObject.createArray() and it didn't work, then I created >> array by myself by native method "new $wnd.Array()". And it has >> succedded! Diggen into GWT-OL a bit I've noticed that JSObject copied >> JavaScriptObject functionality except that it created arrays as "new >> Array()". I tried it and have failed because didn't noticed "$wnd" >> absence. That is how I come up with my conclusion. >> >> Hope that will help others. >> >> On Wed, Feb 2, 2011 at 8:57 PM, Edwin Commandeur >> <com...@gm...> wrote: >>> Hi Alexander, >>> >>> Great that you like GWT-OL. I would be very interested in your >>> additions to the project. Sending them in an Archive is fine, I can >>> run Beyond Compare to see what's changed. >>> >>> You can also try a Hg export if you have made the changes against a >>> recent clone of Hg repo. >>> >>> Greetings, >>> Edwin >>> >>> On 2 February 2011 08:30, Alexander Solovets <aso...@gm...> wrote: >>>> Hello! >>>> >>>> My name is Alexander. First of all let me thank you for such a >>>> binding! I can find almost all I want from original OpenLayers. But in >>>> fact some classes are missing and others does not implement some >>>> required methods, so I have to add them by myself. Since I've already >>>> accumulated several implementations I would like to share them with >>>> others. If it is possible I could send an archive with source code. >>>> >>>> Thanks >>>> >>>> -- >>>> Regards, Alexander. >>>> >>>> ------------------------------------------------------------------------------ >>>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >>>> Finally, a world-class log management solution at an even better price-free! >>>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >>>> February 28th, so secure your free ArcSight Logger TODAY! >>>> http://p.sf.net/sfu/arcsight-sfd2d >>>> _______________________________________________ >>>> Gwt-openlayers-users mailing list >>>> Gwt...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >>>> >>> >> > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Edwin C. <com...@gm...> - 2011-02-03 12:32:26
|
Hi Alexander, That is a really useful improvement. Crazy enough I had never thought about adding $wnd in a new Array() expression. There is a utility function in GWT-OL to get around it, but your solution is much simpler and much more elegant! Greetings, Edwin On 3 February 2011 01:06, Alexander Solovets <aso...@gm...> wrote: > I think I can tell about some tiny improvements here rather than send > whole file with added 3-4 chars. So the first most important > improvement - to prepend "new Array()", "new Object()", "new > Function()" with "$wnd" in JSObjectHelper, then GWT won't break > 'instanceof' operator =) I was working on let SelectFeature accept > array of layers, when notice that 'instanceof' was broken. I tried > JavaScriptObject.createArray() and it didn't work, then I created > array by myself by native method "new $wnd.Array()". And it has > succedded! Diggen into GWT-OL a bit I've noticed that JSObject copied > JavaScriptObject functionality except that it created arrays as "new > Array()". I tried it and have failed because didn't noticed "$wnd" > absence. That is how I come up with my conclusion. > > Hope that will help others. > > On Wed, Feb 2, 2011 at 8:57 PM, Edwin Commandeur > <com...@gm...> wrote: >> Hi Alexander, >> >> Great that you like GWT-OL. I would be very interested in your >> additions to the project. Sending them in an Archive is fine, I can >> run Beyond Compare to see what's changed. >> >> You can also try a Hg export if you have made the changes against a >> recent clone of Hg repo. >> >> Greetings, >> Edwin >> >> On 2 February 2011 08:30, Alexander Solovets <aso...@gm...> wrote: >>> Hello! >>> >>> My name is Alexander. First of all let me thank you for such a >>> binding! I can find almost all I want from original OpenLayers. But in >>> fact some classes are missing and others does not implement some >>> required methods, so I have to add them by myself. Since I've already >>> accumulated several implementations I would like to share them with >>> others. If it is possible I could send an archive with source code. >>> >>> Thanks >>> >>> -- >>> Regards, Alexander. >>> >>> ------------------------------------------------------------------------------ >>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >>> Finally, a world-class log management solution at an even better price-free! >>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >>> February 28th, so secure your free ArcSight Logger TODAY! >>> http://p.sf.net/sfu/arcsight-sfd2d >>> _______________________________________________ >>> Gwt-openlayers-users mailing list >>> Gwt...@li... >>> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >>> >> > |
From: Edwin C. <com...@gm...> - 2011-02-02 10:57:12
|
Hi Alexander, Great that you like GWT-OL. I would be very interested in your additions to the project. Sending them in an Archive is fine, I can run Beyond Compare to see what's changed. You can also try a Hg export if you have made the changes against a recent clone of Hg repo. Greetings, Edwin On 2 February 2011 08:30, Alexander Solovets <aso...@gm...> wrote: > Hello! > > My name is Alexander. First of all let me thank you for such a > binding! I can find almost all I want from original OpenLayers. But in > fact some classes are missing and others does not implement some > required methods, so I have to add them by myself. Since I've already > accumulated several implementations I would like to share them with > others. If it is possible I could send an archive with source code. > > Thanks > > -- > Regards, Alexander. > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |
From: Alexander S. <aso...@gm...> - 2011-02-02 07:30:24
|
Hello! My name is Alexander. First of all let me thank you for such a binding! I can find almost all I want from original OpenLayers. But in fact some classes are missing and others does not implement some required methods, so I have to add them by myself. Since I've already accumulated several implementations I would like to share them with others. If it is possible I could send an archive with source code. Thanks -- Regards, Alexander. |
From: Edwin C. <com...@gm...> - 2011-01-29 07:40:18
|
Hi Jared, Looking at your patch I only see code for the example but not for the implementation of the Tilecache layer. Could you check where the code for the Tilecache layer went. If hg export does not work you can also send me the files to add. Greetings, Edwin On 28 January 2011 03:58, Jared Erickson <jar...@gm...> wrote: > Hi all, > > I just started using this GWT OpenLayers and I was hoping to contribute a OpenLayers.Layer.TileCache layer implementation and an example in the showcase. I am very new to Mercurial. I produced the attached diff with the 'hg export tip' command. Is this the right way to create diffs? I ran into a nasty WebKit bug (https://bugs.webkit.org/show_bug.cgi?id=17250) while dealing with JavaScript arrays. The TileCache layers calls 'instanceof Array'. The usual idiom of creating a new javascript array and copying values worked everywhere but in Safari. But you already had a solution: util.js and gwt_openlayers_util.convertToArray. Thanks for the great library. I hope to be able to contribute more in the future! > > Thanks, > Jared > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Edwin C. <com...@gm...> - 2011-01-29 07:35:55
|
Hi Jared, Great to hear that you are using GWT-OpenLayers and that you are liking it. I will have a look at the TileCache layer implementation, which would be a very useful contribution! Hg export is the easiest way to send patches when they cannot be pulled in from a public repo. I will send out an email on the developer list to move the code repository to BitBucket, as BitBucket has the repos over https and makes it easy for other BitBucket users to make clones from which patches can be pulled. Greetings, Edwin On 28 January 2011 03:58, Jared Erickson <jar...@gm...> wrote: > Hi all, > > I just started using this GWT OpenLayers and I was hoping to contribute a OpenLayers.Layer.TileCache layer implementation and an example in the showcase. I am very new to Mercurial. I produced the attached diff with the 'hg export tip' command. Is this the right way to create diffs? I ran into a nasty WebKit bug (https://bugs.webkit.org/show_bug.cgi?id=17250) while dealing with JavaScript arrays. The TileCache layers calls 'instanceof Array'. The usual idiom of creating a new javascript array and copying values worked everywhere but in Safari. But you already had a solution: util.js and gwt_openlayers_util.convertToArray. Thanks for the great library. I hope to be able to contribute more in the future! > > Thanks, > Jared > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > |
From: Jared E. <jar...@gm...> - 2011-01-28 02:58:37
|
Hi all, I just started using this GWT OpenLayers and I was hoping to contribute a OpenLayers.Layer.TileCache layer implementation and an example in the showcase. I am very new to Mercurial. I produced the attached diff with the 'hg export tip' command. Is this the right way to create diffs? I ran into a nasty WebKit bug (https://bugs.webkit.org/show_bug.cgi?id=17250) while dealing with JavaScript arrays. The TileCache layers calls 'instanceof Array'. The usual idiom of creating a new javascript array and copying values worked everywhere but in Safari. But you already had a solution: util.js and gwt_openlayers_util.convertToArray. Thanks for the great library. I hope to be able to contribute more in the future! Thanks, Jared |
From: fatzopilot <fat...@gm...> - 2011-01-24 22:15:53
|
Hi, I've searched and tried a lot but could not find a satisfying answer for this. Most of the time, examples are for openlayer (sans gwt-) only, e.g. something like var newLayer = new OpenLayers.Layer.OSM("New Layer", "URL_TO_TILES/${z}/${x}/${y}.png", {numZoomLevels: 19}); map.addLayer(newLayer); There does not seem to be a constructor in the GWT Version allowing a custom URL, i.e. there is no OSM osmLayer = OSM("Main", "path to server/${z}/${x}/${y}") constructor or similar. I also tried the XYZ slippy map, but this only shows the northern hemisphere, albeit the server is able to deliver tiles for the southern hemisphere as well. But maybe this is just a configuration thing. What would be the recommended way? Thanks |
From: Armando F. <arm...@gm...> - 2011-01-23 15:14:39
|
Hi, I thought this was a simple enough exercise... I did refrain myself from asking for help here... but after two days of messing around with all the combinations I could try and getting a massive headhache, here I am. I am trying do display a GeoServer WMS layer on top of OSM and gMap base layers. I would be more than happy with a single base layer though! I understand that both OSM and gMap are in EPSG:900913 and, unless I host my own OSM, I'm stuck with this projection. But that's fine, I'll reproject my own WMSs (originally in EPSG:27700, British Coord Sys). Only it does not work. All sorts of things happen: the WMS display correctly on top of OSM only to disappear when I zoom further in (and this is the closest I got to a working app!). Is there a working example somewhere? Again, all I'm trying to achieve is displaying my own WMSs (and perhaps WMSs too) on top of a base layer (osm, gmap, bing, anything). Below is what I've done. Thank you. MapOptions defaultMapOptions = new MapOptions(); defaultMapOptions.setAllOverlays(true); MapWidget mapWidget = new MapWidget("400px", "300px", defaultMapOptions); WMSParams wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("my_wms"); // this is forced declared in GeoServer from its native 27700 to 900913, but I tried a native 900913 too with no luck wmsParams.setStyles(""); wmsParams.setIsTransparent(true); WMS wmsLayer = new WMS("WMS Layer", "http://myip:8080/geoserver/wms", wmsParams); wmsLayer.setIsBaseLayer(false); GoogleOptions googleLayeroptions= new GoogleOptions(); googleLayeroptions.setSphericalMercator(true); GMapType gmapType = GMapType.G_NORMAL_MAP; googleLayeroptions.setType(gmapType); Google googleLayer = new Google("Goole Layer",googleLayeroptions); OSM osm = OSM.Osmarender("Osmarender"); // as I said, I could do with a single base layer. Map map = mapWidget.getMap(); map.addLaye(wmsLayer); map.addLayer(osm); map.addLayer(googleLayer); map.addControl(new LayerSwitcher()); map.addControl(new MousePosition()); |
From: <th...@gm...> - 2011-01-20 03:17:22
|
Hello List, Just wondering why G_PHYSICAL_MAP is missing from GMapType. So, using pure javascript, I can say: var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP, 'sphericalMercator': true} ); in order to display a shaded relief type map, which is really a nice looking map. Switching to GWT-Openlayers, I don't have the opportunity to use G_PHYSICAL_MAP . Is there something legal behind this? Can you please add G_PHYSICAL_MAP so I can grab this functionality from the nightly build? ...or would I need add it myself and build my own module? Thanks in advance for any info. -Tom |
From: Manos K. <mk...@di...> - 2011-01-12 22:50:34
|
Hi all! I am currently developing an app exposing numerous layers on an OpenLayers map. The majority of them are exposed and queried successfully with the use of a GeoServer installation on a remote server (I am mentioning this because the proxy doesn't seem to be my problem). However, some of the layers I am exposing are plain kml-encoded vectors. In their case, the code I am using displays different behavior depending on where I deploy it. To be more specific, my SelectFeatureListeners work correctly ONLY when the code is deployed in the AppEngine and loaded on Chrome. On the other hand, on any other browser, while these features are property visualized and I can select them, no event is triggered from their selection. The same goes when I deploy my app in tomcat. A snippet of my code is the following: KML responseFormat = new KML(); kmlLayer.addFeatures(responseFormat.read(kmlText)); mapWidget.getMap().addLayer(kmlLayer); queriesAndKML.put(cb.getText(), result.get(0)); SelectFeatureOptions kmlSelectOpts = new SelectFeatureOptions(); SelectFeature kmlSelect = new SelectFeature(kmlLayer, kmlSelectOpts); kmlSelectOpts.onSelect(new SelectFeatureListener() { @Override public void onFeatureSelected(VectorFeature vectorFeature) { System.out.println("Clicked indeed"); FramedCloud cloud = new FramedCloud("Custom Query", vectorFeature.getCenterLonLat(), new Size(300,300), new KML().write(vectorFeature) , new Icon("", new Size(0,0), new Pixel(0,0)),true); map.addPopup(cloud); } }); mapWidget.getMap().addControl(kmlSelect); kmlSelect.activate(); Using a ClickFeatureListener didn't make any difference, there was no improvement. Am I missing something?? Thanks, Manos |
From: John P. <byh...@gm...> - 2011-01-12 17:21:43
|
Thanks for the help so far. I've got the two maps overlaying ok now but I have another problem. I use the GetFeatureInfo control to capture the click event and send a getfeatureinfo query to the geoserver which returns with text ok. Now I take the xy object returned and transform the coordinates to each of the layer projections to get a bounding box in each layers coordinate system to request features. That request returns with WKT data and I use the following code to turn it into feature objects reprojected into the map display projection. My problem is that the reprojection does not seem to take place, and the bounding box of the returned features remains in the layer coordinates and the data is not shown on the map. JSObject params = JSObjectHelper.createObject(); params.setProperty("request", "getfeature"); params.setProperty("service", "wfs"); params.setProperty("version", "1.0"); params.setProperty("typename", "feature1"); params.setProperty("maxFeatures", 10); params.setProperty("bbox",ProjectionUtilities.transform(bbox, mapProjection, layerProjection).toBBox(0)); MyHTTPRequestUtilities.loadFeature("http://localhost:8086/geoserver/wfs", params, new RequestCallback() { public void onSuccess(String response) { // erase any previously highlighted layers WKTOptions options = new WKTOptions(); options.setInternalProjection(new Projection(layerProjection)); options.setExternalProjection(new Projection(mapProjection)); VectorFeature[] vf = new GML().read(response, options); for (int i=0; i<vf.length; i++) { if (i==0) com.google.gwt.user.client.Window.alert("FEATURE[0]="+vf[i].getFeatureId()+", BOUNDS:"+vf[i].getGeometry().getBounds().toBBox(0)); selectedLayer.addFeature(vf[i]); } } public void onFailure(String exception) { } } Is there something I'm missing. John On Wed, Jan 12, 2011 at 9:02 AM, Edwin Commandeur <com...@gm...> wrote: > Hi John, > > For transforming vector data you will have to include proj4js. The > OpenLayers transform methods are adapters to proj4js functionality. > > For reprojecting raster layers, or at least WMS layers, there is no > standard functionality. > > On one project I worked on we had a Control to switch projections and > others have also put this in a custom control: > http://dev.bnhelp.cz/trac/hslayers/browser/trunk/source/HSLayers/Control/ProjectionSwitcher.js?rev=4246 > > You can also check the OL sandboxes if people have worked on this: > http://dev.openlayers.org/sandbox/ > > Greetings, > Edwin > > On 11 January 2011 21:09, John Preston <byh...@gm...> wrote: >> I have a problem getting reprojection of wms layer maps working and I >> would apprciate if someone could tell me what I'm doing wrong. >> >> I have two maps in two different projections and I would like to >> overlay them. I use the following code to do this. >> >> ////////////////////////////////////////////////////////////////////////////////////////// >> MapOptions mapOptions = new MapOptions(); >> mapOptions.setNumZoomLevels(10); >> mapOptions.setProjection("EPSG:3448"); >> mapOptions.setDisplayProjection(new Projection("EPSG:3448")); >> >> mapOptions.setUnits("m"); >> mapOptions.setMaxExtent(new Bounds(100000, 100000, 900000, 700000)); >> mapOptions.setAllOverlays(true); >> mapOptions.setMaxResolutionToAuto(); >> >> mapWidget = new MapWidget("100%", "100%", mapOptions); >> add(mapWidget, new BorderLayoutData(LayoutRegion.CENTER)); >> Map map = mapWidget.getMap(); >> >> // Defining a WMS and adding it to the map >> WMSParams wmsParams = new WMSParams(); >> wmsParams.setFormat("image/png"); >> wmsParams.setLayers("area1"); >> wmsParams.setIsTransparent(true); >> wmsParams.setStyles(""); >> >> WMSOptions wmsLayerParams = new WMSOptions(); >> wmsLayerParams.setBuffer(0); >> wmsLayerParams.setSingleTile(false); >> wmsLayerParams.setMaxExtent(new Bounds(100000, 100000, 300000, 200000)); >> wmsLayerParams.setProjection("EPSG:24200"); >> WMS wmsLayer = new WMS("First map on old projection", >> "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); >> >> // Add layer to open layers map >> map.addLayer(wmsLayer); >> >> // Defining a WMS and adding it to the map >> wmsParams = new WMSParams(); >> wmsParams.setFormat("image/png"); >> wmsParams.setLayers("area2"); >> wmsParams.setIsTransparent(true); >> wmsParams.setStyles(""); >> >> wmsLayerParams = new WMSOptions(); >> wmsLayerParams.setBuffer(0); >> wmsLayerParams.setSingleTile(false); >> wmsLayerParams.setMaxExtent(new Bounds(500000, 500000, 800000, 700000)); >> wmsLayerParams.setProjection("EPSG:24200"); >> WMS wmsLayer = new WMS("Second map in new projection", >> "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); >> >> // Add layer to open layers map >> map.addLayer(wmsLayer); >> >> map.setCenter(new LonLat(400000, 400000)); >> ////////////////////////////////////////////////////////////////////////////////////////// >> >> The two maps hold data for adjacent areas but they are in different >> projections. I want to be able to set the map display projection to >> one of the projections, EPSG:3448 for instance, and re-project (on the >> fly) the other map so I can overlay them. Hence I set the map display >> projection to EPSG:3448, and when I am creating the wms layer I set >> the srs of the request to the display projection. However I get an >> empty map if I do this. When I set the projection of the wms request >> to the projection of the data it contains then I get the map but it >> has not been reprojected. I've searched for a simple reprojection >> example to try and follow but I can't find any. >> >> I've also noticed that if I try to tranform coordinates from one >> projection to another I get no change. When I try the following code >> the coordinates of the lonlat object remain the same instead of them >> being offset by about 500000 for the x and y values. >> >> LonLat pt = new LonLat(250000, 140000); >> pt.transform("EPSG:3448", "EPSG:24200"); >> >> Do I need to include some extra javascripts to get the projection working. >> >> Can anyone help me. >> >> John >> >> ------------------------------------------------------------------------------ >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> Gwt-openlayers-users mailing list >> Gwt...@li... >> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >> > |
From: Edwin C. <com...@gm...> - 2011-01-12 14:02:54
|
Hi John, For transforming vector data you will have to include proj4js. The OpenLayers transform methods are adapters to proj4js functionality. For reprojecting raster layers, or at least WMS layers, there is no standard functionality. On one project I worked on we had a Control to switch projections and others have also put this in a custom control: http://dev.bnhelp.cz/trac/hslayers/browser/trunk/source/HSLayers/Control/ProjectionSwitcher.js?rev=4246 You can also check the OL sandboxes if people have worked on this: http://dev.openlayers.org/sandbox/ Greetings, Edwin On 11 January 2011 21:09, John Preston <byh...@gm...> wrote: > I have a problem getting reprojection of wms layer maps working and I > would apprciate if someone could tell me what I'm doing wrong. > > I have two maps in two different projections and I would like to > overlay them. I use the following code to do this. > > ////////////////////////////////////////////////////////////////////////////////////////// > MapOptions mapOptions = new MapOptions(); > mapOptions.setNumZoomLevels(10); > mapOptions.setProjection("EPSG:3448"); > mapOptions.setDisplayProjection(new Projection("EPSG:3448")); > > mapOptions.setUnits("m"); > mapOptions.setMaxExtent(new Bounds(100000, 100000, 900000, 700000)); > mapOptions.setAllOverlays(true); > mapOptions.setMaxResolutionToAuto(); > > mapWidget = new MapWidget("100%", "100%", mapOptions); > add(mapWidget, new BorderLayoutData(LayoutRegion.CENTER)); > Map map = mapWidget.getMap(); > > // Defining a WMS and adding it to the map > WMSParams wmsParams = new WMSParams(); > wmsParams.setFormat("image/png"); > wmsParams.setLayers("area1"); > wmsParams.setIsTransparent(true); > wmsParams.setStyles(""); > > WMSOptions wmsLayerParams = new WMSOptions(); > wmsLayerParams.setBuffer(0); > wmsLayerParams.setSingleTile(false); > wmsLayerParams.setMaxExtent(new Bounds(100000, 100000, 300000, 200000)); > wmsLayerParams.setProjection("EPSG:24200"); > WMS wmsLayer = new WMS("First map on old projection", > "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); > > // Add layer to open layers map > map.addLayer(wmsLayer); > > // Defining a WMS and adding it to the map > wmsParams = new WMSParams(); > wmsParams.setFormat("image/png"); > wmsParams.setLayers("area2"); > wmsParams.setIsTransparent(true); > wmsParams.setStyles(""); > > wmsLayerParams = new WMSOptions(); > wmsLayerParams.setBuffer(0); > wmsLayerParams.setSingleTile(false); > wmsLayerParams.setMaxExtent(new Bounds(500000, 500000, 800000, 700000)); > wmsLayerParams.setProjection("EPSG:24200"); > WMS wmsLayer = new WMS("Second map in new projection", > "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); > > // Add layer to open layers map > map.addLayer(wmsLayer); > > map.setCenter(new LonLat(400000, 400000)); > ////////////////////////////////////////////////////////////////////////////////////////// > > The two maps hold data for adjacent areas but they are in different > projections. I want to be able to set the map display projection to > one of the projections, EPSG:3448 for instance, and re-project (on the > fly) the other map so I can overlay them. Hence I set the map display > projection to EPSG:3448, and when I am creating the wms layer I set > the srs of the request to the display projection. However I get an > empty map if I do this. When I set the projection of the wms request > to the projection of the data it contains then I get the map but it > has not been reprojected. I've searched for a simple reprojection > example to try and follow but I can't find any. > > I've also noticed that if I try to tranform coordinates from one > projection to another I get no change. When I try the following code > the coordinates of the lonlat object remain the same instead of them > being offset by about 500000 for the x and y values. > > LonLat pt = new LonLat(250000, 140000); > pt.transform("EPSG:3448", "EPSG:24200"); > > Do I need to include some extra javascripts to get the projection working. > > Can anyone help me. > > John > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |
From: giuseppe la s. <gla...@gm...> - 2011-01-11 22:07:02
|
Yes john you must use projcode. Tomorrow i send you an example. Regards giuseppe Inviato da iPhone di Giuseppe La Scaleia Il giorno 11/gen/2011, alle ore 21:38, John Preston <byh...@gm...> ha scritto: > OK, furthur experimentation indicates that if I send the map request > to geoserver with a different projection then the map is returned ok, > but the bbox coordinates have to be in the different projection. So > I'll need the projection transform stuff working but these function > all seem to do nothing. Do I have to have some other javascripts > loaded to get this part of gwt-openlayers working > > John > > ---------- Forwarded message ---------- > From: John Preston <byh...@gm...> > Date: Tue, Jan 11, 2011 at 3:09 PM > Subject: Reprojection of wns malyer and tranforming of point does not > seem to work. > To: gwt...@li... > > > I have a problem getting reprojection of wms layer maps working and I > would apprciate if someone could tell me what I'm doing wrong. > > I have two maps in two different projections and I would like to > overlay them. I use the following code to do this. > > ////////////////////////////////////////////////////////////////////////////////////////// > MapOptions mapOptions = new MapOptions(); > mapOptions.setNumZoomLevels(10); > mapOptions.setProjection("EPSG:3448"); > mapOptions.setDisplayProjection(new Projection("EPSG:3448")); > > mapOptions.setUnits("m"); > mapOptions.setMaxExtent(new Bounds(100000, 100000, 900000, 700000)); > mapOptions.setAllOverlays(true); > mapOptions.setMaxResolutionToAuto(); > > mapWidget = new MapWidget("100%", "100%", mapOptions); > add(mapWidget, new BorderLayoutData(LayoutRegion.CENTER)); > Map map = mapWidget.getMap(); > > // Defining a WMS and adding it to the map > WMSParams wmsParams = new WMSParams(); > wmsParams.setFormat("image/png"); > wmsParams.setLayers("area1"); > wmsParams.setIsTransparent(true); > wmsParams.setStyles(""); > > WMSOptions wmsLayerParams = new WMSOptions(); > wmsLayerParams.setBuffer(0); > wmsLayerParams.setSingleTile(false); > wmsLayerParams.setMaxExtent(new Bounds(100000, 100000, 300000, 200000)); > wmsLayerParams.setProjection("EPSG:24200"); > WMS wmsLayer = new WMS("First map on old projection", > "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); > > // Add layer to open layers map > map.addLayer(wmsLayer); > > // Defining a WMS and adding it to the map > wmsParams = new WMSParams(); > wmsParams.setFormat("image/png"); > wmsParams.setLayers("area2"); > wmsParams.setIsTransparent(true); > wmsParams.setStyles(""); > > wmsLayerParams = new WMSOptions(); > wmsLayerParams.setBuffer(0); > wmsLayerParams.setSingleTile(false); > wmsLayerParams.setMaxExtent(new Bounds(500000, 500000, 800000, 700000)); > wmsLayerParams.setProjection("EPSG:24200"); > WMS wmsLayer = new WMS("Second map in new projection", > "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); > > // Add layer to open layers map > map.addLayer(wmsLayer); > > map.setCenter(new LonLat(400000, 400000)); > ////////////////////////////////////////////////////////////////////////////////////////// > > The two maps hold data for adjacent areas but they are in different > projections. I want to be able to set the map display projection to > one of the projections, EPSG:3448 for instance, and re-project (on the > fly) the other map so I can overlay them. Hence I set the map display > projection to EPSG:3448, and when I am creating the wms layer I set > the srs of the request to the display projection. However I get an > empty map if I do this. When I set the projection of the wms request > to the projection of the data it contains then I get the map but it > has not been reprojected. I've searched for a simple reprojection > example to try and follow but I can't find any. > > I've also noticed that if I try to tranform coordinates from one > projection to another I get no change. When I try the following code > the coordinates of the lonlat object remain the same instead of them > being offset by about 500000 for the x and y values. > > LonLat pt = new LonLat(250000, 140000); > pt.transform("EPSG:3448", "EPSG:24200"); > > Do I need to include some extra javascripts to get the projection working. > > Can anyone help me. > > John > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: John P. <byh...@gm...> - 2011-01-11 20:38:45
|
OK, furthur experimentation indicates that if I send the map request to geoserver with a different projection then the map is returned ok, but the bbox coordinates have to be in the different projection. So I'll need the projection transform stuff working but these function all seem to do nothing. Do I have to have some other javascripts loaded to get this part of gwt-openlayers working John ---------- Forwarded message ---------- From: John Preston <byh...@gm...> Date: Tue, Jan 11, 2011 at 3:09 PM Subject: Reprojection of wns malyer and tranforming of point does not seem to work. To: gwt...@li... I have a problem getting reprojection of wms layer maps working and I would apprciate if someone could tell me what I'm doing wrong. I have two maps in two different projections and I would like to overlay them. I use the following code to do this. ////////////////////////////////////////////////////////////////////////////////////////// MapOptions mapOptions = new MapOptions(); mapOptions.setNumZoomLevels(10); mapOptions.setProjection("EPSG:3448"); mapOptions.setDisplayProjection(new Projection("EPSG:3448")); mapOptions.setUnits("m"); mapOptions.setMaxExtent(new Bounds(100000, 100000, 900000, 700000)); mapOptions.setAllOverlays(true); mapOptions.setMaxResolutionToAuto(); mapWidget = new MapWidget("100%", "100%", mapOptions); add(mapWidget, new BorderLayoutData(LayoutRegion.CENTER)); Map map = mapWidget.getMap(); // Defining a WMS and adding it to the map WMSParams wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("area1"); wmsParams.setIsTransparent(true); wmsParams.setStyles(""); WMSOptions wmsLayerParams = new WMSOptions(); wmsLayerParams.setBuffer(0); wmsLayerParams.setSingleTile(false); wmsLayerParams.setMaxExtent(new Bounds(100000, 100000, 300000, 200000)); wmsLayerParams.setProjection("EPSG:24200"); WMS wmsLayer = new WMS("First map on old projection", "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); // Add layer to open layers map map.addLayer(wmsLayer); // Defining a WMS and adding it to the map wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("area2"); wmsParams.setIsTransparent(true); wmsParams.setStyles(""); wmsLayerParams = new WMSOptions(); wmsLayerParams.setBuffer(0); wmsLayerParams.setSingleTile(false); wmsLayerParams.setMaxExtent(new Bounds(500000, 500000, 800000, 700000)); wmsLayerParams.setProjection("EPSG:24200"); WMS wmsLayer = new WMS("Second map in new projection", "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); // Add layer to open layers map map.addLayer(wmsLayer); map.setCenter(new LonLat(400000, 400000)); ////////////////////////////////////////////////////////////////////////////////////////// The two maps hold data for adjacent areas but they are in different projections. I want to be able to set the map display projection to one of the projections, EPSG:3448 for instance, and re-project (on the fly) the other map so I can overlay them. Hence I set the map display projection to EPSG:3448, and when I am creating the wms layer I set the srs of the request to the display projection. However I get an empty map if I do this. When I set the projection of the wms request to the projection of the data it contains then I get the map but it has not been reprojected. I've searched for a simple reprojection example to try and follow but I can't find any. I've also noticed that if I try to tranform coordinates from one projection to another I get no change. When I try the following code the coordinates of the lonlat object remain the same instead of them being offset by about 500000 for the x and y values. LonLat pt = new LonLat(250000, 140000); pt.transform("EPSG:3448", "EPSG:24200"); Do I need to include some extra javascripts to get the projection working. Can anyone help me. John |
From: John P. <byh...@gm...> - 2011-01-11 20:09:59
|
I have a problem getting reprojection of wms layer maps working and I would apprciate if someone could tell me what I'm doing wrong. I have two maps in two different projections and I would like to overlay them. I use the following code to do this. ////////////////////////////////////////////////////////////////////////////////////////// MapOptions mapOptions = new MapOptions(); mapOptions.setNumZoomLevels(10); mapOptions.setProjection("EPSG:3448"); mapOptions.setDisplayProjection(new Projection("EPSG:3448")); mapOptions.setUnits("m"); mapOptions.setMaxExtent(new Bounds(100000, 100000, 900000, 700000)); mapOptions.setAllOverlays(true); mapOptions.setMaxResolutionToAuto(); mapWidget = new MapWidget("100%", "100%", mapOptions); add(mapWidget, new BorderLayoutData(LayoutRegion.CENTER)); Map map = mapWidget.getMap(); // Defining a WMS and adding it to the map WMSParams wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("area1"); wmsParams.setIsTransparent(true); wmsParams.setStyles(""); WMSOptions wmsLayerParams = new WMSOptions(); wmsLayerParams.setBuffer(0); wmsLayerParams.setSingleTile(false); wmsLayerParams.setMaxExtent(new Bounds(100000, 100000, 300000, 200000)); wmsLayerParams.setProjection("EPSG:24200"); WMS wmsLayer = new WMS("First map on old projection", "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); // Add layer to open layers map map.addLayer(wmsLayer); // Defining a WMS and adding it to the map wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setLayers("area2"); wmsParams.setIsTransparent(true); wmsParams.setStyles(""); wmsLayerParams = new WMSOptions(); wmsLayerParams.setBuffer(0); wmsLayerParams.setSingleTile(false); wmsLayerParams.setMaxExtent(new Bounds(500000, 500000, 800000, 700000)); wmsLayerParams.setProjection("EPSG:24200"); WMS wmsLayer = new WMS("Second map in new projection", "http://localhost:8086/geoserver/wms", wmsParams, wmsLayerParams); // Add layer to open layers map map.addLayer(wmsLayer); map.setCenter(new LonLat(400000, 400000)); ////////////////////////////////////////////////////////////////////////////////////////// The two maps hold data for adjacent areas but they are in different projections. I want to be able to set the map display projection to one of the projections, EPSG:3448 for instance, and re-project (on the fly) the other map so I can overlay them. Hence I set the map display projection to EPSG:3448, and when I am creating the wms layer I set the srs of the request to the display projection. However I get an empty map if I do this. When I set the projection of the wms request to the projection of the data it contains then I get the map but it has not been reprojected. I've searched for a simple reprojection example to try and follow but I can't find any. I've also noticed that if I try to tranform coordinates from one projection to another I get no change. When I try the following code the coordinates of the lonlat object remain the same instead of them being offset by about 500000 for the x and y values. LonLat pt = new LonLat(250000, 140000); pt.transform("EPSG:3448", "EPSG:24200"); Do I need to include some extra javascripts to get the projection working. Can anyone help me. John |
From: John P. <byh...@gm...> - 2011-01-09 18:21:22
|
I'm trying to get get the info and geometry of a feature after clicking on a wms layer of it. I have the info part working using the GetFeatureInfo contol as below. WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setURL(http://localhost:8086/geoserver/wms"); options.setTitle("Query visible layers"); options.setQueryVisible(true); featureInfo = new WMSGetFeatureInfo(options); featureInfo.addGetFeatureListener(new GetFeatureInfoListener() { public void onGetFeatureInfo(GetFeatureInfoEvent eo) { show(eo.getText()); } }); map.addControl(featureInfo); To get the geometry to highlight the selected layer I tried a number of methods but the one that gets me closest is the GetFeature control (as below) that I see in Firebug is POSTing a request and getting the geometry in response. However I cannot how to attach a event listener to get access to the response. // Create the styles for each selectFeature purpose Style styleNormal = createStyle("#FF0000"); Style styleSelected = createStyle("#00FF00"); Style styleHighlighted = createStyle("#0000FF"); // Create the StyleMap to handle all styles StyleMap styleMapVector = new StyleMap(styleNormal, styleSelected, styleHighlighted); // Create the vectorOptions to use the styles VectorOptions vectorOptions = new VectorOptions(); vectorOptions.setStyleMap(styleMapVector); vectorOptions.setIsBaseLayer(false); vectorOptions.setVisibility(true); Vector vlayer = new Vector("SelectFeature Layer", vectorOptions); map.addLayer(vlayer); GetFeatureOptions featureOptions = new GetFeatureOptions(); featureOptions.setProtocol(new WFSProtocol(wmsLayer, new WFSProtocolOptions())); featureOptions.setBox(true); featureOptions.setHover(false); featureOptions.setMultipleKey("shiftKey"); featureOptions.setToggleKey("ctrlKey"); GetFeature f = new GetFeature(featureOptions); map.addControl(f); f.activate(); Can anyone show me how to attach an event handler to trap the getfeature requests response to add to the vLayer that I will use to make it visible, similar to how it shows up in the Selectfeature control. However when I tried that control I got no POST events triggered by the mouse click to request any feature from the server. John |
From: fatzopilot <fat...@gm...> - 2011-01-06 14:12:23
|
Hi Edwin, first of all, thanks for responding :) On Wed, 05 Jan 2011 16:18:24 +0100, Edwin Commandeur <com...@gm...> wrote: > Hi Fatzopilot, > > You might have figured this one out already, but for OSM you indeed > need to include the following extra script: > > http://www.openstreetmap.org/openlayers/OpenStreetMap.js I actually did include the above .js, otherwise the WMS client would not have worked either. So there is a problem only when using the OSM.Mapnik layer, the WMS layer works flawlessly. > > When you look at the source for > http://www.openstreetmap.org/index.html you can deduce that. > > There are several ways to include OSM data. These are mentioned on: > > http://wiki.openstreetmap.org/wiki/Deploying_your_own_Slippy_Map > > An alternative that is not mentioned is serving the data as WMS, or > find a hoster that does :) Yes, that would be an option if everything else fails, but afaics this does not support tile caching. > > Greetings, > Edwin > > On 2 January 2011 03:05, fatzopilot <fat...@gm...> wrote: >> Hi list, >> >> there seems to be something wrong with my attempts to get gwt-openlayers >> displaying mapnik generated tiles. >> The showcase runs just fine, I slightly changed it to use a Mapnik >> backend >> instead of the WMS backend. >> I did pretty much the same as here: >> http://code.google.com/p/dantwining/source/browse/trunk/gwitmap/src/com/dantwining/gwitmap/client/GwitMap.java >> However, I get a "com.google.gwt.core.client.JavaScriptException: >> (TypeError): $wnd.OpenLayers.Layer.OSM.Mapnik" is not a constructor" in >> dev-mode. >> Did I forget to include some JS somewhere or is there another problem? >> >> Thanks >> fatzopilot >> >> ------------------------------------------------------------------------------ >> Learn how Oracle Real Application Clusters (RAC) One Node allows >> customers >> to consolidate database storage, standardize their database >> environment, and, >> should the need arise, upgrade to a full multi-node Oracle RAC database >> without downtime or disruption >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> Gwt-openlayers-users mailing list >> Gwt...@li... >> https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users >> -- Using Opera's revolutionary email client: http://www.opera.com/mail/ |