execution of Javascript blocks by first loading the app with google included api maps

Hello

I am a forms developer oracle and nine in the Apex. The apex is a wonderful tool for RAD. So, I'm currently developing an integrated mobile application with Google Maps features. For several days, I'm stuck on the following problem:

Demo page: https://apex.oracle.com/pls/apex/f?p=364:4931249888545:

When I run the present the first time it crashes after the registration point 'alert("2:geocoder")'; in the script. But after discount 'Page 2' is executed the script quite well.

If I then run the page/application and previously deleted the browser cache is the problem here again.

Here the implementation (one of the several hundreds of different try ):

Page1: Button 'Gopage2': redirect to page 2

Page2:

-Settings page:

File JavaScript URL: https://maps.googleapis.com/maps/API/js?v=3.exp

Function and Global Variable declaration:

function getRevLocation(){
var geocoder;
var marker;
var lat;
var lng;


alert("Start");
lat = parseFloat(48.9304902);
lng = parseFloat(8.4458497);
//lat = parseFloat($x("P6_LATITUDE").value);
//lng = parseFloat($x("P6_LONGITUDE").value);
alert (lat+"/"+lng);


var latlng = new google.maps.LatLng(lat, lng);
alert("1:latlng");


geocoder = new google.maps.Geocoder();
alert("2:geocoder");


geocoder.geocode({'latLng': latlng}, function(results, status) {
alert("3:inFunction");


  if (status == google.maps.GeocoderStatus.OK) {
    if (results[1]) {
       alert("4:StatusOK"+results[1].formatted_address);
       $s("P2_CITY",results[1].formatted_address);
    }
  } else {
     alert("6:Error");
     $s('P2_CITY',('Geocoder failed due to: ' + status));
    }
});
}

Run when the Page loads:

getRevLocation();

Help, please. I'm totally desperate.

Best regards

Halit

After many tests and learn the basics of javascript, here is the solution that works very well:

In Page settings:

URL of the file:

https://maps.googleapis.com/maps/API/js?v=3.exp&callback=initialize

Function and Global variable declaration:

var geocoder;

function initialize() {}

Geocoder = new google.maps.Geocoder ();

}

function getreo (callbackFunction) {}

var marker;

var lat;

var lng;

LAT is parseFloat (48.9304902);.

LNG is parseFloat (8.4458497);.

LAT = parseFloat ($x("P6_LATITUDE").value);

LNG = parseFloat ($x("P6_LONGITUDE").value);

var latlng = new google.maps.LatLng (lat, lng);

Geocoder.geocode ({"latLng": latlng}, {function (results, status))

If (status == google.maps.GeocoderStatus.OK) {}

If (results [1]) {}

$s("P6_CITY",results[1].formatted_address);

}

} else {}

$s ("P5_CITY", ("geocode is not right:" + status));

}

});

If (callbackFunction)

callbackFunction ();

}

Atrribute body of HTML page:

OnLoad = "Initialize () '"

In dynamic Action:

Load event of the page with javaScript Action:

getreo();

In my application logic, I implement in above the dynamic Action, get the location coordinates with the Plugin 'Oracle - get location [plug-ins] HTML5 cards'. It fills the elements P6_LATITUDE, P6_LONGITUDE, P6_LOCATIONMSG

In the next steep to get the reverse geocoding city of google. To do this, I created a second dynamic action at traffic lights after changing the value of the item p6_locationmsg went before plugin. She runs the javascript code to call getreo();

Good luck!

Halit Pan

Tags: Database

