Hi I am using this code to add a Text SYmbol at given latitude and longitude.(San Francisco)
TextSymbol txtSymbol = new TextSymbol(30, "50", Color.BLUE);
{
Point mapPoint = ConvertMyLocationPoint(-122.4600595,37.7532508);
gr = new Graphic((mapPoint), txtSymbol);
graphicsLayer = new GraphicsLayer();
//add the graphic to the map
graphicsLayer.addGraphic(gr);
mMapView.addLayer(graphicsLayer);
}
private Point ConvertMyLocationPoint(final double longitude, final double latitude) {
Point wgspoint = new Point(longitude, latitude);
Point mapPoint = GeometryEngine.project(longitude,latitude,
mMapView.getSpatialReference());
return mapPoint;
}
The point always shows up at 0,0(lat, long) in the map.
Is this a wrong way to add point when I have latitude and longitude?
Could anyone suggest how to approach this.
Thanks.