react-google-maps icon indicating copy to clipboard operation
react-google-maps copied to clipboard

I want to display name for polygon , please help me. thank a lot.

Open quochuy1602 opened this issue 5 years ago • 4 comments

Getting Help

Before doing this, did you:

  1. Read the documentation
  2. Read the source code

You can get someone's help in three ways:

  1. Ask on StackOverflow with a google-maps tag or use react-google-maps as a keyword
  2. Ask in the chat room
  3. Create a Pull Request with your solutions to your problem

Please, be noted, no one, I mean, no one, is obligated to help you in ANY means. Your time is valuable, so does our contributors. Don't waste our time posting questions like “how do I do X with React-Google-Maps” and “my code doesn't work”. This is not the primary purpose of the issue tracker. Don't abuse.

quochuy1602 avatar Mar 04 '19 05:03 quochuy1602

I'm also stuck with the same issue, can't find any solution.

avishekjana avatar Mar 04 '19 09:03 avishekjana

Any progress or idea, we got the same issue too. Thanks

fwanghe avatar Jul 29 '19 01:07 fwanghe

You can use OverlayView: https://tomchentw.github.io/react-google-maps/#!/OverlayView or Marker with label but without icon:

import { Marker as RGMMarker } from 'react-google-maps';

interface IProps {
  label: string;
  position: google.maps.LatLng;
}

const GeozoneLabel: FC<IProps> = ({ label, position }) => (
  <RGMMarker
    position={position}
    label={{ text: label }}
    options={{
      icon: {
        url: '',
        size: new google.maps.Size(0, 0),
        origin: new google.maps.Point(0, 0),
        anchor: new google.maps.Point(0, 0),
      },
    }}
  />
);

export default GeozoneLabel;```

EugeneGlazkov avatar May 03 '20 21:05 EugeneGlazkov

@EugeneGlazkov The repo of this project is unmaintained more than a year, and we had build new version https://www.npmjs.com/package/@react-google-maps/api

We had rewrite it to TypeScript, and updating it frequently: https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api You can enjoy autocomplete.

You can see our docs: https://react-google-maps-api-docs.netlify.app

Also a lot of examples: https://react-google-maps-api-gatsby-demo.netlify.app/ https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api-gatsby-example/src/examples

The bundle size is much smaller: https://bundlephobia.com/result?p=@react-google-maps/api

Our Spectrum community: https://spectrum.chat/react-google-maps
Our Slack channel: https://join.slack.com/t/react-google-maps-api/shared_invite/enQtODc5ODU1NTY5MzQ4LTBiNTYzZmY1YmVjYzJhZThkMGU0YzUwZjJkNGJmYjk4YjQyYjZhMDk2YThlZGEzNDc0M2RhNjBmMWE4ZTJiMjQ

Enjoy!


JustFly1984 avatar May 06 '20 06:05 JustFly1984