Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-web
Commits
c928400f
Commit
c928400f
authored
Nov 23, 2017
by
Mattias J Duffy
Browse files
added bounds for geolocate controls
parent
63dfe71c
Pipeline
#1777
passed with stage
in 1 minute and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/MapDialog.js
View file @
c928400f
...
...
@@ -34,7 +34,7 @@ const Map = ReactMapboxGl({
starbucksLogo
.
height
=
60
const
images
=
[
'
starbucks
'
,
starbucksLogo
,{
pixelRatio
:
3
}]
class
Simple
Dialog
extends
React
.
Component
{
class
Map
Dialog
extends
React
.
Component
{
handleRequestClose
=
()
=>
{
this
.
props
.
onRequestClose
(
this
.
props
.
selectedValue
);
};
...
...
@@ -60,8 +60,9 @@ class SimpleDialog extends React.Component {
onStyleLoad
=
{(
map
,
e
)
=>
{
map
.
addControl
(
new
mapboxgl
.
GeolocateControl
({
positionOptions
:
{
enableHighAccuracy
:
true
enableHighAccuracy
:
true
,
},
fitBoundsOptions
:
map
.
fitBounds
(
maxBounds
,
{}),
trackUserLocation
:
true
}));
...
...
@@ -101,11 +102,10 @@ class SimpleDialog extends React.Component {
}
}
Simple
Dialog
.
propTypes
=
{
Map
Dialog
.
propTypes
=
{
classes
:
PropTypes
.
object
.
isRequired
,
onRequestClose
:
PropTypes
.
func
,
selectedValue
:
PropTypes
.
string
,
};
const
MapDialog
=
withStyles
(
styles
)(
SimpleDialog
);
export
default
MapDialog
export
default
withStyles
(
styles
)(
MapDialog
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment