Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[no subject]

             if (mapGraphicResource == null) {
                 List<IService> results = CatalogPlugin.getDefault 
().getServiceFactory()
                         .acquire(url);
                 for( IGeoResource resource : results.get(0).members 
(new NullProgressMonitor()) ) {
                     if (resource.getIdentifier().getRef().equals 
(url.getRef())) {
                         mapGraphicResource = resource;
                         break;
                     }
                 }
             }
             if (mapGraphicResource == null)
                 return;
             Layer layer = map.getLayerFactory().createLayer 
(mapGraphicResource);
             map.sendCommandSync(BasicCommandFactory.getInstance 
().createAddLayer(layer));
         } catch (MalformedURLException e) {
             MapGraphicPlugin.log("", e); //$NON-NLS-1$
         } catch (IOException e) {
             MapGraphicPlugin.log("", e); //$NON-NLS-1$
         }


The code also creates and adds the mapgraphics to a map.

Cheers,

Jesse

On 28-Oct-06, at 4:25 AM, Andy Czerwonka wrote:

> I've implemented a MapGraphic extension, but I need a handle to the
> MapGraphic.  I see the example of creating a layer based on the
> MapGraphicService URL, but nowhere do I see how to get the MapGraphic
> handle.  I see (in the debugger) that the MapGraphic is contained  
> in the
> IGeoResource, but I can't figure out how it's exposed.
>
> Thanks in advance,
>
> -andy
>
>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel


