aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/admin/users.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-01-04 17:12:43 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-01-04 17:43:03 +0000
commitb3542314ac6480505b9939b2e46715a19dab8d49 (patch)
tree76fa788e6ee92e627a42e92bac7d22fcc77aa2ae /t/app/controller/admin/users.t
parent774c7a813da709fb46fca1a65d5c192d72266e14 (diff)
Compare assets on their ID field, not JS object.
As the selected feature is a clone (so it survives e.g. layer reloading from server after a pan), we need to compare the asset ID field instead to see if we already have a match, to prevent a double select(). This also fixes a bug where an auto-selected asset would, after picking a different asset, reshow the selected pin image onmouseout, due to the way OL was storing old hover state internally.
Diffstat (limited to 't/app/controller/admin/users.t')
0 files changed, 0 insertions, 0 deletions
onstant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
---
layout: page
title: How FixMyStreet assigns reports to bodies
author: dave
---

# How FixMyStreet assigns reports to bodies

<p class="lead">
  When you add a <a href="{{ "/glossary/#body" | relative_url }}" class="glossary__link">body</a>
  to FixMyStreet, you specify which <a href="{{ "/glossary/#area" | relative_url }}" class="glossary__link">areas</a>
  it covers. The areas are typically defined by administrative boundaries: these
  are <em>not</em> part of FixMyStreet, but are made available through our
  service called <a href="{{ "/glossary/#mapit" | relative_url }}" class="glossary__link">MapIt</a>.
</p>

Note that MapIt tells FixMyStreet what administrative boundaries a point lies
within: it does not actually draw the maps (by default, FixMyStreet uses
<a href="{{ "/glossary/#osm" | relative_url }}" class="glossary__link">OpenStreetMap</a> for that).

## How this works

When someone places a pin on the FixMyStreet
<a href="{{ "/glossary/#map" | relative_url }}" class="glossary__link">map</a>
to report a problem, FixMyStreet sends the 
<a href="{{ "/glossary/#latlong" | relative_url }}" class="glossary__link">lat-long</a>
coordinates of that position to MapIt. MapIt responds with a list of the areas
that the pin lies within. FixMyStreet then looks in its own database to find
all the bodies that cover that area, and the
<a href="{{ "/glossary/#contact" | relative_url }}" class="glossary__link">contacts</a>
(which are usually email addresses) that you have added for each of
those bodies. Because each contact is associated with a
<a href="{{ "/glossary/#category" | relative_url }}" class="glossary__link">category</a>
of problem (for example, "Potholes" or "Graffiti"), FixMyStreet can build a
list of all the problem categories that *can* be reported at this location. In
fact, this list appears as the drop-down menu ("Pick a category") on the
report-a-problem page.

This means that your FixMyStreet installation must be able to connect to a
MapIt service which knows about the administrative boundaries in your part of the
world. [See below](#boundaries) for more about setting this up.

## Detailed flow: location &rarr; map pin &rarr; drop-down menu

![FMS bodies and contacts]({{ "/assets/img/fms_bodies_and_contacts.png" | relative_url }})

<a name="boundaries"> </a>

## How to set up the area boundaries

The type of boundary data you need depends on a number of factors, but will
probably be one of these:

   * ["Everywhere"]({{ "/customising/boundaries/#everywhere" | relative_url }}) -- you can run FixMyStreet without a specific boundary
   * [Simple approximate area]({{ "/customising/boundaries/#approx-area" | relative_url }}) -- that is, just one area around the place you need
   * [Simple approximate areas]({{ "/customising/boundaries/#approx-areas" | relative_url }}) -- as above, but for multiple areas
   * [Accurate OpenStreetMap data]({{ "/customising/boundaries/#mysociety-mapit" | relative_url }}) -- the preferred option
   * [Accurate data that isn't on OSM]({{ "/customising/boundaries/#accurate" | relative_url }}) -- if you have your own boundary data, for example

If you're not sure which is for you, read through the 
[whole page about admin boundaries]({{ "/customising/boundaries/" | relative_url }}).