Skip to content
This repository has been archived by the owner on Feb 2, 2020. It is now read-only.

Api load options #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/MapContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ var YandexMap = function (_Component) {
}, {
key: '_getAPIParams',
value: function _getAPIParams() {
var params = {};
var params = this.props.apiLoadParameters;

if (this.props.coordorder) {
params.coordorder = this.props.coordorder;
Expand Down Expand Up @@ -170,6 +170,7 @@ YandexMap.propTypes = {
zoom: _react.PropTypes.number,
state: _react.PropTypes.object,
coordorder: _react.PropTypes.oneOf(['latlong', 'longlat']),
apiLoadParameters: _react.PropTypes.object,
options: _react.PropTypes.object
};
YandexMap.defaultProps = {
Expand All @@ -181,6 +182,7 @@ YandexMap.defaultProps = {
controls: []
},
options: {},
apiLoadParameters: {},
style: {
position: 'relative'
}
Expand Down
4 changes: 3 additions & 1 deletion src/MapContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class YandexMap extends Component {
zoom: PropTypes.number,
state: PropTypes.object,
coordorder: PropTypes.oneOf(['latlong', 'longlat']),
apiLoadParameters: PropTypes.object,
options: PropTypes.object
}

Expand All @@ -28,6 +29,7 @@ class YandexMap extends Component {
controls: []
},
options: {},
apiLoadParameters: {},
style: {
position: 'relative'
}
Expand Down Expand Up @@ -99,7 +101,7 @@ class YandexMap extends Component {
}

_getAPIParams () {
const params = {}
const params = this.props.apiLoadParameters;

if (this.props.coordorder) {
params.coordorder = this.props.coordorder;
Expand Down