Hi,
(This application is kinda like a wardriver application)
I am attempting to plot points on a mapview however I'm having some
issues.
Following this tutorial
>http://developer.android.com/resources/tutorials/views/hello-mapview.html
And have also done some extensive browsing to try and solve my issue
without much luck (but it's got me this far).

I have the following,

        private void GPSloc() {
                GeoPoint arg0 = new GeoPoint(
                                (int) (realLat),
                                (int) (realLong));
                mc.animateTo(arg0);
                try {
                        ArrayList<String> ssidArray = ((scanner) 
receiver).getssidArray();
                        //ArrayList<Integer> levelArray = ((scanner)
receiver).getlevelArray();
                        plotter(ssidArray, levelArray);
                        List<Overlay> mapOverlays = mapView.getOverlays();
                        Drawable drawable =
this.getResources().getDrawable(R.drawable.marker);
                        SSIDPoints itemizedoverlay = new SSIDPoints(drawable);
                        GeoPoint point = new 
GeoPoint(getRealLati(),getRealLongi());
                        OverlayItem overlayitem = new OverlayItem(point, 
"Avilable Wifi",
ssidArray.toString());/*debug*/
                        itemizedoverlay.addOverlay(overlayitem);
                        mapOverlays.add(itemizedoverlay);
                } catch (Exception e) {
                        String message = String.format(e.getMessage());
                            Toast.makeText(this, message, 
Toast.LENGTH_LONG).show();/
*debug*/
                }

That is ran via a button.

my SSIDPoints class is similar to the tutorial



import java.util.ArrayList;

import android.app.AlertDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;
public class SSIDPoints extends ItemizedOverlay {

        private ArrayList<OverlayItem> mOverlays = new
ArrayList<OverlayItem>();
        private Context mapTap;
        public SSIDPoints(Drawable mainPointer) {
                //Zoom map to the correct location for user
                super(boundCenterBottom(mainPointer));
        }
        /*
         * Populate is required to show the new point
         */
        public void addOverlay(OverlayItem newPoint) {
            mOverlays.add(newPoint);
            populate();
        }
        /*
         * Populate calls this method found on the link below
         */
        protected OverlayItem createItem(int i) {
                  return mOverlays.get(i);
                }
        /*
         * auto gen'd
         */
        @Override
        public int size() {
                // TODO Auto-generated method stub
                return 0;
        }
        /*
         * Handles map taps from the user to show the point information
<unused>
         */
        public SSIDPoints(Drawable mainPointer, Context context) {
                  super(mainPointer);
                  mapTap = context;
                }
        @Override
        protected boolean onTap(int index) {
          OverlayItem item = mOverlays.get(index);
          AlertDialog.Builder dialog = new AlertDialog.Builder(mapTap);
          dialog.setTitle(item.getTitle());
          dialog.setMessage(item.getSnippet());
          dialog.show();
          return true;
        }
}

my getLoc() method is getting all the right information required to
plot a point (I think) however when it's ran it doesn't plot anything.

Does anyone have any ideas? I'm going insane here.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to