Q:

adding marker on a google map via json

This is  my script taking from this tutorial (google). I can't show the marker on the map. I try to alert any data that Json receive but it doesn't popup. I do not get an error in my firebug inspector so that I could have at leat a clue.
<script type="text/javascript">
    $( document ).ready(function() {

$('#map_canvas').gmap().bind('init', function() { 
    $.getJSON( 'http://jquery-ui-map.googlecode.com/svn/trunk/demos/json/demo.json', function(data) { 
        $.each( data.markers, function(i, marker) {
            alert(marker.latitude);

            $('#map_canvas').gmap('addMarker', { 
                'position': new google.maps.LatLng(marker.latitude, marker.longitude), 
                'bounds': true 
            }).click(function() {
                $('#map_canvas').gmap('openInfoWindow', { 'content': marker.content }, this);
            });

        });
    });
});

});
    </script>

A:

You can't access files from a different domain(except they send appropriate headers, what isn't the case for this file ) via ajax. Download the demo.json and place it on your own server/domain.

