|
POST
|
This should explain projections: Spatial references—ArcGIS Runtime SDK for Android | ArcGIS for Developers Mapping Projections Explained Additionally, what code are you using to zoom to the extent? It is possible that if you are zooming to -38, 71, that you will be zoomed into the center of the map because the map projections unit of measurement would then be in meters, not decimal degrees as you may expect.
... View more
08-05-2016
08:55 AM
|
0
|
6
|
5068
|
|
POST
|
This is a duplicate of How to center the map depending on graphics on it ?.
... View more
08-05-2016
06:28 AM
|
0
|
0
|
845
|
|
POST
|
Are you waiting for the map to be fully initialized? mapView.setOnStatusChangedListener(new OnStatusChangedListener() {
@Override public void onStatusChanged(Object o, STATUS status) {
if (status == STATUS.INITIALIZED) {
//Do Something
}
}
}); Additionally, are you placing your coordinates in web mercator projection?
... View more
08-05-2016
06:25 AM
|
0
|
8
|
5068
|
|
POST
|
Mohamed EzzerI What I would do, if working with only one layer, is use the getFullExtent() method on that layer and then use mapView.setExtent to then set the extent that I would like to zoom to. This of course would all have to occur after the layer is fully initialized. Layer.GetFullExtent() Layer | ArcGIS Android 10.2.8 API MapView.SetExtent() MapView | ArcGIS Android 10.2.8 API I hope this helps!
... View more
08-04-2016
05:04 AM
|
1
|
10
|
5068
|
|
POST
|
I moved this from the Runtime for Android thread as using QML uses a different SDK than the Runtime for Android thread. I feel as though your question will be better addressed here.
... View more
08-03-2016
06:58 AM
|
0
|
0
|
844
|
|
POST
|
Hello Jiang Zhu, Is the tile service publicly accessible? Can you post a link to it for further inspection? Thanks, Alexander
... View more
08-01-2016
10:28 AM
|
0
|
1
|
1040
|
|
POST
|
Create the color this way: Color.argb(50, 49, 247, 10) The first value is the alpha value which is showing 50% transparency. Therefore, the line would look like this: int graphic = mapViewHelper.addPolygonGraphic(latLon,"pol_t", "pol_st", "", Color.argb(50, 49, 247, 10), Color.DKGRAY,2, 0); If this helped resolve the issue, would you kindly select this as the correct answer. The attached screenshot is what I got below for the above snippet:
... View more
08-01-2016
08:42 AM
|
1
|
0
|
3340
|
|
POST
|
double[][] p = new double[pointsArray.length()][2]; The points array would be the outside array which would contain the amount of points. I believe that you have this backwards. As well as this: p[pointCount][0] = Double.parseDouble(point.getString("latitude")); p[pointCount][1] = Double.parseDouble(point.getString("longitude"));
... View more
08-01-2016
07:55 AM
|
0
|
2
|
3340
|
|
POST
|
Hello Mohamed EzzerI, I was able to get the feature to draw in Casablanca using the following snippet: package com.arcgis.androidsupportcases.addpolygongraphic;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import com.esri.android.map.MapView;
import com.esri.android.map.event.OnStatusChangedListener;
import com.esri.android.toolkit.map.MapViewHelper;
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.map);
mapView.setOnStatusChangedListener(new OnStatusChangedListener() {
@Override public void onStatusChanged(Object o, STATUS status) {
if (status == STATUS.INITIALIZED) {
MapViewHelper mapViewHelper = new MapViewHelper(mapView);
double[][] latLon = new double[][] {{
33.599389, -7.610728
},
{
33.599985, -7.597180
},
{
33.588879, -7.617027
}
};
int graphic = mapViewHelper.addPolygonGraphic(latLon,"pol_t", "pol_st", "", Color.GREEN, Color.DKGRAY,2, 0);
Log.e("NOHE", "" + graphic);
}
}
});
}
} Here is the screenshot of my end result:
... View more
08-01-2016
07:52 AM
|
0
|
0
|
1020
|
|
POST
|
Hello Mohamed EzzerI, I was able to get the feature to draw in Casablanca using the following snippet: package com.arcgis.androidsupportcases.addpolygongraphic;
import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import com.esri.android.map.MapView;
import com.esri.android.map.event.OnStatusChangedListener;
import com.esri.android.toolkit.map.MapViewHelper;
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.map);
mapView.setOnStatusChangedListener(new OnStatusChangedListener() {
@Override public void onStatusChanged(Object o, STATUS status) {
if (status == STATUS.INITIALIZED) {
MapViewHelper mapViewHelper = new MapViewHelper(mapView);
double[][] latLon = new double[][] {{
33.599389, -7.610728
},
{
33.599985, -7.597180
},
{
33.588879, -7.617027
}
};
int graphic = mapViewHelper.addPolygonGraphic(latLon,"pol_t", "pol_st", "", Color.GREEN, Color.DKGRAY,2, 0);
Log.e("NOHE", "" + graphic);
}
}
});
}
} Here is the screenshot of my end result:
... View more
08-01-2016
07:49 AM
|
0
|
1
|
3340
|
|
POST
|
Hello Furkan ERYILMAZ, Did the above help resolve your issue?
... View more
08-01-2016
06:41 AM
|
0
|
0
|
909
|
|
POST
|
I believe this is a duplicate of How do i create polygon using mapviewhelper ?
... View more
08-01-2016
06:29 AM
|
0
|
0
|
1020
|
|
POST
|
Are you getting any errors or tracebacks when running?
... View more
08-01-2016
06:28 AM
|
0
|
3
|
3340
|
|
POST
|
Do you still require assistance with this or did this code resolve the issue for you?
... View more
07-28-2016
01:50 PM
|
1
|
2
|
4594
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-15-2014 03:16 PM | |
| 1 | 01-06-2015 03:33 PM | |
| 1 | 12-02-2014 10:47 AM | |
| 1 | 07-15-2014 03:31 PM | |
| 1 | 09-23-2014 03:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|