0
votes

I have 48 coordinates/markers in 1 column/row.

When I double-click in that row and open preview KML link, it shows 48 coordinates.

But when I create my own map and show that marker using fusion tables and SQL queries, the map only shows 3 markers.

Why is the output different in Fusion tables versus my own map?

Or, is there any technical limitation when using Google Fusion and Map APIs

Thanks Guys

------------------EDIT-------------------

in coordinate column [Koordinat Pohon] in rowid 17001 actualy it has 48 coordinate but it only show 3 coordinate in my own map.

TABLE ID : 1O5aIPnHBCimWsYg0gOXIeRH6eL-6byD95Nd2pdXR

ROW ID : 17001

<!DOCTYPE html>
<?php

    $id=$_GET['id'];

?>
<input type="hidden" value="<?php echo $id;?>" id="rowid"/>
<html>
    <head>
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
        <meta charset="utf-8">
        <title>Fusion Tables queries</title>
        <style>
            html, body, #map-canvas {
            height: 100%;
            margin: 0px;
            padding: 0px
            }
        </style>
        <script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
        <script>
            var rowid=document.getElementById("rowid").value;
            var map;

            function initialize() {
                var centerMAP = new google.maps.LatLng(-7.402438, 110.446957);

                map = new google.maps.Map(document.getElementById('map-canvas'), {
                    center: centerMAP,
                    zoom: 16,
                    mapTypeId: google.maps.MapTypeId.SATELLITE
                });

                var layer = new google.maps.FusionTablesLayer({
                    query: {
                        select:"Koordinat Pohon",
                        from: "1O5aIPnHBCimWsYg0gOXIeRH6eL-6byD95Nd2pdXR",
                        where: "rowid = "+rowid
                    }
                });
                layer.setMap(map);
            }

            google.maps.event.addDomListener(window, 'load', initialize);

        </script>
    </head>
    <body>
        <div id="map-canvas"></div>
    </body>
</html>
<?php

?>
1
your query would be interesting, how do you process the returned data? - Dr.Molle
If you do a "publish:Get HTML and Javascript", then open that in a browser, does it "work"? - geocodezip
@Dr.Molle I just using simple example from developers.google.com/fusiontables/docs/samples/… and custom the query [where: "ROWID = "+rowid] because the coordinates only in one row and column. It's works but not showing all the marker - Dbramedya
@geocodezip i try to view map from google fusion tab, but it still not showing all the marker i want. how to make preview KML like if i click the location row and click the "preview KML" link - Dbramedya
If you don't see the markers with the FusionTables UI, that would be a problem. Can you provide the id of the Fusion Table (or of a sample one you have created that exhibits the issue)? Can you provide the code you are using? A Minimal, Complete, Tested and Readable example would be useful. - geocodezip

1 Answers

0
votes

When I use your code I don't see 3(as mentioned) or 48(as expected) markers, I see 10 markers.

The reason may be found at https://developers.google.com/maps/documentation/javascript/fusiontableslayer#limits

When looking at the map, you may notice: The ten largest-area components of a multi-geometry are shown.

The KML is a multi-geometry, the number of features that will be shown is limited to 10

What you can do:

  • store only single points in a column
  • ommit the FusionTablesLayer and instead request the geometry via AJAX and create the markers on your own