Oracle Maps example - add/remove a Theme based FOI layer

Name of the Theme Based FOI layer:
click here to remove it from the map
click here to get the FOI layer MBR

Instructions

The red dots represent customer locations, and are generated from a MapViewer theme named 'customers'. If you mouse over and click on any red dot on the map, you will see an info-tip window showing that customer's properties.
To remove this customer layer, click on the link above the map.

Source code

Here is the JavaScript code for the above map.
  var mapview;
  
  function on_load_mapview() 
  {	
    var baseURL  = "http://"+document.location.host+"/mapviewer";
    var mapCenterLon = -122.45;
    var mapCenterLat =  37.7706;
    var mapZoom      =  4;       
    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);    
    
    var themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.customers');
    
    themebasedfoi.setBringToTopOnMouseOver(true);
    mapview.addThemeBasedFOI(themebasedfoi);
    
    mapview.display();
  }
  
  function removeThemeBasedFOI()
  {
    var themebasedfoiName = document.getElementById('themebasedfoiName').value;
    var themebasedfoi = mapview.getThemeBasedFOI (themebasedfoiName);
    mapview.removeThemeBasedFOI(themebasedfoi);
  }	                    
  
This is how the removeThemeBasedFOI() is invoked when you click the link above.
Name of the Theme Based FOI layer: <input id="themebasedfoiName" type=text value="themebasedfoi1">
<a href="javascript:removeThemeBasedFOI()">click here to remove it from the map</a>