We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39982
    • 28 Posts
    Hi!

    There is something different with sourcecode on here,
    "new google.maps.LatLng(40.7123368, -74.0078158);" on local MAMP and
    "new google.maps.LatLng(40,7087849, -74,0109205);" on linux webserver.

    I check both mxcalendars.class.php files and everything seems same to me. Is it server thing or what? On local MAMP everything work fine and map shows what it should, but not on webserver. Both MODX setups are same 2.2.11-pl and mxCalendar 1.1.10-pl. Everything from core/components/mxcalendars/ and assets/components/mxcalendars are replaced with local MAMP ones.

    <div id="map_canvas" style="width:548px; height:500px;"></div><script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
                            <script type="text/javascript">
                                    // -- mxCalendar :: location map -- //
                                    function initialize() {
                                        //var bounds = new google.maps.LatLngBounds();
    
                       var myLatLng =  new google.maps.LatLng(40.7123368, -74.0078158);
                        var myOptions = {
    zoom: 15,
    center: myLatLng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    var marker = new google.maps.Marker({
                            position: myLatLng,
                            map: map,
                            title:"Broadway 234, New York"});
                            
                            
                                    };
    
                                    if (window.attachEvent) {window.attachEvent('onload', initialize);}
                                    else if (window.addEventListener) {window.addEventListener('load', initialize, false);}
                                    else {document.addEventListener('load', initialize, false);}
    
                            </script>
    </div>



    This is from server.
    <div id="map_canvas" style="width:500px; height:500px;"></div><script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
                            <script type="text/javascript">
                                    // -- mxCalendar :: location map -- //
                                    function initialize() {
                                        //var bounds = new google.maps.LatLngBounds();
    
                       var myLatLng =  new google.maps.LatLng(40,7087849, -74,0109205);
                        var myOptions = {
    zoom: 15,
    center: myLatLng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    var marker = new google.maps.Marker({
                            position: myLatLng,
                            map: map,
                            title:"Broadway 123, New York"});
                            
                            
                                    };
    
                                    if (window.attachEvent) {window.attachEvent('onload', initialize);}
                                    else if (window.addEventListener) {window.addEventListener('load', initialize, false);}
                                    else {document.addEventListener('load', initialize, false);}
    
                            </script>
    </div>


    Both shows map, but on webserver it's somewhere on the North Pacific Ocean smiley

    Thank you,
    Tom