Missing com.google.android.maps.Point

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Missing com.google.android.maps.Point

Postby nicche » Thu Apr 08, 2010 10:49 am

Hi all,
I've a problem while importing the com.google.android.maps.Point class ("The import com.google.android.maps.Point cannot be resolved") that I found in many basic examples and tutorials.

As the Build Target of my project I'm using the Google APIs Target, platform 2.1, API level 7 (in Eclipse - Galileo).
From the SDK manager I see the following installed items:
- Android SDK Tools, revision 5
- SDK Platform 2.1, API 7, revision 1
- Google APIs by Google Inc., Android API 7, revision 1
(and nothing newer seems to be present among the available packages from http://dl-ssl.google.com/android/reposi ... sitory.xml)

From the Eclipse Package Explorer, if I explore the maps.jar file of the Google APIs, I can see a set of classes (inside com.google.android.maps) that does not include Point. It is the same package documented in http://code.google.com/intl/it-IT/andro ... -tree.html.
Am I pointing to an older version?

Can anyone help me, please? Thanks
nicche
Freshman
Freshman
 
Posts: 8
Joined: Thu Apr 08, 2010 8:45 am

Top

Postby dalf » Thu Apr 08, 2010 2:50 pm

Hi,
Is it sure you want to use "Point" ?
Don't you need GeoPoint instead?

import com.google.android.maps.GeoPoint;

dalf
dalf
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Mar 10, 2010 4:23 am

Postby nicche » Thu Apr 08, 2010 3:05 pm

Thank you for the reply,
I'd like to use the Point class as I'm trying to follow the tutorials in this site, starting from
http://www.anddev.org/basic_map-application-t24.html

...
nicche
Freshman
Freshman
 
Posts: 8
Joined: Thu Apr 08, 2010 8:45 am

Postby dalf » Thu Apr 08, 2010 6:36 pm

I think "Point" is the old name for "GeoPoint".
API with Point (old)
API with GeoPoint

APIs look exactly the same, except the for name.
Try your example replacing Point by GeoPoint and tell us if it's working

dalf
dalf
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Mar 10, 2010 4:23 am

Postby nicche » Fri Apr 09, 2010 7:55 am

After having changed Point to GeoPoint I found some other errors but I'm realizing just now that the example was posted some years ago...

Anyway, the new API version, for that example, is different in the MapView constructor (now requiring the API key), the MapController zoomTo method, the MapView toggleSatellite, etc.
For me it's enough to know that I'm using the new API version.

Thanks for your support
nicche
Freshman
Freshman
 
Posts: 8
Joined: Thu Apr 08, 2010 8:45 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 3 guests