We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25773
    • 73 Posts
    Hi there I have Google maps api working so that on entering a postcode it shows the image of their house from above.
    They clikc to confirmt he position etc and it enters the geocode into a box, which along with other details gets sent in an email.

    The page is working fine outside of Modx.
    But when I add it to Modx, the map doesnt show.

    Im working in modx Evo 1.0.4

    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
     <script language="JavaScript"> 
    function disableEnterKey(e)
    {
         var key;
     
         if(window.event)
              key = window.event.keyCode;     //IE
         else
              key = e.which;     //firefox
     
         if(key == 13)
              return false;
         else
              return true;
    }
    </script><script type="text/javascript" src="assets/templates/tgesolar/map.js"></script>
    
    
    <script type="text/javascript">
    
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-27343748-2']);
      _gaq.push(['_trackPageview']);
    
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    
    </script>


    This is the working version outside of modx
    http://www.tgesolarpanels.co.uk/roof_locator.html

    Im not using anything extra on the page apart from mootools.js and drop_down_menu.js

    I tried creating a blank template with those removed but still no map


    My solution. I just used an iframe, does the job.
    [ed. note: ruthf last edited this post 14 years, 9 months ago.]