Hi
Sorry for my late reply. You're absolutely right - it's working now.
Thank you so much for helping me.
Nikolaj


On Wed, Mar 27, 2013 at 3:13 PM, asgallant <drew_gall...@abtassoc.com>wrote:

> I think you want to use columns 7 and 8 in the map's view, not 8 and 9
> (columns are 0-indexed, so "X" is column 7 and "Y" is column 8).  See here:
> http://jsfiddle.net/asgallant/U43xx/
>
>
> On Wednesday, March 27, 2013 6:02:25 AM UTC-4, Sikker Trafik wrote:
>>
>> Hi
>>
>> I am trying to embed a table and a map in my website. I have found out
>> how to make the table with filters. But I have problems making the map work
>> as well.
>>
>> When I'm trying to do this, it shows an error saying:
>> The columns type does not match the supported data format. See
>> documentation for supported formats.×
>>
>>
>> I don't know if the kind of map is not working anymore, or it is because
>> of my lack of skills (wouldn't suprise).
>> I really hope someone can help me.
>> And here is my script:
>>
>>
>>
>>     <script type="text/javascript" 
>> src="https://www.google.com/**jsapi<https://www.google.com/jsapi>
>> "></script>
>>     <script type="text/javascript">
>>
>>       google.load('visualization', '1.0', {'packages':['controls',
>> 'table', 'map']});
>>
>>       google.setOnLoadCallback(**drawDashboard);
>>
>>       function drawDashboard() {
>>
>>        var query = new google.visualization.Query('ht**
>> tps://docs.google.com/**spreadsheet/tq?key=0Am7E06r_**
>> 2i5edE80a0MxSUtTUURSaHdicDBNYU**dYVXc&transpose=0&headers=1&**
>> range=A1%3AL165&gid=0&pub=1'<https://docs.google.com/spreadsheet/tq?key=0Am7E06r_2i5edE80a0MxSUtTUURSaHdicDBNYUdYVXc&transpose=0&headers=1&range=A1%3AL165&gid=0&pub=1'>
>> );
>>        query.setQuery('SELECT A,B,C,D,E,F,G,H,I,J,K,L');
>>        query.send(**handleQueryResponse);
>>    }
>>
>>    function handleQueryResponse(response) {
>>      if (response.isError()) {
>>        alert('Error in query: ' + response.getMessage() + ' ' +
>> response.getDetailedMessage())**;
>>       return;
>>      }
>>      var data = response.getDataTable();
>>         var dashboard = new google.visualization.**Dashboard(
>>             document.getElementById('**dashboard_div'));
>>
>>         var filter = new google.visualization.**ControlWrapper({
>>           'controlType': 'CategoryFilter',
>>           'containerId': 'control1',
>>           'options': {
>>             'filterColumnLabel': 'År',
>>       'ui': {
>>         'allowTyping': false,
>>         'allowMultiple': true,
>>         'selectedValuesLayout': 'belowWrapping',
>>         'labelStacking': 'vertical',
>>         'caption': 'Vælg et år'
>>           }
>>           }
>>         });
>>
>>         var filter2 = new google.visualization.**ControlWrapper({
>>           'controlType': 'CategoryFilter',
>>           'containerId': 'control2',
>>           'options': {
>>             'filterColumnLabel': 'Køn',
>>       'ui': {
>>         'allowTyping': false,
>>         'allowMultiple': true,
>>         'selectedValuesLayout': 'belowWrapping',
>>         'labelStacking': 'vertical',
>>         'caption': 'Vælg køn'
>>           }
>>           }
>>         });
>>
>>         var filter3 = new google.visualization.**ControlWrapper({
>>           'controlType': 'CategoryFilter',
>>           'containerId': 'control3',
>>           'options': {
>>             'filterColumnLabel': 'Element',
>>       'ui': {
>>         'allowTyping': false,
>>         'allowMultiple': true,
>>         'selectedValuesLayout': 'belowWrapping',
>>         'labelStacking': 'vertical',
>>         'caption': 'Vælg element'
>>           }
>>           }
>>         });
>>
>>         var filter4 = new google.visualization.**ControlWrapper({
>>           'controlType': 'CategoryFilter',
>>           'containerId': 'control4',
>>           'options': {
>>             'filterColumnLabel': 'Modpart',
>>       'ui': {
>>         'allowTyping': false,
>>         'allowMultiple': true,
>>         'selectedValuesLayout': 'belowWrapping',
>>         'labelStacking': 'vertical',
>>         'caption': 'Vælg modpart'
>>           }
>>           }
>>         });
>>
>>   var table = new google.visualization.**ChartWrapper({
>>     'chartType': 'Table',
>>     'containerId': 'chart2',
>>     'options': {
>>       'width': '900px',
>>       'height': '1200px'
>>     }
>>   });
>>
>>
>>      var map1 = new google.visualization.**ChartWrapper({
>>         'chartType': 'Map',
>>         'containerId': 'map1',
>>         'view': { 'columns': [8, 9]}
>>     });
>>
>>
>>         dashboard.bind([filter, filter2, filter3, filter4], [table,
>> map1]);
>>
>>         dashboard.draw(data);
>>       }
>>     </script>
>>
>>
>> <p> </p>
>>
>> <!--Div that will hold the dashboard-->
>>     <div id="dashboard_div">
>>       <!--Divs that will hold each control and chart-->
>>       <div id="control1"></div>
>>       <div id="control2"></div>
>>       <div id="control3"></div>
>>       <div id="control4"></div>
>>       <div id="chart2"></div>
>>       <div id="map1"></div>
>>     </div>
>>
>>
>> And if you need the link to my spreadsheet:
>> https://docs.google.com/**spreadsheet/ccc?key=0Am7E06r_**
>> 2i5edE80a0MxSUtTUURSaHdicDBNYU**dYVXc&usp=sharing<https://docs.google.com/spreadsheet/ccc?key=0Am7E06r_2i5edE80a0MxSUtTUURSaHdicDBNYUdYVXc&usp=sharing>
>>
>>
>> Cheers
>> Nikolaj
>>
>  --
> 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/7mb7__D7bf0/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
> 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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to