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

UTFGrid: Specify what field to use for an object's key #28

Open
Mr0grog opened this issue Jan 26, 2013 · 0 comments
Open

UTFGrid: Specify what field to use for an object's key #28

Mr0grog opened this issue Jan 26, 2013 · 0 comments

Comments

@Mr0grog
Copy link
Member

Mr0grog commented Jan 26, 2013

It would be nice to specify what field to use as an object's key in a UTFGrid's data object.

For example, if we had the following GeoJSON object:

{
  "type": "feature",
  "geometry": { ... },
  "properties": {
    "name": "City Hall",
    "building_id": 15,
    ...
  }
}

And we specified that building_id should be used, we'd get the following UTFGrid:

{
  "grid": [" !",
           "  "],
  "keys": ["", "15"],
  "data": {
    "15": {"name": "City Hall", "building_id": 15, ... }
  }
}

Or if we specified name:

{
  "grid": [" !",
           "  "],
  "keys": ["", "City Hall"],
  "data": {
    "City Hall": {"name": "City Hall", "building_id": 15, ... }
  }
}

This is probably not a huge deal, but I can imagine cases where it might be useful. Not top priority for sure, though.

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

No branches or pull requests

1 participant