KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.

GeoChart Markers not working #1606

Closed pargibay opened this topic on on Aug 31 - 7 comments

pargibay commented on Aug 31

Hi, I have tried drawing a map with markers but it doesn't work, it just doesn't show the markers. I have tried the sample code and it doesn't work Regards

David Winterburn commented on Sep 1

Would you please post your php code for the report's setup and view as well as some screenshots of the error if there is. Thanks!

pargibay commented on Sep 1

Hi David,


    use \koolreport\widgets\google\GeoChart;
    use \koolreport\inputs\Select2;
    use \koolreport\clients\Bootstrap;   
    use \koolreport\inputs\DateRangePicker;
<div class="report-content">
    <div class="text-center">
        <p class="lead">Selecciona el rango de fechas</p>
    <form method="post">
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                <div class="form-group text-center">
                    <button class="btn btn-success"><i class="glyphicon glyphicon-refresh"></i> Actualizar</button>

            "showTooltip"=> true,
            "showInfoWindow"=> true,
            "colorAxis" => ["colors"=> ['#adffb2','green']]    
    "title"=>"World Polulation 2016",
        ['City',   'Population', 'Area'],
        ['Rome',      2761477,    1285.31],
        ['Milan',     1324110,    181.76],
        ['Naples',    959574,     117.27],
        ['Turin',     907563,     130.17],
        ['Palermo',   655875,     158.9],
        ['Genoa',     607906,     243.60],
        ['Bologna',   380181,     140.7],
        ['Florence',  371282,     102.41],
        ['Fiumicino', 67370,      213.44],
        ['Anzio',     52192,      43.43],
        ['Ciampino',  38262,      11]
    'mapsApiKey'=> 'your-google-key-map',
        "displayMode" => 'markers',
        "colorAxis" => ["colors"=> ['green', 'blue']]
        <div class="alert alert-warning">
            <i class="glyphicon glyphicon-info-sign"></i> Lo sentimos. No hay datos para mostrar en las fechas seleccionadas.



// Require autoload.php from koolreport library
require APPPATH."../vendor/autoload.php";

//Define the class
class Test extends \koolreport\KoolReport{
    use \koolreport\codeigniter\Friendship;
    use \koolreport\inputs\Bindable;
    use \koolreport\inputs\POSTBinding;

    protected function defaultParamValues(){
        return array(

    protected function bindParamsToInputs(){
        return array(

    public function setup()
///producto final
        ->query("SELECT countries.name country, SUM(kg)/1000 tn ,SUM(kg*pu) ingresos FROM ventas JOIN clientes ON ventas.cliente=clientes.CodCliente JOIN countries ON clientes.country=countries.id WHERE fecha BETWEEN :start AND :end GROUP BY countries.id ") 


the output is:

Thanks Regards

David Winterburn commented on Sep 1

This is strange. I copy your 2nd Geochart code which has displayMode=markers and put in our Google maps api key. The geochart shows markers well. Please try to retrieve a new maps api key:


Then put it in this line of your geochart code:

    'mapsApiKey'=> $yourNewMapsApiKey, //

Let us know the result. Thanks!

pargibay commented on Sep 1

Hi David,

I have generated a new api key but I get the same result


David Winterburn commented on Sep 3

Please open your browser's deveoper tool (F12) to see if there's any error (red lines). You can also email us your free maps api key for us to test it for you.

David Winterburn commented on Sep 4


We've received your maps api key via email and tested it. Checking developer tool console we find that the reason the marker geochart doesn't work with your api keys is because of this error:

Google Maps JavaScript API error: ApiNotActivatedMapError

Please following this error code documentation to enable the Maps JavaScript API under APIs in the Google Cloud Platform Console first:


Then try Geochart again to see if it works. Thanks!

pargibay commented on Sep 8

Hi David,

Now it works!

I had to enable geocoding, geolocating and billing for it to work.

thank you so mutch


Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo