var mapview;
var themebasedfoi ;
function on_load_mapview()
{
var baseURL = "http://"+document.location.host+"/mapviewer";
var mapCenterLon = -122.45;
var mapCenterLat = 37.7706;
var mapZoom = 5;
var mpoint = MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,8307);
mapview = new MVMapView(document.getElementById("map"), baseURL);
mapview.addMapTileLayer(new MVMapTileLayer("mvdemo.demo_map"));
mapview.setCenter(mpoint);
mapview.setZoomLevel(mapZoom);
themebasedfoi = new MVThemeBasedFOI('themebasedfoi','mvdemo.customers');
themebasedfoi.setBoundingTheme(true);
mapview.addThemeBasedFOI(themebasedfoi);
mapview.addNavigationPanel('west');
mapview.display();
}
function setVisible(item)
{
var themebasedfoi = mapview.getThemeBasedFOI(item.value);
themebasedfoi.setVisible(!themebasedfoi.isVisible());
}
When you click on the HTML link to zoom to the theme, this is what's happening
behind the scene: