Skip to content

Instantly share code, notes, and snippets.

@nutiteq
Created October 6, 2012 18:08
Show Gist options
  • Save nutiteq/3845668 to your computer and use it in GitHub Desktop.
Save nutiteq/3845668 to your computer and use it in GitHub Desktop.
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;
/**
* Wikipedia articles from Geonames API
* http://www.geonames.org/export/wikipedia-webservice.html
*/
public class WikipediaLayer extends MarkerLayer {
private StyleSet<MarkerStyle> styleSet;
public WikipediaLayer(Projection projection, StyleSet<MarkerStyle> style) {
super(projection);
this.styleSet = style;
}
public void add(Geometry element) {
throw new UnsupportedOperationException();
}
public void remove(Geometry element) {
throw new UnsupportedOperationException();
}
public void calculateVisibleElements(Envelope envelope, int zoom) {
Log.debug("calculateVisibleElements start");
components.vectorTaskPool.execute(new WikipediaTask(
projection, this, modifyLock, envelope, zoom,
styleSet));
Log.debug("calculateVisibleElements end");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment