Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8726409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:14:18+00:00 2026-06-13T08:14:18+00:00

http://rickgutierrez.bol.ucla.edu/map_mobile6.htm The map is set up to load centered on the users current location.

  • 0

http://rickgutierrez.bol.ucla.edu/map_mobile6.htm

The map is set up to load centered on the users current location. If the user denies the geolocation request, the map is not opening. How do I get the map to open on

center: new google.maps.LatLng( 34.05221496568917, -118.24334979057312 ),

if the user denies the geolocator access to their location? Right now I have an error function that opens a prompt with an error message when the geolocation is denied or fails. I am guessing that I should replace that function with a function that has the above coordinates but how do I feed those to the function that creates the map and centers it on those coordinates?

Thank You

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:14:19+00:00Added an answer on June 13, 2026 at 8:14 am

    Create a custom position-object from the desired coordinates:

    {coords:{latitude:34.05221496568917,longitude: -118.24334979057312}}
    

    You now may call displayLocation with that object as argument, e.g:

    navigator.geolocation.getCurrentPosition(  
          displayLocation, 
          function(){displayLocation({coords:{latitude:34.05221496568917,
                                              longitude: -118.24334979057312}})
          }
    );
    

    You should also take a look at this: How to detect negative user response for geolocation

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://rickgutierrez.bol.ucla.edu/map_mobile6.htm I am working on a mobile map using google maps API and JQuery
http://jsfiddle.net/9BCrs/5/ I have this set up to load a file into a DIV using
http://jsfiddle.net/VjMy8/ Please help me to set the #container to keep in the center of
http://www.w3schools.com/tags/ref_urlencode.asp Since URLs often contain characters outside the ASCII set, the URL has to
http://coldfire.riaforge.org/ I can't get the current version (1.9.207.249) to work in with Firefox 14.0.1
http://www.chai3d.org/doc/classc_camera.html#6b5bbcc535b601c19e10be288dfc65f7 for bool cCamera::set ( const cVector3d & a_localPosition, const cVector3d & a_localLookAt, const
http://www.novaprojecten.nl/roosters/lbl/basis/38/c/c00086.htm i'm trying to parse the table seen there... what i want is to
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#accessing-the-logged-in-user Can someone help me understand this. The AuthComponent::user() method only returns some basic
http://www.dorsetdesigns.co.uk/contact.html try the form it wont send a email to me. i am using
http://jqueryui.com/demos/accordion/ You can do $('#itename').accordion('activate', 0) to make an accordion closed but that'll change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.