Jump to content

Recommended Posts

$(document).ready(function() {
var lng = get_url_parameter('long');
var lat = get_url_parameter('lat');
if(lng==null && lat==null) {
 var mapOptions = {
  zoom: 8,
  center: new google.maps.LatLng(-34.397, 150.644),
  mapTypeId: google.maps.MapTypeId.ROADMAP
 };
} else {
 var mapOptions = {
  zoom: 8,
  center: new google.maps.LatLng(lat, lng),
  mapTypeId: google.maps.MapTypeId.ROADMAP
 };
}
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
});

 

Now when the long and lat parameters in the URL are null, the map loads fine with the preset coordinates. But when the long and lat parameters are passed. For example, this is what I'm passing to the URL right now : long=2277103.99355757&lat=421953.402769517

It's grabbing the parameters as I did the whole alert(lat); and it alerts the appropriate value.

However, it won't load the map. It's just a grey block.

Anyone know the issue here??

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.