Skip to content

Commit

Permalink
Merge pull request #33 from unibuc-cs/dvoinescu/bug-fixes
Browse files Browse the repository at this point in the history
Fixed map bugs
  • Loading branch information
Elias2510 authored Jan 30, 2025
2 parents 9b08aa6 + 71ae43a commit 8cb520f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ async
</div>
</div>
<div class="d-flex justify-content-around"> <!-- Some basic style for layout -->
<a class="btn btn-primary" href="#map-section" onclick="initMap('Carrefour')">Find Carrefour Stores</a>
<a class="btn btn-primary" href="#map-section" onclick="initMap('Auchan')">Find Auchan Stores</a>
<a class="btn btn-primary" href="#map-section" onclick="initMap('Mega')">Find Mega Stores</a>
<a class="btn btn-primary" href="#map-section" onclick="initMap('Carrefour', false)">Find Carrefour Stores</a>
<a class="btn btn-primary" href="#map-section" onclick="initMap('Auchan', false)">Find Auchan Stores</a>
<a class="btn btn-primary" href="#map-section" onclick="initMap('Mega', false)">Find Mega Stores</a>
</div>
</section>

Expand Down Expand Up @@ -99,11 +99,11 @@ async
let directionsRenderer;
let markersArray = [];
window.initMap = function (store="Carrefour", event) {
window.initMap = function (store="Carrefour", isDefault=true, event) {
if (event)
event.preventDefault();
url = getParameterByName("store");
if(url != null) {
if(url != null && isDefault) {
store = url;
}
map = new google.maps.Map(document.getElementById('map'), {
Expand Down
2 changes: 1 addition & 1 deletion Views/Product/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
}

<!-- <h2>Mega Image</h2> -->
<a class="fs-4 link-offset-2 link-underline link-underline-opacity-0 link-underline-opacity-50-hover link-opacity-50-hover" href="/?store=megaimage#map-section">Mega Image</a>
<a class="fs-4 link-offset-2 link-underline link-underline-opacity-0 link-underline-opacity-50-hover link-opacity-50-hover" href="/?store=Mega#map-section">Mega Image</a>
@if (ViewBag.MegaResults is List<MDS_PROJECT.Models.Product> megaResults && megaResults.Any())
{
<div class="mb-3">
Expand Down

0 comments on commit 8cb520f

Please sign in to comment.