Select to view content in your preferred language

Display of multipoint shapes ?

1050
2
10-22-2012 06:32 AM
JFr
by
New Contributor
Hello,
I noticed that features which are represented by multipoints are not displayed in a feature layer in an Java-application. The layers get all listed in the TOC (a JLegend-component), but the multipoint-features aren't shown in the jmap (in contrast to point-features). Is there a way to display multipoints without converting them to point shapes ?

Thanks,
J.
0 Kudos
2 Replies
EricBader
Regular Contributor II
That is interesting.
Do you have ArcMap?
Can you see your multipoint features in ArcMap?
Can you share a code example?
I can use a Graphics Layer with a MultiPoint, no problem.
0 Kudos
JFr
by
New Contributor
My multipoint features are visible in ArcMap (Version 10.1) and are displayed as normal. This problem only occurs when I try to display multipoint features in a feature layer (ArcGISFeatureLayer or ArcGISLocalFeatureLayer). When I use a graphics layer there's no problem too. The features are accessed via a local service, because these features should be editable in the application. The following code example shows how the layers in a map package are accessed in this application:
        
        map = new JMap();
        //Background for the feature layers
        ArcGISDynamicMapServiceLayer background = new ArcGISLocalDynamicMapServiceLayer(dir+"\\data\\fromShapefile.mpk");
        map.getLayers().add(background);
        layerList = map.getLayers();
        //Start new feature service to involve editable feature layer
        featureService = new LocalFeatureService(dir+"\\data\\MyPackage.mpk");
        //Details of all layer in the feature service
        details = featureService.getFeatureLayers();
        //Add feature layer to the map as soon as the service is started
        featureService.addLocalServiceStartCompleteListener(new LocalServiceStartCompleteListener() {
            @Override
         public void localServiceStartComplete(LocalServiceStartCompleteEvent arg0) {
             for(int i = 0; i < details.size();i++)
             {
                 // The current feature layer
              featureLayer = new ArcGISLocalFeatureLayer(featureService.getPath(),i,true);
              featureLayer.setUrl(details.get(i).getUrl());
                 layers.add(featureLayer);
              layerList.add(featureLayer);
                }
            }
        });
        //Start feature service asynchronous
        featureService.startAsync(); 

I also added the used map package in the attachment.

Regards
J.
0 Kudos