Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples to ol.coordinate functions #2425

Merged
merged 1 commit into from Jul 23, 2014
Merged

Add examples to ol.coordinate functions #2425

merged 1 commit into from Jul 23, 2014

Conversation

marcjansen
Copy link
Member

Title says it all.

* Example:
*
* var coord = [7.85, 47.983333];
* var otherCoord = ol.coordinate.add(coord, [-2, 4]);
Copy link
Member

Choose a reason for hiding this comment

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

I'd be tempted to skip the return here (though your comment below clarifies, it risks misinterpretation since it is named otherCoord).

var coord = [-180, 45];
ol.coordinate.add(coord, [360, -90]);
// coord is now [180, -45]

@tschaub
Copy link
Member

tschaub commented Jul 23, 2014

Nice @marcjansen! One comment on ol.coordinate.add that you can take or leave (it would be more consistent with your other examples not to use the return). It might be nice to update the title to read "Add examples to ol.coordinate functions" just so the changelog is more specific.

In any case, merge when ready.

@marcjansen
Copy link
Member Author

Thanks for the review Tim. I'll change the mentioned parts and then merge.

@marcjansen marcjansen changed the title Add code examples to @api functions. Add examples to ol.coordinate functions Jul 23, 2014
@marcjansen
Copy link
Member Author

Is there any chance that e81e030 and d0efa9e can be removed from this branch without destroying the content?

Is rebasing a usable otion here? I don't want to mess master's commit history.

@ahocevar
Copy link
Member

@marcjansen You can use git rebase --interactive cd84d76. Then, in the text editor that pops up, remove the two lines with the merge commits. Caveat: I have removed commits with this, but I haven't tried it with merge commits, so triple-check the result before force-pushing.

@marcjansen
Copy link
Member Author

@ahocevar git rebase --interactive cd84d76 gives me

rebase

Which will affect way more commit then this needs. I think I will simply create a new branch with the changes applied via a .diff

@marcjansen
Copy link
Member Author

That worked fine, I'll merge once Travis is done.

marcjansen added a commit that referenced this pull request Jul 23, 2014
Add examples to ol.coordinate functions
@marcjansen marcjansen merged commit 8b7f80c into openlayers:master Jul 23, 2014
@marcjansen marcjansen deleted the examples branch July 23, 2014 07:26
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.

None yet

3 participants