Skip to content

Custom Map Props#43

Merged
abdurrahmanekr merged 10 commits intoDetaysoft:nextfrom
michaeldever:mdever_custom_maps
Oct 30, 2017
Merged

Custom Map Props#43
abdurrahmanekr merged 10 commits intoDetaysoft:nextfrom
michaeldever:mdever_custom_maps

Conversation

@michaeldever
Copy link
Copy Markdown
Contributor

@michaeldever michaeldever commented Oct 26, 2017

  • Custom marker colors
  • Custom zoom level
  • Click through to Google Map rather than static image.
    • This supports on device apps.
  • Update documentation to show extra MessageBox Options
  • Renate statu variable to be status.
  • Bump version number due to breaking change on statu
  • Allows for text to be passed through to a location message
    • Adjusts styling based on if text is present or not.
    • Adjusts timestamps based on if text is present or not.

screen shot 2017-10-26 at 15 52 36

Copy link
Copy Markdown
Collaborator

@abdurrahmanekr abdurrahmanekr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this line: padding: 5px 0;

.rce-mbox-location {
position: relative;
width: 250px;
height: 150px;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not delete this row. Because it hides the word "Google".

no-height height
image image

If height is not needed, in local css file height: unset can be done.

className() {
var className = classNames('rce-mbox-location', this.props.className);

if (this.props.text && this.props.text.length > 0) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only if (this.props.text) { and the 'tabs' must have 4 'spaces'.

src={
this.props.src ||
this.buildURL(STATIC_URL)
}/>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'tabs' must have 4 'spaces'.

src={this.props.src} />
src={this.props.src}
zoom={this.props.zoom}
markerColor={this.props.markerColor}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move these lines into defaultProps. (DEFAULT_MARKER_COLOR, DEFAULT_ZOOM_LEVEL)

LocationMessage.defaultProps = {
    target: '_blank',
    apiKey: '',
    zoom: 14,
    markerColor: 'red',
}

@abdurrahmanekr abdurrahmanekr changed the base branch from master to next October 26, 2017 18:42
@abdurrahmanekr abdurrahmanekr merged commit b544448 into Detaysoft:next Oct 30, 2017
@abdurrahmanekr
Copy link
Copy Markdown
Collaborator

I'll work on this for a while. Thanks @michaeldever

@michaeldever
Copy link
Copy Markdown
Contributor Author

@abdurrahmanekr Apologies, haven't had time to look at this again. Will have a look at those changes over the next week.

@abdurrahmanekr
Copy link
Copy Markdown
Collaborator

abdurrahmanekr commented Oct 31, 2017

It's not problem. This changes has been released by 0.7.0. Thanks for your contributions @michaeldever 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants