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

Map Clusters per country (number of dishes), support country deeplinks #78

Open
tillkuhn opened this issue Mar 20, 2021 · 1 comment
Open
Assignees
Labels
ui Issue related to user interface

Comments

@tillkuhn
Copy link
Owner

tillkuhn commented Mar 20, 2021

Feature
Map should show centers of countries so dishes can deeplink into a MapLocation based on its (iso-)code

URL References

// add markers to map
geojson.features.forEach(function (marker) {
// create a DOM element for the marker
var el = document.createElement('div');
el.className = 'marker';
el.style.backgroundImage =
'url(https://placekitten.com/g/' +
marker.properties.iconSize.join('/') +
'/)';
el.style.width = marker.properties.iconSize[0] + 'px';
el.style.height = marker.properties.iconSize[1] + 'px';
el.style.backgroundSize = '100%';
@tillkuhn tillkuhn self-assigned this Mar 20, 2021
@tillkuhn
Copy link
Owner Author

@Component({
  template: `
  <mgl-map
    [style]="'mapbox://styles/mapbox/streets-v9'"
    [zoom]="[5]"
    [center]="[-65.017, -16.457]"
  >
    <mgl-marker
      [lngLat]="[-66.324462890625, -16.024695711685304]"
    >
      <div
        (click)="alert('Foo')"
        class="marker"
        style="background-image: url(https://placekitten.com/g/60/60); width: 60px; height: 60px"
      >
      </div>
    </mgl-marker>
    <mgl-marker
      [lngLat]="[-61.2158203125, -15.97189158092897]"
    >
      <div
        (click)="alert('Bar')"
        class="marker"
        style="background-image: url(https://placekitten.com/g/50/50); width: 50px; height: 50px"
      >
      </div>
    </mgl-marker>
    <mgl-marker
      [lngLat]="[-63.29223632812499, -18.28151823530889]"
    >
      <div
        (click)="alert('Baz')"
        class="marker"
        style="background-image: url(https://placekitten.com/g/40/40); width: 40px; height: 40px"
      >
      </div>
    </mgl-marker>
  </mgl-map>
  `,
  styleUrls: ['./examples.css', './custom-marker-icons.component.css']
})
export class NgxCustomMarkerIconsComponent {
  alert(message: string) {
    alert(message);
  }
}

@tillkuhn tillkuhn added angular ui Issue related to user interface and removed angular labels Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui Issue related to user interface
Projects
None yet
Development

No branches or pull requests

1 participant