|
POST
|
Hola Xander Bakker ya subí el documento al Grupo Comunidad Esri Colombia - Ecuador - Panamá para que lo revises. Es el mismo que está en la Wiki de nuestra Área en Serankua.
... View more
02-28-2019
09:30 AM
|
0
|
0
|
700
|
|
POST
|
Are there any plans to publish Windows 10 Mobile version in the Windows Store?
... View more
09-28-2017
09:06 AM
|
1
|
1
|
476
|
|
POST
|
Solved with this post: https://community.esri.com/message/697958-re-problem-after-upgrading-my-xamarin-app-with-arcgisnet-1001?commentID=697958#comment-697958 Uninstall app on Visual Studio Android Emulator Hyper-V machines, Cleaning Solutions, ReCompile and ReLaunch.
... View more
09-13-2017
01:45 PM
|
0
|
0
|
728
|
|
POST
|
Updating the nuget packages from ArcGIS Runtime from version 100.0.0 to 100.1..0 I get the following exception when loading a layer of type ArcGISMapImageLayer: {System.EntryPointNotFoundException: CoreRT_Request_getHttpOperation at (managed-to-native wrapper) RuntimeCoreNet.GeneratedWrappers.CoreRequest: CoreRT_Request_getHttpOperation (intptr, intptr &) at RuntimeCoreNet.GeneratedWrappers.CoreRequest.get_HttpOperation () [0x00006] in <687a544c38e8410dbac0acfc0843ba7e>: 0 at Esri.ArcGISRuntime.Internal.RequestRequiredHandler + <IssueRequestAndRespond> d__14.MoveNext () [0x00157] in <687a544c38e8410dbac0acfc0843ba7e>: 0} This only happens when test the Android app version.
... View more
09-13-2017
12:04 PM
|
0
|
1
|
841
|
|
POST
|
What is the right way to release a * .tpk file that was being used by a MobileMapPackage so that it can be deleted.
... View more
09-12-2017
10:07 PM
|
0
|
2
|
803
|
|
POST
|
Now I have another problem: How can I close the .tpk and .mmpk files before deleting them?
... View more
09-10-2017
09:52 AM
|
0
|
0
|
1501
|
|
POST
|
ok the point is that on the one hand it is easier to download the map with all the settings that it has (layers, visibility ranges, symbology, labeling, popups setting) with OfflineMapTask versus download the geodatabase and then by code redefine all configurations , but in the other hand it is a requirement of my app that these settings could be changed in the webmap and these changes must be reflected in the device. Is there a way to extract or generate the geodatabase from MobileMapPackage?
... View more
09-05-2017
09:03 AM
|
0
|
2
|
1501
|
|
POST
|
In a Xamarin.Forms app, when you create a MobileMapPackage using OfflineMapTask, how you delete or destroy that MobileMapPackage. If only delete file or directory that containing the MobileMapPackage, the replica created at the remote FeatureService is not unregistered and sometimes the file and directory containing it are blocked and can not be deleted unless the app is terminated and re-launched .
... View more
09-05-2017
12:04 AM
|
0
|
6
|
1983
|
|
POST
|
I forgot to mention that I am using the MVVM pattern, so in the ViewModel class I have a LocationDisplay property and in the XAML file I make the respective Binding to the ViewModel class property. But when I query the value of the property in the ViewModel I get the null value. The issue is that LocationDisplay has no constructor, it can not be initialized by code and is the MapView that creates its LocationDisplay instance, but when doing Binding from the ViewModel I replace the value that the MapView gives to the LocationDisplay by a null value. Solution: Add to the 'Binding the Mode = OneWayToSource' option, violá!!!
... View more
09-02-2017
10:59 PM
|
0
|
1
|
1538
|
|
POST
|
Hola Xander, claro que sí tengo uno pero tengo que hacerle algunas modificaciones.
... View more
09-02-2017
10:23 PM
|
0
|
0
|
700
|
|
POST
|
Hola! En la discusión del link, se muestra como hacer la correcta implementación del patrón MVVM en proyectos desarrollados con Xamarin.Forms y el ESRI.ArcGISRuntime para .NET. https://community.esri.com/thread/195836-how-to-get-mapview-in-viewmodel-using-mvvm Una de mis respuesta fue marcada como la correcta.
... View more
07-05-2017
09:49 AM
|
1
|
3
|
1175
|
|
POST
|
In the last Microsoft Build 2017 that took place in May of this year, Microsoft announced the unification of the different XAML dialects used in various technologies such as Xamarin.Forms, UWP and WPF under the XAML Standard 1.0. The Esri ArcGISRuntime for .NET and specifically the APIS for WPF, UWP and Xamarin.Forms are expected to meet this standard?
... View more
07-05-2017
09:29 AM
|
0
|
2
|
811
|
|
POST
|
If you are using Xamarin.Forms maybe this code can be usefull: using System;
using System.Globalization;
using Xamarin.Forms;
namespace GeonetPost.Xamarin.Converters
{
/// <summary>
///
/// </summary>
public class GeographicCoordinateConverter : IValueConverter
{
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <param name="targetType"></param>
/// <param name="parameter"></param>
/// <param name="culture"></param>
/// <returns></returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value.GetType() == typeof(double) && targetType == typeof(string))
{
return ToDMS((double)value, (string)parameter);
}
return value;
}
/// <summary>
///
/// </summary>
/// <param name="valor"></param>
/// <param name="eje"></param>
/// <returns></returns>
private string ToDMS(double valor, string eje)
{
var cSigno = string.Empty;
var signo = Math.Sign(valor);
valor = Math.Abs(valor);
if (!string.IsNullOrEmpty(eje))
{
cSigno = eje.ToUpper() == "X" ? signo > 0 ? "E" : "W" : signo > 0 ? "N" : "S";
signo = 1;
}
var grados = Math.Floor(valor);
var minutos = Math.Floor((valor - grados) * 60);
var segundos = ((valor - grados) * 60 - minutos) * 60;
return string.Format("{0:0}°{1:00}'{2:00.000}\" {3}", signo * grados, minutos, segundos, cSigno);
}
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <param name="targetType"></param>
/// <param name="parameter"></param>
/// <param name="culture"></param>
/// <returns></returns>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
} In XAML code you can use the converter like in the next code: <ContentPage.Resources>
<ResourceDictionary>
<cv:GeographicCoordinateConverter x:Key="GeoCoorConverter" />
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout Orientation="Vertical"
Margin="10"
HeightRequest="100">
<Label Text="{Binding UpdatedViewpoint.TargetGeometry.XMin,
Converter={StaticResource GeoCoorConverter},
ConverterParameter='X',
StringFormat='XMin = {0}'}" />
<Label Text="{Binding UpdatedViewpoint.TargetGeometry.YMin,
Converter={StaticResource GeoCoorConverter},
ConverterParameter='Y',
StringFormat='YMin = {0}'}" />
<Label Text="{Binding UpdatedViewpoint.TargetGeometry.XMax,
Converter={StaticResource GeoCoorConverter},
ConverterParameter='X',
StringFormat='XMax = {0}'}" />
<Label Text="{Binding UpdatedViewpoint.TargetGeometry.YMax,
Converter={StaticResource GeoCoorConverter},
ConverterParameter='Y',
StringFormat='YMax = {0}'}" />
</StackLayout>
To see the complete sample code visit: https://github.com/marceloctorres/GeonetPost.Xamarin (Xamarin sample) or https://github.com/marceloctorres/GeonetPost.WPF (WPF sample).
... View more
06-20-2017
08:50 AM
|
0
|
0
|
1629
|
|
POST
|
I'm back. Here I'll explain the solution that I made to WPF now to Xamarin.Forms. First, no implement MVVM pattern easly I used nuget package Prism.Forms from Brian Lagunas. I made the ViewModel class in C# and the View code using XAML in a similar way that in the WPF Project: This is the ViewModel code: using Esri.ArcGISRuntime.Geometry;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;
using Esri.ArcGISRuntime.UI;
using Prism.Commands;
using Prism.Mvvm;
using System.Windows.Input;
#if WINDOWS_UWP
using Colors = Windows.UI.Colors;
#else
using Colors = System.Drawing.Color;
#endif
namespace GeonetPost.Xamarin.ViewModels
{
public class MapPageViewModel : BindableBase
{
private Map _myMap;
/// <summary>
///
/// </summary>
public Map MyMap
{
get { return _myMap; }
set { SetProperty(ref _myMap, value); }
}
private GraphicsOverlayCollection _grapchicsOverlays;
/// <summary>
///
/// </summary>
public GraphicsOverlayCollection GraphicsOverlays
{
get { return _grapchicsOverlays; }
set { SetProperty(ref _grapchicsOverlays, value); }
}
private Viewpoint _viewpoint;
/// <summary>
///
/// </summary>
public Viewpoint Viewpoint
{
get { return _viewpoint; }
set { SetProperty(ref _viewpoint, value); }
}
private Viewpoint _updatedViewpoint;
/// <summary>
///
/// </summary>
public Viewpoint UpdatedViewpoint
{
get { return _updatedViewpoint; }
set { SetProperty(ref _updatedViewpoint, value); }
}
/// <summary>
///
/// </summary>
public ICommand ButtonClickCommand { get; private set; }
/// <summary>
///
/// </summary>
public ICommand ZoomCommand { get; private set; }
/// <summary>
///
/// </summary>
public ICommand UpdateViewpointCommand { get; private set; }
/// <summary>
///
/// </summary>
public MapPageViewModel()
{
MyMap = new Map(Basemap.CreateStreets());
GraphicsOverlays = new GraphicsOverlayCollection();
ButtonClickCommand = new DelegateCommand(ButtonClickAction);
ZoomCommand = new DelegateCommand(ZoomAction);
UpdateViewpointCommand = new DelegateCommand<Viewpoint>(UpdateViewpointAction);
GraphicsOverlay go = new GraphicsOverlay()
{
Id = "MyGraphicOverlay"
};
GraphicsOverlays.Add(go);
}
/// <summary>
///
/// </summary>
private void ButtonClickAction()
{
var g = new Graphic()
{
Geometry = new MapPoint(-74, 4, SpatialReferences.Wgs84),
Symbol = new SimpleMarkerSymbol() { Color = Colors.Green, Style = SimpleMarkerSymbolStyle.Circle, Size = 10 }
};
GraphicsOverlays[0].Graphics.Clear();
GraphicsOverlays[0].Graphics.Add(g);
}
/// <summary>
///
/// </summary>
private void ZoomAction()
{
Viewpoint = new Viewpoint(4, -74, 5000000);
}
/// <summary>
///
/// </summary>
/// <param name="vp"></param>
private void UpdateViewpointAction(Viewpoint vp)
{
var projectedVp = new Viewpoint(GeometryEngine.Project(vp.TargetGeometry, SpatialReferences.Wgs84), vp.Camera);
if (UpdatedViewpoint == null || projectedVp.ToJson() != UpdatedViewpoint.ToJson())
{
UpdatedViewpoint = projectedVp;
}
}
}
}
This is the View code: <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
xmlns:bh="clr-namespace:GeonetPost.Xamarin.Behaviors"
xmlns:cv="clr-namespace:GeonetPost.Xamarin.Converters"
xmlns:esri="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
prism:ViewModelLocator.AutowireViewModel="True"
x:Class="GeonetPost.Xamarin.Views.MapPage">
<ContentPage.Resources>
<ResourceDictionary>
<cv:GeographicCoordinateConverter x:Key="GeoCoorConverter" />
</ResourceDictionary>
</ContentPage.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<esri:MapView Map="{Binding MyMap}"
GraphicsOverlays="{Binding GraphicsOverlays}">
<esri:MapView.Behaviors>
<bh:SetMapViewViewportBehavior Viewpoint="{Binding Viewpoint}" />
<bh:MapViewViewpointChangedBehavior Command="{Binding UpdateViewpointCommand}" />
</esri:MapView.Behaviors>
</esri:MapView>
<Grid Margin="10"
HorizontalOptions="Start"
VerticalOptions="Start"
BackgroundColor="Beige">
<StackLayout Orientation="Vertical"
Margin="10"
HeightRequest="100">
<Label Text="{Binding UpdatedViewpoint.TargetGeometry.XMin, Converter={StaticResource GeoCoorConverter}, ConverterParameter='X', StringFormat='XMin = {0}'}" />
<Label Text="{Binding UpdatedViewpoint.TargetGeometry.YMin, Converter={StaticResource GeoCoorConverter}, ConverterParameter='Y', StringFormat='YMin = {0}'}" />
<Label Text="{Binding UpdatedViewpoint.TargetGeometry.XMax, Converter={StaticResource GeoCoorConverter}, ConverterParameter='X', StringFormat='XMax = {0}'}" />
<Label Text="{Binding UpdatedViewpoint.TargetGeometry.YMax, Converter={StaticResource GeoCoorConverter}, ConverterParameter='Y', StringFormat='YMax = {0}'}" />
</StackLayout>
</Grid>
<StackLayout Grid.Row="1"
Orientation="Horizontal">
<Button Margin="5"
Text="Click me!"
WidthRequest="150"
BackgroundColor="Black"
TextColor="White"
Command="{Binding ButtonClickCommand}" />
<Button Margin="5"
Text="Zoom to Point"
WidthRequest="150"
BackgroundColor="Black"
TextColor="White"
Command="{Binding ZoomCommand}" />
</StackLayout>
</Grid>
</ContentPage> And this is the code of the SetMapViewViewportBehavior: using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Xamarin.Forms;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using Xamarin.Forms;
namespace GeonetPost.Xamarin.Behaviors
{
public class SetMapViewViewportBehavior : BehaviorBase<MapView>
{
/// <summary>
///
/// </summary>
public static readonly BindableProperty ViewpointProperty =
BindableProperty.Create(nameof(Viewpoint), typeof(Viewpoint), typeof(SetMapViewViewportBehavior));
/// <summary>
///
/// </summary>
public Viewpoint Viewpoint
{
get { return (Viewpoint)GetValue(ViewpointProperty); }
set { SetValue(ViewpointProperty, value); }
}
/// <summary>
///
/// </summary>
public SetMapViewViewportBehavior()
{
}
/// <summary>
///
/// </summary>
/// <param name="propertyName"></param>
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
base.OnPropertyChanged(propertyName);
if (propertyName == nameof(this.Viewpoint))
{
SetViewpoint(this.Viewpoint);
}
}
/// <summary>
///
/// </summary>
/// <param name="vp"></param>
private async void SetViewpoint(Viewpoint vp)
{
if (vp != null)
{
var actualVp = this.AssociatedObject.GetCurrentViewpoint(ViewpointType.BoundingGeometry);
if (actualVp == null || (actualVp != null && !actualVp.Equals(vp)))
{
Debug.WriteLine("SetViewpoint");
await this.AssociatedObject.SetViewpointAsync(vp);
}
}
}
}
}
Note that I had to wrote a BehaviorBase class to implement a Behavior code that in WPF already exits. Now this that the Xamarin.Forms looks like in Windows and Android: To see the complete solution go to this github repo https://github.com/marceloctorres/GeonetPost.Xamarin Finally, no make a zoom to your trace route, only set the Viewport property in the MapPageViewModel class with a new Viewport using your polyline extent geometry. For example: ViewPoint = new Viewpoint(route.Extent); And the SetMapViewViewportBehavior does the rest. Marcelo
... View more
06-12-2017
09:48 PM
|
3
|
2
|
9313
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-25-2025 12:51 PM | |
| 1 | 06-01-2017 10:08 AM | |
| 1 | 09-28-2017 09:06 AM | |
| 1 | 07-05-2017 09:49 AM | |
| 3 | 06-12-2017 09:48 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|