# NEST - problem with AutoMap() and geo\_point

**URL:** https://discuss.elastic.co/t/nest-problem-with-automap-and-geo-point/123086
**Category:** Elasticsearch
**Created:** [March 8, 2018, 2:07pm UTC](https://discuss.elastic.co/t/nest-problem-with-automap-and-geo-point/123086 "2018-03-08T14:07:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ddz95](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@ddz95](https://discuss.elastic.co/u/ddz95)
#### Post date: [March 8, 2018, 2:07pm UTC](https://discuss.elastic.co/t/nest-problem-with-automap-and-geo-point/123086/1 "2018-03-08T14:07:36Z")

</div>

Hi everyone. I'll get to the point:

First class: AddressPoint.cs

`public GeoLocation Loc { get; set; }`

Form1.cs

```
var settings = new ConnectionSettings(pool).DefaultIndex("testindex");

            var client = new ElasticClient(settings);

            if (client.IndexExists("testindex").Exists)
                client.DeleteIndex("testindex");

            var createIndexResponse = client.CreateIndex("testindex", c => c
                .Mappings(ms => ms
                    .Map<AddressPoint>(m => m
                        .AutoMap()
                    )
                )
            );

```

then later in the code generating object and filling it with properties:

`row.Loc = new GeoLocation((double) row.WGS84Lat, (double) row.WGS84Lon);`

All that I have already done should map row.Loc to geo\_point but the result is:

```
"loc": {
            "properties": {
              "lat": {
                "type": "float"
              },
              "lon": {
                "type": "float"
              }
            }
          },

```

Could someone enlighten me what I'm doing wrong?

Elasticsearch version: 6.2.1  
NEST version: 6.0.0.0

Thanks.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 5, 2018, 2:08pm UTC](https://discuss.elastic.co/t/nest-problem-with-automap-and-geo-point/123086/2 "2018-04-05T14:08:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
