我正在尝试将界限设置为Google Maps实例,但没有成功.我正在使用AngularJS和angular-google-maps模块.我的最后一次尝试是:
<div id="map_canvas">
<ui-gmap-google-map
center="map.center"
zoom="map.zoom"
bounds="map.bounds"
options="options">
<div ng-repeat="d in devicesMarkers track by d.id">
<ui-gmap-marker
idkey="d.id"
coords="d.center"
options="d.options">
</ui-gmap-marker>
<ui-gmap-circle
center="d.center"
stroke="d.circle.stroke"
fill="d.circle.fill"
radius="d.circle.radius"
visible="d.options.visible">
</ui-gmap-circle>
</div>
</ui-gmap-google-map>
</div>
Run Code Online (Sandbox Code Playgroud)
在我app.js写的:
(...)
.controller('TaihMapController', ['$scope', '$log', 'uiGmapGoogleMapApi', function($scope, $log, GoogleMapApi) {
$scope.devicesMarkers = devices;
$scope.map = {
center: { latitude: devices[0].center.latitude, longitude: devices[0].center.longitude },
zoom: 12,
bounds: {}
// fit: true,
};
GoogleMapApi.then(function(maps) {
$log.debug(maps);
var myBounds = new maps.LatLngBounds();
for (var k = 0; k …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 terraform 和 vsphere 提供程序创建基于模板(ubuntu 18.04)的虚拟机。命令显示的最终错误terraform apply..是:
* vsphere_virtual_machine.vm: timeout waiting for an available IP address
但是,虚拟机已创建并接收 vsphere_virtual_machine 资源内“clone”部分中设置的 IP 地址。
resource "vsphere_virtual_machine" "vm" {
count = "${var.count}"
name = "${lookup(var.vm_name, count.index + 1)}"
resource_pool_id = "${data.vsphere_resource_pool.pool.id}"
datastore_id = "${data.vsphere_datastore.datastore.id}"
network_interface {
network_id = "${data.vsphere_network.network.id}"
adapter_type = "${data.vsphere_virtual_machine.template.network_interface_types[0]}"
}
disk {
...
}
clone {
template_uuid = "${data.vsphere_virtual_machine.template.id}"
customize {
linux_options {
host_name = "${lookup(var.hostname, count.index + 1)}"
domain = "${var.domain}"
}
dns_server_list = ["${var.ns1}", "${var.ns2}"]
network_interface { …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 vuepress 中创建一个组件来显示带有标题的图像。当我对图像路径进行硬编码时,图像会出现,但这样我就没有可重用的组件。我已经尝试过道具,但它也不起作用。
这是我已经尝试过的方法:
<template>
<figure>
<!-- <img src="../../guides/contribute/images/typora-tela1.png" alt=""/> -->
<img :src="imagesrc" alt=""/>
<figcaption>Legenda: {{ caption }} - {{ src }}</figcaption>
</figure>
</template>
<script>
...
props: ['src'],
computed: {
imagesrc () {
return '../../guides/contribute/images/' + this.src // this.image
}
}
...
</script>
Run Code Online (Sandbox Code Playgroud)
在我的 README.md 上,我像这样调用组件:<captioned-image src="filename.png" caption="Caption Example" />但图像没有出现。
我该如何解决这个问题?是否可以仅通过降价来做到这一点?
angularjs ×1
google-maps ×1
javascript ×1
terraform ×1
vcenter ×1
vsphere ×1
vue.js ×1
vuepress ×1