Map API

Nutiteq Maps Lib SDK enables developing advanced mobile mapping applications.
Platforms: Android, RIM BlackBerry, Java ME (J2ME)
Download maps API SDK »
Untitled Document

Products

» View demos
» Downloads

Uudised

Viimane: Thu, 15 Mar 2012 14:51:08
Teema: Vabad töökohad pakkuda
Veel uudiseid »

How can I load more than one map on the same application using BasicMapComponent

1 reply [Last post]
leilameherzi
User offline. Last seen 48 weeks 19 hours ago. Offline
Joined: 04/19/2011

Hi all,
I'm using nutiteq to load offline maps from SDCARD
When initializing my map component on onCreate method, the constructor of BasicMapComponent force me to put a WgsPoint. However, maps that I load aren't on the same area.
For example, if i want to load France map, on BasicMapComponent constructor i have to put a WgsPoint witch is in France, then on the same application, I have the hand to choose Italy map, how can I update it dynamicly??


public void onCreate(){
final Object savedMapComponent = getLastNonConfigurationInstance();
if (savedMapComponent == null) {
mapComponent = new BasicMapComponent(
"02e74f10e0327ad868d138f2b4fdd6f04dbb4203045885.27371836", FIRM,
SOFT, 1, 1, new WgsPoint(10.186052, 36.829222), 13);

mapComponent.setPanningStrategy(new ThreadDrivenPanning());
mapComponent.setControlKeysHandler(new AndroidKeysHandler());
mapComponent.setTouchClickTolerance(25);
} else {
mapComponent = (BasicMapComponent) savedMapComponent;
}

mapView = new MapView(this, mapComponent);
}

jaak
User offline. Last seen 4 days 19 hours ago. Offline
Joined: 06/19/2008

You can always use MapComponent's setMiddlePoint() method to move map to any other place, based on user action or any other event.

/JaakL