+ Reply to Thread
Results 1 to 10 of 10

Thread: Override map coordinates

  1. #1
    Licensed User Braindg's Avatar
    Join Date
    Feb 2012
    Posts
    84
    Post Thanks / Like

    Default Override map coordinates

    Hi,

    I realise there are lat/long settings in admincp, however....

    Our site has multiple regions, primarily uk, au and nz, I use conditionals to present information to them.

    Is it possible to override the admincp coordinates with a JS in header? I could then use my conditionals and localise the map depending on te users region.

    Thanks
    Type-S - 1997 P - Silver - Apr 09

    HKS Induction - Apr 09
    HKS Blow Off - Jun 09
    Brembo Front and Rear Calipers - Jun 10
    HKS Super Drager Exhaust - Aug 10
    HKS EVC Boost Controller @ 13 psi - Aug 10
    Cusco Anti Roll Bars - Aug 10
    RIP: Type-S - 1998 R - Trigger Mauve - Mauve History | First VR4 - Second VR4 - Third VR4

  2. #2
    Administrator Dylan's Avatar
    Join Date
    Nov 2005
    Location
    Orange County, California
    Posts
    3,240
    Post Thanks / Like
    Blog Entries
    1

    Default Re: Override map coordinates

    Quote Originally Posted by Braindg View Post
    Hi,

    I realise there are lat/long settings in admincp, however....

    Our site has multiple regions, primarily uk, au and nz, I use conditionals to present information to them.

    Is it possible to override the admincp coordinates with a JS in header? I could then use my conditionals and localise the map depending on te users region.

    Thanks
    If you open the garage.php page, I'm setting them in there. You could probably figure out a way to override them depending on the users region, maybe if you have it set in their userinfo.

    Look for code like

    PHP Code:
    var myLatlng = new google.maps.LatLng(" . $vbulletin->options[garage_deft_map_lat] . "" . $vbulletin->options[garage_deft_map_lng] . ");\n"; 
    That's where it sets the long/lat

  3. #3
    Licensed User Braindg's Avatar
    Join Date
    Feb 2012
    Posts
    84
    Post Thanks / Like

    Default Re: Override map coordinates

    Cool, thanks for response - i'll look into this.
    Type-S - 1997 P - Silver - Apr 09

    HKS Induction - Apr 09
    HKS Blow Off - Jun 09
    Brembo Front and Rear Calipers - Jun 10
    HKS Super Drager Exhaust - Aug 10
    HKS EVC Boost Controller @ 13 psi - Aug 10
    Cusco Anti Roll Bars - Aug 10
    RIP: Type-S - 1998 R - Trigger Mauve - Mauve History | First VR4 - Second VR4 - Third VR4

  4. #4
    C&D Super Moderator
    Join Date
    Aug 2008
    Location
    Long Beach, California
    Posts
    414
    Post Thanks / Like

    Default Re: Override map coordinates

    Very interested in this, please post back if you get it working
    I buy big auto & motorcycle forums. contact via PM

  5. #5
    Licensed User
    Join Date
    Nov 2009
    Posts
    15
    Post Thanks / Like

    Default Re: Override map coordinates

    I cannot get the map to display .. I keep getting the following errors in my httpd/error_log ...

    Code:
    [Sun Apr 15 20:25:50 2012] [error] File does not exist: /forum/clientscript/vbulletin-read-marker.js, referer: http://www.forum.com/forum/garage.php?do=veh_map
    [Sun Apr 15 20:25:50 2012] [error] File does not exist: /forum/clientscript/vbulletin-threadbit.js, referer: http://www.forum.com/forum/garage.php?do=veh_map

  6. #6
    Administrator Dylan's Avatar
    Join Date
    Nov 2005
    Location
    Orange County, California
    Posts
    3,240
    Post Thanks / Like
    Blog Entries
    1

    Default Re: Override map coordinates

    Quote Originally Posted by Sidewindr View Post
    I cannot get the map to display .. I keep getting the following errors in my httpd/error_log ...

    Code:
    [Sun Apr 15 20:25:50 2012] [error] File does not exist: /forum/clientscript/vbulletin-read-marker.js, referer: http://www.forum.com/forum/garage.php?do=veh_map
    [Sun Apr 15 20:25:50 2012] [error] File does not exist: /forum/clientscript/vbulletin-threadbit.js, referer: http://www.forum.com/forum/garage.php?do=veh_map
    Looks like they took them out of the newer version. I'm not sure it's even needed now. Try removing those lines from the garage_main template and see if it helps. Should at least get rid of the errors. It shouldn't make a difference on your map unfortunately. Does the map not show at all or does it show with no pinpoints?

  7. #7
    Licensed User
    Join Date
    Nov 2009
    Posts
    15
    Post Thanks / Like

    Default Re: Override map coordinates

    Quote Originally Posted by Dylan View Post
    Looks like they took them out of the newer version. I'm not sure it's even needed now. Try removing those lines from the garage_main template and see if it helps. Should at least get rid of the errors. It shouldn't make a difference on your map unfortunately. Does the map not show at all or does it show with no pinpoints?
    Ok removed and no more errors, however I get no map whatsoever..

    eg.

    http://www.ls1.com.au/forum/garage.php?do=veh_map

  8. #8
    A Ghost in the Machine
    Join Date
    Aug 2008
    Location
    Ontario, Calif
    Posts
    424
    Post Thanks / Like

    Default Re: Override map coordinates

    I see the map.

  9. #9
    Administrator Dylan's Avatar
    Join Date
    Nov 2005
    Location
    Orange County, California
    Posts
    3,240
    Post Thanks / Like
    Blog Entries
    1

    Default Re: Override map coordinates

    I see the map and a vehicle on it as well?

  10. #10
    Licensed User
    Join Date
    Nov 2009
    Posts
    15
    Post Thanks / Like

    Default Re: Override map coordinates

    I've done some more testing and it is bizarre .. I can see it when logged in as guest and as my test user also however I cannot see any map when logged in as my actual/proper user account.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts