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

Adding members not specified by GeoJSON #17

Open
Conradaek opened this issue Sep 4, 2014 · 1 comment
Open

Adding members not specified by GeoJSON #17

Conradaek opened this issue Sep 4, 2014 · 1 comment

Comments

@Conradaek
Copy link

I would like to suggest that a nice feature would be possibility do add any members to the GeoJSON object. I mean objects that are not specified in GeoJSON standard.

E.g. I am working now on a project, where PHP script will be outputting GeoJSON data. The data will be loaded via AJAX to a JavaScript and then load a Google Map based on the data.

I want to pass via GeoJSON some settings to set up a map e.g. an initial zoom value.

So let's say I have a GeoJSON FeatureColletion object. The collection is made of 1 feature (Point). I am specifying an initial zoom value as 2-nd member. I want my GeoJSON look this:


{
    "type":"FeatureCollection",
    "zoom": 12,
    "bbox":[
        19.967651,
        53.537043,
        19.967651,
        53.537043
    ],
    "features":[
        {
            "type":"Feature",
            "geometry":{
                "type":"Point",
                "coordinates":[
                    19.967651,
                    53.537043
                ]
            },
            "properties": null
        }
    ]
}

As I understand the specification of GeoJSON standard, it is allowed to add such members.

What do you think about it? I mean, what do you think about extending your lib so that you can add other members (not specified in a GeoJSON spec).

@jmikola
Copy link
Owner

jmikola commented Sep 4, 2014

This is planned, likely in a 1.1 release. I recall seeing this in the spec, but it was after I had already released 1.0 -- and I never got around to creating a TODO ticket for it.

@jmikola jmikola added this to the 1.1.0 milestone Sep 4, 2014
@jmikola jmikola removed this from the 1.1.0 milestone Apr 1, 2022
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

2 participants