Add JS to specific pages AFTER all other JS I am working with JSON to theme Google Maps in the api v3.

I have my custom JSON script as an external JS file, and I am currently referencing it in html.tpl.php after the other scripts are loaded. This works great, and maps are themed, but on any pages that don't have a GMAP on them, i get the following error in Dev Tools...


  "Uncaught TypeError: Cannot call method 'addHandler' of undefined"


So I am trying to add the JS file to just the pages that have a GMAP, in template.php I use the following under the MY_THEME_preprocess_page function.


  if (isset($vars['node']) &amp;&amp; $vars['node']->type == 'venue') {
      drupal_add_js(drupal_get_path('theme', 'MY_THEME') . '/js/mapstyle.js');   }


This loads the JS for all pages that are of the content type "Venue". The problem I am having is that the JS file is loading BEFORE the gmap scripts, and the style is not being rendered. 

How do i get a JS file to load after all of the other scripts? I also need to load the JS file on a views page mysite.com/venues , but as a views page doesnt have a "node/id" alias, I am struggling to figure out how to only load the JS on that page using template.php
Using the following in my template.php file for my theme, I achieved what I wanted to do.

function MY_THEME_preprocess_page(&amp;$vars) {
  if (isset($vars['node']) &amp;&amp; $vars['node']-&gt;type == 'venue') {
    drupal_add_js(drupal_get_path('theme', 'MY_THEME') . '/js/mapstyle.js',
    array('weight' =&gt; 15));
  }
}


I couldn't add the JS to my .info file as it would add to all pages, so I used the drupal_add_js fallback in template.php, and the now the error no longer shows on a page that doesn't have a GMAP on it.