How to use Oracle Map in ADF Application

Advanced Oracle ADF 12c Course Students Asked Features
23 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€67.24
List Price:  €96.07
You save:  €28.82
£55.68
List Price:  £79.55
You save:  £23.86
CA$100.66
List Price:  CA$143.82
You save:  CA$43.15
A$111.82
List Price:  A$159.75
You save:  A$47.93
S$94.88
List Price:  S$135.55
You save:  S$40.66
HK$543.79
List Price:  HK$776.87
You save:  HK$233.08
CHF 62.67
List Price:  CHF 89.54
You save:  CHF 26.86
NOK kr792.28
List Price:  NOK kr1,131.89
You save:  NOK kr339.60
DKK kr501.55
List Price:  DKK kr716.53
You save:  DKK kr214.98
NZ$123.71
List Price:  NZ$176.74
You save:  NZ$53.02
د.إ257.07
List Price:  د.إ367.25
You save:  د.إ110.18
৳8,328.16
List Price:  ৳11,897.89
You save:  ৳3,569.72
₹5,958.01
List Price:  ₹8,511.81
You save:  ₹2,553.80
RM314.25
List Price:  RM448.95
You save:  RM134.70
₦108,236.03
List Price:  ₦154,629.53
You save:  ₦46,393.50
₨19,398.69
List Price:  ₨27,713.60
You save:  ₨8,314.91
฿2,394.21
List Price:  ฿3,420.45
You save:  ฿1,026.24
₺2,465.01
List Price:  ₺3,521.60
You save:  ₺1,056.58
B$426.13
List Price:  B$608.79
You save:  B$182.65
R1,290
List Price:  R1,842.93
You save:  R552.93
Лв131.30
List Price:  Лв187.58
You save:  Лв56.28
₩101,582.03
List Price:  ₩145,123.41
You save:  ₩43,541.37
₪254.54
List Price:  ₪363.65
You save:  ₪109.10
₱4,098.92
List Price:  ₱5,855.86
You save:  ₱1,756.93
¥10,967.38
List Price:  ¥15,668.35
You save:  ¥4,700.97
MX$1,406.50
List Price:  MX$2,009.38
You save:  MX$602.87
QR254.06
List Price:  QR362.96
You save:  QR108.89
P963.25
List Price:  P1,376.14
You save:  P412.88
KSh9,053.20
List Price:  KSh12,933.70
You save:  KSh3,880.50
E£3,568.78
List Price:  E£5,098.48
You save:  E£1,529.69
ብር8,687.63
List Price:  ብር12,411.43
You save:  ብር3,723.80
Kz64,250.82
List Price:  Kz91,790.82
You save:  Kz27,540
CLP$69,297.02
List Price:  CLP$99,000
You save:  CLP$29,702.97
CN¥510.87
List Price:  CN¥729.84
You save:  CN¥218.97
RD$4,243.89
List Price:  RD$6,062.96
You save:  RD$1,819.07
DA9,435.69
List Price:  DA13,480.14
You save:  DA4,044.44
FJ$162.05
List Price:  FJ$231.51
You save:  FJ$69.46
Q536.99
List Price:  Q767.16
You save:  Q230.17
GY$14,580.66
List Price:  GY$20,830.41
You save:  GY$6,249.74
ISK kr9,757.30
List Price:  ISK kr13,939.60
You save:  ISK kr4,182.30
DH701.41
List Price:  DH1,002.06
You save:  DH300.64
L1,291.33
List Price:  L1,844.84
You save:  L553.50
ден4,135.36
List Price:  ден5,907.91
You save:  ден1,772.55
MOP$557.92
List Price:  MOP$797.07
You save:  MOP$239.14
N$1,283.07
List Price:  N$1,833.03
You save:  N$549.96
C$2,564.57
List Price:  C$3,663.83
You save:  C$1,099.26
रु9,479.94
List Price:  रु13,543.35
You save:  रु4,063.41
S/259.51
List Price:  S/370.75
You save:  S/111.23
K282.61
List Price:  K403.75
You save:  K121.13
SAR262.99
List Price:  SAR375.71
You save:  SAR112.72
ZK1,928.73
List Price:  ZK2,755.44
You save:  ZK826.71
L334.62
List Price:  L478.06
You save:  L143.43
Kč1,690.23
List Price:  Kč2,414.72
You save:  Kč724.49
Ft27,882.67
List Price:  Ft39,834.10
You save:  Ft11,951.42
SEK kr772.23
List Price:  SEK kr1,103.23
You save:  SEK kr331
ARS$71,547.27
List Price:  ARS$102,214.77
You save:  ARS$30,667.50
Bs481.59
List Price:  Bs688.02
You save:  Bs206.42
COP$305,890.51
List Price:  COP$437,005.17
You save:  COP$131,114.66
₡35,162.35
List Price:  ₡50,234.08
You save:  ₡15,071.73
L1,769.11
List Price:  L2,527.41
You save:  L758.30
₲543,432.39
List Price:  ₲776,365.26
You save:  ₲232,932.87
$U3,131.93
List Price:  $U4,474.38
You save:  $U1,342.44
zł286.59
List Price:  zł409.44
You save:  zł122.84
Already have an account? Log In

