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. ifroget my icloud id n pasword
  2. troubleshoot software hpwindow7
  3. PARNR LiVE ViDEo ON
  4. difference in fgi0 and ke30
  5. itunes login createSession
  6. fb02 auth objects
  7. how to make my bt id as a primary bt id
  8. using outline load utility
  9. solar7s3
  10. lateru2t
Copyrights 2019 Fcffair BigData Resource, All rights reserved