Loading...
Loading...
Compare original and translation side by side
@syncfusion/ej2-angular-maps@syncfusion/ej2-angular-maps@syncfusion/ej2-angular-mapsundefinedundefinedundefinedundefinedimport { Component } from '@angular/core';
import { MapsModule } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map'; // GeoJSON data
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
template: `
<ejs-maps id='maps-container'>
<e-layers>
<e-layer [shapeData]='shapeData'></e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public shapeData: object = world_map;
}import { Component } from '@angular/core';
import { MapsModule } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map'; // GeoJSON data
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
template: `
<ejs-maps id='maps-container'>
<e-layers>
<e-layer [shapeData]='shapeData'></e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public shapeData: object = world_map;
}import { Component } from '@angular/core';
import { MapsModule } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map';
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
template: `
<ejs-maps id='maps-container'>
<e-layers>
<e-layer
[shapeData]='shapeData'
[dataSource]='dataSource'
shapeDataPath='Country'
shapePropertyPath='name'
[shapeSettings]='shapeSettings'>
</e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public shapeData: object = world_map;
public dataSource: object[] = [
{ Country: 'United States', Population: 331002651, Code: 'US' },
{ Country: 'India', Population: 1380004385, Code: 'IN' },
{ Country: 'China', Population: 1439323776, Code: 'CN' }
];
public shapeSettings: object = {
colorValuePath: 'Population',
colorMapping: [
{ from: 0, to: 100000000, color: '#C5E8B7' },
{ from: 100000001, to: 500000000, color: '#5BC85A' },
{ from: 500000001, to: 2000000000, color: '#238B45' }
]
};
}import { Component } from '@angular/core';
import { MapsModule } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map';
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
template: `
<ejs-maps id='maps-container'>
<e-layers>
<e-layer
[shapeData]='shapeData'
[dataSource]='dataSource'
shapeDataPath='Country'
shapePropertyPath='name'
[shapeSettings]='shapeSettings'>
</e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public shapeData: object = world_map;
public dataSource: object[] = [
{ Country: 'United States', Population: 331002651, Code: 'US' },
{ Country: 'India', Population: 1380004385, Code: 'IN' },
{ Country: 'China', Population: 1439323776, Code: 'CN' }
];
public shapeSettings: object = {
colorValuePath: 'Population',
colorMapping: [
{ from: 0, to: 100000000, color: '#C5E8B7' },
{ from: 100000001, to: 500000000, color: '#5BC85A' },
{ from: 500000001, to: 2000000000, color: '#238B45' }
]
};
}import { Component } from '@angular/core';
import { MapsModule, MarkerService, MapsTooltipService } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map';
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
providers: [MarkerService, MapsTooltipService],
template: `
<ejs-maps id='maps-container'>
<e-layers>
<e-layer
[shapeData]='shapeData'
[markerSettings]='markerSettings'>
</e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public shapeData: object = world_map;
public markerSettings: object[] = [{
visible: true,
dataSource: [
{ latitude: 40.7128, longitude: -74.0060, name: 'New York' },
{ latitude: 51.5074, longitude: -0.1278, name: 'London' },
{ latitude: 35.6762, longitude: 139.6503, name: 'Tokyo' }
],
shape: 'Circle',
fill: '#FF6347',
height: 15,
width: 15,
tooltipSettings: {
visible: true,
valuePath: 'name'
}
}];
}import { Component } from '@angular/core';
import { MapsModule, MarkerService, MapsTooltipService } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map';
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
providers: [MarkerService, MapsTooltipService],
template: `
<ejs-maps id='maps-container'>
<e-layers>
<e-layer
[shapeData]='shapeData'
[markerSettings]='markerSettings'>
</e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public shapeData: object = world_map;
public markerSettings: object[] = [{
visible: true,
dataSource: [
{ latitude: 40.7128, longitude: -74.0060, name: 'New York' },
{ latitude: 51.5074, longitude: -0.1278, name: 'London' },
{ latitude: 35.6762, longitude: 139.6503, name: 'Tokyo' }
],
shape: 'Circle',
fill: '#FF6347',
height: 15,
width: 15,
tooltipSettings: {
visible: true,
valuePath: 'name'
}
}];
}import { Component } from '@angular/core';
import { MapsModule, ZoomService, LegendService } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map';
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
providers: [ZoomService, LegendService],
template: `
<ejs-maps
id='maps-container'
[zoomSettings]='zoomSettings'
[legendSettings]='legendSettings'>
<e-layers>
<e-layer
[shapeData]='shapeData'
[dataSource]='dataSource'
shapeDataPath='Country'
shapePropertyPath='name'
[shapeSettings]='shapeSettings'>
</e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public shapeData: object = world_map;
public dataSource: object[] = [
{ Country: 'United States', Category: 'High' },
{ Country: 'Canada', Category: 'Medium' },
{ Country: 'Mexico', Category: 'Low' }
];
public shapeSettings: object = {
colorValuePath: 'Category',
colorMapping: [
{ value: 'High', color: '#E74C3C' },
{ value: 'Medium', color: '#F39C12' },
{ value: 'Low', color: '#27AE60' }
]
};
public zoomSettings: object = {
enable: true,
toolbars: ['Zoom', 'ZoomIn', 'ZoomOut', 'Pan', 'Reset']
};
public legendSettings: object = {
visible: true,
position: 'Bottom'
};
}import { Component } from '@angular/core';
import { MapsModule, ZoomService, LegendService } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map';
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
providers: [ZoomService, LegendService],
template: `
<ejs-maps
id='maps-container'
[zoomSettings]='zoomSettings'
[legendSettings]='legendSettings'>
<e-layers>
<e-layer
[shapeData]='shapeData'
[dataSource]='dataSource'
shapeDataPath='Country'
shapePropertyPath='name'
[shapeSettings]='shapeSettings'>
</e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public shapeData: object = world_map;
public dataSource: object[] = [
{ Country: 'United States', Category: 'High' },
{ Country: 'Canada', Category: 'Medium' },
{ Country: 'Mexico', Category: 'Low' }
];
public shapeSettings: object = {
colorValuePath: 'Category',
colorMapping: [
{ value: 'High', color: '#E74C3C' },
{ value: 'Medium', color: '#F39C12' },
{ value: 'Low', color: '#27AE60' }
]
};
public zoomSettings: object = {
enable: true,
toolbars: ['Zoom', 'ZoomIn', 'ZoomOut', 'Pan', 'Reset']
};
public legendSettings: object = {
visible: true,
position: 'Bottom'
};
}import { Component } from '@angular/core';
import { MapsModule } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map';
import { usa_map } from './usa-map';
import { california } from './california';
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
template: `
<ejs-maps id='maps-container'>
<e-layers>
<!-- Base layer -->
<e-layer
[shapeData]='usaMap'
[shapeSettings]='baseShapeSettings'>
</e-layer>
<!-- Sublayer highlighting California -->
<e-layer
type='SubLayer'
[shapeData]='californiaMap'
[shapeSettings]='sublayerShapeSettings'>
</e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public usaMap: object = usa_map;
public californiaMap: object = california;
public baseShapeSettings: object = {
fill: '#E5E5E5',
border: { color: '#000000', width: 0.5 }
};
public sublayerShapeSettings: object = {
fill: '#FFD700',
border: { color: '#FF6347', width: 2 }
};
}import { Component } from '@angular/core';
import { MapsModule } from '@syncfusion/ej2-angular-maps';
import { world_map } from './world-map';
import { usa_map } from './usa-map';
import { california } from './california';
@Component({
selector: 'app-root',
standalone: true,
imports: [MapsModule],
template: `
<ejs-maps id='maps-container'>
<e-layers>
<!-- Base layer -->
<e-layer
[shapeData]='usaMap'
[shapeSettings]='baseShapeSettings'>
</e-layer>
<!-- Sublayer highlighting California -->
<e-layer
type='SubLayer'
[shapeData]='californiaMap'
[shapeSettings]='sublayerShapeSettings'>
</e-layer>
</e-layers>
</ejs-maps>
`
})
export class AppComponent {
public usaMap: object = usa_map;
public californiaMap: object = california;
public baseShapeSettings: object = {
fill: '#E5E5E5',
border: { color: '#000000', width: 0.5 }
};
public sublayerShapeSettings: object = {
fill: '#FFD700',
border: { color: '#FF6347', width: 2 }
};
}shapeDatadataSourceshapeDataPathshapePropertyPathshapeSettingstypeshapeDatadataSourceshapeDataPathshapePropertyPathshapeSettingstypefillbordercolorValuePathcolorMappingautofillfillbordercolorValuePathcolorMappingautofillvisibledataSourceshapeheightwidthtemplatetooltipSettingsvisibledataSourceshapeheightwidthtemplatetooltipSettingsenablezoomFactormaxZoomminZoomtoolbarsmouseWheelZoompinchZoomingenablezoomFactormaxZoomminZoomtoolbarsmouseWheelZoompinchZoomingvisiblepositionmodetypevisiblepositionmodetypeimport {
MapsModule,
MarkerService, // For markers
BubbleService, // For bubbles
DataLabelService, // For data labels
LegendService, // For legends
MapsTooltipService, // For tooltips
ZoomService, // For zoom and pan
SelectionService, // For selection
HighlightService, // For highlighting
NavigationLineService, // For navigation lines
AnnotationsService, // For annotations
PolygonService // For polygons
} from '@syncfusion/ej2-angular-maps';
@Component({
providers: [
MarkerService,
LegendService,
MapsTooltipService,
ZoomService
// Add only the services you need
]
})import {
MapsModule,
MarkerService, // For markers
BubbleService, // For bubbles
DataLabelService, // For data labels
LegendService, // For legends
MapsTooltipService, // For tooltips
ZoomService, // For zoom and pan
SelectionService, // For selection
HighlightService, // For highlighting
NavigationLineService, // For navigation lines
AnnotationsService, // For annotations
PolygonService // For polygons
} from '@syncfusion/ej2-angular-maps';
@Component({
providers: [
MarkerService,
LegendService,
MapsTooltipService,
ZoomService
// Add only the services you need
]
})@syncfusion/ej2-angular-maps@syncfusion/ej2-angular-maps