// // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package cn.creable.ucmap.openGIS; import android.content.Context; import android.graphics.Bitmap; import android.util.AttributeSet; import android.view.GestureDetector.OnDoubleTapListener; import android.view.GestureDetector.OnGestureListener; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.Point; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.util.Hashtable; public class UCMapView extends bL { private bm 驶; private Hashtable 始 = new Hashtable(); private Hashtable 式 = new Hashtable(); public UCMapView(Context var1) { super(var1); bX.驶((dL)null); ba.b(var1); ba.fstrhty1fh(); } public UCMapView(Context var1, AttributeSet var2) { super(var1, var2); bX.驶((dL)null); ba.b(var1); ba.fstrhty1fh(); } public void setListener(OnGestureListener var1, OnDoubleTapListener var2) { this.mGestureHandler.驶(var1, var2); } public static void setTileScale(float var0) { I.士 = var0; } public static void setSynchronizedMode(boolean var0) { aM.示 = var0; } public UCVectorTileLayer addVectorTileLayer(String var1, int var2, boolean var3) { return new UCVectorTileLayer(this.mMap, var1, var2, var3); } public UCRasterLayer addTDMapLayer(String var1, int var2, int var3, String var4) { bX.驶(bK.始); x var7 = cn.creable.ucmap.openGIS.b.b.驶(var1, var2, var3); if (var1.indexOf("_w") != -1) { bX.驶(bK.藛); } if (var4 != null) { dp var5 = new dp(this.getContext(), (String)null, var4); var7.驶(var5); } UCRasterLayer var6; (var6 = new UCRasterLayer(this.mMap, var7)).setName("TDMap"); this.mMap.藡().驶(var6.get()); return var6; } cj 驶(double var1, double var3) { double var5 = var1 * 2.00375083427892E7D / 180.0D; double var7 = Math.log(Math.tan((var3 + 90.0D) * 3.141592653589793D / 360.0D)) / 0.017453292519943295D * 2.00375083427892E7D / 180.0D; return new cj(var5, var7); } public void unbindTileListener(UCRasterLayer var1, UCTileListener var2) { UCMapView.a var3; if ((var3 = (UCMapView.a)this.式.get(var2)) != null) { ((u)var1.get()).藨().士.始(var3); this.式.remove(var3); } } public void bindTileListener(UCRasterLayer var1, UCTileListener var2) { u var4 = (u)var1.get(); UCMapView.a var3 = new UCMapView.a(this, var2); this.式.put(var2, var3); var4.藨().士.驶(var3); } public int download(UCRasterLayer var1, double var2, double var4, double var6, double var8, int var10, int var11) { int var12 = 0; int var13 = 0; int var14 = 0; int var15 = 0; double var16; double var18; if (bX.始 == 0) { var16 = (double)(1 << var11); var18 = 4.00750166855784E7D / var16; cj var20; var12 = (int)(((var20 = this.驶(var2, var8)).驶() + 2.00375083427892E7D) / var18); var14 = (int)((2.00375083427892E7D - var20.始()) / var18); var13 = (int)(((var20 = this.驶(var6, var4)).驶() + 2.00375083427892E7D) / var18); var15 = (int)((2.00375083427892E7D - var20.始()) / var18); } else if (bX.始 == 1) { var16 = (double)(1 << var11); var18 = 360.0D / var16; var12 = (int)((var2 + 180.0D) / var18); var14 = (int)((90.0D - var8) / var18); var13 = (int)((var6 + 180.0D) / var18); var15 = (int)((90.0D - var4) / var18); } u var22; (var22 = (u)var1.get()).藨().示 = false; var22.藨().驶(); int var17 = 0; for(int var23 = var11; var23 >= var10; --var23) { for(int var19 = var12; var19 <= var13; ++var19) { for(int var21 = var14; var21 <= var15; ++var21) { var22.藨().驶(var19, var21, var23); ++var17; } } var12 /= 2; var14 /= 2; var13 /= 2; var15 /= 2; } if (var17 == 0) { return var17; } else { var22.藨().藛(); var22.藛(); return var17; } } public UCRasterLayer addGeoserverLayer(String var1, int var2, int var3, String var4) { bX.驶(bK.藛); x var5 = cn.creable.ucmap.openGIS.b.b.驶(var1, var2, var3); if (var4 != null) { dp var6 = new dp(this.getContext(), (String)null, var4); var5.驶(var6); } UCRasterLayer var7; (var7 = new UCRasterLayer(this.mMap, var5)).setName("Geoserver"); this.mMap.藡().驶(var7.get()); return var7; } public UCRasterLayer addWMTSLayer(String var1, int var2, int var3, String var4) { byte var5 = 0; if (var1.indexOf("EPSG:900913") == -1 && var1.indexOf("epsg:900913") == -1) { if (var1.indexOf("EPSG:4326") != -1 || var1.indexOf("epsg:4326") != -1) { var5 = 2; } } else { var5 = 1; } if (var5 == 0) { return null; } else { bX.驶(bK.藟); x var6 = cn.creable.ucmap.openGIS.b.b.驶(var1, var2, var3); switch(var5) { case 1: bX.驶(bK.藛); break; case 2: default: bX.驶(bK.始); var6.驶(1); } if (var4 != null) { dp var7 = new dp(this.getContext(), (String)null, var4); var6.驶(var7); } UCRasterLayer var8; (var8 = new UCRasterLayer(this.mMap, var6)).setName("WMTS"); this.mMap.藡().驶(var8.get()); return var8; } } public UCRasterLayer addArcgisServerLayer(String var1, int var2, int var3, String var4) { bX.驶(bK.藞); x var5 = cn.creable.ucmap.openGIS.b.b.驶(var1, var2, var3); if (var4 != null) { dp var6 = new dp(this.getContext(), (String)null, var4); var5.驶(var6); } UCRasterLayer var7; (var7 = new UCRasterLayer(this.mMap, var5)).setName("ArcgisServer"); this.mMap.藡().驶(var7.get()); return var7; } public UCRasterLayer addGoogleMapLayer(String var1, int var2, int var3, String var4) { bX.驶(bK.藟); x var5 = cn.creable.ucmap.openGIS.b.b.驶(var1, var2, var3); if (var4 != null) { dp var6 = new dp(this.getContext(), (String)null, var4); var5.驶(var6); } UCRasterLayer var7; (var7 = new UCRasterLayer(this.mMap, var5)).setName("GoogleMap"); this.mMap.藡().驶(var7.get()); return var7; } public void resetGoogleMapLayer(UCRasterLayer var1, String var2, int var3, int var4, String var5) { int var6; if ((var6 = var2.indexOf("?")) == -1) { int var7 = var2.indexOf("="); var6 = var2.lastIndexOf("/", var7); } u var10; (var10 = (u)var1.get()).式.士(); x var8; (var8 = (x)var10.驶).驶(var2.substring(0, var6), var2.substring(var6), var3, var4); if (var5 != null) { dp var9 = new dp(this.getContext(), (String)null, var5); var8.驶(var9); } } public UCRasterLayer addMbtiesLayer(String var1, int var2, int var3) { bX.驶(bK.始); x var4; Envelope var6 = ((bW)(var4 = cn.creable.ucmap.openGIS.b.b.驶(be.驶, this.getContext(), var1, var2, var3)).式).驶(); UCRasterLayer var5; (var5 = new UCRasterLayer(this.mMap, var4, var6)).setName("Mbtiles"); this.mMap.藡().驶(var5.get()); return var5; } public UCRasterLayer addRasterLayer(String var1, int var2, int var3) { bX.驶(bK.始); if (!var1.endsWith(File.separator)) { var1 = var1 + File.separator; } var1 = var1 + "cache1.dat"; x var4 = cn.creable.ucmap.openGIS.b.b.驶(be.始, this.getContext(), var1, var2, var3); UCRasterLayer var5; (var5 = new UCRasterLayer(this.mMap, var4)).setName("UCMapRaster"); this.mMap.藡().驶(var5.get()); return var5; } public void addGeojsonLayer(InputStream var1, String var2, int var3, int var4, String var5, String var6) { this.mMap.始(new dN(this, var1, var2, var4, var5, var6, var3)); } public void addGeojsonLayer(String var1, String var2, int var3, int var4, String var5, String var6) { try { this.addGeojsonLayer((InputStream)(new FileInputStream(var1)), var2, var3, var4, var5, var6); } catch (Exception var7) { var7.printStackTrace(); } } public UCLayer addLocationLayer() { if (this.驶 != null) { return null; } else { this.驶 = new bm(this.mMap); dP var1; (var1 = new dP(this.驶)).setName("Location"); this.驶.驶.驶(ba.驶("olcto__eesarnvir1e")); this.驶.示(false); this.mMap.藡().驶(this.驶); return var1; } } public UCLayer addLocationLayer(int var1) { if (this.驶 != null) { return null; } else { this.驶 = new bm(this.mMap); dP var2; (var2 = new dP(this.驶)).setName("Location"); this.驶.驶.驶(ba.驶("olcto__eesarnvir1e")); ((bn)this.驶.藦).驶(var1); this.驶.示(false); this.mMap.藡().驶(this.驶); return var2; } } public void setLocationPosition(double var1, double var3, double var5) { if (bX.示 != null) { double[] var7; var1 = (var7 = bX.示.to(var1, var3))[0]; var3 = var7[1]; } if (bX.式 != null) { var1 = bX.式.驶(var1); var3 = bX.式.始(var3); } this.驶.示(true); this.驶.驶(var3, var1, var5); } public int getLayerCount() { return this.mMap.藡().size() - 1; } public UCLayer getLayer(int var1) { if (var1 >= 0 && var1 + 1 < this.mMap.藡().size()) { Object var2; return (var2 = this.mMap.藡().驶(var1 + 1).藨) != null ? (UCLayer)var2 : null; } else { return null; } } public UCVectorLayer addVectorLayer() { UCVectorLayer var1 = new UCVectorLayer(this.mMap); this.mMap.藡().驶(var1.get()); return var1; } public UCMarkerLayer addMarkerLayer(UCMarkerLayerListener var1) { UCMarkerLayer var2 = new UCMarkerLayer(this.mMap, var1); this.mMap.藡().驶(var2.get()); return var2; } public UCMarkerLayer addMarkerLayer(UCMarkerLayerListener var1, int var2, int var3) { UCMarkerLayer var4 = new UCMarkerLayer(this.mMap, var1, var2, var3); this.mMap.藡().驶(var4.get()); return var4; } public UCFeatureLayer addFeatureLayer(UCFeatureLayerListener var1) { UCFeatureLayer var2 = new UCFeatureLayer(this.mMap, var1); this.mMap.藡().驶(var2.get()); this.驶(); return var2; } public UCScreenLayer addScreenLayer(Bitmap var1, float var2, float var3, UCScreenLayerListener var4) { UCScreenLayer var5 = new UCScreenLayer(this.mMap, var1, var2, var3, var4); this.mMap.藡().驶(var5.get()); this.驶(); return var5; } public UCScreenLayer addScreenLayer(Bitmap var1, UCMapView.Position var2, float var3, float var4, UCScreenLayerListener var5) { UCScreenLayer var6 = new UCScreenLayer(this.mMap, var1, var2, var3, var4, var5); this.mMap.藡().驶(var6.get()); this.驶(); return var6; } public UCLayer addScaleBar() { return this.addScaleBar(UCMapView.Position.BOTTOM_LEFT); } public UCLayer addScaleBar(UCMapView.Position var1) { Q var2; (var2 = new Q(this.mMap)).驶(cn.creable.ucmap.openGIS.Q.a.始); var2.始(bZ.驶); var2.驶(aF.驶); bA var3 = new bA(this.mMap, var2); dP var4; (var4 = new dP(var3)).setName("ScaleBar"); t var5 = var3.始(); switch(始()[var1.ordinal()]) { case 1: case 2: var2.驶(cn.creable.ucmap.openGIS.bz.b.示); var5.驶(cn.creable.ucmap.openGIS.am.a.始); break; case 3: var2.驶(cn.creable.ucmap.openGIS.bz.b.藛); var5.驶(cn.creable.ucmap.openGIS.am.a.式); case 4: case 5: case 6: default: break; case 7: var2.驶(cn.creable.ucmap.openGIS.bz.b.始); var5.驶(cn.creable.ucmap.openGIS.am.a.藞); break; case 8: var2.驶(cn.creable.ucmap.openGIS.bz.b.驶); var5.驶(cn.creable.ucmap.openGIS.am.a.藟); break; case 9: var2.驶(cn.creable.ucmap.openGIS.bz.b.式); var5.驶(cn.creable.ucmap.openGIS.am.a.藠); } var5.驶(5.0F * this.getResources().getDisplayMetrics().density, 0.0F); this.mMap.藡().驶(var3); return var4; } public void deleteLayer(int var1) { if (var1 >= 0 && var1 + 1 < this.mMap.藡().size()) { if (this.mMap.藡().驶(var1 + 1) instanceof ay) { this.mMap.藡().驶(var1 + 1); } du var2; if (this.mMap.藡().驶(var1 + 1) instanceof du && (var2 = (du)this.mMap.藡().驶(var1 + 1)).式 != null) { var2.式.士(); } this.mMap.藡().始(var1 + 1); } } public void deleteLayer(UCLayer var1) { if (var1 != null) { du var2; if (var1.get() instanceof du && (var2 = (du)var1.get()).式 != null) { var2.式.士(); } this.mMap.藡().remove(var1.get()); } } public void moveLayer(int var1, int var2) { if (var1 != var2) { if (var1 >= 0 && var1 + 1 < this.mMap.藡().size()) { if (var2 >= 0 && var2 + 1 < this.mMap.藡().size()) { bc var3 = this.mMap.藡().驶(var1 + 1); ++var1; ++var2; if (var1 > var2) { for(var1 = this.mMap.藡().size() - 1; var1 > var2; --var1) { this.mMap.藡().始(var1, this.mMap.藡().驶(var1 - 1)); } this.mMap.藡().始(var2, var3); } else if (var1 < var2) { System.out.println(this.mMap.藡()); for(var1 = var1; var1 < var2; ++var1) { this.mMap.藡().始(var1, this.mMap.藡().驶(var1 + 1)); } this.mMap.藡().始(var2, var3); } this.驶(); } } } } public void moveLayer(UCLayer var1, int var2) { if (var1 != null) { if (var2 >= 0 && var2 + 1 < this.mMap.藡().size()) { bc var4 = (bc)var1.get(); int var3 = this.mMap.藡().indexOf(var4); ++var2; if (var3 > var2) { for(var3 = this.mMap.藡().size() - 1; var3 > var2; --var3) { this.mMap.藡().始(var3, this.mMap.藡().驶(var3 - 1)); } this.mMap.藡().始(var2, var4); } else if (var3 < var2) { System.out.println(this.mMap.藡()); for(var3 = var3; var3 < var2; ++var3) { this.mMap.藡().始(var3, this.mMap.藡().驶(var3 + 1)); } this.mMap.藡().始(var2, var4); } this.驶(); } } } public void setLayerVisible(int var1, boolean var2) { if (var1 >= 0 && var1 + 1 < this.mMap.藡().size()) { this.mMap.藡().驶(var1 + 1).示(var2); this.驶(); } } public void setLayerVisible(UCLayer var1, boolean var2) { if (var1 != null) { ((bc)var1.get()).示(var2); this.驶(); } } public boolean getLayerVisible(int var1) { return var1 >= 0 && var1 + 1 < this.mMap.藡().size() ? this.mMap.藡().驶(var1 + 1).藡() : false; } public boolean getLayerVisible(UCLayer var1) { return ((bc)var1.get()).藡(); } public void moveTo(double var1, double var3, double var5) { if (bX.示 != null) { double[] var7; var1 = (var7 = bX.示.to(var1, var3))[0]; var3 = var7[1]; } if (bX.式 != null) { var1 = bX.式.驶(var1); var3 = bX.式.始(var3); var5 *= (double)(1 << bX.式.驶()); } this.mMap.驶(var3, var1, var5); } public void moveTo(double var1, double var3, double var5, float var7, float var8) { if (bX.示 != null) { double[] var10; var1 = (var10 = bX.示.to(var1, var3))[0]; var3 = var10[1]; } if (bX.式 != null) { var1 = bX.式.驶(var1); var3 = bX.式.始(var3); var5 *= (double)(1 << bX.式.驶()); } bx var9; (var9 = new bx(var3, var1, var5)).始(var7); var9.驶(var8); this.mMap.驶(var9); } public void zoomTo(double var1) { if (bX.式 != null) { var1 *= (double)(1 << bX.式.驶()); } bx var3 = this.mMap.藟(); this.mMap.驶(var3.示(), var3.士(), var1); } public void zoomTo(int var1) { if (bX.式 != null) { var1 += 1 << bX.式.驶(); } bx var2; (var2 = this.mMap.藟()).驶(var1); this.mMap.驶(var2); } public Point getPosition() { bx var1 = this.mMap.藟(); if (bX.式 != null) { double var7 = bX.式.式(var1.士()); double var4 = bX.式.示(var1.示()); if (bX.示 != null) { double[] var6; var7 = (var6 = bX.示.from(var7, var4))[0]; var4 = var6[1]; } return aP.驶.createPoint(new Coordinate(var7, var4)); } else if (bX.示 != null) { double[] var2 = bX.示.from(var1.士(), var1.示()); return aP.驶.createPoint(new Coordinate(var2[0], var2[1])); } else { return aP.驶.createPoint(new Coordinate(var1.士(), var1.示())); } } public float getAngle() { bx var1; return (var1 = this.mMap.藟()).示 < 0.0F ? var1.示 + 360.0F : var1.示; } public double getScale() { bx var1 = this.mMap.藟(); return bX.式 != null ? var1.驶() / (double)(1 << bX.式.驶()) : var1.驶(); } public double getZoomScale() { return this.getScale(); } public int getZoomLevel() { bx var1 = this.mMap.藟(); return bX.式 != null ? var1.始() - bX.式.驶() : var1.始(); } public void animateTo(long var1, double var3, double var5, double var7) { if (bX.示 != null) { double[] var9; var3 = (var9 = bX.示.to(var3, var5))[0]; var5 = var9[1]; } if (bX.式 != null) { var3 = bX.式.驶(var3); var5 = bX.式.始(var5); var7 *= (double)(1 << bX.式.驶()); } bx var10 = new bx(var5, var3, var7); this.mMap.藦().驶(var1, var10); } public void animateTo(long var1, double var3, double var5, double var7, float var9, float var10) { if (bX.示 != null) { double[] var11; var3 = (var11 = bX.示.to(var3, var5))[0]; var5 = var11[1]; } if (bX.式 != null) { var3 = bX.式.驶(var3); var5 = bX.式.始(var5); var7 *= (double)(1 << bX.式.驶()); } bx var12; (var12 = new bx(var5, var3, var7)).始(var9); var12.驶(var10); this.mMap.藦().驶(var1, var12); } public Point toMapPoint(float var1, float var2) { an var8 = this.mMap.藠().始(var1, var2); if (bX.式 != null) { double var10 = bX.式.式(var8.始()); double var6 = bX.式.示(var8.驶()); if (bX.示 != null) { double[] var9; var10 = (var9 = bX.示.from(var10, var6))[0]; var6 = var9[1]; } return aP.驶.createPoint(new Coordinate(var10, var6)); } else if (bX.示 != null) { double[] var4 = bX.示.from(var8.始(), var8.驶()); return aP.驶.createPoint(new Coordinate(var4[0], var4[1])); } else { return aP.驶.createPoint(new Coordinate(var8.始(), var8.驶())); } } public Point fromMapPoint(double var1, double var3) { if (bX.示 != null) { double[] var5; var1 = (var5 = bX.示.to(var1, var3))[0]; var3 = var5[1]; } if (bX.式 != null) { var1 = bX.式.驶(var1); var3 = bX.式.始(var3); } double var9 = bX.示(var1); double var7 = bX.驶(var3); cj var10 = new cj(); this.mMap.藠().驶(var9, var7, false, var10); return aP.驶.createPoint(new Coordinate(var10.驶, var10.始)); } public void setBackgroundColor(int var1) { by.驶(var1); } public void setCoordinateFilter(UCCoordinateFilter var1) { bX.驶(var1); } public UCCoordinateFilter getCoordinateFilter() { return bX.驶(); } public void setMinScale(double var1) { if (bX.式 != null) { var1 *= (double)(1 << bX.式.驶()); } this.mMap.藠().藟 = var1; } public void setMaxScale(double var1) { if (bX.式 != null) { var1 *= (double)(1 << bX.式.驶()); } this.mMap.藠().藞 = var1; } public UCFeatureLayer getMaskLayer() { return this.mMap.藨; } public void rotation(boolean var1) { this.mMap.驶().驶(var1); } public boolean rotation() { return this.mMap.驶().a_(); } public void tilt(boolean var1) { this.mMap.驶().始(var1); } public boolean tilt() { return this.mMap.驶().始(); } public void move(boolean var1) { this.mMap.驶().式(var1); } public boolean move() { return this.mMap.驶().式(); } public void refresh() { if (!this.mMap.藦().式()) { bx var1; bx var10000 = var1 = this.mMap.藟(); var10000.驶 += 1.0E-13D; this.mMap.驶(var1); } } public void refresh(Envelope var1) { this.refresh(0L, var1); } public void bind(UCMapViewListener var1) { UCMapView.b var2 = new UCMapView.b(this, var1); this.始.put(var1, var2); this.mMap.藥.驶(var2); } public void unbind(UCMapViewListener var1) { UCMapView.b var2; if ((var2 = (UCMapView.b)this.始.get(var1)) != null) { this.mMap.藥.始(var2); this.始.remove(var2); } } public void refresh(long var1, Envelope var3) { if (bX.示 != null) { double[] var4; double var5 = (var4 = bX.示.to(var3.getMinX(), var3.getMinY()))[0]; double var7 = var4[1]; double var9 = (var4 = bX.示.to(var3.getMaxX(), var3.getMaxY()))[0]; double var11 = var4[1]; var3.init(var5, var9, var7, var11); } if (bX.式 != null) { double var13 = bX.式.驶(var3.getMinX()); double var6 = bX.式.始(var3.getMinY()); double var8 = bX.式.驶(var3.getMaxX()); double var10 = bX.式.始(var3.getMaxY()); var3.init(var13, var8, var6, var10); } this.mMap.藦().驶(var1, new y(var3.getMinY(), var3.getMinX(), var3.getMaxY(), var3.getMaxX())); } public String getVersion() { return "2.8.0"; } public static native String getCertID(Context var0); void 驶() { boolean var1 = false; for(int var2 = this.mMap.藡().size() - 1; var2 > 0; --var2) { bc var3; if ((var3 = this.mMap.藡().驶(var2)) instanceof aM && var3.藡()) { if (!var1) { ((aM)var3).士 = true; } else { ((aM)var3).士 = false; } var1 = true; } } } class a implements cn.creable.ucmap.openGIS.dw.b { private UCTileListener 驶; a(UCMapView var1, UCTileListener var2) { this.驶 = var2; } public void 驶(W var1, bC var2) { this.驶.onTileEvent(var2.toString()); var2.士(); } } class b implements cn.creable.ucmap.openGIS.br.b { private UCMapViewListener 驶; b(UCMapView var1, UCMapViewListener var2) { this.驶 = var2; } public void 驶(W var1, bx var2) { this.驶.onMapViewEvent(); } } public static enum Position { TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT, CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT; private Position() { } } }
bL
bL$a
bL$b
>>Map控件:主要功能包括显示、刷新