Angular Map - key
jQuery
index.js
$(function() { $("#mapContainer").dxMap({ // ... key: { bing: "MY_BING_MAPS_KEY", google: "MY_GOOGLE_MAPS_KEY", googleStatic: "MY_GOOGLE_STATIC_MAPS_KEY" } }); });
Angular
app.component.html
app.component.ts
app.module.ts
<dx-map ... > <dxo-key bing="MY_BING_MAPS_KEY" google="MY_GOOGLE_MAPS_KEY" googleStatic="MY_GOOGLE_STATIC_MAPS_KEY"> </dxo-key> </dx-map>
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { }
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { DxMapModule } from 'devextreme-angular'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, DxMapModule ], providers: [ ], bootstrap: [AppComponent] }) export class AppModule { }
Vue
App.vue
<template> <DxMap ... > <DxKey bing="MY_BING_MAPS_KEY" google="MY_GOOGLE_MAPS_KEY" googleStatic="MY_GOOGLE_STATIC_MAPS_KEY" /> </DxMap> </template> <script> import 'devextreme/dist/css/dx.common.css'; import 'devextreme/dist/css/dx.light.css'; import DxMap, { DxKey } from 'devextreme-vue/map'; export default { components: { DxMap, DxKey } } </script>
React
App.js
import React from 'react'; import 'devextreme/dist/css/dx.common.css'; import 'devextreme/dist/css/dx.light.css'; import Map, { Key } from 'devextreme-react/map'; class App extends React.Component { render() { return ( <Map ... > <Key bing="MY_BING_MAPS_KEY" google="MY_GOOGLE_MAPS_KEY" googleStatic="MY_GOOGLE_STATIC_MAPS_KEY" /> </Map> ); } } export default App;
NOTE
The value of this option cannot be changed dynamically.
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.