现在我正在 Ionic v4 中开发基于位置的应用程序。现在我希望能够将地图视图重置回我的位置。我想我需要setView再次使用来实现这一点,但我不知道这样做的语法。
这是我到目前为止所有的相关代码:
主页.html
<ion-content>
<div class="home-button" (click)="centerMap()">
<ion-icon name="navigate"></ion-icon>
</div>
<div id="map"></div>
</ion-content>
Run Code Online (Sandbox Code Playgroud)
主页.ts
centerMap() {
this.mapService.backToCenter();
}
Run Code Online (Sandbox Code Playgroud)
地图服务.ts
loadmap(map) {
this.map = map;
this.map.locate({
setView: true,
maxZoom: 22,
minZoom: 12
})
.on('locationfound', e => {
const markerGroup = leaflet.featureGroup();
const marker: any = leaflet
.marker([e.latitude, e.longitude], {
icon: positionIcon,
zIndexOffset: -1000
})
.on('click', () => {
console.log('Position marker clicked');
});
markerGroup.addLayer(marker);
this.map.addLayer(markerGroup);
this.loadMarkers(this.dropService.getDrops());
});
return this.map;
}
backToCenter() {
console.log('Center Map');
}
Run Code Online (Sandbox Code Playgroud)
有没有办法setView …
我最近开始使用 ddev 来开发 TYPO3 页面,但我偶尔会遇到同样的问题。有时(我真的不知道是什么导致了这个问题)页面会停止加载,一段时间后会出现此错误消息:
PHP Warning
Core: Error handler (BE): PHP Warning: rename(/var/www/html/var/cache/code/cache_core/5d5a7572dd900787722599.temp,/var/www/html/var/cache/code/cache_core/site-configuration.php): No such file or directory in /var/www/html/public/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php line 234
Run Code Online (Sandbox Code Playgroud)
我知道当 TYPO3 没有写入缓存的权限时会出现这个错误,但我不知道我能做些什么来防止这个问题。重新启动 Docker 可以修复它一小段时间,但最终它再次发生,每 10 到 20 分钟重新启动一次 Docker 确实需要花费很多时间.. 有谁知道我需要做什么样的配置来防止这个问题?
顺便说一句,我在 Windows 上使用 Docker 和 TYPO3 9.5.8
我今天想第一次尝试 Pimcore。经过大量设置后,我成功使用 Composer 安装了demo-basic-twig 模板。
现在我尝试通过/admin访问后端。我注意到的第一件事是似乎没有加载 CSS 文件:
现在我认为可能只是一个错误或其他什么东西,但是当我尝试使用我创建的用户登录后端时,它只显示一个带有加载器的空白页面,没有发生任何事情:
我的控制台只返回一堆 403 错误:
Failed to load resource: the server responded with a status of 403 (Forbidden) | jquery-3.3.1.min.js:1
Failed to load resource: the server responded with a status of 403 (Forbidden) | icons.css:1
Failed to load resource: the server responded with a status of 403 (Forbidden) | leaflet.css:1
Run Code Online (Sandbox Code Playgroud)
我想我的安装过程中做错了什么?