<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Bruno.<br>
<br>
The FLyrWCS class has a constructor that uses a map of parameters. I
suggest that you have a look to this constructor.<br>
<br>
Regards,<br>
Jorge.<br>
<br>
Could you please sen us the log file or the messages written on your
console?<br>
<br>
On 04/23/2010 03:17 AM, Bruno Gomes wrote:
<blockquote
cite="mid:h2p68b9e2081004221817m9f08db3at7ab98ae4c7b52b0@mail.gmail.com"
type="cite">Hello to all!<br>
Im my extension i'm trying to add a layer to a view.<br>
I have a method to create a wcs layer[1], this create the layer with
the parameters passed by me. After the layer creation, i try to add the
layer to a view, i do something like this:<br>
<br>
IWindow iwin = PluginServices.getMDIManager().getActiveWindow();<br>
MapContext mapcontext = mapControl.getMapContext();<br>
Map mapControl = ((View) iwin).getMapControl();<br>
<br>
FLyrWCS l = createWCSLayer(param);<br>
if (l != null) {<br>
l.setVisible(true);<br>
mapcontext.beginAtomicEvent();<br>
AddLayer.checkProjection(l, mapControl.getViewPort());<br>
try {<br>
mapcontext.getLayers().addLayer(l);<br>
} catch (CancelationException e) {<br>
e.printStackTrace();<br>
}<br>
mapcontext.endAtomicEvent();<br>
}<br>
<br>
[1]<br>
public FLyrWCS createWCSLayer(Map<String,Object> parametros){<br>
<br>
FLyrWCS layer = new FLyrWCS();<br>
<br>
layer.setHost((String) parametros.get("Host"));<br>
layer.setCoverageName((String)
parametros.get("CurrentCoverageName"));<br>
layer.setSRS((String) parametros.get("SRS"));<br>
layer.setFormat((String) parametros.get("Format"));<br>
layer.setDriver((FMapWCSDriver) parametros.get("Driver"));<br>
layer.setTime((String) parametros.get("Time"));<br>
layer.setParameter((String) parametros.get("Parameter"));<br>
layer.setName((String) parametros.get("Name"));<br>
layer.setMaxResolution((Point2D)
parametros.get("MaxResolution"));<br>
<br>
return layer;<br>
}<br>
<br>
The problem is that my layer appears in the view table of contents
(TOC), but the map not appear. What im doing wrong? Help please!! <br>
<br>
-- <br>
Bruno Gomes<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Gvsig_internacional mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a>
<a class="moz-txt-link-freetext" href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jorge Piera Llodrá
gvSIG Development Team
PRODEVELOP
Plaza Don Juan de Villarrasa, 14 - 5
46001 Valencia
Tel: +34 963510612
Fax: +34 963510908
e-mail: <a class="moz-txt-link-abbreviated" href="mailto:jpiera@prodevelop.es">jpiera@prodevelop.es</a>
<a class="moz-txt-link-freetext" href="http://www.prodevelop.es">http://www.prodevelop.es</a>
<a class="moz-txt-link-freetext" href="http://www.gvsig.org">http://www.gvsig.org</a>
</pre>
</body>
</html>