WhirlyGlobe icon indicating copy to clipboard operation
WhirlyGlobe copied to clipboard

[IOS] Is't possible to create 3D object with GeoJSON?

Open maggnus opened this issue 7 years ago • 1 comments

I'm wondering to drop on map some 3D object, for example 3D Point with GeoJSON

{ "type": "Point", "coordinates": [100.0, 100.0, 1.0] }

but founded in code that Z value was dropped...

// We're expecting two numbers here
        if (it->type() == JSON_NUMBER)
        {
            if (node.size() < 2)
                return false;
            
            float lon = it->as_float();  ++it;
            float lat = it->as_float();
            pts.push_back(GeoCoord::CoordFromDegrees(lon,lat));

            // There might be a Z value or even other junk.  We just want the first two coordinates
            //  in this particular case.
            if (subCall)
                return true;

            continue;
        }

maggnus avatar May 05 '17 01:05 maggnus

Our exposure to GeoJSON predates the addition of 3rd coordinate. So yeah, it's being dropped.

I guess you could shove it in there as an attribute, perhaps. That might be easiest at this point.

mousebird avatar May 05 '17 03:05 mousebird