VUE 模块化d框 获取地图中心位置坐标地址

VUE 模块化d框 获取地图中心位置坐标地址,第1张

模块文件VUE

<template>

  <div v-if="showDialog" class="dialog" @touchmoveprevent>

    <div v-if="showDialog" class="back-drop"></div>

    <div class="alert" :class="{'alert-active':showDialogActive,'alert-big':big,'alert-middle':middle}" :style="'width:'+width+'px'">

      <div class="title">

        {{title}}

        <div class="iconfont close" @click="close"></div>

      </div>

      <div class="dialog-content">

        <slot></slot>

      </div>

    </div>

  </div>

</template>

<script>

import { setTimeout } from "timers";

export default {

  name: "v-templateCreat",

  props: {

    title: {

      type: String,

      default: "温馨提示"

    },

    cancelText: {

      type: String,

      default: "取消"

    },

    doneText: {

      type: String,

      default: "确定"

    },

    middle:{

      type:Boolean,

      default:false

    },

    big:{

      type:Boolean,

      default:false

    },

    show: {

      type: Boolean,

      default: false

    },

    dismiss: {

      type: Boolean,

      default: false

    },

    width: {

      default: 498

    },

    open:Boolean

  },

  data() {

    return {

      showDialog: false,

      message: "",

      cancel: false,

      value: "",

      templateCreat: false,

      showDialogActive: false

    };

  },

  methods: {

    close() {

      thisshowDialogActive = false;

      this$emit('update:open', false);

      setTimeout(() => (thisshowDialog = false), 320);

    },

    openFn(){

      thisshowDialog = true;

      setTimeout(() => (thisshowDialogActive = true));

    }

  },

  watch: {

    open:function(data){

      if(data) thisopenFn();

      if(!data) thisclose();

    },

    show: function(data) {

      thisopenFn();

    },

    dismiss: function() {

      thisclose();

    },

  },

  mounted(){

  }

};

</script>

<style lang="scss">

@import "/filters/css/allcss";

dialog {

  position: fixed;

  top: 0;

  bottom: 0;

  left: 0;

  right: 0;

  width: 100%;

  height: 100%;

  background: rgba(0, 0, 0, 0);

  z-index: 106;

  iconfont {

    float: right;

    cursor: pointer;

    color: #9b9b9b;

  }

  back-drop {

    position: fixed;

    top: 0;

    bottom: 0;

    left: 0;

    right: 0;

    width: 100%;

    height: 100%;

    background: rgba(0, 0, 0, 04);

    z-index: 106;

  }

  alert {

    width: 498px;

    min-height: 260px;

    // overflow-y: scroll;

    background: #fff;

    left: calc(50% - 249px);

    top: calc(50% - 280px);

    position: fixed;

    z-index: -1;

    transform: scale(123);

    opacity: 0;

    transition: all 032s;

    position: relative;

    title {

      height: 44px;

      width: 100%;

      padding: 0 20px;

      -webkit-box-sizing: border-box;

      box-sizing: border-box;

      line-height: 44px;

      background: #f2f2f2;

      -webkit-box-align: center;

      -ms-flex-align: center;

      align-items: center;

      font-size: 16px;

    }

    message {

      padding: 18px;

      min-height: 100px;

      overflow: auto;

    }

  }

  alert-middle{

    width:614px !important;

    left:calc(50% - 307px);

  }

  alert-big{

    width:748px !important;

    left:calc(50% - 374px);

  }

  alert-active {

    z-index: 9999;

    transform: scale(1);

    opacity: 1;

  }

}

</style>

////////////////////////////////

使用

import templateCreat from "@/components/templateCreat";

components: {

    templateCreat

  },

<!-- 店铺地址 -->

    <templateCreat

      :opensync="creatShowTemplate"

      title="店铺地址"

      :width="450"

    >

      <div class="exampleCenten">

        <div class="flex">

          <div class="leftTxt">所在地区</div>

          <div class="rightViewImg">

            <el-cascader

              style="width:310px;height:40px;"

              size="large"

              :options="regionOptions"

              v-model="formselectedOptions"

              @change="addressChange"

            ></el-cascader>

          </div>

        </div>

        <div class="flex">

          <div class="leftTxt"></div>

          <div class="rightViewImg">

            <div class="amapsView">

              <div style="padding:0 0 10px;">确认坐标,方便到店消费</div>

              <div class="amaps" :style="events'width:300px;height:240px;':''">

                <el-amap

                  ref="map"

                  vid="amapDemo"

                  :amap-manager="amapManager"

                  :center="center"

                  :zoom="zoom"

                  :plugin="plugin"

                  :events="events"

                  class="amap-demo"

                ></el-amap>

                <div class="amapsSon"></div>

              </div>

              <div style="padding:10px 0;width:300px;">{{formaddress}}</div>

            </div>

          </div>

        </div>

      </div>

      <div class="flex msgboxBtns">

        <el-button type="primary" style="width:100px;border-radius:0;" @click="shopSiteClick">保存</el-button>

      </div>

    </templateCreat>

