2 Replies Latest reply: May 13, 2012 1:52 AM by 918120 RSS

    Problem with JDBC_NETWORK_QUERY in JavaScript

    918120
      Hi,

      I have problem with rendering JDBC_NETWORK_QUERY in JavaScript. If I use XML Request, its work. But when I use in JavaScript, it isnt work and show this error:

      [MVThemeBasedFOIControl.foiLoaded] MAPVIEWER-05523: Unable to process the response from the server MapViewer. (MAPVIEWER-06009: Error processing FOI request.
      Root cause:FOIServlet:MAPVIEWER-00019: The specified data source does not exist.

      XML Request:
      <?xml version="1.0" standalone="yes"?>
      <map_request
      title="Oracle LBS MAP"
      basemap="testovaci"
      datasource = "railway"
      width="1400"
      height="800"
      bgcolor="#a6cae0"
      antialiase="false"
      format="PNG_STREAM">

      <themes>
      <theme name="pokus">
      <jdbc_network_query
      network_name="railway"
      network_level="1"
      jdbc_srid="8307"
      datasource="railway"
      analysis_algorithm="DIJKSTRA"
      shortestpath_style=""
      shortestpath_startnode="5879"
      shortestpath_endnode="90"
      shortestpath_startstyle=""
      shortestpath_endstyle=""
      asis="false">
      </jdbc_network_query>
      </theme>
      </themes>
      </map_request>
      (SUCCESSFUL)

      JavaScript:

      var theme = "<themes><theme name='SHORTEST_PATH_THEME'>" +
      "<jdbc_network_query " +
      "network_name='Railway' " +
      "network_leve='1' " +
      "jdbc_srid='8307' " +
      "datasource='railway' " +
      "analysis_algorithm='DIJKSTRA' " +
      "shortestpath_style='' " +
      "shortestpath_startnode='5879' " +
      "shortestpath_endnode='90' " +
      "shortestpath_startstyle='' " +
      "shortestpath_endstyle='' "
      "asis='false'>" +
      "</jdbc_network_query>" +
      "</theme></themes>";
      var paththeme = new MVThemeBasedFOI('paththeme',theme);
      paththeme.setBringToTopOnMouseOver(true);
      mapview.addThemeBasedFOI(paththeme);

      If I try only JDBC_QUERY, its work too. In Map railway I have displayed network railway.

      Thx for help.
      Rezaem