i want to have geometry of features i select in geocode results, actually i want to highlight selected feature by geometry (use polygon) plz tell me how ? thanks, sorry my english very bad
No need to apologize! Our community will still try to help you as much as possible Does this sandcastle demo resemble what you are looking for?
If not, can you find another sandcastle demo or example of what you have in mind? I am looking forward to learning more.
-Sam
thank you for your hard support! but i have another question, viewer.geocoder.viewModel.destinationFound = function flyToDestination(viewModel, toado) { console.log("He", toado); // copy code zoom to console.log("He", toado[0][0]); viewer.camera.flyTo({ destination: Cesium.Cartesian3.fromDegrees( toado[0][0], toado[0][1], 50, ), }); var redPolygon = viewer.entities.add({ polygon: { hierarchy: Cesium.Cartesian3.fromDegreesArray(toado.flat()), material: Cesium.Color.ORANGE.withAlpha(0.5), }, }); };
i want to remove older polygon when i create a new polygon from toado, can you help me?
I recommend setting the variable to undefined
. Please give this a try and get back to me!
-Sam