我正在使用leaflet-image.js从传单地图创建图像.用于创建映像的代码是https://github.com/mapbox/leaflet-image中示例中的代码,即
var map = L.mapbox.map('map', 'YOUR.MAPID').setView([38.9, -77.03], 14);
leafletImage(map, function(err, canvas) {
// now you have canvas
// example thing to do with that canvas:
var img = document.createElement('img');
var dimensions = map.getSize();
img.width = dimensions.x;
img.height = dimensions.y;
img.src = canvas.toDataURL();
document.getElementById('images').innerHTML = '';
document.getElementById('images').appendChild(img);
});
Run Code Online (Sandbox Code Playgroud)
问题是图像似乎被某些CORS安全功能阻止.下面是谷歌Chrome控制台的图像(不是firefox中的enevn它不起作用)
你能帮帮我吗?(我的所有服务器都是本地托管的.Webserver,mapserver ......)
我注意到我的传单标记在给定的经/纬度上“不固定”。当我放大地图时,标记会移动以进行调整并采取正确的位置。当我缩小时,它会转到另一个位置。位置不是一成不变的。我怎样才能解决这个问题 ?
我的标记笔没有什么特别的。以下是我的建造方式
var LeafIcon = L.Icon.extend({
options: {
iconSize: [12, 15],
shadowSize: [30, 40],
iconAnchor: [11, 70],
shadowAnchor: [2, 42],
popupAnchor: [-3, -40]
}
});
var map_icon = new LeafIcon({iconUrl: 'icon_marker.png'});
var marker;
marker = L.marker([my_lat, my_lon], {icon: map_icon});
marker.addTo(map);
marker.bindPopup("My markers' popup");
Run Code Online (Sandbox Code Playgroud) 一个非常基本的脚本让我发疯.它说它找不到引用的密钥.不知道它是什么.我正在使用SQL SERVER 2014,这个脚本用于创建我的数据库表.我正在尝试id_TABLE_1在表中TABLE_2引用表的id TABLE_1.
CREATE TABLE TABLE_1
(
id int identity,
email varchar(50) not null,
constraint PK_TABLE_1 primary key (id,email)
)
GO
CREATE TABLE TABLE_2
(
id int identity,
id_TABLE_1 int not null,
constraint PK_TABLE_2 primary key (id),
constraint FK_TABLE_2 foreign key (id_TABLE_1)
references TABLE_1(id) on delete cascade
)
GO
Run Code Online (Sandbox Code Playgroud)
错误是:
消息1776,级别16,状态0,行32
在引用的表'TABLE_1'中没有与外键'FK_TABLE_2'中的引用列列表匹配的主键或候选键.消息1750,级别16,状态0,行32
无法创建约束或索引.查看以前的错误.
你能帮帮我吗?
我有一个问题,我需要帮助...
我必须做一些作业作为作业。我必须制作一个简单的 HTML/CSS/Bootstrap 酒店房间预订页面。有一种表格,我真的不知道如何制作。其中一种形式是选择选项下拉按钮。他们想让我做一个比普通箭头更大的箭头,而我不知道如何使这个箭头更大。
在这里发布我的代码:
HTML
<label class="control-label">Nationality</label><br>
<select class="options izbor" name="country">
<option value="????????">Bulgaria</option>
<option value="???????">Germany</option>
<option value="??????">Russia</option>
<option value="??????">England</option>
</select>
Run Code Online (Sandbox Code Playgroud)
CSS
.izbor {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #b7b7b7;
border-radius: 0px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}
Run Code Online (Sandbox Code Playgroud) 我不明白为什么我的程序表现得像它一样.
(defvar A '((X Y Z) (J L O P) (G W U))
(defvar Z '(X W D U G))
(defvar STOP 'G)
(defun ADD_to_Z(A2)
(prog()
(cond
((equal (Member_Of_Z (list A2)) 0) )
(t (setq Z (append Z (list A2))) )
)
)
)
(defun Member_of_Z(cdr_A1)
(prog(n temp)
(setq n 0)
(setq temp cdr_A1)
repeat
(cond
((null temp) (return n))
((null (member (car temp) Z) ) (setq n (+ n 1)) (setq temp (cdr temp)))
(t (setq n (+ n …Run Code Online (Sandbox Code Playgroud)