POST
|
The Collector app only supports tracking with point features. You could take the collected points into Desktop as a local copy and run the GP tool Points to Line and then publish up a hosted service if you needed the data in a web map. http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000003s000000 Russ Hi Russ, Thanks for your comment. I understand the function currently only supports point features for the tracking. It may be useful if users had options on the geometry types, though. There would be some useful cases if users can add their own locations with lines on the field rather than in an office. In that way, the worker add information to the tracking line on the field at once. This is an idea from a user. Thanks a lot, Gakumin
... View more
11-04-2013
02:10 PM
|
0
|
0
|
211
|
POST
|
Hi all, I am new to Collector for ArcGIS and have a question on "Track where collectors went" function. Would it be possible to track collectors location/moving path with lines not points? My organization wants to track cars' driving path with line. We are wondering if the Collector for ArcGIS supports this function. Best regards, Gakumin
... View more
10-31-2013
02:18 AM
|
0
|
3
|
1836
|
POST
|
Hi Andy, Sorry for my late reply. I really appreciate your advice. Unfortunately, I could not figure out how to use the onDragPointerMove and onDragPointerUp. They did not work for my program at an actual device... Therefore, I compromised. In order to move a point, now my program asks a user to specify a point to move first. Then, the program asks again the user to specify a destination point with single tap. This is not fancy. But, it works at least... If possible, I would like to have a sample application which shows how to move a point of featureservice with the onDragPointerMove and onDragPointerUp. Thank you, Gakumin
... View more
07-19-2013
08:33 AM
|
0
|
0
|
425
|
POST
|
Hi all, I have been having a hard time to implement drag and drop a point of ArcGISFeatureLayer for a couple days... I am using these listeners: onDragPointerMove and onDragPointerUp. Ultimately, what I would like to do is, 1. grab a point from selected ArcGISFeatureLayer 2. move it with "drag and drop", which is intuitive way 3. update the location of the point with "applyEdits(...)" (Therefore, suggestions on completely different approaches are also more than appreciated) There are two issues I would like the forum to help me out. Problem 1: My code works in emulator. But it does NOT on an actual device... But, once I run a code in debugging mode line by line, then it works on my actual device... This means there might be some issues related to processing time or network communication time? Problem 2: Once the program does not detect any point to move, I would like to overwrite listener to default, which is pan of map. I defined that by "setDefaultTouchListener" in my code. Current my program stays stuck in drag and drop listener forever after it failed to grab a point to move... Here is my code.
//This method is called when "Move" button is clicked
public void movepoint_OnClick(View v) {
if (!mMapView.isLoaded()) {
return;
}
Toast t = Toast.makeText(getApplicationContext(),
"Drag a point to move",
Toast.LENGTH_LONG);
t.show();
//Start drag listener to move a point
myTouchListener = new MyTouchListener(this, mMapView);
mMapView.setOnTouchListener(myTouchListener);
}
// Set drag listener
// onDragPointerMove on map causes movement of a point
public class MyTouchListener extends MapOnTouchListener {
private SimpleMarkerSymbol _simpleMarkerSymbol;
private Point startPoint = null;
private Point endpoint = null;
private Proximity2DResult targetPoint_2DResult = null;
private Point targetPoint = null;
private HashMap<String, Object> attributes = new HashMap<String, Object>();
private int[] number;
private Graphic gr;
public MyTouchListener(Context context, MapView view) {
super(context, view);
// TODO Auto-generated constructor stub
_simpleMarkerSymbol = new SimpleMarkerSymbol(Color.RED, 4, STYLE.CIRCLE);
}
/**
* Clears all drawing graphics.
*/
public void clearDrawGraphicsLayer(){
graphicsLayer.removeAll();
}
public boolean onDragPointerMove(MotionEvent from, MotionEvent to) {
endpoint = mMapView.toMapPoint(to.getX(), to.getY());
startPoint = mMapView.toMapPoint(from.getX(), from.getY());
number = featureLayer.getGraphicIDs(from.getX(), from.getY(), 20);
///////Currently, every time I tried to grab a point with "featureLayer.getGraphicIDs(from.getX(), from.getY(), 20)" above,
///////then the program goes to "number.length == 0" and show the toast, and stuck there forever...
///////
if (number.length == 0){
Toast.makeText(getApplicationContext(), "Please grab a point. Click 'Move' again for retry", Toast.LENGTH_SHORT).show();
return true;
}
if (number.length > 0){
gr = featureLayer.getGraphic(number[0]);
attributes = (HashMap<String, Object>) gr.getAttributes();
return true;
}
return super.onDragPointerMove(from, to);
}
@Override
public boolean onDragPointerUp(MotionEvent from, MotionEvent to) {
/*
* When user releases finger, add the last point to polyline.
*/
if (number.length == 0){
return true;
}
if (number.length > 0){
Graphic updatePoint = new Graphic(endpoint, null, attributes, null);
//Conduct Update feature layer on the background
new updateMovePoint(updatePoint).execute();
//Restores the MapOnTouchListener to its default
setDefaultTouchListener();
return true;
}
return super.onDragPointerUp(from, to);
}
/**
* Restores the MapOnTouchListener to its default
*/
public void setDefaultTouchListener(){
MapOnTouchListener ml = new MapOnTouchListener(getApplicationContext(), mMapView);
mMapView.setOnTouchListener(ml);
}
}
private class updateMovePoint extends AsyncTask<Void, Void, Void>{
private Graphic updatePoint;
public updateMovePoint(Graphic updatePoint){
super();
this.updatePoint = updatePoint;
}
@Override
protected Void doInBackground(Void... params) {
// TODO Auto-generated method stub
featureLayer.applyEdits(null, null, new Graphic[]{updatePoint},
new CallbackListener<FeatureEditResult[][]>() {
@Override
public void onCallback(FeatureEditResult[][] arg0) {
// TODO Auto-generated method stub
Log.e(TAG, "applyEdits onCallback #obs: "
+ arg0.length);
}
@Override
public void onError(Throwable e) {
// TODO Auto-generated method stub
Log.e(TAG, "apply Edits onError",e);
}
});
//Remove all graphics
graphicsLayer.removeAll();
return null;
}
@Override
protected void onPostExecute(Void result) {
// TODO Auto-generated method stub
super.onPostExecute(result);
Toast.makeText(getApplicationContext(),
getString(R.string.points_submitted),Toast.LENGTH_SHORT).show();
setDefaultTapActions();
}
}
Any suggestions and comments are really appreciated... Thank you in advance, Gakumin
... View more
06-22-2013
05:16 PM
|
1
|
4
|
2978
|
POST
|
Hi all, I have found workaround for this. The problem was I could not use default setting for SimpleMarkerSymbol after I set another setting for the same featureLayer. First, I cleared selection for ArcGISfeaturelayer. Then I re-added the same featurelayer without defining SimpleMarkerSymbol. Then I could use default setting again!! Thank you, Gakumin
... View more
05-29-2013
02:14 PM
|
0
|
0
|
202
|
POST
|
Hi tmsbn90, I have tested your approach. It worked! Thank you so much! Here is my updated workflow; 1. Select points from ArcGISFeatureLayer (query with attribute value) 2. get x,y from single tap 3. Check if there are any selected points of step1 around the single point of step2, by using "featurelayer.getGraphicIDs(pointX, pointY, Constants.TOLERANCE, Constants.N0_OF_GRAPHICS_TO_BE_DETECTED)" I really appreciate your help.. Gakumin I am not sure I understand your question but, I think you are looking for the method featurelayer.getGraphicIDs(pointX, pointY, Constants.TOLERANCE, Constants.N0_OF_GRAPHICS_TO_BE_DETECTED);
... View more
05-29-2013
02:06 PM
|
0
|
0
|
514
|
POST
|
Hi tmsbn90, Thank you for your advice! I see, I think I can use your approach... Let me try this, and I will report the result. Thank you so much, Gakumin I am not sure I understand your question but, I think you are looking for the method featurelayer.getGraphicIDs(pointX, pointY, Constants.TOLERANCE, Constants.N0_OF_GRAPHICS_TO_BE_DETECTED);
... View more
05-29-2013
09:54 AM
|
0
|
0
|
514
|
POST
|
Let me add comments for my question. What I want to do ultimately is to check if a single tap XY point is near to pre-selected point(s). My current approach was to create envelope(s) from the pre-selected point(s), if this is possible, then check if the tap point is included in the envelope(s) by using .contains(Point p) method. I would be very happy if there were any good ideas to realize what I want to do... Thanks, Gakumin
... View more
05-28-2013
08:59 PM
|
0
|
0
|
514
|
POST
|
Hi all, I have a question on Envelope. What I want to do is to create Envelope from selected point features. The features are originally ArcGISFeatureLayer. Then, I select a point with attribute query. As far as I know, Envelope can be created from either Point object or XY coordinates, correct? I cannot figure out either how I can pull XY coordinates out of the selected features (Graphic or Featureset) or somehow convert selected features to Point... I would be very grateful if you could help me out... Any thoughts, ideas and comments are more than welcome. Thank you in advance, Gakumin
... View more
05-28-2013
08:14 PM
|
0
|
4
|
3754
|
POST
|
Hi all, I have found why I could not make this work. This was not issue of size of Callout. It was my simple coding error... I have not returned anything after query in doInBackground. Here is the updated code. I am still beginner level programmer... Sorry about this. Gakumin
//Execute query task
try {
FeatureSet fs_view = queryTask.execute(query);
//Get an array of graphics of the query result FeatureSet
Graphic[] resultGraphic = fs_view.getGraphics();
View popupview = createPopupView(resultGraphic[0]);
//Added this one
return popupview;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
... View more
05-28-2013
03:18 PM
|
0
|
0
|
227
|
POST
|
Hello everyone, I have a question regarding SimpleMarkerSymbol. As you may know, if codes does not specify SimpleMarkerSymbol for selected ArcGISFeatureLayer, then the code picks up default SimpleMarkerSymbol, which looks like the same selection highlights of ArcMap (please see the attached jpg). I like this SimpleMarkerSymbol. This shows an original symbology of Feature Service and highlight only its outline. My question is that how I can set this default setting once AFTER I set a different SimpleMarkerSymbol for the same ArcGISFeatureLayer. (This could be reset or clear setting of another setting of SimpleMarkerSymbol?) Actually, my goal is that when points are selected (queried), I want to show an original symbology of Feature Service with highlighting its outline. (The attached jpg exactly show what I want to do. Again, this is done by "default" setting for SimpleMarkerSymbol ). So, as long as I can achieve my objective, I do not need to stick to the default setting. Let me explain my workflow; STEP 1. Query with attribute, and select ArcGISFeatureLayer of "MODE.SELECTION", and show only selected results on map with default SimpleMarkerSymbol (Here I do not specify SimpleMarkerSymbol. this works fine as I shown with attached jpg) STEP 2. Set SimpleMarkerSymbol for setOnSingleTapListener (spatial query) as transparency point marker. And query on the same ArcGISFeatureLayer. (this works fine. Intention here is I want to keep unrelated points hidden when selected with this single tap) STEP 3. After query of above 2, Re-set SimpleMarkerSymbol back to Default, as program remember setting of 2 above (I cannot do this!) If I could know how exactly do same setting SimpleMarkerSymbol as defaut one, I think I can reproduce the setting at step 3. But, I could not figure out how and parameters for default. Another possibility would be that I could clear setting of SimpleMarkerSymbol of step 2 somehow at step3? Again, but, I do not know how... Or, do I need completely new approaches to achieve what I want to do?? Any helps, comments, and thoughts, would be appreciated... Thanks in advance, Gakumin
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Feature layer service
//Read Feature Layer first, but invisible with no "SELECTION"
featureLayer = new ArcGISFeatureLayer(this
.getResources().getString(R.string.featurelayer_url),
ArcGISFeatureLayer.MODE.SELECTION);
//Here, I do not specify SimpleMarkerSymbol as I want to use default one. [STEP1]
//query featureLayer with parameter
featureLayer.selectFeatures(query_fl, ArcGISFeatureLayer.SELECTION_METHOD.NEW,callback);
mMapView.addLayer(featureLayer);
// start default tap actions
// singleTap on map causes an Identify
setDefaultTapActions();
}
public void setDefaultTapActions(){
mMapView.setOnSingleTapListener(new OnSingleTapListener() {
@Override
public void onSingleTap(float x, float y) {
......
//set symbol for selected featureLayer for Default Single Tap [Transparent]: [STEP2]
SimpleMarkerSymbol SelectionSymbol = new SimpleMarkerSymbol(Color.TRANSPARENT, 6,
SimpleMarkerSymbol.STYLE.CIRCLE);
featureLayer.setSelectionSymbol(SelectionSymbol);
featureLayer.selectFeatures(query, ArcGISFeatureLayer.SELECTION_METHOD.NEW,
new CallbackListener<FeatureSet>(){
//@Override
//handle any errors
public void onError(Throwable e) {
Log.d(TAG, "Select Features Error"
+ e.getLocalizedMessage());
}
//@Override
//
public void onCallback(FeatureSet queryResults) {
if(queryResults.getGraphics().length > 0){
//show the points again
//execute the second query with the OwnerID
Query query_fl_again = new Query();
query_fl_again. ......
//clear selection once
featureLayer.clear();
// set symbol for selected featureLayer [STEP3]
SimpleMarkerSymbol SelectionSymbol = new SimpleMarkerSymbol(Color.TRANSPARENT, 6,
SimpleMarkerSymbol.STYLE.CIRCLE);
SimpleLineSymbol SlectionOutline = new SimpleLineSymbol(Color.CYAN, 2,
SimpleLineSymbol.STYLE.SOLID);
SelectionSymbol.setOutline(SlectionOutline);
featureLayer.setSelectionSymbol(SlectionOutline);
featureLayer.selectFeatures(query_fl_again, ArcGISFeatureLayer.SELECTION_METHOD.NEW,callback);
mMapView.addLayer(featureLayer);
return;
}
... View more
05-27-2013
01:56 PM
|
0
|
1
|
2706
|
POST
|
Hello, I am trying to show Callout containing String value in it. The problem is that Callout showing up is very small. Also, I cannot see any string values (please see the attached jpg)... I have checked the following point with debugging. 1."myPopupInfo" and "popupContent" have expecting string values. Also, I have checked some other posts in this forum. They are very helpful for me to understand basic ideas of Callout. But I still could not figure out my own problem... I may be either missing very basic but necessary components or doing stupid basic errors in my codes... I would be very grateful if anybody helped me out. I have been stuck at this point since last night... Thank you so much in advance, Gakumin Here is my java code. (Sorry, it is little long. But I wanted to include all blocks related to Callout.) protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map_view); //Set a default tap action as pop-up Map_view.setOnSingleTapListener(new OnSingleTapListener() { private static final long serialVersionUID = 1L; public void onSingleTap(float x_v, float y_v) { Point point = Map_view.toMapPoint(x_v, y_v); // Tolerance: 20 pixel Envelope env_v = new Envelope(point,20*Map_view.getResolution(), 20*Map_view.getResolution()); new setDefaultTapActions_popup(env_v, dmsl_v.getSpatialReference(), point).execute(".../MapServer/0"); } }); } //Query dynamic map service layer by QueryTask(Modified from "PopupInWebmapForViewing.java") private class setDefaultTapActions_popup extends AsyncTask<String, Void, View> { private Envelope env_v; private SpatialReference sr; private Point point; public setDefaultTapActions_popup(Envelope env_v, SpatialReference sr, Point point) { super(); this.env_v = env_v; this.sr = sr; this.point = point; } @Override protected View doInBackground(String... params) { //Set query parameters Query query = new Query(); query.setInSpatialReference(sr); query.setOutSpatialReference(sr); query.setGeometry(env_v); //For now, max number of returned features is 10. query.setMaxFeatures(10); query.setOutFields(new String[] { "*" }); QueryTask queryTask = new QueryTask(".../MapServer/0"); //Execute query task try { FeatureSet fs_view = queryTask.execute(query); //Get an array of graphics of the query result FeatureSet Graphic[] resultGraphic = fs_view.getGraphics(); View popupview = createPopupView(resultGraphic[0]); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } // TODO Auto-generated method stub return null; } @Override protected void onPostExecute(View popupView) { // TODO Auto-generated method stub super.onPostExecute(popupView); Callout callout = Map_view.getCallout(); callout.setStyle(R.xml.callout_style); callout.getStyle().setMaxHeight(150); callout.getStyle().setMaxWidth(150); callout.setContent(popupView); callout.show(point); } private View createPopupView(Graphic graphic) { //Employ "createReportView" of "MyWater" sample of ESRI //LinearLayout ret = new LinearLayout(context); //ret.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, // LayoutParams.WRAP_CONTENT)); Object attribute; attribute = graphic.getAttributeValue("Type_Store"); String Type_Store = null; if (attribute != null){ Type_Store = (String)attribute; } attribute = graphic.getAttributeValue("Name_Store"); String Name_Store = null; if (attribute != null){ Name_Store = (String)attribute; } attribute = graphic.getAttributeValue("Open_Close"); String Open_Close = null; if (attribute != null){ Open_Close = (String)attribute; } attribute = graphic.getAttributeValue("Service"); String Service = null; if (attribute != null){ Service = (String)attribute; } attribute = graphic.getAttributeValue("AmountSup"); Integer AmountSup = 0; if (attribute != null){ AmountSup = (Integer)attribute; } StringBuilder myPopupInfo = new StringBuilder(); myPopupInfo.append("Type of Store:\t" + Type_Store); myPopupInfo.append("\nName of Store:\t" + Name_Store); myPopupInfo.append("\nOpen or Close?:\t" + Open_Close); myPopupInfo.append("\nService:\t" + Service); myPopupInfo.append("\nAmount of Supply:\t" + AmountSup); // TextView popupContent = new TextView(context); View popupView = getLayoutInflater().inflate( R.layout.callout_view2, null); TextView popupContent = (TextView) popupView .findViewById(R.id.callout_textview2); popupContent.setText(myPopupInfo.toString()); popupContent.setTextColor(Color.WHITE); popupContent.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 9); popupContent.setPadding(1, 0, 1, 0); return popupView; // ret.addView(popupContent); // TODO Auto-generated method stub // return ret; } } Here is my "callout_view2" layout xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <TextView android:id="@+id/callout_textview2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:padding="2dp" android:text="callout" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#FF0000" android:textSize="16sp" /> </RelativeLayout> Here is my "callout_style" xml <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <calloutViewStyle titleTextColor="#000000" titleTextSize = "10" titleTextStyle = "0" titleTextTypeFace = "0" frameColor="#FFC7C7C7" backgroundColor="#FF0A0A0A" flat="true" cornerCurve="10" anchor="8" style="app:@style/darkgray_layout"/> </resources>
... View more
05-25-2013
05:39 PM
|
0
|
1
|
1529
|
POST
|
Hi jsmithgisguy2, Thank you so much for your help! Your advise worked in my code! My updated code does query in "doInBackground" and pass the result, view, to "doInBackground". Then, callout showed up! I really appreciate your help! I attached the updated code here for reference. Gakumin
//Query dynamic map service layer by QueryTask(Modified from "PopupInWebmapForViewing.java")
private class setDefaultTapActions_popup extends AsyncTask<String, Void, View> {
private Envelope env_v;
private SpatialReference sr;
private Point point;
public setDefaultTapActions_popup(Envelope env_v, SpatialReference sr, Point point) {
super();
this.env_v = env_v;
this.sr = sr;
this.point = point;
}
@Override
protected View doInBackground(String... params) {
//Set query parameters
Query query = new Query();
query.setInSpatialReference(sr);
query.setOutSpatialReference(sr);
query.setGeometry(env_v);
//For now, max number of returned features is 10.
query.setMaxFeatures(10);
query.setOutFields(new String[] { "*" });
QueryTask queryTask = new QueryTask("...../MapServer/0");
//Execute query task
try {
FeatureSet fs_view = queryTask.execute(query);
//Get an array of graphics of the query result FeatureSet
Graphic[] resultGraphic = fs_view.getGraphics();
View popupView = createPopupView(resultGraphic[0]);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// TODO Auto-generated method stub
return null;
}
@Override
protected void onPostExecute(View popupView) {
// TODO Auto-generated method stub
super.onPostExecute(popupView);
Callout callout = Map_view.getCallout();
callout.setStyle(R.xml.callout_style);
callout.setContent(popupView);
callout.show(point);
}
... View more
05-25-2013
11:55 AM
|
0
|
0
|
237
|
POST
|
Hi jsmithgisguy2, Thank you so much for your advice! I will definitely give it a try shortly! (I am currently running into another issue in different part as well...) Then, I will report the result to you and community here. Gakumin Try moving the lines that follow the "queryTask.execute" statement from the "doInBackground" method to the "onPostExecute" method of your AsyncTask. Hopefully the problem is limited to the issue of needing to update the GUI from only the main thread, which is performed by onPostExecute. Your sample code is missing the onPostExecute method with a FeatureSet as the incoming parameter, something like: @Override
protected void onPostExecute(final FeatureSet result) {
//Get an array of graphics of the query result FeatureSet
Graphic[] resultGraphic = result.getGraphics();
View popupView = createPopupView(resultGraphic[0]);
Map_view.getCallout().show(point, popupView);
} I currently cannot verify what is going on in the PopupInWebmapForViewing sample as my machine is throwing errors - hopefully this will gain you some progress.
... View more
05-24-2013
08:21 AM
|
0
|
0
|
237
|
POST
|
Hello, I am trying to show Callout for a selected(queried by a single tap) point data (Map service). I believe query part works fine, as I checked that attribute values of a point data are assigned to valuables. That is, "myPopupInfo" has an expected value. However, nothing show up after that. I am not sure whether "popupContent"(TextView) and "rat"(LinearLayout) are correct. I would really appreciate if anybody helped me out... Thank you in advance, Gakumin @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map_view); //Set a default tap action as pop-up Map_view.setOnSingleTapListener(new OnSingleTapListener() { private static final long serialVersionUID = 1L; public void onSingleTap(float x_v, float y_v) { Point point = Map_view.toMapPoint(x_v, y_v); // Tolerance: 20 pixel Envelope env_v = new Envelope(point,20*Map_view.getResolution(), 20*Map_view.getResolution()); new setDefaultTapActions_popup(env_v, dmsl_v.getSpatialReference(), point).execute(".../MapServer/0"); } }); } //Query dynamic map service layer by QueryTask(Modified from "PopupInWebmapForViewing.java") private class setDefaultTapActions_popup extends AsyncTask<String, Void, FeatureSet> { private Envelope env_v; private SpatialReference sr; private Point point; public setDefaultTapActions_popup(Envelope env_v, SpatialReference sr, Point point) { super(); this.env_v = env_v; this.sr = sr; this.point = point; } @Override protected FeatureSet doInBackground(String... params) { //Set query parameters Query query = new Query(); query.setInSpatialReference(sr); query.setOutSpatialReference(sr); query.setGeometry(env_v); //For now, max number of returned features is 10. query.setMaxFeatures(10); query.setOutFields(new String[] { "*" }); QueryTask queryTask = new QueryTask(".../MapServer/0"); //Execute query task try { FeatureSet fs_view = queryTask.execute(query); //Get an array of graphics of the query result FeatureSet Graphic[] resultGraphic = fs_view.getGraphics(); View popupView = createPopupView(resultGraphic[0]); Map_view.getCallout().show(point, popupView); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } // TODO Auto-generated method stub return null; } private View createPopupView(Graphic graphic) { //Employ "createReportView" of "MyWater" sample of ESRI LinearLayout ret = new LinearLayout(context); ret.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); Object attribute; attribute = graphic.getAttributeValue("Type_Store"); String Type_Store = null; if (attribute != null){ Type_Store = (String)attribute; } attribute = graphic.getAttributeValue("Name_Store"); String Name_Store = null; if (attribute != null){ Name_Store = (String)attribute; } attribute = graphic.getAttributeValue("Open_Close"); String Open_Close = null; if (attribute != null){ Open_Close = (String)attribute; } attribute = graphic.getAttributeValue("Service"); String Service = null; if (attribute != null){ Service = (String)attribute; } attribute = graphic.getAttributeValue("AmountSup"); Integer AmountSup = 0; if (attribute != null){ AmountSup = (Integer)attribute; } StringBuilder myPopupInfo = new StringBuilder(); myPopupInfo.append("Type of Store:\t" + Type_Store); myPopupInfo.append("\nName of Store:\t" + Name_Store); myPopupInfo.append("\nOpen or Close?:\t" + Open_Close); myPopupInfo.append("\nService:\t" + Service); myPopupInfo.append("\nAmount of Supply:\t" + AmountSup); TextView popupContent = new TextView(context); popupContent.setText(myPopupInfo.toString()); popupContent.setTextColor(Color.WHITE); popupContent.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 9); popupContent.setPadding(1, 0, 1, 0); ret.addView(popupContent); // TODO Auto-generated method stub return ret; } }
... View more
05-22-2013
05:10 PM
|
0
|
3
|
751
|
Title | Kudos | Posted |
---|---|---|
1 | 06-22-2013 05:16 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|