你可以在这个bl.ock http://bl.ocks.org/3012590中看到巴黎有许多地理参考点,小圈子上面有一个大圆圈:

我想得到类似于http://vallandingham.me/vis/gates/的东西,这样圆圈就会被它的边界紧密附加.

对不起,我在这段代码中找不到答案,我想错了.
是否有一个简单的解决方案来获得它?尝试了不同的负电荷力,如果圆形尺寸发生变化会导致问题(如果巴黎的所有圆圈都变得很小,那么它们会相互走得太远)?
如何强制在Leaflet中添加到地图的新图层成为底图上的第一个图层?
我找不到一种方法来轻松更改图层的顺序,这是一个非常基本的GIS功能.我错过了什么吗?
我刚开始使用elasticsearch.我想在php中使用cURL进行查询.
这段代码什么都没有...(如果我从命令行执行,请参阅下面的错误.我不确定这个错误是否是由于控制台中的换行...)
$url = "curl -s -XGET http://<my_url>:9200/idx_occurrence/Occurrence/_search -d '
{
'filtered' : {
'query' : {
'term' : { 'kingdom_interpreted' : 'Plantae' }
}
}
}' ";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
$return=curl_exec($ch);
var_dump($return);
Run Code Online (Sandbox Code Playgroud)
但如果我使用这个网址 http://<my_url>:9200/idx_occurrence/Occurrence/_search?q=kingdom_interpreted:Plantae
然后我从cURL得到结果.
也许可能查询过滤器不正确?(我尝试了几个选项没有成功)
错误:{"error":"SearchPhaseExecutionException [无法执行阶段[查询],完全失败; shardFailures {[AS6HqxgNRtyU9-pQKhJsXQ] [idx_occurrence] [3]:SearchParseException [[idx_occurrence] [3]:from [-1], size [-1]:解析失败[无法解析源[\n {\n已过滤:{\n查询:{\n term:{kingdom:Plantae} \n} \n} \n} \n}]]];嵌套:SearchParseException [[idx_occurrence] [3]:from [-1],size [-1]:Parse Failure [没有解析器元素[filtered]]];} {[AS6HqxgNRtyU9-pQKhJsXQ] [idx_occurrence] [2]:SearchParseException [[idx_occurrence] [2]:from [-1],size [-1]:Parse Failure [无法解析源[\n {\n filtered:{\n query:{\n term:{kingdom:Plantae}} \n} …
我想垂直调整我的highcharts工具提示中的文本(定义了最大宽度,因此如果文本不适合此最大宽度,请增加工具提示高度以适合文本)
什么适用于简单的HTML东西......
#my_div
{
height:auto;
max-width:140px;
overflow:auto
}
Run Code Online (Sandbox Code Playgroud)
不适用于highcharts工具提示,请参阅http://jsfiddle.net/perikut/hNCDb/2/
我想运行一个弹性搜索查询,它通过两个不同字段(纬度和经度)的组合对数据进行分组
curl -XGET http://www.my_server:9200/idx_occurrence/Occurrence/_search?pretty=true -d '{
"query": {
"query_string" : {
"fields" : ["genus_interpreted","dataset"],
"query": "Pica 2",
"default_operator" : "AND"
}
},
"facets": {
"test": {
"terms": {
"fields" :["decimalLatitude","decimalLongitude"],
"size" : 500000000
}
}
}
}'
Run Code Online (Sandbox Code Playgroud)
它提供了比预期更多的结果......任何想法?
答案的相关部分越多......
_shards":{
"total":5,
"successful":5,
"failed":0
},
"hits":{
"total":**37**,
"max_score":3.9314494,
"hits":[{
Run Code Online (Sandbox Code Playgroud)
总命中数,37是查询的结果,如果我不应用方面.这个总数是方面总数的一半(见下文)
"facets":{
"test":{
"_type":"terms",
"missing":0,
"total":**74**,
"other":0,
"terms":[
{"term":"167.21665954589844","count":5},
{"term":"167.25","count":4},
{"term":"167.14999389648438","count":4},
{"term":"167.1041717529297","count":4},
{"term":"-21.04166603088379","count":4},.....
Run Code Online (Sandbox Code Playgroud)
因此,分面分组是完全分开的(按纬度,然后是经度).
请注意,我不能仅按纬度或经度进行分组,因为多个记录可以共享纬度(但具有不同的经度)或反之亦然.
我正在评估使用highcharts.js将我生成的图形更改为d3.js
只是为了好玩,我想了解d3.js是如何工作的.
我想知道是否有类似于下面的url(看看你是否点击它给你提供新数据的馅饼),动态和准备使用(或不从零实现).
我想要实现的,或多或少......
http://lully.snv.jussieu.fr/gbif/mapping/graphs/examples/pie-legend.htm
提前致谢
佩雷
我想在一个包含多个单词的字段上做一个简单的facet请求(例如:'Name1 Name2',有时候里面有点和逗号),但我得到的是......
"terms" : [{
"term" : "Name1",
"count" : 15
},
{
"term" : "Name2",
"count" : 15
}]
Run Code Online (Sandbox Code Playgroud)
所以我的字段值被空格分割,然后运行构面请求...
查询示例:
curl -XGET http://my_server:9200/idx_occurrence/Occurrence/_search?pretty=true -d '{
"query": {
"query_string": {
"fields": [
"dataset"
],
"query": "2",
"default_operator": "AND"
}
},
"facets": {
"test": {
"terms": {
"field": [
"speciesName"
],
"size": 50000
}
}
}
}'
Run Code Online (Sandbox Code Playgroud) d3.js ×2
lucene ×2
curl ×1
force-layout ×1
gis ×1
highcharts ×1
javascript ×1
leaflet ×1
php ×1