<commit_before>package com.nutiteq.advancedmap3;

import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import com.nutiteq.advancedmap3.listener.MyMapEventListener;
import com.nutiteq.core.MapPos;
import com.nutiteq.core.MapRange;
import com.nutiteq.datasources.HTTPTileDataSource;
import com.nutiteq.datasources.LocalVectorDataSource;
import com.nutiteq.layers.UTFGridRasterTileLayer;
import com.nutiteq.layers.VectorLayer;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

/**
 * A sample demonstrating how to use CartoDB Maps API with Raster tiles and UTFGrid
 */
public class CartoDBUTFGridActivity extends VectorMapSampleBaseActivity {

    private String layerGroupID = "";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // MapSampleBaseActivity creates and configures mapView  
        super.onCreate(savedInstanceState);

        // define server config

        try {

            // you need to change these according to your DB

            String cartoDbAccount = "nutiteq";
            String sql = "select * from stations_1";
            String statTag = "3c6f224a-c6ad-11e5-b17e-0e98b61680bf";
            String[] columns = new String[]{"name","field_9","slot"};
            String cartoCss =
                    "/** category visualization */\n" +
                    "\n" +
                    "#stations_1 {\n" +
                    "   marker-fill-opacity: 0.9;\n" +
                    "   marker-line-color: #FFF;\n" +
                    "   marker-line-width: 2;\n" +
                    "   marker-line-opacity: 1;\n" +
                    "   marker-placement: point;\n" +
                    "   marker-type: ellipse;\n" +
                    "   marker-width: 10;\n" +
                    "   marker-allow-overlap: true;\n" +
                    "}\n" +
                    "\n" +
                    "#stations_1[field_7=\"In Service\"] {\n" +
                    "   marker-fill: #0F3B82;\n" +
                    "}\n" +
                    "#stations_1[field_7=\"Not In Service\"] {\n" +
                    "   marker-fill: #aaaaaa;\n" +
                    "}\n" +
                    "\n" +
                    "#stations_1 [ field_9 = 200] {\n" +
                    "   marker-width: 80.0;\n" +
                    "}\n" +
                    "\n" +
                    "#stations_1 [ field_9 <= 49] {\n" +
                    "   marker-width: 25.0;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 38] {\n" +
                    "   marker-width: 22.8;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 34] {\n" +
                    "   marker-width: 20.6;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 29] {\n" +
                    "   marker-width: 18.3;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 25] {\n" +
                    "   marker-width: 16.1;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 20.5] {\n" +
                    "   marker-width: 13.9;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 16] {\n" +
                    "   marker-width: 11.7;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 12] {\n" +
                    "   marker-width: 9.4;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 8] {\n" +
                    "   marker-width: 7.2;\n" +
                    "}\n" +
                    "#stations_1 [ field_9 <= 4] {\n" +
                    "   marker-width: 5.0;\n" +
                    "}";


            // you probably do not need to change much of below
            JSONObject configJson = new JSONObject();

            configJson.put("version", "1.0.1");
            configJson.put("stat_tag", statTag);

            JSONArray layersArrayJson = new JSONArray();
            JSONObject layersJson = new JSONObject();
            layersJson.put("type", "cartodb");

            JSONObject optionsJson = new JSONObject();
            optionsJson.put("sql", sql);
            optionsJson.put("cartocss", cartoCss);
            optionsJson.put("cartocss_version", "2.1.1");
            JSONArray interactivityJson = new JSONArray();
            interactivityJson.put("cartodb_id");
            optionsJson.put("interactivity", interactivityJson);<commit_msg>test PR push<commit_after>package com.nutiteq.advancedmap3;

import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import com.nutiteq.advancedmap3.listener.MyMapEventListener;
import com.nutiteq.core.MapPos;
import com.nutiteq.core.MapRange;
import com.nutiteq.datasources.HTTPTileDataSource;
import com.nutiteq.datasources.LocalVectorDataSource;
import com.nutiteq.layers.UTFGridRasterTileLayer;
import com.nutiteq.layers.VectorLayer;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

/**
 * A sample demonstrating how to use CartoDB Maps API with Raster tiles and UTFGrid
 */
public class CartoDBUTFGridActivity extends VectorMapSampleBaseActivity {

    private String layerGroupID = "";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // MapSampleBaseActivity creates and configures mapView  
        super.onCreate(savedInstanceState);

        // define server config

        try {

            // you need to change these according to your DB

            String cartoDbAccount = "nutiteq";
            String sql = "select * from stations_1";
            String statTag = "3c6f224a-c6ad-11e5-b17e-0e98b61680bf";
            String[] columns = new String[]{"name","field_9","slot"};
            String cartoCss =
                    "#stations_1{marker-fill-opacity:0.9;marker-line-color:#FFF;marker-line-width:2;marker-line-opacity:1;marker-placement:point;marker-type:ellipse;marker-width:10;marker-allow-overlap:true;}\n" +
                            "#stations_1[field_7='In Service']{marker-fill:#0F3B82;}\n" +
                            "#stations_1[field_7='Not In Service']{marker-fill:#aaaaaa;}\n" +
                            "#stations_1 [ field_9 = 200]{marker-width:80.0;}\n" +
                            "#stations_1 [ field_9 <= 49]{marker-width:25.0;}\n" +
                            "#stations_1 [ field_9 <= 38]{marker-width:22.8;}\n" +
                            "#stations_1 [ field_9 <= 34]{marker-width:20.6;}\n" +
                            "#stations_1 [ field_9 <= 29]{marker-width:18.3;}\n" +
                            "#stations_1 [ field_9 <= 25]{marker-width:16.1;}\n" +
                            "#stations_1 [ field_9 <= 20.5]{marker-width:13.9;}\n" +
                            "#stations_1 [ field_9 <= 16]{marker-width:11.7;}\n" +
                            "#stations_1 [ field_9 <= 12]{marker-width:9.4;}\n" +
                            "#stations_1 [ field_9 <= 8]{marker-width:7.2;}\n" +
                            "#stations_1 [ field_9 <= 4]{marker-width:5.0;}";

            // you probably do not need to change much of below
            JSONObject configJson = new JSONObject();

            configJson.put("version", "1.0.1");
            configJson.put("stat_tag", statTag);

            JSONArray layersArrayJson = new JSONArray();
            JSONObject layersJson = new JSONObject();
            layersJson.put("type", "cartodb");

            JSONObject optionsJson = new JSONObject();
            optionsJson.put("sql", sql);
            optionsJson.put("cartocss", cartoCss);
            optionsJson.put("cartocss_version", "2.1.1");
            JSONArray interactivityJson = new JSONArray();
            interactivityJson.put("cartodb_id");
            optionsJson.put("interactivity", interactivityJson);
{'fraction_non_alphanumeric': 0.1299868216125554, 'fraction_numerical': 0.028273631244758596, 'mean_word_length': 1.7289964040536123, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1796639', 'n_tokens_mistral': 2608, 'n_tokens_neox': 2436, 'n_words': 459}