import VueAMap from "vue-amap";

VueAMapinitAMapApiLoader({

  key: "e1dedc6bdd765d46693986ff7ff969f4",

  plugin: [

    "AMapAutocomplete", //输入提示插件

    "AMapPlaceSearch", //POI搜索插件

    "AMapScale", //右下角缩略图插件 比例尺

    "AMapOverView", //地图鹰眼插件

    "AMapToolBar", //地图工具条

    "AMapMapType", //类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制

    "AMapPolyEditor", //编辑 折线多,边形

    "AMapCircleEditor", //圆形编辑器插件

    "AMapGeolocation" //定位控件,用来获取和展示用户主机所在的经纬度位置

  ],

  uiVersion: "10"

});

let amapManager = new VueAMapAMapManager();

data() {

    let self = this;

    return {

amapManager, //地图

      regionOptions: regionData,

      zoom: 12,

      center: [],

      getCertificationData: "",

      uploadActions: "",

      uploadType: "",

      initShow: false,

       form:{

address:‘’} //地址

      plugin: [

        {

          pName: "Geolocation",

          events: {

            init(o) {

              if (!selfinitShow) {

                selfinitShow = true;

                // o 是高德地图定位插件实例

                ogetCurrentPosition((status, result) => {

                  if (result && resultposition) {

                    consolelog(result);

                    selfformlongitude = resultpositionlng;

                    selfformlatitude = resultpositionlat;

                    selfcenter = [selfformlongitude, selfformlatitude];

                    selfformaddress = resultformattedAddress;

                  }

                });

              }

            }

          }

        }

      ],

      events: {

        init: o => {

          ogetCity(result => {});

        },

        moveend: () => {},

        zoomchange: () => {},

        dragend: e => {

          var lgt = this$refsmap$$getCenter();

          selfformlatitude = lgt[1];

          selfformlongitude = lgt[0];

          selfasdasdashowswxcasd = false;

          selfcenter = [selfformlongitude, selfformlatitude];

          // 这里通过高德 SDK 完成。

          var geocoder = new AMapGeocoder({

            radius: 1000,

            extensions: "all"

          });

          geocodergetAddress(this$refsmap$$getCenter(), function(

            status,

            result

          ) {

            if (status === "complete" && resultinfo === "OK") {

              if (result && resultregeocode) {

                selfcenter = [selfformlongitude, selfformlatitude];

                selfformaddress = resultregeocodeformattedAddress;

              }

            }

          });

        }

      },

}

1--你把他保存在我的文档中的MATLAB文件夹里,然后以1234命名(我随便命名的)

在MATLAB里输入命令

a=imread('1234jpg');

imshow(a)

此时图像就在MATLAB里显示出来了

2--然后用取坐标点命令

ginput

点图像上你想要的点A,I,J,K

然后回车

此时窗口上就出现了各个点的坐标了。他们之间的距离就可以算出,然后你再用比例关系,就可以算出实际距离了

我的运行后坐标是:1170000000000000e+002 2899999999999994e+001

1140000000000000e+002 9199999999999994e+001

1100000000000000e+002 1489999999999999e+002

1060000000000000e+002 2049999999999999e+002

注意系统默认坐标原点是在左上角

java中怎么获得一个按钮的中心坐标,实现当点中左右两个按钮时,出现连线 Scanner scan=new Scanner(Systemin);

String str=scannext();

String E1="[\u4e00-\u9fa5]";

Sintrting E2="[a-zA-Z]"; countH=0; int countE=0; char[] arrChar=strtoCharArray();

String[] arrStr=new String[arrCharlength]; for (int i=0;i<arrCharlength ;i++ )

{

IOS开发Xib文件中怎么把一个按钮约束在左右两个按钮的正中间

中间那个按钮,把距离左边按钮和距离右边按钮的距离值写的一样

在窗口中设置a,b两个按钮,当按下b按钮时,b按钮的内容将出现在a按钮上

代码如下:

import javaxswing;import javaawteventActionEvent;import javaawteventActionListener;public class HelloIFrame { public static void main(String[] args) { JFrame jf = new JFrame(); jfsetTitle("Form1"); jfsetBounds(500, 200, 300, 200); JPanel con = new JPanel(null); final JButton helloButton = new JButton("AA"); final JButton clearButton = new JButton("BB"); helloButtonaddActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { clearButtonsetText("AA"); } }); clearButtonaddActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { helloButtonsetText("BB"); } }); helloButtonsetBounds(70, 80, 75, 30); clearButtonsetBounds(150, 80, 75, 30); conadd(helloButton); conadd(clearButton); jfadd(con); jfsetResizable(false); jfsetVisible(true); jfsetDefaultCloseOperation(JFrameEXIT_ON_CLOSE); }}

