This is the full function. The website can find up to
        url: "getData.php",

It isn't showing any more errors. What is the easiest way to see
exactly is being returned by the ajax call?



 <!--Load the AJAX API-->    <script type="text/javascript"
src="https://www.google.com/jsapi
<view-source:https://www.google.com/jsapi>"></script>    <script
type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
<view-source:http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js>"></script>
   <script type="text/javascript">     google.load('visualization',
'1', {'packages': ['geochart']});
google.setOnLoadCallback(drawMarkersMap);function drawMarkersMap() {
$.ajax({        url: "getData.php",        dataType:"json",
      success: function (json) {            // Create our data table
out of JSON data loaded from server.var data = new
google.visualization.arrayToDataTable(JSON.parse(json));           //
var data = new google.visualization.DataTable(json);            var
options = {                region: 'US',                displayMode:
'markers',                colorAxis: {colors: ['green', 'blue']}
     };                  var chart = new
google.visualization.GeoChart(document.getElementById('visualization'));
           chart.draw(data, options);        } // <-- the ";" that was
here does not belong    }); // <-- missing this} // <-- and
this</script>



On Thu, Mar 6, 2014 at 2:07 PM, asgallant <[email protected]> wrote:

> That sounds like a variable scope problem, and is likely due to having the
> chart.draw call in the wrong place.  Post the code you are using that
> causes the problem.
>
>
> On Thursday, March 6, 2014 1:49:54 PM UTC-5, Timothy Sheils wrote:
>
>> Ok. got that fixed. I looked at the developer console in firefox. I'm
>> getting an error: ReferenceError: data is not defined for the line
>>
>> chart.draw(data, options);
>>
>> It feels like something isn't right with the ajax call.
>>
>>
>> On Thu, Mar 6, 2014 at 1:33 PM, asgallant <[email protected]> wrote:
>>
>>> There is another thing you need to change.  On this line:
>>>
>>> var data = new google.visualization.DataTable(jsonData);
>>>
>>> change "jsonData" to "json":
>>>
>>> var data = new google.visualization.DataTable(json);
>>>
>>> You not not need to assign the AJAX call to a variable.
>>>
>>> On Thursday, March 6, 2014 12:12:12 PM UTC-5, Timothy Sheils wrote:
>>>>
>>>> That didn't help. I have been following a previous post you were
>>>> working on: https://groups.google.com/forum/#!topic/google-
>>>> visualization-api/CUI5M90NTvU
>>>>
>>>> Should i set the ajax call to a variable:
>>>>    " $.ajax({"
>>>> or
>>>>
>>>> "var ajaxData =
>>>>     $.ajax({"
>>>>             var data = new google.visualization.DataTable(ajaxData);
>>>>
>>>>
>>>> I'm also worried the json string might not be in the right format, i
>>>> tested it, and its valid, but not going through.
>>>>
>>>  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Google Visualization API" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/google-visualization-api/8A63gZqZwQ4/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To post to this group, send email to [email protected].
>>>
>>> Visit this group at http://groups.google.com/
>>> group/google-visualization-api.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Visualization API" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-visualization-api/8A63gZqZwQ4/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to