<commit_before>import controlMixin from './controlMixin'

export default {
  name: 'GeolocateControl',
  mixins: [controlMixin],

  props: {
    position: {
      type: String,
      default: 'top-right'
    },
    positionOptions: {
      type: Object,
      default () {
        return {
          enableHighAccuracy: false,
          timeout: 6000
        }
      }
    },
    trackUserLocation: {
      type: Boolean,
      default: false
    },
    showUserLocation: {
      type: Boolean,
      default: true
    },
    fitBoundsOptions: {
      type: Object,
      default: () => ({ maxZoom: 15 })
    }
  },

  data () {
    return {
      control: undefined
    }
  },

  created () {
    this.control = new this.mapbox.GeolocateControl(this._props)

    this.control.on('error', err => {
      this.$emit('geolocate-error', err)
    })
    this.control.on('geolocate', position => {
      this.$emit('geolocate-error', position)
    })
  },

  methods: {
    $_deferredMount (payload) {
      this.map = payload.map
      this.map.addControl(this.control)
      this.$emit('added', this.control)
      payload.component.$off('load', this.$_deferredMount)
    }
  }
}<commit_msg>Fix position in geolocate control<commit_after>import controlMixin from './controlMixin'

export default {
  name: 'GeolocateControl',
  mixins: [controlMixin],

  props: {
    position: {
      type: String,
      default: 'top-right'
    },
    positionOptions: {
      type: Object,
      default () {
        return {
          enableHighAccuracy: false,
          timeout: 6000
        }
      }
    },
    trackUserLocation: {
      type: Boolean,
      default: false
    },
    showUserLocation: {
      type: Boolean,
      default: true
    },
    fitBoundsOptions: {
      type: Object,
      default: () => ({ maxZoom: 15 })
    }
  },

  data () {
    return {
      control: undefined
    }
  },

  created () {
    this.control = new this.mapbox.GeolocateControl(this._props)

    this.control.on('error', err => {
      this.$emit('geolocate-error', err)
    })
    this.control.on('geolocate', position => {
      this.$emit('geolocate-error', position)
    })
  },

  methods: {
    $_deferredMount (payload) {
      this.map = payload.map
      this.map.addControl(this.control, this.position)
      this.$emit('added', this.control)
      payload.component.$off('load', this.$_deferredMount)
    }
  }
}
{'fraction_non_alphanumeric': 0.1393612608875985, 'fraction_numerical': 0.004977187888842804, 'mean_word_length': 2.1447196870925684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6605542', 'n_tokens_mistral': 781, 'n_tokens_neox': 757, 'n_words': 139}