Solution:
use one of the suggested methods mentioned at this thread:
http://stackoverflow.com/questions/1590831/safely-casting-long-to-int-in-java
Problem: Cannot align the MapView properly in MapQuest.
Solution: Do your own bit-wise OR!!!
Google Android MapView LayoutParams:
int a = MapView.LayoutParams.BOTTOM_CENTER; //81
int b = MapView.LayoutParams.BOTTOM; //80
int c = MapView.LayoutParams.CENTER_HORIZONTAL; //1
int d = MapView.LayoutParams.BOTTOM | MapView.LayoutParams.CENTER_HORIZONTAL; // 81
it makes sense, doesn't it?
How about MapQuest Android MapView LayoutParams?
int a = MapView.LayoutParams.BOTTOM_CENTER; //35
int b = MapView.LayoutParams.BOTTOM; //32
int c = MapView.LayoutParams.CENTER_HORIZONTAL; //1
int d = MapView.LayoutParams.BOTTOM | MapView.LayoutParams.CENTER_HORIZONTAL; // 33
hmmm...something doesn't seem right here...
private final SessionFactory sessionFactory = getSessionFactory();
protected SessionFactory getSessionFactory() {
try {
return (SessionFactory) new InitialContext()
.lookup("SessionFactory");
} catch (Exception e) {
log.error("Could not locate SessionFactory in JNDI", e);
throw new IllegalStateException(
"Could not locate SessionFactory in JNDI");
}
}
private SessionFactory sessionFactory;
public SessionFactory getSessionFactory() {
return sessionFactory;
}
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}