Transcript

Hello, one of students asked me how he can use Oracle map in ADF application. So in this lecture, I will show you how you can use Oracle map to display buoyant in the map, which is please the location of a specific department. And once the user permissions appointment, he should see some information. So if you have a look in the HR database, you will find here, the department's has a location ID. And this location ID has some information about which is a location. But to display a point in a baby map you have you should have a coordinate x and y.

So, in the location table, I will add two more column one is location x location y. You can find the script to add this to column attach it to the lecture here. I will create A new column called location underscore x and it should be number location underscore y and it should be not. Okay. So I have added this two column in the location tip let's now create a new application if application can see Oracle Application knickers okay. You table this Select is sure.

Okay. An entity we need department and you will need location. This is a view object. Okay now I need a view object, which has this location now as view object which has x location x and y, location x and y. And here is the department. So I need one view object which display the department information department ID department manager and instead of location ID I need to get a location x location y and all informations location likes three posts city information, how I can do this.

Now as I as you can see here the department has only location ID which should map to this location ID, but I need to get all this information here in the same department view. There are multiple way you can do this you can add like a transient attribute and in the select the SQL you can select the statement or generic Java class and from the guitar of this transit attribute to contract SELECT statement which would get all this information. But there are easy way without writing any code writing any SQL SQL statement you can create a view object which is based on to view of your entity object sorry, you have department entity, you have a location and associate Between divorcement and location. So, I will create here a new view object. This view object should be based on two entity objects. So I can say here depart mints and look a shin view and it will be based on entity but is the entity I will select the post department and the location both but how the robot will generate the SQL statement it will generate SQL statement based on the association which is created between department and location.

You will see the query after generates this view object. The department will be updatable user updated location will not be updatable. If you need the location to be updatable. You can select updatable option, but for now, we don't want to make any updatable so I will keep it as it is. Nick is here you You will decide which attribute you want to display or need to display, the department ID department name plus i can display patient ID, city, street address, postcode, and of course we need occasion x and occasion y z chord. So this view object now will have the department information blas the location information.

Biggest, biggest, biggest, biggest finish. So let's have a look into the query of this. You will find here it's select the department name, Id location all what we need from departments and the location where location department location ID equal location. This is the association or the link between both tables. So now I have one view object which will display my department and X and Y for each department, I need to create a PDF application Sorry, I need to create a page This page has split into site one which displays all departments and here in the left hand side or the right hand side will be a map which will displays the location of Studies Department on the map Okay, so, let us just go to application module data model and shuttled this department and the location so, that they can use it in the view layer.

Okay. So, this is what we need from the model layer now, here in the view layer, let us create a new page can call this page map make it blank page So in this page, I will add benilde splitter okay maybe here 600 the first one I need to display is the department and to location view as a table read only table and you can just display okay all information exists Okay, here is a table and let us add here just been in group which we will add map inside the row. Okay I will drag the same for you and they will select to hear you metric map, map and buoyancy we need to splay map and pointy here to display a map in your application you have to connect to the map server. So, should be a server this server has all the information related to the locations a coordinate and so on.

So, this server already exists in the Oracle site. So I will create here a map configuration here or you can write any ID map viewer ID. I will generate here map view or ID URL here you can call it Oracle map for example, and here is there is a URL endpoint which should point to the Oracle map server. It should be HTTP IE location to oracle.com Home slash map viewer This is the entry point to the Oracle map viewer server just this connection it is successful and I will press OK. Here you select your Oracle password. So this is your configuration let us press OK and see now it bring here you map you can see that x and y and the level of zoom which level of zoom you want to initially display.

