Rename "hint steps" to "resolution"
This commit is contained in:
parent
f6452bc7fc
commit
2d308c470b
@ -61,14 +61,14 @@ func executeQuery(rw http.ResponseWriter, req *http.Request) {
|
|||||||
Records: make([]jsonRecord, 0)}
|
Records: make([]jsonRecord, 0)}
|
||||||
|
|
||||||
for name, value := range features {
|
for name, value := range features {
|
||||||
column := jsonColumn{Value: value, Steps: request.HintSteps}
|
column := jsonColumn{Value: value, Steps: request.Resolution}
|
||||||
|
|
||||||
hints := project(
|
hints := project(
|
||||||
entries,
|
entries,
|
||||||
features,
|
features,
|
||||||
name,
|
name,
|
||||||
request.MinScore,
|
request.MinScore,
|
||||||
request.HintSteps)
|
request.Resolution)
|
||||||
|
|
||||||
for _, hint := range hints {
|
for _, hint := range hints {
|
||||||
jsonHint := jsonProjection{hint.compatibility, hint.count, hint.sample}
|
jsonHint := jsonProjection{hint.compatibility, hint.count, hint.sample}
|
||||||
|
@ -55,8 +55,8 @@
|
|||||||
<input class="form-control" type="number" step="0.01" value="0.25" id="minScore">
|
<input class="form-control" type="number" step="0.01" value="0.25" id="minScore">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="hintSteps">Hint steps</label>
|
<label for="resolution">Resolution</label>
|
||||||
<input class="form-control" type="number" value="20" min="1" id="hintSteps">
|
<input class="form-control" type="number" value="20" min="1" id="resolution">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="maxResults">Max results</label>
|
<label for="maxResults">Max results</label>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
return parseFloat(options.fn(this)).toFixed(precision);
|
return parseFloat(options.fn(this)).toFixed(precision);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#minScore,#hintSteps,#walkingDist,#maxResults').change(onSearch);
|
$('#minScore,#resolution,#walkingDist,#maxResults').change(onSearch);
|
||||||
$('#profileDlg').on('hidden.bs.modal', onSearch);
|
$('#profileDlg').on('hidden.bs.modal', onSearch);
|
||||||
$('#resetStorage').click(function() {
|
$('#resetStorage').click(function() {
|
||||||
if (confirm('Are you sure you want to reset your profile?')) {
|
if (confirm('Are you sure you want to reset your profile?')) {
|
||||||
@ -82,7 +82,7 @@
|
|||||||
profile: getProfile(),
|
profile: getProfile(),
|
||||||
walkingDist: parseFloat($('#walkingDist').val()),
|
walkingDist: parseFloat($('#walkingDist').val()),
|
||||||
minScore: parseFloat($('#minScore').val()),
|
minScore: parseFloat($('#minScore').val()),
|
||||||
hintSteps: parseInt($('#hintSteps').val()),
|
resolution: parseInt($('#resolution').val()),
|
||||||
maxResults: parseInt($('#maxResults').val())
|
maxResults: parseInt($('#maxResults').val())
|
||||||
};
|
};
|
||||||
|
|
||||||
|
2
types.go
2
types.go
@ -39,10 +39,10 @@ type jsonGeoData struct {
|
|||||||
type jsonQueryRequest struct {
|
type jsonQueryRequest struct {
|
||||||
Features featureMap `json:"features"`
|
Features featureMap `json:"features"`
|
||||||
Geo *jsonGeoData `json:"geo"`
|
Geo *jsonGeoData `json:"geo"`
|
||||||
HintSteps int `json:"hintSteps"`
|
|
||||||
MaxResults int `json:"maxResults"`
|
MaxResults int `json:"maxResults"`
|
||||||
MinScore float64 `json:"minScore"`
|
MinScore float64 `json:"minScore"`
|
||||||
Profile featureMap `json:"profile"`
|
Profile featureMap `json:"profile"`
|
||||||
|
Resolution int `json:"resolution"`
|
||||||
SortAsc bool `json:"sortAsc"`
|
SortAsc bool `json:"sortAsc"`
|
||||||
SortKey string `json:"sortKey"`
|
SortKey string `json:"sortKey"`
|
||||||
WalkingDist float64 `json:"walkingDist"`
|
WalkingDist float64 `json:"walkingDist"`
|
||||||
|
Loading…
Reference in New Issue
Block a user