可以稍加修改实现更完美的功能,如果!

如题,在Qt Creator中 当按下按钮,会在label中显示所按按钮的坐标。怎么实现?

给按钮创建点击事件槽函数,在函数里面获取按钮坐标

ui->pushButton0->x();

ui->pushButton0->y();

QString X_Y

X_Y=QString("X=%1 Y=%2!")arg(QString::number(ui->pushButton0->x()))arg(QString::number(ui->pushButton0->y())) );

获取x,y坐标

ui->label->setText(X_Y);

FLASH中当鼠标离开按钮时,按钮的动态效果,如何实现?

用MovieClip很简单啦,算是自定义按钮啦,不是button啦。

举例说明:MovieClip简称mc

该mc共有10帧,第一帧是d起状态,第二针是点击状态(你做了动态效果),

第3帧到第10帧你再做个缓慢恢复的动态效果。

每帧的代码:

第一帧:s();然后监听鼠标点击,

若点击则跳到第二帧(下一帧,nextFrame() )

第二帧监听鼠标d起(MouseUp),若d起则从第三帧开始play,

第10帧直接写s();gotoAndS(1),这样又到第一帧。

写一AWT程序,在frame中加人两个按钮(button)和一个标签(label),单击两个按钮时显示按钮的标签玉label

写一个类继承JFrame后

1创建按钮和标签

2,添加

3,显示

QT怎么实现点击一个按钮,在输入框中输出按钮的值

1、先定义一个槽函数void slotclicked(); 然后再源文件中实现,写自己想要实现的代码。

2、new button 后连接信号和槽,connect(button,SIGNAL(clicked()),this,SLOT(slotclicked()));

在datalist中当点击一个按钮时如何让另一个按钮的Enable设为false

哥们你的事件对么 你看看 你注册的是什么 OnItemCommand="XiaoLaoshi_ItemCommand"

protected void Datalist1 _ItemCommand(object source, DataListCommandEventArgs e)

你这事件的名称都不一样 怎么会执行 把他们改一致 OnItemCommand="XiaoLaoshi_ItemCommand"改为OnItemCommand="Datalist1 _ItemCommand"

呵呵 忘了 好像button触发不了这个事件 你改为linkbutton就行了

flash中,怎么实现按钮A按一下隐藏,再按另一个按钮B,按钮A又出现了?

A自己控制自己的隐藏,B控制A的显示对吧?

在第一帧上加如下代码:其中按钮名为a

thisonEnterFrame = function() {

aonPress = function() {

_roota_visible = 0;

};

bonPress = function() {

_roota_visible = true;

};

};

vb中,有两个按钮一个文本框,如何实现点击按钮,两个按钮的内容都出现在文本框中,且不会被覆盖

VB中只需在另一窗体的文本框控件名前加上该窗体名做前缀后给与赋值。

Option Explicit

Private Sub Command1_Click()

Form2Text1 = MeText1

End Sub

Private Sub Command2_Click()

Form2Show

End Sub

Private Sub Form_Load()

Text1 = "VB中只需在另一窗体的文本框控件名前加上该窗体名做前缀后给与赋值。"

End Sub

1、打开电脑,点击打开91卫图助手应用软件。

2、接着点击“矢量标绘”,然后点击“坐标定位”。

2、在d出的坐标定位对话框中选择坐标投影类型。

3、在d出的坐标定位对话框中选择坐标投影类型,再选择便于自己输入的坐标格式。

4、输入要定位的坐标位置,如11:11:11,11:11:11,最后点击确定,即可在地图上看到坐标位置标示。

获取浏览器宽高是:

winWidth=documentbodyclientWidth||documentdocumentElementclientWidth

winHeight=documentbodyclientHeight||documentdocumentElementclientHeight

那么中心点应该就是取1/2

Var center={centerW:winWidth/2,centerH:winHeight/2};

以上就是关于VUE 模块化d框 获取地图中心位置坐标地址全部的内容,包括:VUE 模块化d框 获取地图中心位置坐标地址、用MATLAB进行图像处理如何提取中心点坐标并将坐标显示出来。、java中怎么获得一个按钮的中心坐标,实现当点中左右两个按钮时,出现连线等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/9704901.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-01
下一篇 2023-05-01

发表评论

登录后才能评论

评论列表(0条)

保存