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: Federica De M. <fde...@tp...> - 2011-06-07 13:58:42
|
I tried to have a look with firebug, and when I click on the map there is a GET request as follows: GET http://localhost:9090/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&QUERY_LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&STYLES=,,&BBOX=-64.789268%2C5.300572%2C115.562294%2C75.613072&FEATURE_COUNT=10&HEIGHT=400&WIDTH=1026&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=445&Y=188 200 OK 312ms OpenLayers.js (riga 1188) Intestazioni BBOX -64.789268,5.300572,115.562294,75.613072 FEATURE_COUNT 10 FORMAT image/png HEIGHT 400 INFO_FORMAT text/html LAYERS topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp QUERY_LAYERS topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp REQUEST GetFeatureInfo SERVICE WMS SRS EPSG:4326 STYLES ,, VERSION 1.1.1 WIDTH 1026 X 445 Y 188 Intestazioni di rispostaVisualizza come testo semplice Content-Type text/html; charset=utf-8 Content-Length 890 Content-Encoding gzip Server Jetty(6.1.8) Intestazioni di richiestaVisualizza come testo semplice Host localhost:9090 User-Agent Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language it-it,it;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://localhost:8080/gimovit-gwt/ Origin http://localhost:8080 If I copy the address of the request in my browser I can see the HTML response right as it should appear, but in firebug I find the Answer and HTML tabs completly empty! What else can I check? Thank you for the help... Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...> Sent: Tuesday, June 07, 2011 11:44 AM Subject: SV: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working Install firebug and see if the request is made and if so what attributes that are being sent. -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 7 juni 2011 11:44 Till: Lukas Johansson; gwt...@li... Ämne: Re: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working I'have changed my gwt-openlayesrs dependencies to: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.6-SNAPSHOT</version> </dependency> and I'have added the SNAPSHOT version repository: <repository> <id>sonatype-nexus-snapshots</id> <name>Repository for gwt-openlayers snapshot</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> Now I could add this code line: options.setLayers(new WMS[] {waterBodies, stateBoundaries}); But I keep on getting an empty result when I query the map, any other idea? Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Lukas J. <luk...@de...> - 2011-06-07 12:51:20
|
That's because that specific code did not make it into the 0.5build. I don't know how far away the next release is but one way of getting a working gwt-ol is to download and build your own version. /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 7 juni 2011 08:54 Till: Lukas Johansson; gwt...@li... Ämne: Re: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working Thank you Lukas for the answer. I tried to add the line of code you suggest me but the method is not included in my gwt-openlayers version, is it possible? I include the gwt-openlayers with maven: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.5</version> </dependency> Is there another version I should have to include, or something else I have to add? Thank you again, Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Federica De M. <fde...@tp...> - 2011-06-07 09:43:47
|
I'have changed my gwt-openlayesrs dependencies to: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.6-SNAPSHOT</version> </dependency> and I'have added the SNAPSHOT version repository: <repository> <id>sonatype-nexus-snapshots</id> <name>Repository for gwt-openlayers snapshot</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> Now I could add this code line: options.setLayers(new WMS[] {waterBodies, stateBoundaries}); But I keep on getting an empty result when I query the map, any other idea? Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Federica De M. <fde...@tp...> - 2011-06-07 06:53:59
|
Thank you Lukas for the answer. I tried to add the line of code you suggest me but the method is not included in my gwt-openlayers version, is it possible? I include the gwt-openlayers with maven: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.5</version> </dependency> Is there another version I should have to include, or something else I have to add? Thank you again, Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Lukas J. <luk...@de...> - 2011-06-06 20:36:29
|
You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Federica De M. <fde...@tp...> - 2011-06-06 11:05:49
|
Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. |
From: Federica De M. <fde...@tp...> - 2011-06-06 10:55:48
|
Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. |
From: Weber, S. H. <ste...@si...> - 2011-05-19 14:21:37
|
OK, I found the solution. 2 Problems 1: Cluster strategy activation does nothing clustering only happens when you add features _after_ the control is activated. (from http://osgeo-org.1803224.n2.nabble.com/Cluster-strategy-activation-td5078623.html) 2: the VectorFeatures have to be added as an array (not separately) So here is the running code: ------------------------------------------- package com.siemens.test.client; import org.gwtopenmaps.openlayers.client.LonLat; import org.gwtopenmaps.openlayers.client.Map; import org.gwtopenmaps.openlayers.client.MapOptions; import org.gwtopenmaps.openlayers.client.MapWidget; import org.gwtopenmaps.openlayers.client.Style; import org.gwtopenmaps.openlayers.client.control.LayerSwitcher; import org.gwtopenmaps.openlayers.client.control.MousePosition; import org.gwtopenmaps.openlayers.client.control.NavToolbar; import org.gwtopenmaps.openlayers.client.control.PanZoomBar; import org.gwtopenmaps.openlayers.client.control.Scale; import org.gwtopenmaps.openlayers.client.feature.VectorFeature; import org.gwtopenmaps.openlayers.client.geometry.Point; import org.gwtopenmaps.openlayers.client.layer.Layer; import org.gwtopenmaps.openlayers.client.layer.OSM; import org.gwtopenmaps.openlayers.client.layer.Vector; import org.gwtopenmaps.openlayers.client.layer.VectorOptions; import org.gwtopenmaps.openlayers.client.strategy.Strategy; import org.gwtopenmaps.openlayers.client.util.JSObject; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Random; import com.google.gwt.user.client.ui.RootPanel; /** * Entry point classes define <code>onModuleLoad()</code>. */ public class ClusterStrategy implements EntryPoint { private Map map; private Vector vectorLayer; private OSM osmLayer; private LonLat centerOfGermany = new LonLat(9.77, 51.16); /** * This is the entry point method. */ public void onModuleLoad() { MapOptions config = new MapOptions(); config.setNumZoomLevels(32); config.setProjection("EPSG:4326"); MapWidget mapWidget = new MapWidget("900px", "500px", config); map = mapWidget.getMap(); map.addControl(new PanZoomBar()); map.addControl(new NavToolbar()); map.addControl(new MousePosition()); map.addControl(new LayerSwitcher()); map.addControl(new Scale()); centerOfGermany.transform("EPSG:4326", "EPSG:900913"); osmLayer = OSM.Mapnik("OpenStreetMap"); vectorLayer = createLayer(); map.addLayers(new Layer[] { osmLayer, vectorLayer }); map.setCenter(centerOfGermany, 5); RootPanel.get("main").add(mapWidget); // Problem 1: add points after control is activated addSomePoints(vectorLayer); } private Vector createLayer() { // Create the vectorOptions VectorOptions vectorOptions = new VectorOptions(); vectorOptions.setStyle(createStyle()); Strategy st = new Strategy(createClusterStrategy()) { }; vectorOptions.setStrategies(new Strategy[] { st }); Vector layer = new Vector("Vector Layer", vectorOptions); return layer; } /** * @param layer */ private void addSomePoints(Vector layer) { // Problem 2: add points as array together VectorFeature[] features = new VectorFeature[500]; for (int i = 0; i < 500; i++) { double lon = 9 + Random.nextDouble()*5; double lat = 45 + Random.nextDouble()*5; LonLat lonlat = new LonLat(lon, lat); lonlat.transform("EPSG:4326", "EPSG:900913"); Point point = new Point(lonlat.lon(), lonlat.lat()); VectorFeature pointFeature = new VectorFeature(point); features[i] = pointFeature; } layer.addFeatures(features); } private Style createStyle() { Style style = new Style(); style.setStrokeColor("#000000"); style.setStrokeWidth(1); style.setFillColor("#FF0000"); style.setFillOpacity(0.5); style.setPointRadius(10); style.setStrokeOpacity(1.0); return style; } private static native JSObject createClusterStrategy() /*-{ var clusterStrategy = new $wnd.OpenLayers.Strategy.Cluster({ distance : 20, threshold : 1 }); return clusterStrategy; }-*/; } ------------------------------------------- Stefan -----Ursprüngliche Nachricht----- Von: Alexander Solovets [mailto:aso...@gm...] Gesendet: Donnerstag, 19. Mai 2011 13:50 An: Weber, Stefan Hagen Cc: gwt...@li... Betreff: Re: [Gwt-openlayers-users] Cluster Strategy Hello, Stefan! See JSNI explanation on GWT project page. Or you could just look at OL-GWT sources and do it similarly. |
From: Weber, S. H. <ste...@si...> - 2011-05-19 12:47:45
|
Hello Alexander, thanks for the fast reply. I'm trying to instantiate the cluster strategy via JSNI. Have a look at my test code. Do you have a clue what is missing/wrong? --------------------------------------------------- import org.gwtopenmaps.openlayers.client.LonLat; import org.gwtopenmaps.openlayers.client.Map; import org.gwtopenmaps.openlayers.client.MapOptions; import org.gwtopenmaps.openlayers.client.MapWidget; import org.gwtopenmaps.openlayers.client.Style; import org.gwtopenmaps.openlayers.client.control.LayerSwitcher; import org.gwtopenmaps.openlayers.client.control.MousePosition; import org.gwtopenmaps.openlayers.client.control.NavToolbar; import org.gwtopenmaps.openlayers.client.control.PanZoomBar; import org.gwtopenmaps.openlayers.client.control.Scale; import org.gwtopenmaps.openlayers.client.feature.VectorFeature; import org.gwtopenmaps.openlayers.client.geometry.Point; import org.gwtopenmaps.openlayers.client.layer.Layer; import org.gwtopenmaps.openlayers.client.layer.OSM; import org.gwtopenmaps.openlayers.client.layer.Vector; import org.gwtopenmaps.openlayers.client.layer.VectorOptions; import org.gwtopenmaps.openlayers.client.strategy.Strategy; import org.gwtopenmaps.openlayers.client.util.JSObject; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.ui.RootPanel; /** * Entry point classes define <code>onModuleLoad()</code>. */ public class ClusterStrategy implements EntryPoint { private Map map; private Vector vectorLayer; private OSM osmLayer; private LonLat centerOfGermany = new LonLat(9.77, 51.16); /** * This is the entry point method. */ public void onModuleLoad() { MapOptions config = new MapOptions(); config.setNumZoomLevels(32); config.setProjection("EPSG:4326"); MapWidget mapWidget = new MapWidget("900px", "500px", config); map = mapWidget.getMap(); map.addControl(new PanZoomBar()); map.addControl(new NavToolbar()); map.addControl(new MousePosition()); map.addControl(new LayerSwitcher()); map.addControl(new Scale()); centerOfGermany.transform("EPSG:4326", "EPSG:900913"); osmLayer = OSM.Mapnik("OpenStreetMap"); vectorLayer = createLayer(); map.addLayers(new Layer[] { osmLayer, vectorLayer }); map.setCenter(centerOfGermany, 5); RootPanel.get("main").add(mapWidget); } private Vector createLayer() { // Create the vectorOptions VectorOptions vectorOptions = new VectorOptions(); vectorOptions.setStyle(createStyle()); Strategy st = new Strategy(createClusterStrategy()) { }; vectorOptions.setStrategies(new Strategy[] { st }); Vector layer = new Vector("Vector Layer", vectorOptions); addSomePoints(layer); return layer; } /** * @param layer */ private void addSomePoints(Vector layer) { for (int i = 0; i < 100; i++) { double lon = 9 + (double) i / 10; double lat = 45 + (double) i / 10; LonLat lonlat = new LonLat(lon, lat); lonlat.transform("EPSG:4326", "EPSG:900913"); Point point = new Point(lonlat.lon(), lonlat.lat()); VectorFeature pointFeature = new VectorFeature(point); layer.addFeature(pointFeature); } } private Style createStyle() { Style style = new Style(); style.setStrokeColor("#000000"); style.setStrokeWidth(1); style.setFillColor("#FF0000"); style.setFillOpacity(0.5); style.setPointRadius(10); style.setStrokeOpacity(1.0); return style; } private static native JSObject createClusterStrategy() /*-{ var clusterStrategy = new $wnd.OpenLayers.Strategy.Cluster({ distance : 20, threshold : 2 }); return clusterStrategy; }-*/; } --------------------------------------------------- Stefan -----Ursprüngliche Nachricht----- Von: Alexander Solovets [mailto:aso...@gm...] Gesendet: Donnerstag, 19. Mai 2011 13:50 An: Weber, Stefan Hagen Cc: gwt...@li... Betreff: Re: [Gwt-openlayers-users] Cluster Strategy Hello, Stefan! See JSNI explanation on GWT project page. Or you could just look at OL-GWT sources and do it similarly. |
From: Alexander S. <aso...@gm...> - 2011-05-19 11:50:16
|
Hello, Stefan! See JSNI explanation on GWT project page. Or you could just look at OL-GWT sources and do it similarly. |
From: Weber, S. H. <ste...@si...> - 2011-05-19 10:54:08
|
Hello, at first thank you very much for this awesome project. I've been using it since one year. Now I encountered a blocking point for my application. What I really love in OpenLayers and what I need is the Cluster Strategy. As far as I could see only BBox is implemented as strategy yet. Is there a workaround to get the clustering running (e.g. include native js code into the java application) and do you have example code showing how to make use of the cluster strategy? If nobody has succeded to get clustering working I'm willing to implement the strategy by myself. Again I need a little push into the right direction to get started. Thanks a lot Stefan |
From: Hutchins, M. C. <Cha...@nr...> - 2011-05-17 23:33:13
|
All, I have a web app that animates time relevant layers by turning the visibility on and off (layer.setIsVisible(true/false)) in sequential order; this process works with varying results depending on the browser. Users with Firefox (especially 4) see layers that "flash" between each timestamp instead of a smooth transition to the next image, but server calls are only made for the amount of images in the array (unless a zoom/pan event occurs). Users with Internet Explorer and Safari see a smooth animation and the server calls are the same as with Firefox (best results). The worst results are Chrome users, where the animation is not only flashing but every single visibility switch initiates a new server call, so that even if you only had 10 images in your timeline, a Chrome user would make a call each time it hit the timestamp. Has anyone else had these experiences using GWT-OpenLayers in various browsers? Is using setIsVisible the standard for creating an animation? What about using opacity? Thanks in advance! Chad Chad Hutchins Meteorologist Naval Research Laboratory Marine Meteorology Division 7 Grace Hopper Ave. Monterey, CA 93943-5502 |
From: Alexandre A. S. <aas...@gm...> - 2011-05-16 14:17:57
|
Hi, I was trying to find a workaround for the problems with FF4. I achieved to solve the selection in multiple layers but not the WMS issue. I tried the solution that Christian Tzolov send by email about change the sentence: if (xxx instance of Array) -> if(xxx instanceof Array || !(xxx instanceof Object) && Object.prototype.toString.call(layers) == "[object Array]" || typeof xxx.length == "number" && typeof xxx.splice != "undefined" && typeof xxx.propertyIsEnumerable != "undefined" && !xxx.propertyIsEnumerable("splice")) It works for multiple selection changing it in the SelectFeature.js in the initLayer function. But, I changed it as well, in the HttpRequest.js and it still doesn't work for loading WMS layers in the map. Has anyone solved the WMS fail in FF4? By the way, Google chrome is incredible much faster than Firefox. Thanks in advence. Cheers, Alex ________________________________________ De: Lukas Johansson [luk...@de...] Enviado el: jueves, 12 de mayo de 2011 13:16 Para: Alexandre Ascasibar Sequeiros; gwt...@li... Asunto: SV: Select feature in multiple layer I've been banging my head against the same problem for quite some time. I think that the problem is related to var selectControl = new $wnd.OpenLayers.Control.SelectFeature( [vectors1, vectors2], .... Where you create an array with just []. I think that Alexander Solovets might be able to explain this better but it has to do with the context where the array is created. For it to exist in the webbpages' window (as in a plain javascriptapplication) you need to do: Array = new $wnd.Array() and the populate this array. I am not sure if $wnd.[] would work but I doubt it. That said I have tracked my own problems (arrays not working properly in firefox 4) to the same line of code where you are (creating the SelectFeature) and I haven't yet got it to work. /Lukas -----Ursprungligt meddelande----- Från: Alexandre Ascasibar Sequeiros [mailto:aas...@gm...] Skickat: den 12 maj 2011 12:42 Till: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Select feature in multiple layer Hi again, I'm trying to solve the multilayer issue using JSNI calling the function above: public static native void selectableAllLayers(JSObject map) /*-{ var vectors1 = new $wnd.OpenLayers.Layer.Vector("Vector Layer 1", { styleMap: new $wnd.OpenLayers.StyleMap({ "default": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ graphicOpacity: 1, rotation: -45, pointRadius: 10 }, $wnd.OpenLayers.Feature.Vector.style["default"])), "select": new $wnd.OpenLayers.Style({ }) }) }); var vectors2 = new $wnd.OpenLayers.Layer.Vector("Vector Layer 2", { styleMap: new $wnd.OpenLayers.StyleMap({ "default": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ fillColor: "red", strokeColor: "gray", graphicName: "square", rotation: 45, pointRadius: 15 }, $wnd.OpenLayers.Feature.Vector.style["default"])), "select": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ graphicName: "square", rotation: 45, pointRadius: 15 }, $wnd.OpenLayers.Feature.Vector.style["select"])) }) }); map.addLayers([vectors1, vectors2]); var selectControl = new $wnd.OpenLayers.Control.SelectFeature( [vectors1, vectors2], { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" // shift key adds to selection } ); map.addControl(selectControl); selectControl.activate(); }-*/; But I received the next error: "(TypeError): Object [object Object],[object Object] has no method 'getZIndex' stack: TypeError: Object [object Object],[object Object] has no method 'getZIndex' at Object.moveLayerToTop (http://myurl) at Object.activate (http://myurl) at Object.activate (myurl) at ..." The thing is if I change the code and write SelectFeature for just one layer, it works: var selectControl = new $wnd.OpenLayers.Control.SelectFeature(vectors1, {.... but using an array doesn't work, Please, does anyone know what's the problem? Thanks in advance, Alex. ________________________________________ De: Alexandre Ascasibar Sequeiros [aas...@gm...] Enviado el: martes, 10 de mayo de 2011 13:46 Para: gwt...@li... Asunto: [Gwt-openlayers-users] Select feature in multiple layer Hi all, I'm trying to enable Select feature in multiple layers at the same time. I tried to extend SelectFeatureImpl adding the method: public static native JSObject create(JSObject layer1, JSObject layer2, JSObject options)/*-{ return new $wnd.OpenLayers.Control.SelectFeature([layer1, layer2], options); }-*/; but it doesn't work. Any one know how to handle this? Thank in advance, Alex. ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ |
From: Alexandre A. S. <aas...@gm...> - 2011-05-12 14:50:49
|
Hi Lukas, Thank you very much for your help. It works great for me using var layers= new $wnd.Array(); though you're right and it works properly in Chrome but no in FF4. I'was making some tests and no way... As it's a problem that I also have to face if I found any workaround I'll write you and please if you find it, let me know. Cheers, Alex. ________________________________________ De: Lukas Johansson [luk...@de...] Enviado el: jueves, 12 de mayo de 2011 13:16 Para: Alexandre Ascasibar Sequeiros; gwt...@li... Asunto: SV: Select feature in multiple layer I've been banging my head against the same problem for quite some time. I think that the problem is related to var selectControl = new $wnd.OpenLayers.Control.SelectFeature( [vectors1, vectors2], .... Where you create an array with just []. I think that Alexander Solovets might be able to explain this better but it has to do with the context where the array is created. For it to exist in the webbpages' window (as in a plain javascriptapplication) you need to do: Array = new $wnd.Array() and the populate this array. I am not sure if $wnd.[] would work but I doubt it. That said I have tracked my own problems (arrays not working properly in firefox 4) to the same line of code where you are (creating the SelectFeature) and I haven't yet got it to work. /Lukas -----Ursprungligt meddelande----- Från: Alexandre Ascasibar Sequeiros [mailto:aas...@gm...] Skickat: den 12 maj 2011 12:42 Till: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Select feature in multiple layer Hi again, I'm trying to solve the multilayer issue using JSNI calling the function above: public static native void selectableAllLayers(JSObject map) /*-{ var vectors1 = new $wnd.OpenLayers.Layer.Vector("Vector Layer 1", { styleMap: new $wnd.OpenLayers.StyleMap({ "default": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ graphicOpacity: 1, rotation: -45, pointRadius: 10 }, $wnd.OpenLayers.Feature.Vector.style["default"])), "select": new $wnd.OpenLayers.Style({ }) }) }); var vectors2 = new $wnd.OpenLayers.Layer.Vector("Vector Layer 2", { styleMap: new $wnd.OpenLayers.StyleMap({ "default": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ fillColor: "red", strokeColor: "gray", graphicName: "square", rotation: 45, pointRadius: 15 }, $wnd.OpenLayers.Feature.Vector.style["default"])), "select": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ graphicName: "square", rotation: 45, pointRadius: 15 }, $wnd.OpenLayers.Feature.Vector.style["select"])) }) }); map.addLayers([vectors1, vectors2]); var selectControl = new $wnd.OpenLayers.Control.SelectFeature( [vectors1, vectors2], { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" // shift key adds to selection } ); map.addControl(selectControl); selectControl.activate(); }-*/; But I received the next error: "(TypeError): Object [object Object],[object Object] has no method 'getZIndex' stack: TypeError: Object [object Object],[object Object] has no method 'getZIndex' at Object.moveLayerToTop (http://myurl) at Object.activate (http://myurl) at Object.activate (myurl) at ..." The thing is if I change the code and write SelectFeature for just one layer, it works: var selectControl = new $wnd.OpenLayers.Control.SelectFeature(vectors1, {.... but using an array doesn't work, Please, does anyone know what's the problem? Thanks in advance, Alex. ________________________________________ De: Alexandre Ascasibar Sequeiros [aas...@gm...] Enviado el: martes, 10 de mayo de 2011 13:46 Para: gwt...@li... Asunto: [Gwt-openlayers-users] Select feature in multiple layer Hi all, I'm trying to enable Select feature in multiple layers at the same time. I tried to extend SelectFeatureImpl adding the method: public static native JSObject create(JSObject layer1, JSObject layer2, JSObject options)/*-{ return new $wnd.OpenLayers.Control.SelectFeature([layer1, layer2], options); }-*/; but it doesn't work. Any one know how to handle this? Thank in advance, Alex. ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ |
From: Lukas J. <luk...@de...> - 2011-05-12 11:17:04
|
I've been banging my head against the same problem for quite some time. I think that the problem is related to var selectControl = new $wnd.OpenLayers.Control.SelectFeature( [vectors1, vectors2], .... Where you create an array with just []. I think that Alexander Solovets might be able to explain this better but it has to do with the context where the array is created. For it to exist in the webbpages' window (as in a plain javascriptapplication) you need to do: Array = new $wnd.Array() and the populate this array. I am not sure if $wnd.[] would work but I doubt it. That said I have tracked my own problems (arrays not working properly in firefox 4) to the same line of code where you are (creating the SelectFeature) and I haven't yet got it to work. /Lukas -----Ursprungligt meddelande----- Från: Alexandre Ascasibar Sequeiros [mailto:aas...@gm...] Skickat: den 12 maj 2011 12:42 Till: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Select feature in multiple layer Hi again, I'm trying to solve the multilayer issue using JSNI calling the function above: public static native void selectableAllLayers(JSObject map) /*-{ var vectors1 = new $wnd.OpenLayers.Layer.Vector("Vector Layer 1", { styleMap: new $wnd.OpenLayers.StyleMap({ "default": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ graphicOpacity: 1, rotation: -45, pointRadius: 10 }, $wnd.OpenLayers.Feature.Vector.style["default"])), "select": new $wnd.OpenLayers.Style({ }) }) }); var vectors2 = new $wnd.OpenLayers.Layer.Vector("Vector Layer 2", { styleMap: new $wnd.OpenLayers.StyleMap({ "default": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ fillColor: "red", strokeColor: "gray", graphicName: "square", rotation: 45, pointRadius: 15 }, $wnd.OpenLayers.Feature.Vector.style["default"])), "select": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ graphicName: "square", rotation: 45, pointRadius: 15 }, $wnd.OpenLayers.Feature.Vector.style["select"])) }) }); map.addLayers([vectors1, vectors2]); var selectControl = new $wnd.OpenLayers.Control.SelectFeature( [vectors1, vectors2], { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" // shift key adds to selection } ); map.addControl(selectControl); selectControl.activate(); }-*/; But I received the next error: "(TypeError): Object [object Object],[object Object] has no method 'getZIndex' stack: TypeError: Object [object Object],[object Object] has no method 'getZIndex' at Object.moveLayerToTop (http://myurl) at Object.activate (http://myurl) at Object.activate (myurl) at ..." The thing is if I change the code and write SelectFeature for just one layer, it works: var selectControl = new $wnd.OpenLayers.Control.SelectFeature(vectors1, {.... but using an array doesn't work, Please, does anyone know what's the problem? Thanks in advance, Alex. ________________________________________ De: Alexandre Ascasibar Sequeiros [aas...@gm...] Enviado el: martes, 10 de mayo de 2011 13:46 Para: gwt...@li... Asunto: [Gwt-openlayers-users] Select feature in multiple layer Hi all, I'm trying to enable Select feature in multiple layers at the same time. I tried to extend SelectFeatureImpl adding the method: public static native JSObject create(JSObject layer1, JSObject layer2, JSObject options)/*-{ return new $wnd.OpenLayers.Control.SelectFeature([layer1, layer2], options); }-*/; but it doesn't work. Any one know how to handle this? Thank in advance, Alex. ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Alexandre A. S. <aas...@gm...> - 2011-05-12 10:43:36
|
Hi again, I'm trying to solve the multilayer issue using JSNI calling the function above: public static native void selectableAllLayers(JSObject map) /*-{ var vectors1 = new $wnd.OpenLayers.Layer.Vector("Vector Layer 1", { styleMap: new $wnd.OpenLayers.StyleMap({ "default": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ graphicOpacity: 1, rotation: -45, pointRadius: 10 }, $wnd.OpenLayers.Feature.Vector.style["default"])), "select": new $wnd.OpenLayers.Style({ }) }) }); var vectors2 = new $wnd.OpenLayers.Layer.Vector("Vector Layer 2", { styleMap: new $wnd.OpenLayers.StyleMap({ "default": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ fillColor: "red", strokeColor: "gray", graphicName: "square", rotation: 45, pointRadius: 15 }, $wnd.OpenLayers.Feature.Vector.style["default"])), "select": new $wnd.OpenLayers.Style($wnd.OpenLayers.Util.applyDefaults({ graphicName: "square", rotation: 45, pointRadius: 15 }, $wnd.OpenLayers.Feature.Vector.style["select"])) }) }); map.addLayers([vectors1, vectors2]); var selectControl = new $wnd.OpenLayers.Control.SelectFeature( [vectors1, vectors2], { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey" // shift key adds to selection } ); map.addControl(selectControl); selectControl.activate(); }-*/; But I received the next error: "(TypeError): Object [object Object],[object Object] has no method 'getZIndex' stack: TypeError: Object [object Object],[object Object] has no method 'getZIndex' at Object.moveLayerToTop (http://myurl) at Object.activate (http://myurl) at Object.activate (myurl) at ..." The thing is if I change the code and write SelectFeature for just one layer, it works: var selectControl = new $wnd.OpenLayers.Control.SelectFeature(vectors1, {.... but using an array doesn't work, Please, does anyone know what's the problem? Thanks in advance, Alex. ________________________________________ De: Alexandre Ascasibar Sequeiros [aas...@gm...] Enviado el: martes, 10 de mayo de 2011 13:46 Para: gwt...@li... Asunto: [Gwt-openlayers-users] Select feature in multiple layer Hi all, I'm trying to enable Select feature in multiple layers at the same time. I tried to extend SelectFeatureImpl adding the method: public static native JSObject create(JSObject layer1, JSObject layer2, JSObject options)/*-{ return new $wnd.OpenLayers.Control.SelectFeature([layer1, layer2], options); }-*/; but it doesn't work. Any one know how to handle this? Thank in advance, Alex. ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ |
From: Alexandre A. S. <aas...@gm...> - 2011-05-10 11:51:31
|
Hi all, I'm trying to enable Select feature in multiple layers at the same time. I tried to extend SelectFeatureImpl adding the method: public static native JSObject create(JSObject layer1, JSObject layer2, JSObject options)/*-{ return new $wnd.OpenLayers.Control.SelectFeature([layer1, layer2], options); }-*/; but it doesn't work. Any one know how to handle this? Thank in advance, Alex. ______________________ This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it. ______________________ Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener informacion clasificada por su emisor como confidencial en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion. ______________________ |
From: Christian T. <chr...@gm...> - 2011-05-09 16:43:17
|
Hi Lukas, I refereed to the OpenLayers code related to WMS indeed. For example the the HTTPRequest#getFullRequestString method ( http://trac.osgeo.org/openlayers/browser/trunk/openlayers/lib/OpenLayers/Layer/HTTPRequest.js ) has this problem and is (if I am not wrong) used by the WMS layer to construct the request URL. So perhaps you can create your own MyWMS.js that overrides the specified method with the elaborate check mentioned above. This is just my guess (I have no time at the moment to verify it) Cheers, Chris On Mon, May 9, 2011 at 1:00 PM, Lukas Johansson <luk...@de...>wrote: > Did you mean that you replaced all occurrences in OpenLayers? > I searched gwt-ol without finding any "instanceof Array" at all. > /Lukas > > -----Ursprungligt meddelande----- > Från: Lukas Johansson [mailto:luk...@de...] > Skickat: den 9 maj 2011 11:58 > Till: gwt...@li... > Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays > > Thank you for your answer. I will check/try your solution and see if that > solves my problem as well. > /Lukas > > -----Ursprungligt meddelande----- > Från: Christian Tzolov [mailto:chr...@gm...] > Skickat: den 9 maj 2011 11:53 > Till: gwt...@li... > Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays > > While implementing my own customized (WMS) layer I faced a similar > issue. To fix it I had to replace (in the javascript) the occurrences > of > if (xxxx instanceof Array) { > by the far more elaborate array check: > if(xxxx instanceof Array || !(xxxx instanceof Object) && > Object.prototype.toString.call(xxxx) == "[object Array]" || typeof > xxxx.length == "number" && typeof xxxx.splice != "undefined" && typeof > xxxx.propertyIsEnumerable != "undefined" && > !xxxx.propertyIsEnumerable("splice")) { > > (the xxxx stands for URLs array parameter) > > Whit this fix my layer works fine with multiple urls on all browsers > including FF4. > > Cheers, > Chris > > On Mon, May 9, 2011 at 10:49 AM, Lukas Johansson > <luk...@de...> wrote: > > > > Yes exactly, the array are being concated into a string. > > I did a test project illustrating this a while ago in which I tested both > build 0.5, latest from trunk and my own version where I changed new Array > into new $wnd.Array (which I just verified does not help). In the version > linked below it's the 0.5 version that are included. I have just firebug and > eclipse dev plugin for weeks without finding out what's wrong but of course > I will try even more. Any additional help thought would be deeply > appreciated. > > > > Here is that mail again (links to test project included): > > ----- > > I'm having a lot of problems with Firefox4 in our project. They basically > boils down to two problems: > > 1. Unable to use multiple urls for WMS-layers > > 2. Unable to have a SelectFeature with more than two layers (layers are > added in an array). > > > > I traced both problems down to the point where I am quite confident that > they are related to Arrays and perhaps more so JStringArrays. It seems to be > some problems with the ways arrays are converted into JavaScript arrays in > firefox4. > > > > I've created a simple test project [1] to illustrate this issue which is > also hosted here[2]. This project mimics [3] in different ways (some works, > some don't). The upper left corner is the one that really should work, and > does so in explorer, older versions of firefox and chrome but not In safari > and firefox4. When building this project I've tried both the 0.5 build of > OL-GWT and latest revision but with the same result. > > > > [1] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.zip > > [2] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.html > > [3] http://openlayers.org/dev/examples/multiserver.html > > > > I really don't know what to do next and any help would we deeply > appreciated. > > /Lukas > > > > > > > > > > > > -----Ursprungligt meddelande----- > > Från: Alexander Solovets [mailto:aso...@gm...] > > Skickat: den 9 maj 2011 10:27 > > Till: Lukas Johansson > > Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays > > > > Is the array contents still concatenated into a string? I pointed on > > one of the most frequent error cause. Of course it may be something > > else. Try to use firebug or chromium dev tools to trace the error, > > look every time in JS console. Also it is very helpful to use Eclipse > > developer plugin for GWT. With it you'll never miss the moment when > > something goes wrong =) > > > ------------------------------------------------------------------------------ > > WhatsUp Gold - Download Free Network Management Software > > The most intuitive, comprehensive, and cost-effective network > > management toolset available today. Delivers lowest initial > > acquisition cost and overall TCO of any competing solution. > > http://p.sf.net/sfu/whatsupgold-sd > > _______________________________________________ > > Gwt-openlayers-users mailing list > > Gwt...@li... > > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |
From: Lukas J. <luk...@de...> - 2011-05-09 11:00:47
|
Did you mean that you replaced all occurrences in OpenLayers? I searched gwt-ol without finding any "instanceof Array" at all. /Lukas -----Ursprungligt meddelande----- Från: Lukas Johansson [mailto:luk...@de...] Skickat: den 9 maj 2011 11:58 Till: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays Thank you for your answer. I will check/try your solution and see if that solves my problem as well. /Lukas -----Ursprungligt meddelande----- Från: Christian Tzolov [mailto:chr...@gm...] Skickat: den 9 maj 2011 11:53 Till: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays While implementing my own customized (WMS) layer I faced a similar issue. To fix it I had to replace (in the javascript) the occurrences of if (xxxx instanceof Array) { by the far more elaborate array check: if(xxxx instanceof Array || !(xxxx instanceof Object) && Object.prototype.toString.call(xxxx) == "[object Array]" || typeof xxxx.length == "number" && typeof xxxx.splice != "undefined" && typeof xxxx.propertyIsEnumerable != "undefined" && !xxxx.propertyIsEnumerable("splice")) { (the xxxx stands for URLs array parameter) Whit this fix my layer works fine with multiple urls on all browsers including FF4. Cheers, Chris On Mon, May 9, 2011 at 10:49 AM, Lukas Johansson <luk...@de...> wrote: > > Yes exactly, the array are being concated into a string. > I did a test project illustrating this a while ago in which I tested both build 0.5, latest from trunk and my own version where I changed new Array into new $wnd.Array (which I just verified does not help). In the version linked below it's the 0.5 version that are included. I have just firebug and eclipse dev plugin for weeks without finding out what's wrong but of course I will try even more. Any additional help thought would be deeply appreciated. > > Here is that mail again (links to test project included): > ----- > I'm having a lot of problems with Firefox4 in our project. They basically boils down to two problems: > 1. Unable to use multiple urls for WMS-layers > 2. Unable to have a SelectFeature with more than two layers (layers are added in an array). > > I traced both problems down to the point where I am quite confident that they are related to Arrays and perhaps more so JStringArrays. It seems to be some problems with the ways arrays are converted into JavaScript arrays in firefox4. > > I've created a simple test project [1] to illustrate this issue which is also hosted here[2]. This project mimics [3] in different ways (some works, some don't). The upper left corner is the one that really should work, and does so in explorer, older versions of firefox and chrome but not In safari and firefox4. When building this project I've tried both the 0.5 build of OL-GWT and latest revision but with the same result. > > [1] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.zip > [2] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.html > [3] http://openlayers.org/dev/examples/multiserver.html > > I really don't know what to do next and any help would we deeply appreciated. > /Lukas > > > > > > -----Ursprungligt meddelande----- > Från: Alexander Solovets [mailto:aso...@gm...] > Skickat: den 9 maj 2011 10:27 > Till: Lukas Johansson > Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays > > Is the array contents still concatenated into a string? I pointed on > one of the most frequent error cause. Of course it may be something > else. Try to use firebug or chromium dev tools to trace the error, > look every time in JS console. Also it is very helpful to use Eclipse > developer plugin for GWT. With it you'll never miss the moment when > something goes wrong =) > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Lukas J. <luk...@de...> - 2011-05-09 09:57:49
|
Thank you for your answer. I will check/try your solution and see if that solves my problem as well. /Lukas -----Ursprungligt meddelande----- Från: Christian Tzolov [mailto:chr...@gm...] Skickat: den 9 maj 2011 11:53 Till: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays While implementing my own customized (WMS) layer I faced a similar issue. To fix it I had to replace (in the javascript) the occurrences of if (xxxx instanceof Array) { by the far more elaborate array check: if(xxxx instanceof Array || !(xxxx instanceof Object) && Object.prototype.toString.call(xxxx) == "[object Array]" || typeof xxxx.length == "number" && typeof xxxx.splice != "undefined" && typeof xxxx.propertyIsEnumerable != "undefined" && !xxxx.propertyIsEnumerable("splice")) { (the xxxx stands for URLs array parameter) Whit this fix my layer works fine with multiple urls on all browsers including FF4. Cheers, Chris On Mon, May 9, 2011 at 10:49 AM, Lukas Johansson <luk...@de...> wrote: > > Yes exactly, the array are being concated into a string. > I did a test project illustrating this a while ago in which I tested both build 0.5, latest from trunk and my own version where I changed new Array into new $wnd.Array (which I just verified does not help). In the version linked below it's the 0.5 version that are included. I have just firebug and eclipse dev plugin for weeks without finding out what's wrong but of course I will try even more. Any additional help thought would be deeply appreciated. > > Here is that mail again (links to test project included): > ----- > I'm having a lot of problems with Firefox4 in our project. They basically boils down to two problems: > 1. Unable to use multiple urls for WMS-layers > 2. Unable to have a SelectFeature with more than two layers (layers are added in an array). > > I traced both problems down to the point where I am quite confident that they are related to Arrays and perhaps more so JStringArrays. It seems to be some problems with the ways arrays are converted into JavaScript arrays in firefox4. > > I've created a simple test project [1] to illustrate this issue which is also hosted here[2]. This project mimics [3] in different ways (some works, some don't). The upper left corner is the one that really should work, and does so in explorer, older versions of firefox and chrome but not In safari and firefox4. When building this project I've tried both the 0.5 build of OL-GWT and latest revision but with the same result. > > [1] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.zip > [2] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.html > [3] http://openlayers.org/dev/examples/multiserver.html > > I really don't know what to do next and any help would we deeply appreciated. > /Lukas > > > > > > -----Ursprungligt meddelande----- > Från: Alexander Solovets [mailto:aso...@gm...] > Skickat: den 9 maj 2011 10:27 > Till: Lukas Johansson > Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays > > Is the array contents still concatenated into a string? I pointed on > one of the most frequent error cause. Of course it may be something > else. Try to use firebug or chromium dev tools to trace the error, > look every time in JS console. Also it is very helpful to use Eclipse > developer plugin for GWT. With it you'll never miss the moment when > something goes wrong =) > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Christian T. <chr...@gm...> - 2011-05-09 09:53:07
|
While implementing my own customized (WMS) layer I faced a similar issue. To fix it I had to replace (in the javascript) the occurrences of if (xxxx instanceof Array) { by the far more elaborate array check: if(xxxx instanceof Array || !(xxxx instanceof Object) && Object.prototype.toString.call(xxxx) == "[object Array]" || typeof xxxx.length == "number" && typeof xxxx.splice != "undefined" && typeof xxxx.propertyIsEnumerable != "undefined" && !xxxx.propertyIsEnumerable("splice")) { (the xxxx stands for URLs array parameter) Whit this fix my layer works fine with multiple urls on all browsers including FF4. Cheers, Chris On Mon, May 9, 2011 at 10:49 AM, Lukas Johansson <luk...@de...> wrote: > > Yes exactly, the array are being concated into a string. > I did a test project illustrating this a while ago in which I tested both build 0.5, latest from trunk and my own version where I changed new Array into new $wnd.Array (which I just verified does not help). In the version linked below it's the 0.5 version that are included. I have just firebug and eclipse dev plugin for weeks without finding out what's wrong but of course I will try even more. Any additional help thought would be deeply appreciated. > > Here is that mail again (links to test project included): > ----- > I’m having a lot of problems with Firefox4 in our project. They basically boils down to two problems: > 1. Unable to use multiple urls for WMS-layers > 2. Unable to have a SelectFeature with more than two layers (layers are added in an array). > > I traced both problems down to the point where I am quite confident that they are related to Arrays and perhaps more so JStringArrays. It seems to be some problems with the ways arrays are converted into JavaScript arrays in firefox4. > > I’ve created a simple test project [1] to illustrate this issue which is also hosted here[2]. This project mimics [3] in different ways (some works, some don’t). The upper left corner is the one that really should work, and does so in explorer, older versions of firefox and chrome but not In safari and firefox4. When building this project I’ve tried both the 0.5 build of OL-GWT and latest revision but with the same result. > > [1] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.zip > [2] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.html > [3] http://openlayers.org/dev/examples/multiserver.html > > I really don’t know what to do next and any help would we deeply appreciated. > /Lukas > > > > > > -----Ursprungligt meddelande----- > Från: Alexander Solovets [mailto:aso...@gm...] > Skickat: den 9 maj 2011 10:27 > Till: Lukas Johansson > Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays > > Is the array contents still concatenated into a string? I pointed on > one of the most frequent error cause. Of course it may be something > else. Try to use firebug or chromium dev tools to trace the error, > look every time in JS console. Also it is very helpful to use Eclipse > developer plugin for GWT. With it you'll never miss the moment when > something goes wrong =) > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Lukas J. <luk...@de...> - 2011-05-09 08:49:28
|
Yes exactly, the array are being concated into a string. I did a test project illustrating this a while ago in which I tested both build 0.5, latest from trunk and my own version where I changed new Array into new $wnd.Array (which I just verified does not help). In the version linked below it's the 0.5 version that are included. I have just firebug and eclipse dev plugin for weeks without finding out what's wrong but of course I will try even more. Any additional help thought would be deeply appreciated. Here is that mail again (links to test project included): ----- I’m having a lot of problems with Firefox4 in our project. They basically boils down to two problems: 1. Unable to use multiple urls for WMS-layers 2. Unable to have a SelectFeature with more than two layers (layers are added in an array). I traced both problems down to the point where I am quite confident that they are related to Arrays and perhaps more so JStringArrays. It seems to be some problems with the ways arrays are converted into JavaScript arrays in firefox4. I’ve created a simple test project [1] to illustrate this issue which is also hosted here[2]. This project mimics [3] in different ways (some works, some don’t). The upper left corner is the one that really should work, and does so in explorer, older versions of firefox and chrome but not In safari and firefox4. When building this project I’ve tried both the 0.5 build of OL-GWT and latest revision but with the same result. [1] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.zip [2] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.html [3] http://openlayers.org/dev/examples/multiserver.html I really don’t know what to do next and any help would we deeply appreciated. /Lukas -----Ursprungligt meddelande----- Från: Alexander Solovets [mailto:aso...@gm...] Skickat: den 9 maj 2011 10:27 Till: Lukas Johansson Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays Is the array contents still concatenated into a string? I pointed on one of the most frequent error cause. Of course it may be something else. Try to use firebug or chromium dev tools to trace the error, look every time in JS console. Also it is very helpful to use Eclipse developer plugin for GWT. With it you'll never miss the moment when something goes wrong =) |
From: Lukas J. <luk...@de...> - 2011-05-09 08:18:07
|
Thank you for your answer. I was pretty sure that I had looked trough all the code I use to do the fix that you propuse. For example in my own copy of GWT-OL I have already changed JArrayBaseImpl so it looks like: protected static native JSObject create(int length) /*-{ if (length < 0) { return new $wnd.Array(); } else { return new $wnd.Array(length); } }-*/; But my error is still present. /Lukas Från: Alexander Solovets [mailto:aso...@gm...] Skickat: den 9 maj 2011 09:57 Till: Lukas Johansson Kopia: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays Hi, Lukas! A brief look into JArrayString and related sources says the reason of your error is inappropriate native 'Array' creation. Using any global JS objects one should use $wnd as the scope object. And JArrayBaseImpl uses mere 'new Array()' which is incorrect. Sometimes it is really works. I used to write here about this issue and in some places it was fixed. But it turns out that not in all. If I had access to the sources I'd run something like find ol-gwt/src -name '*.java" | xargs sed -i -e'/new Array\(/new \$wnd\.Array\(/g' =) What I do when meet something like that is derive at some safe point and rewrite buggy code. In your case you could create JMyArrayBase and rewrite its constructor in a proper way. If you plan to work tightly with ol-gwt and GWT in whole I'd recommend you to dig deeply into GWT philosophy. There are a lot of material on official GWT page and some independent developers hold their blogs about GWT. Also there are couple of hard-copy books about development with GWT. Without comprehensive understanding of the basic GWT principles it will be very hard to trace the problems which you will (I'm very sure you will) meet. At least it was so for me. -- Sincerely, Alexander |
From: Alexander S. <aso...@gm...> - 2011-05-09 07:57:16
|
Hi, Lukas! A brief look into JArrayString and related sources says the reason of your error is inappropriate native 'Array' creation. Using any global JS objects one should use $wnd as the scope object. And JArrayBaseImpl uses mere 'new Array()' which is incorrect. Sometimes it is really works. I used to write here about this issue and in some places it was fixed. But it turns out that not in all. If I had access to the sources I'd run something like find ol-gwt/src -name '*.java" | xargs sed -i -e'/new Array\(/new \$wnd\.Array\(/g' =) What I do when meet something like that is derive at some safe point and rewrite buggy code. In your case you could create JMyArrayBase and rewrite its constructor in a proper way. If you plan to work tightly with ol-gwt and GWT in whole I'd recommend you to dig deeply into GWT philosophy. There are a lot of material on official GWT page and some independent developers hold their blogs about GWT. Also there are couple of hard-copy books about development with GWT. Without comprehensive understanding of the basic GWT principles it will be very hard to trace the problems which you will (I'm very sure you will) meet. At least it was so for me. -- Sincerely, Alexander |
From: Towers, V. <Van...@ds...> - 2011-05-04 06:49:36
|
UNCLASSIFIED > I am having difficulty adding some extra functionality to a popup > closebox callback. > I have tried a couple of approaches. Currently I am Creating the popup > passing in the boolean "closebox" set to false in the constructor. > Then I try and add my own CloseListener Eg. > popup.addCloseListener(new CloseListener() { > public void onPopupClose(JSObject evt) > { > // my own implementation > } > }); > But this isn't working as I would have expected.The onPopupClose > method is being hit when I can click the close button and doing the > job. But the close button is being positioned oddly. Sometimes it > is positioned outside of my framed cloud (but is clickable/closable), > othertimes it is in the right spot (top right corner of the cloud) but > doesn't always let me click it because it looks like my html text that > is in the popup is on top of it. > Any ideas what is going on? > Are you using the newest GWT-OL? Notice, that according to changelog addCloseListener is depreciated and not working correctly: http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openla yers/ <http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openl ayers/> I never used it so far so not sure if its related to your problem. /Peter ________________________________ Hi Peter, Thanks for the headsup. You were correct, I was using the old 0.5 snapshot. Have moved to 0.6 and it that fixed it. I did notice this bug http://trac.osgeo.org/openlayers/ticket/3192 <http://trac.osgeo.org/openlayers/ticket/3192> but the suggested CSS in the solution provided did the trick. I am now passing in the callback via the constructor and it is working and displayed as expected. Thanks, Vanessa IMPORTANT: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email. |