- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 yaga 组件 ( npm yaga-module ) 显示一个简单的传单 map 。因此,我使用angular cli生成了一个新元素,并按照npm页面上的介绍进行了操作。最后,我得到了一张破损的 map 。
Image of the broken map.
我已经使用 leaflet 库 + JS 甚至在 ionic 框架中使用 yaga 实现了一个工作 map 。在这两种情况下,如果我删除指向 leaflet.css 的链接,我都会得到相同的损坏 map 。但是我必须在哪里链接 css 文件?如果我在我的 .angular-cli.json 中插入路径,它似乎已成功加载。但后来我的 map 完全消失了。
我做错了吗?您可以在下面找到我的代码:
app.module.ts:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { YagaModule } from '@yaga/leaflet-ng2';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
YagaModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
app.component.ts:
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Test';
}
app.component.html:
<h1>{{title}}</h1>
<yaga-map [zoom]="2">
<yaga-tile-layer [url]="'http://a.tile.osm.org/{z}/{x}/{y}.png'"></yaga-tile-layer>
</yaga-map>
最佳答案
在您的 styles.css 中添加以下代码行
@import '../node_modules/leaflet/dist/leaflet.css'
关于css - 使用 Angular-CLI 和 yaga 的 splinter 传单 map 。在哪里插入 leaflet.css?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46891777/
所以我使用 splinter 登录到一个站点,然后我在登录后抓取 cookie,然后将其保存为 pickled 对象以备后用。 def save_cookie(username, password):
嗨,我想升级我的单声道版本,以便能够使用某些 .Net 4 功能。 我下载了 2.10 压缩包并按照我发现的说明进行了编译,这似乎进展顺利。 这是我得到的输出: $mono -V Mono JIT c
我是 Pov-Ray 的初学者,我正在尝试在 Pov-Ray 中创建一个车床对象,但它看起来有点破损。有人可以给我一些关于如何修复它的建议吗? 我用来创建的代码是 #include "colors.i
from splinter import Browser browser = Browser() browser.visit('http://www.google.com/') 直接从他们的教程开始,
最近,我注意到我的视差代码从左到右出现奇怪的抖动。代码非常简单: $(window).scroll(function(){ var body = $('body'); var top
我尝试了 overflow:hidden 解决方案来解决破坏 border-radius 的背景:http://jsfiddle.net/ypjDC/17/ test tes
当我将 Nilorea 库中的这个多行宏包含在我的 C++ 项目中时,它无法编译。它被标记为外部“C”。 尝试了 GodBolt,GCC 8.1 编译器在以下代码中的 if 语句上 barfs:htt
我在 python 上使用 splinter 模块。我需要检查一个元素在页面上是否可见,似乎唯一的判断方式是 style="display: none;"我找不到检测方法。 如何检查? 最佳答案 如果
这个问题在这里已经有了答案: left and top properties are not animated (2 个答案) 关闭 6 年前。
我需要通过传递一个字符串数组来在页面上执行 JavaScript 函数。我想避免多次调用 browser.execute_script 。 list_of_strings = ['a','b','c'
我正在尝试在以下方面进行浏览器自动化: https://play.google.com/store/apps/details?id=org.mozilla.firefox&hl=en 我可以使用以下方
鉴于此(“ sleep ”方法是为了让您可以看到我正在看的内容): from splinter import Browser import time #from selenium.webdriver.
我使用的是相对简单的组合布局,它确实有效,但在某些情况下,我的 UICollectionView 中的最后一两个单元格的宽度似乎不正确。 我的 collectionView 由具有动态宽度和静态高度的
我的对象列表是如此初始化: $( function() { var $container = $('div.hikashop_products'); $container.isotop
我正在使用jPlayer在页面中嵌入两个音频文件,基本上代码是cut'n'pasted from this page。一个是wav,另一个是mp3。在本地(mac)上一切正常,但是当我将其上传到服务器
在索引的names字段中执行术语汇总时,我得到了错误的结果。 以下是我使用的names字段的映射: { "dbnames": { "properties": { "names"
我想对视频播放(基于 AVPlayer)产生类似 splinter 的效果,它将转换到另一个视频或图像。 是否可以在 iOS5/6 中对这种视频创建这种效果? 如果不是,另一种方法是在最后播放帧的静止
我正在使用 Flask 尝试提供经过处理的图像,例如在模型处理后裁剪或将其转换给用户,但总是很短,因为它会产生一些错误。当我使用 numpy.rot90() 时,它没有按计划旋转我的图像,而是得到了这
XMFLOAT4X4 在矩阵定义中使用并内的并,但是当我尝试使用和不使用额外并的相同方法时,我会在访问模式中得到不同的结果。我不确定这是否是在 union 的初始化中,或者我在实现中可能会出错的地方。
这两条线实际上是点,但是当我运行 lineIntersects 方法时,我得到“true”作为返回值,有谁知道发生了什么或者这是一个错误?这是 documentation link这是source ,
我是一名优秀的程序员,十分优秀!