Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a google map based user interactive system 1. Apply query concept to retrieve results (the 3 point locations) 2. use one(or more) of the

Create a google map based user interactive system 1. Apply query concept to retrieve results (the 3 point locations) 2. use one(or more) of the data structures(HashMap HashSet) 3. use HashMap instead of if-else or switch-case statements (describe in detail at the beginning of the program) 4. set operation to retrieve more complex output (describe in detail at the beginning of the program)

image text in transcribedimage text in transcribedimage text in transcribed

import java.util.Random public class Mapt Map (String title, String latitude, String longitude,int zoom, int width, int height, int scale, String type, String mark) f JFrame map = new JFrame (title); map.setDefaultcioseoperation (JFrame.EXIT_ON CLOSE) map.setSize (width, height) map.setLocationRelativeTo (null) map.setVisible (true) tryt String imageUrl "https://maps.googleapis.com/maps/api/staticmap ?center="; imageUr 1+-latitude+ ","4 longitude+ "&zoon " + zoom + "&size=" + width + "x" + height+"&scale="+zoom+ " &maptype="+type+mark; String destinationFile "map.jpg"; URL urlnew URL (imageUrl) InputStream is = url.openStream(); OutputStream os new FileOutputStream(destinationFile) ; byte [ ] b = new byte [2048]; int length: while ((length= is.read (b)) !--1) { os.write (b, 0, length) is.close () os.close ) catch (IOException e) e.printStackTrace): System.exit(1) Image Icon image Icon = new Image Icon ((new Image 1 con ("map .jpg")) .getImage().getScaledInstance (width, map.add (new JLabel (imageIcon) map. setVisible (true) map.pack ) height, java, awt. Image . SCALESMOOTH)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

How do HTTP and HTTP-NG differ?

Answered: 1 week ago

Question

Explain the factors that determine the degree of decentralisation

Answered: 1 week ago

Question

What Is acidity?

Answered: 1 week ago

Question

Explain the principles of delegation

Answered: 1 week ago

Question

State the importance of motivation

Answered: 1 week ago

Question

Discuss the various steps involved in the process of planning

Answered: 1 week ago