Here it’s showing how to fly to the location found, but you can add code to drop a billboard in addition or instead of flying there. Let me know if that helps.
Oh yes, I've played with that example for hours. Cannot get a thing out of
it, except the # of characters out of the search bar.
For example, if I search for
123 mai
(not even finishing 123 Main Street)
I only get back what I actually typed
123 mai
which isn't very helpful.
I've tried inspecting various combinations attempting to grab the lat/lon
but it just doesn't seem to be exposed.
Is there a "Select * from exposed methods" list? (or whatever) - It's
frustrating to only have 1 example, which takes you to destination - but
no other properties.
--Shawn
Have you seen this thread? It has a code example for overriding the
"destinationFound" event in the geocoder:
Here it's showing how to fly to the location found, but you can add code
to drop a billboard in addition or instead of flying there. Let me know if
that helps.
I think the issue is that searchText gets updated right after that function is called. If you check viewModel._searchText instead of viewModel.searchText, it should have the full selected value (so if you type “123 M” and then select the full address, .searchText will have only what you typed and _searchText will have the full address).
Those coordinates are not in deep space. They are in fact Texas, exactly at the longitude and latitude you have in the image. You can confirm this by converting it to a longitude/latitude pair:
var cartographic = Cesium.Cartographic.fromCartesian(new Cesium.Cartesian3(-808935.2818322802, -5492868.930112202, 3128685.901578763));
var latitude = cartographic.latitude * Cesium.Math.DEGREES_PER_RADIAN;
var longitude = cartographic.longitude * Cesium.Math.DEGREES_PER_RADIAN;
console.log("latitude: " + latitude);
console.log("longitude: " + longitude);
``
You can also confirm it by placing a billboard at that coordinate to visually see that it is in the right place, on Earth: