// Path: library/src/main/java/com/mypopsy/maps/internal/PolyLine.java
// final public class PolyLine {
// 
//     private PolyLine() {}
// 
//     public static String encode(StaticMap.GeoPoint[] points) throws IllegalArgumentException {
//         StringBuilder sb = new StringBuilder();
//         int prevLat = 0, prevLng = 0;
//         for (StaticMap.GeoPoint point: points) {
//             if(!point.hasCoordinates()) return null;
//             int lat = (int) (point.latitude()*1E5);
//             int lng = (int) (point.longitude()*1E5);
//             sb.append(encodeSigned(lat - prevLat));
//             sb.append(encodeSigned(lng - prevLng));
//             prevLat = lat;
//             prevLng = lng;
//         }
//         return sb.toString();
//     }
// 
//     private static StringBuilder encodeSigned(int num) {
//         int sgn_num = num << 1;
//         if (num < 0) sgn_num = ~sgn_num;
//         return encode(sgn_num);
//     }
// 
//     private static StringBuilder encode(int num) {
//         StringBuilder buffer = new StringBuilder();
//         while (num >= 0x20) {
//             int nextValue = (0x20 | (num & 0x1f)) + 63;
//             buffer.append((char) (nextValue));
//             num >>= 5;
//         }
//         num += 63;
//         buffer.append((char) (num));
//         return buffer;
//     }
// }
// 
// Path: library/src/main/java/com/mypopsy/maps/internal/UrlBuilder.java
// public class UrlBuilder {
// 
//     private static final String UTF8 = "UTF-8";
//     private final String url;
//     private StringBuilder query;
// 
//     public UrlBuilder(String url) {
//         this.url = url;
//     }
// 
//     public UrlBuilder appendQuery(String key, Object object) {
//         return appendQuery(key, object.toString());
//     }
// 
//     public UrlBuilder appendQuery(String key, @Nullable String value) {
//         if(query == null) query = new StringBuilder();
//         if(query.length() > 0) query.append('&');
//         query.append(encode(key));
//         if(value != null) query.append('=').append(encode(value));
//         return this;
//     }
// 
//     @Override
//     public String toString() {
//         if(query == null || query.length() == 0) return url;
//         return url + '?' + query;
//     }
// 
//     static private String encode(String text) {
//         try {
//             return URLEncoder.encode(text, UTF8);
//         } catch (UnsupportedEncodingException e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


import com.mypopsy.maps.internal.PolyLine;
import com.mypopsy.maps.internal.UrlBuilder;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import static java.lang.Math.asin;
import static java.lang.Math.atan2;
import static java.lang.Math.cos;
import static java.lang.Math.sin;

    /**
     * Force http scheme
     * @return this instance
     */
    public StaticMap http() {
        this.https = false;
        return this;
    }

    /**
     * Force https scheme (default)
     * @return this instance
     */
    public StaticMap https() {
        this.https = true;
        return this;
    }

    /**
     * @see #https()
     * @return true if the current scheme is https
     */
    public boolean isHttps() {
        return https;
    }

    @Override
    public String toString() {

// Path: library/src/main/java/com/mypopsy/maps/internal/PolyLine.java
// final public class PolyLine {
// 
//     private PolyLine() {}
// 
//     public static String encode(StaticMap.GeoPoint[] points) throws IllegalArgumentException {
//         StringBuilder sb = new StringBuilder();
//         int prevLat = 0, prevLng = 0;
//         for (StaticMap.GeoPoint point: points) {
//             if(!point.hasCoordinates()) return null;
//             int lat = (int) (point.latitude()*1E5);
//             int lng = (int) (point.longitude()*1E5);
//             sb.append(encodeSigned(lat - prevLat));
//             sb.append(encodeSigned(lng - prevLng));
//             prevLat = lat;
//             prevLng = lng;
//         }
//         return sb.toString();
//     }
// 
//     private static StringBuilder encodeSigned(int num) {
//         int sgn_num = num << 1;
//         if (num < 0) sgn_num = ~sgn_num;
//         return encode(sgn_num);
//     }
// 
//     private static StringBuilder encode(int num) {
//         StringBuilder buffer = new StringBuilder();
//         while (num >= 0x20) {
//             int nextValue = (0x20 | (num & 0x1f)) + 63;
//             buffer.append((char) (nextValue));
//             num >>= 5;
//         }
//         num += 63;
//         buffer.append((char) (num));
//         return buffer;
//     }
// }
// 
// Path: library/src/main/java/com/mypopsy/maps/internal/UrlBuilder.java
// public class UrlBuilder {
// 
//     private static final String UTF8 = "UTF-8";
//     private final String url;
//     private StringBuilder query;
// 
//     public UrlBuilder(String url) {
//         this.url = url;
//     }
// 
//     public UrlBuilder appendQuery(String key, Object object) {
//         return appendQuery(key, object.toString());
//     }
// 
//     public UrlBuilder appendQuery(String key, @Nullable String value) {
//         if(query == null) query = new StringBuilder();
//         if(query.length() > 0) query.append('&');
//         query.append(encode(key));
//         if(value != null) query.append('=').append(encode(value));
//         return this;
//     }
// 
//     @Override
//     public String toString() {
//         if(query == null || query.length() == 0) return url;
//         return url + '?' + query;
//     }
// 
//     static private String encode(String text) {
//         try {
//             return URLEncoder.encode(text, UTF8);
//         } catch (UnsupportedEncodingException e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


// Path: library/src/main/java/com/mypopsy/maps/StaticMap.java
import com.mypopsy.maps.internal.PolyLine;
import com.mypopsy.maps.internal.UrlBuilder;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import static java.lang.Math.asin;
import static java.lang.Math.atan2;
import static java.lang.Math.cos;
import static java.lang.Math.sin;


    /**
     * Force http scheme
     * @return this instance
     */
    public StaticMap http() {
        this.https = false;
        return this;
    }

    /**
     * Force https scheme (default)
     * @return this instance
     */
    public StaticMap https() {
        this.https = true;
        return this;
    }

    /**
     * @see #https()
     * @return true if the current scheme is https
     */
    public boolean isHttps() {
        return https;
    }

    @Override
    public String toString() {

        UrlBuilder builder = new UrlBuilder(https ? HTTPS : HTTP);