I'm trying to make an offline map using .net sdk. Here, I downloaded the map information in png format via tile layer. I can print the map on the screen. But there is only a map. The cities have no borders and cities have no names. How can I add these plugins? You capture the locations of the cities in the feature layer with a .gpkg file, but it only puts dots there.
Solved! Go to Solution.
@nevcivanokumuş thank you for your post. Display city name labels and borders offline is possible given the right data.
Can you verify that your Geopackage has a feature table with a feature layer with a Polygon or Polyline geometry type? To do this, iterate through GeoPackageFeatureTables and check each table's GeometryType. You can also explore the metadata of the geopackage to determine this. You'll need to make sure you have polygons representing borders for the cities you'd like to display, plus a field for each city name.
If it doesn't have these requirements, you'll need to find a feature service for this (you can try ArcGIS Living Atlas of the World). You may also author your own feature layer using ArcGIS Pro.
If you do have a feature table representing borders, you'll need to consume the feature table as the source of a feature layer. Load this layer onto the map.
Finally, see this code sample for creating a labelling expression sample using Arcade. You can take advantage of the city name field for this.
You also might consider creating a custom basemap style. Please feel free to give more details on your workflow, or if these solutions aren't applicable to your project goals.
@nevcivanokumuş thank you for your post. Display city name labels and borders offline is possible given the right data.
Can you verify that your Geopackage has a feature table with a feature layer with a Polygon or Polyline geometry type? To do this, iterate through GeoPackageFeatureTables and check each table's GeometryType. You can also explore the metadata of the geopackage to determine this. You'll need to make sure you have polygons representing borders for the cities you'd like to display, plus a field for each city name.
If it doesn't have these requirements, you'll need to find a feature service for this (you can try ArcGIS Living Atlas of the World). You may also author your own feature layer using ArcGIS Pro.
If you do have a feature table representing borders, you'll need to consume the feature table as the source of a feature layer. Load this layer onto the map.
Finally, see this code sample for creating a labelling expression sample using Arcade. You can take advantage of the city name field for this.
You also might consider creating a custom basemap style. Please feel free to give more details on your workflow, or if these solutions aren't applicable to your project goals.