Custom Map Props#43
Custom Map Props#43abdurrahmanekr merged 10 commits intoDetaysoft:nextfrom michaeldever:mdever_custom_maps
Conversation
Mdever documentation
…essage Allow passing text to location message component
…aps rather than image
abdurrahmanekr
left a comment
There was a problem hiding this comment.
Thank you so so much @michaeldever! 🎉 It will be a really nice feature, can you update the tests. You can run npm run test -- -u to update the snapshots.
| } | ||
|
|
||
| .rce-mbox-location-text { | ||
| width: 250px; |
There was a problem hiding this comment.
Please add this line: padding: 5px 0;
| .rce-mbox-location { | ||
| position: relative; | ||
| width: 250px; | ||
| height: 150px; |
| className() { | ||
| var className = classNames('rce-mbox-location', this.props.className); | ||
|
|
||
| if (this.props.text && this.props.text.length > 0) { |
There was a problem hiding this comment.
Only if (this.props.text) { and the 'tabs' must have 4 'spaces'.
| src={ | ||
| this.props.src || | ||
| this.buildURL(STATIC_URL) | ||
| }/> |
There was a problem hiding this comment.
The 'tabs' must have 4 'spaces'.
| src={this.props.src} /> | ||
| src={this.props.src} | ||
| zoom={this.props.zoom} | ||
| markerColor={this.props.markerColor} |
There was a problem hiding this comment.
Please add these features to the README.md file (markerColor, zoom)
| const STATIC_URL = 'https://maps.googleapis.com/maps/api/staticmap?markers=color:MARKER_COLOR|LATITUDE,LONGITUDE&zoom=ZOOM&size=270x200&scale=2&key=KEY'; | ||
| const MAP_URL = 'https://www.google.com/maps/search/?api=1&query=LATITUDE,LONGITUDE&zoom=ZOOM'; | ||
| const DEFAULT_MARKER_COLOR = 'red'; | ||
| const DEFAULT_ZOOM_LEVEL = 14; |
There was a problem hiding this comment.
Please move these lines into defaultProps. (DEFAULT_MARKER_COLOR, DEFAULT_ZOOM_LEVEL)
LocationMessage.defaultProps = {
target: '_blank',
apiKey: '',
zoom: 14,
markerColor: 'red',
}
|
I'll work on this for a while. Thanks @michaeldever |
|
@abdurrahmanekr Apologies, haven't had time to look at this again. Will have a look at those changes over the next week. |
|
It's not problem. This changes has been released by 0.7.0. Thanks for your contributions @michaeldever 👍 |


statuvariable to bestatus.statu