MapViewer response

We're using Mapviewer 10.1.2 for our app and I'm trying to get list of themes that are currently displayed in the map so I can include them in the legend. The map response string should list all themes that have any features on the currently generated map (i'm using the URL formats so I have the responseString from the servlet) but it doesn't return me anything? Even when it generates lot of themes - it doesn't even have the themes element. Has anybody have any idea why is that?
thanks Jan
PS:
This is the generated xml response
<?xml version="1.0" encoding="UTF-8"?>
<map_response>
<map_image>
<map_content url="http://10.64.64.104:7777/mapviewer/images/omsmap144_96.png?refresh=5234959502344620123" />
<box srsName="default">
<coordinates>
1733750.0000000002,5417083.333333334 1759583.3333333333,5442916.666666667 </coordinates>
</box>
<xfm matrix="43.05555555555504 0.0 0.0 -43.05555555555504 1733750.0000000002 5442916.666666667" />
<WMTException version="1.0.0" error_code="SUCCESS">
</WMTException>
</map_image>
</map_response>

This information is now listed on the response of version 10.1.3.1.
<box srsName="default">
<coordinates></coordinates>
</box>
<themes>
<theme name="COUNTY_TH" />
</themes>
...

Similar Messages

  • Oracle Spatial Performance with 10-20.000 users

    Does anyone have any experience when Oracle Spatial is used with say 20.000 concurrent users. I am not interested in MapViewer response time, but lets say there is:
    - an app using 800 different tables each having an sdo_geometry column
    - the app is configured with different tables visible on different view scales
    - let's say an average of 40-50 tables is visible at any given time
    - some tables will have only a few records, while other can hold millions.
    - there is no client side caching
    - clients can zoom in/out pan.
    Anwers I am interested in:
    - What sort of server would be required
    - How can Oracle serve all that data (each Refresh renders the map and retrieves the data over the wire as there is no client side caching).
    - What sort of network infrastructure would be required.
    - Can clients connect to different servers and hence use load balancing or does Oracle have an automatic mechanism for that?
    Thanks in advance,
    Patrick

    Patrick, et al.
    There are lots of things one can do to improve performance in mapping environments because of a lot of the visualisation is based on "background" or read-only data. Here are some "tips":
    1. Spatially sort read-only data.
    This tip makes sure that data that is close to each other in space are next to each other on disk! Dan gave a good suggestion when he referenced Chapter 14, "Reorganize the Table Data to Minimize I/O" pp 580- 582, Pro Oracle Spatial. But just as easily one can create a table as select ... where sdo_filter() where the filtering object is an optimized rectangle across the whole of the dataset. (This is quite quick on 10g and above but much slower on earlier releases.)
    When implementing this make sure that the created table is created such that its blocks are next to each other in the tablespace. (Consider tablespace defragmentation beforehand.) Also, if the data is READ ONLY set the PCTFREE to 0 in order to pack the data up into as small a number of blocks as possible.
    2. Generalise data
    Rendering spatial data can be expensive where the data is geometrically detailed (many vertices) esp where the data is being visualised at smaller scales than it was captured at. So, if your "zoom thresholds" allow 1:10,000 data to be used at 1:100,000 then you are going to have problems. Consider pre-generalising the data (see sdo_util.simplify) before deployment. You can add multiple columns to your base table to hold this data. Be careful with polygon data because generalising polygons that share boundaries will create gaps etc as the data is more generalised. Often it is better to export the data to a GIS which can maintain the boundary relationships when generalising (say via topological relationships).
    Oracle's MapViewer has excellent on-the-fly generalisation but here one needs to be careful. Application tier caching (cf Bryan's comments) can help here a lot.
    3. Don't draw data that is sub-pixel.
    As one zooms out objects become smaller and smaller until they reach a point where the whole object can be drawn within a single pixel. If you have control over your map visualisation application you might want to consider setting the SDO_FILTER parameter "min_resolution" flag dynamically so that its value is the same as the number of meters / pixel (eg min_resolution=10). If this is set Oracle Spatial will only include spatial objects in the returned search set if one side of a geometry's MBR is greater than or equal to this value. Thus any geometries smaller than a pixel will not be returned. Very useful for large scale data being drawn at small scales and for which no selection (eg identify) is required. With Oracle MapViewer this behaviour can be set via the generalized_pixels parameter.
    3. SDO_TOLERANCE, Clean Data
    If you are querying data other than via MBR (eg find all land parcels that touch each other) then make sure that your sdo_tolerance values are appropriate. I have seen sites where data captured to 1cm had an sdo_tolerance value set to a millionth of a meter!
    A corollary to this is make sure that all your data passes validation at the chosen sdo_tolerance value before deploying to visualisation. Run sdo_geom.validate_geometry()/validate_layer()...
    4. Rtree Spatial Indexing
    At 10g and above lots of great work went in to the RTree indexing. So, make sure you are using RTrees and not QuadTrees. Also, many GIS applications create sub-optimal RTrees by not using the additional parameters available at 10g and above.
    4.1 If your table/column sdo_geometry data contains only points, lines or polygons then let the RTree indexer know (via layer_gtype) as it can implement certain optimizations based on this knowledge.
    4.2 With 10g you can set the RTree's spatial index data block use via sdo_pct_free. Consider setting this parameter to 0 if the table/column sdo_geometry data is read only.
    4.3 If a table/column is in high demand (eg it is the most commonly used table in all visualisations) you can consider loading (a part of) the RTree index into memory. Now, with the RTree indexing, the sdo_non_leaf_tbl=true parameter will split the RTree index into its leaf (contains actual rowid reference) and non-leaf (the tree built on the leaves) components. Most RTrees are built without this so only the MDRT*** secondary tables are built. But if sdo_non_leaf_tbl is set to true you will see the creation of an additional MDNT*** secondary table (for the non_leaf part of the rtree index). Now, if appropriate, the non_leaf table can be loaded into memory via the following:
    ALTER TABLE MDNT*** STORAGE(BUFFER_AREA KEEP);
    This is NOT a general panacea for all performance problems. One should investigate other options before embarking on this (cf Tom Kyte's books such as Expert Oracle Database Architecture, 9i and 10g Programming Techniques and Solutions.)
    4.4 Don't forget to check your spatial index data quality regularly. Because many sites use GIS package GUI tools to create tables, load data and index them, there is a real tendency to not check what they have done or regularly monitor the objects. Check the SDO_RTREE_QUALITY column in USER_SDO_INDEX_METADATA and look for indexes with an SDO_RTREE_QUALITY setting that is > 2. If > 2 consider rebuilding or recreating the index.
    5. The rendering engine.
    Whatever rendering engine one uses make sure you try and understand fully what it can and cannot do. AutoDesk's MapGuide is an excellent product but I have seen it simply cache table/column data and never dynamically access it. Also, I have been at one site which was running Deegree and MapViewer and MapViewer was so fast in comparison to Deegree that I was called in to find out why. I discovered that Deegree was using SDO_RELATE(... ANYINTERACT ...) for all MBR queries while MapViewer was using SDO_FILTER. Just this difference was causing some queries to perform at < 10% of the speed of MapViewer!!!!
    6. Consider "denormalising" data
    There is an old adage in databases that is "normalise for edit, denormalise for performance". When we load spatial data we often get it from suppliers in a fairly flat or normalised form. In consort with spatial sorting, consider denormalising the data via aggregations based on a rendering attribute and some sort of spatial unit. For example, if you have 1 million points stored as single points in SDO_GEOMETRY.SDO_POINT which you want to render by a single attribute containing 20 values, consider aggregating the data using this attribute AND some sort of spatial BUCKET or BIN. So, consider using SDO_AGGR_UNION coupled with Spatial Analysis and Mining package functions to GROUP the data BY <<column_name>> and a set of spatial extents.
    6. Tablespace use
    Finally, talk to your DBA in order to find out how the oracle database's physical and logical storage is organised. Is a SAN being used or SAME arranged disk arrays? Knowing this you can organise your spatial data and indexes using more effective and efficient methods that will ensure greater scalability.
    7. Network fetch
    If your rendering engine (app server) and database are on separate machines you need to investigate what sort of fetch sizes are being used when returning data from queries to the middle-tier. Fetch sizes for attribute only data rows and rows containing spatial data can be, and normally are, radically different. Accepting the default settings for these sizes could be killing you (as could the sort_area_size of the Oracle session the application server has created on the database). For example I have been informed that MapInfo Pro uses a fixed value of 25 records per fetch when communicating with Oracle. I have done some testing to show that this value can be too small for certain types of spatial data. SQL Developer's GeoRaptor uses 100 which is generally better (but this one can modify this). Most programmers accept defaults for network properties when programming in ADO/ODBC/OLEDB/JDBC: just be careful as to what is being set here. (This is one of the great strengths of ArcSDE: its TCP/IP network transport is well written, tuneable and very efficient.)
    8. Physical Format
    Finally, while Oracle's excellent MapViewer requires data its spatial data to be in Oracle, other commercial rendering engines do not. So, consider using alternate, physical file formats that are more optimal for your rendering engine. For example, Google Earth Enterprise "compiles" all the source data into an optimal format which the server then serves to Google Earth Enterprise clients. Similarly, a shapefile on local disk to the application server (with spatial indexing) may be faster that storing the data back in Oracle on a database server that is being shared with other business databases (eg Oracle financials). If you don't like this approach and want to use Oracle only consider using a dedicated Oracle XE on the application server for the data that is read only and used in most of your generated maps eg contour or drainage data.
    Just some things to think about.
    regards
    Simon

  • Mapviewer and MS ASP request/response?

    Has anyone tried to send requests to Mapviewer using an ASP?
    I have tried the code below but the Mapviewer>OMServer keeps responding with "Message:[oms] empty or null xml map request string..."
    Any advice.
    (here's the code...mind you I am not at all an ASP developer):
    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    </HEAD>
    <%
    'Put together some XML to post off
    xmlString = "<?xml version=""1.0""?>" & vbcrlf
    xmlString = xmlString & "<map_request title=""MapViewer Demonstration""" & vbcrlf
    xmlString = xmlString & "datasource=""mvdemo""" & vbcrlf
    xmlString = xmlString & "               basemap=""demo_map""" & vbcrlf
    xmlString = xmlString & "               width=""500""" & vbcrlf
    xmlString = xmlString & "               height=""375""" & vbcrlf
    xmlString = xmlString & "               bgcolor=""#a6cae0""" & vbcrlf
    xmlString = xmlString & "               antialiasing=""false""" & vbcrlf
    xmlString = xmlString & "               format=""GIF_URL"">" & vbcrlf
    xmlString = xmlString & "                    <center size=""5"" >" & vbcrlf
    xmlString = xmlString & "                         <geoFeature>" & vbcrlf
    xmlString = xmlString & "                         <geometricProperty>" & vbcrlf
    xmlString = xmlString & "                              <Point>" & vbcrlf
    xmlString = xmlString & "                              <coordinates>-122.2615, 37.5266</coordinates>" & vbcrlf
    xmlString = xmlString & "                              </Point>" & vbcrlf
    xmlString = xmlString & "                         </geometricProperty>" & vbcrlf
    xmlString = xmlString & "                         </geoFeature>" & vbcrlf
    xmlString = xmlString & "                    </center>" & vbcrlf
    xmlString = xmlString & "          </map_request>"
    'Load the XML into an XMLDOM object
    Set SendDoc = server.createobject("Microsoft.XMLDOM")
    SendDoc.ValidateOnParse= True
    SendDoc.LoadXML(xmlString)
    'Set the URL of the receiver
    sURL = "http://foo.com:8888/mapviewer/omserver"
    'Call the XML Send function (defined below)
    set NewDoc = xmlSend (sURL, SendDoc)'xmlString)
    'We receive back another XML DOM object!
    'Tell the user what happened
    response.Write "<b>XML DOC posted off:</b><br>"
    response.write SendDoc.XML & "<br>"
    response.write "<b>Target URL:</b> " & sURL & "<br>"
    response.write "<b>XML DOC Received back: </b><br>"
    response.write (NewDoc.Xml)
    private function xmlsend(url, docSubmit)
    Set poster = Server.CreateObject("MSXML2.ServerXMLHTTP")
    poster.open "POST", url, false
    poster.setRequestHeader "CONTENT_TYPE", "text/xml"
    poster.send docSubmit
    Set NewDoc = server.createobject("Microsoft.XMLDOM")
    newDoc.ValidateOnParse= True
    newDoc.LoadXML(poster.responseTEXT)
    Set XMLSend = NewDoc
    Set poster = Nothing
    end function
    %>
    </HTML>

    Hi Justin,
    If you added 'xml_request=' directly to your 'docSubmit' variable, seems that the post.send function does not like. I think you should keep your xml as it was initially, and then figure out how to add the name 'xml_request' on your request. When MapViewer receives the request, it will try to get the value associated with parameter 'xml_request' which is your XML string.
    Joao

  • MapViewer geometry theme 'mouse_click' doesn't always work in FF3

    I have code that works with IE7 but not FireFox 3 (I'm using MapViewer Ver1033p5_B080908 and an 11.1.0.6 db). I've been able to duplicate it by only slightly modifying Oracle Maps demo #5, "Theme Based FOI layer visibility". Code is shown below.
    I'm displaying two geometry themes. I need to know when the user clicks on either theme or the background. I add the themes and call setEventListener('mouse_click') for both themes and the mapview. In IE7 I get the expected result - one of the three handlers gets called depending on where I click. In FF3 (specifically 3.0.3) only the "top" theme's mouse handler is active. Cicking on the bottom theme - even when there is no overlap at all - only calls the mapview's handler. Same is true with info tooltips - they display for both themes in IE7, but only for the top theme in FF3. (http://www.navsys.com/BruceB/mapviewer.gif shows the two themes - one green, the other pink. On FF3 I never get a "hand" cursor or a tooltip over any of the pink areas, and clicking calls the mapview handler, not the theme handler.)
    Incidently if I hide the "top" theme, then the mouse clicks/tooltip work again on the other theme.
    Is this expected?
    Thanks!
    -Bruce
    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html" charset=UTF-8">
    <TITLE>Map Cache Server/Map Client</TITLE>
    <link rel="stylesheet" type="text/css" href="../t.css" />
    <script language="Javascript" src="/mapviewer/fsmc/jslib/oraclemaps.js"></script>
    <script language=javascript>
    var mapview;
    function showMap()
    var baseURL = "http://"+document.location.host+"/mapviewer";
    var mapCenterLon = -83.498
    var mapCenterLat = 31.453;
    var mapZoom = 4;
    var mpoint = MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,8307);
    mapview = new MVMapView(document.getElementById("map"), baseURL);
    mapview.addMapTileLayer(new MVMapTileLayer("mapdata.demo_map"));
    mapview.setCenter(mpoint);
    mapview.setZoomLevel(mapZoom);
    mapview.setEventListener('mouse_click',backgroundClick);
    addThemeBasedFOI();
    mapview.addNavigationPanel() ;
    mapview.display();
    function addThemeBasedFOI()
    var themebasedfoi1 = new MVThemeBasedFOI('themebasedfoi1','grim.T_121_GBOTEST_70265_F');
    themebasedfoi1.enableAutoWholeImage(true) ;
         themebasedfoi1.setEventListener('mouse_click',theme1clicked);
    mapview.addThemeBasedFOI(themebasedfoi1);
    var themebasedfoi2 = new MVThemeBasedFOI('themebasedfoi2','grim.TR_GBOTEST_86094_F');
    themebasedfoi2.setEventListener('mouse_click',theme2clicked);
    mapview.addThemeBasedFOI(themebasedfoi2);
    function setVisible(item)
    var themebasedfoi = mapview.getThemeBasedFOI(item.value);               
    themebasedfoi.setVisible(!themebasedfoi.isVisible());
    function theme1clicked(pt,foidata,me)
         alert('Tour clicked');
    function theme2clicked(pt,foidata,me)
         alert('Best clicked');
    function backgroundClick()
    alert('background click');
    </script>
    </head>
    <body onload="javascript:showMap();">
    <h3>Oracle Maps example - show/hide Theme Based FOI layers </h3>
    <ul>
    <LI ><INPUT TYPE="checkbox" value="themebasedfoi1" onclick="setVisible(this)" checked/>Show County population layer
    <LI ><INPUT TYPE="checkbox" value="themebasedfoi2" onclick="setVisible(this)" checked/>Show Customer layer
    </ul>
    <div id="map" style="left:0px;top:10px;width:100%; height:60%"></div>
    <HR/>
    </body>
    </html>

    Alan McClean has alluded to the cause of this behaviour but I think others would benefit from a full explanation because it doesn't appear to be documented. I might add that Business Objects support were no help at all on this (they suggested I had a problem with my mouse, PC or network which I don't).
    Normal response to a mouse double-click on a document name in InfoView XI3:
    The double-click action performs the default action on the right-click list. This is the option you see in bold when you right-click on a document name. The default action is 'View' document. So when you double-click on the document it opens for viewing.
    In CMC, under Applications>InfoView if you set 'Default viewing action on listing page:' to 'View the latest successful instance of the object' then the double-click behaviour changes:
    The double-click action now tries to open the latest successful instance of a document. I found that any document in my Inbox or any document with instances (e.g. scheduled report) will still open for viewing using the double-click. For any other document the double-click fails silently. I assume this is because there simply isn't a latest instance to open.
    Conclusions:
    1. Don't use the 'View the latest successful instance of the object'. I have reset my CMC setting back to 'View the object'.
    2. I think Business Objects should change the double-click behaviour so that rather than fail silently it opens the document.

  • Terrmap.jsp is not working (mapviewer 10.1.3)

    Hi I cannot seem to get the terrmap demo to work. All I get is this error:
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    Which tells me absolutely nothing.
    I created a datasource like this:
    <data-source class="com.evermind.sql.DriverManagerDataSource" name="MVDemoDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/MVDemoDS"
    connection-driver="oracle.jdbc.driver.OracleDriver" username="mvdemo" password="mvdemo"
    url="jdbc:oracle:thin:@localhost:1521:orcl"
    inactivity-timeout="30"
    />
    and restarted the oc4j
    What am I doing wrong?

    Hi Wendy,
    It seems you are creating data source in Oracle Application Server configuration file. But, data source for Oracle MapViewer should be declared in Oracle MapViewer configuration file.
    Oracle MapViewer configuration file, mapViewerConfig.xml is located in the $ORACLE_HOME/lbs/mapviewer/web/WEB-INF/conf. You should modify permanent map data source, defined in the <map_data_source>. Sample map data source declaration:
    <map_data_source name="mvdemo"
                jdbc_host="elocation.us.oracle.com"
                jdbc_sid="orcl"
                dbc_port="1521"
                dbc_user="scott"
                jdbc_password="!tiger"
                jdbc_mode="thin"
                number_of_mappers="3"
    />Also, map data sources can be managed through web based Oracle MapViewer manager.
    Regards,
    Andrejus

  • OBIEE integrated to Mapviewer , need advice from expert people in my codes

    <!--[if !mso]>
    <style>
    v\:* {behavior:url(#default#VML);}
    o\:* {behavior:url(#default#VML);}
    w\:* {behavior:url(#default#VML);}
    .shape {behavior:url(#default#VML);}
    </style>
    <![endif]--><!--[if gte mso 9]><xml>
    Normal
    0
    false
    false
    false
    MicrosoftInternetExplorer4
    </xml><![endif]--><!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if !mso]>
    <object
         classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>
    </object>
    <style>
    st1\:*{behavior:url(#ieooui) }
    </style>
    <![endif]-->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}
    </style>
    <![endif]-->
    Based on Example : [http://www.oracle.com/technology/products/mapviewer/pdf/mapviewer_obiee.pdf|blocked::http://www.oracle.com/technology/products/mapviewer/pdf/mapviewer_obiee.pdf]
    *1- Using OBIEE , I create report with two fields and it's filter on
    field Region:*
    Region , Population
    <!--[if !mso]>
    <style>
    v\:* {behavior:url(#default#VML);}
    o\:* {behavior:url(#default#VML);}
    w\:* {behavior:url(#default#VML);}
    .shape {behavior:url(#default#VML);}
    </style>
    <![endif]--><!--[if gte mso 9]><xml>
    Normal
    0
    false
    false
    false
    MicrosoftInternetExplorer4
    </xml><![endif]--><!--[if gte mso 9]><xml>
    </xml><![endif]-->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}
    </style>
    <![endif]-->
    On OBIEE Answers: Statistic Text , I wrote this codes :
    &lt;!-div id must match arg in js call at bottom of code listing --&gt;
    &lt;div id="EPAmapNode1"&gt;&lt;/div&gt;
    &lt;script&gt;
    function readCookie(name) {
    //this pulls authentication out of header
    //which replaces needing to pass user/pwd
    to authenticate (i.e. like SSO or trusted sign on)
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i &lt; ca.length;i++) {
    var c = ca;
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    return null;
    function obiee_mapint_doTheDeed(nodeId) {
    var container = document.getElementById(nodeId);
    var sid = null;
    var x = container;
    do {
    if (x.nodeName == 'TD' || x.nodeName == 'DIV') {
    sid = x.getAttribute('sid');
    if (sid != null && sid != '')
    break;
    x = x.parentNode;
    while (x != null);
    if (sid != null && sid != '') {
    // create the iframe for content
    var nid = readCookie('nQuireID')
    if (nid) {
    var iframe = document.createElement('iframe');
    iframe.src =
    'http://192.168.100.143:8991/yusufMap-ViewController-context-root/BIMapPage.html?sid='
    + encodeURIComponent(sid) + '&nqid=' + nid;
    // following nsdp is subsequently called
    from Mapviewer page
    // passing sid and nqid to get results to
    serve as nsdp data as xml
    // ps["xml_url"] = "http://"+document.location.host+"/mapviewer/_epa/obiee_nsdp_xml_direct.jsp?nqid="
    +
    // urlParamNQID + "&sid=" +
    urlParamSID;
    iframe.height = 260;
    iframe.width = 600;
    iframe.frameBorder = 0;
    iframe.marginHeight = 1;
    iframe.marginWidth = 1;
    container.appendChild(iframe);
    obiee_mapint_doTheDeed('EPAmapNode1');
    // js fn, EPAmapNode1 is id for this map in
    dashbd
    &lt;/script&gt;
    *2-Source code of
    custom JSP to convert Answers Filtered XML into NSDP XML: obiee_nsdp_xml_direct.jsp*
    &lt;%@ page
    language="java" session="true"
    isThreadSafe="true" contentType="text/html; charset=UTF-8"
    %&gt;
    &lt;%@ page
    import="javax.xml.parsers.*"%&gt;
    &lt;%@ page
    import="java.net.*"%&gt;
    &lt;%@ page
    import="java.io.*"%&gt;
    &lt;%@ page
    import="org.w3c.dom.*"%&gt;
    &lt;%
    Sample jsp code file to demonstrate one way to convert Answers xml to
    MapViewer's NSDP xml
    set the character encoding to UTF-8 prior to accessing
    data in the request
    request.setCharacterEncoding("UTF-8");
    %&gt;
    &lt;%
    // RETRIEVE THE QUERY
    STRING PARAMETERS
    String userName =
    request.getParameter("uid");
    String userPassword =
    request.getParameter("password");
    String thesid =
    request.getParameter("sid");
    String nq_id =
    request.getParameter("nqid");
    if (userName == null) {
    userName =
    "mvdemo";
    if (userPassword == null)
    userPassword =
    "mvdemo";
    Document domDoc = null;
    String fieldName = null;
    String urlString =
    "http://192.168.100.143:9704/analytics/saw.dll?Go&searchid=" +
    thesid + "&format=xml&NQId=" + nq_id;
    if (thesid != null) {
    DocumentBuilderFactory
    dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db =
    dbf.newDocumentBuilder();
    URL url = new URL(urlString);
    URLConnection
    URLconnection = url.openConnection();
    HttpURLConnection
    httpConnection = (HttpURLConnection)URLconnection;
    int responseCode =
    httpConnection.getResponseCode();
    if ( responseCode ==
    HttpURLConnection.HTTP_OK) {
    InputStream in =
    httpConnection.getInputStream();
    System.out.println("thesid=
    " + thesid);
    System.out.println("nq_id="
    + nq_id);
    System.out.println("server
    host=" + request.getRemoteHost());
    System.out.println("server
    addr=" + request.getRemoteAddr());
    domDoc = db.parse(in);
    } else {
    System.out.println(
    "HTTP connection response != HTTP_OK" );
    out.println("&lt;nsdp_xml&gt;");
    out.println("&lt;table&gt;");
    //Iterate
    through metadata object and create the ndsp_xml header
    NodeList rowDef =
    domDoc.getElementsByTagName("element");
    out.println("&lt;tr&gt;");
    out.println("&lt;th&gt;Column
    1&lt;/th&gt;&lt;th&gt;Column 2&lt;/th&gt;");
    out.println("&lt;/tr&gt;");
    //Iterate
    through rows & items and create the ndsp_xml body
    NodeList rows =
    domDoc.getElementsByTagName("R");
    if (rows != null) {
    for (int i = 0; i &lt;
    rows.getLength(); i++) {
    out.println("&lt;tr&gt;");
    Node row = rows.item(i);
    if (row == null ||
    row.getNodeType() == Node.TEXT_NODE) {
    continue;
    NodeList items =
    row.getChildNodes();
    if (items == null) {
    continue;
    for (int y = 0; y &lt; 2;
    y++) {
    Node item =
    items.item(y);
    if (item == null ||
    item.getChildNodes() == null)
    continue;
    if (item.getChildNodes()
    == null
    ||
    item.getChildNodes().item(0) == null
    || item.getNodeType()
    == Node.TEXT_NODE)
    continue;
    out.println("&lt;td&gt;"
    +
    item.getChildNodes().item(0).getNodeValue()
    + "&lt;/td&gt;");
    out.println("&lt;/tr&gt;");
    } else {
    out.println("No
    rows.");
    out.println("&lt;/table&gt;");
    out.println("&lt;/nsdp_xml&gt;");
    %&gt;
    *3- Where the source Code of map I created on HTML : BIMapPage.html*
    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
    &lt;html&gt;
    &lt;head&gt;
    &lt;meta
    http-equiv="Content-Type" content="text/html;
    charset=windows-1252"&gt;&lt;/meta&gt;
    &lt;title&gt;BI Map
    Page&lt;/title&gt;
    &lt;script
    language="Javascript" src="oraclemaps.js"&gt;&lt;/script&gt;
    &lt;script
    language="Javascript"&gt;
    var dynStatesFOI;
    function show_map(){
    var map;
    var homeCenter,
    homeZoomLevel;
    var baseURL =
    "http://192.168.100.143:9704/mapviewer";
    map = new
    MVMapView(document.getElementById("map"), baseURL);
    var mapSRID = 82364;
    var mapCenterLon = 538940.5;
    var mapCenterLat = 2690457.4;
    homeZoomLevel = 1;
    homeCenter =
    MVSdoGeometry.createPoint(mapCenterLon, mapCenterLat, mapSRID);
    map.addMapTileLayer(new MVMapTileLayer("tcg_gis.ksa_map"));
    map.setCenter(homeCenter, false);
    map.setZoomLevel(homeZoomLevel);
    map.setHomeMap(homeCenter, homeZoomLevel);
    map.addNavigationPanel("East");
    map.addScaleBar();
    dynStatesFOI = new
    MVThemeBasedFOI('dynStatesFOI','tcg_gis.KSA_POP2');
    dynStatesFOI.setRenderingStyle("C.COUNTIES");
    setupNsdp(dynStatesFOI);
    setupDynamicStyles(dynStatesFOI,250000,
    500000, 750000);
    map.addThemeBasedFOI(dynStatesFOI);
    map.display();
    function setupNsdp(dynStatesFOI)
    var nsdpInfo = new
    MVNSDP("defaultNSDP");
    nsdpInfo.setTheme("KSA_POP2"); //the base theme
    nsdpInfo.setKeyColumn("REGION_NAME");
    //'match' column in the base table of the theme
    nsdpInfo.setRenderStyle("C.COUNTIES"); //default style;
    var ps = new Object();
    {color:#ff0000}
    ps["xml_url"] ="http://192.168.100.143/mapviewer/obiee_nsdp_xml_direct.jsp?nqid=" + urlParamNQID
    + "&sid=" + urlParamSID;{color} *{color:#800000}// &lt;== Error line {color}*
    nsdpInfo.setParameters(ps);
    dynStatesFOI.setNSDP(nsdpInfo);
    //setups the dynamically created advanced
    style to
    //be used by the theme-based FOI.
    function setupDynamicStyles(dynStt,val1, val2, val3)
    var buckets = new
    Array(4);
    buckets[0] = new
    MVNumericRangedBucket(100000, val1, "C.COLOR_BLUE",
    "range1");
    buckets[1] = new
    MVNumericRangedBucket(val1, val2, "C.COLOR_GREEN", "range2");
    buckets[2] = new
    MVNumericRangedBucket(val2, val3, "C.COLOR_RED", "range3");
    buckets[3] = new
    MVNumericRangedBucket(val3, null, "C.COLOR_BROWN",
    "range4");
    var bseries = new
    MVBucketSeries("SCHEME_CUSTOM");
    bseries.setBuckets(buckets);
    var bucketSty = new
    MVBucketStyle("region_colors", bseries);
    dynStt.addStyle(bucketSty);
    dynStt.setRenderingStyle("region_colors");
    &lt;/script&gt;
    &lt;/head&gt;
    &lt;body
    onload="javascript:show_map();"&gt;
    Welcome to our Site
    Kingdom of Saudi Arabia
    Map
    &lt;div
    id="map"
    style="width:550.0px; height:500.0px; overflow:auto;
    border-color:rgb(0,0,0);"/&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    {color:#ff0000}
    The
    highlighted line above from function setupNSDP is code line for: NSDP xml
    source to call jsp that invokes java class to convert Answers filtered XML (OBIEE)
    into NSDP XML.
    Where
    its invoke two parameters : 1- urlParamNQID , 2- urlParamSID
    ps["xml_url"] =
    "http://192.168.100.143/mapviewer/obiee_nsdp_xml_direct.jsp?nqid="
    + urlParamNQID + "&sid=" + urlParamSID;
    The
    error when we run this code is: URLParamNQID is not defined ???
    does any of you can read what i wrote in my source codes and let me know what i missed in my html map code : BIMapPage.html and where or how i can get two parameters values URLParamNQID
    and {color}*{color:#ff0000}urlParamSID{color}*{color:#ff0000}?{color}

    yes i checked this site, but i still couldn't reach the answer of my challenge, in how to specify urlParamNQID and urlParamSID , how or where i can get value of these parameters or what should i pass there !?

  • Error in Running map from Jdeveloper Weblogic -MAPVIEWER-05523--06036

    Hi,
    I have deployed Mapviewer.ear on an integrated weblogic server and loaded mvdemo sample dataset into my db, and made required changes in map_data_source in mapViewerConfig.xml.
    Now, I am able to run all the demo apps and tutorial. However, when I run the map code(basic map) in a jspx from Jdeveloper, I am getting the below error in a pop-up in the browser.
    "[MVGlobalVariables.getMapCacheConfig]*MAPVIEWER-05523*:Cannot process response from MapViewer server.(MVDEMO.DEMO_MAP:MAPVIEWER-06036: MapTileServer is not read. Please try again later.)"
    In the log, error is "<CacheInstanceConfig> <loadCacheStorageDef> Invalid cache root directory:/scrtach/mvdemomaps\. Cache root directory will be set to default root directory."
    I am using Jdeveloper version 11.1.1.4.
    What could be the issue, esp when demos are running successfully on the same server.

    Ok, so the error comes cause the application is trying to get the tile layer from the server while the Mapviewer server is not ready.
    So make sure you run your application once mapviewer server is up and running.
    Now, for the problem that you get a blank page it is propably a javascript error as mapviewer gives no errors.
    I have made a mistake in the previous post in the HTML section of my code. Give it a try now.
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>testMap1</title>
    <script language="Javascript" type="text/javascript" src="/mapviewer/fsmc/jslib/oraclemaps.js"> </script>
    <script type="text/javascript">
    var basemap1 = new MVMapTileLayer("mvdemo.demo_map");
    function showMap()
    //maybe formating is taking away the plus symbols. just make sure the base url is formatted correctly
    var baseURL = "http://" + document.location.host + "/mapviewer";
    var mapCenterLon = -122.45;
    var mapCenterLat = 37.6706;
    var mpoint = MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,8307);
    var mapZoom = 5;
    var mapview = new MVMapView(document.getElementById("map"), baseURL);
    mapview.addMapTileLayer(basemap1);
    mapview.setCenter(mpoint);
    mapview.setZoomLevel(mapZoom);
    mapview.addNavigationPanel("EAST");
    mapview.display();
    </script>
    </head>
    <body onload="showMap()">
    <div id="map"
    </div>
    </body>
    </html>
    if you still get a blank page. Try using firefox with firebug and see what errors rise up in firebug. You should be able to find out what goes wrong with javascript.
    Edited by: P.T on 17 Μαϊ 2011 5:11 πμ
    Edited by: P.T on 17 Μαϊ 2011 5:15 πμ
    Edited by: P.T on 17 Μαϊ 2011 5:15 πμ

  • Java.io.FileNotFoundException: Response: '404: Not Found' for url:

    Hello,
    I am in the processing porting a J2EE based application deployed originally in OC4J to WLS. I am not changing anything as far as J2EE/Web configuration files such as web.xml. Whenever I hit the URL of the application, I am getting the below exception.
    What does usually "java.io.FileNotFoundException: Response: '404: Not Found' for url...." indicate?
    If you could please give me some pointers to narrow down the places to look, I would appreciate it.
    Thanks,
    Mustafa
    java.io.FileNotFoundException: Response: '404: Not Found' for url: 'http://cayc
    001geo1:7001/IUS_Editor/mapservlet'
    at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnectionjava:487)
    at weblogic.net.http.SOAPHttpURLConnection.getInputStream(SOAPHttpURLConection.java:37)
    at oracle.lbs.mapclient.MapViewer.getXMLResponse(MapViewer.java:6013)
    at oracle.lbs.mapclient.MapViewer.getDataSources(MapViewer.java:629)
    at gov.census.geo.maftiger.interactiveupdate.navigation.mapservlet.ISGegraphyController.getMapviewerDS(ISGeographyController.java:730)
    at gov.census.geo.maftiger.interactiveupdate.navigation.mapservlet.ISGegraphyController.doPost(ISGeographyController.java:161)
    at gov.census.geo.maftiger.interactiveupdate.navigation.mapservlet.ISGegraphyController.doGet(ISGeographyController.java:73)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.ru(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurtyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.ja
    a:300)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.ja
    a:184)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActi

    Hello,
    I was able to sort out this issue. I was comparing the web.xml and found out that the servlet-mapping was missing.
    Thanks,
    Mustafa

  • Mapviewer errorhandling

    Hi,
    is there a way to handle errors, i.e database connection issues and similar ?
    I simulated a broken database-connection by blocking out the server. When making a request, the server throws java.sql.SQLException's on the console. However, in my client, I get this response:
    <?xml version="1.0" encoding="UTF-8"?>
    <map_response>
    <map_image>
    <map_content url="http://localhost:8888/mapviewer/images/omsmap5_44.png?refresh=-1938097623516322933" />
    <box srsName="sdo:32632">
    <coordinates>586543.8605697479,6642771.753227037 587796.7852685659,6643450.6823 58752</coordinates>
    </box>
    <xfm matrix="0.8968680735991478 0.0 0.0 -0.8968680735992433 586543.8605697479 6643450.682358752" />
    <WMTException version="1.0.0" error_code="SUCCESS"></WMTException>
    </map_image>
    </map_response>
    There is no exceptions thrown on the client-side here, and I get a blue image with scalebar/legend.

    Hello user 1157569,
    you should find the mapviewer.ear in the downloaded "fmw_12.1.3.0.0_mapviewer.jar".
    Unpack the "fmw_12.1.3.0.0_mapviewer.jar" (rename to "fmw_12.1.3.0.0_mapviewer.zip" for instance)
    Go to \Disk1\stage\Components\oracle.mapviewer\12.1.3.0.0\DataFiles\
    Unpack "filegroup1.jar"
    Go to \modules\oracle.mapviewer\mapviewer.ear
    Enjoy the day
    Kind regards
    /kk

  • Using MapViewer in JSP

    Hi,
    Are there any example where we can use the methods sendXMLRequest() and getXMLResponse of the MapViewer class from a jsp page ?
    The response I got for the server using these methods are "Message:[oms] empty or null xml map request string."
    thanks

    Respect sir i m sending a code given below.sir i want to identify the map location,but my code give the some error,i could't understand what i do.becoz error are shown array out of bound index..please help me.
    Code..
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ page session="true" %>
    <%@ page import="java.util.Enumeration" %>
    <%@ page import="java.awt.geom.Point2D" %>
    <%@ page import="java.awt.Dimension" %>
    <%@ page import="oracle.lbs.mapclient.MapViewer" %>
    <html>
    <head>
    <!-- flooble Color Picker header start -->
    <script language="Javascript">
    // Color Picker Script from Flooble.com
    // For more information, visit
    // You may use and distribute this code freely, as long as
    // you keep this copyright notice and the link to flooble.com
    // if you chose to remove them, you must link to the page
    // listed above from every web page where you use the color
    // picker code.
    var perline = 9;
    var divSet = false;
    var curId;
    var colorLevels = Array('0', '3', '6', '9', 'C', 'F');
    var colorArray = Array();
    var ie = false;
    var nocolor = 'none';
         if (document.all) { ie = true; nocolor = ''; }
         function getObj(id) {
              if (ie) { return document.all[id]; }
              else {     return document.getElementById(id);     }
    function addColor(r, g, b) {
         var red = colorLevels[r];
         var green = colorLevels[g];
         var blue = colorLevels;
         addColorValue(red, green, blue);
    function addColorValue(r, g, b) {
         colorArray[colorArray.length] = '#' + r + r + g + g + b + b;
    function setColor(color) {
         var link = getObj(curId);
         var field = getObj(curId + 'field');
         var picker = getObj('colorpicker');
         field.value = color;
         if (color == '') {
              link.style.background = nocolor;
              link.style.color = nocolor;
              color = nocolor;
         } else {
              link.style.background = color;
              link.style.color = color;
         picker.style.display = 'none';
         eval(getObj(curId + 'field').title);
    function setDiv() {    
         if (!document.createElement) { return; }
    var elemDiv = document.createElement('div');
    if (typeof(elemDiv.innerHTML) != 'string') { return; }
    genColors();
    elemDiv.id = 'colorpicker';
         elemDiv.style.position = 'absolute';
    elemDiv.style.display = 'none';
    elemDiv.style.border = '#000000 1px solid';
    elemDiv.style.background = '#FFFFFF';
    elemDiv.innerHTML = '<span style="font-family:Verdana; font-size:11px;">Pick a color: '
         + '(No color)<br>'
         + getColorTable()
         + '</span>';
    document.body.appendChild(elemDiv);
    divSet = true;
    function pickColor(id) {
         if (!divSet) { setDiv(); }
         var picker = getObj('colorpicker');      
              if (id == curId && picker.style.display == 'block') {
                   picker.style.display = 'none';
                   return;
         curId = id;
         var thelink = getObj(id);
         picker.style.top = getAbsoluteOffsetTop(thelink) + 20;
         picker.style.left = getAbsoluteOffsetLeft(thelink);
         picker.style.display = 'block';
    function genColors() {
    addColorValue('0','0','0');
    addColorValue('3','3','3');
    addColorValue('6','6','6');
    addColorValue('8','8','8');
    addColorValue('9','9','9');
    addColorValue('A','A','A');
    addColorValue('C','C','C');
    addColorValue('E','E','E');
    addColorValue('F','F','F');
    for (a = 1; a < colorLevels.length; a++)
                   addColor(0,0,a);
    for (a = 1; a < colorLevels.length - 1; a++)
                   addColor(a,a,5);
    for (a = 1; a < colorLevels.length; a++)
                   addColor(0,a,0);
    for (a = 1; a < colorLevels.length - 1; a++)
                   addColor(a,5,a);
    for (a = 1; a < colorLevels.length; a++)
                   addColor(a,0,0);
    for (a = 1; a < colorLevels.length - 1; a++)
                   addColor(5,a,a);
    for (a = 1; a < colorLevels.length; a++)
                   addColor(a,a,0);
    for (a = 1; a < colorLevels.length - 1; a++)
                   addColor(5,5,a);
    for (a = 1; a < colorLevels.length; a++)
                   addColor(0,a,a);
    for (a = 1; a < colorLevels.length - 1; a++)
                   addColor(a,5,5);
    for (a = 1; a < colorLevels.length; a++)
                   addColor(a,0,a);               
    for (a = 1; a < colorLevels.length - 1; a++)
                   addColor(5,a,5);
         return colorArray;
    function getColorTable() {
    var colors = colorArray;
         var tableCode = '';
    tableCode += '<table border="0" cellspacing="1" cellpadding="1">';
    for (i = 0; i < colors.length; i++) {
    if (i % perline == 0) { tableCode += '<tr>'; }
    tableCode += '<td bgcolor="#000000"><a style="outline: 1px solid #000000; color: '
         + colors[i] + '; background: ' + colors[i] + ';font-size: 10px;" title="'
         + colors[i] + '" href="javascript:setColor(\'' + colors[i] + '\');">   </a></td>';
    if (i % perline == perline - 1) { tableCode += '</tr>'; }
    if (i % perline != 0) { tableCode += '</tr>'; }
    tableCode += '</table>';
         return tableCode;
    function relateColor(id, color) {
         var link = getObj(id);
         if (color == '') {
              link.style.background = nocolor;
              link.style.color = nocolor;
              color = nocolor;
         } else {
              link.style.background = color;
              link.style.color = color;
         eval(getObj(id + 'field').title);
    function getAbsoluteOffsetTop(obj) {
         var top = obj.offsetTop;
         var parent = obj.offsetParent;
         while (parent != document.body) {
              top += parent.offsetTop;
              parent = parent.offsetParent;
         return top;
    function getAbsoluteOffsetLeft(obj) {
         var left = obj.offsetLeft;
         var parent = obj.offsetParent;
         while (parent != document.body) {
              left += parent.offsetLeft;
              parent = parent.offsetParent;
         return left;
    function areaClicked(event, info)
    alert(info);
    </script>
         <!--
    These two DIV objects are required for the Toolbar and Info-Tip
    to work properly. Copy them as-is to your own HTML's head section.
    -->
    <style>
    #tbar_rect
    border : 1px solid red;
    height : 0px;
    left : 0px;
    position : absolute;
    top : 0px;
    visibility : hidden;
    width : 0px;
    #infotip_window
    position: absolute;
    width: 150px;
    border: 1px solid grey;
    padding: 2px;
    background-color: #DFDFDF;
    visibility: hidden;
    z-index: 100;
    </style>
         <!-- flooble Color Picker header end -->
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>
    CEA DIGITAL MAP OF INDIA
    </title>
    </head>
    <body bgcolor="#D8D1C7">
    <span style="width:100%">
         <form name=map action="try.jsp" method="get">
    <table cellpadding="0" cellspacing="0" border="0" width="100%" summary="">
    <tr><td>
    <table cellpadding="0" cellspacing="2" border="0" width="100%" summary="">
    <tr><td valign="top"></td></tr>
    <FONT color="#449922" size="+1"><b>CEA MAP</b></FONT> </td></tr>
    </table>
    </td>
    </tr>
    <tr><td valign="top">
    <table cellpadding="0" cellspacing="0" border="0" summary="">
    <tr><td align="center"><img src="/mapviewer/myicons/t.gif" border="0" /></td></tr>
    </table> </td>
    </tr>
    </table>
    <hr>
    </span>
    <!-------------------------------------------------------------------------
    Process the incoming map request
    -------------------------------------------------------------------------->
    <%
    String v1=request.getParameter("q1");
    // out.print(v1);
         String v = request.getParameter("q");
    String dataSrc = request.getParameter("datasrc-select");
         String[][] CEA = null;
    String mvURL = request.getParameter("mvurl");
    if(mvURL==null || mvURL.length()==0)
    mvURL = "http://"+ request.getServerName()+":"+request.getServerPort()+
    request.getContextPath()+"/omserver";
    // out.print(v);
         boolean newSession = false;
    // retrieve mapviewer client handle from session
    MapViewer mv = (MapViewer) session.getAttribute("gvis_mvhandle");
    if(mv==null)
    // create a new mapviewer client handle
    mv = new MapViewer(mvURL);
    mv.setImageFormat(MapViewer.FORMAT_PNG_URL);
    mv.setMapTitle(" ");
    session.setAttribute("gvis_mvhandle", mv); // keep client handle in session
    newSession = true;
    // enable only user selected themes
    String[] checkedThemes = request.getParameterValues("_mthemev_");
    if(checkedThemes!=null && checkedThemes.length>0)
    mv.enableThemes(checkedThemes);
    String action = request.getParameter("action");
    if(action==null) action = "recenter";
    String[] dataSrcList = null;
    String mapW_ = request.getParameter("map_width"), mapH_=request.getParameter("map_height");
    int mapW = 800, mapH = 500;
    try{
    mapW = Integer.parseInt(mapW_);
    mapH = Integer.parseInt(mapH_);
    }catch(Exception e){}
    mv.setDeviceSize(new Dimension(mapW, mapH));
    String aa_ = request.getParameter("map_aa");
    boolean aa = false;
    if(aa_!=null && "on".equalsIgnoreCase(aa_))
    aa = true;
    mv.setAntiAliasing(aa);
    String query1=null, stroke1="#000000", fill1=null, tr1=null, labelc1=null, asis1,
    query2=null, stroke2="#000000", fill2=null, tr2=null, labelc2=null, asis2,
    query3=null, stroke3="#000000", fill3=null, tr3=null, labelc3=null, asis3,
                   query4=null, stroke4="#000000", fill4=null, tr4=null, labelc4=null, asis4,
                   query5=null, stroke5="#000000", fill5=null, tr5=null, labelc5=null, asis5;
    //<!---------------------------------------- Query1 ------------------------------------------------------>
    //String v1=request.getParameter("v");
    //session.putValue("v1",v);
    query1 = "select geom from ";
              query1+=v;
              //query1+=",";
              // query1+="lineflow where line.fnode_=lineflow.lineid";
              //query1+=;
              //query1+=;
              //query1+=.;
              //query1+=;
              //query1+=;
              //query1+=lineflow.;
              //query1+=".";
              //query1+=lineid;
              // out.print(query1);
              // out.print(query1);
    stroke1 = request.getParameter("stroke_1");
    fill1 = request.getParameter("fill_1");
    if(stroke1==null && fill1==null)
    stroke1 = "green"; //default to black stroke
    fill2 = "green";
    tr1 = request.getParameter("tr_1");
    String l = request.getParameter("lc_1");
              // out.print(l);
              labelc1=l;
    int opacity1 = (tr1!=null && tr1.equals("on"))? 128 : -1;
    String style1 = "gvis_"+("NONE".equals(stroke1)?"" : stroke1) + "_"+
    ("NONE".equals(fill1)?"" : fill1) +
    ((opacity1>0)?"128" : "");
    asis1 = request.getParameter("asis_1");
    //<!---------------------------------------- Query2 ------------------------------------------------------>
    query2 ="select GEOM from ";
              query2+="place";
              //query2+=" where ";
              //query2+="FNODE_='"+s+"'";
              //out.print(query2);
              // query2 = request.getParameter("query_2");
    stroke2 = request.getParameter("stroke_2");
    fill2 = request.getParameter("fill_2");
    if(stroke2==null && fill2==null)
    stroke2 = "#000000";
              fill2 = "red";
    tr2 = request.getParameter("tr_2");
              String c = request.getParameter("lc_2");
              // out.print(c);
              labelc2=c;
    //labelc2 = request.getParameter("lc");
              // out.print(labelc2);
    int opacity2 = (tr2!=null && tr2.equals("on"))? 128 : -1;
    String style2 = "gvis_"+("NONE".equals(stroke2)?"" : stroke2) + "_"+
    ("NONE".equals(fill2)?"" : fill2) +
    ((opacity2>0)?"128" : "");
    asis2 = request.getParameter("asis_2");
    //<!---------------------------------------- Query3 ------------------------------------------------------>
         query3 ="select geom from ";
              query3+="bound";
    //query3 = request.getParameter("query_3");
    stroke3 = request.getParameter("stroke_3");
    fill3 = request.getParameter("fill_3");
    if(stroke3==null && fill3==null)
    stroke3 = "white";
              fill2 = "white";
    tr3 = request.getParameter("tr_3");
    labelc3 = request.getParameter("lc_3");
    int opacity3 = (tr3!=null && tr3.equals("on"))? 128 : -1;
    String style3 = "gvis_"+("NONE".equals(stroke3)?"" : stroke3) + "_"+
    ("NONE".equals(fill3)?"" : fill3) +
    ((opacity3>0)?"128" : "");
    asis3 = request.getParameter("asis_3");
    //<!---------------------------------------- Query4 ------------------------------------------------------>
    String s = request.getParameter("t");
    query4 ="select GEOM from ";
              query4+="Line";
              query4+=" where ";
              query4+="FNODE_='"+s+"'";
         //     out.print(s);
              //out.print(query4);
              // query4 = request.getParameter("query_4");
    stroke4 = request.getParameter("stroke_4");
    fill4 = request.getParameter("fill_4");
    if(stroke4==null && fill4==null)
    stroke4 = "red";
              fill4 = "red";
    tr4 = request.getParameter("tr_4");
    labelc4 = request.getParameter("lc_4");
    int opacity4 = (tr4!=null && tr4.equals("on"))? 128 : -1;
    String style4 = "gvis_"+("NONE".equals(stroke4)?"" : stroke4) + "_"+
    ("NONE".equals(fill4)?"" : fill4) +
    ((opacity4>0)?"128" : "");
    asis4 = request.getParameter("asis_4");
         //<!------------------Query5----------------------------------------------->
         query5 ="select * from ";
              query5+="place";
    //query3 = request.getParameter("query_3");
    stroke5 = request.getParameter("stroke_5");
    fill5 = request.getParameter("fill_5");
    if(stroke5==null && fill5==null)
    stroke5 = "#000000";
              fill5 = "red";
    tr5 = request.getParameter("tr_5");
    labelc5 = request.getParameter("lc_5");
              //out.print(labelc5);
    int opacity5 = (tr5!=null && tr5.equals("on"))? 128 : -1;
    String style5 = "gvis_"+("NONE".equals(stroke5)?"" : stroke5) + "_"+
    ("NONE".equals(fill5)?"" : fill5) +
    ((opacity3>0)?"128" : "");
    asis5 = request.getParameter("asis_5");
    //<!-----------------------------close----------------------------------------->
    dataSrcList = mv.getDataSources();
    // start processing the actual request
    if(!newSession && request.getParameter("userClick.x")!=null) // user clicked on map
    int x = Integer.parseInt(request.getParameter("userClick.x"));
    int y = Integer.parseInt(request.getParameter("userClick.y"));
    if(action.equals("recenter"))
    mv.pan(x,y);
    else if(action.equals("zoomin"))
    mv.zoomIn(x,y, 1.5);
    else if(action.equals("zoomout"))
    mv.zoomOut(x,y, 1.5);
              else if(action.equals("point"))
                   // mv.isClickable("theme1");
                   // mv.addPointFeature(double x,double y,null,style5,"_gvis_style_text",double[] 0);
                   // mv.getUserPoint(x,y);
    //out.println(x);
              //out.println(y);
                   else if(action.equals("id"))
    String[] columns = new String[]{"AREA","CITY","id",
                                                      "a.GEOM.sdo_point.x X",
    "a.GEOM.sdo_point.y Y",
                                                      "ANGLE"
    //out.print(columns)
    //find out the nearest office from where user clicked on the map
    CEA = mv.identify(dataSrc,
    "Place a", //which table
    columns, //which columns to identify
    "GEOM", //which geometry column
    0, //srid of the geometry column
    x,y //mouse click position on screen
    Point2D Loc = null;
    if(CEA!=null)
    String X = CEA[1][10];
    String Y = CEA[1][10];
    Loc = new Point2D.Double(Double.parseDouble(X), Double.parseDouble(Y));
              out.print(Loc);
    //mark where user clicked upon on the map with a PIN marker
    Point2D p2 = mv.getUserPoint(x,y);
    mv.addPointFeature(p2.getX(), p2.getY(), 0,
    "M.CAPTIAL", //a Pin marker style
    null, null, null);
    //add a leader line from where user clicked to the nearest office
    if(CEA!=null)
    mv.addLinearFeature(new double[]{p2.getX(), p2.getY(), Loc.getX(), Loc.getY()},0, "NEAREST_LINE_STY", null, null, false);
    /* For identifying action: use a previously generated map as backdrop
    to avoid re-rendering all the base themes.
    if(mv.getBackgroundImageURL()==null)
    mv.setBackgroundImageURL(mv.getGeneratedMapImageURL());
    String[] enabledThemes = mv.getEnabledThemes();
    mv.setAllThemesEnabled(false); //temporarily disable all themes
    mv.run(); // re-issue map request to draw the pin marker and leader line
    //simply re-enable all themes
    mv.enableThemes(enabledThemes);
    mv.removeAllPointFeatures(); // clean up the PIN marker
    mv.removeAllLinearFeatures(); // clean up the leader line as well
    else if(!newSession) // user submitted new queries
    if(mvURL!=null && mvURL.length()>0 &&
    !mv.getServiceURL().equals(mvURL))
    mv.setServiceURL(mvURL);
    if(dataSrc!=null && dataSrc.length()>0)
    mv.setDataSourceName(dataSrc);
    if(query1!=null && query1.length()>9 && !mv.styleExists(style1))
    mv.addColorStyle(style1, stroke1, fill1, opacity1, opacity1);
    if(query2!=null && query2.length()>9 && !mv.styleExists(style2))
    mv.addColorStyle(style2, stroke2, fill2, opacity2, opacity2);
    if(query3!=null && query3.length()>9 && !mv.styleExists(style3))
    mv.addColorStyle(style3, stroke3, fill3, opacity3, opacity3);
    if(query4!=null && query4.length()>9 && !mv.styleExists(style4))
    mv.addColorStyle(style4, stroke4, fill4, opacity4, opacity4);
    if(query5!=null && query5.length()>9 && !mv.styleExists(style5))
    mv.addColorStyle(style5, stroke5, fill5, opacity5, opacity5);
    //add a temporary text style for labeling
    mv.addTextStyleWithHalo("_gvis_style_text_", "PLAIN", "Serif", "12", "PLAIN", "#0000ff", 2.0);
    //mv.deleteAllThemes();
    if(query1!=null && query1.length()>9)
    String query1_ = query1;
    if(labelc1!=null && labelc1.length()>0)
    int idx1 = query1.toUpperCase().indexOf("FROM");
    int idx2 = query1.toUpperCase().indexOf(labelc1.toUpperCase());
    if(idx2>0 && idx2 < idx1){} // already in the user query
    else
    query1_ = query1.substring(0, idx1) + ", "+labelc1+" "+
    query1.substring(idx1, query1.length());
    } else
    labelc1 = null;
                   mv.addJDBCTheme(dataSrc, "theme1", query1_, null, null,
    style1, labelc1, "_gvis_style_text_", true);
    if(query2!=null && query2.length()>9)
    String query2_ = query2;
    if(labelc2!=null && labelc2.length()>0)
    int idx1 = query2.toUpperCase().indexOf("FROM");
    int idx2 = query2.toUpperCase().indexOf(labelc2.toUpperCase());
    if(idx2>0 && idx2 < idx1){} // already in the user query
    else
    query2_ = query2.substring(0, idx1) + ", "+labelc2+" "+
    query2.substring(idx1, query2.length());
    } else
    labelc2 = null;
    mv.addJDBCTheme(dataSrc, "theme2", query2_, null, null,
    style2, labelc2 , "_gvis_style_text_", true);
    if(query3!=null && query3.length()>9)
    String query3_ = query3;
    if(labelc2!=null && labelc2.length()>0)
    int idx1 = query3.toUpperCase().indexOf("FROM");
    int idx2 = query3.toUpperCase().indexOf(labelc3.toUpperCase());
    if(idx2>0 && idx2 < idx1){} // already in the user query
    else
    query3_ = query3.substring(0, idx1) + ", "+labelc3+" "+
    query3.substring(idx1, query3.length());
    } else
    labelc3 = null;
    mv.addJDBCTheme(dataSrc, "theme3", query3, null, null,
    style3, labelc3, "_gvis_style_text_", true);
    //<!------------------------------- NewTheme------------------------------------------------------------------>
    if(query4!=null && query4.length()>9)
    String query4_ = query4;
    if(labelc4!=null && labelc4.length()>0)
    int idx1 = query4.toUpperCase().indexOf("FROM");
    int idx2 = query4.toUpperCase().indexOf(labelc4.toUpperCase());
    if(idx2>0 && idx2 < idx1){} // already in the user query
    else
    query4_ = query4.substring(0, idx1) + ", "+labelc4+" "+
    query4.substring(idx1, query4.length());
    } else
    labelc4 =null ;
    mv.addJDBCTheme(dataSrc, "theme4", query4, null, null,
    style4, labelc4, "_gvis_style_text_", true);
    if(query5!=null && query5.length()>9)
    String query5_ = query5;
    if(labelc5!=null && labelc5.length()>0)
    int idx1 = query5.toUpperCase().indexOf("FROM");
    int idx2 = query5.toUpperCase().indexOf(labelc5.toUpperCase());
    if(idx2>0 && idx2 < idx1){} // already in the user query
    else
    query5_ = query5.substring(0, idx1) + ", "+labelc5+" "+
    query5.substring(idx1, query5.length());
    } else
    labelc5 =null ;
    mv.addJDBCTheme(dataSrc, "theme5", query5, null, null,
    style5, labelc5, "_gvis_style_text_", true);
    //<!--------------------------close New Theme---------------------------------->
              if(dataSrc!=null)
    try{
    mv.setFullExtent();
    mv.run();
    }catch(Exception e){out.println(e.getMessage()); }
    } //user submitted queries
    String url = mv.getGeneratedMapImageURL();
    %>
    <p><p>
    <!----------------------------------------------------------------------
    Generate the result web page with map image and controls
    ----------------------------------------------------------------------->
    <form action="try.jsp" name="Main" method="get">
    <%
    if(url!=null)
    int w = (int)mv.getDeviceSize().getWidth(), h = (int)mv.getDeviceSize().getHeight();
    %><div align="center">
    <TABLE border="0" width="<%=w%>" cellpadding=0 cellspacing=0 bgcolor="yellow">
    <TR>
    <TD width="<%=w%>" bgcolor="white">
    <input type="image" border color="yellow" bgcolor="white" border="1" SRC="<%=url%>" name="userClick" width="<%=w%>" height="<%=h%>" >
    </TD>
                   </TR>
    <tr>
    <td> Click on the map to:
    <input type="radio" name="action" value="zoomin" <%= action.equals("zoomin")?"checked":""%> ><B><img src="/mapviewer/myicons/zoomin.gif" alt="zoom in"></B>
    <input type="radio" name="action" value="recenter" <%= action.equals("recenter")?"checked":""%> ><B><img src="/mapviewer/myicons/pan.gif" alt="re-center"></B>
    <input type="radio" name="action" value="zoomout" <%= action.equals("zoomout")?"checked":""%> ><B><img src="/mapviewer/myicons/zoomout.gif" alt="zoom out"></B>
                        <input type="radio" name="action" value="point" <%= action.equals("point")?"checked":""%>
                        ><B>Point
                        </B>
                        <input type="radio" name="action" value="id" <%= action.equals("id")?"checked":""%>
                        ><B>Identy
                        </B>
    </td>
    </tr>
    <tr><td height="15"> </td></tr>
    </TABLE>
    <% }
    %>
    <table border="0" cellpadding="2" cellspacing="1">
    <tr> <td>
    <input type="hidden" name="datasrc-select" value="mvd">
         <!--<img src="/mapviewer/myicons/dbconnect.gif"><FONT COLOR="#ff0000"> Datasource: </FONT>
    <SELECT single size="1" name="datasrc-select">
    <%
    if(dataSrcList!=null)
    for (int i = 0; i < dataSrcList.length; i++)
    String selected = (dataSrcList.equals(dataSrc))? "selected " :"";
    %> <OPTION <%=selected%> value="<%=dataSrcList[i]%>"> <%=dataSrcList[i]%> </OPTION>
    <% }
    %>
    </SELECT>-->
                   <input type="hidden" name=q value="<%=v%>">  
                   <input type="hidden" name="lc_1" value="REAL">
                   <input type="hidden" name="lc_4" value="FNODE_">
    <!--map width: <input type="hidden" size="4" name="map_width" value="<%=(int)mv.getDeviceSize().getWidth()%>" >  
    height: <input type="hidden" size="4" name="map_height" value="<%=(int)mv.getDeviceSize().getHeight()%>" >--->
    <INPUT TYPE="checkbox" NAME="map_aa" <%=(mv.getAntiAliasing())?"CHECKED":""%> >AA
    </td>
    <td>ENTER THE LINE ID:
         <Input type="text" name="t"></td>
    <td> <INPUT type=submit value=loadMap> </td>
    </tr>
    </tr>
    <tr bgcolor="#ffffcc">
    <td>Line:
    <a href="javascript:pickColor('pick1097113087'); id="pick1097113087"
    style="border: 1px solid #000000; font-family:Verdana; font-size:10px;
    text-decoration: none;">   </a>
    <input id="pick1097113087field" size="7"
    type="hidden" title="color" name="stroke_1" value="<%=stroke1%>">
    <script language="javascript">relateColor('pick1097113087', getObj('pick1097113087field').value);</script>
    </td>
    <td>Fill:
    <a href="javascript:pickColor('pick1097113085'); id="pick1097113085"
    style="border: 1px solid #000000; font-family:Verdana; font-size:10px;
    text-decoration: none;">   </a>
    <input id="pick1097113085field" size="7"
    type="hidden" title="color" name="fill_1" value="<%=fill1%>">
    <script language="javascript">relateColor('pick1097113085', getObj('pick1097113085field').value);</script>
    </td>
    </tr>
         <tr >
    <td >
    </td>
    </tr>
         <tr><td><input type="hidden" name="lc_5" value=CITY></td>
    </table></div>
    </form>
         <% // display identified feature attributes if present
    if(CEA!=null && CEA.length>0)
    out.print(" <TABLE border=\"1\">\n");
    for(int i=0; i<CEA.length; i++)
    if(i==0) out.print("<TR BGCOLOR=\"#FFFF00\">");
    else out.print("<TR>\n");
    String[] row = CEA[i];
    for(int k=0; k<row.length; k++)
    out.print("<TD>"+row[k]+"</TD>");
    out.print("</TR>\n");
    out.print("</TABLE>");
    %>
    </form>
    <p>
    <P>
    <HR size="1">
    <P>
    </body>
    </html>

  • MapViewer 1.0 rc1 and Oracle Database 10g 10.1.0.2.0 Performace

    I have just loaded the MV Demo and was a little disappointed at the performance. Below, I posted a sample of database fetch/rendering times. I was wondering if this was typical since this was my first experience with Map Viewer. And if not, where can I get some information to improve performance?
    Terry
    06/09/15 08:01:43 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 16ms
    06/09/15 08:01:43 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 84145ms.
    06/09/15 08:01:43 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 0ms
    06/09/15 08:01:43 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 84300ms.
    06/09/15 08:01:43 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 16ms
    06/09/15 08:01:44 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 87443ms.
    06/09/15 08:01:44 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 0ms
    06/09/15 08:01:48 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 92155ms.
    06/09/15 08:01:48 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 0ms
    06/09/15 08:01:51 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 91921ms.
    06/09/15 08:01:51 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 16ms
    06/09/15 08:01:51 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 92186ms.
    06/09/15 08:01:51 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 16ms
    06/09/15 08:01:53 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 97024ms.
    06/09/15 08:01:53 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 93618ms.
    06/09/15 08:01:53 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 16ms
    06/09/15 08:01:53 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 15ms
    06/09/15 08:01:59 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 99739ms.
    06/09/15 08:01:59 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 15ms

    Thank for the quick reply. I was just doing a basic test to determine if Map Viewer would satisfy our target architecture and rich web client functional requirements. Everything checks out except for my lack of understanding on how to determine the best performance settings. I expect the development environment to be slower than production. Our actual production environment is many load balanced map and database servers.
    Sorry about the lack of details.
    Terry
    Here are the particulars.
    Test Application: http://localhost:8888/mapviewer/faces/fsmc/oraclemaps.jspx
    Db server: Win 2003 Enterprise Edition 2 Xeon 3GHx processors with 8 GB RAM.
    App Server Win XP Pro 2 Xeon 3Ghx processors with 1 Gb Ram.
    App Server Sart Script:
    cd C:\mv_qs\oc4j\j2ee\home
    start C:\jdk1.5.0_04\bin\java -server -Xmx384M -jar oc4j.jar
    Map Cahce Config: DEMO_MAP MVDEMO DEMO_MAP 10 true 256 256 true
    Data Source Config: mvdemo mq thin:@172.19.35.10:1521:MQ 64 100
    MapViewer Config:
    <?xml version="1.0" ?>
    <!-- This is the configuration file for Oracle9iAS MapViewer. -->
    <!-- Note: All paths are resolved relative to this directory (where
    this config file is located), unless specified as an absolute
    path name.
    -->
    <MapperConfig>
    <!-- ****************************************************************** -->
    <!-- ************************ Logging Settings ************************ -->
    <!-- ****************************************************************** -->
    <!-- Uncomment the following to modify logging. Possible values are:
    log_level = "fatal"|"error"|"warn"|"info"|"debug"|"finest"
    default: info) ;
    log_thread_name = "true" | "false" ;
    log_time = "true" | "false" ;
    one or more log_output elements.
    -->
    <!--
    <logging log_level="info" log_thread_name="false"
    log_time="true">
    <log_output name="System.err" />
    <log_output name="../log/mapviewer.log" />
    </logging>
    -->
    <!-- ****************************************************************** -->
    <!-- ********************** Map Image Settings ************************ -->
    <!-- ****************************************************************** -->
    <!-- Uncomment the following only if you want generated images to
    be stored in a different directory, or if you want to customize
    the life cycle of generated image files.
    By default, all maps are generated under
    $ORACLE_HOME/lbs/mapviewer/web/images.
    Images location-related attributes:
    file_prefix: image file prefix, default value is "omsmap"
    url: the URL at which images can be accessed. It must match the 'path'
    attribute below. Its default value is "%HOST_URL%/mapviewer/images"
    path: the corresponding path in the server where the images are
    saved; default value is "%ORACLE_HOME%/lbs/mapviewer/web/images"
    Images life cycle-related attributes:
    life: the life period of generated images, specified in minutes.
    If not specified or if the value is 0, images saved on disk will
    never be deleted.
    recycle_interval: this attribute specifies how often the recycling
    of generated map images will be performed. The unit is minute.
    The default interval (when not specified or if the value is 0)
    is 8*60, or 8 hours.
    -->
    <!--
    <save_images_at file_prefix="omsmap"
    url="http://mypc.mycorp.com:8888/mapviewer/images"
    path="../web/images"
    />
    -->
    <!-- ****************************************************************** -->
    <!-- ********************* IP Monitoring Settings ********************* -->
    <!-- ****************************************************************** -->
    <!-- Uncomment the following to enable IP filtering for administrative
    requests.
    Note:
    - Use <ips> and <ip_range> to specify which IPs (and ranges) are allowed.
    Wildcard form such as 20.* is also accepted. Use a comma-delimited
    list in <ips>.
    - Use <ips_exclude> and <ip_range_exclude> for IPs and IP ranges
    prohibited from accessing eLocation.
    - If an IP falls into both "allowed" and "prohibited" categories, it is
    prohibited.
    - If you put "*" in an <ips> element, then all IPs are allowed, except
    those specified in <ips_exclude> and <ip_range_exclude>.
    On the other hand, if you put "*" in an <ips_exclude> element, no one
    will be able to access MapViewer (regardless of whether an IP is in
    <ips> or <ip_range>).
    - You can have multiple <ips>, <ip_range>, <ips_exclude>, and
    <ip_range_exclude> elements under <ip_monitor>.
    - If no <ip_monitor> element is present in the XML configuration
    file, then no IP filtering will be performed (all allowed).
    - The way MapViewer determines if an IP is allowed is:
    if(IP filtering is not enabled) then allow;
    if(IP is in exclude-list) then not allow;
    else if(IP is in allow-list) then allow;
    else not allow;
    -->
    <!--
    <ip_monitor>
    <ips> 138.1.17.9, 138.1.17.21, 138.3.*, 20.* </ips>
    <ip_range> 24.17.1.3 - 24.17.1.20 </ip_range>
    <ips_exclude> 138.3.29.* </ips_exclude>
    <ip_range_exclude>20.22.34.1 - 20.22.34.255</ip_range_exclude>
    </ip_monitor>
    -->
    <!-- ****************************************************************** -->
    <!-- ********************** Web Proxy Setting ************************ -->
    <!-- ****************************************************************** -->
    <!-- Uncomment and modify the following to specify the Web proxy setting.
    This is only needed for passing background image URLs to
    MapViewer in map requests or for setting a logo image URL, if
    such URLs cannot be accessed without the proxy.
    -->
    <!--
    <web_proxy host="www-proxy.my_corp.com" port="80" />
    -->
    <!-- ****************************************************************** -->
    <!-- *********************** Security Configuration ******************* -->
    <!-- ****************************************************************** -->
    <!-- Here you can set various security related configurations of MapViewer.
    -->
    <security_config>
    <disable_direct_info_request> false </disable_direct_info_request>
    </security_config>
    <!-- ****************************************************************** -->
    <!-- *********************** Global Map Configuration ***************** -->
    <!-- ****************************************************************** -->
    <!-- Uncomment and modify the following to specify systemwide parameters
    for generated maps. You can specify your copyright note, map title, and
    an image to be used as a custom logo shown on maps. The logo image must
    be accessible to this MapViewer and in either GIF or JPEG format.
    Notes:
    - To disable a global note or title, specify an empty string ("") for
    the text attribute of <note> and <title> element.
    - position specifies a relative position on the map where the
    logo, note, or title will be displayed. Possible values are
    NORTH, EAST, SOUTH, WEST, NORTH_EAST, SOUTH_EAST,
    SOUTH_WEST, NORTH_WEST, and CENTER.
    - image_path specifies a file path or a URL (starts with "http://")
    for the image.
    <rendering> element attributes:
    - Local geodetic data adjustment: If allow_local_adjustment="true",
    MapViewer automatically performs local data
    "flattening" with geodetic data if the data window is less than
    3 decimal degrees. Specifically, MapViewer performs a simple
    mathematical transformation of the coordinates using a tangential
    plane at the current map request center.
    If allow_local_adjustment="false" (default), no adjustment is
    performed.
    - Automatically applies a globular map projection (geodetic data only):
    If use_globular_projection="true", MapViewer will
    apply a globular projection on the fly to geometries being displayed.
    If use_globular_projection="false" (the default), MapViewer does no map
    projection to geodetic geometries. This option has no effect on
    non-geodetic data.
    -->
    <!--
    <global_map_config>
    <note text="Copyright 2004, Oracle Corporation"
    font="sans serif"
    position="SOUTH_EAST"/>
    <title text="MapViewer Demo"
    font="Serif"
    position="NORTH" />
    <logo image_path="C:\\images\\a.gif"
    position="SOUTH_WEST" />
    <rendering allow_local_adjustment="false"
    use_globular_projection="false" />
    </global_map_config>
    -->
    <!-- ****************************************************************** -->
    <!-- ****************** Spatial Data Cache Setting ******************* -->
    <!-- ****************************************************************** -->
    <!-- Uncomment and modify the following to customize the spatial data cache
    used by MapViewer. The default is 64 MB for in-memory cache.
    To disable the cache, set max_cache_size to 0.
    max_cache_size: Maximum size of in-memory spatial cache of MapViewer.
    Size must be specified in megabytes (MB).
    report_stats: If you would like to see periodic output of cache
    statistics, set this attribute to true. The default
    is false.
    -->
    <!--
    <spatial_data_cache max_cache_size="64"
    report_stats="false"
    />
    -->
    <!-- ****************************************************************** -->
    <!-- ******************** Custom Image Renderers ********************** -->
    <!-- ****************************************************************** -->
    <!-- Uncomment and add as many custom image renderers as needed here,
    each in its own <custom_image_renderer> element. The "image_format"
    attribute specifies the format of images that are to be custom
    rendered using the class with full name specified in "impl_class".
    You are responsible for placing the implementation classes in the
    MapViewer's classpath.
    -->
    <!--
    <custom_image_renderer image_format="ECW"
    impl_class="com.my_corp.image.ECWRenderer" />
    -->
    <!-- ****************************************************************** -->
    <!-- ****************** Custom WMS Capabilities Info ****************** -->
    <!-- ****************************************************************** -->
    <!-- Uncomment and modify the following tag if you want MapViewer to
    use the following information in its getCapabilities response.
    Note: all attributes and elements of <wms_config> are optional.
    -->
    <!--
    <wms_config host="www.my_corp.com" port="80">
    <title>
    WMS 1.1 interface for Oracle Application Server 10g MapViewer
    </title>
    <abstract>
    This WMS service is provided through Oracle MapViewer.
    </abstract>
    <keyword_list>
    <keyword>bird</keyword>
    <keyword>roadrunner</keyword>
    <keyword>ambush</keyword>
    </keyword_list>
    <sdo_epsg_mapfile>
    ../config/epsg_srids.properties
    </sdo_epsg_mapfile>
    </wms_config>
    -->
    <!-- ****************************************************************** -->
    <!-- **************** Custom Non-Spatial Data Provider **************** -->
    <!-- ****************************************************************** -->
    <!-- Uncomment and add as many custom non-spatial data provider as
    needed here, each in its own <ns_data_provider> element.
    You must provide the id and full class name here. Optionally you
    can also specify any number of global parameters, which MapViewer
    will pass to the data provider implementation during initialization.
    The name and value of each parameter is interpreted only by the
    implementation.
    -->
    <!-- this is the default data provider that comes with MapViewer; please
    refer to the MapViewer User's Guide for instructions on how to use it.
    -->
    <ns_data_provider
    id="defaultNSDP"
    class="oracle.sdovis.NSDataProviderDefault"
    />
    <!-- this is a sample NS data provider with prameters:
    <ns_data_provider
    id="myProvider1" class="com.mycorp.bi.NSDataProviderImpl" >
    <parameters>
    <parameter name="myparam1" value="value1" />
    <parameter name="p2" value="v2" />
    </parameters>
    </ns_data_provider>
    -->
    <!-- ****************************************************************** -->
    <!-- ******************* Map Cache Server Setting ******************* -->
    <!-- ****************************************************************** -->
    <!-- Uncomment and modify the following to customize the map cache server.
    <cache_storage> specifies the default root directory under which the
    cached tile images are to be stored if the cache instance configuration
    does not specify the root directory for the cache instance. If the
    default root directory is not set or not valid, the default root
    direcotry will be set to be $MAPVIEWER_HOME/web/mapcache
    default_root_path: The default root directory under which the cached
    tile images are stored.
    <logging> specifies the logging options for map cache server.
    -->
    <!--
    <map_cache_server>
    <cache_storage default_root_path="/scratch/mapcachetest/"/>
    <logging log_level="finest" log_thread_name="false" log_time="true">
    <log_output name="System.err"/>
    <log_output name="../log/mapcacheserver.log"/>
    </logging>
    </map_cache_server>
    -->
    <!-- ****************************************************************** -->
    <!-- ******************** Predefined Data Sources ******************** -->
    <!-- ****************************************************************** -->
    <!-- Uncomment and modify the following to predefine one or more data
    sources.
    Note: You must precede the jdbc_password value with a '!'
    (exclamation point), so that when MapViewer starts the next
    time, it will encrypt and replace the clear text password.
    -->
    <map_data_source name="mvdemo"
    jdbc_host="172.19.35.10"
    jdbc_sid="MQ"
    jdbc_port="1521"
    jdbc_user="mq"
    jdbc_password="mq001"
    jdbc_mode="thin"
    number_of_mappers="3"
    />
    </MapperConfig>

  • Fail to load "/mapviewer/fsmc/jslib/oraclemaps.js"

    I try to see map view in OBIEE 11.1.1.5, after adding Oracle map to mapviewer.
    After clicking 'Apply' I see the following error exception:
    Fail to load "/mapviewer/fsmc/jslib/oraclemaps.js"
    When re clicking 'Apply', the report and the map are displayed correctly.
    Does anyone familiar with that error and how to make it disappear?

    Hi Sharma,
    I am planning to implement the mapviewer in obiee 11.1.1.5 version. Could you please let me know the steps involved in this. I have tried with steps mentioned in some blogs but none of it are working.
    Could you please help me on this. Waiting for your response..
    Regards,
    Sreekar Suri.

  • Firefox and Mapviewer

    Hi all,
    I am using MapViewer Ver11_1_1_B090416. In our webapp we perfrom serveral queries using binding variables in predefined MVThemeBasedFOI like this:
    var objThemebasedfoi = new MVThemeBasedFOI("dynquery", strTheme);
    objThemeBasedFOI.setQueryParameters(x1,x2);
    objMapview.addThemeBasedFOI(objThemeBasedFOI);
    My observation is that firefox does not render all FOI that correspond to the binding variables. In some cases it seems only to render those features with a minimum dimension. Features with an area less than that minimum are skipped.
    This is the Mapviewer Log for Firefox:
    FEINER: getMapper() succeeded.
    15.09.2009 10:24:20 oracle.sdovis.LoadThemeData2 run
    FEINER: LoadThemeData2 running thread: Thread-40
    15.09.2009 10:24:20 oracle.sdovis.theme.PredGeomThemeProducer loadFeaturesInWindow
    AM FEINSTEN: [ AR_GP_GEBAEUDE_BY_NUTZUNG ]: -Infinity,-Infinity,NaN,NaN
    15.09.2009 10:24:20 oracle.sdovis.theme.PredGeomThemeProducer loadFeaturesInWindow
    AM FEINSTEN: Theme query [ AR_GP_GEBAEUDE_BY_NUTZUNG ]: SELECT ID, GEOM, 'C.SPATIAL_QUERY', GEB_NR, 'T.GEBAEUDENR', 1, 'rule#0', BAUF_NR, FLAECHE, NUTZUNG, ID FROM GP_GEBAEUDE WHERE 's'='s' AND (NUTZUNG in (select column_value from table(:1)))
    15.09.2009 10:24:20 oracle.sdovis.theme.PredGeomThemeProducer loadFeaturesInWindow
    FEINER: [ AR_GP_GEBAEUDE_BY_NUTZUNG ] Fetch size: 100
    15.09.2009 10:24:20 oracle.sdovis.theme.PredGeomThemeProducer loadFeaturesInWindow
    INFO: [ AR_GP_GEBAEUDE_BY_NUTZUNG ] sql exec time: 16ms, total time loading 45 features: 31ms.
    15.09.2009 10:24:20 oracle.lbs.mapserver.core.MapperPool freeMapper
    FEINER: freeMapper() begins...
    and for MSIE
    FEINER: getMapper() succeeded.
    15.09.2009 10:26:21 oracle.sdovis.LoadThemeData2 run
    FEINER: LoadThemeData2 running thread: Thread-41
    15.09.2009 10:26:21 oracle.sdovis.theme.PredGeomThemeProducer loadFeaturesInWindow
    AM FEINSTEN: [ AR_GP_GEBAEUDE_BY_NUTZUNG ]: -Infinity,-Infinity,NaN,NaN
    15.09.2009 10:26:21 oracle.sdovis.theme.PredGeomThemeProducer loadFeaturesInWindow
    AM FEINSTEN: Theme query [ AR_GP_GEBAEUDE_BY_NUTZUNG ]: SELECT ID, GEOM, 'C.SPATIAL_QUERY', GEB_NR, 'T.GEBAEUDENR', 1, 'rule#0', BAUF_NR, FLAECHE, NUTZUNG, ID FROM GP_GEBAEUDE WHERE 's'='s' AND (NUTZUNG in (select column_value from table(:1)))
    15.09.2009 10:26:21 oracle.sdovis.theme.PredGeomThemeProducer loadFeaturesInWindow
    FEINER: [ AR_GP_GEBAEUDE_BY_NUTZUNG ] Fetch size: 100
    15.09.2009 10:26:21 oracle.sdovis.theme.PredGeomThemeProducer loadFeaturesInWindow
    INFO: [ AR_GP_GEBAEUDE_BY_NUTZUNG ] sql exec time: 16ms, total time loading 45 features: 31ms.
    15.09.2009 10:26:21 oracle.lbs.mapserver.core.MapperPool freeMapper
    FEINER: freeMapper() begins...
    As you can see in both cases 45 features are found but only IE renders all those features. Even when i call
    var arFOI = objTemaL.getFOIData();
    arFOI.length is 45 for IE but only 9 for firefox.
    Is there any solution/workaround for this?
    Regards!
    Dominik

    Hi!
    Sorry for the late response... I was out of office...
    Yes, there is a difference - see below
    Firefox
    Dec 1, 2009 11:00:48 AM oracle.lbs.foi.FOIServlet doPost
    FINEST: ---- begin FOI response ----
    {"foiarray":[{id:"601657",name:"196",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601657_9_10.png",x:2575464.23754974,y:5727936.67627708,width:9,height:10,area:"1141,1036,1142,1039,1142,1036,1141,1036",attrs:["Chemiepark","50.22","TK-Verteilerstationen","601657"]},{id:"601942",name:"9051",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601942_10_9.png",x:2575615.79627413,y:5728946.78592017,width:10,height:9,area:"1176,805,1179,806,1176,805,1176,805",attrs:["09006","110.33","TK-Verteilerstationen","601942"]},{id:"604000",name:"2521",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_604000_13_12.png",x:2575044.5120904,y:5728181.15173643,width:13,height:12,area:"1045,982,1046,985,1051,983,1050,980,1045,982,1045,982",attrs:["04204","370.57","TK-Verteilerstationen","604000"]},{id:"603549",name:"2817",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_603549_9_10.png",x:2574966.67754974,y:5728476.67592017,width:9,height:10,area:"1027,912,1028,915,1028,912,1027,912",attrs:["07204","50.99","TK-Verteilerstationen","603549"]}],attrnames:["Baufeld-Nr.","Fläche von Gebäude (m²)","Gebäudenutzung","Datenbankschlüssel"],themeMBR:[2574612.9425512175,5727734.938367478,0.0,2576424.8883674787],adjlevel:3,minx:2570478.0835822644,miny:5724622.825480397,maxx:2580559.7473364314,maxy:5732463.634162688,isWholeImg:false}
    ---- end FOI response ----IE
    Dec 1, 2009 11:02:37 AM oracle.lbs.foi.FOIServlet doPost
    FINEST: ---- begin FOI response ----
    {"foiarray":[{id:"601733",name:"2817",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601733_8_8.png",x:2574975.27918226,y:5728454.28046082,width:8,height:8,attrs:["07204","17.9","TK-Verteilerstationen","601733"]},{id:"601602",name:"182",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601602_8_8.png",x:2575698.56499853,y:5727991.60301204,width:8,height:8,attrs:["Chemiepark","15.15","TK-Verteilerstationen","601602"]},{id:"601657",name:"196",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601657_9_10.png",x:2575464.23754974,y:5727936.67627708,width:9,height:10,attrs:["Chemiepark","50.22","TK-Verteilerstationen","601657"]},{id:"601699",name:"1098",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601699_8_8.png",x:2575508.88499853,y:5727797.76464456,width:8,height:8,attrs:["Chemiepark","17.86","TK-Verteilerstationen","601699"]},{id:"601867",name:"2519",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601867_8_8.png",x:2575096.8020904,y:5728174.40627708,width:8,height:8,attrs:["04202","17.65","TK-Verteilerstationen","601867"]},{id:"601942",name:"9051",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601942_10_9.png",x:2575615.79627413,y:5728946.78592017,width:10,height:9,attrs:["09006","110.33","TK-Verteilerstationen","601942"]},{id:"601951",name:"1021",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601951_8_8.png",x:2576409.49081479,y:5728103.57301204,width:8,height:8,attrs:["11004","17.82","TK-Verteilerstationen","601951"]},{id:"601954",name:"9003A",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601954_9_9.png",x:2575677.68627413,y:5729360.25755269,width:9,height:9,attrs:["90006","76.24","TK-Verteilerstationen","601954"]},{id:"601577",name:"835",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_601577_8_8.png",x:2575900.43372292,y:5728849.73336895,width:8,height:8,attrs:["Chemiepark","20.42","TK-Verteilerstationen","601577"]},{id:"602764",name:"1179B",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_602764_8_8.png",x:2575835.16160305,y:5727748.47046082,width:8,height:8,attrs:["12008","17.67","TK-Verteilerstationen","602764"]},{id:"602246",name:"845",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_602246_8_8.png",x:2575900.30372292,y:5728838.95627708,width:8,height:8,attrs:["Chemiepark","17.85","TK-Verteilerstationen","602246"]},{id:"604000",name:"2521",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_604000_13_12.png",x:2575044.5120904,y:5728181.15173643,width:13,height:12,attrs:["04204","370.57","TK-Verteilerstationen","604000"]},{id:"602648",name:"541",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_602648_8_8.png",x:2576014.50790666,y:5728539.5488283,width:8,height:8,attrs:["04006","17.87","TK-Verteilerstationen","602648"]},{id:"602312",name:"422",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_602312_8_8.png",x:2576254.12499853,y:5728601.20173643,width:8,height:8,attrs:["04002","17.9","TK-Verteilerstationen","602312"]},{id:"603549",name:"2817",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_603549_9_10.png",x:2574966.67754974,y:5728476.67592017,width:9,height:10,attrs:["07204","50.99","TK-Verteilerstationen","603549"]},{id:"603163",name:"9003B",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_603163_7_7.png",x:2575710.40627413,y:5729348.07336895,width:7,height:7,attrs:["90006","7.01","TK-Verteilerstationen","603163"]},{id:"603827",name:"2574",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_603827_7_7.png",x:2574604.20627413,y:5728037.01464456,width:7,height:7,attrs:["Chemiepark","8.27","TK-Verteilerstationen","603827"]},{id:"603094",name:"786",gtype:"3",imgurl:"http://gon14/mapviewer/images/foi/63_t1_S0_603094_8_8.png",x:2575433.72754974,y:5728650.86464456,width:8,height:8,attrs:["07200","17.77","TK-Verteilerstationen","603094"]}],attrnames:["Baufeld-Nr.","Fläche von Gebäude (m²)","Gebäudenutzung","Datenbankschlüssel"],themeMBR:[2574612.9425512175,5727734.938367478,0.0,2576424.8883674787],adjlevel:3,minx:2571039.3893848686,miny:5724622.825480397,maxx:2579998.441533827,maxy:5732463.634162688,isWholeImg:false}
    ---- end FOI response ----

  • External Map Source Adapter - MapViewer

    <p>
    Hi
    I am developing an application using Oracle Maps of OracleMapViewer 10.1.3 using OC4J
    </p>
    <p>
    The objective of this exercise is to make use of a cache generated by a non-MapViewer solution. The cache is stored at an external location and can be accessed by sending multiple HTTP requests. For any given extent, multiple HTTP requests needs to be sent to access the individual tiles covering the given area.
    http://servername/mapname/cache?level=0&row=11&column=1
    http://servername/mapname/cache?level=0&row=11&column=2
    http://servername/mapname/cache?level=0&row=12column=1
    http://servername/mapname/cache?level=0&row=12&column=2
    The logic to identify the tiles is also available. The problem is that the getMapTileRequest(...) returns only one string and this when passed would return only one image tile. (Correct me if my understanding is wrong)
    public abstract class MapSourceAdapter
    <strong>public abstract String getMapTileRequest(TileDefinition tile);</strong>
    public byte[] getTileImageBytes(TileDefinition tile) ;
    public Properties getProperties() ;
    One option is to have a servlet at the other end that would accept the extent and zoom level and then identify the tiles. But still it is not clear as whether MapViewer will accept one response or multiple responses from the external server.
    Need some guidance in this aspect
    Regards
    Govindarajan
    </p>

    1. The mapviewer tile servlet can response to multiple tile requests simultaneously. It makes multiple calls to the getMapTileRequest method, each of which gets the URL for one tile. So if you can define the map tile layer(map cache instance) in such a way that its tiles have the same size as the external tiles, mapviewer should be able to handle the tile requests without problem. You also need to modify the XML tile layer(map cache instance) definition and add parameter "fetch_larger_tiles" to the root node and set its value to "false". Without this change, mapviewer will fetch map images that are several times larger than the actual tiles and cut them into tiles later on.
    2. With the latest patch, you can define a custom tile layer on the client side and fetch the tiles directly from the non-mapviewer tile server. Because this approach does not duplicate the tiles in mapviewer's tile cache, it is better than 1 if the non-mapviewer tile server can serve the tiles as fast as mapviewer. Demo #50 on the mapviewer tutorial page shows how to use custom tile layer.

  • Question re: MapViewer and Network Model functions

    Hi all,
    Quick question re: MapViewer and it's support for the Network Model and the shortest-path functions. If I create a base map with a network theme based on my (large) network, and then use a jdbc_network_query on the same network to do some shortest path analysis will MapViewer use the (hopefully) cached copy of the Network to calculate the shortest path? i.e can I expect good response times once the cache is warmed up?
    Thanks,
    Steve

    Hi Steve,
    MapViewer uses the Network Java library to run the shortest path algorithm. This library is independent of the MapViewer cache, and also not thread safe. So for now the network is always loaded. The load time may be reduced if the request has a MBR, but it is not the ideal solution. There is a working going on, and we hope to avoid this load in future versions.
    Thanks.

Maybe you are looking for