You may have solved this problem already, but here's a reply anyway.
If I'm understanding you correctly, I was having the same problem.
Pil's message has a link to an example that has this problem--that is,
if the user refused geolocation, then no map appears. I've solved this
problem for a website I'm working on, but I'm not sure it would be
appropriate for your website--it depends on what you want. When a user
goes to my page, a default map is already loaded. The "pop up" asking
for permission to geolocate appears, also. If the user denies
geolocation, the default map stays on the page, but if they agree to
geolocation, a new map centered on their location appears. Basically,
it's pretty simple. Before the geolocation code (//Try W3C Geolocation
(Preferred)-- in the code in the link) just create a new map. This map
will be replaced by the geolocated map. I'm sure you know how to
create this default map, but here is the code anyway:
var myOptions = {
zoom: 12,
center: seattle, // "seattle" is a variable that is initialized
previously as a new google.maps.LatLng
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
//after this the geolocation code appears
On Jul 2, 12:49 am, Signed To Find <[email protected]> wrote:
> Hey All
>
> I utilising the GEOLOCATION CODE" from the google examples library but have
> a problem. When you load the map in various broswers like Firefox or Chrome
> if the users doesn't agree to either allow/deny and dismisses the prompt by
> clicking close button [X] the map doesn't display.
>
> Is it possible to have the map load a default location still, same to the
> location if the user deny's access?
>
> thanking you in advance
> Jacko
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.