Giter VIP home page Giter VIP logo

dpblazormap's Issues

Bounds in TileLayerOptions Causes Exception

Code:
var southWest = new LatLng(14.0, 32.0);
var northEast = new LatLng(32.0, 54.0);
Tuple<LatLng, LatLng>? bounds = Tuple.Create<LatLng, LatLng>(southWest, northEast);
//Create Tile Layer
var tileLayerOptions = new TileLayerOptions()
{
Attribution = "© <a href="https://www.openstreetmap.org/copyright\">OpenStreetMap contributors",
MinZoom = 6,
MaxZoom = 13,
Bounds = bounds,
};

Exception:
Microsoft.JSInterop.JSException: Cannot read properties of undefined (reading 'lat')
TypeError: Cannot read properties of undefined (reading 'lat')
at s.overlaps (https://unpkg.com/[email protected]/dist/leaflet.js:5:12148)
at e._isValidTile (https://unpkg.com/[email protected]/dist/leaflet.js:5:114581)
at e._update (https://unpkg.com/[email protected]/dist/leaflet.js:5:113973)
at e._setView (https://unpkg.com/[email protected]/dist/leaflet.js:5:112013)
at e._resetView (https://unpkg.com/[email protected]/dist/leaflet.js:5:111354)
at e.onAdd (https://unpkg.com/[email protected]/dist/leaflet.js:5:106987)
at e._layerAdd (https://unpkg.com/[email protected]/dist/leaflet.js:5:67662)
at e.whenReady (https://unpkg.com/[email protected]/dist/leaflet.js:5:43287)
at e.addLayer (https://unpkg.com/[email protected]/dist/leaflet.js:5:67885)
at e.addTo (https://unpkg.com/[email protected]/dist/leaflet.js:5:67005)
at Microsoft.JSInterop.JSRuntime.d__16`1[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()

Error after updating to .NET 8

Some sort of JSON serialisation error...

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: ConstructorContainsNullParameterNames, System.Tuple2[DPBlazorMapLibrary.LatLng,DPBlazorMapLibrary.LatLng] SerializationNotSupportedParentType, System.Object Path: $. System.NotSupportedException: ConstructorContainsNullParameterNames, System.Tuple2[DPBlazorMapLibrary.LatLng,DPBlazorMapLibrary.LatLng] SerializationNotSupportedParentType, System.Object Path: $.
 ---> System.NotSupportedException: ConstructorContainsNullParameterNames, System.Tuple2[DPBlazorMapLibrary.LatLng,DPBlazorMapLibrary.LatLng]    at System.Text.Json.ThrowHelper.ThrowNotSupportedException_ConstructorContainsNullParameterNames(Type )    at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.PopulateParameterInfoValues(JsonTypeInfo )    at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateTypeInfoCore(Type , JsonConverter , JsonSerializerOptions )    at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.CreateJsonTypeInfo(Type , JsonSerializerOptions )    at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetTypeInfo(Type , JsonSerializerOptions )    at System.Text.Json.JsonSerializerOptions.GetTypeInfoNoCaching(Type )    at System.Text.Json.JsonSerializerOptions.CachingContext.CreateCacheEntry(Type type, CachingContext context) --- End of stack trace from previous location ---    at System.Text.Json.JsonSerializerOptions.CachingContext.GetOrAddTypeInfo(Type , Boolean )    at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable1 , Boolean , Boolean )
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo.Configure()
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.ConfigureProperties()
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.Configure()
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.g__ConfigureSynchronized|172_0()
   at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type , Boolean , Nullable1 , Boolean , Boolean )    at System.Text.Json.WriteStackFrame.InitializePolymorphicReEntry(Type , JsonSerializerOptions )    at System.Text.Json.Serialization.JsonConverter.ResolvePolymorphicConverter(Object , JsonTypeInfo , JsonSerializerOptions , WriteStack& )    at System.Text.Json.Serialization.JsonConverter1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryWrite(Utf8JsonWriter , Object& , JsonSerializerOptions , WriteStack& )
   at System.Text.Json.Serialization.Converters.ArrayConverter2[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnWriteResume(Utf8JsonWriter , Object[] , JsonSerializerOptions , WriteStack& )    at System.Text.Json.Serialization.JsonCollectionConverter2[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].OnTryWrite(Utf8JsonWriter , Object[] , JsonSerializerOptions , WriteStack& )
   at System.Text.Json.Serialization.JsonConverter1[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryWrite(Utf8JsonWriter , Object[]& , JsonSerializerOptions , WriteStack& )    at System.Text.Json.Serialization.JsonConverter1[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].WriteCore(Utf8JsonWriter , Object[]& , JsonSerializerOptions , WriteStack& )
   Exception_EndOfInnerExceptionStack
   at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack& , NotSupportedException )
   at System.Text.Json.Serialization.JsonConverter1[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].WriteCore(Utf8JsonWriter , Object[]& , JsonSerializerOptions , WriteStack& )    at System.Text.Json.Serialization.Metadata.JsonTypeInfo1[[System.Object[], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Serialize(Utf8JsonWriter , Object[]& , Object )
   at System.Text.Json.JsonSerializer.WriteString[Object[]](Object[]& , JsonTypeInfo1 )    at Microsoft.JSInterop.JSRuntime.InvokeAsync[IJSObjectReference](Int64 , String , CancellationToken , Object[] )    at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__161[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
   at DPBlazorMapLibrary.LayerFactory.CreateTileLayer(String urlTemplate, TileLayerOptions options)
   at DPBlazorMapLibrary.LayerFactory.CreateTileLayerAndAddToMap(String urlTemplate, Map map, TileLayerOptions options)
   at ClimateExplorer.Visualiser.Shared.MapContainer.AfterMapRender()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at DPBlazorMapLibrary.Map.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )

Arrow on the line

How to add an arrow to a line? In the middle of the line? Or at the end of the line?

GeoJson style

Hello,
I would like to know how it is possible to respect/set the style of the lines present in a Geojson file. Mostly color and thickness.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.