Skip to content

Implement the Cesium ion geocoder #582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Implement the Cesium ion geocoder #582

wants to merge 3 commits into from

Conversation

azrogers
Copy link
Contributor

This PR implements the Cesium ion geocoder in Unity. The geocoder can be used like so:

 void Start()
 {
     var geocoder = new CesiumIonGeocoder();
     StartCoroutine(GeocodeCoroutine(geocoder));
 }

 IEnumerator GeocodeCoroutine(CesiumIonGeocoder geocoder)
 {
     var task = geocoder.Geocode(
          CesiumIonServer.defaultServer, 
          "<token here>", 
          CesiumIonGeocoderProviderType.Google, 
          CesiumIonGeocoderRequestType.Search, 
          "<search query here>");
     yield return new WaitForTask(task);
     Debug.Log(task.Result.features);
 }

This is in a draft PR for the moment as it is not fully working yet. Some things also left to work out:

  • error handling when creating a connection
  • returning bounding boxes
  • using default token when no token is provided to the method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant