explooosion / Agm-Direction

This is the directive for @agm/core (not official)
https://robby570.tw/Agm-Direction-Docs/
MIT License
75 stars 26 forks source link

add path of html view as value of infowindow parameter #58

Closed wilfriednhw closed 5 years ago

wilfriednhw commented 6 years ago

Hi @explooosion, iis it possible to add path of html view as value of infowindow parameter? here is an exemple:

INSTEAD OF : destination: { icon: 'https://i.imgur.com/7teZKif.png', infoWindow: `

Hello

Taiwan Tech ` }, **WE HAVE :** destination: { icon: 'https://i.imgur.com/7teZKif.png', infoWindow: 'src/app/layout/dashboard/infowindow.html' },

explooosion commented 5 years ago

Hi @wilfriednhw .

You can use iframe.

Example

public markerOptions = {
  origin: {
    icon: 'https://i.imgur.com/7teZKif.png',
    infoWindow: '<h2>Origin</h2>',
  },
  destination: {
    icon: 'https://i.imgur.com/7teZKif.png',
    infoWindow: `
    <iframe
      src='/info'
      width='400'
      height='200'
      frameborder='0'
    >
    <iframe>`,
  },
};

[app-routing.module.ts]

const routes: Routes = [
  { path: '', component: MyMapComponent },
  { path: 'info', component: InfoWindowComponent },
];