我正在尝试这样做,以便当一个html元素被鼠标悬停在谷歌地图上的标记的颜色代码时,api v3将会改变.
这是谷歌地图代码:
$(document).ready(function(){
var markers;
var map;
var infowindow = new google.maps.InfoWindow();
var bounds = new google.maps.LatLngBounds();
markers = new Array();
var mapOptions = {
zoom: 0, //Set to 0 because we are using auto formatting w/ bounds
disableDefaultUI: true,
zoomControl: true,
mapTypeId: google.maps.MapTypeId.ROADMAP,
};
map = new google.maps.Map(document.getElementById("map"), mapOptions);
map.fitBounds(bounds);
$("#map_list ul li").each(function(index) {
var markerLatLng = new google.maps.LatLng($(this).children(".marker_lat").text(), $(this).children(".marker_long").text());
var marker = new google.maps.Marker({
position: markerLatLng,
map: map,
animation: google.maps.Animation.DROP,
title : $(this).children(".marker_title").text(),
brief: $(this).children(".marker_brief").text(),
icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld='+$(this).children(".marker_number").text()+'|00aeef|000000' …Run Code Online (Sandbox Code Playgroud) 我试图弄清楚如何在https://docs.expo.io/versions/latest/sdk/take-snapshot-async.html 中定义视图参数
功能:
screenShot = async () => {
let result = await takeSnapshotAsync(this.pageView, {format: 'jpg', result: 'file', quality: 1.0});
const file = {
uri: result,
name: this.state.shiftIDclean+"-clockIn.jpg",
type: "image/jpeg"
}
}
Run Code Online (Sandbox Code Playgroud)
看法:
render() {
return (
<View ref={view => { this.pageView = view; }}>
<Text>TEST CONTENT GOES HERE</Tex>
</View>
);
}
Run Code Online (Sandbox Code Playgroud)
这在 iOS 模拟器上运行良好,但在 Andriod 上,我收到一个红屏错误:尝试使用不存在的标签 488 解析视图。
我试图找到一个有效的例子,但不能。我认为问题在于我没有定义要正确截屏的视图,但我似乎无法弄清楚。