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

Advertisement
October 11

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
*[mvdemo.demo_map]*
I tried with chrome and firefox browsers which supports HTML5 but same issue. Here is the html code i am using
<html>
<head>
<title></title>
<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(
document.getElementById('map'),
mapviewerURL: baseURL
var tileLayer = new OM.layer.TileLayer(
"baseMap",
dataSource:"mvdemo",
tileLayer:"demo_map",
tileServerURL:baseURL+"/mcserver"
map.addLayer(tileLayer) ;
navigationPanelBar=new OM.control.NavigationPanelBar();
map.addMapDecoration(navigationPanelBar);
map.setMapCenter(mpoint);
map.setMapZoomLevel(mapZoom) ;
map.init() ;
</script>
</head>
</html>
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
Thanks
Nag

Advertisement

Replay

Nag,
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)please surround your code with [ c o d e ] [ / c o d e ] (without the spaces).
Secondly: this is probably more appropriate for the {forum:id=727} forum.
Regards,
Stefan

View 3 Replies

Tags:

  1. nokia 6120c (B20.04) way
  2. change a miro document on hold
  3. 30LF
  4. L7EN
  5. vendor mass confirmation sap
  6. PTI7
  7. PWKI
  8. smallestdky
  9. barnduu
  10. ibooks 3.1.1.ipa download
Copyrights 2019 Fcffair BigData Resource, All rights reserved