<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Hosted line feature layer not rendered on map in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328628#M2783</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/48868"&gt;@MarkBaird&lt;/a&gt;&amp;nbsp;Thanks for your response.&lt;/P&gt;&lt;P&gt;I removed WMTS layer. The above snippet seems to be working. But, my hosted &lt;STRONG&gt;LINE&lt;/STRONG&gt; feature layer is not visible yet, even though it is loaded.&amp;nbsp; I could not figure out what could have gone wrong with feature layer. Is there anything I need to check?&lt;/P&gt;&lt;P&gt;The layer json looks like this:&lt;/P&gt;&lt;P&gt;Display Field: trackid&lt;/P&gt;&lt;P&gt;Type: Feature Layer&lt;/P&gt;&lt;P&gt;Geometry Type: esriGeometryPolyline&lt;/P&gt;&lt;P&gt;Description:&lt;/P&gt;&lt;P&gt;Definition Expression: N/A&lt;/P&gt;&lt;P&gt;Copyright Text:&lt;/P&gt;&lt;P&gt;Default Visibility: true&lt;/P&gt;&lt;P&gt;MaxRecordCount: 4000&lt;/P&gt;&lt;P&gt;Supported Query Formats: JSON, AMF, geoJSON&lt;/P&gt;&lt;P&gt;Min Scale: 0&lt;/P&gt;&lt;P&gt;Max Scale: 0&lt;/P&gt;&lt;P&gt;Supports Advanced Queries: true&lt;/P&gt;&lt;P&gt;Supports Statistics: true&lt;/P&gt;&lt;P&gt;Use Standardized Queries: true&lt;/P&gt;&lt;P&gt;Supports ValidateSQL: true&lt;/P&gt;&lt;P&gt;Supports Calculate: true&lt;/P&gt;&lt;P&gt;Extent:&lt;/P&gt;&lt;P&gt;XMin: NaN&lt;BR /&gt;YMin: NaN&lt;BR /&gt;XMax: NaN&lt;BR /&gt;YMax: NaN&lt;BR /&gt;Spatial Reference: 4326 (4326)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drawing Info:&lt;/P&gt;&lt;P&gt;Renderer:&lt;BR /&gt;Simple Renderer:&lt;BR /&gt;Symbol:&lt;BR /&gt;Style: esriSLSSolid&lt;BR /&gt;Color: [135, 70, 31, 255]&lt;BR /&gt;Width: 1 Label: N/A&lt;BR /&gt;Description: N/A Transparency: 0&lt;BR /&gt;Labeling Info:&lt;/P&gt;&lt;P&gt;Advanced Query Capabilities:&lt;/P&gt;&lt;P&gt;Supports Statistics: true&lt;BR /&gt;Supports OrderBy: true&lt;BR /&gt;Supports Distinct: true&lt;BR /&gt;Supports Pagination: true&lt;BR /&gt;Supports TrueCurve: true&lt;BR /&gt;Supports Returning Query Extent: true&lt;BR /&gt;Supports Query With Distance: true&lt;BR /&gt;Supports Sql Expression: true&lt;BR /&gt;Supports Query With ResultType: true&lt;BR /&gt;Supports Returning Geometry Centroid: false&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;HasZ: true&lt;/P&gt;&lt;P&gt;HasM: false&lt;/P&gt;&lt;P&gt;Time Info:&lt;/P&gt;&lt;P&gt;Start Time Field: currenttime&lt;BR /&gt;End Time Field: null&lt;BR /&gt;Track ID Field: null&lt;BR /&gt;Time Extent: N/A&lt;BR /&gt;Time Reference:&lt;BR /&gt;Time Zone: India Standard Time&lt;BR /&gt;Respects Daylight Saving: false&lt;BR /&gt;Time Interval: 10&lt;BR /&gt;Time Interval Units: esriTimeUnitsUnknown&lt;BR /&gt;Has Live Data: true&lt;BR /&gt;Export Options:&lt;BR /&gt;Use Time: true&lt;BR /&gt;Time Data Cumulative: false&lt;BR /&gt;Time Offset: null (null)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Has Attachments: false&lt;/P&gt;&lt;P&gt;HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText&lt;/P&gt;&lt;P&gt;Type ID Field:&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 11:50:45 GMT</pubDate>
    <dc:creator>MaheshP</dc:creator>
    <dc:date>2023-09-14T11:50:45Z</dc:date>
    <item>
      <title>Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328582#M2781</link>
      <description>&lt;P&gt;I am not able to render a line feature layer even though the feature layer is loaded successfully. If I query the features, it will render but still it blinks and goes away when I pan/zoom the map. Let me know if I am missing any thing. Here I am attaching the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Layer currentBaseLayer = new WmtsLayer(&amp;lt;locally hosted url&amp;gt;);&lt;BR /&gt;map.getOperationalLayers().add(currentBaseLayer);&lt;BR /&gt;&lt;BR /&gt;serviceGeodatabase = new ServiceGeodatabase(GEOLOGY_FEATURE_SERVICE);&lt;BR /&gt;serviceGeodatabase.addDoneLoadingListener(() -&amp;gt; {&lt;/P&gt;&lt;P&gt;serviceFeatureTable = serviceGeodatabase.getTable(0);&lt;/P&gt;&lt;P&gt;featureLayer = new FeatureLayer(serviceFeatureTable);&lt;/P&gt;&lt;P&gt;SimpleLineSymbol bikeTrailSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.DASH, 0xffff0000, 2.0f);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;featureLayer.setRenderer(bikeTrailRenderer);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;map.getOperationalLayers().add(featureLayer);&lt;BR /&gt;featureLayer.addDoneLoadingListener(() -&amp;gt; {&lt;BR /&gt;System.out.println(featureLayer.getLoadStatus());&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;});&lt;BR /&gt;serviceGeodatabase.loadAsync();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 14 Sep 2023 07:11:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328582#M2781</guid>
      <dc:creator>MaheshP</dc:creator>
      <dc:date>2023-09-14T07:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328610#M2782</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/718568"&gt;@MaheshP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've taken a quick look at your code, but it isn't complete.&amp;nbsp; The code which initialises the bikeTrailRenderer is missing.&amp;nbsp; I've assumed you are using a SimpleRenderer here and managed to get the service working using the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;private static final String GEOLOGY_FEATURE_SERVICE =
      "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Energy/Geology/FeatureServer/9";

  @Override
  public void start(Stage stage) {

    try {
      // create stack pane and application scene
      StackPane stackPane = new StackPane();
      Scene scene = new Scene(stackPane);

      // size the stage, add a title, and set scene to stage
      stage.setTitle("Feature Layer Feature Service Sample");
      stage.setHeight(700);
      stage.setWidth(800);
      stage.setScene(scene);
      stage.show();

      // authentication with an API key or named user is required to access basemaps and other location services
      String yourAPIKey = System.getProperty("apiKey");
      ArcGISRuntimeEnvironment.setApiKey(yourAPIKey);

      // create a map with the terrain basemap style
      ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_TERRAIN);

      // create a map view and set the map to it
      mapView = new MapView();
      mapView.setMap(map);

      // set a viewpoint on the map view
      mapView.setViewpoint(new Viewpoint(new Point(-13176752, 4090404, SpatialReferences.getWebMercator()), 500000));

      // create feature layer with its service feature table
      // create the service feature table
      ServiceFeatureTable serviceFeatureTable = new ServiceFeatureTable(GEOLOGY_FEATURE_SERVICE);

      // create the feature layer using the service feature table
      FeatureLayer featureLayer = new FeatureLayer(serviceFeatureTable);

      SimpleLineSymbol bikeTrailSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.DASH, 0xffff0000, 2.0f);

      SimpleRenderer bikeTrailRenderer = new SimpleRenderer(bikeTrailSymbol);


      featureLayer.setRenderer(bikeTrailRenderer);

      // add the feature layer to the map's operational layers
      map.getOperationalLayers().add(featureLayer);

      // add the map view to stack pane
      stackPane.getChildren().add(mapView);

    } catch (Exception e) {
      // on any error, display stack trace
      e.printStackTrace();
    }
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works fine, then I'd start looking at your WMTS layer to see if that is causing the issue.&amp;nbsp; There is a WMTS sample &lt;A href="https://github.com/Esri/arcgis-maps-sdk-java-samples/tree/main/ogc/wmts-layer" target="_self"&gt;here&lt;/A&gt; which you can look at.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 10:53:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328610#M2782</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2023-09-14T10:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328628#M2783</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/48868"&gt;@MarkBaird&lt;/a&gt;&amp;nbsp;Thanks for your response.&lt;/P&gt;&lt;P&gt;I removed WMTS layer. The above snippet seems to be working. But, my hosted &lt;STRONG&gt;LINE&lt;/STRONG&gt; feature layer is not visible yet, even though it is loaded.&amp;nbsp; I could not figure out what could have gone wrong with feature layer. Is there anything I need to check?&lt;/P&gt;&lt;P&gt;The layer json looks like this:&lt;/P&gt;&lt;P&gt;Display Field: trackid&lt;/P&gt;&lt;P&gt;Type: Feature Layer&lt;/P&gt;&lt;P&gt;Geometry Type: esriGeometryPolyline&lt;/P&gt;&lt;P&gt;Description:&lt;/P&gt;&lt;P&gt;Definition Expression: N/A&lt;/P&gt;&lt;P&gt;Copyright Text:&lt;/P&gt;&lt;P&gt;Default Visibility: true&lt;/P&gt;&lt;P&gt;MaxRecordCount: 4000&lt;/P&gt;&lt;P&gt;Supported Query Formats: JSON, AMF, geoJSON&lt;/P&gt;&lt;P&gt;Min Scale: 0&lt;/P&gt;&lt;P&gt;Max Scale: 0&lt;/P&gt;&lt;P&gt;Supports Advanced Queries: true&lt;/P&gt;&lt;P&gt;Supports Statistics: true&lt;/P&gt;&lt;P&gt;Use Standardized Queries: true&lt;/P&gt;&lt;P&gt;Supports ValidateSQL: true&lt;/P&gt;&lt;P&gt;Supports Calculate: true&lt;/P&gt;&lt;P&gt;Extent:&lt;/P&gt;&lt;P&gt;XMin: NaN&lt;BR /&gt;YMin: NaN&lt;BR /&gt;XMax: NaN&lt;BR /&gt;YMax: NaN&lt;BR /&gt;Spatial Reference: 4326 (4326)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drawing Info:&lt;/P&gt;&lt;P&gt;Renderer:&lt;BR /&gt;Simple Renderer:&lt;BR /&gt;Symbol:&lt;BR /&gt;Style: esriSLSSolid&lt;BR /&gt;Color: [135, 70, 31, 255]&lt;BR /&gt;Width: 1 Label: N/A&lt;BR /&gt;Description: N/A Transparency: 0&lt;BR /&gt;Labeling Info:&lt;/P&gt;&lt;P&gt;Advanced Query Capabilities:&lt;/P&gt;&lt;P&gt;Supports Statistics: true&lt;BR /&gt;Supports OrderBy: true&lt;BR /&gt;Supports Distinct: true&lt;BR /&gt;Supports Pagination: true&lt;BR /&gt;Supports TrueCurve: true&lt;BR /&gt;Supports Returning Query Extent: true&lt;BR /&gt;Supports Query With Distance: true&lt;BR /&gt;Supports Sql Expression: true&lt;BR /&gt;Supports Query With ResultType: true&lt;BR /&gt;Supports Returning Geometry Centroid: false&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;HasZ: true&lt;/P&gt;&lt;P&gt;HasM: false&lt;/P&gt;&lt;P&gt;Time Info:&lt;/P&gt;&lt;P&gt;Start Time Field: currenttime&lt;BR /&gt;End Time Field: null&lt;BR /&gt;Track ID Field: null&lt;BR /&gt;Time Extent: N/A&lt;BR /&gt;Time Reference:&lt;BR /&gt;Time Zone: India Standard Time&lt;BR /&gt;Respects Daylight Saving: false&lt;BR /&gt;Time Interval: 10&lt;BR /&gt;Time Interval Units: esriTimeUnitsUnknown&lt;BR /&gt;Has Live Data: true&lt;BR /&gt;Export Options:&lt;BR /&gt;Use Time: true&lt;BR /&gt;Time Data Cumulative: false&lt;BR /&gt;Time Offset: null (null)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Has Attachments: false&lt;/P&gt;&lt;P&gt;HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText&lt;/P&gt;&lt;P&gt;Type ID Field:&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 11:50:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328628#M2783</guid>
      <dc:creator>MaheshP</dc:creator>
      <dc:date>2023-09-14T11:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328640#M2784</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="map.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80665i3C5D53783FB9FA61/image-size/large?v=v2&amp;amp;px=999" role="button" title="map.PNG" alt="map.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:24:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328640#M2784</guid>
      <dc:creator>MaheshP</dc:creator>
      <dc:date>2023-09-14T12:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328650#M2785</link>
      <description>&lt;P&gt;I can't see a basemap being displayed in your application above.&amp;nbsp; Are you using a basemap or are you just displaying the feature service on its own?&lt;/P&gt;&lt;P&gt;Would you be able to share your feature service?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:54:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328650#M2785</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2023-09-14T12:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328657#M2786</link>
      <description>&lt;P&gt;As the feature service is locally hosted, I can not share the service. The code showing the basemap.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;map = new ArcGISMap();

// create a map view and set the map to it
mapView = new MapView();
mapView.setMap(map);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The same code works for another line feature layer.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="map_2.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80669i0E462DF823C36FB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="map_2.PNG" alt="map_2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 13:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328657#M2786</guid>
      <dc:creator>MaheshP</dc:creator>
      <dc:date>2023-09-14T13:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328685#M2787</link>
      <description>&lt;P&gt;It's hard for me to diagnose without accessing the service.&amp;nbsp; For the service which does work, is the spatial reference different to the one which does work?&lt;/P&gt;&lt;P&gt;Not having a basemap I suspect is the cause of the issue.&lt;/P&gt;&lt;P&gt;Looking at the service definition of the service you are having trouble with I can see it is in wgs84 (&lt;SPAN&gt;Spatial Reference: 4326 (4326)).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I wonder if you initialise the map to the spatial reference which matches the service it might make it work.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;ArcGISMap map = new ArcGISMap(SpatialReferences.getWgs84());&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 13:43:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328685#M2787</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2023-09-14T13:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328986#M2788</link>
      <description>&lt;P&gt;Initializing the map with spatial reference did not work. I tried initiliazing the ArcMap with PortalItem. The service which is working and the service which is not, both have the same spatial reference;&amp;nbsp;(4326). Interesting thing is; It used to work initially when I published the service. Is there anything I need to check?&lt;/P&gt;&lt;P&gt;Thanks for your time&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 06:42:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328986#M2788</guid>
      <dc:creator>MaheshP</dc:creator>
      <dc:date>2023-09-15T06:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328987#M2789</link>
      <description>&lt;P&gt;When I query the feature layer, it is showing but goes away when I pan the map&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 06:43:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1328987#M2789</guid>
      <dc:creator>MaheshP</dc:creator>
      <dc:date>2023-09-15T06:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hosted line feature layer not rendered on map</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1329485#M2790</link>
      <description>&lt;P&gt;Without accessing the data its not easy for me to diagnose why this is happening.&lt;/P&gt;&lt;P&gt;If you can't make the service available to me, then its is worth contacting your local distributor (Esri India?), or our tech support to get a reproducer complete with the data.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 08:51:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hosted-line-feature-layer-not-rendered-on-map/m-p/1329485#M2790</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2023-09-18T08:51:21Z</dc:date>
    </item>
  </channel>
</rss>

