从中间扩展和缩小

shrink_to_middle.xml

<set xmlns:android="http://schemas.android.com/apk/res/android"> 
    <scale 
        android:interpolator="@android:anim/linear_interpolator" 
        android:fromXScale="1.0" 
        android:toXScale="1.0" 
        android:fromYScale="1.0" 
        android:toYScale="0.0" 
        android:fillAfter="false" 
        android:duration="200" /> 
    <translate 
        android:fromYDelta="0" 
        android:toYDelta="50%" 
        android:duration="200"/> 
</set> 


grow_from_middle.xml

<?xml version="1.0" encoding="utf-8"?> 
<set xmlns:android="http://schemas.android.com/apk/res/android"> 
    <scale 
        android:interpolator="@android:anim/linear_interpolator" 
        android:fromXScale="1.0" 
        android:toXScale="1.0" 
        android:fromYScale="0.0" 
        android:toYScale="1.0" 
        android:fillAfter="false" 
        android:startOffset="200" 
        android:duration="200" /> 
    <translate 
        android:fromYDelta="50%" 
        android:toYDelta="0" 
        android:startOffset="200" 
        android:duration="200"/> 
</set>


 

 链接地址:http://wang-peng1.iteye.com/category/86455

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我来给您提供一个简单的地图浏览组件,基于Vue和ArcGIS API for JavaScript开发,包括您需要的功能。以下是组件代码: ```vue <template> <div class="map-container"> <div class="map-toolbar"> <div class="tool-item" v-for="tool in tools" :key="tool.name" @click="handleToolClick(tool)"> <img :src="tool.icon" :alt="tool.name" /> <div class="tool-name">{{ tool.name }}</div> </div> </div> <div class="map-view" ref="mapView"></div> </div> </template> <script> import { loadModules } from 'esri-loader'; export default { name: 'MapView', data() { return { mapView: null, tools: [ { name: '冲突检测', icon: 'conflict.png', action: () => { // 冲突检测逻辑 } }, { name: '截图', icon: 'screenshot.png', action: () => { // 截图逻辑 } }, { name: '制图', icon: 'print.png', action: () => { // 制图逻辑 } }, { name: '放大', icon: 'zoom-in.png', action: () => { this.mapView.zoomIn(); } }, { name: '缩小', icon: 'zoom-out.png', action: () => { this.mapView.zoomOut(); } }, { name: '全图', icon: 'full-extent.png', action: () => { this.mapView.goTo({ extent: this.mapView.map.initialExtent }); } } ] }; }, mounted() { this.initMapView(); }, methods: { async initMapView() { const [Map, MapView] = await loadModules(['esri/Map', 'esri/views/MapView']); const map = new Map({ basemap: 'streets-navigation-vector' }); this.mapView = new MapView({ container: this.$refs.mapView, map, center: [114.3055, 30.5928], zoom: 13 }); }, handleToolClick(tool) { tool.action(); } } }; </script> <style> .map-container { position: relative; width: 100%; height: 100%; } .map-toolbar { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; } .tool-item { display: flex; flex-direction: column; align-items: center; margin-right: 15px; cursor: pointer; } .tool-name { margin-top: 5px; font-size: 12px; text-align: center; } .map-view { width: 100%; height: 100%; } </style> ``` 这是一个简单的地图浏览组件,包含了冲突检测、截图、制图、放大、缩小和全图这些功能,每个功能一个按钮,并且按钮中间是示意图,按钮下是功能名称。您可以根据需要进行修改和扩展

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值