[Feat] Improve documentation for development purposes

Đang mở
#509 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với hướng dẫn Getting Started và cách sử dụng APIProvider và Map được trình bày trong issue. Ghi lại cách thiết lập môi trường phát triển với API key trống, giải thích trường hợp sử dụng phù hợp và các hạn chế của nó, đồng thời quyết định xem có cần một dự án ví dụ hoặc liên kết hay không; công việc được xem là hoàn tất khi hướng dẫn bao quát việc thiết lập, khắc phục sự cố và hướng đi cho ví dụ được đề xuất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Target Use Case

I am using @vis.gl/react-google-maps in a development environment to build and test features that require Google Maps integration. While the library works well, I believe the documentation could be improved to better support developers who are using it for development purposes. Specifically, more detailed guidance on setting up and configuring the library in a local development environment would be highly beneficial.

Improving the documentation for development purposes would help not only me but also other developers who are integrating Google Maps into their React projects. Clear and comprehensive documentation would reduce setup time, lower the learning curve, and prevent common issues that developers might face during the development phase.

Proposal

To enhance the documentation, I propose the following improvements:

  1. Development Environment Configuration: Update the Getting Started guide to include a note that developers can set the apiKey to an empty string ("") during development to bypass the need for a specific API key. This allows for easier setup and testing without the concern of exceeding API key quotas.
    Example:
GOOGLE_MAPS_API_KEY=""
import React from 'react';
import {createRoot} from 'react-dom/client';
import {APIProvider, Map} from '@vis.gl/react-google-maps';

const App = () => (
  <APIProvider apiKey="">
    <Map
      style={{width: '100vw', height: '100vh'}}
      defaultCenter={{lat: 22.54992, lng: 0}}
      defaultZoom={3}
      gestureHandling={'greedy'}
      disableDefaultUI={true}
    />
  </APIProvider>
);

const root = createRoot(document.querySelector('#app'));
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);
  1. Additional Troubleshooting Tips: Provide guidance on when it's appropriate to use an empty string for the API key and the limitations or caveats of doing so.

  2. Example Projects: Consider including or linking to an example project in the documentation that uses an empty API key for development purposes. This project could serve as a quick-start template for new developers.
    These improvements would streamline the setup process, making it easier for developers to start working with @vis.gl/react-google-maps in a development environment.

Ngôn ngữ chính
TypeScript
Star
1.9k
Fork
192
Merge trung bình
3 ngày 13 phút
Pull request đã merge (30 ngày)
26

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của visgl/react-google-maps

Tất cả issue của visgl/react-google-maps

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.