showing results for - "react map gl marker offset"
Nicolás
13 Nov 2016
1import React, {PureComponent} from 'react';
2
3const ICON = `M20.2,15.7L20.2,15.7c1.1-1.6,1.8-3.6,1.8-5.7c0-5.6-4.5-10-10-10S2,4.5,2,10c0,2,0.6,3.9,1.6,5.4c0,0.1,0.1,0.2,0.2,0.3
4  c0,0,0.1,0.1,0.1,0.2c0.2,0.3,0.4,0.6,0.7,0.9c2.6,3.1,7.4,7.6,7.4,7.6s4.8-4.5,7.4-7.5c0.2-0.3,0.5-0.6,0.7-0.9
5  C20.1,15.8,20.2,15.8,20.2,15.7z`;
6
7const pinStyle = {
8  cursor: 'pointer',
9  fill: '#d00',
10  stroke: 'none'
11};
12
13export default class CityPin extends PureComponent {
14
15  render() {
16    const {size = 20, onClick} = this.props;
17
18    return (
19      <svg 
20        height={size}
21        viewBox="0 0 24 24"
22        style={{...pinStyle, transform: `translate(${-size / 2}px,${-size}px)`}}
23        onClick={onClick}
24      >
25        <path d={ICON}/>
26      </svg>
27    );
28  }
29}
queries leading to this page
react google map markerreact map gl marker closecustom marker google maps reactgoogle map react custom markermarker moving on react map glreact map gl marker offsetreact map gl location markergoogle maps react custom markerreact google maps create a markergoogle map react markerreact map gl marker positioncustom marker 22google map react 22google map react how to add markergoogle map add marker reactreact google maps markermarker on map gl reactreact map gl custom draggable markergoogle map react marker routegoogle maps marker reactreact google maps markerreact google map add custom markergoogle map marker reactreact google maps custom markerreact map gl markerreactjs maps custom markerreact map gl markerreact mapbox gl markersmapbox gl react markermarker description google maps reactmarker in google map reactreact map markeradding marker in react map gl geocoder marker in react map glmarker in google map reactmarker react map glreact map gl marker in reactjsreact mapbox gl markermapbox gl how to put marker reactgoogle map marker in reactreact native map gl custom marker examplereact google map api markergoogle map react markermarker in react google mapsreact google maps marker examplemarker react map glreact map gl make marker rendergoogle map react marker exampleadd marker to google map reactreact map gl marker offsetmy marker on google map reactgoogle map react add markerreact google maps custom markermarker google maps reactreact google maps add markeruse google map marker with reactmarker in map gl reactcustom marker react google maps how to make marker in current location using react map glhow to make marker on current location using react map glreact mapbox gl add markerreact map gl marker removereact google maps api markerreact map gl marker offset