Closed gorbin closed 10 years ago
Hi gorbin,
It sounds like what you are looking for is in this API called HotSpot...
https://github.com/moagrius/TileView/wiki/Hot-Spots
Check it out here in the wiki and I've included a code snippet because I just happened to be writing it as I saw your question. I have an overview map with two hot areas that opens other maps and I use tags to pass the map ids.
HotSpot map1Hotspot = new HotSpot(0, 52, 640, 460);
map1Hotspot.setTag(0);
HotSpot map2Hotspot = new HotSpot(0, 510, 640, 908);
map2Hotspot.setTag(1);
tileView.addHotSpot(map1Hotspot);
tileView.addHotSpot(map2Hotspot);
tileView.addHotSpotEventListener( new HotSpotEventListener() {
@Override
public void onHotSpotTap(HotSpot hotspot, int arg1, int arg2) {
// Toast.makeText(getBaseContext(), "Hotspot clicked " + hotspot.getTag().toString(), Toast.LENGTH_SHORT).show();
Object itemId = hotspot.getTag();
if (itemId.equals(0)) {
model.setSelectedMap(model.getMaps().get(0));
Intent mapIntent = new Intent(HomeScreen.this, MapActivity.class);
HomeScreen.this.startActivity(mapIntent);
return;
} else if (itemId.equals(1)) {
model.setSelectedMap(model.getMaps().get(1));
Intent mapIntent = new Intent(HomeScreen.this, MapActivity.class);
HomeScreen.this.startActivity(mapIntent);
return;
} else {
return;
}
}
});
@gorbin i agree with the information @cjbraden posted - did this answer your question? you can close the issue if it's resolved, or post back if you need more help.
Sorry, yes, I should close issue, I didn't check it, but it is what i need
Is there any way to make callback to some area? I've got map of park where there are some areas in which I need to make popup as in marker click but for area, make marker as all area is not an option, by the way on this area threre other markers.
Is there any way to do it?
sorry for my English...