How do I add marker to a ArcGIS map on android? -


I am trying to add a marker on the ArcGIS map on my Android application. However, after adding the graphics layer, my map is not visible; I'm new to Android application programming and really appreciate any help. I'm not sure what I'm doing wrong here. thank you in advanced.

These are my codes:

  Public category suggestions expand frigate fragmentation {map view mMapView; Graphicslayer graphics layer = new graphics layer (); Point point; @ Override Public View Crate View (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {see Routview = Inflator.In Flat (R. Late Fragment_signement, Container, False); // Get the initial limit from the map and XML layout mMapView = (MapView) rootView.findViewById (R.id.map); // Layer Last Layer EkmalaMailer = Create new Archigestedmark service service ("http://e1.onemap.sg/arcgis/rest/services/BASEMAP/MapServer"); MMapView.addLayer (graphicsLayer); Point point = new point (1.379975, 103.84877200000005); GraphicsLayer.addGraphic (new graphic (new, SimpleMarkerSymbol (Color.RED, 10, STYLE.CIRCLE))); // address when map layer loads mMapView.setOnStatusChangedListener (New OnStatusChangedListener) {Private Stable Last Long SerialVersionUID = 1L, Public Zero onStatusChanged (Object Source, Status Status) {if (source == oneMapLayer & amp; status == Position .LAYER_LOADED) {mMapView.centerAt (1.3799775, 103.84877200000005, wrong); mMapView.setScale (1500, incorrect);}}}); // Add a dynamic layer in MapView mMapView.addLayer (oneMapLayer); Return root view; } @ Override Public Watch OnDestoy () {Super. One day (); } @ Override Public Wide On Pause () (super.mMapView.pause ();} @ Override Public Wide On Rhesus () {Super.Resumeum}; mMapView.unpause ();}}    

solution:

  public class suggestion fragment extends 2 pieces {map image mMapView; graphics layer Graphics Layer = New Graphics Layer (); Point Point; @Override Public View onCreateView (LayoutInflater Inflator, ViewGroup Container, Bundled savedInstanceState) {see rootView = inflater.inflate (R.layout.fragment_suggestions2, Container, Zhu ); // Get the initial limit from the map and XML layout mMapView = (MapView) rootView.findViewById (R.id.map); // Layer Last Layer eMailMailer = New Archigestedmarked Service Service ("http: //e1.onemap ; / Address / BASEMAP / restart / services / BASEMAP / MapServer "); // When the map layer loads mMapView.setOnStatusChangedListener (New OnStatusChangedListener) {Private Static Last Long SerialVersionUID = 1L, Public Zero onStatusChanged (Object Source, Status Status) {If (source == oneMapLayer & amp; & Amp; Position == position .LAYER_LOADED) {mMapView.centerAt (1.3799775, 103.84877200000005, false); mMapView.setScale (1500, false); MMapView.addLayer (graphicsLayer); Point point = geometryEngine.project (x, y, mMapView.getSpatialReference ()); GraphicsLayer .addgraphic (new graphic (new, SimpleMarkerSymbol (Color.RED, 10, STYLE.CIRCLE)));}}}); // Add a dynamic layer in MapView mMapView.addLayer (oneMapLayer); Return root view; } @ Override Public Watch OnDestoy () {Super. One day (); } @ Override Public Wide On Pause () (super.mMapView.pause ();} @ Override Public Wide On Rhesus () {Super.Resumeum}; mMapView.unpause ();}   < / Div> 

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -