dymaptic.GeoBlazor.Pro 0.9.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package dymaptic.GeoBlazor.Pro --version 0.9.0                
NuGet\Install-Package dymaptic.GeoBlazor.Pro -Version 0.9.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="dymaptic.GeoBlazor.Pro" Version="0.9.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add dymaptic.GeoBlazor.Pro --version 0.9.0                
#r "nuget: dymaptic.GeoBlazor.Pro, 0.9.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install dymaptic.GeoBlazor.Pro as a Cake Addin
#addin nuget:?package=dymaptic.GeoBlazor.Pro&version=0.9.0

// Install dymaptic.GeoBlazor.Pro as a Cake Tool
#tool nuget:?package=dymaptic.GeoBlazor.Pro&version=0.9.0                

GeoBlazor Pro

PUT MAPS IN YOUR BLAZOR APPS

With GeoBlazor, you have access to the world’s most powerful and versatile web mapping API, the ArcGIS JavaScript API, but without having to write a single line of JavaScript.

GeoBlazor Pro is a commercial extension to the free GeoBlazor Core library that includes many exclusive features around editing and manipulating GIS data. This package requires agreeing to our license to use. GeoBlazor Pro is currently in an open Beta. You can register for free during the Beta period. By using GeoBlazor Pro, you agree to share your email address with dymaptic, so that we might contact you about updates to the program.

Home Page

GeoBlazor Core GitHub Repository

View the live demo site!

Read the Docs

Join our Discord Server!

Contributors

Special thanks to all the dymaptic and community contributors to GeoBlazor and GeoBlazor Pro!

Dymaptic Team (yes, even our C-Suite writes code!)

Community Contributions to GeoBlazor

Getting Started

  1. Create a new Blazor Server, Blazor Wasm, or Blazor Hybrid (MAUI) project, using the templates provided in your IDE or the dotnet CLI.

  2. Add a PackageReference to the latest version of the dymaptic.GeoBlazor.Pro package via your IDE's Nuget Package Manager or dotnet add package dymaptic.GeoBlazor.Pro --prerelease.

  3. The ArcGIS API requires some form of authentication. The simplest is to use an API Key. Generate a key from the ArcGIS Developer Dashboard. For Blazor Server, place it in your appsettings.json, like this:

    {
      "Logging": ...,
      "AllowedHosts": ...,
      "ArcGISApiKey": "yourKeyValue"
    }
    

    <div style="font-size: 0.8rem; font-style: italic; margin-bottom: 1rem;">

    Note: If you are using Blazor WASM, there are several issues with this approach. First, <code>appsettings.json</code> is not added by default to the template. If you want to add it yourself, you need to add it inside the <code>wwwroot</code> folder.

    <span style="color:red;">Be Aware</span> that the API key will be exposed in the browser (just like it would with Javascript). Even when using Blazor Server, the API key may be present in HTTP requests visible to the user in the browsers dev tools, so you should probably take other steps like <a href="https://developers.arcgis.com/documentation/mapping-apis-and-services/security/api-keys/#referrers" target="_blank"> setting up referrer rules in ArcGIS</a>. </div> <div style="font-size: 0.8rem; font-style: italic"> You can also set up an OAuth2 workflow, which is more secure as it does not expose a static API key, but this is more complex. You can read about all the authentication options in <a href="https://docs.geoblazor.com/pages/authentication.html">Authentication</a>. </div>

  4. Visit dymaptic licensing (https://licensing.dymaptic.com) and register for a license.

  5. Copy the new license key from https://licensing.dymaptic.com/ into your appsettings or secrets. If you intend to release MAUI applications, also add the "MauiAppName" property. "ValidationServerStoragePath" is optional to define where a Blazor Server application will store the validated license result (defaults to Path.GetTempPath()). You must ensure that your server has write access to this path.

{
   "ArcGISApiKey": "yourKeyValue",
   "GeoBlazor": {
      "LicenseKey": "YOUR_LICENSE_KEY",
      "MauiAppName": "YOUR_APP_NAME",
      "ValidationServerStoragePath": "YOUR_PATH_TO_STORAGE"
   }
}
  1. In the root file that defines your html, add the following lines to the <head> section. This would be _Layout.cshtml for Blazor Server, or index.html for Blazor Wasm and Blazor Hybrid. Note that YourProject is the namespace for the application that you are creating.

    <link href="_content/dymaptic.GeoBlazor.Pro"/>
    <link href="_content/dymaptic.GeoBlazor.Core"/>
    <link href="_content/dymaptic.GeoBlazor.Core/assets/esri/themes/light/main.css" rel="stylesheet" />
    <link href="YourProject.styles.css" rel="stylesheet" />
    

    or (dark theme)

    <link href="_content/dymaptic.GeoBlazor.Pro"/>
    <link href="_content/dymaptic.GeoBlazor.Core"/>
    <link href="_content/dymaptic.GeoBlazor.Core/assets/esri/themes/dark/main.css" rel="stylesheet" />
    <link href="YourProject.styles.css" rel="stylesheet" />
    

    <div style="font-size: 0.8rem; font-style: italic; margin-bottom: 1rem;"> Note: You may already have the YourProject.styles.css file. If so, you can just add the two lines to the existing file. In some .Net templates, this file is commented out by default and you will need to add it. </div>

  2. In _Imports.razor, add the following lines, or add as needed to resolve code that you consume.

    @using dymaptic.GeoBlazor.Core.Components
    @using dymaptic.GeoBlazor.Core.Components.Geometries
    @using dymaptic.GeoBlazor.Core.Components.Layers
    @using dymaptic.GeoBlazor.Core.Components.Popups
    @using dymaptic.GeoBlazor.Core.Components.Symbols
    @using dymaptic.GeoBlazor.Core.Components.Views
    @using dymaptic.GeoBlazor.Core.Components.Widgets
    @using dymaptic.GeoBlazor.Core.Events
    @using dymaptic.GeoBlazor.Core.Objects
    @using dymaptic.GeoBlazor.Pro.Components.Widgets
    
  3. In Program.cs, add the following line to your builder.Services to inject logic components like GeometryEngine.

    builder.Services.AddGeoBlazorPro(builder.Configuration);
    

    If you are using Blazor Server, you should also add the following lines to Program.cs to support the .wsv file type.

    var provider = new FileExtensionContentTypeProvider();
    provider.Mappings[".wsv"] = "application/octet-stream";
    
    app.UseStaticFiles();
    // NOTE: for some reason, you still need the plain "UseStaticFiles" call above
    app.UseStaticFiles(new StaticFileOptions
    {
        ContentTypeProvider = provider
    });
    
  4. Create a new Razor Component in the Pages folder, or just use Index.razor. Add a MapView. Give it basic

  5. Create a new Razor Component in the Pages folder, or just use Index.razor. Add a MapView. Give it basic parameters to ensure that it can render.

@page "/"

<MapView Longitude="_longitude" Latitude="_latitude" Zoom="11" Style="height: 400px; width: 100%;"> 
    <Map ArcGISDefaultBasemap="arcgis-topographic">
        <GraphicsLayer @ref="_graphicsLayer" />
    </Map>
    <SketchWidget GraphicsLayerId="_graphicsLayer!.Id!" Position="OverlayPosition.BottomLeft" />
</MapView>

@code {
   private readonly double _latitude = 34.027;
   private readonly double _longitude = -118.805;
   private GraphicsLayer? _graphicsLayer = new();
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.1.1 259 8/15/2024
0.9.21 192 8/1/2024
0.9.18 188 7/20/2024
0.9.17 157 6/27/2024 0.9.17 is deprecated because it has critical bugs.
0.9.15 106 6/27/2024
0.9.14 124 6/27/2024
0.9.13 245 5/8/2024
0.9.12 269 4/26/2024
0.9.10 335 3/27/2024
0.9.9 191 3/23/2024
0.9.8 161 3/9/2024
0.9.7 136 3/6/2024
0.9.5.1 227 2/11/2024
0.9.5 181 2/10/2024 0.9.5 is deprecated because it has critical bugs.
0.9.4 345 12/20/2023
0.9.3 227 12/13/2023
0.9.2 383 11/26/2023
0.9.1 596 10/12/2023
0.9.0 898 9/14/2023