Repository URL to install this package:
|
Version:
2.8.0-studio-release ▾
|
import React from 'react'
import Image from 'atoms/Image'
import GoogleMap from './GoogleMap'
const IS_BROWSER = typeof window === 'object'
// const IS_BROWSER = false
// For temporary fix.. Needs to move this in uxui-modules config
const GOOGLE_API_KEY = 'AIzaSyA08efSv82XGllA0frxNT08-_W7sdGgA5A'
class Map extends React.PureComponent {
static BASE_URL = 'https://maps.googleapis.com/maps/api/staticmap?center=Vancouver,BC,Canada&zoom=13&size=600x400&maptype=roadmap'
// Williamsburg,Brooklyn,NY
// static BASE_URL = 'http://maps.googleapis.com/maps/api/staticmap?center=Tidel+Park+Coimbatore+IT+SEZ&zoom=13&size=600x400'
render() {
let url = Map.BASE_URL
url += `&markers=color:blue%7Clabel:S%7C11211%7C11206%7C11222`
url += `&key=${GOOGLE_API_KEY}`
const mapView = IS_BROWSER
? <GoogleMap {...this.props} />
: <Image nowrap src={url} />
return mapView
}
}
export { Map }
export default Map