Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] - Modernize Code to Strongly Typed #6

Open
bmusgrove-accuraty opened this issue Nov 6, 2024 · 0 comments
Open

[Enhancement] - Modernize Code to Strongly Typed #6

bmusgrove-accuraty opened this issue Nov 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bmusgrove-accuraty
Copy link

Use SVRRF2024 - AccuMap\Google__Map--16-9-with-CTA.cshtml as an unfinished example.

@inherits AppCode.Razor.AppRazor
@using AppCode.Data

@{
    var map = As<Map>(MyItem);
    // src="https://www.google.com/maps/embed/v1/place?key=AIza...nLFQ&q=Adkisson+Construction,Tuscola,IL&amp;zoom=14"
    string location = map.ProperCompanyName.Replace(' ', '+');
    location += "," + map.City.Replace(' ', '+');
    location += "," + map.State.Replace(' ', '+');
    string zoom = string.Empty;
    if(map.EnableZoom && (map.DefaultZoom > 0))
    {
      zoom = "&zoom=" + map.DefaultZoom.ToString();
    }
}


<div class="AccuMap-container" @Kit.Toolbar.Default(map)>
      <iframe
        class="AccuMap-responsive-iframe"
        id="GMapEmbd-@map.Id"
        loading="lazy"
        allowfullscreen
        src="https://www.google.com/maps/embed/v1/place?key=@App.Settings.APIKey&q=@location@zoom" >
      </iframe>
</div>
@bmusgrove-accuraty bmusgrove-accuraty added the enhancement New feature or request label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant