Dynamic Themes in mapinit.jsp

Hi ,
How can I pass dynamic themes using mapinit.jsp ,
For example alongwith all the parameters like map size , basemap etc..
I want to give a new date parameter . based on the given date I need to put a where clause in my themes like where date=parameter.date.
I have salesperson whose location changes on daily basis and user need to see their location on date basis , for example where all the salesman were on 28-10-2006 and where all the sales man were on 25-10-2006 and so on ..
Please help

Thanks a lot that worked out.But still as I have my complete requirement is I need to display set of radio buttons when I click on this link.
Can this be possible by javascript.Can anyone give me an idea of how to do this. The actual scenario is like I get the a list of 30 dates and their corresponding radio buttons from a webservice. What I do is I read all the values from that webservice and convert them into text( actually I get the codes) and need to display that as a calendar to the user and when they click on a particular date { I copied a calender from the net and placed that code in my jsp to display the calender)
the set of radio buttons should be displayed underneath the calender.That is both the calender and the list of radio buttons should be on the same page.
Thanks in advance.
Pavan.

Similar Messages

  • Can a Hyperlink be created based on the results of a Dynamic Theme Query?

    What I would like to do is create a link from the results of a dynamic theme. The following code displays the names of locations on my map, is there any way that the location name once placed on the map can be a hyperlink that will run a SQL statement that will show the status of that name. My map is based on 3 status levels identified by markers, green marker is up, red is down, amber is degraded. If the Marker is red I want to be able to click the name or the Marker that is on the map to find out what the problem actually is.
    Thanks in advance!
    <mv:addJDBCTheme
         name="Locations_Names"
         datasource="mvdemo"
         spatial_column="map_loc_data"
         srid="8307"
         label_style="T.CITY NAME"
         label_column="location"
         min_scale="7.05" max_scale="0">     
              select l.location, l.map_loc_data
              from resources.locations_test l
              where l.location_id IN
              (Select distinct d_loc_id
              from cii.devices
              HAVING max(d_ops_status) <= 2 GROUP BY d_loc_id)
    </mv:addJDBCTheme>

    LJ,
    Any chance you can see what is wrong with the following code. I have gone over it line by line with an example out of the Oracle Pro spatial Data book, but I can not see what the problem is.
    I know you will not be able to run it but the error I am getting is:
    500 Internal Server Error
    java.lang.NoSuchMethodError at Oracle.lbs.mapclient.MapViewer.getUserPoint(MapViewer.java:3512)
         at oracle.lbs.mapclient.MapViewer.identify(MapViewer.java:4560)
         at oracle.lbs.mapclient.taglib.MapViewerIdentifyTag.doEndTag(MapViewerIdentifyTag.java:171)
         at tnoscmaps.MapofUS._jspService(_MapofUS.java:286)
         [SRC:/TNOSCMAPS/MapofUS.jsp:130]
    To me this is pointing to the following section:
    <mv:identify
    id="identifyResults"
    datasource="mvdemo"
    table="locations_test"
    spatial_column="map_loc_data"
    srid="8307"
    x="<%= imgCX %>"
    y="<%= imgCY %>"
    >
    location, state
    </mv:identify>
    This is my complete set of code for this page:
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ taglib uri="/WEB-INF/mvtaglib.tld" prefix="mv" %>
    <%@ page session="true" %>
    <%@ page import="oracle.lbs.mapclient.MapViewer" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>CONUS TNOSC SITES</title>
    </head>
    <body bgcolor="#FFFF00">
    <%
    // Name of this File
    String jspURL = response.encodeURL(request.getRequestURI());
    // URL of Mapviewer servlet
    String mapViewerURL =
    "http://"+ request.getServerName()+":"+request.getServerPort()+
    request.getContextPath()+"/omserver";
    String[][] featureInfo = null;
    if( request.getParameter("session-initialized") == null ||
    request.getParameter("new-session") == "true") {
    %>
    <!-- Initialize MapViewer handle.and save it in the session -->
    <mv:init
    url="<%=mapViewerURL%>"
    datasource="mvdemo"
    id="mvHandleSimpleViewerTags" />
    <!-- Set map format and size -->
    <mv:setParam
    title="CONUS TNOSC SITES"
    width="800"
    height="500"/>
    <!-- Add themes from the base map -->
    <mv:importBaseMap name="US_MAP"/>
    <!-- Dynamic Themes -->
    <mv:addJDBCTheme
         name="Locations_Names"
         datasource="mvdemo"
         spatial_column="map_loc_data"
         srid="8307"
         label_style="T.CITY NAME"
         label_column="location"
         min_scale="7.05" max_scale="0">     
              select l.location, l.map_loc_data
              from resources.locations_test l
              where l.location_id IN
              (Select distinct d_loc_id
              from cii.devices
              HAVING max(d_ops_status) <= 2 GROUP BY d_loc_id)
    </mv:addJDBCTheme>
    <mv:addJDBCTheme
         name="Locations_Green_Status"
         datasource="mvdemo"
         spatial_column="map_loc_data"
         srid="8307"
         render_style="M.GREEN"
         min_scale="50" max_scale="0">     
    SELECT l.map_loc_data, l.location_id
    FROM resources.locations_test l
    WHERE l.location_id IN (SELECT d_loc_id
    FROM cii.devices
         GROUP BY d_loc_id HAVING MAX(d_ops_status) = 0)
    </mv:addJDBCTheme>
    <mv:addJDBCTheme
         name="Locations_AMBER_Status"
         datasource="mvdemo"
         spatial_column="map_loc_data"
         srid="8307"
         render_style="M.AMBER"
         min_scale="50" max_scale="0">     
    SELECT l.map_loc_data, l.location_id
    FROM resources.locations_test l
    WHERE l.location_id IN (SELECT d_loc_id
    FROM cii.devices
         GROUP BY d_loc_id HAVING MAX(d_ops_status) = 1)
    </mv:addJDBCTheme>
    <mv:addJDBCTheme
         name="Locations_RED_Status"
         datasource="mvdemo"
         spatial_column="map_loc_data"
         srid="8307"
         render_style="M.RED"
         min_scale="50" max_scale="0">     
    SELECT l.map_loc_data, l.location_id
    FROM resources.locations_test l
    WHERE l.location_id IN (SELECT d_loc_id
    FROM cii.devices
         GROUP BY d_loc_id HAVING MAX(d_ops_status) = 2)
    </mv:addJDBCTheme>
    <!-- Set initial map center and size -->
    <mv:setParam
    centerX="-96.0"
    centerY="39.0"
    size="37" />
    <%
    MapViewer mvHandle = (MapViewer) session.getAttribute("mvHandleSimpleViewerTags");
    String userAction = request.getParameter("userAction");
    String imgCX = request.getParameter("userClick.x");
    String imgCY = request.getParameter("userClick.y");
    if("identify".equals(userAction)) {
    %>
    <mv:identify
    id="identifyResults"
    datasource="mvdemo"
    table="locations_test"
    spatial_column="map_loc_data"
    srid="8307"
    x="<%= imgCX %>"
    y="<%= imgCY %>"
    >
    location, state
    </mv:identify>
    <%
    featureInfo = identifyResults;
    else {
    %>
    <mv:run
    action="<%=userAction%>"
    x="<%= imgCX %>"
    y="<%= imgCY %>" />
    <%
    %>
    <!-- Output the HTML content -->
    <center><h1>CONUS TNOSC SITES</h1></center>
    <form name="viewerForm" method="post" action="<%= jspURL %>" >
    <center>
    <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" >
    <tr bgcolor="#FFFFFF">
    <td valign="top">
    <table border="0" cellpadding="0" cellspacing="0">
    <!-- Map display -->
    <tr>
    <td valign="top" align="center" >
    <input type="image"
    border="1"
    src="<mv:getMapURL />"
    name="userClick"
    alt="Click on the map for selected action"
    >
    </td>
    </tr>
    <!-- Map click action -->
    <tr>
    <td align="center">
    <input type="radio" name="userAction" value="recenter"
    <%= "recenter".equals(userAction)?"checked":""%> ><B>Re-center</B>
    <input type="radio" name="userAction" value="zoomin"
    <%= "zoomin".equals(userAction)?"checked":""%> ><B>Zoom In</B>
    <input type="radio" name="userAction" value="zoomout"
    <%= "zoomout".equals(userAction)?"checked":""%> ><B>Zoom Out</B>
    <input type="radio" name="userAction" value="identify"
    <%= "identify".equals(userAction)?"checked":""%> ><B>Identify Issue</B>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <!-- Current position -->
    <tr>
    <td align="center">
    <i>Center</i>[<b><%=mvHandle.getRequestCenter().getX()+","+
    mvHandle.getRequestCenter().getY()%></b>]  
    <i>Scale</i>[<b><%=mvHandle.getMapScale()%></b>]
    </td>
    </tr>
    <!-- Identification result -->
    <% if (featureInfo !=null && featureInfo.length>0) {%>
    <tr><td align="center">
    <table border="1">
    <% for (int i=0; i<featureInfo.length; i++) {%>
    <tr>
    <% String[] row = featureInfo;
    for (int k=0; k<row.length; k++) {%>
    <td><%= row[k] %></td>
    <% } %>
    </tr>
    <% } %>
    </table>
    </td></tr>
    <% } %>
    </table>
    </center>
    <input type="hidden" name="session-initialized" value="true" >
    </form>
    </body>
    </html>

  • MapViewer Dynamic Theme help

    I am using MapViewer 10g to create a JSP map, using JSP Tags as in the TagMap example. All works well, however, in building the page in question, beside creating and printing the map, I also use a within_distance query to print out a list of values. Now, on the map, I would like to be able to draw or add a dynamic theme which would be a semi-transparent raster circle, with a varying radius (dependent on the within_distance size) at the center of the map (X,Y). Any help would be greatly appreciated.

    there is a bug in the addJDBCTheme tag where the asis attribute is ignored; normally if you set asis="true" then it should work (no spatial filter will be applied to your dynamic theme since it has no spatial index anyway). But somehow the asis attribute is ignored by the taglib.
    The work around is to use the client api itself, as show below:
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ordim/mvtaglib.tld" prefix="mapviewer"%>
    <P>Testing a point</P>
    <P>
    <mapviewer:init datasource="mvdemo"
    url="http://localhost:8888/mapviewer/omserver"
    id="mvhandle" />
    <mapviewer:importBaseMap name="demo_map" />
    <%
    mvhandle.addJDBCTheme("mvdemo", "centerPoint",
    "SELECT mdsys.sdo_geometry(2001, null, mdsys.sdo_point_type(-83, 39, null), null, null) geom FROM dual",
    "geom", null, "M.CIRCLE", null, null, true); %>
    <mapviewer:setParam centerX="-83" centerY="39" size="2" />
    <mapviewer:run />
    showing the map: <p>
    <img src = "<mapviewer:getMapURL />" align=left />
    </P>

  • Can't create dynamic html elements with jsp????? important

    Hi All,
    I am having problem creating dynamic html elements with jsp tags, i have tried to use EL and java scriplet, both of them don't work.
    i am trying to create dynamic menu in my "rightMenu.jspf", based on, if user has logged in or not.
    some like this!
    <jsp:if test ="${validUser == null}">
    some simple text menu here
    </jsp:if>
    but it is not working. it simply loading all and images with in statement, regardless of whether user has logged in or not. i think some how if statement is not working properly.
    "validUser" is a session bean, which is not creating at this point, it will created when user will log in successfully. and also this session bean does not exist at the page, where i am trying to check that .
    Is there any way to create dynamic values in jsp. It is really important, is there any body who help me in this matter. i would be really grateful.
    zaman

    hi jaspre,
    thanks for replying me. you know what, is it not something wrong with web.xml file. i remember once, i deleted some from there, a property with "*.jsp". i can't remember what exactly was it though.
    all if statements works on files ending with extension ".jsp" but don't work only on with extension ".jspf". there must be to do with this.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
    <servlet-name>ValidateServlet</servlet-name>
    <servlet-class>ValidateServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ValidateServlet</servlet-name>
    <url-pattern>/ValidateServlet</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>pollAndCometEnabled</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    main.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    if any one can figure it out. i would be grateful.
    zaman

  • Retrieving data from an ArrayList and presenting them in a JSP

    Dear Fellow Java Developers:
    I am developing a catalogue site that would give the user the option of viewing items on a JSP page. The thing is, a user may request to view a certain item of which there are several varieties, for example "shirts". There may be 20 different varieties, and the catalogue page would present the 20 different shirts on the page. However, I want to give the user the option of either viewing all the shirts on a single page, or view a certain number at a time, and view the other shirts on a second or third JSP page.
    See the following link as an example:
    http://www.eddiebauer.com/eb/cat_default.asp?nv=2|21472|9&tid=&c=&sc=&cm_cg=&lp=n2f
    I am able to retrieve the data from the database, and present all of them on a JSP, however I am not sure how to implement the functionality so that they can be viewed a certain number at a time. So if I want to present say 12 items on a page and the database resultset brings back 30 items, I should be able to present the first 12 items on page1, the next 12 items on page2, and the remaining 6 items on page3. How would I do this? Below is my scriplet code that I use to retrieve information from the ArrayList that I retrieve from my database and present them in their entirety on a single JSP page:
    <table>
    <tr>
    <%String product=request.getParameter("item");
    ArrayList list=aBean.getCatalogueData(product);
    int j=0, n=2;
    for(Iterator i=list.iterator(); i.hasNext(); j++){
    if(j>n){
    out.print("</tr><tr>");
    j=0;
    Integer id=(Integer)i.next();
    String name=(String)i.next();
    String productURL=(String)i.next();
    out.print("a bunch of html with the above variables embedded inside")
    %>
    </tr>
    </table>
    where aBean is an instace of a JavaBean that retrieves the data from the Database.
    I have two ideas, because each iteration of the for loop represents one row from the database, I was thinking of introducing another int variable k that would be used to count all the iterations in the for loop, thus knowing the exact number. Once we had that value, we would then be able to determine if it was greater than or less than or equal to the maximum number of items we wanted to present on the JSP page( in this case 12). Once we had that value would then pass that value along to the next page and the for loop in each subsequent JSP page would continue from where the previous JSP page left off. The other option, would be to create a new ArrayList for each JSP page, where each JSP page would have an ArrayList that held all the items that it would present and that was it. Which approach is best? And more importantly, how would I implement it?
    Just wondering.
    Thanks in advance to all that reply.
    Sincerely;
    Fayyaz

    -You said to pass two parameters in the request,
    "start", and "count". The initial values for "start"
    would be zero, and the inital value for "count" would
    be the number of rows in the resultSet from the
    database, correct?Correct.
    -I am a little fuzzy about the following block of code
    you gave:
    //Set start and count for next page
    start += count; // If less than count left in array, send the number left to next next page
    count = ((start*3)+(count*3) < list.size()) ? (count) : ((list.size() - (start*3))/3)
    Could you explain the above block of code a little
    further please?Okay, first, I was using the ternary operators (boolean) ? val_if_true : val_if_false;
    This works like an if() else ; statement, where the expression before the ? represents the condition of the if statement, the result of the expression directly after the ? is returned if the condition is true, and the expression after the : is returned if the condition is false. These two statments below, one using the ternary ? : operators, and the other an if/else, do the same thing:
    count = ((start*3)+(count*3) < list.size()) ? (count) : ((list.size() - (start*3))/3);
    if ((start*3)+(count*3) < list.size()) count = count;
    else count = ((list.size() - (start*3))/3);Now, why all the multiplying by 3s? Because you store three values in your list for each product, 1) the product ID, 2) the product Name, and 3) the product URL. So to look at the third item, we need to be looking at the 9th,10th, and 11th values in the list.
    So I want to avoid an ArrayIndexOutOfBounds error from occuring if I try to access the List by an index greater than the size of the list. Since I am working with product numbers, and not the number of items stored in the list, I need to multiply by three, both the start and count, to make sure their sum does not exceed the value stored in the list. I test this with ((start*3)+(count*3) < list.size()) ?. It could have been done like: ((start + count) * 3 < list.size()) ?.
    So if this is true, the next page can begin looking through the list at the correct start position and find the number of items we want to display without overstepping the end of the list. So we can leave count the way it is.
    If this is false, then we want to change count so we will only traverse the number of products that are left in the list. To do this, we subtract where the next page is going to start looking in the list (start*3) from the total size of the list, and devide that by 3, to get the number of products left (which will be less then count. To do this, I used: ((list.size() - (start*3))/3), but I could have used: ((list.size()/3) - start).
    Does this explain it enough? I don't think I used the best math in the original post, and the line might be better written as:
    count = ((size + count)*3 < list.size()) ? (count) : ((list.size()/3) - start);All this math would be unnecessary if you made a ProductBean that stored the three values in it.
    >
    - You have the following code snippet:
    //Get the string to display this same JSP, but with new start and count
    String nextDisplayURL = encodeRedirectURL("thispage.jsp?start=" + start + "&count=" + count + "&item=" + product);
    %>
    <a href="<%=nextDisplayURL%>">Next Page</a>
    How would you do a previous page URL? Also, I need to
    place the "previous", "next" and the different page
    number values at the top of the JSP page, as in the
    following url:
    http://www.eddiebauer.com/eb/cat_default.asp?nv=2|21472
    9&tid=&c=&sc=&cm_cg=&lp=n2f
    How do I do this? I figure this might be a problem
    since I am processing the code in the middle of the
    page, and then I need to have these variables right at
    the top. Any suggestions?One way is to make new variable names, 'nextStart', 'previousStart', 'nextCount', 'previousCount'.
    Calculate these at the top, based on start and count, but leave the ints you use for start and count unchanged. You may want to store the count in the session rather than pass it along, if this is the case. Then you just worry about the start, or page number (start would be (page number - 1) * count. This would be better because the count for the last page will be less than the count on other pages, If we put the count in session we will remember that for previous pages...
    I think with the details I provided in this and previous post, you should be able to write the necessary code.
    >
    Thanks once again for all of your help, I really do
    appreciate the time and effort.
    Take care.
    Sincerely;
    Fayyaz

  • Unable to get the SVG demos to work in mapinit.jsp

    Hi forum
    I've played a bit around with the Mapviewer demos for Oracle Maps. I have loaded the demo data in a database and done the setup as described in the setup. Everything works - except all demos related to SVG, like mapinit.jsp in this case. I've tried both version 10.1.3.1 and 10.1.3.3. I've tried this in misc. browsers, and here's what happens in each
    IE7 + Adobe SVG Viewer: The SVG window is blank
    Firefox 3: For Mapviewer 10.1.3.1, displays a "Malformed XML document error". For Mapviewer 10.1.3.3, wants to install an "Unknown plugin" which it then can't find, and doesn't display anything.
    Google Chrome: Outputs an XML document as text in the SVG window
    I have tried adding an entry to mime-types like "image/svg+xml svgz", but that didn't seem to change anything. No browser wants to display the SVG correctly.
    Choosing "Regular image" for the same demo data works fine.
    How do you get this to work? What am I missing? The appserver runs 10.1.3.4.
    Thanks in advance,
    Jacob

    Hi Jacob,
    Since Adobe dropped support of their SVG viewer, MapViewer SVG support has not been updated with the new features added. Therefore, do not expect to get in SVG, what you currently get with other formats. The minimum support initially added for SVG, is still there. We will check the demos.
    Different browsers provider different levels (some rather incomplete) of support for SVG, and scripting with SVG is also done differently on different browser/platform, so this makes difficult to keep SVG support updated. You experienced these differences in your tests with different browsers.
    Joao

  • How can i render a dynamic html file in jsp page

    Hi everybody,
    i am trying to render a dynamic html file in jsp page with the result of querying a database.
    The response of the query is a xml document. And i have a stylesheet to transfer it to html.
    How can i render the html in a jsp file?

    I am using below code for HTML files
    private var appFile:String="index.html";
    if (StageWebView.isSupported)
                        currentState = "normal";
                        webView.stage = stage;
                        webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                        var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                        webView.loadURL(fPath);
                        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                    else {
                        currentState = "unsupported";
                        lblSupport.text = "StageWebView feature not supported";
    above code is working fine for me.

  • JDBC query theme in a JSP page

    Hi, everyone
    I tried to write JDBC query theme in a JSP page at MapViewer, but it did not work.
    The following is the codes.
    1.JDBC theme in a map request in XML
    <theme name="jdbc_theme_contour">
    <jdbc_query
    datasource="spatial10g"
    jdbc_srid="8703"
    spatial_column="geom"
    render_style="C.RED">
    Select geom from contour where time='01-JUL-07'
    </jdbc_query>
    </theme>
    2. JDBC theme in a JSP request.
    "<theme name=\"jdbc_theme_contour\" >\n" +
    " <jdbc_query \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " spatial_column=\" geom \"\n" +
    " render_style=\"C.RED\" >\n" +
    " SELECT geom from contour where time='01-JUL-07' \n" +
    " </jdbc_query> \n" +
    " </theme> \n" +
    I do not know whether the second form is right or not. I did not display the JDBC query in MapViewer. Does anyone know the second form is right? or Maybe give me a right form in a JSP request. (contour is a table , geom is the column of geometry attribute in contour)
    Gengsheng

    Hi
    Here is the map request in JSP
    // Construct a map request
    mapRequest = "xml_request=" +
    "<?xml version=\"1.0\" standalone=\"yes\" ?>\n" +
    "<map_request \n" +
    // " title=\"" + title + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " basemap=\"" + basemap + "\"\n" +
    " width=\"" + width + "\"\n" +
    " height=\"" + height + "\"\n" +
    " bgcolor=\"#FFFFFF\" >\n" +
    " format=\"PNG_URL\" >\n" +
    " <center size=\"" + size + "\">\n" +
    " <geoFeature>\n" +
    " <geometricProperty typeName=\"center\">\n" +
    " <Point>\n" +
    " <coordinates>\n" +
    " " + cx + ", " + cy + "\n" +
    " </coordinates>\n" +
    " </Point>\n" +
    " </geometricProperty>\n" +
    " </geoFeature>\n" +
    " </center>\n" +
    "<themes> \n" +
    (flood.equals("true")?
    ("<theme name=\"jdbc_theme_contour\" >\n" +
    " <jdbc_query \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " spatial_column=\"GEOM\"\n" +
    " render_style=\"C.RED\" >\n" +
    " SELECT * from contour where time='01-JUL-07' \n" +
    " </jdbc_query> \n" +
         " </theme> \n") : "") +
         (waterdepth.equals("true")?
         (" <theme name=\"FLOOD.LINKS\" >\n" +
         " </theme> \n") : "") +
         " <theme name=\"net_theme\" user_clickable=\"false\"> \n" +
    " <jdbc_network_query \n" +
    " network_name=\"" + networkName + "\"\n" +
    " network_level=\"1\" \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    (showlinks.equals("true")?
    (" link_style=\"L.CRM_SROADS\"\n") : "") +
    (showlinks.equals("true") && showdir.equals("true")?
    (" direction_style=\"M.IMAGE105_BW\"\n" +
    " direction_position=\"0.75\"\n" +
    " direction_markersize=\"" + dirsize + "\"\n") : "") +
    (showlinks.equals("true") && showlklabels.equals("true")?
    (" link_labelstyle=\"" + lklbstyle + "\"\n" +
    " link_labelcolumn=\"link_id\"\n") : "") +
    (shownodes.equals("true") ?
    (" node_style=\"M.CITY HALL 4\"\n" +
    " node_markersize=\"" + nodesize + "\"\n") : "") +
    (shownodes.equals("true") && showndlabels.equals("true")?
    (" node_labelstyle=\"" + ndlbstyle + "\"\n" +
    " node_labelcolumn=\"" + ndlbcolumn + "\"\n") : "") +
    (showpath.equals("true") ?
    (" path_ids=\"" + pathid + "\"\n" +
    " path_styles=\"L.PH\"\n") : "") +
    " asis=\"false\"></jdbc_network_query> \n" +
    " </theme> \n" +
    (runanalysis.equals("true") &&
    (algorithm.equals("DIJKSTRA") || algorithm.equals("ASEARCH")) ?
    (" <theme name=\"spath_theme\" user_clickable=\"false\"> \n" +
    " <jdbc_network_query \n" +
    " network_name=\"" + networkName + "\"\n" +
    " network_level=\"1\" \n" +
    " jdbc_srid=\"" + srid + "\"\n" +
    " datasource=\"" + dataSource + "\"\n" +
    " analysis_algorithm=\"" + algorithm + "\"\n" +
    " shortestpath_style=\"L.DPH\"\n" +
    " shortestpath_startnode=\"" + startnode + "\"\n" +
    " shortestpath_endnode=\"" + endnode + "\"\n" +
    " shortestpath_startstyle=\"M.STAR\"\n" +
    " shortestpath_endstyle=\"M.CIRCLE\"\n" +
    " asis=\"false\"></jdbc_network_query> \n" +
    " </theme> \n") : "") +
    "</themes>\n" +
    "</map_request>\n";
    in this request, other themes and JDBC network query theme work except the JDBC query theme. I guess the style or format in the following are not right.
    " spatial_column=\" geom \"\n" +
    " SELECT geom from contour where time='01-JUL-07' \n" +
    Anyway, I hope you can give me instructions.
    Gengsheng

  • XMLParseException during dynamic theme generation

    Hi,
    I4m having problems with SQL statements in some requests to MapViewer during dynamic theme generation.
    When I put in the WHERE clause the operator "less than" the request fails. An XMLParseException is generated.
    For example:
    <jdbc_query XXXXXXX>
    select geom from table where column < 10
    </jdbc_query>
    the following exception is generated:
    oracle.xml.parser.v2.XMLParseException: Expected name instead of .
    When I change de symbol < to &lt; (like MapViewer Users Guide recommends):
    <jdbc_query XXXXXXX>
    select geom from table where column &lt; 10
    </jdbc_query>
    the following exception is generated:
    oracle.xml.parser.v2.XMLParseException: Unexpected EOF
    If the is no WHERE clause (select geom from table) the request works.
    What can be wrong ? Can I use the less than operator in the WHERE clause ?
    Thanks in advance,
    Rodrigo     

    OK. The OC4J version is 1.0.2.2.1. I4m using Oracle8i Enterprise Edition Release 8.1.7.0.0.
    Some examples of XML requests:
    1) This works fine
    <?xml version="1.0" standalone="yes"?>
    <map_request
    title=""
    basemap="MAP1"
    datasource="DS1"
    width="1098"
    height="648"
    bgcolor="#FFFFFF"
    antialiase="false"
    format="GIF_URL">
    <center size="73063.00272634998">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates> 376875.541941716, 7810266.276712325</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name ="PLANTIOS_MPD">
                   <jdbc_query
                   asis="true"
    spatial_column="GEOM"
                   render_style="C.PLANTIOS_MPD"
                   jdbc_host="MyServer"
                   jdbc_port="1521"
                   jdbc_sid="db01"
                   jdbc_user="scott"
                   jdbc_password="tiger"
                   jdbc_mode="thin">
                   select geom from table where column = 50
    </jdbc_query>
         </theme>
    </themes>
    </map_request>
    2) This doesn4t work ('<' replaces '=' in SQL WHERE clause)
    <?xml version="1.0" standalone="yes"?>
    <map_request
    title=""
    basemap="MAP1"
    datasource="DS1"
    width="1098"
    height="648"
    bgcolor="#FFFFFF"
    antialiase="false"
    format="GIF_URL">
    <center size="73063.00272634998">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates> 376875.541941716, 7810266.276712325</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name ="PLANTIOS_MPD">
                   <jdbc_query
                   asis="true"
    spatial_column="GEOM"
                   render_style="C.PLANTIOS_MPD"
                   jdbc_host="MyServer"
                   jdbc_port="1521"
                   jdbc_sid="db01"
                   jdbc_user="scott"
                   jdbc_password="tiger"
                   jdbc_mode="thin">
                   select geom from table where column < 50
    </jdbc_query>
         </theme>
    </themes>
    </map_request>
    3) This also doesn4t work ('&lt;' replaces '=' in SQL WHERE clause)
    <?xml version="1.0" standalone="yes"?>
    <map_request
    title=""
    basemap="MAP1"
    datasource="DS1"
    width="1098"
    height="648"
    bgcolor="#FFFFFF"
    antialiase="false"
    format="GIF_URL">
    <center size="73063.00272634998">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates> 376875.541941716, 7810266.276712325</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name ="PLANTIOS_MPD">
                   <jdbc_query
                   asis="true"
    spatial_column="GEOM"
                   render_style="C.PLANTIOS_MPD"
                   jdbc_host="MyServer"
                   jdbc_port="1521"
                   jdbc_sid="db01"
                   jdbc_user="scott"
                   jdbc_password="tiger"
                   jdbc_mode="thin">
                   select geom from table where column &lt; 50
    </jdbc_query>
         </theme>
    </themes>
    </map_request>
    Thanks,
    Rodrigo

  • How do u use SDO_RELATE for dynamic theme

    Hi ,
    I have line geometry. For this line geometry I have to create a buffer using SDO_GEOM.SDO_BUFFER and I have to check whether the given point geometry is with in this buffer.
    How can i do it?
    i have used buffer and SDO_RELATE but its giving error as
    "SDO_RELATE can not be used with out Spatial Index". Here my buffer is a dynamic theme.
    Is there any possibility to create index for dynamic theme?
    Thanks and Regards
    Aravindan

    Hello
    We did something familiar in a sence.
    We used an analysis based sdo_NN.
    Also therefor the spatial index is required and used.
    We created a Materialized view containing the sdo_buffered result geometry, based on additional where clauses for the base table..
    We defined a spatial index on the materialized view result table, and an additional view containing the sdo_nn operator to this materialized view result table.
    So when we changed the requirements in which geometry had to be buffered in the first step, we refreshed to materialized view. This caused the de sdo_index being updated. this way the view with the operator was actualized.
    I hope this explained a little bit the way we did this, maybe this can help you out.
    Luc

  • Mapviewer dynamic themes

    Can anyone see what I am doing wrong here? I am just trying to display locations of cities I have in my table. the base map returns with no cities defined. I can get these to plot when I use the mapdef tool and create a map with themes, but I want to create dynamic themes. Here is the code, and below that is the SQL results from running the same query in SQLplus.
    thanks in advance!
    -Scott
    &lt;?xml version="1.0" standalone="yes"?&gt;
    &lt;map_request
    title="Testing Cities"
    basemap="SOUTHWEST"
    datasource ="mvdemo"
    width="640"
    height="480"
    bgcolor="#a6cae0"
    antialiase="false"
    format="GIF_STREAM"&gt;
    &lt;center size="12"&gt;
    &lt;geoFeature&gt;
    &lt;geometricProperty&gt;
    &lt;point&gt;
    &lt;coordinates&gt;-120, 39&lt;/coordinates&gt;
    &lt;/point&gt;
    &lt;/geometricProperty&gt;
    &lt;/geoFeature&gt;
    &lt;/center&gt;
    &lt;themes&gt;
    &lt;theme name="Cities"&gt;
    &lt;jdbc_query
    datasource="mvdemo"
    spatial_column="LOCATION"
    render_style="M.EXIT 5X5"
    jdbc_srid="8307"&gt;
    select city,location from cities where state_abrv='CA'
    &lt;/jdbc_query&gt;
    &lt;/theme&gt;
    &lt;/themes&gt;
    &lt;/map_request&gt;
    Example of SQL results from above query:
    SIERRA ARMY DEPOT
    SDO_GEOMETRY(1, NULL, SDO_POINT_TYPE(-120.15, 41.361, NULL), NULL, NULL)
    MOFFET FEDERAL AIRFIELD
    SDO_GEOMETRY(1, NULL, SDO_POINT_TYPE(-122.04745, 37.41883, NULL), NULL, NULL)
    FORT BAKER
    SDO_GEOMETRY(1, NULL, SDO_POINT_TYPE(-122.49954, 37.86682, NULL), NULL, NULL)
    LOS ANGELES AIR FORCE BASE
    SDO_GEOMETRY(1, NULL, SDO_POINT_TYPE(-118.3832, 33.94609, NULL), NULL, NULL)
    NORTH ISLAND NAVAL AIR STATION
    SDO_GEOMETRY(1, NULL, SDO_POINT_TYPE(-117.20133, 32.70655, NULL), NULL, NULL)
    MIRAMAR MARINE CORPS AIR STATION
    SDO_GEOMETRY(1, NULL, SDO_POINT_TYPE(-117.14253, 32.868381, NULL), NULL, NULL)

    Hi Scott,
    it may be related with your render style. Is it stored on your database? Try to use another style, for example a marker style M.CIRCLE (if you have it stored). If you don't get the right result, then post the log information.
    Joao

  • Add dynamic theme with no query

    Is it possible to add a dynamic theme without doing a database query? I'm adding linear features to my map request dynamically and wish to do the same for themes.

    This uses a select statement but not on a database table:
        <theme name="theme1">
           <jdbc_query
             datasource="mvdemo"
             spatial_column="geom"
             render_style="C.BLUE"
            >
               select mdsys.sdo_geometry(2003, null, null,
               mdsys.sdo_elem_info_array(1, 1003, 2, 27, 2003, 1),
               mdsys.sdo_ordinate_array(25,30, 20,35, 15,30, 10,25, 15,20, 10,15,
               15,10, 20,5, 25,10, 30,15, 25,20, 30,25, 25,30,
               15,25,25,25,20,15,15,25)) geom from dual
           </jdbc_query>
         </theme>
         ...

  • Map Viewer Query Rewriting for Dynamic themes and  Materialized Views.

    Hi,
    I am usng a WMS request to render FOI points in my map.
    Internally query rewrite is happening in Mapviewer for this dynamic theme and my data points query is getting converted as
    select FROM
    ( select status, shape from MatView.MyTab where id = '3' )
    WHERE MDSYS.SDO_FILTER(shape, MDSYS.SDO_GEOMETRY(2003, 4283, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(144.948120117188,-37.8162934802451,144.950866699219,-37.8141237016045)), 'querytype=WINDOW') = 'TRUE'
    here the rewritten query is not correct and is throwing exceptions in mapviewer log
    How can I make this query to be written correctly.
    (My orginal query before rewrite is: select status,shape from MatView.MyTab where id='3' )
    I am using a materialised view : MatView is a materialized view.
    When I used normal tables, the query is re written correctly.But for this materialized view this is happening.
    How can I correct the error?
    Is this has something to do with some Spatial Indexing in Materialised view or Query Rewriting for materialized view?
    Edited by: 841309 on Mar 10, 2011 11:04 PM

    Oops!
    The Materialized view was not accessible from the schema I tried :)
    And so when I gave permissions,it formed the correct query.
    So if permission is not there,map viewer will rewrite the query in a wrong way! New information.

  • How to handle dynamically created checkboxes in JSP???

    Hello everybody,
    In a JSP page I would like to create checkbox dynamically on every
    result line (detail line), then check in some of them and finally pass the checked lines to a JSP bean which will handle them on a submit button press.
    The problem are:
    - how to index every checkbox in jsp result line in jsp page in order to avoid solutions like this:
    <input type=checkbox" name="value1">
    <input type=checkbox" name="value2">
    etc
    - how to read every checkbox to find the checked ones
    Is there anobody who has any experience from case like this?
    Please, help me.
    Best regards,
    Danny

    Hi, first off, no need to determine what has been checked or not. If the checkbox is checked, on the post, the value will be submitted as part of the request. If the checkbox is not checked, it will not be submitted (it's value will be null). Depending on what you need, I have approached this a number of different ways. One way is to name all checkboxes the same name. If you need to distinguish between two rows in the form, then in the value field for the checkbox, use some type of distinguishing factor, for example,
    <input type=checkbox name=chkName value="1:abc">
    <input type=checkbox name=chkName value="1:def">
    Now, you only have to make one call on the Servlet/JSP receiving the form post, request.getParameterValues("chkName") which will return an array of the non-null Strings that were checked.

  • Dynamic generate JNLP from JSP ?

    Hello,
    I tried to generate JNLP from JSP, but it just show the Opem/Save diakog and cannot startup the Web Start.
    I am using Tomcat-5.5.12 in WinXP + JDK1.5
    How can I dynamically generate JNLP ?
    Eric

    It will range from easy to rather difficult, depending on how hard you try...
    If you want to do the bare minimum it will require you to code up some JSPs with scriptlets, declarations, expressions, and <jsp:xxx ...> tags, have some server turn them into a servlet for you, and then determine how things like
    <%@ page isELIgnored="false" %> are handled. Things like:
    <jsp:useBean ...> <jsp:setProperty ... > should be rather easy to translate using introspection on the beans they refer to. But <jsp:import ...> and the likes may be more difficult.
    Any normal html code is just wrapped inside a out.println(...) statement. Scriptlets should have the <% %> stripped and coppied to the output. Expressions should have their <%= %> stripped and be added to the surrounding out.println...
    for example:
    <a href="<%=thePage%>">
    should become:
    out.println("<a href=\""+thePage+"\">");
    All the content should be added to a _jspservice method.  Then, things between <%! %> should be coppied to source file as methods.
    Complications come when people start to use custom tags. You will have to learn how to create a PageContext that will be available to the jsp service method.
    You should also look up the JSP/Servlet spec to see how this stuff should be done.
    It is a whole nuther can o worms if the resulting JSP is expected to compile without a server...</a>

Maybe you are looking for

  • Error when selecting a user

    Hi everyone: We have implemented SAP NetWeaver 7.0, and we defined "ABAP System" as Data Source. We've come across a strange error while selecting some particular users (clicking on user) in Netweaver under User Management -> Identity Management > Se

  • How do I create a bookmark on Adobe Reader X?

    I have a lot of Engineering reference books in .pdf format that have no bookmarks to chapters/topics. Am I able to create bookmarks on Reader X or would I need the full acrobat software? Bookmarking these documents would make life a lot easier when s

  • Error committing 1 master and 2 children in one transaction

    I have a master-detail page (where master and detail views are both tables). If I insert a new master record (without committing it) and I then try to insert two child records I receive the following error when I commit the transaction: java.sql.SQLI

  • Unknown Contact Request

    I recently received a new "Contact Request" from a name unknown to me and which I was not expecting. I checked the profile which provided no additional relevant information. Is there any danger, either directly or indirectly (getting on Spam lists, e

  • Clustered application without using EAR in WebLogic 6.0

              Hi,           Is it possible to set-up a clustered application without using EAR files in WebLogic           6.0.           Please point me to instructions for the same.           Thanks           B.Srini