我正在使用本教程https://developers.arcgis.com/net/maui/sample-code/find-place//来尝试添加对ArcGIS Online上托管的图层的搜索。Map会出现,但如果我删除所有错误,则不会出现搜索框。
另外,请解释一下,如果我只需要更改_geolocator URI来搜索图层。
这是两个问题,请大家耐心听我说
错误出现在下面的代码中,因为代码中没有引用
// Enable all controls now that the locator task is ready.
MySearchBox.IsEnabled = true;
MyLocationBox.IsEnabled = true;
MySearchButton.IsEnabled = true;
MySearchRestrictedButton.IsEnabled = true;
字符串
拜托,我漏掉了什么?
我的MainPage.xaml如下所示:
<esri:MapView x:Name="MainMapView" Grid.Row="1" Grid.RowSpan="2" Map="{Binding Map, Source={StaticResource MapViewModel}}" />
<toolkit:SearchView x:Name="MainSearchView" GeoView="{Binding Source={Reference MainMapView}}" Grid.Row="0" Grid.RowSpan="2" />
型
1条答案
按热度按时间xsuvu9jc1#
这些错误是因为我的MainPage.xaml没有必要的xaml MySearchBox(Entry)和其他控件而引发的。
只是添加了控制和一切工作正常。