remove LineSymbol
This commit is contained in:
parent
46b2eb2a3e
commit
c7805c82c6
@ -44,7 +44,6 @@ import org.oscim.theme.styles.AreaStyle;
|
|||||||
import org.oscim.theme.styles.CircleStyle;
|
import org.oscim.theme.styles.CircleStyle;
|
||||||
import org.oscim.theme.styles.ExtrusionStyle;
|
import org.oscim.theme.styles.ExtrusionStyle;
|
||||||
import org.oscim.theme.styles.LineStyle;
|
import org.oscim.theme.styles.LineStyle;
|
||||||
import org.oscim.theme.styles.LineSymbol;
|
|
||||||
import org.oscim.theme.styles.RenderStyle;
|
import org.oscim.theme.styles.RenderStyle;
|
||||||
import org.oscim.theme.styles.SymbolStyle;
|
import org.oscim.theme.styles.SymbolStyle;
|
||||||
import org.oscim.theme.styles.TextStyle;
|
import org.oscim.theme.styles.TextStyle;
|
||||||
@ -383,11 +382,6 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
|
|||||||
public void renderAreaSymbol(SymbolStyle symbol) {
|
public void renderAreaSymbol(SymbolStyle symbol) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void renderWaySymbol(LineSymbol symbol) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderExtrusion(ExtrusionStyle extrusion, int level) {
|
public void renderExtrusion(ExtrusionStyle extrusion, int level) {
|
||||||
int height = 0;
|
int height = 0;
|
||||||
|
@ -23,7 +23,6 @@ import org.oscim.theme.styles.AreaStyle;
|
|||||||
import org.oscim.theme.styles.CircleStyle;
|
import org.oscim.theme.styles.CircleStyle;
|
||||||
import org.oscim.theme.styles.ExtrusionStyle;
|
import org.oscim.theme.styles.ExtrusionStyle;
|
||||||
import org.oscim.theme.styles.LineStyle;
|
import org.oscim.theme.styles.LineStyle;
|
||||||
import org.oscim.theme.styles.LineSymbol;
|
|
||||||
import org.oscim.theme.styles.RenderStyle;
|
import org.oscim.theme.styles.RenderStyle;
|
||||||
import org.oscim.theme.styles.SymbolStyle;
|
import org.oscim.theme.styles.SymbolStyle;
|
||||||
import org.oscim.theme.styles.TextStyle;
|
import org.oscim.theme.styles.TextStyle;
|
||||||
@ -136,14 +135,6 @@ public interface IRenderTheme {
|
|||||||
*/
|
*/
|
||||||
void renderWay(LineStyle line, int level);
|
void renderWay(LineStyle line, int level);
|
||||||
|
|
||||||
/**
|
|
||||||
* Renders a way with the given symbol along the way path.
|
|
||||||
*
|
|
||||||
* @param symbol
|
|
||||||
* the symbol to be rendered.
|
|
||||||
*/
|
|
||||||
void renderWaySymbol(LineSymbol symbol);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders a way with the given text along the way path.
|
* Renders a way with the given text along the way path.
|
||||||
*
|
*
|
||||||
|
@ -47,7 +47,6 @@ import org.oscim.theme.styles.CircleStyle;
|
|||||||
import org.oscim.theme.styles.ExtrusionStyle;
|
import org.oscim.theme.styles.ExtrusionStyle;
|
||||||
import org.oscim.theme.styles.LineStyle;
|
import org.oscim.theme.styles.LineStyle;
|
||||||
import org.oscim.theme.styles.LineStyle.LineBuilder;
|
import org.oscim.theme.styles.LineStyle.LineBuilder;
|
||||||
import org.oscim.theme.styles.LineSymbol;
|
|
||||||
import org.oscim.theme.styles.RenderStyle;
|
import org.oscim.theme.styles.RenderStyle;
|
||||||
import org.oscim.theme.styles.SymbolStyle;
|
import org.oscim.theme.styles.SymbolStyle;
|
||||||
import org.oscim.theme.styles.TextStyle;
|
import org.oscim.theme.styles.TextStyle;
|
||||||
@ -238,11 +237,6 @@ public class XmlThemeBuilder extends DefaultHandler {
|
|||||||
checkState(localName, Element.RENDERING_INSTRUCTION);
|
checkState(localName, Element.RENDERING_INSTRUCTION);
|
||||||
handleLineElement(localName, attributes, false);
|
handleLineElement(localName, attributes, false);
|
||||||
|
|
||||||
} else if ("lineSymbol".equals(localName)) {
|
|
||||||
checkState(localName, Element.RENDERING_INSTRUCTION);
|
|
||||||
LineSymbol lineSymbol = createLineSymbol(localName, attributes);
|
|
||||||
mCurrentRule.addStyle(lineSymbol);
|
|
||||||
|
|
||||||
} else if ("text".equals(localName)) {
|
} else if ("text".equals(localName)) {
|
||||||
checkState(localName, Element.RENDERING_INSTRUCTION);
|
checkState(localName, Element.RENDERING_INSTRUCTION);
|
||||||
String style = attributes.getValue("use");
|
String style = attributes.getValue("use");
|
||||||
@ -437,7 +431,8 @@ public class XmlThemeBuilder extends DefaultHandler {
|
|||||||
/**
|
/**
|
||||||
* @return a new Area with the given rendering attributes.
|
* @return a new Area with the given rendering attributes.
|
||||||
*/
|
*/
|
||||||
private AreaStyle createArea(AreaStyle area, String elementName, Attributes attributes, int level) {
|
private AreaStyle createArea(AreaStyle area, String elementName, Attributes attributes,
|
||||||
|
int level) {
|
||||||
AreaBuilder b = mAreaBuilder.set(area);
|
AreaBuilder b = mAreaBuilder.set(area);
|
||||||
b.level(level);
|
b.level(level);
|
||||||
|
|
||||||
@ -743,35 +738,6 @@ public class XmlThemeBuilder extends DefaultHandler {
|
|||||||
return new CircleStyle(radius, scaleRadius, fill, stroke, strokeWidth, level);
|
return new CircleStyle(radius, scaleRadius, fill, stroke, strokeWidth, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return a new LineSymbol with the given rendering attributes.
|
|
||||||
*/
|
|
||||||
private static LineSymbol createLineSymbol(String elementName, Attributes attributes) {
|
|
||||||
String src = null;
|
|
||||||
boolean alignCenter = false;
|
|
||||||
boolean repeat = false;
|
|
||||||
|
|
||||||
for (int i = 0; i < attributes.getLength(); ++i) {
|
|
||||||
String name = attributes.getLocalName(i);
|
|
||||||
String value = attributes.getValue(i);
|
|
||||||
|
|
||||||
if ("src".equals(name))
|
|
||||||
src = value;
|
|
||||||
|
|
||||||
else if ("align-center".equals(name))
|
|
||||||
alignCenter = Boolean.parseBoolean(value);
|
|
||||||
|
|
||||||
else if ("repeat".equals(name))
|
|
||||||
repeat = Boolean.parseBoolean(value);
|
|
||||||
|
|
||||||
else
|
|
||||||
logUnknownAttribute(elementName, name, value, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
validateExists("src", src, elementName);
|
|
||||||
return new LineSymbol(src, alignCenter, repeat);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a new Symbol with the given rendering attributes.
|
* @return a new Symbol with the given rendering attributes.
|
||||||
*/
|
*/
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010, 2011, 2012 mapsforge.org
|
|
||||||
* Copyright 2013 Hannes Janetzek
|
|
||||||
*
|
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify it under the
|
|
||||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
|
||||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
||||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.oscim.theme.styles;
|
|
||||||
|
|
||||||
import org.oscim.theme.IRenderTheme.Callback;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents an icon along a polyline on the map.
|
|
||||||
*/
|
|
||||||
public final class LineSymbol extends RenderStyle {
|
|
||||||
|
|
||||||
public final boolean alignCenter;
|
|
||||||
// public final Bitmap bitmap;
|
|
||||||
public final boolean repeat;
|
|
||||||
public final String bitmap;
|
|
||||||
|
|
||||||
public LineSymbol(String src, boolean alignCenter, boolean repeat) {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.bitmap = src;
|
|
||||||
// this.bitmap = BitmapUtils.createBitmap(src);
|
|
||||||
this.alignCenter = alignCenter;
|
|
||||||
this.repeat = repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void renderWay(Callback renderCallback) {
|
|
||||||
renderCallback.renderWaySymbol(this);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user