Skip to content

Instantly share code, notes, and snippets.

@nutiteq
nutiteq / DefaultLabel.java
Last active October 11, 2015 03:57
DefaultLabel.java
package com.nutiteq.ui;
import java.util.LinkedList;
import java.util.List;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Paint.Style;
import android.graphics.Path;
@nutiteq
nutiteq / Projection.java
Created October 5, 2012 15:38
Nutiteq SDK source
package com.nutiteq.projections;
import com.jhlabs.map.Point2D.Double;
import com.jhlabs.map.proj.ProjectionFactory;
import com.nutiteq.components.Bounds;
import com.nutiteq.components.ImmutableMapPos;
import com.nutiteq.components.MapPos;
import com.nutiteq.utils.Const;
public class Projection {
@nutiteq
nutiteq / WikipediaLayer.java
Created October 6, 2012 18:08
Wikipedia Layer for Nutiteq 3D maps SDK
package com.nutiteq.app.layers;
import com.nutiteq.log.Log;
import com.nutiteq.projections.Projection;
import com.nutiteq.style.MarkerStyle;
import com.nutiteq.style.StyleSet;
import com.nutiteq.vectorlayers.MarkerLayer;
import com.vividsolutions.jts.geom.Envelope;
import com.vividsolutions.jts.geom.Geometry;
@nutiteq
nutiteq / WikipediaTask.java
Created October 6, 2012 18:10
Wikipedia Layer for Nutiteq 3D maps SDK - task to download data
package com.nutiteq.app.layers;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;
import org.json.JSONArray;
@nutiteq
nutiteq / LabelOverlayListener.java
Created October 6, 2012 18:28
Nutiteq map SDK label sample
package com.nutiteq.app.listeners;
import javax.microedition.khronos.opengles.GL10;
import org.json.JSONObject;
import android.app.Activity;
import android.view.View;
import android.webkit.WebView;
package com.nutiteq.app.layers;
import com.nutiteq.components.MapPos;
import com.vividsolutions.jts.geom.Envelope;
public class TileUtils {
private static final double TILESIZE = 256;
private static final double initialResolution = 2.0f * Math.PI * 6378137.0f
/ TILESIZE;
@nutiteq
nutiteq / TMSMapLayer.java
Created October 19, 2012 09:51
TMSMapLayer.java
package com.nutiteq.rasterlayers;
/**
* A raster layer class that uses an URL as a source for the map tile data. The request are generate in this manner:
* <p>
* <p>
* baseUrl + zoom + separator + x + separator + y + format
* <p>
* <p>
* For example if: baseUrl = "http://tile.openstreetmap.org/", separator = "/", format = ".png"
@nutiteq
nutiteq / WfsTask.java
Created October 19, 2012 14:24
WfsTask.java - geometry layer sample task
package com.nutiteq.app.layers;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.LinkedList;
@nutiteq
nutiteq / SimpleScaleBar.java
Created October 23, 2012 19:45
SimpleScaleBar.java (Nutiteq old SDK)
package com.nutiteq.ui;
import henson.midp.Float11;
import com.nutiteq.wrappers.Font;
import com.nutiteq.wrappers.Graphics;
@nutiteq
nutiteq / NetFetchTileTask.java
Created October 29, 2012 21:04
NetFetchTileTask.java
package com.nutiteq.tasks;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;