@page "/" @using System.Net.Http.Headers @using System.Text.Json @using Newtonsoft.Json Dealers - Car | Canvas
Canvas Logo

It has always been, and will always be, about quality. We're passionate about ethically sourcing the finest coffee beans, roasting them with great care. We'd like to hear your message!

Quick Contact

@code { TelerikMap? MapRef { get; set; } public double Zoom { get; set; } = 1; public static double[] Center = [40.68, 74.04]; public string MapHeight { get; set; } = "800px"; public string[] Subdomains { get; set; } = new string[] { "a", "b", "c" }; public string UrlTemplate { get; set; } = "https://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png"; public string Attribution { get; set; } = "© OpenStreetMap contributors"; protected override async Task OnInitializedAsync() { HttpClient client = new(); var ip = await client.GetStringAsync("https://api.ipify.org"); // Free API to get public IP of user var response = await client.GetStringAsync(String.Format("https://ipapi.co/{0}/json/", ip)); Console.WriteLine(response); LocationDetails? json = JsonConvert.DeserializeObject(response); if (json != null) { Center = [json.latitude, json.longitude]; Zoom = 13; } InitializeMapMarkers(Center); if (MapRef != null) MapRef.Refresh(); } public async void OnMarkerClick(MapMarkerClickEventArgs args) { var dataItem = args.DataItem as MarkerModel; CurrentSelection = dataItem.Title; CurrentBlurb = dataItem.Blurb; await ToggleModal(); Console.WriteLine(dataItem.Title); } public List MapMarkers { get; set; } = new List() { new MarkerModel() { Title = "" } }; private void InitializeMapMarkers(double[] coords) { // Server call to load map markers into a list of tuples List<(double[], string)> localMarkers = MapDriver.InitializeMarkers(coords); foreach (var current in localMarkers) { MapMarkers.Add(new MarkerModel() { LatLng = current.Item1, Title = current.Item2, Blurb = string.Format("This is {0}'s blurb. This will be replaced when a lookup is created.", current.Item2) }); } } public class MarkerModel { public double[] LatLng { get; set; } = [42.4649, -83.3684]; public string Title { get; set; } = ""; public string Blurb { get; set; } = ""; } private class LocationDetails { public string ip { get; set; } = ""; public string network { get; set; } = ""; public string version { get; set; } = ""; public string city { get; set; } = ""; public string region { get; set; } = ""; public string region_code { get; set; } = ""; public string country { get; set; } = ""; public string country_code { get; set; } = ""; public string country_code_iso3 { get; set; } = ""; public string country_capital { get; set; } = ""; public string country_tld { get; set; } = ""; public string continent_code { get; set; } = ""; public bool in_eu { get; set; } = false; public string postal { get; set; } = ""; public double latitude { get; set; } = -1; public double longitude { get; set; } = -1; public string timezone { get; set; } = ""; public string utc_offset { get; set; } = ""; public string country_calling_code { get; set; } = ""; public string currency { get; set; } = ""; public string currency_name { get; set; } = ""; public string languages { get; set; } = ""; public string country_area { get; set; } = ""; public string country_population { get; set; } = ""; public string asn { get; set; } = ""; public string org { get; set; } = ""; } }

Find Your Shop:

@CurrentSelection @CurrentBlurb


Visit Page
@code{ public TelerikPopover? Popover { get; set; } public string CurrentSelection { get; set; } = "123412341234onetwothreefour"; public string CurrentBlurb { get; set; } = "This is a blurb for a shop. I believe it is rather dastardly."; public bool isVisible = false; public async Task ToggleModal() { if (isVisible) isVisible = false; else isVisible = true; await Task.Delay(1); } public void VisitClickHandler() { Console.WriteLine("Visiting page" + CurrentSelection); } }

Long Battery Life

Canvas provides support for Native HTML5 Videos that can be added to a Background.

24x7 Service

Complete control on each & every element that provides endless customization.

Petrol, Diesel & LPG

Change your Website's Primary Scheme instantly by simply adding the dark class.

Powerful Dashboard

Canvas provides support for Native HTML5 Videos that can be added to a Background.

Differnt Color Options

Complete control on each & every element that provides endless customization.

All wheel Drive

Change your Website's Primary Scheme instantly by simply adding the dark class.



Popular Cars