I am getting a Twig runtime error on the below. The map and everything else works when I remove myFieldHandle(params).orderBy('distance')
.
Error:
Calling unknown method: craft\elements\db\EntryQuery::myFieldHandle()
Code:
{% set target = '90210' %}
{% set params = {
target: target,
range: 100
} %}
{% set entries = craft.entries.section('contractors').myFieldHandle(params).orderBy('distance') %}
{% set options = {
height: 700,
draggable: false,
markerInfo: '_includes/mapInfoBubble',
infoWindowOptions: {
maxWidth: 250
}
} %}