All- I am trying to get the user’s current location than display that on the map with an overlay item. My problem is the user’s location is coming in as a location and the overlay array only accepts GeoPoints. Here is what I have tried:
LocationListener locationListener = new LocationListener() {
public void onLocationChanged(Location location) {
GeoPoint point = new GeoPoint.valueOf(location);
OverlayItem overlayitem4 = new OverlayItem(point, "You Are Here", "Boulder, CO");
}
But I am getting an error on GeoPoint.valueOf(location);, specifically:
GeoPoint.valueOf cannot be resolved to a type`
So my question is How can I convert from location to GeoPoint? Thank you all for your time.
try this