SlideShare a Scribd company logo
1 of 8
Download to read offline
Creating an Uber Clone - Part XVI
Container mapLayer = new Container();
mapLayer.setLayout(new MapLayout(mc, mapLayer));
final Image carImage = Resources.getGlobalResources().
getImage("map-vehicle-icon-uberX.png");
LocationService.bind(user -> {
Label userCar = new Label();
userCar.putClientProperty("angle", user.direction.get());
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.getAllStyles().setOpacity(140);
mapLayer.add(new Coord(user.latitude.get(),
user.longitude.get()), userCar);
mapLayer.revalidate();
user.direction.addChangeListener(p -> {
Float angle = (Float)userCar.getClientProperty("angle");
if(angle == null || angle.floatValue() != user.direction.getFloat()) {
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.putClientProperty("angle", user.direction.get());
}
});
user.latitude.addChangeListener(p -> {
Coord crd = (Coord)mapLayer.getLayout().
MapForm
Container mapLayer = new Container();
mapLayer.setLayout(new MapLayout(mc, mapLayer));
final Image carImage = Resources.getGlobalResources().
getImage("map-vehicle-icon-uberX.png");
LocationService.bind(user -> {
Label userCar = new Label();
userCar.putClientProperty("angle", user.direction.get());
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.getAllStyles().setOpacity(140);
mapLayer.add(new Coord(user.latitude.get(),
user.longitude.get()), userCar);
mapLayer.revalidate();
user.direction.addChangeListener(p -> {
Float angle = (Float)userCar.getClientProperty("angle");
if(angle == null || angle.floatValue() != user.direction.getFloat()) {
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.putClientProperty("angle", user.direction.get());
}
});
user.latitude.addChangeListener(p -> {
Coord crd = (Coord)mapLayer.getLayout().
MapForm
Container mapLayer = new Container();
mapLayer.setLayout(new MapLayout(mc, mapLayer));
final Image carImage = Resources.getGlobalResources().
getImage("map-vehicle-icon-uberX.png");
LocationService.bind(user -> {
Label userCar = new Label();
userCar.putClientProperty("angle", user.direction.get());
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.getAllStyles().setOpacity(140);
mapLayer.add(new Coord(user.latitude.get(),
user.longitude.get()), userCar);
mapLayer.revalidate();
user.direction.addChangeListener(p -> {
Float angle = (Float)userCar.getClientProperty("angle");
if(angle == null || angle.floatValue() != user.direction.getFloat()) {
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.putClientProperty("angle", user.direction.get());
}
});
user.latitude.addChangeListener(p -> {
Coord crd = (Coord)mapLayer.getLayout().
MapForm
Container mapLayer = new Container();
mapLayer.setLayout(new MapLayout(mc, mapLayer));
final Image carImage = Resources.getGlobalResources().
getImage("map-vehicle-icon-uberX.png");
LocationService.bind(user -> {
Label userCar = new Label();
userCar.putClientProperty("angle", user.direction.get());
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.getAllStyles().setOpacity(140);
mapLayer.add(new Coord(user.latitude.get(),
user.longitude.get()), userCar);
mapLayer.revalidate();
user.direction.addChangeListener(p -> {
Float angle = (Float)userCar.getClientProperty("angle");
if(angle == null || angle.floatValue() != user.direction.getFloat()) {
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.putClientProperty("angle", user.direction.get());
}
});
user.latitude.addChangeListener(p -> {
Coord crd = (Coord)mapLayer.getLayout().
MapForm
user.direction.addChangeListener(p -> {
Float angle = (Float)userCar.getClientProperty("angle");
if(angle == null || angle.floatValue() != user.direction.getFloat()) {
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.putClientProperty("angle", user.direction.get());
}
});
user.latitude.addChangeListener(p -> {
Coord crd = (Coord)mapLayer.getLayout().
getComponentConstraint(userCar);
if(crd.getLatitude() != user.latitude.get()) {
userCar.remove();
mapLayer.add(new Coord(user.latitude.get(),
user.longitude.get()), userCar);
mapLayer.animateLayout(100);
}
});
user.longitude.addChangeListener(p -> {
Coord crd = (Coord)mapLayer.getLayout().
getComponentConstraint(userCar);
if(crd.getLongitude()!= user.longitude.get()) {
MapForm
user.direction.addChangeListener(p -> {
Float angle = (Float)userCar.getClientProperty("angle");
if(angle == null || angle.floatValue() != user.direction.getFloat()) {
userCar.setIcon(carImage.rotate((int)user.direction.getFloat()));
userCar.putClientProperty("angle", user.direction.get());
}
});
user.latitude.addChangeListener(p -> {
Coord crd = (Coord)mapLayer.getLayout().
getComponentConstraint(userCar);
if(crd.getLatitude() != user.latitude.get()) {
userCar.remove();
mapLayer.add(new Coord(user.latitude.get(),
user.longitude.get()), userCar);
mapLayer.animateLayout(100);
}
});
user.longitude.addChangeListener(p -> {
Coord crd = (Coord)mapLayer.getLayout().
getComponentConstraint(userCar);
if(crd.getLongitude()!= user.longitude.get()) {
MapForm
insert into user
(driver, password, phone, auth_token,
current_rating, hailing, latitude,
longitude, direction)
values
(true,
'passwordValue',
'999', '50a64d7c-533e-4439-90ef-0178df3aa08c', 5,
false, 32.072449, 34.778613, 0);
Driver SQL

More Related Content

Similar to Creating an Uber Clone - Part XVI.pdf

Creating an Uber Clone - Part XXX - Transcript.pdf
Creating an Uber Clone - Part XXX - Transcript.pdfCreating an Uber Clone - Part XXX - Transcript.pdf
Creating an Uber Clone - Part XXX - Transcript.pdfShaiAlmog1
 
Creating an Uber Clone - Part XXIV.pdf
Creating an Uber Clone - Part XXIV.pdfCreating an Uber Clone - Part XXIV.pdf
Creating an Uber Clone - Part XXIV.pdfShaiAlmog1
 
Creating an Uber Clone - Part XXIII - Transcript.pdf
Creating an Uber Clone - Part XXIII - Transcript.pdfCreating an Uber Clone - Part XXIII - Transcript.pdf
Creating an Uber Clone - Part XXIII - Transcript.pdfShaiAlmog1
 
Creating an Uber Clone - Part XV.pdf
Creating an Uber Clone - Part XV.pdfCreating an Uber Clone - Part XV.pdf
Creating an Uber Clone - Part XV.pdfShaiAlmog1
 
Google Street View in Your Apps
Google Street View in Your AppsGoogle Street View in Your Apps
Google Street View in Your AppsCodemotion
 
Google Maps API - DevFest Karlsruhe
Google Maps API - DevFest Karlsruhe Google Maps API - DevFest Karlsruhe
Google Maps API - DevFest Karlsruhe Martin Kleppe
 
Creating an Uber Clone - Part XV - Transcript.pdf
Creating an Uber Clone - Part XV - Transcript.pdfCreating an Uber Clone - Part XV - Transcript.pdf
Creating an Uber Clone - Part XV - Transcript.pdfShaiAlmog1
 
Creating an Uber Clone - Part XVII.pdf
Creating an Uber Clone - Part XVII.pdfCreating an Uber Clone - Part XVII.pdf
Creating an Uber Clone - Part XVII.pdfShaiAlmog1
 
HTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexHTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexTadayasu Sasada
 
Maps - Part 3.pdf
Maps - Part 3.pdfMaps - Part 3.pdf
Maps - Part 3.pdfShaiAlmog1
 
Mini-curso JavaFX Aula3 UFPB
Mini-curso JavaFX Aula3 UFPBMini-curso JavaFX Aula3 UFPB
Mini-curso JavaFX Aula3 UFPBRaphael Marques
 
Creating an Uber Clone - Part XXIII.pdf
Creating an Uber Clone - Part XXIII.pdfCreating an Uber Clone - Part XXIII.pdf
Creating an Uber Clone - Part XXIII.pdfShaiAlmog1
 
Creating an Uber Clone - Part XXVI - Transcript.pdf
Creating an Uber Clone - Part XXVI - Transcript.pdfCreating an Uber Clone - Part XXVI - Transcript.pdf
Creating an Uber Clone - Part XXVI - Transcript.pdfShaiAlmog1
 
What are customers building with new Bing Maps capabilities
What are customers building with new Bing Maps capabilitiesWhat are customers building with new Bing Maps capabilities
What are customers building with new Bing Maps capabilitiesMicrosoft Tech Community
 
Making the Most of Maps in Your Connect IQ Apps - Garmin Connect IQ Developer...
Making the Most of Maps in Your Connect IQ Apps - Garmin Connect IQ Developer...Making the Most of Maps in Your Connect IQ Apps - Garmin Connect IQ Developer...
Making the Most of Maps in Your Connect IQ Apps - Garmin Connect IQ Developer...Richard Süselbeck
 
Creating an Uber Clone - Part XX.pdf
Creating an Uber Clone - Part XX.pdfCreating an Uber Clone - Part XX.pdf
Creating an Uber Clone - Part XX.pdfShaiAlmog1
 

Similar to Creating an Uber Clone - Part XVI.pdf (20)

Player x 0 y ga.docx
Player x 0 y ga.docxPlayer x 0 y ga.docx
Player x 0 y ga.docx
 
Creating an Uber Clone - Part XXX - Transcript.pdf
Creating an Uber Clone - Part XXX - Transcript.pdfCreating an Uber Clone - Part XXX - Transcript.pdf
Creating an Uber Clone - Part XXX - Transcript.pdf
 
Creating an Uber Clone - Part XXIV.pdf
Creating an Uber Clone - Part XXIV.pdfCreating an Uber Clone - Part XXIV.pdf
Creating an Uber Clone - Part XXIV.pdf
 
Creating an Uber Clone - Part XXIII - Transcript.pdf
Creating an Uber Clone - Part XXIII - Transcript.pdfCreating an Uber Clone - Part XXIII - Transcript.pdf
Creating an Uber Clone - Part XXIII - Transcript.pdf
 
app.js.docx
app.js.docxapp.js.docx
app.js.docx
 
Creating an Uber Clone - Part XV.pdf
Creating an Uber Clone - Part XV.pdfCreating an Uber Clone - Part XV.pdf
Creating an Uber Clone - Part XV.pdf
 
Google Street View in Your Apps
Google Street View in Your AppsGoogle Street View in Your Apps
Google Street View in Your Apps
 
Google Maps API - DevFest Karlsruhe
Google Maps API - DevFest Karlsruhe Google Maps API - DevFest Karlsruhe
Google Maps API - DevFest Karlsruhe
 
Creating an Uber Clone - Part XV - Transcript.pdf
Creating an Uber Clone - Part XV - Transcript.pdfCreating an Uber Clone - Part XV - Transcript.pdf
Creating an Uber Clone - Part XV - Transcript.pdf
 
Google Maps JS API
Google Maps JS APIGoogle Maps JS API
Google Maps JS API
 
Creating an Uber Clone - Part XVII.pdf
Creating an Uber Clone - Part XVII.pdfCreating an Uber Clone - Part XVII.pdf
Creating an Uber Clone - Part XVII.pdf
 
HTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHexHTML5勉強会#23_GeoHex
HTML5勉強会#23_GeoHex
 
Maps - Part 3.pdf
Maps - Part 3.pdfMaps - Part 3.pdf
Maps - Part 3.pdf
 
Mini-curso JavaFX Aula3 UFPB
Mini-curso JavaFX Aula3 UFPBMini-curso JavaFX Aula3 UFPB
Mini-curso JavaFX Aula3 UFPB
 
Pengenalan blaast platform sdk
Pengenalan blaast platform sdkPengenalan blaast platform sdk
Pengenalan blaast platform sdk
 
Creating an Uber Clone - Part XXIII.pdf
Creating an Uber Clone - Part XXIII.pdfCreating an Uber Clone - Part XXIII.pdf
Creating an Uber Clone - Part XXIII.pdf
 
Creating an Uber Clone - Part XXVI - Transcript.pdf
Creating an Uber Clone - Part XXVI - Transcript.pdfCreating an Uber Clone - Part XXVI - Transcript.pdf
Creating an Uber Clone - Part XXVI - Transcript.pdf
 
What are customers building with new Bing Maps capabilities
What are customers building with new Bing Maps capabilitiesWhat are customers building with new Bing Maps capabilities
What are customers building with new Bing Maps capabilities
 
Making the Most of Maps in Your Connect IQ Apps - Garmin Connect IQ Developer...
Making the Most of Maps in Your Connect IQ Apps - Garmin Connect IQ Developer...Making the Most of Maps in Your Connect IQ Apps - Garmin Connect IQ Developer...
Making the Most of Maps in Your Connect IQ Apps - Garmin Connect IQ Developer...
 
Creating an Uber Clone - Part XX.pdf
Creating an Uber Clone - Part XX.pdfCreating an Uber Clone - Part XX.pdf
Creating an Uber Clone - Part XX.pdf
 

More from ShaiAlmog1

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...ShaiAlmog1
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfShaiAlmog1
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfShaiAlmog1
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfShaiAlmog1
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfShaiAlmog1
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfShaiAlmog1
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfShaiAlmog1
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfShaiAlmog1
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfShaiAlmog1
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfShaiAlmog1
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfShaiAlmog1
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfShaiAlmog1
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfShaiAlmog1
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfShaiAlmog1
 

More from ShaiAlmog1 (20)

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdf
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdf
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdf
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdf
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdf
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Creating an Uber Clone - Part XVI.pdf

  • 1. Creating an Uber Clone - Part XVI
  • 2. Container mapLayer = new Container(); mapLayer.setLayout(new MapLayout(mc, mapLayer)); final Image carImage = Resources.getGlobalResources(). getImage("map-vehicle-icon-uberX.png"); LocationService.bind(user -> { Label userCar = new Label(); userCar.putClientProperty("angle", user.direction.get()); userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.getAllStyles().setOpacity(140); mapLayer.add(new Coord(user.latitude.get(), user.longitude.get()), userCar); mapLayer.revalidate(); user.direction.addChangeListener(p -> { Float angle = (Float)userCar.getClientProperty("angle"); if(angle == null || angle.floatValue() != user.direction.getFloat()) { userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.putClientProperty("angle", user.direction.get()); } }); user.latitude.addChangeListener(p -> { Coord crd = (Coord)mapLayer.getLayout(). MapForm
  • 3. Container mapLayer = new Container(); mapLayer.setLayout(new MapLayout(mc, mapLayer)); final Image carImage = Resources.getGlobalResources(). getImage("map-vehicle-icon-uberX.png"); LocationService.bind(user -> { Label userCar = new Label(); userCar.putClientProperty("angle", user.direction.get()); userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.getAllStyles().setOpacity(140); mapLayer.add(new Coord(user.latitude.get(), user.longitude.get()), userCar); mapLayer.revalidate(); user.direction.addChangeListener(p -> { Float angle = (Float)userCar.getClientProperty("angle"); if(angle == null || angle.floatValue() != user.direction.getFloat()) { userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.putClientProperty("angle", user.direction.get()); } }); user.latitude.addChangeListener(p -> { Coord crd = (Coord)mapLayer.getLayout(). MapForm
  • 4. Container mapLayer = new Container(); mapLayer.setLayout(new MapLayout(mc, mapLayer)); final Image carImage = Resources.getGlobalResources(). getImage("map-vehicle-icon-uberX.png"); LocationService.bind(user -> { Label userCar = new Label(); userCar.putClientProperty("angle", user.direction.get()); userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.getAllStyles().setOpacity(140); mapLayer.add(new Coord(user.latitude.get(), user.longitude.get()), userCar); mapLayer.revalidate(); user.direction.addChangeListener(p -> { Float angle = (Float)userCar.getClientProperty("angle"); if(angle == null || angle.floatValue() != user.direction.getFloat()) { userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.putClientProperty("angle", user.direction.get()); } }); user.latitude.addChangeListener(p -> { Coord crd = (Coord)mapLayer.getLayout(). MapForm
  • 5. Container mapLayer = new Container(); mapLayer.setLayout(new MapLayout(mc, mapLayer)); final Image carImage = Resources.getGlobalResources(). getImage("map-vehicle-icon-uberX.png"); LocationService.bind(user -> { Label userCar = new Label(); userCar.putClientProperty("angle", user.direction.get()); userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.getAllStyles().setOpacity(140); mapLayer.add(new Coord(user.latitude.get(), user.longitude.get()), userCar); mapLayer.revalidate(); user.direction.addChangeListener(p -> { Float angle = (Float)userCar.getClientProperty("angle"); if(angle == null || angle.floatValue() != user.direction.getFloat()) { userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.putClientProperty("angle", user.direction.get()); } }); user.latitude.addChangeListener(p -> { Coord crd = (Coord)mapLayer.getLayout(). MapForm
  • 6. user.direction.addChangeListener(p -> { Float angle = (Float)userCar.getClientProperty("angle"); if(angle == null || angle.floatValue() != user.direction.getFloat()) { userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.putClientProperty("angle", user.direction.get()); } }); user.latitude.addChangeListener(p -> { Coord crd = (Coord)mapLayer.getLayout(). getComponentConstraint(userCar); if(crd.getLatitude() != user.latitude.get()) { userCar.remove(); mapLayer.add(new Coord(user.latitude.get(), user.longitude.get()), userCar); mapLayer.animateLayout(100); } }); user.longitude.addChangeListener(p -> { Coord crd = (Coord)mapLayer.getLayout(). getComponentConstraint(userCar); if(crd.getLongitude()!= user.longitude.get()) { MapForm
  • 7. user.direction.addChangeListener(p -> { Float angle = (Float)userCar.getClientProperty("angle"); if(angle == null || angle.floatValue() != user.direction.getFloat()) { userCar.setIcon(carImage.rotate((int)user.direction.getFloat())); userCar.putClientProperty("angle", user.direction.get()); } }); user.latitude.addChangeListener(p -> { Coord crd = (Coord)mapLayer.getLayout(). getComponentConstraint(userCar); if(crd.getLatitude() != user.latitude.get()) { userCar.remove(); mapLayer.add(new Coord(user.latitude.get(), user.longitude.get()), userCar); mapLayer.animateLayout(100); } }); user.longitude.addChangeListener(p -> { Coord crd = (Coord)mapLayer.getLayout(). getComponentConstraint(userCar); if(crd.getLongitude()!= user.longitude.get()) { MapForm
  • 8. insert into user (driver, password, phone, auth_token, current_rating, hailing, latitude, longitude, direction) values (true, 'passwordValue', '999', '50a64d7c-533e-4439-90ef-0178df3aa08c', 5, false, 32.072449, 34.778613, 0); Driver SQL