So here we can configure this later. Okay, now I will press ok this is our scene here I need to display the point using x&y so I will select x&y here x I will select location x, y, I will select location y, here is the label if you want to display the birth mint as a label and department name as a date okay. So, this is how you can configure the Oracle map component and how you can set x and y which you already defined the view object into as a longitude and latitude. So your view object should have x and y values which will be able to pick it here and I will press OK. So this is my map. There are some configuration on the map we will do but before going and running this we need to sit Zed location x&y data here.

Some x&y Here we need to set it here so that you can see some point on the map. So what I will do now I will go to the Google map now and I will pick some location. For example, this is Roman Italy, I would select x&y and I will set it here. Apps This is our map so we can search for Roma Italy. Okay, and we can make any. For example, we need this just to press on it or you can just right click here and select what's here.

You will find here this is excellent why you can select it Here you will find your x&y so this is our x pack here and this is why okay we can make another a police drama for example here right click what's here you will find this is selected or you can get someone some someplace bit for what's here to connect to this you will find here this is x and this is Okay. You can pick any other a from any other location if you go for example, in London let's pick x axis and y. That's wrong. This should be x and this is like this okay let's just see if this sister here okay? That's enough let us commit okay and now we can see here, x and y, two points in the map. Here at the bottom it says select here is the malt with public nation.

So now you can see now some points splayed, which have all x&y in the map. So a and once you press in it you will find the department and at the bottom it name y department name is a beer here because if you go two page definition of this map, selected this map you will find here with splayed department name. So if you want to display multiple or different information like city street, whatever you can create like a transit attribute which will display the department ID and the name and the city and all information and you can select this attribute Hear as at that. So, this is why you can see here your department name appear for each point. Now let's make some a change on this map or configuration like this is the overview. You want for example, by default to to be collapsing or you want to remove it at all you want to change this icons, you want to change this code right you want initially a start with this level and in this in Europe area for example, because by default it will start in the windows two point.

If there is no point it will display like this, but no I need to display it in zoom for example, three buttons that case it will display it in this location. So with all this other We'll show you how you can do this. So, let us back to the maps here, go to properties. Here starting x and starting y, here you can say what is the starting point here is the map zoom. For example, if I say map zoom, I need to start with zoom four. So let us refresh the map.

So, you will find it is started with zoom number four, if you want to go more deeply, so you can say I need to be in zoom five. Okay, so in that case, the map will be stored in more zoom which is five but I need to start point should be In Europe, for example, like here in this area, so you have to give X and Y for the map to start with. So for example, I need to go to here in Europe and I need one example this x and y to be our starting point, so I will go here and I see x should be this. Why should be this? Okay, this is starting x and starting y and because this won't be four let's go back here and refresh. So as you can see now why in zoom four and starting in this location if you want to increase the map with some height, so you will find here and by default in this tire, you will find here the width and height of the map so you can see okay I needed it hundred and height maybe 675 so I will refresh this.

So all is this some app you have. Okay, if you want to it disappears this for now. So what you can do with us here make it the height be a little bit less Okay yeah so okay this is our web now I need By default this overview to be collapsing like this okay. So, how you can do this you can add insights this map overview and in the overview appearance here you can see if you want it to visible or not or initially show or not so I say initially show false. Okay, so I will set this to be false and if you do want to display it at all you can see this video With default, this is the width and the height of their overview width and height. You can change the width and height, but I need to make initial issue shown no.

So I will refresh it now. You will find by default it is collapsing here and your user can open. Okay. If you want to change this Orange Bowl to anything else, you can select it map point theme here. Built in image you can select any image as you can see anything like for example, flag grid, that is right here. Like red.

You will find here fleck rate is happiness. And if you want to, once you select this since it's the current row of the current selected department, you can do this. If you go to big definition here and you mark enable true selection, enable row selection it means once you select the point in the map, it will sit the current row as a selected row. So if you display the department here as a form of example and select this, you will find the department selected department will be the current row. Okay, if you want to change the copyright here to you was a copyright. You can do it in the map itself.

He is zero or data, copyright tickets you can write your code we write like this, your copyright will be here. So this is quickly how you can use Oracle maps to display some location and place some information on each location. This is a quick lecture. Hopefully you get the point now of how you can use Oracle map

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.