Re: [android-beginners] Geopoint not giving the correct location

2009-12-22 Thread sunny
Hi Treking,
thanks ..you were correct, the Geopoint to map coordinates were not correct.
appreciate your help.
On Tue, Dec 15, 2009 at 8:42 AM, sunny  wrote:

> more than the icon missing , what is concerning is that Geopoint is not
> showing the correct location.  I know it is Tulsa bcoz i can see the
> map/street view.
>
> thanks. any pointers will help.
>
>  On Dec 10, 2009 1:05 AM, "TreKing"  wrote:
>
> If the icon is missing how do you know it's "pointing" to Tulsa? Have you
> zoomed out all the way to see if you see the icon *somewhere* ?
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> On Mon, Dec 7, 2009 at 12:59 AM, Sunil Menon  wrote:
> > > Hi, > I am using An...
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Geopoint not giving the correct location

2009-12-15 Thread sunny
more than the icon missing , what is concerning is that Geopoint is not
showing the correct location.  I know it is Tulsa bcoz i can see the
map/street view.

thanks. any pointers will help.

On Dec 10, 2009 1:05 AM, "TreKing"  wrote:

If the icon is missing how do you know it's "pointing" to Tulsa? Have you
zoomed out all the way to see if you see the icon *somewhere* ?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

On Mon, Dec 7, 2009 at 12:59 AM, Sunil Menon  wrote: >
> Hi, > I am using An...

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Re: [android-beginners] Geopoint not giving the correct location

2009-12-10 Thread TreKing
If the icon is missing how do you know it's "pointing" to Tulsa? Have you
zoomed out all the way to see if you see the icon *somewhere* ?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking


On Mon, Dec 7, 2009 at 12:59 AM, Sunil Menon  wrote:

> Hi,
> I am using Android 2.0.1 with Google APIs. I wrote a simple app using
> ItemizedOverlay. here is the code snippet:
>
> super.onCreate(savedInstanceState);
>setContentView(R.layout.main);
>
>linearLayout = (LinearLayout)findViewById(R.id.zoomview);
>mapView = (MapView)findViewById(R.id.mapview);
>//mapView.setSatellite(true);
>mapView.setStreetView(true);
>mapView.setBuiltInZoomControls(true);
>
>   drawable = this.getResources().getDrawable(R.drawable.icon);
>itemizedOverlay = new HelloItemizedOverlay(drawable);
>
>Double lat = 37.2591264 * 1E6;
>Double ln = -121.968505 * 1E6;
>GeoPoint point = new GeoPoint(lat.intValue(),ln.intValue() );
>OverlayItem overlayitem2 = new OverlayItem(point, "", "");
>itemizedOverlay.addOverlay(overlayitem2);
>mapOverlays.add(itemizedOverlay);
>
>
>  ItemizedOverlay class:-
>
> public class HelloItemizedOverlay extends ItemizedOverlay {
>//Context ma;
>private ArrayList mOverlays = new
> ArrayList
> ();
>public HelloItemizedOverlay(Drawable defaultMarker) {
>super(boundCenterBottom(defaultMarker));
>
>// TODO Auto-generated constructor stub
>}
>public void addOverlay(OverlayItem overlay) {
>mOverlays.add(overlay);
>populate();
>}
>@Override
>protected OverlayItem createItem(int i) {
>// TODO Auto-generated method stub
>return mOverlays.get(i);
>}
>
>   @Override
>public int size() {
>// TODO Auto-generated method stub
>return mOverlays.size();
>}
>
> }
>
> when I run the above code, i do not get the correct location on the
> map . it points to location Tulsa in Okhlama state while I was
> entering the coordinates for Los Gatos , CA.
> Even the icon is missing.
>
> However when i use the Map Controller and  call animateTo(point) , i
> get the correct location.
>
> I am not sure what is wrong?.
>
> would appreciate any pointers here..
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> To post to this group, send email to android-beginners@googlegroups.com
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

[android-beginners] Geopoint not giving the correct location

2009-12-07 Thread Sunil Menon
Hi,
I am using Android 2.0.1 with Google APIs. I wrote a simple app using
ItemizedOverlay. here is the code snippet:

super.onCreate(savedInstanceState);
setContentView(R.layout.main);

linearLayout = (LinearLayout)findViewById(R.id.zoomview);
mapView = (MapView)findViewById(R.id.mapview);
//mapView.setSatellite(true);
mapView.setStreetView(true);
mapView.setBuiltInZoomControls(true);

   drawable = this.getResources().getDrawable(R.drawable.icon);
itemizedOverlay = new HelloItemizedOverlay(drawable);

Double lat = 37.2591264 * 1E6;
Double ln = -121.968505 * 1E6;
GeoPoint point = new GeoPoint(lat.intValue(),ln.intValue() );
OverlayItem overlayitem2 = new OverlayItem(point, "", "");
itemizedOverlay.addOverlay(overlayitem2);
mapOverlays.add(itemizedOverlay);


 ItemizedOverlay class:-

public class HelloItemizedOverlay extends ItemizedOverlay {
//Context ma;
private ArrayList mOverlays = new ArrayList
();
public HelloItemizedOverlay(Drawable defaultMarker) {
super(boundCenterBottom(defaultMarker));

// TODO Auto-generated constructor stub
}
public void addOverlay(OverlayItem overlay) {
mOverlays.add(overlay);
populate();
}
@Override
protected OverlayItem createItem(int i) {
// TODO Auto-generated method stub
return mOverlays.get(i);
}

   @Override
public int size() {
// TODO Auto-generated method stub
return mOverlays.size();
}

}

when I run the above code, i do not get the correct location on the
map . it points to location Tulsa in Okhlama state while I was
entering the coordinates for Los Gatos , CA.
Even the icon is missing.

However when i use the Map Controller and  call animateTo(point) , i
get the correct location.

I am not sure what is wrong?.

would appreciate any pointers here..

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en