Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Problems in rendering images in RC9

Most likely it is a problem with the Service object you are using. We modified the API slightly. We thought it would cause compile time errors and it would be obvious why it was failing but you are the second person to have a problem. In the other case the getServices() method returned null and that caused all sorts of problems.

On a different note you can probably simplify your code by using ApplicationGIS.addLayersToMap(...).

Jesse


On 23-Feb-07, at 3:39 AM, Diego Cámera García wrote:

Hi, I have trouble to display an image (which is rendered from a URL) in uDig 1.1.9RC. The same code works fine in uDig 1.1.4RC, but when I target my app to RC9, the image doesn't display anymore. This is the conflicting code:

			ImageServiceExtension ise = new ImageServiceExtension();
			IService service = ise.createService(url, null, env);
			List<IService> list = new ArrayList<IService>();
			list.add(service);

			List<? extends IGeoResource> resources = service.members(null);

			resource = (IGeoResource) resources.get(0);

			LayerFactory factory = map.getLayerFactory();
			if (factory == null) {
				factory = ProjectFactory.eINSTANCE.createLayerFactory();
			}

			List<Layer> layers = new ArrayList<Layer>();

			Layer layer = null;
			try {
				layer = factory.createLayer(resource);
			} catch (Exception e) {
				throw new IOException(e.getMessage() + e.getCause());
			}

Is there any change in any of these classes that I'm using?

Thanks in advance, Diego


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top