Update 'positioning a marker' docs (#599)

Better way to position a marker
This commit is contained in:
Michael Diego 2018-06-11 04:43:48 -03:00 committed by GitHub
parent 78256b1d5e
commit 03cd34dc79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
API.md
View File

@ -238,13 +238,11 @@ Initially any map object has its top left corner at lat lng coordinates. It's up
Example (centering the marker):
```javascript
const MARKER_SIZE = 40;
const greatPlaceStyle = {
position: 'absolute',
width: MARKER_SIZE,
height: MARKER_SIZE,
left: -MARKER_SIZE / 2,
top: -MARKER_SIZE / 2
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
```