Hello,
Ive only seen labelingInfo being cast on dynamiclayer (by using DrawingInfo) in android apps. Any advices how can I cast it on ArcGISFeatureLayer? Thanks!
ArcGIS Services DirectoryHome > Clermont_TEST (MapServer) Help | API ReferenceClermont_TEST (MapServer)View In: ArcMap ArcGIS Explorer ArcGIS JavaScript ArcGIS.com Map Google Earth View Footprint In: Google Earth Service Description: Map Name: CouchesLegend All Layers and Tables Layers:SIG.COVAGE.RESCOV_SITES (0)SIG.COVAGE.RESCOV_CABLES (1)SIG.COVAGE.RESCOV_PT_TECH (2)SIG.COVAGE.RESCOV_SUPPORT (3)Description: Copyright Text: Spatial Reference: PROJCS["RGF_1993_Lambert_93",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",700000.0],PARAMETER["False_Northing",6600000.0],PARAMETER["Central_Meridian",3.0],PARAMETER["Standard_Parallel_1",44.0],PARAMETER["Standard_Parallel_2",49.0],PARAMETER["Latitude_Of_Origin",46.5],UNIT["Meter",1.0]]Single Fused Map Cache: false Initial Extent:XMin: 684972.8280251798YMin: 6510896.448649341XMax: 735224.7604746498YMax: 6528690.575549481Spatial Reference: PROJCS["RGF_1993_Lambert_93",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",700000.0],PARAMETER["False_Northing",6600000.0],PARAMETER["Central_Meridian",3.0],PARAMETER["Standard_Parallel_1",44.0],PARAMETER["Standard_Parallel_2",49.0],PARAMETER["Latitude_Of_Origin",46.5],UNIT["Meter",1.0]]Full Extent:XMin: 700903.4631999952YMin: 6511705.272599347XMax: 719294.1252998349YMax: 6527881.751599476Spatial Reference: PROJCS["RGF_1993_Lambert_93",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",700000.0],PARAMETER["False_Northing",6600000.0],PARAMETER["Central_Meridian",3.0],PARAMETER["Standard_Parallel_1",44.0],PARAMETER["Standard_Parallel_2",49.0],PARAMETER["Latitude_Of_Origin",46.5],UNIT["Meter",1.0]]Units: esriMeters Supported Image Format Types: PNG32,PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,BMPDocument Info:Title:Author:Comments:Subject:Category:Keywords:AntialiasingMode: FastestTextAntialiasingMode: NormalSupported Interfaces: REST SOAP WFS Supported Operations: Export Map Identify Find
Layer: SIG.COVAGE.RESCOV_SITES (ID:0)Display Field: NOMType: Feature Layer Geometry Type: esriGeometryPoint Description: Definition Expression: RESEAU = 'CC' Copyright Text: Min. Scale: 0.0 Max. Scale: 0.0 Default Visibility: trueExtent:XMin: 335847.84710250073YMin: 6196674.762395348XMax: 1227493.0724970268YMax: 7108515.558903408Spatial Reference: PROJCS["RGF_1993_Lambert_93",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",700000.0],PARAMETER["False_Northing",6600000.0],PARAMETER["Central_Meridian",3.0],PARAMETER["Standard_Parallel_1",44.0],PARAMETER["Standard_Parallel_2",49.0],PARAMETER["Latitude_Of_Origin",46.5],UNIT["Meter",1.0]]Drawing Info:Renderer:Simple Renderer:Symbol:Picture Marker Symbol:Label: Description: Transparency: 0Labeling Info:Label Placement: esriServerPointLabelPlacementAboveRightLabel Expression: [NOM]Use Coded Values: trueSymbol:Simple Text Symbol:Color: [0, 0, 0, 255]Background Color: N/AOutline Color: N/AVertical Alignment: bottomHorizontal Alignment: centerRight to Left: falseAngle: 0.0XOffset: 0.0YOffset: 0.0Size: 8.0Font Family: ArialFont Style: normalFont Weight: normalFont Decoration: noneMin. Scale: 5000.0Max. Scale: 0.0Has Attachments: falseHTML Popup Type: esriServerHTMLPopupTypeAsHTMLTextType ID Field: N/AFields:OBJECTID ( Type: esriFieldTypeOID, Alias: OBJECTID )NOM ( Type: esriFieldTypeString, Alias: NOM , Length: 20 )ETAT ( Type: esriFieldTypeString, Alias: ETAT , Length: 20 )DATEMODIFICATION ( Type: esriFieldTypeString, Alias: DATEMODIFICATION , Length: 20 )CODE ( Type: esriFieldTypeString, Alias: CODE , Length: 20 )DATE ( Type: esriFieldTypeString, Alias: DATE , Length: 20 )RESEAU ( Type: esriFieldTypeString, Alias: RESEAU , Length: 20 )IDCONTENEUR ( Type: esriFieldTypeString, Alias: IDCONTENEUR , Length: 20 )TYPESTRUCTUREL ( Type: esriFieldTypeString, Alias: TYPESTRUCTUREL , Length: 20 )EMPRISE ( Type: esriFieldTypeString, Alias: EMPRISE , Length: 20 )DSP ( Type: esriFieldTypeString, Alias: DSP , Length: 20 )GESTIONNAIRE ( Type: esriFieldTypeString, Alias: GESTIONNAIRE , Length: 20 )PROPRIETAIRE ( Type: esriFieldTypeString, Alias: PROPRIETAIRE , Length: 20 )IDADRESSE ( Type: esriFieldTypeString, Alias: IDADRESSE , Length: 20 )ID ( Type: esriFieldTypeString, Alias: ID , Length: 20 )CREATEUR ( Type: esriFieldTypeString, Alias: CREATEUR , Length: 20 )TYPEFONCTIONNEL ( Type: esriFieldTypeString, Alias: TYPEFONCTIONNEL , Length: 20 )DATECREATION ( Type: esriFieldTypeString, Alias: DATECREATION , Length: 20 )MODIFICATEUR ( Type: esriFieldTypeString, Alias: MODIFICATEUR , Length: 20 )SHAPE ( Type: esriFieldTypeGeometry, Alias: SHAPE )Supported Interfaces: REST Supported Operations: Query
ArcGISDynamicMapServiceLayer mapLayer = new ArcGISDynamicMapServiceLayer( "http://10.192.1.44:8399/arcgis/rest/services/Clermont_TEST/MapServer"); mMapView.addLayer(mapLayer);
Hi Zijian,Yes, you can use Feature Service to support editing functionalities while using the Map Service to display the label as per my previous suggestion from Method 1, that is, author the map with proper labelling. Whenever a geometry's attribute is added/updated through the Feature Service, the Map Server will be able to render new map images with the updated information. For this to happen, you cannot use a TileMapServiceLayer which lets you to work with a cached map service resource exposed by the ArcGIS Server REST API. A cached service accesses tiles from a cache instead of dynamically rendering images. For dynamic map services, see https://developers.arcgis.com/android/api-reference/reference/com/esri/android/map/DynamicLayer.html.Let me know if I understood you correctly.Cheers,Raymond
DynamicLayer li = new ArcGISDynamicMapServiceLayer(this.getResources() .getString(R.string.feature_url)); mMapView.addLayer(li);
Clermont_TEST (MapServer) View In: ArcMap ArcGIS Explorer ArcGIS JavaScript ArcGIS.com Map Google Earth View Footprint In: Google Earth Service Description: Map Name: Couches Legend All Layers and Tables Layers: SIG.COVAGE.RESCOV_SITES (0) SIG.COVAGE.RESCOV_CABLES (1) SIG.COVAGE.RESCOV_PT_TECH (2) SIG.COVAGE.RESCOV_SUPPORT (3) Description: Copyright Text:
Layer: SIG.COVAGE.RESCOV_SITES (ID:0) Display Field: NOM Type: Feature Layer Geometry Type: esriGeometryPoint Description: Definition Expression: RESEAU = 'CC' Copyright Text: Min. Scale: 0.0 Max. Scale: 0.0 Default Visibility: true Extent: XMin: 335847.84710250073 YMin: 6196674.762395348 XMax: 1227493.0724970268 YMax: 7108515.558903408 Spatial Reference: PROJCS["RGF_1993_Lambert_93",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",700000.0],PARAMETER["False_Northing",6600000.0],PARAMETER["Central_Meridian",3.0],PARAMETER["Standard_Parallel_1",44.0],PARAMETER["Standard_Parallel_2",49.0],PARAMETER["Latitude_Of_Origin",46.5],UNIT["Meter",1.0]] Drawing Info: Renderer: Simple Renderer: Symbol: Picture Marker Symbol: Label: Description: Transparency: 0 Labeling Info: Label Placement: esriServerPointLabelPlacementAboveRight Label Expression: [NOM] Use Coded Values: true Symbol: Simple Text Symbol: Color: [0, 0, 0, 255] Background Color: N/A Outline Color: N/A Vertical Alignment: bottom Horizontal Alignment: center Right to Left: false Angle: 0.0 XOffset: 0.0 YOffset: 0.0 Size: 8.0 Font Family: Arial Font Style: normal Font Weight: normal Font Decoration: none Min. Scale: 5000.0 Max. Scale: 0.0
Hi Zijian,Generally speaking, there are two methods to this:If you want the map service to automatically show labels, you need to set up labels in your data in ArcMap before you publish it as a map service. Labels are only supported on map services. For details on making a map with labels in ArcMap, see http://resources.arcgis.com/en/help/main/10.2/index.html#/Essential_labeling_concepts/00s80000000t000000/.However, if you wish to pull in attribute information from the feature service to setup and draw the label in android, check out this: https://developers.arcgis.com/android/api-reference/reference/com/esri/core/map/LabelingInfo.htmlHope it helps point your project in the right direction.Cheers,Raymond
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.