--Apple-Mail-3--901428047
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; ">So you've just identified an =
area that we need to work on a bit.=A0 Ideally the MapGraphic Service =
should always be loaded in the catalog but it isn't yet.=A0 So you have =
to load it manually if it isn't in the local catalog the following code =
will do it.=A0 <FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">yourExtensionID=A0</SPAN></FONT>is the id of your map graphic =
:<DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">=A0=A0 =A0=A0 =A0</SPAN></FONT><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">Map map =3D =
ApplicationGISInternal.getActiveMap();</SPAN></FONT></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=
 =A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#7F0055" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">try</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
{</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; "><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =A0 </SPAN></FONT><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">IGeoResource =
mapGraphicResource =3D </SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#7F0055" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">null</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">;</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal =
11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=
 =A0 =A0 =A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">URL url =3D </SPAN></FONT><FONT =
class=3D"Apple-style-span" color=3D"#7F0055" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">new</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
URL(MapGraphicService.</SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#0000C0" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">SERVICE_URL</SPAN></FONT><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">, </SPAN></FONT><FONT =
class=3D"Apple-style-span" color=3D"#2A00FF" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">"#"</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
+ yourExtensionID); </SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#3F7F5F" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">//$NON-NLS-1$</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 </SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">List&lt;IResolve&gt; matches =3D =
CatalogPlugin.getDefault().getLocalCatalog().find(url,</SPAN></FONT></DIV>=
<DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 </SPAN></FONT><FONT =
class=3D"Apple-style-span" color=3D"#7F0055" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">new</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
NullProgressMonitor());</SPAN></FONT></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 </SPAN></FONT><FONT class=3D"Apple-style-span" color=3D"#7F0055" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">if</SPAN></FONT><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
(!matches.isEmpty())</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=A0 =A0=A0 =A0=A0=
 =A0=A0 =A0=A0 =A0mapGraphicResource</SPAN></FONT><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;"> =3D =
(IGeoResource) matches.get(0);</SPAN></FONT></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; font: normal normal normal 11px/normal Monaco; =
min-height: 15px; "><BR></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 </SPAN></FONT><FONT class=3D"Apple-style-span" color=3D"#7F0055" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">if</SPAN></FONT><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
(mapGraphicResource =3D=3D </SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#7F0055" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">null</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">) =
{</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; "><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">List&lt;IService&gt; results =3D =
CatalogPlugin.getDefault().getServiceFactory()</SPAN></FONT></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 </SPAN></FONT><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">.acquire(url);</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#7F0055" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">for</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">( =
IGeoResource resource : results.get(0).members(</SPAN></FONT><FONT =
class=3D"Apple-style-span" color=3D"#7F0055" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">new</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
NullProgressMonitor()) ) {</SPAN></FONT></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#7F0055" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">if</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
(resource.getIdentifier().getRef().equals(url.getRef())) =
{</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; "><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">=A0 =A0=A0 =A0=A0 =A0=A0 =A0=A0 =A0=A0 =A0=A0 =
=A0=A0 =A0mapGraphicResource</SPAN></FONT><FONT class=3D"Apple-style-span"=
 face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;"> =3D resource;</SPAN></FONT></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 </SPAN></FONT><FONT =
class=3D"Apple-style-span" color=3D"#7F0055" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">break</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco"=
 size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">;</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">}</SPAN></FONT></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco"=
 size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">}</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 </SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">}</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 </SPAN></FONT><FONT class=3D"Apple-style-span" color=3D"#7F0055" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">if</SPAN></FONT><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
(mapGraphicResource =3D=3D </SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#7F0055" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">null</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">)</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
color=3D"#7F0055" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">return</SPAN></FONT><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">;</SPAN></FONT></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 </SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">Layer layer =3D =
map.getLayerFactory().createLayer(mapGraphicResource);</SPAN></FONT></DIV>=
<DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=
 =A0 =A0 =A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: =
11px;">map.sendCommandSync(BasicCommandFactory.getInstance().createAddLaye=
r(layer));</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =
</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">} =
</SPAN></FONT><FONT class=3D"Apple-style-span" color=3D"#7F0055" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">catch</SPAN></FONT><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
(MalformedURLException e) {</SPAN></FONT></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 </SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">MapGraphicPlugin.log(</SPAN></FONT><FONT class=3D"Apple-style-span"=
 color=3D"#2A00FF" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">""</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">, =
e); </SPAN></FONT><FONT class=3D"Apple-style-span" color=3D"#3F7F5F" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">//$NON-NLS-1$</SPAN></FONT></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=
 =A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">} </SPAN></FONT><FONT =
class=3D"Apple-style-span" color=3D"#7F0055" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">catch</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco"=
 size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;"> =
(IOException e) {</SPAN></FONT></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0 =A0 =A0 =A0 =A0 =
=A0 </SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: =
11px;">MapGraphicPlugin.log(</SPAN></FONT><FONT class=3D"Apple-style-span"=
 color=3D"#2A00FF" face=3D"Monaco" size=3D"3"><SPAN =
class=3D"Apple-style-span" style=3D"font-size: =
11px;">""</SPAN></FONT><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">, =
e); </SPAN></FONT><FONT class=3D"Apple-style-span" color=3D"#3F7F5F" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">//$NON-NLS-1$</SPAN></FONT></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><FONT class=3D"Apple-style-span" face=3D"Monaco" =
size=3D"3"><SPAN class=3D"Apple-style-span" style=3D"font-size: 11px;">=A0=
 =A0 =A0 =A0 </SPAN></FONT><FONT class=3D"Apple-style-span" =
face=3D"Monaco" size=3D"3"><SPAN class=3D"Apple-style-span" =
style=3D"font-size: 11px;">}</SPAN></FONT></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>The code also creates and =
adds the mapgraphics to a map.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>Jesse</DIV><DIV><BR><DIV><DIV=
>On 28-Oct-06, at 4:25 AM, Andy Czerwonka wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">I've implemented a MapGraphic extension, but I need =
a handle to the<SPAN class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">MapGraphic.<SPAN class=3D"Apple-converted-space">=A0 =
</SPAN>I see the example of creating a layer based on the<SPAN =
class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
">MapGraphicService URL, but nowhere do I see how to get the =
MapGraphic<SPAN class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">handle.<SPAN class=3D"Apple-converted-space">=A0 =
</SPAN>I see (in the debugger) that the MapGraphic is contained in =
the<SPAN class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">IGeoResource, but I can't figure out how it's =
exposed.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">Thanks in advance,</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-andy<SPAN =
class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: =
14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; =
">_______________________________________________</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">User-friendly Desktop Internet GIS (uDig)</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><A =
href=3D"http://udig.refractions.net";>http://udig.refractions.net</A></DIV>=
<DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><A =
href=3D"http://lists.refractions.net/mailman/listinfo/udig-devel";>http://l=
ists.refractions.net/mailman/listinfo/udig-devel</A></DIV> =
</BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>=

--Apple-Mail-3--901428047--


Back to the top