Annotations are not being displayed properly in Android

1342
5
Jump to solution
08-11-2017 02:51 AM
LageplanGöttingen
New Contributor III

Hi,

I have published a custom basemap which uses annotations. I'm displaying the annotations in Verdana, font size = 10, black color and a white halo around it.

The attached screenshot "annotations_arcmap" displays one of the annotations as it is shown in ArcMap.

When I embed the basemap into a JavaScript Web application, it still looks okay (see screenshot "annotation_Web").

When I embed it into Android using the old 10.2.9 SDK, annotations are not displayed properly any more (see screenshot "annotation_Android"), and when I embed it into an Android app using the new 100.1.0 SDK, it is even worse (see screenshot "annotation_Android100").

Is there anything I can do about this?

Thank you,

Claudia

0 Kudos
1 Solution

Accepted Solutions
AlexanderNohe1
Occasional Contributor III

I imagine it is a problem with the tiles themselves.  When I use the following snippet, I have no issues displaying the information.  I have more issues when I declare it as a tile layer:

public class MainActivity extends AppCompatActivity {

    MapView mapView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mapView = (MapView) findViewById(R.id.mapView);

        ArcGISMap map = new ArcGISMap(new Basemap(new ArcGISMapImageLayer("https://www.geodata.uni-goettingen.de/arcgis/rest/services/Basemap/Basemap_Default/MapServer")));

        mapView.setMap(map);
    }
}

You may want to reviewing anti aliasing properties when exporting your tiles if you wish to use your tiles directly.

View solution in original post

0 Kudos
5 Replies
AlexanderNohe1
Occasional Contributor III

Can you share the layer?

This is a tiled service layer?

Are the annotations part of the tiled service or are they a separate service all together?

0 Kudos
LageplanGöttingen
New Contributor III

Yes, this is a tiled map service:
Basemap/Basemap_Default (MapServer) 

The annotations are part of the tiled service.

0 Kudos
AlexanderNohe1
Occasional Contributor III

I imagine it is a problem with the tiles themselves.  When I use the following snippet, I have no issues displaying the information.  I have more issues when I declare it as a tile layer:

public class MainActivity extends AppCompatActivity {

    MapView mapView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mapView = (MapView) findViewById(R.id.mapView);

        ArcGISMap map = new ArcGISMap(new Basemap(new ArcGISMapImageLayer("https://www.geodata.uni-goettingen.de/arcgis/rest/services/Basemap/Basemap_Default/MapServer")));

        mapView.setMap(map);
    }
}

You may want to reviewing anti aliasing properties when exporting your tiles if you wish to use your tiles directly.

0 Kudos
LageplanGöttingen
New Contributor III

Thanks for the suggestion! I reviewed all service parameters and noticed that text anti-aliasing was set to "force". First I changed it to "none" and re-published the map, but the problem remained. So I set anti aliasing to "normal" but changed the tile format from PNG8 to PNG32, and this resolved the issue.

0 Kudos
AlexanderNohe1
Occasional Contributor III

Awesome!  Glad that helped!

0 Kudos