我最近尝试实现 tomchentw/react-google-maps,但我似乎无法弄清楚如何自定义标记图标,默认情况下,它显示一个红色图标,它工作正常,但是当我尝试传入图标道具,没有显示标记。
这是我的代码:
/* global google */
import React, { Component } from 'react';
import { MarkerWithLabel } from 'react-google-
maps/lib/components/addons/MarkerWithLabel';
import {
withScriptjs,
withGoogleMap,
GoogleMap,
Marker,
} from 'react-google-maps';
import { compose, withProps, withHandlers } from 'recompose';
const MapWithAMarkerClusterer = compose(
withProps({
googleMapURL: "https://maps.googleapis.com/maps/api/js?key=AIzaSyC3naz5xCZtPlOeMo38InY3GFr4k8A2LO0&v=3.exp&libraries=geometry,drawing,places",
loadingElement: <div style={{ height: `100%` }} />,
containerElement: <div style={{ height: `100%` }} />,
mapElement: <div style={{ height: `100%` }} />,
}),
withScriptjs,
withGoogleMap
)(props =>
<GoogleMap
defaultZoom={11}
defaultCenter={{ lat: 25.0391667, lng: 121.525 }}
> …Run Code Online (Sandbox Code Playgroud) 我是移动应用程序开发的新手,我一直在研究推送通知,并且我知道您有本地通知、设备上的静态通知和远程通知,从通知服务器(不是应用程序服务器)发送,我是尝试使用这个库,这是一个非常流行的用于推送通知的库:
https://github.com/zo0r/react-native-push-notification
我可以理解如何在 React Native 项目中设置它并使用本地通知,因为我找到了它的特定教程,但该教程仅展示了如何使用本地通知。
我一直在寻找更多关于如何逐步使用这个库进行远程通知的文档,从设置通知服务器到在React Native应用程序中使用它,但它们都是如此模糊的解释或使用不同的工具。