Geocoder for unity

I was looking for geocoding features for cesium and I saw that there is an implementation for CesiumJS, is there a way to use that geocoder with unity?

We’re working on it! There’s currently an open pull request in Cesium Native to add the Cesium ion geocoder that CesiumJS can use to Cesium Native. Once that’s in, it’s just a matter of adding an interface to this function from the Unity side. Support for other geocoders besides the Cesium ion geocoder is on the roadmap, but we don’t have any idea of when at the moment.

1 Like

@JoyJacksonThomas Aside from Ashley’s answer above, it would also help if you could share your use case. For instance, do you want to use the geocoder within the game itself, at runtime? Or do you want to use it to find locations in the Unity Editor?

These would just help us figure out how to design the feature when we add it :smile:

Thanks for the response. We are trying to allow the user the zoom to any town or city of interest. I am assuming we could leverage a google geocoder API in the background. Would this be your suggestion at the moment?

That’s correct @mmann1123, if you’re looking to implement geocoding features at the moment, you’ll want to use something like Google or Bing’s geocoder APIs.

Hey just wanted to check on the status of this. It looks like it got merged into Cesium Native, wasn’t sure what the process was like for getting it added to Unity (our use case is similar to the one above, letting users type an address and zoom to that location).

Unfortunately the status is pretty much as you’ve described, @abliss86. We added geocoding support to Cesium Native, but haven’t yet added it to Cesium for Unity. We definitely welcome a community contribution for that, if you’re up for it!

Hey, I’d potentially be interested in taking a crack at it… is there any guide for writing interfaces?

1 Like

Thanks for your interest in contributing, @abliss86! The first step is to get yourself set up to build the Cesium for Unity plugin. See the Developer Setup page in the documentation:

Next, I think you will want to add a C# API to do the geocoding and return the results. That will require some native C++ code and using Reinterop to access it from C#. This page will be useful background for that:

Once you make it that far, you might have a sense of how to do it. But ask questions and we can help you through it!

1 Like