Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
718 views
in Technique[技术] by (71.8m points)

ios - Cannot update .geojson file for app submission on App Store

My GeoJSON file is supposed to cover the entire world. Here is the GeoJSON file:

{ "type": "MultiPolygon",
    "coordinates": [
                    [[[-169.4,58.8], [-168.0,83.4], [188.4,83.3], [194.0,-72.8], [-166.6,-73.6], [-169.4,58.8]]]
                    ]
}

The name of the file is example.GeoJSON.

I keep getting the following error when uploading the file:

Your routing app coverage file is invalid. For more information see the Developer Guide.

What is wrong with the above file?

My app has a mapkit that shows the annotation of a particular place depending on the place that is chosen. When tapping the map in the app, Apple Maps opens up and shows the directions to that place from the current position. Do I also actually need to upload the .GeoJSON file?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Based on the following:

1) The Latitude goes from -90 into +90 (i.e. this is where you stand on the middle of the globe going either up or down) (AKA vertically).

2) The Longitude goes from 0 to 360 (i.e. standing where you are, and going around the globe in a circle horizontally.

3) The Polygon usually has 4 points, however, in this case it would be 5 whereas the first and last points are the same to denote a closed-polygon.

4) Adding the apple requirements of ( "type": "MultiPolygon" ) plus coordinates,

5) You would end up with the following contents of a file:

{ "type": "MultiPolygon",
    "coordinates": [
                    [[
                       [-360.0000,-90.0000]
                      ,[-360.0000, 90.0000]
                      ,[-000.0000, 90.0000]
                      ,[-000.0000,-90.0000]
                      ,[-360.0000,-90.0000]
                    ]]
                    ]
}

Therefore, start your text editor, and then copy and paste the above, save the file into World.geojson and then upload.

Mine worked fine.

Enjoy! Heider


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...