Mapviewer - common javascript

Just looking into mapviewer and wanted to add some useful functionality to my map image on a jsp. Was curious if anyone knew of our had some of the more commonly needed javascript functionality for mapping applications.
1) Coordinate display with mouse over / coordinate transformation
2) static ruler bar ( measuring stick ) or possibly a way to measure distance using two mouse clicks on the image.
3) ft/meter conversions for distance calculations and buffering.

We didn't want people to see it and wonder what they were missing out on, so we disabled it everywhere.
JS_Hide_AddReview_Button() {
    for(i=0; i //    alert(document.forms["serviceForm"].elements[i].value)
    if (document.forms["serviceForm"].elements[i].value == "Add & Review Order") {
//    alert("Found it!");
     document.forms["serviceForm"].elements[i].style.display = "none";
It is set to add the script on all forms.

Similar Messages

  • Several html widgets I created contain the javascript libraries. Is there a way to create a common javascript library that can be accessed by all my widgets? I'm trying to reduce the size of the ibook I'mm creating.

    Several html widgets I created contain the javascript libraries. Is there a way to create a common javascript library that can be accessed by all my widgets? I'm trying to reduce the size of the ibook I'm creating.

    Seen this thread?
    Can javascript libraries be shared across widgets?

  • How to add a polygon to mapviewer using Javascript API

    Hi,
    I am using JavaScript API for the MapViewer.
    Using redlining tool, my application allows user to draw polygon onto the map.
    I would like to have union, difference and intersect tools. I know the back end logic can be done using using JTS or SDO_Union, SDO_difference, and SDO_intersection. but how do i display the result polygon on the map? Note that I am not going to store the polygon in the database.
    Thanks for any ideas.

    Hi,
    If I understand well you are using Oracle Maps. User do some redlining, then you somehow makes FOI polygons. Then you get the coordinates of the polygons and send them to the back-end where you can use spatial functions and get the coordinates of the new polygon.
    You can store those coordinates in i.e. hidden input field on page (if you use JSF it is very simple) and then use JavaScript to parse them and Oracle Maps API to create new FOI polygon and add it to mapviewer object. One disadvantage of this concept is that reloading of page (submit) is necessary.
    Branislav

  • Javascript in Master Detail Form

    I have a form which has an audit_date field in the master block. In the detail block there is a closed_during_audit field which is a radio button(2 choices either yes or no). Once the user selects yes in the radio button I want to populate the next field in the detail block, which is the close_date field, with the value in the master block.
    I have tried using Javascript but I am not able to get it to work. I have embedded the code in the form test header section and the code is as follows:
    <SCRIPT LANGUAGE="JavaScript">
    function setCloseDate(form, fieldname)
    var pieces = fieldName.split(".");
    var closedatefield = new String ( pieces[0] + "." + pieces[1] + "." + "CLOSE_DATE" + "." + pieces[3] );
    var closedduringauditfield = new String ( pieces[0] + "." + pieces[1] + "." + "CLOSED_DURING_AUDIT" + "." + pieces[3] );
    var auditdatefield = new string ("AUDIT_MAINTENANCE_BACKUP.MASTER_BLOCK.AUDIT_DATE.01" );
    var auditdate = form.elements[eval(auditdatefield)].value;
    var cda = form.elements[eval(closedduringauditfield)].value;
    if (cda == "Yes" || "Y")
    form.elements[eval(closedatefield)].value = audit_date;
    </script>
    In the onChange event of the radio button I have placed the following call
    setCloseDate( this.form, this.name);
    1. How can I do this?
    2. Where would I place the code?
    Do I have to use Javascript?
    Thanks in advance

    Hi,
    You call the javascript function it should be part of the html source. You should create this javascript function in one of the additional plsql code section by using htp.p('<script language="javascript">
    You can then call this function from the javascript event handler of the radio buton. Otherwise you should create the javascript under shared components and then use it if you want it to be a common javascript.
    Thanks,
    Sharmila

  • MapViewer mouse wheel support?

    Hi all,
    I'd like to know whether MapViewer has javascript support for mouse wheel events. I would like to implement mouse wheel zooming however the api does not have an "onMouseWheel" event for a MVMapView component. Another way to do this would be to add mouse wheel support to the page, and then use "onMouseOver" and "onMouseOut" events to determine whether the cursor is over the map or not, however these events also don't seem to be supported. Any ideas would be much appreciated. Thanks.

    As it turns out their is inbuilt support for mouse wheel zooming but for some reason it doesn't appear to be included in the supplied java API documentation. This command is all that is required: mapview.setMouseWheelZoomEnabled(true)

  • JavaScript functions across the forms?

    Hello,
    We are developing set of forms using LiveCycle Designer. The forms are complex and need some involved JavaScripts. I found great feature where we can insert a script object to hold common JavaScript functions and use those anywhere in the form. However, as I need to create some 35 such forms, I was wondering if there is any way of creating a library of JavaScript functions that I can use for all the forms. I.e. I do not want to create Javascript Object per form but want to find out if I can have one JavaScript object that I can reference from all the forms?
    Thanks in advance!

    Hi Niall,
    Feeling especially lazy today, I thought I'd try asking rather than testing this to find the answer. How does updating scripts in the library work? If I have multiple forms that use a script from the Fragment Library, when I tweak the script and save it, does the tweak change the script in all the forms? If so, does this happen upon reopenning each form in Designer? (i.e. each form still has to be reopened in Designer for the tweak to happen, right?). I feel like an idiot asking, but I'm long in lazyness this miserable, damp, dreary morning in Wisconsin. Even my little dog's energy has waned today.
    Cheers,
    Stephen

  • Secure Map Rendering - Javascript API

    Hello All
    I need to apply secure mapping functionality using Mapviewer’s JavaScript based API.Is it possible using cookie ?.Can you please give an example for this?
    Thank you

    Thanks for your prompt reply
    I do following things for secure rendering a map
    1) First created a SQL package
    CREATE OR REPLACE PACKAGE BODY web_user_info
    AS
    w_name VARCHAR2 (32767);
    PROCEDURE set_user (p_name IN VARCHAR2)
    AS
    BEGIN
    insert into test(testcol) values(1);
    commit;
    w_name := LOWER (p_name);
    END;
    PROCEDURE clear_user
    AS
    BEGIN
    insert into test(testcol) values(2);
    commit;
    w_name := null;
    END;
    FUNCTION get_user
    RETURN VARCHAR2
    AS
    BEGIN
    --insert into test(testcol) values(3);
    --commit;
    RETURN w_name;
    END;
    END;
    2) Then I created a view for my spatial table .
    CREATE OR REPLACE FORCE VIEW nb_view (node_name,
    src_file,
    mi_style,
    geom,
    mv_style,
    status,
    account_mgr
    AS
    SELECT "NODE_NAME", "SRC_FILE", "MI_STYLE", "GEOM", "MV_STYLE", "STATUS",
    "ACCOUNT_MGR"
    FROM node_boundary
    WHERE account_mgr = web_user_info.get_user;
    After that I created theme *(THEME_NB)* using this view
    3) And My Mapviewer configuration settings as like below
    <map_data_source name="mvtest"
    jdbc_host="192.168.5.120"
    jdbc_sid="sbcsptl"
    jdbc_port="1521"
    jdbc_user="mvtest"
    jdbc_password="HUBA8JhmUr15xuA9gRFnvT6iXhCyYcrQ"
    jdbc_mode="thin"
    number_of_mappers="3"
    allow_jdbc_theme_based_foi="true"
    plsql_package="web_user_info"
    web_user_type="MON_USER"
    />
    4) Finally my Cookie is settings as like below
    <script language="Javascript">
    var mapview;
    var basemap1 = new MVMapTileLayer("MVTEST.TILE_NB");
    var basemap2 = new MVThemeBasedFOI('basemap2', 'MVTEST.THEME_NB');
    function showMap() {
    set_cookie ( "MON_USER", "kk" );
    var baseURL = "http://192.168.5.116:7101/mapviewer";
    var mpoint = MVSdoGeometry.createPoint(1968376.0, 770568.7, 41129);
    mapview = new MVMapView(document.getElementById("map"), baseURL);
    mapview.addMapTileLayer(basemap1);
    mapview.addThemeBasedFOI(basemap2);
    mapview.setCenter(mpoint);
    mapview.setZoomLevel(2);
    mapview.display();
    mapview.addNavigationPanel();
    function set_cookie ( name, value, secure )
    var cookie_string = name + "=" + escape ( value );
    secure="secure";
    if ( secure )
    cookie_string += "; secure";
    document.cookie = cookie_string;
    </script>
    The issue in my case, set_user and clear_user is not executed properly.
    Thank You

  • Securing mapviewer

    Hi,
    I developed an asp.net application that used to view maps stored in oracle spatial 10g using oracleAS mapviewer (Javascript).
    The problem is: when I publish the application to the internet, it’s easy for any body to copy the javascript file to his own application to connect to the mapviewer url and use our maps and themes.
    So is there any ideas about securing mapviewer to make the maps accessible through my application only or my domain? (like google maps)
    Thanks,,,

    Dear Joao,
    First of all, I would like to thank you for your quick reply.
    The section 1.8 describe the Secure Map Rendering throw an authenticated user.
    As my application is asp.net so it’s connecting to oracleAS mapviewer throw Javascript API. because of that, anybody can copy the Javascript from my application to his own one to access my maps.
    What I want is to ensure that the maps accessible through my application only that’s published on my domain? And securing the connection to mapviewer throw javascript API. like google maps.
    When you want to embed Google Maps in your own web pages. A single Maps API key is valid for a single "directory" or domain.
    [http://code.google.com/apis/maps/signup.html|http://code.google.com/apis/maps/signup.html]
    Regards,,,

  • Help with targeting contentType with javascript

    Newbie with a problem with probably a obvious answer. I am having a little trouble in the script snippet below. In the for statement, the alert returns the contentType, so I know that I have an object selected and I can access the contentType enumeration. The switch statement (the real code where I want to process the selection depending on the contentType) returns nothing. This probably has a simple answer, I just don’t know it.
        for(var theCounter = 0; theCounter < app.selection.length ; theCounter++){
              var theThing = app.selection[theCounter].contentType;
              alert (theThing);
             switch(theThing){
              case 'GRAPHIC_TYPE' :
              alert("This is a graphic.");
              break;
             case 'TEXT_TYPE':
              alert("This is text");
              break;
           }  //End switch item checking
    TIA

    Don't get confused by the repetition of the phrase "contentType".
    var theThing = app.selection[theCounter].contentType;
    Here 'contentType' is just the name of the property. It could be called 'type' or 'content' or 'ct', or anything else. But its value is a member of the enumeration type "ContentType"; in this case, "ContentType.GRAPHIC_TYPE". This, as a single unit, is a variable with the constant value "1735553140", declared somewhere inside InDesign.
    It is a common Javascript construct; you can define your own constants like this:
    var myValue = { Test1:1, Test2:2 }
    alert (myValue.Test1);
    http://jongware.mit.edu/idcs6js/index_Enum%20Suite.html lists all default enumerations in InDesign (my favourite is NothingEnum, with just one member: NothingEnum.NOTHING; it bears the concise description "Nothing.", and its numerical value 1851876449 is, written out in ASCII, "nada").

  • Mapviewer- omserver and SSL

    My goal is to set up the mapviewer to ask for a client certificate before it presents a map. I followed the instructions in the Oracle 10g Container Security Guide to set up CLIENT-CERT authentication. So far so good. I am able to get the maps through HTTPs using the mapviewer's javascript (MapView) API. However, I am unable to get a list of cached based maps on the mapviewer server using Java (MapViewer class) API. It seems to me that the client cert get lost when my code get to the omserver.
    When I initiate the following code from both jsp and servlet
    MapViewer mv = new MapViewer(omserverURL);
    I got the following error:
    javax.net.ssl.SSLHandshakeException null cert chain
    even though I can print out the cert (before the the above code) from the jsp or the servlet.
    Is there a way to pass the client cert down to the omserver in the mapviewer Java API? I cannot find a solution in the current MapViewer 11g TP 2.
    Thank you very much for your help.
    TDV

    Yes. Its not really very different but if you are copying the examples then change
    var baseURL = "http://"+document.location.host+"/mapviewer";
    to
    var baseURL = "https://"+document.location.host+"/mapviewer";
    Mike

  • Common file which contains scriptlet code...

    Hello all,
         I have around 3 webpages which use the same scriptlet code.
         Hence the code is repeated.
         Can i put the common code in a file & include the file.
         Similar to a *.js file where you can put your common javascript code.
    regards,
    Gatuam.

    Yes we can do that...Use the following include directive :
    <%@ include file="/include/include.jsp"%>

  • Open link with javascript via UIButton - Amazon widget

    Hi guys,
    I'd like to offer links to products on Amazon using the Amazon associates program, but all the links require Javascript and I dont really want to add a UIWebView just for this. Is such a thing possible?
    I'm wondering if its possible to open a link via a UIButton like this:
    [[UIApplication sharedApplication] openURL:[[NSURL alloc] initWithString:@"http://www.example.com"]];
    BUT via using an included javascript file, i.e. to make a link like the following but with a UIButton:
    <SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V 20070822/US/imfoip-20/8005/6f95d841-8a9f-4e00-9bbc-db692d4cf04f"> </SCRIPT> <NOSCRIPT>Amazon.com Widgets</NOSCRIPT>
    My favorite hero
    Thanks

    Captivate 8 introduced the common JavaScript API which gets and sets Captivate variables for both SWF and HTML5 output in the same way.  You can read more about that here:
    https://helpx.adobe.com/captivate/using/common-js-interface.html
    Another great thing about Captivate 8, is that they exposed Captivate events to JavaScript.  So, for example, you can listen for when a user submits a quiz question and execute your own JavaScript when that submit event occurs.  Not only can you listen for this event, you also get information sent to you about that event... like what the correct answer was vs. what the student chose.  What I'd recommend is that you subscribe to the following events:
    CPAPI_QUESTIONSUBMIT
    CPAPI_INTERACTIVEITEMSUBMIT
    The event data sent back from the event will give you the information you need.  Download the sample project from the article to find out how to subscribe to these events.

  • Re; Getting data from a live web site, based on geo-location.

    re; Getting data from a live web site, based on geo-location.
    Approx 4 minutes 25 seconds into this YouTube Adobe ELearning video for Common JavaScript Interface in Adobe Captivate 8, the topic of extracting data from a live web site http://api.openweathermap.org
    Is there anywhere we can download this Adobe Captivate weather ticker project? or get some more complete tutorial on setting it up?  I tried to copy some of the code shown in the video, but can't get it to work, so I suspect I'm missing something somewhere.
    I would like to try it out.
    Video Here:   https://www.youtube.com/watch?v=u1ZfG47k24k

    Could windows Firewall be stopping this geo-location weather ticker app from working? When I start Captivate 8, I get the message indicating the the firewall is blocking some features of the program. When I check the geo var it seems empty.
    Name: AdobeCaptivateWS
    It then refers to some temp folder such as
    Path: C:\users\{username}\appdata\local\temp\cp3320604394session\cptrustfolder3320604659\adobec aptivatews
    Network Location: Public, private, domain networks
    etc...

  • How  to import styleSheet.css file in to my jsp page.

    Hi All,
    I am importing css file and other common javascript functions using the below code
    <style type="text/css" title="currentStyle">
    @import "/<some project Folder>/styleSheet.css";          
    </style>
    <script language="JavaScript" src="<%=request.getContextPath() %>/scripts/common.js">
    previously it was working but now i migrated my code with JDK1.5 to JDK 1.6 and Tomcat 5.xx to Tomcat 6.xx
    Now i am unable import these files.
    And also i am unable to see the pictures also.
    When i see the properties of the image it was giving
    http://localhost:8080/FRSWebsite/images/lock.png and it was correct path for that image but it was not displaying in my web page.
    What is the problem please anybody help me.
    Thanks in advance

    Hey I am facing a similar problem:
    I have this jar file lbswebservice.jar that I have to use for my application.
    I added it to the classpath, I copied it in my WEB-INF/lib folder, but when I try to access classes in this package, it doesnt work.
    For example the jar contains the package com.blipsystems.lbs.ws.messages.* ; that contains different classes, like the Campaign class.
    I tried to use this class (just to create an object) in different context (through jsp, or just through java test classes), but it never works, i get the error: com.blipsystems.lbs.ws.messages.Campaign cannot be resolved to a type
    I am a bit desperate here...

  • Z-index, make it work with MVThemeBasedFOI and MVFOI

    Hello, I'm using MapViewer with javascript library OracleMaps.js(Ver11_B091229). I'm using circles drawn with the MVCircleTool and some layers using MVThemeBasedFOI.
    Circle :
    * circle drawn event handler
    function circleDone()
         var geom = circleTool[nbrCircle-1].getCircle();
         highlightSelection(geom, true);
         circleTool[nbrCircle-1].getCircleFOI().setClickable(true);
         circleTool[nbrCircle-1].getCircleFOI().attachEventListener(MVEvent.MOUSE_RIGHT_CLICK, rClickCircleFOI);
         circleTool[nbrCircle-1].getCircleFOI().setZIndex(999);
    As you can see I have a right click event on it(used for contextmenu).
    ThemeBasedFOI :
    function addThemeBasedFOI(themeview, maxWholeImgLvl, minClickZoomLvl, clickable)
         var themeBasedFoi = new MVThemeBasedFOI(themeview,themeview);     
         if(clickable==true)
              themeBasedFoi.setClickable(true);
              arrayThemes[cptTheme]=themeBasedFoi.getLayerName();
              themeBasedFoi.attachEventListener(MVEvent.MOUSE_CLICK, foiMouseClickEvent);
              themeBasedFoi.attachEventListener(MVEvent.MOUSE_RIGHT_CLICK, mouseRightClickFOI);
    mapview.addThemeBasedFOI(themeBasedFoi);
         //set zoomlevel click and whole img level
         themeBasedFoi.setMinClickableZoomLevel(maxWholeImgLvl);
    themeBasedFoi.setMaxWholeImageLevel(minClickZoomLvl);
         cptTheme++;
    Things work fine individually but together, the MVThemeBasedFOI is over the Circle(it's an MVFOI).
    MVThemeBasedFOI index can be changed(if it works) with the MVMapView's method setThemeIndex(MVThemeBasedFOI, index). On its side MVFOI index can be changed by setZIndex(idx) method.
    I tried 999(the maximum value) for the circle and 1 for the layer but it changed nothing, the layer is still over the circle. Layer index doesnt work the same as usual zindex(if you see code of OracleMaps.js it's seems to be index*2+130), if index is 1 it should be(if i'm correct) 132, it's under 999 but it does not work.
    Any idea on how I can make it work ?

    yes that true, changing it later will be problematic. But if we have the break points already figured out and design finalized we just then have to open it in Muse and then add the features that muse has like scrolling effects and such. life would have been really simpler if that media query handle feature from EdgeReflow is placed in Muse. On the other hand i don't mind if reflow has the scroll effects and all the cool things Muse has. Its possible to do a really nice responsive website with reflow and edge animate and then polish your site with dreamweaver and publish it to BC. Just that i like the features of Muse and the ease of designing but it lacks the true responsiveness we need, i know you can give full width and try make it look like responsive and then you have 2 more websites to finish, the mobile and tablet versions of the website. So its a lot of work, it doesn't really make it easy to keep up with this evolving web design industry. So i think i will stick with edge reflow, dreamweaver and edge animate till Muse becomes responsive fully.

Maybe you are looking for

  • Logical databse in repeat

    Hi I call in loop logical database by FM LDB_PROCESS in different parameters but only first step is return ok next return error subrc = 1 LDB_NOT_REENTRANT How to init this calling in second step?

  • How can I get Adobe Shockplayer and Flashplayer to work?

    Yesterday I had a problem with a program that I installed.  My pc wouldn't open Windows any longer.  So I chose F8 > Last known configuration that worked.  That fixed the problem but Adobe Flashplayer and Shockwave Player stopped working.  I get a bl

  • Can I change the database Listener name in 11.5.10.2

    Hi Hussen Is it possible to change the Listener name and port on database node. My Application is of 4 node env. 2 rac database nodes 2 shared application tier nodes. My requirement is to change the Database node listener name and port. Thanks reddy

  • Junk Mail, Pushing messages, and a mystery icon

    1) Is there a junk mail filter? the Junk filter works so well on the iMac, I'd love to have one on my iTouch. 2) Is there a way to limit the dates of messages that are loaded onto the device? If I've been working at the office and haven't used the iP

  • With no DVD drive on my new Mac Pro what is the alternative

    I'm not really sure if I will ever need a DVD drive but if I did? What is the best solution on a Mac Pro Retina notebook?