question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot get Map to show up at all, blinks for second, then disappears

See original GitHub issue

Spasibo bolshoi for this great package.

That said I can’t get it to show up on the screen. It comes up for a second then disappears.

The relevant code:

import React, { Component } from 'react';
import { render } from 'react-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import { TopBar, InfoBar } from './top-bar';
import MiddleBanner from './splash-banner';
import InventoryMap from './inventory';

class Application extends Component {

  render() {
    return (
      <div>
        <TopBar/>
        <InfoBar/>
        <MiddleBanner/>
        <InventoryMap/>
      </div>
    );
  }
};

render((
  <MuiThemeProvider>
    <Application/>
  </MuiThemeProvider>
), document.querySelector('#container'));

And the InventoryMap

import React, { Component } from 'react';
import GoogleMapReact from 'google-map-react';

const AnyReactComponent = ({ text }) => <div>{text}</div>;

const p = {
  zoom: 11,
  center: {lat: 59.95, lng: 30.33}
};

const Inventory = ({}) => (
  <GoogleMapReact
    defaultCenter={p.center}
    defaultZoom={p.zoom}
    >
    <AnyReactComponent
      lat={59.955413}
      lng={30.337844}
      text={'Kreyser Avrora'}
      />
  </GoogleMapReact>
);

export default Inventory;

there is no other CSS, I have also tried wrapping the GoogleMapReact component with a parent with min-height and height, both to no avail.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
istarkovcommented, Apr 15, 2017

😃 ոչ մի խնդիր

1reaction
fxfactorialcommented, Apr 15, 2017

Well I’m an idiot. Wrapped it again in a parent with specified height and it worked, sorry for noise.

However what is still odd to me is that using min-height does not make the component come up, while a fixed height does.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Maps Live Traffic appears briefly then disappears (not ...
I've had this problem in Firefox for some time: Live traffic shows for a few seconds, then disappears. It will reappear if I...
Read more >
Why is my react mapped array flashing and then disappearing?
The issue is due to promises inside listFiles function are not handled correctly, so files were returned as empty array, even if this...
Read more >
QgsMapCanvas window flashes on then disappears
Now a window is shown for a split second, then it disappears and the program finishes, as cmd is ready for new inputs....
Read more >
Mapped Drives Freezing, Disappearing, or Blinking ... - TechNet
Sometimes if you try to access a mapped drive, Explorer will freeze except for a green progress bar that seems to take forever....
Read more >
GeoGuessr but the location DISAPPEARS - Blink Mode 1 to ...
How well can I play GeoGuessr if the location vanishes after less than 1 second ? Today I'm trying out the amazing GeoGuessr...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found