This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
map_suite_web_for_webapi_quick_start_guide [2017/03/15 07:10] tgwikiupdate |
map_suite_web_for_webapi_quick_start_guide [2017/03/15 07:15] (current) tgwikiupdate |
||
---|---|---|---|
Line 217: | Line 217: | ||
**NOTE:** It is important that the "MapUnit" property of a map object be set using the "GeographyUnit" enumeration. This is because the coordinates stored in a ShapeFile can be in DecimalDegrees (a format of latitude and longitude), feet, meters, or another unit system. Our map has no way to know what the ShapeFile's unit of measurement is until we set it. This information is normally found somewhere in the ShapeFile's documentation (also referred to as its metadata), or within the supplemental data file as discussed in the section on ShapeFiles. It may also come as a separate .txt, .xml, or .html file that begins with the same file name as the main ShapeFile. | **NOTE:** It is important that the "MapUnit" property of a map object be set using the "GeographyUnit" enumeration. This is because the coordinates stored in a ShapeFile can be in DecimalDegrees (a format of latitude and longitude), feet, meters, or another unit system. Our map has no way to know what the ShapeFile's unit of measurement is until we set it. This information is normally found somewhere in the ShapeFile's documentation (also referred to as its metadata), or within the supplemental data file as discussed in the section on ShapeFiles. It may also come as a separate .txt, .xml, or .html file that begins with the same file name as the main ShapeFile. | ||
- | The attributes [RoutePrefix("Quickstart")] and [Route("tile/{z}/{x}/{y}")] are for custom route, we can easily access it by '/HelloWorld/tile/{z}/{x}/{y}'. To make it work, we need to modify the WebApiConfig.cs, like this: | + | The attributes [RoutePrefix("Quickstart")] and [Route("tile/{z}/{x}/{y}")] are for custom route, we can easily access it by '/Quickstart/tile/{z}/{x}/{y}'. To make it work, we need to modify the WebApiConfig.cs, like this: |
<code csharp> | <code csharp> |