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 js geoitem geo #1822

Merged
merged 1 commit into from
Jul 14, 2018
Merged

add js geoitem geo #1822

merged 1 commit into from
Jul 14, 2018

Conversation

PeterTheOne
Copy link
Member

Adds a js geoitem geo which I need for https://github.com/SemanticMediaWiki/SemanticMaps/ . This is still only a rough implementation (copy from dataitem.text.js).

This PR includes:

  • Tests (unit/integration)
  • CI build passed

*/
getGeo: function() {
return this.geo;
}
Copy link
Contributor

@mwjames mwjames Sep 8, 2016

Choose a reason for hiding this comment

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

What does "plain geo representation" mean? Are those coordinates as string, does this.geo return an object of lat, long or is it more something like 52° 30' 59", 13° 24' 0"?

The DI [0] returns an array of array( 'lat' => $this->latitude, 'lon' => $this->longitude ) so I'd expect something similar.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/dataitems/SMW_DI_GeoCoord.php#L96-L103

@mwjames
Copy link
Contributor

mwjames commented Jul 14, 2018

There is a lingering issue that got not addressed but I'm fine merging it since it covers the rudimentary use case of geo. Any issues with the formatting of the output should be addressed in a follow-up.

@mwjames mwjames merged commit 1ea2ff7 into master Jul 14, 2018
@mwjames mwjames deleted the dataitem-geo-js branch July 14, 2018 08:20
@kghbln kghbln added this to the SMW 3.0.0 milestone Jul 14, 2018
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