2 Replies Latest reply on May 15, 2013 1:51 PM by 945537

    Can't display a Tile Layer using JAVA API V2 (based on HTML5)

      Hi Experts,

      I am trying to display a tile layer using JAVA API V2 but i get the below error and nothing shows after that.

      MAPVIEWER-05501: Map tile layer not found. Check map tile layer name and/or data source name.
      Source: OM.layer.Tilelayer.getTileLayerConfig

      I tried with chrome and firefox browsers which supports HTML5 but same issue. Here is the html code i am using

      <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
      <script type='text/javascript' src='http://localhost:8282/mapviewer/jslib/v2/oraclemapsv2.js'></script>
      <style type= 'text/css '>body {cursor:default;}</style>
      <script language="JavaScript" type="text/javascript">
      function showMap()
      var baseURL = "http://"+document.location.host+"/mapviewer";
      var mapCenterLon = -122.45;
      var mapCenterLat = 37.6706;
      var mapZoom = 4;
      var mpoint = new OM.geometry.Point(mapCenterLon,mapCenterLat,8307);
      var map = new OM.Map(
      mapviewerURL: baseURL
      }) ;
      var tileLayer = new OM.layer.TileLayer(
      map.addLayer(tileLayer) ;
      navigationPanelBar=new OM.control.NavigationPanelBar();
      map.setMapZoomLevel(mapZoom) ;
      map.init() ;

      Note: inside the body on load i use DIV Id = Map (i skipped that one line of code because it stops rest of the line from displaying in the thread)

      However, I am successful in using the same tile Layer with JAVA API V1

      Please share your thoughts as what could be the fix