1. Home
  2. Computer Science MCQs
  3. HTML
  4. _________ Function displays the latitude or Longitude in…

Added 20 Jan 2024

_________ Function displays the latitude or Longitude in geoLocation in HTML5.

  1. showLocation()
  2. showPosition() Correct answer
  3. both a and b
  4. showStatus()

Correct answer

B. showPosition()

14 views

MCQSEXAM

Explanation

showPosition() is the callback function conventionally used with the HTML5 Geolocation API to display latitude and longitude. It is passed to navigator.geolocation.getCurrentPosition(showPosition) and reads position.coords.latitude and position.coords.longitude.

The name comes from the widely used tutorial example; technically any function name will work.

Practise more Computer Science MCQs with answers and explanations on MCQsExam.com.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More HTML MCQs

Practise all HTML MCQs

Similar MCQs