Skip to content

Commit

Permalink
Add coordorder. Closes #136
Browse files Browse the repository at this point in the history
  • Loading branch information
PNKBizz committed Jun 24, 2019
1 parent 41ee06b commit 37cd268
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/YMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,15 @@ export default {

if (this.ymapEventBus.scriptIsNotAttached) {
const yandexMapScript = document.createElement('SCRIPT');
const { apiKey = '', lang = 'ru_RU', version = '2.1' } = Object.assign({}, this.$options.pluginOptions, this.settings);
const {
apiKey = '',
lang = 'ru_RU',
version = '2.1',
coordorder = 'latlong'
} = { ...this.$options.pluginOptions, ...this.settings };
const mode = this.debug ? 'debug' : 'release';
const mapLink = this.mapLink || `https://api-maps.yandex.ru/${version}/?lang=${lang}${ apiKey && `&apikey=${apiKey}` }&mode=${mode}`;
const settings = `lang=${lang}${ apiKey && `&apikey=${apiKey}` }&mode=${mode}&coordorder=${coordorder}`
const mapLink = this.mapLink || `https://api-maps.yandex.ru/${version}/?${settings}`;
yandexMapScript.setAttribute('src', mapLink);
yandexMapScript.setAttribute('async', '');
yandexMapScript.setAttribute('defer', '');
Expand Down

0 comments on commit 37cd268

Please sign in to comment.