Oracle Maps example - Custom marker for Theme based FOI layer


Instructions

This demo shows how to override the style of a point-type FOI layer with a custom marker image. In this case a baseball image is used to represent each FOI in the 'Customers' theme that was previously represented as a red dot.

Source code

	  var mapview;
	  
	  function showMap()
	  {	
		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);             

		customThemeBasedFOIMarker();

		mapview.display();   
	  }
	  
	  function customThemeBasedFOIMarker()
	  {	
		var themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.customers');
		
		themebasedfoi.setMarkerImage('images/baseball.gif',28,28);      
		
		themebasedfoi.setBringToTopOnMouseOver(true);
		
		mapview.addThemeBasedFOI(themebasedfoi);
	
	  }