本文整理汇总了Java中com.parse.ParseGeoPoint.getLatitude方法的典型用法代码示例。如果您正苦于以下问题:Java ParseGeoPoint.getLatitude方法的具体用法?Java ParseGeoPoint.getLatitude怎么用?Java ParseGeoPoint.getLatitude使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.ParseGeoPoint
的用法示例。
在下文中一共展示了ParseGeoPoint.getLatitude方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEventFromParseObject
import com.parse.ParseGeoPoint; //导入方法依赖的package包/类
public static Event getEventFromParseObject(@NonNull ParseObject parseObject){
ParseGeoPoint location = parseObject.getParseGeoPoint(Event.LOCATION);
ParseFile parseFile = parseObject.getParseFile(Event.IMAGE);
return new Event(parseObject.getObjectId(),
parseObject.getString(Event.TITLE),
parseObject.getString(Event.DESCRIPTION),
location != null? location.getLatitude() : Event.INVALID_LOCATION,
location != null? location.getLongitude() : Event.INVALID_LOCATION,
parseObject.getString(Event.LOCATION_SUMMARY),
parseObject.getString(Event.LOCATION_DESCRIPTION),
parseFile != null? parseFile.getUrl() : null,
parseObject.getDate(Event.INITIAL_DATE),
// If end date is null, set it as initial date, so we can use it in our order by
parseObject.getDate(Event.END_DATE) != null? parseObject.getDate(Event.END_DATE) : parseObject.getDate(Event.INITIAL_DATE),
parseObject.getInt(Event.TYPE),
parseObject.getBoolean(Event.ENABLED),
(parseObject.getNumber(Event.GOING) != null)? parseObject.getNumber(Event.GOING).longValue() : 0,
parseObject.getString(Event.LINK_URL),
parseObject.getString(Event.LINK_TEXT),
parseObject.getUpdatedAt()
);
}
示例2: onItemClick
import com.parse.ParseGeoPoint; //导入方法依赖的package包/类
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
ParseGeoPoint userLocation = mUsers.get(position)
.getUserDetail()
.getLocation();
LatLng latLng = new LatLng(userLocation.getLatitude(),
userLocation.getLongitude());
mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));
Marker userMarker = mMarkers.get(mUsers.get(position).getObjectId());
if (userMarker != null) {
userMarker.showInfoWindow();
}
}
示例3: Sighting
import com.parse.ParseGeoPoint; //导入方法依赖的package包/类
public Sighting(Species speciesName){
this.species = speciesName;
this.date = new Date();
ParseGeoPoint myDot = ParseUtils.getLastKnownLocation();
this.latitude = myDot.getLatitude() ;
this.longitude = myDot.getLongitude();
}
示例4: geoPointToLatLng
import com.parse.ParseGeoPoint; //导入方法依赖的package包/类
public static LatLng geoPointToLatLng(ParseGeoPoint geoPoint)
{
return new LatLng(geoPoint.getLatitude(), geoPoint.getLongitude());
}
示例5: getLocation
import com.parse.ParseGeoPoint; //导入方法依赖的package包/类
private PointLocation getLocation(ParseObject object) {
ParseGeoPoint point = object.getParseGeoPoint(LOCATION);
return new PointLocation(point.getLatitude(), point.getLongitude(), object.getObjectId());
}