假设我在android mapView
上制作了一个图表,例如一个圆圈。现在我想删除/屏蔽/隐藏
除该部分之外的所有其他 map 。我也可以放大该部分
这可能吗?
最诚挚的问候
最佳答案
我在某些区域内制作 map View 时遇到类似的问题。不确定它是否对您有帮助,但您可以尝试一下。
您应该做的是拍摄圆形图像(背景是透明的)并将您的图像作为线性布局的背景。在 LinearLayout 中您可以放置 map View 。
您的xml将如下所示。
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/Circle_back" >
<com.google.android.maps.MapView
android:id="@+id/whereami_mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="YOUR API KEY"
android:clickable="true" />
</LinearLayout>
</LinearLayout>
我必须在矩形框内查看它。下面是您在运行时获得的类似屏幕截图。您不需要隐藏 map 的其余部分。
希望它能对您正在寻找的内容有所帮助。
关于java - 删除 map View 中除选定区域之外的所有其他区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13176990/