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.

Problem on Bubbles map with latitude and longitude coordinates

See original GitHub issue

Hey folks, i am trying to plot a few countries on a Bubble map, i am using latitude and longitude to mark each country, but they are all plotted wrong, for instance i am using the US with 38 and -97, but the plotted bubble is not in the right place.

screen shot 2018-02-26 at 16 32 35

Follow my render method used on my page:

render() {
  const map = {
    center: [0, 20],
    zoom: 1,
  };

  const countries = [{
    name: 'United States',
    latitude_and_longitude: [38, -97],
    total_workers: 10,
  }];

  return (
    <ComposableMap
      projectionConfig={{ scale: 205 }}
      style={{
        width: "100%",
        height: "1024px",
      }}
      >
      <ZoomableGroup center={map.center} zoom={map.zoom}>
        <Geographies geography="/world.json">
          {(geographies, projection) =>
            geographies.map((geography, i) =>
              geography.id !== "ATA" && (
                <Geography
                  key={i}
                  geography={geography}
                  projection={projection}
                />
          ))}
        </Geographies>
        <Markers>
          {
            countries.map((country) => {
              return (
                country.latitude_and_longitude &&
                <Marker
                  key={country.id}
                  marker={{
                    name: country.name,
                    coordinates: country.latitude_and_longitude,
                    population: country.total_workers
                  }}>
                  <circle
                    cx={0}
                    cy={0}
                    r={country.total_workers}
                    fill="rgba(100, 189, 99, 0.8)"
                    stroke="#607D8B"
                    strokeWidth="2"
                    style={{cursor: 'pointer !important'}}
                  />
                </Marker>
              )
            })
          }
        </Markers>
      </ZoomableGroup>
    </ComposableMap>
  );
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zimrickcommented, Feb 26, 2018

Yeah, we had some trouble keeping issues on topic in the beginning, so that one’s a bit buried. Glad it’s all working out now 👍Looks cool!

1reaction
zimrickcommented, Feb 26, 2018

Oh sorry, I just saw you figured it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Map not accepting Latitude and Longitude as inputs - Question
Oddly, when the Bubble Map element receives that latitude and longitude coordinates for its address input, it doesn't place a marker on the...
Read more >
Bubble Map in Data Studio with Geo Coordinate ... - YouTube
Tutorial on plotting bubble map in Data Studio with latitude and longitude data. We'll also be discovering ways to interact with the Google ......
Read more >
Solved: Problem with the map - grouping bubbles
Hi,. I've got a meusare with longitude and latitude data (about 1000 pair of coordinates). On the modelling tab I changed the data...
Read more >
Latitude and longitude map with bubbles
A geographic coordinate map of the United States, based on degrees of latitude and longitude , shows a comparison of measurement values across...
Read more >
Problem with GeoJSON Coordinates for Bubble-Type Map ...
The received GeoJSON data is handled in a reversed longitude-latitude order when displaying a bubble-type layer in a Kendo UI Map.
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