![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-hotels-on-map
Advanced tools
Presents a set of hotels as clustered markers on Google Map, each with an info window displaying the hotel summary
Presents a set of hotels as clustered markers on Google Map, each with an info window displaying the
hotel summary. That's a very simple, narrowly specialized component, tailored for hotels. If you
need something more general, take a look at
react-google-maps. Yet another difference from
react-google-maps
is the React 0.13 support: react-google-maps
v4+, which is capable of
clustering map markers, requires React 0.14.
import React from 'react';
import HotelsOnMap from 'hotels-on-map';
const props = {hotels: [{
ratingStars: 5,
name: 'Hôtel InterContinental Genève',
streetAddress: 'Chemin du Petit-Saconnex 7-9',
postalCode: '1209',
cityLocalized: 'Genève',
geolocation: {latitude: 46.22425, longitude: 6.132383}
}, {
ratingStars: 3,
name: 'Hôtel Eden',
streetAddress: 'Rue de Lausanne 135',
postalCode: '1202',
cityLocalized: 'Genève',
geolocation: {latitude: 46.221928, longitude: 6.148965}
}/* ... */]};
React.render(
<HotelsOnMap {...props}/>,
global.document.getElementById('root')
);
The code above will display and cluster all the hotel markers on the map, making sure that all the clustered markers are visible. On a marker click, an info-window with the short hotel information will be displayed.
You're encouraged to also set the markerClusterImageUrlPrefix
prop value, and host the cluster
images on your own Web property. The default value is
https://www.swisshotels.com/client-side-public/img/markerclustererplus/m
, giving you those:
When the length of the hotels
array is 1
, an info window for the single hotel is displayed
immediately, saving the user a marker click.
See the short example code with that sample data running live here.
FAQs
Presents a set of hotels as clustered markers on Google Map, each with an info window displaying the hotel summary
The npm package react-hotels-on-map receives a total of 0 weekly downloads. As such, react-hotels-on-map popularity was classified as not popular.
We found that react-hotels-on-map demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.