Similar Questions

  • The Adobe Desktop installation program will not load the app screen tab, all I see is the loading icon and runs continuously without ever loading. All the other tabs seem to load without any delay, only the app tab does not load. I tried to uninstall and

    The Adobe Desktop installation program will not load the app screen tab, all I see is the loading icon and runs continuously without ever loading. All the other tabs seem to load without any delay, only the app tab does not load. I tried to uninstall and reinstall the software, rebooted a couple of times and tried to activate the download of the Premier Pro via the website, but it still doesn't load in the desktop application.

    This solved the problem for me:

    Use the CC cleaning tool to resolve installation problems. CC, CS3 - CS6

  • find a block of text on the page with the name of script

    Hi all

    I need to create a script for

    find a block of text on the page with the script titled "xxx".

    and read its contents into a variable.

    The content of the text block is a number.

    Thank you

    Hello Roberto,

    Welcome to the forum,

    This is the textFrame marked on the current page.

    var myLabel = "Foo", // change to label
          myPage = app.properties.activeWindow && app.activeWindow.activePage,
          myTextFrames = myPage.textFrames.everyItem().getElements().slice(0),
          l = myTextFrames.length,
          myVariable
    
    while (l--) {
        if (myTextFrames[l].label != myLabel) continue;
        myVariable = myTextFrames[l].contents;
        break; // presuming there's only one "Foo" labeled frame on the page
        // Otherwise you'll nead an array
        }
    
    alert(myVariable)
    

    Trevor

  • HI everyone, I paid almost 10 days ago, my supcripcion to plan for all the app elements, and after u date of my latest plan, any program is runing, always appear, your time taking, is late, please by the app with my adobe ID works correctly?

    HI everyone, I paid almost 10 days ago, my supcripcion to plan for all the app elements, and after u date of my latest plan, any program is runing, always appear, your time taking, is late, please by the app with my adobe ID works correctly?

    Photoshop Elements and Premiere Elements are NOT part of the cloud... you buy a serial number, not a subscription, and you enter the serial number during installation

    If you don't want to say things, read below

    Your subscription to cloud shows correctly on your account page?

    If you have more than one email, you will be sure that you use the right Adobe ID?

    https://www.adobe.com/account.html for subscriptions on your page from Adobe

    .

    If Yes

    Some general information for a subscription of cloud

    Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work

    Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud

    -Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp

    -http://helpx.adobe.com/creative-cloud/kb/license-this-software.html

    .

    If no

    This is an open forum, Adobe support... you need Adobe personnel to help

    Adobe contact information - http://helpx.adobe.com/contact.html

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    -Select your product and what you need help with

    -Click on the blue box "still need help? Contact us. "

  • How we would use the apps with connecting them to creative cloud and it is not not a trial.

    How we would use the apps with connecting them to creative cloud and it is not not a trial.

    Log, activation, or connection errors. CS5.5 and later, Acrobat DC

    Mylenium

  • Load the page with a selected record

    I have a PHP page that is linked to a database of mySql with 2 recordets.  The first presents a simple list of records then a link to the presentation of the details of these records in a table below.  Everything works fine but the loading of the page details table is, of course, an empty shell until the user clicks on the link url in the list which loads the record in the table.

    I'd like the page to load with a recording of the sample inside so that it looks better - preferably a record at random, but if not, the first in the list.  What is the easiest way to achieve this?

    Ah ok, so it seems that the first Recordset is filtered on a certain setting? You view several records in the first Recordset in a region of repatriation? And the second table shows the details of a single record, but there should be a folder in the first Recordset. Hmmmm.  The first thing that comes to mind, is to set a variable and fill it with the ID value of the first record since the first Recordset. Then use this variable as a default in the second set. I am not sure of is this: when you fill out the variable, it will either use the first record in the game or the Recordset returns actually several records with different values for each ID, it can raise an error.

    I don't usually use the result of a recordset to filter a second, but I did - but it was only when the first Recordset returns only a single record.

  • Load the rule with the data in two columns.

    I have a SQL Interface as the source of data for my rule to load but I have two columns of data, it is possible to load them into the same rule of load?

    Published by: user5170363 on June 4, 2010 18:51

    Published by: user5170363 on June 4, 2010 19:04

    This is in addition to what Glenn says.
    Generally, we will have two types of data files.
    If we have five dimensions.

    (1) in the first five columns of data files is the names of the members and the last column data.
    The mapping is like this:
    column contains the names of the members the deposited property is a corresponding dimension name
    column contains numbers the area of the given property.

    (1) in the foucolumns files first is the member names and you have one or more columns of data
    The mapping is like this:
    column contains the names of the members the deposited property is a corresponding dimension name
    column contains numbers the property field is the names of the members of the dimension remaining problems (level 0).

    Note: To provide the missing information from the dimension, you can use header definition in the rules file.

  • Automatically loads the page with https

    Firefox will automatically load the following sites using https

    If I type in
    cgets.com

    It automatically goes to https://www.cgets.com

    If I type in
    Google.com

    It automatically goes to https://www.google.com

    Why is this and is at - it a way to stop if to do this?

    Current version of Firefox may prefer a secure connection if you have never used a secure https connection to visit the pages on a Web site.

    Try to set the Boolean browser.urlbar.autoFill false pref on the topic: config page.

    See 'Prevent Firefox to automatically complete URLs':

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".
  • Satellite A30: Error number (11122) cannot load the bitmap with recovery CD

    I have a Toshiba A30 I want to reformat with the recovery disk. I get that day then I get an error that reads:

    The error number (11122) cannot load the bitmap file. Height max = 100

    The hard drive has now been deleted and I can't sent this message to reformat.

    Can someone help me on this please.

    Hello

    Satellite A30 is quite old and I wonder what report you something like this after so long. I put t know exactly what is happening, but it will be interesting to know a few things:

    Have you noticed a similar problem before?
    Are you using the original disk or some copy?
    Is there a problem with the HARD drive?

    Please do a little bit more about these things.

  • Loading the drivers on Google Chromebox

    I am trying to load the drivers for a 4620 all-in-one to a Google Chromebox.  With the drivers, the only option I see I could use is the Linux drivers.  I just want to confirm that they will work for this unit.  Printing is not the problem I can do through this cloud, it's scanning that I'm having the problem with.  When I try to analyze, he won't see this unit.

    Thanks for any help.

    I'll send you a PM with specific instructions on how to enable this feature.

    However, I wanted you to know that it is possible that others have access to your printers IP address, and if you leave all personal information on your glass of the scanner, it is possible for these digitized or stolen information.

    For this reason, I would recommend activation of the function when it should be used, and then disable the function immediately after, as it is mainly used as a work around.

    I hope this helps!

  • Windows cannot load the driver with 10 and 31 of the code error code

    Original title: code 10 and code 31

    the audio does not work and says that it can't load the driver. the audio has stopped working after I installed a disc on the printer.

    Go to the Web site of the manufacturer of your computer laptop/computer/Sound card > drivers and downloads Section > key in your model number > look for the latest Audio from Vista drivers > download/install them.

    See you soon.

    Mick Murphy - Microsoft partner

  • Update of the app with the application loader: bundle is not valid-&gt; error CFBundleShortVersionString

    Hello

    One of my clients is trying to update their app. They created a new viewer of several question (via ver18).

    When you download this app with the application loader that they receive the following error message:

    "This package is not valid. The CFBundleShortVersionString key in the info.plist file must contain a newer version than that of the previously downloaded version.

    (see screenshot)

    During the audit, the app update was indeed a (iTunes) version number lower than that already on the app store. So I thought that was the problem, but when you select a higher version and try again error still persists.

    I couldn't really find someone on the forum who has had this problem.

    Tips are always welcome

    Thank you

    bundle-error.png

    Bart - someone from Adobe can change the version number on the viewer Builder server. Contact your Adobe representative or Gold support.

    Post edited by: Matthew Laun, deleted the reference to my direct email address. All Support Gold have access to do it now.

  • Create a script to update, to deploy, to load the data with the version 9.3.1

    Hello

    I would like to know if it is possible to run a script to run:

    -Dimensions profile (by EPMA) import
    -deploy an application (by EPMA)
    -load rule to load the data (by essbase)
    -Calculation (by essbase) script

    We use version 9.3.1

    Thanks in advance.

    Roby

    Hello

    I don't think it doesn't matter which feature of command batch for EPMA up to version 11.
    It is possible, you can try creating a regular taskflow in EPMA to import a dimension and then reploy, finally you could run a batch script that contains a maxl script to load and calculate essbase data.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Loading the App on iPad Roaming

    I have several iPads I'll roll for generic users, but does not want the applications associated with an iTunes on my own account.  Any way to install an app on the App Store without having to connect with my Apple ID for it get there?

    Create a second account iTunes for other iPads.

    --

    JJW

  • Unable to deliver the app with the Application Loader

    Hello

    I tried to download my app on the app store, that's what I got, can someone help me and tell me what I'm doing wrong?

    I have successfully downloaded another app without problem, I'm sure I missed something, but really have no idea.

    Thank you very much.

    concerning

    Edward

    Screenshot.png

    Looks like you are trying to update an existing application on the store, but the certificates used to sign your application update version did not come from the same Bundle ID already exists about direct example: If the existing application uses the bundle ID com.domain.xyz.app (can be found in iTunes Connect under your live app) during the generation of certificates make sure you select the same Bundle ID

Maybe you are looking for

  • Stream 7: Recovery Stream7

    I have not used the 7 flow tablet in a long time, because it is very buggy and didn't like it much. Then, after a year or two, I decided to reset the device in an attempt to stop the crashes and bugs. But when I went to settimgs and pressed updates a

  • With regard to iCloud library &amp; external drives

    Now I'm confused. I used to store my library on a disk outside of G but now decided to buy storage on iCloud to move my 70 GB library out there. After a few weeks finally made. Now, the question: How can I use the Photo app on my Mac without the hard

  • HP8620: Printer offline, Windows 10, worked fine until a few days ago

    I have a wired network printer, HP8620.  In the last few days, every time I turn on my laptop (HP spectrum), also connected by wire to the network printer is offline - it will not be printed. Reports HP print and utility Scan doctor that the printer

  • Initial settings

    Hi guys,. I was wondering how preset my settings when there are at least 2 options. For example: two buttons - 1) linear movement and 2) circular motion. How can I set the initial setting will be be embedded on the linear from the beginning? Thank yo

  • Remote Desktop connection logon

    I was able to use the remote desktop of Windows XP Pro. I have a computer in my living room and the other in the kitchen.  I can access computers from the other room .  What don't get me, is when using the living room computer for remote access to th